affiliate-front-shared 1.3.21 → 1.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var Or=Object.defineProperty;var Tr=(n,e,t)=>e in n?Or(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Re=(n,e,t)=>Tr(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),S=require("react"),T=require("antd"),h=require("styled-components"),X=require("react-router"),at=require("zustand"),Wt=require("react-i18next"),Ir=require("echarts"),zr=require("react-dom"),Pr=require("i18next-browser-languagedetector"),Mr=require("i18next-http-backend"),Hr=require("xlsx"),Rr=require("lodash");function ot(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const P=ot(S),Fr=ot(Ir),Fe=ot(Hr),Yt=S.createContext({});function Nr({services:n,children:e}){return i.jsx(Yt.Provider,{value:n,children:e})}function ke(){return S.useContext(Yt)}let ge=n=>n;function wt(n){ge=n}const G=(n,e)=>ge(`general.${n}`,e),oe=(n,e)=>ge(`actions.${n}`,e),re=(n,e)=>ge(`authentication.${n}`,e),ae=(n,e)=>ge(`months.${n}`,e),Se=(n,e)=>ge(`date.${n}`,e),be=(n,e)=>ge(`weekDays.${n}`,e),Vr=(n,e)=>ge(`noData.${n}`,e),St=(n,e)=>ge(`comingSoon.${n}`,e);function Ar({t:n,children:e}){return wt(n),S.useEffect(()=>{wt(n)},[n]),i.jsx(i.Fragment,{children:e})}const it=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),Br=h(it)`
1
+ "use strict";var $n=Object.defineProperty;var In=(r,e,t)=>e in r?$n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var et=(r,e,t)=>In(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),T=require("antd"),m=require("styled-components"),re=require("react-router"),Ot=require("zustand"),$r=require("react-i18next"),Mn=require("echarts"),Pn=require("react-dom"),zn=require("i18next-browser-languagedetector"),Hn=require("i18next-http-backend"),Rn=require("xlsx"),Nn=require("lodash");function Dt(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const $=Dt(x),An=Dt(Mn),tt=Dt(Rn),Ir=x.createContext({});function Fn({services:r,children:e}){return o.jsx(Ir.Provider,{value:r,children:e})}function me(){return x.useContext(Ir)}let Ce=r=>r;function Yt(r){Ce=r}const V=(r,e)=>Ce(`general.${r}`,e),Z=(r,e)=>Ce(`actions.${r}`,e),G=(r,e)=>Ce(`authentication.${r}`,e),de=(r,e)=>Ce(`months.${r}`,e),Pe=(r,e)=>Ce(`date.${r}`,e),Oe=(r,e)=>Ce(`weekDays.${r}`,e),Vn=(r,e)=>Ce(`noData.${r}`,e),Kt=(r,e)=>Ce(`comingSoon.${r}`,e);function Bn({t:r,children:e}){return Yt(r),x.useEffect(()=>{Yt(r)},[r]),o.jsx(o.Fragment,{children:e})}const Tt=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),_n=m(Tt)`
2
2
  color: var(--color-text-primary, #131412);
3
- `,Gr=h.div`
3
+ `,Un=m.div`
4
4
  background: var(--color-bg-secondary, #f5f5f5);
5
5
  color: #000;
6
6
  width: 100%;
@@ -12,7 +12,7 @@
12
12
  flex-direction: column;
13
13
  box-sizing: border-box;
14
14
  position: relative;
15
- `,Ur=h.div`
15
+ `,Gn=m.div`
16
16
  display: inline-flex;
17
17
  flex-direction: column;
18
18
  gap: 0.5rem;
@@ -29,7 +29,7 @@
29
29
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem);
30
30
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
31
31
  }
32
- `,_r=h.div`
32
+ `,Wn=m.div`
33
33
  display: flex;
34
34
  align-items: center;
35
35
  gap: 5px;
@@ -44,7 +44,7 @@
44
44
  font-weight: var(--text-weight-medium, 500);
45
45
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
46
46
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
47
- `,Wr=h(T.Menu)`
47
+ `,Yn=m(T.Menu)`
48
48
  border: none !important;
49
49
  background: transparent;
50
50
  flex: 1;
@@ -112,16 +112,16 @@
112
112
  margin-left: 1.5rem !important;
113
113
  }
114
114
  }
115
- `,st=(n,e=[])=>{const[t,r]=S.useState(null),[a,o]=S.useState(null),[s,l]=S.useState(!0),[d,c]=S.useState(null),u=async()=>{var p;try{l(!0),r(null);const m=await n();r(m),(p=m==null?void 0:m.data)!=null&&p.items&&o(m.data.items)}catch{c("Failed to fetch data")}finally{l(!1)}};return S.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:a}},xe=at.create((n,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),n({user:t})},setThemeMode:t=>{const r=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;n({prefersDark:r,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",r?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),n({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const r=e().user;return r!=null&&r.permissions?!!r.permissions[t]:!1}})),Ee=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),Yr=h(Ee)`
115
+ `,$t=(r,e=[])=>{const[t,n]=x.useState(null),[i,a]=x.useState(null),[s,l]=x.useState(!0),[d,c]=x.useState(null),u=async()=>{var p;try{l(!0),n(null);const f=await r();n(f),(p=f==null?void 0:f.data)!=null&&p.items&&a(f.data.items)}catch{c("Failed to fetch data")}finally{l(!1)}};return x.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:i}},Ee=Ot.create((r,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),r({user:t})},setThemeMode:t=>{const n=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;r({prefersDark:n,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",n?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),r({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const n=e().user;return n!=null&&n.permissions?!!n.permissions[t]:!1}})),Ue=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),Kn=m(Ue)`
116
116
  display: flex;
117
117
  justify-content: center;
118
118
  color: var(--color-text-primary, #131412) !important;
119
- `,Kr=h.div`
119
+ `,qn=m.div`
120
120
  display: flex;
121
121
  align-items: center;
122
122
  justify-content: space-between;
123
123
  width: 256px;
124
- `,qr=h.span`
124
+ `,Zn=m.span`
125
125
  color: var(--color-text-primary, #131412);
126
126
 
127
127
  /* caption/medium-r */
@@ -131,7 +131,7 @@
131
131
  font-weight: var(--text-weight-regular, 400);
132
132
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
133
133
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
134
- `,J=h(T.Menu)`
134
+ `,ee=m(T.Menu)`
135
135
  display: flex;
136
136
  padding: var(--spacing-050, 4px) 0;
137
137
  flex-direction: column;
@@ -175,11 +175,11 @@
175
175
  .ant-menu-submenu-popup .ant-menu-item:hover {
176
176
  background-color: transparent !important;
177
177
  }
178
- `,Zr=h.div`
178
+ `,Jn=m.div`
179
179
  width: 256px;
180
180
  position: absolute !important;
181
181
  z-index: 10000;
182
- `,Jr=({closeProfileDropdown:n})=>{const e=X.useNavigate(),{getCustomers:t,postSelectedCustomer:r}=ke(),{storedThemeMode:a,logout:o,setThemeMode:s,user:l}=xe(),{i18n:d}=Wt.useTranslation();function c(){o(),e("/authorization/login")}function u(b){d.changeLanguage(b),window.location.reload()}const p=(b,D)=>i.jsxs(Kr,{children:[i.jsx(qr,{children:b}),D&&i.jsx("span",{children:i.jsx(Yr,{})})]}),{response:m}=st(t??(()=>Promise.resolve({data:[]})),[]);async function f(b){if(!r)return;const z=(await r(b)).data.value;localStorage.setItem("useToken",z.token),localStorage.setItem("userData",JSON.stringify(z))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return i.jsx(Zr,{children:i.jsxs(J,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:b=>b.parentElement||document.body,onClick:()=>n(!1),children:[i.jsx(J.Item,{onClick:g,children:"Profile"},"10-1"),i.jsxs(J.Item,{children:[" ","Notifications"]},"10-2"),i.jsxs(J.Item,{children:[" ","SecurityAccess"]},"10-3"),i.jsx(J.Divider,{}),i.jsxs(J.SubMenu,{title:"Language",children:[i.jsx(J.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),i.jsx(J.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),i.jsxs(J.SubMenu,{title:"ColorTheme",children:[i.jsx(J.Item,{onClick:()=>s(!1),children:p("Light",a===!1)},"30-1"),i.jsx(J.Item,{onClick:()=>s(!0),children:p("Dark",a===!0)},"30-2"),i.jsx(J.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,a===null)},"30-3")]},"30"),i.jsx(J.Divider,{}),i.jsx(J.SubMenu,{title:"ConnectedAccounts",children:((m==null?void 0:m.data)||[]).map(b=>i.jsx(J.Item,{onClick:()=>f(b.id),children:p(b.name)},b.id))},"40"),i.jsx(J.Divider,{}),i.jsx(J.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},lt=({items:n,topLogoPrimaryUrl:e,shortName:t})=>{const r=X.useLocation(),[a,o]=S.useState(!1),s=S.useRef(null),l=()=>o(d=>!d);return S.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&o(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),i.jsxs(Gr,{className:"sidebar-wrapper",children:[i.jsxs(Ur,{ref:s,children:[i.jsxs(_r,{onClick:l,children:[i.jsx("img",{src:e,alt:"logo"}),i.jsx("span",{children:t}),i.jsx(Br,{})]}),i.jsx("div",{children:a&&i.jsx(Jr,{closeProfileDropdown:o})})]}),i.jsx(Wr,{mode:"inline",selectedKeys:[r.pathname],items:n})]})},Xr=h.div`
182
+ `,Qn=({closeProfileDropdown:r})=>{const e=re.useNavigate(),{getCustomers:t,postSelectedCustomer:n}=me(),{storedThemeMode:i,logout:a,setThemeMode:s,user:l}=Ee(),{i18n:d}=$r.useTranslation();function c(){a(),e("/authorization/login")}function u(v){d.changeLanguage(v),window.location.reload()}const p=(v,L)=>o.jsxs(qn,{children:[o.jsx(Zn,{children:v}),L&&o.jsx("span",{children:o.jsx(Kn,{})})]}),{response:f}=$t(t??(()=>Promise.resolve({data:[]})),[]);async function h(v){if(!n)return;const M=(await n(v)).data.value;localStorage.setItem("useToken",M.token),localStorage.setItem("userData",JSON.stringify(M))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return o.jsx(Jn,{children:o.jsxs(ee,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:v=>v.parentElement||document.body,onClick:()=>r(!1),children:[o.jsx(ee.Item,{onClick:g,children:"Profile"},"10-1"),o.jsxs(ee.Item,{children:[" ","Notifications"]},"10-2"),o.jsxs(ee.Item,{children:[" ","SecurityAccess"]},"10-3"),o.jsx(ee.Divider,{}),o.jsxs(ee.SubMenu,{title:"Language",children:[o.jsx(ee.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),o.jsx(ee.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),o.jsxs(ee.SubMenu,{title:"ColorTheme",children:[o.jsx(ee.Item,{onClick:()=>s(!1),children:p("Light",i===!1)},"30-1"),o.jsx(ee.Item,{onClick:()=>s(!0),children:p("Dark",i===!0)},"30-2"),o.jsx(ee.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,i===null)},"30-3")]},"30"),o.jsx(ee.Divider,{}),o.jsx(ee.SubMenu,{title:"ConnectedAccounts",children:((f==null?void 0:f.data)||[]).map(v=>o.jsx(ee.Item,{onClick:()=>h(v.id),children:p(v.name)},v.id))},"40"),o.jsx(ee.Divider,{}),o.jsx(ee.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},It=({items:r,topLogoPrimaryUrl:e,shortName:t})=>{const n=re.useLocation(),[i,a]=x.useState(!1),s=x.useRef(null),l=()=>a(d=>!d);return x.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&a(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),o.jsxs(Un,{className:"sidebar-wrapper",children:[o.jsxs(Gn,{ref:s,children:[o.jsxs(Wn,{onClick:l,children:[o.jsx("img",{src:e,alt:"logo"}),o.jsx("span",{children:t}),o.jsx(_n,{})]}),o.jsx("div",{children:i&&o.jsx(Qn,{closeProfileDropdown:a})})]}),o.jsx(Yn,{mode:"inline",selectedKeys:[n.pathname],items:r})]})},Xn=m.div`
183
183
  min-height: 100vh;
184
184
  min-height: 100dvh;
185
185
  background: var(--color-bg-primary, #fff);
@@ -198,15 +198,15 @@
198
198
  display: none;
199
199
  }
200
200
  }
201
- `,Qr=h.div`
201
+ `,ei=m.div`
202
202
  display: flex;
203
203
  flex-direction: column;
204
204
  flex: 1;
205
205
  overflow-y: auto;
206
206
  max-height: 100vh;
207
- `,en=h.div`
207
+ `,ti=m.div`
208
208
  background: var(--color-bg-primary, #fff);
209
- `,tn=({children:n})=>i.jsxs(Xr,{children:[i.jsx(lt,{}),i.jsx(Qr,{children:i.jsx(en,{children:n})})]}),rn=h.div`
209
+ `,ri=({children:r})=>o.jsxs(Xn,{children:[o.jsx(It,{}),o.jsx(ei,{children:o.jsx(ti,{children:r})})]}),ni=m.div`
210
210
  display: grid;
211
211
  grid-template-columns: 33.625rem 1fr;
212
212
  min-height: 100vh;
@@ -225,9 +225,9 @@
225
225
  flex-shrink: 0;
226
226
  object-fit: contain;
227
227
  }
228
- `,nn=h.span`
228
+ `,ii=m.span`
229
229
  font-size: 15px;
230
- `,an=h.button`
230
+ `,ai=m.button`
231
231
  height: var(--size-400, 2rem);
232
232
  width: var(--size-400, 2rem);
233
233
  display: flex;
@@ -241,7 +241,7 @@
241
241
  path {
242
242
  fill: var(--color-icon-primary, #131412);
243
243
  }
244
- `,on=h.div`
244
+ `,oi=m.div`
245
245
  display: flex;
246
246
  flex-direction: column;
247
247
  padding: 0 1.5rem;
@@ -284,7 +284,7 @@
284
284
  margin-bottom: 2rem;
285
285
  }
286
286
  }
287
- `,sn=h.div``,ln=h.div`
287
+ `,si=m.div``,li=m.div`
288
288
  display: flex;
289
289
  flex-direction: column;
290
290
  gap: 0.25rem;
@@ -308,11 +308,11 @@
308
308
  @media (max-width: 768px) {
309
309
  padding: 1.7rem 0 1rem;
310
310
  }
311
- `,cn=h.div`
311
+ `,ci=m.div`
312
312
  display: flex;
313
313
  align-items: center;
314
314
  justify-content: center;
315
- background-color: ${n=>n.backgroundcolor};
315
+ background-color: ${r=>r.backgroundcolor};
316
316
  img,
317
317
  video {
318
318
  width: 50%;
@@ -323,7 +323,7 @@
323
323
  @media (max-width: 1024px) {
324
324
  display: none;
325
325
  }
326
- `,dn=h.p`
326
+ `,di=m.p`
327
327
  /* body/medium */
328
328
  font-family: var(--text-font-family-base, Geist);
329
329
  font-size: var(--typo-body-size-medium, 18px);
@@ -331,7 +331,7 @@
331
331
  font-weight: var(--text-weight-regular, 400);
332
332
  line-height: var(--typo-body-lineHeight-medium, 20px); /* 111.111% */
333
333
  letter-spacing: var(--typo-body-spacing-medium, 0.15px);
334
- `,pn=h.span`
334
+ `,pi=m.span`
335
335
  /* heading/medium */
336
336
  font-family: var(--text-font-family-base, Geist);
337
337
  font-size: var(--typo-heading-size-medium, 24px);
@@ -339,14 +339,14 @@
339
339
  font-weight: var(--text-weight-medium, 500);
340
340
  line-height: var(--typo-heading-lineHeight-medium, 28px); /* 116.667% */
341
341
  letter-spacing: var(--typo-heading-spacing-medium, -0.5px);
342
- `,un=h.div`
342
+ `,ui=m.div`
343
343
  display: none;
344
344
  margin-bottom: 3px;
345
345
 
346
346
  @media (max-width: 768px) {
347
347
  display: block;
348
348
  }
349
- `,fn=h.footer`
349
+ `,fi=m.footer`
350
350
  display: flex;
351
351
  gap: 10px;
352
352
 
@@ -355,7 +355,7 @@
355
355
  flex-direction: column;
356
356
  align-items: start !important;
357
357
  }
358
- `,Ct=h.span``,Kt=n=>P.createElement("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z",fill:"currentColor"})),gn=h(Kt)`
358
+ `,qt=m.span``,Mr=r=>$.createElement("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z",fill:"currentColor"})),hi=m(Mr)`
359
359
  cursor: pointer;
360
360
 
361
361
  svg {
@@ -366,12 +366,12 @@
366
366
  transition: 0.1s;
367
367
  }
368
368
  }
369
- `,mn=h.div`
369
+ `,gi=m.div`
370
370
  width: 100%;
371
371
  height: 128px;
372
372
  max-height: max-content;
373
373
  border-radius: 2px;
374
- `,hn=h.div`
374
+ `,mi=m.div`
375
375
  display: flex;
376
376
  height: 100%;
377
377
  padding: 20px;
@@ -392,9 +392,9 @@
392
392
  }
393
393
  &.isActiveLightColor {
394
394
  /* var(--color-bg-secondary, #232323); */
395
- border-left: 4px solid ${n=>n.color};
395
+ border-left: 4px solid ${r=>r.color};
396
396
  }
397
- `,xn=h.span`
397
+ `,xi=m.span`
398
398
  color: var(--color-text-primary, #fff);
399
399
 
400
400
  /* subheading/medium */
@@ -404,7 +404,7 @@
404
404
  font-weight: var(--text-weight-medium, 500);
405
405
  line-height: var(--typo-subheading-lineHeight-medium, 28px); /* 116.667% */
406
406
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
407
- `,bn=h.span`
407
+ `,vi=m.span`
408
408
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
409
409
 
410
410
  /* caption/medium-r */
@@ -414,7 +414,7 @@
414
414
  font-weight: var(--text-weight-regular, 400);
415
415
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
416
416
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
417
- `;h.span`
417
+ `;m.span`
418
418
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
419
419
 
420
420
  /* caption/small */
@@ -424,12 +424,12 @@
424
424
  font-weight: var(--text-weight-regular, 400);
425
425
  line-height: var(--typo-caption-lineHeight-small, 16px); /* 133.333% */
426
426
  letter-spacing: var(--typo-caption-spacing-small, 0.1px);
427
- `;const yn=h.span`
428
- color: ${n=>n.color};
427
+ `;const yi=m.span`
428
+ color: ${r=>r.color};
429
429
  font-size: 12px;
430
- `,qt=({boxBottomText:n,boxTopText:e,onClick:t,className:r,color:a,commissionStatus:o})=>i.jsx(i.Fragment,{children:i.jsx(mn,{children:i.jsxs(hn,{color:a,onClick:t,className:r,children:[i.jsx(bn,{children:e}),i.jsx(xn,{children:n}),o&&e===G("Commission")&&i.jsx(yn,{color:a,children:o})]})})}),vn=({pageTitle:n,pageDesc:e,logoPrimaryUrl:t,shortName:r,colorPrimary:a,children:o})=>{const[s]=X.useSearchParams(),l=s.get("backPath"),d=X.useNavigate();function c(u){d(u)}return i.jsxs(rn,{children:[i.jsxs(on,{children:[i.jsx("header",{children:l&&i.jsx(an,{onClick:()=>c(l),children:i.jsx(gn,{})})}),i.jsx(sn,{children:i.jsxs(ln,{children:[i.jsx(pn,{children:n}),i.jsx(dn,{children:e})]})}),i.jsx(un,{children:i.jsx(qt,{boxTopText:i.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:i.jsx(nn,{children:r})})}),o,i.jsxs(fn,{children:[i.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),i.jsxs("nav",{children:[i.jsx("a",{href:"",children:i.jsx(Ct,{children:re("TermsOfUsage")})}),i.jsx("a",{href:"",children:i.jsx(Ct,{children:re("PrivacyPolicy")})})]})]})]}),i.jsx(cn,{backgroundcolor:a,children:i.jsx("img",{src:t,alt:"logo"})})]})};var fe=(n=>(n[n.TABLE=0]="TABLE",n[n.LIST=1]="LIST",n[n.BOARD=2]="BOARD",n))(fe||{}),ee=(n=>(n[n.ASC=0]="ASC",n[n.DESC=1]="DESC",n))(ee||{}),ve=(n=>(n[n.NONE=0]="NONE",n[n.COLUMN=1]="COLUMN",n[n.TYPE=2]="TYPE",n[n.VALUE=3]="VALUE",n))(ve||{}),se=(n=>(n[n.INPUT=0]="INPUT",n[n.SELECT=1]="SELECT",n[n.TwoComponentSelect=2]="TwoComponentSelect",n[n.DATEPICKER=3]="DATEPICKER",n[n.MULTISELECT=4]="MULTISELECT",n))(se||{});const jt=n=>{let e;const t=new Set,r=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const m=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,m))}},a=()=>e,l={setState:r,getState:a,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=n(r,a,l);return l},wn=(n=>n?jt(n):jt),Zt={Page:1,PageSize:25},kt={filters:Zt,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:fe.TABLE},Sn=()=>wn((n,e)=>({columns:[],...kt,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>n({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>n(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,r=fe.TABLE)=>{if(e().isHydrated)return;const a=sessionStorage.getItem(t);if(a)try{const o=JSON.parse(a);n({filters:o.filters??Zt,filterItems:o.filterItems??[],sortItems:o.sortItems??[],activeTableView:o.activeTableView??r,hideItems:o.hideItems??{},groupByArr:o.groupByArr??[],selectedConfig:o.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}n({activeTableView:r,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>n({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>n({checkedValue:t}),hasSelect:!1,setHasSelect:t=>n({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&n({filters:t})},setSortItems:t=>{e().isHydrated&&(n({sortItems:t}),n(r=>{const{Sort:a,Asc:o,...s}=r.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===ee.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,r=!1)=>{if(!e().isHydrated||(n({filterItems:t}),!r))return;const{filters:a,sortItems:o}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=a,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),n({filters:{Page:1,PageSize:s,QuickSearch:c||"",...o.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>n({hideItems:t}),setGroupByArr:t=>n({groupByArr:t}),setActiveTableView:t=>n({activeTableView:t}),setColumns:t=>n({columns:t}),resetStore:()=>{n({...kt,isHydrated:!0,selectedConfig:null})}})),Jt=S.createContext(null),Cn=({children:n})=>{const e=S.useRef();return e.current||(e.current=Sn()),i.jsx(Jt.Provider,{value:e.current,children:n})},E=n=>{const e=S.useContext(Jt);if(!e)throw new Error("GridViewStoreProvider is missing");return at.useStore(e,n)},jn=()=>{const n=E(u=>u.hydrateFromStorage),e=E(u=>u.isHydrated),t=E(u=>u.filters),r=E(u=>u.filterItems),a=E(u=>u.sortItems),o=E(u=>u.hideItems),s=E(u=>u.groupByArr),l=E(u=>u.activeTableView),d=E(u=>u.selectedConfig),c=X.useLocation();S.useEffect(()=>(n(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),S.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:r,sortItems:a,activeTableView:l,hideItems:o,groupByArr:s,selectedConfig:d}))},[t,r,a,l,o,s,d,e])};function Xt(n){const[e,t]=S.useState(0);return S.useEffect(()=>{if(!n.current)return;const r=new ResizeObserver(([a])=>{t(a.contentRect.height)});return r.observe(n.current),t(n.current.clientHeight),()=>r.disconnect()},[n]),e}const{RangePicker:kn}=T.DatePicker,Ln=h.div`
430
+ `,Pr=({boxBottomText:r,boxTopText:e,onClick:t,className:n,color:i,commissionStatus:a})=>o.jsx(o.Fragment,{children:o.jsx(gi,{children:o.jsxs(mi,{color:i,onClick:t,className:n,children:[o.jsx(vi,{children:e}),o.jsx(xi,{children:r}),a&&e===V("Commission")&&o.jsx(yi,{color:i,children:a})]})})}),bi=({pageTitle:r,pageDesc:e,logoPrimaryUrl:t,shortName:n,colorPrimary:i,children:a})=>{const[s]=re.useSearchParams(),l=s.get("backPath"),d=re.useNavigate();function c(u){d(u)}return o.jsxs(ni,{children:[o.jsxs(oi,{children:[o.jsx("header",{children:l&&o.jsx(ai,{onClick:()=>c(l),children:o.jsx(hi,{})})}),o.jsx(si,{children:o.jsxs(li,{children:[o.jsx(pi,{children:r}),o.jsx(di,{children:e})]})}),o.jsx(ui,{children:o.jsx(Pr,{boxTopText:o.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:o.jsx(ii,{children:n})})}),a,o.jsxs(fi,{children:[o.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),o.jsxs("nav",{children:[o.jsx("a",{href:"",children:o.jsx(qt,{children:G("TermsOfUsage")})}),o.jsx("a",{href:"",children:o.jsx(qt,{children:G("PrivacyPolicy")})})]})]})]}),o.jsx(ci,{backgroundcolor:i,children:o.jsx("img",{src:t,alt:"logo"})})]})};var we=(r=>(r[r.TABLE=0]="TABLE",r[r.LIST=1]="LIST",r[r.BOARD=2]="BOARD",r))(we||{}),ae=(r=>(r[r.ASC=0]="ASC",r[r.DESC=1]="DESC",r))(ae||{}),Te=(r=>(r[r.NONE=0]="NONE",r[r.COLUMN=1]="COLUMN",r[r.TYPE=2]="TYPE",r[r.VALUE=3]="VALUE",r))(Te||{}),fe=(r=>(r[r.INPUT=0]="INPUT",r[r.SELECT=1]="SELECT",r[r.TwoComponentSelect=2]="TwoComponentSelect",r[r.DATEPICKER=3]="DATEPICKER",r[r.MULTISELECT=4]="MULTISELECT",r))(fe||{});const Zt=r=>{let e;const t=new Set,n=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const f=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(h=>h(e,f))}},i=()=>e,l={setState:n,getState:i,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=r(n,i,l);return l},wi=(r=>r?Zt(r):Zt),zr={Page:1,PageSize:25},Jt={filters:zr,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:we.TABLE},Ci=()=>wi((r,e)=>({columns:[],...Jt,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>r({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>r(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,n=we.TABLE)=>{if(e().isHydrated)return;const i=sessionStorage.getItem(t);if(i)try{const a=JSON.parse(i);r({filters:a.filters??zr,filterItems:a.filterItems??[],sortItems:a.sortItems??[],activeTableView:a.activeTableView??n,hideItems:a.hideItems??{},groupByArr:a.groupByArr??[],selectedConfig:a.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}r({activeTableView:n,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>r({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>r({checkedValue:t}),hasSelect:!1,setHasSelect:t=>r({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&r({filters:t})},setSortItems:t=>{e().isHydrated&&(r({sortItems:t}),r(n=>{const{Sort:i,Asc:a,...s}=n.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===ae.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,n=!1)=>{if(!e().isHydrated||(r({filterItems:t}),!n))return;const{filters:i,sortItems:a}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=i,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),r({filters:{Page:1,PageSize:s,QuickSearch:c||"",...a.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>r({hideItems:t}),setGroupByArr:t=>r({groupByArr:t}),setActiveTableView:t=>r({activeTableView:t}),setColumns:t=>r({columns:t}),resetStore:()=>{r({...Jt,isHydrated:!0,selectedConfig:null})}})),Hr=x.createContext(null),ji=({children:r})=>{const e=x.useRef();return e.current||(e.current=Ci()),o.jsx(Hr.Provider,{value:e.current,children:r})},D=r=>{const e=x.useContext(Hr);if(!e)throw new Error("GridViewStoreProvider is missing");return Ot.useStore(e,r)},Si=()=>{const r=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),n=D(u=>u.filterItems),i=D(u=>u.sortItems),a=D(u=>u.hideItems),s=D(u=>u.groupByArr),l=D(u=>u.activeTableView),d=D(u=>u.selectedConfig),c=re.useLocation();x.useEffect(()=>(r(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),x.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:n,sortItems:i,activeTableView:l,hideItems:a,groupByArr:s,selectedConfig:d}))},[t,n,i,l,a,s,d,e])};function Rr(r){const[e,t]=x.useState(0);return x.useEffect(()=>{if(!r.current)return;const n=new ResizeObserver(([i])=>{t(i.contentRect.height)});return n.observe(r.current),t(r.current.clientHeight),()=>n.disconnect()},[r]),e}const{RangePicker:ki}=T.DatePicker,Li=m.div`
431
431
  background: var(--color-bg-primary, #fff);
432
- `,Dn=h.div`
432
+ `,Ei=m.div`
433
433
  height: var(--size-800, 4rem);
434
434
  display: flex;
435
435
  justify-content: space-between;
@@ -562,7 +562,7 @@
562
562
  overflow-y: auto;
563
563
  }
564
564
  }
565
- `,$n=h.div``;h(T.Table)`
565
+ `,Oi=m.div``;m(T.Table)`
566
566
  .ant-table-thead {
567
567
  tr {
568
568
  th {
@@ -617,7 +617,7 @@
617
617
  }
618
618
  }
619
619
  }
620
- `;const ct=h.div`
620
+ `;const Mt=m.div`
621
621
  border-radius: var(--border-radius-025, 0.125rem);
622
622
  /* background: var(--color-bg-secondary, #f5f5f5);
623
623
  box-shadow:
@@ -698,7 +698,7 @@
698
698
  width: calc(100vw - 32px);
699
699
  }
700
700
  }
701
- `,En=h.div`
701
+ `,Di=m.div`
702
702
  display: flex;
703
703
  flex-wrap: wrap;
704
704
  gap: 0.12rem;
@@ -710,7 +710,7 @@
710
710
  inset-inline-start: 16px !important;
711
711
  }
712
712
  }
713
- `,et=h.div`
713
+ `,bt=m.div`
714
714
  display: flex;
715
715
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
716
716
  font-family: var(--text-font-family-base, Geist);
@@ -759,7 +759,7 @@
759
759
  border-left: 1px solid var(--color-border-primary, rgba(20, 20, 20, 0.05));
760
760
  }
761
761
  }
762
- `,On=h.div`
762
+ `,Ti=m.div`
763
763
  display: flex;
764
764
  align-items: center;
765
765
  justify-content: flex-end;
@@ -786,12 +786,12 @@
786
786
  }
787
787
  }
788
788
  }
789
- `,Qt=h(kn)`
789
+ `,Nr=m(ki)`
790
790
  height: 0;
791
791
  padding: 0 !important;
792
792
  overflow: hidden;
793
793
  border: none !important;
794
- `,Tn=h.span`
794
+ `,$i=m.span`
795
795
  color: var(--color-text-primary, #fff);
796
796
 
797
797
  /* caption/medium-r */
@@ -801,25 +801,25 @@
801
801
  font-weight: var(--text-weight-regular, 400);
802
802
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
803
803
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
804
- `,In=h.div`
804
+ `,Ii=m.div`
805
805
  display: flex;
806
806
  min-height: var(--size-400, 32px);
807
807
  padding: var(--spacing-050, 4px) var(--spacing-150, 12px) !important;
808
808
  gap: var(--spacing-150, 12px);
809
809
  align-self: stretch;
810
- `,zn=h.div`
810
+ `,Mi=m.div`
811
811
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
812
812
 
813
813
  background: var(--color-bg-secondary, #232323);
814
814
  display: flex;
815
815
  padding-left: 30px !important;
816
816
  gap: 8px;
817
- `,Pn=h.div`
817
+ `,Pi=m.div`
818
818
  max-height: 300px;
819
819
  overflow: hidden;
820
- `,Mn=h.div`
821
- height: ${n=>n.height||"100%"};
822
- `,Ae=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),P.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),P.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),er=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),tr=n=>P.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),P.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),P.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),P.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),dt=(n,e,t=[])=>{const r=S.useMemo(()=>Rr.debounce(n,e),t);return S.useEffect(()=>()=>{r.cancel()},[r]),r},pt=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),ut=n=>P.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),Hn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),P.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Rn=({children:n,overlay:e,placement:t="bottomRight"})=>{const[r,a]=S.useState(!1);return i.jsx(T.Dropdown,{open:r,onOpenChange:a,placement:t,popupRender:()=>typeof e=="function"?e(a):e,trigger:["click"],children:i.jsx("button",{className:"icon",children:n})})},rr=({placement:n,children:e})=>{const t=E(f=>f.columns),r=E(f=>f.sortItems),a=E(f=>f.setSortItems),o=r[0],[s,l]=S.useState(""),[d,c]=S.useState((o==null?void 0:o.direction)===ee.ASC?ee.ASC:ee.DESC),u=t.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())&&f.sortable!==!1);function p(f,g){a([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function m(){a([])}return i.jsx(Rn,{overlay:f=>i.jsxs(ct,{children:[i.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),i.jsx("div",{children:u.map((g,b)=>i.jsxs("button",{onClick:()=>{g.title==(o==null?void 0:o.title)?m():p(g,d)},children:[g.title,g.title==(o==null?void 0:o.title)&&i.jsx("span",{children:i.jsx(Ee,{})})]},b))}),i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>{c(ee.ASC),o&&p(o,ee.ASC)},children:[i.jsx(pt,{}),"Ascending",d===ee.ASC&&i.jsx(Ee,{})]}),i.jsxs("button",{onClick:()=>{c(ee.DESC),o&&p(o,ee.DESC)},children:[i.jsx(ut,{}),"Descending",d===ee.DESC&&i.jsx(Ee,{})]})]})]}),placement:n||"bottomRight",children:e||i.jsx(Hn,{})})},ft=({placement:n,children:e,onSelect:t,CustomFilters:r})=>{const[a,o]=S.useState(!1),[s,l]=S.useState(""),d=E(m=>m.columns),c=E(m=>m.filterItems),u=E(m=>m.setFilterItems);function p(m){t?t(m):u([...c,{...m,selectType:ve.VALUE}]),o(!1)}return i.jsx(T.Dropdown,{open:a,onOpenChange:o,placement:n||"bottomRight",popupRender:()=>i.jsxs(ct,{children:[i.jsx("input",{type:"text",placeholder:oe("Search")+"...",value:s,onChange:m=>l(m.target.value)}),i.jsx("div",{children:d.filter(m=>m.filterable!==!1).filter(m=>!c.some(f=>f.title==m.title)).filter(m=>m.filterable!==!1).filter(m=>m.title.toLowerCase().includes(s)).map((m,f)=>i.jsx("button",{onClick:()=>p(m),children:m.title},f))}),r&&i.jsx(r,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:o})]}),trigger:["click"],children:i.jsx("button",{className:"icon",children:e})})},Fn={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Nn={okText:"Create",cancelText:"Cancel"},he=at.create((n,e)=>{const t=r=>({...r,popupOptions:{...Fn,...r.popupOptions},footerOptions:{...Nn,...r.footerOptions},hideFooter:r.hideFooter??!1,onCancel:r.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:r=>n({options:t(r)}),openModal:r=>n({isOpen:!0,options:t(r)}),open:()=>n(r=>r.options?{...r,isOpen:!0}:r),close:()=>n({isOpen:!1}),setOnOk:r=>n(a=>a.options?{options:{...a.options,onOk:r}}:a),setOnCancel:r=>n(a=>a.options?{options:{...a.options,onCancel:r}}:a),setComponentProps:r=>n(a=>a.options?{options:{...a.options,componentProps:{...a.options.componentProps,...r}}}:a),setPopupOptions:r=>n(a=>a.options?{options:{...a.options,popupOptions:{...a.options.popupOptions,...r}}}:a),setFooterOptions:r=>n(a=>a.options?{options:{...a.options,footerOptions:r==null?void 0:{...a.options.footerOptions,...r}}}:a),setHideFooter:r=>n(a=>a.options?{options:{...a.options,hideFooter:r,footerOptions:r?void 0:a.options.footerOptions}}:a),setTitle:r=>n(a=>a.options?{options:{...a.options,title:r}}:a)}}),Lt=h(T.Select)`
820
+ `,zi=m.div`
821
+ height: ${r=>r.height||"100%"};
822
+ `,at=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),$.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),$.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Ar=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),Fr=r=>$.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),$.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),$.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),$.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),Pt=(r,e,t=[])=>{const n=x.useMemo(()=>Nn.debounce(r,e),t);return x.useEffect(()=>()=>{n.cancel()},[n]),n},zt=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),Ht=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),Hi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),$.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Ri=({children:r,overlay:e,placement:t="bottomRight"})=>{const[n,i]=x.useState(!1);return o.jsx(T.Dropdown,{open:n,onOpenChange:i,placement:t,popupRender:()=>typeof e=="function"?e(i):e,trigger:["click"],children:o.jsx("button",{className:"icon",children:r})})},Vr=({placement:r,children:e})=>{const t=D(h=>h.columns),n=D(h=>h.sortItems),i=D(h=>h.setSortItems),a=n[0],[s,l]=x.useState(""),[d,c]=x.useState((a==null?void 0:a.direction)===ae.ASC?ae.ASC:ae.DESC),u=t.filter(h=>h.title.toLowerCase().includes(s.toLowerCase())&&h.sortable!==!1);function p(h,g){i([{title:h.title,dataIndex:h.dataIndex.charAt(0).toUpperCase()+h.dataIndex.slice(1),direction:g}])}function f(){i([])}return o.jsx(Ri,{overlay:h=>o.jsxs(Mt,{children:[o.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),o.jsx("div",{children:u.map((g,v)=>o.jsxs("button",{onClick:()=>{g.title==(a==null?void 0:a.title)?f():p(g,d)},children:[g.title,g.title==(a==null?void 0:a.title)&&o.jsx("span",{children:o.jsx(Ue,{})})]},v))}),o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>{c(ae.ASC),a&&p(a,ae.ASC)},children:[o.jsx(zt,{}),"Ascending",d===ae.ASC&&o.jsx(Ue,{})]}),o.jsxs("button",{onClick:()=>{c(ae.DESC),a&&p(a,ae.DESC)},children:[o.jsx(Ht,{}),"Descending",d===ae.DESC&&o.jsx(Ue,{})]})]})]}),placement:r||"bottomRight",children:e||o.jsx(Hi,{})})},Rt=({placement:r,children:e,onSelect:t,CustomFilters:n})=>{const[i,a]=x.useState(!1),[s,l]=x.useState(""),d=D(f=>f.columns),c=D(f=>f.filterItems),u=D(f=>f.setFilterItems);function p(f){t?t(f):u([...c,{...f,selectType:Te.VALUE}]),a(!1)}return o.jsx(T.Dropdown,{open:i,onOpenChange:a,placement:r||"bottomRight",popupRender:()=>o.jsxs(Mt,{children:[o.jsx("input",{type:"text",placeholder:Z("Search")+"...",value:s,onChange:f=>l(f.target.value)}),o.jsx("div",{children:d.filter(f=>f.filterable!==!1).filter(f=>!c.some(h=>h.title==f.title)).filter(f=>f.filterable!==!1).filter(f=>f.title.toLowerCase().includes(s)).map((f,h)=>o.jsx("button",{onClick:()=>p(f),children:f.title},h))}),n&&o.jsx(n,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:a})]}),trigger:["click"],children:o.jsx("button",{className:"icon",children:e})})},Ni={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Ai={okText:"Create",cancelText:"Cancel"},Le=Ot.create((r,e)=>{const t=n=>({...n,popupOptions:{...Ni,...n.popupOptions},footerOptions:{...Ai,...n.footerOptions},hideFooter:n.hideFooter??!1,onCancel:n.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:n=>r({options:t(n)}),openModal:n=>r({isOpen:!0,options:t(n)}),open:()=>r(n=>n.options?{...n,isOpen:!0}:n),close:()=>r({isOpen:!1}),setOnOk:n=>r(i=>i.options?{options:{...i.options,onOk:n}}:i),setOnCancel:n=>r(i=>i.options?{options:{...i.options,onCancel:n}}:i),setComponentProps:n=>r(i=>i.options?{options:{...i.options,componentProps:{...i.options.componentProps,...n}}}:i),setPopupOptions:n=>r(i=>i.options?{options:{...i.options,popupOptions:{...i.options.popupOptions,...n}}}:i),setFooterOptions:n=>r(i=>i.options?{options:{...i.options,footerOptions:n==null?void 0:{...i.options.footerOptions,...n}}}:i),setHideFooter:n=>r(i=>i.options?{options:{...i.options,hideFooter:n,footerOptions:n?void 0:i.options.footerOptions}}:i),setTitle:n=>r(i=>i.options?{options:{...i.options,title:n}}:i)}}),Qt=m(T.Select)`
823
823
  width: 200px;
824
824
 
825
825
  display: flex;
@@ -846,7 +846,7 @@
846
846
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
847
847
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
848
848
  }
849
- `,Dt={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},gt=()=>{const{pathname:n}=X.useLocation(),e=Object.keys(Dt).find(t=>n===t||n.startsWith(t+"/"));return e?Dt[e]:void 0};function nr(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Vn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:a,hasSelect:o,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=X.useNavigate(),u=E(y=>y.filters),p=E(y=>y.hasCreateBtn),m=E(y=>y.setFilters),f=E(y=>y.setFilterItems),g=E(y=>y.setSortItems),[b,D]=S.useState(()=>{var y,w;try{const O=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return O?!!((w=(y=JSON.parse(O))==null?void 0:y.filters)!=null&&w.QuickSearch):!1}catch{return!1}}),[z,C]=S.useState(!1),{open:$}=he(),[k,M]=S.useState(!1),{getMyFilters:U}=ke(),W=gt(),[A,V]=S.useState([]),H=E(y=>y.selectedConfig),x=E(y=>y.setSelectedConfig),R=E(y=>y.configsVersion);S.useEffect(()=>{W==null||!U||U(String(W)).then(y=>V(y.data??[]))},[W,R,U]);function B(y){const w=A.find(N=>N.id===y);if(!w)return;const{filterItems:O,sortItems:I}=JSON.parse(w.value);f(O,!0),g(I),x({id:w.id,name:w.name})}const L=dt(y=>{m({...u,QuickSearch:y.target.value})},500);function j(){n(!0)}function v(){r?$():c("new")}return i.jsxs(Dn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>C(!0),children:i.jsx(tr,{})}),l&&i.jsx(l,{}),i.jsxs("div",{className:"page-actions",children:[A.length>0&&i.jsx(Lt,{showSearch:!0,placeholder:G("SavedConfiguration"),options:A.map(y=>({value:y.id,label:y.name})),value:(H==null?void 0:H.id)??null,filterOption:nr,onChange:y=>y!=null?B(y):x(null)}),o&&s&&i.jsx("div",{children:i.jsx(Lt,{options:s.options,placeholder:s.placeholder,onChange:y=>{s.onChange(y??null)}})}),t&&t(k,M),b?i.jsx("input",{type:"text",placeholder:oe("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:L}):i.jsx("button",{onClick:()=>D(!0),children:oe("Search")}),i.jsx(rr,{}),i.jsx(ft,{CustomFilters:e,children:i.jsx(Ae,{})}),i.jsx("button",{className:"icon",onClick:j,children:i.jsx(er,{})}),a&&a,p&&i.jsx("button",{onClick:v,className:"create-btn",children:oe("Create")})]}),z&&i.jsx(lt,{})]})},An=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),ar=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ue=class ue{static equals(e,t){const r=e??null,a=t??null;return r===a?!0:!r||!a?!1:r.getTime()===a.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,a=t.getDate(),o=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}/${l}/${o}`}static toLocal(e,t=!1,r=!1){const a=this.parseDate(e);return a?(t&&a.setHours(0,0,0,0),r&&a.setHours(23,59,59,999),this.utcToLocal(a)):null}static getDates(e,t){const r=new Array;let a=new Date(e.valueOf());for(;a<=t;)r.push(new Date(a)),a=this.addDays(a,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}/${r}/${a}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,a=e.getDate();return`${t}-${r}-${a}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate();return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,o=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${a<10?"0":""}${a}-${o<10?"0":""}${o} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],o=t.getDate(),s=t.getFullYear();return`${a} ${o}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),a=e.getMonth()+1,o=e.getDate(),s=`${r}/${a}/${o}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth();return`${r} ${o}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${a}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes(),o=t.getSeconds();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}:${o<10?"0":""}${o}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),a=t.getMinutes();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const r=e;return r.setFullYear(e.getFullYear()+t),r}static addMonths(e,t){if(!t)return e;const r=e;return r.setMonth(r.getMonth()+t),r}static addDays(e,t){if(!t)return e;const r=e;return r.setDate(r.getDate()+t),r}static addHours(e,t){if(!t)return e;const r=new Date(e);return r.setHours(r.getHours()+t),r}static addMinutes(e,t){if(!t)return e;const r=new Date(e);return r.setMinutes(r.getMinutes()+t),r}static addSeconds(e,t){if(!t)return e;const r=e;return r.setSeconds(r.getSeconds()+t),r}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const r=this.toDate(e),o=(t?t.getTime():Date.now())-r.getTime();return Math.floor(o/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,a=t<=e?e:t,o=t<=e?1:-1;let s=(a.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=a.getMonth(),s*o}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const r=t.getTime()-e.getTime();return Math.floor(r%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const r=parseFloat(e);if(!isNaN(e-r))return new Date(r);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[o,s,l]=e.split("-").map(d=>+d);return new Date(o,s-1,l)}let a;if(a=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(a)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let r=0,a=0;const o=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),a=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-a,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};Re(ue,"getCommonDateRange",e=>{let t=new Date,r=new Date;switch(e){case"week":r.setDate(t.getDate()-7);break;case"month":r.setDate(t.getDate()-30);break;case"threeMonth":r.setMonth(t.getMonth()-3),r.setDate(1);break;case"sixMonth":r.setMonth(t.getMonth()-6),r.setDate(1);break;case"twelveMonth":r.setMonth(t.getMonth()-12),r.setDate(1);break;case"year":r.setMonth(0),r.setDate(1);break;case"all":t=null,r=null;break;case"custom":break;default:r.setDate(t.getDate()-7)}return{startDate:r?ue.toISODateString(r):null,endDate:t?ue.toISODateString(t):null}}),Re(ue,"_utcDiff",-new Date().getTimezoneOffset()*6e4),Re(ue,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let te=ue;const Bn=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),mt=h(Bn)`
849
+ `,Xt={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},Nt=()=>{const{pathname:r}=re.useLocation(),e=Object.keys(Xt).find(t=>r===t||r.startsWith(t+"/"));return e?Xt[e]:void 0};function Br(r,e){return e.label.toLowerCase().includes(r.toLowerCase())||e.value==r}const Fi=({setisSettingPopupVisible:r,CustomFilters:e,tableAdditionalFields:t,createIsModal:n,exportButton:i,hasSelect:a,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=re.useNavigate(),u=D(b=>b.filters),p=D(b=>b.hasCreateBtn),f=D(b=>b.setFilters),h=D(b=>b.setFilterItems),g=D(b=>b.setSortItems),[v,L]=x.useState(()=>{var b,C;try{const I=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return I?!!((C=(b=JSON.parse(I))==null?void 0:b.filters)!=null&&C.QuickSearch):!1}catch{return!1}}),[M,j]=x.useState(!1),{open:O}=Le(),[S,z]=x.useState(!1),{getMyFilters:U}=me(),Y=Nt(),[B,F]=x.useState([]),H=D(b=>b.selectedConfig),y=D(b=>b.setSelectedConfig),R=D(b=>b.configsVersion);x.useEffect(()=>{Y==null||!U||U(String(Y)).then(b=>F(b.data??[]))},[Y,R,U]);function _(b){const C=B.find(A=>A.id===b);if(!C)return;const{filterItems:I,sortItems:P}=JSON.parse(C.value);h(I,!0),g(P),y({id:C.id,name:C.name})}const E=Pt(b=>{f({...u,QuickSearch:b.target.value})},500);function k(){r(!0)}function w(){n?O():c("new")}return o.jsxs(Ei,{children:[!d&&o.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:o.jsx(Fr,{})}),l&&o.jsx(l,{}),o.jsxs("div",{className:"page-actions",children:[B.length>0&&o.jsx(Qt,{showSearch:!0,placeholder:V("SavedConfiguration"),options:B.map(b=>({value:b.id,label:b.name})),value:(H==null?void 0:H.id)??null,filterOption:Br,onChange:b=>b!=null?_(b):y(null)}),a&&s&&o.jsx("div",{children:o.jsx(Qt,{options:s.options,placeholder:s.placeholder,onChange:b=>{s.onChange(b??null)}})}),t&&t(S,z),v?o.jsx("input",{type:"text",placeholder:Z("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:E}):o.jsx("button",{onClick:()=>L(!0),children:Z("Search")}),o.jsx(Vr,{}),o.jsx(Rt,{CustomFilters:e,children:o.jsx(at,{})}),o.jsx("button",{className:"icon",onClick:k,children:o.jsx(Ar,{})}),i&&i,p&&o.jsx("button",{onClick:w,className:"create-btn",children:Z("Create")})]}),M&&o.jsx(It,{})]})},Vi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),_r=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),be=class be{static equals(e,t){const n=e??null,i=t??null;return n===i?!0:!n||!i?!1:n.getTime()===i.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const n=t.getMonth()+1,i=t.getDate(),a=t.getFullYear(),s=n<10?`0${n}`:`${n}`,l=i<10?`0${i}`:`${i}`;return`${s}/${l}/${a}`}static toLocal(e,t=!1,n=!1){const i=this.parseDate(e);return i?(t&&i.setHours(0,0,0,0),n&&i.setHours(23,59,59,999),this.utcToLocal(i)):null}static getDates(e,t){const n=new Array;let i=new Date(e.valueOf());for(;i<=t;)n.push(new Date(i)),i=this.addDays(i,1);return n}static dateOnly(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}/${n}/${i}`}static dateWithDashes(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}-${n}-${i}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,a=t.getDate();return`${n}-${i<10?"0":""}${i}-${a<10?"0":""}${a}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,a=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${n}-${i<10?"0":""}${i}-${a<10?"0":""}${a} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=t.getDate(),s=t.getFullYear();return`${i} ${a}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=e.getFullYear(),i=e.getMonth()+1,a=e.getDate(),s=`${n}/${i}/${a}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=t.getDate(),a=t.getMonth();return`${n} ${a}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),i=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${n}, ${i}`}static toISOTimeString(e){const t=be.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes(),a=t.getSeconds();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}:${a<10?"0":""}${a}`}static toTimeInput(e){const t=be.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const n=e;return n.setFullYear(e.getFullYear()+t),n}static addMonths(e,t){if(!t)return e;const n=e;return n.setMonth(n.getMonth()+t),n}static addDays(e,t){if(!t)return e;const n=e;return n.setDate(n.getDate()+t),n}static addHours(e,t){if(!t)return e;const n=new Date(e);return n.setHours(n.getHours()+t),n}static addMinutes(e,t){if(!t)return e;const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}static addSeconds(e,t){if(!t)return e;const n=e;return n.setSeconds(n.getSeconds()+t),n}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const n=this.toDate(e),a=(t?t.getTime():Date.now())-n.getTime();return Math.floor(a/864e5/365.25)}static subtractMonths(e,t){const n=t<=e?t:e,i=t<=e?e:t,a=t<=e?1:-1;let s=(i.getFullYear()-n.getFullYear())*12;return s-=n.getMonth(),s+=i.getMonth(),s*a}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const n=parseFloat(e);if(!isNaN(e-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[a,s,l]=e.split("-").map(d=>+d);return new Date(a,s-1,l)}let i;if(i=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(i)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let n=0,i=0;const a=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),a.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-n,d=Number(e[5]||0)-i,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};et(be,"getCommonDateRange",e=>{let t=new Date,n=new Date;switch(e){case"week":n.setDate(t.getDate()-7);break;case"month":n.setDate(t.getDate()-30);break;case"threeMonth":n.setMonth(t.getMonth()-3),n.setDate(1);break;case"sixMonth":n.setMonth(t.getMonth()-6),n.setDate(1);break;case"twelveMonth":n.setMonth(t.getMonth()-12),n.setDate(1);break;case"year":n.setMonth(0),n.setDate(1);break;case"all":t=null,n=null;break;case"custom":break;default:n.setDate(t.getDate()-7)}return{startDate:n?be.toISODateString(n):null,endDate:t?be.toISODateString(t):null}}),et(be,"_utcDiff",-new Date().getTimezoneOffset()*6e4),et(be,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let oe=be;const Bi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),At=m(Bi)`
850
850
  width: 25px;
851
851
  height: 25px;
852
852
  cursor: pointer;
@@ -858,7 +858,7 @@
858
858
  fill: var(--color-text-primary, #fff);
859
859
  }
860
860
  }
861
- `,We=h(T.Modal)`
861
+ `,dt=m(T.Modal)`
862
862
  display: flex;
863
863
  width: 420px;
864
864
  padding: var(--spacing-025, 2px);
@@ -911,7 +911,7 @@
911
911
  .ant-modal-mask {
912
912
  background: rgba(0, 0, 0, 0.25) !important;
913
913
  }
914
- `,or=h.div`
914
+ `,Ur=m.div`
915
915
  color: var(--color-text-primary, #fff);
916
916
  display: flex;
917
917
  padding: 24px 24px 0;
@@ -928,7 +928,7 @@
928
928
  font-weight: var(--text-weight-medium, 500);
929
929
  line-height: var(--typo-subheading-lineHeight-medium, 28px);
930
930
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
931
- `,ir=h.button`
931
+ `,Gr=m.button`
932
932
  color: var(--color-text-primary, #fff);
933
933
  display: flex;
934
934
  align-items: center;
@@ -945,7 +945,7 @@
945
945
  fill: var(--color-text-primary, #fff);
946
946
  }
947
947
  }
948
- `,Ye=h.div`
948
+ `,je=m.div`
949
949
  display: flex;
950
950
  align-items: start;
951
951
  flex-direction: column;
@@ -954,9 +954,9 @@
954
954
 
955
955
  border-radius: var(--border-radius-025, 2px);
956
956
  padding-bottom: var(--spacing-200, 16px);
957
- `,Gn=h.span`
957
+ `,_i=m.span`
958
958
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
959
- `,Ie=h.div`
959
+ `,le=m.div`
960
960
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
961
961
  font-family: var(--text-font-family-base, Geist);
962
962
  font-size: var(--typo-caption-size-medium, 14px);
@@ -966,12 +966,12 @@
966
966
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
967
967
  margin-bottom: 0.25rem;
968
968
  max-width: 350px;
969
- `,sr=h.div`
969
+ `,Re=m.div`
970
970
  padding-top: 2px;
971
971
  display: flex;
972
972
  width: 100%;
973
973
  background: var(--color-bg-secondary, #232323);
974
- `,Ke=h(T.Button)`
974
+ `,te=m(T.Button)`
975
975
  display: flex;
976
976
  height: var(--size-800, 64px);
977
977
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -997,9 +997,9 @@
997
997
  &:hover {
998
998
  border: none !important;
999
999
  }
1000
- `,lr=h.div`
1000
+ `,Wr=m.div`
1001
1001
  width: 50%;
1002
- `,ze=h(T.Button)`
1002
+ `,Ne=m(T.Button)`
1003
1003
  display: flex;
1004
1004
  height: var(--size-800, 64px);
1005
1005
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -1063,7 +1063,7 @@
1063
1063
  background: var(--color-bg-brand-special, #141414) !important;
1064
1064
  color: var(--color-text-inverse-primary, #fff) !important;
1065
1065
  }
1066
- `,Un=h(T.Button)`
1066
+ `,Ui=m(T.Button)`
1067
1067
  display: flex;
1068
1068
  height: var(--size-800, 64px);
1069
1069
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -1124,7 +1124,7 @@
1124
1124
  color: var(--color-text-inverse-primary, #fff) !important;
1125
1125
  background: var(--color-bg-status-error, #fd7f60) !important;
1126
1126
  }
1127
- `,ht=h(T.Input)`
1127
+ `,pt=m(T.Input)`
1128
1128
  input[type='number'] {
1129
1129
  &::-webkit-outer-spin-button,
1130
1130
  &::-webkit-inner-spin-button {
@@ -1195,7 +1195,7 @@
1195
1195
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
1196
1196
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1197
1197
  }
1198
- `,_n=n=>new Promise((e,t)=>{const r=new FileReader;r.readAsDataURL(n),r.onload=()=>e(r.result),r.onerror=a=>t(a)});function cr(n){return n&&n.charAt(0).toLowerCase()+n.slice(1)}const Wn=async n=>{try{await navigator.clipboard.writeText(n),T.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function dr(n,e){if(n.status===400){const t=n.response.data,r=[];for(const a in t.errors)r.push({name:cr(a),errors:t.errors[a]});e.setFields(r)}}const pr=({type:n,value:e,selectedConfig:t,onSuccess:r,postMyFilter:a,putMyFilter:o})=>{const[s]=T.Form.useForm(),l=he(c=>c.setOnOk),d=he(c=>c.close);return S.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),S.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await o({id:t.id,type:n,name:c.name,value:e??""}):await a({type:n,name:c.name,value:e??""}),r==null||r(c.name),d()}catch(c){const u=dr(c,s);s.setFields(u)}})},[n,e,t,r,s,l,d]),i.jsxs(T.Form,{form:s,children:[i.jsx(Ie,{children:G("ConfigurationName")}),i.jsx(T.Form.Item,{name:"name",children:i.jsx(ht,{})})]})},Yn=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),je=h(Yn)`
1198
+ `,Gi=r=>new Promise((e,t)=>{const n=new FileReader;n.readAsDataURL(r),n.onload=()=>e(n.result),n.onerror=i=>t(i)});function Yr(r){return r&&r.charAt(0).toLowerCase()+r.slice(1)}const Kr=async r=>{try{await navigator.clipboard.writeText(r),T.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function qr(r,e){if(r.status===400){const t=r.response.data,n=[];for(const i in t.errors)n.push({name:Yr(i),errors:t.errors[i]});e.setFields(n)}}const Zr=({type:r,value:e,selectedConfig:t,onSuccess:n,postMyFilter:i,putMyFilter:a})=>{const[s]=T.Form.useForm(),l=Le(c=>c.setOnOk),d=Le(c=>c.close);return x.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),x.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await a({id:t.id,type:r,name:c.name,value:e??""}):await i({type:r,name:c.name,value:e??""}),n==null||n(c.name),d()}catch(c){const u=qr(c,s);s.setFields(u)}})},[r,e,t,n,s,l,d]),o.jsxs(T.Form,{form:s,children:[o.jsx(le,{children:V("ConfigurationName")}),o.jsx(T.Form.Item,{name:"name",children:o.jsx(pt,{})})]})},Wi=r=>$.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),ce=m(Wi)`
1199
1199
  cursor: pointer;
1200
1200
  svg {
1201
1201
  width: 1rem;
@@ -1205,7 +1205,7 @@
1205
1205
  transition: 0.1s;
1206
1206
  }
1207
1207
  }
1208
- `,Kn=()=>i.jsx(Ye,{children:i.jsx("div",{children:i.jsx("p",{children:G("DeleteRecordQuestion")})})}),qn=h(T.Checkbox)`
1208
+ `,Yi=()=>o.jsx(je,{children:o.jsx("div",{children:o.jsx("p",{children:V("DeleteRecordQuestion")})})}),Ki=m(T.Checkbox)`
1209
1209
  .ant-checkbox-inner {
1210
1210
  background-color: transparent;
1211
1211
  border: 1px solid #ccc;
@@ -1230,7 +1230,7 @@
1230
1230
  .ant-checkbox-checked .ant-checkbox-inner::after {
1231
1231
  border-color: black;
1232
1232
  }
1233
- `,Zn=({item:n})=>{var C,$,k,M,U,W,A,V,H;const e=S.useRef(null),t=E(x=>x.filterItems),r=E(x=>x.setFilterItems),[a,o]=S.useState(n.selectType==ve.VALUE);function s(){var x;(x=e==null?void 0:e.current)==null||x.focus()}function l(x){r(t.map(R=>R.title==n.title?{...R,filterValue:x.id,filterLabel:x.name}:R),!0),o(!1)}function d(x,R=!1){r(t.map(B=>B.title==n.title?{...B,filterValue:x.id,filterLabel:x.name,isCountryGroup:R}:B),!0),o(!1)}const[c,u]=S.useState(n.filterValue||[]),p=x=>{var L,j;const R=c.includes(x)?c.filter(v=>v!==x):[...c,x];u(R);const B=(j=(L=n==null?void 0:n.filters)==null?void 0:L.options)==null?void 0:j.filter(v=>R.includes(v.id)).map(v=>v.name).join(", ");r(t.map(v=>v.title===n.title?{...v,filterValue:R,filterLabel:B||""}:v),!0)};function m(x){r(t.map(R=>R.title==n.title?{...x,selectType:ve.VALUE}:R))}const f=dt(x=>{const R=x.target.value;r(t.map(B=>B.title==n.title?{...B,filterValue:R}:B),!0)},500);function g(x){r(t.map(R=>R.title==n.title?{...R,selectType:ve.NONE}:R)),o(x)}function b(){r(t.filter(x=>x.title!=n.title),!0)}S.useEffect(()=>{var x;a&&((x=n==null?void 0:n.filters)==null?void 0:x.type)!==se.SELECT&&setTimeout(()=>{s()},0)},[a]);const D={[se.INPUT]:i.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[se.SELECT]:i.jsx("div",{children:($=(C=n==null?void 0:n.filters)==null?void 0:C.options)==null?void 0:$.map(x=>i.jsx("button",{onClick:()=>l(x),children:x.name},x.id))}),[se.TwoComponentSelect]:i.jsxs(i.Fragment,{children:[i.jsx(zn,{children:(k=n==null?void 0:n.filters)==null?void 0:k.firstGroupName}),i.jsx(Pn,{children:(U=(M=n==null?void 0:n.filters)==null?void 0:M.options)==null?void 0:U.map(x=>i.jsx("button",{onClick:()=>d(x,!1),children:x.name},x.id))})]}),[se.MULTISELECT]:i.jsx("div",{children:(A=(W=n==null?void 0:n.filters)==null?void 0:W.options)==null?void 0:A.map(x=>i.jsx(In,{children:i.jsx(qn,{onChange:()=>p(x==null?void 0:x.id),children:i.jsx(Tn,{children:x.name})})},x.id))}),[se.DATEPICKER]:i.jsx(Qt,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:x=>{if(!x)r(t.map(R=>R.title===n.title?{...R,filterValue:null,filterLabel:""}:R),!0);else{const R=x.map((B,L)=>{var j;return B?(j=te.toLocal(B,L===0,L===x.length-1))==null?void 0:j.toISOString():null});r(t.map(B=>B.title===n.title?{...B,filterValue:R,filterLabel:`${x[0].format("MMM D, YYYY")} → ${x[1].format("MMM D, YYYY")}`}:B),!0)}o(!1)},getPopupContainer:x=>{var R;return((R=x==null?void 0:x.parentElement)==null?void 0:R.parentElement)??document.body}})},z=i.jsx(ct,{style:{border:((V=n==null?void 0:n.filters)==null?void 0:V.type)===se.DATEPICKER?"none":"inherit"},children:D[((H=n==null?void 0:n.filters)==null?void 0:H.type)||se.INPUT]});return i.jsxs(et,{children:[i.jsx(ft,{placement:"bottomLeft",onSelect:m,children:i.jsxs("span",{children:[i.jsx(er,{}),n.title]})}),i.jsx(T.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:a,onOpenChange:g,popupRender:()=>z,trigger:["click"],getPopupContainer:x=>{var R;return((R=x==null?void 0:x.parentElement)==null?void 0:R.parentElement)??document.body},children:i.jsx("div",{children:n.filterValue?n.filterLabel?n.filterLabel:n.filterValue:"NotSelected"})}),i.jsx("span",{onClick:b,children:i.jsx(mt,{})})]})},Jn=()=>{const n=E(g=>g.filterItems),e=E(g=>g.sortItems),t=E(g=>g.setSelectedConfig),r=E(g=>g.resetStore),a=E(g=>g.selectedConfig),{deleteMyFilter:o}=ke(),s=E(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=he(),u=gt();async function p(){try{if(!a||!o)return;await o(a.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function m(){d({component:Kn,title:a?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{onClick:()=>{p(),c(),r()},children:i.jsxs("span",{className:"arrow-styled",children:["Delete",i.jsx(je,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:n,sortItems:e});d({component:pr,componentProps:{type:u,value:g,selectedConfig:a,onSuccess:b=>{a&&t({...a,name:b}),s()}},title:a?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{children:i.jsxs("span",{className:"arrow-styled",children:["Save",i.jsx(je,{})]})}),cancelText:"Cancel"}}),l()}return i.jsxs(En,{children:[e.length>0&&i.jsx(rr,{placement:"bottomLeft",children:i.jsx(et,{className:"sort",children:i.jsxs("span",{children:[e[0].title,e[0].direction==ee.ASC?i.jsx(pt,{}):i.jsx(ut,{})]})})}),n.map(g=>i.jsx(Zn,{item:g},g.title)),i.jsx(ft,{placement:"bottomLeft",children:i.jsx(et,{className:"add-filter",children:i.jsxs("span",{children:[i.jsx(An,{}),"AddFilter"]})})}),i.jsxs(On,{children:[i.jsx("button",{onClick:f,children:a?"UpdateConfiguration":"SaveConfiguration"}),a&&i.jsx("button",{onClick:m,children:"DeleteConfiguration"}),i.jsxs("button",{onClick:r,children:[i.jsx(ar,{}),"ResetConditions"]})]})]})},Xn=h.div`
1233
+ `,qi=({item:r})=>{var j,O,S,z,U,Y,B,F,H;const e=x.useRef(null),t=D(y=>y.filterItems),n=D(y=>y.setFilterItems),[i,a]=x.useState(r.selectType==Te.VALUE);function s(){var y;(y=e==null?void 0:e.current)==null||y.focus()}function l(y){n(t.map(R=>R.title==r.title?{...R,filterValue:y.id,filterLabel:y.name}:R),!0),a(!1)}function d(y,R=!1){n(t.map(_=>_.title==r.title?{..._,filterValue:y.id,filterLabel:y.name,isCountryGroup:R}:_),!0),a(!1)}const[c,u]=x.useState(r.filterValue||[]),p=y=>{var E,k;const R=c.includes(y)?c.filter(w=>w!==y):[...c,y];u(R);const _=(k=(E=r==null?void 0:r.filters)==null?void 0:E.options)==null?void 0:k.filter(w=>R.includes(w.id)).map(w=>w.name).join(", ");n(t.map(w=>w.title===r.title?{...w,filterValue:R,filterLabel:_||""}:w),!0)};function f(y){n(t.map(R=>R.title==r.title?{...y,selectType:Te.VALUE}:R))}const h=Pt(y=>{const R=y.target.value;n(t.map(_=>_.title==r.title?{..._,filterValue:R}:_),!0)},500);function g(y){n(t.map(R=>R.title==r.title?{...R,selectType:Te.NONE}:R)),a(y)}function v(){n(t.filter(y=>y.title!=r.title),!0)}x.useEffect(()=>{var y;i&&((y=r==null?void 0:r.filters)==null?void 0:y.type)!==fe.SELECT&&setTimeout(()=>{s()},0)},[i]);const L={[fe.INPUT]:o.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:h}),[fe.SELECT]:o.jsx("div",{children:(O=(j=r==null?void 0:r.filters)==null?void 0:j.options)==null?void 0:O.map(y=>o.jsx("button",{onClick:()=>l(y),children:y.name},y.id))}),[fe.TwoComponentSelect]:o.jsxs(o.Fragment,{children:[o.jsx(Mi,{children:(S=r==null?void 0:r.filters)==null?void 0:S.firstGroupName}),o.jsx(Pi,{children:(U=(z=r==null?void 0:r.filters)==null?void 0:z.options)==null?void 0:U.map(y=>o.jsx("button",{onClick:()=>d(y,!1),children:y.name},y.id))})]}),[fe.MULTISELECT]:o.jsx("div",{children:(B=(Y=r==null?void 0:r.filters)==null?void 0:Y.options)==null?void 0:B.map(y=>o.jsx(Ii,{children:o.jsx(Ki,{onChange:()=>p(y==null?void 0:y.id),children:o.jsx($i,{children:y.name})})},y.id))}),[fe.DATEPICKER]:o.jsx(Nr,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:y=>{if(!y)n(t.map(R=>R.title===r.title?{...R,filterValue:null,filterLabel:""}:R),!0);else{const R=y.map((_,E)=>{var k;return _?(k=oe.toLocal(_,E===0,E===y.length-1))==null?void 0:k.toISOString():null});n(t.map(_=>_.title===r.title?{..._,filterValue:R,filterLabel:`${y[0].format("MMM D, YYYY")} → ${y[1].format("MMM D, YYYY")}`}:_),!0)}a(!1)},getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body}})},M=o.jsx(Mt,{style:{border:((F=r==null?void 0:r.filters)==null?void 0:F.type)===fe.DATEPICKER?"none":"inherit"},children:L[((H=r==null?void 0:r.filters)==null?void 0:H.type)||fe.INPUT]});return o.jsxs(bt,{children:[o.jsx(Rt,{placement:"bottomLeft",onSelect:f,children:o.jsxs("span",{children:[o.jsx(Ar,{}),r.title]})}),o.jsx(T.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:i,onOpenChange:g,popupRender:()=>M,trigger:["click"],getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body},children:o.jsx("div",{children:r.filterValue?r.filterLabel?r.filterLabel:r.filterValue:"NotSelected"})}),o.jsx("span",{onClick:v,children:o.jsx(At,{})})]})},Zi=()=>{const r=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),n=D(g=>g.resetStore),i=D(g=>g.selectedConfig),{deleteMyFilter:a}=me(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=Le(),u=Nt();async function p(){try{if(!i||!a)return;await a(i.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function f(){d({component:Yi,title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(Ne,{onClick:()=>{p(),c(),n()},children:o.jsxs("span",{className:"arrow-styled",children:["Delete",o.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}function h(){const g=JSON.stringify({filterItems:r,sortItems:e});d({component:Zr,componentProps:{type:u,value:g,selectedConfig:i,onSuccess:v=>{i&&t({...i,name:v}),s()}},title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(Ne,{children:o.jsxs("span",{className:"arrow-styled",children:["Save",o.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}return o.jsxs(Di,{children:[e.length>0&&o.jsx(Vr,{placement:"bottomLeft",children:o.jsx(bt,{className:"sort",children:o.jsxs("span",{children:[e[0].title,e[0].direction==ae.ASC?o.jsx(zt,{}):o.jsx(Ht,{})]})})}),r.map(g=>o.jsx(qi,{item:g},g.title)),o.jsx(Rt,{placement:"bottomLeft",children:o.jsx(bt,{className:"add-filter",children:o.jsxs("span",{children:[o.jsx(Vi,{}),"AddFilter"]})})}),o.jsxs(Ti,{children:[o.jsx("button",{onClick:h,children:i?"UpdateConfiguration":"SaveConfiguration"}),i&&o.jsx("button",{onClick:f,children:"DeleteConfiguration"}),o.jsxs("button",{onClick:n,children:[o.jsx(_r,{}),"ResetConditions"]})]})]})},Ji=m.div`
1234
1234
  height: 100%;
1235
1235
  display: flex;
1236
1236
  flex-direction: column;
@@ -1423,7 +1423,7 @@
1423
1423
  background: var(--color-interaction-press-primary) !important;
1424
1424
  }
1425
1425
  }
1426
- `,Qn=h.div`
1426
+ `,Qi=m.div`
1427
1427
  display: flex;
1428
1428
  flex-direction: column;
1429
1429
  background: var(--color-bg-quaternary, #fff);
@@ -1456,7 +1456,7 @@
1456
1456
  background: var(--color-bg-secondary, #f5f5f5);
1457
1457
  }
1458
1458
  }
1459
- `,ea=h.div`
1459
+ `,Xi=m.div`
1460
1460
  display: flex;
1461
1461
  justify-content: space-between;
1462
1462
  align-items: center;
@@ -1548,7 +1548,7 @@
1548
1548
  @media (max-width: 991px) {
1549
1549
  padding: 0 1rem;
1550
1550
  }
1551
- `,ta=h.div`
1551
+ `,ea=m.div`
1552
1552
  border-radius: var(--border-radius-025, 0.125rem);
1553
1553
  background: var(--color-bg-secondary, #232323);
1554
1554
  box-shadow:
@@ -1573,7 +1573,7 @@
1573
1573
  fill: var(--color-text-primary, #fff);
1574
1574
  }
1575
1575
  }
1576
- `;function $t(n,e){const t={};return e.forEach(r=>{const a=r[n.dataIndex];t[a]?t[a].push(r):t[a]=[r]}),t}function ra(n){return Object.values(n).reduce((e,t)=>e+t.length,0)}function na({item:n,columns:e,rowKey:t,onRowClick:r}){const a=E(o=>o.checkedValue);return i.jsx("tr",{onClick:r?()=>r(n):void 0,className:`${a&&a[n[t]]?"checked":""}`,children:e.map(o=>i.jsx("td",{children:o!=null&&o.render?o.render(n[o.dataIndex],n):n[o.dataIndex]},`${n[t]}-${o.dataIndex}`))},n[t])}function xt({rows:n,columns:e,rowKey:t,onRowClick:r}){return n.map(a=>i.jsx(na,{item:a,columns:e,rowKey:t,onRowClick:r},a[t]))}function aa({rowLength:n,columnLength:e}){return Array(n).fill(null).map((t,r)=>i.jsx("tr",{children:Array(e).fill(null).map((a,o)=>i.jsx("td",{children:i.jsx(T.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${r}-${o}`))},`skeleton-row-${r}`))}function oa({subGroups:n,columns:e,rowKey:t,onRowClick:r}){return i.jsx(i.Fragment,{children:Object.keys(n).map(a=>i.jsxs(S.Fragment,{children:[i.jsxs("tr",{className:"sub-group-header",children:[i.jsx("td",{}),i.jsx("td",{colSpan:e.length,children:i.jsxs("div",{children:[a," ",i.jsx("span",{children:n[a].length}),i.jsx("span",{className:"line"})]})})]}),i.jsx(xt,{rows:n[a],columns:e,rowKey:t,onRowClick:r})]},a))})}function ia({label:n,colSpan:e,count:t}){return i.jsxs("tr",{className:"main-group-header",children:[i.jsx("td",{}),i.jsxs("td",{colSpan:e,children:[n," ",i.jsx("span",{children:t})]}),i.jsx("td",{})]})}function sa({dataSource:n,columns:e,isSubGroupped:t,getGroupLength:r,rowKey:a,onRowClick:o}){return i.jsx(i.Fragment,{children:Object.keys(n).map(s=>{var l;return i.jsxs(S.Fragment,{children:[i.jsx(ia,{label:s,colSpan:e.length,count:t?r(n[s]):(l=n[s])==null?void 0:l.length}),t?i.jsx(oa,{subGroups:n[s],columns:e,rowKey:a,onRowClick:o}):i.jsx(xt,{rows:n[s],columns:e,rowKey:a,onRowClick:o})]},s)})})}function la({pagination:n,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:r}){const[a,o]=S.useState(!1);return i.jsxs(ea,{children:[i.jsx(T.Pagination,{current:n.current,pageSize:n.pageSize,total:t,showSizeChanger:!1,onChange:r}),i.jsx(T.Dropdown,{placement:"bottomRight",popupRender:()=>i.jsx(ta,{children:((n==null?void 0:n.items)||[{label:`10 ${G("Items")}`,value:10},{label:`25 ${G("Items")}`,value:25},{label:`50 ${G("Items")}`,value:50},{label:`100 ${G("Items")}`,value:100}]).map(s=>i.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==n.pageSize&&i.jsx(Ee,{})]},s.value))}),trigger:["click"],open:a,onOpenChange:o,children:i.jsxs("div",{className:"page-size-select-header",children:[n.pageSize," ",G("ItemsPerPage")," ",i.jsx(it,{})]})})]})}const ca=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),P.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function da({col:n}){const[e,t]=S.useState(!1),r=E(f=>f.filterItems),a=E(f=>f.hideItems),o=E(f=>f.setFilterItems),s=E(f=>f.setSortItems),l=E(f=>f.setHideItems);function d(f,g){s([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function c(f){const g=r.filter(b=>f.title!=b.title);o([...g,{...f,selectType:ve.VALUE}])}function u(f,g){l({...a,[f.dataIndex]:!0})}const p=()=>t(!1),m=[{icon:i.jsx(Ae,{}),text:G("Filter"),action:()=>c(n)},{icon:i.jsx(pt,{}),text:oe("Ascending"),action:()=>d(n,ee.ASC)},{icon:i.jsx(ut,{}),text:oe("Descending"),action:()=>d(n,ee.DESC)},{icon:i.jsx(ca,{}),text:G("HideInView"),action:()=>u(n)}];return n.filterDropdown===!1?i.jsx("th",{}):i.jsx(T.Dropdown,{placement:"bottomLeft",popupRender:()=>i.jsx(Qn,{children:m.map(({icon:f,text:g,action:b})=>i.jsxs("button",{onClick:()=>{b(),p()},children:[f,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:f=>(f==null?void 0:f.parentElement)??document.body,children:i.jsx("th",{className:e?"active":"",children:i.jsx("span",{children:n.title})})})}const pa=h.div`
1576
+ `;function er(r,e){const t={};return e.forEach(n=>{const i=n[r.dataIndex];t[i]?t[i].push(n):t[i]=[n]}),t}function ta(r){return Object.values(r).reduce((e,t)=>e+t.length,0)}function ra({item:r,columns:e,rowKey:t,onRowClick:n}){const i=D(a=>a.checkedValue);return o.jsx("tr",{onClick:n?()=>n(r):void 0,className:`${i&&i[r[t]]?"checked":""}`,children:e.map(a=>o.jsx("td",{children:a!=null&&a.render?a.render(r[a.dataIndex],r):r[a.dataIndex]},`${r[t]}-${a.dataIndex}`))},r[t])}function Ft({rows:r,columns:e,rowKey:t,onRowClick:n}){return r.map(i=>o.jsx(ra,{item:i,columns:e,rowKey:t,onRowClick:n},i[t]))}function na({rowLength:r,columnLength:e}){return Array(r).fill(null).map((t,n)=>o.jsx("tr",{children:Array(e).fill(null).map((i,a)=>o.jsx("td",{children:o.jsx(T.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${n}-${a}`))},`skeleton-row-${n}`))}function ia({subGroups:r,columns:e,rowKey:t,onRowClick:n}){return o.jsx(o.Fragment,{children:Object.keys(r).map(i=>o.jsxs(x.Fragment,{children:[o.jsxs("tr",{className:"sub-group-header",children:[o.jsx("td",{}),o.jsx("td",{colSpan:e.length,children:o.jsxs("div",{children:[i," ",o.jsx("span",{children:r[i].length}),o.jsx("span",{className:"line"})]})})]}),o.jsx(Ft,{rows:r[i],columns:e,rowKey:t,onRowClick:n})]},i))})}function aa({label:r,colSpan:e,count:t}){return o.jsxs("tr",{className:"main-group-header",children:[o.jsx("td",{}),o.jsxs("td",{colSpan:e,children:[r," ",o.jsx("span",{children:t})]}),o.jsx("td",{})]})}function oa({dataSource:r,columns:e,isSubGroupped:t,getGroupLength:n,rowKey:i,onRowClick:a}){return o.jsx(o.Fragment,{children:Object.keys(r).map(s=>{var l;return o.jsxs(x.Fragment,{children:[o.jsx(aa,{label:s,colSpan:e.length,count:t?n(r[s]):(l=r[s])==null?void 0:l.length}),t?o.jsx(ia,{subGroups:r[s],columns:e,rowKey:i,onRowClick:a}):o.jsx(Ft,{rows:r[s],columns:e,rowKey:i,onRowClick:a})]},s)})})}function sa({pagination:r,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:n}){const[i,a]=x.useState(!1);return o.jsxs(Xi,{children:[o.jsx(T.Pagination,{current:r.current,pageSize:r.pageSize,total:t,showSizeChanger:!1,onChange:n}),o.jsx(T.Dropdown,{placement:"bottomRight",popupRender:()=>o.jsx(ea,{children:((r==null?void 0:r.items)||[{label:`10 ${V("Items")}`,value:10},{label:`25 ${V("Items")}`,value:25},{label:`50 ${V("Items")}`,value:50},{label:`100 ${V("Items")}`,value:100}]).map(s=>o.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==r.pageSize&&o.jsx(Ue,{})]},s.value))}),trigger:["click"],open:i,onOpenChange:a,children:o.jsxs("div",{className:"page-size-select-header",children:[r.pageSize," ",V("ItemsPerPage")," ",o.jsx(Tt,{})]})})]})}const la=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),$.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function ca({col:r}){const[e,t]=x.useState(!1),n=D(h=>h.filterItems),i=D(h=>h.hideItems),a=D(h=>h.setFilterItems),s=D(h=>h.setSortItems),l=D(h=>h.setHideItems);function d(h,g){s([{title:h.title,dataIndex:h.dataIndex.charAt(0).toUpperCase()+h.dataIndex.slice(1),direction:g}])}function c(h){const g=n.filter(v=>h.title!=v.title);a([...g,{...h,selectType:Te.VALUE}])}function u(h,g){l({...i,[h.dataIndex]:!0})}const p=()=>t(!1),f=[{icon:o.jsx(at,{}),text:V("Filter"),action:()=>c(r)},{icon:o.jsx(zt,{}),text:Z("Ascending"),action:()=>d(r,ae.ASC)},{icon:o.jsx(Ht,{}),text:Z("Descending"),action:()=>d(r,ae.DESC)},{icon:o.jsx(la,{}),text:V("HideInView"),action:()=>u(r)}];return r.filterDropdown===!1?o.jsx("th",{}):o.jsx(T.Dropdown,{placement:"bottomLeft",popupRender:()=>o.jsx(Qi,{children:f.map(({icon:h,text:g,action:v})=>o.jsxs("button",{onClick:()=>{v(),p()},children:[h,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:h=>(h==null?void 0:h.parentElement)??document.body,children:o.jsx("th",{className:e?"active":"",children:o.jsx("span",{children:r.title})})})}const da=m.div`
1577
1577
  display: flex;
1578
1578
  height: 80vh;
1579
1579
  padding: 24px var(--spacing-300, 24px);
@@ -1582,13 +1582,13 @@
1582
1582
  flex-direction: column;
1583
1583
  text-align: center;
1584
1584
  gap: var(--spacing-400, 32px);
1585
- `,ua=h.div`
1585
+ `,pa=m.div`
1586
1586
  display: flex;
1587
1587
  width: 864px;
1588
1588
  flex-direction: column;
1589
1589
  align-items: center;
1590
1590
  gap: 8px;
1591
- `,fa=h.p`
1591
+ `,ua=m.p`
1592
1592
  color: var(--color-text-primary, #131412);
1593
1593
  text-align: center;
1594
1594
 
@@ -1599,7 +1599,7 @@
1599
1599
  font-weight: var(--text-weight-regular, 400);
1600
1600
  line-height: var(--typo-body-lineHeight-medium, 20px); /* 111.111% */
1601
1601
  letter-spacing: var(--typo-body-spacing-medium, 0.15px);
1602
- `,ga=h.p`
1602
+ `,fa=m.p`
1603
1603
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
1604
1604
  text-align: center;
1605
1605
  width: 400px;
@@ -1616,7 +1616,7 @@
1616
1616
  font-size: 10px;
1617
1617
  width: 350px;
1618
1618
  }
1619
- `,ma=h.span`
1619
+ `,ha=m.span`
1620
1620
  color: var(--color-text-status-info, #17adc1);
1621
1621
 
1622
1622
  /* caption/medium-r */
@@ -1626,7 +1626,7 @@
1626
1626
  font-weight: var(--text-weight-regular, 400);
1627
1627
  line-height: var(--typo-caption-lineHeight-medium, 18px);
1628
1628
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1629
- `;h(T.Button)`
1629
+ `;m(T.Button)`
1630
1630
  display: flex;
1631
1631
  height: var(--size-400, 32px);
1632
1632
  padding: 8px;
@@ -1647,7 +1647,7 @@
1647
1647
  font-weight: var(--text-weight-regular, 400);
1648
1648
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
1649
1649
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1650
- `;const ur=({title:n,description:e,button:t,helpSpan:r})=>i.jsx(pa,{children:i.jsxs(ua,{children:[i.jsx(fa,{children:n}),i.jsxs(ga,{children:[e," ",r&&i.jsx(ma,{children:r})]}),t&&t]})}),ha=({activeTableView:n,columns:e,rowKey:t,dataSource:r,loading:a,pagination:o,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=E($=>$.filters),p=E($=>$.groupByArr),m=E($=>$.setFilters),f=S.useMemo(()=>p.length>0?e.filter($=>!p.some(k=>k.dataIndex==$.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:b}=S.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),D=S.useMemo(()=>{if(p[0]){const $=$t(p[0],r);if(p[1]){const k={};return Object.keys($).forEach(M=>{k[M]=$t(p[1],$[M])}),k}return $}return r},[r,p]);function z($){m({...u,PageSize:$,Page:1})}function C($){m({...u,Page:$})}return i.jsxs(Xn,{children:[i.jsxs("table",{children:[n!=fe.LIST&&i.jsx("thead",{children:i.jsxs("tr",{children:[f.map($=>i.jsx(da,{col:$},$.dataIndex)),i.jsx("th",{})]})}),i.jsx("tbody",{children:a?i.jsx(aa,{rowLength:o.pageSize,columnLength:f.length}):(D==null?void 0:D.length)==0&&c?i.jsx("tr",{children:i.jsx("td",{colSpan:f.length,children:i.jsx(ur,{...c})})}):i.jsx(i.Fragment,{children:g?i.jsx(sa,{dataSource:D,columns:f,isSubGroupped:b,getGroupLength:ra,rowKey:t,onRowClick:l}):i.jsx(xt,{rows:D,columns:f,rowKey:t,onRowClick:l})})})]}),o&&!d&&i.jsx(la,{pagination:o,totalItemCount:s,onPerPageSelectChange:z,onPaginationChange:C})]})},xa=h.div`
1650
+ `;const Jr=({title:r,description:e,button:t,helpSpan:n})=>o.jsx(da,{children:o.jsxs(pa,{children:[o.jsx(ua,{children:r}),o.jsxs(fa,{children:[e," ",n&&o.jsx(ha,{children:n})]}),t&&t]})}),ga=({activeTableView:r,columns:e,rowKey:t,dataSource:n,loading:i,pagination:a,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(O=>O.filters),p=D(O=>O.groupByArr),f=D(O=>O.setFilters),h=x.useMemo(()=>p.length>0?e.filter(O=>!p.some(S=>S.dataIndex==O.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:v}=x.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),L=x.useMemo(()=>{if(p[0]){const O=er(p[0],n);if(p[1]){const S={};return Object.keys(O).forEach(z=>{S[z]=er(p[1],O[z])}),S}return O}return n},[n,p]);function M(O){f({...u,PageSize:O,Page:1})}function j(O){f({...u,Page:O})}return o.jsxs(Ji,{children:[o.jsxs("table",{children:[r!=we.LIST&&o.jsx("thead",{children:o.jsxs("tr",{children:[h.map(O=>o.jsx(ca,{col:O},O.dataIndex)),o.jsx("th",{})]})}),o.jsx("tbody",{children:i?o.jsx(na,{rowLength:a.pageSize,columnLength:h.length}):(L==null?void 0:L.length)==0&&c?o.jsx("tr",{children:o.jsx("td",{colSpan:h.length,children:o.jsx(Jr,{...c})})}):o.jsx(o.Fragment,{children:g?o.jsx(oa,{dataSource:L,columns:h,isSubGroupped:v,getGroupLength:ta,rowKey:t,onRowClick:l}):o.jsx(Ft,{rows:L,columns:h,rowKey:t,onRowClick:l})})})]}),a&&!d&&o.jsx(sa,{pagination:a,totalItemCount:s,onPerPageSelectChange:M,onPaginationChange:j})]})},ma=m.div`
1651
1651
  display: flex;
1652
1652
  flex-direction: column;
1653
1653
  position: fixed;
@@ -1865,11 +1865,11 @@
1865
1865
  z-index: 9;
1866
1866
  }
1867
1867
  }
1868
- `,ba=h.div`
1868
+ `,xa=m.div`
1869
1869
  display: flex;
1870
1870
  align-items: center;
1871
1871
  gap: 8px;
1872
- `,Et=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z",fill:"currentColor"}),P.createElement("path",{d:"M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z",fill:"currentColor"})),Ot=n=>P.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z",fill:"currentColor"})),fr=h.div`
1872
+ `,tr=r=>$.createElement("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z",fill:"currentColor"}),$.createElement("path",{d:"M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z",fill:"currentColor"})),rr=r=>$.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z",fill:"currentColor"})),Qr=m.div`
1873
1873
  display: flex;
1874
1874
  flex-direction: column;
1875
1875
  padding-top: 1.5rem;
@@ -1910,7 +1910,7 @@
1910
1910
  fill: var(--color-icon-inverse);
1911
1911
  }
1912
1912
  }
1913
- `,ya=h.div`
1913
+ `,va=m.div`
1914
1914
  margin-bottom: 2.5rem;
1915
1915
  padding: 0 1.5rem;
1916
1916
  display: flex;
@@ -1957,7 +1957,7 @@
1957
1957
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
1958
1958
  }
1959
1959
  }
1960
- `,va=h.span`
1960
+ `,ya=m.span`
1961
1961
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
1962
1962
 
1963
1963
  font-family: var(--text-font-family-base, Geist);
@@ -1966,18 +1966,18 @@
1966
1966
  font-weight: var(--text-weight-regular, 400);
1967
1967
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
1968
1968
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
1969
- `,wa=h(fr)`
1969
+ `,ba=m(Qr)`
1970
1970
  border-radius: var(--border-radius-025, 2px);
1971
1971
  background: var(--color-bg-status-error, #fd7f60) !important;
1972
1972
  border: 2px solid var(--color-bg-secondary, #f5f5f5);
1973
1973
  padding-top: 0 !important;
1974
- `,Sa=h.div`
1974
+ `,wa=m.div`
1975
1975
  width: 100%;
1976
1976
  display: flex;
1977
1977
  flex-direction: column;
1978
1978
  gap: var(--spacing-050, 4px);
1979
1979
  padding: var(--spacing-400, 32px) var(--spacing-300, 24px) !important;
1980
- `,Ca=h.div`
1980
+ `,Ca=m.div`
1981
1981
  display: flex;
1982
1982
  justify-content: space-between;
1983
1983
  color: var(--color-text-contrast-onlight-primary, #131412);
@@ -1989,7 +1989,7 @@
1989
1989
  font-weight: var(--text-weight-medium, 500);
1990
1990
  line-height: var(--typo-subheading-lineHeight-medium, 28px); /* 116.667% */
1991
1991
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
1992
- `,ja=h.div`
1992
+ `,ja=m.div`
1993
1993
  color: var(--color-text-contrast-onlight-secondary, rgba(19, 20, 18, 0.75));
1994
1994
 
1995
1995
  /* body/small */
@@ -2000,7 +2000,7 @@
2000
2000
  line-height: var(--typo-body-lineHeight-small, 20px); /* 125% */
2001
2001
  letter-spacing: var(--typo-body-spacing-small, 0.15px);
2002
2002
  padding-bottom: var(--spacing-400, 32px) !important;
2003
- `,ka=h(T.Button)`
2003
+ `,Sa=m(T.Button)`
2004
2004
  border-radius: var(--border-radius-025, 2px);
2005
2005
  background: var(--color-bg-brand-special, #02e0ae);
2006
2006
  display: flex;
@@ -2023,7 +2023,7 @@
2023
2023
  color: var(--color-text-inverse-primary, #131412) !important;
2024
2024
  border-top: 2px solid var(--color-bg-secondary, #f5f5f5) !important;
2025
2025
  }
2026
- `,bt=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),P.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),P.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function gr(n){if(!n)return n;let e=n[0].toLowerCase();for(let t=1;t<n.length;t++){const r=n[t-1],a=n[t],o=n[t+1];/[A-Z]/.test(a)?/[A-Z]/.test(r)&&/[A-Z]/.test(o)?e+=a.toLowerCase():(/[A-Z]/.test(r)&&(!o||/[^A-Z]/.test(o)),e+=a):e+=a}return e}function we(n){return Object.entries(n).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(a=>isNaN(a)?gr(a):Number(a)),errors:t}))}h(T.Form.Item)`
2026
+ `,Ze=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),$.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function Xr(r){if(!r)return r;let e=r[0].toLowerCase();for(let t=1;t<r.length;t++){const n=r[t-1],i=r[t],a=r[t+1];/[A-Z]/.test(i)?/[A-Z]/.test(n)&&/[A-Z]/.test(a)?e+=i.toLowerCase():(/[A-Z]/.test(n)&&(!a||/[^A-Z]/.test(a)),e+=i):e+=i}return e}function $e(r){return Object.entries(r).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(i=>isNaN(i)?Xr(i):Number(i)),errors:t}))}m(T.Form.Item)`
2027
2027
  margin-bottom: 2.5rem;
2028
2028
  padding: 0 1.5rem;
2029
2029
  display: flex;
@@ -2070,11 +2070,11 @@
2070
2070
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2071
2071
  }
2072
2072
  }
2073
- `;const mr=h.div`
2073
+ `;const pe=m.div`
2074
2074
  display: flex;
2075
2075
  flex-direction: column;
2076
2076
  border-top: 1px solid black;
2077
- `;h(T.Button)`
2077
+ `;m(T.Button)`
2078
2078
  display: flex;
2079
2079
  height: var(--size-800, 64px);
2080
2080
  padding: var(--spacing-200, 16px) var(--spacing-300, 24px);
@@ -2084,7 +2084,7 @@
2084
2084
 
2085
2085
  border-radius: var(--border-radius-025, 2px);
2086
2086
  background: var(--color-bg-quaternary, #2f2f2f);
2087
- `;const hr=h.span`
2087
+ `;const en=m.span`
2088
2088
  color: var(--color-text-brand, #06c193);
2089
2089
  cursor: pointer;
2090
2090
 
@@ -2095,7 +2095,7 @@
2095
2095
  line-height: var(--typo-caption-lineHeight-medium, 18px);
2096
2096
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2097
2097
  cursor: pointer;
2098
- `,La=h.span`
2098
+ `,ka=m.span`
2099
2099
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
2100
2100
 
2101
2101
  font-family: var(--text-font-family-base, Geist);
@@ -2104,7 +2104,7 @@
2104
2104
  font-weight: var(--text-weight-regular, 400);
2105
2105
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
2106
2106
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
2107
- `,Da=h.span`
2107
+ `,La=m.span`
2108
2108
  color: var(--color-text-tertiary, rgba(255, 255, 255, 0.5));
2109
2109
 
2110
2110
  font-family: var(--text-font-family-base, Geist);
@@ -2113,7 +2113,7 @@
2113
2113
  font-weight: var(--text-weight-regular, 400);
2114
2114
  line-height: var(--typo-caption-lineHeight-small, 16px); /* 133.333% */
2115
2115
  letter-spacing: var(--typo-caption-spacing-small, 0.1px);
2116
- `,xr=h.div`
2116
+ `,tn=m.div`
2117
2117
  margin-bottom: 2.5rem;
2118
2118
  padding: 0 1.5rem;
2119
2119
  display: flex;
@@ -2201,7 +2201,7 @@
2201
2201
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2202
2202
  }
2203
2203
  }
2204
- `,br=h.div`
2204
+ `,Se=m.div`
2205
2205
  display: flex;
2206
2206
  flex-direction: column;
2207
2207
  gap: 8px;
@@ -2214,7 +2214,7 @@
2214
2214
  font-weight: var(--text-weight-medium, 500);
2215
2215
  line-height: var(--typo-subheading-lineHeight-medium, 28px);
2216
2216
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
2217
- `;h.div`
2217
+ `,rn=m.div`
2218
2218
  margin-bottom: 2.5rem;
2219
2219
  padding: 0 1.5rem;
2220
2220
  display: flex;
@@ -2261,14 +2261,14 @@
2261
2261
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2262
2262
  }
2263
2263
  }
2264
- `;h.div`
2264
+ `,Ea=m.div`
2265
2265
  padding: 1.5rem;
2266
- `;const $a=h.div`
2266
+ `,Vt=m.div`
2267
2267
  display: flex;
2268
2268
  align-items: center;
2269
2269
  justify-content: center;
2270
2270
  padding: 1.5rem;
2271
- `;h.div`
2271
+ `,Oa=m.div`
2272
2272
  display: flex;
2273
2273
  align-items: center;
2274
2274
  padding: 24px;
@@ -2281,7 +2281,7 @@
2281
2281
  color: var(--color-text-inverse-primary, #131412) !important;
2282
2282
  }
2283
2283
  }
2284
- `;h(T.Input.Password)`
2284
+ `,Da=m(T.Input.Password)`
2285
2285
  input[type='number'] {
2286
2286
  &::-webkit-outer-spin-button,
2287
2287
  &::-webkit-inner-spin-button {
@@ -2384,7 +2384,7 @@
2384
2384
  fill: var(--color-text-primary, #131412) !important;
2385
2385
  }
2386
2386
  }
2387
- `;const yt=({confirmationToken:n,backupCodeEndpoint:e,setBackupActivated:t,setVisible:r,id:a,setRefetchData:o})=>{const[s,l]=S.useState(),[d,c]=S.useState([]);async function u(){var p,m,f;try{const g=await e({confirmationToken:n,code:s,id:a});(p=g==null?void 0:g.data)!=null&&p.success&&(r(!1),o(b=>!b))}catch(g){const b=we((f=(m=g==null?void 0:g.response)==null?void 0:m.data)==null?void 0:f.errors);c(b),console.log(g)}}return i.jsxs("div",{children:[i.jsx(Ye,{children:i.jsxs(br,{children:[re("EnterBackupCode"),i.jsx(Ie,{children:re("BackupCodesDesc")})]})}),i.jsxs(xr,{className:d.length>0?"verification-error":"",children:[i.jsx(Ie,{children:re("BackupCode")}),i.jsx(ht,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>i.jsxs("span",{children:[i.jsx(bt,{})," ",p.errors[0]]},p.name)),i.jsx(Da,{children:re("BackupCodeSpan")})]}),i.jsxs(mr,{children:[i.jsx(Ke,{onClick:()=>{t(!1)},children:oe("Back")}),i.jsx(ze,{onClick:u,children:i.jsxs("span",{className:"arrow-styled",children:[oe("Continue")," ",i.jsx(je,{})]})})]})]})},Ea=h.div`
2387
+ `,Bt=({confirmationToken:r,backupCodeEndpoint:e,setBackupActivated:t,setVisible:n,id:i,setRefetchData:a})=>{const[s,l]=x.useState(),[d,c]=x.useState([]);async function u(){var p,f,h;try{const g=await e({confirmationToken:r,code:s,id:i});(p=g==null?void 0:g.data)!=null&&p.success&&(n(!1),a(v=>!v))}catch(g){const v=$e((h=(f=g==null?void 0:g.response)==null?void 0:f.data)==null?void 0:h.errors);c(v),console.log(g)}}return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("EnterBackupCode"),o.jsx(le,{children:G("BackupCodesDesc")})]})}),o.jsxs(tn,{className:d.length>0?"verification-error":"",children:[o.jsx(le,{children:G("BackupCode")}),o.jsx(pt,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{})," ",p.errors[0]]},p.name)),o.jsx(La,{children:G("BackupCodeSpan")})]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:()=>{t(!1)},children:Z("Back")}),o.jsx(Ne,{onClick:u,children:o.jsxs("span",{className:"arrow-styled",children:[Z("Continue")," ",o.jsx(ce,{})]})})]})]})},Ta=m.div`
2388
2388
  position: fixed;
2389
2389
  top: 0;
2390
2390
  left: 0;
@@ -2395,14 +2395,107 @@
2395
2395
  justify-content: center;
2396
2396
  align-items: center;
2397
2397
  z-index: 1000;
2398
- `,Oa=h.div`
2398
+ `,$a=m.div`
2399
2399
  border-radius: var(--border-radius-025, 0.125rem);
2400
2400
  background: var(--color-bg-quaternary, #2f2f2f);
2401
2401
  min-width: 300px;
2402
2402
  max-width: 500px;
2403
2403
  position: relative;
2404
2404
  animation: fadeIn 0.3s ease;
2405
- `,Ta=document.getElementById("modal-root")||(()=>{const n=document.createElement("div");return n.id="modal-root",document.body.appendChild(n),n})();function tt({isOpen:n,onClose:e,children:t}){return S.useEffect(()=>{const r=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),n?zr.createPortal(i.jsx(Ea,{onClick:e,children:i.jsx(Oa,{onClick:r=>r.stopPropagation(),children:t})}),Ta):null}const Ia={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},yr=({isVisible:n,setVisible:e,code:t,mfaType:r,id:a,isBlocked:o,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=ke(),{setUser:c}=xe(),[u,p]=S.useState(""),[m,f]=S.useState([]),[g,b]=S.useState(!1);function D(k){p(k)}async function z(){const k=l;if(k)try{f([]);const M=await k(t,u,a);c(M.data.value),$()}catch(M){if(console.log(M),M.status===400){const U=M.response.data,W=we(U.errors);f(W)}}}async function C(k){const M=d;if(M)try{f([]);const U=await M(k);c(U.data.value)}catch(U){if(console.log(U),U.status===400){const W=U.response.data,A=we(W.errors);f(A)}}}function $(){p(""),e(!1),f([])}return o?i.jsx(tt,{isOpen:o,onClose:s,children:i.jsxs(wa,{children:[i.jsxs(Sa,{children:[i.jsxs(Ca,{children:[i.jsx("span",{children:G("ContactInformationBlocked")}),i.jsx("span",{onClick:s,children:i.jsx(mt,{})})]}),i.jsx(ja,{children:G("ContactInformationBlockedDesc")})]}),i.jsxs(ka,{children:[G("TryAgain"),i.jsx(je,{})]})]})}):i.jsx(tt,{isOpen:n,onClose:$,children:g?i.jsx(yt,{setBackupActivated:b,backupCodeEndpoint:C,confirmationToken:t,id:a,setVisible:e}):i.jsxs(fr,{children:[i.jsx("h2",{children:re("EnterVerificationCode")}),i.jsx("p",{children:r!==void 0?G(Ia[r]):""}),r!==1&&i.jsxs(i.Fragment,{children:[i.jsxs(ya,{className:m.length>0?"verification-error":"",children:[i.jsx(T.Input.OTP,{value:u,onChange:D}),i.jsxs(va,{children:[re("DidnReceiveCode")," ",i.jsx(hr,{onClick:()=>b(!0),children:re("EnterBackupCode")})]}),m.map(k=>i.jsxs("span",{children:[i.jsx(bt,{}),k.errors[0]]},k.name))]}),i.jsxs("button",{onClick:z,disabled:u.length!==6,children:[oe("ShowContactInformation"),i.jsx(je,{})]})]})]})})},vr=()=>{const{enableContactInfo:n,disableContactInfo:e}=ke(),{setUser:t}=xe(),[r,a]=S.useState(!1),[o,s]=S.useState(null),[l,d]=S.useState(!1),c=async()=>{var m,f,g,b,D,z,C;if(n)try{d(!1);const $=await n();s({token:(f=(m=$.data)==null?void 0:m.value)==null?void 0:f.token,id:(b=(g=$.data)==null?void 0:g.value)==null?void 0:b.id,mfaType:(z=(D=$.data)==null?void 0:D.value)==null?void 0:z.mfaType}),a(!0)}catch($){const k=(C=$.response)==null?void 0:C.data,M=k==null?void 0:k.errors;(M&&Array.isArray(M[""])&&M[""][0]==="TooManyAttempts"||M[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const m=await e();t(m.data.value)}const p=()=>{d(!1),a(!1)};return{isContactInfoModalVisible:r,setIsContactInfoModalVisible:a,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:r,setVisible:a,code:o==null?void 0:o.token,mfaType:o==null?void 0:o.mfaType,id:o==null?void 0:o.id,isBlocked:l,onBlockStateClose:p}}},za=({close:n})=>{var z;const{user:e}=xe(),t=E(C=>C.columns),r=E(C=>C.groupByArr),a=E(C=>C.hideItems),o=E(C=>C.activeTableView),s=E(C=>C.setActiveTableView),l=E(C=>C.setGroupByArr),d=E(C=>C.setHideItems),c=E(C=>C.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:m}=vr();function f(C){const $=t.find(k=>k.dataIndex==C.value);l([$])}function g(C,$){d({...a,[C.dataIndex]:!!$})}function b(C,$){const k=new Date(C),M=new Date($),U=Math.abs(M.getTime()-k.getTime()),W=Math.floor(U/(1e3*60))%60,A=Math.floor(U/(1e3*60*60))%24,V=[];return A>0&&V.push(`${A}h`),W>0&&V.push(`${W}m`),V.join(" ")}function D(){c(),n()}return i.jsxs(xa,{children:[i.jsxs("header",{children:[i.jsx("span",{children:G("ViewOptions")}),i.jsx("button",{onClick:n,children:i.jsx(Et,{})})]}),i.jsxs("div",{className:"setting-sidebar-content",children:[i.jsxs("ul",{className:"table-view-list",children:[i.jsxs("li",{className:o==fe.TABLE?"active":"",onClick:()=>s(fe.TABLE),children:[i.jsx(Ot,{}),i.jsx("span",{children:G("Table")})]}),i.jsxs("li",{className:o==fe.LIST?"active":"",onClick:()=>s(fe.LIST),children:[i.jsx(Ae,{}),i.jsx("span",{children:G("List")})]})]}),i.jsx("ul",{className:"grouping-list",children:i.jsxs("li",{children:[i.jsx("span",{children:G("Grouping")}),i.jsx(T.Select,{className:"teeest",showSearch:!0,options:t.map(C=>({value:C.dataIndex,label:C.title})),labelInValue:!0,placeholder:i.jsxs(ba,{children:[i.jsx(Ae,{}),G("NoGrouping")]}),value:((z=r[0])==null?void 0:z.dataIndex)||null,onChange:f})]})}),i.jsxs("div",{className:"properties-list",children:[i.jsx("span",{children:G("ShowProperties")}),i.jsx("ul",{children:t.map(C=>i.jsx("li",{className:a[C.dataIndex]===!0?"hide":"",onClick:()=>g(C,a[C.dataIndex]!==!0),children:C.title},C.dataIndex))})]})]}),i.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?i.jsxs("button",{onClick:p,children:[G("HideContactInfo")," •"," ",b(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),i.jsx(Et,{})]}):i.jsxs("button",{onClick:u,children:[oe("ShowContactInformation")," ",i.jsx(Ot,{})]}),i.jsxs("button",{onClick:D,children:[oe("ResetAllOptions"),i.jsx(ar,{})]})]}),i.jsx(yr,{...m})]})},Pa=({columns:n,getData:e,update:t,hasCreateBtn:r,GridPageTopLeftComponent:a,contentAfterPageHeader:o,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:m,createIsModal:f,editButton:g,noPagination:b,noDataProps:D,exportButton:z,hasSelect:C,selectProps:$,TableComponent:k,tableProps:M={},noNeedSidebarResponsiveButton:U,loadedData:W=()=>{}})=>{var Z,ce,ie;const{user:A}=xe(),V=E(K=>K.filters),H=E(K=>K.filterItems),x=E(K=>K.sortItems),R=E(K=>K.hideItems),B=E(K=>K.activeTableView),L=E(K=>K.setColumns),j=E(K=>K.setHasCreateBtn),v=E(K=>K.setHasSelect),y=E(K=>K.setCheckedValue),{response:w,loading:O}=st(()=>e({...V,...p}),[V,A,t]);jn(),S.useEffect(()=>{w!=null&&w.data&&W(w.data)},[w,W]);const[I,N]=S.useState(!1),_=S.useRef(null),Y=Xt(_),q=S.useMemo(()=>n.filter(de=>R[de.dataIndex]!==!0),[n,R]);return S.useEffect(()=>{j(r||!1),v(C||!1)},[C]),S.useEffect(()=>{L(n)},[n]),S.useEffect(()=>{y(l)},[l]),i.jsxs(Ln,{children:[i.jsxs($n,{ref:_,children:[i.jsx(Vn,{noNeedSidebarResponsiveButton:U,hasSelect:C,selectProps:$,exportButton:z,setisSettingPopupVisible:N,CustomFilters:u,tableAdditionalFields:m,createIsModal:f,GridPageTopLeftComponent:a}),o,(H.length>0||x.length>0)&&i.jsx(Jn,{})]}),i.jsx(Mn,{height:`calc(100vh - ${`${Y}px`})`,children:k?i.jsx(k,{dataSource:((Z=w==null?void 0:w.data)==null?void 0:Z.items)||[],...M,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],loading:O,pagination:{current:V.Page,pageSize:V.PageSize,items:c==null?void 0:c.items}}):i.jsx(ha,{noPagination:b,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],dataSource:((ce=w==null?void 0:w.data)==null?void 0:ce.items)||[],loading:O,pagination:{current:V.Page,pageSize:V.PageSize,items:c==null?void 0:c.items},activeTableView:B,totalItemCount:((ie=w==null?void 0:w.data)==null?void 0:ie.totalItemCount)||0,onRowClick:s,noDataProps:D||null})}),I&&i.jsx(za,{close:()=>N(!1)})]})},Ma=n=>i.jsx(Cn,{children:i.jsx(Pa,{...n})}),Ha=()=>{const n=he(b=>b.isOpen),e=he(b=>b.options),t=he(b=>b.close),r=X.useLocation();if(S.useEffect(()=>{n&&t()},[r.pathname]),!e||!n)return null;const{title:a,component:o,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:m}=e,f=()=>{m==null||m()},g=()=>{p==null||p()};return i.jsxs(We,{centered:!0,title:a||u?i.jsxs(or,{children:[i.jsx("span",{children:a}),u&&i.jsx(ir,{onClick:t,children:i.jsx(mt,{})})]}):void 0,...l,children:[o&&i.jsx(o,{...s}),!c&&i.jsxs(sr,{children:[i.jsx(Ke,{onClick:f,children:d==null?void 0:d.cancelText}),i.jsx(lr,{onClick:g,role:"button",tabIndex:0,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},Ra=({displayAddRuleModal:n,onClose:e,title:t,hideFooter:r=!1,children:a})=>i.jsx(We,{open:n,onCancel:e,closeIcon:!1,title:t,footer:r?null:void 0,destroyOnClose:!0,centered:!0,children:a}),Fa=h.div`
2405
+ `,Ia=document.getElementById("modal-root")||(()=>{const r=document.createElement("div");return r.id="modal-root",document.body.appendChild(r),r})();function wt({isOpen:r,onClose:e,children:t}){return x.useEffect(()=>{const n=i=>{i.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),r?Pn.createPortal(o.jsx(Ta,{onClick:e,children:o.jsx($a,{onClick:n=>n.stopPropagation(),children:t})}),Ia):null}const Ma={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},nn=({isVisible:r,setVisible:e,code:t,mfaType:n,id:i,isBlocked:a,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=me(),{setUser:c}=Ee(),[u,p]=x.useState(""),[f,h]=x.useState([]),[g,v]=x.useState(!1);function L(S){p(S)}async function M(){const S=l;if(S)try{h([]);const z=await S(t,u,i);c(z.data.value),O()}catch(z){if(console.log(z),z.status===400){const U=z.response.data,Y=$e(U.errors);h(Y)}}}async function j(S){const z=d;if(z)try{h([]);const U=await z(S);c(U.data.value)}catch(U){if(console.log(U),U.status===400){const Y=U.response.data,B=$e(Y.errors);h(B)}}}function O(){p(""),e(!1),h([])}return a?o.jsx(wt,{isOpen:a,onClose:s,children:o.jsxs(ba,{children:[o.jsxs(wa,{children:[o.jsxs(Ca,{children:[o.jsx("span",{children:V("ContactInformationBlocked")}),o.jsx("span",{onClick:s,children:o.jsx(At,{})})]}),o.jsx(ja,{children:V("ContactInformationBlockedDesc")})]}),o.jsxs(Sa,{children:[V("TryAgain"),o.jsx(ce,{})]})]})}):o.jsx(wt,{isOpen:r,onClose:O,children:g?o.jsx(Bt,{setBackupActivated:v,backupCodeEndpoint:j,confirmationToken:t,id:i,setVisible:e}):o.jsxs(Qr,{children:[o.jsx("h2",{children:G("EnterVerificationCode")}),o.jsx("p",{children:n!==void 0?V(Ma[n]):""}),n!==1&&o.jsxs(o.Fragment,{children:[o.jsxs(va,{className:f.length>0?"verification-error":"",children:[o.jsx(T.Input.OTP,{value:u,onChange:L}),o.jsxs(ya,{children:[G("DidnReceiveCode")," ",o.jsx(en,{onClick:()=>v(!0),children:G("EnterBackupCode")})]}),f.map(S=>o.jsxs("span",{children:[o.jsx(Ze,{}),S.errors[0]]},S.name))]}),o.jsxs("button",{onClick:M,disabled:u.length!==6,children:[Z("ShowContactInformation"),o.jsx(ce,{})]})]})]})})},an=()=>{const{enableContactInfo:r,disableContactInfo:e}=me(),{setUser:t}=Ee(),[n,i]=x.useState(!1),[a,s]=x.useState(null),[l,d]=x.useState(!1),c=async()=>{var f,h,g,v,L,M,j;if(r)try{d(!1);const O=await r();s({token:(h=(f=O.data)==null?void 0:f.value)==null?void 0:h.token,id:(v=(g=O.data)==null?void 0:g.value)==null?void 0:v.id,mfaType:(M=(L=O.data)==null?void 0:L.value)==null?void 0:M.mfaType}),i(!0)}catch(O){const S=(j=O.response)==null?void 0:j.data,z=S==null?void 0:S.errors;(z&&Array.isArray(z[""])&&z[""][0]==="TooManyAttempts"||z[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const f=await e();t(f.data.value)}const p=()=>{d(!1),i(!1)};return{isContactInfoModalVisible:n,setIsContactInfoModalVisible:i,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:n,setVisible:i,code:a==null?void 0:a.token,mfaType:a==null?void 0:a.mfaType,id:a==null?void 0:a.id,isBlocked:l,onBlockStateClose:p}}},Pa=({close:r})=>{var M;const{user:e}=Ee(),t=D(j=>j.columns),n=D(j=>j.groupByArr),i=D(j=>j.hideItems),a=D(j=>j.activeTableView),s=D(j=>j.setActiveTableView),l=D(j=>j.setGroupByArr),d=D(j=>j.setHideItems),c=D(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:f}=an();function h(j){const O=t.find(S=>S.dataIndex==j.value);l([O])}function g(j,O){d({...i,[j.dataIndex]:!!O})}function v(j,O){const S=new Date(j),z=new Date(O),U=Math.abs(z.getTime()-S.getTime()),Y=Math.floor(U/(1e3*60))%60,B=Math.floor(U/(1e3*60*60))%24,F=[];return B>0&&F.push(`${B}h`),Y>0&&F.push(`${Y}m`),F.join(" ")}function L(){c(),r()}return o.jsxs(ma,{children:[o.jsxs("header",{children:[o.jsx("span",{children:V("ViewOptions")}),o.jsx("button",{onClick:r,children:o.jsx(tr,{})})]}),o.jsxs("div",{className:"setting-sidebar-content",children:[o.jsxs("ul",{className:"table-view-list",children:[o.jsxs("li",{className:a==we.TABLE?"active":"",onClick:()=>s(we.TABLE),children:[o.jsx(rr,{}),o.jsx("span",{children:V("Table")})]}),o.jsxs("li",{className:a==we.LIST?"active":"",onClick:()=>s(we.LIST),children:[o.jsx(at,{}),o.jsx("span",{children:V("List")})]})]}),o.jsx("ul",{className:"grouping-list",children:o.jsxs("li",{children:[o.jsx("span",{children:V("Grouping")}),o.jsx(T.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:o.jsxs(xa,{children:[o.jsx(at,{}),V("NoGrouping")]}),value:((M=n[0])==null?void 0:M.dataIndex)||null,onChange:h})]})}),o.jsxs("div",{className:"properties-list",children:[o.jsx("span",{children:V("ShowProperties")}),o.jsx("ul",{children:t.map(j=>o.jsx("li",{className:i[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,i[j.dataIndex]!==!0),children:j.title},j.dataIndex))})]})]}),o.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?o.jsxs("button",{onClick:p,children:[V("HideContactInfo")," •"," ",v(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),o.jsx(tr,{})]}):o.jsxs("button",{onClick:u,children:[Z("ShowContactInformation")," ",o.jsx(rr,{})]}),o.jsxs("button",{onClick:L,children:[Z("ResetAllOptions"),o.jsx(_r,{})]})]}),o.jsx(nn,{...f})]})},za=({columns:r,getData:e,update:t,hasCreateBtn:n,GridPageTopLeftComponent:i,contentAfterPageHeader:a,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:f,createIsModal:h,editButton:g,noPagination:v,noDataProps:L,exportButton:M,hasSelect:j,selectProps:O,TableComponent:S,tableProps:z={},noNeedSidebarResponsiveButton:U,loadedData:Y=()=>{}})=>{var Q,xe,ue;const{user:B}=Ee(),F=D(q=>q.filters),H=D(q=>q.filterItems),y=D(q=>q.sortItems),R=D(q=>q.hideItems),_=D(q=>q.activeTableView),E=D(q=>q.setColumns),k=D(q=>q.setHasCreateBtn),w=D(q=>q.setHasSelect),b=D(q=>q.setCheckedValue),{response:C,loading:I}=$t(()=>e({...F,...p}),[F,B,t]);Si(),x.useEffect(()=>{C!=null&&C.data&&Y(C.data)},[C,Y]);const[P,A]=x.useState(!1),W=x.useRef(null),K=Rr(W),J=x.useMemo(()=>r.filter(ve=>R[ve.dataIndex]!==!0),[r,R]);return x.useEffect(()=>{k(n||!1),w(j||!1)},[j]),x.useEffect(()=>{E(r)},[r]),x.useEffect(()=>{b(l)},[l]),o.jsxs(Li,{children:[o.jsxs(Oi,{ref:W,children:[o.jsx(Fi,{noNeedSidebarResponsiveButton:U,hasSelect:j,selectProps:O,exportButton:M,setisSettingPopupVisible:A,CustomFilters:u,tableAdditionalFields:f,createIsModal:h,GridPageTopLeftComponent:i}),a,(H.length>0||y.length>0)&&o.jsx(Zi,{})]}),o.jsx(zi,{height:`calc(100vh - ${`${K}px`})`,children:S?o.jsx(S,{dataSource:((Q=C==null?void 0:C.data)==null?void 0:Q.items)||[],...z,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items}}):o.jsx(ga,{noPagination:v,editButton:g,createIsModal:h,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],dataSource:((xe=C==null?void 0:C.data)==null?void 0:xe.items)||[],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items},activeTableView:_,totalItemCount:((ue=C==null?void 0:C.data)==null?void 0:ue.totalItemCount)||0,onRowClick:s,noDataProps:L||null})}),P&&o.jsx(Pa,{close:()=>A(!1)})]})},Ha=r=>o.jsx(ji,{children:o.jsx(za,{...r})}),Ra=()=>{const r=Le(v=>v.isOpen),e=Le(v=>v.options),t=Le(v=>v.close),n=re.useLocation();if(x.useEffect(()=>{r&&t()},[n.pathname]),!e||!r)return null;const{title:i,component:a,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:f}=e,h=()=>{f==null||f()},g=()=>{p==null||p()};return o.jsxs(dt,{centered:!0,title:i||u?o.jsxs(Ur,{children:[o.jsx("span",{children:i}),u&&o.jsx(Gr,{onClick:t,children:o.jsx(At,{})})]}):void 0,...l,children:[a&&o.jsx(a,{...s}),!c&&o.jsxs(Re,{children:[o.jsx(te,{onClick:h,children:d==null?void 0:d.cancelText}),o.jsx(Wr,{onClick:g,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},on=({displayAddRuleModal:r,onClose:e,title:t,hideFooter:n=!1,children:i})=>o.jsx(dt,{open:r,onCancel:e,closeIcon:!1,title:t,footer:n?null:void 0,destroyOnClose:!0,centered:!0,children:i}),nr=({onClose:r,setCurrentStep:e,setConfirmationToken:t,enableTwoFactor:n,setRefetch:i,setIdOf2FA:a})=>{async function s(){var d,c,u,p;const l=n;if(l)try{const f=await l();(c=(d=f.data)==null?void 0:d.value)!=null&&c.isTwoFactorRequired?(t(f.data.value.token),a(f.data.value.id),e(Me.VERIFY_EMAIL_CODE)):((u=f==null?void 0:f.data)!=null&&u.success&&!((p=f==null?void 0:f.data)!=null&&p.value)&&i(h=>!h),r())}catch(f){console.error("Failed to toggle 2FA:",f)}}return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),o.jsx(le,{children:G("SetupTwoFactorAuthenticationDesc")})]})}),o.jsx(pe,{onClick:s,children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:V("Email")}),o.jsx(ce,{})]})})}),o.jsx(pe,{onClick:()=>e(Me.SELECT_AUTHENTICATOR_APP),children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:G("AuthenticatorApp")}),o.jsx(ce,{})]})})}),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Na=({onClose:r,setCurrentStep:e,setBackupCodes:t,setRefetch:n})=>{const{verifyMFA:i}=me(),[a,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){var f;const p=i;if(p)try{const h=await p(a);(f=h.data)!=null&&f.success&&(e(Me.BACKUP_CODES),t(h.data.value.recoveryCodes))}catch(h){console.log(h)}finally{n(h=>h+1)}}return o.jsxs("div",{children:[o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G("YouMaySeeVerificationCode")})]}),o.jsxs(rn,{children:[o.jsx(T.Input.OTP,{value:a,onChange:c}),l.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{}),p.errors[0]]},p.name))]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:u,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]})},Aa=({onClose:r,setCurrentStep:e})=>{const t=[G("Microsoft"),G("Google"),G("Other")];return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),o.jsxs(le,{children:[" ",G("SetupTwoFactorAuthenticationDesc")]})]})}),t.map(n=>o.jsx(pe,{onClick:()=>e(Me.CONNECT_AUTHENTICATOR),children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:n}),o.jsx(ce,{})]})})},n)),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Fa=m.div`
2406
+ display: flex;
2407
+ justify-content: center;
2408
+ `,Va=m.div`
2409
+ position: relative;
2410
+ width: 100%;
2411
+ input {
2412
+ padding-right: 35px;
2413
+ &.ant-input-disabled {
2414
+ color: var(--color-text-primary, #131412);
2415
+ cursor: pointer;
2416
+ }
2417
+ }
2418
+ `,Ba=m.div`
2419
+ position: absolute;
2420
+ right: 10px;
2421
+ top: 50%;
2422
+ transform: translateY(-50%);
2423
+ cursor: pointer;
2424
+ width: 20px;
2425
+ height: 20px;
2426
+ `,_a=m.div`
2427
+ padding: 20px;
2428
+ display: flex;
2429
+ flex-direction: column;
2430
+ gap: 5px;
2431
+ `,Ua=m.div`
2432
+ width: 100%;
2433
+ display: flex;
2434
+ gap: 1px;
2435
+ `;var sn=x.createContext({});function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(null,arguments)}function Ga(r){if(Array.isArray(r))return r}function Wa(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,a,s,l=[],d=!0,c=!1;try{if(a=(t=t.call(r)).next,e!==0)for(;!(d=(n=a.call(t)).done)&&(l.push(n.value),l.length!==e);d=!0);}catch(u){c=!0,i=u}finally{try{if(!d&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw i}}return l}}function ir(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function Ya(r,e){if(r){if(typeof r=="string")return ir(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ir(r,e):void 0}}function Ka(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2436
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ln(r,e){return Ga(r)||Wa(r,e)||Ya(r,e)||Ka()}function Ie(r){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(r)}function qa(r,e){if(Ie(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Za(r){var e=qa(r,"string");return Ie(e)=="symbol"?e:e+""}function ie(r,e,t){return(e=Za(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ja(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function cn(r,e){if(r==null)return{};var t,n,i=Ja(r,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)t=a[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function dn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}};/*!
2437
+ Copyright (c) 2018 Jed Watson.
2438
+ Licensed under the MIT License (MIT), see
2439
+ http://jedwatson.github.io/classnames
2440
+ */var ar;function Qa(){return ar||(ar=1,(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=i(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)e.call(a,l)&&a[l]&&(s=i(s,l));return s}function i(a,s){return s?a?a+" "+s:a+s:a}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(ht)),ht.exports}var Xa=Qa();const eo=dn(Xa),X=Math.round;function gt(r,e){const t=r.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=e(n[i]||0,t[i]||"",i);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const or=(r,e,t)=>t===0?r:r/100;function Ve(r,e){const t=e||255;return r>t?t:r<0?0:r}class ze{constructor(e){ie(this,"isValid",!0),ie(this,"r",0),ie(this,"g",0),ie(this,"b",0),ie(this,"a",1),ie(this,"_h",void 0),ie(this,"_s",void 0),ie(this,"_l",void 0),ie(this,"_v",void 0),ie(this,"_max",void 0),ie(this,"_min",void 0),ie(this,"_brightness",void 0);function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let i=function(a){return n.startsWith(a)};const n=e.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(e instanceof ze)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Ve(e.r),this.g=Ve(e.g),this.b=Ve(e.b),this.a=typeof e.a=="number"?Ve(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),i=e(this.b);return .2126*t+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=X(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:t,s:n,l:i,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:t,s:n,l:i,a:this.a})}mix(e,t=50){const n=this._c(e),i=t/100,a=l=>(n[l]-this[l])*i+this[l],s={r:X(a("r")),g:X(a("g")),b:X(a("b")),a:X(a("a")*100)/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),i=a=>X((this[a]*this.a+t[a]*t.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=X(this.a*255).toString(16);e+=a.length===2?a:"0"+a}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=X(this.getSaturation()*100),n=X(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const i=this.clone();return i[e]=Ve(t,n),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(i,a){return parseInt(t[i]+t[a||i],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:i}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof i=="number"?i:1,t<=0){const f=X(n*255);this.r=f,this.g=f,this.b=f}let a=0,s=0,l=0;const d=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(d%2-1));d>=0&&d<1?(a=c,s=u):d>=1&&d<2?(a=u,s=c):d>=2&&d<3?(s=c,l=u):d>=3&&d<4?(s=u,l=c):d>=4&&d<5?(a=u,l=c):d>=5&&d<6&&(a=c,l=u);const p=n-c/2;this.r=X((a+p)*255),this.g=X((s+p)*255),this.b=X((l+p)*255)}fromHsv({h:e,s:t,v:n,a:i}){this._h=e%360,this._s=t,this._v=n,this.a=typeof i=="number"?i:1;const a=X(n*255);if(this.r=a,this.g=a,this.b=a,t<=0)return;const s=e/60,l=Math.floor(s),d=s-l,c=X(n*(1-t)*255),u=X(n*(1-t*d)*255),p=X(n*(1-t*(1-d))*255);switch(l){case 0:this.g=p,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=p;break;case 3:this.r=c,this.g=u;break;case 4:this.r=p,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const t=gt(e,or);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=gt(e,or);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=gt(e,(n,i)=>i.includes("%")?X(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}var rt=2,sr=.16,to=.05,ro=.05,no=.15,pn=5,un=4,io=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function lr(r,e,t){var n;return Math.round(r.h)>=60&&Math.round(r.h)<=240?n=t?Math.round(r.h)-rt*e:Math.round(r.h)+rt*e:n=t?Math.round(r.h)+rt*e:Math.round(r.h)-rt*e,n<0?n+=360:n>=360&&(n-=360),n}function cr(r,e,t){if(r.h===0&&r.s===0)return r.s;var n;return t?n=r.s-sr*e:e===un?n=r.s+sr:n=r.s+to*e,n>1&&(n=1),t&&e===pn&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function dr(r,e,t){var n;return t?n=r.v+ro*e:n=r.v-no*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function ao(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=new ze(r),i=n.toHsv(),a=pn;a>0;a-=1){var s=new ze({h:lr(i,a,!0),s:cr(i,a,!0),v:dr(i,a,!0)});t.push(s)}t.push(n);for(var l=1;l<=un;l+=1){var d=new ze({h:lr(i,l),s:cr(i,l),v:dr(i,l)});t.push(d)}return e.theme==="dark"?io.map(function(c){var u=c.index,p=c.amount;return new ze(e.backgroundColor||"#141414").mix(t[u],p).toHexString()}):t.map(function(c){return c.toHexString()})}var Ct=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ct.primary=Ct[5];function pr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function he(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pr(Object(t),!0).forEach(function(n){ie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pr(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function oo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function so(r,e){if(!r)return!1;if(r.contains)return r.contains(e);for(var t=e;t;){if(t===r)return!0;t=t.parentNode}return!1}var ur="data-rc-order",fr="data-rc-priority",lo="rc-util-key",jt=new Map;function fn(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.mark;return e?e.startsWith("data-")?e:"data-".concat(e):lo}function _t(r){if(r.attachTo)return r.attachTo;var e=document.querySelector("head");return e||document.body}function co(r){return r==="queue"?"prependQueue":r?"prepend":"append"}function Ut(r){return Array.from((jt.get(r)||r).children).filter(function(e){return e.tagName==="STYLE"})}function hn(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!oo())return null;var t=e.csp,n=e.prepend,i=e.priority,a=i===void 0?0:i,s=co(n),l=s==="prependQueue",d=document.createElement("style");d.setAttribute(ur,s),l&&a&&d.setAttribute(fr,"".concat(a)),t!=null&&t.nonce&&(d.nonce=t==null?void 0:t.nonce),d.innerHTML=r;var c=_t(e),u=c.firstChild;if(n){if(l){var p=(e.styles||Ut(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(ur)))return!1;var h=Number(f.getAttribute(fr)||0);return a>=h});if(p.length)return c.insertBefore(d,p[p.length-1].nextSibling),d}c.insertBefore(d,u)}else c.appendChild(d);return d}function po(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=_t(e);return(e.styles||Ut(t)).find(function(n){return n.getAttribute(fn(e))===r})}function uo(r,e){var t=jt.get(r);if(!t||!so(document,t)){var n=hn("",e),i=n.parentNode;jt.set(r,i),r.removeChild(n)}}function fo(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=_t(t),i=Ut(n),a=he(he({},t),{},{styles:i});uo(n,a);var s=po(e,a);if(s){var l,d;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((d=a.csp)===null||d===void 0?void 0:d.nonce)){var c;s.nonce=(c=a.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==r&&(s.innerHTML=r),s}var u=hn(r,a);return u.setAttribute(fn(a),e),u}function gn(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}function ho(r){return gn(r)instanceof ShadowRoot}function go(r){return ho(r)?gn(r):null}var St={},Gt=[],mo=function(e){Gt.push(e)};function xo(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","warning")},e);t&&console.error("Warning: ".concat(t))}}function vo(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","note")},e);t&&console.warn("Note: ".concat(t))}}function yo(){St={}}function mn(r,e,t){!e&&!St[t]&&(r(!1,t),St[t]=!0)}function ut(r,e){mn(xo,r,e)}function bo(r,e){mn(vo,r,e)}ut.preMessage=mo;ut.resetWarned=yo;ut.noteOnce=bo;function wo(r){return r.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Co(r,e){ut(r,"[@ant-design/icons] ".concat(e))}function hr(r){return Ie(r)==="object"&&typeof r.name=="string"&&typeof r.theme=="string"&&(Ie(r.icon)==="object"||typeof r.icon=="function")}function gr(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(r).reduce(function(e,t){var n=r[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[wo(t)]=n}return e},{})}function kt(r,e,t){return t?x.createElement(r.tag,he(he({key:e},gr(r.attrs)),t),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))})):x.createElement(r.tag,he({key:e},gr(r.attrs)),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))}))}function xn(r){return ao(r)[0]}function vn(r){return r?Array.isArray(r)?r:[r]:[]}var jo=`
2441
+ .anticon {
2442
+ display: inline-flex;
2443
+ align-items: center;
2444
+ color: inherit;
2445
+ font-style: normal;
2446
+ line-height: 0;
2447
+ text-align: center;
2448
+ text-transform: none;
2449
+ vertical-align: -0.125em;
2450
+ text-rendering: optimizeLegibility;
2451
+ -webkit-font-smoothing: antialiased;
2452
+ -moz-osx-font-smoothing: grayscale;
2453
+ }
2454
+
2455
+ .anticon > * {
2456
+ line-height: 1;
2457
+ }
2458
+
2459
+ .anticon svg {
2460
+ display: inline-block;
2461
+ }
2462
+
2463
+ .anticon::before {
2464
+ display: none;
2465
+ }
2466
+
2467
+ .anticon .anticon-icon {
2468
+ display: block;
2469
+ }
2470
+
2471
+ .anticon[tabindex] {
2472
+ cursor: pointer;
2473
+ }
2474
+
2475
+ .anticon-spin::before,
2476
+ .anticon-spin {
2477
+ display: inline-block;
2478
+ -webkit-animation: loadingCircle 1s infinite linear;
2479
+ animation: loadingCircle 1s infinite linear;
2480
+ }
2481
+
2482
+ @-webkit-keyframes loadingCircle {
2483
+ 100% {
2484
+ -webkit-transform: rotate(360deg);
2485
+ transform: rotate(360deg);
2486
+ }
2487
+ }
2488
+
2489
+ @keyframes loadingCircle {
2490
+ 100% {
2491
+ -webkit-transform: rotate(360deg);
2492
+ transform: rotate(360deg);
2493
+ }
2494
+ }
2495
+ `,So=function(e){var t=x.useContext(sn),n=t.csp,i=t.prefixCls,a=t.layer,s=jo;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
2496
+ `).concat(s,`
2497
+ }`)),x.useEffect(function(){var l=e.current,d=go(l);fo(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:d})},[])},ko=["icon","className","onClick","style","primaryColor","secondaryColor"],Ge={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Lo(r){var e=r.primaryColor,t=r.secondaryColor;Ge.primaryColor=e,Ge.secondaryColor=t||xn(e),Ge.calculated=!!t}function Eo(){return he({},Ge)}var Ae=function(e){var t=e.icon,n=e.className,i=e.onClick,a=e.style,s=e.primaryColor,l=e.secondaryColor,d=cn(e,ko),c=$.useRef(),u=Ge;if(s&&(u={primaryColor:s,secondaryColor:l||xn(s)}),So(c),Co(hr(t),"icon should be icon definiton, but got ".concat(t)),!hr(t))return null;var p=t;return p&&typeof p.icon=="function"&&(p=he(he({},p),{},{icon:p.icon(u.primaryColor,u.secondaryColor)})),kt(p.icon,"svg-".concat(p.name),he(he({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:c}))};Ae.displayName="IconReact";Ae.getTwoToneColors=Eo;Ae.setTwoToneColors=Lo;function yn(r){var e=vn(r),t=ln(e,2),n=t[0],i=t[1];return Ae.setTwoToneColors({primaryColor:n,secondaryColor:i})}function Oo(){var r=Ae.getTwoToneColors();return r.calculated?[r.primaryColor,r.secondaryColor]:r.primaryColor}var Do=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];yn(Ct.primary);var Je=$.forwardRef(function(r,e){var t=r.className,n=r.icon,i=r.spin,a=r.rotate,s=r.tabIndex,l=r.onClick,d=r.twoToneColor,c=cn(r,Do),u=$.useContext(sn),p=u.prefixCls,f=p===void 0?"anticon":p,h=u.rootClassName,g=eo(h,f,ie(ie({},"".concat(f,"-").concat(n.name),!!n.name),"".concat(f,"-spin"),!!i||n.name==="loading"),t),v=s;v===void 0&&l&&(v=-1);var L=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,M=vn(d),j=ln(M,2),O=j[0],S=j[1];return $.createElement("span",Ke({role:"img","aria-label":n.name},c,{ref:e,tabIndex:v,onClick:l,className:g}),$.createElement(Ae,{icon:n,primaryColor:O,secondaryColor:S,style:L}))});Je.displayName="AntdIcon";Je.getTwoToneColor=Oo;Je.setTwoToneColor=yn;var To={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},$o=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:To}))},bn=$.forwardRef($o);process.env.NODE_ENV!=="production"&&(bn.displayName="CopyOutlined");var Io={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Mo=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:Io}))},wn=$.forwardRef(Mo);process.env.NODE_ENV!=="production"&&(wn.displayName="DownloadOutlined");const Po=({onClose:r,setCurrentStep:e})=>{const{initiateMFA:t}=me(),[n,i]=x.useState(null);async function a(){if(t)try{const s=await t();i(s.data.value)}catch(s){console.log(s)}}return x.useEffect(()=>{a()},[]),o.jsx("div",{children:n?o.jsxs(o.Fragment,{children:[o.jsx(je,{children:o.jsx(Se,{children:G("EnterAuthenticationCode")})}),o.jsx(Fa,{children:o.jsx("img",{src:`data:image/png;base64,${n.qrCodeImage}`})}),o.jsx("br",{}),o.jsxs(_a,{children:[o.jsxs(le,{children:[" ",G("CopyCodeManually")]}),o.jsxs(Va,{onClick:()=>Kr(n.totpSecret),children:[o.jsx(pt,{value:n.totpSecret,disabled:!0}),o.jsx(Ba,{children:o.jsx(bn,{})})]})]}),o.jsx(Re,{children:o.jsxs(Ua,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:()=>e(Me.VERIFY_AUTHENTICATOR_CODE),children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})})]}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},zo=({onClose:r,setRefetch:e})=>{const{disableMFA:t}=me(),[n,i]=x.useState("");function a(l){i(l.target.value)}async function s(){if(t)try{await t(n),r()}catch(l){console.log(l,"err")}finally{e(l=>l+1)}}return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("DisableTwoFactor"),o.jsx(le,{children:G("DisableTwoFactorDesc")})]})}),o.jsxs(Ea,{children:[o.jsx(le,{children:V("Password")}),o.jsx(Da,{value:n,onChange:a,placeholder:V("EnterPassword")})]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(Ne,{onClick:s,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]})},Ho=({onClose:r,confirmationToken:e,setRefetch:t,idOf2FA:n})=>{const{confirmTwoFactor:i}=me(),[a,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){if(i)try{(await i({confirmationToken:e,code:a,id:n})).data.success&&r()}catch(p){console.log(p)}finally{t(p=>p+1)}}return o.jsx("div",{children:e?o.jsxs(o.Fragment,{children:[o.jsxs(Se,{children:[o.jsx("div",{children:G("EnterVerificationCode")}),o.jsx(le,{children:G("BackupCodesDesc")})]}),o.jsxs(rn,{children:[o.jsx(T.Input.OTP,{value:a,onChange:c}),l.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{}),p.errors[0]]},p.name))]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:u,disabled:(a==null?void 0:a.length)!=6,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},Ro=({onClose:r,backupCodes:e})=>{const t=()=>{const n=e.join(`
2498
+ `),i=new Blob([n],{type:"text/plain;charset=utf-8"}),a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download="backup-codes.txt",s.click(),URL.revokeObjectURL(a)};return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G("BackupCodesDesc")})]})}),o.jsx(Oa,{children:o.jsx(T.Button,{type:"primary",icon:o.jsx(wn,{}),onClick:t,children:G("DownloadBackupCodes")})}),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})};var Me=(r=>(r[r.SELECT_MFA_OPTION=0]="SELECT_MFA_OPTION",r[r.SELECT_AUTHENTICATOR_APP=1]="SELECT_AUTHENTICATOR_APP",r[r.CONNECT_AUTHENTICATOR=2]="CONNECT_AUTHENTICATOR",r[r.VERIFY_AUTHENTICATOR_CODE=3]="VERIFY_AUTHENTICATOR_CODE",r[r.VERIFY_EMAIL_CODE=4]="VERIFY_EMAIL_CODE",r[r.DISABLE_AUTHENTICATOR=5]="DISABLE_AUTHENTICATOR",r[r.BACKUP_CODES=6]="BACKUP_CODES",r[r.ENTER_BACKUP_CODE=7]="ENTER_BACKUP_CODE",r))(Me||{});const No=({isOpen:r,setIsOpen:e,modal:t=0,setRefetch:n})=>{const[i,a]=x.useState(t),[s,l]=x.useState(""),[d,c]=x.useState(),[u,p]=x.useState("");function f(){e(!1)}const h=x.useMemo(()=>{switch(i){case 0:return nr;case 1:return Aa;case 2:return Po;case 3:return Na;case 4:return Ho;case 5:return zo;case 6:return Ro;default:return nr}},[i]),g=x.useMemo(()=>{switch(i){case 0:return{onClose:f,setCurrentStep:a,setConfirmationToken:l,setRefetch:n,setIdOf2FA:c};case 1:return{onClose:f,setCurrentStep:a};case 2:return{onClose:f,setCurrentStep:a};case 3:return{onClose:f,setCurrentStep:a,setBackupCodes:p,setRefetch:n};case 4:return{onClose:f,setCurrentStep:a,confirmationToken:s,setRefetch:n,idOf2FA:d};case 5:return{onClose:f,setRefetch:n};case 6:return{onClose:f,backupCodes:u};case 7:return{onClose:f,confirmationToken:s,setRefetch:n,idOf2FA:d};default:return{onClose:f}}},[i,s,u]);return o.jsx(on,{displayAddRuleModal:r,onClose:f,hideFooter:!0,children:o.jsx(h,{...g})})},Ao=m.div`
2406
2499
  height: var(--size-800, 4rem);
2407
2500
  display: flex;
2408
2501
  justify-content: space-between;
@@ -2439,16 +2532,16 @@
2439
2532
  display: flex;
2440
2533
  gap: 0.12rem;
2441
2534
  }
2442
- `,Na=h.div`
2535
+ `,Fo=m.div`
2443
2536
  cursor: pointer;
2444
- `,Va=h(Kt)`
2537
+ `,Vo=m(Mr)`
2445
2538
  width: 10.943px !important;
2446
2539
  height: 8.552px !important;
2447
2540
 
2448
2541
  path {
2449
2542
  fill: var(--color-icon-primary, #131412) !important;
2450
2543
  }
2451
- `,wr=h(T.Breadcrumb)`
2544
+ `,Cn=m(T.Breadcrumb)`
2452
2545
  font-family: var(--text-font-family-base, Geist);
2453
2546
  font-size: var(--typo-caption-size-medium, 0.875rem);
2454
2547
  font-weight: var(--text-weight-regular, 400);
@@ -2469,20 +2562,20 @@
2469
2562
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
2470
2563
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2471
2564
  }
2472
- `,Sr=({breadcrumbItems:n,logo:e,button:t,className:r,backButton:a=i.jsx(Va,{})})=>{const o=X.useNavigate();return i.jsxs(Fa,{className:r||"",children:[i.jsxs("div",{className:"page-starter",children:[e?i.jsx("div",{className:"icon",children:e}):i.jsx(Na,{className:"icon",onClick:()=>o(-1),children:a}),i.jsx(wr,{items:n})]}),i.jsx("div",{children:t&&t})]})};var rt=(n=>(n[n.None=1]="None",n[n.OTP=2]="OTP",n[n.TOTP=3]="TOTP",n[n.BackupCode=4]="BackupCode",n))(rt||{});const Aa={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},Ba=({confirmTwoFactor:n,resendOTP:e,confirmationToken:t,updatedResponse:r,mfaType:a=1,id:o,setRefetchData:s,backupCodeEndpoint:l,setVisible:d,visible:c})=>{const[u,p]=S.useState(""),[m,f]=S.useState(!0),[g,b]=S.useState(60),[D,z]=S.useState([]),[C,$]=S.useState(!1);async function k(){var A,V,H;if(u)try{const x=await n({confirmationToken:t,code:u,id:o});(A=x==null?void 0:x.data)!=null&&A.success&&(d(!1),s&&s(R=>!R))}catch(x){const R=we((H=(V=x==null?void 0:x.response)==null?void 0:V.data)==null?void 0:H.errors);z(R),console.log("Error in Save OTP",x)}}async function M(){if(e)try{const A=await e(t,o);A.data.success&&(r(A),f(!0),b(60))}catch(A){console.log("Error in OTP resend",A)}}function U(){d(!1)}function W(A){p(A)}return S.useEffect(()=>{if(!m)return;const A=setInterval(()=>{b(V=>V<=1?(clearInterval(A),f(!1),0):V-1)},1e3);return()=>clearInterval(A)},[m]),i.jsx(We,{open:c,onCancel:U,footer:[null],children:t?i.jsx(i.Fragment,{children:C?i.jsx(i.Fragment,{children:i.jsx(yt,{setBackupActivated:$,backupCodeEndpoint:l,setVisible:d,id:o,setRefetchData:s,confirmationToken:t})}):i.jsxs(i.Fragment,{children:[i.jsx(Ye,{children:i.jsxs(br,{children:[re("EnterVerificationCode"),i.jsx(Ie,{children:re(Aa[a])})]})}),i.jsxs(xr,{className:D.length>0?"verification-error":"",children:[i.jsx(T.Input.OTP,{value:u,onChange:W}),D.map(A=>i.jsxs("span",{children:[i.jsx(bt,{}),A.errors[0]]},A.name)),i.jsxs(La,{children:[re("DidnReceiveCode")," ",i.jsx(hr,{onClick:()=>$(!0),children:re("EnterBackupCode")})]})]}),i.jsxs(mr,{children:[a!==rt.TOTP&&i.jsx(Ke,{disabled:m,onClick:M,children:m?`${re("ResendAvailable")} ${g} ${G("Second")}`:`${re("Resend")}`}),i.jsxs(ze,{onClick:k,disabled:(u==null?void 0:u.length)!==6&&a!==rt.TOTP,children:[i.jsxs("span",{children:[" ",oe("Continue")]}),i.jsx(je,{})]})]})]})}):i.jsx($a,{children:i.jsx(T.Spin,{})})})},Ga=h.div`
2565
+ `,jn=({breadcrumbItems:r,logo:e,button:t,className:n,backButton:i=o.jsx(Vo,{})})=>{const a=re.useNavigate();return o.jsxs(Ao,{className:n||"",children:[o.jsxs("div",{className:"page-starter",children:[e?o.jsx("div",{className:"icon",children:e}):o.jsx(Fo,{className:"icon",onClick:()=>a(-1),children:i}),o.jsx(Cn,{items:r})]}),o.jsx("div",{children:t&&t})]})};var Lt=(r=>(r[r.None=1]="None",r[r.OTP=2]="OTP",r[r.TOTP=3]="TOTP",r[r.BackupCode=4]="BackupCode",r))(Lt||{});const Bo={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},_o=({confirmTwoFactor:r,resendOTP:e,confirmationToken:t,updatedResponse:n,mfaType:i=1,id:a,setRefetchData:s,backupCodeEndpoint:l,setVisible:d,visible:c})=>{const[u,p]=x.useState(""),[f,h]=x.useState(!0),[g,v]=x.useState(60),[L,M]=x.useState([]),[j,O]=x.useState(!1);async function S(){var B,F,H;if(u)try{const y=await r({confirmationToken:t,code:u,id:a});(B=y==null?void 0:y.data)!=null&&B.success&&(d(!1),s&&s(R=>!R))}catch(y){const R=$e((H=(F=y==null?void 0:y.response)==null?void 0:F.data)==null?void 0:H.errors);M(R),console.log("Error in Save OTP",y)}}async function z(){if(e)try{const B=await e(t,a);B.data.success&&(n(B),h(!0),v(60))}catch(B){console.log("Error in OTP resend",B)}}function U(){d(!1)}function Y(B){p(B)}return x.useEffect(()=>{if(!f)return;const B=setInterval(()=>{v(F=>F<=1?(clearInterval(B),h(!1),0):F-1)},1e3);return()=>clearInterval(B)},[f]),o.jsx(dt,{open:c,onCancel:U,footer:[null],children:t?o.jsx(o.Fragment,{children:j?o.jsx(o.Fragment,{children:o.jsx(Bt,{setBackupActivated:O,backupCodeEndpoint:l,setVisible:d,id:a,setRefetchData:s,confirmationToken:t})}):o.jsxs(o.Fragment,{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G(Bo[i])})]})}),o.jsxs(tn,{className:L.length>0?"verification-error":"",children:[o.jsx(T.Input.OTP,{value:u,onChange:Y}),L.map(B=>o.jsxs("span",{children:[o.jsx(Ze,{}),B.errors[0]]},B.name)),o.jsxs(ka,{children:[G("DidnReceiveCode")," ",o.jsx(en,{onClick:()=>O(!0),children:G("EnterBackupCode")})]})]}),o.jsxs(pe,{children:[i!==Lt.TOTP&&o.jsx(te,{disabled:f,onClick:z,children:f?`${G("ResendAvailable")} ${g} ${V("Second")}`:`${G("Resend")}`}),o.jsxs(Ne,{onClick:S,disabled:(u==null?void 0:u.length)!==6&&i!==Lt.TOTP,children:[o.jsxs("span",{children:[" ",Z("Continue")]}),o.jsx(ce,{})]})]})]})}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},Uo=m.div`
2473
2566
  width: 100%;
2474
2567
  height: 100%;
2475
- `,Ua=({option:n})=>(S.useEffect(()=>{const e=document.getElementById("my-chart"),t=Fr.init(e);t.setOption(n);const r=()=>t.resize();return window.addEventListener("resize",r,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",r),t.dispose()}},[n]),i.jsx(Ga,{id:"my-chart"}));h.div`
2568
+ `,Go=({option:r})=>(x.useEffect(()=>{const e=document.getElementById("my-chart"),t=An.init(e);t.setOption(r);const n=()=>t.resize();return window.addEventListener("resize",n,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",n),t.dispose()}},[r]),o.jsx(Uo,{id:"my-chart"}));m.div`
2476
2569
  display: flex;
2477
2570
  justify-content: center;
2478
2571
  align-items: center;
2479
2572
  height: 100vh;
2480
- background-color: ${n=>n.backgroundcolor};
2481
- `;const _a=h(T.Spin)`
2573
+ background-color: ${r=>r.backgroundcolor};
2574
+ `;const Wo=m(T.Spin)`
2482
2575
  .ant-spin-dot-item {
2483
- background-color: ${n=>n.backgroundcolor};
2576
+ background-color: ${r=>r.backgroundcolor};
2484
2577
  }
2485
- `,Wa=({backgroundcolor:n})=>i.jsx("div",{children:i.jsx(_a,{size:"large",backgroundcolor:n})}),Ya=h.div`
2578
+ `,Yo=({backgroundcolor:r})=>o.jsx("div",{children:o.jsx(Wo,{size:"large",backgroundcolor:r})}),Ko=m.div`
2486
2579
  position: absolute;
2487
2580
  left: 0;
2488
2581
  top: 0;
@@ -2517,7 +2610,7 @@
2517
2610
  font-size: 1.125rem;
2518
2611
  max-width: 25rem;
2519
2612
  }
2520
- `,Ka=h.keyframes`
2613
+ `,qo=m.keyframes`
2521
2614
  0% {
2522
2615
  opacity: 90%;
2523
2616
  }
@@ -2527,21 +2620,21 @@
2527
2620
  100% {
2528
2621
  opacity: 90%;
2529
2622
  }
2530
- `,Me=h.div`
2623
+ `,Qe=m.div`
2531
2624
  background: #282828; /* Dark base color */
2532
2625
  border-radius: 4px;
2533
2626
  background-size: 1000px 100%;
2534
- animation: ${Ka} 1.5s infinite linear;
2627
+ animation: ${qo} 1.5s infinite linear;
2535
2628
  background: var(--color-interaction-press-primary, rgba(20, 20, 20, 0.1));
2536
- `,qa=h(Me)`
2629
+ `,Zo=m(Qe)`
2537
2630
  width: 70%; /* Mimics the main title area */
2538
2631
  height: 20px;
2539
2632
  margin-bottom: 10px;
2540
- `,pe=h(Me)`
2541
- width: ${n=>n.width};
2542
- height: ${n=>n.height};
2543
- margin-bottom: ${n=>n.marginbottom};
2544
- `,Be=h(Me)`
2633
+ `,ye=m(Qe)`
2634
+ width: ${r=>r.width};
2635
+ height: ${r=>r.height};
2636
+ margin-bottom: ${r=>r.marginbottom};
2637
+ `,ot=m(Qe)`
2545
2638
  flex-grow: 1;
2546
2639
  height: 130px;
2547
2640
  margin: 0 1px;
@@ -2551,24 +2644,24 @@
2551
2644
  flex-direction: column;
2552
2645
  justify-content: space-between;
2553
2646
  animation: unset;
2554
- `,Ze=h.div`
2647
+ `,mt=m.div`
2555
2648
  display: flex;
2556
2649
  margin-bottom: 2px;
2557
2650
  justify-content: space-between;
2558
2651
  margin-top: auto;
2559
- ${Be}:first-child {
2652
+ ${ot}:first-child {
2560
2653
  margin-left: 0;
2561
2654
  }
2562
- ${Be}:last-child {
2655
+ ${ot}:last-child {
2563
2656
  margin-right: 0;
2564
2657
  }
2565
- `,Za=h.div`
2658
+ `,Jo=m.div`
2566
2659
  padding: 20px;
2567
2660
  overflow-y: hidden;
2568
2661
  height: 100vh;
2569
2662
  position: relative;
2570
2663
  background: var(--color-bg-primary, #fff);
2571
- `,Ja=h.div`
2664
+ `,Qo=m.div`
2572
2665
  display: flex;
2573
2666
  width: fit-content;
2574
2667
  gap: 2rem;
@@ -2576,15 +2669,15 @@
2576
2669
  padding: 0.5rem;
2577
2670
  margin-top: 3rem;
2578
2671
  margin-bottom: 1.5rem;
2579
- `,Xa=h(Me)`
2672
+ `,Xo=m(Qe)`
2580
2673
  width: 4rem;
2581
2674
  height: 1rem;
2582
2675
  border-radius: 5px;
2583
- `,Tt=h(Me)`
2584
- width: ${n=>n.width||"100%"};
2676
+ `,mr=m(Qe)`
2677
+ width: ${r=>r.width||"100%"};
2585
2678
  height: 20px;
2586
2679
  margin-bottom: 8px;
2587
- `,Qa=h.div`
2680
+ `,es=m.div`
2588
2681
  border-radius: 2px;
2589
2682
  background: var(--color-bg-secondary, #232323);
2590
2683
  height: 40rem;
@@ -2592,7 +2685,7 @@
2592
2685
  flex-direction: column;
2593
2686
  padding: 1rem;
2594
2687
  margin-bottom: 2px;
2595
- `,It=()=>i.jsxs(i.Fragment,{children:[i.jsx(Tt,{width:"80%"}),i.jsx(Tt,{width:"60%"})]}),eo=()=>i.jsxs(Za,{children:[i.jsx(Ya,{children:i.jsxs("div",{children:[i.jsx("h2",{children:St("ComingSoon")}),i.jsx("p",{children:St("ComingSoonDesc")})]})}),i.jsx(qa,{}),i.jsx(pe,{}),i.jsx(Ja,{children:[...Array(7)].map((n,e)=>i.jsx(Xa,{},e))}),i.jsx(Ze,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx(It,{})},e))}),i.jsxs(Qa,{children:[i.jsx(pe,{width:"20%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"20%",height:"18px",marginbottom:"20px"}),i.jsxs(Ze,{children:[i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"}),i.jsx(pe,{width:"120%",height:"18px",marginbottom:"10"}),i.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),i.jsx(Ze,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx(It,{})},e))})]}),to=h(T.Table)`
2688
+ `,xr=()=>o.jsxs(o.Fragment,{children:[o.jsx(mr,{width:"80%"}),o.jsx(mr,{width:"60%"})]}),ts=()=>o.jsxs(Jo,{children:[o.jsx(Ko,{children:o.jsxs("div",{children:[o.jsx("h2",{children:Kt("ComingSoon")}),o.jsx("p",{children:Kt("ComingSoonDesc")})]})}),o.jsx(Zo,{}),o.jsx(ye,{}),o.jsx(Qo,{children:[...Array(7)].map((r,e)=>o.jsx(Xo,{},e))}),o.jsx(mt,{children:[...Array(5)].map((r,e)=>o.jsx(ot,{children:o.jsx(xr,{})},e))}),o.jsxs(es,{children:[o.jsx(ye,{width:"20%",height:"18px",marginbottom:"10px"}),o.jsx(ye,{width:"20%",height:"18px",marginbottom:"20px"}),o.jsxs(mt,{children:[o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10px"}),o.jsx(ye,{width:"120%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),o.jsx(mt,{children:[...Array(5)].map((r,e)=>o.jsx(ot,{children:o.jsx(xr,{})},e))})]}),rs=m(T.Table)`
2596
2689
  .ant-table-thead > tr > th {
2597
2690
  background: var(--color-bg-primary, #fff);
2598
2691
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2713,7 +2806,7 @@
2713
2806
  }
2714
2807
  }
2715
2808
  }
2716
- `,ro=n=>P.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},P.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),no=({rowKey:n,CustomExpandableRow:e,columns:t,dataTableColumns:r,dataSource:a,expandableRowProps:o,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=S.useState([]),m=t||r;S.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return i.jsx(to,{rowKey:n||"id",pagination:c,scroll:{x:1500},locale:{emptyText:i.jsx(T.Empty,{description:Vr("NoData")})},loading:d,columns:m,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>i.jsx(e,{...o,record:g}),expandIcon:({expanded:g})=>i.jsx(i.Fragment,{children:g?i.jsx("span",{className:"arrow-svg",children:i.jsx(ro,{})}):i.jsx("span",{className:"arrow-svg",children:i.jsx(it,{})})}),expandRowByClick:!0},dataSource:a})},ao=h(T.Tabs)`
2809
+ `,ns=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),is=({rowKey:r,CustomExpandableRow:e,columns:t,dataTableColumns:n,dataSource:i,expandableRowProps:a,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=x.useState([]),f=t||n;x.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function h(g){p(g),l&&l([])}return o.jsx(rs,{rowKey:r||"id",pagination:c,scroll:{x:1500},locale:{emptyText:o.jsx(T.Empty,{description:Vn("NoData")})},loading:d,columns:f,expandedRowKeys:u,onExpandedRowsChange:h,expandable:{expandedRowRender:g=>o.jsx(e,{...a,record:g}),expandIcon:({expanded:g})=>o.jsx(o.Fragment,{children:g?o.jsx("span",{className:"arrow-svg",children:o.jsx(ns,{})}):o.jsx("span",{className:"arrow-svg",children:o.jsx(Tt,{})})}),expandRowByClick:!0},dataSource:i})},as=m(T.Tabs)`
2717
2810
  display: flex;
2718
2811
  gap: var(--spacing-025, 2px);
2719
2812
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2796,7 +2889,7 @@
2796
2889
  fill: var(--color-icon-primary, #fff);
2797
2890
  }
2798
2891
  }
2799
- `;h.div`
2892
+ `;m.div`
2800
2893
  display: flex;
2801
2894
  height: var(--size-400, 32px);
2802
2895
  padding: 0 var(--spacing-100, 8px);
@@ -2811,23 +2904,23 @@
2811
2904
  display: flex;
2812
2905
  gap: 5px;
2813
2906
  }
2814
- `;const oo=h.div`
2907
+ `;const os=m.div`
2815
2908
  position: relative;
2816
2909
  @media (min-width: 1080px) {
2817
2910
  .tab-select {
2818
2911
  display: none;
2819
2912
  }
2820
2913
  }
2821
- `,io=h.div`
2914
+ `,ss=m.div`
2822
2915
  position: absolute;
2823
2916
  left: 20px;
2824
2917
  top: 10px;
2825
2918
  z-index: 1000;
2826
- `,F=n=>typeof n=="string",De=()=>{let n,e;const t=new Promise((r,a)=>{n=r,e=a});return t.resolve=n,t.reject=e,t},zt=n=>n==null?"":String(n),so=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},lo=/###/g,Pt=n=>n&&n.includes("###")?n.replace(lo,"."):n,Mt=n=>!n||F(n),Oe=(n,e,t)=>{const r=F(e)?e.split("."):e;let a=0;for(;a<r.length-1;){if(Mt(n))return{};const o=Pt(r[a]);!n[o]&&t&&(n[o]=new t),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={},++a}return Mt(n)?{}:{obj:n,k:Pt(r[a])}},Ht=(n,e,t)=>{const{obj:r,k:a}=Oe(n,e,Object);if(r!==void 0||e.length===1){r[a]=t;return}let o=e[e.length-1],s=e.slice(0,e.length-1),l=Oe(n,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=Oe(n,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=t},co=(n,e,t,r)=>{const{obj:a,k:o}=Oe(n,e,Object);a[o]=a[o]||[],a[o].push(t)},Ge=(n,e)=>{const{obj:t,k:r}=Oe(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},po=(n,e,t)=>{const r=Ge(n,t);return r!==void 0?r:Ge(e,t)},Cr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?F(n[r])||n[r]instanceof String||F(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Cr(n[r],e[r],t):n[r]=e[r]);return n},ye=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),uo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fo=n=>F(n)?n.replace(/[&<>"'\/]/g,e=>uo[e]):n;class go{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const mo=[" ",",","?","!",";"],ho=new go(20),xo=(n,e,t)=>{e=e||"",t=t||"";const r=mo.filter(s=>!e.includes(s)&&!t.includes(s));if(r.length===0)return!0;const a=ho.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!a.test(n);if(!o){const s=n.indexOf(t);s>0&&!a.test(n.substring(0,s))&&(o=!0)}return o},nt=(n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let a=n;for(let o=0;o<r.length;){if(!a||typeof a!="object")return;let s,l="";for(let d=o;d<r.length;++d)if(d!==o&&(l+=t),l+=r[d],s=a[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<r.length-1)continue;o+=d-o+1;break}a=s}return a},Pe=n=>n==null?void 0:n.replace(/_/g,"-"),bo={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class Ue{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||bo,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,a){return a&&!this.debug?null:(F(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ue(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ue(this.logger,e)}}var le=new Ue;class qe{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const a=this.observers[r].get(t)||0;this.observers[r].set(t,a+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const r=(...a)=>{t(...a),this.off(e,r)};return this.on(e,r),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([a,o])=>{for(let s=0;s<o;s++)a(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,o])=>{for(let s=0;s<o;s++)a(e,...t)})}}class Rt extends qe{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,a={}){var c,u;const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):F(r)&&o?l.push(...r.split(o)):l.push(r)));const d=Ge(this.data,l);return!d&&!t&&!r&&e.includes(".")&&(e=l[0],t=l[1],r=l.slice(2).join(".")),d||!s||!F(r)?d:nt((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],r,o)}addResource(e,t,r,a,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(s?r.split(s):r)),e.includes(".")&&(l=e.split("."),a=t,t=l[1]),this.addNamespaces(t),Ht(this.data,l,a),o.silent||this.emit("added",e,t,r,a)}addResources(e,t,r,a={silent:!1}){for(const o in r)(F(r[o])||Array.isArray(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});a.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,a,o,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),a=r,r=t,t=l[1]),this.addNamespaces(t);let d=Ge(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),a?Cr(d,r,o):d={...d,...r},Ht(this.data,l,d),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(a=>t[a]&&Object.keys(t[a]).length>0)}toJSON(){return this.data}}var jr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,a){return n.forEach(o=>{var s;e=((s=this.processors[o])==null?void 0:s.process(e,t,r,a))??e}),e}};const kr=Symbol("i18next/PATH_KEY");function yo(){const n=[],e=Object.create(null);let t;return e.get=(r,a)=>{var o;return(o=t==null?void 0:t.revoke)==null||o.call(t),a===kr?n:(n.push(a),t=Proxy.revocable(r,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Ce(n,e){const{[kr]:t}=n(yo()),r=(e==null?void 0:e.keySeparator)??".",a=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&a){const o=e==null?void 0:e.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${a}${t.slice(1).join(r)}`}return t.join(r)}const Je=n=>!F(n)&&typeof n!="boolean"&&typeof n!="number";class _e extends qe{constructor(e,t={}){super(),so(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=le.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(e==null)return!1;const a=this.resolve(e,r);if((a==null?void 0:a.res)===void 0)return!1;const o=Je(a.res);return!(r.returnObjects===!1&&o)}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=r&&e.includes(r),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xo(e,r,a);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:F(o)?[o]:o};const c=e.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(o=c.shift()),e=c.join(a)}return{key:e,namespaces:F(o)?[o]:o}}translate(e,t,r){let a=typeof t=="object"?{...t}:t;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),e==null)return"";typeof e=="function"&&(e=Ce(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]),e=e.map(B=>typeof B=="function"?Ce(B,{...this.options,...a}):String(B));const o=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],a),c=d[d.length-1];let u=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=a.lng||this.language,m=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return m?o?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${u}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:l;const f=this.resolve(e,a);let g=f==null?void 0:f.res;const b=(f==null?void 0:f.usedKey)||l,D=(f==null?void 0:f.exactUsedKey)||l,z=["[object Number]","[object Function]","[object RegExp]"],C=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,k=a.count!==void 0&&!F(a.count),M=_e.hasDefaultValue(a),U=k?this.pluralResolver.getSuffix(p,a.count,a):"",W=a.ordinal&&k?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",A=k&&!a.ordinal&&a.count===0,V=A&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${U}`]||a[`defaultValue${W}`]||a.defaultValue;let H=g;$&&!g&&M&&(H=V);const x=Je(H),R=Object.prototype.toString.apply(H);if($&&H&&x&&!z.includes(R)&&!(F(C)&&Array.isArray(H))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,H,{...a,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(f.res=B,f.usedParams=this.getUsedParamsDetails(a),f):B}if(s){const B=Array.isArray(H),L=B?[]:{},j=B?D:b;for(const v in H)if(Object.prototype.hasOwnProperty.call(H,v)){const y=`${j}${s}${v}`;M&&!g?L[v]=this.translate(y,{...a,defaultValue:Je(V)?V[v]:void 0,joinArrays:!1,ns:d}):L[v]=this.translate(y,{...a,joinArrays:!1,ns:d}),L[v]===y&&(L[v]=H[v])}g=L}}else if($&&F(C)&&Array.isArray(g))g=g.join(C),g&&(g=this.extendTranslation(g,e,a,r));else{let B=!1,L=!1;!this.isValidLookup(g)&&M&&(B=!0,g=V),this.isValidLookup(g)||(L=!0,g=l);const v=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:g,y=M&&V!==g&&this.options.updateMissing;if(L||B||y){if(this.logger.log(y?"updateKey":"missingKey",p,c,l,y?V:g),s){const N=this.resolve(l,{...a,keySeparator:!1});N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let w=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let N=0;N<O.length;N++)w.push(O[N]);else this.options.saveMissingTo==="all"?w=this.languageUtils.toResolveHierarchy(a.lng||this.language):w.push(a.lng||this.language);const I=(N,_,Y)=>{var Z;const q=M&&Y!==g?Y:v;this.options.missingKeyHandler?this.options.missingKeyHandler(N,c,_,q,y,a):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(N,c,_,q,y,a),this.emit("missingKey",N,c,_,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?w.forEach(N=>{const _=this.pluralResolver.getSuffixes(N,a);A&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!_.includes(`${this.options.pluralSeparator}zero`)&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(Y=>{I([N],l+Y,a[`defaultValue${Y}`]||V)})}):I(w,l,V))}g=this.extendTranslation(g,e,a,f,r),L&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(L||B)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,B?g:void 0,a))}return o?(f.res=g,f.usedParams=this.getUsedParamsDetails(a),f):g}extendTranslation(e,t,r,a,o){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=F(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const f=e.match(this.interpolator.nestingRegexp);p=f&&f.length}let m=r.replace&&!F(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),e=this.interpolator.interpolate(e,m,r.lng||this.language||a.usedLng,r),u){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;p<g&&(r.nest=!1)}!r.lng&&a&&a.res&&(r.lng=this.language||a.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(o==null?void 0:o[0])===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`),null):this.translate(...f,t),r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,l=F(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(e=jr.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,a,o,s,l;return F(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?Ce(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(d,t),u=c.key;a=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const m=t.count!==void 0&&!F(t.count),f=m&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(F(t.context)||typeof t.context=="number")&&t.context!=="",b=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(D=>{var z,C;this.isValidLookup(r)||(l=D,!this.checkedLoadedFor[`${b[0]}-${D}`]&&((z=this.utils)!=null&&z.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${b[0]}-${D}`]=!0,this.logger.warn(`key "${a}" for languages "${b.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach($=>{var U;if(this.isValidLookup(r))return;s=$;const k=[u];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(k,u,$,D,t);else{let W;m&&(W=this.pluralResolver.getSuffix($,t.count,t));const A=`${this.options.pluralSeparator}zero`,V=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(t.ordinal&&W.startsWith(V)&&k.push(u+W.replace(V,this.options.pluralSeparator)),k.push(u+W),f&&k.push(u+A)),g){const H=`${u}${this.options.contextSeparator||"_"}${t.context}`;k.push(H),m&&(t.ordinal&&W.startsWith(V)&&k.push(H+W.replace(V,this.options.pluralSeparator)),k.push(H+W),f&&k.push(H+A))}}let M;for(;M=k.pop();)this.isValidLookup(r)||(o=M,r=this.getResource($,D,M,t))}))})}),{res:r,usedKey:a,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,a={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(e,t,r,a):this.resourceStore.getResource(e,t,r,a)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!F(e.replace);let a=r?e.replace:e;if(r&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const o of t)delete a[o]}return a}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith(t)&&e[r]!==void 0)return!0;return!1}}class Ft{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=le.create("languageUtils")}getScriptPartFromCode(e){if(e=Pe(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Pe(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(F(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(t=a)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const a=this.getScriptPartFromCode(r);if(this.isSupportedCode(a))return t=a;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(s=>s===o?!0:!s.includes("-")&&!o.includes("-")?!1:!!(s.includes("-")&&!o.includes("-")&&s.slice(0,s.indexOf("-"))===o||s.startsWith(o)&&o.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),F(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),a=[],o=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return F(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):F(e)&&o(this.formatLanguageCode(e)),r.forEach(s=>{a.includes(s)||o(this.formatLanguageCode(s))}),a}}const Nt={zero:0,one:1,two:2,few:3,many:4,other:5},Vt={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class vo{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=le.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=Pe(e==="dev"?"en":e),a=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Vt;if(!e.match(/-|_/))return Vt;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[o]=s,s}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(a=>`${t}${a}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((a,o)=>Nt[a]-Nt[o]).map(a=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(e,t,r={}){const a=this.getRule(e,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const At=(n,e,t,r=".",a=!0)=>{let o=po(n,e,t);return!o&&a&&F(t)&&(o=nt(n,t,r),o===void 0&&(o=nt(e,t,r))),o},Xe=n=>n.replace(/\$/g,"$$$$");class Bt{constructor(e={}){var t;this.logger=le.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:a,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:m,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:D,maxReplaces:z,alwaysFormat:C}=e.interpolation;this.escape=t!==void 0?t:fo,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=o?ye(o):s||"{{",this.suffix=l?ye(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=m?ye(m):f||ye("$t("),this.nestingSuffix=g?ye(g):b||ye(")"),this.nestingOptionsSeparator=D||",",this.maxReplaces=z||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,a){var f;let o,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const C=At(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...a,...t,interpolationkey:g}):C}const b=g.split(this.formatSeparator),D=b.shift().trim(),z=b.join(this.formatSeparator).trim();return this.format(At(t,d,D,this.options.keySeparator,this.options.ignoreJSONStructure),z,r,{...a,...t,interpolationkey:D})};this.resetRegExp();const u=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((f=a==null?void 0:a.interpolation)==null?void 0:f.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Xe(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Xe(this.escape(g)):Xe(g)}].forEach(g=>{for(l=0;o=g.regex.exec(e);){const b=o[1].trim();if(s=c(b),s===void 0)if(typeof u=="function"){const z=u(e,o,a);s=F(z)?z:""}else if(a&&Object.prototype.hasOwnProperty.call(a,b))s="";else if(p){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),s="";else!F(s)&&!this.useRawValueToEscape&&(s=zt(s));const D=g.safeValue(s);if(e=e.replace(o[0],D),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,r={}){let a,o,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${ye(u)}[ ]*{`));let m=`{${p[1]}`;d=p[0],m=this.interpolate(m,s);const f=m.match(/'/g),g=m.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),c&&(s={...c,...s})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,b),`${d}${u}${m}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;a=this.nestingRegexp.exec(e);){let d=[];s={...r},s=s.replace&&!F(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(d=a[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),o=t(l.call(this,a[1].trim(),s),s),o&&a[0]===e&&!F(o))return o;F(o)||(o=zt(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),o=""),d.length&&(o=d.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}const wo=n=>{let e=n.toLowerCase().trim();const t={};if(n.includes("(")){const r=n.split("(");e=r[0].toLowerCase().trim();const a=r[1].slice(0,-1);e==="currency"&&!a.includes(":")?t.currency||(t.currency=a.trim()):e==="relativetime"&&!a.includes(":")?t.range||(t.range=a.trim()):a.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Gt=n=>{const e={};return(t,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});const s=r+JSON.stringify(o);let l=e[s];return l||(l=n(Pe(r),a),e[s]=l),l(t)}},So=n=>(e,t,r)=>n(Pe(t),r)(e);class Co{constructor(e={}){this.logger=le.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Gt:So;this.formats={number:r((a,o)=>{const s=new Intl.NumberFormat(a,{...o});return l=>s.format(l)}),currency:r((a,o)=>{const s=new Intl.NumberFormat(a,{...o,style:"currency"});return l=>s.format(l)}),datetime:r((a,o)=>{const s=new Intl.DateTimeFormat(a,{...o});return l=>s.format(l)}),relativetime:r((a,o)=>{const s=new Intl.RelativeTimeFormat(a,{...o});return l=>s.format(l,o.range||"day")}),list:r((a,o)=>{const s=new Intl.ListFormat(a,{...o});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Gt(t)}format(e,t,r,a={}){if(!t||e==null)return e;const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&!o[0].includes(")")&&o.find(l=>l.includes(")"))){const l=o.findIndex(d=>d.includes(")"));o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=wo(d);if(this.formats[c]){let m=l;try{const f=((p=a==null?void 0:a.formatParams)==null?void 0:p[a.interpolationkey])||{},g=f.locale||f.lng||a.locale||a.lng||r;m=this.formats[c](l,g,{...u,...a,...f})}catch(f){this.logger.warn(f)}return m}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const jo=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ko extends qe{constructor(e,t,r,a={}){var o,s;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=le.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,a.backend,a)}queueLoad(e,t,r,a){const o={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const m=`${c}|${p}`;!r.reload&&this.store.hasResourceBundle(c,p)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,u=!1,s[m]===void 0&&(s[m]=!0),o[m]===void 0&&(o[m]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const a=e.split("|"),o=a[0],s=a[1];t&&this.emit("failedLoading",o,s,t),!t&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(d=>{co(d.loaded,[o],s),jo(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r,a=0,o=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:a,wait:o,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&a<this.maxRetries){setTimeout(()=>{this.read(e,t,r,a+1,o*2,s)},o);return}s(c,u)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,r={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();F(e)&&(e=this.languageUtils.toResolveHierarchy(e)),F(t)&&(t=[t]);const o=this.queueLoad(e,t,r,a);if(!o.toLoad.length)return o.pending.length||a(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),a=r[0],o=r[1];this.read(a,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${a} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${o} for language ${a}`,l),this.loaded(e,s,l)})}saveMissing(e,t,r,a,o,s={},l=()=>{}){var d,c,u,p,m;if((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const f={...s,isUpdate:o},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(e,t,r,a,f):b=g(e,t,r,a),b&&typeof b.then=="function"?b.then(D=>l(null,D)).catch(l):l(null,b)}catch(b){l(b)}else g(e,t,r,a,l,f)}!e||!e[0]||this.store.addResource(e[0],t,r,a)}}}const Qe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),F(n[1])&&(e.defaultValue=n[1]),F(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ut=n=>(F(n.ns)&&(n.ns=[n.ns]),F(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),F(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),Ne=()=>{},Lo=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class Te extends qe{constructor(e={},t){if(super(),this.options=Ut(e),this.services={},this.logger=le,this.modules={external:[]},Lo(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(F(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Qe();this.options={...r,...this.options,...Ut(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?le.init(a(this.modules.logger),this.options):le.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Co;const u=new Ft(this.options);this.store=new Rt(this.options.resources,this.options);const p=this.services;p.logger=le,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new vo(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=a(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Bt(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ko(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(m,...f)=>{this.emit(m,...f)}),this.modules.languageDetector&&(p.languageDetector=a(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=a(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new _e(this.services,this.options),this.translator.on("*",(m,...f)=>{this.emit(m,...f)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Ne),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=De(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=Ne){var o,s;let r=t;const a=F(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};a?d(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const a=De();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Ne),this.services.backendConnector.reload(e,t,o=>{a.resolve(),r(o)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&jr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=De();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,d)=>{d?this.isLanguageChangingTo===e&&(a(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=F(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(F(l)?[l]:l);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,m=>{o(m,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),r}getFixedT(e,t,r){const a=(o,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([o,s].concat(l)):d={...s},d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs,d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||a.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=Ce(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(o)?p=o.map(m=>(typeof m=="function"&&(m=Ce(m,c)),`${d.keyPrefix}${u}${m}`)):(typeof o=="function"&&(o=Ce(o,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${o}`:o),this.t(p,d)};return F(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=r,a}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,e)&&(!a||s(o,e)))}loadNamespaces(e,t){const r=De();return this.options.ns?(F(e)&&(e=[e]),e.forEach(a=>{this.options.ns.includes(a)||this.options.ns.push(a)}),this.loadResources(a=>{r.resolve(),t&&t(a)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=De();F(e)&&(e=[e]);const a=this.options.preload||[],o=e.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=a.concat(o),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}dir(e){var a,o;if(e||(e=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new Ft(Qe());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const r=new Te(e,t);return r.createInstance=Te.createInstance,r}cloneInstance(e={},t=Ne){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},o=new Te(a);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});o.store=new Rt(l,a),o.services.resourceStore=o.store}if(e.interpolation){const d={...Qe().interpolation,...this.options.interpolation,...e.interpolation},c={...a,interpolation:d};o.services.interpolator=new Bt(c)}return o.translator=new _e(o.services,a),o.translator.on("*",(l,...d)=>{o.emit(l,...d)}),o.init(a,t),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Q=Te.createInstance();Q.createInstance;Q.dir;Q.init;Q.loadResources;Q.reloadResources;Q.use;Q.changeLanguage;Q.getFixedT;Q.t;Q.exists;Q.setDefaultNamespace;Q.hasLoadedNamespace;Q.loadNamespaces;Q.loadLanguages;Q.use(Mr).use(Pr).use(Wt.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});function Do(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ve={exports:{}},$o=Ve.exports,_t;function Eo(){return _t||(_t=1,(function(n,e){(function(t,r){n.exports=r()})($o,(function(){var t=1e3,r=6e4,a=36e5,o="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",m="quarter",f="year",g="date",b="Invalid Date",D=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var j=["th","st","nd","rd"],v=L%100;return"["+L+(j[(v-20)%10]||j[v]||j[0])+"]"}},$=function(L,j,v){var y=String(L);return!y||y.length>=j?L:""+Array(j+1-y.length).join(v)+L},k={s:$,z:function(L){var j=-L.utcOffset(),v=Math.abs(j),y=Math.floor(v/60),w=v%60;return(j<=0?"+":"-")+$(y,2,"0")+":"+$(w,2,"0")},m:function L(j,v){if(j.date()<v.date())return-L(v,j);var y=12*(v.year()-j.year())+(v.month()-j.month()),w=j.clone().add(y,p),O=v-w<0,I=j.clone().add(y+(O?-1:1),p);return+(-(y+(v-w)/(O?w-I:I-w))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:p,y:f,w:u,d:c,D:g,h:d,m:l,s,ms:o,Q:m}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},M="en",U={};U[M]=C;var W="$isDayjsObject",A=function(L){return L instanceof R||!(!L||!L[W])},V=function L(j,v,y){var w;if(!j)return M;if(typeof j=="string"){var O=j.toLowerCase();U[O]&&(w=O),v&&(U[O]=v,w=O);var I=j.split("-");if(!w&&I.length>1)return L(I[0])}else{var N=j.name;U[N]=j,w=N}return!y&&w&&(M=w),w||!y&&M},H=function(L,j){if(A(L))return L.clone();var v=typeof j=="object"?j:{};return v.date=L,v.args=arguments,new R(v)},x=k;x.l=V,x.i=A,x.w=function(L,j){return H(L,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var R=(function(){function L(v){this.$L=V(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[W]=!0}var j=L.prototype;return j.parse=function(v){this.$d=(function(y){var w=y.date,O=y.utc;if(w===null)return new Date(NaN);if(x.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var I=w.match(D);if(I){var N=I[2]-1||0,_=(I[7]||"0").substring(0,3);return O?new Date(Date.UTC(I[1],N,I[3]||1,I[4]||0,I[5]||0,I[6]||0,_)):new Date(I[1],N,I[3]||1,I[4]||0,I[5]||0,I[6]||0,_)}}return new Date(w)})(v),this.init()},j.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},j.$utils=function(){return x},j.isValid=function(){return this.$d.toString()!==b},j.isSame=function(v,y){var w=H(v);return this.startOf(y)<=w&&w<=this.endOf(y)},j.isAfter=function(v,y){return H(v)<this.startOf(y)},j.isBefore=function(v,y){return this.endOf(y)<H(v)},j.$g=function(v,y,w){return x.u(v)?this[y]:this.set(w,v)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(v,y){var w=this,O=!!x.u(y)||y,I=x.p(v),N=function(de,ne){var me=x.w(w.$u?Date.UTC(w.$y,ne,de):new Date(w.$y,ne,de),w);return O?me:me.endOf(c)},_=function(de,ne){return x.w(w.toDate()[de].apply(w.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(ne)),w)},Y=this.$W,q=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(I){case f:return O?N(1,0):N(31,11);case p:return O?N(1,q):N(0,q+1);case u:var ie=this.$locale().weekStart||0,K=(Y<ie?Y+7:Y)-ie;return N(O?Z-K:Z+(6-K),q);case c:case g:return _(ce+"Hours",0);case d:return _(ce+"Minutes",1);case l:return _(ce+"Seconds",2);case s:return _(ce+"Milliseconds",3);default:return this.clone()}},j.endOf=function(v){return this.startOf(v,!1)},j.$set=function(v,y){var w,O=x.p(v),I="set"+(this.$u?"UTC":""),N=(w={},w[c]=I+"Date",w[g]=I+"Date",w[p]=I+"Month",w[f]=I+"FullYear",w[d]=I+"Hours",w[l]=I+"Minutes",w[s]=I+"Seconds",w[o]=I+"Milliseconds",w)[O],_=O===c?this.$D+(y-this.$W):y;if(O===p||O===f){var Y=this.clone().set(g,1);Y.$d[N](_),Y.init(),this.$d=Y.set(g,Math.min(this.$D,Y.daysInMonth())).$d}else N&&this.$d[N](_);return this.init(),this},j.set=function(v,y){return this.clone().$set(v,y)},j.get=function(v){return this[x.p(v)]()},j.add=function(v,y){var w,O=this;v=Number(v);var I=x.p(y),N=function(q){var Z=H(O);return x.w(Z.date(Z.date()+Math.round(q*v)),O)};if(I===p)return this.set(p,this.$M+v);if(I===f)return this.set(f,this.$y+v);if(I===c)return N(1);if(I===u)return N(7);var _=(w={},w[l]=r,w[d]=a,w[s]=t,w)[I]||1,Y=this.$d.getTime()+v*_;return x.w(Y,this)},j.subtract=function(v,y){return this.add(-1*v,y)},j.format=function(v){var y=this,w=this.$locale();if(!this.isValid())return w.invalidDate||b;var O=v||"YYYY-MM-DDTHH:mm:ssZ",I=x.z(this),N=this.$H,_=this.$m,Y=this.$M,q=w.weekdays,Z=w.months,ce=w.meridiem,ie=function(ne,me,Le,He){return ne&&(ne[me]||ne(y,O))||Le[me].slice(0,He)},K=function(ne){return x.s(N%12||12,ne,"0")},de=ce||function(ne,me,Le){var He=ne<12?"AM":"PM";return Le?He.toLowerCase():He};return O.replace(z,(function(ne,me){return me||(function(Le){switch(Le){case"YY":return String(y.$y).slice(-2);case"YYYY":return x.s(y.$y,4,"0");case"M":return Y+1;case"MM":return x.s(Y+1,2,"0");case"MMM":return ie(w.monthsShort,Y,Z,3);case"MMMM":return ie(Z,Y);case"D":return y.$D;case"DD":return x.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return ie(w.weekdaysMin,y.$W,q,2);case"ddd":return ie(w.weekdaysShort,y.$W,q,3);case"dddd":return q[y.$W];case"H":return String(N);case"HH":return x.s(N,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return de(N,_,!0);case"A":return de(N,_,!1);case"m":return String(_);case"mm":return x.s(_,2,"0");case"s":return String(y.$s);case"ss":return x.s(y.$s,2,"0");case"SSS":return x.s(y.$ms,3,"0");case"Z":return I}return null})(ne)||I.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(v,y,w){var O,I=this,N=x.p(y),_=H(v),Y=(_.utcOffset()-this.utcOffset())*r,q=this-_,Z=function(){return x.m(I,_)};switch(N){case f:O=Z()/12;break;case p:O=Z();break;case m:O=Z()/3;break;case u:O=(q-Y)/6048e5;break;case c:O=(q-Y)/864e5;break;case d:O=q/a;break;case l:O=q/r;break;case s:O=q/t;break;default:O=q}return w?O:x.a(O)},j.daysInMonth=function(){return this.endOf(p).$D},j.$locale=function(){return U[this.$L]},j.locale=function(v,y){if(!v)return this.$L;var w=this.clone(),O=V(v,y,!0);return O&&(w.$L=O),w},j.clone=function(){return x.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},L})(),B=R.prototype;return H.prototype=B,[["$ms",o],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(L){B[L[1]]=function(j){return this.$g(j,L[0],L[1])}})),H.extend=function(L,j){return L.$i||(L(j,R,H),L.$i=!0),H},H.locale=V,H.isDayjs=A,H.unix=function(L){return H(1e3*L)},H.en=U[M],H.Ls=U,H.p={},H}))})(Ve)),Ve.exports}var Oo=Eo();const Lr=Do(Oo),To=({setDateFilter:n,setShowRange:e,setDates:t})=>{const r=s=>s&&s>Lr().endOf("day"),a=s=>{if(s&&s[0]&&s[1]){const l=te.toISODateString(s[0].toDate()),d=te.toISODateString(s[1].toDate());t([l,d]),n(c=>({...c,startDate:l,endDate:d})),e(!1)}},o={lang:{locale:Q.language,shortMonths:[ae("0"),ae("1"),ae("2"),ae("3"),ae("4"),ae("5"),ae("6"),ae("7"),ae("8"),ae("9"),ae("10"),ae("11")],shortWeekDays:[be("Sun"),be("Mon"),be("Tue"),be("Wed"),be("Thu"),be("Fri"),be("Sat")]}};return i.jsx(Qt,{dropdownClassName:"date-picker-column-style",locale:o,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>a(s),disabledDate:r})},Io=h(T.Empty)`
2919
+ `,N=r=>typeof r=="string",Be=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},vr=r=>r==null?"":String(r),ls=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},cs=/###/g,yr=r=>r&&r.includes("###")?r.replace(cs,"."):r,br=r=>!r||N(r),We=(r,e,t)=>{const n=N(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(br(r))return{};const a=yr(n[i]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++i}return br(r)?{}:{obj:r,k:yr(n[i])}},wr=(r,e,t)=>{const{obj:n,k:i}=We(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=We(r,s,Object);for(;l.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),l=We(r,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},ds=(r,e,t,n)=>{const{obj:i,k:a}=We(r,e,Object);i[a]=i[a]||[],i[a].push(t)},st=(r,e)=>{const{obj:t,k:n}=We(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},ps=(r,e,t)=>{const n=st(r,t);return n!==void 0?n:st(e,t)},Sn=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?N(r[n])||r[n]instanceof String||N(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Sn(r[n],e[n],t):r[n]=e[n]);return r},De=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),us={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fs=r=>N(r)?r.replace(/[&<>"'\/]/g,e=>us[e]):r;class hs{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const gs=[" ",",","?","!",";"],ms=new hs(20),xs=(r,e,t)=>{e=e||"",t=t||"";const n=gs.filter(s=>!e.includes(s)&&!t.includes(s));if(n.length===0)return!0;const i=ms.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!i.test(r);if(!a){const s=r.indexOf(t);s>0&&!i.test(r.substring(0,s))&&(a=!0)}return a},Et=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let s,l="";for(let d=a;d<n.length;++d)if(d!==a&&(l+=t),l+=n[d],s=i[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<n.length-1)continue;a+=d-a+1;break}i=s}return i},qe=r=>r==null?void 0:r.replace(/_/g,"-"),vs={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class lt{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||vs,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(N(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new lt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new lt(this.logger,e)}}var ge=new lt;class ft{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,a])=>{for(let s=0;s<a;s++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let s=0;s<a;s++)i(e,...t)})}}class Cr extends ft{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){var c,u;const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],n&&(Array.isArray(n)?l.push(...n):N(n)&&a?l.push(...n.split(a)):l.push(n)));const d=st(this.data,l);return!d&&!t&&!n&&e.includes(".")&&(e=l[0],t=l[1],n=l.slice(2).join(".")),d||!s||!N(n)?d:Et((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],n,a)}addResource(e,t,n,i,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];n&&(l=l.concat(s?n.split(s):n)),e.includes(".")&&(l=e.split("."),i=t,t=l[1]),this.addNamespaces(t),wr(this.data,l,i),a.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const a in n)(N(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,a,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),i=n,n=t,t=l[1]),this.addNamespaces(t);let d=st(this.data,l)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Sn(d,n,a):d={...d,...n},wr(this.data,l,d),s.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var kn={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(a=>{var s;e=((s=this.processors[a])==null?void 0:s.process(e,t,n,i))??e}),e}};const Ln=Symbol("i18next/PATH_KEY");function ys(){const r=[],e=Object.create(null);let t;return e.get=(n,i)=>{var a;return(a=t==null?void 0:t.revoke)==null||a.call(t),i===Ln?r:(r.push(i),t=Proxy.revocable(n,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function He(r,e){const{[Ln]:t}=r(ys()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&i){const a=e==null?void 0:e.ns,s=Array.isArray(a)?a:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${i}${t.slice(1).join(n)}`}return t.join(n)}const xt=r=>!N(r)&&typeof r!="boolean"&&typeof r!="number";class ct extends ft{constructor(e,t={}){super(),ls(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const a=xt(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const s=n&&e.includes(n),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xs(e,n,i);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:N(a)?[a]:a};const c=e.split(n);(n!==i||n===i&&this.options.ns.includes(c[0]))&&(a=c.shift()),e=c.join(i)}return{key:e,namespaces:N(a)?[a]:a}}translate(e,t,n){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=He(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(_=>typeof _=="function"?He(_,{...this.options,...i}):String(_));const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],i),c=d[d.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return f?a?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:l;const h=this.resolve(e,i);let g=h==null?void 0:h.res;const v=(h==null?void 0:h.usedKey)||l,L=(h==null?void 0:h.exactUsedKey)||l,M=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,S=i.count!==void 0&&!N(i.count),z=ct.hasDefaultValue(i),U=S?this.pluralResolver.getSuffix(p,i.count,i):"",Y=i.ordinal&&S?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",B=S&&!i.ordinal&&i.count===0,F=B&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${U}`]||i[`defaultValue${Y}`]||i.defaultValue;let H=g;O&&!g&&z&&(H=F);const y=xt(H),R=Object.prototype.toString.apply(H);if(O&&H&&y&&!M.includes(R)&&!(N(j)&&Array.isArray(H))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,H,{...i,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(h.res=_,h.usedParams=this.getUsedParamsDetails(i),h):_}if(s){const _=Array.isArray(H),E=_?[]:{},k=_?L:v;for(const w in H)if(Object.prototype.hasOwnProperty.call(H,w)){const b=`${k}${s}${w}`;z&&!g?E[w]=this.translate(b,{...i,defaultValue:xt(F)?F[w]:void 0,joinArrays:!1,ns:d}):E[w]=this.translate(b,{...i,joinArrays:!1,ns:d}),E[w]===b&&(E[w]=H[w])}g=E}}else if(O&&N(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,i,n));else{let _=!1,E=!1;!this.isValidLookup(g)&&z&&(_=!0,g=F),this.isValidLookup(g)||(E=!0,g=l);const w=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:g,b=z&&F!==g&&this.options.updateMissing;if(E||_||b){if(this.logger.log(b?"updateKey":"missingKey",p,c,l,b?F:g),s){const A=this.resolve(l,{...i,keySeparator:!1});A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let C=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let A=0;A<I.length;A++)C.push(I[A]);else this.options.saveMissingTo==="all"?C=this.languageUtils.toResolveHierarchy(i.lng||this.language):C.push(i.lng||this.language);const P=(A,W,K)=>{var Q;const J=z&&K!==g?K:w;this.options.missingKeyHandler?this.options.missingKeyHandler(A,c,W,J,b,i):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(A,c,W,J,b,i),this.emit("missingKey",A,c,W,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?C.forEach(A=>{const W=this.pluralResolver.getSuffixes(A,i);B&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!W.includes(`${this.options.pluralSeparator}zero`)&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(K=>{P([A],l+K,i[`defaultValue${K}`]||F)})}):P(C,l,F))}g=this.extendTranslation(g,e,i,h,n),E&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(E||_)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,_?g:void 0,i))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(i),h):g}extendTranslation(e,t,n,i,a){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=N(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const h=e.match(this.interpolator.nestingRegexp);p=h&&h.length}let f=n.replace&&!N(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,n.lng||this.language||i.usedLng,n),u){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;p<g&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=N(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(e=kn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,a,s,l;return N(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?He(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(d,t),u=c.key;i=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const f=t.count!==void 0&&!N(t.count),h=f&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(N(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(L=>{var M,j;this.isValidLookup(n)||(l=L,!this.checkedLoadedFor[`${v[0]}-${L}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${v[0]}-${L}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(O=>{var U;if(this.isValidLookup(n))return;s=O;const S=[u];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(S,u,O,L,t);else{let Y;f&&(Y=this.pluralResolver.getSuffix(O,t.count,t));const B=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(t.ordinal&&Y.startsWith(F)&&S.push(u+Y.replace(F,this.options.pluralSeparator)),S.push(u+Y),h&&S.push(u+B)),g){const H=`${u}${this.options.contextSeparator||"_"}${t.context}`;S.push(H),f&&(t.ordinal&&Y.startsWith(F)&&S.push(H+Y.replace(F,this.options.pluralSeparator)),S.push(H+Y),h&&S.push(H+B))}}let z;for(;z=S.pop();)this.isValidLookup(n)||(a=z,n=this.getResource(O,L,z,t))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,i={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!N(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of t)delete i[a]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}}class jr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(N(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return t=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>s===a?!0:!s.includes("-")&&!a.includes("-")?!1:!!(s.includes("-")&&!a.includes("-")&&s.slice(0,s.indexOf("-"))===a||s.startsWith(a)&&a.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),N(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],a=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return N(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):N(e)&&a(this.formatLanguageCode(e)),n.forEach(s=>{i.includes(s)||a(this.formatLanguageCode(s))}),i}}const Sr={zero:0,one:1,two:2,few:3,many:4,other:5},kr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bs{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=qe(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),kr;if(!e.match(/-|_/))return kr;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[a]=s,s}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>Sr[i]-Sr[a]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Lr=(r,e,t,n=".",i=!0)=>{let a=ps(r,e,t);return!a&&i&&N(t)&&(a=Et(r,t,n),a===void 0&&(a=Et(e,t,n))),a},vt=r=>r.replace(/\$/g,"$$$$");class Er{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:L,maxReplaces:M,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:fs,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?De(a):s||"{{",this.suffix=l?De(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?De(f):h||De("$t("),this.nestingSuffix=g?De(g):v||De(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=M||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var h;let a,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Lr(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,n,{...i,...t,interpolationkey:g}):j}const v=g.split(this.formatSeparator),L=v.shift().trim(),M=v.join(this.formatSeparator).trim();return this.format(Lr(t,d,L,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:L})};this.resetRegExp();const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>vt(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?vt(this.escape(g)):vt(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const v=a[1].trim();if(s=c(v),s===void 0)if(typeof u=="function"){const M=u(e,a,i);s=N(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(p){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),s="";else!N(s)&&!this.useRawValueToEscape&&(s=vr(s));const L=g.safeValue(s);if(e=e.replace(a[0],L),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,a,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${De(u)}[ ]*{`));let f=`{${p[1]}`;d=p[0],f=this.interpolate(f,s);const h=f.match(/'/g),g=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,v),`${d}${u}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;i=this.nestingRegexp.exec(e);){let d=[];s={...n},s=s.replace&&!N(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(c!==-1&&(d=i[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,c)),a=t(l.call(this,i[1].trim(),s),s),a&&i[0]===e&&!N(a))return a;N(a)||(a=vr(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((u,p)=>this.format(u,p,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const ws=r=>{let e=r.toLowerCase().trim();const t={};if(r.includes("(")){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?t.currency||(t.currency=i.trim()):e==="relativetime"&&!i.includes(":")?t.range||(t.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Or=r=>{const e={};return(t,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const s=n+JSON.stringify(a);let l=e[s];return l||(l=r(qe(n),i),e[s]=l),l(t)}},Cs=r=>(e,t,n)=>r(qe(t),n)(e);class js{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Or:Cs;this.formats={number:n((i,a)=>{const s=new Intl.NumberFormat(i,{...a});return l=>s.format(l)}),currency:n((i,a)=>{const s=new Intl.NumberFormat(i,{...a,style:"currency"});return l=>s.format(l)}),datetime:n((i,a)=>{const s=new Intl.DateTimeFormat(i,{...a});return l=>s.format(l)}),relativetime:n((i,a)=>{const s=new Intl.RelativeTimeFormat(i,{...a});return l=>s.format(l,a.range||"day")}),list:n((i,a)=>{const s=new Intl.ListFormat(i,{...a});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Or(t)}format(e,t,n,i={}){if(!t||e==null)return e;const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&!a[0].includes(")")&&a.find(l=>l.includes(")"))){const l=a.findIndex(d=>d.includes(")"));a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=ws(d);if(this.formats[c]){let f=l;try{const h=((p=i==null?void 0:i.formatParams)==null?void 0:p[i.interpolationkey])||{},g=h.locale||h.lng||i.locale||i.lng||n;f=this.formats[c](l,g,{...u,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const Ss=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class ks extends ft{constructor(e,t,n,i={}){var a,s;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ge.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(a=this.backend)==null?void 0:a.init)==null||s.call(a,n,i.backend,i)}queueLoad(e,t,n,i){const a={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const f=`${c}|${p}`;!n.reload&&this.store.hasResourceBundle(c,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),a[f]===void 0&&(a[f]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const i=e.split("|"),a=i[0],s=i[1];t&&this.emit("failedLoading",a,s,t),!t&&n&&this.store.addResourceBundle(a,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const l={};this.queue.forEach(d=>{ds(d.loaded,[a],s),Ss(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,n,i=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:a,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read(e,t,n,i+1,a*2,s)},a);return}s(c,u)},d=this.backend[n].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();N(e)&&(e=this.languageUtils.toResolveHierarchy(e)),N(t)&&(t=[t]);const a=this.queueLoad(e,t,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${i} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${i}`,l),this.loaded(e,s,l)})}saveMissing(e,t,n,i,a,s={},l=()=>{}){var d,c,u,p,f;if((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const h={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(e,t,n,i,h):v=g(e,t,n,i),v&&typeof v.then=="function"?v.then(L=>l(null,L)).catch(l):l(null,v)}catch(v){l(v)}else g(e,t,n,i,l,h)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const yt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),N(r[1])&&(e.defaultValue=r[1]),N(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Dr=r=>(N(r.ns)&&(r.ns=[r.ns]),N(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),N(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&!r.supportedLngs.includes("cimode")&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),nt=()=>{},Ls=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ye extends ft{constructor(e={},t){if(super(),this.options=Dr(e),this.services={},this.logger=ge,this.modules={external:[]},Ls(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(N(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=yt();this.options={...n,...this.options,...Dr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ge.init(i(this.modules.logger),this.options):ge.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=js;const u=new jr(this.options);this.store=new Cr(this.options.resources,this.options);const p=this.services;p.logger=ge,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new bs(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=i(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Er(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ks(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,t||(t=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=Be(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=nt){var a,s;let n=t;const i=N(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};i?d(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(a=this.options.preload)==null?void 0:a.forEach)==null||s.call(a,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const i=Be();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=nt),this.services.backendConnector.reload(e,t,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&kn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Be();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?this.isLanguageChangingTo===e&&(i(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=N(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(N(l)?[l]:l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,f=>{a(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),n}getFixedT(e,t,n){const i=(a,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([a,s].concat(l)):d={...s},d.lng=d.lng||i.lng,d.lngs=d.lngs||i.lngs,d.ns=d.ns||i.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||n||i.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=He(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(a)?p=a.map(f=>(typeof f=="function"&&(f=He(f,c)),`${d.keyPrefix}${u}${f}`)):(typeof a=="function"&&(a=He(a,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${a}`:a),this.t(p,d)};return N(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(a,e)))}loadNamespaces(e,t){const n=Be();return this.options.ns?(N(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Be();N(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(s=>!i.includes(s)&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=i.concat(a),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}dir(e){var i,a;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new jr(yt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new Ye(e,t);return n.createInstance=Ye.createInstance,n}cloneInstance(e={},t=nt){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new Ye(i);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});a.store=new Cr(l,i),a.services.resourceStore=a.store}if(e.interpolation){const d={...yt().interpolation,...this.options.interpolation,...e.interpolation},c={...i,interpolation:d};a.services.interpolator=new Er(c)}return a.translator=new ct(a.services,i),a.translator.on("*",(l,...d)=>{a.emit(l,...d)}),a.init(i,t),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ne=Ye.createInstance();ne.createInstance;ne.dir;ne.init;ne.loadResources;ne.reloadResources;ne.use;ne.changeLanguage;ne.getFixedT;ne.t;ne.exists;ne.setDefaultNamespace;ne.hasLoadedNamespace;ne.loadNamespaces;ne.loadLanguages;ne.use(Hn).use(zn).use($r.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});var it={exports:{}},Es=it.exports,Tr;function Os(){return Tr||(Tr=1,(function(r,e){(function(t,n){r.exports=n()})(Es,(function(){var t=1e3,n=6e4,i=36e5,a="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",f="quarter",h="year",g="date",v="Invalid Date",L=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var k=["th","st","nd","rd"],w=E%100;return"["+E+(k[(w-20)%10]||k[w]||k[0])+"]"}},O=function(E,k,w){var b=String(E);return!b||b.length>=k?E:""+Array(k+1-b.length).join(w)+E},S={s:O,z:function(E){var k=-E.utcOffset(),w=Math.abs(k),b=Math.floor(w/60),C=w%60;return(k<=0?"+":"-")+O(b,2,"0")+":"+O(C,2,"0")},m:function E(k,w){if(k.date()<w.date())return-E(w,k);var b=12*(w.year()-k.year())+(w.month()-k.month()),C=k.clone().add(b,p),I=w-C<0,P=k.clone().add(b+(I?-1:1),p);return+(-(b+(w-C)/(I?C-P:P-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:p,y:h,w:u,d:c,D:g,h:d,m:l,s,ms:a,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},z="en",U={};U[z]=j;var Y="$isDayjsObject",B=function(E){return E instanceof R||!(!E||!E[Y])},F=function E(k,w,b){var C;if(!k)return z;if(typeof k=="string"){var I=k.toLowerCase();U[I]&&(C=I),w&&(U[I]=w,C=I);var P=k.split("-");if(!C&&P.length>1)return E(P[0])}else{var A=k.name;U[A]=k,C=A}return!b&&C&&(z=C),C||!b&&z},H=function(E,k){if(B(E))return E.clone();var w=typeof k=="object"?k:{};return w.date=E,w.args=arguments,new R(w)},y=S;y.l=F,y.i=B,y.w=function(E,k){return H(E,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var R=(function(){function E(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[Y]=!0}var k=E.prototype;return k.parse=function(w){this.$d=(function(b){var C=b.date,I=b.utc;if(C===null)return new Date(NaN);if(y.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var P=C.match(L);if(P){var A=P[2]-1||0,W=(P[7]||"0").substring(0,3);return I?new Date(Date.UTC(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)):new Date(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)}}return new Date(C)})(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return y},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(w,b){var C=H(w);return this.startOf(b)<=C&&C<=this.endOf(b)},k.isAfter=function(w,b){return H(w)<this.startOf(b)},k.isBefore=function(w,b){return this.endOf(b)<H(w)},k.$g=function(w,b,C){return y.u(w)?this[b]:this.set(C,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,b){var C=this,I=!!y.u(b)||b,P=y.p(w),A=function(ve,se){var ke=y.w(C.$u?Date.UTC(C.$y,se,ve):new Date(C.$y,se,ve),C);return I?ke:ke.endOf(c)},W=function(ve,se){return y.w(C.toDate()[ve].apply(C.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(se)),C)},K=this.$W,J=this.$M,Q=this.$D,xe="set"+(this.$u?"UTC":"");switch(P){case h:return I?A(1,0):A(31,11);case p:return I?A(1,J):A(0,J+1);case u:var ue=this.$locale().weekStart||0,q=(K<ue?K+7:K)-ue;return A(I?Q-q:Q+(6-q),J);case c:case g:return W(xe+"Hours",0);case d:return W(xe+"Minutes",1);case l:return W(xe+"Seconds",2);case s:return W(xe+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,b){var C,I=y.p(w),P="set"+(this.$u?"UTC":""),A=(C={},C[c]=P+"Date",C[g]=P+"Date",C[p]=P+"Month",C[h]=P+"FullYear",C[d]=P+"Hours",C[l]=P+"Minutes",C[s]=P+"Seconds",C[a]=P+"Milliseconds",C)[I],W=I===c?this.$D+(b-this.$W):b;if(I===p||I===h){var K=this.clone().set(g,1);K.$d[A](W),K.init(),this.$d=K.set(g,Math.min(this.$D,K.daysInMonth())).$d}else A&&this.$d[A](W);return this.init(),this},k.set=function(w,b){return this.clone().$set(w,b)},k.get=function(w){return this[y.p(w)]()},k.add=function(w,b){var C,I=this;w=Number(w);var P=y.p(b),A=function(J){var Q=H(I);return y.w(Q.date(Q.date()+Math.round(J*w)),I)};if(P===p)return this.set(p,this.$M+w);if(P===h)return this.set(h,this.$y+w);if(P===c)return A(1);if(P===u)return A(7);var W=(C={},C[l]=n,C[d]=i,C[s]=t,C)[P]||1,K=this.$d.getTime()+w*W;return y.w(K,this)},k.subtract=function(w,b){return this.add(-1*w,b)},k.format=function(w){var b=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var I=w||"YYYY-MM-DDTHH:mm:ssZ",P=y.z(this),A=this.$H,W=this.$m,K=this.$M,J=C.weekdays,Q=C.months,xe=C.meridiem,ue=function(se,ke,Fe,Xe){return se&&(se[ke]||se(b,I))||Fe[ke].slice(0,Xe)},q=function(se){return y.s(A%12||12,se,"0")},ve=xe||function(se,ke,Fe){var Xe=se<12?"AM":"PM";return Fe?Xe.toLowerCase():Xe};return I.replace(M,(function(se,ke){return ke||(function(Fe){switch(Fe){case"YY":return String(b.$y).slice(-2);case"YYYY":return y.s(b.$y,4,"0");case"M":return K+1;case"MM":return y.s(K+1,2,"0");case"MMM":return ue(C.monthsShort,K,Q,3);case"MMMM":return ue(Q,K);case"D":return b.$D;case"DD":return y.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ue(C.weekdaysMin,b.$W,J,2);case"ddd":return ue(C.weekdaysShort,b.$W,J,3);case"dddd":return J[b.$W];case"H":return String(A);case"HH":return y.s(A,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return ve(A,W,!0);case"A":return ve(A,W,!1);case"m":return String(W);case"mm":return y.s(W,2,"0");case"s":return String(b.$s);case"ss":return y.s(b.$s,2,"0");case"SSS":return y.s(b.$ms,3,"0");case"Z":return P}return null})(se)||P.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,b,C){var I,P=this,A=y.p(b),W=H(w),K=(W.utcOffset()-this.utcOffset())*n,J=this-W,Q=function(){return y.m(P,W)};switch(A){case h:I=Q()/12;break;case p:I=Q();break;case f:I=Q()/3;break;case u:I=(J-K)/6048e5;break;case c:I=(J-K)/864e5;break;case d:I=J/i;break;case l:I=J/n;break;case s:I=J/t;break;default:I=J}return C?I:y.a(I)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return U[this.$L]},k.locale=function(w,b){if(!w)return this.$L;var C=this.clone(),I=F(w,b,!0);return I&&(C.$L=I),C},k.clone=function(){return y.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},E})(),_=R.prototype;return H.prototype=_,[["$ms",a],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",h],["$D",g]].forEach((function(E){_[E[1]]=function(k){return this.$g(k,E[0],E[1])}})),H.extend=function(E,k){return E.$i||(E(k,R,H),E.$i=!0),H},H.locale=F,H.isDayjs=B,H.unix=function(E){return H(1e3*E)},H.en=U[z],H.Ls=U,H.p={},H}))})(it)),it.exports}var Ds=Os();const En=dn(Ds),Ts=({setDateFilter:r,setShowRange:e,setDates:t})=>{const n=s=>s&&s>En().endOf("day"),i=s=>{if(s&&s[0]&&s[1]){const l=oe.toISODateString(s[0].toDate()),d=oe.toISODateString(s[1].toDate());t([l,d]),r(c=>({...c,startDate:l,endDate:d})),e(!1)}},a={lang:{locale:ne.language,shortMonths:[de("0"),de("1"),de("2"),de("3"),de("4"),de("5"),de("6"),de("7"),de("8"),de("9"),de("10"),de("11")],shortWeekDays:[Oe("Sun"),Oe("Mon"),Oe("Tue"),Oe("Wed"),Oe("Thu"),Oe("Fri"),Oe("Sat")]}};return o.jsx(Nr,{dropdownClassName:"date-picker-column-style",locale:a,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>i(s),disabledDate:n})},$s=m(T.Empty)`
2827
2920
  .ant-empty-description {
2828
2921
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2829
2922
  }
2830
- `,zo=h(T.Table)`
2923
+ `,Is=m(T.Table)`
2831
2924
  .ant-table-thead > tr > th {
2832
2925
  background: var(--color-bg-primary, #fff);
2833
2926
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2930,7 +3023,7 @@
2930
3023
  .ant-collapse-header {
2931
3024
  background-color: transparent !important;
2932
3025
  }
2933
- `,Po=h(T.Tooltip)`
3026
+ `,Ms=m(T.Tooltip)`
2934
3027
  .ant-tooltip-inner {
2935
3028
  min-width: auto;
2936
3029
  min-height: auto;
@@ -2942,10 +3035,10 @@
2942
3035
  line-height: var(--typo-caption-lineHeight-small, 1rem); /* 133.333% */
2943
3036
  letter-spacing: var(--typo-caption-spacing-small, 0.00625rem);
2944
3037
  }
2945
- `,vt=h(T.Select)`
2946
- width: ${({$width:n})=>n??"100%"};
3038
+ `,Wt=m(T.Select)`
3039
+ width: ${({$width:r})=>r??"100%"};
2947
3040
 
2948
- min-height: ${({$height:n})=>n??"unset"};
3041
+ min-height: ${({$height:r})=>r??"unset"};
2949
3042
  gap: 2.5rem;
2950
3043
  display: flex;
2951
3044
  flex-direction: column;
@@ -3017,7 +3110,7 @@
3017
3110
  .anticon.anticon-close {
3018
3111
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
3019
3112
  }
3020
- `,Mo=({setDateFilters:n,hasAllFilter:e=!1})=>{const[t,r]=S.useState([]),a=[{key:"week",label:Se("7D"),...te.getCommonDateRange("week")},{key:"month",label:Se("30D"),...te.getCommonDateRange("month")},{key:"threeMonth",label:Se("3M"),...te.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Se("6M"),...te.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Se("12M"),...te.getCommonDateRange("twelveMonth")},{key:"year",label:Se("YTD"),...te.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${G("Custom")}: ${t[0]} / ${t[1]}`:G("Custom"),...te.getCommonDateRange("custom")}],[o,s]=S.useState(),l=S.useMemo(()=>e?[{key:"all",label:G("All"),...te.getCommonDateRange("all")},...a]:a,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&n(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return i.jsxs(oo,{id:"tabs-container",children:[i.jsx(ao,{type:"editable-card",items:l,onTabClick:d,activeKey:o?"custom":void 0,removeIcon:!0,hideAdd:!0}),o&&i.jsx(io,{children:i.jsx(To,{setDates:r,setDateFilter:n,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),i.jsx(vt,{className:"tab-select",$width:"200px",placeholder:G("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},Dr=h.div`
3113
+ `,Ps=({setDateFilters:r,hasAllFilter:e=!1})=>{const[t,n]=x.useState([]),i=[{key:"week",label:Pe("7D"),...oe.getCommonDateRange("week")},{key:"month",label:Pe("30D"),...oe.getCommonDateRange("month")},{key:"threeMonth",label:Pe("3M"),...oe.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Pe("6M"),...oe.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Pe("12M"),...oe.getCommonDateRange("twelveMonth")},{key:"year",label:Pe("YTD"),...oe.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${V("Custom")}: ${t[0]} / ${t[1]}`:V("Custom"),...oe.getCommonDateRange("custom")}],[a,s]=x.useState(),l=x.useMemo(()=>e?[{key:"all",label:V("All"),...oe.getCommonDateRange("all")},...i]:i,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&r(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return o.jsxs(os,{id:"tabs-container",children:[o.jsx(as,{type:"editable-card",items:l,onTabClick:d,activeKey:a?"custom":void 0,removeIcon:!0,hideAdd:!0}),a&&o.jsx(ss,{children:o.jsx(Ts,{setDates:n,setDateFilter:r,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),o.jsx(Wt,{className:"tab-select",$width:"200px",placeholder:V("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},On=m.div`
3021
3114
  .ant-dropdown-menu {
3022
3115
  border-radius: 2px !important;
3023
3116
  background: var(--color-bg-quaternary, #2f2f2f) !important;
@@ -3043,7 +3136,7 @@
3043
3136
  padding: 8px 12px; /* აქ დაარეგულირე შიდა დაშორება */
3044
3137
  display: block;
3045
3138
  }
3046
- `,Ho=(n,e)=>{const t=window.URL.createObjectURL(n),r=document.createElement("a");r.href=t,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(t)},Ro=(n,e)=>{const t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=window.URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.setAttribute("download",e),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(r)},Fo=h(T.Dropdown)`
3139
+ `,zs=(r,e)=>{const t=window.URL.createObjectURL(r),n=document.createElement("a");n.href=t,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(t)},Hs=(r,e)=>{const t=new Blob([r],{type:"text/csv;charset=utf-8;"}),n=window.URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.setAttribute("download",e),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(n)},Rs=m(T.Dropdown)`
3047
3140
  background: var(--color-bg-secondary, #f0ededff) !important;
3048
3141
  font-size: 14px;
3049
3142
  font-weight: 500;
@@ -3057,14 +3150,14 @@
3057
3150
  font-weight: 500;
3058
3151
  color: var(--color-text-primary, #000000ff) !important;
3059
3152
  }
3060
- `,No=h.div`
3153
+ `,Ns=m.div`
3061
3154
  background-color: red;
3062
3155
  padding: 5px;
3063
3156
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3064
3157
  color: var(--color-text-primary, #fff);
3065
3158
  cursor: pointer;
3066
- `,Vo=({exportFileName:n,filters:e,service:t})=>{const r=async o=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,o)).data;o==="xlsx"?Ho(u,`${n}.${o}`):Ro(u,`${n}`)}catch(s){console.error("Export failed:",s)}},a=[{key:"1",label:`${G("ExportAs")} ${G("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${G("ExportAs")} ${G("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Fo,{menu:{items:a,className:"dropdown-menu"},popupRender:o=>i.jsx(Dr,{children:o}),placement:"bottomLeft",children:i.jsx(No,{children:G("Export")})})},$r=(n,e,t)=>{const r=n.filter(p=>e[p.id]),a=Object.keys(r[0]),o=r.map(p=>a.map(m=>{const f=p[m];return f==null?"":typeof f=="object"?Object.values(f).find(b=>typeof b!="object")??"":f})),s=[a,...o].map(p=>p.map(m=>`"${(m||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3067
- `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Er=(n,e,t)=>{const a=n.filter(p=>e[p.id]).map(p=>{const m={};return Object.entries(p).forEach(([f,g])=>{if(g==null)m[f]="";else if(typeof g=="object"){const b=Object.values(g).find(D=>typeof D!="object");m[f]=b??""}else m[f]=g}),m}),o=Fe.utils.json_to_sheet(a),s=Fe.utils.book_new();Fe.utils.book_append_sheet(s,o,"Data");const l=Fe.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Ao=h(T.Dropdown)`
3159
+ `,As=({exportFileName:r,filters:e,service:t})=>{const n=async a=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,a)).data;a==="xlsx"?zs(u,`${r}.${a}`):Hs(u,`${r}`)}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return o.jsx(Rs,{menu:{items:i,className:"dropdown-menu"},popupRender:a=>o.jsx(On,{children:a}),placement:"bottomLeft",children:o.jsx(Ns,{children:V("Export")})})},Dn=(r,e,t)=>{const n=r.filter(p=>e[p.id]),i=Object.keys(n[0]),a=n.map(p=>i.map(f=>{const h=p[f];return h==null?"":typeof h=="object"?Object.values(h).find(v=>typeof v!="object")??"":h})),s=[i,...a].map(p=>p.map(f=>`"${(f||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3160
+ `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Tn=(r,e,t)=>{const i=r.filter(p=>e[p.id]).map(p=>{const f={};return Object.entries(p).forEach(([h,g])=>{if(g==null)f[h]="";else if(typeof g=="object"){const v=Object.values(g).find(L=>typeof L!="object");f[h]=v??""}else f[h]=g}),f}),a=tt.utils.json_to_sheet(i),s=tt.utils.book_new();tt.utils.book_append_sheet(s,a,"Data");const l=tt.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Fs=m(T.Dropdown)`
3068
3161
  background: var(--color-bg-secondary, #f0ededff) !important;
3069
3162
  font-size: 14px;
3070
3163
  font-weight: 500;
@@ -3078,13 +3171,13 @@
3078
3171
  font-weight: 500;
3079
3172
  color: var(--color-text-primary, #000000ff) !important;
3080
3173
  }
3081
- `,Bo=h.div`
3174
+ `,Vs=m.div`
3082
3175
  background-color: red;
3083
3176
  padding: 5px;
3084
3177
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3085
3178
  color: var(--color-text-primary, #fff);
3086
3179
  cursor: pointer;
3087
- `,Go=({tableData:n,checked:e,fileName:t})=>{const r=async o=>{try{o==="xlsx"?Er(n,e,t+".xlsx"):$r(n,e,t+".csv")}catch(s){console.error("Export failed:",s)}},a=[{key:"1",label:`${G("ExportAs")} ${G("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${G("ExportAs")} ${G("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Ao,{menu:{items:a,className:"dropdown-menu"},popupRender:o=>i.jsx(Dr,{children:o}),placement:"bottomLeft",children:i.jsx(Bo,{children:G("Export")})})},Uo=({value:n,onChange:e,...t})=>{const r=n?Lr(n):null,a=o=>{o?e==null||e(te.toISODateString(o.toDate())):e==null||e(null)};return i.jsx(T.DatePicker,{value:r,onChange:a,allowClear:!0,...t})},{Dragger:_o}=T.Upload,Wo=h(_o)`
3180
+ `,Bs=({tableData:r,checked:e,fileName:t})=>{const n=async a=>{try{a==="xlsx"?Tn(r,e,t+".xlsx"):Dn(r,e,t+".csv")}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return o.jsx(Fs,{menu:{items:i,className:"dropdown-menu"},popupRender:a=>o.jsx(On,{children:a}),placement:"bottomLeft",children:o.jsx(Vs,{children:V("Export")})})},_s=({value:r,onChange:e,...t})=>{const n=r?En(r):null,i=a=>{a?e==null||e(oe.toISODateString(a.toDate())):e==null||e(null)};return o.jsx(T.DatePicker,{value:n,onChange:i,allowClear:!0,...t})},{Dragger:Us}=T.Upload,Gs=m(Us)`
3088
3181
  &.default-design {
3089
3182
  .ant-upload {
3090
3183
  padding: 0 !important;
@@ -3145,7 +3238,7 @@
3145
3238
  color: var(--color-text-primary, #fff) !important;
3146
3239
  }
3147
3240
  }
3148
- `;h(T.Button)`
3241
+ `;m(T.Button)`
3149
3242
  display: flex;
3150
3243
  align-items: center;
3151
3244
  justify-content: start;
@@ -3166,7 +3259,7 @@
3166
3259
  font-weight: var(--text-weight-regular, 400);
3167
3260
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
3168
3261
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
3169
- `;const Yo=({value:n=[],onChange:e,children:t,inputDesign:r,addFilesService:a,...o})=>{const s=async d=>{var f,g;const{file:c}=d,u=URL.createObjectURL(c),p={name:c.name,uid:c.uid,status:"uploading",url:u},m=[...n,p];e(m);try{const b=new FormData;b.append("files",c);const D=await a(b);if((f=D==null?void 0:D.data)!=null&&f.success){const z=(g=D==null?void 0:D.data)==null?void 0:g.value[0];e(m.map(C=>C.uid===c.uid?{...C,status:"done",...z}:C))}else e(m.filter(z=>z.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}catch{e(m.filter(D=>D.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}},l=d=>{e(n.filter(c=>c.uid!==d.uid))};return i.jsx(Wo,{className:r?"input-design":"default-design",multiple:o.maxCount!==void 0&&o.maxCount>1,customRequest:s,showUploadList:!!o.showUploadList,fileList:n,onRemove:l,maxCount:o.maxCount,...o,children:n.length<(o.maxCount||15)&&t})},Ko=h(T.Tabs)`
3262
+ `;const Ws=({value:r=[],onChange:e,children:t,inputDesign:n,addFilesService:i,...a})=>{const s=async d=>{var h,g;const{file:c}=d,u=URL.createObjectURL(c),p={name:c.name,uid:c.uid,status:"uploading",url:u},f=[...r,p];e(f);try{const v=new FormData;v.append("files",c);const L=await i(v);if((h=L==null?void 0:L.data)!=null&&h.success){const M=(g=L==null?void 0:L.data)==null?void 0:g.value[0];e(f.map(j=>j.uid===c.uid?{...j,status:"done",...M}:j))}else e(f.filter(M=>M.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}catch{e(f.filter(L=>L.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}},l=d=>{e(r.filter(c=>c.uid!==d.uid))};return o.jsx(Gs,{className:n?"input-design":"default-design",multiple:a.maxCount!==void 0&&a.maxCount>1,customRequest:s,showUploadList:!!a.showUploadList,fileList:r,onRemove:l,maxCount:a.maxCount,...a,children:r.length<(a.maxCount||15)&&t})},Ys=m(T.Tabs)`
3170
3263
  display: flex;
3171
3264
  gap: var(--spacing-025, 2px);
3172
3265
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -3255,11 +3348,11 @@
3255
3348
  .ant-tabs-nav-more {
3256
3349
  display: none !important;
3257
3350
  }
3258
- `,qo=h.div`
3351
+ `,Ks=m.div`
3259
3352
  display: flex;
3260
3353
  align-items: center;
3261
3354
  gap: 4px;
3262
- `,Zo=h.div`
3355
+ `,qs=m.div`
3263
3356
  display: flex;
3264
3357
  justify-content: space-between;
3265
3358
  width: 100% !important;
@@ -3276,18 +3369,18 @@
3276
3369
  width: 100%;
3277
3370
  }
3278
3371
  }
3279
- `,Jo=h.div`
3372
+ `,Zs=m.div`
3280
3373
  display: none;
3281
3374
  @media (max-width: 1024px) {
3282
3375
  display: block;
3283
3376
  }
3284
3377
  align-items: start !important;
3285
- `,Xo=h.div`
3378
+ `,Js=m.div`
3286
3379
  display: none;
3287
3380
 
3288
3381
  @media (max-width: 991px) {
3289
3382
  display: block;
3290
3383
  margin-left: 0.9rem;
3291
3384
  }
3292
- `,Qo=()=>{const[n,e]=S.useState(!1);return i.jsxs(Xo,{children:[i.jsx("button",{className:"icon sidebar",onClick:()=>e(!0),children:i.jsx(tr,{})}),n&&i.jsx(lt,{})]})},ei=({basePath:n,tabItems:e,contentMap:t,defaultTabKey:r="overview",logo:a,breadcrumbItems:o,needsBreadcrumb:s,customTabFilter:l})=>{const{hasPermission:d}=xe(),{id:c}=X.useParams(),u=X.useLocation(),p=X.useNavigate(),m=S.useMemo(()=>{const k=u.pathname.split("/");return k[k.length-1]||r},[u.pathname,r]),[f,g]=S.useState(null),[b,D]=S.useState(null),z=k=>{p(`${n}/${c}/${k}`)},C=()=>l?l(e):e.filter(k=>{var M;return(M=k.permission)==null?void 0:M.some(U=>d(U))}),$=()=>{const k=t[m]||t[r];return k?typeof k=="object"&&k!==null&&"type"in k?{...k,props:{...k.props,setExtraTabItem:g,setSecondExtraTab:D}}:k:null};return i.jsxs(i.Fragment,{children:[i.jsx(Qo,{}),s&&i.jsx(Sr,{logo:a,breadcrumbItems:o}),i.jsx(Ko,{activeKey:m,onChange:z,tabBarExtraContent:{right:i.jsxs(Zo,{children:[i.jsx(Jo,{children:i.jsx(vt,{className:"partner-tab-select",placeholder:"Modules",onChange:k=>z(k),value:m,options:e.filter(k=>(k==null?void 0:k.label)!=="Details").map(k=>({value:k.key,label:k.label}))})}),i.jsxs(qo,{children:[b,f]})]})},items:C()}),i.jsx("div",{children:$()})]})},ti=({id:n,refetchFormItems:e,redirectPrevPage:t,updateItem:r,addItem:a,getItemById:o,onSetFormValues:s})=>{const l=X.useNavigate(),[d]=T.Form.useForm(),[c,u]=S.useState(n=="new"),[p,m]=S.useState(null),f=async b=>{const D=window.location.pathname,z=D.substring(0,D.lastIndexOf("/"));try{if(p){let C;return n?C=await r({...b,id:n}):C=await r(b),t!==!1&&C.data.success===!0&&l(z),C}else{const C=await a(b);return t!==!1&&C.data.success===!0&&l(z),C}}catch(C){if(C.status===400){const $=C.response.data,k=we($.errors);d.setFields(k)}}},g=async b=>{try{const D=await o(b),z=s?s(D.data):D.data;m(z),d.setFieldsValue(z)}catch(D){console.log(D,"Error in Form Controller.")}};return S.useEffect(()=>{u(n=="new"),n!="new"?g(Number(n)):d.resetFields()},[n,e]),{form:d,item:p,getItemById:o,isAddingForm:c,handleSave:f}},ri=({id:n,formItem:e,updateItem:t,addItem:r,getItemById:a})=>{const[o]=T.Form.useForm(),[s,l]=S.useState(null),d=async u=>{try{let p;return n?p=await t({...u}):p=await r(u),p}catch(p){if(p.status===400){const m=p.response.data,f=we(m.errors);o.setFields(f)}throw p}},c=async u=>{try{const m=(await a(u)).data;l(m),o.setFieldsValue(m)}catch(p){console.log(p,"Error in Form Controller.")}};return S.useEffect(()=>{try{if(!e)return;l(e),o.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),S.useEffect(()=>{n&&c(Number(n))},[n]),{form:o,item:s,handleSave:d}},ni=()=>{const n=X.useNavigate(),{setUser:e}=xe(),[t,r]=S.useState({visible:!1,token:""}),a=s=>{e(s),r({visible:!1,token:""}),n("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){r({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&a(c)},finalizeLogin:a,twoFactor:t,setTwoFactor:r}};function ai(n){const{navigator:e}=S.useContext(X.UNSAFE_NavigationContext),t=X.useLocation();S.useEffect(()=>{if(!n)return;const r=e.push,a=e.replace,o=s=>(...l)=>{T.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=o(r),e.replace=o(a),()=>{e.push=r,e.replace=a}},[n,e,t]),S.useEffect(()=>{const r=a=>{n&&(a.preventDefault(),a.returnValue="")};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r)}},[n])}function oi(n){S.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&n(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function ii(n,e){if(!n)return"";const t=new Date(n);if(isNaN(t.getTime()))return"";const r=t.getDate(),a=t.getMonth(),o=t.getFullYear(),l=`${r} ${a}, ${o}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function si(n,e="en-US"){return n<1?0:n?n.toLocaleString(e):""}const $e=n=>n.replace(/^[A-Z]+/,e=>e.length===n.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),li=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,ci=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,di=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,pi=/^Commissions\[(\d+)\]$/;function ui(n){const{errors:e}=n.response.data,t=Object.keys(e)[0],r=e[t][0],a=t.match(li);if(a){const[,l,d,c,u,p]=a;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),itemIndex:Number(u),field:$e(p),message:r}}const o=t.match(ci)||t.match(di);if(o){const[,l,d,c]=o;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),message:r}}const s=t.match(pi);return s?{brandIndex:Number(s[1]),message:r}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=tn;exports.AuthorizationLayout=vn;exports.BoxComponent=qt;exports.CancelModalButton=Ke;exports.Chart=Ua;exports.CloseButton=ir;exports.ColumnFilterType=se;exports.ComingSoon=eo;exports.ContactInfoModal=yr;exports.ContentContainer=Ye;exports.CreateModalButton=ze;exports.DateHelper=te;exports.DatePickerToISO=Uo;exports.DateRangeFilterTabs=Mo;exports.EnterBackupCode=yt;exports.ExcelExport=Vo;exports.ExcelExportSelected=Go;exports.ExpandableTable=no;exports.FilterConfiguration=pr;exports.FilterSelectTypes=ve;exports.GeneralInput=ht;exports.GenericModal=tt;exports.GenericTabsPage=ei;exports.GridViewPage=Ma;exports.LabelText=Ie;exports.ModalHost=Ha;exports.ModalHostButtonWrapper=lr;exports.NoData=ur;exports.NoDataSpanForSelect=Gn;exports.PackageServicesProvider=Nr;exports.PackageTranslationProvider=Ar;exports.PageBreadcrumb=Sr;exports.Popup=We;exports.PopupFooterContainer=sr;exports.PopupHeader=or;exports.PopupMFA=Ra;exports.RejectButton=Un;exports.SortDirections=ee;exports.Spinner=Wa;exports.StyledBreadcrumb=wr;exports.StyledEmpty=Io;exports.StyledSelect=vt;exports.StyledTable=zo;exports.StyledTooltip=Po;exports.TableViewOptions=fe;exports.TwoFactorPopup=Ba;exports.UploadFiles=Yo;exports.catchErrorMessage=dr;exports.exportSelectedToCSV=$r;exports.exportSelectedToXLSX=Er;exports.formatDate=ii;exports.getBase64=_n;exports.handleCopy=Wn;exports.handleDictionarySelectFilter=nr;exports.lowercaseFirstLetter=cr;exports.numberFormatterWithComma=si;exports.parseCommissionErrors=ui;exports.parseErrorMessageKey=gr;exports.parseServerErrors=we;exports.useAutofillStartDetection=oi;exports.useContactInfoController=vr;exports.useDebounce=dt;exports.useElementHeight=Xt;exports.useFetch=st;exports.useFilterDataSourceType=gt;exports.useFormController=ti;exports.useModalStore=he;exports.useNavigationGuard=ai;exports.useNewDesignFormController=ri;exports.usePackageServices=ke;exports.useTwoFactor=ni;exports.useUserStore=xe;
3385
+ `,Qs=()=>{const[r,e]=x.useState(!1);return o.jsxs(Js,{children:[o.jsx("button",{className:"icon sidebar",onClick:()=>e(!0),children:o.jsx(Fr,{})}),r&&o.jsx(It,{})]})},Xs=({basePath:r,tabItems:e,contentMap:t,defaultTabKey:n="overview",logo:i,breadcrumbItems:a,needsBreadcrumb:s,customTabFilter:l})=>{const{hasPermission:d}=Ee(),{id:c}=re.useParams(),u=re.useLocation(),p=re.useNavigate(),f=x.useMemo(()=>{const S=u.pathname.split("/");return S[S.length-1]||n},[u.pathname,n]),[h,g]=x.useState(null),[v,L]=x.useState(null),M=S=>{p(`${r}/${c}/${S}`)},j=()=>l?l(e):e.filter(S=>{var z;return(z=S.permission)==null?void 0:z.some(U=>d(U))}),O=()=>{const S=t[f]||t[n];return S?typeof S=="object"&&S!==null&&"type"in S?{...S,props:{...S.props,setExtraTabItem:g,setSecondExtraTab:L}}:S:null};return o.jsxs(o.Fragment,{children:[o.jsx(Qs,{}),s&&o.jsx(jn,{logo:i,breadcrumbItems:a}),o.jsx(Ys,{activeKey:f,onChange:M,tabBarExtraContent:{right:o.jsxs(qs,{children:[o.jsx(Zs,{children:o.jsx(Wt,{className:"partner-tab-select",placeholder:"Modules",onChange:S=>M(S),value:f,options:e.filter(S=>(S==null?void 0:S.label)!=="Details").map(S=>({value:S.key,label:S.label}))})}),o.jsxs(Ks,{children:[v,h]})]})},items:j()}),o.jsx("div",{children:O()})]})},el=({id:r,refetchFormItems:e,redirectPrevPage:t,updateItem:n,addItem:i,getItemById:a,onSetFormValues:s})=>{const l=re.useNavigate(),[d]=T.Form.useForm(),[c,u]=x.useState(r=="new"),[p,f]=x.useState(null),h=async v=>{const L=window.location.pathname,M=L.substring(0,L.lastIndexOf("/"));try{if(p){let j;return r?j=await n({...v,id:r}):j=await n(v),t!==!1&&j.data.success===!0&&l(M),j}else{const j=await i(v);return t!==!1&&j.data.success===!0&&l(M),j}}catch(j){if(j.status===400){const O=j.response.data,S=$e(O.errors);d.setFields(S)}}},g=async v=>{try{const L=await a(v),M=s?s(L.data):L.data;f(M),d.setFieldsValue(M)}catch(L){console.log(L,"Error in Form Controller.")}};return x.useEffect(()=>{u(r=="new"),r!="new"?g(Number(r)):d.resetFields()},[r,e]),{form:d,item:p,getItemById:a,isAddingForm:c,handleSave:h}},tl=({id:r,formItem:e,updateItem:t,addItem:n,getItemById:i})=>{const[a]=T.Form.useForm(),[s,l]=x.useState(null),d=async u=>{try{let p;return r?p=await t({...u}):p=await n(u),p}catch(p){if(p.status===400){const f=p.response.data,h=$e(f.errors);a.setFields(h)}throw p}},c=async u=>{try{const f=(await i(u)).data;l(f),a.setFieldsValue(f)}catch(p){console.log(p,"Error in Form Controller.")}};return x.useEffect(()=>{try{if(!e)return;l(e),a.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),x.useEffect(()=>{r&&c(Number(r))},[r]),{form:a,item:s,handleSave:d}},rl=()=>{const r=re.useNavigate(),{setUser:e}=Ee(),[t,n]=x.useState({visible:!1,token:""}),i=s=>{e(s),n({visible:!1,token:""}),r("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){n({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&i(c)},finalizeLogin:i,twoFactor:t,setTwoFactor:n}};function nl(r){const{navigator:e}=x.useContext(re.UNSAFE_NavigationContext),t=re.useLocation();x.useEffect(()=>{if(!r)return;const n=e.push,i=e.replace,a=s=>(...l)=>{T.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=a(n),e.replace=a(i),()=>{e.push=n,e.replace=i}},[r,e,t]),x.useEffect(()=>{const n=i=>{r&&(i.preventDefault(),i.returnValue="")};return window.addEventListener("beforeunload",n),()=>{window.removeEventListener("beforeunload",n)}},[r])}function il(r){x.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&r(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function al(r,e){if(!r)return"";const t=new Date(r);if(isNaN(t.getTime()))return"";const n=t.getDate(),i=t.getMonth(),a=t.getFullYear(),l=`${n} ${i}, ${a}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function ol(r,e="en-US"){return r<1?0:r?r.toLocaleString(e):""}const _e=r=>r.replace(/^[A-Z]+/,e=>e.length===r.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),sl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,ll=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,cl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,dl=/^Commissions\[(\d+)\]$/;function pl(r){const{errors:e}=r.response.data,t=Object.keys(e)[0],n=e[t][0],i=t.match(sl);if(i){const[,l,d,c,u,p]=i;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),itemIndex:Number(u),field:_e(p),message:n}}const a=t.match(ll)||t.match(cl);if(a){const[,l,d,c]=a;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),message:n}}const s=t.match(dl);return s?{brandIndex:Number(s[1]),message:n}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=ri;exports.AuthorizationLayout=bi;exports.BoxComponent=Pr;exports.CancelModalButton=te;exports.Chart=Go;exports.CloseButton=Gr;exports.ColumnFilterType=fe;exports.ComingSoon=ts;exports.ContactInfoModal=nn;exports.ContentContainer=je;exports.CreateModalButton=Ne;exports.DateHelper=oe;exports.DatePickerToISO=_s;exports.DateRangeFilterTabs=Ps;exports.EnterBackupCode=Bt;exports.ExcelExport=As;exports.ExcelExportSelected=Bs;exports.ExpandableTable=is;exports.FilterConfiguration=Zr;exports.FilterSelectTypes=Te;exports.GeneralInput=pt;exports.GenericModal=wt;exports.GenericTabsPage=Xs;exports.GridViewPage=Ha;exports.LabelText=le;exports.MFAModalManager=No;exports.MFA_STEP=Me;exports.ModalHost=Ra;exports.ModalHostButtonWrapper=Wr;exports.NoData=Jr;exports.NoDataSpanForSelect=_i;exports.PackageServicesProvider=Fn;exports.PackageTranslationProvider=Bn;exports.PageBreadcrumb=jn;exports.Popup=dt;exports.PopupFooterContainer=Re;exports.PopupHeader=Ur;exports.PopupMFA=on;exports.RejectButton=Ui;exports.SortDirections=ae;exports.Spinner=Yo;exports.StyledBreadcrumb=Cn;exports.StyledEmpty=$s;exports.StyledSelect=Wt;exports.StyledTable=Is;exports.StyledTooltip=Ms;exports.TableViewOptions=we;exports.TwoFactorPopup=_o;exports.UploadFiles=Ws;exports.catchErrorMessage=qr;exports.exportSelectedToCSV=Dn;exports.exportSelectedToXLSX=Tn;exports.formatDate=al;exports.getBase64=Gi;exports.handleCopy=Kr;exports.handleDictionarySelectFilter=Br;exports.lowercaseFirstLetter=Yr;exports.numberFormatterWithComma=ol;exports.parseCommissionErrors=pl;exports.parseErrorMessageKey=Xr;exports.parseServerErrors=$e;exports.useAutofillStartDetection=il;exports.useContactInfoController=an;exports.useDebounce=Pt;exports.useElementHeight=Rr;exports.useFetch=$t;exports.useFilterDataSourceType=Nt;exports.useFormController=el;exports.useModalStore=Le;exports.useNavigationGuard=nl;exports.useNewDesignFormController=tl;exports.usePackageServices=me;exports.useTwoFactor=rl;exports.useUserStore=Ee;
3293
3386
  //# sourceMappingURL=index.cjs.map