@retinalabsllc/zairusjs 4.0.31 → 4.0.33
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/index.d.mts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +479 -246
- package/dist/index.mjs +499 -257
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1957,14 +1957,21 @@ var GifFeatureCard = ({
|
|
|
1957
1957
|
// src/components/UniversalSidebar.tsx
|
|
1958
1958
|
import React27, { useState as useState15, useEffect as useEffect12 } from "react";
|
|
1959
1959
|
import Link9 from "next/link";
|
|
1960
|
+
import toast4 from "react-hot-toast";
|
|
1960
1961
|
import { HugeiconsIcon as HugeiconsIcon13 } from "@hugeicons/react";
|
|
1961
1962
|
import {
|
|
1962
1963
|
SidebarLeft01Icon,
|
|
1963
1964
|
CancelCircleIcon,
|
|
1964
1965
|
LogoutCircle02Icon,
|
|
1965
|
-
ArrowLeft01Icon as ArrowLeft01Icon2
|
|
1966
|
+
ArrowLeft01Icon as ArrowLeft01Icon2,
|
|
1967
|
+
ArrowRight01Icon as ArrowRight01Icon3,
|
|
1968
|
+
Notification03Icon
|
|
1966
1969
|
} from "@hugeicons/core-free-icons";
|
|
1967
1970
|
var ButtonSpinner = () => /* @__PURE__ */ React27.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React27.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React27.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
1971
|
+
var formatNotifDate = (d) => {
|
|
1972
|
+
const date = new Date(d);
|
|
1973
|
+
return date.toLocaleDateString("en-US", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
|
|
1974
|
+
};
|
|
1968
1975
|
var UniversalSidebar = ({
|
|
1969
1976
|
navItems,
|
|
1970
1977
|
currentPath,
|
|
@@ -1975,6 +1982,14 @@ var UniversalSidebar = ({
|
|
|
1975
1982
|
userName = "Profile",
|
|
1976
1983
|
userTag,
|
|
1977
1984
|
userInitials = "U",
|
|
1985
|
+
web3Address,
|
|
1986
|
+
web3Avatar,
|
|
1987
|
+
notifications,
|
|
1988
|
+
unreadNotificationsCount = 0,
|
|
1989
|
+
notificationPage = 1,
|
|
1990
|
+
notificationTotalPages = 1,
|
|
1991
|
+
onNotificationPageChange,
|
|
1992
|
+
onNotificationClick,
|
|
1978
1993
|
showBackButton = false,
|
|
1979
1994
|
backUrl = "/app",
|
|
1980
1995
|
showLogoutAction = false,
|
|
@@ -1988,6 +2003,8 @@ var UniversalSidebar = ({
|
|
|
1988
2003
|
const [isCollapsed, setIsCollapsed] = useState15(false);
|
|
1989
2004
|
const [showLogoutDialog, setShowLogoutDialog] = useState15(false);
|
|
1990
2005
|
const [isLoggingOut, setIsLoggingOut] = useState15(false);
|
|
2006
|
+
const [showNotifDialog, setShowNotifDialog] = useState15(false);
|
|
2007
|
+
const [selectedNotif, setSelectedNotif] = useState15(null);
|
|
1991
2008
|
useEffect12(() => {
|
|
1992
2009
|
if (isMobileOpen) {
|
|
1993
2010
|
closeMobile();
|
|
@@ -2006,31 +2023,50 @@ var UniversalSidebar = ({
|
|
|
2006
2023
|
setShowLogoutDialog(false);
|
|
2007
2024
|
}
|
|
2008
2025
|
};
|
|
2009
|
-
|
|
2026
|
+
const handleCopyWallet = () => {
|
|
2027
|
+
if (web3Address) {
|
|
2028
|
+
navigator.clipboard.writeText(web3Address);
|
|
2029
|
+
toast4.success("Address copied");
|
|
2030
|
+
}
|
|
2031
|
+
};
|
|
2032
|
+
const HeaderActions = () => /* @__PURE__ */ React27.createElement("div", { className: "flex items-center gap-2 pointer-events-auto" }, web3Address && /* @__PURE__ */ React27.createElement(
|
|
2033
|
+
"div",
|
|
2034
|
+
{
|
|
2035
|
+
onClick: handleCopyWallet,
|
|
2036
|
+
className: "flex items-center gap-2 bg-white rounded-full p-1 pr-3 shadow-sm cursor-pointer hover:bg-neutral-50 transition-colors",
|
|
2037
|
+
title: "Copy Address"
|
|
2038
|
+
},
|
|
2039
|
+
web3Avatar ? /* @__PURE__ */ React27.createElement("img", { src: web3Avatar, alt: "Avatar", className: "w-6 h-6 rounded-full bg-neutral-100 object-cover shrink-0" }) : /* @__PURE__ */ React27.createElement("div", { className: "w-6 h-6 rounded-full bg-neutral-100 flex items-center justify-center text-[9px] text-black shrink-0 " }, userInitials.substring(0, 2)),
|
|
2040
|
+
/* @__PURE__ */ React27.createElement("span", { className: "text-[11px] text-black truncate max-w-20 sm:max-w-37.5" }, web3Address)
|
|
2041
|
+
), notifications !== void 0 && /* @__PURE__ */ React27.createElement(
|
|
2010
2042
|
"button",
|
|
2011
2043
|
{
|
|
2012
|
-
onClick:
|
|
2013
|
-
|
|
2014
|
-
|
|
2044
|
+
onClick: () => {
|
|
2045
|
+
setShowNotifDialog(true);
|
|
2046
|
+
setSelectedNotif(null);
|
|
2047
|
+
},
|
|
2048
|
+
className: "relative w-10 h-10 shrink-0 bg-white rounded-full flex items-center justify-center text-neutral-600 hover:text-black hover:bg-neutral-50 transition-all duration-300 outline-none shadow-sm border border-neutral-100"
|
|
2015
2049
|
},
|
|
2016
|
-
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon:
|
|
2050
|
+
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: Notification03Icon, size: 18 }),
|
|
2051
|
+
unreadNotificationsCount > 0 && /* @__PURE__ */ React27.createElement("span", { className: "absolute top-2 right-2.5 w-2 h-2 bg-blue-500 rounded-full border border-white" })
|
|
2017
2052
|
), showBackButton && /* @__PURE__ */ React27.createElement(
|
|
2018
2053
|
Link9,
|
|
2019
2054
|
{
|
|
2020
2055
|
href: backUrl,
|
|
2021
|
-
className: "w-10 h-10 bg-white rounded-full flex items-center justify-center text-black hover:bg-neutral-50 transition-all duration-300 outline-none",
|
|
2056
|
+
className: "w-10 h-10 shrink-0 bg-white rounded-full flex items-center justify-center text-neutral-600 hover:text-black hover:bg-neutral-50 transition-all duration-300 outline-none shadow-sm border border-neutral-100",
|
|
2022
2057
|
"aria-label": "Go Back"
|
|
2023
2058
|
},
|
|
2024
2059
|
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: ArrowLeft01Icon2, size: 18 })
|
|
2025
|
-
))
|
|
2026
|
-
|
|
2060
|
+
));
|
|
2061
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("div", { className: "md:hidden fixed top-0 left-0 w-full h-16 bg-neutral-100 z-40 flex items-center justify-between px-4" }, /* @__PURE__ */ React27.createElement(
|
|
2062
|
+
"button",
|
|
2027
2063
|
{
|
|
2028
|
-
|
|
2029
|
-
className:
|
|
2030
|
-
"aria-label": "
|
|
2064
|
+
onClick: openMobile,
|
|
2065
|
+
className: `w-10 h-10 bg-white rounded-full flex items-center justify-center text-black transition-all duration-300 outline-none ${isMobileOpen ? "opacity-0 pointer-events-none scale-90" : "opacity-100 scale-100"}`,
|
|
2066
|
+
"aria-label": "Open Menu"
|
|
2031
2067
|
},
|
|
2032
|
-
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon:
|
|
2033
|
-
)), /* @__PURE__ */ React27.createElement(
|
|
2068
|
+
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: SidebarLeft01Icon, size: 18 })
|
|
2069
|
+
), /* @__PURE__ */ React27.createElement(HeaderActions, null)), /* @__PURE__ */ React27.createElement("div", { className: "hidden md:flex fixed top-0 right-0 w-full justify-end px-8 pt-6 pb-4 bg-neutral-100 z-40 pointer-events-none" }, /* @__PURE__ */ React27.createElement(HeaderActions, null)), /* @__PURE__ */ React27.createElement(
|
|
2034
2070
|
"div",
|
|
2035
2071
|
{
|
|
2036
2072
|
className: `fixed inset-0 bg-black/30 shadow-2xl transition-opacity duration-300 md:hidden z-90 ${isMobileOpen ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"}`,
|
|
@@ -2046,7 +2082,7 @@ var UniversalSidebar = ({
|
|
|
2046
2082
|
${isCollapsed ? "md:w-16 w-64" : "w-64"}
|
|
2047
2083
|
`
|
|
2048
2084
|
},
|
|
2049
|
-
/* @__PURE__ */ React27.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center min-h-18" : "justify-between"}` }, /* @__PURE__ */ React27.createElement("div", { className: `flex items-center gap-3 text-left ${!isCollapsed || isMobileOpen ? "w-full" : ""}` }, /* @__PURE__ */ React27.createElement("div", { className: "w-
|
|
2085
|
+
/* @__PURE__ */ React27.createElement("div", { className: `flex items-center shrink-0 p-5 ${isCollapsed && !isMobileOpen ? "justify-center min-h-18" : "justify-between"}` }, /* @__PURE__ */ React27.createElement("div", { className: `flex items-center gap-3 text-left ${!isCollapsed || isMobileOpen ? "w-full" : ""}` }, /* @__PURE__ */ React27.createElement("div", { className: "w-9 h-9 rounded-full flex items-center justify-center shrink-0 border border-neutral-200/50" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[10px] text-black uppercase tracking-wider" }, userInitials.substring(0, 2))), (!isCollapsed || isMobileOpen) && /* @__PURE__ */ React27.createElement("div", { className: "flex flex-col justify-center min-w-0 pr-2 flex-1" }, /* @__PURE__ */ React27.createElement("span", { className: "text-[13px] text-black leading-none truncate tracking-wide mb-1" }, userName), userTag && /* @__PURE__ */ React27.createElement("span", { className: "text-[9px] text-[#1f26d6] truncate tracking-[0.2em] leading-none " }, userTag))), /* @__PURE__ */ React27.createElement("div", { className: "md:hidden flex shrink-0" }, /* @__PURE__ */ React27.createElement(
|
|
2050
2086
|
"button",
|
|
2051
2087
|
{
|
|
2052
2088
|
onClick: closeMobile,
|
|
@@ -2093,20 +2129,48 @@ var UniversalSidebar = ({
|
|
|
2093
2129
|
className: "flex items-center justify-center md:justify-start gap-3 w-full p-2.5 rounded-full text-neutral-500 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
2094
2130
|
},
|
|
2095
2131
|
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: SidebarLeft01Icon, size: 18, className: "shrink-0 text-neutral-400" }),
|
|
2096
|
-
!isCollapsed && /* @__PURE__ */ React27.createElement("span", { className: "text-xs" }, "Collapse")
|
|
2132
|
+
!isCollapsed && /* @__PURE__ */ React27.createElement("span", { className: "text-xs " }, "Collapse")
|
|
2097
2133
|
)))
|
|
2098
|
-
),
|
|
2134
|
+
), showNotifDialog && /* @__PURE__ */ React27.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React27.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React27.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-150 max-h-[80vh]" }, /* @__PURE__ */ React27.createElement("div", { className: "flex items-center justify-between p-5 border-b border-neutral-100 shrink-0" }, selectedNotif ? /* @__PURE__ */ React27.createElement("button", { onClick: () => setSelectedNotif(null), className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest uppercase" }, /* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: ArrowLeft01Icon2, size: 14 }), " Back") : /* @__PURE__ */ React27.createElement("h3", { className: "text-[15px] text-black tracking-tight " }, "Notifications"), /* @__PURE__ */ React27.createElement("button", { onClick: () => setShowNotifDialog(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: CancelCircleIcon, size: 18 }))), /* @__PURE__ */ React27.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React27.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React27.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React27.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest uppercase mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React27.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message)) : /* @__PURE__ */ React27.createElement("div", { className: "flex flex-col divide-y divide-neutral-50/50" }, notifications?.length === 0 ? /* @__PURE__ */ React27.createElement("div", { className: "p-8 text-center text-xs text-neutral-400" }, "You have no notifications.") : notifications?.map((notif) => /* @__PURE__ */ React27.createElement(
|
|
2135
|
+
"div",
|
|
2136
|
+
{
|
|
2137
|
+
key: notif.id,
|
|
2138
|
+
onClick: () => {
|
|
2139
|
+
setSelectedNotif(notif);
|
|
2140
|
+
onNotificationClick?.(notif);
|
|
2141
|
+
},
|
|
2142
|
+
className: "p-3 flex items-start gap-3 hover:bg-neutral-50 rounded-xl cursor-pointer transition-colors"
|
|
2143
|
+
},
|
|
2144
|
+
/* @__PURE__ */ React27.createElement("div", { className: "mt-1.5 shrink-0" }, !notif.isRead ? /* @__PURE__ */ React27.createElement("div", { className: "w-1.5 h-1.5 bg-blue-500 rounded-full" }) : /* @__PURE__ */ React27.createElement("div", { className: "w-1.5 h-1.5 bg-transparent" })),
|
|
2145
|
+
/* @__PURE__ */ React27.createElement("div", { className: "flex-1 min-w-0 text-left" }, /* @__PURE__ */ React27.createElement("h5", { className: `text-[12px] truncate ${notif.isRead ? "text-neutral-500 " : "text-black "}` }, notif.title), /* @__PURE__ */ React27.createElement("p", { className: "text-[11px] text-neutral-400 truncate mt-0.5" }, notif.message), /* @__PURE__ */ React27.createElement("span", { className: "text-[9px] text-neutral-400 tracking-widest uppercase mt-2 block" }, formatNotifDate(notif.createdAt)))
|
|
2146
|
+
)))), !selectedNotif && notificationTotalPages > 1 && /* @__PURE__ */ React27.createElement("div", { className: "p-4 border-t border-neutral-100 flex items-center justify-between shrink-0 bg-neutral-50/50" }, /* @__PURE__ */ React27.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest uppercase" }, "Page ", notificationPage, " of ", notificationTotalPages), /* @__PURE__ */ React27.createElement("div", { className: "flex gap-1" }, /* @__PURE__ */ React27.createElement(
|
|
2147
|
+
"button",
|
|
2148
|
+
{
|
|
2149
|
+
disabled: notificationPage === 1,
|
|
2150
|
+
onClick: () => onNotificationPageChange?.(notificationPage - 1),
|
|
2151
|
+
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
2152
|
+
},
|
|
2153
|
+
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: ArrowLeft01Icon2, size: 12 })
|
|
2154
|
+
), /* @__PURE__ */ React27.createElement(
|
|
2155
|
+
"button",
|
|
2156
|
+
{
|
|
2157
|
+
disabled: notificationPage === notificationTotalPages,
|
|
2158
|
+
onClick: () => onNotificationPageChange?.(notificationPage + 1),
|
|
2159
|
+
className: "w-7 h-7 flex items-center justify-center rounded-full bg-white border border-neutral-200 text-neutral-600 disabled:opacity-30 outline-none hover:bg-neutral-50 transition-colors"
|
|
2160
|
+
},
|
|
2161
|
+
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: ArrowRight01Icon3, size: 12 })
|
|
2162
|
+
))))), showLogoutDialog && showLogoutAction && /* @__PURE__ */ React27.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React27.createElement(
|
|
2099
2163
|
"div",
|
|
2100
2164
|
{
|
|
2101
2165
|
className: "absolute inset-0 bg-black/30",
|
|
2102
2166
|
onClick: () => !isLoggingOut && setShowLogoutDialog(false)
|
|
2103
2167
|
}
|
|
2104
|
-
), /* @__PURE__ */ React27.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React27.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React27.createElement("h3", { className: "
|
|
2168
|
+
), /* @__PURE__ */ React27.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React27.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1 " }, "Secure Logout"), /* @__PURE__ */ React27.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to log out? You will need to authenticate to return.")), /* @__PURE__ */ React27.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React27.createElement(
|
|
2105
2169
|
"button",
|
|
2106
2170
|
{
|
|
2107
2171
|
onClick: () => setShowLogoutDialog(false),
|
|
2108
2172
|
disabled: isLoggingOut,
|
|
2109
|
-
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
2173
|
+
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none "
|
|
2110
2174
|
},
|
|
2111
2175
|
"Cancel"
|
|
2112
2176
|
), /* @__PURE__ */ React27.createElement(
|
|
@@ -2114,7 +2178,7 @@ var UniversalSidebar = ({
|
|
|
2114
2178
|
{
|
|
2115
2179
|
onClick: handleLogoutInitiation,
|
|
2116
2180
|
disabled: isLoggingOut,
|
|
2117
|
-
className: "flex-1 py-3 text-[13px] text-[#
|
|
2181
|
+
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none "
|
|
2118
2182
|
},
|
|
2119
2183
|
isLoggingOut ? /* @__PURE__ */ React27.createElement(ButtonSpinner, null) : "Log Out"
|
|
2120
2184
|
)))), showInterceptDialog && /* @__PURE__ */ React27.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React27.createElement(
|
|
@@ -2123,18 +2187,18 @@ var UniversalSidebar = ({
|
|
|
2123
2187
|
className: "absolute inset-0 bg-black/30",
|
|
2124
2188
|
onClick: onCancelIntercept
|
|
2125
2189
|
}
|
|
2126
|
-
), /* @__PURE__ */ React27.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React27.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1" }, interceptTitle), /* @__PURE__ */ React27.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, interceptMessage)), /* @__PURE__ */ React27.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React27.createElement(
|
|
2190
|
+
), /* @__PURE__ */ React27.createElement("div", { className: "relative w-72 bg-white rounded-2xl flex flex-col items-center overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React27.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[17px] text-black tracking-tight mb-1 " }, interceptTitle), /* @__PURE__ */ React27.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, interceptMessage)), /* @__PURE__ */ React27.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React27.createElement(
|
|
2127
2191
|
"button",
|
|
2128
2192
|
{
|
|
2129
2193
|
onClick: onCancelIntercept,
|
|
2130
|
-
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none"
|
|
2194
|
+
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
2131
2195
|
},
|
|
2132
2196
|
"Cancel"
|
|
2133
2197
|
), /* @__PURE__ */ React27.createElement(
|
|
2134
2198
|
"button",
|
|
2135
2199
|
{
|
|
2136
2200
|
onClick: onConfirmIntercept,
|
|
2137
|
-
className: "flex-1 py-3 text-[13px] text-[#
|
|
2201
|
+
className: "flex-1 py-3 text-[13px] text-[#1f26d6] hover:bg-neutral-50 transition-colors flex justify-center items-center outline-none "
|
|
2138
2202
|
},
|
|
2139
2203
|
"Leave"
|
|
2140
2204
|
)))));
|
|
@@ -2142,7 +2206,7 @@ var UniversalSidebar = ({
|
|
|
2142
2206
|
|
|
2143
2207
|
// src/components/UniversalOrganizationPage.tsx
|
|
2144
2208
|
import React29, { useState as useState17, useEffect as useEffect13 } from "react";
|
|
2145
|
-
import
|
|
2209
|
+
import toast5 from "react-hot-toast";
|
|
2146
2210
|
|
|
2147
2211
|
// src/components/Banner.tsx
|
|
2148
2212
|
import React28, { useState as useState16 } from "react";
|
|
@@ -2218,7 +2282,7 @@ var UniversalOrganizationPage = ({
|
|
|
2218
2282
|
initialSlug,
|
|
2219
2283
|
orgId,
|
|
2220
2284
|
isReadOnly = false,
|
|
2221
|
-
slugPrefixUrl = "
|
|
2285
|
+
slugPrefixUrl = ".aeona.eth",
|
|
2222
2286
|
bannerProps,
|
|
2223
2287
|
onSaveConfiguration,
|
|
2224
2288
|
onCheckSlugAvailability
|
|
@@ -2272,7 +2336,7 @@ var UniversalOrganizationPage = ({
|
|
|
2272
2336
|
e.preventDefault();
|
|
2273
2337
|
if (isSubmitting || isCheckingSlug || isReadOnly) return;
|
|
2274
2338
|
if (slug !== initialSlug && slugAvailable === false) {
|
|
2275
|
-
|
|
2339
|
+
toast5.error("Please select an available profile address handles.");
|
|
2276
2340
|
return;
|
|
2277
2341
|
}
|
|
2278
2342
|
setIsSubmitting(true);
|
|
@@ -2286,14 +2350,14 @@ var UniversalOrganizationPage = ({
|
|
|
2286
2350
|
};
|
|
2287
2351
|
const responseData = await onSaveConfiguration(payload);
|
|
2288
2352
|
if (responseData.success) {
|
|
2289
|
-
|
|
2353
|
+
toast5.success("Web3 profile identity updated successfully.");
|
|
2290
2354
|
setTimeout(() => window.location.reload(), 1e3);
|
|
2291
2355
|
} else {
|
|
2292
|
-
|
|
2356
|
+
toast5.error(responseData.error || "Failed to update your identity profile.");
|
|
2293
2357
|
setIsSubmitting(false);
|
|
2294
2358
|
}
|
|
2295
2359
|
} catch (error) {
|
|
2296
|
-
|
|
2360
|
+
toast5.error("Service unavailable. Try again later.");
|
|
2297
2361
|
setIsSubmitting(false);
|
|
2298
2362
|
}
|
|
2299
2363
|
};
|
|
@@ -2302,7 +2366,7 @@ var UniversalOrganizationPage = ({
|
|
|
2302
2366
|
return /* @__PURE__ */ React29.createElement("div", { className: "flex flex-col gap-8 animate-in max-w-5xl rounded-2xl p-6 bg-white fade-in duration-300 " }, /* @__PURE__ */ React29.createElement(ManagedToaster, null), /* @__PURE__ */ React29.createElement("div", { className: "flex items-start justify-between gap-4" }, /* @__PURE__ */ React29.createElement("div", null, /* @__PURE__ */ React29.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Web3 Profile"), /* @__PURE__ */ React29.createElement("p", { className: "text-xs text-neutral-500" }, "Manage your financial payment handle identifiers and global public cryptographic signature identity details.")), isReadOnly && /* @__PURE__ */ React29.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full shrink-0" }, /* @__PURE__ */ React29.createElement(HugeiconsIcon15, { icon: CircleLock02Icon, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ React29.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ React29.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React29.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ React29.createElement(
|
|
2303
2367
|
TextInput,
|
|
2304
2368
|
{
|
|
2305
|
-
label: "
|
|
2369
|
+
label: "Display Name",
|
|
2306
2370
|
value: web3Name,
|
|
2307
2371
|
onChange: handleWeb3NameChange,
|
|
2308
2372
|
disabled: isReadOnly || isSubmitting,
|
|
@@ -2312,14 +2376,14 @@ var UniversalOrganizationPage = ({
|
|
|
2312
2376
|
), /* @__PURE__ */ React29.createElement(
|
|
2313
2377
|
TextInput,
|
|
2314
2378
|
{
|
|
2315
|
-
label: "
|
|
2379
|
+
label: "Digital Identity",
|
|
2316
2380
|
value: username,
|
|
2317
2381
|
onChange: handleUsernameChange,
|
|
2318
2382
|
disabled: isReadOnly || isSubmitting,
|
|
2319
2383
|
placeholder: "sovereignuser",
|
|
2320
2384
|
maxLength: 30
|
|
2321
2385
|
}
|
|
2322
|
-
), /* @__PURE__ */ React29.createElement("div", { className: "space-y-2 relative w-full" }, /* @__PURE__ */ React29.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "
|
|
2386
|
+
), /* @__PURE__ */ React29.createElement("div", { className: "space-y-2 relative w-full" }, /* @__PURE__ */ React29.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "Wallet Username"), /* @__PURE__ */ React29.createElement("div", { className: "flex items-center relative w-full border-b border-neutral-100 focus-within:border-black transition-all" }, /* @__PURE__ */ React29.createElement(
|
|
2323
2387
|
"input",
|
|
2324
2388
|
{
|
|
2325
2389
|
type: "text",
|
|
@@ -2328,10 +2392,10 @@ var UniversalOrganizationPage = ({
|
|
|
2328
2392
|
onChange: (e) => handleSlugChange(e.target.value),
|
|
2329
2393
|
spellCheck: "false",
|
|
2330
2394
|
autoComplete: "off",
|
|
2331
|
-
className: "w-full px-2 py-3 text-sm bg-transparent
|
|
2395
|
+
className: "w-full px-2 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2332
2396
|
placeholder: "sovereign-user-handle"
|
|
2333
2397
|
}
|
|
2334
|
-
), /* @__PURE__ */ React29.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React29.createElement(InputSpinner4, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React29.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React29.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React29.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React29.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React29.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React29.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React29.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React29.createElement(
|
|
2398
|
+
), /* @__PURE__ */ React29.createElement("span", { className: "text-neutral-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ React29.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React29.createElement(InputSpinner4, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React29.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React29.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React29.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React29.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React29.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React29.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React29.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React29.createElement(
|
|
2335
2399
|
ThreeDActionButton,
|
|
2336
2400
|
{
|
|
2337
2401
|
type: "submit",
|
|
@@ -2357,7 +2421,7 @@ var UniversalOrganizationPage = ({
|
|
|
2357
2421
|
|
|
2358
2422
|
// src/components/UniversalIdentityPage.tsx
|
|
2359
2423
|
import React30, { useState as useState18, useEffect as useEffect14 } from "react";
|
|
2360
|
-
import
|
|
2424
|
+
import toast6 from "react-hot-toast";
|
|
2361
2425
|
import { HugeiconsIcon as HugeiconsIcon16 } from "@hugeicons/react";
|
|
2362
2426
|
import {
|
|
2363
2427
|
CircleLock02Icon as CircleLock02Icon2
|
|
@@ -2404,12 +2468,12 @@ var UniversalIdentityPage = ({
|
|
|
2404
2468
|
secondaryValue: secondaryValue !== initialSecondaryValue ? secondaryValue : void 0
|
|
2405
2469
|
});
|
|
2406
2470
|
if (res.success) {
|
|
2407
|
-
|
|
2471
|
+
toast6.success("Update successful.");
|
|
2408
2472
|
} else {
|
|
2409
|
-
|
|
2473
|
+
toast6.error(res.error || "Update failed.");
|
|
2410
2474
|
}
|
|
2411
2475
|
} catch (error) {
|
|
2412
|
-
|
|
2476
|
+
toast6.error("Service unavailable.");
|
|
2413
2477
|
} finally {
|
|
2414
2478
|
setIsSubmitting(false);
|
|
2415
2479
|
}
|
|
@@ -2420,15 +2484,15 @@ var UniversalIdentityPage = ({
|
|
|
2420
2484
|
try {
|
|
2421
2485
|
const res = await onDeleteResource(resourceId);
|
|
2422
2486
|
if (res.success) {
|
|
2423
|
-
|
|
2487
|
+
toast6.success("Deletion permanent.");
|
|
2424
2488
|
setIsDeleteModalOpen(false);
|
|
2425
2489
|
window.location.href = onSuccessfulDeleteRedirect;
|
|
2426
2490
|
} else {
|
|
2427
|
-
|
|
2491
|
+
toast6.error(res.error || "Failed to delete.");
|
|
2428
2492
|
setIsDeleting(false);
|
|
2429
2493
|
}
|
|
2430
2494
|
} catch (error) {
|
|
2431
|
-
|
|
2495
|
+
toast6.error("Network error occurred.");
|
|
2432
2496
|
setIsDeleting(false);
|
|
2433
2497
|
}
|
|
2434
2498
|
};
|
|
@@ -2504,12 +2568,12 @@ var UniversalIdentityPage = ({
|
|
|
2504
2568
|
|
|
2505
2569
|
// src/components/UniversalMembersPage.tsx
|
|
2506
2570
|
import React31, { useState as useState19, useEffect as useEffect15, useRef as useRef10 } from "react";
|
|
2507
|
-
import
|
|
2571
|
+
import toast7 from "react-hot-toast";
|
|
2508
2572
|
import { HugeiconsIcon as HugeiconsIcon17 } from "@hugeicons/react";
|
|
2509
2573
|
import {
|
|
2510
2574
|
UserAdd01Icon,
|
|
2511
2575
|
ArrowLeft01Icon as ArrowLeft01Icon3,
|
|
2512
|
-
ArrowRight01Icon as
|
|
2576
|
+
ArrowRight01Icon as ArrowRight01Icon4,
|
|
2513
2577
|
Delete01Icon,
|
|
2514
2578
|
ArrowDown01Icon,
|
|
2515
2579
|
Loading03Icon as Loading03Icon7
|
|
@@ -2585,16 +2649,16 @@ var UniversalMembersPage = ({
|
|
|
2585
2649
|
try {
|
|
2586
2650
|
const res = await onInviteMember(inviteEmail, inviteFirst, inviteLast);
|
|
2587
2651
|
if (res.success) {
|
|
2588
|
-
|
|
2652
|
+
toast7.success("Member added successfully.");
|
|
2589
2653
|
setInviteEmail("");
|
|
2590
2654
|
setInviteFirst("");
|
|
2591
2655
|
setInviteLast("");
|
|
2592
2656
|
setCurrentView("list");
|
|
2593
2657
|
} else {
|
|
2594
|
-
|
|
2658
|
+
toast7.error(res.error || "Failed to add member.");
|
|
2595
2659
|
}
|
|
2596
2660
|
} catch (error) {
|
|
2597
|
-
|
|
2661
|
+
toast7.error("Service unavailable.");
|
|
2598
2662
|
} finally {
|
|
2599
2663
|
setIsInviting(false);
|
|
2600
2664
|
}
|
|
@@ -2605,14 +2669,14 @@ var UniversalMembersPage = ({
|
|
|
2605
2669
|
try {
|
|
2606
2670
|
const res = await onRemoveMember(memberToDelete);
|
|
2607
2671
|
if (res.success) {
|
|
2608
|
-
|
|
2672
|
+
toast7.success("Member removed successfully.");
|
|
2609
2673
|
setMemberToDelete(null);
|
|
2610
2674
|
setCurrentView("list");
|
|
2611
2675
|
} else {
|
|
2612
|
-
|
|
2676
|
+
toast7.error(res.error || "Failed to remove member.");
|
|
2613
2677
|
}
|
|
2614
2678
|
} catch (error) {
|
|
2615
|
-
|
|
2679
|
+
toast7.error("Service unavailable.");
|
|
2616
2680
|
} finally {
|
|
2617
2681
|
setIsDeleting(false);
|
|
2618
2682
|
}
|
|
@@ -2627,13 +2691,13 @@ var UniversalMembersPage = ({
|
|
|
2627
2691
|
try {
|
|
2628
2692
|
const res = await onUpdateRole(selectedMember, newRole);
|
|
2629
2693
|
if (res.success) {
|
|
2630
|
-
|
|
2694
|
+
toast7.success("Role updated successfully.");
|
|
2631
2695
|
setSelectedMember({ ...selectedMember, role: newRole });
|
|
2632
2696
|
} else {
|
|
2633
|
-
|
|
2697
|
+
toast7.error(res.error || "Failed to update role.");
|
|
2634
2698
|
}
|
|
2635
2699
|
} catch (error) {
|
|
2636
|
-
|
|
2700
|
+
toast7.error("Service unavailable.");
|
|
2637
2701
|
} finally {
|
|
2638
2702
|
setIsUpdatingRole(false);
|
|
2639
2703
|
}
|
|
@@ -2686,7 +2750,7 @@ var UniversalMembersPage = ({
|
|
|
2686
2750
|
disabled: currentPage >= totalPages || isLoading,
|
|
2687
2751
|
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
2688
2752
|
},
|
|
2689
|
-
/* @__PURE__ */ React31.createElement(HugeiconsIcon17, { icon:
|
|
2753
|
+
/* @__PURE__ */ React31.createElement(HugeiconsIcon17, { icon: ArrowRight01Icon4, size: 14 })
|
|
2690
2754
|
))))), currentView === "details" && selectedMember && /* @__PURE__ */ React31.createElement("div", { className: "w-full max-w-5xl text-left" }, /* @__PURE__ */ React31.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ React31.createElement("div", { className: "flex items-center gap-5" }, selectedMember.displayImage && selectedMember.displayImage !== "NO_IMAGE" ? /* @__PURE__ */ React31.createElement("div", { className: "w-16 h-16 shrink-0 rounded-full overflow-hidden bg-neutral-100" }, /* @__PURE__ */ React31.createElement(
|
|
2691
2755
|
"img",
|
|
2692
2756
|
{
|
|
@@ -2779,7 +2843,7 @@ var UniversalMembersPage = ({
|
|
|
2779
2843
|
|
|
2780
2844
|
// src/components/UniversalProfileSettings.tsx
|
|
2781
2845
|
import React32, { useState as useState20, useEffect as useEffect16 } from "react";
|
|
2782
|
-
import
|
|
2846
|
+
import toast8 from "react-hot-toast";
|
|
2783
2847
|
import { HugeiconsIcon as HugeiconsIcon18 } from "@hugeicons/react";
|
|
2784
2848
|
import {
|
|
2785
2849
|
CircleLock02Icon as CircleLock02Icon3
|
|
@@ -2814,14 +2878,14 @@ var UniversalProfileSettings = ({
|
|
|
2814
2878
|
try {
|
|
2815
2879
|
const res = await onSaveProfile({ firstName, lastName });
|
|
2816
2880
|
if (res.success) {
|
|
2817
|
-
|
|
2881
|
+
toast8.success("Profile updated successfully.");
|
|
2818
2882
|
setTimeout(() => window.location.reload(), 1e3);
|
|
2819
2883
|
} else {
|
|
2820
|
-
|
|
2884
|
+
toast8.error(res.error || "Uh oh! Something went wrong.");
|
|
2821
2885
|
setIsSubmitting(false);
|
|
2822
2886
|
}
|
|
2823
2887
|
} catch (error) {
|
|
2824
|
-
|
|
2888
|
+
toast8.error("Uh oh! Something went wrong.");
|
|
2825
2889
|
setIsSubmitting(false);
|
|
2826
2890
|
}
|
|
2827
2891
|
};
|
|
@@ -2882,7 +2946,7 @@ import React33, { useState as useState21 } from "react";
|
|
|
2882
2946
|
import { HugeiconsIcon as HugeiconsIcon19 } from "@hugeicons/react";
|
|
2883
2947
|
import {
|
|
2884
2948
|
ArrowLeft01Icon as ArrowLeft01Icon4,
|
|
2885
|
-
ArrowRight01Icon as
|
|
2949
|
+
ArrowRight01Icon as ArrowRight01Icon5,
|
|
2886
2950
|
Loading03Icon as Loading03Icon8,
|
|
2887
2951
|
ArrowDown01Icon as ArrowDown01Icon2,
|
|
2888
2952
|
CircleLock02Icon as CircleLock02Icon4
|
|
@@ -2985,7 +3049,7 @@ var UniversalBillingPage = ({
|
|
|
2985
3049
|
))) : /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => setCurrentView("list"), className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon: ArrowLeft01Icon4, size: 12 }), " Back")), isReadOnly && currentView === "list" && /* @__PURE__ */ React33.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full " }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon: CircleLock02Icon4, size: 18, className: "text-current" }))), currentView === "list" && /* @__PURE__ */ React33.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-8 w-full" }, (metricPrimaryLabel || metricSecondaryLabel) && /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-start pb-8 gap-6 sm:gap-0" }, metricPrimaryLabel && /* @__PURE__ */ React33.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricPrimaryLabel), /* @__PURE__ */ React33.createElement("div", { className: "text-2xl text-black tracking-tight truncate" }, formatUsd(metricPrimaryValue)), metricPrimarySubtext && /* @__PURE__ */ React33.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricPrimarySubtext)), metricSecondaryLabel && /* @__PURE__ */ React33.createElement("div", { className: "min-w-0 sm:text-right" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-2 truncate block " }, metricSecondaryLabel), /* @__PURE__ */ React33.createElement("div", { className: "text-xl text-emerald-600 tracking-tight truncate" }, formatUsd(metricSecondaryValue)), metricSecondarySubtext && /* @__PURE__ */ React33.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 tracking-widest " }, metricSecondarySubtext))), !isReadOnly && showBillingOverview && /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-8 sm:gap-4" }, /* @__PURE__ */ React33.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Billing Status"), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2 min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: `w-2 h-2 rounded-full shrink-0 ${billingStatus === "ACTIVE" ? "bg-green-500" : "bg-neutral-300"}` }), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-black tracking-widest truncate" }, billingStatus || "UNKNOWN"))), /* @__PURE__ */ React33.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Next Billing Date"), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate" }, formatDate(nextBillingDate))), lastPaidDate && /* @__PURE__ */ React33.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-3 truncate block " }, "Last Paid Date"), /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-neutral-600 truncate" }, formatDate(lastPaidDate)))), !isReadOnly && showUsageMetrics && usageMetrics.length > 0 && /* @__PURE__ */ React33.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-6 truncate block " }, "Usage & Limits"), /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-4 text-sm text-black" }, usageMetrics.map((metric, idx) => /* @__PURE__ */ React33.createElement("div", { key: idx, className: "flex justify-between pb-2" }, /* @__PURE__ */ React33.createElement("span", { className: "text-neutral-500 text-xs" }, metric.label), /* @__PURE__ */ React33.createElement("span", { className: "text-xs text-black" }, metric.value))))), /* @__PURE__ */ React33.createElement("div", { className: "pt-8 border-t border-neutral-100" }, /* @__PURE__ */ React33.createElement("h3", { className: "text-[11px] text-neutral-400 tracking-[0.2em] mb-4 truncate block " }, "Transaction History"), isLoading ? /* @__PURE__ */ React33.createElement(PageSpinner3, null) : invoices.length === 0 ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 py-4" }, "No records found.")) : /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React33.createElement("div", { className: "divide-y divide-neutral-100" }, invoices.map((inv) => /* @__PURE__ */ React33.createElement("div", { key: inv.id, onClick: () => {
|
|
2986
3050
|
setSelectedInvoice(inv);
|
|
2987
3051
|
setCurrentView("details");
|
|
2988
|
-
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate pr-4" }, capitalizeWords(inv.name)), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ React33.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon: ArrowLeft01Icon4, size: 14 })), /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon:
|
|
3052
|
+
}, className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 cursor-pointer group min-w-0 px-2 transition-colors" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-1 min-w-0 flex-1" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black truncate pr-4" }, capitalizeWords(inv.name)), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500 truncate" }, inv.subtext)), /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React33.createElement("p", { className: "text-sm text-black" }, formatUsd(inv.amountDue)), /* @__PURE__ */ React33.createElement("span", { className: `text-[9px] tracking-widest px-2 py-0.5 rounded-full ${inv.status === "PAID" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, inv.status))))), totalPages > 1 && /* @__PURE__ */ React33.createElement("div", { className: "flex items-center justify-between pt-4 mt-2" }, /* @__PURE__ */ React33.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React33.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1 || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon: ArrowLeft01Icon4, size: 14 })), /* @__PURE__ */ React33.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages || isLoading, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React33.createElement(HugeiconsIcon19, { icon: ArrowRight01Icon5, size: 14 })))))))), currentView === "details" && selectedInvoice && /* @__PURE__ */ React33.createElement("div", { className: "w-full max-w-5xl animate-in fade-in duration-300" }, /* @__PURE__ */ React33.createElement("div", { className: "flex flex-col gap-6 w-full" }, /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Breakdown"), /* @__PURE__ */ React33.createElement("h2", { className: "text-lg text-black mb-1" }, capitalizeWords(selectedInvoice.name)), /* @__PURE__ */ React33.createElement("p", { className: "text-xs text-neutral-500" }, "Generated on ", formatDate(selectedInvoice.createdAt))), /* @__PURE__ */ React33.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 " }, /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Amount"), /* @__PURE__ */ React33.createElement("p", { className: "text-xl text-black" }, formatUsd(selectedInvoice.amountDue))), /* @__PURE__ */ React33.createElement("div", null, /* @__PURE__ */ React33.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1 " }, "Status"), isModMode ? /* @__PURE__ */ React33.createElement(
|
|
2989
3053
|
"button",
|
|
2990
3054
|
{
|
|
2991
3055
|
onClick: () => !isUpdating && setIsActionModalOpen(true),
|
|
@@ -3146,7 +3210,7 @@ import React36, { useState as useState24, useRef as useRef11 } from "react";
|
|
|
3146
3210
|
import { HugeiconsIcon as HugeiconsIcon22 } from "@hugeicons/react";
|
|
3147
3211
|
import {
|
|
3148
3212
|
ArrowLeft01Icon as ArrowLeft01Icon6,
|
|
3149
|
-
ArrowRight01Icon as
|
|
3213
|
+
ArrowRight01Icon as ArrowRight01Icon6,
|
|
3150
3214
|
Loading03Icon as Loading03Icon11,
|
|
3151
3215
|
AttachmentIcon,
|
|
3152
3216
|
Cancel01Icon as Cancel01Icon2,
|
|
@@ -3258,7 +3322,7 @@ var UniversalAgentConsole = ({
|
|
|
3258
3322
|
if (entries.length === 0) return null;
|
|
3259
3323
|
return entries.map(([k, v]) => /* @__PURE__ */ React36.createElement("div", { key: k, className: "flex flex-col items-start min-w-0 wrap-break-word w-full mb-3 last:mb-0" }, /* @__PURE__ */ React36.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1 " }, formatKeyName(k)), renderValue(k, v)));
|
|
3260
3324
|
};
|
|
3261
|
-
return /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ React36.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ React36.createElement("h1", { className: " text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ React36.createElement("div", { className: "w-full rounded-2xl max-w-5xl overflow-hidden bg-white" }, /* @__PURE__ */ React36.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ React36.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ React36.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ React36.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React36.createElement("p", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1 truncate " }, stat.label), /* @__PURE__ */ React36.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ React36.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ React36.createElement("div", { className: "w-full bg-white rounded-2xl max-w-5xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ React36.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: Loading03Icon11, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ React36.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ React36.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ React36.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React36.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 rounded-full ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ React36.createElement("span", { className: "text-[11px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ React36.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ React36.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React36.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 14 })), /* @__PURE__ */ React36.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon:
|
|
3325
|
+
return /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in duration-300 pb-10" }, /* @__PURE__ */ React36.createElement(ManagedToaster, null), currentView === "list" && /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-start gap-1" }, /* @__PURE__ */ React36.createElement("h1", { className: " text-xl text-black tracking-tight" }, headerTitle), /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-neutral-500" }, headerDescription)), stats.length > 0 && /* @__PURE__ */ React36.createElement("div", { className: "w-full rounded-2xl max-w-5xl overflow-hidden bg-white" }, /* @__PURE__ */ React36.createElement("div", { className: "grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-neutral-100" }, stats.map((stat, idx) => /* @__PURE__ */ React36.createElement("div", { key: idx, className: "p-6 flex items-center gap-4 hover:bg-neutral-50/50 transition-colors min-w-0" }, /* @__PURE__ */ React36.createElement("div", { className: "w-12 h-12 rounded-full border border-neutral-100 bg-white flex items-center justify-center text-black shrink-0" }, stat.icon), /* @__PURE__ */ React36.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React36.createElement("p", { className: "text-[11px] tracking-[0.2em] text-neutral-400 mb-1 truncate " }, stat.label), /* @__PURE__ */ React36.createElement("p", { className: "text-xl text-black tracking-tight truncate" }, stat.value)))))), tabs.length > 0 && /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-6" }, tabs.map((tab) => /* @__PURE__ */ React36.createElement("button", { key: tab.id, onClick: () => onTabChange(tab.id), className: `pb-3 text-sm transition-colors outline-none ${activeTab === tab.id ? "text-black border-b border-black" : "text-neutral-400 hover:text-black"}` }, tab.label))), /* @__PURE__ */ React36.createElement("div", { className: "w-full bg-white rounded-2xl max-w-5xl overflow-hidden flex flex-col min-h-100" }, isLoadingList ? /* @__PURE__ */ React36.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: Loading03Icon11, size: 32, className: "animate-spin text-black" })) : listData.length === 0 ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "flex-1 flex justify-center items-center text-neutral-500 text-sm py-20" }, "No matching applications found.")) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { className: "divide-y divide-neutral-100 flex-1" }, listData.map((item) => /* @__PURE__ */ React36.createElement("div", { key: item.id, onClick: () => onRowClick(item.id), className: "flex items-center justify-between p-5 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0" }, /* @__PURE__ */ React36.createElement("div", { className: "min-w-0 flex-1" }, /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-black truncate pr-4" }, item.title), /* @__PURE__ */ React36.createElement("p", { className: "text-xs text-neutral-500 truncate mt-1" }, item.subtitle)), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col items-end gap-1 shrink-0 pl-4" }, /* @__PURE__ */ React36.createElement("span", { className: `text-[11px] tracking-widest px-3 py-1 rounded-full ${item.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, item.status.replace(/_/g, " ")), /* @__PURE__ */ React36.createElement("span", { className: "text-[11px] text-neutral-400 mt-1" }, item.date))))), totalPages > 1 && /* @__PURE__ */ React36.createElement("div", { className: "flex items-center justify-between p-5 bg-neutral-50/50" }, /* @__PURE__ */ React36.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React36.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 14 })), /* @__PURE__ */ React36.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: ArrowRight01Icon6, size: 14 }))))))), currentView === "details" && selectedApp && /* @__PURE__ */ React36.createElement("div", { className: "w-full bg-white rounded-2xl p-6 sm:p-10 animate-in fade-in duration-300 max-w-5xl flex flex-col" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center justify-between gap-4 pb-6" }, /* @__PURE__ */ React36.createElement("button", { onClick: () => {
|
|
3262
3326
|
onBackToList();
|
|
3263
3327
|
setPendingFiles([]);
|
|
3264
3328
|
}, className: "flex items-center gap-2 text-[11px] text-neutral-400 hover:text-black tracking-widest transition-colors outline-none " }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: ArrowLeft01Icon6, size: 14 }), " Back to List"), /* @__PURE__ */ React36.createElement("span", { className: `text-[11px] tracking-widest px-4 py-1.5 rounded-full ${selectedApp.status === "COMPLETED" ? "bg-emerald-50 text-emerald-600" : "bg-neutral-50 text-neutral-600"}` }, selectedApp.status.replace(/_/g, " "))), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-2 mb-8" }, /* @__PURE__ */ React36.createElement("h2", { className: " text-xl text-black tracking-tight" }, selectedApp.name || selectedApp.title), /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-neutral-500" }, selectedApp.type ? selectedApp.type.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (c) => c.toUpperCase()) : selectedApp.subtitle)), selectedApp.agentId === currentAgentId && selectedApp.metadata && Object.keys(selectedApp.metadata).length > 0 ? /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-5" }, renderDynamicObject(selectedApp.metadata)) : selectedApp.agentId === currentAgentId ? /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-5" }, /* @__PURE__ */ React36.createElement("p", { className: "text-sm text-neutral-500" }, "No application data extracted.")) : null, selectedApp.agentId && /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-4 pt-8 mt-4 border-t border-neutral-100" }, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-1 mb-4" }, /* @__PURE__ */ React36.createElement("h3", { className: " text-sm text-black" }, "Official Archives"), /* @__PURE__ */ React36.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload final certificates or documents. Once marked completed, the archive unlocks for the user.")), selectedApp.archives?.map((arch) => /* @__PURE__ */ React36.createElement("div", { key: arch.id, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: File02Icon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React36.createElement("span", { className: "truncate pr-2" }, arch.name)), /* @__PURE__ */ React36.createElement("button", { onClick: () => setArchiveToDelete(arch), className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: Delete02Icon, size: 16 })))), pendingFiles.map((file, idx) => /* @__PURE__ */ React36.createElement("div", { key: idx, className: "flex items-center justify-between text-neutral-600 text-sm w-full" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: AttachmentIcon, size: 18, className: "shrink-0" }), /* @__PURE__ */ React36.createElement("span", { className: "truncate pr-2" }, file.name)), /* @__PURE__ */ React36.createElement("button", { onClick: () => setPendingFiles((p) => p.filter((_, i) => i !== idx)), className: "text-neutral-400 hover:text-red-500 transition-colors p-1 outline-none shrink-0" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: Cancel01Icon2, size: 16 })))), /* @__PURE__ */ React36.createElement("input", { type: "file", multiple: true, ref: archiveRef, onChange: handleFileSelect, className: "hidden", accept: "application/pdf,image/*" }), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full" }, /* @__PURE__ */ React36.createElement("button", { onClick: () => archiveRef.current?.click(), disabled: selectedApp.status !== "COMPLETED" || isUploading, className: "flex items-center justify-center gap-3 p-4 border border-neutral-100 rounded-full hover:bg-neutral-50 transition-colors text-black text-sm w-full outline-none disabled:opacity-50" }, /* @__PURE__ */ React36.createElement(HugeiconsIcon22, { icon: Upload01Icon, size: 18, className: "text-neutral-400" }), " Select Files to Upload"), pendingFiles.length > 0 && /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-3 w-full sm:w-auto shrink-0" }, /* @__PURE__ */ React36.createElement("button", { onClick: () => setPendingFiles([]), disabled: isUploading, className: "px-6 py-2 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-100 outline-none w-full sm:w-auto " }, "Clear All"), /* @__PURE__ */ React36.createElement(ThreeDActionButton, { onClick: executeUpload, disabled: isUploading, isLoading: isUploading, className: "w-full sm:w-auto" }, "Upload ", pendingFiles.length, " File(s)")))), /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 mt-8 pt-6" }, !selectedApp.agentId ? /* @__PURE__ */ React36.createElement(ThreeDActionButton, { onClick: async () => {
|
|
@@ -3457,7 +3521,7 @@ var UniversalLookupPage = ({
|
|
|
3457
3521
|
// src/components/UniversalDirectoryPage.tsx
|
|
3458
3522
|
import React40 from "react";
|
|
3459
3523
|
import { HugeiconsIcon as HugeiconsIcon25 } from "@hugeicons/react";
|
|
3460
|
-
import { ArrowLeft01Icon as ArrowLeft01Icon7, ArrowRight01Icon as
|
|
3524
|
+
import { ArrowLeft01Icon as ArrowLeft01Icon7, ArrowRight01Icon as ArrowRight01Icon7, Loading03Icon as Loading03Icon12 } from "@hugeicons/core-free-icons";
|
|
3461
3525
|
var PageSpinner5 = () => /* @__PURE__ */ React40.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React40.createElement(HugeiconsIcon25, { icon: Loading03Icon12, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
3462
3526
|
var UniversalDirectoryPage = ({
|
|
3463
3527
|
headerTitle,
|
|
@@ -3508,7 +3572,7 @@ var UniversalDirectoryPage = ({
|
|
|
3508
3572
|
disabled: currentPage >= totalPages || isLoading,
|
|
3509
3573
|
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black outline-none disabled:opacity-30 transition-all"
|
|
3510
3574
|
},
|
|
3511
|
-
/* @__PURE__ */ React40.createElement(HugeiconsIcon25, { icon:
|
|
3575
|
+
/* @__PURE__ */ React40.createElement(HugeiconsIcon25, { icon: ArrowRight01Icon7, size: 14 })
|
|
3512
3576
|
))))), currentView === "details" && detailsContent, modals);
|
|
3513
3577
|
};
|
|
3514
3578
|
|
|
@@ -3522,7 +3586,7 @@ import {
|
|
|
3522
3586
|
FolderIcon as FolderIcon2,
|
|
3523
3587
|
Loading03Icon as Loading03Icon13,
|
|
3524
3588
|
ArrowLeft01Icon as ArrowLeft01Icon8,
|
|
3525
|
-
ArrowRight01Icon as
|
|
3589
|
+
ArrowRight01Icon as ArrowRight01Icon8,
|
|
3526
3590
|
Copy01Icon,
|
|
3527
3591
|
Share03Icon,
|
|
3528
3592
|
Tick01Icon,
|
|
@@ -3640,7 +3704,7 @@ var UniversalDriveView = ({
|
|
|
3640
3704
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3641
3705
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3642
3706
|
};
|
|
3643
|
-
const
|
|
3707
|
+
const formatDate4 = (dateString) => {
|
|
3644
3708
|
return new Date(dateString).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
3645
3709
|
};
|
|
3646
3710
|
const handleRowClick = (id, e) => {
|
|
@@ -3715,8 +3779,8 @@ var UniversalDriveView = ({
|
|
|
3715
3779
|
return /* @__PURE__ */ React42.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onDoubleClick: () => handleItemDoubleClick(item), onContextMenu: (e) => {
|
|
3716
3780
|
e.preventDefault();
|
|
3717
3781
|
setSelectedIds([item.id]);
|
|
3718
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React42.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React42.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React42.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React42.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ React42.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React42.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ React42.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" },
|
|
3719
|
-
}))), isLoading && /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: Loading03Icon13, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React42.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] " }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React42.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: ArrowLeft01Icon8, size: 14 })), /* @__PURE__ */ React42.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon:
|
|
3782
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React42.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React42.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React42.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React42.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative" }, /* @__PURE__ */ React42.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React42.createElement("span", { className: "text-xs text-black truncate pr-4" }, item.name)), /* @__PURE__ */ React42.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate4(item.updatedAt)), /* @__PURE__ */ React42.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3783
|
+
}))), isLoading && /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: Loading03Icon13, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React42.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React42.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] " }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React42.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: ArrowLeft01Icon8, size: 14 })), /* @__PURE__ */ React42.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: ArrowRight01Icon8, size: 14 })))), activeJobs.length > 0 && /* @__PURE__ */ React42.createElement("div", { className: "fixed bottom-6 right-6 w-80 bg-white shadow-2xl rounded-xl z-100 overflow-hidden flex flex-col animate-in slide-in-from-bottom-4 duration-300" }, /* @__PURE__ */ React42.createElement("div", { className: "p-4 bg-neutral-50 flex items-center justify-between" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h4", { className: "text-xs text-black " }, "Uploading Elements"), /* @__PURE__ */ React42.createElement("p", { className: "text-[10px] text-neutral-500 mt-0.5" }, "Processing ", activeJobs.length, " streams")), onClearUploadQueue && activeJobs.length === 0 && /* @__PURE__ */ React42.createElement("button", { onClick: onClearUploadQueue, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: Cancel01Icon3, size: 14 }))), /* @__PURE__ */ React42.createElement("div", { className: "w-full h-1 bg-neutral-100 relative" }, /* @__PURE__ */ React42.createElement("div", { className: "h-full transition-all duration-500 ease-out", style: { width: `${globalProgress}%`, background: "linear-gradient(to right, #f64b4d, #ffa360)" } })), /* @__PURE__ */ React42.createElement("div", { className: "max-h-40 overflow-y-auto p-2" }, uploadQueue.map((job) => /* @__PURE__ */ React42.createElement("div", { key: job.id, className: "flex items-center justify-between p-2 text-[11px] gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-black truncate flex-1 pr-2" }, job.name), /* @__PURE__ */ React42.createElement("div", { className: "shrink-0 whitespace-nowrap flex items-center gap-2" }, job.status === "COMPLETED" ? /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: Tick01Icon, size: 12, className: "text-green-600" }) : job.status === "FAILED" ? /* @__PURE__ */ React42.createElement("span", { className: "text-red-600 text-[10px]" }, "Failed") : /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-500 text-[10px]" }, job.progress, "%")))))), (isNewFolderModalOpen || renameModal.isOpen) && /* @__PURE__ */ React42.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 bg-black/30 ", onClick: () => !isSubmitting && (setIsNewFolderModalOpen(false), setRenameModal({ isOpen: false, id: "", name: "" })) }), /* @__PURE__ */ React42.createElement("form", { onSubmit: async (e) => {
|
|
3720
3784
|
e.preventDefault();
|
|
3721
3785
|
if (!folderInputVal.trim() || isSubmitting) return;
|
|
3722
3786
|
setIsSubmitting(true);
|
|
@@ -3729,7 +3793,7 @@ var UniversalDriveView = ({
|
|
|
3729
3793
|
}, className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, isNewFolderModalOpen ? "Create Directory" : "Rename Element"), /* @__PURE__ */ React42.createElement("p", { className: "text-[11px] text-neutral-400" }, "Please provide a valid alphanumeric name.")), /* @__PURE__ */ React42.createElement(TextInput, { placeholder: "Name (e.g., Q3 Invoices)", value: folderInputVal, onChange: setFolderInputVal }), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ React42.createElement("button", { type: "button", onClick: () => {
|
|
3730
3794
|
setIsNewFolderModalOpen(false);
|
|
3731
3795
|
setRenameModal({ isOpen: false, id: "", name: "" });
|
|
3732
|
-
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React42.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), infoModalItem && /* @__PURE__ */ React42.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 bg-black/30 ", onClick: () => setInfoModalItem(null) }), /* @__PURE__ */ React42.createElement("div", { className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Item Information"), /* @__PURE__ */ React42.createElement("p", { className: "text-[11px] text-neutral-400" }, "Details for the selected item.")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Name:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs truncate max-w-37.5" }, infoModalItem.name)), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Type:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " }, infoModalItem.type)), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Size:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " }, formatBytes(infoModalItem.size))), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Modified:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " },
|
|
3796
|
+
}, disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React42.createElement(ThreeDActionButton, { type: "submit", isLoading: isSubmitting, disabled: !folderInputVal.trim() }, isNewFolderModalOpen ? "Create" : "Rename")))), infoModalItem && /* @__PURE__ */ React42.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 bg-black/30 ", onClick: () => setInfoModalItem(null) }), /* @__PURE__ */ React42.createElement("div", { className: "relative w-full max-w-sm bg-white shadow-2xl rounded-2xl p-8 flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Item Information"), /* @__PURE__ */ React42.createElement("p", { className: "text-[11px] text-neutral-400" }, "Details for the selected item.")), /* @__PURE__ */ React42.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Name:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs truncate max-w-37.5" }, infoModalItem.name)), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Type:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " }, infoModalItem.type)), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Size:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " }, formatBytes(infoModalItem.size))), /* @__PURE__ */ React42.createElement("div", { className: "flex justify-between items-center gap-4" }, /* @__PURE__ */ React42.createElement("span", { className: "text-neutral-400 text-xs" }, "Modified:"), /* @__PURE__ */ React42.createElement("span", { className: "text-black text-xs " }, formatDate4(infoModalItem.updatedAt)))), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center justify-end mt-2" }, /* @__PURE__ */ React42.createElement("button", { onClick: () => setInfoModalItem(null), className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none transition-colors" }, "Close")))), explorer.isOpen && /* @__PURE__ */ React42.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4" }, /* @__PURE__ */ React42.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isSubmitting && setExplorer((p) => ({ ...p, isOpen: false })) }), /* @__PURE__ */ React42.createElement("div", { className: "relative w-full max-w-md bg-white shadow-2xl rounded-2xl p-6 flex flex-col gap-4 animate-in zoom-in-95 duration-200 min-h-100" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement("h3", { className: "text-lg text-black tracking-tight mb-1 capitalize" }, explorer.action, " Items"), /* @__PURE__ */ React42.createElement("p", { className: "text-[11px] text-neutral-400" }, "Select destination directory.")), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center gap-1.5 overflow-x-auto text-xs py-2 text-neutral-400 whitespace-nowrap" }, explorer.breadcrumbs.map((crumb, idx) => /* @__PURE__ */ React42.createElement(React42.Fragment, { key: idx }, idx > 0 && /* @__PURE__ */ React42.createElement("span", null, "/"), /* @__PURE__ */ React42.createElement("button", { disabled: explorer.loading, onClick: () => navigateExplorer(crumb.id), className: `hover:text-black outline-none ${idx === explorer.breadcrumbs.length - 1 ? "text-black " : ""}` }, crumb.name)))), /* @__PURE__ */ React42.createElement("div", { className: "flex-1 overflow-y-auto rounded-xl" }, explorer.loading ? /* @__PURE__ */ React42.createElement("div", { className: "h-full flex items-center justify-center p-10" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: Loading03Icon13, className: "animate-spin text-neutral-400", size: 20 })) : explorer.folders.length === 0 ? /* @__PURE__ */ React42.createElement("div", { className: "h-full flex items-center justify-center p-10 text-xs text-neutral-400" }, "No Directories.") : /* @__PURE__ */ React42.createElement("div", { className: "divide-y divide-neutral-50" }, explorer.folders.map((f) => /* @__PURE__ */ React42.createElement("div", { key: f.id, onClick: () => navigateExplorer(f.id), className: "flex items-center gap-3 p-3 hover:bg-neutral-50 cursor-pointer transition-colors" }, /* @__PURE__ */ React42.createElement(HugeiconsIcon27, { icon: FolderIcon2, size: 16, className: "text-black" }), /* @__PURE__ */ React42.createElement("span", { className: "text-sm text-black truncate" }, f.name))))), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center justify-end gap-3 mt-2" }, /* @__PURE__ */ React42.createElement("button", { onClick: () => setExplorer((p) => ({ ...p, isOpen: false })), disabled: isSubmitting, className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full outline-none disabled:opacity-50 transition-colors" }, "Cancel"), /* @__PURE__ */ React42.createElement(ThreeDActionButton, { onClick: executeExplorerAction, isLoading: isSubmitting }, "Paste Here")))));
|
|
3733
3797
|
};
|
|
3734
3798
|
|
|
3735
3799
|
// src/components/UniversalTrashView.tsx
|
|
@@ -3739,7 +3803,7 @@ import {
|
|
|
3739
3803
|
Delete01Icon as Delete01Icon2,
|
|
3740
3804
|
Loading03Icon as Loading03Icon14,
|
|
3741
3805
|
ArrowLeft01Icon as ArrowLeft01Icon9,
|
|
3742
|
-
ArrowRight01Icon as
|
|
3806
|
+
ArrowRight01Icon as ArrowRight01Icon9,
|
|
3743
3807
|
RestoreBinIcon,
|
|
3744
3808
|
RefreshIcon as RefreshIcon2
|
|
3745
3809
|
} from "@hugeicons/core-free-icons";
|
|
@@ -3776,7 +3840,7 @@ var UniversalTrashView = ({
|
|
|
3776
3840
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3777
3841
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3778
3842
|
};
|
|
3779
|
-
const
|
|
3843
|
+
const formatDate4 = (dateString) => {
|
|
3780
3844
|
return new Date(dateString).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
3781
3845
|
};
|
|
3782
3846
|
const handleRowClick = (id, e) => {
|
|
@@ -3808,8 +3872,8 @@ var UniversalTrashView = ({
|
|
|
3808
3872
|
return /* @__PURE__ */ React43.createElement("tr", { key: item.id, onClick: (e) => handleRowClick(item.id, e), onContextMenu: (e) => {
|
|
3809
3873
|
e.preventDefault();
|
|
3810
3874
|
setSelectedIds([item.id]);
|
|
3811
|
-
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React43.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React43.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React43.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React43.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ React43.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React43.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ React43.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" },
|
|
3812
|
-
}))), isLoading && /* @__PURE__ */ React43.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon: Loading03Icon14, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React43.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React43.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React43.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React43.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon9, size: 14 })), /* @__PURE__ */ React43.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon:
|
|
3875
|
+
}, className: `hover:bg-neutral-50/70 transition-colors cursor-pointer group ${isChecked ? "bg-neutral-50" : ""}` }, /* @__PURE__ */ React43.createElement("td", { className: "p-3", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React43.createElement("input", { type: "checkbox", checked: isChecked, onChange: () => handleRowClick(item.id, { ctrlKey: true }), className: "rounded border-neutral-300 w-2.5 h-2.5 text-black focus:ring-black accent-black cursor-pointer" })), /* @__PURE__ */ React43.createElement("td", { className: "p-3 flex items-center gap-3 min-w-0" }, /* @__PURE__ */ React43.createElement("div", { className: "w-9 h-9 shrink-0 flex items-center justify-center relative opacity-50" }, /* @__PURE__ */ React43.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType })), /* @__PURE__ */ React43.createElement("span", { className: "text-xs text-black truncate pr-4 line-through decoration-neutral-300 opacity-60" }, item.name)), /* @__PURE__ */ React43.createElement("td", { className: "p-3 text-xs text-neutral-500 whitespace-nowrap" }, formatDate4(item.updatedAt)), /* @__PURE__ */ React43.createElement("td", { className: "p-3 text-xs text-neutral-500 text-right whitespace-nowrap" }, formatBytes(item.size)));
|
|
3876
|
+
}))), isLoading && /* @__PURE__ */ React43.createElement("div", { className: "absolute inset-0 top-12 z-20 bg-white flex items-start justify-center pt-20" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon: Loading03Icon14, className: "animate-spin text-neutral-400", size: 24 }))), /* @__PURE__ */ React43.createElement("div", { className: `flex items-center justify-between pt-4 ${lockClass}` }, /* @__PURE__ */ React43.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", Math.max(1, totalPages)), /* @__PURE__ */ React43.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React43.createElement("button", { onClick: () => onPageChange(currentPage - 1), disabled: currentPage <= 1, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon: ArrowLeft01Icon9, size: 14 })), /* @__PURE__ */ React43.createElement("button", { onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black disabled:opacity-30 transition-all outline-none" }, /* @__PURE__ */ React43.createElement(HugeiconsIcon28, { icon: ArrowRight01Icon9, size: 14 })))), showEmptyTrashDialog && /* @__PURE__ */ React43.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React43.createElement(
|
|
3813
3877
|
"div",
|
|
3814
3878
|
{
|
|
3815
3879
|
className: "absolute inset-0 bg-black/30",
|
|
@@ -3834,9 +3898,186 @@ var UniversalTrashView = ({
|
|
|
3834
3898
|
)))));
|
|
3835
3899
|
};
|
|
3836
3900
|
|
|
3837
|
-
// src/components/
|
|
3838
|
-
import React44 from "react";
|
|
3901
|
+
// src/components/UniversalTransactionPage.tsx
|
|
3902
|
+
import React44, { useState as useState28, useEffect as useEffect19, useRef as useRef12 } from "react";
|
|
3839
3903
|
import { HugeiconsIcon as HugeiconsIcon29 } from "@hugeicons/react";
|
|
3904
|
+
import {
|
|
3905
|
+
ArrowLeft01Icon as ArrowLeft01Icon10,
|
|
3906
|
+
ArrowRight01Icon as ArrowRight01Icon10,
|
|
3907
|
+
Loading03Icon as Loading03Icon15,
|
|
3908
|
+
ArrowDown01Icon as ArrowDown01Icon5,
|
|
3909
|
+
ArrowUp01Icon,
|
|
3910
|
+
Search01Icon as Search01Icon2,
|
|
3911
|
+
FilterIcon
|
|
3912
|
+
} from "@hugeicons/core-free-icons";
|
|
3913
|
+
var PageSpinner6 = () => /* @__PURE__ */ React44.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: Loading03Icon15, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
3914
|
+
var formatDate3 = (dateInput) => {
|
|
3915
|
+
const d = new Date(dateInput);
|
|
3916
|
+
const day = d.getDate();
|
|
3917
|
+
const month = d.toLocaleString("en-US", { month: "short" });
|
|
3918
|
+
const year = d.getFullYear();
|
|
3919
|
+
return `${day} ${month} ${year}`;
|
|
3920
|
+
};
|
|
3921
|
+
var formatTime = (dateInput) => {
|
|
3922
|
+
return new Date(dateInput).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" });
|
|
3923
|
+
};
|
|
3924
|
+
var UniversalTransactionPage = ({
|
|
3925
|
+
headerTitle,
|
|
3926
|
+
headerDescription,
|
|
3927
|
+
transactions,
|
|
3928
|
+
isLoading,
|
|
3929
|
+
currentPage,
|
|
3930
|
+
totalPages,
|
|
3931
|
+
onPageChange,
|
|
3932
|
+
searchQuery,
|
|
3933
|
+
onSearchChange,
|
|
3934
|
+
activeDirectionFilter,
|
|
3935
|
+
onDirectionFilterChange,
|
|
3936
|
+
activeTypeFilter,
|
|
3937
|
+
onTypeFilterChange
|
|
3938
|
+
}) => {
|
|
3939
|
+
const [currentView, setCurrentView] = useState28("list");
|
|
3940
|
+
const [selectedTransaction, setSelectedTransaction] = useState28(null);
|
|
3941
|
+
const [localSearchQuery, setLocalSearchQuery] = useState28(searchQuery);
|
|
3942
|
+
const [isTyping, setIsTyping] = useState28(false);
|
|
3943
|
+
const [isDirectionModalOpen, setIsDirectionModalOpen] = useState28(false);
|
|
3944
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = useState28(false);
|
|
3945
|
+
const directionDropdownRef = useRef12(null);
|
|
3946
|
+
const typeDropdownRef = useRef12(null);
|
|
3947
|
+
useEffect19(() => {
|
|
3948
|
+
function handleClickOutside(event) {
|
|
3949
|
+
if (directionDropdownRef.current && !directionDropdownRef.current.contains(event.target)) {
|
|
3950
|
+
setIsDirectionModalOpen(false);
|
|
3951
|
+
}
|
|
3952
|
+
if (typeDropdownRef.current && !typeDropdownRef.current.contains(event.target)) {
|
|
3953
|
+
setIsTypeModalOpen(false);
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
3957
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3958
|
+
}, []);
|
|
3959
|
+
useEffect19(() => {
|
|
3960
|
+
setIsTyping(true);
|
|
3961
|
+
const handler = setTimeout(() => {
|
|
3962
|
+
onSearchChange(localSearchQuery);
|
|
3963
|
+
setIsTyping(false);
|
|
3964
|
+
}, 600);
|
|
3965
|
+
return () => clearTimeout(handler);
|
|
3966
|
+
}, [localSearchQuery, onSearchChange]);
|
|
3967
|
+
useEffect19(() => {
|
|
3968
|
+
if (searchQuery === "" && localSearchQuery !== "") {
|
|
3969
|
+
setLocalSearchQuery("");
|
|
3970
|
+
}
|
|
3971
|
+
}, [searchQuery]);
|
|
3972
|
+
const goBack = () => {
|
|
3973
|
+
setCurrentView("list");
|
|
3974
|
+
setSelectedTransaction(null);
|
|
3975
|
+
};
|
|
3976
|
+
const getDisplayName = (tx) => {
|
|
3977
|
+
if (tx.metadata?.merchantName) return tx.metadata.merchantName;
|
|
3978
|
+
if (tx.metadata?.description) return tx.metadata.description;
|
|
3979
|
+
return tx.type === "CARD_TRANSACTION" ? "Card Transaction" : "Wallet Transaction";
|
|
3980
|
+
};
|
|
3981
|
+
const isListLoading = isLoading || isTyping;
|
|
3982
|
+
return /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-6 animate-in max-w-5xl fade-in duration-300" }, currentView === "list" && /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4 w-full" }, /* @__PURE__ */ React44.createElement("div", { className: "relative w-full sm:w-96" }, /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: Search01Icon2, size: 16, className: "text-neutral-400" })), /* @__PURE__ */ React44.createElement(
|
|
3983
|
+
"input",
|
|
3984
|
+
{
|
|
3985
|
+
type: "text",
|
|
3986
|
+
placeholder: "Search reference or amount...",
|
|
3987
|
+
value: localSearchQuery,
|
|
3988
|
+
onChange: (e) => setLocalSearchQuery(e.target.value),
|
|
3989
|
+
className: "w-full pl-10 pr-4 py-3 bg-white rounded-full text-[13px] text-black outline-none transition-colors"
|
|
3990
|
+
}
|
|
3991
|
+
)), /* @__PURE__ */ React44.createElement("div", { className: "flex items-center gap-3 w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0" }, /* @__PURE__ */ React44.createElement(
|
|
3992
|
+
"button",
|
|
3993
|
+
{
|
|
3994
|
+
onClick: () => setIsDirectionModalOpen(true),
|
|
3995
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-3 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
3996
|
+
},
|
|
3997
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: FilterIcon, size: 14 }),
|
|
3998
|
+
activeDirectionFilter === "ALL" ? "Filter by Flow" : activeDirectionFilter
|
|
3999
|
+
), /* @__PURE__ */ React44.createElement(
|
|
4000
|
+
"button",
|
|
4001
|
+
{
|
|
4002
|
+
onClick: () => setIsTypeModalOpen(true),
|
|
4003
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-3 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
4004
|
+
},
|
|
4005
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: FilterIcon, size: 14 }),
|
|
4006
|
+
activeTypeFilter === "ALL" ? "Filter by Type" : activeTypeFilter.replace("_", " ")
|
|
4007
|
+
))), /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-4" }, currentView === "list" ? /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, headerTitle), /* @__PURE__ */ React44.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription)) : /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col items-start gap-3" }, /* @__PURE__ */ React44.createElement("button", { onClick: goBack, className: "text-[11px] text-neutral-400 hover:text-black tracking-[0.2em] flex items-center gap-1.5 transition-colors outline-none" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: ArrowLeft01Icon10, size: 12 }), " Back to Ledger"), /* @__PURE__ */ React44.createElement("h1", { className: "text-lg text-black tracking-tight" }, "Transaction Details"))), currentView === "list" && /* @__PURE__ */ React44.createElement("div", { className: "w-full overflow-hidden" }, isListLoading ? /* @__PURE__ */ React44.createElement(PageSpinner6, null) : /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React44.createElement("div", { className: "divide-y divide-neutral-100" }, transactions.length === 0 ? /* @__PURE__ */ React44.createElement("p", { className: "text-xs text-neutral-500 py-6 text-center" }, "No transactions found") : transactions.map((tx) => /* @__PURE__ */ React44.createElement(
|
|
4008
|
+
"div",
|
|
4009
|
+
{
|
|
4010
|
+
key: tx.id,
|
|
4011
|
+
onClick: () => {
|
|
4012
|
+
setSelectedTransaction(tx);
|
|
4013
|
+
setCurrentView("details");
|
|
4014
|
+
},
|
|
4015
|
+
className: "flex items-center justify-between py-4 hover:bg-neutral-50/50 transition-colors cursor-pointer group min-w-0 px-2 -mx-2 rounded-xl"
|
|
4016
|
+
},
|
|
4017
|
+
/* @__PURE__ */ React44.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React44.createElement("div", { className: `w-10 h-10 shrink-0 rounded-full flex items-center justify-center ${tx.direction === "CREDIT" ? "bg-green-50 text-green-600" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: tx.direction === "CREDIT" ? ArrowDown01Icon5 : ArrowUp01Icon, size: 18 })), /* @__PURE__ */ React44.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-1" }, /* @__PURE__ */ React44.createElement("p", { className: "text-[13px] text-black truncate" }, getDisplayName(tx)), /* @__PURE__ */ React44.createElement("p", { className: "text-[13px] text-neutral-500 truncate" }, tx.direction === "CREDIT" ? "+" : "-", tx.amount, " ", tx.currency))),
|
|
4018
|
+
/* @__PURE__ */ React44.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] text-neutral-500" }, formatDate3(tx.createdAt)), /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] text-neutral-400 capitalize" }, tx.direction.toLowerCase()))
|
|
4019
|
+
))), totalPages > 1 && /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 border-t border-neutral-100" }, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] uppercase " }, "Page ", currentPage, " of ", totalPages), /* @__PURE__ */ React44.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React44.createElement(
|
|
4020
|
+
"button",
|
|
4021
|
+
{
|
|
4022
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
4023
|
+
disabled: currentPage === 1 || isListLoading,
|
|
4024
|
+
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
4025
|
+
},
|
|
4026
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: ArrowLeft01Icon10, size: 14 })
|
|
4027
|
+
), /* @__PURE__ */ React44.createElement(
|
|
4028
|
+
"button",
|
|
4029
|
+
{
|
|
4030
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
4031
|
+
disabled: currentPage >= totalPages || isListLoading,
|
|
4032
|
+
className: "p-2 border border-neutral-100 rounded-full bg-white text-neutral-500 hover:text-black hover:border-black disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
|
|
4033
|
+
},
|
|
4034
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: ArrowRight01Icon10, size: 14 })
|
|
4035
|
+
))))), currentView === "details" && selectedTransaction && /* @__PURE__ */ React44.createElement("div", { className: "w-full text-left" }, /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col items-center justify-center py-10 border-b border-neutral-100 mb-8" }, /* @__PURE__ */ React44.createElement("div", { className: `w-14 h-14 rounded-full flex items-center justify-center mb-4 ${selectedTransaction.direction === "CREDIT" ? "bg-green-50 text-green-600" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: selectedTransaction.direction === "CREDIT" ? ArrowDown01Icon5 : ArrowUp01Icon, size: 24 })), /* @__PURE__ */ React44.createElement("h2", { className: "text-3xl text-black mb-2" }, selectedTransaction.direction === "CREDIT" ? "+" : "-", selectedTransaction.amount, " ", selectedTransaction.currency), /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-widest text-neutral-500 uppercase px-4 py-1.5 rounded-full bg-neutral-50" }, selectedTransaction.status)), /* @__PURE__ */ React44.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-y-8 gap-x-4 " }, /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Reference ID"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black break-all" }, selectedTransaction.reference)), /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Date & Time"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black" }, formatDate3(selectedTransaction.createdAt), " at ", formatTime(selectedTransaction.createdAt))), /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Transaction Type"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black capitalize" }, selectedTransaction.type.replace("_", " ").toLowerCase())), /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 uppercase" }, "Flow Direction"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black capitalize" }, selectedTransaction.direction.toLowerCase()))))), isDirectionModalOpen && /* @__PURE__ */ React44.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsDirectionModalOpen(false) }), /* @__PURE__ */ React44.createElement("div", { ref: directionDropdownRef, className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React44.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React44.createElement("h3", { className: "text-[14px] text-black tracking-tight " }, "Filter by Flow")), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, ["ALL", "CREDIT", "DEBIT"].map((option) => /* @__PURE__ */ React44.createElement(
|
|
4036
|
+
"button",
|
|
4037
|
+
{
|
|
4038
|
+
key: option,
|
|
4039
|
+
onClick: () => {
|
|
4040
|
+
onDirectionFilterChange(option);
|
|
4041
|
+
setIsDirectionModalOpen(false);
|
|
4042
|
+
},
|
|
4043
|
+
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeDirectionFilter === option ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
4044
|
+
},
|
|
4045
|
+
/* @__PURE__ */ React44.createElement("span", { className: "truncate pr-2 capitalize" }, option.toLowerCase())
|
|
4046
|
+
))), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React44.createElement(
|
|
4047
|
+
"button",
|
|
4048
|
+
{
|
|
4049
|
+
onClick: () => setIsDirectionModalOpen(false),
|
|
4050
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
4051
|
+
},
|
|
4052
|
+
"Cancel"
|
|
4053
|
+
)))), isTypeModalOpen && /* @__PURE__ */ React44.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setIsTypeModalOpen(false) }), /* @__PURE__ */ React44.createElement("div", { ref: typeDropdownRef, className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React44.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React44.createElement("h3", { className: "text-[14px] text-black tracking-tight " }, "Filter by Type")), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, [
|
|
4054
|
+
{ label: "All Transactions", value: "ALL" },
|
|
4055
|
+
{ label: "Wallet Transactions", value: "WALLET_TRANSACTION" },
|
|
4056
|
+
{ label: "Card Transactions", value: "CARD_TRANSACTION" }
|
|
4057
|
+
].map((option) => /* @__PURE__ */ React44.createElement(
|
|
4058
|
+
"button",
|
|
4059
|
+
{
|
|
4060
|
+
key: option.value,
|
|
4061
|
+
onClick: () => {
|
|
4062
|
+
onTypeFilterChange(option.value);
|
|
4063
|
+
setIsTypeModalOpen(false);
|
|
4064
|
+
},
|
|
4065
|
+
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none ${activeTypeFilter === option.value ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}`
|
|
4066
|
+
},
|
|
4067
|
+
/* @__PURE__ */ React44.createElement("span", { className: "truncate pr-2" }, option.label)
|
|
4068
|
+
))), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React44.createElement(
|
|
4069
|
+
"button",
|
|
4070
|
+
{
|
|
4071
|
+
onClick: () => setIsTypeModalOpen(false),
|
|
4072
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none "
|
|
4073
|
+
},
|
|
4074
|
+
"Cancel"
|
|
4075
|
+
)))));
|
|
4076
|
+
};
|
|
4077
|
+
|
|
4078
|
+
// src/components/DriveItemOpener.tsx
|
|
4079
|
+
import React45 from "react";
|
|
4080
|
+
import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
|
|
3840
4081
|
import { Cancel01Icon as Cancel01Icon4 } from "@hugeicons/core-free-icons";
|
|
3841
4082
|
var DriveItemOpener = ({ item, onClose }) => {
|
|
3842
4083
|
if (!item) return null;
|
|
@@ -3848,38 +4089,38 @@ var DriveItemOpener = ({ item, onClose }) => {
|
|
|
3848
4089
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
3849
4090
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
3850
4091
|
};
|
|
3851
|
-
return /* @__PURE__ */
|
|
4092
|
+
return /* @__PURE__ */ React45.createElement("div", { className: "fixed inset-0 z-200 bg-black/95 flex flex-col animate-in fade-in duration-200" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between p-4 border-b border-white/10 bg-black" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React45.createElement("div", { className: "w-10 h-10 bg-white/10 rounded-xl flex items-center justify-center" }, /* @__PURE__ */ React45.createElement("div", { className: "invert grayscale brightness-200" }, /* @__PURE__ */ React45.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType }))), /* @__PURE__ */ React45.createElement("div", null, /* @__PURE__ */ React45.createElement("h3", { className: "text-sm text-white tracking-wide" }, item.name), /* @__PURE__ */ React45.createElement("p", { className: "text-xs text-white/50 mt-0.5" }, item.type, " \u2022 ", formatBytes(item.size), " \u2022 ", new Date(item.updatedAt).toLocaleDateString()))), /* @__PURE__ */ React45.createElement(
|
|
3852
4093
|
"button",
|
|
3853
4094
|
{
|
|
3854
4095
|
onClick: onClose,
|
|
3855
4096
|
className: "p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-colors outline-none"
|
|
3856
4097
|
},
|
|
3857
|
-
/* @__PURE__ */
|
|
3858
|
-
)), /* @__PURE__ */
|
|
4098
|
+
/* @__PURE__ */ React45.createElement(HugeiconsIcon30, { icon: Cancel01Icon4, size: 20 })
|
|
4099
|
+
)), /* @__PURE__ */ React45.createElement("div", { className: "flex-1 flex items-center justify-center p-8 overflow-y-auto relative" }, /* @__PURE__ */ React45.createElement("div", { className: "text-center" }, /* @__PURE__ */ React45.createElement("p", { className: "text-white/40 text-sm tracking-widest " }, "File Preview Engine"), /* @__PURE__ */ React45.createElement("p", { className: "text-white/20 text-xs mt-2" }, "Content rendering logic will be attached here."))));
|
|
3859
4100
|
};
|
|
3860
4101
|
|
|
3861
4102
|
// src/components/DriveShareModal.tsx
|
|
3862
|
-
import
|
|
4103
|
+
import React46 from "react";
|
|
3863
4104
|
var DriveShareModal = ({ items, onClose }) => {
|
|
3864
4105
|
if (!items || items.length === 0) return null;
|
|
3865
|
-
return /* @__PURE__ */
|
|
4106
|
+
return /* @__PURE__ */ React46.createElement("div", { className: "fixed inset-0 z-150 flex items-center justify-center p-4 bg-black/30 animate-in fade-in duration-200" }, /* @__PURE__ */ React46.createElement("div", { className: "bg-white w-full max-w-md rounded-2xl p-6 shadow-2xl flex flex-col gap-6 animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React46.createElement("div", null, /* @__PURE__ */ React46.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Share Access"), /* @__PURE__ */ React46.createElement("p", { className: "text-xs text-neutral-500" }, "Managing permissions for ", items.length, " selected item(s).")), /* @__PURE__ */ React46.createElement("div", { className: "flex justify-end gap-3 mt-2" }, /* @__PURE__ */ React46.createElement(
|
|
3866
4107
|
"button",
|
|
3867
4108
|
{
|
|
3868
4109
|
onClick: onClose,
|
|
3869
4110
|
className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full transition-colors outline-none"
|
|
3870
4111
|
},
|
|
3871
4112
|
"Close"
|
|
3872
|
-
), /* @__PURE__ */
|
|
4113
|
+
), /* @__PURE__ */ React46.createElement(ThreeDActionButton, { onClick: onClose }, "Save Links"))));
|
|
3873
4114
|
};
|
|
3874
4115
|
|
|
3875
4116
|
// src/components/AiApproveDecline.tsx
|
|
3876
|
-
import
|
|
3877
|
-
import { HugeiconsIcon as
|
|
4117
|
+
import React47, { useState as useState29 } from "react";
|
|
4118
|
+
import { HugeiconsIcon as HugeiconsIcon31 } from "@hugeicons/react";
|
|
3878
4119
|
import { CheckmarkCircle01Icon, CancelCircleIcon as CancelCircleIcon2, PencilEdit01Icon } from "@hugeicons/core-free-icons";
|
|
3879
4120
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
3880
|
-
const [isEditing, setIsEditing] =
|
|
3881
|
-
const [editVal, setEditVal] =
|
|
3882
|
-
return /* @__PURE__ */
|
|
4121
|
+
const [isEditing, setIsEditing] = useState29(false);
|
|
4122
|
+
const [editVal, setEditVal] = useState29(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
4123
|
+
return /* @__PURE__ */ React47.createElement("div", { className: "border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1 " }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ React47.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ React47.createElement(
|
|
3883
4124
|
"input",
|
|
3884
4125
|
{
|
|
3885
4126
|
type: "text",
|
|
@@ -3888,23 +4129,23 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
3888
4129
|
className: "w-full text-sm p-2 border-b border-orange-200 bg-transparent outline-none focus:border-orange-400 transition-colors",
|
|
3889
4130
|
autoFocus: true
|
|
3890
4131
|
}
|
|
3891
|
-
)), /* @__PURE__ */
|
|
4132
|
+
)), /* @__PURE__ */ React47.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement("button", { onClick: onApprove, title: "Approve", className: "p-1.5 text-black hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ React47.createElement("button", { onClick: onDecline, title: "Decline", className: "p-1.5 text-neutral-400 hover:text-neutral-400 hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: CancelCircleIcon2, size: 28 })), onEdit && /* @__PURE__ */ React47.createElement("button", { onClick: () => setIsEditing(true), title: "Edit", className: "ml-auto p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement("button", { onClick: () => {
|
|
3892
4133
|
onEdit?.(editVal);
|
|
3893
4134
|
setIsEditing(false);
|
|
3894
|
-
}, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */
|
|
4135
|
+
}, title: "Save Edit", className: "p-1.5 text-emerald-500 hover:text-emerald-600 hover:bg-emerald-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ React47.createElement("button", { onClick: () => setIsEditing(false), title: "Cancel Edit", className: "p-1.5 text-neutral-400 hover:text-black hover:bg-neutral-100 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: CancelCircleIcon2, size: 28 })))));
|
|
3895
4136
|
};
|
|
3896
4137
|
|
|
3897
4138
|
// src/components/AiStageCheck.tsx
|
|
3898
|
-
import
|
|
3899
|
-
import { HugeiconsIcon as
|
|
3900
|
-
import { Loading03Icon as
|
|
4139
|
+
import React48 from "react";
|
|
4140
|
+
import { HugeiconsIcon as HugeiconsIcon32 } from "@hugeicons/react";
|
|
4141
|
+
import { Loading03Icon as Loading03Icon16, CheckmarkCircle02Icon, CancelCircleIcon as CancelCircleIcon3 } from "@hugeicons/core-free-icons";
|
|
3901
4142
|
var AiStageCheck = ({ tasks }) => {
|
|
3902
|
-
return /* @__PURE__ */
|
|
4143
|
+
return /* @__PURE__ */ React48.createElement("div", { className: "flex flex-col gap-3 p-5 rounded-2xl border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white relative overflow-hidden" }, /* @__PURE__ */ React48.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 mb-1 " }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ React48.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ React48.createElement("div", { className: "w-4 h-4 rounded-full border border-orange-200" }), task.status === "loading" && /* @__PURE__ */ React48.createElement(HugeiconsIcon32, { icon: Loading03Icon16, size: 16, className: "animate-spin text-orange-500" }), task.status === "success" && /* @__PURE__ */ React48.createElement(HugeiconsIcon32, { icon: CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ React48.createElement(HugeiconsIcon32, { icon: CancelCircleIcon3, size: 16, className: "text-red-500" }), /* @__PURE__ */ React48.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-orange-700" : "text-neutral-500"}` }, task.label))));
|
|
3903
4144
|
};
|
|
3904
4145
|
|
|
3905
4146
|
// src/components/Stagger.tsx
|
|
3906
|
-
import
|
|
3907
|
-
import { HugeiconsIcon as
|
|
4147
|
+
import React49 from "react";
|
|
4148
|
+
import { HugeiconsIcon as HugeiconsIcon33 } from "@hugeicons/react";
|
|
3908
4149
|
import { Briefcase02Icon, Upload01Icon as Upload01Icon2, FileSyncIcon, CloudUploadIcon as CloudUploadIcon2 } from "@hugeicons/core-free-icons";
|
|
3909
4150
|
var Stagger = ({ steps, currentStep }) => {
|
|
3910
4151
|
const getIconForStep = (stepName) => {
|
|
@@ -3914,19 +4155,19 @@ var Stagger = ({ steps, currentStep }) => {
|
|
|
3914
4155
|
if (lowerName.includes("submit")) return CloudUploadIcon2;
|
|
3915
4156
|
return Briefcase02Icon;
|
|
3916
4157
|
};
|
|
3917
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ React49.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ React49.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-100 -z-10" }), /* @__PURE__ */ React49.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 h-px bg-emerald-500 -z-10 transition-all duration-500", style: { width: `${currentStep / (steps.length - 1) * 100}%` } }), steps.map((step, idx) => {
|
|
3918
4159
|
const isActive = idx === currentStep;
|
|
3919
4160
|
const isPassed = idx < currentStep;
|
|
3920
4161
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-100 text-neutral-500" : "bg-neutral-100 text-neutral-500";
|
|
3921
|
-
return /* @__PURE__ */
|
|
4162
|
+
return /* @__PURE__ */ React49.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: getIconForStep(step), size: 11 }));
|
|
3922
4163
|
}));
|
|
3923
4164
|
};
|
|
3924
4165
|
|
|
3925
4166
|
// src/components/UniversalRegistrationFlow.tsx
|
|
3926
|
-
import
|
|
3927
|
-
import
|
|
3928
|
-
import { HugeiconsIcon as
|
|
3929
|
-
import { CheckmarkBadge01Icon as CheckmarkBadge01Icon2, Upload01Icon as Upload01Icon3, Loading03Icon as
|
|
4167
|
+
import React50, { useState as useState30, useEffect as useEffect20, useRef as useRef13 } from "react";
|
|
4168
|
+
import toast9 from "react-hot-toast";
|
|
4169
|
+
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4170
|
+
import { CheckmarkBadge01Icon as CheckmarkBadge01Icon2, Upload01Icon as Upload01Icon3, Loading03Icon as Loading03Icon17, PencilEdit01Icon as PencilEdit01Icon2, Delete02Icon as Delete02Icon3, SignatureIcon, IdentificationIcon, ArrowLeft01Icon as ArrowLeft01Icon11, HourglassIcon } from "@hugeicons/core-free-icons";
|
|
3930
4171
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
3931
4172
|
var NIGERIAN_STATES = ["Abia", "Adamawa", "Akwa Ibom", "Anambra", "Bauchi", "Bayelsa", "Benue", "Borno", "Cross River", "Delta", "Ebonyi", "Edo", "Ekiti", "Enugu", "FCT - Abuja", "Gombe", "Imo", "Jigawa", "Kaduna", "Kano", "Katsina", "Kebbi", "Kogi", "Kwara", "Lagos", "Nasarawa", "Niger", "Ogun", "Ondo", "Osun", "Oyo", "Plateau", "Rivers", "Sokoto", "Taraba", "Yobe", "Zamfara"];
|
|
3932
4173
|
var MEMBER_ROLES = ["Director Only", "Shareholder Only", "Both Director & Shareholder"];
|
|
@@ -3939,12 +4180,12 @@ var UniversalRegistrationFlow = ({
|
|
|
3939
4180
|
onRedirectToBilling,
|
|
3940
4181
|
onRedirectToApplication
|
|
3941
4182
|
}) => {
|
|
3942
|
-
const [isBooting, setIsBooting] =
|
|
3943
|
-
const [macroStep, setMacroStep] =
|
|
3944
|
-
const [appStatus, setAppStatus] =
|
|
3945
|
-
const [isAbortModalOpen, setIsAbortModalOpen] =
|
|
3946
|
-
const [isAborting, setIsAborting] =
|
|
3947
|
-
const [formState, setFormState] =
|
|
4183
|
+
const [isBooting, setIsBooting] = useState30(true);
|
|
4184
|
+
const [macroStep, setMacroStep] = useState30(0);
|
|
4185
|
+
const [appStatus, setAppStatus] = useState30("");
|
|
4186
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = useState30(false);
|
|
4187
|
+
const [isAborting, setIsAborting] = useState30(false);
|
|
4188
|
+
const [formState, setFormState] = useState30({
|
|
3948
4189
|
natureApproved: false,
|
|
3949
4190
|
nameApproved: false,
|
|
3950
4191
|
addressApproved: false,
|
|
@@ -3955,13 +4196,13 @@ var UniversalRegistrationFlow = ({
|
|
|
3955
4196
|
passportApproved: false,
|
|
3956
4197
|
signatureApproved: false
|
|
3957
4198
|
});
|
|
3958
|
-
const idRef =
|
|
3959
|
-
const passportRef =
|
|
3960
|
-
const signatureRef =
|
|
3961
|
-
const other1Ref =
|
|
3962
|
-
const other2Ref =
|
|
3963
|
-
const other3Ref =
|
|
3964
|
-
const [formData, setFormData] =
|
|
4199
|
+
const idRef = useRef13(null);
|
|
4200
|
+
const passportRef = useRef13(null);
|
|
4201
|
+
const signatureRef = useRef13(null);
|
|
4202
|
+
const other1Ref = useRef13(null);
|
|
4203
|
+
const other2Ref = useRef13(null);
|
|
4204
|
+
const other3Ref = useRef13(null);
|
|
4205
|
+
const [formData, setFormData] = useState30({
|
|
3965
4206
|
businessDesc: "",
|
|
3966
4207
|
natureOfBusiness: null,
|
|
3967
4208
|
proposedName: "",
|
|
@@ -3988,22 +4229,22 @@ var UniversalRegistrationFlow = ({
|
|
|
3988
4229
|
otherDoc3Url: "",
|
|
3989
4230
|
otherDoc3Meta: null
|
|
3990
4231
|
});
|
|
3991
|
-
const [activeModal, setActiveModal] =
|
|
3992
|
-
const [iAgree, setIAgree] =
|
|
3993
|
-
const [isAnalyzingNature, setIsAnalyzingNature] =
|
|
3994
|
-
const [suggestedNature, setSuggestedNature] =
|
|
3995
|
-
const [isCheckingQualifier, setIsCheckingQualifier] =
|
|
3996
|
-
const [qualifierCheckResult, setQualifierCheckResult] =
|
|
3997
|
-
const [isCheckingName, setIsCheckingName] =
|
|
3998
|
-
const [nameCheckResult, setNameCheckResult] =
|
|
3999
|
-
const [globalExtractingId, setGlobalExtractingId] =
|
|
4000
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] =
|
|
4001
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] =
|
|
4002
|
-
const [isUploadingOther1, setIsUploadingOther1] =
|
|
4003
|
-
const [isUploadingOther2, setIsUploadingOther2] =
|
|
4004
|
-
const [isUploadingOther3, setIsUploadingOther3] =
|
|
4005
|
-
const [aiTasks, setAiTasks] =
|
|
4006
|
-
const [isSubmitting, setIsSubmitting] =
|
|
4232
|
+
const [activeModal, setActiveModal] = useState30({ isOpen: false, type: null, memberIndex: null });
|
|
4233
|
+
const [iAgree, setIAgree] = useState30(false);
|
|
4234
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = useState30(false);
|
|
4235
|
+
const [suggestedNature, setSuggestedNature] = useState30(null);
|
|
4236
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = useState30(false);
|
|
4237
|
+
const [qualifierCheckResult, setQualifierCheckResult] = useState30(null);
|
|
4238
|
+
const [isCheckingName, setIsCheckingName] = useState30(false);
|
|
4239
|
+
const [nameCheckResult, setNameCheckResult] = useState30(null);
|
|
4240
|
+
const [globalExtractingId, setGlobalExtractingId] = useState30(false);
|
|
4241
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = useState30(false);
|
|
4242
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = useState30(false);
|
|
4243
|
+
const [isUploadingOther1, setIsUploadingOther1] = useState30(false);
|
|
4244
|
+
const [isUploadingOther2, setIsUploadingOther2] = useState30(false);
|
|
4245
|
+
const [isUploadingOther3, setIsUploadingOther3] = useState30(false);
|
|
4246
|
+
const [aiTasks, setAiTasks] = useState30([]);
|
|
4247
|
+
const [isSubmitting, setIsSubmitting] = useState30(false);
|
|
4007
4248
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
4008
4249
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
4009
4250
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -4018,7 +4259,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4018
4259
|
return { success: false, error: "Network communication failed." };
|
|
4019
4260
|
}
|
|
4020
4261
|
};
|
|
4021
|
-
|
|
4262
|
+
useEffect20(() => {
|
|
4022
4263
|
baseApi("progress_load").then((data) => {
|
|
4023
4264
|
if (data.success && data.data) {
|
|
4024
4265
|
const meta = data.data;
|
|
@@ -4126,7 +4367,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4126
4367
|
if (data.appStatus === "QUEUED" || data.appStatus === "REJECTED") setMacroStep(0);
|
|
4127
4368
|
}
|
|
4128
4369
|
}).catch(() => {
|
|
4129
|
-
|
|
4370
|
+
toast9.error("Uh oh! Something went wrong while loading.");
|
|
4130
4371
|
}).finally(() => setIsBooting(false));
|
|
4131
4372
|
}, [applicationId, type, apiEndpoint]);
|
|
4132
4373
|
const saveProgress = async (newFormData = formData, newFormState = formState, newMacro = macroStep) => {
|
|
@@ -4138,11 +4379,11 @@ var UniversalRegistrationFlow = ({
|
|
|
4138
4379
|
setIsAborting(true);
|
|
4139
4380
|
const data = await baseApi("abort");
|
|
4140
4381
|
if (data.success) {
|
|
4141
|
-
|
|
4382
|
+
toast9.success("Application aborted.");
|
|
4142
4383
|
setAppStatus("DRAFT");
|
|
4143
4384
|
setMacroStep(0);
|
|
4144
4385
|
setIsAbortModalOpen(false);
|
|
4145
|
-
} else
|
|
4386
|
+
} else toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4146
4387
|
setIsAborting(false);
|
|
4147
4388
|
};
|
|
4148
4389
|
const handleBack = () => {
|
|
@@ -4185,7 +4426,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4185
4426
|
setIsAnalyzingNature(true);
|
|
4186
4427
|
const data = await baseApi("analyze_nature", { description: formData.businessDesc });
|
|
4187
4428
|
if (data.success) setSuggestedNature(data.data);
|
|
4188
|
-
else
|
|
4429
|
+
else toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4189
4430
|
setIsAnalyzingNature(false);
|
|
4190
4431
|
};
|
|
4191
4432
|
const pollNameCheckJob = async (jobId) => {
|
|
@@ -4194,7 +4435,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4194
4435
|
setNameCheckResult(poll.data.result);
|
|
4195
4436
|
setIsCheckingName(false);
|
|
4196
4437
|
} else if (poll.success && poll.data.status === "error") {
|
|
4197
|
-
|
|
4438
|
+
toast9.error(poll.data.error || "Uh oh! Something went wrong.");
|
|
4198
4439
|
setIsCheckingName(false);
|
|
4199
4440
|
} else setTimeout(() => pollNameCheckJob(jobId), 3e3);
|
|
4200
4441
|
};
|
|
@@ -4212,7 +4453,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4212
4453
|
const data = await baseApi("check_name_start", { name: nameToCheck, lineOfBusiness: formData.natureOfBusiness?.specificLabel });
|
|
4213
4454
|
if (data.success && data.data.jobId) pollNameCheckJob(data.data.jobId);
|
|
4214
4455
|
else {
|
|
4215
|
-
|
|
4456
|
+
toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4216
4457
|
setIsCheckingName(false);
|
|
4217
4458
|
}
|
|
4218
4459
|
};
|
|
@@ -4237,7 +4478,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4237
4478
|
throw new Error(data.error || "Failed to secure upload URL.");
|
|
4238
4479
|
}
|
|
4239
4480
|
} catch (error) {
|
|
4240
|
-
|
|
4481
|
+
toast9.error(error.message);
|
|
4241
4482
|
} finally {
|
|
4242
4483
|
if (optType === "other1") {
|
|
4243
4484
|
setIsUploadingOther1(false);
|
|
@@ -4288,7 +4529,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4288
4529
|
const maxAllowed = Math.max(0, 100 - otherSharesSum);
|
|
4289
4530
|
if (numValue > maxAllowed) {
|
|
4290
4531
|
numValue = maxAllowed;
|
|
4291
|
-
|
|
4532
|
+
toast9.error(`Total shares cannot exceed 100%. Remaining: ${maxAllowed}%`, { id: "share-limit" });
|
|
4292
4533
|
} else if (numValue < 0) numValue = 0;
|
|
4293
4534
|
updated[index] = { ...updated[index], [key]: numValue.toString() };
|
|
4294
4535
|
}
|
|
@@ -4319,7 +4560,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4319
4560
|
updatedMembers[memberIndex] = { ...updatedMembers[memberIndex], idExtractedData: data.data, idFileUrl: uploadData.data.fileUrl, idMetadata: { fileName: file.name, contentType: file.type, fileSizeInBytes: file.size } };
|
|
4320
4561
|
setFormData({ ...formData, members: updatedMembers });
|
|
4321
4562
|
saveProgress({ ...formData, members: updatedMembers });
|
|
4322
|
-
} else
|
|
4563
|
+
} else toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4323
4564
|
} else {
|
|
4324
4565
|
if (docType === "passport") setGlobalUploadingPassport(true);
|
|
4325
4566
|
else setGlobalUploadingSignature(true);
|
|
@@ -4336,10 +4577,10 @@ var UniversalRegistrationFlow = ({
|
|
|
4336
4577
|
}
|
|
4337
4578
|
setFormData({ ...formData, members: updatedMembers });
|
|
4338
4579
|
saveProgress({ ...formData, members: updatedMembers });
|
|
4339
|
-
} else
|
|
4580
|
+
} else toast9.error(`Failed to secure upload URL for ${docType}.`);
|
|
4340
4581
|
}
|
|
4341
4582
|
} catch (error) {
|
|
4342
|
-
|
|
4583
|
+
toast9.error(error.message);
|
|
4343
4584
|
} finally {
|
|
4344
4585
|
if (docType === "id") setGlobalExtractingId(false);
|
|
4345
4586
|
else if (docType === "passport") setGlobalUploadingPassport(false);
|
|
@@ -4388,7 +4629,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4388
4629
|
setFormData(updatedForm);
|
|
4389
4630
|
saveProgress(updatedForm);
|
|
4390
4631
|
} else {
|
|
4391
|
-
|
|
4632
|
+
toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4392
4633
|
setAiTasks([{ id: "1", label: "Document Scanned", status: "success" }, { id: "2", label: "Extraction Failed", status: "error" }]);
|
|
4393
4634
|
}
|
|
4394
4635
|
} else {
|
|
@@ -4408,10 +4649,10 @@ var UniversalRegistrationFlow = ({
|
|
|
4408
4649
|
approveSection("signatureApproved", updatedForm);
|
|
4409
4650
|
}
|
|
4410
4651
|
setFormData(updatedForm);
|
|
4411
|
-
} else
|
|
4652
|
+
} else toast9.error(data.error || `Failed to upload ${docType}.`);
|
|
4412
4653
|
}
|
|
4413
4654
|
} catch (error) {
|
|
4414
|
-
|
|
4655
|
+
toast9.error(error.message);
|
|
4415
4656
|
} finally {
|
|
4416
4657
|
if (docType === "id") {
|
|
4417
4658
|
setGlobalExtractingId(false);
|
|
@@ -4494,33 +4735,33 @@ var UniversalRegistrationFlow = ({
|
|
|
4494
4735
|
}
|
|
4495
4736
|
const data = await baseApi("submit", finalJsonPayload);
|
|
4496
4737
|
if (data.success) {
|
|
4497
|
-
|
|
4738
|
+
toast9.success("Application Submitted!");
|
|
4498
4739
|
onRedirectToApplication(applicationId);
|
|
4499
4740
|
} else {
|
|
4500
|
-
|
|
4741
|
+
toast9.error(data.error || "Uh oh! Something went wrong.");
|
|
4501
4742
|
setIsSubmitting(false);
|
|
4502
4743
|
}
|
|
4503
4744
|
};
|
|
4504
4745
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
4505
4746
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
4506
4747
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
4507
|
-
if (isBooting) return /* @__PURE__ */
|
|
4748
|
+
if (isBooting) return /* @__PURE__ */ React50.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 32, className: "animate-spin text-black" }));
|
|
4508
4749
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
4509
|
-
return /* @__PURE__ */
|
|
4750
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "w-full max-w-5xl mx-auto bg-white rounded-2xl p-6 sm:p-10 flex flex-col items-center justify-center text-center gap-5 animate-in fade-in slide-in-from-bottom-2 duration-500 mb-20 py-24" }, appStatus === "COMPLETED" ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: CheckmarkBadge01Icon2, size: 35 })), /* @__PURE__ */ React50.createElement("h2", { className: "text-xl text-black" }, "Registration Completed"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ React50.createElement("h2", { className: "text-xl text-black" }, "Application is Pending"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "w-20 h-20 bg-amber-50 text-amber-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ React50.createElement("h2", { className: "text-xl text-black" }, "Awaiting Payment"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is complete and awaiting government fee settlement. Please go to the Billing tab to authorize payment."), /* @__PURE__ */ React50.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ React50.createElement("button", { onClick: onRedirectToBilling, className: "px-8 py-3 bg-black text-white text-[11px] tracking-widest rounded-full hover:bg-neutral-800 outline-none" }, "Go to Billing & Invoices"), /* @__PURE__ */ React50.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort & Edit Application"))) : /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: HourglassIcon, size: 35 })), /* @__PURE__ */ React50.createElement("h2", { className: "text-xl text-black" }, "Application Submitted"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently ", appStatus.replace(/_/g, " ").toLowerCase(), "."), ["AWAITING_PAYMENT", "READY_FOR_SUBMISSION", "AWAITING_CONFIRMATION"].includes(appStatus) && /* @__PURE__ */ React50.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ React50.createElement("button", { onClick: () => setIsAbortModalOpen(true), className: "px-8 py-3 border border-neutral-100 text-neutral-600 text-[11px] tracking-widest rounded-full hover:bg-neutral-50 outline-none" }, "Abort Application"))), isAbortModalOpen && /* @__PURE__ */ React50.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React50.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ React50.createElement("div", { className: "relative w-100 bg-white shadow-2xl rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 text-left" }, /* @__PURE__ */ React50.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-[17px] text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ React50.createElement("p", { className: "text-[11px] text-neutral-500 leading-relaxed" }, "Are you sure you want to abort? If you have already made a payment, returning to draft may cause issues. Your invoice will be deleted.")), /* @__PURE__ */ React50.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ React50.createElement("button", { onClick: () => setIsAbortModalOpen(false), disabled: isAborting, className: "flex-1 py-4 text-[13px] text-neutral-500 hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, "Cancel"), /* @__PURE__ */ React50.createElement("button", { onClick: handleAbort, disabled: isAborting, className: "flex-1 py-4 text-[13px] text-red-500 hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50" }, isAborting ? "Aborting..." : "Yes, Abort")))));
|
|
4510
4751
|
}
|
|
4511
|
-
return /* @__PURE__ */
|
|
4752
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "w-full max-w-5xl mx-auto bg-white rounded-2xl p-6 sm:p-10 flex flex-col gap-10 animate-in fade-in slide-in-from-bottom-2 duration-500 mb-20" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("h2", { className: "text-xl text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ React50.createElement("div", { className: "px-2" }, /* @__PURE__ */ React50.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ React50.createElement(TextInput, { label: type === "company" ? "Company Description" : "Business Description", placeholder: "e.g. We provide professional services to clients.", value: formData.businessDesc, onChange: (v) => setFormData({ ...formData, businessDesc: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ React50.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React50.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ React50.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ React50.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
4512
4753
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
4513
4754
|
setFormData(newForm);
|
|
4514
4755
|
approveSection("natureApproved", newForm);
|
|
4515
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
4756
|
+
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React50.createElement("div", { className: "pr-4" }, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), formState.natureApproved && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => handleCheckNames(formData.proposedName), disabled: !formData.proposedName || !formData.proposedName2 || isCheckingName || isCheckingQualifier || isReadOnly, isLoading: isCheckingQualifier || isCheckingName, className: "w-fit" }, "Check Availability")), (isCheckingQualifier || isCheckingName) && /* @__PURE__ */ React50.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React50.createElement(AiStageCheck, { tasks: [{ id: "1", label: "AI Qualifier Pre-check...", status: isCheckingQualifier ? "loading" : "success" }, { id: "2", label: "Checking Official Registry Database...", status: isCheckingName ? "loading" : "pending" }, { id: "3", label: "Fallback Checking Public Database...", status: isCheckingName ? "loading" : "pending" }, { id: "4", label: "Validation Status...", status: isCheckingName ? "loading" : "pending" }] })), qualifierCheckResult && /* @__PURE__ */ React50.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ React50.createElement("div", { className: "border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ React50.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React50.createElement("button", { onClick: () => setQualifierCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Edit Name Manually"))), nameCheckResult && /* @__PURE__ */ React50.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ React50.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: `mb-1 ${nameCheckResult.status === "APPROVED" ? "text-emerald-600 " : "text-orange-500 "}` }, nameCheckResult.status === "APPROVED" ? "Excellent chance of approval." : "Validation Bypassed / Fallback."), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
|
|
4516
4757
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
4517
4758
|
setFormData(newForm);
|
|
4518
4759
|
approveSection("nameApproved", newForm);
|
|
4519
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
4520
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
4521
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
4522
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
4523
|
-
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ React49.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ React49.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React49.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React49.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React49.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React49.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React49.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ React49.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React49.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: ArrowLeft01Icon10, size: 14 }), " Close"), /* @__PURE__ */ React49.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ React49.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ React49.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ React49.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ React49.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React49.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ React49.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React49.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React49.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Loading03Icon16, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Delete02Icon3, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Loading03Icon16, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Delete02Icon3, size: 16 }))) : null)), /* @__PURE__ */ React49.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React49.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ React49.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: PencilEdit01Icon2, size: 16 })))) : /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-full flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ React49.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ React49.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React49.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ React49.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React49.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React49.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React49.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React49.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ React49.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Loading03Icon16, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Delete02Icon3, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ React49.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Loading03Icon16, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React49.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React49.createElement(HugeiconsIcon33, { icon: Delete02Icon3, size: 16 })))))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React49.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ React49.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ React49.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
4760
|
+
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ React50.createElement("div", { className: "border border-red-100 bg-linear-to-bl from-red-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ React50.createElement("button", { key: i, onClick: () => setFormData({ ...formData, proposedName: alt }), className: "text-left px-4 py-2 border border-neutral-100 rounded-full hover:border-black text-sm transition-colors outline-none" }, alt)))), /* @__PURE__ */ React50.createElement("button", { onClick: () => setNameCheckResult(null), className: "w-fit text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors mt-2 outline-none" }, "Try New Name")))) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), formState.nameApproved && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
|
|
4761
|
+
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between gap-2 text-black" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ React50.createElement("div", { className: `text-xs px-3 py-1 rounded-full ${getCompanyTotalShares() === 100 ? "bg-emerald-50 text-emerald-600" : "bg-red-50 text-red-500"}` }, "Total Shares: ", getCompanyTotalShares(), "%")), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ React50.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ React50.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
|
|
4762
|
+
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ React50.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React50.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React50.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
|
|
4763
|
+
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
|
|
4764
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: addCompanyMember, className: "px-6 py-2 bg-white border border-neutral-100 text-black text-[11px] tracking-widest rounded-full hover:bg-neutral-50 transition-colors outline-none" }, "+ Add Member"), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide basic contact info. We will extract your DOB and ID number automatically in the next step."), !formState.ownerApproved ? /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React50.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon11, size: 14 }), " Close"), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "Upload valid means of identification, passport photographs, and signatures for every director and shareholder.")), !formState.membersDocsApproved ? /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ React50.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ React50.createElement("input", { id: `id-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "id"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement("input", { id: `pass-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "passport"), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement("input", { id: `sig-upload-${i}`, type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", className: "hidden", onChange: (e) => handleCompanyMemberUpload(e, i, "signature"), disabled: isReadOnly || isAnyUploading }), !member.idExtractedData && !globalExtractingId ? /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`id-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ React50.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React50.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ React50.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload ID"))) : null, !member.passportFileUrl && !globalUploadingPassport ? /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`pass-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Delete02Icon3, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && document.getElementById(`sig-upload-${i}`)?.click(), className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}`, disabled: isReadOnly || isAnyUploading }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteCompanyMemberDocument(i, "signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Delete02Icon3, size: 16 }))) : null)), /* @__PURE__ */ React50.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))) : /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: idRef, onChange: (e) => handleBusinessUpload(e, "id"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: passportRef, onChange: (e) => handleBusinessUpload(e, "passport"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: signatureRef, onChange: (e) => handleBusinessUpload(e, "signature"), disabled: isReadOnly || isAnyUploading, className: "hidden" }), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 -mt-2" }, "Upload your NIN, Driver's License, Voter's Card, or Int'l Passport (JPG/PNG/WEBP)."), !formState.idApproved ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && idRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `w-full h-32 border border-neutral-100 rounded-full flex flex-col items-center justify-center gap-2 transition-colors outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "hover:bg-neutral-50 text-black"}` }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ React50.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ React50.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React50.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ React50.createElement("div", { className: " mt-2 animate-in fade-in border border-orange-100 bg-linear-to-bl from-orange-50/80 via-white to-white p-5 rounded-2xl flex flex-col gap-4 relative overflow-hidden" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "Full Name on ID", value: formData.idExtractedData.fullName, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, fullName: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React50.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React50.createElement(TextInput, { label: "Date of Birth (YYYY-MM-DD)", value: formData.idExtractedData.dob, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, dob: v } })), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteBusinessDocument("id"), disabled: isAnyUploading, className: "px-6 py-2 bg-white border border-neutral-100 text-neutral-500 text-[11px] rounded-full tracking-widest hover:bg-neutral-50 transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, "Delete & Re-upload")))) : /* @__PURE__ */ React50.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && passportRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteBusinessDocument("passport"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Delete02Icon3, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ React50.createElement("button", { onClick: () => !isReadOnly && !isAnyUploading && signatureRef.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteBusinessDocument("signature"), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Delete02Icon3, size: 16 })))))), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 pt-6 border-t border-neutral-100 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other1Ref, onChange: (e) => handleOptionalUpload(e, "other1"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other2Ref, onChange: (e) => handleOptionalUpload(e, "other2"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React50.createElement("input", { type: "file", accept: "image/jpeg, image/png, image/webp, application/pdf", ref: other3Ref, onChange: (e) => handleOptionalUpload(e, "other3"), disabled: isAnyUploading || isReadOnly, className: "hidden" }), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ React50.createElement("p", { className: "text-xs text-neutral-500 leading-relaxed" }, "If your ", type === "company" ? "company" : "business", " involves regulated professional services, please upload relevant licenses, certificates, or permits here (up to 3 documents).")), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
4524
4765
|
const docType = `other${num}`;
|
|
4525
4766
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
4526
4767
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -4528,29 +4769,29 @@ var UniversalRegistrationFlow = ({
|
|
|
4528
4769
|
if (!fileUrl && !isUploading) {
|
|
4529
4770
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
4530
4771
|
if (!prevUrl) return null;
|
|
4531
|
-
return /* @__PURE__ */
|
|
4772
|
+
return /* @__PURE__ */ React50.createElement("button", { key: num, onClick: () => !isReadOnly && !isAnyUploading && ref.current?.click(), disabled: isReadOnly || isAnyUploading, className: `flex items-center gap-3 p-4 border border-neutral-100 rounded-full transition-colors text-sm w-full outline-none ${isAnyUploading ? "opacity-50 cursor-not-allowed bg-neutral-50 text-neutral-400" : "text-black hover:bg-neutral-50"}` }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Optional Document ", num);
|
|
4532
4773
|
}
|
|
4533
4774
|
if (isUploading) {
|
|
4534
|
-
return /* @__PURE__ */
|
|
4775
|
+
return /* @__PURE__ */ React50.createElement("div", { key: num, className: "flex items-center gap-3 p-4 border border-neutral-100 rounded-full bg-neutral-50 text-neutral-500 text-sm w-full" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Document ", num, "...");
|
|
4535
4776
|
}
|
|
4536
|
-
return /* @__PURE__ */
|
|
4537
|
-
}))), /* @__PURE__ */
|
|
4777
|
+
return /* @__PURE__ */ React50.createElement("div", { key: num, className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React50.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: CheckmarkBadge01Icon2, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ React50.createElement("button", { onClick: () => deleteOptionalDocument(docType), disabled: isAnyUploading, className: "text-emerald-700 hover:text-red-500 transition-colors p-1 outline-none shrink-0 disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: Delete02Icon3, size: 16 })));
|
|
4778
|
+
}))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React50.createElement("button", { onClick: handleBack, disabled: isAnyUploading, className: "flex items-center gap-2 px-6 py-2 text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full transition-colors outline-none disabled:opacity-50 disabled:cursor-not-allowed" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon11, size: 14 }), " Back"), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ React50.createElement("div", null, /* @__PURE__ */ React50.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ React50.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ React50.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ React50.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ React50.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ React50.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ React50.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ React50.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ React50.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ React50.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ React50.createElement("button", { onClick: handleBack, className: "flex items-center gap-2 px-6 py-2 rounded-full text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 transition-colors outline-none" }, /* @__PURE__ */ React50.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon11, size: 14 }), " Back"), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 3 && /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ React50.createElement("h2", { className: "text-lg text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ React50.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ React50.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ React50.createElement("p", { className: "mb-3 leading-relaxed" }, "By proceeding with this application, you acknowledge and agree that all data, documents, and identification materials provided herein will be securely transmitted to the relevant official registries and authorized agents for the purpose of ", type === "company" ? "company" : "business", " incorporation and compliance verification."), /* @__PURE__ */ React50.createElement("p", { className: "mb-3 leading-relaxed" }, "You confirm that all information provided is accurate and authentic. Any falsification of identity or corporate data may result in immediate rejection, and you may be held liable under applicable laws and regulations."), /* @__PURE__ */ React50.createElement("p", { className: "mb-3 leading-relaxed" }, "This service operates strictly as a digital intermediary connecting you with official registries. The final approval of the ", type === "company" ? "company" : "business", " name and registration rests solely with the regulatory authorities. We are not liable for rejections arising from pre existing conflicts, non compliance, or regulatory policy changes not flagged during the AI pre check stages."), /* @__PURE__ */ React50.createElement("p", { className: "leading-relaxed" }, "Proceeding to generate the invoice confirms your acceptance of these terms and initiates the formal filing process.")), /* @__PURE__ */ React50.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ React50.createElement("input", { type: "checkbox", checked: iAgree, onChange: (e) => setIAgree(e.target.checked), disabled: isReadOnly, className: "mt-0.5 w-4 h-4 accent-black rounded cursor-pointer" }), /* @__PURE__ */ React50.createElement("span", { className: "text-[13px] text-neutral-500 group-hover:text-neutral-600 transition-colors" }, "I have read, understood, and agree to the terms of data transfer and processing.")), /* @__PURE__ */ React50.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ React50.createElement("button", { onClick: onCancelOrClose, disabled: isSubmitting, className: "text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full px-8 py-2.5 border border-neutral-100 transition-colors outline-none w-full sm:w-auto" }, "Cancel"), /* @__PURE__ */ React50.createElement("button", { onClick: () => setMacroStep(0), disabled: isSubmitting || isReadOnly, className: " text-[11px] tracking-widest text-neutral-500 hover:text-black hover:bg-neutral-50 rounded-full px-8 py-2.5 border border-neutral-100transition-colors outline-none w-full sm:w-auto" }, "Edit Application"), /* @__PURE__ */ React50.createElement(ThreeDActionButton, { onClick: handleFinalSubmit, disabled: isSubmitting || !iAgree || isReadOnly, isLoading: isSubmitting, className: "min-w-40 w-full sm:w-auto" }, "Submit")))), activeModal.isOpen && /* @__PURE__ */ React50.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React50.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ React50.createElement("div", { className: "relative w-80 bg-white shadow-2xl rounded-3xl flex flex-col overflow-hidden animate-in zoom-in-95 duration-200 max-h-[80vh]" }, /* @__PURE__ */ React50.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ React50.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ React50.createElement("div", { className: "p-4 flex flex-col gap-2 overflow-y-auto custom-scrollbar" }, (activeModal.type === "state" ? NIGERIAN_STATES : activeModal.type === "role" ? MEMBER_ROLES : NATIONALITIES).map((opt) => {
|
|
4538
4779
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
4539
|
-
return /* @__PURE__ */
|
|
4780
|
+
return /* @__PURE__ */ React50.createElement("button", { key: opt, onClick: () => {
|
|
4540
4781
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
4541
4782
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
4542
4783
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
4543
4784
|
}, className: `text-left px-4 py-3 rounded-full text-[13px] transition-colors outline-none ${isSelected ? "bg-neutral-100 text-black" : "text-neutral-500 hover:bg-neutral-50 hover:text-black"}` }, opt);
|
|
4544
|
-
})), /* @__PURE__ */
|
|
4785
|
+
})), /* @__PURE__ */ React50.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ React50.createElement("button", { onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }), className: "w-full py-4 text-[13px] text-neutral-500 hover:bg-neutral-50 transition-colors outline-none" }, "Close")))));
|
|
4545
4786
|
};
|
|
4546
4787
|
|
|
4547
4788
|
// src/components/UniversalDeveloperSettings.tsx
|
|
4548
|
-
import
|
|
4549
|
-
import { toast as
|
|
4550
|
-
import { HugeiconsIcon as
|
|
4551
|
-
import { Loading03Icon as
|
|
4552
|
-
var ButtonSpinner5 = () => /* @__PURE__ */
|
|
4553
|
-
var
|
|
4789
|
+
import React51, { useState as useState31, useEffect as useEffect21 } from "react";
|
|
4790
|
+
import { toast as toast10 } from "react-hot-toast";
|
|
4791
|
+
import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
|
|
4792
|
+
import { Loading03Icon as Loading03Icon18, CircleLock02Icon as CircleLock02Icon5 } from "@hugeicons/core-free-icons";
|
|
4793
|
+
var ButtonSpinner5 = () => /* @__PURE__ */ React51.createElement(HugeiconsIcon35, { icon: Loading03Icon18, size: 16, className: "animate-spin text-current" });
|
|
4794
|
+
var PageSpinner7 = () => /* @__PURE__ */ React51.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon35, { icon: Loading03Icon18, size: 32, className: "animate-spin text-black" }));
|
|
4554
4795
|
var UniversalDeveloperSettings = ({
|
|
4555
4796
|
initialPublicKey,
|
|
4556
4797
|
initialWebhookUrl,
|
|
@@ -4559,12 +4800,12 @@ var UniversalDeveloperSettings = ({
|
|
|
4559
4800
|
onGenerateKeys,
|
|
4560
4801
|
onSaveWebhook
|
|
4561
4802
|
}) => {
|
|
4562
|
-
const [publicKey, setPublicKey] =
|
|
4563
|
-
const [webhookUrl, setWebhookUrl] =
|
|
4564
|
-
const [isGenerating, setIsGenerating] =
|
|
4565
|
-
const [isSavingWebhook, setIsSavingWebhook] =
|
|
4566
|
-
const [isRollModalOpen, setIsRollModalOpen] =
|
|
4567
|
-
|
|
4803
|
+
const [publicKey, setPublicKey] = useState31(initialPublicKey);
|
|
4804
|
+
const [webhookUrl, setWebhookUrl] = useState31(initialWebhookUrl);
|
|
4805
|
+
const [isGenerating, setIsGenerating] = useState31(false);
|
|
4806
|
+
const [isSavingWebhook, setIsSavingWebhook] = useState31(false);
|
|
4807
|
+
const [isRollModalOpen, setIsRollModalOpen] = useState31(false);
|
|
4808
|
+
useEffect21(() => {
|
|
4568
4809
|
setPublicKey(initialPublicKey || "");
|
|
4569
4810
|
setWebhookUrl(initialWebhookUrl || "");
|
|
4570
4811
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -4593,13 +4834,13 @@ SECRET_KEY="${secKey}"
|
|
|
4593
4834
|
if (res.success && res.data) {
|
|
4594
4835
|
setPublicKey(res.data.publicKey);
|
|
4595
4836
|
downloadEnvironmentFile(res.data.publicKey, res.data.secretKey);
|
|
4596
|
-
|
|
4837
|
+
toast10.success("Keys generated. Check your downloads folder.");
|
|
4597
4838
|
setIsRollModalOpen(false);
|
|
4598
4839
|
} else {
|
|
4599
|
-
|
|
4840
|
+
toast10.error(res.error || "Uh oh! Something went wrong.");
|
|
4600
4841
|
}
|
|
4601
4842
|
} catch (error) {
|
|
4602
|
-
|
|
4843
|
+
toast10.error("Uh oh! Something went wrong.");
|
|
4603
4844
|
} finally {
|
|
4604
4845
|
setIsGenerating(false);
|
|
4605
4846
|
}
|
|
@@ -4612,19 +4853,19 @@ SECRET_KEY="${secKey}"
|
|
|
4612
4853
|
const res = await onSaveWebhook(webhookUrl);
|
|
4613
4854
|
if (res.success && res.data) {
|
|
4614
4855
|
setWebhookUrl(res.data.webhookUrl || "");
|
|
4615
|
-
|
|
4856
|
+
toast10.success("Webhook URL updated.");
|
|
4616
4857
|
} else {
|
|
4617
|
-
|
|
4858
|
+
toast10.error(res.error || "Uh oh! Something went wrong.");
|
|
4618
4859
|
}
|
|
4619
4860
|
} catch (error) {
|
|
4620
|
-
|
|
4861
|
+
toast10.error("Uh oh! Something went wrong.");
|
|
4621
4862
|
} finally {
|
|
4622
4863
|
setIsSavingWebhook(false);
|
|
4623
4864
|
}
|
|
4624
4865
|
};
|
|
4625
4866
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
4626
4867
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
4627
|
-
return /* @__PURE__ */
|
|
4868
|
+
return /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col max-w-5xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React51.createElement(ManagedToaster, null), /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React51.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React51.createElement("h1", { className: " text-xl text-black mb-1 truncate tracking-tight" }, "Developer Settings"), /* @__PURE__ */ React51.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ React51.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center shrink-0" }, /* @__PURE__ */ React51.createElement(HugeiconsIcon35, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), isLoading ? /* @__PURE__ */ React51.createElement(PageSpinner7, null) : /* @__PURE__ */ React51.createElement("div", { className: "w-full max-w-5xl flex flex-col gap-12" }, /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React51.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React51.createElement(
|
|
4628
4869
|
TextInput,
|
|
4629
4870
|
{
|
|
4630
4871
|
label: "Public Key",
|
|
@@ -4633,7 +4874,7 @@ SECRET_KEY="${secKey}"
|
|
|
4633
4874
|
},
|
|
4634
4875
|
disabled: true
|
|
4635
4876
|
}
|
|
4636
|
-
), /* @__PURE__ */
|
|
4877
|
+
), /* @__PURE__ */ React51.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "Your public key is used to identify your application. Your secret key will only be shown once upon generation.")), /* @__PURE__ */ React51.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React51.createElement(
|
|
4637
4878
|
ThreeDActionButton,
|
|
4638
4879
|
{
|
|
4639
4880
|
onClick: () => {
|
|
@@ -4645,7 +4886,7 @@ SECRET_KEY="${secKey}"
|
|
|
4645
4886
|
className: "w-fit"
|
|
4646
4887
|
},
|
|
4647
4888
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
4648
|
-
))), /* @__PURE__ */
|
|
4889
|
+
))), /* @__PURE__ */ React51.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ React51.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React51.createElement(
|
|
4649
4890
|
TextInput,
|
|
4650
4891
|
{
|
|
4651
4892
|
label: "Webhook URL",
|
|
@@ -4655,7 +4896,7 @@ SECRET_KEY="${secKey}"
|
|
|
4655
4896
|
placeholder: "https://your-domain.com/webhook",
|
|
4656
4897
|
type: "url"
|
|
4657
4898
|
}
|
|
4658
|
-
), /* @__PURE__ */
|
|
4899
|
+
), /* @__PURE__ */ React51.createElement("p", { className: "text-[11px] text-neutral-400 mt-1 leading-snug" }, "We will send secure POST requests to this endpoint when significant events occur. Must use HTTPS.")), /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ React51.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ React51.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React51.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate " }, "Webhook Status"), /* @__PURE__ */ React51.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ React51.createElement("div", { className: "flex flex-col-reverse sm:flex-row items-center gap-3 sm:gap-4 w-full sm:w-auto shrink-0" }, hasWebhookChanges && !isSavingWebhook && !isReadOnly && /* @__PURE__ */ React51.createElement(
|
|
4659
4900
|
"button",
|
|
4660
4901
|
{
|
|
4661
4902
|
type: "button",
|
|
@@ -4663,7 +4904,7 @@ SECRET_KEY="${secKey}"
|
|
|
4663
4904
|
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors w-full sm:w-auto py-2 sm:py-0 outline-none"
|
|
4664
4905
|
},
|
|
4665
4906
|
"Cancel"
|
|
4666
|
-
), /* @__PURE__ */
|
|
4907
|
+
), /* @__PURE__ */ React51.createElement(
|
|
4667
4908
|
ThreeDActionButton,
|
|
4668
4909
|
{
|
|
4669
4910
|
type: "submit",
|
|
@@ -4672,7 +4913,7 @@ SECRET_KEY="${secKey}"
|
|
|
4672
4913
|
className: "min-w-32 w-full sm:w-auto"
|
|
4673
4914
|
},
|
|
4674
4915
|
"Save Webhook"
|
|
4675
|
-
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */
|
|
4916
|
+
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */ React51.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React51.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isGenerating && setIsRollModalOpen(false) }), /* @__PURE__ */ React51.createElement("div", { className: "relative w-72 bg-white shadow-2xl rounded-2xl flex flex-col items-center overflow-hidden animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React51.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React51.createElement("h3", { className: " text-[17px] text-black tracking-tight mb-1" }, "Roll API Keys"), /* @__PURE__ */ React51.createElement("p", { className: "text-[11px] text-neutral-500 leading-snug mt-2" }, "Are you sure you want to roll your keys? This will permanently invalidate your current secret key and active MCP tokens.")), /* @__PURE__ */ React51.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React51.createElement(
|
|
4676
4917
|
"button",
|
|
4677
4918
|
{
|
|
4678
4919
|
onClick: () => setIsRollModalOpen(false),
|
|
@@ -4680,30 +4921,30 @@ SECRET_KEY="${secKey}"
|
|
|
4680
4921
|
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
4681
4922
|
},
|
|
4682
4923
|
"Cancel"
|
|
4683
|
-
), /* @__PURE__ */
|
|
4924
|
+
), /* @__PURE__ */ React51.createElement(
|
|
4684
4925
|
"button",
|
|
4685
4926
|
{
|
|
4686
4927
|
onClick: handleGenerateKeys,
|
|
4687
4928
|
disabled: isGenerating,
|
|
4688
4929
|
className: "flex-1 py-3 text-[13px] text-red-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 flex justify-center items-center outline-none"
|
|
4689
4930
|
},
|
|
4690
|
-
isGenerating ? /* @__PURE__ */
|
|
4931
|
+
isGenerating ? /* @__PURE__ */ React51.createElement(ButtonSpinner5, null) : "Roll Keys"
|
|
4691
4932
|
)))));
|
|
4692
4933
|
};
|
|
4693
4934
|
|
|
4694
4935
|
// src/components/UniversalAppLibrary.tsx
|
|
4695
|
-
import
|
|
4696
|
-
import { HugeiconsIcon as
|
|
4697
|
-
import { Loading03Icon as
|
|
4936
|
+
import React52, { useState as useState32 } from "react";
|
|
4937
|
+
import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
|
|
4938
|
+
import { Loading03Icon as Loading03Icon19 } from "@hugeicons/core-free-icons";
|
|
4698
4939
|
var AppCard = ({ app }) => {
|
|
4699
|
-
const [isLoading, setIsLoading] =
|
|
4700
|
-
return /* @__PURE__ */
|
|
4940
|
+
const [isLoading, setIsLoading] = useState32(true);
|
|
4941
|
+
return /* @__PURE__ */ React52.createElement(
|
|
4701
4942
|
"button",
|
|
4702
4943
|
{
|
|
4703
4944
|
onClick: app.onClick,
|
|
4704
4945
|
className: "flex flex-col gap-3 group cursor-pointer w-25 shrink-0 text-left outline-none"
|
|
4705
4946
|
},
|
|
4706
|
-
/* @__PURE__ */
|
|
4947
|
+
/* @__PURE__ */ React52.createElement("div", { className: "relative w-full aspect-square rounded-2xl bg-white overflow-hidden transition-all duration-300 flex items-center justify-center" }, isLoading && /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon36, { icon: Loading03Icon19, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React52.createElement(
|
|
4707
4948
|
"img",
|
|
4708
4949
|
{
|
|
4709
4950
|
src: app.logoSrc,
|
|
@@ -4713,7 +4954,7 @@ var AppCard = ({ app }) => {
|
|
|
4713
4954
|
className: `w-full h-full object-cover transition-all duration-700 ease-out z-20 ${isLoading ? "opacity-0 scale-95 blur-md" : "opacity-100 scale-100 blur-0"}`
|
|
4714
4955
|
}
|
|
4715
4956
|
)),
|
|
4716
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ React52.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ React52.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
4717
4958
|
);
|
|
4718
4959
|
};
|
|
4719
4960
|
var UniversalAppLibrary = ({
|
|
@@ -4721,18 +4962,18 @@ var UniversalAppLibrary = ({
|
|
|
4721
4962
|
headline,
|
|
4722
4963
|
categories
|
|
4723
4964
|
}) => {
|
|
4724
|
-
return /* @__PURE__ */
|
|
4965
|
+
return /* @__PURE__ */ React52.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ React52.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ React52.createElement("div", { className: "max-w-6xl w-full" }, (tagline || headline) && /* @__PURE__ */ React52.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ React52.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), headline && /* @__PURE__ */ React52.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, headline))), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-14" }, categories.map((category) => /* @__PURE__ */ React52.createElement("div", { key: category.id, className: "flex flex-col" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-end justify-between mb-5 px-1" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-lg text-black tracking-tight " }, category.title), category.onSeeMore && /* @__PURE__ */ React52.createElement(
|
|
4725
4966
|
"button",
|
|
4726
4967
|
{
|
|
4727
4968
|
onClick: category.onSeeMore,
|
|
4728
4969
|
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors outline-none shrink-0 ml-4 pb-0.5"
|
|
4729
4970
|
},
|
|
4730
4971
|
category.seeMoreLabel || "See More"
|
|
4731
|
-
)), /* @__PURE__ */
|
|
4972
|
+
)), /* @__PURE__ */ React52.createElement("div", { className: "flex gap-4 sm:gap-6 overflow-x-auto pb-6 pt-2 -mx-4 px-4 sm:mx-0 sm:px-1 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] scrollbar-none" }, category.apps.map((app) => /* @__PURE__ */ React52.createElement(AppCard, { key: app.id, app }))), /* @__PURE__ */ React52.createElement("div", { className: "w-full h-px mt-2 last-of-type:hidden" })))))));
|
|
4732
4973
|
};
|
|
4733
4974
|
|
|
4734
4975
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
4735
|
-
import
|
|
4976
|
+
import React53, { useState as useState33, useEffect as useEffect22, useRef as useRef14 } from "react";
|
|
4736
4977
|
import Image11 from "next/image";
|
|
4737
4978
|
var MedicalFeatureStatsBlock = ({
|
|
4738
4979
|
bottomHeadline,
|
|
@@ -4741,9 +4982,9 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4741
4982
|
trustText,
|
|
4742
4983
|
stats
|
|
4743
4984
|
}) => {
|
|
4744
|
-
const [isAnimating, setIsAnimating] =
|
|
4745
|
-
const titleRef =
|
|
4746
|
-
|
|
4985
|
+
const [isAnimating, setIsAnimating] = useState33(false);
|
|
4986
|
+
const titleRef = useRef14(null);
|
|
4987
|
+
useEffect22(() => {
|
|
4747
4988
|
const observer = new IntersectionObserver(
|
|
4748
4989
|
([entry]) => {
|
|
4749
4990
|
if (entry.isIntersecting) {
|
|
@@ -4761,7 +5002,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4761
5002
|
}
|
|
4762
5003
|
return () => observer.disconnect();
|
|
4763
5004
|
}, []);
|
|
4764
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ React53.createElement("section", { className: "py-24 w-full flex justify-center relative z-10" }, /* @__PURE__ */ React53.createElement("div", { className: "max-w-6xl w-full flex flex-col px-4 md:px-8" }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-10 mb-12" }, /* @__PURE__ */ React53.createElement("div", { className: "max-w-xl" }, /* @__PURE__ */ React53.createElement(
|
|
4765
5006
|
"h2",
|
|
4766
5007
|
{
|
|
4767
5008
|
ref: titleRef,
|
|
@@ -4769,7 +5010,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4769
5010
|
style: isAnimating ? { animationIterationCount: 1 } : {}
|
|
4770
5011
|
},
|
|
4771
5012
|
bottomHeadline
|
|
4772
|
-
), /* @__PURE__ */
|
|
5013
|
+
), /* @__PURE__ */ React53.createElement("p", { className: "text-[14px] leading-relaxed text-neutral-500" }, bottomDescription)), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-4 shrink-0" }, /* @__PURE__ */ React53.createElement("div", { className: "flex -space-x-3" }, avatars.map((src, i) => /* @__PURE__ */ React53.createElement("div", { key: i, className: "relative w-12 h-12 rounded-full border-[3px] border-white overflow-hidden bg-neutral-100 z-1 hover:z-10 transition-all" }, /* @__PURE__ */ React53.createElement(
|
|
4773
5014
|
Image11,
|
|
4774
5015
|
{
|
|
4775
5016
|
src,
|
|
@@ -4778,17 +5019,17 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4778
5019
|
sizes: "48px",
|
|
4779
5020
|
className: "object-cover"
|
|
4780
5021
|
}
|
|
4781
|
-
)))), /* @__PURE__ */
|
|
5022
|
+
)))), /* @__PURE__ */ React53.createElement("p", { className: "text-[11px] text-neutral-800 leading-[1.4] max-w-55" }, trustText))), /* @__PURE__ */ React53.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, stats.map((stat, idx) => /* @__PURE__ */ React53.createElement("div", { key: idx, className: "bg-white rounded-4xl p-8 md:p-10 flex flex-col h-70" }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center p-0.5 mb-6" }, /* @__PURE__ */ React53.createElement("span", { className: "text-[14px] text-neutral-500 tracking-wide" }, stat.label)), /* @__PURE__ */ React53.createElement("div", { className: "text-6xl gradient-text md:text-[80px] font-light tracking-tighter text-black mt-auto leading-none" }, stat.value))))));
|
|
4782
5023
|
};
|
|
4783
5024
|
|
|
4784
5025
|
// src/components/ConsultantShowcase.tsx
|
|
4785
|
-
import
|
|
5026
|
+
import React54, { useState as useState34 } from "react";
|
|
4786
5027
|
import Image12 from "next/image";
|
|
4787
|
-
import { HugeiconsIcon as
|
|
4788
|
-
import { Loading03Icon as
|
|
5028
|
+
import { HugeiconsIcon as HugeiconsIcon37 } from "@hugeicons/react";
|
|
5029
|
+
import { Loading03Icon as Loading03Icon20 } from "@hugeicons/core-free-icons";
|
|
4789
5030
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
4790
|
-
const [isLoading, setIsLoading] =
|
|
4791
|
-
return /* @__PURE__ */
|
|
5031
|
+
const [isLoading, setIsLoading] = useState34(true);
|
|
5032
|
+
return /* @__PURE__ */ React54.createElement("div", { className: `absolute inset-0 bg-neutral-800 ${className}` }, isLoading && /* @__PURE__ */ React54.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon37, { icon: Loading03Icon20, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ React54.createElement(
|
|
4792
5033
|
Image12,
|
|
4793
5034
|
{
|
|
4794
5035
|
src,
|
|
@@ -4807,9 +5048,9 @@ var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
|
4807
5048
|
var ConsultantShowcase = ({
|
|
4808
5049
|
profiles
|
|
4809
5050
|
}) => {
|
|
4810
|
-
const [currentIndex, setCurrentIndex] =
|
|
4811
|
-
const [touchStart, setTouchStart] =
|
|
4812
|
-
const [touchEnd, setTouchEnd] =
|
|
5051
|
+
const [currentIndex, setCurrentIndex] = useState34(0);
|
|
5052
|
+
const [touchStart, setTouchStart] = useState34(null);
|
|
5053
|
+
const [touchEnd, setTouchEnd] = useState34(null);
|
|
4813
5054
|
const nextSlide = () => {
|
|
4814
5055
|
setCurrentIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
4815
5056
|
};
|
|
@@ -4834,7 +5075,7 @@ var ConsultantShowcase = ({
|
|
|
4834
5075
|
}
|
|
4835
5076
|
};
|
|
4836
5077
|
if (!profiles || profiles.length === 0) return null;
|
|
4837
|
-
return /* @__PURE__ */
|
|
5078
|
+
return /* @__PURE__ */ React54.createElement("section", { className: "py-24 w-full flex justify-center px-4 md:px-8 z-10 relative" }, /* @__PURE__ */ React54.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ React54.createElement(
|
|
4838
5079
|
"div",
|
|
4839
5080
|
{
|
|
4840
5081
|
className: "relative w-full h-100 md:h-112.5 rounded-4xl overflow-hidden bg-neutral-900 group select-none",
|
|
@@ -4844,13 +5085,13 @@ var ConsultantShowcase = ({
|
|
|
4844
5085
|
},
|
|
4845
5086
|
profiles.map((profile, idx) => {
|
|
4846
5087
|
const isActive = idx === currentIndex;
|
|
4847
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ React54.createElement(
|
|
4848
5089
|
"div",
|
|
4849
5090
|
{
|
|
4850
5091
|
key: profile.id,
|
|
4851
5092
|
className: `absolute inset-0 transition-opacity duration-700 ease-in-out ${isActive ? "opacity-100 z-10" : "opacity-0 z-0 pointer-events-none"}`
|
|
4852
5093
|
},
|
|
4853
|
-
/* @__PURE__ */
|
|
5094
|
+
/* @__PURE__ */ React54.createElement(
|
|
4854
5095
|
ImageWithLoader,
|
|
4855
5096
|
{
|
|
4856
5097
|
src: profile.imageSrc,
|
|
@@ -4858,14 +5099,14 @@ var ConsultantShowcase = ({
|
|
|
4858
5099
|
priority: idx === 0
|
|
4859
5100
|
}
|
|
4860
5101
|
),
|
|
4861
|
-
/* @__PURE__ */
|
|
4862
|
-
/* @__PURE__ */
|
|
4863
|
-
/* @__PURE__ */
|
|
5102
|
+
/* @__PURE__ */ React54.createElement("div", { className: "absolute inset-0 bg-black/20 z-10 pointer-events-none" }),
|
|
5103
|
+
/* @__PURE__ */ React54.createElement("div", { className: "absolute top-0 left-0 w-full h-[60%] bg-linear-to-b from-black/80 via-black/30 to-transparent z-20 pointer-events-none" }),
|
|
5104
|
+
/* @__PURE__ */ React54.createElement("div", { className: `absolute top-8 left-8 md:top-12 md:left-12 z-30 text-white max-w-lg transition-transform duration-700 ease-out ${isActive ? "translate-y-0" : "-translate-y-4"}` }, /* @__PURE__ */ React54.createElement("h2", { className: "text-[29px] tracking-tight mb-2 leading-none" }, profile.name), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React54.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide" }, profile.role), profile.description && /* @__PURE__ */ React54.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide mt-1" }, profile.description)))
|
|
4864
5105
|
);
|
|
4865
5106
|
}),
|
|
4866
|
-
/* @__PURE__ */
|
|
4867
|
-
/* @__PURE__ */
|
|
4868
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ React54.createElement("div", { className: "absolute top-0 left-0 w-[20%] h-full z-40 cursor-w-resize hidden md:block", onClick: prevSlide, "aria-label": "Previous image" }),
|
|
5108
|
+
/* @__PURE__ */ React54.createElement("div", { className: "absolute top-0 right-0 w-[20%] h-full z-40 cursor-e-resize hidden md:block", onClick: nextSlide, "aria-label": "Next image" }),
|
|
5109
|
+
/* @__PURE__ */ React54.createElement("div", { className: "absolute bottom-6 md:bottom-8 left-0 w-full px-4 z-30 flex justify-center items-center gap-2" }, profiles.map((_, idx) => /* @__PURE__ */ React54.createElement(
|
|
4869
5110
|
"button",
|
|
4870
5111
|
{
|
|
4871
5112
|
key: idx,
|
|
@@ -4878,10 +5119,10 @@ var ConsultantShowcase = ({
|
|
|
4878
5119
|
};
|
|
4879
5120
|
|
|
4880
5121
|
// src/components/ContentGridBlock.tsx
|
|
4881
|
-
import
|
|
5122
|
+
import React55, { useState as useState35 } from "react";
|
|
4882
5123
|
import Image13 from "next/image";
|
|
4883
|
-
import { HugeiconsIcon as
|
|
4884
|
-
import { Loading03Icon as
|
|
5124
|
+
import { HugeiconsIcon as HugeiconsIcon38 } from "@hugeicons/react";
|
|
5125
|
+
import { Loading03Icon as Loading03Icon21 } from "@hugeicons/core-free-icons";
|
|
4885
5126
|
var ContentGridBlock = ({
|
|
4886
5127
|
header,
|
|
4887
5128
|
leftCard,
|
|
@@ -4889,33 +5130,33 @@ var ContentGridBlock = ({
|
|
|
4889
5130
|
middleBottomCard,
|
|
4890
5131
|
rightCards
|
|
4891
5132
|
}) => {
|
|
4892
|
-
return /* @__PURE__ */
|
|
5133
|
+
return /* @__PURE__ */ React55.createElement("section", { className: " w-full flex justify-center z-10 relative" }, /* @__PURE__ */ React55.createElement("div", { className: "max-w-300 w-full px-4 md:px-8 flex flex-col gap-12" }, /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-6 w-full" }, /* @__PURE__ */ React55.createElement("h2", { className: "text-3xl tracking-tight text-black leading-[1.15] max-w-lg" }, header.titlePrefix, " ", /* @__PURE__ */ React55.createElement("span", { className: "gradient-text" }, header.highlightText))), /* @__PURE__ */ React55.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col justify-end" }, /* @__PURE__ */ React55.createElement("div", { className: "bg-black rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ React55.createElement("p", { className: "text-[17px] text-white leading-snug mb-4" }, leftCard.mainText), leftCard.tag && /* @__PURE__ */ React55.createElement("span", { className: "mb-auto text-[11px] text-neutral-200 tracking-widest" }, leftCard.tag), /* @__PURE__ */ React55.createElement("div", { className: "flex items-center justify-between mt-8" }, /* @__PURE__ */ React55.createElement("div", null, /* @__PURE__ */ React55.createElement("h4", { className: "text-[15px] text-white" }, leftCard.title), /* @__PURE__ */ React55.createElement("p", { className: "text-[13px] text-neutral-300" }, leftCard.subtitle)), /* @__PURE__ */ React55.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ React55.createElement(Image13, { src: leftCard.thumbnailSrc, alt: leftCard.title, fill: true, className: "object-cover" }))))), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React55.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col relative h-75" }, /* @__PURE__ */ React55.createElement("div", { className: "absolute top-6 right-6 flex flex-col items-end gap-1" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[11px] text-neutral-400 tracking-wide" }, middleTopCard.topRightLabel), /* @__PURE__ */ React55.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React55.createElement("div", { className: "flex -space-x-2" }, middleTopCard.topRightAvatars.map((src, i) => /* @__PURE__ */ React55.createElement("div", { key: i, className: "w-7 h-7 rounded-full border-2 border-white overflow-hidden relative z-10" }, /* @__PURE__ */ React55.createElement(Image13, { src, alt: "Avatar", fill: true, className: "object-cover", sizes: "28px" })))), /* @__PURE__ */ React55.createElement("span", { className: "text-sm text-neutral-500" }, middleTopCard.topRightCount))), /* @__PURE__ */ React55.createElement("div", { className: "grow flex flex-col justify-center items-center py-6" }, /* @__PURE__ */ React55.createElement("div", { className: "px-5 py-2 rounded-full bg-neutral-50/50 border border-neutral-100 text-[13px] text-neutral-600" }, middleTopCard.badgePrefix, " ", /* @__PURE__ */ React55.createElement("span", { className: " text-black" }, middleTopCard.badgeHighlight), middleTopCard.badgeSuffix)), /* @__PURE__ */ React55.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ React55.createElement("p", { className: "text-[11px] text-neutral-400 tracking-wide mb-1" }, middleTopCard.title), /* @__PURE__ */ React55.createElement("p", { className: "text-[14px] text-black leading-snug pr-4" }, middleTopCard.description))), /* @__PURE__ */ React55.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ React55.createElement("div", { className: "flex justify-between items-start mb-6" }, /* @__PURE__ */ React55.createElement("div", null, /* @__PURE__ */ React55.createElement("h4", { className: "text-[15px] text-black leading-tight" }, middleBottomCard.title), /* @__PURE__ */ React55.createElement("p", { className: "text-[13px] text-neutral-400" }, middleBottomCard.subtitle)), /* @__PURE__ */ React55.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ React55.createElement(Image13, { src: middleBottomCard.thumbnailSrc, alt: middleBottomCard.title, fill: true, className: "object-cover" }))), /* @__PURE__ */ React55.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ React55.createElement("p", { className: "text-[16px] text-black leading-snug mb-4" }, middleBottomCard.mainText), middleBottomCard.tag && /* @__PURE__ */ React55.createElement("span", { className: "text-[11px] text-neutral-400 tracking-widest" }, middleBottomCard.tag)))), /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col gap-6" }, rightCards.slice(0, 2).map((card, idx) => /* @__PURE__ */ React55.createElement("div", { key: idx, className: "relative w-full h-80 bg-[#2027d7] rounded-3xl overflow-hidden group" }, /* @__PURE__ */ React55.createElement("div", { className: "absolute inset-0 z-20 pointer-events-none" }), /* @__PURE__ */ React55.createElement("div", { className: "absolute inset-0 z-30 p-6 flex flex-col justify-end text-white" }, /* @__PURE__ */ React55.createElement("p", { className: "text-[14px] leading-snug mb-3 pr-2 text-white/90" }, card.mainText), card.tag && /* @__PURE__ */ React55.createElement("span", { className: "mb-4 text-[11px] text-white/50 tracking-widest" }, card.tag), /* @__PURE__ */ React55.createElement("div", { className: "pt-3" }, /* @__PURE__ */ React55.createElement("h4", { className: "text-[15px] tracking-wide" }, card.title), /* @__PURE__ */ React55.createElement("p", { className: "text-[13px] text-white/60" }, card.subtitle)))))))));
|
|
4893
5134
|
};
|
|
4894
5135
|
|
|
4895
5136
|
// src/components/UniversalAppDetails.tsx
|
|
4896
|
-
import
|
|
4897
|
-
import { HugeiconsIcon as
|
|
5137
|
+
import React56, { useState as useState36 } from "react";
|
|
5138
|
+
import { HugeiconsIcon as HugeiconsIcon39 } from "@hugeicons/react";
|
|
4898
5139
|
import {
|
|
4899
5140
|
AppleIcon,
|
|
4900
5141
|
AndroidIcon,
|
|
4901
5142
|
Download01Icon as Download01Icon2,
|
|
4902
5143
|
Bookmark02Icon,
|
|
4903
|
-
Loading03Icon as
|
|
4904
|
-
ArrowDown01Icon as
|
|
5144
|
+
Loading03Icon as Loading03Icon22,
|
|
5145
|
+
ArrowDown01Icon as ArrowDown01Icon6,
|
|
4905
5146
|
Cancel01Icon as Cancel01Icon5,
|
|
4906
|
-
ArrowLeft01Icon as
|
|
4907
|
-
ArrowRight01Icon as
|
|
5147
|
+
ArrowLeft01Icon as ArrowLeft01Icon12,
|
|
5148
|
+
ArrowRight01Icon as ArrowRight01Icon11
|
|
4908
5149
|
} from "@hugeicons/core-free-icons";
|
|
4909
5150
|
var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
4910
|
-
const [isLoading, setIsLoading] =
|
|
4911
|
-
return /* @__PURE__ */
|
|
5151
|
+
const [isLoading, setIsLoading] = useState36(true);
|
|
5152
|
+
return /* @__PURE__ */ React56.createElement(
|
|
4912
5153
|
"button",
|
|
4913
5154
|
{
|
|
4914
5155
|
onClick,
|
|
4915
5156
|
className: "relative w-28 sm:w-32 aspect-9/19 shrink-0 rounded-2xl overflow-hidden bg-neutral-100 border border-neutral-200/50 outline-none hover:opacity-90 transition-opacity"
|
|
4916
5157
|
},
|
|
4917
|
-
isLoading && /* @__PURE__ */
|
|
4918
|
-
/* @__PURE__ */
|
|
5158
|
+
isLoading && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: Loading03Icon22, size: 24, className: "animate-spin text-neutral-400" })),
|
|
5159
|
+
/* @__PURE__ */ React56.createElement(
|
|
4919
5160
|
"img",
|
|
4920
5161
|
{
|
|
4921
5162
|
src,
|
|
@@ -4928,8 +5169,8 @@ var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
|
4928
5169
|
);
|
|
4929
5170
|
};
|
|
4930
5171
|
var LightboxImage = ({ src }) => {
|
|
4931
|
-
const [isLoading, setIsLoading] =
|
|
4932
|
-
return /* @__PURE__ */
|
|
5172
|
+
const [isLoading, setIsLoading] = useState36(true);
|
|
5173
|
+
return /* @__PURE__ */ React56.createElement("div", { className: "relative w-full h-full flex items-center justify-center p-4" }, isLoading && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: Loading03Icon22, size: 32, className: "animate-spin text-white" })), /* @__PURE__ */ React56.createElement(
|
|
4933
5174
|
"img",
|
|
4934
5175
|
{
|
|
4935
5176
|
src,
|
|
@@ -4940,9 +5181,9 @@ var LightboxImage = ({ src }) => {
|
|
|
4940
5181
|
));
|
|
4941
5182
|
};
|
|
4942
5183
|
var UniversalAppDetails = ({ app, onBack }) => {
|
|
4943
|
-
const [isLogoLoading, setIsLogoLoading] =
|
|
4944
|
-
const [isDescExpanded, setIsDescExpanded] =
|
|
4945
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
5184
|
+
const [isLogoLoading, setIsLogoLoading] = useState36(true);
|
|
5185
|
+
const [isDescExpanded, setIsDescExpanded] = useState36(false);
|
|
5186
|
+
const [lightboxIndex, setLightboxIndex] = useState36(null);
|
|
4946
5187
|
const MAX_DESC_LENGTH = 150;
|
|
4947
5188
|
const isDescLong = app.description.length > MAX_DESC_LENGTH;
|
|
4948
5189
|
const displayDesc = isDescExpanded || !isDescLong ? app.description : `${app.description.substring(0, MAX_DESC_LENGTH)}...`;
|
|
@@ -4956,7 +5197,7 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4956
5197
|
setLightboxIndex(lightboxIndex === app.screenshots.length - 1 ? 0 : lightboxIndex + 1);
|
|
4957
5198
|
}
|
|
4958
5199
|
};
|
|
4959
|
-
return /* @__PURE__ */
|
|
5200
|
+
return /* @__PURE__ */ React56.createElement("div", { className: "w-full max-w-3xl mx-auto pt-10 pb-20 px-6 min-h-screen flex flex-col items-center" }, /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col sm:flex-row items-start gap-4 w-full mb-10 text-left" }, /* @__PURE__ */ React56.createElement("div", { className: "relative w-20 h-20 sm:w-20 sm:h-20 md:w-24 md:h-24 lg:w-28 lg:h-28 shrink-0 rounded-2xl overflow-hidden flex items-center justify-center border border-neutral-100/50 bg-neutral-50" }, isLogoLoading && /* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100 animate-pulse" }), /* @__PURE__ */ React56.createElement(
|
|
4960
5201
|
"img",
|
|
4961
5202
|
{
|
|
4962
5203
|
src: app.logoSrc,
|
|
@@ -4964,15 +5205,15 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4964
5205
|
onLoad: () => setIsLogoLoading(false),
|
|
4965
5206
|
className: `w-full h-full object-cover transition-opacity duration-300 z-20 ${isLogoLoading ? "opacity-0" : "opacity-100"}`
|
|
4966
5207
|
}
|
|
4967
|
-
)), /* @__PURE__ */
|
|
5208
|
+
)), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col justify-center pt-1 min-w-0" }, /* @__PURE__ */ React56.createElement("h1", { className: "text-xl text-black leading-tight mb-1 " }, /* @__PURE__ */ React56.createElement("span", { className: "block truncate" }, app.name)), /* @__PURE__ */ React56.createElement("span", { className: "text-xs mt-1 text-neutral-400 truncate max-w-full" }, app.tagline), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-wrap items-center mt-4 gap-8 w-full" }, /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React56.createElement("div", { className: "flex items-center gap-1.5 h-6 text-neutral-800" }, app.platforms.android && /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: AndroidIcon, size: 18 }), app.platforms.ios && /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: AppleIcon, size: 18 })), /* @__PURE__ */ React56.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Platforms")), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React56.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.type), /* @__PURE__ */ React56.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Type")), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React56.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.size), /* @__PURE__ */ React56.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Size"))))), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col sm:flex-row gap-4 items-center w-full mx-auto mb-12" }, app.ctaText && app.ctaHref && /* @__PURE__ */ React56.createElement("div", { className: "w-full sm:w-60 flex justify-center *:w-full" }, /* @__PURE__ */ React56.createElement(ThreeDButton, { href: app.ctaHref }, /* @__PURE__ */ React56.createElement("span", { className: "flex items-center justify-center gap-2" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: Download01Icon2, size: 16 }), app.ctaText))), app.secondaryCtaText && app.secondaryCtaHref && /* @__PURE__ */ React56.createElement(
|
|
4968
5209
|
"a",
|
|
4969
5210
|
{
|
|
4970
5211
|
href: app.secondaryCtaHref,
|
|
4971
5212
|
className: "w-full sm:w-60 inline-flex items-center justify-center gap-2 text-[11px] tracking-widest rounded-full px-8 py-2.5 border border-neutral-100 text-center text-black hover:bg-neutral-50 outline-none transition-colors"
|
|
4972
5213
|
},
|
|
4973
|
-
/* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: Bookmark02Icon, size: 16 }),
|
|
4974
5215
|
app.secondaryCtaText
|
|
4975
|
-
)), /* @__PURE__ */
|
|
5216
|
+
)), /* @__PURE__ */ React56.createElement("div", { className: "w-full mb-12" }, /* @__PURE__ */ React56.createElement("h2", { className: "text-xl text-black mb-4" }, "About"), /* @__PURE__ */ React56.createElement("div", { className: "flex gap-3 overflow-x-auto pb-4 scrollbar-hide -mx-6 px-6" }, app.screenshots.map((src, idx) => /* @__PURE__ */ React56.createElement(
|
|
4976
5217
|
ScreenshotCard,
|
|
4977
5218
|
{
|
|
4978
5219
|
key: idx,
|
|
@@ -4980,43 +5221,43 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
4980
5221
|
alt: `${app.name} Screenshot ${idx + 1}`,
|
|
4981
5222
|
onClick: () => setLightboxIndex(idx)
|
|
4982
5223
|
}
|
|
4983
|
-
))), /* @__PURE__ */
|
|
5224
|
+
))), /* @__PURE__ */ React56.createElement("div", { className: "flex items-end text-neutral-500 text-sm leading-relaxed mt-2" }, /* @__PURE__ */ React56.createElement("p", { className: "flex-1 whitespace-pre-wrap" }, displayDesc), isDescLong && /* @__PURE__ */ React56.createElement(
|
|
4984
5225
|
"button",
|
|
4985
5226
|
{
|
|
4986
5227
|
onClick: () => setIsDescExpanded(!isDescExpanded),
|
|
4987
5228
|
className: "ml-2 mb-0.5 text-neutral-400 hover:text-black transition-colors outline-none shrink-0"
|
|
4988
5229
|
},
|
|
4989
|
-
/* @__PURE__ */
|
|
4990
|
-
|
|
5230
|
+
/* @__PURE__ */ React56.createElement(
|
|
5231
|
+
HugeiconsIcon39,
|
|
4991
5232
|
{
|
|
4992
|
-
icon:
|
|
5233
|
+
icon: ArrowDown01Icon6,
|
|
4993
5234
|
size: 18,
|
|
4994
5235
|
className: `transform transition-transform ${isDescExpanded ? "rotate-180" : ""}`
|
|
4995
5236
|
}
|
|
4996
5237
|
)
|
|
4997
|
-
))), lightboxIndex !== null && /* @__PURE__ */
|
|
5238
|
+
))), lightboxIndex !== null && /* @__PURE__ */ React56.createElement("div", { className: "fixed inset-0 z-50 bg-black/30 flex flex-col" }, /* @__PURE__ */ React56.createElement("div", { className: "w-full p-4 sm:p-6 flex justify-end" }, /* @__PURE__ */ React56.createElement(
|
|
4998
5239
|
"button",
|
|
4999
5240
|
{
|
|
5000
5241
|
onClick: () => setLightboxIndex(null),
|
|
5001
5242
|
className: "p-3 text-white bg-white/30 rounded-full transition-colors outline-none"
|
|
5002
5243
|
},
|
|
5003
|
-
/* @__PURE__ */
|
|
5004
|
-
)), /* @__PURE__ */
|
|
5244
|
+
/* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: Cancel01Icon5, size: 24 })
|
|
5245
|
+
)), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 flex items-center justify-between px-4 sm:px-10 pb-10" }, /* @__PURE__ */ React56.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: ArrowLeft01Icon12, size: 24 })), /* @__PURE__ */ React56.createElement("div", { className: "flex-1 h-full max-h-[80vh]" }, /* @__PURE__ */ React56.createElement(LightboxImage, { src: app.screenshots[lightboxIndex] })), /* @__PURE__ */ React56.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: ArrowRight01Icon11, size: 24 }))), /* @__PURE__ */ React56.createElement("div", { className: "sm:hidden flex justify-between px-8 pb-12 w-full" }, /* @__PURE__ */ React56.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: ArrowLeft01Icon12, size: 24 })), /* @__PURE__ */ React56.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React56.createElement(HugeiconsIcon39, { icon: ArrowRight01Icon11, size: 24 })))));
|
|
5005
5246
|
};
|
|
5006
5247
|
|
|
5007
5248
|
// src/components/UniversalAppCategoryGrid.tsx
|
|
5008
|
-
import
|
|
5009
|
-
import { HugeiconsIcon as
|
|
5010
|
-
import { Loading03Icon as
|
|
5249
|
+
import React57, { useState as useState37 } from "react";
|
|
5250
|
+
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
5251
|
+
import { Loading03Icon as Loading03Icon23 } from "@hugeicons/core-free-icons";
|
|
5011
5252
|
var AppGridCard = ({ app }) => {
|
|
5012
|
-
const [isLoading, setIsLoading] =
|
|
5013
|
-
return /* @__PURE__ */
|
|
5253
|
+
const [isLoading, setIsLoading] = useState37(true);
|
|
5254
|
+
return /* @__PURE__ */ React57.createElement(
|
|
5014
5255
|
"button",
|
|
5015
5256
|
{
|
|
5016
5257
|
onClick: app.onClick,
|
|
5017
5258
|
className: "flex flex-col gap-3 group cursor-pointer w-25 text-left outline-none"
|
|
5018
5259
|
},
|
|
5019
|
-
/* @__PURE__ */
|
|
5260
|
+
/* @__PURE__ */ React57.createElement("div", { className: "relative w-full aspect-square rounded-2xl bg-white overflow-hidden transition-all duration-300 flex items-center justify-center" }, isLoading && /* @__PURE__ */ React57.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React57.createElement(HugeiconsIcon40, { icon: Loading03Icon23, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React57.createElement(
|
|
5020
5261
|
"img",
|
|
5021
5262
|
{
|
|
5022
5263
|
src: app.logoSrc,
|
|
@@ -5026,7 +5267,7 @@ var AppGridCard = ({ app }) => {
|
|
|
5026
5267
|
className: `w-full h-full object-cover transition-all duration-700 ease-out z-20 ${isLoading ? "opacity-0 scale-95 blur-md" : "opacity-100 scale-100 blur-0"}`
|
|
5027
5268
|
}
|
|
5028
5269
|
)),
|
|
5029
|
-
/* @__PURE__ */
|
|
5270
|
+
/* @__PURE__ */ React57.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ React57.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ React57.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
5030
5271
|
);
|
|
5031
5272
|
};
|
|
5032
5273
|
var UniversalAppCategoryGrid = ({
|
|
@@ -5034,7 +5275,7 @@ var UniversalAppCategoryGrid = ({
|
|
|
5034
5275
|
categoryTitle,
|
|
5035
5276
|
apps
|
|
5036
5277
|
}) => {
|
|
5037
|
-
return /* @__PURE__ */
|
|
5278
|
+
return /* @__PURE__ */ React57.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ React57.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ React57.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ React57.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ React57.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ React57.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), categoryTitle && /* @__PURE__ */ React57.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, categoryTitle))), /* @__PURE__ */ React57.createElement("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-4 sm:gap-6 px-1" }, apps.map((app) => /* @__PURE__ */ React57.createElement(AppGridCard, { key: app.id, app }))))));
|
|
5038
5279
|
};
|
|
5039
5280
|
export {
|
|
5040
5281
|
AITranscriptionFeature,
|
|
@@ -5091,6 +5332,7 @@ export {
|
|
|
5091
5332
|
UniversalProfileSettings,
|
|
5092
5333
|
UniversalRegistrationFlow,
|
|
5093
5334
|
UniversalSidebar,
|
|
5335
|
+
UniversalTransactionPage,
|
|
5094
5336
|
UniversalTrashView,
|
|
5095
5337
|
ZairusAuth,
|
|
5096
5338
|
ZairusShareCard
|