randmarcomps 1.195.0 → 1.196.0
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/randmarcomps.d.ts +3 -1
- package/dist/randmarcomps.js +32 -34
- package/dist/randmarcomps.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/randmarcomps.d.ts
CHANGED
|
@@ -369,6 +369,8 @@ declare interface IProps {
|
|
|
369
369
|
payInvoicePath?: string;
|
|
370
370
|
userEmail: string;
|
|
371
371
|
isSuperAdmin: boolean;
|
|
372
|
+
reseller?: Reseller_2;
|
|
373
|
+
withoutReports: boolean;
|
|
372
374
|
}
|
|
373
375
|
|
|
374
376
|
export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
|
|
@@ -512,7 +514,7 @@ export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<RadioGro
|
|
|
512
514
|
|
|
513
515
|
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
514
516
|
|
|
515
|
-
export declare function Reseller({ appID, readonly, payInvoicePath, userEmail, isSuperAdmin }: IProps): JSX.Element;
|
|
517
|
+
export declare function Reseller({ appID, reseller, readonly, payInvoicePath, userEmail, isSuperAdmin, withoutReports }: IProps): JSX.Element;
|
|
516
518
|
|
|
517
519
|
export declare function ResellerBillingOverviewCard({ reseller, actions, loading }: ResellerBillingOverviewCardProps): JSX.Element;
|
|
518
520
|
|
package/dist/randmarcomps.js
CHANGED
|
@@ -11525,7 +11525,7 @@ const emptySplitApi = createApi({
|
|
|
11525
11525
|
})
|
|
11526
11526
|
}),
|
|
11527
11527
|
overrideExisting: !1
|
|
11528
|
-
}), { useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, usePutV4ResellerByRouteResellerIdCommunicationMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation,
|
|
11528
|
+
}), { useLazyGetV4PartnerByApplicationIdAccountQuery, useGetV4PartnerByApplicationIdAccountResellerQuery, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation, usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation, useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery, useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery, usePutV4ResellerByRouteResellerIdCommunicationMutation, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation, useGetV4PartnerByApplicationIdManufacturersQuery, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation } = injectedRtkApi;
|
|
11529
11529
|
injectedRtkApi.enhanceEndpoints({
|
|
11530
11530
|
addTagTypes: ["Conversations"],
|
|
11531
11531
|
endpoints: {
|
|
@@ -12924,34 +12924,32 @@ function MonthlySalesChart({
|
|
|
12924
12924
|
}
|
|
12925
12925
|
);
|
|
12926
12926
|
}
|
|
12927
|
-
function Reseller({ appID: e,
|
|
12928
|
-
var
|
|
12927
|
+
function Reseller({ appID: e, reseller: t, readonly: n, payInvoicePath: o, userEmail: l, isSuperAdmin: d, withoutReports: f }) {
|
|
12928
|
+
var q;
|
|
12929
12929
|
const {
|
|
12930
|
-
data:
|
|
12931
|
-
isLoading:
|
|
12932
|
-
isError:
|
|
12930
|
+
data: g,
|
|
12931
|
+
isLoading: b,
|
|
12932
|
+
isError: _
|
|
12933
12933
|
} = useGetV4PartnerByApplicationIdAccountResellerQuery({
|
|
12934
12934
|
applicationId: e ?? "",
|
|
12935
12935
|
withSpecification: !0
|
|
12936
12936
|
// todo false first
|
|
12937
|
-
}
|
|
12938
|
-
routeResellerId: e ?? ""
|
|
12939
|
-
}), [_, S] = useState(!0), [C, E] = useState({
|
|
12937
|
+
}, { skip: !!t }), [S, C] = useState(!0), [E, R] = useState({
|
|
12940
12938
|
publicInfo: {
|
|
12941
12939
|
hasUnsavedChanges: !1
|
|
12942
12940
|
}
|
|
12943
12941
|
// Add other forms here if needed
|
|
12944
|
-
}),
|
|
12945
|
-
|
|
12946
|
-
var
|
|
12947
|
-
return ((
|
|
12948
|
-
...
|
|
12949
|
-
[
|
|
12950
|
-
}) :
|
|
12942
|
+
}), M = useCallback(() => E.publicInfo.hasUnsavedChanges, [E]), I = useCallback((z, Q) => {
|
|
12943
|
+
R((F) => {
|
|
12944
|
+
var V;
|
|
12945
|
+
return ((V = F[z]) == null ? void 0 : V.hasUnsavedChanges) !== Q.hasUnsavedChanges ? (console.log(`Updating form state for ${z}:`, Q.hasUnsavedChanges), {
|
|
12946
|
+
...F,
|
|
12947
|
+
[z]: Q
|
|
12948
|
+
}) : F;
|
|
12951
12949
|
});
|
|
12952
|
-
}, []), { NavigationGuardDialog:
|
|
12950
|
+
}, []), { NavigationGuardDialog: A } = useRouterNavigationGuard(M), j = t ?? g;
|
|
12953
12951
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12954
|
-
/* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children:
|
|
12952
|
+
/* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: _ ? /* @__PURE__ */ jsx(Card, { className: "p-6", children: /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
12955
12953
|
/* @__PURE__ */ jsx(CircleAlert, { className: "h-4 w-4" }),
|
|
12956
12954
|
/* @__PURE__ */ jsx(AlertTitle, { children: "Error" }),
|
|
12957
12955
|
/* @__PURE__ */ jsx(AlertDescription, { children: "There was an error loading your reseller information. Please try again later." })
|
|
@@ -12959,23 +12957,23 @@ function Reseller({ appID: e, readonly: t, payInvoicePath: n, userEmail: o, isSu
|
|
|
12959
12957
|
/* @__PURE__ */ jsx(
|
|
12960
12958
|
SalesSummary,
|
|
12961
12959
|
{
|
|
12962
|
-
fiscalYearMonthStart: (
|
|
12963
|
-
salesData:
|
|
12964
|
-
isLoading:
|
|
12960
|
+
fiscalYearMonthStart: (j == null ? void 0 : j.FiscalYearMonthStart) || 1,
|
|
12961
|
+
salesData: j == null ? void 0 : j.SalesData,
|
|
12962
|
+
isLoading: b
|
|
12965
12963
|
}
|
|
12966
12964
|
),
|
|
12967
12965
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
12968
12966
|
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
12969
|
-
/* @__PURE__ */ jsx(OrderCategories, { openOrders:
|
|
12970
|
-
/* @__PURE__ */ jsx(BillingCard, { readonly:
|
|
12967
|
+
/* @__PURE__ */ jsx(OrderCategories, { openOrders: (j == null ? void 0 : j.ActiveOrderDetails) ?? [], isLoading: b }),
|
|
12968
|
+
/* @__PURE__ */ jsx(BillingCard, { readonly: n, reseller: j || {}, payInvoicePath: o, isLoading: b }),
|
|
12971
12969
|
/* @__PURE__ */ jsx(
|
|
12972
12970
|
PublicInfo,
|
|
12973
12971
|
{
|
|
12974
|
-
reseller:
|
|
12972
|
+
reseller: j || {},
|
|
12975
12973
|
appID: e ?? "",
|
|
12976
|
-
isLoading:
|
|
12977
|
-
readonly:
|
|
12978
|
-
onUnsavedChanges: (
|
|
12974
|
+
isLoading: b,
|
|
12975
|
+
readonly: n,
|
|
12976
|
+
onUnsavedChanges: (z) => I("publicInfo", { hasUnsavedChanges: z })
|
|
12979
12977
|
}
|
|
12980
12978
|
)
|
|
12981
12979
|
] }),
|
|
@@ -12983,27 +12981,27 @@ function Reseller({ appID: e, readonly: t, payInvoicePath: n, userEmail: o, isSu
|
|
|
12983
12981
|
/* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
|
|
12984
12982
|
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Sales" }) }),
|
|
12985
12983
|
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
12986
|
-
/* @__PURE__ */ jsx(MonthlySalesChart, { salesData: (
|
|
12984
|
+
/* @__PURE__ */ jsx(MonthlySalesChart, { salesData: (j == null ? void 0 : j.SalesStatistics) ?? [], extrapolate: S }),
|
|
12987
12985
|
/* @__PURE__ */ jsxs("div", { className: "flex space-x-2 my-1", children: [
|
|
12988
|
-
/* @__PURE__ */ jsx(Switch, { checked:
|
|
12986
|
+
/* @__PURE__ */ jsx(Switch, { checked: S, onCheckedChange: C, id: "extrapolate-switch" }),
|
|
12989
12987
|
/* @__PURE__ */ jsx(Label$2, { htmlFor: "extrapolate-switch", children: "Extrapolate" })
|
|
12990
12988
|
] }),
|
|
12991
|
-
|
|
12989
|
+
S ? /* @__PURE__ */ jsx("p", { className: "text-sm", children: "*Sales for the current month are projected, not actual." }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
12992
12990
|
] })
|
|
12993
12991
|
] }),
|
|
12994
|
-
/* @__PURE__ */ jsx(AccountTier, { isSuperAdmin:
|
|
12992
|
+
/* @__PURE__ */ jsx(AccountTier, { isSuperAdmin: d, readonly: n, reseller: j || {}, appID: e ?? "", isLoading: b })
|
|
12995
12993
|
] })
|
|
12996
12994
|
] }),
|
|
12997
12995
|
/* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
|
|
12998
12996
|
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Brands you are qualified for" }) }),
|
|
12999
12997
|
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
13000
12998
|
/* @__PURE__ */ jsx("p", { children: "This module is under construction." }),
|
|
13001
|
-
/* @__PURE__ */ jsx("ul", { children: (
|
|
12999
|
+
/* @__PURE__ */ jsx("ul", { children: (q = j == null ? void 0 : j.Qualifications) == null ? void 0 : q.map((z) => /* @__PURE__ */ jsx("li", { children: z.ManufacturerId })) })
|
|
13002
13000
|
] })
|
|
13003
13001
|
] }),
|
|
13004
|
-
/* @__PURE__ */ jsx(ReportsSection, { appID: e, userEmail:
|
|
13002
|
+
!f && /* @__PURE__ */ jsx(ReportsSection, { appID: e, userEmail: l, isLoading: b })
|
|
13005
13003
|
] }) }),
|
|
13006
|
-
/* @__PURE__ */ jsx(
|
|
13004
|
+
/* @__PURE__ */ jsx(A, {})
|
|
13007
13005
|
] });
|
|
13008
13006
|
}
|
|
13009
13007
|
function composeEventHandlers(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
@@ -350,7 +350,7 @@ If you have multiple apis, you *have* to specify the reducerPath option when usi
|
|
|
350
350
|
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:E,selected:M,selected2:Q,stack:F})}}if((q==="always"||q==="once"&&S.current)&&M===E){let Q;try{throw new Error}catch(F){({stack:Q}=F)}console.warn("Selector "+(o.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
351
351
|
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:Q})}S.current&&(S.current=!1)}return M}}[o.name],[o]),C=withSelectorExports.useSyncExternalStoreWithSelector(b.addNestedSub,g.getState,_||g.getState,R,d);return React__namespace.useDebugValue(C),C};return Object.assign(n,{withTypes:()=>n}),n}var useSelector=createSelectorHook(),batch=defaultNoopBatch;function capitalize(e){return e.replace(e[0],e[0].toUpperCase())}function countObjectKeys(e){let t=0;for(const n in e)t++;return t}function isQueryDefinition(e){return e.type==="query"}function isMutationDefinition(e){return e.type==="mutation"}function isInfiniteQueryDefinition(e){return e.type==="infinitequery"}function safeAssign(e,...t){return Object.assign(e,...t)}var UNINITIALIZED_VALUE=Symbol();function useStableQueryArgs(e,t,n,o){const l=React.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:o}):e}),[e,t,n,o]),d=React.useRef(l);return React.useEffect(()=>{d.current.serialized!==l.serialized&&(d.current=l)},[l]),d.current.serialized===l.serialized?d.current.queryArgs:e}function useShallowStableValue(e){const t=React.useRef(e);return React.useEffect(()=>{shallowEqual$1(t.current,e)||(t.current=e)},[e]),shallowEqual$1(t.current,e)?t.current:e}var canUseDOM=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",isDOM=canUseDOM(),isRunningInReactNative=()=>typeof navigator<"u"&&navigator.product==="ReactNative",isReactNative=isRunningInReactNative(),getUseIsomorphicLayoutEffect=()=>isDOM||isReactNative?React.useLayoutEffect:React.useEffect,useIsomorphicLayoutEffect$1=getUseIsomorphicLayoutEffect(),noPendingQueryStateSelector=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:QueryStatus.pending}:e;function pick(e,...t){const n={};return t.forEach(o=>{n[o]=e[o]}),n}var COMMON_HOOK_DEBUG_FIELDS=["data","status","isLoading","isSuccess","isError","error"];function buildHooks({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:o,useStore:l},unstable__sideEffectsInRender:d,createSelector:f},serializeQueryArgs:g,context:b}){const _=d?Q=>Q():React.useEffect;return{buildQueryHooks:V,buildInfiniteQueryHooks:q,buildMutationHook:z,usePrefetch:C};function S(Q,F,O){if(F!=null&&F.endpointName&&Q.isUninitialized){const{endpointName:Ae}=F,Ne=b.endpointDefinitions[Ae];O!==skipToken&&g({queryArgs:F.originalArgs,endpointDefinition:Ne,endpointName:Ae})===g({queryArgs:O,endpointDefinition:Ne,endpointName:Ae})&&(F=void 0)}let te=Q.isSuccess?Q.data:F==null?void 0:F.data;te===void 0&&(te=Q.data);const ae=te!==void 0,ie=Q.isLoading,oe=(!F||F.isLoading||F.isUninitialized)&&!ae&&ie,se=Q.isSuccess||ae&&(ie&&!(F!=null&&F.isError)||Q.isUninitialized);return{...Q,data:te,currentData:Q.data,isFetching:ie,isLoading:oe,isSuccess:se}}function R(Q,F,O){if(F!=null&&F.endpointName&&Q.isUninitialized){const{endpointName:Ae}=F,Ne=b.endpointDefinitions[Ae];O!==skipToken&&g({queryArgs:F.originalArgs,endpointDefinition:Ne,endpointName:Ae})===g({queryArgs:O,endpointDefinition:Ne,endpointName:Ae})&&(F=void 0)}let te=Q.isSuccess?Q.data:F==null?void 0:F.data;te===void 0&&(te=Q.data);const ae=te!==void 0,ie=Q.isLoading,oe=(!F||F.isLoading||F.isUninitialized)&&!ae&&ie,se=Q.isSuccess||ie&&ae;return{...Q,data:te,currentData:Q.data,isFetching:ie,isLoading:oe,isSuccess:se}}function C(Q,F){const O=n(),te=useShallowStableValue(F);return React.useCallback((ae,ie)=>O(e.util.prefetch(Q,ae,{...te,...ie})),[Q,O,te])}function E(Q,F,{refetchOnReconnect:O,refetchOnFocus:te,refetchOnMountOrArgChange:ae,skip:ie=!1,pollingInterval:oe=0,skipPollingIfUnfocused:se=!1,...Ae}={}){const{initiate:Ne}=e.endpoints[Q],ge=n(),Oe=React.useRef(void 0);if(!Oe.current){const Ye=ge(e.internalActions.internal_getRTKQSubscriptions());if(process.env.NODE_ENV!=="production"&&(typeof Ye!="object"||typeof(Ye==null?void 0:Ye.type)=="string"))throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(37):`Warning: Middleware for RTK-Query API at reducerPath "${e.reducerPath}" has not been added to the store.
|
|
352
352
|
You must add the middleware for RTK-Query to function correctly!`);Oe.current=Ye}const Le=useStableQueryArgs(ie?skipToken:F,defaultSerializeQueryArgs,b.endpointDefinitions[Q],Q),Ge=useShallowStableValue({refetchOnReconnect:O,refetchOnFocus:te,pollingInterval:oe,skipPollingIfUnfocused:se}),je=Ae.initialPageParam,Be=useShallowStableValue(je),qe=React.useRef(void 0);let{queryCacheKey:ze,requestId:Ue}=qe.current||{},Xe=!1;ze&&Ue&&(Xe=Oe.current.isRequestSubscribed(ze,Ue));const Je=!Xe&&qe.current!==void 0;return _(()=>{Je&&(qe.current=void 0)},[Je]),_(()=>{var Ke;const Ye=qe.current;if(typeof process<"u"&&process.env.NODE_ENV==="removeMeOnCompilation"&&console.log(Je),Le===skipToken){Ye==null||Ye.unsubscribe(),qe.current=void 0;return}const it=(Ke=qe.current)==null?void 0:Ke.subscriptionOptions;if(!Ye||Ye.arg!==Le){Ye==null||Ye.unsubscribe();const et=ge(Ne(Le,{subscriptionOptions:Ge,forceRefetch:ae,...isInfiniteQueryDefinition(b.endpointDefinitions[Q])?{initialPageParam:Be}:{}}));qe.current=et}else Ge!==it&&Ye.updateSubscriptionOptions(Ge)},[ge,Ne,ae,Le,Ge,Je,Be,Q]),[qe,ge,Ne,Ge]}function M(Q,F){return(te,{skip:ae=!1,selectFromResult:ie}={})=>{const{select:oe}=e.endpoints[Q],se=useStableQueryArgs(ae?skipToken:te,g,b.endpointDefinitions[Q],Q),Ae=React.useRef(void 0),Ne=React.useMemo(()=>f([oe(se),(je,Be)=>Be,je=>se],F,{memoizeOptions:{resultEqualityCheck:shallowEqual$1}}),[oe,se]),ge=React.useMemo(()=>ie?f([Ne],ie,{devModeChecks:{identityFunctionCheck:"never"}}):Ne,[Ne,ie]),Oe=o(je=>ge(je,Ae.current),shallowEqual$1),Le=l(),Ge=Ne(Le.getState(),Ae.current);return useIsomorphicLayoutEffect$1(()=>{Ae.current=Ge},[Ge]),Oe}}function I(Q){React.useEffect(()=>()=>{var F,O;(O=(F=Q.current)==null?void 0:F.unsubscribe)==null||O.call(F),Q.current=void 0},[Q])}function A(Q){if(!Q.current)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(38):"Cannot refetch a query that has not been started yet.");return Q.current.refetch()}function V(Q){const F=(ae,ie={})=>{const[oe]=E(Q,ae,ie);return I(oe),React.useMemo(()=>({refetch:()=>A(oe)}),[oe])},O=({refetchOnReconnect:ae,refetchOnFocus:ie,pollingInterval:oe=0,skipPollingIfUnfocused:se=!1}={})=>{const{initiate:Ae}=e.endpoints[Q],Ne=n(),[ge,Oe]=React.useState(UNINITIALIZED_VALUE),Le=React.useRef(void 0),Ge=useShallowStableValue({refetchOnReconnect:ae,refetchOnFocus:ie,pollingInterval:oe,skipPollingIfUnfocused:se});_(()=>{var Ue,Xe;const ze=(Ue=Le.current)==null?void 0:Ue.subscriptionOptions;Ge!==ze&&((Xe=Le.current)==null||Xe.updateSubscriptionOptions(Ge))},[Ge]);const je=React.useRef(Ge);_(()=>{je.current=Ge},[Ge]);const Be=React.useCallback(function(ze,Ue=!1){let Xe;return t(()=>{var Je;(Je=Le.current)==null||Je.unsubscribe(),Le.current=Xe=Ne(Ae(ze,{subscriptionOptions:je.current,forceRefetch:!Ue})),Oe(ze)}),Xe},[Ne,Ae]),qe=React.useCallback(()=>{var ze,Ue;(ze=Le.current)!=null&&ze.queryCacheKey&&Ne(e.internalActions.removeQueryResult({queryCacheKey:(Ue=Le.current)==null?void 0:Ue.queryCacheKey}))},[Ne]);return React.useEffect(()=>()=>{var ze;(ze=Le==null?void 0:Le.current)==null||ze.unsubscribe()},[]),React.useEffect(()=>{ge!==UNINITIALIZED_VALUE&&!Le.current&&Be(ge,!0)},[ge,Be]),React.useMemo(()=>[Be,ge,{reset:qe}],[Be,ge,qe])},te=M(Q,S);return{useQueryState:te,useQuerySubscription:F,useLazyQuerySubscription:O,useLazyQuery(ae){const[ie,oe,{reset:se}]=O(ae),Ae=te(oe,{...ae,skip:oe===UNINITIALIZED_VALUE}),Ne=React.useMemo(()=>({lastArg:oe}),[oe]);return React.useMemo(()=>[ie,{...Ae,reset:se},Ne],[ie,Ae,se,Ne])},useQuery(ae,ie){const oe=F(ae,ie),se=te(ae,{selectFromResult:ae===skipToken||ie!=null&&ie.skip?void 0:noPendingQueryStateSelector,...ie}),Ae=pick(se,...COMMON_HOOK_DEBUG_FIELDS);return React.useDebugValue(Ae),React.useMemo(()=>({...se,...oe}),[se,oe])}}}function q(Q){const F=(te,ae={})=>{const[ie,oe,se,Ae]=E(Q,te,ae),Ne=React.useRef(Ae);_(()=>{Ne.current=Ae},[Ae]);const ge=React.useCallback(function(Ge,je){let Be;return t(()=>{var qe;(qe=ie.current)==null||qe.unsubscribe(),ie.current=Be=oe(se(Ge,{subscriptionOptions:Ne.current,direction:je}))}),Be},[ie,oe,se]);I(ie);const Oe=useStableQueryArgs(ae.skip?skipToken:te,defaultSerializeQueryArgs,b.endpointDefinitions[Q],Q),Le=React.useCallback(()=>A(ie),[ie]);return React.useMemo(()=>({trigger:ge,refetch:Le,fetchNextPage:()=>ge(Oe,"forward"),fetchPreviousPage:()=>ge(Oe,"backward")}),[Le,ge,Oe])},O=M(Q,R);return{useInfiniteQueryState:O,useInfiniteQuerySubscription:F,useInfiniteQuery(te,ae){const{refetch:ie,fetchNextPage:oe,fetchPreviousPage:se}=F(te,ae),Ae=O(te,{selectFromResult:te===skipToken||ae!=null&&ae.skip?void 0:noPendingQueryStateSelector,...ae}),Ne=pick(Ae,...COMMON_HOOK_DEBUG_FIELDS,"hasNextPage","hasPreviousPage");return React.useDebugValue(Ne),React.useMemo(()=>({...Ae,fetchNextPage:oe,fetchPreviousPage:se,refetch:ie}),[Ae,oe,se,ie])}}}function z(Q){return({selectFromResult:F,fixedCacheKey:O}={})=>{const{select:te,initiate:ae}=e.endpoints[Q],ie=n(),[oe,se]=React.useState();React.useEffect(()=>()=>{oe!=null&&oe.arg.fixedCacheKey||oe==null||oe.reset()},[oe]);const Ae=React.useCallback(function(ze){const Ue=ie(ae(ze,{fixedCacheKey:O}));return se(Ue),Ue},[ie,ae,O]),{requestId:Ne}=oe||{},ge=React.useMemo(()=>te({fixedCacheKey:O,requestId:oe==null?void 0:oe.requestId}),[O,oe,te]),Oe=React.useMemo(()=>F?f([ge],F):ge,[F,ge]),Le=o(Oe,shallowEqual$1),Ge=O==null?oe==null?void 0:oe.arg.originalArgs:void 0,je=React.useCallback(()=>{t(()=>{oe&&se(void 0),O&&ie(e.internalActions.removeMutationResult({requestId:Ne,fixedCacheKey:O}))})},[ie,O,oe,Ne]),Be=pick(Le,...COMMON_HOOK_DEBUG_FIELDS,"endpointName");React.useDebugValue(Be);const qe=React.useMemo(()=>({...Le,originalArgs:Ge,reset:je}),[Le,Ge,je]);return React.useMemo(()=>[Ae,qe],[Ae,qe])}}}var reactHooksModuleName=Symbol(),reactHooksModule=({batch:e=batch,hooks:t={useDispatch,useSelector,useStore},createSelector:n=createSelector,unstable__sideEffectsInRender:o=!1,...l}={})=>{if(process.env.NODE_ENV!=="production"){const d=["useDispatch","useSelector","useStore"];let f=!1;for(const g of d)if(countObjectKeys(l)>0&&(l[g]&&(f||(console.warn("As of RTK 2.0, the hooks now need to be specified as one object, provided under a `hooks` key:\n`reactHooksModule({ hooks: { useDispatch, useSelector, useStore } })`"),f=!0)),t[g]=l[g]),typeof t[g]!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage(36):`When using custom hooks for context, all ${d.length} hooks need to be provided: ${d.join(", ")}.
|
|
353
|
-
Hook ${g} was either not provided or not a function.`)}return{name:reactHooksModuleName,init(d,{serializeQueryArgs:f},g){const b=d,{buildQueryHooks:_,buildInfiniteQueryHooks:S,buildMutationHook:R,usePrefetch:C}=buildHooks({api:d,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:o,createSelector:n},serializeQueryArgs:f,context:g});return safeAssign(b,{usePrefetch:C}),safeAssign(g,{batch:e}),{injectEndpoint(E,M){if(isQueryDefinition(M)){const{useQuery:I,useLazyQuery:A,useLazyQuerySubscription:V,useQueryState:q,useQuerySubscription:z}=_(E);safeAssign(b.endpoints[E],{useQuery:I,useLazyQuery:A,useLazyQuerySubscription:V,useQueryState:q,useQuerySubscription:z}),d[`use${capitalize(E)}Query`]=I,d[`useLazy${capitalize(E)}Query`]=A}if(isMutationDefinition(M)){const I=R(E);safeAssign(b.endpoints[E],{useMutation:I}),d[`use${capitalize(E)}Mutation`]=I}else if(isInfiniteQueryDefinition(M)){const{useInfiniteQuery:I,useInfiniteQuerySubscription:A,useInfiniteQueryState:V}=S(E);safeAssign(b.endpoints[E],{useInfiniteQuery:I,useInfiniteQuerySubscription:A,useInfiniteQueryState:V}),d[`use${capitalize(E)}InfiniteQuery`]=I}}}}}},createApi=buildCreateApi(coreModule(),reactHooksModule());const emptySplitApi=createApi({reducerPath:"randmarApi",baseQuery:fetchBaseQuery({baseUrl:"https://api.randmar.io",prepareHeaders:e=>{const t=localStorage.getItem("access_token");return t&&e.set("Authorization",`Bearer ${t}`),e}}),endpoints:()=>({})}),injectedRtkApi=emptySplitApi.injectEndpoints({endpoints:e=>({getV4ShopifyByShopifyHostNameAccount:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account`})}),postV4ShopifyByShopifyHostNameAccountSynchronizationAndSynchronizationType:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/Synchronization/${t.synchronizationType}`,method:"POST",params:{newValue:t.newValue}})}),postV4ShopifyByShopifyHostNameAccountAndPropertyName:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/${t.propertyName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ShopifyByShopifyHostNameAccountDefaultShippingSlipComment:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/DefaultShippingSlipComment`,method:"POST",params:{newValue:t.newValue}})}),putV4ShopifyByShopifyHostNameAccountLink:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/Link`,method:"PUT",params:{applicationId:t.applicationId,postalCode:t.postalCode}})}),getV4ResellerByRouteResellerIdAccountGeneral:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Account/General`,params:{withSpecification:t.withSpecification}})}),getV4PartnerByApplicationIdAccount:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account`})}),postV4PartnerByApplicationIdAccountAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountAbout:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/About`,method:"POST",body:t.body})}),getV4PartnerByApplicationIdAccountLogo:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo`,params:{width:t.width,height:t.height,align:t.align}})}),postV4PartnerByApplicationIdAccountLogo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo`,method:"POST",body:t.body})}),getV4PartnerByApplicationIdAccountLogoExists:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo/Exists`})}),getV4PartnerByApplicationIdAccountVideo:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`})}),postV4PartnerByApplicationIdAccountVideo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`,method:"POST",body:t.body})}),putV4PartnerByApplicationIdAccountVideo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`,method:"PUT"})}),getV4PartnerByApplicationIdAccountVideoExists:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video/Exists`})}),getV4PartnerByApplicationIdAccountManufacturer:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer`,params:{withSpecification:t.withSpecification}})}),putV4PartnerByApplicationIdAccountManufacturer:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer`,method:"PUT"})}),getV4PartnerByApplicationIdAccountReseller:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller`,params:{withSpecification:t.withSpecification}})}),putV4PartnerByApplicationIdAccountReseller:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller`,method:"PUT"})}),putV4PartnerByApplicationIdAccountBilling:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Billing`,method:"PUT",body:t.newBillingInformation})}),putV4PartnerByApplicationIdAccountSalesAgency:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/SalesAgency`,method:"PUT"})}),postV4PartnerByApplicationIdAccountFeedback:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Feedback`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),postV4PartnerByApplicationIdAccountDebugFeedback:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/DebugFeedback`,method:"POST",body:t.body,params:{emailAddress:t.emailAddress}})}),postV4PartnerByApplicationIdAccountManufacturerAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountManufacturerAbout:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer/About`,method:"POST",body:t.body})}),postV4PartnerByApplicationIdAccountResellerAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerCreditLimit:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/CreditLimit`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerPriority:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/Priority`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerTier:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/Tier`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdAccountSocialAndSocialNetwork:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Social/${t.socialNetwork}`,method:"PUT",params:{tag:t.tag}})}),deleteV4PartnerByApplicationIdAccountSocialAndSocialNetwork:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Social/${t.socialNetwork}`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdAccount:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Account`,params:{withSpecification:t.withSpecification}})}),getV4AgencyByRouteAgencyId:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}`})}),putV4ResellerByRouteResellerIdAutoPoExtract:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Auto/POExtract`,method:"PUT",body:t.body})}),getV4ResellerByRouteResellerIdBilling:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing`})}),getV4ResellerByRouteResellerIdBillingInvoices:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Invoices`})}),getV4ResellerByRouteResellerIdBillingPayments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Payments`})}),getV4ResellerByRouteResellerIdBillingCredits:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Credits`})}),getV4ResellerByRouteResellerIdBillingLastPayment:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/LastPayment`})}),getV4ResellerByRouteResellerIdBillingStatementDetails:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/StatementDetails`})}),postV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerId:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversation/Partner/${t.partnerId}`,method:"POST",params:{message:t.message}})}),getV4PartnerByApplicationIdBusinessDevelopmentConversations:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversations`})}),getV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessages:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversation/${t.conversationId}/Messages`})}),getV4ResellerByRouteResellerIdCartAndCartName:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/${t.cartName}`})}),deleteV4ResellerByRouteResellerIdCartAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/${t.cartName}`,method:"DELETE"})}),postV4ResellerByRouteResellerIdCartGenerateAndPostalCode:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/Generate/${t.postalCode}`,method:"POST"})}),postV4ResellerByRouteResellerIdCartAddItemAndCartNameRandmarSku:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/AddItem/${t.cartName}/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,bidNumber:t.bidNumber}})}),postV4ResellerByRouteResellerIdCartAddItemAndCartNameRandmarSkuDefaultOpportunity:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/AddItem/${t.cartName}/${t.randmarSku}/DefaultOpportunity`,method:"POST",params:{quantity:t.quantity}})}),postV4ResellerByRouteResellerIdCartShippingMethodsAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/ShippingMethods/${t.cartName}`,method:"POST",body:t.shipToDetails})}),postV4ResellerByRouteResellerIdCartProcessAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/Process/${t.cartName}`,method:"POST",body:t.shipToLocation})}),getV4ResellerByRouteResellerIdCarts:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Carts`})}),deleteV4ResellerByRouteResellerIdCarts:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Carts`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdCategories:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Categories`})}),getV4ManufacturerByRouteManufacturerIdCategoriesNiches:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Categories/Niches`,params:{routeResellerId:t.routeResellerId}})}),getV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`})}),putV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`,method:"PUT"})}),deleteV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeAGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/A_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeBGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/B_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeCGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/C_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeDGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/D_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeCostGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Cost_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeReset:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Reset`,method:"POST"})}),putV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeStarred:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Starred`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Image`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdCommunication:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication`})}),putV4ResellerByRouteResellerIdCommunication:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication`,method:"PUT",body:t.body})}),getV4ResellerByRouteResellerIdCommunications:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications`})}),putV4ResellerByRouteResellerIdCommunications:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications`,method:"PUT",body:t.body})}),putV4ResellerByRouteResellerIdCommunicationAndSubjectManufacturerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication/${t.subject}/${t.manufacturerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),putV4ResellerByRouteResellerIdCommunicationsAndSubjectManufacturerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications/${t.subject}/${t.manufacturerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),deleteV4ResellerByRouteResellerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication/${t.subject}/${t.resellerId}`,method:"DELETE",params:{manufacturerId:t.manufacturerId,dateTime:t.dateTime}})}),deleteV4ResellerByRouteResellerIdCommunicationsAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications/${t.subject}/${t.resellerId}`,method:"DELETE",params:{manufacturerId:t.manufacturerId,dateTime:t.dateTime}})}),putV4ManufacturerByRouteManufacturerIdCommunication:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication/${t.subject}/${t.resellerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),deleteV4ManufacturerByRouteManufacturerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication/${t.subject}/${t.resellerId}`,method:"DELETE",params:{dateTime:t.dateTime}})}),getV4ManufacturerByRouteManufacturerIdCommunications:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communications`})}),getV4ResellerByRouteResellerIdCustomer:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Customer`,params:{customerName:t.customerName}})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}`})}),getV4ResellerByRouteResellerIdDocumentFormalNotice:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/FormalNotice`,params:{amount:t.amount}})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumberWarehouse:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/Warehouse`})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdf:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/PDF`})}),postV4ResellerByRouteResellerIdDocumentAndDocumentNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),postV4ResellerByRouteResellerIdDocumentStatementEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/Statement/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),getV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}`})}),getV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberPdf:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}/PDF`})}),postV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),putV4ManufacturerByRouteManufacturerIdDocumentSalesOrderAndOrderNumberExecute:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/SalesOrder/${t.orderNumber}/Execute`,method:"PUT"})}),getV4ManufacturerByRouteManufacturerIdDocumentSalesOrderAndOrderNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/SalesOrder/${t.orderNumber}`})}),getV4ResellerByRouteResellerIdDocumentsActiveOrderDetails:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Documents/ActiveOrderDetails`})}),getV4ResellerByRouteResellerIdDocumentsGeneralDocuments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Documents/GeneralDocuments`})}),getV4ManufacturerByRouteManufacturerIdDocumentsRequisitions:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Requisitions`})}),getV4ManufacturerByRouteManufacturerIdDocumentRequisitions:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Requisitions`})}),getV4ManufacturerByRouteManufacturerIdDocumentsPurchaseOrders:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/PurchaseOrders`})}),getV4ManufacturerByRouteManufacturerIdDocumentPurchaseOrders:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/PurchaseOrders`})}),getV4ManufacturerByRouteManufacturerIdDocumentsReceipts:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Receipts`})}),getV4ManufacturerByRouteManufacturerIdDocumentReceipts:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Receipts`})}),getV4ManufacturerByRouteManufacturerIdDocumentsInvoices:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Invoices`})}),getV4ManufacturerByRouteManufacturerIdDocumentInvoices:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Invoices`})}),getV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/ActiveOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentActiveOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/ActiveOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentsCompletedOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/CompletedOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentCompletedOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/CompletedOrderDetails`})}),putV4ManufacturerByRouteManufacturerIdDraftPurchases:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/DraftPurchases`,method:"PUT"})}),putV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"PUT"})}),postV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"POST"})}),deleteV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"DELETE"})}),getV4PartnerByApplicationIdIntegrationKeys:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKeys`})}),getV4ManufacturerByRouteManufacturerIdInventoryValue:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Inventory/Value`})}),putV4ManufacturerByRouteManufacturerIdInvoiceAndReceiptNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Invoice/${t.receiptNumber}`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdInvoiceMiscellaneous:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Invoice/Miscellaneous`,method:"PUT",body:t.body})}),getV4PartnerByApplicationIdJobs:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Jobs`})}),getV4PartnerByApplicationIdLogs:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Logs`})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerId:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}`,params:{withSpecification:t.withSpecification}})}),postV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerIdSalesStatistics:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCode:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/${t.categoryCode}`})}),postV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/${t.categoryCode}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdManufacturers:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4PartnerByApplicationIdManufacturers:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4AgencyByRouteAgencyIdManufacturers:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4ResellerByRouteResellerIdMediaAndDocumentNumberSubfolder:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Media/${t.documentNumber}/${t.subfolder}`})}),putV4ResellerByRouteResellerIdMediaAndDocumentNumberSubfolderShort:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Media/${t.documentNumber}/${t.subfolder}/Short`,method:"PUT",body:t.convertToShortModel})}),getV4PartnerByApplicationIdMediaShorts:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Shorts`})}),getV4PartnerByApplicationIdMediaShortAndFileName:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`})}),postV4PartnerByApplicationIdMediaShortAndFileName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`,method:"POST",params:{newValue:t.newValue}})}),deleteV4PartnerByApplicationIdMediaShortAndFileName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`,method:"DELETE"})}),putV4PartnerByApplicationIdMediaTextToSpeech:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/TextToSpeech`,method:"PUT",body:t.textToSpeechModel})}),putV4PartnerByApplicationIdMediaShortsFromLong:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/ShortsFromLong`,method:"PUT",body:t.shortsFromLongModel})}),getV4ResellerByRouteResellerIdNicheAndNicheNameManufacturers:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Niche/${t.nicheName}/Manufacturers`})}),getV4ResellerByRouteResellerIdOpportunities:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunities`})}),getV4ManufacturerByRouteManufacturerIdOpportunities:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunities`})}),getV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}`,params:{withSpecification:t.withSpecification}})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),putV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefault:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/Default`,method:"PUT",params:{opportunityNumber:t.opportunityNumber}})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/File`,method:"POST"})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),putV4ManufacturerByRouteManufacturerIdOpportunity:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,method:"PUT",body:t.body})}),getV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,params:{withSpecification:t.withSpecification}})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),putV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/Reseller/${t.resellerId}`,method:"PUT"})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/Reseller/${t.resellerId}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberPartNumberRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/PartNumber/${t.randmarSku}`,method:"POST",params:{bidPrice:t.bidPrice,bidPriceType:t.bidPriceType}})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberPartNumberRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/PartNumber/${t.randmarSku}`,method:"DELETE"})}),getV4ResellerByRouteResellerIdOrderAndOrderNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}`,params:{withSpecification:t.withSpecification}})}),putV4ResellerByRouteResellerIdOrderAndOrderNumberComment:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Comment`,method:"PUT",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdOrderAndDocumentNumberShippingSlip:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.documentNumber}/ShippingSlip`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdOrderPoNumberAndResellerPoNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/PONumber/${t.resellerPoNumber}`})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),deleteV4ResellerByRouteResellerIdOrderAndOrderNumberCancel:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Cancel`,method:"DELETE",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberChangeLocation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ChangeLocation`,method:"POST",params:{location:t.location}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberOnHold:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/OnHold`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShipViaChange:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShipVia/Change`,method:"POST",params:{shipVia:t.shipVia}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberChangeShipVia:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ChangeShipVia`,method:"POST",params:{shipVia:t.shipVia}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShipViaEstimate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShipVia/Estimate`,method:"POST"})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditInformation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditInformation`,method:"POST",params:{endUserPONumber:t.endUserPoNumber,shippingDate:t.shippingDate,shipToName:t.shipToName,shipToAddress1:t.shipToAddress1,shipToAddress2:t.shipToAddress2,shipToCity:t.shipToCity,shipToProvince:t.shipToProvince,shipToPostalCode:t.shipToPostalCode,shipToContactName:t.shipToContactName,shipToContactPhone:t.shipToContactPhone}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,unitPrice:t.unitPrice}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberOrderDate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/OrderDate`,method:"POST",params:{newvalue:t.newvalue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShippingDate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShippingDate`,method:"POST",params:{newvalue:t.newvalue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberExpeditionLine:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ExpeditionLine`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberPoNumber:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/PONumber`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEndUserPoNumber:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EndUserPONumber`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberToday:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Today`,method:"POST"})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditChargeMiscellaneousCharge:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditCharge/${t.miscellaneousCharge}`,method:"POST",params:{price:t.price}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditMiscellaneousChargeMiscellaneousCharge:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditMiscellaneousCharge/${t.miscellaneousCharge}`,method:"POST",params:{price:t.price}})}),getV4ResellerByRouteResellerIdOrders:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Orders`})}),getV4ResellerByRouteResellerIdOrdersShipments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Orders/Shipments`})}),getV4PartnerByApplicationIdPartnerAndPartnerId:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Partner/${t.partnerId}`,params:{withSpecification:t.withSpecification}})}),putV4AgencyByRouteAgencyIdPartnerAndNewUserEmailAddress:e.mutation({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Partner/${t.newUserEmailAddress}`,method:"PUT"})}),getV4ShopifyByShopifyHostNameProductAndRandmarSku:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Product/${t.randmarSku}`})}),getV4ResellerByRouteResellerIdProductAndRandmarSku:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}`,params:{withSpecification:t.withSpecification,shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdProductAndRandmarSkuSalesStatistics:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ResellerByRouteResellerIdProductAndRandmarSkuShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName,opportunityNumber:t.opportunityNumber}})}),postV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyInventory:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Shopify/Inventory`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),putV4ResellerByRouteResellerIdProductAndRandmarSkuRequisition:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Requisition`,method:"PUT",params:{location:t.location,quantity:t.quantity}})}),putV4ResellerByRouteResellerIdProductAndRandmarSkuSerialize:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Serialize`,method:"PUT"})}),getV4PartnerByApplicationIdProductAndRandmarSku:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Product/${t.randmarSku}`,params:{withSpecification:t.withSpecification,shopifyHostName:t.shopifyHostName}})}),putV4PartnerByApplicationIdProductAndRandmarSkuShort:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Product/${t.randmarSku}/Short`,method:"PUT",body:t.productConvertToShortModel})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}`,params:{withSpecification:t.withSpecification}})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumberSalesStatistics:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),putV4ManufacturerByRouteManufacturerIdProduct:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberBodyHtml:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/BodyHTML`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberRandmarTitle:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/RandmarTitle`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberDiscontinue:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/Discontinue`,method:"POST"})}),deleteV4ManufacturerByRouteManufacturerIdProductAndProductNumberOrderNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/${t.orderNumber}`,method:"DELETE",params:{comment:t.comment}})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberUpc:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/UPC`,method:"POST",params:{newValue:t.newValue}})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuInstantRebate:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/InstantRebate`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuRequisition:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Requisition`,method:"PUT",params:{location:t.location,quantity:t.quantity}})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Image`,method:"POST",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Image`,method:"PUT"})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber3DModel:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/3DModel`})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber3DModelExists:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/3DModel/Exists`})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSku3DModel:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/3DModel`,method:"POST",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuVideo:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Video`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuVideo:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Video`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdProductsNiches:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Niches`})}),getV4ResellerByRouteResellerIdProductsReceivings:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Receivings`})}),getV4ResellerByRouteResellerIdProductsInstantRebates:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/InstantRebates`})}),getV4ResellerByRouteResellerIdProductsNewest:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Newest`})}),getRandmar:e.query({query:()=>({url:"/Randmar"})}),getRandmarVideo:e.query({query:()=>({url:"/Randmar/Video"})}),getWarehouses:e.query({query:()=>({url:"/Warehouses"})}),getV4Warehouses:e.query({query:()=>({url:"/V4/Warehouses"})}),getManufacturers:e.query({query:()=>({url:"/Manufacturers"})}),getManufacturerByPublicName:e.query({query:t=>({url:`/Manufacturer/${t.publicName}`})}),getManufacturerByPublicNameAndCategoryName:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/${t.categoryName}`})}),getManufacturerByPublicNameLogo:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/Logo`,params:{width:t.width,height:t.height}})}),getManufacturerByPublicNameVideo:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/Video`})}),getManufacturerByPublicNameAndCategoryNameImage:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/${t.categoryName}/Image`,params:{width:t.width,height:t.height}})}),getProductsVideosMostRecent:e.query({query:()=>({url:"/Products/Videos/MostRecent"})}),getProductsVideos:e.query({query:()=>({url:"/Products/Videos"})}),getProductByProductNumber:e.query({query:t=>({url:`/Product/${t.productNumber}`})}),getProductByProductNumberImage:e.query({query:t=>({url:`/Product/${t.productNumber}/Image`,params:{width:t.width,height:t.height}})}),getProductByProductNumberImageExists:e.query({query:t=>({url:`/Product/${t.productNumber}/Image/Exists`})}),getProductByProductNumber3DModelExists:e.query({query:t=>({url:`/Product/${t.productNumber}/3DModel/Exists`})}),getProductByProductNumberVideo:e.query({query:t=>({url:`/Product/${t.productNumber}/Video`})}),getProductByProductNumberVideoExists:e.query({query:t=>({url:`/Product/${t.productNumber}/Video/Exists`})}),getShortsGenerationContentScenes:e.query({query:()=>({url:"/ShortsGenerationContent/Scenes"})}),getShortsGenerationContentSceneBySceneName:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}`})}),getShortsGenerationContentSceneBySceneNameThumbnail:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/Thumbnail`})}),getShortsGenerationContentSceneBySceneNamePreview:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/Preview`})}),getShortsGenerationContentSceneBySceneNameCameraScript:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/CameraScript`})}),getShortsGenerationContentSceneDefaultAmbientSound:e.query({query:()=>({url:"/ShortsGenerationContent/Scene/Default/AmbientSound"})}),getShortsGenerationContentSceneBySceneNameAmbientSound:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/AmbientSound`})}),putV4ManufacturerByRouteManufacturerIdPurchaseOrder:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder`,method:"PUT",body:t.body,params:{sendToManufacturer:t.sendToManufacturer}})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderCreditCheck:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/CreditCheck`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditExpectedDate:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/EditExpectedDate`,method:"POST",params:{newValue:t.newValue}})}),deleteV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}`,method:"DELETE"})}),putV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberSend:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/Send`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,unitPrice:t.unitPrice,editStandardCost:t.editStandardCost}})}),postV4ResellerByRouteResellerIdReportHpAmplifiedEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/HP Amplified/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportUniversalEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportProductsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportUniversalFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportProductsFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportUniversalJson:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/JSON`,method:"POST"})}),postV4ResellerByRouteResellerIdReportProductsJson:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/JSON`,method:"POST"})}),postV4ResellerByRouteResellerIdReportShipmentsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Shipments/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportInvoicesEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Invoices/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ResellerByRouteResellerIdReportOpenOrdersEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/OpenOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportReturnsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Returns/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportOpportunitiesEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Opportunities/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportAmazonTrackingFileEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/AmazonTrackingFile/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportAmazonTrackingFileFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/AmazonTrackingFile/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportWalmartTrackingFileEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/WalmartTrackingFile/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportWalmartTrackingFileFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/WalmartTrackingFile/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportReorderEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportResellersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Resellers/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportReorderFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportReorderAndWarehouseLocationJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/${t.warehouseLocation}/JSON`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportSalesEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/${t.resellerId}/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/File`,method:"POST",params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/JSON`,method:"POST",params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportBestCanadianFulfillmentCenters:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/BestCanadianFulfillmentCenters`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdReportInventoryEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/Email`,method:"POST",params:{emailAddress:t.emailAddress,inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportInventoryFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/File`,method:"POST",params:{inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportInventoryJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/JSON`,method:"POST",params:{inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportClaimEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Claim/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/OpenOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportOpenOrdersJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/OpenOrders/JSON`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportProductsEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportProductsFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportProductsTsv:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/TSV`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportProductsJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/JSON`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/PurchasedOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/PurchasedOrders/File`,method:"POST"})}),deleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition/${t.requisitionNumber}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition/${t.requisitionNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity}})}),putV4ManufacturerByRouteManufacturerIdRequisition:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition`,method:"PUT",body:t.body})}),getV4ManufacturerByRouteManufacturerIdResellerAndResellerId:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}`,params:{withSpecification:t.withSpecification}})}),getV4ManufacturerByRouteManufacturerIdResellerAndResellerIdSalesStatistics:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),getV4ManufacturerByRouteManufacturerIdResellerQualificationAndQualificationId:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/Qualification/${t.qualificationId}`,params:{withSpecification:t.withSpecification}})}),putV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualification:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/Qualification`,method:"PUT",params:{newValue:t.newValue}})}),deleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualification:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/Qualification`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdResellers:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Resellers`})}),getV4AgencyByRouteAgencyIdResellers:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Resellers`,params:{withSpecification:t.withSpecification}})}),getV4ResellerByRouteResellerIdReturnAndReturnNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}`})}),postV4ResellerByRouteResellerIdReturnCreate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/Create`,method:"POST",body:t.returnRequest})}),putV4ResellerByRouteResellerIdReturnAndReturnNumberClaim:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Claim`,method:"PUT"})}),putV4ResellerByRouteResellerIdReturnAndReturnNumberManufacturerRma:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/ManufacturerRMA`,method:"PUT",body:t.manufacturerRma})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberAddComment:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/AddComment`,method:"POST",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberRandmarSkuEditReason:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/${t.randmarSku}/EditReason`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberRandmarSkuEditQuantity:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/${t.randmarSku}/EditQuantity`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberAccept:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Accept`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberReceive:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Receive`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberWarehouseLocation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/WarehouseLocation`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberEligible:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Eligible`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberCredit:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Credit`,method:"POST",params:{creditNumber:t.creditNumber}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberDecline:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Decline`,method:"POST"})}),getV4ResellerByRouteResellerIdReturns:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Returns`})}),getV4ManufacturerByRouteManufacturerIdReturns:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Returns`})}),getV4ShopifyByShopifyHostNameSearch:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Search`,params:{q:t.q}})}),getV4ResellerByRouteResellerIdSearch:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Search`,params:{s:t.s}})}),getV4PartnerByRouteApplicationIdSearch:e.query({query:t=>({url:`/V4/Partner/${t.routeApplicationId}/Search`,params:{q:t.q}})}),getV4ManufacturerByRouteManufacturerIdSearch:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Search`,params:{s:t.s}})}),putV4ResellerByRouteResellerIdShippingLabelGenerate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Generate`,method:"PUT",body:t.shipmentDetails})}),putV4ResellerByRouteResellerIdShippingLabelLogistics:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Logistics`,method:"PUT",body:t.shipmentDetails})}),postV4ResellerByRouteResellerIdShippingLabelEstimate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Estimate`,method:"POST",body:t.shipmentDetails})}),getV4ResellerByRouteResellerIdShopifyAccounts:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/Accounts`})}),putV4ResellerByRouteResellerIdShopifyAndShopifyhostNameFulfillmentShopifyFulfillmentOrderIrderIdRequest:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/${t.shopifyhostName}/Fulfillment/${t.shopifyFulfillmentOrderIrderId}/Request`,method:"PUT"})}),deleteV4ResellerByRouteResellerIdShopifyAndShopifyhostNameFulfillmentShopifyFulfillmentOrderIrderId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/${t.shopifyhostName}/Fulfillment/${t.shopifyFulfillmentOrderIrderId}`,method:"DELETE"})}),getV4PartnerByApplicationIdShopify:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify`,params:{withToken:t.withToken}})}),postV4PartnerByApplicationIdShopifyValidate:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Validate`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),postV4PartnerByApplicationIdShopifySynchronizationAndSynchronizationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Synchronization/${t.synchronizationType}`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),postV4PartnerByApplicationIdShopifyAndPropertyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/${t.propertyName}`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),postV4PartnerByApplicationIdShopifyDefaultShippingSlipComment:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/DefaultShippingSlipComment`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),putV4PartnerByApplicationIdShopifyWebhookAndModuleStatus:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Webhook/${t.module}/${t.status}`,method:"PUT",params:{shopifyHostName:t.shopifyHostName}})}),deleteV4PartnerByApplicationIdShopifyWebhookAndModuleStatus:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Webhook/${t.module}/${t.status}`,method:"DELETE",params:{shopifyHostName:t.shopifyHostName}})}),putV4PartnerByApplicationIdUserAndEmailAddress:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}`,method:"PUT"})}),deleteV4PartnerByApplicationIdUserAndEmailAddress:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}`,method:"DELETE"})}),postV4PartnerByApplicationIdUserAndEmailAddressActive:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Active`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdUserAndEmailAddressNotificationNotificationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Notification/${t.notificationType}`,method:"PUT"})}),deleteV4PartnerByApplicationIdUserAndEmailAddressNotificationNotificationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Notification/${t.notificationType}`,method:"DELETE"})}),getV4PartnerByApplicationIdUsers:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Users`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseId:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdPurchaseOrders:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/PurchaseOrders`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdReturns:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Returns`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdOrders:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Orders`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdShipments:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Shipments`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdRequisitions:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Requisitions`})}),postV4PartnerByApplicationIdWarehouseAndWarehouseIdFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegration:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration`,method:"PUT",body:t.body})}),deleteV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegrationCarrierCode:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration/${t.carrierCode}`,method:"DELETE"})}),postV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegrationCarrierCode:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration/${t.carrierCode}`,method:"POST",params:{isActive:t.isActive}})}),putV4PartnerByApplicationIdWarehouse:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse`,method:"PUT",body:t.body})}),getV4PartnerByApplicationIdWarehouses:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouses`})})}),overrideExisting:!1}),{useLazyGetV4PartnerByApplicationIdAccountQuery,useGetV4PartnerByApplicationIdAccountResellerQuery,usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation,usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation,usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation,useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery,useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery,usePutV4ResellerByRouteResellerIdCommunicationMutation,usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation,useGetV4ResellerByRouteResellerIdDocumentsActiveOrderDetailsQuery,useGetV4PartnerByApplicationIdManufacturersQuery,usePostV4ResellerByRouteResellerIdReportProductsEmailMutation,usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation,usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation,usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation,usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation}=injectedRtkApi;injectedRtkApi.enhanceEndpoints({addTagTypes:["Conversations"],endpoints:{getV4PartnerByApplicationIdBusinessDevelopmentConversations:{providesTags:["Conversations"]},postV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerId:{invalidatesTags:["Conversations"]}}});const PublicInfo=({reseller:e,appID:t,isLoading:n,readonly:o,onUnsavedChanges:l})=>{const{toast:d}=useToast(),[f]=usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation(),[g,b]=React.useState({}),_=React.useMemo(()=>({publicEmail:e.PublicEmail??"",contactName:e.ContactName??"",phone:e.Phone??"",website:e.Website??""}),[e]),{register:S,handleSubmit:R,reset:C,watch:E,formState:{errors:M,isSubmitting:I}}=useForm({defaultValues:_}),A=E(),V=React.useCallback(()=>g?JSON.stringify(A)!==JSON.stringify(g):!1,[A,g]);React.useEffect(()=>{l&&l(V())},[V,l]),React.useEffect(()=>{e&&Object.keys(e).length>0&&(C(_),b(_))},[e,C,_]);const q=async Q=>{let F=!0,O=!1;const te=Object.keys(Q).map(ae=>({key:ae,keyApi:ae.charAt(0).toUpperCase()+ae.slice(1)}));for(const ae of te){const ie=Q[ae.key],oe=e[ae.keyApi];if(ie!==oe&&ie!==void 0){O=!0;try{await f({applicationId:t,fieldName:ae.keyApi,newValue:String(ie)}).unwrap()||(F=!1)}catch(se){console.error(`Error updating ${ae.keyApi}:`,se),F=!1}}}F&&O?(d({title:"Public info",description:"Information updated successfully",variant:"success"}),b({...Q}),l&&l(!1)):F||d({title:"Updation error",description:"Failed to update",variant:"destructive"})},z=Q=>!Q||Q.trim()==="";return n?jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Public Information"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-20"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-20"})})]})})]}):jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsxs(CardTitle,{className:"text-1xl font-bold",children:["Public Information ",o?"(read only)":""]})}),jsxRuntime.jsxs(CardContent,{children:[(z(E("contactName"))||z(E("publicEmail"))||z(E("website"))||z(E("phone")))&&jsxRuntime.jsxs(Alert,{variant:"destructive",className:"mb-6",children:[jsxRuntime.jsx(CircleAlert,{className:"h-4 w-4"}),jsxRuntime.jsx(AlertTitle,{children:"Missing information"}),jsxRuntime.jsx(AlertDescription,{children:"All fields are required to get started at working with Manufacturers."})]}),jsxRuntime.jsxs("form",{onSubmit:R(q),className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"contactName",children:"Main Representative *"}),jsxRuntime.jsx(Input,{id:"contactName",placeholder:"John Doe",readOnly:o,...S("contactName",{}),className:M.contactName||z(E("contactName"))?"input-error-indicator":""}),M.contactName&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.contactName.message})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"publicEmail",children:"Public Email *"}),jsxRuntime.jsx(Input,{id:"publicEmail",placeholder:"contact@company.com",readOnly:o,...S("publicEmail",{pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}}),className:M.publicEmail||z(E("publicEmail"))?"input-error-indicator":""}),M.publicEmail&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.publicEmail.message})]})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"website",children:"Website *"}),jsxRuntime.jsx(Input,{id:"website",placeholder:"https://company.com",readOnly:o,...S("website",{pattern:{value:/^.{7,}$/,message:"Must be at least 7 characters"}}),className:M.website||z(E("website"))?"input-error-indicator":""}),M.website&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.website.message})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"phone",children:"Phone Number *"}),jsxRuntime.jsx(Input,{id:"phone",placeholder:"+1 (555) 123-4567",readOnly:o,...S("phone",{pattern:{value:/^.{7,}$/,message:"Must be at least 7 characters"}}),className:M.phone||z(E("phone"))?"input-error-indicator":""}),M.phone&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.phone.message})]}),jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsx(Button,{type:"submit",disabled:I||o,className:o?"hidden":"",children:I?"Saving...":"Save"})})]})]})]})};var __assign$1=function(){return __assign$1=Object.assign||function(t){for(var n,o=1,l=arguments.length;o<l;o++){n=arguments[o];for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(t[d]=n[d])}return t},__assign$1.apply(this,arguments)};function __rest(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]]);return n}function __spreadArray(e,t,n){if(n||arguments.length===2)for(var o=0,l=t.length,d;o<l;o++)(d||!(o in t))&&(d||(d=Array.prototype.slice.call(t,0,o)),d[o]=t[o]);return e.concat(d||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var defaultErrorHandler=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},defaultWarnHandler=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},DEFAULT_INTL_CONFIG={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:defaultErrorHandler,onWarn:defaultWarnHandler};function invariant$1(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function invariantIntlContext(e){invariant$1(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}__assign$1(__assign$1({},DEFAULT_INTL_CONFIG),{textComponent:React__namespace.Fragment});var reactIs$2={exports:{}},reactIs_production_min$2={};/** @license React v16.13.1
|
|
353
|
+
Hook ${g} was either not provided or not a function.`)}return{name:reactHooksModuleName,init(d,{serializeQueryArgs:f},g){const b=d,{buildQueryHooks:_,buildInfiniteQueryHooks:S,buildMutationHook:R,usePrefetch:C}=buildHooks({api:d,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:o,createSelector:n},serializeQueryArgs:f,context:g});return safeAssign(b,{usePrefetch:C}),safeAssign(g,{batch:e}),{injectEndpoint(E,M){if(isQueryDefinition(M)){const{useQuery:I,useLazyQuery:A,useLazyQuerySubscription:V,useQueryState:q,useQuerySubscription:z}=_(E);safeAssign(b.endpoints[E],{useQuery:I,useLazyQuery:A,useLazyQuerySubscription:V,useQueryState:q,useQuerySubscription:z}),d[`use${capitalize(E)}Query`]=I,d[`useLazy${capitalize(E)}Query`]=A}if(isMutationDefinition(M)){const I=R(E);safeAssign(b.endpoints[E],{useMutation:I}),d[`use${capitalize(E)}Mutation`]=I}else if(isInfiniteQueryDefinition(M)){const{useInfiniteQuery:I,useInfiniteQuerySubscription:A,useInfiniteQueryState:V}=S(E);safeAssign(b.endpoints[E],{useInfiniteQuery:I,useInfiniteQuerySubscription:A,useInfiniteQueryState:V}),d[`use${capitalize(E)}InfiniteQuery`]=I}}}}}},createApi=buildCreateApi(coreModule(),reactHooksModule());const emptySplitApi=createApi({reducerPath:"randmarApi",baseQuery:fetchBaseQuery({baseUrl:"https://api.randmar.io",prepareHeaders:e=>{const t=localStorage.getItem("access_token");return t&&e.set("Authorization",`Bearer ${t}`),e}}),endpoints:()=>({})}),injectedRtkApi=emptySplitApi.injectEndpoints({endpoints:e=>({getV4ShopifyByShopifyHostNameAccount:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account`})}),postV4ShopifyByShopifyHostNameAccountSynchronizationAndSynchronizationType:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/Synchronization/${t.synchronizationType}`,method:"POST",params:{newValue:t.newValue}})}),postV4ShopifyByShopifyHostNameAccountAndPropertyName:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/${t.propertyName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ShopifyByShopifyHostNameAccountDefaultShippingSlipComment:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/DefaultShippingSlipComment`,method:"POST",params:{newValue:t.newValue}})}),putV4ShopifyByShopifyHostNameAccountLink:e.mutation({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Account/Link`,method:"PUT",params:{applicationId:t.applicationId,postalCode:t.postalCode}})}),getV4ResellerByRouteResellerIdAccountGeneral:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Account/General`,params:{withSpecification:t.withSpecification}})}),getV4PartnerByApplicationIdAccount:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account`})}),postV4PartnerByApplicationIdAccountAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountAbout:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/About`,method:"POST",body:t.body})}),getV4PartnerByApplicationIdAccountLogo:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo`,params:{width:t.width,height:t.height,align:t.align}})}),postV4PartnerByApplicationIdAccountLogo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo`,method:"POST",body:t.body})}),getV4PartnerByApplicationIdAccountLogoExists:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Logo/Exists`})}),getV4PartnerByApplicationIdAccountVideo:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`})}),postV4PartnerByApplicationIdAccountVideo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`,method:"POST",body:t.body})}),putV4PartnerByApplicationIdAccountVideo:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video`,method:"PUT"})}),getV4PartnerByApplicationIdAccountVideoExists:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Video/Exists`})}),getV4PartnerByApplicationIdAccountManufacturer:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer`,params:{withSpecification:t.withSpecification}})}),putV4PartnerByApplicationIdAccountManufacturer:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer`,method:"PUT"})}),getV4PartnerByApplicationIdAccountReseller:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller`,params:{withSpecification:t.withSpecification}})}),putV4PartnerByApplicationIdAccountReseller:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller`,method:"PUT"})}),putV4PartnerByApplicationIdAccountBilling:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Billing`,method:"PUT",body:t.newBillingInformation})}),putV4PartnerByApplicationIdAccountSalesAgency:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/SalesAgency`,method:"PUT"})}),postV4PartnerByApplicationIdAccountFeedback:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Feedback`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),postV4PartnerByApplicationIdAccountDebugFeedback:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/DebugFeedback`,method:"POST",body:t.body,params:{emailAddress:t.emailAddress}})}),postV4PartnerByApplicationIdAccountManufacturerAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountManufacturerAbout:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Manufacturer/About`,method:"POST",body:t.body})}),postV4PartnerByApplicationIdAccountResellerAndFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerCreditLimit:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/CreditLimit`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerPriority:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/Priority`,method:"POST",params:{newValue:t.newValue}})}),postV4PartnerByApplicationIdAccountResellerTier:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Reseller/Tier`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdAccountSocialAndSocialNetwork:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Social/${t.socialNetwork}`,method:"PUT",params:{tag:t.tag}})}),deleteV4PartnerByApplicationIdAccountSocialAndSocialNetwork:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Account/Social/${t.socialNetwork}`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdAccount:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Account`,params:{withSpecification:t.withSpecification}})}),getV4AgencyByRouteAgencyId:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}`})}),putV4ResellerByRouteResellerIdAutoPoExtract:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Auto/POExtract`,method:"PUT",body:t.body})}),getV4ResellerByRouteResellerIdBilling:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing`})}),getV4ResellerByRouteResellerIdBillingInvoices:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Invoices`})}),getV4ResellerByRouteResellerIdBillingPayments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Payments`})}),getV4ResellerByRouteResellerIdBillingCredits:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/Credits`})}),getV4ResellerByRouteResellerIdBillingLastPayment:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/LastPayment`})}),getV4ResellerByRouteResellerIdBillingStatementDetails:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Billing/StatementDetails`})}),postV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerId:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversation/Partner/${t.partnerId}`,method:"POST",params:{message:t.message}})}),getV4PartnerByApplicationIdBusinessDevelopmentConversations:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversations`})}),getV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessages:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/BusinessDevelopment/Conversation/${t.conversationId}/Messages`})}),getV4ResellerByRouteResellerIdCartAndCartName:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/${t.cartName}`})}),deleteV4ResellerByRouteResellerIdCartAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/${t.cartName}`,method:"DELETE"})}),postV4ResellerByRouteResellerIdCartGenerateAndPostalCode:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/Generate/${t.postalCode}`,method:"POST"})}),postV4ResellerByRouteResellerIdCartAddItemAndCartNameRandmarSku:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/AddItem/${t.cartName}/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,bidNumber:t.bidNumber}})}),postV4ResellerByRouteResellerIdCartAddItemAndCartNameRandmarSkuDefaultOpportunity:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/AddItem/${t.cartName}/${t.randmarSku}/DefaultOpportunity`,method:"POST",params:{quantity:t.quantity}})}),postV4ResellerByRouteResellerIdCartShippingMethodsAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/ShippingMethods/${t.cartName}`,method:"POST",body:t.shipToDetails})}),postV4ResellerByRouteResellerIdCartProcessAndCartName:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Cart/Process/${t.cartName}`,method:"POST",body:t.shipToLocation})}),getV4ResellerByRouteResellerIdCarts:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Carts`})}),deleteV4ResellerByRouteResellerIdCarts:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Carts`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdCategories:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Categories`})}),getV4ManufacturerByRouteManufacturerIdCategoriesNiches:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Categories/Niches`,params:{routeResellerId:t.routeResellerId}})}),getV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`})}),putV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`,method:"PUT"})}),deleteV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCode:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeAGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/A_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeBGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/B_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeCGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/C_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeDGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/D_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeCostGp:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Cost_GP`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeReset:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Reset`,method:"POST"})}),putV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeStarred:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Starred`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdCategoryAndCategoryCodeImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Category/${t.categoryCode}/Image`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdCommunication:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication`})}),putV4ResellerByRouteResellerIdCommunication:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication`,method:"PUT",body:t.body})}),getV4ResellerByRouteResellerIdCommunications:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications`})}),putV4ResellerByRouteResellerIdCommunications:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications`,method:"PUT",body:t.body})}),putV4ResellerByRouteResellerIdCommunicationAndSubjectManufacturerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication/${t.subject}/${t.manufacturerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),putV4ResellerByRouteResellerIdCommunicationsAndSubjectManufacturerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications/${t.subject}/${t.manufacturerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),deleteV4ResellerByRouteResellerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communication/${t.subject}/${t.resellerId}`,method:"DELETE",params:{manufacturerId:t.manufacturerId,dateTime:t.dateTime}})}),deleteV4ResellerByRouteResellerIdCommunicationsAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Communications/${t.subject}/${t.resellerId}`,method:"DELETE",params:{manufacturerId:t.manufacturerId,dateTime:t.dateTime}})}),putV4ManufacturerByRouteManufacturerIdCommunication:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication/${t.subject}/${t.resellerId}`,method:"PUT",params:{emoji:t.emoji,dateTime:t.dateTime}})}),deleteV4ManufacturerByRouteManufacturerIdCommunicationAndSubjectResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communication/${t.subject}/${t.resellerId}`,method:"DELETE",params:{dateTime:t.dateTime}})}),getV4ManufacturerByRouteManufacturerIdCommunications:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Communications`})}),getV4ResellerByRouteResellerIdCustomer:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Customer`,params:{customerName:t.customerName}})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}`})}),getV4ResellerByRouteResellerIdDocumentFormalNotice:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/FormalNotice`,params:{amount:t.amount}})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumberWarehouse:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/Warehouse`})}),getV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdf:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/PDF`})}),postV4ResellerByRouteResellerIdDocumentAndDocumentNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/${t.documentNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),postV4ResellerByRouteResellerIdDocumentStatementEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Document/Statement/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),getV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}`})}),getV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberPdf:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}/PDF`})}),postV4ManufacturerByRouteManufacturerIdDocumentAndDocumentNumberEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/${t.documentNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),putV4ManufacturerByRouteManufacturerIdDocumentSalesOrderAndOrderNumberExecute:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/SalesOrder/${t.orderNumber}/Execute`,method:"PUT"})}),getV4ManufacturerByRouteManufacturerIdDocumentSalesOrderAndOrderNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/SalesOrder/${t.orderNumber}`})}),getV4ResellerByRouteResellerIdDocumentsActiveOrderDetails:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Documents/ActiveOrderDetails`})}),getV4ResellerByRouteResellerIdDocumentsGeneralDocuments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Documents/GeneralDocuments`})}),getV4ManufacturerByRouteManufacturerIdDocumentsRequisitions:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Requisitions`})}),getV4ManufacturerByRouteManufacturerIdDocumentRequisitions:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Requisitions`})}),getV4ManufacturerByRouteManufacturerIdDocumentsPurchaseOrders:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/PurchaseOrders`})}),getV4ManufacturerByRouteManufacturerIdDocumentPurchaseOrders:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/PurchaseOrders`})}),getV4ManufacturerByRouteManufacturerIdDocumentsReceipts:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Receipts`})}),getV4ManufacturerByRouteManufacturerIdDocumentReceipts:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Receipts`})}),getV4ManufacturerByRouteManufacturerIdDocumentsInvoices:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/Invoices`})}),getV4ManufacturerByRouteManufacturerIdDocumentInvoices:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/Invoices`})}),getV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/ActiveOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentActiveOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/ActiveOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentsCompletedOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Documents/CompletedOrderDetails`})}),getV4ManufacturerByRouteManufacturerIdDocumentCompletedOrderDetails:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Document/CompletedOrderDetails`})}),putV4ManufacturerByRouteManufacturerIdDraftPurchases:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/DraftPurchases`,method:"PUT"})}),putV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"PUT"})}),postV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"POST"})}),deleteV4PartnerByApplicationIdIntegrationKeyAndKeyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKey/${t.keyName}`,method:"DELETE"})}),getV4PartnerByApplicationIdIntegrationKeys:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/IntegrationKeys`})}),getV4ManufacturerByRouteManufacturerIdInventoryValue:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Inventory/Value`})}),putV4ManufacturerByRouteManufacturerIdInvoiceAndReceiptNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Invoice/${t.receiptNumber}`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdInvoiceMiscellaneous:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Invoice/Miscellaneous`,method:"PUT",body:t.body})}),getV4PartnerByApplicationIdJobs:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Jobs`})}),getV4PartnerByApplicationIdLogs:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Logs`})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerId:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}`,params:{withSpecification:t.withSpecification}})}),postV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerIdSalesStatistics:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),getV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCode:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/${t.categoryCode}`})}),postV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturer/${t.manufacturerId}/${t.categoryCode}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdManufacturers:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4PartnerByApplicationIdManufacturers:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4AgencyByRouteAgencyIdManufacturers:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Manufacturers`,params:{withSpecification:t.withSpecification}})}),getV4ResellerByRouteResellerIdMediaAndDocumentNumberSubfolder:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Media/${t.documentNumber}/${t.subfolder}`})}),putV4ResellerByRouteResellerIdMediaAndDocumentNumberSubfolderShort:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Media/${t.documentNumber}/${t.subfolder}/Short`,method:"PUT",body:t.convertToShortModel})}),getV4PartnerByApplicationIdMediaShorts:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Shorts`})}),getV4PartnerByApplicationIdMediaShortAndFileName:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`})}),postV4PartnerByApplicationIdMediaShortAndFileName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`,method:"POST",params:{newValue:t.newValue}})}),deleteV4PartnerByApplicationIdMediaShortAndFileName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/Short/${t.fileName}`,method:"DELETE"})}),putV4PartnerByApplicationIdMediaTextToSpeech:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/TextToSpeech`,method:"PUT",body:t.textToSpeechModel})}),putV4PartnerByApplicationIdMediaShortsFromLong:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Media/ShortsFromLong`,method:"PUT",body:t.shortsFromLongModel})}),getV4ResellerByRouteResellerIdNicheAndNicheNameManufacturers:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Niche/${t.nicheName}/Manufacturers`})}),getV4ResellerByRouteResellerIdOpportunities:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunities`})}),getV4ManufacturerByRouteManufacturerIdOpportunities:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunities`})}),getV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}`,params:{withSpecification:t.withSpecification}})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),putV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefault:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/Default`,method:"PUT",params:{opportunityNumber:t.opportunityNumber}})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/File`,method:"POST"})}),postV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Opportunity/${t.manufacturerId}/${t.bidNumber}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),putV4ManufacturerByRouteManufacturerIdOpportunity:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,method:"PUT",body:t.body})}),getV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,params:{withSpecification:t.withSpecification}})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),putV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/Reseller/${t.resellerId}`,method:"PUT"})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerId:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/Reseller/${t.resellerId}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberPartNumberRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/PartNumber/${t.randmarSku}`,method:"POST",params:{bidPrice:t.bidPrice,bidPriceType:t.bidPriceType}})}),deleteV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberPartNumberRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Opportunity/${t.bidNumber}/PartNumber/${t.randmarSku}`,method:"DELETE"})}),getV4ResellerByRouteResellerIdOrderAndOrderNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}`,params:{withSpecification:t.withSpecification}})}),putV4ResellerByRouteResellerIdOrderAndOrderNumberComment:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Comment`,method:"PUT",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdOrderAndDocumentNumberShippingSlip:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.documentNumber}/ShippingSlip`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdOrderPoNumberAndResellerPoNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/PONumber/${t.resellerPoNumber}`})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Email`,method:"POST",params:{emailAddress:t.emailAddress,comment:t.comment}})}),deleteV4ResellerByRouteResellerIdOrderAndOrderNumberCancel:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Cancel`,method:"DELETE",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberChangeLocation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ChangeLocation`,method:"POST",params:{location:t.location}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberOnHold:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/OnHold`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShipViaChange:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShipVia/Change`,method:"POST",params:{shipVia:t.shipVia}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberChangeShipVia:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ChangeShipVia`,method:"POST",params:{shipVia:t.shipVia}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShipViaEstimate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShipVia/Estimate`,method:"POST"})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditInformation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditInformation`,method:"POST",params:{endUserPONumber:t.endUserPoNumber,shippingDate:t.shippingDate,shipToName:t.shipToName,shipToAddress1:t.shipToAddress1,shipToAddress2:t.shipToAddress2,shipToCity:t.shipToCity,shipToProvince:t.shipToProvince,shipToPostalCode:t.shipToPostalCode,shipToContactName:t.shipToContactName,shipToContactPhone:t.shipToContactPhone}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,unitPrice:t.unitPrice}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberOrderDate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/OrderDate`,method:"POST",params:{newvalue:t.newvalue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberShippingDate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ShippingDate`,method:"POST",params:{newvalue:t.newvalue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberExpeditionLine:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/ExpeditionLine`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberPoNumber:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/PONumber`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEndUserPoNumber:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EndUserPONumber`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberToday:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/Today`,method:"POST"})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditChargeMiscellaneousCharge:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditCharge/${t.miscellaneousCharge}`,method:"POST",params:{price:t.price}})}),postV4ResellerByRouteResellerIdOrderAndOrderNumberEditMiscellaneousChargeMiscellaneousCharge:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Order/${t.orderNumber}/EditMiscellaneousCharge/${t.miscellaneousCharge}`,method:"POST",params:{price:t.price}})}),getV4ResellerByRouteResellerIdOrders:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Orders`})}),getV4ResellerByRouteResellerIdOrdersShipments:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Orders/Shipments`})}),getV4PartnerByApplicationIdPartnerAndPartnerId:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Partner/${t.partnerId}`,params:{withSpecification:t.withSpecification}})}),putV4AgencyByRouteAgencyIdPartnerAndNewUserEmailAddress:e.mutation({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Partner/${t.newUserEmailAddress}`,method:"PUT"})}),getV4ShopifyByShopifyHostNameProductAndRandmarSku:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Product/${t.randmarSku}`})}),getV4ResellerByRouteResellerIdProductAndRandmarSku:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}`,params:{withSpecification:t.withSpecification,shopifyHostName:t.shopifyHostName}})}),getV4ResellerByRouteResellerIdProductAndRandmarSkuSalesStatistics:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ResellerByRouteResellerIdProductAndRandmarSkuShopify:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Shopify`,method:"POST",params:{shopifyHostName:t.shopifyHostName,opportunityNumber:t.opportunityNumber}})}),postV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyInventory:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Shopify/Inventory`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),putV4ResellerByRouteResellerIdProductAndRandmarSkuRequisition:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Requisition`,method:"PUT",params:{location:t.location,quantity:t.quantity}})}),putV4ResellerByRouteResellerIdProductAndRandmarSkuSerialize:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Product/${t.randmarSku}/Serialize`,method:"PUT"})}),getV4PartnerByApplicationIdProductAndRandmarSku:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Product/${t.randmarSku}`,params:{withSpecification:t.withSpecification,shopifyHostName:t.shopifyHostName}})}),putV4PartnerByApplicationIdProductAndRandmarSkuShort:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Product/${t.randmarSku}/Short`,method:"PUT",body:t.productConvertToShortModel})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}`,params:{withSpecification:t.withSpecification}})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumberSalesStatistics:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),putV4ManufacturerByRouteManufacturerIdProduct:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberFieldName:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberBodyHtml:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/BodyHTML`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberRandmarTitle:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/RandmarTitle`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberDiscontinue:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/Discontinue`,method:"POST"})}),deleteV4ManufacturerByRouteManufacturerIdProductAndProductNumberOrderNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/${t.orderNumber}`,method:"DELETE",params:{comment:t.comment}})}),postV4ManufacturerByRouteManufacturerIdProductAndProductNumberUpc:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/UPC`,method:"POST",params:{newValue:t.newValue}})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuInstantRebate:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/InstantRebate`,method:"PUT",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuRequisition:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Requisition`,method:"PUT",params:{location:t.location,quantity:t.quantity}})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Image`,method:"POST",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuImage:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Image`,method:"PUT"})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber3DModel:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/3DModel`})}),getV4ManufacturerByRouteManufacturerIdProductAndProductNumber3DModelExists:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.productNumber}/3DModel/Exists`})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSku3DModel:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/3DModel`,method:"POST",body:t.body})}),putV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuVideo:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Video`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdProductAndRandmarSkuVideo:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Product/${t.randmarSku}/Video`,method:"POST",body:t.body})}),getV4ResellerByRouteResellerIdProductsNiches:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Niches`})}),getV4ResellerByRouteResellerIdProductsReceivings:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Receivings`})}),getV4ResellerByRouteResellerIdProductsInstantRebates:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/InstantRebates`})}),getV4ResellerByRouteResellerIdProductsNewest:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Products/Newest`})}),getRandmar:e.query({query:()=>({url:"/Randmar"})}),getRandmarVideo:e.query({query:()=>({url:"/Randmar/Video"})}),getWarehouses:e.query({query:()=>({url:"/Warehouses"})}),getV4Warehouses:e.query({query:()=>({url:"/V4/Warehouses"})}),getManufacturers:e.query({query:()=>({url:"/Manufacturers"})}),getManufacturerByPublicName:e.query({query:t=>({url:`/Manufacturer/${t.publicName}`})}),getManufacturerByPublicNameAndCategoryName:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/${t.categoryName}`})}),getManufacturerByPublicNameLogo:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/Logo`,params:{width:t.width,height:t.height}})}),getManufacturerByPublicNameVideo:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/Video`})}),getManufacturerByPublicNameAndCategoryNameImage:e.query({query:t=>({url:`/Manufacturer/${t.publicName}/${t.categoryName}/Image`,params:{width:t.width,height:t.height}})}),getProductsVideosMostRecent:e.query({query:()=>({url:"/Products/Videos/MostRecent"})}),getProductsVideos:e.query({query:()=>({url:"/Products/Videos"})}),getProductByProductNumber:e.query({query:t=>({url:`/Product/${t.productNumber}`})}),getProductByProductNumberImage:e.query({query:t=>({url:`/Product/${t.productNumber}/Image`,params:{width:t.width,height:t.height}})}),getProductByProductNumberImageExists:e.query({query:t=>({url:`/Product/${t.productNumber}/Image/Exists`})}),getProductByProductNumber3DModelExists:e.query({query:t=>({url:`/Product/${t.productNumber}/3DModel/Exists`})}),getProductByProductNumberVideo:e.query({query:t=>({url:`/Product/${t.productNumber}/Video`})}),getProductByProductNumberVideoExists:e.query({query:t=>({url:`/Product/${t.productNumber}/Video/Exists`})}),getShortsGenerationContentScenes:e.query({query:()=>({url:"/ShortsGenerationContent/Scenes"})}),getShortsGenerationContentSceneBySceneName:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}`})}),getShortsGenerationContentSceneBySceneNameThumbnail:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/Thumbnail`})}),getShortsGenerationContentSceneBySceneNamePreview:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/Preview`})}),getShortsGenerationContentSceneBySceneNameCameraScript:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/CameraScript`})}),getShortsGenerationContentSceneDefaultAmbientSound:e.query({query:()=>({url:"/ShortsGenerationContent/Scene/Default/AmbientSound"})}),getShortsGenerationContentSceneBySceneNameAmbientSound:e.query({query:t=>({url:`/ShortsGenerationContent/Scene/${t.sceneName}/AmbientSound`})}),putV4ManufacturerByRouteManufacturerIdPurchaseOrder:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder`,method:"PUT",body:t.body,params:{sendToManufacturer:t.sendToManufacturer}})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderCreditCheck:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/CreditCheck`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditExpectedDate:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/EditExpectedDate`,method:"POST",params:{newValue:t.newValue}})}),deleteV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}`,method:"DELETE"})}),putV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberSend:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/Send`,method:"PUT"})}),postV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/PurchaseOrder/${t.purchaseOrderNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity,unitPrice:t.unitPrice,editStandardCost:t.editStandardCost}})}),postV4ResellerByRouteResellerIdReportHpAmplifiedEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/HP Amplified/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportUniversalEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportProductsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportUniversalFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportProductsFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportUniversalJson:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Universal/JSON`,method:"POST"})}),postV4ResellerByRouteResellerIdReportProductsJson:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Products/JSON`,method:"POST"})}),postV4ResellerByRouteResellerIdReportShipmentsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Shipments/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportInvoicesEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Invoices/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ResellerByRouteResellerIdReportOpenOrdersEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/OpenOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportReturnsEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Returns/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportOpportunitiesEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/Opportunities/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportAmazonTrackingFileEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/AmazonTrackingFile/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportAmazonTrackingFileFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/AmazonTrackingFile/File`,method:"POST"})}),postV4ResellerByRouteResellerIdReportWalmartTrackingFileEmail:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/WalmartTrackingFile/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ResellerByRouteResellerIdReportWalmartTrackingFileFile:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Report/WalmartTrackingFile/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportReorderEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportResellersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Resellers/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportReorderFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportReorderAndWarehouseLocationJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Reorder/${t.warehouseLocation}/JSON`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportSalesEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/${t.resellerId}/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/File`,method:"POST",params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportSalesJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Sales/JSON`,method:"POST",params:{startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportBestCanadianFulfillmentCenters:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/BestCanadianFulfillmentCenters`,method:"POST",body:t.body})}),postV4ManufacturerByRouteManufacturerIdReportInventoryEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/Email`,method:"POST",params:{emailAddress:t.emailAddress,inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportInventoryFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/File`,method:"POST",params:{inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportInventoryJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Inventory/JSON`,method:"POST",params:{inventoryDate:t.inventoryDate}})}),postV4ManufacturerByRouteManufacturerIdReportClaimEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Claim/Email`,method:"POST",params:{emailAddress:t.emailAddress,startDate:t.startDate,endDate:t.endDate}})}),postV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/OpenOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportOpenOrdersJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/OpenOrders/JSON`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportProductsEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportProductsFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/File`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportProductsTsv:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/TSV`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportProductsJson:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/Products/JSON`,method:"POST"})}),postV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmail:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/PurchasedOrders/Email`,method:"POST",params:{emailAddress:t.emailAddress}})}),postV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersFile:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Report/PurchasedOrders/File`,method:"POST"})}),deleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumber:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition/${t.requisitionNumber}`,method:"DELETE"})}),postV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberEditItemRandmarSku:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition/${t.requisitionNumber}/EditItem/${t.randmarSku}`,method:"POST",params:{quantity:t.quantity}})}),putV4ManufacturerByRouteManufacturerIdRequisition:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Requisition`,method:"PUT",body:t.body})}),getV4ManufacturerByRouteManufacturerIdResellerAndResellerId:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}`,params:{withSpecification:t.withSpecification}})}),getV4ManufacturerByRouteManufacturerIdResellerAndResellerIdSalesStatistics:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/SalesStatistics`,params:{startDate:t.startDate,endDate:t.endDate}})}),getV4ManufacturerByRouteManufacturerIdResellerQualificationAndQualificationId:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/Qualification/${t.qualificationId}`,params:{withSpecification:t.withSpecification}})}),putV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualification:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/Qualification`,method:"PUT",params:{newValue:t.newValue}})}),deleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualification:e.mutation({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Reseller/${t.resellerId}/Qualification`,method:"DELETE"})}),getV4ManufacturerByRouteManufacturerIdResellers:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Resellers`})}),getV4AgencyByRouteAgencyIdResellers:e.query({query:t=>({url:`/V4/Agency/${t.routeAgencyId}/Resellers`,params:{withSpecification:t.withSpecification}})}),getV4ResellerByRouteResellerIdReturnAndReturnNumber:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}`})}),postV4ResellerByRouteResellerIdReturnCreate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/Create`,method:"POST",body:t.returnRequest})}),putV4ResellerByRouteResellerIdReturnAndReturnNumberClaim:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Claim`,method:"PUT"})}),putV4ResellerByRouteResellerIdReturnAndReturnNumberManufacturerRma:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/ManufacturerRMA`,method:"PUT",body:t.manufacturerRma})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberAddComment:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/AddComment`,method:"POST",params:{comment:t.comment}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberRandmarSkuEditReason:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/${t.randmarSku}/EditReason`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberRandmarSkuEditQuantity:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/${t.randmarSku}/EditQuantity`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberAccept:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Accept`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberReceive:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Receive`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberWarehouseLocation:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/WarehouseLocation`,method:"POST",params:{newValue:t.newValue}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberEligible:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Eligible`,method:"POST"})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberCredit:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Credit`,method:"POST",params:{creditNumber:t.creditNumber}})}),postV4ResellerByRouteResellerIdReturnAndReturnNumberDecline:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Return/${t.returnNumber}/Decline`,method:"POST"})}),getV4ResellerByRouteResellerIdReturns:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Returns`})}),getV4ManufacturerByRouteManufacturerIdReturns:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Returns`})}),getV4ShopifyByShopifyHostNameSearch:e.query({query:t=>({url:`/V4/Shopify/${t.shopifyHostName}/Search`,params:{q:t.q}})}),getV4ResellerByRouteResellerIdSearch:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Search`,params:{s:t.s}})}),getV4PartnerByRouteApplicationIdSearch:e.query({query:t=>({url:`/V4/Partner/${t.routeApplicationId}/Search`,params:{q:t.q}})}),getV4ManufacturerByRouteManufacturerIdSearch:e.query({query:t=>({url:`/V4/Manufacturer/${t.routeManufacturerId}/Search`,params:{s:t.s}})}),putV4ResellerByRouteResellerIdShippingLabelGenerate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Generate`,method:"PUT",body:t.shipmentDetails})}),putV4ResellerByRouteResellerIdShippingLabelLogistics:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Logistics`,method:"PUT",body:t.shipmentDetails})}),postV4ResellerByRouteResellerIdShippingLabelEstimate:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/ShippingLabel/Estimate`,method:"POST",body:t.shipmentDetails})}),getV4ResellerByRouteResellerIdShopifyAccounts:e.query({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/Accounts`})}),putV4ResellerByRouteResellerIdShopifyAndShopifyhostNameFulfillmentShopifyFulfillmentOrderIrderIdRequest:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/${t.shopifyhostName}/Fulfillment/${t.shopifyFulfillmentOrderIrderId}/Request`,method:"PUT"})}),deleteV4ResellerByRouteResellerIdShopifyAndShopifyhostNameFulfillmentShopifyFulfillmentOrderIrderId:e.mutation({query:t=>({url:`/V4/Reseller/${t.routeResellerId}/Shopify/${t.shopifyhostName}/Fulfillment/${t.shopifyFulfillmentOrderIrderId}`,method:"DELETE"})}),getV4PartnerByApplicationIdShopify:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify`,params:{withToken:t.withToken}})}),postV4PartnerByApplicationIdShopifyValidate:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Validate`,method:"POST",params:{shopifyHostName:t.shopifyHostName}})}),postV4PartnerByApplicationIdShopifySynchronizationAndSynchronizationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Synchronization/${t.synchronizationType}`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),postV4PartnerByApplicationIdShopifyAndPropertyName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/${t.propertyName}`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),postV4PartnerByApplicationIdShopifyDefaultShippingSlipComment:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/DefaultShippingSlipComment`,method:"POST",params:{shopifyHostName:t.shopifyHostName,newValue:t.newValue}})}),putV4PartnerByApplicationIdShopifyWebhookAndModuleStatus:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Webhook/${t.module}/${t.status}`,method:"PUT",params:{shopifyHostName:t.shopifyHostName}})}),deleteV4PartnerByApplicationIdShopifyWebhookAndModuleStatus:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Shopify/Webhook/${t.module}/${t.status}`,method:"DELETE",params:{shopifyHostName:t.shopifyHostName}})}),putV4PartnerByApplicationIdUserAndEmailAddress:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}`,method:"PUT"})}),deleteV4PartnerByApplicationIdUserAndEmailAddress:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}`,method:"DELETE"})}),postV4PartnerByApplicationIdUserAndEmailAddressActive:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Active`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdUserAndEmailAddressNotificationNotificationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Notification/${t.notificationType}`,method:"PUT"})}),deleteV4PartnerByApplicationIdUserAndEmailAddressNotificationNotificationType:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/User/${t.emailAddress}/Notification/${t.notificationType}`,method:"DELETE"})}),getV4PartnerByApplicationIdUsers:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Users`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseId:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdPurchaseOrders:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/PurchaseOrders`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdReturns:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Returns`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdOrders:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Orders`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdShipments:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Shipments`})}),getV4PartnerByApplicationIdWarehouseAndWarehouseIdRequisitions:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/Requisitions`})}),postV4PartnerByApplicationIdWarehouseAndWarehouseIdFieldName:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/${t.fieldName}`,method:"POST",params:{newValue:t.newValue}})}),putV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegration:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration`,method:"PUT",body:t.body})}),deleteV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegrationCarrierCode:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration/${t.carrierCode}`,method:"DELETE"})}),postV4PartnerByApplicationIdWarehouseAndWarehouseIdCarrierIntegrationCarrierCode:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse/${t.warehouseId}/CarrierIntegration/${t.carrierCode}`,method:"POST",params:{isActive:t.isActive}})}),putV4PartnerByApplicationIdWarehouse:e.mutation({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouse`,method:"PUT",body:t.body})}),getV4PartnerByApplicationIdWarehouses:e.query({query:t=>({url:`/V4/Partner/${t.applicationId}/Warehouses`})})}),overrideExisting:!1}),{useLazyGetV4PartnerByApplicationIdAccountQuery,useGetV4PartnerByApplicationIdAccountResellerQuery,usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation,usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation,usePostV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation,useGetV4PartnerByApplicationIdBusinessDevelopmentConversationsQuery,useLazyGetV4PartnerByApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery,usePutV4ResellerByRouteResellerIdCommunicationMutation,usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation,useGetV4PartnerByApplicationIdManufacturersQuery,usePostV4ResellerByRouteResellerIdReportProductsEmailMutation,usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation,usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation,usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation,usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation}=injectedRtkApi;injectedRtkApi.enhanceEndpoints({addTagTypes:["Conversations"],endpoints:{getV4PartnerByApplicationIdBusinessDevelopmentConversations:{providesTags:["Conversations"]},postV4PartnerByApplicationIdBusinessDevelopmentConversationPartnerAndPartnerId:{invalidatesTags:["Conversations"]}}});const PublicInfo=({reseller:e,appID:t,isLoading:n,readonly:o,onUnsavedChanges:l})=>{const{toast:d}=useToast(),[f]=usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation(),[g,b]=React.useState({}),_=React.useMemo(()=>({publicEmail:e.PublicEmail??"",contactName:e.ContactName??"",phone:e.Phone??"",website:e.Website??""}),[e]),{register:S,handleSubmit:R,reset:C,watch:E,formState:{errors:M,isSubmitting:I}}=useForm({defaultValues:_}),A=E(),V=React.useCallback(()=>g?JSON.stringify(A)!==JSON.stringify(g):!1,[A,g]);React.useEffect(()=>{l&&l(V())},[V,l]),React.useEffect(()=>{e&&Object.keys(e).length>0&&(C(_),b(_))},[e,C,_]);const q=async Q=>{let F=!0,O=!1;const te=Object.keys(Q).map(ae=>({key:ae,keyApi:ae.charAt(0).toUpperCase()+ae.slice(1)}));for(const ae of te){const ie=Q[ae.key],oe=e[ae.keyApi];if(ie!==oe&&ie!==void 0){O=!0;try{await f({applicationId:t,fieldName:ae.keyApi,newValue:String(ie)}).unwrap()||(F=!1)}catch(se){console.error(`Error updating ${ae.keyApi}:`,se),F=!1}}}F&&O?(d({title:"Public info",description:"Information updated successfully",variant:"success"}),b({...Q}),l&&l(!1)):F||d({title:"Updation error",description:"Failed to update",variant:"destructive"})},z=Q=>!Q||Q.trim()==="";return n?jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Public Information"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-20"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]}),jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-20"})})]})})]}):jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsxs(CardTitle,{className:"text-1xl font-bold",children:["Public Information ",o?"(read only)":""]})}),jsxRuntime.jsxs(CardContent,{children:[(z(E("contactName"))||z(E("publicEmail"))||z(E("website"))||z(E("phone")))&&jsxRuntime.jsxs(Alert,{variant:"destructive",className:"mb-6",children:[jsxRuntime.jsx(CircleAlert,{className:"h-4 w-4"}),jsxRuntime.jsx(AlertTitle,{children:"Missing information"}),jsxRuntime.jsx(AlertDescription,{children:"All fields are required to get started at working with Manufacturers."})]}),jsxRuntime.jsxs("form",{onSubmit:R(q),className:"space-y-4",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"contactName",children:"Main Representative *"}),jsxRuntime.jsx(Input,{id:"contactName",placeholder:"John Doe",readOnly:o,...S("contactName",{}),className:M.contactName||z(E("contactName"))?"input-error-indicator":""}),M.contactName&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.contactName.message})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"publicEmail",children:"Public Email *"}),jsxRuntime.jsx(Input,{id:"publicEmail",placeholder:"contact@company.com",readOnly:o,...S("publicEmail",{pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}}),className:M.publicEmail||z(E("publicEmail"))?"input-error-indicator":""}),M.publicEmail&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.publicEmail.message})]})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"website",children:"Website *"}),jsxRuntime.jsx(Input,{id:"website",placeholder:"https://company.com",readOnly:o,...S("website",{pattern:{value:/^.{7,}$/,message:"Must be at least 7 characters"}}),className:M.website||z(E("website"))?"input-error-indicator":""}),M.website&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.website.message})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("label",{className:"text-sm font-medium leading-none",htmlFor:"phone",children:"Phone Number *"}),jsxRuntime.jsx(Input,{id:"phone",placeholder:"+1 (555) 123-4567",readOnly:o,...S("phone",{pattern:{value:/^.{7,}$/,message:"Must be at least 7 characters"}}),className:M.phone||z(E("phone"))?"input-error-indicator":""}),M.phone&&jsxRuntime.jsx("p",{className:"text-red-500 text-sm",children:M.phone.message})]}),jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsx(Button,{type:"submit",disabled:I||o,className:o?"hidden":"",children:I?"Saving...":"Save"})})]})]})]})};var __assign$1=function(){return __assign$1=Object.assign||function(t){for(var n,o=1,l=arguments.length;o<l;o++){n=arguments[o];for(var d in n)Object.prototype.hasOwnProperty.call(n,d)&&(t[d]=n[d])}return t},__assign$1.apply(this,arguments)};function __rest(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(n[o[l]]=e[o[l]]);return n}function __spreadArray(e,t,n){if(n||arguments.length===2)for(var o=0,l=t.length,d;o<l;o++)(d||!(o in t))&&(d||(d=Array.prototype.slice.call(t,0,o)),d[o]=t[o]);return e.concat(d||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var defaultErrorHandler=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},defaultWarnHandler=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},DEFAULT_INTL_CONFIG={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:defaultErrorHandler,onWarn:defaultWarnHandler};function invariant$1(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function invariantIntlContext(e){invariant$1(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}__assign$1(__assign$1({},DEFAULT_INTL_CONFIG),{textComponent:React__namespace.Fragment});var reactIs$2={exports:{}},reactIs_production_min$2={};/** @license React v16.13.1
|
|
354
354
|
* react-is.production.min.js
|
|
355
355
|
*
|
|
356
356
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -366,7 +366,7 @@ Hook ${g} was either not provided or not a function.`)}return{name:reactHooksMod
|
|
|
366
366
|
* LICENSE file in the root directory of this source tree.
|
|
367
367
|
*/var hasRequiredReactIs_development$2;function requireReactIs_development$2(){return hasRequiredReactIs_development$2||(hasRequiredReactIs_development$2=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,l=e?Symbol.for("react.strict_mode"):60108,d=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,g=e?Symbol.for("react.context"):60110,b=e?Symbol.for("react.async_mode"):60111,_=e?Symbol.for("react.concurrent_mode"):60111,S=e?Symbol.for("react.forward_ref"):60112,R=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,I=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,V=e?Symbol.for("react.responder"):60118,q=e?Symbol.for("react.scope"):60119;function z(Fe){return typeof Fe=="string"||typeof Fe=="function"||Fe===o||Fe===_||Fe===d||Fe===l||Fe===R||Fe===C||typeof Fe=="object"&&Fe!==null&&(Fe.$$typeof===M||Fe.$$typeof===E||Fe.$$typeof===f||Fe.$$typeof===g||Fe.$$typeof===S||Fe.$$typeof===A||Fe.$$typeof===V||Fe.$$typeof===q||Fe.$$typeof===I)}function Q(Fe){if(typeof Fe=="object"&&Fe!==null){var ct=Fe.$$typeof;switch(ct){case t:var Qe=Fe.type;switch(Qe){case b:case _:case o:case d:case l:case R:return Qe;default:var nt=Qe&&Qe.$$typeof;switch(nt){case g:case S:case M:case E:case f:return nt;default:return ct}}case n:return ct}}}var F=b,O=_,te=g,ae=f,ie=t,oe=S,se=o,Ae=M,Ne=E,ge=n,Oe=d,Le=l,Ge=R,je=!1;function Be(Fe){return je||(je=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),qe(Fe)||Q(Fe)===b}function qe(Fe){return Q(Fe)===_}function ze(Fe){return Q(Fe)===g}function Ue(Fe){return Q(Fe)===f}function Xe(Fe){return typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===t}function Je(Fe){return Q(Fe)===S}function Ye(Fe){return Q(Fe)===o}function it(Fe){return Q(Fe)===M}function Ke(Fe){return Q(Fe)===E}function et(Fe){return Q(Fe)===n}function Ze(Fe){return Q(Fe)===d}function tt(Fe){return Q(Fe)===l}function st(Fe){return Q(Fe)===R}reactIs_development$2.AsyncMode=F,reactIs_development$2.ConcurrentMode=O,reactIs_development$2.ContextConsumer=te,reactIs_development$2.ContextProvider=ae,reactIs_development$2.Element=ie,reactIs_development$2.ForwardRef=oe,reactIs_development$2.Fragment=se,reactIs_development$2.Lazy=Ae,reactIs_development$2.Memo=Ne,reactIs_development$2.Portal=ge,reactIs_development$2.Profiler=Oe,reactIs_development$2.StrictMode=Le,reactIs_development$2.Suspense=Ge,reactIs_development$2.isAsyncMode=Be,reactIs_development$2.isConcurrentMode=qe,reactIs_development$2.isContextConsumer=ze,reactIs_development$2.isContextProvider=Ue,reactIs_development$2.isElement=Xe,reactIs_development$2.isForwardRef=Je,reactIs_development$2.isFragment=Ye,reactIs_development$2.isLazy=it,reactIs_development$2.isMemo=Ke,reactIs_development$2.isPortal=et,reactIs_development$2.isProfiler=Ze,reactIs_development$2.isStrictMode=tt,reactIs_development$2.isSuspense=st,reactIs_development$2.isValidElementType=z,reactIs_development$2.typeOf=Q}()),reactIs_development$2}var hasRequiredReactIs$2;function requireReactIs$2(){return hasRequiredReactIs$2||(hasRequiredReactIs$2=1,process.env.NODE_ENV==="production"?reactIs$2.exports=requireReactIs_production_min$2():reactIs$2.exports=requireReactIs_development$2()),reactIs$2.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var e=requireReactIs$2(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},d={};d[e.ForwardRef]=o,d[e.Memo]=l;function f(M){return e.isMemo(M)?l:d[M.$$typeof]||t}var g=Object.defineProperty,b=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,S=Object.getOwnPropertyDescriptor,R=Object.getPrototypeOf,C=Object.prototype;function E(M,I,A){if(typeof I!="string"){if(C){var V=R(I);V&&V!==C&&E(M,V,A)}var q=b(I);_&&(q=q.concat(_(I)));for(var z=f(M),Q=f(I),F=0;F<q.length;++F){var O=q[F];if(!n[O]&&!(A&&A[O])&&!(Q&&Q[O])&&!(z&&z[O])){var te=S(I,O);try{g(M,O,te)}catch{}}}}return M}return hoistNonReactStatics_cjs=E,hoistNonReactStatics_cjs}requireHoistNonReactStatics_cjs();var IntlContext=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=React__namespace.createContext(null)):React__namespace.createContext(null);IntlContext.Consumer,IntlContext.Provider;var Context=IntlContext;function useIntl(){var e=React__namespace.useContext(Context);return invariantIntlContext(e),e}var DisplayName;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(DisplayName||(DisplayName={}));var DisplayNameParts;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(DisplayNameParts||(DisplayNameParts={}));function createFormattedDateTimePartsComponent(e){var t=function(n){var o=useIntl(),l=n.value,d=n.children,f=__rest(n,["value","children"]),g=typeof l=="string"?new Date(l||0):l,b=e==="formatDate"?o.formatDateToParts(g,f):o.formatTimeToParts(g,f);return d(b)};return t.displayName=DisplayNameParts[e],t}function createFormattedComponent(e){var t=function(n){var o=useIntl(),l=n.value,d=n.children,f=__rest(n,["value","children"]),g=o[e](l,f);if(typeof d=="function")return d(g);var b=o.textComponent||React__namespace.Fragment;return React__namespace.createElement(b,null,g)};return t.displayName=DisplayName[e],t}createFormattedComponent("formatDate"),createFormattedComponent("formatTime");var FormattedNumber=createFormattedComponent("formatNumber");createFormattedComponent("formatList"),createFormattedComponent("formatDisplayName"),createFormattedDateTimePartsComponent("formatDate"),createFormattedDateTimePartsComponent("formatTime");function BillingCard({readonly:e,reseller:t,isLoading:n,payInvoicePath:o}){const l=reactRouterDom.useNavigate(),{Statement:d,CreditLimit:f}=t,g=[{label:"0 - 30 Days",value:jsxRuntime.jsx(FormattedNumber,{value:(d==null?void 0:d.Over0)||0,style:"currency",currency:"CAD",currencyDisplay:"symbol"}),icon:Calendar},{label:"31 - 45 Days",value:jsxRuntime.jsx(FormattedNumber,{value:(d==null?void 0:d.Over30)||0,style:"currency",currency:"CAD",currencyDisplay:"symbol"}),icon:CalendarDays},{label:"45+ Days",value:jsxRuntime.jsx(FormattedNumber,{value:(d==null?void 0:d.Over45)||0,style:"currency",currency:"CAD",currencyDisplay:"symbol"}),icon:CalendarRange},{label:"Total",value:jsxRuntime.jsx(FormattedNumber,{value:(d==null?void 0:d.Total)||0,style:"currency",currency:"CAD",currencyDisplay:"symbol"}),icon:DollarSign},{label:"Credit Limit",value:jsxRuntime.jsx(FormattedNumber,{value:f||0,style:"currency",currency:"CAD",currencyDisplay:"symbol"}),icon:CreditCard}];return n?jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{className:"border-b p-6 md:p-5",children:jsxRuntime.jsx(Skeleton,{className:"h-6 w-36"})}),jsxRuntime.jsxs(CardContent,{className:"p-6 md:p-5",children:[jsxRuntime.jsxs("div",{className:"grid sm:grid-cols-2 sm:divide-x divide-border",children:[jsxRuntime.jsx("div",{className:"space-y-6 sm:pe-4",children:[1,2,3].map(b=>jsxRuntime.jsxs("div",{className:"flex items-center flex-wrap gap-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 ms-auto"})]},b))}),jsxRuntime.jsx("div",{className:"space-y-6 sm:ps-4 pt-6 sm:pt-0 mt-6 sm:mt-0 border-t sm:border-t-0 border-border",children:[1,2].map(b=>jsxRuntime.jsx("div",{className:b===2?"pt-6 mt-6 border-t border-border":"",children:jsxRuntime.jsxs("div",{className:"flex items-center flex-wrap gap-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 ms-auto"})]})},b))})]}),jsxRuntime.jsx("div",{className:"flex justify-end",children:jsxRuntime.jsx(Skeleton,{className:"h-10 w-28 mt-6"})})]})]}):jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{className:"border-b p-6 md:p-5",children:jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Billing Overview"})}),jsxRuntime.jsxs(CardContent,{className:"p-6 md:p-5",children:[jsxRuntime.jsxs("div",{className:"grid sm:grid-cols-2 sm:divide-x divide-border",children:[jsxRuntime.jsx("div",{className:"space-y-6 sm:pe-4",children:g.slice(0,3).map((b,_)=>jsxRuntime.jsx(BillingItem,{icon:b.icon,label:b.label,value:b.value},_))}),jsxRuntime.jsx("div",{className:"space-y-6 sm:ps-4 pt-6 sm:pt-0 mt-6 sm:mt-0 border-t sm:border-t-0 border-border",children:g.slice(3).map((b,_)=>jsxRuntime.jsx("div",{className:_===1?"pt-6 mt-6 border-t border-border":"",children:jsxRuntime.jsx(BillingItem,{icon:b.icon,label:b.label,value:b.value})},_))})]}),jsxRuntime.jsx("div",{className:e?"hidden":"flex justify-end",children:jsxRuntime.jsx(Button,{disabled:e||!o,className:"mt-6",onClick:()=>l(o),children:"Pay Invoices"})})]})]})}function BillingItem({icon:e,label:t,value:n}){return jsxRuntime.jsxs("div",{className:"flex items-center flex-wrap gap-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(e,{className:"size-4 text-muted-foreground"}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:t})]}),jsxRuntime.jsx("span",{className:"text-base font-semibold ms-auto",children:n})]})}function ChangePricingTierModal({open:e,setOpen:t,tier:n,onTierChange:o,isLoading:l}){const d=()=>{t(!1)};return jsxRuntime.jsx(Dialog,{open:e,onOpenChange:t,children:jsxRuntime.jsxs(DialogContent,{className:"sm:max-w-[425px]",children:[jsxRuntime.jsx(DialogHeader,{children:jsxRuntime.jsx(DialogTitle,{children:"Change Pricing Tier"})}),jsxRuntime.jsxs("div",{className:"grid gap-1.5 py-2",children:[jsxRuntime.jsxs("p",{className:"text-lg text-muted-foreground",children:["Requested Pricing Tier: ",jsxRuntime.jsx("span",{className:"font-bold",children:n})]}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"If your account qualifies, your pricing will update immediately."}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"If not, we'll review your request and notify you of the decision."})]}),jsxRuntime.jsxs(DialogFooter,{children:[jsxRuntime.jsx(Button,{variant:"outline",onClick:d,disabled:l,children:"Cancel"}),jsxRuntime.jsx(Button,{onClick:o,disabled:l,children:l?"Loading...":`Apply for ${n}`})]})]})})}const getPricingText=e=>e===1?"The Best":e===2?"Fixed 12.5% GP on all items":e===3?"Advantageous":e===4?"Buying Group":e===5?"Cost":e,getShippingText=e=>e==="A"?"Free or Custom":e==="B"?"Fixed $10 anywhere":e==="C"?`Free shipping on $150+ orders to your location,
|
|
368
368
|
$15 for drop shipped orders under $1,500,
|
|
369
|
-
$10 with opportunities under $1,000`:e==="D"?"$15 under $1,500":e==="E"?"Full shipping charges":e,getTermsText=e=>e==="STRIPE"?"Credit card payment":e==="NET30"?"Net 30 days":e,AccountTier=({isSuperAdmin:e,readonly:t,reseller:n,appID:o,isLoading:l})=>{const{toast:d}=useToast(),[f,g]=React.useState(!1),[b,_]=React.useState(""),[S,{isLoading:R}]=usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation(),C=ge=>ge&&{Starter:"starter","E-Commerce":"ecommerce",Commercial:"commercial",Basics:"cws",Novexco:"novexco","Jean Coutu":"jeancoutu",Exclusive:"exclusive"}[ge]||"",E=ge=>ge&&{A:"free",B:"fixed",C:"dropshipped",D:"under1500",E:"fullcharges"}[ge]||"",M=ge=>ge&&{1:"exclusive",2:"ecommerce",3:"commercial",4:"buyinggroup",5:"cost"}[ge]||"",[I,A]=React.useState(C((n==null?void 0:n.Priority)??"")),[V,q]=React.useState(E((n==null?void 0:n.ShippingProfile)??"")),[z,Q]=React.useState(M(n==null?void 0:n.PriceProfile)),F=ge=>({starter:"Starter",ecommerce:"E-Commerce",commercial:"Commercial",cws:"Basics",novexco:"Novexco",jeancoutu:"Jean Coutu",exclusive:"Exclusive"})[ge]||ge,O=ge=>({free:"A",fixed:"B",dropshipped:"C",under1500:"D",fullcharges:"E"})[ge]||ge,te=ge=>({exclusive:"1",ecommerce:"2",commercial:"3",buyinggroup:"4",cost:"5"})[ge]||ge;React.useEffect(()=>{A(C((n==null?void 0:n.Priority)??"")),q(E((n==null?void 0:n.ShippingProfile)??"")),Q(M(n==null?void 0:n.PriceProfile))},[n]);const ae=async ge=>{A(ge);const Oe=F(ge);try{(await S({applicationId:o,fieldName:"Priority",newValue:Oe})).error?d({title:"Error",description:"Failed to update priority",variant:"destructive"}):d({title:"Success",description:`Priority updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},ie=async ge=>{q(ge);const Oe=O(ge);try{(await S({applicationId:o,fieldName:"ShippingProfile",newValue:Oe})).error?d({title:"Error",description:"Failed to update shipping profile",variant:"destructive"}):d({title:"Success",description:`Shipping profile updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},oe=async ge=>{Q(ge);const Oe=te(ge);try{(await S({applicationId:o,fieldName:"PriceProfile",newValue:Oe})).error?d({title:"Error",description:"Failed to update pricing profile",variant:"destructive"}):d({title:"Success",description:`Pricing profile updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},se=async()=>{try{const ge=await S({applicationId:o,fieldName:"Tier",newValue:b});ge.error?d({title:"Error",description:"Failed to update reseller",variant:"destructive"}):ge.data?d({title:"Success",description:`Pricing Tier changed to ${b}`,variant:"success"}):d({title:"Considered",description:"Request being considered",variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}finally{g(!1),_("")}},Ae=[{name:"Terms",enabled:n.Priority==="Starter"},{name:"E-Commerce",enabled:n.Priority==="Commercial"},{name:"Commercial",enabled:n.Priority==="E-Commerce"},{name:"Exclusive",enabled:e}],Ne=ge=>{_(ge),g(!0)};return l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(Card,{className:"md:col-span-2 xl:col-span-1 md:max-w-xl xl:max-w-[unset]",children:[jsxRuntime.jsx(CardHeader,{className:"pb-2",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-16 rounded-full"})]})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsxs("div",{className:"mb-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-56"})]}),jsxRuntime.jsx("div",{className:"grid gap-3",children:[1,2,3].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"})]})]},ge))}),jsxRuntime.jsxs("div",{className:"flex gap-2 mt-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]})]})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Card,{className:"md:col-span-2 xl:col-span-1 md:max-w-xl xl:max-w-[unset]",children:[jsxRuntime.jsxs(CardHeader,{className:"pb-2 pt-4 px-4 flex flex-row items-center justify-between",children:[jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Account Tier"}),jsxRuntime.jsx(Badge,{variant:"secondary",className:"bg-green-100 text-green-700 hover:bg-green-200 text-xs",children:"Active"})]}),jsxRuntime.jsxs(CardContent,{className:"pt-2 px-4 pb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3 bg-primary/5 p-4 rounded-lg",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:"text-lg font-bold text-primary",children:[(n==null?void 0:n.Priority)||""," Tier"]}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Optimized for online retail"})]}),jsxRuntime.jsx(CircleCheck,{className:"h-6 w-6 text-green-600"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-2 mb-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Package2,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Pricing"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground truncate",children:getPricingText(n.PriceProfile||0)})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Truck,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Shipping"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:getShippingText(n.ShippingProfile||"").split(".")[0]})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Calendar,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Payment terms"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:getTermsText((n==null?void 0:n.Terms)||"")})]})]})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(Button,{variant:"outline",className:"flex-1",asChild:!0,children:jsxRuntime.jsxs("a",{href:"https://www.randmar.io/docs/overview/pricingTiers",target:"_blank",rel:"noreferrer",children:[jsxRuntime.jsx(ExternalLink,{className:"h-4 w-4 mr-1"}),"Pricing Tiers"]})}),jsxRuntime.jsxs(Popover,{children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{disabled:t,className:t?"hidden":"flex-1",children:["Upgrade Tier ",jsxRuntime.jsx(ChevronRight,{className:"h-3 w-3 ml-1"})]})}),jsxRuntime.jsx(PopoverContent,{className:"w-56 p-2",children:jsxRuntime.jsxs("div",{className:"grid gap-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-xs mb-1",children:"Select a tier"}),Ae.map(ge=>jsxRuntime.jsx(Button,{variant:"ghost",size:"sm",className:"w-full justify-start h-8",disabled:!ge.enabled,onClick:()=>Ne(ge.name),children:ge.name},ge.name))]})})]})]})]})]}),jsxRuntime.jsx(ChangePricingTierModal,{isLoading:R,open:f,setOpen:g,tier:b,onTierChange:se}),e&&!t&&jsxRuntime.jsxs(Card,{className:"mt-4",children:[jsxRuntime.jsx(CardHeader,{className:"pb-2 pt-3 px-4",children:jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Admin Configuration"})}),jsxRuntime.jsx(CardContent,{className:"pt-2 px-4 pb-4",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Priority"}),jsxRuntime.jsx(RadioGroup$1,{value:I,onValueChange:ae,className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-1",children:[{value:"starter",label:"Starter"},{value:"ecommerce",label:"E-Commerce"},{value:"commercial",label:"Commercial"},{value:"cws",label:"CWS (Basics)"},{value:"novexco",label:"Novexco"},{value:"jeancoutu",label:"Jean Coutu"},{value:"exclusive",label:"Exclusive"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`priority-${ge.value}`,className:"h-6 w-6 scale-50"}),jsxRuntime.jsx(Label$2,{htmlFor:`priority-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]}),jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Shipping Profile"}),jsxRuntime.jsx(RadioGroup$1,{value:V,onValueChange:ie,className:"grid grid-cols-1 md:grid-cols-2 gap-1",children:[{value:"free",label:"Free (A)"},{value:"fixed",label:"Fixed $10 Shipping (B)"},{value:"dropshipped",label:"$15 for drop shipped (C)"},{value:"under1500",label:"15$ under 1,500 (D)"},{value:"fullcharges",label:"Full shipping charges (E)"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`shipping-${ge.value}`,className:"h-6 w-6 scale-50"}),jsxRuntime.jsx(Label$2,{htmlFor:`shipping-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]}),jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Pricing Profile"}),jsxRuntime.jsx(RadioGroup$1,{value:z,onValueChange:oe,className:"grid grid-cols-2 sm:grid-cols-3 gap-1",children:[{value:"exclusive",label:"Exclusive (1)"},{value:"ecommerce",label:"E-Commerce (2)"},{value:"commercial",label:"Commercial (3)"},{value:"buyinggroup",label:"Buying Group (4)"},{value:"cost",label:"Cost (5)"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`pricing-${ge.value}`,className:"h-6 w-6 scale-50 antialiased"}),jsxRuntime.jsx(Label$2,{htmlFor:`pricing-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]})]})})]})]})};function OrderCategories({openOrders:e=[],isLoading:t=!1}){const n=(e==null?void 0:e.filter(I=>I.DocumentType==="Order"))||[],o=(e==null?void 0:e.filter(I=>I.DocumentType==="Shipment"))||[],l=n.filter(I=>I.WarehouseCode!=="3PLE"),d=l.reduce((I,A)=>I+(A.Quantity??0),0),f=l.reduce((I,A)=>I+(A.ExtendedPrice??0),0),g=n.filter(I=>I.WarehouseCode==="3PLE"),b=g.reduce((I,A)=>I+(A.Quantity??0),0),_=g.reduce((I,A)=>I+(A.ExtendedPrice??0),0),S=o.reduce((I,A)=>I+(A.Quantity??0),0),R=o.reduce((I,A)=>I+(A.ExtendedPrice??0),0),C=d+b+S,E=f+_+R,M=[{name:"All",icon:Package,color:"bg-blue-500",orders:C,amount:E},{name:"Processing",icon:RefreshCcw,color:"bg-yellow-500",orders:d,amount:f},{name:"Shipped",icon:Truck,color:"bg-green-500",orders:S,amount:R},{name:"Delayed",icon:CircleAlert,color:"bg-red-500",orders:b,amount:_}];return t?jsxRuntime.jsxs(Card,{className:"w-full md:col-span-2 xl:col-span-1",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(Skeleton,{className:"h-7 w-40"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3.5",children:[1,2,3,4].map(I=>jsxRuntime.jsx(Card,{className:"overflow-hidden rounded-md rounded-b-lg border-0 shadow-md",children:jsxRuntime.jsxs(CardContent,{className:"p-0",children:[jsxRuntime.jsx("div",{className:"bg-gray-200 h-[3px]"}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-12"})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]})]})]})},I))})})]}):jsxRuntime.jsxs(Card,{className:"w-full md:col-span-2 xl:col-span-1",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Order Categories"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3.5",children:M.map(I=>jsxRuntime.jsx(Card,{className:"overflow-hidden rounded-md rounded-b-lg border-0 shadow-md",children:jsxRuntime.jsxs(CardContent,{className:"p-0",children:[jsxRuntime.jsx("div",{className:`${I.color} bg-opacity-60 h-[3px]`}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-base",children:I.name}),jsxRuntime.jsx("div",{className:`${I.color} bg-opacity-90 p-2 rounded-full`,children:jsxRuntime.jsx(I.icon,{className:"size-4 shrink-0 text-white"})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Orders"}),jsxRuntime.jsx("p",{className:"text-xl font-bold",children:I.orders})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Amount"}),jsxRuntime.jsx("p",{className:"text-base font-semibold",children:jsxRuntime.jsx(FormattedNumber,{value:I.amount,style:"currency",currency:"CAD",currencyDisplay:"symbol"})})]})]})]})]})},I.name))})})]})}function LongMonthName(e){if(!e)return;const t=["","January","February","March","April","May","June","July","August","September","October","November","December"];return e===void 0&&(e=new Date().getMonth()+1),e<1&&(e=12+e),t[e]}function SalesSummary({fiscalYearMonthStart:e,salesData:t,isLoading:n}){const o=(t==null?void 0:t.SalesLast30Days)??0,l=(t==null?void 0:t.SalesLast3Months)??0,d=(t==null?void 0:t.SalesYearToDay)??0,f=LongMonthName(e);return n?jsxRuntime.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 mb-4",children:[jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]}),jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]}),jsxRuntime.jsxs(Card,{className:"col-span-2 lg:col-span-1",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-36"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]})]}):jsxRuntime.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 mb-4",children:[jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(CardTitle,{className:"text-sm font-medium",children:"Last 30 Days"}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(TrendingUp,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:o,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]}),jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(CardTitle,{className:"text-sm font-medium",children:"Last 3 Months"}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(Calendar,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:l,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]}),f&&jsxRuntime.jsxs(Card,{className:"col-span-2 lg:col-span-1",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsxs(CardTitle,{className:"text-sm font-medium",children:["Year to Date (",f,")"]}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(CalendarDays,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:d,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]})]})}function ReportsSection({isLoading:e,userEmail:t,appID:n}){const{toast:o}=useToast(),[l,{isLoading:d}]=usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation(),[f,{isLoading:g}]=usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation(),[b,{isLoading:_}]=usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation(),[S,{isLoading:R}]=usePostV4ResellerByRouteResellerIdReportProductsEmailMutation(),[C,{isLoading:E}]=usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation(),[M,{isLoading:I}]=usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation(),[A,V]=React.useState(null),[q,z]=React.useState(t),[Q,F]=React.useState(!1),O=[{name:"Products",reports:[{id:"Products",title:"Universal Product List",description:"A comprehensive overview of your product list with detailed specifications and pricing information.",icon:Package}]},{name:"Operation Details",reports:[{id:"OpenOrders",title:"Order Details",description:"A detailed report of all your orders and shipments, including status, tracking information, and delivery estimates.",icon:ShoppingCart},{id:"Invoices",title:"Invoices and Credits Report",description:"Detailed overview of your invoices and credits within a specific date range. It also contains reports about additional charges, serial numbers, and other relevant information.",icon:ScrollText},{id:"Statement",title:"Statement and RMAs Report",description:"A detailed report of all unpaid invoices and active RMAs.",icon:Banknote}]},{name:"Tracking Files",reports:[{id:"AmazonTrackingFile",title:"Amazon Tracking File",description:"Track products sold on Amazon marketplace with detailed sales and inventory information.",icon:ChartNoAxesColumnIncreasing},{id:"WalmartTrackingFile",title:"Walmart Tracking File",description:"Track products sold on Walmart marketplace with detailed sales and inventory information.",icon:ChartNoAxesColumnIncreasing}]}],te=async oe=>{V(oe),F(!0)},ae=async()=>{if(!(!A||!n))try{switch(A.id){case"Products":await S({routeResellerId:n,emailAddress:q}).unwrap();break;case"AmazonTrackingFile":await f({routeResellerId:n,emailAddress:q}).unwrap();break;case"WalmartTrackingFile":await l({routeResellerId:n,emailAddress:q}).unwrap();break;case"OpenOrders":await b({routeResellerId:n,emailAddress:q}).unwrap();break;case"Invoices":await C({routeResellerId:n,emailAddress:q}).unwrap();break;case"Statement":await M({routeResellerId:n,emailAddress:q}).unwrap();break;default:throw new Error("invalid report id")}o({title:"Report requested",description:`The ${A.title} will be sent to ${q} shortly.`,variant:"success"}),F(!1)}catch(oe){console.error("Error requesting report:",oe),o({title:"Error",description:"Failed to request report. Please try again.",variant:"destructive"})}},ie=_||R||g||d||I||E;return jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{children:[jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Reports"}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"Download essential business reports, from your Product List to your Order Details."})]}),jsxRuntime.jsx(CardContent,{className:"space-y-6",children:e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:[1,2,3].map(oe=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-48"}),[1,2].map(se=>jsxRuntime.jsxs("div",{className:"flex items-start gap-4 p-4 border rounded-lg",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-9 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"})]}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"})]},se))]},oe))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:O.map(oe=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold",children:oe.name}),oe.reports.map(se=>jsxRuntime.jsxs("div",{className:"flex items-start gap-4 p-4 border rounded-lg hover:bg-gray-100 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-2 rounded-full",children:jsxRuntime.jsx(se.icon,{className:"h-5 w-5 text-primary"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h4",{className:"font-semibold text-sm",children:se.title}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:se.description})]}),jsxRuntime.jsxs(Button,{variant:"outline",size:"sm",className:"flex items-center gap-1",onClick:()=>te(se),children:[jsxRuntime.jsx(Download,{className:"h-4 w-4"}),"Request"]})]},se.id))]},oe.name))})}),jsxRuntime.jsx(Dialog,{open:Q,onOpenChange:F,children:jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsxs(DialogTitle,{children:["Request ",A==null?void 0:A.title]}),jsxRuntime.jsx(DialogDescription,{children:"Enter the email address where you would like to receive the report."})]}),jsxRuntime.jsxs("div",{className:"py-4",children:[jsxRuntime.jsx(Label$2,{htmlFor:"email",children:"Email"}),jsxRuntime.jsx(Input,{id:"email",value:q,onChange:oe=>z(oe.target.value),placeholder:"your@email.com",className:"mt-2"})]}),jsxRuntime.jsx(DialogDescription,{children:"The report will take around 5 minutes to generate."}),jsxRuntime.jsxs(DialogFooter,{children:[jsxRuntime.jsx(Button,{variant:"outline",onClick:()=>F(!1),children:"Cancel"}),jsxRuntime.jsx(Button,{onClick:ae,disabled:!q||ie,children:ie?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Sending..."]}):"Send Report"})]})]})})]})}function UnsavedChangesDialog({isOpen:e,onClose:t,onConfirm:n,title:o,description:l,confirmText:d="Confirm",cancelText:f="Cancel"}){return jsxRuntime.jsx(Dialog,{open:e,onOpenChange:t,children:jsxRuntime.jsxs(DialogContent,{className:"sm:max-w-[425px]",children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:o}),jsxRuntime.jsx(DialogDescription,{children:l})]}),jsxRuntime.jsxs(DialogFooter,{children:[jsxRuntime.jsx(Button,{variant:"outline",onClick:t,children:f}),jsxRuntime.jsx(Button,{onClick:n,children:d})]})]})})}function useRouterNavigationGuard(e){const[t,n]=React.useState(!1),o=reactRouterDom.useBlocker(React.useCallback(({currentLocation:g,nextLocation:b})=>{const _=g.pathname!==b.pathname||g.search!==b.search||g.hash!==b.hash;return e()&&_},[e]));React.useEffect(()=>{o.state==="blocked"&&n(!0)},[o]),React.useEffect(()=>{const g=b=>{if(e())return b.preventDefault(),"You have unsaved changes. Are you sure you want to leave?"};return window.addEventListener("beforeunload",g),()=>{window.removeEventListener("beforeunload",g)}},[e]);const l=React.useCallback(()=>{n(!1),o.state==="blocked"&&o.proceed()},[o]),d=React.useCallback(()=>{n(!1),o.state==="blocked"&&o.reset()},[o]),f=React.useCallback(()=>jsxRuntime.jsx(UnsavedChangesDialog,{isOpen:t,onClose:d,onConfirm:l,title:"Unsaved Changes",description:"You have unsaved changes. Are you sure you want to leave? Your changes will be lost.",confirmText:"Discard Changes",cancelText:"Stay on Page"}),[t,d,l]);return{showDialog:t,handleConfirm:l,handleCancel:d,NavigationGuardDialog:f}}function MonthlySalesChart({salesData:e,chartHeight:t=300,units:n="$",unitsPosition:o="left",className:l,extrapolate:d=!0}){const[f,g]=React.useState([]);return React.useEffect(()=>{if(!e||e.length===0){g([]);return}const b=e.reduce((V,q)=>{const z=q.Day??0,Q=Math.floor(z).toString();if(Q.length!==8||isNaN(parseInt(Q)))return console.warn(`Skipping invalid Day format: ${q.Day}`),V;const F=Q.substring(0,4),O=Q.substring(4,6),te=`${F}-${O}`;return V[te]=(V[te]||0)+(q.ExtendedPrice??0),V},{}),_=Object.keys(b).sort(),S=new Date,R=S.getFullYear(),C=S.getMonth(),E=S.getDate(),M=`${R}-${(C+1).toString().padStart(2,"0")}`,I={...b};if(d&&_.length>0&&_[_.length-1]===M){const V=I[M],q=new Date(R,C+1,0).getDate();if(E<q&&E>0){const Q=V/E*q;I[M]=Q}}const A=_.map(V=>{const q=I[V],[z,Q]=V.split("-").map(Number);return{month:new Date(z,Q-1).toLocaleString("default",{month:"short",year:"numeric"}),sales:q}});g(A)},[e,d]),f.length===0?jsxRuntime.jsx("div",{className:l||"p-4 text-center text-muted-foreground",children:"No monthly sales data to display."}):jsxRuntime.jsx(AreaChart,{data:f,units:n,unitsPosition:o,height:t,className:l})}function Reseller({appID:e,readonly:t,payInvoicePath:n,userEmail:o,isSuperAdmin:l}){var A;const{data:d,isLoading:f,isError:g}=useGetV4PartnerByApplicationIdAccountResellerQuery({applicationId:e??"",withSpecification:!0}),{data:b}=useGetV4ResellerByRouteResellerIdDocumentsActiveOrderDetailsQuery({routeResellerId:e??""}),[_,S]=React.useState(!0),[R,C]=React.useState({publicInfo:{hasUnsavedChanges:!1}}),E=React.useCallback(()=>R.publicInfo.hasUnsavedChanges,[R]),M=React.useCallback((V,q)=>{C(z=>{var Q;return((Q=z[V])==null?void 0:Q.hasUnsavedChanges)!==q.hasUnsavedChanges?(console.log(`Updating form state for ${V}:`,q.hasUnsavedChanges),{...z,[V]:q}):z})},[]),{NavigationGuardDialog:I}=useRouterNavigationGuard(E);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:g?jsxRuntime.jsx(Card,{className:"p-6",children:jsxRuntime.jsxs(Alert,{variant:"destructive",children:[jsxRuntime.jsx(CircleAlert,{className:"h-4 w-4"}),jsxRuntime.jsx(AlertTitle,{children:"Error"}),jsxRuntime.jsx(AlertDescription,{children:"There was an error loading your reseller information. Please try again later."})]})}):jsxRuntime.jsxs("div",{className:"space-y-6 mb-6",children:[jsxRuntime.jsx(SalesSummary,{fiscalYearMonthStart:(d==null?void 0:d.FiscalYearMonthStart)||1,salesData:d==null?void 0:d.SalesData,isLoading:f}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsx(OrderCategories,{openOrders:b,isLoading:f}),jsxRuntime.jsx(BillingCard,{readonly:t,reseller:d||{},payInvoicePath:n,isLoading:f}),jsxRuntime.jsx(PublicInfo,{reseller:d||{},appID:e??"",isLoading:f,readonly:t,onUnsavedChanges:V=>M("publicInfo",{hasUnsavedChanges:V})})]}),jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Sales"})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(MonthlySalesChart,{salesData:(d==null?void 0:d.SalesStatistics)??[],extrapolate:_}),jsxRuntime.jsxs("div",{className:"flex space-x-2 my-1",children:[jsxRuntime.jsx(Switch,{checked:_,onCheckedChange:S,id:"extrapolate-switch"}),jsxRuntime.jsx(Label$2,{htmlFor:"extrapolate-switch",children:"Extrapolate"})]}),_?jsxRuntime.jsx("p",{className:"text-sm",children:"*Sales for the current month are projected, not actual."}):jsxRuntime.jsx(jsxRuntime.Fragment,{})]})]}),jsxRuntime.jsx(AccountTier,{isSuperAdmin:l,readonly:t,reseller:d||{},appID:e??"",isLoading:f})]})]}),jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Brands you are qualified for"})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("p",{children:"This module is under construction."}),jsxRuntime.jsx("ul",{children:(A=d==null?void 0:d.Qualifications)==null?void 0:A.map(V=>jsxRuntime.jsx("li",{children:V.ManufacturerId}))})]})]}),jsxRuntime.jsx(ReportsSection,{appID:e,userEmail:o,isLoading:f})]})}),jsxRuntime.jsx(I,{})]})}function composeEventHandlers(e,t,{checkForDefaultPrevented:n=!0}={}){return function(l){if(e==null||e(l),n===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function setRef(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function composeRefs(...e){return t=>{let n=!1;const o=e.map(l=>{const d=setRef(l,t);return!n&&typeof d=="function"&&(n=!0),d});if(n)return()=>{for(let l=0;l<o.length;l++){const d=o[l];typeof d=="function"?d():setRef(e[l],null)}}}}function useComposedRefs(...e){return React__namespace.useCallback(composeRefs(...e),e)}function createContext2(e,t){const n=React__namespace.createContext(t),o=d=>{const{children:f,...g}=d,b=React__namespace.useMemo(()=>g,Object.values(g));return jsxRuntime.jsx(n.Provider,{value:b,children:f})};o.displayName=e+"Provider";function l(d){const f=React__namespace.useContext(n);if(f)return f;if(t!==void 0)return t;throw new Error(`\`${d}\` must be used within \`${e}\``)}return[o,l]}function createContextScope(e,t=[]){let n=[];function o(d,f){const g=React__namespace.createContext(f),b=n.length;n=[...n,f];const _=R=>{var V;const{scope:C,children:E,...M}=R,I=((V=C==null?void 0:C[e])==null?void 0:V[b])||g,A=React__namespace.useMemo(()=>M,Object.values(M));return jsxRuntime.jsx(I.Provider,{value:A,children:E})};_.displayName=d+"Provider";function S(R,C){var I;const E=((I=C==null?void 0:C[e])==null?void 0:I[b])||g,M=React__namespace.useContext(E);if(M)return M;if(f!==void 0)return f;throw new Error(`\`${R}\` must be used within \`${d}\``)}return[_,S]}const l=()=>{const d=n.map(f=>React__namespace.createContext(f));return function(g){const b=(g==null?void 0:g[e])||d;return React__namespace.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return l.scopeName=e,[o,composeContextScopes(l,...t)]}function composeContextScopes(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(d){const f=o.reduce((g,{useScope:b,scopeName:_})=>{const R=b(d)[`__scope${_}`];return{...g,...R}},{});return React__namespace.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return n.scopeName=t.scopeName,n}function createSlot$1(e){const t=createSlotClone$1(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$1);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}function createSlotClone$1(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n,f=React__namespace.isValidElement(l)?getElementRef$2(l):void 0,g=useComposedRefs(f,o);if(React__namespace.isValidElement(l)){const b=mergeProps$1(d,l.props);return l.type!==React__namespace.Fragment&&(b.ref=g),React__namespace.cloneElement(l,b)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$1=Symbol("radix.slottable");function isSlottable$1(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$1}function mergeProps$1(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NODES$1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive$1=NODES$1.reduce((e,t)=>{const n=createSlot$1(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function createCollection$1(e){const t=e+"CollectionProvider",[n,o]=createContextScope(t),[l,d]=n(t,{collectionRef:{current:null},itemMap:new Map}),f=I=>{const{scope:A,children:V}=I,q=React.useRef(null),z=React.useRef(new Map).current;return jsxRuntime.jsx(l,{scope:A,itemMap:z,collectionRef:q,children:V})};f.displayName=t;const g=e+"CollectionSlot",b=createSlot$1(g),_=React.forwardRef((I,A)=>{const{scope:V,children:q}=I,z=d(g,V),Q=useComposedRefs(A,z.collectionRef);return jsxRuntime.jsx(b,{ref:Q,children:q})});_.displayName=g;const S=e+"CollectionItemSlot",R="data-radix-collection-item",C=createSlot$1(S),E=React.forwardRef((I,A)=>{const{scope:V,children:q,...z}=I,Q=React.useRef(null),F=useComposedRefs(A,Q),O=d(S,V);return React.useEffect(()=>(O.itemMap.set(Q,{ref:Q,...z}),()=>void O.itemMap.delete(Q))),jsxRuntime.jsx(C,{[R]:"",ref:F,children:q})});E.displayName=S;function M(I){const A=d(e+"CollectionConsumer",I);return React.useCallback(()=>{const q=A.collectionRef.current;if(!q)return[];const z=Array.from(q.querySelectorAll(`[${R}]`));return Array.from(A.itemMap.values()).sort((O,te)=>z.indexOf(O.ref.current)-z.indexOf(te.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:f,Slot:_,ItemSlot:E},M,o]}var useLayoutEffect2=globalThis!=null&&globalThis.document?React__namespace.useLayoutEffect:()=>{},useReactId=React__namespace[" useId ".trim().toString()]||(()=>{}),count$2=0;function useId(e){const[t,n]=React__namespace.useState(useReactId());return useLayoutEffect2(()=>{n(o=>o??String(count$2++))},[e]),t?`radix-${t}`:""}function useCallbackRef$1(e){const t=React__namespace.useRef(e);return React__namespace.useEffect(()=>{t.current=e}),React__namespace.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var useInsertionEffect=React__namespace[" useInsertionEffect ".trim().toString()]||useLayoutEffect2;function useControllableState({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[l,d,f]=useUncontrolledState({defaultProp:t,onChange:n}),g=e!==void 0,b=g?e:l;{const S=React__namespace.useRef(e!==void 0);React__namespace.useEffect(()=>{const R=S.current;R!==g&&console.warn(`${o} is changing from ${R?"controlled":"uncontrolled"} to ${g?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),S.current=g},[g,o])}const _=React__namespace.useCallback(S=>{var R;if(g){const C=isFunction$1(S)?S(e):S;C!==e&&((R=f.current)==null||R.call(f,C))}else d(S)},[g,e,d,f]);return[b,_]}function useUncontrolledState({defaultProp:e,onChange:t}){const[n,o]=React__namespace.useState(e),l=React__namespace.useRef(n),d=React__namespace.useRef(t);return useInsertionEffect(()=>{d.current=t},[t]),React__namespace.useEffect(()=>{var f;l.current!==n&&((f=d.current)==null||f.call(d,n),l.current=n)},[n,l]),[n,o,d]}function isFunction$1(e){return typeof e=="function"}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}var ENTRY_FOCUS$1="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS$2={bubbles:!1,cancelable:!0},GROUP_NAME$4="RovingFocusGroup",[Collection$4,useCollection$4,createCollectionScope$4]=createCollection$1(GROUP_NAME$4),[createRovingFocusGroupContext$1,createRovingFocusGroupScope$1]=createContextScope(GROUP_NAME$4,[createCollectionScope$4]),[RovingFocusProvider$1,useRovingFocusContext$1]=createRovingFocusGroupContext$1(GROUP_NAME$4),RovingFocusGroup$1=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$4.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$4.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl$1,{...e,ref:t})})}));RovingFocusGroup$1.displayName=GROUP_NAME$4;var RovingFocusGroupImpl$1=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:_,preventScrollOnEntryFocus:S=!1,...R}=e,C=React__namespace.useRef(null),E=useComposedRefs(t,C),M=useDirection(d),[I,A]=useControllableState({prop:f,defaultProp:g??null,onChange:b,caller:GROUP_NAME$4}),[V,q]=React__namespace.useState(!1),z=useCallbackRef$1(_),Q=useCollection$4(n),F=React__namespace.useRef(!1),[O,te]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const ae=C.current;if(ae)return ae.addEventListener(ENTRY_FOCUS$1,z),()=>ae.removeEventListener(ENTRY_FOCUS$1,z)},[z]),jsxRuntime.jsx(RovingFocusProvider$1,{scope:n,orientation:o,dir:M,loop:l,currentTabStopId:I,onItemFocus:React__namespace.useCallback(ae=>A(ae),[A]),onItemShiftTab:React__namespace.useCallback(()=>q(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>te(ae=>ae+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>te(ae=>ae-1),[]),children:jsxRuntime.jsx(Primitive$1.div,{tabIndex:V||O===0?-1:0,"data-orientation":o,...R,ref:E,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{F.current=!0}),onFocus:composeEventHandlers(e.onFocus,ae=>{const ie=!F.current;if(ae.target===ae.currentTarget&&ie&&!V){const oe=new CustomEvent(ENTRY_FOCUS$1,EVENT_OPTIONS$2);if(ae.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const se=Q().filter(Le=>Le.focusable),Ae=se.find(Le=>Le.active),Ne=se.find(Le=>Le.id===I),Oe=[Ae,Ne,...se].filter(Boolean).map(Le=>Le.ref.current);focusFirst$4(Oe,S)}}F.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>q(!1))})})}),ITEM_NAME$5="RovingFocusGroupItem",RovingFocusGroupItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:d,children:f,...g}=e,b=useId(),_=d||b,S=useRovingFocusContext$1(ITEM_NAME$5,n),R=S.currentTabStopId===_,C=useCollection$4(n),{onFocusableItemAdd:E,onFocusableItemRemove:M,currentTabStopId:I}=S;return React__namespace.useEffect(()=>{if(o)return E(),()=>M()},[o,E,M]),jsxRuntime.jsx(Collection$4.ItemSlot,{scope:n,id:_,focusable:o,active:l,children:jsxRuntime.jsx(Primitive$1.span,{tabIndex:R?0:-1,"data-orientation":S.orientation,...g,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,A=>{o?S.onItemFocus(_):A.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>S.onItemFocus(_)),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){S.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const V=getFocusIntent$1(A,S.orientation,S.dir);if(V!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let z=C().filter(Q=>Q.focusable).map(Q=>Q.ref.current);if(V==="last")z.reverse();else if(V==="prev"||V==="next"){V==="prev"&&z.reverse();const Q=z.indexOf(A.currentTarget);z=S.loop?wrapArray$3(z,Q+1):z.slice(Q+1)}setTimeout(()=>focusFirst$4(z))}}),children:typeof f=="function"?f({isCurrentTabStop:R,hasTabStop:I!=null}):f})})});RovingFocusGroupItem$1.displayName=ITEM_NAME$5;var MAP_KEY_TO_FOCUS_INTENT$1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey$1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent$1(e,t,n){const o=getDirectionAwareKey$1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT$1[o]}function focusFirst$4(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$3(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Root$b=RovingFocusGroup$1,Item$2=RovingFocusGroupItem$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const d=l[0];let f,g;if("borderBoxSize"in d){const b=d.borderBoxSize,_=Array.isArray(b)?b[0]:b;f=_.inlineSize,g=_.blockSize}else f=e.offsetWidth,g=e.offsetHeight;n({width:f,height:g})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function usePrevious(e){const t=React__namespace.useRef({value:e,previous:e});return React__namespace.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function useStateMachine$1(e,t){return React__namespace.useReducer((n,o)=>t[n][o]??n,e)}var Presence=e=>{const{present:t,children:n}=e,o=usePresence(t),l=typeof n=="function"?n({present:o.isPresent}):React__namespace.Children.only(n),d=useComposedRefs(o.ref,getElementRef$1(l));return typeof n=="function"||o.isPresent?React__namespace.cloneElement(l,{ref:d}):null};Presence.displayName="Presence";function usePresence(e){const[t,n]=React__namespace.useState(),o=React__namespace.useRef(null),l=React__namespace.useRef(e),d=React__namespace.useRef("none"),f=e?"mounted":"unmounted",[g,b]=useStateMachine$1(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return React__namespace.useEffect(()=>{const _=getAnimationName(o.current);d.current=g==="mounted"?_:"none"},[g]),useLayoutEffect2(()=>{const _=o.current,S=l.current;if(S!==e){const C=d.current,E=getAnimationName(_);e?b("MOUNT"):E==="none"||(_==null?void 0:_.display)==="none"?b("UNMOUNT"):b(S&&C!==E?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,b]),useLayoutEffect2(()=>{if(t){let _;const S=t.ownerDocument.defaultView??window,R=E=>{const I=getAnimationName(o.current).includes(E.animationName);if(E.target===t&&I&&(b("ANIMATION_END"),!l.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",_=S.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},C=E=>{E.target===t&&(d.current=getAnimationName(o.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",R),t.addEventListener("animationend",R),()=>{S.clearTimeout(_),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",R),t.removeEventListener("animationend",R)}}else b("ANIMATION_END")},[t,b]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:React__namespace.useCallback(_=>{o.current=_?getComputedStyle(_):null,n(_)},[])}}function getAnimationName(e){return(e==null?void 0:e.animationName)||"none"}function getElementRef$1(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RADIO_NAME="Radio",[createRadioContext,createRadioScope]=createContextScope(RADIO_NAME),[RadioProvider,useRadioContext]=createRadioContext(RADIO_NAME),Radio=React__namespace.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:l=!1,required:d,disabled:f,value:g="on",onCheck:b,form:_,...S}=e,[R,C]=React__namespace.useState(null),E=useComposedRefs(t,A=>C(A)),M=React__namespace.useRef(!1),I=R?_||!!R.closest("form"):!0;return jsxRuntime.jsxs(RadioProvider,{scope:n,checked:l,disabled:f,children:[jsxRuntime.jsx(Primitive$1.button,{type:"button",role:"radio","aria-checked":l,"data-state":getState$4(l),"data-disabled":f?"":void 0,disabled:f,value:g,...S,ref:E,onClick:composeEventHandlers(e.onClick,A=>{l||b==null||b(),I&&(M.current=A.isPropagationStopped(),M.current||A.stopPropagation())})}),I&&jsxRuntime.jsx(RadioBubbleInput,{control:R,bubbles:!M.current,name:o,value:g,checked:l,required:d,disabled:f,form:_,style:{transform:"translateX(-100%)"}})]})});Radio.displayName=RADIO_NAME;var INDICATOR_NAME$2="RadioIndicator",RadioIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...l}=e,d=useRadioContext(INDICATOR_NAME$2,n);return jsxRuntime.jsx(Presence,{present:o||d.checked,children:jsxRuntime.jsx(Primitive$1.span,{"data-state":getState$4(d.checked),"data-disabled":d.disabled?"":void 0,...l,ref:t})})});RadioIndicator.displayName=INDICATOR_NAME$2;var BUBBLE_INPUT_NAME$3="RadioBubbleInput",RadioBubbleInput=React__namespace.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...l},d)=>{const f=React__namespace.useRef(null),g=useComposedRefs(f,d),b=usePrevious(n),_=useSize(t);return React__namespace.useEffect(()=>{const S=f.current;if(!S)return;const R=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(R,"checked").set;if(b!==n&&E){const M=new Event("click",{bubbles:o});E.call(S,n),S.dispatchEvent(M)}},[b,n,o]),jsxRuntime.jsx(Primitive$1.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...l,tabIndex:-1,ref:g,style:{...l.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});RadioBubbleInput.displayName=BUBBLE_INPUT_NAME$3;function getState$4(e){return e?"checked":"unchecked"}var ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],RADIO_GROUP_NAME$2="RadioGroup",[createRadioGroupContext,createRadioGroupScope]=createContextScope(RADIO_GROUP_NAME$2,[createRovingFocusGroupScope$1,createRadioScope]),useRovingFocusGroupScope$2=createRovingFocusGroupScope$1(),useRadioScope=createRadioScope(),[RadioGroupProvider$1,useRadioGroupContext$1]=createRadioGroupContext(RADIO_GROUP_NAME$2),RadioGroup$2=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:l,value:d,required:f=!1,disabled:g=!1,orientation:b,dir:_,loop:S=!0,onValueChange:R,...C}=e,E=useRovingFocusGroupScope$2(n),M=useDirection(_),[I,A]=useControllableState({prop:d,defaultProp:l??null,onChange:R,caller:RADIO_GROUP_NAME$2});return jsxRuntime.jsx(RadioGroupProvider$1,{scope:n,name:o,required:f,disabled:g,value:I,onValueChange:A,children:jsxRuntime.jsx(Root$b,{asChild:!0,...E,orientation:b,dir:M,loop:S,children:jsxRuntime.jsx(Primitive$1.div,{role:"radiogroup","aria-required":f,"aria-orientation":b,"data-disabled":g?"":void 0,dir:M,...C,ref:t})})})});RadioGroup$2.displayName=RADIO_GROUP_NAME$2;var ITEM_NAME$4="RadioGroupItem",RadioGroupItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...l}=e,d=useRadioGroupContext$1(ITEM_NAME$4,n),f=d.disabled||o,g=useRovingFocusGroupScope$2(n),b=useRadioScope(n),_=React__namespace.useRef(null),S=useComposedRefs(t,_),R=d.value===l.value,C=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{const E=I=>{ARROW_KEYS.includes(I.key)&&(C.current=!0)},M=()=>C.current=!1;return document.addEventListener("keydown",E),document.addEventListener("keyup",M),()=>{document.removeEventListener("keydown",E),document.removeEventListener("keyup",M)}},[]),jsxRuntime.jsx(Item$2,{asChild:!0,...g,focusable:!f,active:R,children:jsxRuntime.jsx(Radio,{disabled:f,required:d.required,checked:R,...b,...l,name:d.name,ref:S,onCheck:()=>d.onValueChange(l.value),onKeyDown:composeEventHandlers(E=>{E.key==="Enter"&&E.preventDefault()}),onFocus:composeEventHandlers(l.onFocus,()=>{var E;C.current&&((E=_.current)==null||E.click())})})})});RadioGroupItem$1.displayName=ITEM_NAME$4;var INDICATOR_NAME2="RadioGroupIndicator",RadioGroupIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,l=useRadioScope(n);return jsxRuntime.jsx(RadioIndicator,{...l,...o,ref:t})});RadioGroupIndicator.displayName=INDICATOR_NAME2;var Root2$6=RadioGroup$2,Item2$2=RadioGroupItem$1,Indicator$1=RadioGroupIndicator;const RadioGroup$1=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Root2$6,{className:cn("grid gap-2",e),...t,ref:n}));RadioGroup$1.displayName=Root2$6.displayName;const RadioGroupItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Item2$2,{ref:n,className:cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:jsxRuntime.jsx(Indicator$1,{className:"flex items-center justify-center",children:jsxRuntime.jsx(Circle,{className:"h-3.5 w-3.5 fill-primary"})})}));RadioGroupItem.displayName=Item2$2.displayName;function createSlot(e){const t=createSlotClone(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}var Slot$4=createSlot("Slot");function createSlotClone(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef(l),g=mergeProps(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function createSlottable(e){const t=({children:n})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=SLOTTABLE_IDENTIFIER,t}function isSlottable(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{d(...g),l(...g)}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive=NODES.reduce((e,t)=>{const n=createSlot(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function dispatchDiscreteCustomEvent(e,t){e&&ReactDOM__namespace.flushSync(()=>e.dispatchEvent(t))}function useEscapeKeydown(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e);React__namespace.useEffect(()=>{const o=l=>{l.key==="Escape"&&n(l)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=React__namespace.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=React__namespace.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,onDismiss:g,...b}=e,_=React__namespace.useContext(DismissableLayerContext),[S,R]=React__namespace.useState(null),C=(S==null?void 0:S.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=React__namespace.useState({}),M=useComposedRefs(t,te=>R(te)),I=Array.from(_.layers),[A]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),V=I.indexOf(A),q=S?I.indexOf(S):-1,z=_.layersWithOutsidePointerEventsDisabled.size>0,Q=q>=V,F=usePointerDownOutside(te=>{const ae=te.target,ie=[..._.branches].some(oe=>oe.contains(ae));!Q||ie||(l==null||l(te),f==null||f(te),te.defaultPrevented||g==null||g())},C),O=useFocusOutside(te=>{const ae=te.target;[..._.branches].some(oe=>oe.contains(ae))||(d==null||d(te),f==null||f(te),te.defaultPrevented||g==null||g())},C);return useEscapeKeydown(te=>{q===_.layers.size-1&&(o==null||o(te),!te.defaultPrevented&&g&&(te.preventDefault(),g()))},C),React__namespace.useEffect(()=>{if(S)return n&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(S)),_.layers.add(S),dispatchUpdate(),()=>{n&&_.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=originalBodyPointerEvents)}},[S,C,n,_]),React__namespace.useEffect(()=>()=>{S&&(_.layers.delete(S),_.layersWithOutsidePointerEventsDisabled.delete(S),dispatchUpdate())},[S,_]),React__namespace.useEffect(()=>{const te=()=>E({});return document.addEventListener(CONTEXT_UPDATE,te),()=>document.removeEventListener(CONTEXT_UPDATE,te)},[]),jsxRuntime.jsx(Primitive.div,{...b,ref:M,style:{pointerEvents:z?Q?"auto":"none":void 0,...e.style},onFocusCapture:composeEventHandlers(e.onFocusCapture,O.onFocusCapture),onBlurCapture:composeEventHandlers(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:composeEventHandlers(e.onPointerDownCapture,F.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=React__namespace.forwardRef((e,t)=>{const n=React__namespace.useContext(DismissableLayerContext),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return n.branches.add(d),()=>{n.branches.delete(d)}},[n.branches]),jsxRuntime.jsx(Primitive.div,{...e,ref:l})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e),o=React__namespace.useRef(!1),l=React__namespace.useRef(()=>{});return React__namespace.useEffect(()=>{const d=g=>{if(g.target&&!o.current){let b=function(){handleAndDispatchCustomEvent$1(POINTER_DOWN_OUTSIDE,n,_,{discrete:!0})};const _={originalEvent:g};g.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=b,t.addEventListener("click",l.current,{once:!0})):b()}else t.removeEventListener("click",l.current);o.current=!1},f=window.setTimeout(()=>{t.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),t.removeEventListener("pointerdown",d),t.removeEventListener("click",l.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function useFocusOutside(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e),o=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{const l=d=>{d.target&&!o.current&&handleAndDispatchCustomEvent$1(FOCUS_OUTSIDE,n,{originalEvent:d},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function dispatchUpdate(){const e=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(e)}function handleAndDispatchCustomEvent$1(e,t,n,{discrete:o}){const l=n.originalEvent.target,d=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),o?dispatchDiscreteCustomEvent(l,d):l.dispatchEvent(d)}var Root$a=DismissableLayer,Branch=DismissableLayerBranch,AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS$1={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=React__namespace.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:l,onUnmountAutoFocus:d,...f}=e,[g,b]=React__namespace.useState(null),_=useCallbackRef$1(l),S=useCallbackRef$1(d),R=React__namespace.useRef(null),C=useComposedRefs(t,I=>b(I)),E=React__namespace.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;React__namespace.useEffect(()=>{if(o){let I=function(z){if(E.paused||!g)return;const Q=z.target;g.contains(Q)?R.current=Q:focus(R.current,{select:!0})},A=function(z){if(E.paused||!g)return;const Q=z.relatedTarget;Q!==null&&(g.contains(Q)||focus(R.current,{select:!0}))},V=function(z){if(document.activeElement===document.body)for(const F of z)F.removedNodes.length>0&&focus(g)};document.addEventListener("focusin",I),document.addEventListener("focusout",A);const q=new MutationObserver(V);return g&&q.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",I),document.removeEventListener("focusout",A),q.disconnect()}}},[o,g,E.paused]),React__namespace.useEffect(()=>{if(g){focusScopesStack.add(E);const I=document.activeElement;if(!g.contains(I)){const V=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS$1);g.addEventListener(AUTOFOCUS_ON_MOUNT,_),g.dispatchEvent(V),V.defaultPrevented||(focusFirst$3(removeLinks(getTabbableCandidates$1(g)),{select:!0}),document.activeElement===I&&focus(g))}return()=>{g.removeEventListener(AUTOFOCUS_ON_MOUNT,_),setTimeout(()=>{const V=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS$1);g.addEventListener(AUTOFOCUS_ON_UNMOUNT,S),g.dispatchEvent(V),V.defaultPrevented||focus(I??document.body,{select:!0}),g.removeEventListener(AUTOFOCUS_ON_UNMOUNT,S),focusScopesStack.remove(E)},0)}}},[g,_,S,E]);const M=React__namespace.useCallback(I=>{if(!n&&!o||E.paused)return;const A=I.key==="Tab"&&!I.altKey&&!I.ctrlKey&&!I.metaKey,V=document.activeElement;if(A&&V){const q=I.currentTarget,[z,Q]=getTabbableEdges(q);z&&Q?!I.shiftKey&&V===Q?(I.preventDefault(),n&&focus(z,{select:!0})):I.shiftKey&&V===z&&(I.preventDefault(),n&&focus(Q,{select:!0})):V===q&&I.preventDefault()}},[n,o,E.paused]);return jsxRuntime.jsx(Primitive.div,{tabIndex:-1,...f,ref:C,onKeyDown:M})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst$3(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(focus(o,{select:t}),document.activeElement!==n)return}function getTabbableEdges(e){const t=getTabbableCandidates$1(e),n=findVisible(t,e),o=findVisible(t.reverse(),e);return[n,o]}function getTabbableCandidates$1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function findVisible(e,t){for(const n of e)if(!isHidden(n,{upTo:t}))return n}function isHidden(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function isSelectableInput(e){return e instanceof HTMLInputElement&&"select"in e}function focus(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&isSelectableInput(e)&&t&&e.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=arrayRemove(e,t),e.unshift(t)},remove(t){var n;e=arrayRemove(e,t),(n=e[0])==null||n.resume()}}}function arrayRemove(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function removeLinks(e){return e.filter(t=>t.tagName!=="A")}var PORTAL_NAME$6="Portal",Portal$5=React__namespace.forwardRef((e,t)=>{var g;const{container:n,...o}=e,[l,d]=React__namespace.useState(!1);useLayoutEffect2(()=>d(!0),[]);const f=n||l&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return f?ReactDOM.createPortal(jsxRuntime.jsx(Primitive.div,{...o,ref:t}),f):null});Portal$5.displayName=PORTAL_NAME$6;var count$1=0;function useFocusGuards(){React__namespace.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",e[1]??createFocusGuard()),count$1++,()=>{count$1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),count$1--}},[])}function createFocusGuard(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function useCallbackRef(e,t){var n=React.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var l=n.value;l!==o&&(n.value=o,n.callback(o,l))}}}})[0];return n.callback=t,n.facade}var useIsomorphicLayoutEffect=typeof window<"u"?React__namespace.useLayoutEffect:React__namespace.useEffect,currentValues=new WeakMap;function useMergeRefs(e,t){var n=useCallbackRef(null,function(o){return e.forEach(function(l){return assignRef(l,o)})});return useIsomorphicLayoutEffect(function(){var o=currentValues.get(n);if(o){var l=new Set(o),d=new Set(e),f=n.current;l.forEach(function(g){d.has(g)||assignRef(g,null)}),d.forEach(function(g){l.has(g)||assignRef(g,f)})}currentValues.set(n,e)},[e]),n}function ItoI(e){return e}function innerCreateMedium(e,t){t===void 0&&(t=ItoI);var n=[],o=!1,l={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(d){var f=t(d,o);return n.push(f),function(){n=n.filter(function(g){return g!==f})}},assignSyncMedium:function(d){for(o=!0;n.length;){var f=n;n=[],f.forEach(d)}n={push:function(g){return d(g)},filter:function(){return n}}},assignMedium:function(d){o=!0;var f=[];if(n.length){var g=n;n=[],g.forEach(d),f=n}var b=function(){var S=f;f=[],S.forEach(d)},_=function(){return Promise.resolve().then(b)};_(),n={push:function(S){f.push(S),_()},filter:function(S){return f=f.filter(S),n}}}};return l}function createSidecarMedium(e){e===void 0&&(e={});var t=innerCreateMedium(null);return t.options=__assign$1({async:!0,ssr:!1},e),t}var SideCar$1=function(e){var t=e.sideCar,n=__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return React__namespace.createElement(o,__assign$1({},n))};SideCar$1.isSideCarExport=!0;function exportSidecar(e,t){return e.useMedium(t),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=React__namespace.forwardRef(function(e,t){var n=React__namespace.useRef(null),o=React__namespace.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),l=o[0],d=o[1],f=e.forwardProps,g=e.children,b=e.className,_=e.removeScrollBar,S=e.enabled,R=e.shards,C=e.sideCar,E=e.noIsolation,M=e.inert,I=e.allowPinchZoom,A=e.as,V=A===void 0?"div":A,q=e.gapMode,z=__rest(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),Q=C,F=useMergeRefs([n,t]),O=__assign$1(__assign$1({},z),l);return React__namespace.createElement(React__namespace.Fragment,null,S&&React__namespace.createElement(Q,{sideCar:effectCar,removeScrollBar:_,shards:R,noIsolation:E,inert:M,setCallbacks:d,allowPinchZoom:!!I,lockRef:n,gapMode:q}),f?React__namespace.cloneElement(React__namespace.Children.only(g),__assign$1(__assign$1({},O),{ref:F})):React__namespace.createElement(V,__assign$1({},O,{className:b,ref:F}),g))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=getNonce();return t&&e.setAttribute("nonce",t),e}function injectStyles(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function insertStyleTag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var stylesheetSingleton=function(){var e=0,t=null;return{add:function(n){e==0&&(t=makeStyleTag())&&(injectStyles(t,n),insertStyleTag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},styleHookSingleton=function(){var e=stylesheetSingleton();return function(t,n){React__namespace.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},styleSingleton=function(){var e=styleHookSingleton(),t=function(n){var o=n.styles,l=n.dynamic;return e(o,l),null};return t},zeroGap={left:0,top:0,right:0,gap:0},parse=function(e){return parseInt(e||"",10)||0},getOffset$1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],l=t[e==="padding"?"paddingRight":"marginRight"];return[parse(n),parse(o),parse(l)]},getGapWidth=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zeroGap;var t=getOffset$1(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,t,n,o){var l=e.left,d=e.top,f=e.right,g=e.gap;return n===void 0&&(n="margin"),`
|
|
369
|
+
$10 with opportunities under $1,000`:e==="D"?"$15 under $1,500":e==="E"?"Full shipping charges":e,getTermsText=e=>e==="STRIPE"?"Credit card payment":e==="NET30"?"Net 30 days":e,AccountTier=({isSuperAdmin:e,readonly:t,reseller:n,appID:o,isLoading:l})=>{const{toast:d}=useToast(),[f,g]=React.useState(!1),[b,_]=React.useState(""),[S,{isLoading:R}]=usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation(),C=ge=>ge&&{Starter:"starter","E-Commerce":"ecommerce",Commercial:"commercial",Basics:"cws",Novexco:"novexco","Jean Coutu":"jeancoutu",Exclusive:"exclusive"}[ge]||"",E=ge=>ge&&{A:"free",B:"fixed",C:"dropshipped",D:"under1500",E:"fullcharges"}[ge]||"",M=ge=>ge&&{1:"exclusive",2:"ecommerce",3:"commercial",4:"buyinggroup",5:"cost"}[ge]||"",[I,A]=React.useState(C((n==null?void 0:n.Priority)??"")),[V,q]=React.useState(E((n==null?void 0:n.ShippingProfile)??"")),[z,Q]=React.useState(M(n==null?void 0:n.PriceProfile)),F=ge=>({starter:"Starter",ecommerce:"E-Commerce",commercial:"Commercial",cws:"Basics",novexco:"Novexco",jeancoutu:"Jean Coutu",exclusive:"Exclusive"})[ge]||ge,O=ge=>({free:"A",fixed:"B",dropshipped:"C",under1500:"D",fullcharges:"E"})[ge]||ge,te=ge=>({exclusive:"1",ecommerce:"2",commercial:"3",buyinggroup:"4",cost:"5"})[ge]||ge;React.useEffect(()=>{A(C((n==null?void 0:n.Priority)??"")),q(E((n==null?void 0:n.ShippingProfile)??"")),Q(M(n==null?void 0:n.PriceProfile))},[n]);const ae=async ge=>{A(ge);const Oe=F(ge);try{(await S({applicationId:o,fieldName:"Priority",newValue:Oe})).error?d({title:"Error",description:"Failed to update priority",variant:"destructive"}):d({title:"Success",description:`Priority updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},ie=async ge=>{q(ge);const Oe=O(ge);try{(await S({applicationId:o,fieldName:"ShippingProfile",newValue:Oe})).error?d({title:"Error",description:"Failed to update shipping profile",variant:"destructive"}):d({title:"Success",description:`Shipping profile updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},oe=async ge=>{Q(ge);const Oe=te(ge);try{(await S({applicationId:o,fieldName:"PriceProfile",newValue:Oe})).error?d({title:"Error",description:"Failed to update pricing profile",variant:"destructive"}):d({title:"Success",description:`Pricing profile updated to ${Oe}`,variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}},se=async()=>{try{const ge=await S({applicationId:o,fieldName:"Tier",newValue:b});ge.error?d({title:"Error",description:"Failed to update reseller",variant:"destructive"}):ge.data?d({title:"Success",description:`Pricing Tier changed to ${b}`,variant:"success"}):d({title:"Considered",description:"Request being considered",variant:"success"})}catch{d({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}finally{g(!1),_("")}},Ae=[{name:"Terms",enabled:n.Priority==="Starter"},{name:"E-Commerce",enabled:n.Priority==="Commercial"},{name:"Commercial",enabled:n.Priority==="E-Commerce"},{name:"Exclusive",enabled:e}],Ne=ge=>{_(ge),g(!0)};return l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(Card,{className:"md:col-span-2 xl:col-span-1 md:max-w-xl xl:max-w-[unset]",children:[jsxRuntime.jsx(CardHeader,{className:"pb-2",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-16 rounded-full"})]})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsxs("div",{className:"mb-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-56"})]}),jsxRuntime.jsx("div",{className:"grid gap-3",children:[1,2,3].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"})]})]},ge))}),jsxRuntime.jsxs("div",{className:"flex gap-2 mt-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"}),jsxRuntime.jsx(Skeleton,{className:"h-10 w-full"})]})]})]})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Card,{className:"md:col-span-2 xl:col-span-1 md:max-w-xl xl:max-w-[unset]",children:[jsxRuntime.jsxs(CardHeader,{className:"pb-2 pt-4 px-4 flex flex-row items-center justify-between",children:[jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Account Tier"}),jsxRuntime.jsx(Badge,{variant:"secondary",className:"bg-green-100 text-green-700 hover:bg-green-200 text-xs",children:"Active"})]}),jsxRuntime.jsxs(CardContent,{className:"pt-2 px-4 pb-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3 bg-primary/5 p-4 rounded-lg",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:"text-lg font-bold text-primary",children:[(n==null?void 0:n.Priority)||""," Tier"]}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Optimized for online retail"})]}),jsxRuntime.jsx(CircleCheck,{className:"h-6 w-6 text-green-600"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-2 mb-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Package2,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Pricing"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground truncate",children:getPricingText(n.PriceProfile||0)})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Truck,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Shipping"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:getShippingText(n.ShippingProfile||"").split(".")[0]})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border bg-card hover:bg-accent/5 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-1.5 rounded-full shrink-0",children:jsxRuntime.jsx(Calendar,{className:"h-4 w-4 text-primary"})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm",children:"Payment terms"}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:getTermsText((n==null?void 0:n.Terms)||"")})]})]})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(Button,{variant:"outline",className:"flex-1",asChild:!0,children:jsxRuntime.jsxs("a",{href:"https://www.randmar.io/docs/overview/pricingTiers",target:"_blank",rel:"noreferrer",children:[jsxRuntime.jsx(ExternalLink,{className:"h-4 w-4 mr-1"}),"Pricing Tiers"]})}),jsxRuntime.jsxs(Popover,{children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{disabled:t,className:t?"hidden":"flex-1",children:["Upgrade Tier ",jsxRuntime.jsx(ChevronRight,{className:"h-3 w-3 ml-1"})]})}),jsxRuntime.jsx(PopoverContent,{className:"w-56 p-2",children:jsxRuntime.jsxs("div",{className:"grid gap-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-xs mb-1",children:"Select a tier"}),Ae.map(ge=>jsxRuntime.jsx(Button,{variant:"ghost",size:"sm",className:"w-full justify-start h-8",disabled:!ge.enabled,onClick:()=>Ne(ge.name),children:ge.name},ge.name))]})})]})]})]})]}),jsxRuntime.jsx(ChangePricingTierModal,{isLoading:R,open:f,setOpen:g,tier:b,onTierChange:se}),e&&!t&&jsxRuntime.jsxs(Card,{className:"mt-4",children:[jsxRuntime.jsx(CardHeader,{className:"pb-2 pt-3 px-4",children:jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Admin Configuration"})}),jsxRuntime.jsx(CardContent,{className:"pt-2 px-4 pb-4",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Priority"}),jsxRuntime.jsx(RadioGroup$1,{value:I,onValueChange:ae,className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-1",children:[{value:"starter",label:"Starter"},{value:"ecommerce",label:"E-Commerce"},{value:"commercial",label:"Commercial"},{value:"cws",label:"CWS (Basics)"},{value:"novexco",label:"Novexco"},{value:"jeancoutu",label:"Jean Coutu"},{value:"exclusive",label:"Exclusive"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`priority-${ge.value}`,className:"h-6 w-6 scale-50"}),jsxRuntime.jsx(Label$2,{htmlFor:`priority-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]}),jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Shipping Profile"}),jsxRuntime.jsx(RadioGroup$1,{value:V,onValueChange:ie,className:"grid grid-cols-1 md:grid-cols-2 gap-1",children:[{value:"free",label:"Free (A)"},{value:"fixed",label:"Fixed $10 Shipping (B)"},{value:"dropshipped",label:"$15 for drop shipped (C)"},{value:"under1500",label:"15$ under 1,500 (D)"},{value:"fullcharges",label:"Full shipping charges (E)"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`shipping-${ge.value}`,className:"h-6 w-6 scale-50"}),jsxRuntime.jsx(Label$2,{htmlFor:`shipping-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]}),jsxRuntime.jsxs("div",{className:"bg-muted/30 p-2 rounded-lg",children:[jsxRuntime.jsx(Label$2,{className:"block mb-1 text-xs font-medium",children:"Pricing Profile"}),jsxRuntime.jsx(RadioGroup$1,{value:z,onValueChange:oe,className:"grid grid-cols-2 sm:grid-cols-3 gap-1",children:[{value:"exclusive",label:"Exclusive (1)"},{value:"ecommerce",label:"E-Commerce (2)"},{value:"commercial",label:"Commercial (3)"},{value:"buyinggroup",label:"Buying Group (4)"},{value:"cost",label:"Cost (5)"}].map(ge=>jsxRuntime.jsxs("div",{className:"flex items-center space-x-1",children:[jsxRuntime.jsx(RadioGroupItem,{value:ge.value,id:`pricing-${ge.value}`,className:"h-6 w-6 scale-50 antialiased"}),jsxRuntime.jsx(Label$2,{htmlFor:`pricing-${ge.value}`,className:"cursor-pointer text-xs",children:ge.label})]},ge.value))})]})]})})]})]})};function OrderCategories({openOrders:e=[],isLoading:t=!1}){const n=(e==null?void 0:e.filter(I=>I.DocumentType==="Order"))||[],o=(e==null?void 0:e.filter(I=>I.DocumentType==="Shipment"))||[],l=n.filter(I=>I.WarehouseCode!=="3PLE"),d=l.reduce((I,A)=>I+(A.Quantity??0),0),f=l.reduce((I,A)=>I+(A.ExtendedPrice??0),0),g=n.filter(I=>I.WarehouseCode==="3PLE"),b=g.reduce((I,A)=>I+(A.Quantity??0),0),_=g.reduce((I,A)=>I+(A.ExtendedPrice??0),0),S=o.reduce((I,A)=>I+(A.Quantity??0),0),R=o.reduce((I,A)=>I+(A.ExtendedPrice??0),0),C=d+b+S,E=f+_+R,M=[{name:"All",icon:Package,color:"bg-blue-500",orders:C,amount:E},{name:"Processing",icon:RefreshCcw,color:"bg-yellow-500",orders:d,amount:f},{name:"Shipped",icon:Truck,color:"bg-green-500",orders:S,amount:R},{name:"Delayed",icon:CircleAlert,color:"bg-red-500",orders:b,amount:_}];return t?jsxRuntime.jsxs(Card,{className:"w-full md:col-span-2 xl:col-span-1",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(Skeleton,{className:"h-7 w-40"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3.5",children:[1,2,3,4].map(I=>jsxRuntime.jsx(Card,{className:"overflow-hidden rounded-md rounded-b-lg border-0 shadow-md",children:jsxRuntime.jsxs(CardContent,{className:"p-0",children:[jsxRuntime.jsx("div",{className:"bg-gray-200 h-[3px]"}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-6 w-12"})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-20 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]})]})]})},I))})})]}):jsxRuntime.jsxs(Card,{className:"w-full md:col-span-2 xl:col-span-1",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Order Categories"})}),jsxRuntime.jsx(CardContent,{children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3.5",children:M.map(I=>jsxRuntime.jsx(Card,{className:"overflow-hidden rounded-md rounded-b-lg border-0 shadow-md",children:jsxRuntime.jsxs(CardContent,{className:"p-0",children:[jsxRuntime.jsx("div",{className:`${I.color} bg-opacity-60 h-[3px]`}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-base",children:I.name}),jsxRuntime.jsx("div",{className:`${I.color} bg-opacity-90 p-2 rounded-full`,children:jsxRuntime.jsx(I.icon,{className:"size-4 shrink-0 text-white"})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Orders"}),jsxRuntime.jsx("p",{className:"text-xl font-bold",children:I.orders})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Amount"}),jsxRuntime.jsx("p",{className:"text-base font-semibold",children:jsxRuntime.jsx(FormattedNumber,{value:I.amount,style:"currency",currency:"CAD",currencyDisplay:"symbol"})})]})]})]})]})},I.name))})})]})}function LongMonthName(e){if(!e)return;const t=["","January","February","March","April","May","June","July","August","September","October","November","December"];return e===void 0&&(e=new Date().getMonth()+1),e<1&&(e=12+e),t[e]}function SalesSummary({fiscalYearMonthStart:e,salesData:t,isLoading:n}){const o=(t==null?void 0:t.SalesLast30Days)??0,l=(t==null?void 0:t.SalesLast3Months)??0,d=(t==null?void 0:t.SalesYearToDay)??0,f=LongMonthName(e);return n?jsxRuntime.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 mb-4",children:[jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]}),jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-28"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]}),jsxRuntime.jsxs(Card,{className:"col-span-2 lg:col-span-1",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-36"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(Skeleton,{className:"h-8 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-24"})]})]})]}):jsxRuntime.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 mb-4",children:[jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(CardTitle,{className:"text-sm font-medium",children:"Last 30 Days"}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(TrendingUp,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:o,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]}),jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsx(CardTitle,{className:"text-sm font-medium",children:"Last 3 Months"}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(Calendar,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:l,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]}),f&&jsxRuntime.jsxs(Card,{className:"col-span-2 lg:col-span-1",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[jsxRuntime.jsxs(CardTitle,{className:"text-sm font-medium",children:["Year to Date (",f,")"]}),jsxRuntime.jsx("div",{className:"p-2 rounded-full bg-neutral-200",children:jsxRuntime.jsx(CalendarDays,{className:"size-4 shrink-0 text-muted-foreground"})})]}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("div",{className:"text-2xl font-bold",children:jsxRuntime.jsx(FormattedNumber,{value:d,style:"currency",currency:"CAD",currencyDisplay:"symbol"})}),jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground"})]})]})]})}function ReportsSection({isLoading:e,userEmail:t,appID:n}){const{toast:o}=useToast(),[l,{isLoading:d}]=usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation(),[f,{isLoading:g}]=usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation(),[b,{isLoading:_}]=usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation(),[S,{isLoading:R}]=usePostV4ResellerByRouteResellerIdReportProductsEmailMutation(),[C,{isLoading:E}]=usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation(),[M,{isLoading:I}]=usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation(),[A,V]=React.useState(null),[q,z]=React.useState(t),[Q,F]=React.useState(!1),O=[{name:"Products",reports:[{id:"Products",title:"Universal Product List",description:"A comprehensive overview of your product list with detailed specifications and pricing information.",icon:Package}]},{name:"Operation Details",reports:[{id:"OpenOrders",title:"Order Details",description:"A detailed report of all your orders and shipments, including status, tracking information, and delivery estimates.",icon:ShoppingCart},{id:"Invoices",title:"Invoices and Credits Report",description:"Detailed overview of your invoices and credits within a specific date range. It also contains reports about additional charges, serial numbers, and other relevant information.",icon:ScrollText},{id:"Statement",title:"Statement and RMAs Report",description:"A detailed report of all unpaid invoices and active RMAs.",icon:Banknote}]},{name:"Tracking Files",reports:[{id:"AmazonTrackingFile",title:"Amazon Tracking File",description:"Track products sold on Amazon marketplace with detailed sales and inventory information.",icon:ChartNoAxesColumnIncreasing},{id:"WalmartTrackingFile",title:"Walmart Tracking File",description:"Track products sold on Walmart marketplace with detailed sales and inventory information.",icon:ChartNoAxesColumnIncreasing}]}],te=async oe=>{V(oe),F(!0)},ae=async()=>{if(!(!A||!n))try{switch(A.id){case"Products":await S({routeResellerId:n,emailAddress:q}).unwrap();break;case"AmazonTrackingFile":await f({routeResellerId:n,emailAddress:q}).unwrap();break;case"WalmartTrackingFile":await l({routeResellerId:n,emailAddress:q}).unwrap();break;case"OpenOrders":await b({routeResellerId:n,emailAddress:q}).unwrap();break;case"Invoices":await C({routeResellerId:n,emailAddress:q}).unwrap();break;case"Statement":await M({routeResellerId:n,emailAddress:q}).unwrap();break;default:throw new Error("invalid report id")}o({title:"Report requested",description:`The ${A.title} will be sent to ${q} shortly.`,variant:"success"}),F(!1)}catch(oe){console.error("Error requesting report:",oe),o({title:"Error",description:"Failed to request report. Please try again.",variant:"destructive"})}},ie=_||R||g||d||I||E;return jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsxs(CardHeader,{children:[jsxRuntime.jsx(CardTitle,{className:"text-1xl font-bold",children:"Reports"}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:"Download essential business reports, from your Product List to your Order Details."})]}),jsxRuntime.jsx(CardContent,{className:"space-y-6",children:e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:[1,2,3].map(oe=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-6 w-48"}),[1,2].map(se=>jsxRuntime.jsxs("div",{className:"flex items-start gap-4 p-4 border rounded-lg",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-9 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-full"})]}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"})]},se))]},oe))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:O.map(oe=>jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold",children:oe.name}),oe.reports.map(se=>jsxRuntime.jsxs("div",{className:"flex items-start gap-4 p-4 border rounded-lg hover:bg-gray-100 transition-colors",children:[jsxRuntime.jsx("div",{className:"bg-primary/10 p-2 rounded-full",children:jsxRuntime.jsx(se.icon,{className:"h-5 w-5 text-primary"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("h4",{className:"font-semibold text-sm",children:se.title}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:se.description})]}),jsxRuntime.jsxs(Button,{variant:"outline",size:"sm",className:"flex items-center gap-1",onClick:()=>te(se),children:[jsxRuntime.jsx(Download,{className:"h-4 w-4"}),"Request"]})]},se.id))]},oe.name))})}),jsxRuntime.jsx(Dialog,{open:Q,onOpenChange:F,children:jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsxs(DialogTitle,{children:["Request ",A==null?void 0:A.title]}),jsxRuntime.jsx(DialogDescription,{children:"Enter the email address where you would like to receive the report."})]}),jsxRuntime.jsxs("div",{className:"py-4",children:[jsxRuntime.jsx(Label$2,{htmlFor:"email",children:"Email"}),jsxRuntime.jsx(Input,{id:"email",value:q,onChange:oe=>z(oe.target.value),placeholder:"your@email.com",className:"mt-2"})]}),jsxRuntime.jsx(DialogDescription,{children:"The report will take around 5 minutes to generate."}),jsxRuntime.jsxs(DialogFooter,{children:[jsxRuntime.jsx(Button,{variant:"outline",onClick:()=>F(!1),children:"Cancel"}),jsxRuntime.jsx(Button,{onClick:ae,disabled:!q||ie,children:ie?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Sending..."]}):"Send Report"})]})]})})]})}function UnsavedChangesDialog({isOpen:e,onClose:t,onConfirm:n,title:o,description:l,confirmText:d="Confirm",cancelText:f="Cancel"}){return jsxRuntime.jsx(Dialog,{open:e,onOpenChange:t,children:jsxRuntime.jsxs(DialogContent,{className:"sm:max-w-[425px]",children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:o}),jsxRuntime.jsx(DialogDescription,{children:l})]}),jsxRuntime.jsxs(DialogFooter,{children:[jsxRuntime.jsx(Button,{variant:"outline",onClick:t,children:f}),jsxRuntime.jsx(Button,{onClick:n,children:d})]})]})})}function useRouterNavigationGuard(e){const[t,n]=React.useState(!1),o=reactRouterDom.useBlocker(React.useCallback(({currentLocation:g,nextLocation:b})=>{const _=g.pathname!==b.pathname||g.search!==b.search||g.hash!==b.hash;return e()&&_},[e]));React.useEffect(()=>{o.state==="blocked"&&n(!0)},[o]),React.useEffect(()=>{const g=b=>{if(e())return b.preventDefault(),"You have unsaved changes. Are you sure you want to leave?"};return window.addEventListener("beforeunload",g),()=>{window.removeEventListener("beforeunload",g)}},[e]);const l=React.useCallback(()=>{n(!1),o.state==="blocked"&&o.proceed()},[o]),d=React.useCallback(()=>{n(!1),o.state==="blocked"&&o.reset()},[o]),f=React.useCallback(()=>jsxRuntime.jsx(UnsavedChangesDialog,{isOpen:t,onClose:d,onConfirm:l,title:"Unsaved Changes",description:"You have unsaved changes. Are you sure you want to leave? Your changes will be lost.",confirmText:"Discard Changes",cancelText:"Stay on Page"}),[t,d,l]);return{showDialog:t,handleConfirm:l,handleCancel:d,NavigationGuardDialog:f}}function MonthlySalesChart({salesData:e,chartHeight:t=300,units:n="$",unitsPosition:o="left",className:l,extrapolate:d=!0}){const[f,g]=React.useState([]);return React.useEffect(()=>{if(!e||e.length===0){g([]);return}const b=e.reduce((V,q)=>{const z=q.Day??0,Q=Math.floor(z).toString();if(Q.length!==8||isNaN(parseInt(Q)))return console.warn(`Skipping invalid Day format: ${q.Day}`),V;const F=Q.substring(0,4),O=Q.substring(4,6),te=`${F}-${O}`;return V[te]=(V[te]||0)+(q.ExtendedPrice??0),V},{}),_=Object.keys(b).sort(),S=new Date,R=S.getFullYear(),C=S.getMonth(),E=S.getDate(),M=`${R}-${(C+1).toString().padStart(2,"0")}`,I={...b};if(d&&_.length>0&&_[_.length-1]===M){const V=I[M],q=new Date(R,C+1,0).getDate();if(E<q&&E>0){const Q=V/E*q;I[M]=Q}}const A=_.map(V=>{const q=I[V],[z,Q]=V.split("-").map(Number);return{month:new Date(z,Q-1).toLocaleString("default",{month:"short",year:"numeric"}),sales:q}});g(A)},[e,d]),f.length===0?jsxRuntime.jsx("div",{className:l||"p-4 text-center text-muted-foreground",children:"No monthly sales data to display."}):jsxRuntime.jsx(AreaChart,{data:f,units:n,unitsPosition:o,height:t,className:l})}function Reseller({appID:e,reseller:t,readonly:n,payInvoicePath:o,userEmail:l,isSuperAdmin:d,withoutReports:f}){var q;const{data:g,isLoading:b,isError:_}=useGetV4PartnerByApplicationIdAccountResellerQuery({applicationId:e??"",withSpecification:!0},{skip:!!t}),[S,R]=React.useState(!0),[C,E]=React.useState({publicInfo:{hasUnsavedChanges:!1}}),M=React.useCallback(()=>C.publicInfo.hasUnsavedChanges,[C]),I=React.useCallback((z,Q)=>{E(F=>{var O;return((O=F[z])==null?void 0:O.hasUnsavedChanges)!==Q.hasUnsavedChanges?(console.log(`Updating form state for ${z}:`,Q.hasUnsavedChanges),{...F,[z]:Q}):F})},[]),{NavigationGuardDialog:A}=useRouterNavigationGuard(M),V=t??g;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:_?jsxRuntime.jsx(Card,{className:"p-6",children:jsxRuntime.jsxs(Alert,{variant:"destructive",children:[jsxRuntime.jsx(CircleAlert,{className:"h-4 w-4"}),jsxRuntime.jsx(AlertTitle,{children:"Error"}),jsxRuntime.jsx(AlertDescription,{children:"There was an error loading your reseller information. Please try again later."})]})}):jsxRuntime.jsxs("div",{className:"space-y-6 mb-6",children:[jsxRuntime.jsx(SalesSummary,{fiscalYearMonthStart:(V==null?void 0:V.FiscalYearMonthStart)||1,salesData:V==null?void 0:V.SalesData,isLoading:b}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsx(OrderCategories,{openOrders:(V==null?void 0:V.ActiveOrderDetails)??[],isLoading:b}),jsxRuntime.jsx(BillingCard,{readonly:n,reseller:V||{},payInvoicePath:o,isLoading:b}),jsxRuntime.jsx(PublicInfo,{reseller:V||{},appID:e??"",isLoading:b,readonly:n,onUnsavedChanges:z=>I("publicInfo",{hasUnsavedChanges:z})})]}),jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Sales"})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx(MonthlySalesChart,{salesData:(V==null?void 0:V.SalesStatistics)??[],extrapolate:S}),jsxRuntime.jsxs("div",{className:"flex space-x-2 my-1",children:[jsxRuntime.jsx(Switch,{checked:S,onCheckedChange:R,id:"extrapolate-switch"}),jsxRuntime.jsx(Label$2,{htmlFor:"extrapolate-switch",children:"Extrapolate"})]}),S?jsxRuntime.jsx("p",{className:"text-sm",children:"*Sales for the current month are projected, not actual."}):jsxRuntime.jsx(jsxRuntime.Fragment,{})]})]}),jsxRuntime.jsx(AccountTier,{isSuperAdmin:d,readonly:n,reseller:V||{},appID:e??"",isLoading:b})]})]}),jsxRuntime.jsxs(Card,{className:"w-full",children:[jsxRuntime.jsx(CardHeader,{children:jsxRuntime.jsx(CardTitle,{children:"Brands you are qualified for"})}),jsxRuntime.jsxs(CardContent,{children:[jsxRuntime.jsx("p",{children:"This module is under construction."}),jsxRuntime.jsx("ul",{children:(q=V==null?void 0:V.Qualifications)==null?void 0:q.map(z=>jsxRuntime.jsx("li",{children:z.ManufacturerId}))})]})]}),!f&&jsxRuntime.jsx(ReportsSection,{appID:e,userEmail:l,isLoading:b})]})}),jsxRuntime.jsx(A,{})]})}function composeEventHandlers(e,t,{checkForDefaultPrevented:n=!0}={}){return function(l){if(e==null||e(l),n===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function setRef(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function composeRefs(...e){return t=>{let n=!1;const o=e.map(l=>{const d=setRef(l,t);return!n&&typeof d=="function"&&(n=!0),d});if(n)return()=>{for(let l=0;l<o.length;l++){const d=o[l];typeof d=="function"?d():setRef(e[l],null)}}}}function useComposedRefs(...e){return React__namespace.useCallback(composeRefs(...e),e)}function createContext2(e,t){const n=React__namespace.createContext(t),o=d=>{const{children:f,...g}=d,b=React__namespace.useMemo(()=>g,Object.values(g));return jsxRuntime.jsx(n.Provider,{value:b,children:f})};o.displayName=e+"Provider";function l(d){const f=React__namespace.useContext(n);if(f)return f;if(t!==void 0)return t;throw new Error(`\`${d}\` must be used within \`${e}\``)}return[o,l]}function createContextScope(e,t=[]){let n=[];function o(d,f){const g=React__namespace.createContext(f),b=n.length;n=[...n,f];const _=R=>{var V;const{scope:C,children:E,...M}=R,I=((V=C==null?void 0:C[e])==null?void 0:V[b])||g,A=React__namespace.useMemo(()=>M,Object.values(M));return jsxRuntime.jsx(I.Provider,{value:A,children:E})};_.displayName=d+"Provider";function S(R,C){var I;const E=((I=C==null?void 0:C[e])==null?void 0:I[b])||g,M=React__namespace.useContext(E);if(M)return M;if(f!==void 0)return f;throw new Error(`\`${R}\` must be used within \`${d}\``)}return[_,S]}const l=()=>{const d=n.map(f=>React__namespace.createContext(f));return function(g){const b=(g==null?void 0:g[e])||d;return React__namespace.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return l.scopeName=e,[o,composeContextScopes(l,...t)]}function composeContextScopes(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(d){const f=o.reduce((g,{useScope:b,scopeName:_})=>{const R=b(d)[`__scope${_}`];return{...g,...R}},{});return React__namespace.useMemo(()=>({[`__scope${t.scopeName}`]:f}),[f])}};return n.scopeName=t.scopeName,n}function createSlot$1(e){const t=createSlotClone$1(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable$1);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}function createSlotClone$1(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n,f=React__namespace.isValidElement(l)?getElementRef$2(l):void 0,g=useComposedRefs(f,o);if(React__namespace.isValidElement(l)){const b=mergeProps$1(d,l.props);return l.type!==React__namespace.Fragment&&(b.ref=g),React__namespace.cloneElement(l,b)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$1=Symbol("radix.slottable");function isSlottable$1(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$1}function mergeProps$1(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{const b=d(...g);return l(...g),b}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NODES$1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive$1=NODES$1.reduce((e,t)=>{const n=createSlot$1(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function createCollection$1(e){const t=e+"CollectionProvider",[n,o]=createContextScope(t),[l,d]=n(t,{collectionRef:{current:null},itemMap:new Map}),f=I=>{const{scope:A,children:V}=I,q=React.useRef(null),z=React.useRef(new Map).current;return jsxRuntime.jsx(l,{scope:A,itemMap:z,collectionRef:q,children:V})};f.displayName=t;const g=e+"CollectionSlot",b=createSlot$1(g),_=React.forwardRef((I,A)=>{const{scope:V,children:q}=I,z=d(g,V),Q=useComposedRefs(A,z.collectionRef);return jsxRuntime.jsx(b,{ref:Q,children:q})});_.displayName=g;const S=e+"CollectionItemSlot",R="data-radix-collection-item",C=createSlot$1(S),E=React.forwardRef((I,A)=>{const{scope:V,children:q,...z}=I,Q=React.useRef(null),F=useComposedRefs(A,Q),O=d(S,V);return React.useEffect(()=>(O.itemMap.set(Q,{ref:Q,...z}),()=>void O.itemMap.delete(Q))),jsxRuntime.jsx(C,{[R]:"",ref:F,children:q})});E.displayName=S;function M(I){const A=d(e+"CollectionConsumer",I);return React.useCallback(()=>{const q=A.collectionRef.current;if(!q)return[];const z=Array.from(q.querySelectorAll(`[${R}]`));return Array.from(A.itemMap.values()).sort((O,te)=>z.indexOf(O.ref.current)-z.indexOf(te.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:f,Slot:_,ItemSlot:E},M,o]}var useLayoutEffect2=globalThis!=null&&globalThis.document?React__namespace.useLayoutEffect:()=>{},useReactId=React__namespace[" useId ".trim().toString()]||(()=>{}),count$2=0;function useId(e){const[t,n]=React__namespace.useState(useReactId());return useLayoutEffect2(()=>{n(o=>o??String(count$2++))},[e]),t?`radix-${t}`:""}function useCallbackRef$1(e){const t=React__namespace.useRef(e);return React__namespace.useEffect(()=>{t.current=e}),React__namespace.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}var useInsertionEffect=React__namespace[" useInsertionEffect ".trim().toString()]||useLayoutEffect2;function useControllableState({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[l,d,f]=useUncontrolledState({defaultProp:t,onChange:n}),g=e!==void 0,b=g?e:l;{const S=React__namespace.useRef(e!==void 0);React__namespace.useEffect(()=>{const R=S.current;R!==g&&console.warn(`${o} is changing from ${R?"controlled":"uncontrolled"} to ${g?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),S.current=g},[g,o])}const _=React__namespace.useCallback(S=>{var R;if(g){const C=isFunction$1(S)?S(e):S;C!==e&&((R=f.current)==null||R.call(f,C))}else d(S)},[g,e,d,f]);return[b,_]}function useUncontrolledState({defaultProp:e,onChange:t}){const[n,o]=React__namespace.useState(e),l=React__namespace.useRef(n),d=React__namespace.useRef(t);return useInsertionEffect(()=>{d.current=t},[t]),React__namespace.useEffect(()=>{var f;l.current!==n&&((f=d.current)==null||f.call(d,n),l.current=n)},[n,l]),[n,o,d]}function isFunction$1(e){return typeof e=="function"}var DirectionContext=React__namespace.createContext(void 0);function useDirection(e){const t=React__namespace.useContext(DirectionContext);return e||t||"ltr"}var ENTRY_FOCUS$1="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS$2={bubbles:!1,cancelable:!0},GROUP_NAME$4="RovingFocusGroup",[Collection$4,useCollection$4,createCollectionScope$4]=createCollection$1(GROUP_NAME$4),[createRovingFocusGroupContext$1,createRovingFocusGroupScope$1]=createContextScope(GROUP_NAME$4,[createCollectionScope$4]),[RovingFocusProvider$1,useRovingFocusContext$1]=createRovingFocusGroupContext$1(GROUP_NAME$4),RovingFocusGroup$1=React__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Collection$4.Provider,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(Collection$4.Slot,{scope:e.__scopeRovingFocusGroup,children:jsxRuntime.jsx(RovingFocusGroupImpl$1,{...e,ref:t})})}));RovingFocusGroup$1.displayName=GROUP_NAME$4;var RovingFocusGroupImpl$1=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:_,preventScrollOnEntryFocus:S=!1,...R}=e,C=React__namespace.useRef(null),E=useComposedRefs(t,C),M=useDirection(d),[I,A]=useControllableState({prop:f,defaultProp:g??null,onChange:b,caller:GROUP_NAME$4}),[V,q]=React__namespace.useState(!1),z=useCallbackRef$1(_),Q=useCollection$4(n),F=React__namespace.useRef(!1),[O,te]=React__namespace.useState(0);return React__namespace.useEffect(()=>{const ae=C.current;if(ae)return ae.addEventListener(ENTRY_FOCUS$1,z),()=>ae.removeEventListener(ENTRY_FOCUS$1,z)},[z]),jsxRuntime.jsx(RovingFocusProvider$1,{scope:n,orientation:o,dir:M,loop:l,currentTabStopId:I,onItemFocus:React__namespace.useCallback(ae=>A(ae),[A]),onItemShiftTab:React__namespace.useCallback(()=>q(!0),[]),onFocusableItemAdd:React__namespace.useCallback(()=>te(ae=>ae+1),[]),onFocusableItemRemove:React__namespace.useCallback(()=>te(ae=>ae-1),[]),children:jsxRuntime.jsx(Primitive$1.div,{tabIndex:V||O===0?-1:0,"data-orientation":o,...R,ref:E,style:{outline:"none",...e.style},onMouseDown:composeEventHandlers(e.onMouseDown,()=>{F.current=!0}),onFocus:composeEventHandlers(e.onFocus,ae=>{const ie=!F.current;if(ae.target===ae.currentTarget&&ie&&!V){const oe=new CustomEvent(ENTRY_FOCUS$1,EVENT_OPTIONS$2);if(ae.currentTarget.dispatchEvent(oe),!oe.defaultPrevented){const se=Q().filter(Le=>Le.focusable),Ae=se.find(Le=>Le.active),Ne=se.find(Le=>Le.id===I),Oe=[Ae,Ne,...se].filter(Boolean).map(Le=>Le.ref.current);focusFirst$4(Oe,S)}}F.current=!1}),onBlur:composeEventHandlers(e.onBlur,()=>q(!1))})})}),ITEM_NAME$5="RovingFocusGroupItem",RovingFocusGroupItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:d,children:f,...g}=e,b=useId(),_=d||b,S=useRovingFocusContext$1(ITEM_NAME$5,n),R=S.currentTabStopId===_,C=useCollection$4(n),{onFocusableItemAdd:E,onFocusableItemRemove:M,currentTabStopId:I}=S;return React__namespace.useEffect(()=>{if(o)return E(),()=>M()},[o,E,M]),jsxRuntime.jsx(Collection$4.ItemSlot,{scope:n,id:_,focusable:o,active:l,children:jsxRuntime.jsx(Primitive$1.span,{tabIndex:R?0:-1,"data-orientation":S.orientation,...g,ref:t,onMouseDown:composeEventHandlers(e.onMouseDown,A=>{o?S.onItemFocus(_):A.preventDefault()}),onFocus:composeEventHandlers(e.onFocus,()=>S.onItemFocus(_)),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){S.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const V=getFocusIntent$1(A,S.orientation,S.dir);if(V!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let z=C().filter(Q=>Q.focusable).map(Q=>Q.ref.current);if(V==="last")z.reverse();else if(V==="prev"||V==="next"){V==="prev"&&z.reverse();const Q=z.indexOf(A.currentTarget);z=S.loop?wrapArray$3(z,Q+1):z.slice(Q+1)}setTimeout(()=>focusFirst$4(z))}}),children:typeof f=="function"?f({isCurrentTabStop:R,hasTabStop:I!=null}):f})})});RovingFocusGroupItem$1.displayName=ITEM_NAME$5;var MAP_KEY_TO_FOCUS_INTENT$1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey$1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function getFocusIntent$1(e,t,n){const o=getDirectionAwareKey$1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT$1[o]}function focusFirst$4(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function wrapArray$3(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Root$b=RovingFocusGroup$1,Item$2=RovingFocusGroupItem$1;function useSize(e){const[t,n]=React__namespace.useState(void 0);return useLayoutEffect2(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const d=l[0];let f,g;if("borderBoxSize"in d){const b=d.borderBoxSize,_=Array.isArray(b)?b[0]:b;f=_.inlineSize,g=_.blockSize}else f=e.offsetWidth,g=e.offsetHeight;n({width:f,height:g})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function usePrevious(e){const t=React__namespace.useRef({value:e,previous:e});return React__namespace.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function useStateMachine$1(e,t){return React__namespace.useReducer((n,o)=>t[n][o]??n,e)}var Presence=e=>{const{present:t,children:n}=e,o=usePresence(t),l=typeof n=="function"?n({present:o.isPresent}):React__namespace.Children.only(n),d=useComposedRefs(o.ref,getElementRef$1(l));return typeof n=="function"||o.isPresent?React__namespace.cloneElement(l,{ref:d}):null};Presence.displayName="Presence";function usePresence(e){const[t,n]=React__namespace.useState(),o=React__namespace.useRef(null),l=React__namespace.useRef(e),d=React__namespace.useRef("none"),f=e?"mounted":"unmounted",[g,b]=useStateMachine$1(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return React__namespace.useEffect(()=>{const _=getAnimationName(o.current);d.current=g==="mounted"?_:"none"},[g]),useLayoutEffect2(()=>{const _=o.current,S=l.current;if(S!==e){const C=d.current,E=getAnimationName(_);e?b("MOUNT"):E==="none"||(_==null?void 0:_.display)==="none"?b("UNMOUNT"):b(S&&C!==E?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,b]),useLayoutEffect2(()=>{if(t){let _;const S=t.ownerDocument.defaultView??window,R=E=>{const I=getAnimationName(o.current).includes(E.animationName);if(E.target===t&&I&&(b("ANIMATION_END"),!l.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",_=S.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},C=E=>{E.target===t&&(d.current=getAnimationName(o.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",R),t.addEventListener("animationend",R),()=>{S.clearTimeout(_),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",R),t.removeEventListener("animationend",R)}}else b("ANIMATION_END")},[t,b]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:React__namespace.useCallback(_=>{o.current=_?getComputedStyle(_):null,n(_)},[])}}function getAnimationName(e){return(e==null?void 0:e.animationName)||"none"}function getElementRef$1(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RADIO_NAME="Radio",[createRadioContext,createRadioScope]=createContextScope(RADIO_NAME),[RadioProvider,useRadioContext]=createRadioContext(RADIO_NAME),Radio=React__namespace.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:l=!1,required:d,disabled:f,value:g="on",onCheck:b,form:_,...S}=e,[R,C]=React__namespace.useState(null),E=useComposedRefs(t,A=>C(A)),M=React__namespace.useRef(!1),I=R?_||!!R.closest("form"):!0;return jsxRuntime.jsxs(RadioProvider,{scope:n,checked:l,disabled:f,children:[jsxRuntime.jsx(Primitive$1.button,{type:"button",role:"radio","aria-checked":l,"data-state":getState$4(l),"data-disabled":f?"":void 0,disabled:f,value:g,...S,ref:E,onClick:composeEventHandlers(e.onClick,A=>{l||b==null||b(),I&&(M.current=A.isPropagationStopped(),M.current||A.stopPropagation())})}),I&&jsxRuntime.jsx(RadioBubbleInput,{control:R,bubbles:!M.current,name:o,value:g,checked:l,required:d,disabled:f,form:_,style:{transform:"translateX(-100%)"}})]})});Radio.displayName=RADIO_NAME;var INDICATOR_NAME$2="RadioIndicator",RadioIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...l}=e,d=useRadioContext(INDICATOR_NAME$2,n);return jsxRuntime.jsx(Presence,{present:o||d.checked,children:jsxRuntime.jsx(Primitive$1.span,{"data-state":getState$4(d.checked),"data-disabled":d.disabled?"":void 0,...l,ref:t})})});RadioIndicator.displayName=INDICATOR_NAME$2;var BUBBLE_INPUT_NAME$3="RadioBubbleInput",RadioBubbleInput=React__namespace.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...l},d)=>{const f=React__namespace.useRef(null),g=useComposedRefs(f,d),b=usePrevious(n),_=useSize(t);return React__namespace.useEffect(()=>{const S=f.current;if(!S)return;const R=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(R,"checked").set;if(b!==n&&E){const M=new Event("click",{bubbles:o});E.call(S,n),S.dispatchEvent(M)}},[b,n,o]),jsxRuntime.jsx(Primitive$1.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...l,tabIndex:-1,ref:g,style:{...l.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});RadioBubbleInput.displayName=BUBBLE_INPUT_NAME$3;function getState$4(e){return e?"checked":"unchecked"}var ARROW_KEYS=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],RADIO_GROUP_NAME$2="RadioGroup",[createRadioGroupContext,createRadioGroupScope]=createContextScope(RADIO_GROUP_NAME$2,[createRovingFocusGroupScope$1,createRadioScope]),useRovingFocusGroupScope$2=createRovingFocusGroupScope$1(),useRadioScope=createRadioScope(),[RadioGroupProvider$1,useRadioGroupContext$1]=createRadioGroupContext(RADIO_GROUP_NAME$2),RadioGroup$2=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:l,value:d,required:f=!1,disabled:g=!1,orientation:b,dir:_,loop:S=!0,onValueChange:R,...C}=e,E=useRovingFocusGroupScope$2(n),M=useDirection(_),[I,A]=useControllableState({prop:d,defaultProp:l??null,onChange:R,caller:RADIO_GROUP_NAME$2});return jsxRuntime.jsx(RadioGroupProvider$1,{scope:n,name:o,required:f,disabled:g,value:I,onValueChange:A,children:jsxRuntime.jsx(Root$b,{asChild:!0,...E,orientation:b,dir:M,loop:S,children:jsxRuntime.jsx(Primitive$1.div,{role:"radiogroup","aria-required":f,"aria-orientation":b,"data-disabled":g?"":void 0,dir:M,...C,ref:t})})})});RadioGroup$2.displayName=RADIO_GROUP_NAME$2;var ITEM_NAME$4="RadioGroupItem",RadioGroupItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...l}=e,d=useRadioGroupContext$1(ITEM_NAME$4,n),f=d.disabled||o,g=useRovingFocusGroupScope$2(n),b=useRadioScope(n),_=React__namespace.useRef(null),S=useComposedRefs(t,_),R=d.value===l.value,C=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{const E=I=>{ARROW_KEYS.includes(I.key)&&(C.current=!0)},M=()=>C.current=!1;return document.addEventListener("keydown",E),document.addEventListener("keyup",M),()=>{document.removeEventListener("keydown",E),document.removeEventListener("keyup",M)}},[]),jsxRuntime.jsx(Item$2,{asChild:!0,...g,focusable:!f,active:R,children:jsxRuntime.jsx(Radio,{disabled:f,required:d.required,checked:R,...b,...l,name:d.name,ref:S,onCheck:()=>d.onValueChange(l.value),onKeyDown:composeEventHandlers(E=>{E.key==="Enter"&&E.preventDefault()}),onFocus:composeEventHandlers(l.onFocus,()=>{var E;C.current&&((E=_.current)==null||E.click())})})})});RadioGroupItem$1.displayName=ITEM_NAME$4;var INDICATOR_NAME2="RadioGroupIndicator",RadioGroupIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,l=useRadioScope(n);return jsxRuntime.jsx(RadioIndicator,{...l,...o,ref:t})});RadioGroupIndicator.displayName=INDICATOR_NAME2;var Root2$6=RadioGroup$2,Item2$2=RadioGroupItem$1,Indicator$1=RadioGroupIndicator;const RadioGroup$1=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Root2$6,{className:cn("grid gap-2",e),...t,ref:n}));RadioGroup$1.displayName=Root2$6.displayName;const RadioGroupItem=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Item2$2,{ref:n,className:cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:jsxRuntime.jsx(Indicator$1,{className:"flex items-center justify-center",children:jsxRuntime.jsx(Circle,{className:"h-3.5 w-3.5 fill-primary"})})}));RadioGroupItem.displayName=Item2$2.displayName;function createSlot(e){const t=createSlotClone(e),n=React__namespace.forwardRef((o,l)=>{const{children:d,...f}=o,g=React__namespace.Children.toArray(d),b=g.find(isSlottable);if(b){const _=b.props.children,S=g.map(R=>R===b?React__namespace.Children.count(_)>1?React__namespace.Children.only(null):React__namespace.isValidElement(_)?_.props.children:null:R);return jsxRuntime.jsx(t,{...f,ref:l,children:React__namespace.isValidElement(_)?React__namespace.cloneElement(_,void 0,S):null})}return jsxRuntime.jsx(t,{...f,ref:l,children:d})});return n.displayName=`${e}.Slot`,n}var Slot$4=createSlot("Slot");function createSlotClone(e){const t=React__namespace.forwardRef((n,o)=>{const{children:l,...d}=n;if(React__namespace.isValidElement(l)){const f=getElementRef(l),g=mergeProps(d,l.props);return l.type!==React__namespace.Fragment&&(g.ref=o?composeRefs(o,f):f),React__namespace.cloneElement(l,g)}return React__namespace.Children.count(l)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function createSlottable(e){const t=({children:n})=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=SLOTTABLE_IDENTIFIER,t}function isSlottable(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps(e,t){const n={...t};for(const o in t){const l=e[o],d=t[o];/^on[A-Z]/.test(o)?l&&d?n[o]=(...g)=>{d(...g),l(...g)}:l&&(n[o]=l):o==="style"?n[o]={...l,...d}:o==="className"&&(n[o]=[l,d].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef(e){var o,l;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Primitive=NODES.reduce((e,t)=>{const n=createSlot(`Primitive.${t}`),o=React__namespace.forwardRef((l,d)=>{const{asChild:f,...g}=l,b=f?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntime.jsx(b,{...g,ref:d})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function dispatchDiscreteCustomEvent(e,t){e&&ReactDOM__namespace.flushSync(()=>e.dispatchEvent(t))}function useEscapeKeydown(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e);React__namespace.useEffect(()=>{const o=l=>{l.key==="Escape"&&n(l)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=React__namespace.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=React__namespace.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,onDismiss:g,...b}=e,_=React__namespace.useContext(DismissableLayerContext),[S,R]=React__namespace.useState(null),C=(S==null?void 0:S.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=React__namespace.useState({}),M=useComposedRefs(t,te=>R(te)),I=Array.from(_.layers),[A]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),V=I.indexOf(A),q=S?I.indexOf(S):-1,z=_.layersWithOutsidePointerEventsDisabled.size>0,Q=q>=V,F=usePointerDownOutside(te=>{const ae=te.target,ie=[..._.branches].some(oe=>oe.contains(ae));!Q||ie||(l==null||l(te),f==null||f(te),te.defaultPrevented||g==null||g())},C),O=useFocusOutside(te=>{const ae=te.target;[..._.branches].some(oe=>oe.contains(ae))||(d==null||d(te),f==null||f(te),te.defaultPrevented||g==null||g())},C);return useEscapeKeydown(te=>{q===_.layers.size-1&&(o==null||o(te),!te.defaultPrevented&&g&&(te.preventDefault(),g()))},C),React__namespace.useEffect(()=>{if(S)return n&&(_.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(S)),_.layers.add(S),dispatchUpdate(),()=>{n&&_.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=originalBodyPointerEvents)}},[S,C,n,_]),React__namespace.useEffect(()=>()=>{S&&(_.layers.delete(S),_.layersWithOutsidePointerEventsDisabled.delete(S),dispatchUpdate())},[S,_]),React__namespace.useEffect(()=>{const te=()=>E({});return document.addEventListener(CONTEXT_UPDATE,te),()=>document.removeEventListener(CONTEXT_UPDATE,te)},[]),jsxRuntime.jsx(Primitive.div,{...b,ref:M,style:{pointerEvents:z?Q?"auto":"none":void 0,...e.style},onFocusCapture:composeEventHandlers(e.onFocusCapture,O.onFocusCapture),onBlurCapture:composeEventHandlers(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:composeEventHandlers(e.onPointerDownCapture,F.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=React__namespace.forwardRef((e,t)=>{const n=React__namespace.useContext(DismissableLayerContext),o=React__namespace.useRef(null),l=useComposedRefs(t,o);return React__namespace.useEffect(()=>{const d=o.current;if(d)return n.branches.add(d),()=>{n.branches.delete(d)}},[n.branches]),jsxRuntime.jsx(Primitive.div,{...e,ref:l})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e),o=React__namespace.useRef(!1),l=React__namespace.useRef(()=>{});return React__namespace.useEffect(()=>{const d=g=>{if(g.target&&!o.current){let b=function(){handleAndDispatchCustomEvent$1(POINTER_DOWN_OUTSIDE,n,_,{discrete:!0})};const _={originalEvent:g};g.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=b,t.addEventListener("click",l.current,{once:!0})):b()}else t.removeEventListener("click",l.current);o.current=!1},f=window.setTimeout(()=>{t.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),t.removeEventListener("pointerdown",d),t.removeEventListener("click",l.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function useFocusOutside(e,t=globalThis==null?void 0:globalThis.document){const n=useCallbackRef$1(e),o=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{const l=d=>{d.target&&!o.current&&handleAndDispatchCustomEvent$1(FOCUS_OUTSIDE,n,{originalEvent:d},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function dispatchUpdate(){const e=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(e)}function handleAndDispatchCustomEvent$1(e,t,n,{discrete:o}){const l=n.originalEvent.target,d=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),o?dispatchDiscreteCustomEvent(l,d):l.dispatchEvent(d)}var Root$a=DismissableLayer,Branch=DismissableLayerBranch,AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS$1={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=React__namespace.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:l,onUnmountAutoFocus:d,...f}=e,[g,b]=React__namespace.useState(null),_=useCallbackRef$1(l),S=useCallbackRef$1(d),R=React__namespace.useRef(null),C=useComposedRefs(t,I=>b(I)),E=React__namespace.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;React__namespace.useEffect(()=>{if(o){let I=function(z){if(E.paused||!g)return;const Q=z.target;g.contains(Q)?R.current=Q:focus(R.current,{select:!0})},A=function(z){if(E.paused||!g)return;const Q=z.relatedTarget;Q!==null&&(g.contains(Q)||focus(R.current,{select:!0}))},V=function(z){if(document.activeElement===document.body)for(const F of z)F.removedNodes.length>0&&focus(g)};document.addEventListener("focusin",I),document.addEventListener("focusout",A);const q=new MutationObserver(V);return g&&q.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",I),document.removeEventListener("focusout",A),q.disconnect()}}},[o,g,E.paused]),React__namespace.useEffect(()=>{if(g){focusScopesStack.add(E);const I=document.activeElement;if(!g.contains(I)){const V=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS$1);g.addEventListener(AUTOFOCUS_ON_MOUNT,_),g.dispatchEvent(V),V.defaultPrevented||(focusFirst$3(removeLinks(getTabbableCandidates$1(g)),{select:!0}),document.activeElement===I&&focus(g))}return()=>{g.removeEventListener(AUTOFOCUS_ON_MOUNT,_),setTimeout(()=>{const V=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS$1);g.addEventListener(AUTOFOCUS_ON_UNMOUNT,S),g.dispatchEvent(V),V.defaultPrevented||focus(I??document.body,{select:!0}),g.removeEventListener(AUTOFOCUS_ON_UNMOUNT,S),focusScopesStack.remove(E)},0)}}},[g,_,S,E]);const M=React__namespace.useCallback(I=>{if(!n&&!o||E.paused)return;const A=I.key==="Tab"&&!I.altKey&&!I.ctrlKey&&!I.metaKey,V=document.activeElement;if(A&&V){const q=I.currentTarget,[z,Q]=getTabbableEdges(q);z&&Q?!I.shiftKey&&V===Q?(I.preventDefault(),n&&focus(z,{select:!0})):I.shiftKey&&V===z&&(I.preventDefault(),n&&focus(Q,{select:!0})):V===q&&I.preventDefault()}},[n,o,E.paused]);return jsxRuntime.jsx(Primitive.div,{tabIndex:-1,...f,ref:C,onKeyDown:M})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst$3(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(focus(o,{select:t}),document.activeElement!==n)return}function getTabbableEdges(e){const t=getTabbableCandidates$1(e),n=findVisible(t,e),o=findVisible(t.reverse(),e);return[n,o]}function getTabbableCandidates$1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function findVisible(e,t){for(const n of e)if(!isHidden(n,{upTo:t}))return n}function isHidden(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function isSelectableInput(e){return e instanceof HTMLInputElement&&"select"in e}function focus(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&isSelectableInput(e)&&t&&e.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=arrayRemove(e,t),e.unshift(t)},remove(t){var n;e=arrayRemove(e,t),(n=e[0])==null||n.resume()}}}function arrayRemove(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function removeLinks(e){return e.filter(t=>t.tagName!=="A")}var PORTAL_NAME$6="Portal",Portal$5=React__namespace.forwardRef((e,t)=>{var g;const{container:n,...o}=e,[l,d]=React__namespace.useState(!1);useLayoutEffect2(()=>d(!0),[]);const f=n||l&&((g=globalThis==null?void 0:globalThis.document)==null?void 0:g.body);return f?ReactDOM.createPortal(jsxRuntime.jsx(Primitive.div,{...o,ref:t}),f):null});Portal$5.displayName=PORTAL_NAME$6;var count$1=0;function useFocusGuards(){React__namespace.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",e[1]??createFocusGuard()),count$1++,()=>{count$1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),count$1--}},[])}function createFocusGuard(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zeroRightClassName="right-scroll-bar-position",fullWidthClassName="width-before-scroll-bar",noScrollbarsClassName="with-scroll-bars-hidden",removedBarSizeVariable="--removed-body-scroll-bar-size";function assignRef(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function useCallbackRef(e,t){var n=React.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var l=n.value;l!==o&&(n.value=o,n.callback(o,l))}}}})[0];return n.callback=t,n.facade}var useIsomorphicLayoutEffect=typeof window<"u"?React__namespace.useLayoutEffect:React__namespace.useEffect,currentValues=new WeakMap;function useMergeRefs(e,t){var n=useCallbackRef(null,function(o){return e.forEach(function(l){return assignRef(l,o)})});return useIsomorphicLayoutEffect(function(){var o=currentValues.get(n);if(o){var l=new Set(o),d=new Set(e),f=n.current;l.forEach(function(g){d.has(g)||assignRef(g,null)}),d.forEach(function(g){l.has(g)||assignRef(g,f)})}currentValues.set(n,e)},[e]),n}function ItoI(e){return e}function innerCreateMedium(e,t){t===void 0&&(t=ItoI);var n=[],o=!1,l={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(d){var f=t(d,o);return n.push(f),function(){n=n.filter(function(g){return g!==f})}},assignSyncMedium:function(d){for(o=!0;n.length;){var f=n;n=[],f.forEach(d)}n={push:function(g){return d(g)},filter:function(){return n}}},assignMedium:function(d){o=!0;var f=[];if(n.length){var g=n;n=[],g.forEach(d),f=n}var b=function(){var S=f;f=[],S.forEach(d)},_=function(){return Promise.resolve().then(b)};_(),n={push:function(S){f.push(S),_()},filter:function(S){return f=f.filter(S),n}}}};return l}function createSidecarMedium(e){e===void 0&&(e={});var t=innerCreateMedium(null);return t.options=__assign$1({async:!0,ssr:!1},e),t}var SideCar$1=function(e){var t=e.sideCar,n=__rest(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return React__namespace.createElement(o,__assign$1({},n))};SideCar$1.isSideCarExport=!0;function exportSidecar(e,t){return e.useMedium(t),SideCar$1}var effectCar=createSidecarMedium(),nothing=function(){},RemoveScroll=React__namespace.forwardRef(function(e,t){var n=React__namespace.useRef(null),o=React__namespace.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),l=o[0],d=o[1],f=e.forwardProps,g=e.children,b=e.className,_=e.removeScrollBar,S=e.enabled,R=e.shards,C=e.sideCar,E=e.noIsolation,M=e.inert,I=e.allowPinchZoom,A=e.as,V=A===void 0?"div":A,q=e.gapMode,z=__rest(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),Q=C,F=useMergeRefs([n,t]),O=__assign$1(__assign$1({},z),l);return React__namespace.createElement(React__namespace.Fragment,null,S&&React__namespace.createElement(Q,{sideCar:effectCar,removeScrollBar:_,shards:R,noIsolation:E,inert:M,setCallbacks:d,allowPinchZoom:!!I,lockRef:n,gapMode:q}),f?React__namespace.cloneElement(React__namespace.Children.only(g),__assign$1(__assign$1({},O),{ref:F})):React__namespace.createElement(V,__assign$1({},O,{className:b,ref:F}),g))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var getNonce=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function makeStyleTag(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=getNonce();return t&&e.setAttribute("nonce",t),e}function injectStyles(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function insertStyleTag(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var stylesheetSingleton=function(){var e=0,t=null;return{add:function(n){e==0&&(t=makeStyleTag())&&(injectStyles(t,n),insertStyleTag(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},styleHookSingleton=function(){var e=stylesheetSingleton();return function(t,n){React__namespace.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},styleSingleton=function(){var e=styleHookSingleton(),t=function(n){var o=n.styles,l=n.dynamic;return e(o,l),null};return t},zeroGap={left:0,top:0,right:0,gap:0},parse=function(e){return parseInt(e||"",10)||0},getOffset$1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],l=t[e==="padding"?"paddingRight":"marginRight"];return[parse(n),parse(o),parse(l)]},getGapWidth=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zeroGap;var t=getOffset$1(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,t,n,o){var l=e.left,d=e.top,f=e.right,g=e.gap;return n===void 0&&(n="margin"),`
|
|
370
370
|
.`.concat(noScrollbarsClassName,` {
|
|
371
371
|
overflow: hidden `).concat(o,`;
|
|
372
372
|
padding-right: `).concat(g,"px ").concat(o,`;
|