@verifiedinc-public/shared-ui-elements 4.0.4-beta.8 → 4.0.4-beta.9

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.
@@ -1,6 +1,7 @@
1
1
  import { TimeSeriesChartData } from '../OneClickOverTimeChart/OneClickTimeSeriesDataMapper';
2
2
  export interface SignupBigNumbersProps {
3
- data?: TimeSeriesChartData[];
3
+ oneClickCreated?: TimeSeriesChartData[];
4
+ oneClickSuccess?: TimeSeriesChartData[];
4
5
  isLoading: boolean;
5
6
  }
6
- export declare function SignupBigNumbers({ data, isLoading, }: Readonly<SignupBigNumbersProps>): React.ReactNode;
7
+ export declare function SignupBigNumbers({ oneClickCreated, oneClickSuccess, isLoading, }: Readonly<SignupBigNumbersProps>): React.ReactNode;
@@ -6,4 +6,4 @@ export interface SignupMetrics {
6
6
  successRate: number;
7
7
  }
8
8
  export declare const defaultMetrics: SignupMetrics;
9
- export declare function calculateSignupMetrics(data?: TimeSeriesChartData[]): SignupMetrics;
9
+ export declare function calculateSignupMetrics(oneClickCreated?: TimeSeriesChartData[], oneClickSuccess?: TimeSeriesChartData[]): SignupMetrics;
@@ -1 +1 @@
1
- "use strict";import{B as a,i as s,E as e,L as r,j as i,M as t,g as C,O as h,P as n,R as o,e as S,d as m,S as g,a as p,b as c,k as d,c as l,f as O,h as b,m as k}from"../../shared/SignupBigNumbers-DPHhNS_D.mjs";export{a as BigNumber,s as EmptyChartSection,e as ErrorCodesChart,r as LoadingChartSection,i as MetricLastUpdated,t as MonthlySignupsOverviewTable,C as OneClickOverTimeChart,h as OneClickPercentageChart,n as PieChart,o as ReasonCodesChart,S as RiskScoreBarChart,m as RiskScorePieChart,g as SeriesChart,p as SeriesChartLegend,c as SeriesPercentageChart,d as SignupBigNumbers,l as SimpleBarChart,O as SimpleLegend,b as mapMonthlySignupsOverviewTableData,k as mapTimeSeriesData};
1
+ "use strict";import{B as a,i as s,E as e,L as r,j as i,M as t,g as C,O as h,P as n,R as o,e as S,d as m,S as g,a as p,b as c,k as d,c as l,f as O,h as b,m as k}from"../../shared/SignupBigNumbers-Bekm4hS_.mjs";export{a as BigNumber,s as EmptyChartSection,e as ErrorCodesChart,r as LoadingChartSection,i as MetricLastUpdated,t as MonthlySignupsOverviewTable,C as OneClickOverTimeChart,h as OneClickPercentageChart,n as PieChart,o as ReasonCodesChart,S as RiskScoreBarChart,m as RiskScorePieChart,g as SeriesChart,p as SeriesChartLegend,c as SeriesPercentageChart,d as SignupBigNumbers,l as SimpleBarChart,O as SimpleLegend,b as mapMonthlySignupsOverviewTableData,k as mapTimeSeriesData};
@@ -1 +1 @@
1
- "use strict";import{A as a,c as s,l as e,B as r,n as t,m as n,C as i,D as o,f as p,E as c,j as m,F as u,I as d,b as h,L as C,O as S,h as l,e as g,P,Q as B,R as I,S as k,d as b,k as T,T as L,g as O,a as y,V as R,i as f,t as v,u as E}from"../shared/index-doCjd3sw.mjs";import{a as D,b as A,P as F,S as N}from"../shared/PageSectionHeader-DdpDhBZG.mjs";import{B as M,C as x,i as H,E as W,L as j,j as w,M as Q,g as V,O as q,P as z,R as U,e as G,d as J,S as K,a as X,b as Y,k as Z,c as _,f as $,W as aa,h as sa,m as ea,u as ra}from"../shared/SignupBigNumbers-DPHhNS_D.mjs";import{SnackbarProvider as ta}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,M as BigNumber,t as BrandFilterInput,n as Button,i as CredentialRequestsEditor,x as CustomAlertComponent,o as DateInput,p as DateRangeInput,c as EmailInput,H as EmptyChartSection,W as ErrorCodesChart,m as ExactBirthdayBanner,u as FullWidthAlert,d as Image,h as LegalLink,C as LinkButton,j as LoadingChartSection,w as MetricLastUpdated,Q as MonthlySignupsOverviewTable,S as OTPInput,l as OneClickForm,V as OneClickOverTimeChart,q as OneClickPercentageChart,D as PageHeader,A as PageSectionHeader,F as Paragraph,g as PhoneInput,z as PieChart,P as PrivacyPolicyNotice,B as QRCodeDisplay,U as ReasonCodesChart,I as ResendPhoneBanner,G as RiskScoreBarChart,J as RiskScorePieChart,k as SSNInput,N as SectionHeader,b as SelectInput,K as SeriesChart,X as SeriesChartLegend,Y as SeriesPercentageChart,Z as SignupBigNumbers,_ as SimpleBarChart,$ as SimpleLegend,ta as SnackbarProvider,T as TestPhoneNumbersBanner,L as TextButton,O as TimezoneInput,y as Typography,R as VerifiedImage,f as VerifiedIncLogo,aa as When,sa as mapMonthlySignupsOverviewTableData,ea as mapTimeSeriesData,v as toOption,E as useBrandFilterInput,ra as useSnackbar};
1
+ "use strict";import{A as a,c as s,l as e,B as r,n as t,m as n,C as i,D as o,f as p,E as c,j as m,F as u,I as d,b as h,L as C,O as S,h as l,e as g,P,Q as B,R as I,S as k,d as b,k as T,T as L,g as O,a as y,V as R,i as f,t as v,u as E}from"../shared/index-DCqR3SfZ.mjs";import{a as D,b as A,P as F,S as N}from"../shared/PageSectionHeader-DdpDhBZG.mjs";import{B as M,C as x,i as H,E as W,L as j,j as w,M as Q,g as V,O as q,P as z,R as U,e as G,d as J,S as K,a as X,b as Y,k as Z,c as _,f as $,W as aa,h as sa,m as ea,u as ra}from"../shared/SignupBigNumbers-Bekm4hS_.mjs";import{SnackbarProvider as ta}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,M as BigNumber,t as BrandFilterInput,n as Button,i as CredentialRequestsEditor,x as CustomAlertComponent,o as DateInput,p as DateRangeInput,c as EmailInput,H as EmptyChartSection,W as ErrorCodesChart,m as ExactBirthdayBanner,u as FullWidthAlert,d as Image,h as LegalLink,C as LinkButton,j as LoadingChartSection,w as MetricLastUpdated,Q as MonthlySignupsOverviewTable,S as OTPInput,l as OneClickForm,V as OneClickOverTimeChart,q as OneClickPercentageChart,D as PageHeader,A as PageSectionHeader,F as Paragraph,g as PhoneInput,z as PieChart,P as PrivacyPolicyNotice,B as QRCodeDisplay,U as ReasonCodesChart,I as ResendPhoneBanner,G as RiskScoreBarChart,J as RiskScorePieChart,k as SSNInput,N as SectionHeader,b as SelectInput,K as SeriesChart,X as SeriesChartLegend,Y as SeriesPercentageChart,Z as SignupBigNumbers,_ as SimpleBarChart,$ as SimpleLegend,ta as SnackbarProvider,T as TestPhoneNumbersBanner,L as TextButton,O as TimezoneInput,y as Typography,R as VerifiedImage,f as VerifiedIncLogo,aa as When,sa as mapMonthlySignupsOverviewTableData,ea as mapTimeSeriesData,v as toOption,E as useBrandFilterInput,ra as useSnackbar};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use strict";import{A as e,c as t,l as r,B as o,n as i,m as n,C as m,D as l,f as u,E as c,j as d,F as p,I as h,b as S,L as g,O as C,h as f,e as k,P,Q as y,R as b,S as B,d as D,k as T,T as I,g as w,a as v,V as O,i as R,o as L,q as N,r as M,w as E,p as x,s as F,t as Y,u as A,v as W}from"./shared/index-doCjd3sw.mjs";import{a as z,b as G,P as U,S as j}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as H,C as V,i as Q,E as q,L as $,j as K,M as X,g as Z,O as _,P as J,R as aa,e as sa,d as ea,S as ta,a as ra,b as oa,k as ia,c as na,f as ma,W as la,l as ua,o as ca,n as da,p as pa,h as ha,m as Sa,u as ga,q as Ca}from"./shared/SignupBigNumbers-DPHhNS_D.mjs";import{b as fa,d as ka,a as Pa,j as ya,u as ba,e as Ba,c as Da,f as Ta,g as Ia,h as wa,i as va}from"./shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as Oa,a as Ra}from"./shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as La,u as Na}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as Ma}from"./shared/useCounter-BV32zXDQ.mjs";import{b as Ea,a as xa,v as Fa,e as Ya,d as Aa,p as Wa,u as za,h as Ga,j as Ua,g as ja,o as Ha,s as Va,m as Qa,c as qa,l as $a,n as Ka,q as Xa,f as Za,i as _a,r as Ja,z as as,t as ss,x as es,k as ts,w as rs,y as os}from"./shared/shadows-Dhd7FrwF.mjs";import{masks as is}from"./utils/masks/index.mjs";import{toCapitalize as ns,toSentenceCase as ms}from"./utils/string/index.mjs";import{k as ls}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{M as us,S as cs,U as ds,d as ps,e as hs,f as Ss,g as gs,a as Cs,s as fs}from"./shared/unix.schema-CMYTtXco.mjs";import{p as ks}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Ps}from"notistack";async function ys(a){try{return[await a,null]}catch(s){return[null,s]}}const bs=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,H as BigNumber,i as BrandFilterInput,n as Button,m as CredentialRequestsEditor,V as CustomAlertComponent,l as DateInput,u as DateRangeInput,c as EmailInput,Q as EmptyChartSection,q as ErrorCodesChart,d as ExactBirthdayBanner,p as FullWidthAlert,h as Image,S as LegalLink,g as LinkButton,$ as LoadingChartSection,us as MaskedAndUnmaskedSSNSchema,K as MetricLastUpdated,X as MonthlySignupsOverviewTable,C as OTPInput,f as OneClickForm,Z as OneClickOverTimeChart,_ as OneClickPercentageChart,z as PageHeader,G as PageSectionHeader,U as Paragraph,k as PhoneInput,J as PieChart,P as PrivacyPolicyNotice,y as QRCodeDisplay,aa as ReasonCodesChart,b as ResendPhoneBanner,sa as RiskScoreBarChart,ea as RiskScorePieChart,B as SSNInput,cs as SSNSchema,j as SectionHeader,D as SelectInput,ta as SeriesChart,ra as SeriesChartLegend,oa as SeriesPercentageChart,ia as SignupBigNumbers,na as SimpleBarChart,ma as SimpleLegend,Ps as SnackbarProvider,T as TestPhoneNumbersBanner,I as TextButton,w as TimezoneInput,v as Typography,ds as USDateSchema,O as VerifiedImage,R as VerifiedIncLogo,la as When,Ea as black,xa as blue,Fa as colors,L as countries,Ya as darkBlue,Aa as darkGreen,Wa as darkGrey,za as darkGreyContrast,Ga as darkRed,Ua as darkYellow,ps as descriptionSchema,hs as emailSchema,Ss as fieldSchema,ua as formatDateMMDDYYYY,ca as formatDateMMYY,da as formatDateToTimestamp,pa as formatExtendedDate,gs as getDateSchemaWithPastValidation,N as getPhoneData,M as getPhoneDataByFieldName,Cs as getUnixSchema,ja as green,Ha as grey,Va as greyContrast,Qa as infoContrast,ls as kebabCaseToPretty,qa as lightBlue,$a as lightGreen,Ka as lightGrey,Xa as lightGreyContrast,Za as lightRed,_a as lightYellow,ha as mapMonthlySignupsOverviewTableData,Sa as mapTimeSeriesData,is as masks,E as omitProperties,x as parseToPhoneNational,ks as phoneSchema,Ja as red,as as shadows,F as sortByCountryName,bs as ssnFormatter,fs as stateSchema,ss as textDisabled,es as theme,ns as toCapitalize,Y as toOption,ms as toSentenceCase,A as useBrandFilterInput,fa as useCallbackRef,Oa as useCopyToClipboard,Ma as useCounter,ka as useDebounceValue,Pa as useDisclosure,ya as useIntersectionObserver,ba as useLocalStorage,La as useOnClickOutside,Ra as usePrevious,Na as useQRCode,Ba as useScript,Da as useSearchParams,ga as useSnackbar,Ta as useThrottle,Ia as useToggle,wa as useWindowScroll,va as useWindowSize,Ca as uuidToHashedColor,W as validatePhone,ts as warningContrast,rs as white,ys as wrapPromise,os as yellow};
1
+ "use strict";import{A as e,c as t,l as r,B as o,n as i,m as n,C as m,D as l,f as u,E as c,j as d,F as p,I as h,b as S,L as g,O as C,h as f,e as k,P,Q as y,R as b,S as B,d as D,k as T,T as I,g as w,a as v,V as O,i as R,o as L,q as N,r as M,w as E,p as x,s as F,t as Y,u as A,v as W}from"./shared/index-DCqR3SfZ.mjs";import{a as z,b as G,P as U,S as j}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as H,C as V,i as Q,E as q,L as $,j as K,M as X,g as Z,O as _,P as J,R as aa,e as sa,d as ea,S as ta,a as ra,b as oa,k as ia,c as na,f as ma,W as la,l as ua,o as ca,n as da,p as pa,h as ha,m as Sa,u as ga,q as Ca}from"./shared/SignupBigNumbers-Bekm4hS_.mjs";import{b as fa,d as ka,a as Pa,j as ya,u as ba,e as Ba,c as Da,f as Ta,g as Ia,h as wa,i as va}from"./shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as Oa,a as Ra}from"./shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as La,u as Na}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as Ma}from"./shared/useCounter-BV32zXDQ.mjs";import{b as Ea,a as xa,v as Fa,e as Ya,d as Aa,p as Wa,u as za,h as Ga,j as Ua,g as ja,o as Ha,s as Va,m as Qa,c as qa,l as $a,n as Ka,q as Xa,f as Za,i as _a,r as Ja,z as as,t as ss,x as es,k as ts,w as rs,y as os}from"./shared/shadows-Dhd7FrwF.mjs";import{masks as is}from"./utils/masks/index.mjs";import{toCapitalize as ns,toSentenceCase as ms}from"./utils/string/index.mjs";import{k as ls}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{M as us,S as cs,U as ds,d as ps,e as hs,f as Ss,g as gs,a as Cs,s as fs}from"./shared/unix.schema-CMYTtXco.mjs";import{p as ks}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Ps}from"notistack";async function ys(a){try{return[await a,null]}catch(s){return[null,s]}}const bs=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,H as BigNumber,i as BrandFilterInput,n as Button,m as CredentialRequestsEditor,V as CustomAlertComponent,l as DateInput,u as DateRangeInput,c as EmailInput,Q as EmptyChartSection,q as ErrorCodesChart,d as ExactBirthdayBanner,p as FullWidthAlert,h as Image,S as LegalLink,g as LinkButton,$ as LoadingChartSection,us as MaskedAndUnmaskedSSNSchema,K as MetricLastUpdated,X as MonthlySignupsOverviewTable,C as OTPInput,f as OneClickForm,Z as OneClickOverTimeChart,_ as OneClickPercentageChart,z as PageHeader,G as PageSectionHeader,U as Paragraph,k as PhoneInput,J as PieChart,P as PrivacyPolicyNotice,y as QRCodeDisplay,aa as ReasonCodesChart,b as ResendPhoneBanner,sa as RiskScoreBarChart,ea as RiskScorePieChart,B as SSNInput,cs as SSNSchema,j as SectionHeader,D as SelectInput,ta as SeriesChart,ra as SeriesChartLegend,oa as SeriesPercentageChart,ia as SignupBigNumbers,na as SimpleBarChart,ma as SimpleLegend,Ps as SnackbarProvider,T as TestPhoneNumbersBanner,I as TextButton,w as TimezoneInput,v as Typography,ds as USDateSchema,O as VerifiedImage,R as VerifiedIncLogo,la as When,Ea as black,xa as blue,Fa as colors,L as countries,Ya as darkBlue,Aa as darkGreen,Wa as darkGrey,za as darkGreyContrast,Ga as darkRed,Ua as darkYellow,ps as descriptionSchema,hs as emailSchema,Ss as fieldSchema,ua as formatDateMMDDYYYY,ca as formatDateMMYY,da as formatDateToTimestamp,pa as formatExtendedDate,gs as getDateSchemaWithPastValidation,N as getPhoneData,M as getPhoneDataByFieldName,Cs as getUnixSchema,ja as green,Ha as grey,Va as greyContrast,Qa as infoContrast,ls as kebabCaseToPretty,qa as lightBlue,$a as lightGreen,Ka as lightGrey,Xa as lightGreyContrast,Za as lightRed,_a as lightYellow,ha as mapMonthlySignupsOverviewTableData,Sa as mapTimeSeriesData,is as masks,E as omitProperties,x as parseToPhoneNational,ks as phoneSchema,Ja as red,as as shadows,F as sortByCountryName,bs as ssnFormatter,fs as stateSchema,ss as textDisabled,es as theme,ns as toCapitalize,Y as toOption,ms as toSentenceCase,A as useBrandFilterInput,fa as useCallbackRef,Oa as useCopyToClipboard,Ma as useCounter,ka as useDebounceValue,Pa as useDisclosure,ya as useIntersectionObserver,ba as useLocalStorage,La as useOnClickOutside,Ra as usePrevious,Na as useQRCode,Ba as useScript,Da as useSearchParams,ga as useSnackbar,Ta as useThrottle,Ia as useToggle,wa as useWindowScroll,va as useWindowSize,Ca as uuidToHashedColor,W as validatePhone,ts as warningContrast,rs as white,ys as wrapPromise,os as yellow};
@@ -18,4 +18,4 @@ __p += '`),he&&(M+=`' +
18
18
  function print() { __p += __j.call(arguments, '') }
19
19
  `:`;
20
20
  `)+M+`return __p
21
- }`;var ae=Kc(function(){return ve(f,z+"return "+M).apply(o,h)});if(ae.source=M,va(ae))throw ae;return ae}function Pg(e){return xe(e).toLowerCase()}function Lg(e){return xe(e).toUpperCase()}function Vg(e,t,n){if(e=xe(e),e&&(n||t===o))return rs(e);if(!e||!(t=dt(t)))return e;var a=Rt(e),s=Rt(t),f=ns(a,s),h=os(a,s)+1;return hr(a,f,h).join("")}function Wg(e,t,n){if(e=xe(e),e&&(n||t===o))return e.slice(0,as(e)+1);if(!e||!(t=dt(t)))return e;var a=Rt(e),s=os(a,Rt(t))+1;return hr(a,0,s).join("")}function zg(e,t,n){if(e=xe(e),e&&(n||t===o))return e.replace(vi,"");if(!e||!(t=dt(t)))return e;var a=Rt(e),s=ns(a,Rt(t));return hr(a,s).join("")}function Gg(e,t){var n=De,a=V;if(Fe(t)){var s="separator"in t?t.separator:s;n="length"in t?ne(t.length):n,a="omission"in t?dt(t.omission):a}e=xe(e);var f=e.length;if(Nr(e)){var h=Rt(e);f=h.length}if(n>=f)return e;var y=n-Rr(a);if(y<1)return a;var v=h?hr(h,0,y).join(""):e.slice(0,y);if(s===o)return v+a;if(h&&(y+=v.length-y),ba(s)){if(e.slice(y).search(s)){var I,A=v;for(s.global||(s=Ri(s.source,xe(ju.exec(s))+"g")),s.lastIndex=0;I=s.exec(A);)var M=I.index;v=v.slice(0,M===o?y:M)}}else if(e.indexOf(dt(s),y)!=y){var D=v.lastIndexOf(s);D>-1&&(v=v.slice(0,D))}return v+a}function Ug(e){return e=xe(e),e&&tp.test(e)?e.replace(xu,bd):e}var Bg=zr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),wa=Zs("toUpperCase");function qc(e,t,n){return e=xe(e),t=n?o:t,t===o?hd(e)?wd(e):id(e):e.match(t)||[]}var Kc=se(function(e,t){try{return ft(e,o,t)}catch(n){return va(n)?n:new J(n)}}),qg=Qt(function(e,t){return _t(t,function(n){n=Gt(n),Zt(e,n,ma(e[n],e))}),e});function Kg(e){var t=e==null?0:e.length,n=q();return e=t?Ne(e,function(a){if(typeof a[1]!="function")throw new xt(p);return[n(a[0]),a[1]]}):[],se(function(a){for(var s=-1;++s<t;){var f=e[s];if(ft(f[0],this,a))return ft(f[1],this,a)}})}function Zg(e){return bh(Ot(e,T))}function Oa(e){return function(){return e}}function Yg(e,t){return e==null||e!==e?t:e}var Qg=Qs(),Hg=Qs(!0);function ct(e){return e}function ja(e){return ks(typeof e=="function"?e:Ot(e,T))}function Xg(e){return Is(Ot(e,T))}function Jg(e,t){return As(e,Ot(t,T))}var ev=se(function(e,t){return function(n){return bn(n,e,t)}}),tv=se(function(e,t){return function(n){return bn(e,n,t)}});function Sa(e,t,n){var a=Ye(t),s=po(t,a);n==null&&!(Fe(t)&&(s.length||!a.length))&&(n=t,t=e,e=this,s=po(t,Ye(t)));var f=!(Fe(n)&&"chain"in n)||!!n.chain,h=Xt(e);return _t(s,function(y){var v=t[y];e[y]=v,h&&(e.prototype[y]=function(){var I=this.__chain__;if(f||I){var A=e(this.__wrapped__),M=A.__actions__=at(this.__actions__);return M.push({func:v,args:arguments,thisArg:e}),A.__chain__=I,A}return v.apply(e,sr([this.value()],arguments))})}),e}function rv(){return Qe._===this&&(Qe._=Id),this}function ka(){}function nv(e){return e=ne(e),se(function(t){return Cs(t,e)})}var ov=na(Ne),iv=na(Hu),av=na(Ii);function Zc(e){return la(e)?Ai(Gt(e)):Dh(e)}function uv(e){return function(t){return e==null?o:Sr(e,t)}}var sv=Xs(),cv=Xs(!0);function $a(){return[]}function Ia(){return!1}function lv(){return{}}function fv(){return""}function pv(){return!0}function dv(e,t){if(e=ne(e),e<1||e>it)return[];var n=F,a=Je(e,F);t=q(t),e-=F;for(var s=Ei(a,t);++n<e;)t(n);return s}function hv(e){return ee(e)?Ne(e,Gt):ht(e)?[e]:at(hc(xe(e)))}function yv(e){var t=++kd;return xe(e)+t}var mv=bo(function(e,t){return e+t},0),gv=oa("ceil"),vv=bo(function(e,t){return e/t},1),bv=oa("floor");function _v(e){return e&&e.length?fo(e,ct,Gi):o}function xv(e,t){return e&&e.length?fo(e,q(t,2),Gi):o}function wv(e){return es(e,ct)}function Ov(e,t){return es(e,q(t,2))}function jv(e){return e&&e.length?fo(e,ct,Ki):o}function Sv(e,t){return e&&e.length?fo(e,q(t,2),Ki):o}var kv=bo(function(e,t){return e*t},1),$v=oa("round"),Iv=bo(function(e,t){return e-t},0);function Av(e){return e&&e.length?Ti(e,ct):0}function Cv(e,t){return e&&e.length?Ti(e,q(t,2)):0}return l.after=Xy,l.ary=Sc,l.assign=Lm,l.assignIn=Lc,l.assignInWith=Eo,l.assignWith=Vm,l.at=Wm,l.before=kc,l.bind=ma,l.bindAll=qg,l.bindKey=$c,l.castArray=lm,l.chain=wc,l.chunk=b0,l.compact=_0,l.concat=x0,l.cond=Kg,l.conforms=Zg,l.constant=Oa,l.countBy=Ay,l.create=zm,l.curry=Ic,l.curryRight=Ac,l.debounce=Cc,l.defaults=Gm,l.defaultsDeep=Um,l.defer=Jy,l.delay=em,l.difference=w0,l.differenceBy=O0,l.differenceWith=j0,l.drop=S0,l.dropRight=k0,l.dropRightWhile=$0,l.dropWhile=I0,l.fill=A0,l.filter=Ty,l.flatMap=Ny,l.flatMapDeep=Ry,l.flatMapDepth=Dy,l.flatten=vc,l.flattenDeep=C0,l.flattenDepth=T0,l.flip=tm,l.flow=Qg,l.flowRight=Hg,l.fromPairs=E0,l.functions=Hm,l.functionsIn=Xm,l.groupBy=Fy,l.initial=N0,l.intersection=R0,l.intersectionBy=D0,l.intersectionWith=F0,l.invert=eg,l.invertBy=tg,l.invokeMap=Ly,l.iteratee=ja,l.keyBy=Vy,l.keys=Ye,l.keysIn=st,l.map=ko,l.mapKeys=ng,l.mapValues=og,l.matches=Xg,l.matchesProperty=Jg,l.memoize=Io,l.merge=ig,l.mergeWith=Vc,l.method=ev,l.methodOf=tv,l.mixin=Sa,l.negate=Ao,l.nthArg=nv,l.omit=ag,l.omitBy=ug,l.once=rm,l.orderBy=Wy,l.over=ov,l.overArgs=nm,l.overEvery=iv,l.overSome=av,l.partial=ga,l.partialRight=Tc,l.partition=zy,l.pick=sg,l.pickBy=Wc,l.property=Zc,l.propertyOf=uv,l.pull=W0,l.pullAll=_c,l.pullAllBy=z0,l.pullAllWith=G0,l.pullAt=U0,l.range=sv,l.rangeRight=cv,l.rearg=om,l.reject=By,l.remove=B0,l.rest=im,l.reverse=ha,l.sampleSize=Ky,l.set=lg,l.setWith=fg,l.shuffle=Zy,l.slice=q0,l.sortBy=Hy,l.sortedUniq=J0,l.sortedUniqBy=ey,l.split=Ng,l.spread=am,l.tail=ty,l.take=ry,l.takeRight=ny,l.takeRightWhile=oy,l.takeWhile=iy,l.tap=_y,l.throttle=um,l.thru=So,l.toArray=Dc,l.toPairs=zc,l.toPairsIn=Gc,l.toPath=hv,l.toPlainObject=Pc,l.transform=pg,l.unary=sm,l.union=ay,l.unionBy=uy,l.unionWith=sy,l.uniq=cy,l.uniqBy=ly,l.uniqWith=fy,l.unset=dg,l.unzip=ya,l.unzipWith=xc,l.update=hg,l.updateWith=yg,l.values=Br,l.valuesIn=mg,l.without=py,l.words=qc,l.wrap=cm,l.xor=dy,l.xorBy=hy,l.xorWith=yy,l.zip=my,l.zipObject=gy,l.zipObjectDeep=vy,l.zipWith=by,l.entries=zc,l.entriesIn=Gc,l.extend=Lc,l.extendWith=Eo,Sa(l,l),l.add=mv,l.attempt=Kc,l.camelCase=_g,l.capitalize=Uc,l.ceil=gv,l.clamp=gg,l.clone=fm,l.cloneDeep=dm,l.cloneDeepWith=hm,l.cloneWith=pm,l.conformsTo=ym,l.deburr=Bc,l.defaultTo=Yg,l.divide=vv,l.endsWith=xg,l.eq=Ft,l.escape=wg,l.escapeRegExp=Og,l.every=Cy,l.find=Ey,l.findIndex=mc,l.findKey=Bm,l.findLast=My,l.findLastIndex=gc,l.findLastKey=qm,l.floor=bv,l.forEach=Oc,l.forEachRight=jc,l.forIn=Km,l.forInRight=Zm,l.forOwn=Ym,l.forOwnRight=Qm,l.get=_a,l.gt=mm,l.gte=gm,l.has=Jm,l.hasIn=xa,l.head=bc,l.identity=ct,l.includes=Py,l.indexOf=M0,l.inRange=vg,l.invoke=rg,l.isArguments=Ir,l.isArray=ee,l.isArrayBuffer=vm,l.isArrayLike=ut,l.isArrayLikeObject=We,l.isBoolean=bm,l.isBuffer=yr,l.isDate=_m,l.isElement=xm,l.isEmpty=wm,l.isEqual=Om,l.isEqualWith=jm,l.isError=va,l.isFinite=Sm,l.isFunction=Xt,l.isInteger=Ec,l.isLength=Co,l.isMap=Mc,l.isMatch=km,l.isMatchWith=$m,l.isNaN=Im,l.isNative=Am,l.isNil=Tm,l.isNull=Cm,l.isNumber=Nc,l.isObject=Fe,l.isObjectLike=Pe,l.isPlainObject=Sn,l.isRegExp=ba,l.isSafeInteger=Em,l.isSet=Rc,l.isString=To,l.isSymbol=ht,l.isTypedArray=Ur,l.isUndefined=Mm,l.isWeakMap=Nm,l.isWeakSet=Rm,l.join=P0,l.kebabCase=jg,l.last=St,l.lastIndexOf=L0,l.lowerCase=Sg,l.lowerFirst=kg,l.lt=Dm,l.lte=Fm,l.max=_v,l.maxBy=xv,l.mean=wv,l.meanBy=Ov,l.min=jv,l.minBy=Sv,l.stubArray=$a,l.stubFalse=Ia,l.stubObject=lv,l.stubString=fv,l.stubTrue=pv,l.multiply=kv,l.nth=V0,l.noConflict=rv,l.noop=ka,l.now=$o,l.pad=$g,l.padEnd=Ig,l.padStart=Ag,l.parseInt=Cg,l.random=bg,l.reduce=Gy,l.reduceRight=Uy,l.repeat=Tg,l.replace=Eg,l.result=cg,l.round=$v,l.runInContext=g,l.sample=qy,l.size=Yy,l.snakeCase=Mg,l.some=Qy,l.sortedIndex=K0,l.sortedIndexBy=Z0,l.sortedIndexOf=Y0,l.sortedLastIndex=Q0,l.sortedLastIndexBy=H0,l.sortedLastIndexOf=X0,l.startCase=Rg,l.startsWith=Dg,l.subtract=Iv,l.sum=Av,l.sumBy=Cv,l.template=Fg,l.times=dv,l.toFinite=Jt,l.toInteger=ne,l.toLength=Fc,l.toLower=Pg,l.toNumber=kt,l.toSafeInteger=Pm,l.toString=xe,l.toUpper=Lg,l.trim=Vg,l.trimEnd=Wg,l.trimStart=zg,l.truncate=Gg,l.unescape=Ug,l.uniqueId=yv,l.upperCase=Bg,l.upperFirst=wa,l.each=Oc,l.eachRight=jc,l.first=bc,Sa(l,function(){var e={};return Wt(l,function(t,n){Se.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=u,_t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),_t(["drop","take"],function(e,t){de.prototype[e]=function(n){n=n===o?1:Ze(ne(n),0);var a=this.__filtered__&&!t?new de(this):this.clone();return a.__filtered__?a.__takeCount__=Je(n,a.__takeCount__):a.__views__.push({size:Je(n,F),type:e+(a.__dir__<0?"Right":"")}),a},de.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),_t(["filter","map","takeWhile"],function(e,t){var n=t+1,a=n==Te||n==ke;de.prototype[e]=function(s){var f=this.clone();return f.__iteratees__.push({iteratee:q(s,3),type:n}),f.__filtered__=f.__filtered__||a,f}}),_t(["head","last"],function(e,t){var n="take"+(t?"Right":"");de.prototype[e]=function(){return this[n](1).value()[0]}}),_t(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");de.prototype[e]=function(){return this.__filtered__?new de(this):this[n](1)}}),de.prototype.compact=function(){return this.filter(ct)},de.prototype.find=function(e){return this.filter(e).head()},de.prototype.findLast=function(e){return this.reverse().find(e)},de.prototype.invokeMap=se(function(e,t){return typeof e=="function"?new de(this):this.map(function(n){return bn(n,e,t)})}),de.prototype.reject=function(e){return this.filter(Ao(q(e)))},de.prototype.slice=function(e,t){e=ne(e);var n=this;return n.__filtered__&&(e>0||t<0)?new de(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=ne(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},de.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},de.prototype.toArray=function(){return this.take(F)},Wt(de.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),s=l[a?"take"+(t=="last"?"Right":""):t],f=a||/^find/.test(t);s&&(l.prototype[t]=function(){var h=this.__wrapped__,y=a?[1]:arguments,v=h instanceof de,I=y[0],A=v||ee(h),M=function(pe){var he=s.apply(l,sr([pe],y));return a&&D?he[0]:he};A&&n&&typeof I=="function"&&I.length!=1&&(v=A=!1);var D=this.__chain__,z=!!this.__actions__.length,K=f&&!D,ae=v&&!z;if(!f&&A){h=ae?h:new de(this);var Z=e.apply(h,y);return Z.__actions__.push({func:So,args:[M],thisArg:o}),new wt(Z,D)}return K&&ae?e.apply(this,y):(Z=this.thru(M),K?a?Z.value()[0]:Z.value():Z)})}),_t(["pop","push","shift","sort","splice","unshift"],function(e){var t=Qn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var s=arguments;if(a&&!this.__chain__){var f=this.value();return t.apply(ee(f)?f:[],s)}return this[n](function(h){return t.apply(ee(h)?h:[],s)})}}),Wt(de.prototype,function(e,t){var n=l[t];if(n){var a=n.name+"";Se.call(Lr,a)||(Lr[a]=[]),Lr[a].push({name:t,func:n})}}),Lr[vo(o,P).name]=[{name:"wrapper",func:o}],de.prototype.clone=Ud,de.prototype.reverse=Bd,de.prototype.value=qd,l.prototype.at=xy,l.prototype.chain=wy,l.prototype.commit=Oy,l.prototype.next=jy,l.prototype.plant=ky,l.prototype.reverse=$y,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Iy,l.prototype.first=l.prototype.head,pn&&(l.prototype[pn]=Sy),l},Dr=Od();_r?((_r.exports=Dr)._=Dr,ji._=Dr):Qe._=Dr}).call(qr)}(oi,oi.exports);var Wx=oi.exports;const Tf=Pa(Wx);function hu({value:r,children:i}){return r?typeof i=="function"?w.jsx(w.Fragment,{children:i(r)}):w.jsx(w.Fragment,{children:i}):null}const Ef={},Vn={};function Wn(r,i){try{const o=(Ef[r]||(Ef[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(i).split("GMT")[1]||"";return o in Vn?Vn[o]:Mf(o,o.split(":"))}catch{if(r in Vn)return Vn[r];const o=r?.match(zx);return o?Mf(r,o.slice(1)):NaN}}const zx=/([+-]\d\d):?(\d\d)?/;function Mf(r,i){const o=+i[0],u=+(i[1]||0);return Vn[r]=o>0?o*60+u:o*60-u}class ar extends Date{constructor(...i){super(),i.length>1&&typeof i[i.length-1]=="string"&&(this.timeZone=i.pop()),this.internal=new Date,isNaN(Wn(this.timeZone,this))?this.setTime(NaN):i.length?typeof i[0]=="number"&&(i.length===1||i.length===2&&typeof i[1]!="number")?this.setTime(i[0]):typeof i[0]=="string"?this.setTime(+new Date(i[0])):i[0]instanceof Date?this.setTime(+i[0]):(this.setTime(+new Date(...i)),Rf(this),yu(this)):this.setTime(Date.now())}static tz(i,...o){return o.length?new ar(...o,i):new ar(Date.now(),i)}withTimeZone(i){return new ar(+this,i)}getTimezoneOffset(){return-Wn(this.timeZone,this)}setTime(i){return Date.prototype.setTime.apply(this,arguments),yu(this),+this}[Symbol.for("constructDateFrom")](i){return new ar(+new Date(i),this.timeZone)}}const Nf=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!Nf.test(r))return;const i=r.replace(Nf,"$1UTC");ar.prototype[i]&&(r.startsWith("get")?ar.prototype[r]=function(){return this.internal[i]()}:(ar.prototype[r]=function(){return Date.prototype[i].apply(this.internal,arguments),Gx(this),+this},ar.prototype[i]=function(){return Date.prototype[i].apply(this,arguments),yu(this),+this}))});function yu(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function Gx(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),Rf(r)}function Rf(r){const i=Wn(r.timeZone,r),o=new Date(+r);o.setUTCHours(o.getUTCHours()-1);const u=-new Date(+r).getTimezoneOffset(),c=-new Date(+o).getTimezoneOffset(),d=u-c,p=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();d&&p&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+d);const m=u-i;m&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m);const b=Wn(r.timeZone,r),_=-new Date(+r).getTimezoneOffset()-b,$=b!==i,T=_-m;if($&&T){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+T);const j=Wn(r.timeZone,r),N=b-j;N&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N))}}const Ux=r=>{let i=new Date(Number(r));if(!r){const d=new Date;i=new Date(d.getFullYear(),d.getMonth(),d.getDate())}const o=String(i.getDate()).padStart(2,"0"),u=String(i.getMonth()+1).padStart(2,"0"),c=i.getFullYear();return[u,o,c].join("/")},Bx=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",...i});function Df(){return{enqueueSnackbar:(r,i="success",o)=>{o1(r,{severity:i,variant:"customAlertComponent",persist:!0,...o})},closeSnackbar:ul}}const qx=Bv(({id:r,message:i,severity:o,alertAction:u,sx:c,showCloseIcon:d=!0,persist:p,hideIconVariant:m,autoHideDuration:b,anchorOrigin:_,iconVariant:$,...T},j)=>w.jsx(n1,{ref:j,...T,children:w.jsx(Tv,{severity:o,action:w.jsxs(Ar,{ml:1,children:[w.jsx(hu,{value:u,children:w.jsx(Qc,{size:"small",onClick:()=>{var N;return r&&((N=u?.onAction)==null?void 0:N.call(u,r))},color:"inherit",children:u?.icon})}),w.jsx(hu,{value:!u&&d,children:w.jsx(Qc,{size:"small",onClick:()=>{ul(r)},color:"inherit",children:w.jsx(r1,{})})})]}),sx:{alignItems:"center",width:"320px",...c},children:i})})),Kx=r=>{let i=new Date(Number(r));if(!r){const d=new Date;i=new Date(d.getFullYear(),d.getMonth(),d.getDate())}const o=String(i.getDate()).padStart(2,"0"),u=String(i.getMonth()+1).padStart(2,"0"),c=i.getFullYear();return[u,o,c].join("/")},Zx=r=>{const i=new Date(r);return i.setUTCHours(12),String(+i)},mu=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{month:"short",day:"numeric",hour12:!1,...i}),gu=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",...i}),Ff=r=>{var i;const o=((i=r.replace(/-/g,"").match(/.{1,2}/g))==null?void 0:i.map(m=>parseInt(m,16)))??[],u=o.reduce((m,b)=>(m+b)%256,0),c=o.slice(1).reduce((m,b)=>(m+b)%256,0),d=o.slice(2).reduce((m,b)=>(m+b)%256,0),p=m=>m.toString(16).padStart(2,"0");return console.log(`#${p(u)}${p(c)}${p(d)}`),`#${p(u)}${p(c)}${p(d)}`},Pf=Vx({createStyledComponent:kf("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(r,i)=>i.root}),componentName:"MuiGrid2",useThemeProps:r=>If({props:r,name:"MuiGrid2"})});function Yx({entry:r,payload:i,showUuid:o=!0}){const u=Na(j=>{var N,E,C;return(C=(E=(N=j.payload)==null?void 0:N.data)==null?void 0:E.reduce)==null?void 0:C.call(E,(O,P)=>O+P.value,0)},[]),c=Na(j=>{const N=new Da(u(j)||0),E=i?.reduce((P,G)=>P+u(G),0)||0,C=new Da(E),O=Number(N.div(C).times(100).toFixed(2,Da.ROUND_DOWN));return isNaN(O)||!isFinite(O)?0:O},[u,i]),d=Ra(()=>u(r),[r,u]),p=Fa(d),m=Ra(()=>Number(c(r)),[r,c]),b=Fa(m),_=Na(j=>Math.floor(j).toLocaleString(),[]),$=Yv({type:"text/plain"}),T=Df();return w.jsxs(Qv,{component:"li",direction:"row",spacing:1,sx:{color:r.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[w.jsx(Ar,{sx:{width:"3px",height:"100%",backgroundColor:r.color,borderRadius:3}}),w.jsxs(Cr,{children:[w.jsxs(tr,{component:"p",variant:"caption",children:[w.jsx(Cr,{component:"span",display:"inline-flex",mr:.5,children:w.jsx(ol,{from:p??0,to:d,map:_,children:"0"})}),w.jsxs(Cr,{component:"span",direction:"row",display:"inline-flex",children:["(",w.jsx(ol,{from:b??0,to:m,map:_,children:"0"}),"%)"]})]}),w.jsx(tr,{variant:"body1",children:r.value}),r.payload.integrationType&&w.jsx(tr,{variant:"body2",children:r.payload.integrationType}),o&&r.payload.uuid&&w.jsxs(tr,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{$.copy(r.payload.uuid).catch(()=>{}),T.enqueueSnackbar("UUID copied to clipboard","success")},children:[r.payload.uuid.slice(0,5),"..."]})]})]})}function Lf(r){const{payload:i}=r;return w.jsx(Pf,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:w.jsx(Zv,{children:i?.map(o=>w.jsx(Pf,{children:w.jsx(Yx,{entry:o,payload:i,showUuid:r.showUuid})},`item-${o.value}`))})})}function Vf(r){const i=rr();return w.jsx(Ar,{sx:{width:"100%",height:"100%",...r.sx},children:w.jsx(Mo,{children:w.jsxs(Dv,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[w.jsx(Aa,{vertical:!1}),w.jsx(Ca,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>mu(o,{timeZone:r.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),w.jsx(Ta,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:o=>Number(o).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:r.label&&w.jsx(Ea,{value:r.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),w.jsx(Ma,{cursor:{stroke:i.palette.neutral.main,strokeWidth:1},formatter:o=>Number(o).toLocaleString(),labelFormatter:o=>gu(o,{timeZone:r.filter.timezone,hour12:!1})}),w.jsx(Jc,{content:w.jsx(Lf,{showUuid:r.showUuid})}),r.data.map(o=>qv(Fv,{uuid:o.uuid,integrationType:o.integrationType,key:o.uuid,name:o.name,dataKey:"value",data:o.chartData,type:"monotone",stroke:o.color,strokeWidth:2}))]})})})}const Qx=(r,i)=>{const o=new Map;return r.forEach(u=>{u.chartData.forEach(c=>{const d=new Date(c.date).getTime().toString();if(!o.has(d)){const p={date:d,total:0,diff:0,totalKey:"",originalTotal:0};i.forEach(({key:m})=>{p[m]=0,p[`${m}_absolute`]=0}),o.set(d,p)}i.forEach(({key:p})=>{const m=o.get(d),b=c[p],_=typeof b=="string"?b.trim()===""?0:parseInt(b,10):typeof b=="number"?b:0;m[`${p}_absolute`]=_,m[p]=0})})}),Array.from(o.values()).map(u=>{var c;const d=(c=i.find(b=>b.isTotal))==null?void 0:c.key,p=i.filter(b=>!b.isTotal).map(b=>b.key);if(!d||p.length===0)return u;const m=u[`${d}_absolute`];return u.originalTotal=m,u.total=m,u[d]=100,p.forEach(b=>{const _=u[`${b}_absolute`],$=m>0?new Ro(_.toString()).div(m).mul(100).toFixed(2,Ro.ROUND_DOWN):"0.00";u[b]=parseFloat($)}),{...u,totalKey:d}}).sort((u,c)=>parseInt(u.date)-parseInt(c.date))};function Wf(r){const i=rr(),o=Ra(()=>r.data?Qx(r.data,r.keyValues):[],[r.data,r.keyValues]);return w.jsx(Ar,{sx:{width:"100%",height:"100%",...r.sx},children:w.jsx(Mo,{width:"100%",height:"100%",children:w.jsxs(Pv,{data:o,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[w.jsx(Aa,{strokeDasharray:"3 3"}),w.jsx(Ca,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:u=>mu(u,{timeZone:r.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),w.jsx(Ta,{textAnchor:"end",tickLine:!1,tickFormatter:u=>`${u.toFixed(2)}%`}),w.jsx(Ma,{cursor:{stroke:i.palette.neutral.main,strokeWidth:1},labelFormatter:u=>gu(u,{timeZone:r.filter.timezone,hour12:!1}),formatter:(u,c,d)=>{const p=d.payload.totalKey,m=d.dataKey,b=m===p,_=d.payload[`${m}_absolute`],$=d.payload.originalTotal,T=b?null:$===0?"0.00":new Ro(_.toString()).div($).mul(100).toFixed(2,Ro.ROUND_DOWN);return[T?`${_.toLocaleString()} (${T}%)`:`${_.toLocaleString()} (TOTAL)`,c]}}),r.keyValues.sort((u,c)=>u.isTotal?-1:c.isTotal?1:0).map(u=>w.jsx(Lv,{type:"monotone",dataKey:u.key,name:u.name,stroke:u.color,fill:u.color,strokeWidth:2,fillOpacity:.6},u.key))]})})})}function zn(r){const i=Fa(r.value),{ref:o}=i1({from:i??0,to:r.value,duration:1,map:r.map});return w.jsx(Hc,{sx:{p:3,flex:1,...r.sx},children:w.jsxs(Cr,{spacing:1,alignItems:"center",children:[w.jsx(tr,{ref:o,variant:"h4",fontWeight:"bold",children:r.initialValue}),w.jsx(tr,{color:"text.secondary",children:r.label})]})})}const zf={margin:{top:5,right:30,left:20,bottom:5}},Hx={tickLine:!1,fontSize:12,tickMargin:12},Xx={textAnchor:"end",tickLine:!1};function ii({data:r,series:i,xAxis:o,yAxis:u,tooltip:c,bar:d,referenceLines:p,referenceAreas:m,sx:b}){const _=rr(),$=j=>!j.isFront,T=j=>!!j.isFront;return w.jsx(Ar,{sx:{width:"100%",height:"100%",...b},children:w.jsx(Mo,{children:w.jsxs(Vv,{data:r,...zf,children:[w.jsx(Aa,{strokeDasharray:"3 3",vertical:!1}),w.jsx(Ca,{...Hx,...o}),w.jsx(Ta,{...Xx,...u}),w.jsx(Ma,{cursor:{stroke:_.palette.neutral.main,strokeWidth:1},...c}),p?.filter($).map((j,N)=>w.jsx(el,{...j},j.label??N)),m?.filter($).map((j,N)=>w.jsx(tl,{...j},j.label??N)),i.map(j=>w.jsx(Wv,{name:j.key,dataKey:j.dataKey,fill:j.color,stackId:"stack",isAnimationActive:!1,...d},j.key)),p?.filter(T).map((j,N)=>w.jsx(el,{...j},j.label??N)),m?.filter(T).map((j,N)=>w.jsx(tl,{...j},j.label??N))]})})})}function Jx({data:r,threshold:i=100,sx:o}){const u=rr(),c=Object.entries(r??{}).map(([p,m])=>({key:p,[p]:m})),d=c.map(({key:p})=>({key:p,dataKey:p,color:u.palette.error.light}));return w.jsx(ii,{sx:o,data:c,series:d,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${i}`]},tooltip:{labelFormatter:p=>"Total"},referenceLines:[{y:i,stroke:u.palette.error.dark,strokeDasharray:"3 3",label:w.jsx(Ea,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function ew({data:r,threshold:i=100,sx:o}){const u=rr(),c=Object.entries(r??{}).map(([p,m])=>({key:p,[p]:m})),d=c.map(({key:p})=>({key:p,dataKey:p,color:u.palette.warning.light}));return w.jsx(ii,{sx:o,data:c,series:d,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${i}`]},tooltip:{labelFormatter:p=>"Total"},referenceLines:[{y:i,stroke:u.palette.error.dark,strokeDasharray:"3 3",label:w.jsx(Ea,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function Gf({payload:r=[],hiddenItems:i,onToggle:o,legendLabel:u}){return w.jsx(Ar,{sx:{display:"flex",justifyContent:"center",gap:"20px",paddingTop:"20px"},children:r.map((c,d)=>{const p=i.has(c.payload.name);return w.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",opacity:p?.4:1},onClick:()=>{o?.(c.payload)},children:[w.jsx("div",{style:{width:"12px",height:"12px",backgroundColor:c.color,marginRight:"8px",borderRadius:"2px"}}),w.jsx("span",{style:{color:c.color},children:u?`${u}: ${c.value}`:c.value})]},`legend-${d}`)})})}const tw=r=>{const i=Math.PI/180,{cx:o,cy:u,midAngle:c,innerRadius:d,outerRadius:p,startAngle:m,endAngle:b,fill:_,payload:$,percent:T,value:j,valueText:N,valuePercentage:E,needleVisible:C,customText:O,allActive:P}=r,G=Math.sin(-i*c),W=Math.cos(-i*c),fe=o+(p+5)*W,S=u+(p+5)*G,B=o+(p+15)*W,U=u+(p+15)*G,me=B+(W>=0?1:-1)*22,Me=U,De=W>=0?"start":"end",V=j.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),Y=()=>C||P?null:w.jsx("text",{x:o,y:u,dy:8,textAnchor:"middle",fill:"#333",fontSize:14,children:$.name});return w.jsxs("g",{children:[Y(),w.jsx(rl,{cx:o,cy:u,innerRadius:d,outerRadius:p,startAngle:m,endAngle:b,fill:_}),w.jsx(rl,{cx:o,cy:u,startAngle:m,endAngle:b,innerRadius:p+2,outerRadius:p+6,fill:_}),w.jsx("path",{d:`M${fe},${S}L${B},${U}L${me},${Me}`,stroke:_,fill:"none"}),w.jsx("circle",{cx:me,cy:Me,r:2,fill:_,stroke:"none"}),w.jsx("text",{x:me+(W>=0?1:-1)*12,y:Me,textAnchor:De,fill:"#333",fontSize:12,children:O||(N?`${N} ${V}`:V)}),E&&w.jsxs("text",{x:me+(W>=0?1:-1)*12,y:Me,dy:16,textAnchor:De,fill:"#999",fontSize:11,children:[`${(T*100).toFixed(2)}%`," (",V,")"]})]})},rw=r=>{const{value:i,data:o,color:u,innerRadius:c,outerRadius:d,boxDimensions:p,legendDimensions:m,valueText:b}=r,_=Math.PI/180;let $=0;o.forEach(Y=>{$+=Y.value});const T=p?p.width/2:150,j=(p?p.height/2:200)-m.height/2,N=180*(1-Math.max(0,Math.min(1,i/$))),E=(Number(c)+2*Number(d))/3,C=Math.sin(-_*N),O=Math.cos(-_*N),P=5,G=T-P,W=j,fe=G+P*C,S=W-P*O,B=G-P*C,U=W+P*O,me=G+E*O,Me=W+E*C,De=i.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),V=b??De;return w.jsxs(w.Fragment,{children:[w.jsx("circle",{cx:G,cy:W,r:P,fill:u,stroke:"none",style:{pointerEvents:"none"}},"needle-circle"),w.jsx("path",{d:`M${fe} ${S}L${B} ${U} L${me} ${Me} L${fe} ${S}`,stroke:"none",fill:u,style:{pointerEvents:"none"}},"needle-path"),w.jsx("text",{x:G+P,y:W+26,textAnchor:"middle",fill:"#333",fontSize:12,children:V},"needle-value")]})},nw=(r,i)=>({Allow:i.palette.success.main,Flag:i.palette.warning.main,Block:i.palette.error.main})[r]??i.palette.primary.main;function Uf({data:r,sx:i,legendLabel:o,legendToggle:u=!1,valueText:c="",valuePercentage:d=!0,pie:p,needleVisible:m=!1,needleValue:b,needleColor:_="#aaa",allActive:$=!1}){const{innerRadius:T=60,outerRadius:j=100}=p??{},N=rr(),[E,C]=No(void 0),[O,P]=No(new Set),G=Kv(null),[W,fe]=No(null),[S,B]=No(null),U=(V,Y)=>{$||C(Y)},me=()=>{$||C(void 0)},Me=V=>{u&&V&&P(Y=>{const ge=new Set(Y);return ge.has(V.name)?ge.delete(V.name):ge.size<r.length-1&&ge.add(V.name),ge})},De=r.map((V,Y)=>({...V,index:Y,value:O.has(V.name)?0:V.value}));return nl(()=>{const V=G.current;if(!V)return;const Y=new ResizeObserver(Te=>{var qe;const ke=(qe=Te[0])==null?void 0:qe.contentRect;ke&&fe(ke)});Y.observe(V);const ge=V.getBoundingClientRect();return fe(ge),()=>{Y.disconnect()}},[]),nl(()=>{var V;const Y=(V=G.current)==null?void 0:V.querySelector(".recharts-legend-wrapper");if(!Y){const qe=setInterval(()=>{var ke;const Ae=(ke=G.current)==null?void 0:ke.querySelector(".recharts-legend-wrapper");if(Ae){const it=Ae.getBoundingClientRect();B(it),clearInterval(qe)}},100);return()=>{clearInterval(qe)}}const ge=new ResizeObserver(qe=>{var ke;const Ae=(ke=qe[0])==null?void 0:ke.contentRect;Ae&&B(Ae)});ge.observe(Y);const Te=Y.getBoundingClientRect();return B(Te),()=>{ge.disconnect()}},[]),w.jsx(Ar,{ref:G,sx:{width:"100%",height:"100%","& g":{outline:"none"},...i},children:w.jsx(Mo,{children:w.jsxs(zv,{...zf,children:[w.jsx(Gv,{data:De,nameKey:"name",dataKey:"value",innerRadius:T,outerRadius:j,activeIndex:$?De.filter(V=>V.value>0).map(V=>V.index):E,activeShape:V=>tw({...V,valueText:c,valuePercentage:d,needleVisible:m,allActive:$}),paddingAngle:0,onMouseEnter:U,onMouseLeave:me,...p,children:De.map(V=>w.jsx(Uv,{fill:V.color??nw(V.name,N),opacity:O.has(V.name)?.5:1,stroke:"none"},V.name))}),w.jsx(Jc,{content:w.jsx(Gf,{legendLabel:o,hiddenItems:O,onToggle:Me})}),m&&b!==void 0&&W&&S&&rw({data:De,value:b,color:_,innerRadius:T,outerRadius:j,boxDimensions:W,legendDimensions:S,valueText:c})]})})})}function ow({sx:r,data:i,score:o=200,legendLabel:u}){const c=rr(),d=[{name:"Allow",customText:"0-299",value:i[0].value,color:c.palette.primary.main},{name:"Flag",customText:"300-599",value:i[1].value,color:c.palette.warning.main},{name:"Block",customText:"Over 600",value:i[2].value,color:c.palette.error.main}];return w.jsx(Uf,{data:d,legendToggle:!0,needleValue:o,legendLabel:u,allActive:!0,sx:r})}function iw({data:r,sx:i}){const o=rr(),u=(d=>{const p={};return d.forEach(m=>{Object.entries(m).forEach(([b,_])=>{const $=parseInt(b);$<=1e3&&(p[$]=(p[$]||0)+_)})}),Array.from({length:1001},(m,b)=>({key:b.toString(),value:p[b]||0}))})(r),c=[{key:"Risk Score",dataKey:"value",color:o.palette.error.main}];return w.jsx(ii,{data:u,series:c,sx:i,yAxis:{label:{value:"Count",angle:-90,position:"insideLeft"},domain:[0,"dataMax + 10"]},xAxis:{domain:[0,"dataMax"],interval:"preserveStartEnd"},tooltip:{labelFormatter:()=>"Risk Score",formatter:(d,p,m)=>[d,m.payload.key]},referenceAreas:[{x1:0,x2:299,fill:"#ffffff00",isFront:!1,label:"Allow"},{x1:300,x2:600,fill:o.palette.warning.light,isFront:!1,label:"Flag"},{x1:600,fill:o.palette.error.light,isFront:!1,label:"Block"}]})}const vu=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});function Bf(r){return w.jsx(tr,{variant:"h6",fontWeight:"900",...r})}function qf(r){return w.jsx(tr,{variant:"h6",fontWeight:"400",...r})}function ai(){const r=vu();return w.jsxs(Cr,{sx:r.smallChartWrapper,children:[w.jsx(Bf,{children:"No data available for the selected period and brands"}),w.jsx(qf,{children:"Please select a different period or brand"})]})}function ui(){const r=vu();return w.jsxs(Cr,{sx:r.smallChartWrapper,children:[w.jsx(Bf,{children:"Loading..."}),w.jsx(qf,{children:"Preparing your chart data"})]})}function aw({data:r,isLoading:i,isFetching:o,isSuccess:u,filter:c,sx:d}){var p,m;const b=rr(),_=vu(),$={oneClickCreated:{key:"oneClickCreated",name:"Started",color:b.palette.neutral.main,isTotal:!0},oneClickSuccess:{key:"oneClickSuccess",name:"Finished",color:b.palette.primary.main}};return i?w.jsx(ui,{}):!r.length||!((m=(p=r[0])==null?void 0:p.chartData)!=null&&m.length)||!u?w.jsx(ai,{}):w.jsx(Wf,{data:r,keyValues:Object.values($),filter:c,sx:{..._.smallChartWrapper,opacity:o?.4:1,...d}})}const uw={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function sw({data:r,isLoading:i,isFetching:o,isSuccess:u,filter:c}){return i?w.jsx(ui,{}):!r.length||!u?w.jsx(ai,{}):w.jsx(Vf,{label:"Uniques",data:r,filter:c,sx:{...uw.chartWrapper,opacity:o?.4:1}})}function cw(r){const{brands:i,data:o,keyValue:u,defaultColor:c}=r,d=i.flatMap(({_raw:p})=>{var m,b;const _=o?.find(T=>T.brandUuid===p.brandUuid),$=(_?.interval??[]).map(T=>({date:+new Date(T.date),value:Number(T[u]||0)})).filter(T=>T.value>0);return{uuid:p.brandUuid,name:p.brandName,integrationType:al(p.integrationType),color:p.integrationType==="hosted"&&(m=p.additionalData)!=null&&m.primaryColor?(b=p.additionalData)==null?void 0:b.primaryColor:c??Ff(p.brandUuid),chartData:$}});return Tf.chain(d).sortBy(p=>p.name).toArray().value()}const lw=({data:r,brands:i})=>r.flatMap(o=>{const u=i.find(c=>c.brandUuid===o.brandUuid);return!u||!o.interval?[]:o.interval.map(c=>({month:new Date(c.date).toISOString(),brand:u.brandName,integrationType:al(u.integrationType),total:c.oneClickCreated,finished:c.oneClickSuccess,totalCost:c.totalCost}))}),fw=({data:r,isLoading:i,showTotalCost:o=!0})=>i?w.jsx(ui,{}):r!=null&&r.length?w.jsx(Ev,{component:Hc,children:w.jsxs(Mv,{children:[w.jsx(Nv,{children:w.jsxs(Xc,{children:[w.jsx($t,{children:"Month"}),w.jsx($t,{children:"Brand"}),w.jsx($t,{children:"Integration Type"}),w.jsx($t,{align:"right",children:"Started"}),w.jsx($t,{align:"right",children:"Finished"}),o&&w.jsx($t,{align:"right",children:"Total Cost"})]})}),w.jsx(Rv,{children:r.map(u=>w.jsxs(Xc,{children:[w.jsx($t,{children:new Date(u.month).toLocaleDateString(void 0,{month:"short",year:"numeric",timeZone:"UTC"})}),w.jsx($t,{children:u.brand}),w.jsx($t,{children:u.integrationType}),w.jsx($t,{align:"right",children:u.total}),w.jsx($t,{align:"right",children:u.finished}),o&&w.jsx($t,{align:"right",children:u.totalCost??"-"})]},`${u.brand}-${u.month}`))})]})}):w.jsx(ai,{});function pw({lastUpdated:r}){return w.jsxs(tr,{variant:"caption",color:"text.secondary",fontWeight:"600",children:["The data was last updated on"," ",Bx(r??Date.now(),{hour12:!1}),"."]})}const Kf=r=>new Intl.NumberFormat("en-US").format(Number(r.toFixed(0))),dw=r=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(r),hw=r=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(r),Zf={totalSignups:0,totalSuccess:0,totalCost:0,successRate:0};function yw(r){if(!(r!=null&&r.length))return Zf;const i=r.reduce((d,p)=>d+p.chartData.reduce((m,b)=>m+b.value,0),0),o=r.reduce((d,p)=>d+p.chartData.reduce((m,b)=>m+b.value,0),0),u=r.reduce((d,p)=>d+p.chartData.reduce((m,b)=>m+b.value,0),0)/100,c=i>0?o/i:0;return{totalSignups:i,totalSuccess:o,totalCost:u,successRate:c}}function mw({data:r,isLoading:i=!0}){const o=i?Zf:yw(r);return w.jsxs(Cr,{direction:"row",spacing:3,children:[w.jsx(zn,{label:"Total 1-Click Signups",value:o.totalSignups,initialValue:o.totalSignups,map:Kf}),w.jsx(zn,{label:"Finished 1-Click Signups",value:o.totalSuccess,initialValue:o.totalSuccess,map:Kf}),w.jsx(zn,{label:"Total Cost",value:o.totalCost,initialValue:o.totalCost,map:dw}),w.jsx(zn,{label:"Success Rate",value:o.successRate,initialValue:o.successRate,map:hw})]})}export{eu as $,Sf as A,zn as B,qx as C,Bo as D,Jx as E,_1 as F,Hl as G,Ua as H,iu as I,qr as J,Pa as K,ui as L,fw as M,Tf as N,aw as O,Uf as P,su as Q,ew as R,Vf as S,cu as T,$l as U,Il as V,hu as W,Kr as X,Lt as Y,Af as Z,It as _,Lf as a,jf as a0,Ux as a1,Wf as b,ii as c,ow as d,iw as e,Gf as f,sw as g,lw as h,ai as i,pw as j,mw as k,Kx as l,cw as m,Zx as n,mu as o,gu as p,Ff as q,h1 as r,te as s,lu as t,Df as u,vf as v,wl as w,kf as x,If as y,Ol as z};
21
+ }`;var ae=Kc(function(){return ve(f,z+"return "+M).apply(o,h)});if(ae.source=M,va(ae))throw ae;return ae}function Pg(e){return xe(e).toLowerCase()}function Lg(e){return xe(e).toUpperCase()}function Vg(e,t,n){if(e=xe(e),e&&(n||t===o))return rs(e);if(!e||!(t=dt(t)))return e;var a=Rt(e),s=Rt(t),f=ns(a,s),h=os(a,s)+1;return hr(a,f,h).join("")}function Wg(e,t,n){if(e=xe(e),e&&(n||t===o))return e.slice(0,as(e)+1);if(!e||!(t=dt(t)))return e;var a=Rt(e),s=os(a,Rt(t))+1;return hr(a,0,s).join("")}function zg(e,t,n){if(e=xe(e),e&&(n||t===o))return e.replace(vi,"");if(!e||!(t=dt(t)))return e;var a=Rt(e),s=ns(a,Rt(t));return hr(a,s).join("")}function Gg(e,t){var n=De,a=V;if(Fe(t)){var s="separator"in t?t.separator:s;n="length"in t?ne(t.length):n,a="omission"in t?dt(t.omission):a}e=xe(e);var f=e.length;if(Nr(e)){var h=Rt(e);f=h.length}if(n>=f)return e;var y=n-Rr(a);if(y<1)return a;var v=h?hr(h,0,y).join(""):e.slice(0,y);if(s===o)return v+a;if(h&&(y+=v.length-y),ba(s)){if(e.slice(y).search(s)){var I,A=v;for(s.global||(s=Ri(s.source,xe(ju.exec(s))+"g")),s.lastIndex=0;I=s.exec(A);)var M=I.index;v=v.slice(0,M===o?y:M)}}else if(e.indexOf(dt(s),y)!=y){var D=v.lastIndexOf(s);D>-1&&(v=v.slice(0,D))}return v+a}function Ug(e){return e=xe(e),e&&tp.test(e)?e.replace(xu,bd):e}var Bg=zr(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),wa=Zs("toUpperCase");function qc(e,t,n){return e=xe(e),t=n?o:t,t===o?hd(e)?wd(e):id(e):e.match(t)||[]}var Kc=se(function(e,t){try{return ft(e,o,t)}catch(n){return va(n)?n:new J(n)}}),qg=Qt(function(e,t){return _t(t,function(n){n=Gt(n),Zt(e,n,ma(e[n],e))}),e});function Kg(e){var t=e==null?0:e.length,n=q();return e=t?Ne(e,function(a){if(typeof a[1]!="function")throw new xt(p);return[n(a[0]),a[1]]}):[],se(function(a){for(var s=-1;++s<t;){var f=e[s];if(ft(f[0],this,a))return ft(f[1],this,a)}})}function Zg(e){return bh(Ot(e,T))}function Oa(e){return function(){return e}}function Yg(e,t){return e==null||e!==e?t:e}var Qg=Qs(),Hg=Qs(!0);function ct(e){return e}function ja(e){return ks(typeof e=="function"?e:Ot(e,T))}function Xg(e){return Is(Ot(e,T))}function Jg(e,t){return As(e,Ot(t,T))}var ev=se(function(e,t){return function(n){return bn(n,e,t)}}),tv=se(function(e,t){return function(n){return bn(e,n,t)}});function Sa(e,t,n){var a=Ye(t),s=po(t,a);n==null&&!(Fe(t)&&(s.length||!a.length))&&(n=t,t=e,e=this,s=po(t,Ye(t)));var f=!(Fe(n)&&"chain"in n)||!!n.chain,h=Xt(e);return _t(s,function(y){var v=t[y];e[y]=v,h&&(e.prototype[y]=function(){var I=this.__chain__;if(f||I){var A=e(this.__wrapped__),M=A.__actions__=at(this.__actions__);return M.push({func:v,args:arguments,thisArg:e}),A.__chain__=I,A}return v.apply(e,sr([this.value()],arguments))})}),e}function rv(){return Qe._===this&&(Qe._=Id),this}function ka(){}function nv(e){return e=ne(e),se(function(t){return Cs(t,e)})}var ov=na(Ne),iv=na(Hu),av=na(Ii);function Zc(e){return la(e)?Ai(Gt(e)):Dh(e)}function uv(e){return function(t){return e==null?o:Sr(e,t)}}var sv=Xs(),cv=Xs(!0);function $a(){return[]}function Ia(){return!1}function lv(){return{}}function fv(){return""}function pv(){return!0}function dv(e,t){if(e=ne(e),e<1||e>it)return[];var n=F,a=Je(e,F);t=q(t),e-=F;for(var s=Ei(a,t);++n<e;)t(n);return s}function hv(e){return ee(e)?Ne(e,Gt):ht(e)?[e]:at(hc(xe(e)))}function yv(e){var t=++kd;return xe(e)+t}var mv=bo(function(e,t){return e+t},0),gv=oa("ceil"),vv=bo(function(e,t){return e/t},1),bv=oa("floor");function _v(e){return e&&e.length?fo(e,ct,Gi):o}function xv(e,t){return e&&e.length?fo(e,q(t,2),Gi):o}function wv(e){return es(e,ct)}function Ov(e,t){return es(e,q(t,2))}function jv(e){return e&&e.length?fo(e,ct,Ki):o}function Sv(e,t){return e&&e.length?fo(e,q(t,2),Ki):o}var kv=bo(function(e,t){return e*t},1),$v=oa("round"),Iv=bo(function(e,t){return e-t},0);function Av(e){return e&&e.length?Ti(e,ct):0}function Cv(e,t){return e&&e.length?Ti(e,q(t,2)):0}return l.after=Xy,l.ary=Sc,l.assign=Lm,l.assignIn=Lc,l.assignInWith=Eo,l.assignWith=Vm,l.at=Wm,l.before=kc,l.bind=ma,l.bindAll=qg,l.bindKey=$c,l.castArray=lm,l.chain=wc,l.chunk=b0,l.compact=_0,l.concat=x0,l.cond=Kg,l.conforms=Zg,l.constant=Oa,l.countBy=Ay,l.create=zm,l.curry=Ic,l.curryRight=Ac,l.debounce=Cc,l.defaults=Gm,l.defaultsDeep=Um,l.defer=Jy,l.delay=em,l.difference=w0,l.differenceBy=O0,l.differenceWith=j0,l.drop=S0,l.dropRight=k0,l.dropRightWhile=$0,l.dropWhile=I0,l.fill=A0,l.filter=Ty,l.flatMap=Ny,l.flatMapDeep=Ry,l.flatMapDepth=Dy,l.flatten=vc,l.flattenDeep=C0,l.flattenDepth=T0,l.flip=tm,l.flow=Qg,l.flowRight=Hg,l.fromPairs=E0,l.functions=Hm,l.functionsIn=Xm,l.groupBy=Fy,l.initial=N0,l.intersection=R0,l.intersectionBy=D0,l.intersectionWith=F0,l.invert=eg,l.invertBy=tg,l.invokeMap=Ly,l.iteratee=ja,l.keyBy=Vy,l.keys=Ye,l.keysIn=st,l.map=ko,l.mapKeys=ng,l.mapValues=og,l.matches=Xg,l.matchesProperty=Jg,l.memoize=Io,l.merge=ig,l.mergeWith=Vc,l.method=ev,l.methodOf=tv,l.mixin=Sa,l.negate=Ao,l.nthArg=nv,l.omit=ag,l.omitBy=ug,l.once=rm,l.orderBy=Wy,l.over=ov,l.overArgs=nm,l.overEvery=iv,l.overSome=av,l.partial=ga,l.partialRight=Tc,l.partition=zy,l.pick=sg,l.pickBy=Wc,l.property=Zc,l.propertyOf=uv,l.pull=W0,l.pullAll=_c,l.pullAllBy=z0,l.pullAllWith=G0,l.pullAt=U0,l.range=sv,l.rangeRight=cv,l.rearg=om,l.reject=By,l.remove=B0,l.rest=im,l.reverse=ha,l.sampleSize=Ky,l.set=lg,l.setWith=fg,l.shuffle=Zy,l.slice=q0,l.sortBy=Hy,l.sortedUniq=J0,l.sortedUniqBy=ey,l.split=Ng,l.spread=am,l.tail=ty,l.take=ry,l.takeRight=ny,l.takeRightWhile=oy,l.takeWhile=iy,l.tap=_y,l.throttle=um,l.thru=So,l.toArray=Dc,l.toPairs=zc,l.toPairsIn=Gc,l.toPath=hv,l.toPlainObject=Pc,l.transform=pg,l.unary=sm,l.union=ay,l.unionBy=uy,l.unionWith=sy,l.uniq=cy,l.uniqBy=ly,l.uniqWith=fy,l.unset=dg,l.unzip=ya,l.unzipWith=xc,l.update=hg,l.updateWith=yg,l.values=Br,l.valuesIn=mg,l.without=py,l.words=qc,l.wrap=cm,l.xor=dy,l.xorBy=hy,l.xorWith=yy,l.zip=my,l.zipObject=gy,l.zipObjectDeep=vy,l.zipWith=by,l.entries=zc,l.entriesIn=Gc,l.extend=Lc,l.extendWith=Eo,Sa(l,l),l.add=mv,l.attempt=Kc,l.camelCase=_g,l.capitalize=Uc,l.ceil=gv,l.clamp=gg,l.clone=fm,l.cloneDeep=dm,l.cloneDeepWith=hm,l.cloneWith=pm,l.conformsTo=ym,l.deburr=Bc,l.defaultTo=Yg,l.divide=vv,l.endsWith=xg,l.eq=Ft,l.escape=wg,l.escapeRegExp=Og,l.every=Cy,l.find=Ey,l.findIndex=mc,l.findKey=Bm,l.findLast=My,l.findLastIndex=gc,l.findLastKey=qm,l.floor=bv,l.forEach=Oc,l.forEachRight=jc,l.forIn=Km,l.forInRight=Zm,l.forOwn=Ym,l.forOwnRight=Qm,l.get=_a,l.gt=mm,l.gte=gm,l.has=Jm,l.hasIn=xa,l.head=bc,l.identity=ct,l.includes=Py,l.indexOf=M0,l.inRange=vg,l.invoke=rg,l.isArguments=Ir,l.isArray=ee,l.isArrayBuffer=vm,l.isArrayLike=ut,l.isArrayLikeObject=We,l.isBoolean=bm,l.isBuffer=yr,l.isDate=_m,l.isElement=xm,l.isEmpty=wm,l.isEqual=Om,l.isEqualWith=jm,l.isError=va,l.isFinite=Sm,l.isFunction=Xt,l.isInteger=Ec,l.isLength=Co,l.isMap=Mc,l.isMatch=km,l.isMatchWith=$m,l.isNaN=Im,l.isNative=Am,l.isNil=Tm,l.isNull=Cm,l.isNumber=Nc,l.isObject=Fe,l.isObjectLike=Pe,l.isPlainObject=Sn,l.isRegExp=ba,l.isSafeInteger=Em,l.isSet=Rc,l.isString=To,l.isSymbol=ht,l.isTypedArray=Ur,l.isUndefined=Mm,l.isWeakMap=Nm,l.isWeakSet=Rm,l.join=P0,l.kebabCase=jg,l.last=St,l.lastIndexOf=L0,l.lowerCase=Sg,l.lowerFirst=kg,l.lt=Dm,l.lte=Fm,l.max=_v,l.maxBy=xv,l.mean=wv,l.meanBy=Ov,l.min=jv,l.minBy=Sv,l.stubArray=$a,l.stubFalse=Ia,l.stubObject=lv,l.stubString=fv,l.stubTrue=pv,l.multiply=kv,l.nth=V0,l.noConflict=rv,l.noop=ka,l.now=$o,l.pad=$g,l.padEnd=Ig,l.padStart=Ag,l.parseInt=Cg,l.random=bg,l.reduce=Gy,l.reduceRight=Uy,l.repeat=Tg,l.replace=Eg,l.result=cg,l.round=$v,l.runInContext=g,l.sample=qy,l.size=Yy,l.snakeCase=Mg,l.some=Qy,l.sortedIndex=K0,l.sortedIndexBy=Z0,l.sortedIndexOf=Y0,l.sortedLastIndex=Q0,l.sortedLastIndexBy=H0,l.sortedLastIndexOf=X0,l.startCase=Rg,l.startsWith=Dg,l.subtract=Iv,l.sum=Av,l.sumBy=Cv,l.template=Fg,l.times=dv,l.toFinite=Jt,l.toInteger=ne,l.toLength=Fc,l.toLower=Pg,l.toNumber=kt,l.toSafeInteger=Pm,l.toString=xe,l.toUpper=Lg,l.trim=Vg,l.trimEnd=Wg,l.trimStart=zg,l.truncate=Gg,l.unescape=Ug,l.uniqueId=yv,l.upperCase=Bg,l.upperFirst=wa,l.each=Oc,l.eachRight=jc,l.first=bc,Sa(l,function(){var e={};return Wt(l,function(t,n){Se.call(l.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),l.VERSION=u,_t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){l[e].placeholder=l}),_t(["drop","take"],function(e,t){de.prototype[e]=function(n){n=n===o?1:Ze(ne(n),0);var a=this.__filtered__&&!t?new de(this):this.clone();return a.__filtered__?a.__takeCount__=Je(n,a.__takeCount__):a.__views__.push({size:Je(n,F),type:e+(a.__dir__<0?"Right":"")}),a},de.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),_t(["filter","map","takeWhile"],function(e,t){var n=t+1,a=n==Te||n==ke;de.prototype[e]=function(s){var f=this.clone();return f.__iteratees__.push({iteratee:q(s,3),type:n}),f.__filtered__=f.__filtered__||a,f}}),_t(["head","last"],function(e,t){var n="take"+(t?"Right":"");de.prototype[e]=function(){return this[n](1).value()[0]}}),_t(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");de.prototype[e]=function(){return this.__filtered__?new de(this):this[n](1)}}),de.prototype.compact=function(){return this.filter(ct)},de.prototype.find=function(e){return this.filter(e).head()},de.prototype.findLast=function(e){return this.reverse().find(e)},de.prototype.invokeMap=se(function(e,t){return typeof e=="function"?new de(this):this.map(function(n){return bn(n,e,t)})}),de.prototype.reject=function(e){return this.filter(Ao(q(e)))},de.prototype.slice=function(e,t){e=ne(e);var n=this;return n.__filtered__&&(e>0||t<0)?new de(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(t=ne(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},de.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},de.prototype.toArray=function(){return this.take(F)},Wt(de.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),s=l[a?"take"+(t=="last"?"Right":""):t],f=a||/^find/.test(t);s&&(l.prototype[t]=function(){var h=this.__wrapped__,y=a?[1]:arguments,v=h instanceof de,I=y[0],A=v||ee(h),M=function(pe){var he=s.apply(l,sr([pe],y));return a&&D?he[0]:he};A&&n&&typeof I=="function"&&I.length!=1&&(v=A=!1);var D=this.__chain__,z=!!this.__actions__.length,K=f&&!D,ae=v&&!z;if(!f&&A){h=ae?h:new de(this);var Z=e.apply(h,y);return Z.__actions__.push({func:So,args:[M],thisArg:o}),new wt(Z,D)}return K&&ae?e.apply(this,y):(Z=this.thru(M),K?a?Z.value()[0]:Z.value():Z)})}),_t(["pop","push","shift","sort","splice","unshift"],function(e){var t=Qn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);l.prototype[e]=function(){var s=arguments;if(a&&!this.__chain__){var f=this.value();return t.apply(ee(f)?f:[],s)}return this[n](function(h){return t.apply(ee(h)?h:[],s)})}}),Wt(de.prototype,function(e,t){var n=l[t];if(n){var a=n.name+"";Se.call(Lr,a)||(Lr[a]=[]),Lr[a].push({name:t,func:n})}}),Lr[vo(o,P).name]=[{name:"wrapper",func:o}],de.prototype.clone=Ud,de.prototype.reverse=Bd,de.prototype.value=qd,l.prototype.at=xy,l.prototype.chain=wy,l.prototype.commit=Oy,l.prototype.next=jy,l.prototype.plant=ky,l.prototype.reverse=$y,l.prototype.toJSON=l.prototype.valueOf=l.prototype.value=Iy,l.prototype.first=l.prototype.head,pn&&(l.prototype[pn]=Sy),l},Dr=Od();_r?((_r.exports=Dr)._=Dr,ji._=Dr):Qe._=Dr}).call(qr)}(oi,oi.exports);var Wx=oi.exports;const Tf=Pa(Wx);function hu({value:r,children:i}){return r?typeof i=="function"?w.jsx(w.Fragment,{children:i(r)}):w.jsx(w.Fragment,{children:i}):null}const Ef={},Vn={};function Wn(r,i){try{const o=(Ef[r]||(Ef[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(i).split("GMT")[1]||"";return o in Vn?Vn[o]:Mf(o,o.split(":"))}catch{if(r in Vn)return Vn[r];const o=r?.match(zx);return o?Mf(r,o.slice(1)):NaN}}const zx=/([+-]\d\d):?(\d\d)?/;function Mf(r,i){const o=+i[0],u=+(i[1]||0);return Vn[r]=o>0?o*60+u:o*60-u}class ar extends Date{constructor(...i){super(),i.length>1&&typeof i[i.length-1]=="string"&&(this.timeZone=i.pop()),this.internal=new Date,isNaN(Wn(this.timeZone,this))?this.setTime(NaN):i.length?typeof i[0]=="number"&&(i.length===1||i.length===2&&typeof i[1]!="number")?this.setTime(i[0]):typeof i[0]=="string"?this.setTime(+new Date(i[0])):i[0]instanceof Date?this.setTime(+i[0]):(this.setTime(+new Date(...i)),Rf(this),yu(this)):this.setTime(Date.now())}static tz(i,...o){return o.length?new ar(...o,i):new ar(Date.now(),i)}withTimeZone(i){return new ar(+this,i)}getTimezoneOffset(){return-Wn(this.timeZone,this)}setTime(i){return Date.prototype.setTime.apply(this,arguments),yu(this),+this}[Symbol.for("constructDateFrom")](i){return new ar(+new Date(i),this.timeZone)}}const Nf=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!Nf.test(r))return;const i=r.replace(Nf,"$1UTC");ar.prototype[i]&&(r.startsWith("get")?ar.prototype[r]=function(){return this.internal[i]()}:(ar.prototype[r]=function(){return Date.prototype[i].apply(this.internal,arguments),Gx(this),+this},ar.prototype[i]=function(){return Date.prototype[i].apply(this,arguments),yu(this),+this}))});function yu(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function Gx(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),Rf(r)}function Rf(r){const i=Wn(r.timeZone,r),o=new Date(+r);o.setUTCHours(o.getUTCHours()-1);const u=-new Date(+r).getTimezoneOffset(),c=-new Date(+o).getTimezoneOffset(),d=u-c,p=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();d&&p&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+d);const m=u-i;m&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m);const b=Wn(r.timeZone,r),_=-new Date(+r).getTimezoneOffset()-b,$=b!==i,T=_-m;if($&&T){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+T);const j=Wn(r.timeZone,r),N=b-j;N&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+N),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N))}}const Ux=r=>{let i=new Date(Number(r));if(!r){const d=new Date;i=new Date(d.getFullYear(),d.getMonth(),d.getDate())}const o=String(i.getDate()).padStart(2,"0"),u=String(i.getMonth()+1).padStart(2,"0"),c=i.getFullYear();return[u,o,c].join("/")},Bx=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",...i});function Df(){return{enqueueSnackbar:(r,i="success",o)=>{o1(r,{severity:i,variant:"customAlertComponent",persist:!0,...o})},closeSnackbar:ul}}const qx=Bv(({id:r,message:i,severity:o,alertAction:u,sx:c,showCloseIcon:d=!0,persist:p,hideIconVariant:m,autoHideDuration:b,anchorOrigin:_,iconVariant:$,...T},j)=>w.jsx(n1,{ref:j,...T,children:w.jsx(Tv,{severity:o,action:w.jsxs(Ar,{ml:1,children:[w.jsx(hu,{value:u,children:w.jsx(Qc,{size:"small",onClick:()=>{var N;return r&&((N=u?.onAction)==null?void 0:N.call(u,r))},color:"inherit",children:u?.icon})}),w.jsx(hu,{value:!u&&d,children:w.jsx(Qc,{size:"small",onClick:()=>{ul(r)},color:"inherit",children:w.jsx(r1,{})})})]}),sx:{alignItems:"center",width:"320px",...c},children:i})})),Kx=r=>{let i=new Date(Number(r));if(!r){const d=new Date;i=new Date(d.getFullYear(),d.getMonth(),d.getDate())}const o=String(i.getDate()).padStart(2,"0"),u=String(i.getMonth()+1).padStart(2,"0"),c=i.getFullYear();return[u,o,c].join("/")},Zx=r=>{const i=new Date(r);return i.setUTCHours(12),String(+i)},mu=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{month:"short",day:"numeric",hour12:!1,...i}),gu=(r,i)=>new Date(Number(r)).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",...i}),Ff=r=>{var i;const o=((i=r.replace(/-/g,"").match(/.{1,2}/g))==null?void 0:i.map(m=>parseInt(m,16)))??[],u=o.reduce((m,b)=>(m+b)%256,0),c=o.slice(1).reduce((m,b)=>(m+b)%256,0),d=o.slice(2).reduce((m,b)=>(m+b)%256,0),p=m=>m.toString(16).padStart(2,"0");return console.log(`#${p(u)}${p(c)}${p(d)}`),`#${p(u)}${p(c)}${p(d)}`},Pf=Vx({createStyledComponent:kf("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(r,i)=>i.root}),componentName:"MuiGrid2",useThemeProps:r=>If({props:r,name:"MuiGrid2"})});function Yx({entry:r,payload:i,showUuid:o=!0}){const u=Na(j=>{var N,E,C;return(C=(E=(N=j.payload)==null?void 0:N.data)==null?void 0:E.reduce)==null?void 0:C.call(E,(O,P)=>O+P.value,0)},[]),c=Na(j=>{const N=new Da(u(j)||0),E=i?.reduce((P,G)=>P+u(G),0)||0,C=new Da(E),O=Number(N.div(C).times(100).toFixed(2,Da.ROUND_DOWN));return isNaN(O)||!isFinite(O)?0:O},[u,i]),d=Ra(()=>u(r),[r,u]),p=Fa(d),m=Ra(()=>Number(c(r)),[r,c]),b=Fa(m),_=Na(j=>Math.floor(j).toLocaleString(),[]),$=Yv({type:"text/plain"}),T=Df();return w.jsxs(Qv,{component:"li",direction:"row",spacing:1,sx:{color:r.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[w.jsx(Ar,{sx:{width:"3px",height:"100%",backgroundColor:r.color,borderRadius:3}}),w.jsxs(Cr,{children:[w.jsxs(tr,{component:"p",variant:"caption",children:[w.jsx(Cr,{component:"span",display:"inline-flex",mr:.5,children:w.jsx(ol,{from:p??0,to:d,map:_,children:"0"})}),w.jsxs(Cr,{component:"span",direction:"row",display:"inline-flex",children:["(",w.jsx(ol,{from:b??0,to:m,map:_,children:"0"}),"%)"]})]}),w.jsx(tr,{variant:"body1",children:r.value}),r.payload.integrationType&&w.jsx(tr,{variant:"body2",children:r.payload.integrationType}),o&&r.payload.uuid&&w.jsxs(tr,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{$.copy(r.payload.uuid).catch(()=>{}),T.enqueueSnackbar("UUID copied to clipboard","success")},children:[r.payload.uuid.slice(0,5),"..."]})]})]})}function Lf(r){const{payload:i}=r;return w.jsx(Pf,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:w.jsx(Zv,{children:i?.map(o=>w.jsx(Pf,{children:w.jsx(Yx,{entry:o,payload:i,showUuid:r.showUuid})},`item-${o.value}`))})})}function Vf(r){const i=rr();return w.jsx(Ar,{sx:{width:"100%",height:"100%",...r.sx},children:w.jsx(Mo,{children:w.jsxs(Dv,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[w.jsx(Aa,{vertical:!1}),w.jsx(Ca,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>mu(o,{timeZone:r.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),w.jsx(Ta,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:o=>Number(o).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:r.label&&w.jsx(Ea,{value:r.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),w.jsx(Ma,{cursor:{stroke:i.palette.neutral.main,strokeWidth:1},formatter:o=>Number(o).toLocaleString(),labelFormatter:o=>gu(o,{timeZone:r.filter.timezone,hour12:!1})}),w.jsx(Jc,{content:w.jsx(Lf,{showUuid:r.showUuid})}),r.data.map(o=>qv(Fv,{uuid:o.uuid,integrationType:o.integrationType,key:o.uuid,name:o.name,dataKey:"value",data:o.chartData,type:"monotone",stroke:o.color,strokeWidth:2}))]})})})}const Qx=(r,i)=>{const o=new Map;return r.forEach(u=>{u.chartData.forEach(c=>{const d=new Date(c.date).getTime().toString();if(!o.has(d)){const p={date:d,total:0,diff:0,totalKey:"",originalTotal:0};i.forEach(({key:m})=>{p[m]=0,p[`${m}_absolute`]=0}),o.set(d,p)}i.forEach(({key:p})=>{const m=o.get(d),b=c[p],_=typeof b=="string"?b.trim()===""?0:parseInt(b,10):typeof b=="number"?b:0;m[`${p}_absolute`]=_,m[p]=0})})}),Array.from(o.values()).map(u=>{var c;const d=(c=i.find(b=>b.isTotal))==null?void 0:c.key,p=i.filter(b=>!b.isTotal).map(b=>b.key);if(!d||p.length===0)return u;const m=u[`${d}_absolute`];return u.originalTotal=m,u.total=m,u[d]=100,p.forEach(b=>{const _=u[`${b}_absolute`],$=m>0?new Ro(_.toString()).div(m).mul(100).toFixed(2,Ro.ROUND_DOWN):"0.00";u[b]=parseFloat($)}),{...u,totalKey:d}}).sort((u,c)=>parseInt(u.date)-parseInt(c.date))};function Wf(r){const i=rr(),o=Ra(()=>r.data?Qx(r.data,r.keyValues):[],[r.data,r.keyValues]);return w.jsx(Ar,{sx:{width:"100%",height:"100%",...r.sx},children:w.jsx(Mo,{width:"100%",height:"100%",children:w.jsxs(Pv,{data:o,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[w.jsx(Aa,{strokeDasharray:"3 3"}),w.jsx(Ca,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:u=>mu(u,{timeZone:r.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),w.jsx(Ta,{textAnchor:"end",tickLine:!1,tickFormatter:u=>`${u.toFixed(2)}%`}),w.jsx(Ma,{cursor:{stroke:i.palette.neutral.main,strokeWidth:1},labelFormatter:u=>gu(u,{timeZone:r.filter.timezone,hour12:!1}),formatter:(u,c,d)=>{const p=d.payload.totalKey,m=d.dataKey,b=m===p,_=d.payload[`${m}_absolute`],$=d.payload.originalTotal,T=b?null:$===0?"0.00":new Ro(_.toString()).div($).mul(100).toFixed(2,Ro.ROUND_DOWN);return[T?`${_.toLocaleString()} (${T}%)`:`${_.toLocaleString()} (TOTAL)`,c]}}),r.keyValues.sort((u,c)=>u.isTotal?-1:c.isTotal?1:0).map(u=>w.jsx(Lv,{type:"monotone",dataKey:u.key,name:u.name,stroke:u.color,fill:u.color,strokeWidth:2,fillOpacity:.6},u.key))]})})})}function zn(r){const i=Fa(r.value),{ref:o}=i1({from:i??0,to:r.value,duration:1,map:r.map});return w.jsx(Hc,{sx:{p:3,flex:1,...r.sx},children:w.jsxs(Cr,{spacing:1,alignItems:"center",children:[w.jsx(tr,{ref:o,variant:"h4",fontWeight:"bold",children:r.initialValue}),w.jsx(tr,{color:"text.secondary",children:r.label})]})})}const zf={margin:{top:5,right:30,left:20,bottom:5}},Hx={tickLine:!1,fontSize:12,tickMargin:12},Xx={textAnchor:"end",tickLine:!1};function ii({data:r,series:i,xAxis:o,yAxis:u,tooltip:c,bar:d,referenceLines:p,referenceAreas:m,sx:b}){const _=rr(),$=j=>!j.isFront,T=j=>!!j.isFront;return w.jsx(Ar,{sx:{width:"100%",height:"100%",...b},children:w.jsx(Mo,{children:w.jsxs(Vv,{data:r,...zf,children:[w.jsx(Aa,{strokeDasharray:"3 3",vertical:!1}),w.jsx(Ca,{...Hx,...o}),w.jsx(Ta,{...Xx,...u}),w.jsx(Ma,{cursor:{stroke:_.palette.neutral.main,strokeWidth:1},...c}),p?.filter($).map((j,N)=>w.jsx(el,{...j},j.label??N)),m?.filter($).map((j,N)=>w.jsx(tl,{...j},j.label??N)),i.map(j=>w.jsx(Wv,{name:j.key,dataKey:j.dataKey,fill:j.color,stackId:"stack",isAnimationActive:!1,...d},j.key)),p?.filter(T).map((j,N)=>w.jsx(el,{...j},j.label??N)),m?.filter(T).map((j,N)=>w.jsx(tl,{...j},j.label??N))]})})})}function Jx({data:r,threshold:i=100,sx:o}){const u=rr(),c=Object.entries(r??{}).map(([p,m])=>({key:p,[p]:m})),d=c.map(({key:p})=>({key:p,dataKey:p,color:u.palette.error.light}));return w.jsx(ii,{sx:o,data:c,series:d,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${i}`]},tooltip:{labelFormatter:p=>"Total"},referenceLines:[{y:i,stroke:u.palette.error.dark,strokeDasharray:"3 3",label:w.jsx(Ea,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function ew({data:r,threshold:i=100,sx:o}){const u=rr(),c=Object.entries(r??{}).map(([p,m])=>({key:p,[p]:m})),d=c.map(({key:p})=>({key:p,dataKey:p,color:u.palette.warning.light}));return w.jsx(ii,{sx:o,data:c,series:d,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${i}`]},tooltip:{labelFormatter:p=>"Total"},referenceLines:[{y:i,stroke:u.palette.error.dark,strokeDasharray:"3 3",label:w.jsx(Ea,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function Gf({payload:r=[],hiddenItems:i,onToggle:o,legendLabel:u}){return w.jsx(Ar,{sx:{display:"flex",justifyContent:"center",gap:"20px",paddingTop:"20px"},children:r.map((c,d)=>{const p=i.has(c.payload.name);return w.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",opacity:p?.4:1},onClick:()=>{o?.(c.payload)},children:[w.jsx("div",{style:{width:"12px",height:"12px",backgroundColor:c.color,marginRight:"8px",borderRadius:"2px"}}),w.jsx("span",{style:{color:c.color},children:u?`${u}: ${c.value}`:c.value})]},`legend-${d}`)})})}const tw=r=>{const i=Math.PI/180,{cx:o,cy:u,midAngle:c,innerRadius:d,outerRadius:p,startAngle:m,endAngle:b,fill:_,payload:$,percent:T,value:j,valueText:N,valuePercentage:E,needleVisible:C,customText:O,allActive:P}=r,G=Math.sin(-i*c),W=Math.cos(-i*c),fe=o+(p+5)*W,S=u+(p+5)*G,B=o+(p+15)*W,U=u+(p+15)*G,me=B+(W>=0?1:-1)*22,Me=U,De=W>=0?"start":"end",V=j.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),Y=()=>C||P?null:w.jsx("text",{x:o,y:u,dy:8,textAnchor:"middle",fill:"#333",fontSize:14,children:$.name});return w.jsxs("g",{children:[Y(),w.jsx(rl,{cx:o,cy:u,innerRadius:d,outerRadius:p,startAngle:m,endAngle:b,fill:_}),w.jsx(rl,{cx:o,cy:u,startAngle:m,endAngle:b,innerRadius:p+2,outerRadius:p+6,fill:_}),w.jsx("path",{d:`M${fe},${S}L${B},${U}L${me},${Me}`,stroke:_,fill:"none"}),w.jsx("circle",{cx:me,cy:Me,r:2,fill:_,stroke:"none"}),w.jsx("text",{x:me+(W>=0?1:-1)*12,y:Me,textAnchor:De,fill:"#333",fontSize:12,children:O||(N?`${N} ${V}`:V)}),E&&w.jsxs("text",{x:me+(W>=0?1:-1)*12,y:Me,dy:16,textAnchor:De,fill:"#999",fontSize:11,children:[`${(T*100).toFixed(2)}%`," (",V,")"]})]})},rw=r=>{const{value:i,data:o,color:u,innerRadius:c,outerRadius:d,boxDimensions:p,legendDimensions:m,valueText:b}=r,_=Math.PI/180;let $=0;o.forEach(Y=>{$+=Y.value});const T=p?p.width/2:150,j=(p?p.height/2:200)-m.height/2,N=180*(1-Math.max(0,Math.min(1,i/$))),E=(Number(c)+2*Number(d))/3,C=Math.sin(-_*N),O=Math.cos(-_*N),P=5,G=T-P,W=j,fe=G+P*C,S=W-P*O,B=G-P*C,U=W+P*O,me=G+E*O,Me=W+E*C,De=i.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),V=b??De;return w.jsxs(w.Fragment,{children:[w.jsx("circle",{cx:G,cy:W,r:P,fill:u,stroke:"none",style:{pointerEvents:"none"}},"needle-circle"),w.jsx("path",{d:`M${fe} ${S}L${B} ${U} L${me} ${Me} L${fe} ${S}`,stroke:"none",fill:u,style:{pointerEvents:"none"}},"needle-path"),w.jsx("text",{x:G+P,y:W+26,textAnchor:"middle",fill:"#333",fontSize:12,children:V},"needle-value")]})},nw=(r,i)=>({Allow:i.palette.success.main,Flag:i.palette.warning.main,Block:i.palette.error.main})[r]??i.palette.primary.main;function Uf({data:r,sx:i,legendLabel:o,legendToggle:u=!1,valueText:c="",valuePercentage:d=!0,pie:p,needleVisible:m=!1,needleValue:b,needleColor:_="#aaa",allActive:$=!1}){const{innerRadius:T=60,outerRadius:j=100}=p??{},N=rr(),[E,C]=No(void 0),[O,P]=No(new Set),G=Kv(null),[W,fe]=No(null),[S,B]=No(null),U=(V,Y)=>{$||C(Y)},me=()=>{$||C(void 0)},Me=V=>{u&&V&&P(Y=>{const ge=new Set(Y);return ge.has(V.name)?ge.delete(V.name):ge.size<r.length-1&&ge.add(V.name),ge})},De=r.map((V,Y)=>({...V,index:Y,value:O.has(V.name)?0:V.value}));return nl(()=>{const V=G.current;if(!V)return;const Y=new ResizeObserver(Te=>{var qe;const ke=(qe=Te[0])==null?void 0:qe.contentRect;ke&&fe(ke)});Y.observe(V);const ge=V.getBoundingClientRect();return fe(ge),()=>{Y.disconnect()}},[]),nl(()=>{var V;const Y=(V=G.current)==null?void 0:V.querySelector(".recharts-legend-wrapper");if(!Y){const qe=setInterval(()=>{var ke;const Ae=(ke=G.current)==null?void 0:ke.querySelector(".recharts-legend-wrapper");if(Ae){const it=Ae.getBoundingClientRect();B(it),clearInterval(qe)}},100);return()=>{clearInterval(qe)}}const ge=new ResizeObserver(qe=>{var ke;const Ae=(ke=qe[0])==null?void 0:ke.contentRect;Ae&&B(Ae)});ge.observe(Y);const Te=Y.getBoundingClientRect();return B(Te),()=>{ge.disconnect()}},[]),w.jsx(Ar,{ref:G,sx:{width:"100%",height:"100%","& g":{outline:"none"},...i},children:w.jsx(Mo,{children:w.jsxs(zv,{...zf,children:[w.jsx(Gv,{data:De,nameKey:"name",dataKey:"value",innerRadius:T,outerRadius:j,activeIndex:$?De.filter(V=>V.value>0).map(V=>V.index):E,activeShape:V=>tw({...V,valueText:c,valuePercentage:d,needleVisible:m,allActive:$}),paddingAngle:0,onMouseEnter:U,onMouseLeave:me,...p,children:De.map(V=>w.jsx(Uv,{fill:V.color??nw(V.name,N),opacity:O.has(V.name)?.5:1,stroke:"none"},V.name))}),w.jsx(Jc,{content:w.jsx(Gf,{legendLabel:o,hiddenItems:O,onToggle:Me})}),m&&b!==void 0&&W&&S&&rw({data:De,value:b,color:_,innerRadius:T,outerRadius:j,boxDimensions:W,legendDimensions:S,valueText:c})]})})})}function ow({sx:r,data:i,score:o=200,legendLabel:u}){const c=rr(),d=[{name:"Allow",customText:"0-299",value:i[0].value,color:c.palette.primary.main},{name:"Flag",customText:"300-599",value:i[1].value,color:c.palette.warning.main},{name:"Block",customText:"Over 600",value:i[2].value,color:c.palette.error.main}];return w.jsx(Uf,{data:d,legendToggle:!0,needleValue:o,legendLabel:u,allActive:!0,sx:r})}function iw({data:r,sx:i}){const o=rr(),u=(d=>{const p={};return d.forEach(m=>{Object.entries(m).forEach(([b,_])=>{const $=parseInt(b);$<=1e3&&(p[$]=(p[$]||0)+_)})}),Array.from({length:1001},(m,b)=>({key:b.toString(),value:p[b]||0}))})(r),c=[{key:"Risk Score",dataKey:"value",color:o.palette.error.main}];return w.jsx(ii,{data:u,series:c,sx:i,yAxis:{label:{value:"Count",angle:-90,position:"insideLeft"},domain:[0,"dataMax + 10"]},xAxis:{domain:[0,"dataMax"],interval:"preserveStartEnd"},tooltip:{labelFormatter:()=>"Risk Score",formatter:(d,p,m)=>[d,m.payload.key]},referenceAreas:[{x1:0,x2:299,fill:"#ffffff00",isFront:!1,label:"Allow"},{x1:300,x2:600,fill:o.palette.warning.light,isFront:!1,label:"Flag"},{x1:600,fill:o.palette.error.light,isFront:!1,label:"Block"}]})}const vu=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});function Bf(r){return w.jsx(tr,{variant:"h6",fontWeight:"900",...r})}function qf(r){return w.jsx(tr,{variant:"h6",fontWeight:"400",...r})}function ai(){const r=vu();return w.jsxs(Cr,{sx:r.smallChartWrapper,children:[w.jsx(Bf,{children:"No data available for the selected period and brands"}),w.jsx(qf,{children:"Please select a different period or brand"})]})}function ui(){const r=vu();return w.jsxs(Cr,{sx:r.smallChartWrapper,children:[w.jsx(Bf,{children:"Loading..."}),w.jsx(qf,{children:"Preparing your chart data"})]})}function aw({data:r,isLoading:i,isFetching:o,isSuccess:u,filter:c,sx:d}){var p,m;const b=rr(),_=vu(),$={oneClickCreated:{key:"oneClickCreated",name:"Started",color:b.palette.neutral.main,isTotal:!0},oneClickSuccess:{key:"oneClickSuccess",name:"Finished",color:b.palette.primary.main}};return i?w.jsx(ui,{}):!r.length||!((m=(p=r[0])==null?void 0:p.chartData)!=null&&m.length)||!u?w.jsx(ai,{}):w.jsx(Wf,{data:r,keyValues:Object.values($),filter:c,sx:{..._.smallChartWrapper,opacity:o?.4:1,...d}})}const uw={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function sw({data:r,isLoading:i,isFetching:o,isSuccess:u,filter:c}){return i?w.jsx(ui,{}):!r.length||!u?w.jsx(ai,{}):w.jsx(Vf,{label:"Uniques",data:r,filter:c,sx:{...uw.chartWrapper,opacity:o?.4:1}})}function cw(r){const{brands:i,data:o,keyValue:u,defaultColor:c}=r,d=i.flatMap(({_raw:p})=>{var m,b;const _=o?.find(T=>T.brandUuid===p.brandUuid),$=(_?.interval??[]).map(T=>({date:+new Date(T.date),value:Number(T[u]||0)})).filter(T=>T.value>0);return{uuid:p.brandUuid,name:p.brandName,integrationType:al(p.integrationType),color:p.integrationType==="hosted"&&(m=p.additionalData)!=null&&m.primaryColor?(b=p.additionalData)==null?void 0:b.primaryColor:c??Ff(p.brandUuid),chartData:$}});return Tf.chain(d).sortBy(p=>p.name).toArray().value()}const lw=({data:r,brands:i})=>r.flatMap(o=>{const u=i.find(c=>c.brandUuid===o.brandUuid);return!u||!o.interval?[]:o.interval.map(c=>({month:new Date(c.date).toISOString(),brand:u.brandName,integrationType:al(u.integrationType),total:c.oneClickCreated,finished:c.oneClickSuccess,totalCost:c.totalCost}))}),fw=({data:r,isLoading:i,showTotalCost:o=!0})=>i?w.jsx(ui,{}):r!=null&&r.length?w.jsx(Ev,{component:Hc,children:w.jsxs(Mv,{children:[w.jsx(Nv,{children:w.jsxs(Xc,{children:[w.jsx($t,{children:"Month"}),w.jsx($t,{children:"Brand"}),w.jsx($t,{children:"Integration Type"}),w.jsx($t,{align:"right",children:"Started"}),w.jsx($t,{align:"right",children:"Finished"}),o&&w.jsx($t,{align:"right",children:"Total Cost"})]})}),w.jsx(Rv,{children:r.map(u=>w.jsxs(Xc,{children:[w.jsx($t,{children:new Date(u.month).toLocaleDateString(void 0,{month:"short",year:"numeric",timeZone:"UTC"})}),w.jsx($t,{children:u.brand}),w.jsx($t,{children:u.integrationType}),w.jsx($t,{align:"right",children:u.total}),w.jsx($t,{align:"right",children:u.finished}),o&&w.jsx($t,{align:"right",children:u.totalCost??"-"})]},`${u.brand}-${u.month}`))})]})}):w.jsx(ai,{});function pw({lastUpdated:r}){return w.jsxs(tr,{variant:"caption",color:"text.secondary",fontWeight:"600",children:["The data was last updated on"," ",Bx(r??Date.now(),{hour12:!1}),"."]})}const Kf=r=>new Intl.NumberFormat("en-US").format(Number(r.toFixed(0))),dw=r=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(r),hw=r=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(r),Zf={totalSignups:0,totalSuccess:0,totalCost:0,successRate:0};function yw(r,i){if(!(r!=null&&r.length)&&!(i!=null&&i.length))return Zf;const o=r?.reduce((p,m)=>p+m.chartData.reduce((b,_)=>b+_.value,0),0)??0,u=i?.reduce((p,m)=>p+m.chartData.reduce((b,_)=>b+_.value,0),0)??0,c=o>0?u/o:0,d=o/100;return{totalSignups:o,totalSuccess:u,totalCost:d,successRate:c}}function mw({oneClickCreated:r,oneClickSuccess:i,isLoading:o=!0}){const u=o?Zf:yw(r,i);return w.jsxs(Cr,{direction:"row",spacing:3,children:[w.jsx(zn,{label:"Total 1-Click Signups",value:u.totalSignups,initialValue:u.totalSignups,map:Kf}),w.jsx(zn,{label:"Finished 1-Click Signups",value:u.totalSuccess,initialValue:u.totalSuccess,map:Kf}),w.jsx(zn,{label:"Total Cost",value:u.totalCost,initialValue:u.totalCost,map:dw}),w.jsx(zn,{label:"Success Rate",value:u.successRate,initialValue:u.successRate,map:hw})]})}export{eu as $,Sf as A,zn as B,qx as C,Bo as D,Jx as E,_1 as F,Hl as G,Ua as H,iu as I,qr as J,Pa as K,ui as L,fw as M,Tf as N,aw as O,Uf as P,su as Q,ew as R,Vf as S,cu as T,$l as U,Il as V,hu as W,Kr as X,Lt as Y,Af as Z,It as _,Lf as a,jf as a0,Ux as a1,Wf as b,ii as c,ow as d,iw as e,Gf as f,sw as g,lw as h,ai as i,pw as j,mw as k,Kx as l,cw as m,Zx as n,mu as o,gu as p,Ff as q,h1 as r,te as s,lu as t,Df as u,vf as v,wl as w,kf as x,If as y,Ol as z};
@@ -1,4 +1,4 @@
1
- "use strict";var xd=Object.defineProperty,wd=(e,n,r)=>n in e?xd(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,B=(e,n,r)=>wd(e,typeof n!="symbol"?n+"":n,r);import{j as u}from"./jsx-runtime-DHlBLioN.mjs";import*as w from"react";import A,{Children as kd,isValidElement as Ir,cloneElement as wn,forwardRef as Dt,createContext as rr,useEffect as Ie,useContext as ar,useMemo as be,useState as Ee,useRef as We,useCallback as Gt,useLayoutEffect as $i,useImperativeHandle as Cd,createElement as _d,Component as Fe,createRef as Bt,useReducer as Md,Fragment as qi,memo as or}from"react";import{Typography as Qe,Box as Y,Tooltip as Td,IconButton as kn,Stack as ue,Autocomplete as ir,TextField as Ne,Radio as Sd,Chip as Ad,RadioGroup as to,Dialog as Dd,DialogTitle as Ed,DialogContent as jd,DialogActions as Pd,useTheme as Cn,Paper as Hi,Accordion as Ui,AccordionSummary as Zi,AccordionDetails as Ki,Link as Od,Alert as Nd,InputAdornment as Fr,Button as Qi,Menu as Xi,MenuItem as no,FormControl as Ji,InputBase as Rd,Popper as zd,FormHelperText as Id,Skeleton as Fd,Checkbox as Ld,AlertTitle as Gd,Backdrop as Bd,CircularProgress as Wd}from"@mui/material";import{useForm as es,FormProvider as ts,useController as en,useFormContext as Lr,useFieldArray as Vd,appendErrors as Yd}from"react-hook-form";import{r as _n,_ as U,s as M,t as ns,G as $d,v as ye,w as W,x as $,y as _e,z as Me,A as ft,D as Z,F as Wt,H as qd,I as Hd,J as Gr,K as Br,N as xe,Q as rs,T as as,U as os,V as is,X as ss,Y as ro,Z as ao,a0 as Ud,a1 as Zd,u as Kd}from"./SignupBigNumbers-DPHhNS_D.mjs";import{Code as Qd,Delete as Xd,ChevronLeft as ls,Menu as Jd,CheckCircle as ep,Close as oo,Add as cs,KeyboardArrowDown as us,ExpandMore as tp,Image as np}from"@mui/icons-material";import{useDrag as rp,useDrop as ap,DndProvider as op}from"react-dnd";import{HTML5Backend as ip}from"react-dnd-html5-backend";import{masks as ds}from"../utils/masks/index.mjs";import ps from"@mona-health/react-input-mask";import{a as sp}from"./useCopyToClipboard-_Ur9Q8Gv.mjs";import{p as lp}from"./phone.schema-XBbyizhq.mjs";import{IMaskInput as hs}from"react-imask";import*as fs from"react-dom";import sr from"react-dom";import"qrcode";import"framer-motion";import{a as cp,u as up}from"./useOnClickOutside-P5GTcgh8.mjs";import{useQuery as dp,QueryClient as pp,QueryClientProvider as hp}from"@tanstack/react-query";import{produce as lr}from"immer";import{validateFieldsNatively as fp,toNestErrors as mp}from"@hookform/resolvers";import*as Re from"zod";import Wr,{isValidPhoneNumber as ms}from"libphonenumber-js";import{keyframes as io}from"@emotion/react";const FC=_n.oneOfType([_n.func,_n.object]);function so(e,n){return()=>null}function vp(e){const{prototype:n={}}=e;return!!n.isReactComponent}function gp(e,n,r,t,a){const o=e[n],i=a||n;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!vp(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${t} \`${i}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const LC=so(_n.elementType,gp);function lo(e,n){typeof e=="function"?e(n):e&&(e.current=n)}function Ye(...e){return w.useMemo(()=>e.every(n=>n==null)?null:n=>{e.forEach(r=>{lo(r,n)})},e)}const tn=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Mn(e){const n=w.useRef(e);return tn(()=>{n.current=e}),w.useRef((...r)=>(0,n.current)(...r)).current}const vs={};function bp(e,n){const r=w.useRef(vs);return r.current===vs&&(r.current=e(n)),r}const yp=[];function xp(e){w.useEffect(e,yp)}class eo{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new eo}start(n,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},n)}}function gs(){const e=bp(eo.create).current;return xp(e.disposeEffect),e}let Vr=!0,co=!1;const wp=new eo,kp={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Cp(e){const{type:n,tagName:r}=e;return!!(r==="INPUT"&&kp[n]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function _p(e){e.metaKey||e.altKey||e.ctrlKey||(Vr=!0)}function uo(){Vr=!1}function Mp(){this.visibilityState==="hidden"&&co&&(Vr=!0)}function Tp(e){e.addEventListener("keydown",_p,!0),e.addEventListener("mousedown",uo,!0),e.addEventListener("pointerdown",uo,!0),e.addEventListener("touchstart",uo,!0),e.addEventListener("visibilitychange",Mp,!0)}function Sp(e){const{target:n}=e;try{return n.matches(":focus-visible")}catch{}return Vr||Cp(n)}function Ap(){const e=w.useCallback(a=>{a!=null&&Tp(a.ownerDocument)},[]),n=w.useRef(!1);function r(){return n.current?(co=!0,wp.start(100,()=>{co=!1}),n.current=!1,!0):!1}function t(a){return Sp(a)?(n.current=!0,!0):!1}return{isFocusVisibleRef:n,onFocus:t,onBlur:r,ref:e}}function po(e,n){return po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,t){return r.__proto__=t,r},po(e,n)}function bs(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,po(e,n)}const ys={disabled:!1};var GC=null;const Yr=A.createContext(null);var Dp=function(e){return e.scrollTop},cr="unmounted",nn="exited",rn="entering",Tn="entered",ho="exiting",mt=function(e){bs(n,e);function n(t,a){var o;o=e.call(this,t,a)||this;var i=a,s=i&&!i.isMounting?t.enter:t.appear,l;return o.appearStatus=null,t.in?s?(l=nn,o.appearStatus=rn):l=Tn:t.unmountOnExit||t.mountOnEnter?l=cr:l=nn,o.state={status:l},o.nextCallback=null,o}n.getDerivedStateFromProps=function(t,a){var o=t.in;return o&&a.status===cr?{status:nn}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var a=null;if(t!==this.props){var o=this.state.status;this.props.in?o!==rn&&o!==Tn&&(a=rn):(o===rn||o===Tn)&&(a=ho)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,a,o,i;return a=o=i=t,t!=null&&typeof t!="number"&&(a=t.exit,o=t.enter,i=t.appear!==void 0?t.appear:o),{exit:a,enter:o,appear:i}},r.updateStatus=function(t,a){if(t===void 0&&(t=!1),a!==null)if(this.cancelNextCallback(),a===rn){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:sr.findDOMNode(this);o&&Dp(o)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===nn&&this.setState({status:cr})},r.performEnter=function(t){var a=this,o=this.props.enter,i=this.context?this.context.isMounting:t,s=this.props.nodeRef?[i]:[sr.findDOMNode(this),i],l=s[0],c=s[1],d=this.getTimeouts(),p=i?d.appear:d.enter;if(!t&&!o||ys.disabled){this.safeSetState({status:Tn},function(){a.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:rn},function(){a.props.onEntering(l,c),a.onTransitionEnd(p,function(){a.safeSetState({status:Tn},function(){a.props.onEntered(l,c)})})})},r.performExit=function(){var t=this,a=this.props.exit,o=this.getTimeouts(),i=this.props.nodeRef?void 0:sr.findDOMNode(this);if(!a||ys.disabled){this.safeSetState({status:nn},function(){t.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:ho},function(){t.props.onExiting(i),t.onTransitionEnd(o.exit,function(){t.safeSetState({status:nn},function(){t.props.onExited(i)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,a){a=this.setNextCallback(a),this.setState(t,a)},r.setNextCallback=function(t){var a=this,o=!0;return this.nextCallback=function(i){o&&(o=!1,a.nextCallback=null,t(i))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(t,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:sr.findDOMNode(this),i=t==null&&!this.props.addEndListener;if(!o||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}t!=null&&setTimeout(this.nextCallback,t)},r.render=function(){var t=this.state.status;if(t===cr)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var i=U(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return A.createElement(Yr.Provider,{value:null},typeof o=="function"?o(t,i):A.cloneElement(A.Children.only(o),i))},n}(A.Component);mt.contextType=Yr,mt.propTypes={};function Sn(){}mt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sn,onEntering:Sn,onEntered:Sn,onExit:Sn,onExiting:Sn,onExited:Sn},mt.UNMOUNTED=cr,mt.EXITED=nn,mt.ENTERING=rn,mt.ENTERED=Tn,mt.EXITING=ho;function Ep(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fo(e,n){var r=function(a){return n&&Ir(a)?n(a):a},t=Object.create(null);return e&&kd.map(e,function(a){return a}).forEach(function(a){t[a.key]=r(a)}),t}function jp(e,n){e=e||{},n=n||{};function r(d){return d in n?n[d]:e[d]}var t=Object.create(null),a=[];for(var o in e)o in n?a.length&&(t[o]=a,a=[]):a.push(o);var i,s={};for(var l in n){if(t[l])for(i=0;i<t[l].length;i++){var c=t[l][i];s[t[l][i]]=r(c)}s[l]=r(l)}for(i=0;i<a.length;i++)s[a[i]]=r(a[i]);return s}function an(e,n,r){return r[n]!=null?r[n]:e.props[n]}function Pp(e,n){return fo(e.children,function(r){return wn(r,{onExited:n.bind(null,r),in:!0,appear:an(r,"appear",e),enter:an(r,"enter",e),exit:an(r,"exit",e)})})}function Op(e,n,r){var t=fo(e.children),a=jp(n,t);return Object.keys(a).forEach(function(o){var i=a[o];if(Ir(i)){var s=o in n,l=o in t,c=n[o],d=Ir(c)&&!c.props.in;l&&(!s||d)?a[o]=wn(i,{onExited:r.bind(null,i),in:!0,exit:an(i,"exit",e),enter:an(i,"enter",e)}):!l&&s&&!d?a[o]=wn(i,{in:!1}):l&&s&&Ir(c)&&(a[o]=wn(i,{onExited:r.bind(null,i),in:c.props.in,exit:an(i,"exit",e),enter:an(i,"enter",e)}))}}),a}var Np=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},Rp={component:"div",childFactory:function(e){return e}},mo=function(e){bs(n,e);function n(t,a){var o;o=e.call(this,t,a)||this;var i=o.handleExited.bind(Ep(o));return o.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},o}var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(t,a){var o=a.children,i=a.handleExited,s=a.firstRender;return{children:s?Pp(t,i):Op(t,o,i),firstRender:!1}},r.handleExited=function(t,a){var o=fo(this.props.children);t.key in o||(t.props.onExited&&t.props.onExited(a),this.mounted&&this.setState(function(i){var s=M({},i.children);return delete s[t.key],{children:s}}))},r.render=function(){var t=this.props,a=t.component,o=t.childFactory,i=U(t,["component","childFactory"]),s=this.state.contextValue,l=Np(this.state.children).map(o);return delete i.appear,delete i.enter,delete i.exit,a===null?A.createElement(Yr.Provider,{value:s},l):A.createElement(Yr.Provider,{value:s},A.createElement(a,i,l))},n}(A.Component);mo.propTypes={},mo.defaultProps=Rp;function zp({styles:e,themeId:n,defaultTheme:r={}}){const t=ns(r),a=typeof e=="function"?e(n&&t[n]||t):e;return u.jsx($d,{styles:a})}function we(e,n,r="Mui"){const t={};return n.forEach(a=>{t[a]=ye(e,a,r)}),t}function Ip(e){const{prototype:n={}}=e;return!!n.isReactComponent}function xs(e,n,r,t,a){const o=e[n],i=a||n;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Ip(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${t} \`${i}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Fp=so(_n.element,xs);Fp.isRequired=so(_n.element.isRequired,xs);const BC="exact-prop: \u200B";function WC(e){return e}function VC(e,n,r,t,a){return null}function ws(...e){return e.reduce((n,r)=>r==null?n:function(...t){n.apply(this,t),r.apply(this,t)},()=>{})}function ks(e,n=166){let r;function t(...a){const o=()=>{e.apply(this,a)};clearTimeout(r),r=setTimeout(o,n)}return t.clear=()=>{clearTimeout(r)},t}function Xe(e){return e&&e.ownerDocument||document}function on(e){return Xe(e).defaultView||window}let Cs=0;function Lp(e){const[n,r]=w.useState(e),t=e||n;return w.useEffect(()=>{n==null&&(Cs+=1,r(`mui-${Cs}`))},[n]),t}const _s=w.useId;function Ms(e){if(_s!==void 0){const n=_s();return e??n}return Lp(e)}function Ts({controlled:e,default:n,name:r,state:t="value"}){const{current:a}=w.useRef(e!==void 0),[o,i]=w.useState(n),s=a?e:o,l=w.useCallback(c=>{a||i(c)},[]);return[s,l]}function Ss(e){const n=e.documentElement.clientWidth;return Math.abs(window.innerWidth-n)}function Gp(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return n}}function Bp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const Wp=Number.isInteger||Bp;function As(e,n,r,t){const a=e[n];if(a==null||!Wp(a)){const o=Gp(a);return new RangeError(`Invalid ${t} \`${n}\` of type \`${o}\` supplied to \`${r}\`, expected \`integer\`.`)}return null}function Vp(e,n,...r){return e[n]===void 0?null:As(e,n,...r)}function vo(){return null}Vp.isRequired=As,vo.isRequired=vo;const YC=vo,Yp=w.createContext(),$p=()=>w.useContext(Yp)??!1;function qp(e){const{className:n,classes:r,pulsate:t=!1,rippleX:a,rippleY:o,rippleSize:i,in:s,onExited:l,timeout:c}=e,[d,p]=w.useState(!1),h=W(n,r.ripple,r.rippleVisible,t&&r.ripplePulsate),f={width:i,height:i,top:-(i/2)+o,left:-(i/2)+a},m=W(r.child,d&&r.childLeaving,t&&r.childPulsate);return!s&&!d&&p(!0),w.useEffect(()=>{if(!s&&l!=null){const v=setTimeout(l,c);return()=>{clearTimeout(v)}}},[l,s,c]),u.jsx("span",{className:h,style:f,children:u.jsx("span",{className:m})})}const at=we("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hp=["center","classes","className"];let $r=e=>e,Ds,Es,js,Ps;const go=550,Up=80,Zp=io(Ds||(Ds=$r`
1
+ "use strict";var xd=Object.defineProperty,wd=(e,n,r)=>n in e?xd(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,B=(e,n,r)=>wd(e,typeof n!="symbol"?n+"":n,r);import{j as u}from"./jsx-runtime-DHlBLioN.mjs";import*as w from"react";import A,{Children as kd,isValidElement as Ir,cloneElement as wn,forwardRef as Dt,createContext as rr,useEffect as Ie,useContext as ar,useMemo as be,useState as Ee,useRef as We,useCallback as Gt,useLayoutEffect as $i,useImperativeHandle as Cd,createElement as _d,Component as Fe,createRef as Bt,useReducer as Md,Fragment as qi,memo as or}from"react";import{Typography as Qe,Box as Y,Tooltip as Td,IconButton as kn,Stack as ue,Autocomplete as ir,TextField as Ne,Radio as Sd,Chip as Ad,RadioGroup as to,Dialog as Dd,DialogTitle as Ed,DialogContent as jd,DialogActions as Pd,useTheme as Cn,Paper as Hi,Accordion as Ui,AccordionSummary as Zi,AccordionDetails as Ki,Link as Od,Alert as Nd,InputAdornment as Fr,Button as Qi,Menu as Xi,MenuItem as no,FormControl as Ji,InputBase as Rd,Popper as zd,FormHelperText as Id,Skeleton as Fd,Checkbox as Ld,AlertTitle as Gd,Backdrop as Bd,CircularProgress as Wd}from"@mui/material";import{useForm as es,FormProvider as ts,useController as en,useFormContext as Lr,useFieldArray as Vd,appendErrors as Yd}from"react-hook-form";import{r as _n,_ as U,s as M,t as ns,G as $d,v as ye,w as W,x as $,y as _e,z as Me,A as ft,D as Z,F as Wt,H as qd,I as Hd,J as Gr,K as Br,N as xe,Q as rs,T as as,U as os,V as is,X as ss,Y as ro,Z as ao,a0 as Ud,a1 as Zd,u as Kd}from"./SignupBigNumbers-Bekm4hS_.mjs";import{Code as Qd,Delete as Xd,ChevronLeft as ls,Menu as Jd,CheckCircle as ep,Close as oo,Add as cs,KeyboardArrowDown as us,ExpandMore as tp,Image as np}from"@mui/icons-material";import{useDrag as rp,useDrop as ap,DndProvider as op}from"react-dnd";import{HTML5Backend as ip}from"react-dnd-html5-backend";import{masks as ds}from"../utils/masks/index.mjs";import ps from"@mona-health/react-input-mask";import{a as sp}from"./useCopyToClipboard-_Ur9Q8Gv.mjs";import{p as lp}from"./phone.schema-XBbyizhq.mjs";import{IMaskInput as hs}from"react-imask";import*as fs from"react-dom";import sr from"react-dom";import"qrcode";import"framer-motion";import{a as cp,u as up}from"./useOnClickOutside-P5GTcgh8.mjs";import{useQuery as dp,QueryClient as pp,QueryClientProvider as hp}from"@tanstack/react-query";import{produce as lr}from"immer";import{validateFieldsNatively as fp,toNestErrors as mp}from"@hookform/resolvers";import*as Re from"zod";import Wr,{isValidPhoneNumber as ms}from"libphonenumber-js";import{keyframes as io}from"@emotion/react";const FC=_n.oneOfType([_n.func,_n.object]);function so(e,n){return()=>null}function vp(e){const{prototype:n={}}=e;return!!n.isReactComponent}function gp(e,n,r,t,a){const o=e[n],i=a||n;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!vp(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${t} \`${i}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const LC=so(_n.elementType,gp);function lo(e,n){typeof e=="function"?e(n):e&&(e.current=n)}function Ye(...e){return w.useMemo(()=>e.every(n=>n==null)?null:n=>{e.forEach(r=>{lo(r,n)})},e)}const tn=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Mn(e){const n=w.useRef(e);return tn(()=>{n.current=e}),w.useRef((...r)=>(0,n.current)(...r)).current}const vs={};function bp(e,n){const r=w.useRef(vs);return r.current===vs&&(r.current=e(n)),r}const yp=[];function xp(e){w.useEffect(e,yp)}class eo{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new eo}start(n,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},n)}}function gs(){const e=bp(eo.create).current;return xp(e.disposeEffect),e}let Vr=!0,co=!1;const wp=new eo,kp={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Cp(e){const{type:n,tagName:r}=e;return!!(r==="INPUT"&&kp[n]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function _p(e){e.metaKey||e.altKey||e.ctrlKey||(Vr=!0)}function uo(){Vr=!1}function Mp(){this.visibilityState==="hidden"&&co&&(Vr=!0)}function Tp(e){e.addEventListener("keydown",_p,!0),e.addEventListener("mousedown",uo,!0),e.addEventListener("pointerdown",uo,!0),e.addEventListener("touchstart",uo,!0),e.addEventListener("visibilitychange",Mp,!0)}function Sp(e){const{target:n}=e;try{return n.matches(":focus-visible")}catch{}return Vr||Cp(n)}function Ap(){const e=w.useCallback(a=>{a!=null&&Tp(a.ownerDocument)},[]),n=w.useRef(!1);function r(){return n.current?(co=!0,wp.start(100,()=>{co=!1}),n.current=!1,!0):!1}function t(a){return Sp(a)?(n.current=!0,!0):!1}return{isFocusVisibleRef:n,onFocus:t,onBlur:r,ref:e}}function po(e,n){return po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,t){return r.__proto__=t,r},po(e,n)}function bs(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,po(e,n)}const ys={disabled:!1};var GC=null;const Yr=A.createContext(null);var Dp=function(e){return e.scrollTop},cr="unmounted",nn="exited",rn="entering",Tn="entered",ho="exiting",mt=function(e){bs(n,e);function n(t,a){var o;o=e.call(this,t,a)||this;var i=a,s=i&&!i.isMounting?t.enter:t.appear,l;return o.appearStatus=null,t.in?s?(l=nn,o.appearStatus=rn):l=Tn:t.unmountOnExit||t.mountOnEnter?l=cr:l=nn,o.state={status:l},o.nextCallback=null,o}n.getDerivedStateFromProps=function(t,a){var o=t.in;return o&&a.status===cr?{status:nn}:null};var r=n.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var a=null;if(t!==this.props){var o=this.state.status;this.props.in?o!==rn&&o!==Tn&&(a=rn):(o===rn||o===Tn)&&(a=ho)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,a,o,i;return a=o=i=t,t!=null&&typeof t!="number"&&(a=t.exit,o=t.enter,i=t.appear!==void 0?t.appear:o),{exit:a,enter:o,appear:i}},r.updateStatus=function(t,a){if(t===void 0&&(t=!1),a!==null)if(this.cancelNextCallback(),a===rn){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:sr.findDOMNode(this);o&&Dp(o)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===nn&&this.setState({status:cr})},r.performEnter=function(t){var a=this,o=this.props.enter,i=this.context?this.context.isMounting:t,s=this.props.nodeRef?[i]:[sr.findDOMNode(this),i],l=s[0],c=s[1],d=this.getTimeouts(),p=i?d.appear:d.enter;if(!t&&!o||ys.disabled){this.safeSetState({status:Tn},function(){a.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:rn},function(){a.props.onEntering(l,c),a.onTransitionEnd(p,function(){a.safeSetState({status:Tn},function(){a.props.onEntered(l,c)})})})},r.performExit=function(){var t=this,a=this.props.exit,o=this.getTimeouts(),i=this.props.nodeRef?void 0:sr.findDOMNode(this);if(!a||ys.disabled){this.safeSetState({status:nn},function(){t.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:ho},function(){t.props.onExiting(i),t.onTransitionEnd(o.exit,function(){t.safeSetState({status:nn},function(){t.props.onExited(i)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,a){a=this.setNextCallback(a),this.setState(t,a)},r.setNextCallback=function(t){var a=this,o=!0;return this.nextCallback=function(i){o&&(o=!1,a.nextCallback=null,t(i))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(t,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:sr.findDOMNode(this),i=t==null&&!this.props.addEndListener;if(!o||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}t!=null&&setTimeout(this.nextCallback,t)},r.render=function(){var t=this.state.status;if(t===cr)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var i=U(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return A.createElement(Yr.Provider,{value:null},typeof o=="function"?o(t,i):A.cloneElement(A.Children.only(o),i))},n}(A.Component);mt.contextType=Yr,mt.propTypes={};function Sn(){}mt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sn,onEntering:Sn,onEntered:Sn,onExit:Sn,onExiting:Sn,onExited:Sn},mt.UNMOUNTED=cr,mt.EXITED=nn,mt.ENTERING=rn,mt.ENTERED=Tn,mt.EXITING=ho;function Ep(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fo(e,n){var r=function(a){return n&&Ir(a)?n(a):a},t=Object.create(null);return e&&kd.map(e,function(a){return a}).forEach(function(a){t[a.key]=r(a)}),t}function jp(e,n){e=e||{},n=n||{};function r(d){return d in n?n[d]:e[d]}var t=Object.create(null),a=[];for(var o in e)o in n?a.length&&(t[o]=a,a=[]):a.push(o);var i,s={};for(var l in n){if(t[l])for(i=0;i<t[l].length;i++){var c=t[l][i];s[t[l][i]]=r(c)}s[l]=r(l)}for(i=0;i<a.length;i++)s[a[i]]=r(a[i]);return s}function an(e,n,r){return r[n]!=null?r[n]:e.props[n]}function Pp(e,n){return fo(e.children,function(r){return wn(r,{onExited:n.bind(null,r),in:!0,appear:an(r,"appear",e),enter:an(r,"enter",e),exit:an(r,"exit",e)})})}function Op(e,n,r){var t=fo(e.children),a=jp(n,t);return Object.keys(a).forEach(function(o){var i=a[o];if(Ir(i)){var s=o in n,l=o in t,c=n[o],d=Ir(c)&&!c.props.in;l&&(!s||d)?a[o]=wn(i,{onExited:r.bind(null,i),in:!0,exit:an(i,"exit",e),enter:an(i,"enter",e)}):!l&&s&&!d?a[o]=wn(i,{in:!1}):l&&s&&Ir(c)&&(a[o]=wn(i,{onExited:r.bind(null,i),in:c.props.in,exit:an(i,"exit",e),enter:an(i,"enter",e)}))}}),a}var Np=Object.values||function(e){return Object.keys(e).map(function(n){return e[n]})},Rp={component:"div",childFactory:function(e){return e}},mo=function(e){bs(n,e);function n(t,a){var o;o=e.call(this,t,a)||this;var i=o.handleExited.bind(Ep(o));return o.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},o}var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(t,a){var o=a.children,i=a.handleExited,s=a.firstRender;return{children:s?Pp(t,i):Op(t,o,i),firstRender:!1}},r.handleExited=function(t,a){var o=fo(this.props.children);t.key in o||(t.props.onExited&&t.props.onExited(a),this.mounted&&this.setState(function(i){var s=M({},i.children);return delete s[t.key],{children:s}}))},r.render=function(){var t=this.props,a=t.component,o=t.childFactory,i=U(t,["component","childFactory"]),s=this.state.contextValue,l=Np(this.state.children).map(o);return delete i.appear,delete i.enter,delete i.exit,a===null?A.createElement(Yr.Provider,{value:s},l):A.createElement(Yr.Provider,{value:s},A.createElement(a,i,l))},n}(A.Component);mo.propTypes={},mo.defaultProps=Rp;function zp({styles:e,themeId:n,defaultTheme:r={}}){const t=ns(r),a=typeof e=="function"?e(n&&t[n]||t):e;return u.jsx($d,{styles:a})}function we(e,n,r="Mui"){const t={};return n.forEach(a=>{t[a]=ye(e,a,r)}),t}function Ip(e){const{prototype:n={}}=e;return!!n.isReactComponent}function xs(e,n,r,t,a){const o=e[n],i=a||n;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Ip(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${t} \`${i}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Fp=so(_n.element,xs);Fp.isRequired=so(_n.element.isRequired,xs);const BC="exact-prop: \u200B";function WC(e){return e}function VC(e,n,r,t,a){return null}function ws(...e){return e.reduce((n,r)=>r==null?n:function(...t){n.apply(this,t),r.apply(this,t)},()=>{})}function ks(e,n=166){let r;function t(...a){const o=()=>{e.apply(this,a)};clearTimeout(r),r=setTimeout(o,n)}return t.clear=()=>{clearTimeout(r)},t}function Xe(e){return e&&e.ownerDocument||document}function on(e){return Xe(e).defaultView||window}let Cs=0;function Lp(e){const[n,r]=w.useState(e),t=e||n;return w.useEffect(()=>{n==null&&(Cs+=1,r(`mui-${Cs}`))},[n]),t}const _s=w.useId;function Ms(e){if(_s!==void 0){const n=_s();return e??n}return Lp(e)}function Ts({controlled:e,default:n,name:r,state:t="value"}){const{current:a}=w.useRef(e!==void 0),[o,i]=w.useState(n),s=a?e:o,l=w.useCallback(c=>{a||i(c)},[]);return[s,l]}function Ss(e){const n=e.documentElement.clientWidth;return Math.abs(window.innerWidth-n)}function Gp(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return n}}function Bp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const Wp=Number.isInteger||Bp;function As(e,n,r,t){const a=e[n];if(a==null||!Wp(a)){const o=Gp(a);return new RangeError(`Invalid ${t} \`${n}\` of type \`${o}\` supplied to \`${r}\`, expected \`integer\`.`)}return null}function Vp(e,n,...r){return e[n]===void 0?null:As(e,n,...r)}function vo(){return null}Vp.isRequired=As,vo.isRequired=vo;const YC=vo,Yp=w.createContext(),$p=()=>w.useContext(Yp)??!1;function qp(e){const{className:n,classes:r,pulsate:t=!1,rippleX:a,rippleY:o,rippleSize:i,in:s,onExited:l,timeout:c}=e,[d,p]=w.useState(!1),h=W(n,r.ripple,r.rippleVisible,t&&r.ripplePulsate),f={width:i,height:i,top:-(i/2)+o,left:-(i/2)+a},m=W(r.child,d&&r.childLeaving,t&&r.childPulsate);return!s&&!d&&p(!0),w.useEffect(()=>{if(!s&&l!=null){const v=setTimeout(l,c);return()=>{clearTimeout(v)}}},[l,s,c]),u.jsx("span",{className:h,style:f,children:u.jsx("span",{className:m})})}const at=we("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hp=["center","classes","className"];let $r=e=>e,Ds,Es,js,Ps;const go=550,Up=80,Zp=io(Ds||(Ds=$r`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "4.0.4-beta.8",
3
+ "version": "4.0.4-beta.9",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],