@retinalabsllc/zairusjs 5.1.2 → 5.1.3
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 +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +345 -192
- package/dist/index.mjs +330 -178
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1429,7 +1429,7 @@ var ManagedPricingBlock = ({
|
|
|
1429
1429
|
key: `${activeTabIndex}-${planIdx}`,
|
|
1430
1430
|
className: `bg-white rounded-3xl p-6 flex flex-col relative overflow-hidden transition-all duration-300 ${plan.isPremium ? "" : ""}`
|
|
1431
1431
|
},
|
|
1432
|
-
/* @__PURE__ */ React16.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React16.createElement("span", { className: "text-black text-base block mb-1" }, plan.name), /* @__PURE__ */ React16.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React16.createElement("
|
|
1432
|
+
/* @__PURE__ */ React16.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React16.createElement("span", { className: "text-black text-base block mb-1" }, plan.name), /* @__PURE__ */ React16.createElement("div", { className: "flex items-baseline gap-1" }, /* @__PURE__ */ React16.createElement("h3", { className: "text-3xl font-light text-black" }, plan.price), plan.period && /* @__PURE__ */ React16.createElement("span", { className: "text-xs text-neutral-500" }, plan.period)), /* @__PURE__ */ React16.createElement("p", { className: "text-xs text-neutral-500 mt-2 min-h-8" }, plan.description), plan.showApps && plan.appLogos && plan.appLogos.length > 0 && /* @__PURE__ */ React16.createElement("div", { className: "flex items-center gap-2 mt-4" }, plan.appLogos.map((logo, logoIdx) => /* @__PURE__ */ React16.createElement(
|
|
1433
1433
|
"div",
|
|
1434
1434
|
{
|
|
1435
1435
|
key: logoIdx,
|
|
@@ -2045,9 +2045,9 @@ var UniversalSidebar = ({
|
|
|
2045
2045
|
setShowNotifDialog(true);
|
|
2046
2046
|
setSelectedNotif(null);
|
|
2047
2047
|
},
|
|
2048
|
-
className: "relative w-
|
|
2048
|
+
className: "relative w-8 h-8 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"
|
|
2049
2049
|
},
|
|
2050
|
-
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: Notification01Icon, size:
|
|
2050
|
+
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: Notification01Icon, size: 14 }),
|
|
2051
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" })
|
|
2052
2052
|
), showBackButton && /* @__PURE__ */ React27.createElement(
|
|
2053
2053
|
Link9,
|
|
@@ -2058,7 +2058,7 @@ var UniversalSidebar = ({
|
|
|
2058
2058
|
},
|
|
2059
2059
|
/* @__PURE__ */ React27.createElement(HugeiconsIcon13, { icon: ArrowLeft01Icon2, size: 18 })
|
|
2060
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(
|
|
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/50 backdrop-blur-sm z-40 flex items-center justify-between px-4" }, /* @__PURE__ */ React27.createElement(
|
|
2062
2062
|
"button",
|
|
2063
2063
|
{
|
|
2064
2064
|
onClick: openMobile,
|
|
@@ -2082,7 +2082,7 @@ var UniversalSidebar = ({
|
|
|
2082
2082
|
${isCollapsed ? "md:w-16 w-64" : "w-64"}
|
|
2083
2083
|
`
|
|
2084
2084
|
},
|
|
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 bg-[#1f26d6] rounded-full flex items-center justify-center shrink-0" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[10px] text-white 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-
|
|
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 bg-[#1f26d6] rounded-full flex items-center justify-center shrink-0" }, /* @__PURE__ */ React27.createElement("h3", { className: "text-[10px] text-white 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-neutral-600 truncate tracking-[0.2em] leading-none " }, userTag))), /* @__PURE__ */ React27.createElement("div", { className: "md:hidden flex shrink-0" }, /* @__PURE__ */ React27.createElement(
|
|
2086
2086
|
"button",
|
|
2087
2087
|
{
|
|
2088
2088
|
onClick: closeMobile,
|
|
@@ -3905,11 +3905,12 @@ import {
|
|
|
3905
3905
|
ArrowLeft01Icon as ArrowLeft01Icon10,
|
|
3906
3906
|
ArrowRight01Icon as ArrowRight01Icon10,
|
|
3907
3907
|
Loading03Icon as Loading03Icon15,
|
|
3908
|
-
|
|
3909
|
-
|
|
3908
|
+
ArrowDownRight01Icon,
|
|
3909
|
+
ArrowUpRight01Icon,
|
|
3910
3910
|
Search01Icon as Search01Icon2,
|
|
3911
3911
|
SearchList02Icon,
|
|
3912
|
-
ListSettingIcon
|
|
3912
|
+
ListSettingIcon,
|
|
3913
|
+
CancelCircleIcon as CancelCircleIcon2
|
|
3913
3914
|
} from "@hugeicons/core-free-icons";
|
|
3914
3915
|
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" }));
|
|
3915
3916
|
var formatDate3 = (dateInput) => {
|
|
@@ -3925,6 +3926,9 @@ var formatTime = (dateInput) => {
|
|
|
3925
3926
|
var UniversalTransactionPage = ({
|
|
3926
3927
|
headerTitle,
|
|
3927
3928
|
headerDescription,
|
|
3929
|
+
hideControls = false,
|
|
3930
|
+
hideBalanceAmounts = false,
|
|
3931
|
+
hidePagination = false,
|
|
3928
3932
|
transactions,
|
|
3929
3933
|
isLoading,
|
|
3930
3934
|
currentPage,
|
|
@@ -3935,9 +3939,10 @@ var UniversalTransactionPage = ({
|
|
|
3935
3939
|
activeDirectionFilter,
|
|
3936
3940
|
onDirectionFilterChange,
|
|
3937
3941
|
activeTypeFilter,
|
|
3938
|
-
onTypeFilterChange
|
|
3942
|
+
onTypeFilterChange,
|
|
3943
|
+
onReportTransaction,
|
|
3944
|
+
onGenerateReceipt
|
|
3939
3945
|
}) => {
|
|
3940
|
-
const [currentView, setCurrentView] = useState28("list");
|
|
3941
3946
|
const [selectedTransaction, setSelectedTransaction] = useState28(null);
|
|
3942
3947
|
const [localSearchQuery, setLocalSearchQuery] = useState28(searchQuery);
|
|
3943
3948
|
const [isTyping, setIsTyping] = useState28(false);
|
|
@@ -3970,30 +3975,29 @@ var UniversalTransactionPage = ({
|
|
|
3970
3975
|
setLocalSearchQuery("");
|
|
3971
3976
|
}
|
|
3972
3977
|
}, [searchQuery]);
|
|
3973
|
-
const goBack = () => {
|
|
3974
|
-
setCurrentView("list");
|
|
3975
|
-
setSelectedTransaction(null);
|
|
3976
|
-
};
|
|
3977
3978
|
const getDisplayName = (tx) => {
|
|
3978
3979
|
if (tx.metadata?.merchantName) return tx.metadata.merchantName;
|
|
3979
3980
|
if (tx.metadata?.description) return tx.metadata.description;
|
|
3980
3981
|
return tx.type === "CARD_TRANSACTION" ? "Card Transaction" : "Wallet Transaction";
|
|
3981
3982
|
};
|
|
3982
3983
|
const isListLoading = isLoading || isTyping;
|
|
3983
|
-
|
|
3984
|
+
const primaryBaseShadow = `inset 0 1.5px 0 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 0 rgba(0, 0, 0, 0.5), 0 3px 0 0 #0c0c0c, 0 6px 10px rgba(0, 0, 0, 0.3)`;
|
|
3985
|
+
const primaryHoverShadow = `inset 0 1.5px 0 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 0 rgba(0, 0, 0, 0.5), 0 4px 0 0 #0c0c0c, 0 8px 12px rgba(0, 0, 0, 0.35)`;
|
|
3986
|
+
const primaryActiveShadow = `inset 0 1px 0 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 0 rgba(0, 0, 0, 0.5), 0 1px 0 0 #0c0c0c, 0 2px 4px rgba(0, 0, 0, 0.2)`;
|
|
3987
|
+
return /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-6 animate-in max-w-5xl fade-in duration-300" }, !hideControls && /* @__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(
|
|
3984
3988
|
"input",
|
|
3985
3989
|
{
|
|
3986
3990
|
type: "text",
|
|
3987
3991
|
placeholder: "Search reference or amount...",
|
|
3988
3992
|
value: localSearchQuery,
|
|
3989
3993
|
onChange: (e) => setLocalSearchQuery(e.target.value),
|
|
3990
|
-
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-[13px] text-black outline-none transition-colors
|
|
3994
|
+
className: "w-full pl-10 pr-4 py-2 bg-white rounded-full text-[13px] text-black outline-none transition-colors"
|
|
3991
3995
|
}
|
|
3992
3996
|
)), /* @__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(
|
|
3993
3997
|
"button",
|
|
3994
3998
|
{
|
|
3995
3999
|
onClick: () => setIsDirectionModalOpen(true),
|
|
3996
|
-
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-2 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none
|
|
4000
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-2 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
3997
4001
|
},
|
|
3998
4002
|
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: SearchList02Icon, size: 12 }),
|
|
3999
4003
|
activeDirectionFilter === "ALL" ? "Payment Type" : activeDirectionFilter
|
|
@@ -4001,23 +4005,20 @@ var UniversalTransactionPage = ({
|
|
|
4001
4005
|
"button",
|
|
4002
4006
|
{
|
|
4003
4007
|
onClick: () => setIsTypeModalOpen(true),
|
|
4004
|
-
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-2 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none
|
|
4008
|
+
className: "flex items-center gap-2 whitespace-nowrap bg-white px-5 py-2 rounded-full text-[12px] text-neutral-600 hover:text-black hover:bg-neutral-50 transition-colors outline-none"
|
|
4005
4009
|
},
|
|
4006
4010
|
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: ListSettingIcon, size: 14 }),
|
|
4007
4011
|
activeTypeFilter === "ALL" ? "All Transactions" : activeTypeFilter.replace("_", " ")
|
|
4008
|
-
))), /* @__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" },
|
|
4012
|
+
))), /* @__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" }, /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, headerTitle), headerDescription && /* @__PURE__ */ React44.createElement("p", { className: "text-xs text-neutral-500" }, headerDescription))), /* @__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(
|
|
4009
4013
|
"div",
|
|
4010
4014
|
{
|
|
4011
4015
|
key: tx.id,
|
|
4012
|
-
onClick: () =>
|
|
4013
|
-
setSelectedTransaction(tx);
|
|
4014
|
-
setCurrentView("details");
|
|
4015
|
-
},
|
|
4016
|
+
onClick: () => setSelectedTransaction(tx),
|
|
4016
4017
|
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"
|
|
4017
4018
|
},
|
|
4018
|
-
/* @__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-
|
|
4019
|
-
/* @__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
|
|
4020
|
-
))), /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between pt-6 mt-2
|
|
4019
|
+
/* @__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-neutral-100 text-neutral-6000" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: tx.direction === "CREDIT" ? ArrowDownRight01Icon : ArrowUpRight01Icon, 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 transition-all duration-300 ${hideBalanceAmounts ? "blur-sm opacity-40 select-none" : ""}` }, tx.direction === "CREDIT" ? "+" : "-", tx.amount, " ", tx.currency))),
|
|
4020
|
+
/* @__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()))
|
|
4021
|
+
))), !hidePagination && /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between pt-6 mt-2" }, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React44.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React44.createElement(
|
|
4021
4022
|
"button",
|
|
4022
4023
|
{
|
|
4023
4024
|
onClick: () => onPageChange(currentPage - 1),
|
|
@@ -4033,7 +4034,38 @@ var UniversalTransactionPage = ({
|
|
|
4033
4034
|
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"
|
|
4034
4035
|
},
|
|
4035
4036
|
/* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: ArrowRight01Icon10, size: 14 })
|
|
4036
|
-
))))),
|
|
4037
|
+
)))))), selectedTransaction && /* @__PURE__ */ React44.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setSelectedTransaction(null) }), /* @__PURE__ */ React44.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 max-h-[90vh]" }, /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React44.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Details"), /* @__PURE__ */ React44.createElement("button", { onClick: () => setSelectedTransaction(null), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: CancelCircleIcon2, size: 18 }))), /* @__PURE__ */ React44.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6" }, /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col items-center justify-center mb-4" }, /* @__PURE__ */ React44.createElement("div", { className: `w-12 h-12 rounded-full flex items-center justify-center mb-4 ${selectedTransaction.direction === "CREDIT" ? "bg-neutral-100 text-neutral-6000" : "bg-neutral-100 text-neutral-600"}` }, /* @__PURE__ */ React44.createElement(HugeiconsIcon29, { icon: selectedTransaction.direction === "CREDIT" ? ArrowDownRight01Icon : ArrowUpRight01Icon, size: 20 })), /* @__PURE__ */ React44.createElement("h2", { className: `text-2xl text-black mb-2 transition-all duration-300 ${hideBalanceAmounts ? "blur-[6px] opacity-40 select-none" : ""}` }, selectedTransaction.direction === "CREDIT" ? "+" : "-", selectedTransaction.amount, " ", selectedTransaction.currency), /* @__PURE__ */ React44.createElement("span", { className: "text-[9px] tracking-widest text-neutral-500 px-4 py-1.5 rounded-full bg-neutral-50" }, selectedTransaction.status)), /* @__PURE__ */ React44.createElement("div", { className: "grid grid-cols-1 gap-y-8 gap-x-4 mb-10" }, /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2" }, "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" }, "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" }, "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" }, "Flow Direction"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black capitalize" }, selectedTransaction.direction.toLowerCase()))), /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React44.createElement(
|
|
4038
|
+
"button",
|
|
4039
|
+
{
|
|
4040
|
+
onClick: () => onReportTransaction && onReportTransaction(selectedTransaction),
|
|
4041
|
+
className: "relative w-full flex items-center justify-center py-2 rounded-full bg-neutral-950 text-white transition-all duration-150 select-none outline-none active:translate-y-0.5",
|
|
4042
|
+
style: { boxShadow: primaryBaseShadow },
|
|
4043
|
+
onMouseEnter: (e) => {
|
|
4044
|
+
e.currentTarget.style.boxShadow = primaryHoverShadow;
|
|
4045
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
4046
|
+
},
|
|
4047
|
+
onMouseLeave: (e) => {
|
|
4048
|
+
e.currentTarget.style.boxShadow = primaryBaseShadow;
|
|
4049
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
4050
|
+
},
|
|
4051
|
+
onMouseDown: (e) => {
|
|
4052
|
+
e.currentTarget.style.boxShadow = primaryActiveShadow;
|
|
4053
|
+
e.currentTarget.style.transform = "translateY(2px)";
|
|
4054
|
+
},
|
|
4055
|
+
onMouseUp: (e) => {
|
|
4056
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
4057
|
+
}
|
|
4058
|
+
},
|
|
4059
|
+
/* @__PURE__ */ React44.createElement("span", { className: "absolute inset-0 rounded-full bg-linear-to-b from-white/10 via-white/5 to-transparent pointer-events-none" }),
|
|
4060
|
+
/* @__PURE__ */ React44.createElement("span", { className: "relative z-10 text-[13px] tracking-wide" }, "Report Transaction")
|
|
4061
|
+
), /* @__PURE__ */ React44.createElement(
|
|
4062
|
+
"button",
|
|
4063
|
+
{
|
|
4064
|
+
onClick: () => onGenerateReceipt && onGenerateReceipt(selectedTransaction),
|
|
4065
|
+
className: "w-full flex items-center justify-center py-2 rounded-full border border-neutral-200 text-black outline-none text-[13px] tracking-wide"
|
|
4066
|
+
},
|
|
4067
|
+
"Generate Receipt"
|
|
4068
|
+
))))), 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" }, "Payment Type")), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, ["ALL", "CREDIT", "DEBIT"].map((option) => /* @__PURE__ */ React44.createElement(
|
|
4037
4069
|
"button",
|
|
4038
4070
|
{
|
|
4039
4071
|
key: option,
|
|
@@ -4041,17 +4073,17 @@ var UniversalTransactionPage = ({
|
|
|
4041
4073
|
onDirectionFilterChange(option);
|
|
4042
4074
|
setIsDirectionModalOpen(false);
|
|
4043
4075
|
},
|
|
4044
|
-
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none
|
|
4076
|
+
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"}`
|
|
4045
4077
|
},
|
|
4046
4078
|
/* @__PURE__ */ React44.createElement("span", { className: "truncate pr-2" }, option.charAt(0).toUpperCase() + option.slice(1).toLowerCase())
|
|
4047
4079
|
))), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React44.createElement(
|
|
4048
4080
|
"button",
|
|
4049
4081
|
{
|
|
4050
4082
|
onClick: () => setIsDirectionModalOpen(false),
|
|
4051
|
-
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none
|
|
4083
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none"
|
|
4052
4084
|
},
|
|
4053
4085
|
"Cancel"
|
|
4054
|
-
)))), 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
|
|
4086
|
+
)))), 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" }, "Transactions Type")), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex flex-col pl-2 pr-2" }, [
|
|
4055
4087
|
{ label: "All Transactions", value: "ALL" },
|
|
4056
4088
|
{ label: "Wallet Transactions", value: "WALLET_TRANSACTION" },
|
|
4057
4089
|
{ label: "Card Transactions", value: "CARD_TRANSACTION" }
|
|
@@ -4063,22 +4095,140 @@ var UniversalTransactionPage = ({
|
|
|
4063
4095
|
onTypeFilterChange(option.value);
|
|
4064
4096
|
setIsTypeModalOpen(false);
|
|
4065
4097
|
},
|
|
4066
|
-
className: `text-left px-4 py-3 text-[11px] tracking-wide transition-colors rounded-full flex items-center justify-between outline-none
|
|
4098
|
+
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"}`
|
|
4067
4099
|
},
|
|
4068
4100
|
/* @__PURE__ */ React44.createElement("span", { className: "truncate pr-2" }, option.label.charAt(0).toUpperCase() + option.label.slice(1).toLowerCase())
|
|
4069
4101
|
))), /* @__PURE__ */ React44.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React44.createElement(
|
|
4070
4102
|
"button",
|
|
4071
4103
|
{
|
|
4072
4104
|
onClick: () => setIsTypeModalOpen(false),
|
|
4073
|
-
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none
|
|
4105
|
+
className: "w-full py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors outline-none"
|
|
4074
4106
|
},
|
|
4075
4107
|
"Cancel"
|
|
4076
4108
|
)))));
|
|
4077
4109
|
};
|
|
4078
4110
|
|
|
4079
|
-
// src/components/
|
|
4080
|
-
import React45 from "react";
|
|
4111
|
+
// src/components/UniversalHomeView.tsx
|
|
4112
|
+
import React45, { useState as useState29, useEffect as useEffect20 } from "react";
|
|
4081
4113
|
import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
|
|
4114
|
+
import { ViewOffSlashIcon, ViewIcon } from "@hugeicons/core-free-icons";
|
|
4115
|
+
var UniversalHomeView = ({
|
|
4116
|
+
balanceLabel = "Your Balance",
|
|
4117
|
+
balanceAmount,
|
|
4118
|
+
balanceCurrency = "$",
|
|
4119
|
+
primaryAction,
|
|
4120
|
+
secondaryAction,
|
|
4121
|
+
quickActionsTitle = "Quick Actions",
|
|
4122
|
+
quickActions = [],
|
|
4123
|
+
transactionsProps
|
|
4124
|
+
}) => {
|
|
4125
|
+
const [displayAmount, setDisplayAmount] = useState29("0.00");
|
|
4126
|
+
const [isBalanceHidden, setIsBalanceHidden] = useState29(false);
|
|
4127
|
+
useEffect20(() => {
|
|
4128
|
+
const target = parseFloat(balanceAmount.replace(/,/g, ""));
|
|
4129
|
+
if (isNaN(target)) {
|
|
4130
|
+
setDisplayAmount(balanceAmount);
|
|
4131
|
+
return;
|
|
4132
|
+
}
|
|
4133
|
+
let startTimestamp = null;
|
|
4134
|
+
const duration = 1e3;
|
|
4135
|
+
const step = (timestamp) => {
|
|
4136
|
+
if (!startTimestamp) startTimestamp = timestamp;
|
|
4137
|
+
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
|
|
4138
|
+
const easeProgress = progress === 1 ? 1 : 1 - Math.pow(2, -10 * progress);
|
|
4139
|
+
const currentCount = easeProgress * target;
|
|
4140
|
+
setDisplayAmount(currentCount.toLocaleString("en-US", {
|
|
4141
|
+
minimumFractionDigits: 2,
|
|
4142
|
+
maximumFractionDigits: 2
|
|
4143
|
+
}));
|
|
4144
|
+
if (progress < 1) {
|
|
4145
|
+
requestAnimationFrame(step);
|
|
4146
|
+
} else {
|
|
4147
|
+
setDisplayAmount(target.toLocaleString("en-US", {
|
|
4148
|
+
minimumFractionDigits: 2,
|
|
4149
|
+
maximumFractionDigits: 2
|
|
4150
|
+
}));
|
|
4151
|
+
}
|
|
4152
|
+
};
|
|
4153
|
+
requestAnimationFrame(step);
|
|
4154
|
+
}, [balanceAmount]);
|
|
4155
|
+
const [intPart, decPart] = displayAmount.includes(".") ? displayAmount.split(".") : [displayAmount, "00"];
|
|
4156
|
+
const primaryBaseShadow = `inset 0 1.5px 0 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 0 rgba(0, 0, 0, 0.5), 0 3px 0 0 #0c0c0c, 0 6px 10px rgba(0, 0, 0, 0.3)`;
|
|
4157
|
+
const primaryHoverShadow = `inset 0 1.5px 0 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 0 rgba(0, 0, 0, 0.5), 0 4px 0 0 #0c0c0c, 0 8px 12px rgba(0, 0, 0, 0.35)`;
|
|
4158
|
+
const primaryActiveShadow = `inset 0 1px 0 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 0 rgba(0, 0, 0, 0.5), 0 1px 0 0 #0c0c0c, 0 2px 4px rgba(0, 0, 0, 0.2)`;
|
|
4159
|
+
return /* @__PURE__ */ React45.createElement("div", { className: "w-full max-w-5xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ React45.createElement("div", { className: "relative flex items-start justify-between w-full pt-4 pb-8" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col items-start text-left z-10 w-full" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-2 mb-1.5" }, /* @__PURE__ */ React45.createElement("span", { className: "text-[12px] sm:text-[13px] text-neutral-500" }, balanceLabel), /* @__PURE__ */ React45.createElement(
|
|
4160
|
+
"button",
|
|
4161
|
+
{
|
|
4162
|
+
onClick: () => setIsBalanceHidden(!isBalanceHidden),
|
|
4163
|
+
className: "text-neutral-400 hover:text-black transition-colors outline-none"
|
|
4164
|
+
},
|
|
4165
|
+
/* @__PURE__ */ React45.createElement(HugeiconsIcon30, { icon: isBalanceHidden ? ViewIcon : ViewOffSlashIcon, size: 14 })
|
|
4166
|
+
)), /* @__PURE__ */ React45.createElement("h1", { className: `text-3xl sm:text-4xl md:text-5xl text-black tracking-tight mb-5 tabular-nums flex items-baseline transition-all duration-300 ${isBalanceHidden ? "blur-sm opacity-40 select-none" : ""}` }, /* @__PURE__ */ React45.createElement("span", { className: "text-xl sm:text-2xl text-neutral-300 mr-1" }, balanceCurrency), intPart, /* @__PURE__ */ React45.createElement("span", { className: "text-xl sm:text-2xl text-neutral-300" }, ".", decPart)), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-3" }, primaryAction && /* @__PURE__ */ React45.createElement(
|
|
4167
|
+
"button",
|
|
4168
|
+
{
|
|
4169
|
+
onClick: primaryAction.onClick,
|
|
4170
|
+
className: "relative inline-flex items-center justify-center gap-1.5 px-8 py-2 rounded-full bg-neutral-950 text-white transition-all duration-150 select-none outline-none active:translate-y-0.5",
|
|
4171
|
+
style: { boxShadow: primaryBaseShadow },
|
|
4172
|
+
onMouseEnter: (e) => {
|
|
4173
|
+
e.currentTarget.style.boxShadow = primaryHoverShadow;
|
|
4174
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
4175
|
+
},
|
|
4176
|
+
onMouseLeave: (e) => {
|
|
4177
|
+
e.currentTarget.style.boxShadow = primaryBaseShadow;
|
|
4178
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
4179
|
+
},
|
|
4180
|
+
onMouseDown: (e) => {
|
|
4181
|
+
e.currentTarget.style.boxShadow = primaryActiveShadow;
|
|
4182
|
+
e.currentTarget.style.transform = "translateY(2px)";
|
|
4183
|
+
},
|
|
4184
|
+
onMouseUp: (e) => {
|
|
4185
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
4186
|
+
}
|
|
4187
|
+
},
|
|
4188
|
+
/* @__PURE__ */ React45.createElement("span", { className: "absolute inset-0 rounded-full bg-linear-to-b from-white/10 via-white/5 to-transparent pointer-events-none" }),
|
|
4189
|
+
/* @__PURE__ */ React45.createElement("span", { className: "relative z-10 flex items-center gap-1.5 leading-none text-[13px] tracking-wide" }, primaryAction.label, primaryAction.icon && /* @__PURE__ */ React45.createElement(HugeiconsIcon30, { icon: primaryAction.icon, size: 16 }))
|
|
4190
|
+
), secondaryAction && /* @__PURE__ */ React45.createElement(
|
|
4191
|
+
"button",
|
|
4192
|
+
{
|
|
4193
|
+
onClick: secondaryAction.onClick,
|
|
4194
|
+
className: "flex items-center gap-1.5 px-8 py-2 rounded-full bg-white text-black transition-colors outline-none"
|
|
4195
|
+
},
|
|
4196
|
+
/* @__PURE__ */ React45.createElement("span", { className: "text-[13px] tracking-wide" }, secondaryAction.label),
|
|
4197
|
+
secondaryAction.icon && /* @__PURE__ */ React45.createElement(HugeiconsIcon30, { icon: secondaryAction.icon, size: 16 })
|
|
4198
|
+
)))), quickActions && quickActions.length > 0 && /* @__PURE__ */ React45.createElement("div", { className: "w-full mb-8 z-10" }, /* @__PURE__ */ React45.createElement("h3", { className: "text-xl text-black mb-4 px-1 tracking-tight" }, quickActionsTitle), /* @__PURE__ */ React45.createElement("div", { className: "grid grid-cols-4 gap-2 sm:gap-3 w-full" }, quickActions.slice(0, 4).map((action) => /* @__PURE__ */ React45.createElement(
|
|
4199
|
+
"button",
|
|
4200
|
+
{
|
|
4201
|
+
key: action.id,
|
|
4202
|
+
onClick: action.onClick,
|
|
4203
|
+
className: `w-full h-23.75 sm:h-28.75 rounded-2xl bg-white p-2.5 sm:p-3 flex flex-col justify-between items-start cursor-pointer active:scale-[0.98] transition-all outline-none`
|
|
4204
|
+
},
|
|
4205
|
+
/* @__PURE__ */ React45.createElement("div", { className: `w-7 h-7 sm:w-9 sm:h-9 rounded-full flex items-center justify-center bg-neutral-100 text-black}` }, /* @__PURE__ */ React45.createElement("div", { className: "scale-75 sm:scale-100 flex items-center justify-center" }, /* @__PURE__ */ React45.createElement(HugeiconsIcon30, { icon: action.icon, size: 18 }))),
|
|
4206
|
+
/* @__PURE__ */ React45.createElement("span", { className: "text-[10px] sm:text-[12px] text-black/80 text-left leading-[1.2] whitespace-pre-line mt-1" }, action.label)
|
|
4207
|
+
)))), /* @__PURE__ */ React45.createElement("div", { className: "w-full" }, /* @__PURE__ */ React45.createElement(
|
|
4208
|
+
UniversalTransactionPage,
|
|
4209
|
+
{
|
|
4210
|
+
...transactionsProps,
|
|
4211
|
+
hideControls: true,
|
|
4212
|
+
hideBalanceAmounts: isBalanceHidden
|
|
4213
|
+
}
|
|
4214
|
+
)));
|
|
4215
|
+
};
|
|
4216
|
+
|
|
4217
|
+
// src/components/CardLogo.tsx
|
|
4218
|
+
import React46 from "react";
|
|
4219
|
+
var CardLogo = ({ network, className = "" }) => {
|
|
4220
|
+
if (network === "MASTERCARD") {
|
|
4221
|
+
return /* @__PURE__ */ React46.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React46.createElement("title", null, "Mastercard"), /* @__PURE__ */ React46.createElement("path", { d: "M16 8.73c-0.12 0.094-0.236 0.187-0.349 0.288-1.955 1.705-3.184 4.2-3.184 6.982s1.228 5.277 3.172 6.973l0.011 0.009c0.112 0.1 0.231 0.197 0.349 0.29 0.12-0.092 0.236-0.19 0.349-0.29 1.955-1.705 3.183-4.2 3.183-6.982s-1.228-5.277-3.172-6.973l-0.011-0.009c-0.112-0.1-0.23-0.195-0.349-0.288zM21.721 6.745c-0.005 0-0.011-0-0.018-0-1.903 0-3.67 0.577-5.138 1.566l0.033-0.021c0.075 0.059 0.143 0.121 0.205 0.186l0.001 0.001c2.116 1.836 3.446 4.528 3.446 7.531 0 2.996-1.323 5.682-3.417 7.507l-0.012 0.010c-0.072 0.061-0.15 0.122-0.226 0.182 1.441 0.97 3.216 1.549 5.125 1.549 5.112 0 9.256-4.144 9.256-9.256s-4.143-9.255-9.255-9.256h-0zM15.18 23.526c0.072 0.061 0.15 0.122 0.226 0.182-1.44 0.969-3.214 1.547-5.123 1.547-5.112 0-9.255-4.144-9.255-9.255s4.144-9.255 9.255-9.255c1.907 0 3.68 0.577 5.153 1.566l-0.033-0.021c-0.075 0.059-0.143 0.121-0.205 0.186l-0.001 0.001c-2.116 1.836-3.446 4.528-3.446 7.531 0 2.996 1.323 5.682 3.417 7.507l0.012 0.010z" }));
|
|
4222
|
+
}
|
|
4223
|
+
if (network === "VERVE") {
|
|
4224
|
+
return /* @__PURE__ */ React46.createElement("div", { className: `font-bold italic flex items-center justify-center tracking-widest ${className}`, style: { fontFamily: "sans-serif" } }, "Verve");
|
|
4225
|
+
}
|
|
4226
|
+
return /* @__PURE__ */ React46.createElement("svg", { className, fill: "currentColor", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React46.createElement("title", null, "Visa"), /* @__PURE__ */ React46.createElement("path", { d: "M15.854 11.329l-2.003 9.367h-2.424l2.006-9.367zM26.051 17.377l1.275-3.518 0.735 3.518zM28.754 20.696h2.242l-1.956-9.367h-2.069c-0.003-0-0.007-0-0.010-0-0.459 0-0.853 0.281-1.019 0.68l-0.003 0.007-3.635 8.68h2.544l0.506-1.4h3.109zM22.429 17.638c0.010-2.473-3.419-2.609-3.395-3.714 0.008-0.336 0.327-0.694 1.027-0.785 0.13-0.013 0.28-0.021 0.432-0.021 0.711 0 1.385 0.162 1.985 0.452l-0.027-0.012 0.425-1.987c-0.673-0.261-1.452-0.413-2.266-0.416h-0.001c-2.396 0-4.081 1.275-4.096 3.098-0.015 1.348 1.203 2.099 2.122 2.549 0.945 0.459 1.262 0.754 1.257 1.163-0.006 0.63-0.752 0.906-1.45 0.917-0.032 0.001-0.071 0.001-0.109 0.001-0.871 0-1.691-0.219-2.407-0.606l0.027 0.013-0.439 2.052c0.786 0.315 1.697 0.497 2.651 0.497 0.015 0 0.030-0 0.045-0h-0.002c2.546 0 4.211-1.257 4.22-3.204zM12.391 11.329l-3.926 9.367h-2.562l-1.932-7.477c-0.037-0.364-0.26-0.668-0.57-0.82l-0.006-0.003c-0.688-0.338-1.488-0.613-2.325-0.786l-0.066-0.011 0.058-0.271h4.124c0 0 0.001 0 0.001 0 0.562 0 1.028 0.411 1.115 0.948l0.001 0.006 1.021 5.421 2.522-6.376z" }));
|
|
4227
|
+
};
|
|
4228
|
+
|
|
4229
|
+
// src/components/DriveItemOpener.tsx
|
|
4230
|
+
import React47 from "react";
|
|
4231
|
+
import { HugeiconsIcon as HugeiconsIcon31 } from "@hugeicons/react";
|
|
4082
4232
|
import { Cancel01Icon as Cancel01Icon4 } from "@hugeicons/core-free-icons";
|
|
4083
4233
|
var DriveItemOpener = ({ item, onClose }) => {
|
|
4084
4234
|
if (!item) return null;
|
|
@@ -4090,38 +4240,38 @@ var DriveItemOpener = ({ item, onClose }) => {
|
|
|
4090
4240
|
const i = Math.floor(Math.log(num) / Math.log(k));
|
|
4091
4241
|
return parseFloat((num / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
4092
4242
|
};
|
|
4093
|
-
return /* @__PURE__ */
|
|
4243
|
+
return /* @__PURE__ */ React47.createElement("div", { className: "fixed inset-0 z-200 bg-black/95 flex flex-col animate-in fade-in duration-200" }, /* @__PURE__ */ React47.createElement("div", { className: "flex items-center justify-between p-4 border-b border-white/10 bg-black" }, /* @__PURE__ */ React47.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React47.createElement("div", { className: "w-10 h-10 bg-white/10 rounded-xl flex items-center justify-center" }, /* @__PURE__ */ React47.createElement("div", { className: "invert grayscale brightness-200" }, /* @__PURE__ */ React47.createElement(FileIconMapper, { type: item.type, mimeType: item.mimeType }))), /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement("h3", { className: "text-sm text-white tracking-wide" }, item.name), /* @__PURE__ */ React47.createElement("p", { className: "text-xs text-white/50 mt-0.5" }, item.type, " \u2022 ", formatBytes(item.size), " \u2022 ", new Date(item.updatedAt).toLocaleDateString()))), /* @__PURE__ */ React47.createElement(
|
|
4094
4244
|
"button",
|
|
4095
4245
|
{
|
|
4096
4246
|
onClick: onClose,
|
|
4097
4247
|
className: "p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-colors outline-none"
|
|
4098
4248
|
},
|
|
4099
|
-
/* @__PURE__ */
|
|
4100
|
-
)), /* @__PURE__ */
|
|
4249
|
+
/* @__PURE__ */ React47.createElement(HugeiconsIcon31, { icon: Cancel01Icon4, size: 20 })
|
|
4250
|
+
)), /* @__PURE__ */ React47.createElement("div", { className: "flex-1 flex items-center justify-center p-8 overflow-y-auto relative" }, /* @__PURE__ */ React47.createElement("div", { className: "text-center" }, /* @__PURE__ */ React47.createElement("p", { className: "text-white/40 text-sm tracking-widest " }, "File Preview Engine"), /* @__PURE__ */ React47.createElement("p", { className: "text-white/20 text-xs mt-2" }, "Content rendering logic will be attached here."))));
|
|
4101
4251
|
};
|
|
4102
4252
|
|
|
4103
4253
|
// src/components/DriveShareModal.tsx
|
|
4104
|
-
import
|
|
4254
|
+
import React48 from "react";
|
|
4105
4255
|
var DriveShareModal = ({ items, onClose }) => {
|
|
4106
4256
|
if (!items || items.length === 0) return null;
|
|
4107
|
-
return /* @__PURE__ */
|
|
4257
|
+
return /* @__PURE__ */ React48.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__ */ React48.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__ */ React48.createElement("div", null, /* @__PURE__ */ React48.createElement("h3", { className: "text-lg text-black tracking-tight mb-1" }, "Share Access"), /* @__PURE__ */ React48.createElement("p", { className: "text-xs text-neutral-500" }, "Managing permissions for ", items.length, " selected item(s).")), /* @__PURE__ */ React48.createElement("div", { className: "flex justify-end gap-3 mt-2" }, /* @__PURE__ */ React48.createElement(
|
|
4108
4258
|
"button",
|
|
4109
4259
|
{
|
|
4110
4260
|
onClick: onClose,
|
|
4111
4261
|
className: "px-6 py-2.5 text-xs text-neutral-500 hover:bg-neutral-50 rounded-full transition-colors outline-none"
|
|
4112
4262
|
},
|
|
4113
4263
|
"Close"
|
|
4114
|
-
), /* @__PURE__ */
|
|
4264
|
+
), /* @__PURE__ */ React48.createElement(ThreeDActionButton, { onClick: onClose }, "Save Links"))));
|
|
4115
4265
|
};
|
|
4116
4266
|
|
|
4117
4267
|
// src/components/AiApproveDecline.tsx
|
|
4118
|
-
import
|
|
4119
|
-
import { HugeiconsIcon as
|
|
4120
|
-
import { CheckmarkCircle01Icon, CancelCircleIcon as
|
|
4268
|
+
import React49, { useState as useState30 } from "react";
|
|
4269
|
+
import { HugeiconsIcon as HugeiconsIcon32 } from "@hugeicons/react";
|
|
4270
|
+
import { CheckmarkCircle01Icon, CancelCircleIcon as CancelCircleIcon3, PencilEdit01Icon } from "@hugeicons/core-free-icons";
|
|
4121
4271
|
var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline, onEdit }) => {
|
|
4122
|
-
const [isEditing, setIsEditing] =
|
|
4123
|
-
const [editVal, setEditVal] =
|
|
4124
|
-
return /* @__PURE__ */
|
|
4272
|
+
const [isEditing, setIsEditing] = useState30(false);
|
|
4273
|
+
const [editVal, setEditVal] = useState30(typeof suggestionValue === "string" ? suggestionValue : "");
|
|
4274
|
+
return /* @__PURE__ */ React49.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__ */ React49.createElement("div", null, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1 " }, "AI Suggestion: ", suggestionTitle), !isEditing ? /* @__PURE__ */ React49.createElement("div", { className: "text-sm text-black" }, suggestionValue) : /* @__PURE__ */ React49.createElement(
|
|
4125
4275
|
"input",
|
|
4126
4276
|
{
|
|
4127
4277
|
type: "text",
|
|
@@ -4130,23 +4280,23 @@ var AiApproveDecline = ({ suggestionTitle, suggestionValue, onApprove, onDecline
|
|
|
4130
4280
|
className: "w-full text-sm p-2 border-b border-orange-200 bg-transparent outline-none focus:border-orange-400 transition-colors",
|
|
4131
4281
|
autoFocus: true
|
|
4132
4282
|
}
|
|
4133
|
-
)), /* @__PURE__ */
|
|
4283
|
+
)), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-1 mt-2" }, !isEditing ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.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__ */ React49.createElement(HugeiconsIcon32, { icon: CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ React49.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__ */ React49.createElement(HugeiconsIcon32, { icon: CancelCircleIcon3, size: 28 })), onEdit && /* @__PURE__ */ React49.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__ */ React49.createElement(HugeiconsIcon32, { icon: PencilEdit01Icon, size: 18 }))) : /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement("button", { onClick: () => {
|
|
4134
4284
|
onEdit?.(editVal);
|
|
4135
4285
|
setIsEditing(false);
|
|
4136
|
-
}, 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__ */
|
|
4286
|
+
}, 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__ */ React49.createElement(HugeiconsIcon32, { icon: CheckmarkCircle01Icon, size: 28 })), /* @__PURE__ */ React49.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__ */ React49.createElement(HugeiconsIcon32, { icon: CancelCircleIcon3, size: 28 })))));
|
|
4137
4287
|
};
|
|
4138
4288
|
|
|
4139
4289
|
// src/components/AiStageCheck.tsx
|
|
4140
|
-
import
|
|
4141
|
-
import { HugeiconsIcon as
|
|
4142
|
-
import { Loading03Icon as Loading03Icon16, CheckmarkCircle02Icon, CancelCircleIcon as
|
|
4290
|
+
import React50 from "react";
|
|
4291
|
+
import { HugeiconsIcon as HugeiconsIcon33 } from "@hugeicons/react";
|
|
4292
|
+
import { Loading03Icon as Loading03Icon16, CheckmarkCircle02Icon, CancelCircleIcon as CancelCircleIcon4 } from "@hugeicons/core-free-icons";
|
|
4143
4293
|
var AiStageCheck = ({ tasks }) => {
|
|
4144
|
-
return /* @__PURE__ */
|
|
4294
|
+
return /* @__PURE__ */ React50.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__ */ React50.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 mb-1 " }, "AI Processing"), tasks.map((task) => /* @__PURE__ */ React50.createElement("div", { key: task.id, className: "flex items-center gap-3" }, task.status === "pending" && /* @__PURE__ */ React50.createElement("div", { className: "w-4 h-4 rounded-full border border-orange-200" }), task.status === "loading" && /* @__PURE__ */ React50.createElement(HugeiconsIcon33, { icon: Loading03Icon16, size: 16, className: "animate-spin text-orange-500" }), task.status === "success" && /* @__PURE__ */ React50.createElement(HugeiconsIcon33, { icon: CheckmarkCircle02Icon, size: 16, className: "text-emerald-500" }), task.status === "error" && /* @__PURE__ */ React50.createElement(HugeiconsIcon33, { icon: CancelCircleIcon4, size: 16, className: "text-red-500" }), /* @__PURE__ */ React50.createElement("span", { className: `text-xs transition-colors ${task.status === "success" ? "text-black" : task.status === "loading" ? "text-orange-700" : "text-neutral-500"}` }, task.label))));
|
|
4145
4295
|
};
|
|
4146
4296
|
|
|
4147
4297
|
// src/components/Stagger.tsx
|
|
4148
|
-
import
|
|
4149
|
-
import { HugeiconsIcon as
|
|
4298
|
+
import React51 from "react";
|
|
4299
|
+
import { HugeiconsIcon as HugeiconsIcon34 } from "@hugeicons/react";
|
|
4150
4300
|
import { Briefcase02Icon, Upload01Icon as Upload01Icon2, FileSyncIcon, CloudUploadIcon as CloudUploadIcon2 } from "@hugeicons/core-free-icons";
|
|
4151
4301
|
var Stagger = ({ steps, currentStep }) => {
|
|
4152
4302
|
const getIconForStep = (stepName) => {
|
|
@@ -4156,18 +4306,18 @@ var Stagger = ({ steps, currentStep }) => {
|
|
|
4156
4306
|
if (lowerName.includes("submit")) return CloudUploadIcon2;
|
|
4157
4307
|
return Briefcase02Icon;
|
|
4158
4308
|
};
|
|
4159
|
-
return /* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ React51.createElement("div", { className: "w-full flex items-center justify-between relative z-0" }, /* @__PURE__ */ React51.createElement("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-full h-px bg-neutral-100 -z-10" }), /* @__PURE__ */ React51.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) => {
|
|
4160
4310
|
const isActive = idx === currentStep;
|
|
4161
4311
|
const isPassed = idx < currentStep;
|
|
4162
4312
|
const colorClass = isPassed ? "bg-emerald-500 text-white" : isActive ? "bg-neutral-100 text-neutral-500" : "bg-neutral-100 text-neutral-500";
|
|
4163
|
-
return /* @__PURE__ */
|
|
4313
|
+
return /* @__PURE__ */ React51.createElement("div", { key: step, className: `w-6 h-6 rounded-full flex items-center justify-center transition-colors duration-300 ${colorClass}` }, /* @__PURE__ */ React51.createElement(HugeiconsIcon34, { icon: getIconForStep(step), size: 11 }));
|
|
4164
4314
|
}));
|
|
4165
4315
|
};
|
|
4166
4316
|
|
|
4167
4317
|
// src/components/UniversalRegistrationFlow.tsx
|
|
4168
|
-
import
|
|
4318
|
+
import React52, { useState as useState31, useEffect as useEffect21, useRef as useRef13 } from "react";
|
|
4169
4319
|
import toast9 from "react-hot-toast";
|
|
4170
|
-
import { HugeiconsIcon as
|
|
4320
|
+
import { HugeiconsIcon as HugeiconsIcon35 } from "@hugeicons/react";
|
|
4171
4321
|
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";
|
|
4172
4322
|
var MACRO_STEPS = ["Details", "Documents", "Review", "Submit"];
|
|
4173
4323
|
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"];
|
|
@@ -4181,12 +4331,12 @@ var UniversalRegistrationFlow = ({
|
|
|
4181
4331
|
onRedirectToBilling,
|
|
4182
4332
|
onRedirectToApplication
|
|
4183
4333
|
}) => {
|
|
4184
|
-
const [isBooting, setIsBooting] =
|
|
4185
|
-
const [macroStep, setMacroStep] =
|
|
4186
|
-
const [appStatus, setAppStatus] =
|
|
4187
|
-
const [isAbortModalOpen, setIsAbortModalOpen] =
|
|
4188
|
-
const [isAborting, setIsAborting] =
|
|
4189
|
-
const [formState, setFormState] =
|
|
4334
|
+
const [isBooting, setIsBooting] = useState31(true);
|
|
4335
|
+
const [macroStep, setMacroStep] = useState31(0);
|
|
4336
|
+
const [appStatus, setAppStatus] = useState31("");
|
|
4337
|
+
const [isAbortModalOpen, setIsAbortModalOpen] = useState31(false);
|
|
4338
|
+
const [isAborting, setIsAborting] = useState31(false);
|
|
4339
|
+
const [formState, setFormState] = useState31({
|
|
4190
4340
|
natureApproved: false,
|
|
4191
4341
|
nameApproved: false,
|
|
4192
4342
|
addressApproved: false,
|
|
@@ -4203,7 +4353,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4203
4353
|
const other1Ref = useRef13(null);
|
|
4204
4354
|
const other2Ref = useRef13(null);
|
|
4205
4355
|
const other3Ref = useRef13(null);
|
|
4206
|
-
const [formData, setFormData] =
|
|
4356
|
+
const [formData, setFormData] = useState31({
|
|
4207
4357
|
businessDesc: "",
|
|
4208
4358
|
natureOfBusiness: null,
|
|
4209
4359
|
proposedName: "",
|
|
@@ -4230,22 +4380,22 @@ var UniversalRegistrationFlow = ({
|
|
|
4230
4380
|
otherDoc3Url: "",
|
|
4231
4381
|
otherDoc3Meta: null
|
|
4232
4382
|
});
|
|
4233
|
-
const [activeModal, setActiveModal] =
|
|
4234
|
-
const [iAgree, setIAgree] =
|
|
4235
|
-
const [isAnalyzingNature, setIsAnalyzingNature] =
|
|
4236
|
-
const [suggestedNature, setSuggestedNature] =
|
|
4237
|
-
const [isCheckingQualifier, setIsCheckingQualifier] =
|
|
4238
|
-
const [qualifierCheckResult, setQualifierCheckResult] =
|
|
4239
|
-
const [isCheckingName, setIsCheckingName] =
|
|
4240
|
-
const [nameCheckResult, setNameCheckResult] =
|
|
4241
|
-
const [globalExtractingId, setGlobalExtractingId] =
|
|
4242
|
-
const [globalUploadingPassport, setGlobalUploadingPassport] =
|
|
4243
|
-
const [globalUploadingSignature, setGlobalUploadingSignature] =
|
|
4244
|
-
const [isUploadingOther1, setIsUploadingOther1] =
|
|
4245
|
-
const [isUploadingOther2, setIsUploadingOther2] =
|
|
4246
|
-
const [isUploadingOther3, setIsUploadingOther3] =
|
|
4247
|
-
const [aiTasks, setAiTasks] =
|
|
4248
|
-
const [isSubmitting, setIsSubmitting] =
|
|
4383
|
+
const [activeModal, setActiveModal] = useState31({ isOpen: false, type: null, memberIndex: null });
|
|
4384
|
+
const [iAgree, setIAgree] = useState31(false);
|
|
4385
|
+
const [isAnalyzingNature, setIsAnalyzingNature] = useState31(false);
|
|
4386
|
+
const [suggestedNature, setSuggestedNature] = useState31(null);
|
|
4387
|
+
const [isCheckingQualifier, setIsCheckingQualifier] = useState31(false);
|
|
4388
|
+
const [qualifierCheckResult, setQualifierCheckResult] = useState31(null);
|
|
4389
|
+
const [isCheckingName, setIsCheckingName] = useState31(false);
|
|
4390
|
+
const [nameCheckResult, setNameCheckResult] = useState31(null);
|
|
4391
|
+
const [globalExtractingId, setGlobalExtractingId] = useState31(false);
|
|
4392
|
+
const [globalUploadingPassport, setGlobalUploadingPassport] = useState31(false);
|
|
4393
|
+
const [globalUploadingSignature, setGlobalUploadingSignature] = useState31(false);
|
|
4394
|
+
const [isUploadingOther1, setIsUploadingOther1] = useState31(false);
|
|
4395
|
+
const [isUploadingOther2, setIsUploadingOther2] = useState31(false);
|
|
4396
|
+
const [isUploadingOther3, setIsUploadingOther3] = useState31(false);
|
|
4397
|
+
const [aiTasks, setAiTasks] = useState31([]);
|
|
4398
|
+
const [isSubmitting, setIsSubmitting] = useState31(false);
|
|
4249
4399
|
const isReadOnly = ["PENDING", "AWAITING_PAYMENT", "COMPLETED"].includes(appStatus);
|
|
4250
4400
|
const isAnyUploading = globalExtractingId || globalUploadingPassport || globalUploadingSignature || isUploadingOther1 || isUploadingOther2 || isUploadingOther3;
|
|
4251
4401
|
const baseApi = async (action, payload = {}) => {
|
|
@@ -4260,7 +4410,7 @@ var UniversalRegistrationFlow = ({
|
|
|
4260
4410
|
return { success: false, error: "Network communication failed." };
|
|
4261
4411
|
}
|
|
4262
4412
|
};
|
|
4263
|
-
|
|
4413
|
+
useEffect21(() => {
|
|
4264
4414
|
baseApi("progress_load").then((data) => {
|
|
4265
4415
|
if (data.success && data.data) {
|
|
4266
4416
|
const meta = data.data;
|
|
@@ -4746,23 +4896,23 @@ var UniversalRegistrationFlow = ({
|
|
|
4746
4896
|
const isStep0Valid = type === "company" ? formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.membersDetailsApproved : formState.natureApproved && formState.nameApproved && formState.addressApproved && formState.ownerApproved;
|
|
4747
4897
|
const isStep1Valid = type === "company" ? formState.membersDocsApproved : formState.idApproved && formState.passportApproved && formState.signatureApproved;
|
|
4748
4898
|
const titleText = type === "company" ? "Company Incorporation (LLC)" : "Business Name Registration";
|
|
4749
|
-
if (isBooting) return /* @__PURE__ */
|
|
4899
|
+
if (isBooting) return /* @__PURE__ */ React52.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 32, className: "animate-spin text-black" }));
|
|
4750
4900
|
if (!["DRAFT", "QUEUED", "REJECTED"].includes(appStatus) && appStatus !== "") {
|
|
4751
|
-
return /* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ React52.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__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: CheckmarkBadge01Icon2, size: 35 })), /* @__PURE__ */ React52.createElement("h2", { className: "text-xl text-black" }, "Registration Completed"), /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application has been successfully verified and registered.")) : appStatus === "PENDING" ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: HourglassIcon, size: 35, className: "animate-spin" })), /* @__PURE__ */ React52.createElement("h2", { className: "text-xl text-black" }, "Application is Pending"), /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-neutral-500 max-w-md" }, "Your application is currently pending review.")) : appStatus === "AWAITING_PAYMENT" ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "w-20 h-20 bg-amber-50 text-amber-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: HourglassIcon, size: 35, className: "animate-pulse" })), /* @__PURE__ */ React52.createElement("h2", { className: "text-xl text-black" }, "Awaiting Payment"), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "w-20 h-20 bg-neutral-50 text-neutral-500 rounded-full flex items-center justify-center mb-2" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: HourglassIcon, size: 35 })), /* @__PURE__ */ React52.createElement("h2", { className: "text-xl text-black" }, "Application Submitted"), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "mt-6 flex flex-col items-center gap-3" }, /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isAborting && setIsAbortModalOpen(false) }), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "p-6 flex flex-col gap-4 text-center" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-[17px] text-black tracking-tight" }, "Abort Application?"), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "w-full flex " }, /* @__PURE__ */ React52.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__ */ React52.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")))));
|
|
4752
4902
|
}
|
|
4753
|
-
return /* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-8" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h2", { className: "text-xl text-black tracking-tight mb-1" }, titleText), /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-neutral-500" }, "Answer the questions below to build your official application.")), /* @__PURE__ */ React52.createElement("div", { className: "px-2" }, /* @__PURE__ */ React52.createElement(Stagger, { steps: MACRO_STEPS, currentStep: macroStep }))), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8" }, macroStep === 0 && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "What does your ", type === "company" ? "company" : "business", " do?")), !formState.natureApproved ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-3 " }, /* @__PURE__ */ React52.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__ */ React52.createElement(ThreeDActionButton, { onClick: handleAnalyzeNature, disabled: formData.businessDesc.length < 5 || isAnalyzingNature || isReadOnly, isLoading: isAnalyzingNature, className: "w-fit" }, "Analyze Nature")), isAnalyzingNature && /* @__PURE__ */ React52.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React52.createElement(AiStageCheck, { tasks: [{ id: "1", label: "Matching with Official Categories...", status: "loading" }] })), suggestedNature && /* @__PURE__ */ React52.createElement("div", { className: " mt-2 animate-in fade-in" }, /* @__PURE__ */ React52.createElement(AiApproveDecline, { suggestionTitle: "Classification Found", suggestionValue: /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: " text-black" }, suggestedNature.specificLabel), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, "Category: ", suggestedNature.categoryLabel)), onApprove: () => {
|
|
4754
4904
|
const newForm = { ...formData, natureOfBusiness: suggestedNature };
|
|
4755
4905
|
setFormData(newForm);
|
|
4756
4906
|
approveSection("natureApproved", newForm);
|
|
4757
|
-
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */
|
|
4907
|
+
}, onDecline: () => setSuggestedNature(null) }))) : /* @__PURE__ */ React52.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React52.createElement("div", { className: "pr-4" }, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black" }, formData.natureOfBusiness?.specificLabel), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-400 mt-1" }, formData.businessDesc)), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("natureApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), formState.natureApproved && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "What name would you like to register?")), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide two options. We will verify availability against the official registry."), !formState.nameApproved ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Proposed Name 1 (Preferred)", value: formData.proposedName, onChange: (v) => setFormData({ ...formData, proposedName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Proposed Name 2 (Alternative)", value: formData.proposedName2, onChange: (v) => setFormData({ ...formData, proposedName2: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "mt-2 animate-in fade-in" }, /* @__PURE__ */ React52.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__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-1" }, "AI Suggestion: Structural Qualifier Missing"), /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black mb-3" }, "Nigerian registrations require a structural qualifier to be approved."), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-2" }, (qualifierCheckResult.suggestions || []).map((alt, i) => /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement("div", { className: " mt-2 animate-in fade-in" }, nameCheckResult.status === "APPROVED" || nameCheckResult.status === "APPROVED_WARNING" || nameCheckResult.status === "SKIPPED" ? /* @__PURE__ */ React52.createElement(AiApproveDecline, { suggestionTitle: nameCheckResult.status === "APPROVED" ? "Name Available!" : "Fallback Approval", suggestionValue: /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.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__ */ React52.createElement("p", { className: "text-xs text-neutral-600" }, nameCheckResult.message), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-600 mt-2 " }, "Proposed Option: ", nameCheckResult.approvedOption)), onApprove: () => {
|
|
4758
4908
|
const newForm = { ...formData, approvedName: nameCheckResult.approvedOption };
|
|
4759
4909
|
setFormData(newForm);
|
|
4760
4910
|
approveSection("nameApproved", newForm);
|
|
4761
|
-
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */
|
|
4762
|
-
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */
|
|
4763
|
-
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */
|
|
4764
|
-
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */
|
|
4765
|
-
}, 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) => {
|
|
4911
|
+
}, onDecline: () => setNameCheckResult(null) }) : /* @__PURE__ */ React52.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__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-red-600 block mb-1" }, "Registry Conflict Detected"), /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black mb-3" }, nameCheckResult.message), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-2" }, (nameCheckResult.alternatives || []).map((alt, i) => /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black" }, formData.approvedName), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Verified against registry")), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("nameApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), formState.nameApproved && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "Where is your head office located?")), !formState.addressApproved ? /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Street Address", value: formData.address, onChange: (v) => setFormData({ ...formData, address: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "City", value: formData.city, onChange: (v) => setFormData({ ...formData, city: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "State", value: formData.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: null, isGlobalState: true }), placeholder: "Select State", onChange: () => {
|
|
4912
|
+
}, disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: () => approveSection("addressApproved"), disabled: !formData.address || !formData.city || !formData.state || isReadOnly, className: "w-fit mt-2" }, "Confirm Address")) : /* @__PURE__ */ React52.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-neutral-500" }, formData.address, ", ", formData.city, ", ", formData.state), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("addressApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "company" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between gap-2 text-black" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "Directors & Shareholders")), !formState.membersDetailsApproved && /* @__PURE__ */ React52.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__ */ React52.createElement("p", { className: "text-xs text-neutral-400 -mt-2" }, "Provide details for all individuals. Ensure total share percentage equals 100%."), !formState.membersDetailsApproved ? /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 " }, formData.members.map((member, i) => /* @__PURE__ */ React52.createElement("div", { key: member.id, className: "flex flex-col gap-4 border border-neutral-100 p-5 rounded-2xl bg-neutral-50/30" }, /* @__PURE__ */ React52.createElement("div", { className: "flex justify-between items-center mb-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400" }, "Member ", i + 1), formData.members.length > 1 && !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => removeCompanyMember(i), className: "text-red-500 text-xs hover:text-red-600" }, "Remove")), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Role", value: member.role, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "role", memberIndex: i }), onChange: () => {
|
|
4913
|
+
}, disabled: isReadOnly || isSubmitting }), member.role !== "Director Only" && /* @__PURE__ */ React52.createElement(NumberInput, { label: "Share Percentage (%)", value: member.sharePercentage, onChange: (v) => updateCompanyMemberInfo(i, "sharePercentage", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React52.createElement(TextInput, { label: "Full Name", value: member.fullName, onChange: (v) => updateCompanyMemberInfo(i, "fullName", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(NumberInput, { label: "Phone Number", value: member.phone, onChange: (v) => updateCompanyMemberInfo(i, "phone", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Email Address", value: member.email, onChange: (v) => updateCompanyMemberInfo(i, "email", v), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React52.createElement(TextInput, { label: "Nationality", value: member.nationality, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "nationality", memberIndex: i }), onChange: () => {
|
|
4914
|
+
}, disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Residential Address", value: member.address, onChange: (v) => updateCompanyMemberInfo(i, "address", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "City", value: member.city, onChange: (v) => updateCompanyMemberInfo(i, "city", v), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "State", value: member.state, readOnly: true, onClick: () => !isReadOnly && setActiveModal({ isOpen: true, type: "state", memberIndex: i }), onChange: () => {
|
|
4915
|
+
}, disabled: isReadOnly || isSubmitting })))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between mt-2" }, !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDetailsApproved"), disabled: !areCompanyMembersValid() || isReadOnly, className: "w-fit" }, "Confirm Members"))) : /* @__PURE__ */ React52.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black" }, formData.members.length, " Member(s) Registered"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, "Total Shares: 100% Verified.")), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("membersDetailsApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), formState.addressApproved && type === "business" && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center text-black" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "Who owns the business?")), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-4 " }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Full Name", value: formData.ownerName, onChange: (v) => setFormData({ ...formData, ownerName: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(NumberInput, { label: "Phone Number", value: formData.ownerPhone, onChange: (v) => setFormData({ ...formData, ownerPhone: v }), disabled: isReadOnly || isSubmitting }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Email Address", value: formData.ownerEmail, onChange: (v) => setFormData({ ...formData, ownerEmail: v }), disabled: isReadOnly || isSubmitting })), /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: () => approveSection("ownerApproved"), disabled: !formData.ownerName || !formData.ownerPhone || !formData.ownerEmail || isReadOnly, className: "w-fit mt-2" }, "Confirm Owner Details")) : /* @__PURE__ */ React52.createElement("div", { className: " flex items-center justify-between" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-black" }, formData.ownerName), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-500 mt-1" }, formData.ownerEmail, " \u2022 ", formData.ownerPhone)), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("ownerApproved"), className: "p-2 text-neutral-400 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon11, size: 14 }), " Close"), /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep0Valid, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 1 && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-8 animate-in fade-in" }, type === "company" ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm text-black" }, "Member Identity Documents"), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-6" }, formData.members.map((member, i) => /* @__PURE__ */ React52.createElement("div", { key: member.id, className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-black mb-1" }, member.fullName || `Member ${i + 1}`, " ", /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-400 ml-2" }, "(", member.role, ")")), /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Valid ID (NIN, License, Voter's Card)") : globalExtractingId && !member.idExtractedData ? /* @__PURE__ */ React52.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React52.createElement(AiStageCheck, { tasks: aiTasks })) : member.idExtractedData ? /* @__PURE__ */ React52.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__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review Extracted ID"), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "Full Name on ID", value: member.idExtractedData.fullName, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, fullName: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React52.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "ID Number", value: member.idExtractedData.idNumber, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, idNumber: v }), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React52.createElement(TextInput, { label: "Date of Birth", value: member.idExtractedData.dob, onChange: (v) => updateCompanyMemberInfo(i, "idExtractedData", { ...member.idExtractedData, dob: v }), disabled: isReadOnly || isAnyUploading })))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-2" }, !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !member.passportFileUrl ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : member.passportFileUrl ? /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Delete02Icon3, size: 16 }))) : null, !member.signatureFileUrl && !globalUploadingSignature ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !member.signatureFileUrl ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : member.signatureFileUrl ? /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Delete02Icon3, size: 16 }))) : null)), /* @__PURE__ */ React52.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: () => approveSection("membersDocsApproved"), disabled: !areCompanyMemberDocsValid() || isReadOnly || isAnyUploading, className: "w-fit" }, "Confirm All Documents"))) : /* @__PURE__ */ React52.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-emerald-800" }, "Documents Uploaded"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted.")), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("membersDocsApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))) : /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-2 text-black" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm " }, "Upload Means of Identification")), /* @__PURE__ */ React52.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__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 24, className: "text-neutral-400" }), /* @__PURE__ */ React52.createElement("span", { className: "text-xs" }, "Select ID Image to Upload")), globalExtractingId && /* @__PURE__ */ React52.createElement("div", { className: " mt-2" }, /* @__PURE__ */ React52.createElement(AiStageCheck, { tasks: aiTasks })), formData.idExtractedData && /* @__PURE__ */ React52.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__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("span", { className: "text-[11px] tracking-widest text-orange-600 block mb-2" }, "Review AI Extracted Data"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-neutral-500 mb-4" }, "Please verify the extracted information and correct any OCR mistakes before approving."), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React52.createElement(TextInput, { label: "ID Number", value: formData.idExtractedData.idNumber, onChange: (v) => setFormData((f) => ({ ...f, idExtractedData: { ...f.idExtractedData, idNumber: v } })), disabled: isReadOnly || isAnyUploading }), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex items-center gap-2 mt-2" }, /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: () => approveSection("idApproved"), disabled: isAnyUploading || isReadOnly, className: "w-fit shrink-0" }, "Approve Data"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: " flex items-center justify-between bg-emerald-50 p-6 rounded-full" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("p", { className: "text-sm text-emerald-800" }, "ID Document Verified"), /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-emerald-600 mt-1" }, "Data safely extracted and stored.")), !isReadOnly && /* @__PURE__ */ React52.createElement("button", { onClick: () => editSection("idApproved"), className: "p-2 text-emerald-700 hover:text-black transition-colors outline-none shrink-0" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: PencilEdit01Icon2, size: 16 })))), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 pt-6 animate-in slide-in-from-top-4 duration-500" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-3 " }, !formState.passportApproved && !globalUploadingPassport ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Passport Photo") : globalUploadingPassport && !formData.passportFileUrl ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Passport...") : /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: IdentificationIcon, size: 18 }), " Passport Uploaded"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Delete02Icon3, size: 16 }))), !formState.signatureApproved && !globalUploadingSignature ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Signature") : globalUploadingSignature && !formData.signatureFileUrl ? /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Signature...") : /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between p-4 bg-emerald-50 rounded-full text-emerald-800 text-sm w-full" }, /* @__PURE__ */ React52.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: SignatureIcon, size: 18 }), " Signature Uploaded"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Delete02Icon3, size: 16 })))))), /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-1 mb-2" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm text-black" }, "Additional Documents (Optional)"), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col gap-3" }, [1, 2, 3].map((num) => {
|
|
4766
4916
|
const docType = `other${num}`;
|
|
4767
4917
|
const ref = num === 1 ? other1Ref : num === 2 ? other2Ref : other3Ref;
|
|
4768
4918
|
const isUploading = num === 1 ? isUploadingOther1 : num === 2 ? isUploadingOther2 : isUploadingOther3;
|
|
@@ -4770,29 +4920,29 @@ var UniversalRegistrationFlow = ({
|
|
|
4770
4920
|
if (!fileUrl && !isUploading) {
|
|
4771
4921
|
const prevUrl = num > 1 ? formData[`otherDoc${num - 1}Url`] : true;
|
|
4772
4922
|
if (!prevUrl) return null;
|
|
4773
|
-
return /* @__PURE__ */
|
|
4923
|
+
return /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Upload01Icon3, size: 18, className: "text-neutral-400" }), " Upload Optional Document ", num);
|
|
4774
4924
|
}
|
|
4775
4925
|
if (isUploading) {
|
|
4776
|
-
return /* @__PURE__ */
|
|
4926
|
+
return /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Loading03Icon17, size: 18, className: "animate-spin text-black" }), " Uploading Document ", num, "...");
|
|
4777
4927
|
}
|
|
4778
|
-
return /* @__PURE__ */
|
|
4779
|
-
}))), /* @__PURE__ */
|
|
4928
|
+
return /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React52.createElement(HugeiconsIcon35, { icon: CheckmarkBadge01Icon2, size: 18 }), " Optional Document ", num, " Uploaded"), !isReadOnly && /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: Delete02Icon3, size: 16 })));
|
|
4929
|
+
}))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between mt-8 pt-6 " }, /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon11, size: 14 }), " Back"), /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: handleNext, disabled: !isStep1Valid || isAnyUploading, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 2 && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 animate-in fade-in" }, /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement("h3", { className: "text-sm mb-5 text-black" }, "Application Summary"), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-4 text-sm" }, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 truncate text-[13px] " }, type === "company" ? "Company Name" : "Business Name"), /* @__PURE__ */ React52.createElement("span", { className: " text-black text-[13px]" }, formData.approvedName)), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Classification"), /* @__PURE__ */ React52.createElement("span", { className: " text-black truncate sm:text-right text-[13px] " }, formData.natureOfBusiness?.specificLabel || "Pending")), type === "company" ? /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Total Members"), /* @__PURE__ */ React52.createElement("span", { className: " text-black truncate text-[13px] " }, formData.members.length, " Directors/Shareholders")), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Share Capital"), /* @__PURE__ */ React52.createElement("span", { className: " text-black truncate text-[13px] " }, "100% Allocated"))) : /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between border-b border-neutral-100 pb-3 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Proprietor"), /* @__PURE__ */ React52.createElement("span", { className: " text-black truncate text-[13px] " }, formData.ownerName)), /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Documents Attached"), /* @__PURE__ */ React52.createElement("span", { className: " text-neutral-400 text-[13px] " }, "ID, Passport, Signature")), formData.otherDoc1Url && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row sm:justify-between pb-2 gap-1" }, /* @__PURE__ */ React52.createElement("span", { className: "text-neutral-500 text-[13px] " }, "Optional Documents"), /* @__PURE__ */ React52.createElement("span", { className: " text-neutral-400 text-[13px] " }, [formData.otherDoc1Url, formData.otherDoc2Url, formData.otherDoc3Url].filter(Boolean).length, " Attached")))), /* @__PURE__ */ React52.createElement("div", { className: "flex items-center justify-between mt-4 pt-4 " }, /* @__PURE__ */ React52.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__ */ React52.createElement(HugeiconsIcon35, { icon: ArrowLeft01Icon11, size: 14 }), " Back"), /* @__PURE__ */ React52.createElement(ThreeDActionButton, { onClick: handleNext, className: "w-fit shrink-0" }, "Next Step"))), macroStep === 3 && /* @__PURE__ */ React52.createElement("div", { className: "flex flex-col gap-6 py-6 animate-in zoom-in-95 duration-500" }, /* @__PURE__ */ React52.createElement("h2", { className: "text-lg text-black tracking-tight mb-2" }, "Terms and Conditions of Application"), /* @__PURE__ */ React52.createElement("div", { className: "text-xs text-neutral-500 mb-4" }, /* @__PURE__ */ React52.createElement("p", { className: " mb-3" }, "Declaration and Consent"), /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.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__ */ React52.createElement("p", { className: "leading-relaxed" }, "Proceeding to generate the invoice confirms your acceptance of these terms and initiates the formal filing process.")), /* @__PURE__ */ React52.createElement("label", { className: "flex items-start gap-3 mt-2 cursor-pointer group" }, /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement("div", { className: "flex flex-col sm:flex-row items-center gap-4 mt-8 w-full justify-end pt-6" }, /* @__PURE__ */ React52.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__ */ React52.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__ */ React52.createElement(ThreeDActionButton, { onClick: handleFinalSubmit, disabled: isSubmitting || !iAgree || isReadOnly, isLoading: isSubmitting, className: "min-w-40 w-full sm:w-auto" }, "Submit")))), activeModal.isOpen && /* @__PURE__ */ React52.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React52.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setActiveModal({ isOpen: false, type: null, memberIndex: null }) }), /* @__PURE__ */ React52.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__ */ React52.createElement("div", { className: "p-4 text-center w-full shrink-0" }, /* @__PURE__ */ React52.createElement("h3", { className: "text-[14px] text-black tracking-tight capitalize" }, "Select ", activeModal.type)), /* @__PURE__ */ React52.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) => {
|
|
4780
4930
|
const isSelected = activeModal.isGlobalState ? formData.state === opt : formData.members[activeModal.memberIndex][activeModal.type] === opt;
|
|
4781
|
-
return /* @__PURE__ */
|
|
4931
|
+
return /* @__PURE__ */ React52.createElement("button", { key: opt, onClick: () => {
|
|
4782
4932
|
if (activeModal.isGlobalState) setFormData({ ...formData, state: opt });
|
|
4783
4933
|
else updateCompanyMemberInfo(activeModal.memberIndex, activeModal.type, opt);
|
|
4784
4934
|
setActiveModal({ isOpen: false, type: null, memberIndex: null });
|
|
4785
4935
|
}, 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);
|
|
4786
|
-
})), /* @__PURE__ */
|
|
4936
|
+
})), /* @__PURE__ */ React52.createElement("div", { className: "w-full flex mt-auto shrink-0 " }, /* @__PURE__ */ React52.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")))));
|
|
4787
4937
|
};
|
|
4788
4938
|
|
|
4789
4939
|
// src/components/UniversalDeveloperSettings.tsx
|
|
4790
|
-
import
|
|
4940
|
+
import React53, { useState as useState32, useEffect as useEffect22 } from "react";
|
|
4791
4941
|
import { toast as toast10 } from "react-hot-toast";
|
|
4792
|
-
import { HugeiconsIcon as
|
|
4942
|
+
import { HugeiconsIcon as HugeiconsIcon36 } from "@hugeicons/react";
|
|
4793
4943
|
import { Loading03Icon as Loading03Icon18, CircleLock02Icon as CircleLock02Icon5 } from "@hugeicons/core-free-icons";
|
|
4794
|
-
var ButtonSpinner5 = () => /* @__PURE__ */
|
|
4795
|
-
var PageSpinner7 = () => /* @__PURE__ */
|
|
4944
|
+
var ButtonSpinner5 = () => /* @__PURE__ */ React53.createElement(HugeiconsIcon36, { icon: Loading03Icon18, size: 16, className: "animate-spin text-current" });
|
|
4945
|
+
var PageSpinner7 = () => /* @__PURE__ */ React53.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ React53.createElement(HugeiconsIcon36, { icon: Loading03Icon18, size: 32, className: "animate-spin text-black" }));
|
|
4796
4946
|
var UniversalDeveloperSettings = ({
|
|
4797
4947
|
initialPublicKey,
|
|
4798
4948
|
initialWebhookUrl,
|
|
@@ -4801,12 +4951,12 @@ var UniversalDeveloperSettings = ({
|
|
|
4801
4951
|
onGenerateKeys,
|
|
4802
4952
|
onSaveWebhook
|
|
4803
4953
|
}) => {
|
|
4804
|
-
const [publicKey, setPublicKey] =
|
|
4805
|
-
const [webhookUrl, setWebhookUrl] =
|
|
4806
|
-
const [isGenerating, setIsGenerating] =
|
|
4807
|
-
const [isSavingWebhook, setIsSavingWebhook] =
|
|
4808
|
-
const [isRollModalOpen, setIsRollModalOpen] =
|
|
4809
|
-
|
|
4954
|
+
const [publicKey, setPublicKey] = useState32(initialPublicKey);
|
|
4955
|
+
const [webhookUrl, setWebhookUrl] = useState32(initialWebhookUrl);
|
|
4956
|
+
const [isGenerating, setIsGenerating] = useState32(false);
|
|
4957
|
+
const [isSavingWebhook, setIsSavingWebhook] = useState32(false);
|
|
4958
|
+
const [isRollModalOpen, setIsRollModalOpen] = useState32(false);
|
|
4959
|
+
useEffect22(() => {
|
|
4810
4960
|
setPublicKey(initialPublicKey || "");
|
|
4811
4961
|
setWebhookUrl(initialWebhookUrl || "");
|
|
4812
4962
|
}, [initialPublicKey, initialWebhookUrl]);
|
|
@@ -4866,7 +5016,7 @@ SECRET_KEY="${secKey}"
|
|
|
4866
5016
|
};
|
|
4867
5017
|
const hasWebhookChanges = webhookUrl !== initialWebhookUrl;
|
|
4868
5018
|
const isWebhookSaveDisabled = isSavingWebhook || isReadOnly || !hasWebhookChanges;
|
|
4869
|
-
return /* @__PURE__ */
|
|
5019
|
+
return /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col max-w-5xl rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ React53.createElement(ManagedToaster, null), /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ React53.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React53.createElement("h1", { className: " text-xl text-black mb-1 truncate tracking-tight" }, "Developer Settings"), /* @__PURE__ */ React53.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your API credentials and webhook integrations.")), isReadOnly && /* @__PURE__ */ React53.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__ */ React53.createElement(HugeiconsIcon36, { icon: CircleLock02Icon5, size: 18, className: "text-current" }))), isLoading ? /* @__PURE__ */ React53.createElement(PageSpinner7, null) : /* @__PURE__ */ React53.createElement("div", { className: "w-full max-w-5xl flex flex-col gap-12" }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React53.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React53.createElement(
|
|
4870
5020
|
TextInput,
|
|
4871
5021
|
{
|
|
4872
5022
|
label: "Public Key",
|
|
@@ -4875,7 +5025,7 @@ SECRET_KEY="${secKey}"
|
|
|
4875
5025
|
},
|
|
4876
5026
|
disabled: true
|
|
4877
5027
|
}
|
|
4878
|
-
), /* @__PURE__ */
|
|
5028
|
+
), /* @__PURE__ */ React53.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__ */ React53.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React53.createElement(
|
|
4879
5029
|
ThreeDActionButton,
|
|
4880
5030
|
{
|
|
4881
5031
|
onClick: () => {
|
|
@@ -4887,7 +5037,7 @@ SECRET_KEY="${secKey}"
|
|
|
4887
5037
|
className: "w-fit"
|
|
4888
5038
|
},
|
|
4889
5039
|
publicKey ? "Roll API Keys" : "Generate Keys"
|
|
4890
|
-
))), /* @__PURE__ */
|
|
5040
|
+
))), /* @__PURE__ */ React53.createElement("form", { className: "flex flex-col gap-6 border-t border-neutral-100 pt-8", onSubmit: handleSaveWebhook, autoComplete: "off" }, /* @__PURE__ */ React53.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ React53.createElement(
|
|
4891
5041
|
TextInput,
|
|
4892
5042
|
{
|
|
4893
5043
|
label: "Webhook URL",
|
|
@@ -4897,7 +5047,7 @@ SECRET_KEY="${secKey}"
|
|
|
4897
5047
|
placeholder: "https://your-domain.com/webhook",
|
|
4898
5048
|
type: "url"
|
|
4899
5049
|
}
|
|
4900
|
-
), /* @__PURE__ */
|
|
5050
|
+
), /* @__PURE__ */ React53.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__ */ React53.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ React53.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React53.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate " }, "Webhook Status"), /* @__PURE__ */ React53.createElement("span", { className: `text-xs block truncate ${webhookUrl ? "text-emerald-600" : "text-neutral-400"}` }, webhookUrl ? "Active" : "Inactive"))), /* @__PURE__ */ React53.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__ */ React53.createElement(
|
|
4901
5051
|
"button",
|
|
4902
5052
|
{
|
|
4903
5053
|
type: "button",
|
|
@@ -4905,7 +5055,7 @@ SECRET_KEY="${secKey}"
|
|
|
4905
5055
|
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"
|
|
4906
5056
|
},
|
|
4907
5057
|
"Cancel"
|
|
4908
|
-
), /* @__PURE__ */
|
|
5058
|
+
), /* @__PURE__ */ React53.createElement(
|
|
4909
5059
|
ThreeDActionButton,
|
|
4910
5060
|
{
|
|
4911
5061
|
type: "submit",
|
|
@@ -4914,7 +5064,7 @@ SECRET_KEY="${secKey}"
|
|
|
4914
5064
|
className: "min-w-32 w-full sm:w-auto"
|
|
4915
5065
|
},
|
|
4916
5066
|
"Save Webhook"
|
|
4917
|
-
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */
|
|
5067
|
+
))))), isRollModalOpen && !isReadOnly && /* @__PURE__ */ React53.createElement("div", { className: "fixed inset-0 z-110 flex items-center justify-center p-4" }, /* @__PURE__ */ React53.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => !isGenerating && setIsRollModalOpen(false) }), /* @__PURE__ */ React53.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__ */ React53.createElement("div", { className: "p-6 text-center w-full" }, /* @__PURE__ */ React53.createElement("h3", { className: " text-[17px] text-black tracking-tight mb-1" }, "Roll API Keys"), /* @__PURE__ */ React53.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__ */ React53.createElement("div", { className: "w-full flex" }, /* @__PURE__ */ React53.createElement(
|
|
4918
5068
|
"button",
|
|
4919
5069
|
{
|
|
4920
5070
|
onClick: () => setIsRollModalOpen(false),
|
|
@@ -4922,30 +5072,30 @@ SECRET_KEY="${secKey}"
|
|
|
4922
5072
|
className: "flex-1 py-3 text-[13px] text-neutral-600 hover:bg-neutral-50 transition-colors disabled:opacity-50 outline-none"
|
|
4923
5073
|
},
|
|
4924
5074
|
"Cancel"
|
|
4925
|
-
), /* @__PURE__ */
|
|
5075
|
+
), /* @__PURE__ */ React53.createElement(
|
|
4926
5076
|
"button",
|
|
4927
5077
|
{
|
|
4928
5078
|
onClick: handleGenerateKeys,
|
|
4929
5079
|
disabled: isGenerating,
|
|
4930
5080
|
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"
|
|
4931
5081
|
},
|
|
4932
|
-
isGenerating ? /* @__PURE__ */
|
|
5082
|
+
isGenerating ? /* @__PURE__ */ React53.createElement(ButtonSpinner5, null) : "Roll Keys"
|
|
4933
5083
|
)))));
|
|
4934
5084
|
};
|
|
4935
5085
|
|
|
4936
5086
|
// src/components/UniversalAppLibrary.tsx
|
|
4937
|
-
import
|
|
4938
|
-
import { HugeiconsIcon as
|
|
5087
|
+
import React54, { useState as useState33 } from "react";
|
|
5088
|
+
import { HugeiconsIcon as HugeiconsIcon37 } from "@hugeicons/react";
|
|
4939
5089
|
import { Loading03Icon as Loading03Icon19 } from "@hugeicons/core-free-icons";
|
|
4940
5090
|
var AppCard = ({ app }) => {
|
|
4941
|
-
const [isLoading, setIsLoading] =
|
|
4942
|
-
return /* @__PURE__ */
|
|
5091
|
+
const [isLoading, setIsLoading] = useState33(true);
|
|
5092
|
+
return /* @__PURE__ */ React54.createElement(
|
|
4943
5093
|
"button",
|
|
4944
5094
|
{
|
|
4945
5095
|
onClick: app.onClick,
|
|
4946
5096
|
className: "flex flex-col gap-3 group cursor-pointer w-25 shrink-0 text-left outline-none"
|
|
4947
5097
|
},
|
|
4948
|
-
/* @__PURE__ */
|
|
5098
|
+
/* @__PURE__ */ React54.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__ */ React54.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React54.createElement(HugeiconsIcon37, { icon: Loading03Icon19, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React54.createElement(
|
|
4949
5099
|
"img",
|
|
4950
5100
|
{
|
|
4951
5101
|
src: app.logoSrc,
|
|
@@ -4955,7 +5105,7 @@ var AppCard = ({ app }) => {
|
|
|
4955
5105
|
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"}`
|
|
4956
5106
|
}
|
|
4957
5107
|
)),
|
|
4958
|
-
/* @__PURE__ */
|
|
5108
|
+
/* @__PURE__ */ React54.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ React54.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ React54.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
4959
5109
|
);
|
|
4960
5110
|
};
|
|
4961
5111
|
var UniversalAppLibrary = ({
|
|
@@ -4963,18 +5113,18 @@ var UniversalAppLibrary = ({
|
|
|
4963
5113
|
headline,
|
|
4964
5114
|
categories
|
|
4965
5115
|
}) => {
|
|
4966
|
-
return /* @__PURE__ */
|
|
5116
|
+
return /* @__PURE__ */ React54.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ React54.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ React54.createElement("div", { className: "max-w-6xl w-full" }, (tagline || headline) && /* @__PURE__ */ React54.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ React54.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ React54.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), headline && /* @__PURE__ */ React54.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, headline))), /* @__PURE__ */ React54.createElement("div", { className: "flex flex-col gap-14" }, categories.map((category) => /* @__PURE__ */ React54.createElement("div", { key: category.id, className: "flex flex-col" }, /* @__PURE__ */ React54.createElement("div", { className: "flex items-end justify-between mb-5 px-1" }, /* @__PURE__ */ React54.createElement("h3", { className: "text-lg text-black tracking-tight " }, category.title), category.onSeeMore && /* @__PURE__ */ React54.createElement(
|
|
4967
5117
|
"button",
|
|
4968
5118
|
{
|
|
4969
5119
|
onClick: category.onSeeMore,
|
|
4970
5120
|
className: "text-[11px] tracking-widest text-neutral-500 hover:text-black transition-colors outline-none shrink-0 ml-4 pb-0.5"
|
|
4971
5121
|
},
|
|
4972
5122
|
category.seeMoreLabel || "See More"
|
|
4973
|
-
)), /* @__PURE__ */
|
|
5123
|
+
)), /* @__PURE__ */ React54.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__ */ React54.createElement(AppCard, { key: app.id, app }))), /* @__PURE__ */ React54.createElement("div", { className: "w-full h-px mt-2 last-of-type:hidden" })))))));
|
|
4974
5124
|
};
|
|
4975
5125
|
|
|
4976
5126
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
4977
|
-
import
|
|
5127
|
+
import React55, { useState as useState34, useEffect as useEffect23, useRef as useRef14 } from "react";
|
|
4978
5128
|
import Image11 from "next/image";
|
|
4979
5129
|
var MedicalFeatureStatsBlock = ({
|
|
4980
5130
|
bottomHeadline,
|
|
@@ -4983,9 +5133,9 @@ var MedicalFeatureStatsBlock = ({
|
|
|
4983
5133
|
trustText,
|
|
4984
5134
|
stats
|
|
4985
5135
|
}) => {
|
|
4986
|
-
const [isAnimating, setIsAnimating] =
|
|
5136
|
+
const [isAnimating, setIsAnimating] = useState34(false);
|
|
4987
5137
|
const titleRef = useRef14(null);
|
|
4988
|
-
|
|
5138
|
+
useEffect23(() => {
|
|
4989
5139
|
const observer = new IntersectionObserver(
|
|
4990
5140
|
([entry]) => {
|
|
4991
5141
|
if (entry.isIntersecting) {
|
|
@@ -5003,7 +5153,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
5003
5153
|
}
|
|
5004
5154
|
return () => observer.disconnect();
|
|
5005
5155
|
}, []);
|
|
5006
|
-
return /* @__PURE__ */
|
|
5156
|
+
return /* @__PURE__ */ React55.createElement("section", { className: "py-24 w-full flex justify-center relative z-10" }, /* @__PURE__ */ React55.createElement("div", { className: "max-w-6xl w-full flex flex-col px-4 md:px-8" }, /* @__PURE__ */ React55.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-10 mb-12" }, /* @__PURE__ */ React55.createElement("div", { className: "max-w-xl" }, /* @__PURE__ */ React55.createElement(
|
|
5007
5157
|
"h2",
|
|
5008
5158
|
{
|
|
5009
5159
|
ref: titleRef,
|
|
@@ -5011,7 +5161,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
5011
5161
|
style: isAnimating ? { animationIterationCount: 1 } : {}
|
|
5012
5162
|
},
|
|
5013
5163
|
bottomHeadline
|
|
5014
|
-
), /* @__PURE__ */
|
|
5164
|
+
), /* @__PURE__ */ React55.createElement("p", { className: "text-[14px] leading-relaxed text-neutral-500" }, bottomDescription)), /* @__PURE__ */ React55.createElement("div", { className: "flex items-center gap-4 shrink-0" }, /* @__PURE__ */ React55.createElement("div", { className: "flex -space-x-3" }, avatars.map((src, i) => /* @__PURE__ */ React55.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__ */ React55.createElement(
|
|
5015
5165
|
Image11,
|
|
5016
5166
|
{
|
|
5017
5167
|
src,
|
|
@@ -5020,17 +5170,17 @@ var MedicalFeatureStatsBlock = ({
|
|
|
5020
5170
|
sizes: "48px",
|
|
5021
5171
|
className: "object-cover"
|
|
5022
5172
|
}
|
|
5023
|
-
)))), /* @__PURE__ */
|
|
5173
|
+
)))), /* @__PURE__ */ React55.createElement("p", { className: "text-[11px] text-neutral-800 leading-[1.4] max-w-55" }, trustText))), /* @__PURE__ */ React55.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6" }, stats.map((stat, idx) => /* @__PURE__ */ React55.createElement("div", { key: idx, className: "bg-white rounded-4xl p-8 md:p-10 flex flex-col h-70" }, /* @__PURE__ */ React55.createElement("div", { className: "flex items-center p-0.5 mb-6" }, /* @__PURE__ */ React55.createElement("span", { className: "text-[14px] text-neutral-500 tracking-wide" }, stat.label)), /* @__PURE__ */ React55.createElement("div", { className: "text-6xl gradient-text md:text-[80px] font-light tracking-tighter text-black mt-auto leading-none" }, stat.value))))));
|
|
5024
5174
|
};
|
|
5025
5175
|
|
|
5026
5176
|
// src/components/ConsultantShowcase.tsx
|
|
5027
|
-
import
|
|
5177
|
+
import React56, { useState as useState35 } from "react";
|
|
5028
5178
|
import Image12 from "next/image";
|
|
5029
|
-
import { HugeiconsIcon as
|
|
5179
|
+
import { HugeiconsIcon as HugeiconsIcon38 } from "@hugeicons/react";
|
|
5030
5180
|
import { Loading03Icon as Loading03Icon20 } from "@hugeicons/core-free-icons";
|
|
5031
5181
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
5032
|
-
const [isLoading, setIsLoading] =
|
|
5033
|
-
return /* @__PURE__ */
|
|
5182
|
+
const [isLoading, setIsLoading] = useState35(true);
|
|
5183
|
+
return /* @__PURE__ */ React56.createElement("div", { className: `absolute inset-0 bg-neutral-800 ${className}` }, isLoading && /* @__PURE__ */ React56.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__ */ React56.createElement(HugeiconsIcon38, { icon: Loading03Icon20, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ React56.createElement(
|
|
5034
5184
|
Image12,
|
|
5035
5185
|
{
|
|
5036
5186
|
src,
|
|
@@ -5049,9 +5199,9 @@ var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
|
5049
5199
|
var ConsultantShowcase = ({
|
|
5050
5200
|
profiles
|
|
5051
5201
|
}) => {
|
|
5052
|
-
const [currentIndex, setCurrentIndex] =
|
|
5053
|
-
const [touchStart, setTouchStart] =
|
|
5054
|
-
const [touchEnd, setTouchEnd] =
|
|
5202
|
+
const [currentIndex, setCurrentIndex] = useState35(0);
|
|
5203
|
+
const [touchStart, setTouchStart] = useState35(null);
|
|
5204
|
+
const [touchEnd, setTouchEnd] = useState35(null);
|
|
5055
5205
|
const nextSlide = () => {
|
|
5056
5206
|
setCurrentIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
5057
5207
|
};
|
|
@@ -5076,7 +5226,7 @@ var ConsultantShowcase = ({
|
|
|
5076
5226
|
}
|
|
5077
5227
|
};
|
|
5078
5228
|
if (!profiles || profiles.length === 0) return null;
|
|
5079
|
-
return /* @__PURE__ */
|
|
5229
|
+
return /* @__PURE__ */ React56.createElement("section", { className: "py-24 w-full flex justify-center px-4 md:px-8 z-10 relative" }, /* @__PURE__ */ React56.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ React56.createElement(
|
|
5080
5230
|
"div",
|
|
5081
5231
|
{
|
|
5082
5232
|
className: "relative w-full h-100 md:h-112.5 rounded-4xl overflow-hidden bg-neutral-900 group select-none",
|
|
@@ -5086,13 +5236,13 @@ var ConsultantShowcase = ({
|
|
|
5086
5236
|
},
|
|
5087
5237
|
profiles.map((profile, idx) => {
|
|
5088
5238
|
const isActive = idx === currentIndex;
|
|
5089
|
-
return /* @__PURE__ */
|
|
5239
|
+
return /* @__PURE__ */ React56.createElement(
|
|
5090
5240
|
"div",
|
|
5091
5241
|
{
|
|
5092
5242
|
key: profile.id,
|
|
5093
5243
|
className: `absolute inset-0 transition-opacity duration-700 ease-in-out ${isActive ? "opacity-100 z-10" : "opacity-0 z-0 pointer-events-none"}`
|
|
5094
5244
|
},
|
|
5095
|
-
/* @__PURE__ */
|
|
5245
|
+
/* @__PURE__ */ React56.createElement(
|
|
5096
5246
|
ImageWithLoader,
|
|
5097
5247
|
{
|
|
5098
5248
|
src: profile.imageSrc,
|
|
@@ -5100,14 +5250,14 @@ var ConsultantShowcase = ({
|
|
|
5100
5250
|
priority: idx === 0
|
|
5101
5251
|
}
|
|
5102
5252
|
),
|
|
5103
|
-
/* @__PURE__ */
|
|
5104
|
-
/* @__PURE__ */
|
|
5105
|
-
/* @__PURE__ */
|
|
5253
|
+
/* @__PURE__ */ React56.createElement("div", { className: "absolute inset-0 bg-black/20 z-10 pointer-events-none" }),
|
|
5254
|
+
/* @__PURE__ */ React56.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" }),
|
|
5255
|
+
/* @__PURE__ */ React56.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__ */ React56.createElement("h2", { className: "text-[29px] tracking-tight mb-2 leading-none" }, profile.name), /* @__PURE__ */ React56.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React56.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide" }, profile.role), profile.description && /* @__PURE__ */ React56.createElement("p", { className: "text-[15px] text-white/80 font-light tracking-wide mt-1" }, profile.description)))
|
|
5106
5256
|
);
|
|
5107
5257
|
}),
|
|
5108
|
-
/* @__PURE__ */
|
|
5109
|
-
/* @__PURE__ */
|
|
5110
|
-
/* @__PURE__ */
|
|
5258
|
+
/* @__PURE__ */ React56.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" }),
|
|
5259
|
+
/* @__PURE__ */ React56.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" }),
|
|
5260
|
+
/* @__PURE__ */ React56.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__ */ React56.createElement(
|
|
5111
5261
|
"button",
|
|
5112
5262
|
{
|
|
5113
5263
|
key: idx,
|
|
@@ -5120,9 +5270,9 @@ var ConsultantShowcase = ({
|
|
|
5120
5270
|
};
|
|
5121
5271
|
|
|
5122
5272
|
// src/components/ContentGridBlock.tsx
|
|
5123
|
-
import
|
|
5273
|
+
import React57, { useState as useState36 } from "react";
|
|
5124
5274
|
import Image13 from "next/image";
|
|
5125
|
-
import { HugeiconsIcon as
|
|
5275
|
+
import { HugeiconsIcon as HugeiconsIcon39 } from "@hugeicons/react";
|
|
5126
5276
|
import { Loading03Icon as Loading03Icon21 } from "@hugeicons/core-free-icons";
|
|
5127
5277
|
var ContentGridBlock = ({
|
|
5128
5278
|
header,
|
|
@@ -5131,33 +5281,33 @@ var ContentGridBlock = ({
|
|
|
5131
5281
|
middleBottomCard,
|
|
5132
5282
|
rightCards
|
|
5133
5283
|
}) => {
|
|
5134
|
-
return /* @__PURE__ */
|
|
5284
|
+
return /* @__PURE__ */ React57.createElement("section", { className: " w-full flex justify-center z-10 relative" }, /* @__PURE__ */ React57.createElement("div", { className: "max-w-300 w-full px-4 md:px-8 flex flex-col gap-12" }, /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start lg:items-end gap-6 w-full" }, /* @__PURE__ */ React57.createElement("h2", { className: "text-3xl tracking-tight text-black leading-[1.15] max-w-lg" }, header.titlePrefix, " ", /* @__PURE__ */ React57.createElement("span", { className: "gradient-text" }, header.highlightText))), /* @__PURE__ */ React57.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col justify-end" }, /* @__PURE__ */ React57.createElement("div", { className: "bg-black rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ React57.createElement("p", { className: "text-[17px] text-white leading-snug mb-4" }, leftCard.mainText), leftCard.tag && /* @__PURE__ */ React57.createElement("span", { className: "mb-auto text-[11px] text-neutral-200 tracking-widest" }, leftCard.tag), /* @__PURE__ */ React57.createElement("div", { className: "flex items-center justify-between mt-8" }, /* @__PURE__ */ React57.createElement("div", null, /* @__PURE__ */ React57.createElement("h4", { className: "text-[15px] text-white" }, leftCard.title), /* @__PURE__ */ React57.createElement("p", { className: "text-[13px] text-neutral-300" }, leftCard.subtitle)), /* @__PURE__ */ React57.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ React57.createElement(Image13, { src: leftCard.thumbnailSrc, alt: leftCard.title, fill: true, className: "object-cover" }))))), /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React57.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col relative h-75" }, /* @__PURE__ */ React57.createElement("div", { className: "absolute top-6 right-6 flex flex-col items-end gap-1" }, /* @__PURE__ */ React57.createElement("span", { className: "text-[11px] text-neutral-400 tracking-wide" }, middleTopCard.topRightLabel), /* @__PURE__ */ React57.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React57.createElement("div", { className: "flex -space-x-2" }, middleTopCard.topRightAvatars.map((src, i) => /* @__PURE__ */ React57.createElement("div", { key: i, className: "w-7 h-7 rounded-full border-2 border-white overflow-hidden relative z-10" }, /* @__PURE__ */ React57.createElement(Image13, { src, alt: "Avatar", fill: true, className: "object-cover", sizes: "28px" })))), /* @__PURE__ */ React57.createElement("span", { className: "text-sm text-neutral-500" }, middleTopCard.topRightCount))), /* @__PURE__ */ React57.createElement("div", { className: "grow flex flex-col justify-center items-center py-6" }, /* @__PURE__ */ React57.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__ */ React57.createElement("span", { className: " text-black" }, middleTopCard.badgeHighlight), middleTopCard.badgeSuffix)), /* @__PURE__ */ React57.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ React57.createElement("p", { className: "text-[11px] text-neutral-400 tracking-wide mb-1" }, middleTopCard.title), /* @__PURE__ */ React57.createElement("p", { className: "text-[14px] text-black leading-snug pr-4" }, middleTopCard.description))), /* @__PURE__ */ React57.createElement("div", { className: "bg-white rounded-3xl p-8 flex flex-col h-80" }, /* @__PURE__ */ React57.createElement("div", { className: "flex justify-between items-start mb-6" }, /* @__PURE__ */ React57.createElement("div", null, /* @__PURE__ */ React57.createElement("h4", { className: "text-[15px] text-black leading-tight" }, middleBottomCard.title), /* @__PURE__ */ React57.createElement("p", { className: "text-[13px] text-neutral-400" }, middleBottomCard.subtitle)), /* @__PURE__ */ React57.createElement("div", { className: "w-10 h-10 rounded-full overflow-hidden relative" }, /* @__PURE__ */ React57.createElement(Image13, { src: middleBottomCard.thumbnailSrc, alt: middleBottomCard.title, fill: true, className: "object-cover" }))), /* @__PURE__ */ React57.createElement("div", { className: "mt-auto" }, /* @__PURE__ */ React57.createElement("p", { className: "text-[16px] text-black leading-snug mb-4" }, middleBottomCard.mainText), middleBottomCard.tag && /* @__PURE__ */ React57.createElement("span", { className: "text-[11px] text-neutral-400 tracking-widest" }, middleBottomCard.tag)))), /* @__PURE__ */ React57.createElement("div", { className: "flex flex-col gap-6" }, rightCards.slice(0, 2).map((card, idx) => /* @__PURE__ */ React57.createElement("div", { key: idx, className: "relative w-full h-80 bg-[#2027d7] rounded-3xl overflow-hidden group" }, /* @__PURE__ */ React57.createElement("div", { className: "absolute inset-0 z-20 pointer-events-none" }), /* @__PURE__ */ React57.createElement("div", { className: "absolute inset-0 z-30 p-6 flex flex-col justify-end text-white" }, /* @__PURE__ */ React57.createElement("p", { className: "text-[14px] leading-snug mb-3 pr-2 text-white/90" }, card.mainText), card.tag && /* @__PURE__ */ React57.createElement("span", { className: "mb-4 text-[11px] text-white/50 tracking-widest" }, card.tag), /* @__PURE__ */ React57.createElement("div", { className: "pt-3" }, /* @__PURE__ */ React57.createElement("h4", { className: "text-[15px] tracking-wide" }, card.title), /* @__PURE__ */ React57.createElement("p", { className: "text-[13px] text-white/60" }, card.subtitle)))))))));
|
|
5135
5285
|
};
|
|
5136
5286
|
|
|
5137
5287
|
// src/components/UniversalAppDetails.tsx
|
|
5138
|
-
import
|
|
5139
|
-
import { HugeiconsIcon as
|
|
5288
|
+
import React58, { useState as useState37 } from "react";
|
|
5289
|
+
import { HugeiconsIcon as HugeiconsIcon40 } from "@hugeicons/react";
|
|
5140
5290
|
import {
|
|
5141
5291
|
AppleIcon,
|
|
5142
5292
|
AndroidIcon,
|
|
5143
5293
|
Download01Icon as Download01Icon2,
|
|
5144
5294
|
Bookmark02Icon,
|
|
5145
5295
|
Loading03Icon as Loading03Icon22,
|
|
5146
|
-
ArrowDown01Icon as
|
|
5296
|
+
ArrowDown01Icon as ArrowDown01Icon5,
|
|
5147
5297
|
Cancel01Icon as Cancel01Icon5,
|
|
5148
5298
|
ArrowLeft01Icon as ArrowLeft01Icon12,
|
|
5149
5299
|
ArrowRight01Icon as ArrowRight01Icon11
|
|
5150
5300
|
} from "@hugeicons/core-free-icons";
|
|
5151
5301
|
var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
5152
|
-
const [isLoading, setIsLoading] =
|
|
5153
|
-
return /* @__PURE__ */
|
|
5302
|
+
const [isLoading, setIsLoading] = useState37(true);
|
|
5303
|
+
return /* @__PURE__ */ React58.createElement(
|
|
5154
5304
|
"button",
|
|
5155
5305
|
{
|
|
5156
5306
|
onClick,
|
|
5157
5307
|
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"
|
|
5158
5308
|
},
|
|
5159
|
-
isLoading && /* @__PURE__ */
|
|
5160
|
-
/* @__PURE__ */
|
|
5309
|
+
isLoading && /* @__PURE__ */ React58.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: Loading03Icon22, size: 24, className: "animate-spin text-neutral-400" })),
|
|
5310
|
+
/* @__PURE__ */ React58.createElement(
|
|
5161
5311
|
"img",
|
|
5162
5312
|
{
|
|
5163
5313
|
src,
|
|
@@ -5170,8 +5320,8 @@ var ScreenshotCard = ({ src, alt, onClick }) => {
|
|
|
5170
5320
|
);
|
|
5171
5321
|
};
|
|
5172
5322
|
var LightboxImage = ({ src }) => {
|
|
5173
|
-
const [isLoading, setIsLoading] =
|
|
5174
|
-
return /* @__PURE__ */
|
|
5323
|
+
const [isLoading, setIsLoading] = useState37(true);
|
|
5324
|
+
return /* @__PURE__ */ React58.createElement("div", { className: "relative w-full h-full flex items-center justify-center p-4" }, isLoading && /* @__PURE__ */ React58.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: Loading03Icon22, size: 32, className: "animate-spin text-white" })), /* @__PURE__ */ React58.createElement(
|
|
5175
5325
|
"img",
|
|
5176
5326
|
{
|
|
5177
5327
|
src,
|
|
@@ -5182,9 +5332,9 @@ var LightboxImage = ({ src }) => {
|
|
|
5182
5332
|
));
|
|
5183
5333
|
};
|
|
5184
5334
|
var UniversalAppDetails = ({ app, onBack }) => {
|
|
5185
|
-
const [isLogoLoading, setIsLogoLoading] =
|
|
5186
|
-
const [isDescExpanded, setIsDescExpanded] =
|
|
5187
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
5335
|
+
const [isLogoLoading, setIsLogoLoading] = useState37(true);
|
|
5336
|
+
const [isDescExpanded, setIsDescExpanded] = useState37(false);
|
|
5337
|
+
const [lightboxIndex, setLightboxIndex] = useState37(null);
|
|
5188
5338
|
const MAX_DESC_LENGTH = 150;
|
|
5189
5339
|
const isDescLong = app.description.length > MAX_DESC_LENGTH;
|
|
5190
5340
|
const displayDesc = isDescExpanded || !isDescLong ? app.description : `${app.description.substring(0, MAX_DESC_LENGTH)}...`;
|
|
@@ -5198,7 +5348,7 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
5198
5348
|
setLightboxIndex(lightboxIndex === app.screenshots.length - 1 ? 0 : lightboxIndex + 1);
|
|
5199
5349
|
}
|
|
5200
5350
|
};
|
|
5201
|
-
return /* @__PURE__ */
|
|
5351
|
+
return /* @__PURE__ */ React58.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__ */ React58.createElement("div", { className: "flex flex-col sm:flex-row items-start gap-4 w-full mb-10 text-left" }, /* @__PURE__ */ React58.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__ */ React58.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-100 animate-pulse" }), /* @__PURE__ */ React58.createElement(
|
|
5202
5352
|
"img",
|
|
5203
5353
|
{
|
|
5204
5354
|
src: app.logoSrc,
|
|
@@ -5206,15 +5356,15 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
5206
5356
|
onLoad: () => setIsLogoLoading(false),
|
|
5207
5357
|
className: `w-full h-full object-cover transition-opacity duration-300 z-20 ${isLogoLoading ? "opacity-0" : "opacity-100"}`
|
|
5208
5358
|
}
|
|
5209
|
-
)), /* @__PURE__ */
|
|
5359
|
+
)), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col justify-center pt-1 min-w-0" }, /* @__PURE__ */ React58.createElement("h1", { className: "text-xl text-black leading-tight mb-1 " }, /* @__PURE__ */ React58.createElement("span", { className: "block truncate" }, app.name)), /* @__PURE__ */ React58.createElement("span", { className: "text-xs mt-1 text-neutral-400 truncate max-w-full" }, app.tagline), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-wrap items-center mt-4 gap-8 w-full" }, /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React58.createElement("div", { className: "flex items-center gap-1.5 h-6 text-neutral-800" }, app.platforms.android && /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: AndroidIcon, size: 18 }), app.platforms.ios && /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: AppleIcon, size: 18 })), /* @__PURE__ */ React58.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Platforms")), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React58.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.type), /* @__PURE__ */ React58.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Type")), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React58.createElement("span", { className: "text-sm h-6 flex items-center text-neutral-800 truncate" }, app.stats.size), /* @__PURE__ */ React58.createElement("span", { className: "text-[10px] text-neutral-400 mt-1" }, "Size"))))), /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col sm:flex-row gap-4 items-center w-full mx-auto mb-12" }, app.ctaText && app.ctaHref && /* @__PURE__ */ React58.createElement("div", { className: "w-full sm:w-60 flex justify-center *:w-full" }, /* @__PURE__ */ React58.createElement(ThreeDButton, { href: app.ctaHref }, /* @__PURE__ */ React58.createElement("span", { className: "flex items-center justify-center gap-2" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: Download01Icon2, size: 16 }), app.ctaText))), app.secondaryCtaText && app.secondaryCtaHref && /* @__PURE__ */ React58.createElement(
|
|
5210
5360
|
"a",
|
|
5211
5361
|
{
|
|
5212
5362
|
href: app.secondaryCtaHref,
|
|
5213
5363
|
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"
|
|
5214
5364
|
},
|
|
5215
|
-
/* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: Bookmark02Icon, size: 16 }),
|
|
5216
5366
|
app.secondaryCtaText
|
|
5217
|
-
)), /* @__PURE__ */
|
|
5367
|
+
)), /* @__PURE__ */ React58.createElement("div", { className: "w-full mb-12" }, /* @__PURE__ */ React58.createElement("h2", { className: "text-xl text-black mb-4" }, "About"), /* @__PURE__ */ React58.createElement("div", { className: "flex gap-3 overflow-x-auto pb-4 scrollbar-hide -mx-6 px-6" }, app.screenshots.map((src, idx) => /* @__PURE__ */ React58.createElement(
|
|
5218
5368
|
ScreenshotCard,
|
|
5219
5369
|
{
|
|
5220
5370
|
key: idx,
|
|
@@ -5222,43 +5372,43 @@ var UniversalAppDetails = ({ app, onBack }) => {
|
|
|
5222
5372
|
alt: `${app.name} Screenshot ${idx + 1}`,
|
|
5223
5373
|
onClick: () => setLightboxIndex(idx)
|
|
5224
5374
|
}
|
|
5225
|
-
))), /* @__PURE__ */
|
|
5375
|
+
))), /* @__PURE__ */ React58.createElement("div", { className: "flex items-end text-neutral-500 text-sm leading-relaxed mt-2" }, /* @__PURE__ */ React58.createElement("p", { className: "flex-1 whitespace-pre-wrap" }, displayDesc), isDescLong && /* @__PURE__ */ React58.createElement(
|
|
5226
5376
|
"button",
|
|
5227
5377
|
{
|
|
5228
5378
|
onClick: () => setIsDescExpanded(!isDescExpanded),
|
|
5229
5379
|
className: "ml-2 mb-0.5 text-neutral-400 hover:text-black transition-colors outline-none shrink-0"
|
|
5230
5380
|
},
|
|
5231
|
-
/* @__PURE__ */
|
|
5232
|
-
|
|
5381
|
+
/* @__PURE__ */ React58.createElement(
|
|
5382
|
+
HugeiconsIcon40,
|
|
5233
5383
|
{
|
|
5234
|
-
icon:
|
|
5384
|
+
icon: ArrowDown01Icon5,
|
|
5235
5385
|
size: 18,
|
|
5236
5386
|
className: `transform transition-transform ${isDescExpanded ? "rotate-180" : ""}`
|
|
5237
5387
|
}
|
|
5238
5388
|
)
|
|
5239
|
-
))), lightboxIndex !== null && /* @__PURE__ */
|
|
5389
|
+
))), lightboxIndex !== null && /* @__PURE__ */ React58.createElement("div", { className: "fixed inset-0 z-50 bg-black/30 flex flex-col" }, /* @__PURE__ */ React58.createElement("div", { className: "w-full p-4 sm:p-6 flex justify-end" }, /* @__PURE__ */ React58.createElement(
|
|
5240
5390
|
"button",
|
|
5241
5391
|
{
|
|
5242
5392
|
onClick: () => setLightboxIndex(null),
|
|
5243
5393
|
className: "p-3 text-white bg-white/30 rounded-full transition-colors outline-none"
|
|
5244
5394
|
},
|
|
5245
|
-
/* @__PURE__ */
|
|
5246
|
-
)), /* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: Cancel01Icon5, size: 24 })
|
|
5396
|
+
)), /* @__PURE__ */ React58.createElement("div", { className: "flex-1 flex items-center justify-between px-4 sm:px-10 pb-10" }, /* @__PURE__ */ React58.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: ArrowLeft01Icon12, size: 24 })), /* @__PURE__ */ React58.createElement("div", { className: "flex-1 h-full max-h-[80vh]" }, /* @__PURE__ */ React58.createElement(LightboxImage, { src: app.screenshots[lightboxIndex] })), /* @__PURE__ */ React58.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon11, size: 24 }))), /* @__PURE__ */ React58.createElement("div", { className: "sm:hidden flex justify-between px-8 pb-12 w-full" }, /* @__PURE__ */ React58.createElement("button", { onClick: handlePrev, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: ArrowLeft01Icon12, size: 24 })), /* @__PURE__ */ React58.createElement("button", { onClick: handleNext, className: "p-3 text-white bg-white/30 rounded-full" }, /* @__PURE__ */ React58.createElement(HugeiconsIcon40, { icon: ArrowRight01Icon11, size: 24 })))));
|
|
5247
5397
|
};
|
|
5248
5398
|
|
|
5249
5399
|
// src/components/UniversalAppCategoryGrid.tsx
|
|
5250
|
-
import
|
|
5251
|
-
import { HugeiconsIcon as
|
|
5400
|
+
import React59, { useState as useState38 } from "react";
|
|
5401
|
+
import { HugeiconsIcon as HugeiconsIcon41 } from "@hugeicons/react";
|
|
5252
5402
|
import { Loading03Icon as Loading03Icon23 } from "@hugeicons/core-free-icons";
|
|
5253
5403
|
var AppGridCard = ({ app }) => {
|
|
5254
|
-
const [isLoading, setIsLoading] =
|
|
5255
|
-
return /* @__PURE__ */
|
|
5404
|
+
const [isLoading, setIsLoading] = useState38(true);
|
|
5405
|
+
return /* @__PURE__ */ React59.createElement(
|
|
5256
5406
|
"button",
|
|
5257
5407
|
{
|
|
5258
5408
|
onClick: app.onClick,
|
|
5259
5409
|
className: "flex flex-col gap-3 group cursor-pointer w-25 text-left outline-none"
|
|
5260
5410
|
},
|
|
5261
|
-
/* @__PURE__ */
|
|
5411
|
+
/* @__PURE__ */ React59.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__ */ React59.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-10 bg-neutral-50/50" }, /* @__PURE__ */ React59.createElement(HugeiconsIcon41, { icon: Loading03Icon23, size: 24, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React59.createElement(
|
|
5262
5412
|
"img",
|
|
5263
5413
|
{
|
|
5264
5414
|
src: app.logoSrc,
|
|
@@ -5268,7 +5418,7 @@ var AppGridCard = ({ app }) => {
|
|
|
5268
5418
|
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"}`
|
|
5269
5419
|
}
|
|
5270
5420
|
)),
|
|
5271
|
-
/* @__PURE__ */
|
|
5421
|
+
/* @__PURE__ */ React59.createElement("div", { className: "flex flex-col min-w-0 px-1" }, /* @__PURE__ */ React59.createElement("span", { className: "text-[13px] text-black tracking-tight truncate group-hover:text-neutral-600 transition-colors" }, app.name), /* @__PURE__ */ React59.createElement("span", { className: "text-[10px] text-neutral-500 tracking-wide truncate mt-0.5" }, app.category))
|
|
5272
5422
|
);
|
|
5273
5423
|
};
|
|
5274
5424
|
var UniversalAppCategoryGrid = ({
|
|
@@ -5276,7 +5426,7 @@ var UniversalAppCategoryGrid = ({
|
|
|
5276
5426
|
categoryTitle,
|
|
5277
5427
|
apps
|
|
5278
5428
|
}) => {
|
|
5279
|
-
return /* @__PURE__ */
|
|
5429
|
+
return /* @__PURE__ */ React59.createElement("div", { className: "w-full py-16" }, /* @__PURE__ */ React59.createElement("div", { className: "w-full flex justify-center px-4" }, /* @__PURE__ */ React59.createElement("div", { className: "max-w-6xl w-full" }, /* @__PURE__ */ React59.createElement("div", { className: "relative overflow-hidden mb-12 text-left" }, /* @__PURE__ */ React59.createElement("div", { className: "relative z-10" }, tagline && /* @__PURE__ */ React59.createElement("span", { className: "text-[11px] tracking-[0.4em] text-neutral-500 block mb-4 " }, tagline), categoryTitle && /* @__PURE__ */ React59.createElement("h2", { className: "text-2xl sm:text-3xl tracking-tight text-black leading-[1.1]" }, categoryTitle))), /* @__PURE__ */ React59.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__ */ React59.createElement(AppGridCard, { key: app.id, app }))))));
|
|
5280
5430
|
};
|
|
5281
5431
|
export {
|
|
5282
5432
|
AITranscriptionFeature,
|
|
@@ -5284,6 +5434,7 @@ export {
|
|
|
5284
5434
|
AiStageCheck,
|
|
5285
5435
|
AppBento2,
|
|
5286
5436
|
Banner,
|
|
5437
|
+
CardLogo,
|
|
5287
5438
|
ConsultantShowcase,
|
|
5288
5439
|
ContentGridBlock,
|
|
5289
5440
|
DriveItemOpener,
|
|
@@ -5325,6 +5476,7 @@ export {
|
|
|
5325
5476
|
UniversalDirectoryPage,
|
|
5326
5477
|
UniversalDriveView,
|
|
5327
5478
|
UniversalErrorView,
|
|
5479
|
+
UniversalHomeView,
|
|
5328
5480
|
UniversalIdentityPage,
|
|
5329
5481
|
UniversalLookupPage,
|
|
5330
5482
|
UniversalMembersPage,
|