affiliate-front-shared 1.3.12 → 1.3.14

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 $r=Object.defineProperty;var Er=(n,e,t)=>e in n?$r(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Re=(n,e,t)=>Er(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),S=require("react"),R=require("antd"),m=require("styled-components"),ne=require("react-router"),ot=require("zustand"),Gt=require("react-i18next"),Or=require("echarts"),Tr=require("react-dom"),Ir=require("i18next-browser-languagedetector"),zr=require("i18next-http-backend"),Mr=require("xlsx"),Pr=require("lodash");function at(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=at(S),Hr=at(Or),Fe=at(Mr),Ut=S.createContext({});function Rr({services:n,children:e}){return i.jsx(Ut.Provider,{value:n,children:e})}function we(){return S.useContext(Ut)}let he=n=>n;function yt(n){he=n}const B=(n,e)=>he(`general.${n}`,e),ae=(n,e)=>he(`actions.${n}`,e),te=(n,e)=>he(`authentication.${n}`,e),oe=(n,e)=>he(`months.${n}`,e),Ce=(n,e)=>he(`date.${n}`,e),xe=(n,e)=>he(`weekDays.${n}`,e),Fr=(n,e)=>he(`noData.${n}`,e),bt=(n,e)=>he(`comingSoon.${n}`,e);function Nr({t:n,children:e}){return yt(n),S.useEffect(()=>{yt(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})),Vr=m(it)`
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 o=require("react/jsx-runtime"),S=require("react"),H=require("antd"),m=require("styled-components"),X=require("react-router"),at=require("zustand"),_t=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 M=ot(S),Fr=ot(Ir),Fe=ot(Hr),Wt=S.createContext({});function Nr({services:n,children:e}){return o.jsx(Wt.Provider,{value:n,children:e})}function Se(){return S.useContext(Wt)}let he=n=>n;function vt(n){he=n}const B=(n,e)=>he(`general.${n}`,e),oe=(n,e)=>he(`actions.${n}`,e),re=(n,e)=>he(`authentication.${n}`,e),ae=(n,e)=>he(`months.${n}`,e),Ce=(n,e)=>he(`date.${n}`,e),ye=(n,e)=>he(`weekDays.${n}`,e),Vr=(n,e)=>he(`noData.${n}`,e),wt=(n,e)=>he(`comingSoon.${n}`,e);function Ar({t:n,children:e}){return vt(n),S.useEffect(()=>{vt(n)},[n]),o.jsx(o.Fragment,{children:e})}const it=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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=m(it)`
2
2
  color: var(--color-text-primary, #131412);
3
- `,Ar=m.div`
3
+ `,Gr=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
- `,Br=m.div`
15
+ `,Ur=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
- `,Gr=m.div`
32
+ `,_r=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
- `,Ur=m(R.Menu)`
47
+ `,Wr=m(H.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),[o,a]=S.useState(null),[s,l]=S.useState(!0),[d,c]=S.useState(null),u=async()=>{var p;try{l(!0),r(null);const h=await n();r(h),(p=h==null?void 0:h.data)!=null&&p.items&&a(h.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:o}},Se=ot.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"})),_r=m(Ee)`
115
+ `,st=(n,e=[])=>{const[t,r]=S.useState(null),[a,i]=S.useState(null),[s,l]=S.useState(!0),[d,c]=S.useState(null),u=async()=>{var p;try{l(!0),r(null);const h=await n();r(h),(p=h==null?void 0:h.data)!=null&&p.items&&i(h.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=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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=m(Ee)`
116
116
  display: flex;
117
117
  justify-content: center;
118
118
  color: var(--color-text-primary, #131412) !important;
119
- `,Wr=m.div`
119
+ `,Kr=m.div`
120
120
  display: flex;
121
121
  align-items: center;
122
122
  justify-content: space-between;
123
123
  width: 256px;
124
- `,Yr=m.span`
124
+ `,qr=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=m(R.Menu)`
134
+ `,J=m(H.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
- `,Kr=m.div`
178
+ `,Zr=m.div`
179
179
  width: 256px;
180
180
  position: absolute !important;
181
181
  z-index: 10000;
182
- `,qr=({closeProfileDropdown:n})=>{const e=ne.useNavigate(),{getCustomers:t,postSelectedCustomer:r}=we(),{storedThemeMode:o,logout:a,setThemeMode:s,user:l}=Se(),{i18n:d}=Gt.useTranslation();function c(){a(),e("/authorization/login")}function u(w){d.changeLanguage(w),window.location.reload()}const p=(w,O)=>i.jsxs(Wr,{children:[i.jsx(Yr,{children:w}),O&&i.jsx("span",{children:i.jsx(_r,{})})]}),{response:h}=st(t??(()=>Promise.resolve({data:[]})),[]);async function f(w){if(!r)return;const A=(await r(w)).data.value;localStorage.setItem("useToken",A.token),localStorage.setItem("userData",JSON.stringify(A))}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(Kr,{children:i.jsxs(J,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:w=>w.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",o===!1)},"30-1"),i.jsx(J.Item,{onClick:()=>s(!0),children:p("Dark",o===!0)},"30-2"),i.jsx(J.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,o===null)},"30-3")]},"30"),i.jsx(J.Divider,{}),i.jsx(J.SubMenu,{title:"ConnectedAccounts",children:((h==null?void 0:h.data)||[]).map(w=>i.jsx(J.Item,{onClick:()=>f(w.id),children:p(w.name)},w.id))},"40"),i.jsx(J.Divider,{}),i.jsx(J.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},_t=({items:n,topLogoPrimaryUrl:e,shortName:t})=>{const r=ne.useLocation(),[o,a]=S.useState(!1),s=S.useRef(null),l=()=>a(d=>!d);return S.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&a(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),i.jsxs(Ar,{className:"sidebar-wrapper",children:[i.jsxs(Br,{ref:s,children:[i.jsxs(Gr,{onClick:l,children:[i.jsx("img",{src:e,alt:"logo"}),i.jsx("span",{children:t}),i.jsx(Vr,{})]}),i.jsx("div",{children:o&&i.jsx(qr,{closeProfileDropdown:a})})]}),i.jsx(Ur,{mode:"inline",selectedKeys:[r.pathname],items:n})]})},Zr=m.div`
182
+ `,Jr=({closeProfileDropdown:n})=>{const e=X.useNavigate(),{getCustomers:t,postSelectedCustomer:r}=Se(),{storedThemeMode:a,logout:i,setThemeMode:s,user:l}=xe(),{i18n:d}=_t.useTranslation();function c(){i(),e("/authorization/login")}function u(v){d.changeLanguage(v),window.location.reload()}const p=(v,E)=>o.jsxs(Kr,{children:[o.jsx(qr,{children:v}),E&&o.jsx("span",{children:o.jsx(Yr,{})})]}),{response:h}=st(t??(()=>Promise.resolve({data:[]})),[]);async function f(v){if(!r)return;const A=(await r(v)).data.value;localStorage.setItem("useToken",A.token),localStorage.setItem("userData",JSON.stringify(A))}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(Zr,{children:o.jsxs(J,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:v=>v.parentElement||document.body,onClick:()=>n(!1),children:[o.jsx(J.Item,{onClick:g,children:"Profile"},"10-1"),o.jsxs(J.Item,{children:[" ","Notifications"]},"10-2"),o.jsxs(J.Item,{children:[" ","SecurityAccess"]},"10-3"),o.jsx(J.Divider,{}),o.jsxs(J.SubMenu,{title:"Language",children:[o.jsx(J.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),o.jsx(J.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),o.jsxs(J.SubMenu,{title:"ColorTheme",children:[o.jsx(J.Item,{onClick:()=>s(!1),children:p("Light",a===!1)},"30-1"),o.jsx(J.Item,{onClick:()=>s(!0),children:p("Dark",a===!0)},"30-2"),o.jsx(J.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,a===null)},"30-3")]},"30"),o.jsx(J.Divider,{}),o.jsx(J.SubMenu,{title:"ConnectedAccounts",children:((h==null?void 0:h.data)||[]).map(v=>o.jsx(J.Item,{onClick:()=>f(v.id),children:p(v.name)},v.id))},"40"),o.jsx(J.Divider,{}),o.jsx(J.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},lt=({items:n,topLogoPrimaryUrl:e,shortName:t})=>{const r=X.useLocation(),[a,i]=S.useState(!1),s=S.useRef(null),l=()=>i(d=>!d);return S.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&i(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),o.jsxs(Gr,{className:"sidebar-wrapper",children:[o.jsxs(Ur,{ref:s,children:[o.jsxs(_r,{onClick:l,children:[o.jsx("img",{src:e,alt:"logo"}),o.jsx("span",{children:t}),o.jsx(Br,{})]}),o.jsx("div",{children:a&&o.jsx(Jr,{closeProfileDropdown:i})})]}),o.jsx(Wr,{mode:"inline",selectedKeys:[r.pathname],items:n})]})},Xr=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
- `,Jr=m.div`
201
+ `,Qr=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
- `,Xr=m.div`
207
+ `,en=m.div`
208
208
  background: var(--color-bg-primary, #fff);
209
- `,Qr=({children:n})=>i.jsxs(Zr,{children:[i.jsx(_t,{}),i.jsx(Jr,{children:i.jsx(Xr,{children:n})})]}),en=m.div`
209
+ `,tn=({children:n})=>o.jsxs(Xr,{children:[o.jsx(lt,{}),o.jsx(Qr,{children:o.jsx(en,{children:n})})]}),rn=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
- `,tn=m.span`
228
+ `,nn=m.span`
229
229
  font-size: 15px;
230
- `,rn=m.button`
230
+ `,an=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
- `,nn=m.div`
244
+ `,on=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
- `,on=m.div``,an=m.div`
287
+ `,sn=m.div``,ln=m.div`
288
288
  display: flex;
289
289
  flex-direction: column;
290
290
  gap: 0.25rem;
@@ -308,7 +308,7 @@
308
308
  @media (max-width: 768px) {
309
309
  padding: 1.7rem 0 1rem;
310
310
  }
311
- `,sn=m.div`
311
+ `,cn=m.div`
312
312
  display: flex;
313
313
  align-items: center;
314
314
  justify-content: center;
@@ -323,7 +323,7 @@
323
323
  @media (max-width: 1024px) {
324
324
  display: none;
325
325
  }
326
- `,ln=m.p`
326
+ `,dn=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
- `,cn=m.span`
334
+ `,pn=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
- `,dn=m.div`
342
+ `,un=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
- `,pn=m.footer`
349
+ `,fn=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
- `,vt=m.span``,Wt=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"})),un=m(Wt)`
358
+ `,St=m.span``,Yt=n=>M.createElement("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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=m(Yt)`
359
359
  cursor: pointer;
360
360
 
361
361
  svg {
@@ -366,12 +366,12 @@
366
366
  transition: 0.1s;
367
367
  }
368
368
  }
369
- `,fn=m.div`
369
+ `,hn=m.div`
370
370
  width: 100%;
371
371
  height: 128px;
372
372
  max-height: max-content;
373
373
  border-radius: 2px;
374
- `,gn=m.div`
374
+ `,mn=m.div`
375
375
  display: flex;
376
376
  height: 100%;
377
377
  padding: 20px;
@@ -394,7 +394,7 @@
394
394
  /* var(--color-bg-secondary, #232323); */
395
395
  border-left: 4px solid ${n=>n.color};
396
396
  }
397
- `,hn=m.span`
397
+ `,xn=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
- `,mn=m.span`
407
+ `,yn=m.span`
408
408
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.75));
409
409
 
410
410
  /* caption/medium-r */
@@ -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 xn=m.span`
427
+ `;const bn=m.span`
428
428
  color: ${n=>n.color};
429
429
  font-size: 12px;
430
- `,Yt=({boxBottomText:n,boxTopText:e,onClick:t,className:r,color:o,commissionStatus:a})=>i.jsx(i.Fragment,{children:i.jsx(fn,{children:i.jsxs(gn,{color:o,onClick:t,className:r,children:[i.jsx(mn,{children:e}),i.jsx(hn,{children:n}),a&&e===B("Commission")&&i.jsx(xn,{color:o,children:a})]})})}),yn=({pageTitle:n,pageDesc:e,logoPrimaryUrl:t,shortName:r,colorPrimary:o,children:a})=>{const[s]=ne.useSearchParams(),l=s.get("backPath"),d=ne.useNavigate();function c(u){d(u)}return i.jsxs(en,{children:[i.jsxs(nn,{children:[i.jsx("header",{children:l&&i.jsx(rn,{onClick:()=>c(l),children:i.jsx(un,{})})}),i.jsx(on,{children:i.jsxs(an,{children:[i.jsx(cn,{children:n}),i.jsx(ln,{children:e})]})}),i.jsx(dn,{children:i.jsx(Yt,{boxTopText:i.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:i.jsx(tn,{children:r})})}),a,i.jsxs(pn,{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(vt,{children:te("TermsOfUsage")})}),i.jsx("a",{href:"",children:i.jsx(vt,{children:te("PrivacyPolicy")})})]})]})]}),i.jsx(sn,{backgroundcolor:o,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||{}),Q=(n=>(n[n.ASC=0]="ASC",n[n.DESC=1]="DESC",n))(Q||{}),be=(n=>(n[n.NONE=0]="NONE",n[n.COLUMN=1]="COLUMN",n[n.TYPE=2]="TYPE",n[n.VALUE=3]="VALUE",n))(be||{}),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 wt=n=>{let e;const t=new Set,r=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const h=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,h))}},o=()=>e,l={setState:r,getState:o,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=n(r,o,l);return l},bn=(n=>n?wt(n):wt),Kt={Page:1,PageSize:25},St={filters:Kt,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:fe.TABLE},vn=()=>bn((n,e)=>({columns:[],...St,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 o=sessionStorage.getItem(t);if(o)try{const a=JSON.parse(o);n({filters:a.filters??Kt,filterItems:a.filterItems??[],sortItems:a.sortItems??[],activeTableView:a.activeTableView??r,hideItems:a.hideItems??{},groupByArr:a.groupByArr??[],selectedConfig:a.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:o,Asc:a,...s}=r.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===Q.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,r=!1)=>{if(!e().isHydrated||(n({filterItems:t}),!r))return;const{filters:o,sortItems:a}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=o,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||"",...a.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({...St,isHydrated:!0,selectedConfig:null})}})),qt=S.createContext(null),wn=({children:n})=>{const e=S.useRef();return e.current||(e.current=vn()),i.jsx(qt.Provider,{value:e.current,children:n})},D=n=>{const e=S.useContext(qt);if(!e)throw new Error("GridViewStoreProvider is missing");return ot.useStore(e,n)},Sn=()=>{const n=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),r=D(u=>u.filterItems),o=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=ne.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:o,activeTableView:l,hideItems:a,groupByArr:s,selectedConfig:d}))},[t,r,o,l,a,s,d,e])};function Zt(n){const[e,t]=S.useState(0);return S.useEffect(()=>{if(!n.current)return;const r=new ResizeObserver(([o])=>{t(o.contentRect.height)});return r.observe(n.current),t(n.current.clientHeight),()=>r.disconnect()},[n]),e}const{RangePicker:Cn}=R.DatePicker,jn=m.div`
430
+ `,Kt=({boxBottomText:n,boxTopText:e,onClick:t,className:r,color:a,commissionStatus:i})=>o.jsx(o.Fragment,{children:o.jsx(hn,{children:o.jsxs(mn,{color:a,onClick:t,className:r,children:[o.jsx(yn,{children:e}),o.jsx(xn,{children:n}),i&&e===B("Commission")&&o.jsx(bn,{color:a,children:i})]})})}),vn=({pageTitle:n,pageDesc:e,logoPrimaryUrl:t,shortName:r,colorPrimary:a,children:i})=>{const[s]=X.useSearchParams(),l=s.get("backPath"),d=X.useNavigate();function c(u){d(u)}return o.jsxs(rn,{children:[o.jsxs(on,{children:[o.jsx("header",{children:l&&o.jsx(an,{onClick:()=>c(l),children:o.jsx(gn,{})})}),o.jsx(sn,{children:o.jsxs(ln,{children:[o.jsx(pn,{children:n}),o.jsx(dn,{children:e})]})}),o.jsx(un,{children:o.jsx(Kt,{boxTopText:o.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:o.jsx(nn,{children:r})})}),i,o.jsxs(fn,{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(St,{children:re("TermsOfUsage")})}),o.jsx("a",{href:"",children:o.jsx(St,{children:re("PrivacyPolicy")})})]})]})]}),o.jsx(cn,{backgroundcolor:a,children:o.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 Ct=n=>{let e;const t=new Set,r=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const h=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,h))}},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?Ct(n):Ct),qt={Page:1,PageSize:25},jt={filters:qt,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:fe.TABLE},Sn=()=>wn((n,e)=>({columns:[],...jt,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 i=JSON.parse(a);n({filters:i.filters??qt,filterItems:i.filterItems??[],sortItems:i.sortItems??[],activeTableView:i.activeTableView??r,hideItems:i.hideItems??{},groupByArr:i.groupByArr??[],selectedConfig:i.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:i,...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:i}=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||"",...i.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({...jt,isHydrated:!0,selectedConfig:null})}})),Zt=S.createContext(null),Cn=({children:n})=>{const e=S.useRef();return e.current||(e.current=Sn()),o.jsx(Zt.Provider,{value:e.current,children:n})},$=n=>{const e=S.useContext(Zt);if(!e)throw new Error("GridViewStoreProvider is missing");return at.useStore(e,n)},jn=()=>{const n=$(u=>u.hydrateFromStorage),e=$(u=>u.isHydrated),t=$(u=>u.filters),r=$(u=>u.filterItems),a=$(u=>u.sortItems),i=$(u=>u.hideItems),s=$(u=>u.groupByArr),l=$(u=>u.activeTableView),d=$(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:i,groupByArr:s,selectedConfig:d}))},[t,r,a,l,i,s,d,e])};function Jt(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}=H.DatePicker,Ln=m.div`
431
431
  background: var(--color-bg-primary, #fff);
432
- `,kn=m.div`
432
+ `,Dn=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
- `,Ln=m.div``;m(R.Table)`
565
+ `,$n=m.div``;m(H.Table)`
566
566
  .ant-table-thead {
567
567
  tr {
568
568
  th {
@@ -617,7 +617,7 @@
617
617
  }
618
618
  }
619
619
  }
620
- `;const lt=m.div`
620
+ `;const ct=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
- `,Dn=m.div`
701
+ `,En=m.div`
702
702
  display: flex;
703
703
  flex-wrap: wrap;
704
704
  gap: 0.12rem;
@@ -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
- `,$n=m.div`
762
+ `,On=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
- `,Jt=m(Cn)`
789
+ `,Xt=m(kn)`
790
790
  height: 0;
791
791
  padding: 0 !important;
792
792
  overflow: hidden;
793
793
  border: none !important;
794
- `,En=m.span`
794
+ `,Tn=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
- `,On=m.div`
804
+ `,In=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
- `,Tn=m.div`
810
+ `,zn=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
- `,In=m.div`
817
+ `,Pn=m.div`
818
818
  max-height: 300px;
819
819
  overflow: hidden;
820
- `,zn=m.div`
820
+ `,Mn=m.div`
821
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"})),Xt=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"})),Mn=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"})),ct=(n,e,t=[])=>{const r=S.useMemo(()=>Pr.debounce(n,e),t);return S.useEffect(()=>()=>{r.cancel()},[r]),r},dt=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})),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:"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})),Pn=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"})),Hn=({children:n,overlay:e,placement:t="bottomRight"})=>{const[r,o]=S.useState(!1);return i.jsx(R.Dropdown,{open:r,onOpenChange:o,placement:t,popupRender:()=>typeof e=="function"?e(o):e,trigger:["click"],children:i.jsx("button",{className:"icon",children:n})})},Qt=({placement:n,children:e})=>{const t=D(f=>f.columns),r=D(f=>f.sortItems),o=D(f=>f.setSortItems),a=r[0],[s,l]=S.useState(""),[d,c]=S.useState((a==null?void 0:a.direction)===Q.ASC?Q.ASC:Q.DESC),u=t.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())&&f.sortable!==!1);function p(f,g){o([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function h(){o([])}return i.jsx(Hn,{overlay:f=>i.jsxs(lt,{children:[i.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),i.jsx("div",{children:u.map((g,w)=>i.jsxs("button",{onClick:()=>{g.title==(a==null?void 0:a.title)?h():p(g,d)},children:[g.title,g.title==(a==null?void 0:a.title)&&i.jsx("span",{children:i.jsx(Ee,{})})]},w))}),i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>{c(Q.ASC),a&&p(a,Q.ASC)},children:[i.jsx(dt,{}),"Ascending",d===Q.ASC&&i.jsx(Ee,{})]}),i.jsxs("button",{onClick:()=>{c(Q.DESC),a&&p(a,Q.DESC)},children:[i.jsx(pt,{}),"Descending",d===Q.DESC&&i.jsx(Ee,{})]})]})]}),placement:n||"bottomRight",children:e||i.jsx(Pn,{})})},ut=({placement:n,children:e,onSelect:t,CustomFilters:r})=>{const[o,a]=S.useState(!1),[s,l]=S.useState(""),d=D(h=>h.columns),c=D(h=>h.filterItems),u=D(h=>h.setFilterItems);function p(h){t?t(h):u([...c,{...h,selectType:be.VALUE}]),a(!1)}return i.jsx(R.Dropdown,{open:o,onOpenChange:a,placement:n||"bottomRight",popupRender:()=>i.jsxs(lt,{children:[i.jsx("input",{type:"text",placeholder:ae("Search")+"...",value:s,onChange:h=>l(h.target.value)}),i.jsx("div",{children:d.filter(h=>h.filterable!==!1).filter(h=>!c.some(f=>f.title==h.title)).filter(h=>h.filterable!==!1).filter(h=>h.title.toLowerCase().includes(s)).map((h,f)=>i.jsx("button",{onClick:()=>p(h),children:h.title},f))}),r&&i.jsx(r,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:a})]}),trigger:["click"],children:i.jsx("button",{className:"icon",children:e})})},Rn={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Fn={okText:"Create",cancelText:"Cancel"},ge=ot.create((n,e)=>{const t=r=>({...r,popupOptions:{...Rn,...r.popupOptions},footerOptions:{...Fn,...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(o=>o.options?{options:{...o.options,onOk:r}}:o),setOnCancel:r=>n(o=>o.options?{options:{...o.options,onCancel:r}}:o),setComponentProps:r=>n(o=>o.options?{options:{...o.options,componentProps:{...o.options.componentProps,...r}}}:o),setPopupOptions:r=>n(o=>o.options?{options:{...o.options,popupOptions:{...o.options.popupOptions,...r}}}:o),setFooterOptions:r=>n(o=>o.options?{options:{...o.options,footerOptions:r==null?void 0:{...o.options.footerOptions,...r}}}:o),setHideFooter:r=>n(o=>o.options?{options:{...o.options,hideFooter:r,footerOptions:r?void 0:o.options.footerOptions}}:o),setTitle:r=>n(o=>o.options?{options:{...o.options,title:r}}:o)}}),Ct=m(R.Select)`
822
+ `,Ae=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),M.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),M.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Qt=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"}),M.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"})),er=n=>M.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),M.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),M.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),M.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=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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=>M.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"}),M.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 o.jsx(H.Dropdown,{open:r,onOpenChange:a,placement:t,popupRender:()=>typeof e=="function"?e(a):e,trigger:["click"],children:o.jsx("button",{className:"icon",children:n})})},tr=({placement:n,children:e})=>{const t=$(f=>f.columns),r=$(f=>f.sortItems),a=$(f=>f.setSortItems),i=r[0],[s,l]=S.useState(""),[d,c]=S.useState((i==null?void 0:i.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 h(){a([])}return o.jsx(Rn,{overlay:f=>o.jsxs(ct,{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==(i==null?void 0:i.title)?h():p(g,d)},children:[g.title,g.title==(i==null?void 0:i.title)&&o.jsx("span",{children:o.jsx(Ee,{})})]},v))}),o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>{c(ee.ASC),i&&p(i,ee.ASC)},children:[o.jsx(pt,{}),"Ascending",d===ee.ASC&&o.jsx(Ee,{})]}),o.jsxs("button",{onClick:()=>{c(ee.DESC),i&&p(i,ee.DESC)},children:[o.jsx(ut,{}),"Descending",d===ee.DESC&&o.jsx(Ee,{})]})]})]}),placement:n||"bottomRight",children:e||o.jsx(Hn,{})})},ft=({placement:n,children:e,onSelect:t,CustomFilters:r})=>{const[a,i]=S.useState(!1),[s,l]=S.useState(""),d=$(h=>h.columns),c=$(h=>h.filterItems),u=$(h=>h.setFilterItems);function p(h){t?t(h):u([...c,{...h,selectType:ve.VALUE}]),i(!1)}return o.jsx(H.Dropdown,{open:a,onOpenChange:i,placement:n||"bottomRight",popupRender:()=>o.jsxs(ct,{children:[o.jsx("input",{type:"text",placeholder:oe("Search")+"...",value:s,onChange:h=>l(h.target.value)}),o.jsx("div",{children:d.filter(h=>h.filterable!==!1).filter(h=>!c.some(f=>f.title==h.title)).filter(h=>h.filterable!==!1).filter(h=>h.title.toLowerCase().includes(s)).map((h,f)=>o.jsx("button",{onClick:()=>p(h),children:h.title},f))}),r&&o.jsx(r,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:i})]}),trigger:["click"],children:o.jsx("button",{className:"icon",children:e})})},Fn={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Nn={okText:"Create",cancelText:"Cancel"},ge=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)}}),kt=m(H.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
- `,jt={"/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},ft=()=>{const{pathname:n}=ne.useLocation(),e=Object.keys(jt).find(t=>n===t||n.startsWith(t+"/"));return e?jt[e]:void 0};function er(n,e){return e.label.toLowerCase().includes(n.toLowerCase())||e.value==n}const Nn=({setisSettingPopupVisible:n,CustomFilters:e,tableAdditionalFields:t,createIsModal:r,exportButton:o,hasSelect:a,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=ne.useNavigate(),u=D(x=>x.filters),p=D(x=>x.hasCreateBtn),h=D(x=>x.setFilters),f=D(x=>x.setFilterItems),g=D(x=>x.setSortItems),[w,O]=S.useState(()=>{var x,b;try{const E=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return E?!!((b=(x=JSON.parse(E))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:L}=ge(),[T,V]=S.useState(!1),{getMyFilters:G}=we(),_=ft(),[Y,I]=S.useState([]),$=D(x=>x.selectedConfig),v=D(x=>x.setSelectedConfig),F=D(x=>x.configsVersion);S.useEffect(()=>{_==null||!G||G(String(_)).then(x=>I(x.data??[]))},[_,F,G]);function M(x){const b=Y.find(N=>N.id===x);if(!b)return;const{filterItems:E,sortItems:z}=JSON.parse(b.value);f(E,!0),g(z),v({id:b.id,name:b.name})}const k=ct(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?L():c("new")}return i.jsxs(kn,{children:[!d&&i.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:i.jsx(Mn,{})}),l&&i.jsx(l,{}),i.jsxs("div",{className:"page-actions",children:[Y.length>0&&i.jsx(Ct,{showSearch:!0,placeholder:B("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:($==null?void 0:$.id)??null,filterOption:er,onChange:x=>x!=null?M(x):v(null)}),a&&s&&i.jsx("div",{children:i.jsx(Ct,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(T,V),w?i.jsx("input",{type:"text",placeholder:ae("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:k}):i.jsx("button",{onClick:()=>O(!0),children:ae("Search")}),i.jsx(Qt,{}),i.jsx(ut,{CustomFilters:e,children:i.jsx(Ae,{})}),i.jsx("button",{className:"icon",onClick:C,children:i.jsx(Xt,{})}),o&&o,p&&i.jsx("button",{onClick:y,className:"create-btn",children:ae("Create")})]}),A&&i.jsx(_t,{})]})},Vn=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"})),tr=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,o=t??null;return r===o?!0:!r||!o?!1:r.getTime()===o.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const r=t.getMonth()+1,o=t.getDate(),a=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=o<10?`0${o}`:`${o}`;return`${s}/${l}/${a}`}static toLocal(e,t=!1,r=!1){const o=this.parseDate(e);return o?(t&&o.setHours(0,0,0,0),r&&o.setHours(23,59,59,999),this.utcToLocal(o)):null}static getDates(e,t){const r=new Array;let o=new Date(e.valueOf());for(;o<=t;)r.push(new Date(o)),o=this.addDays(o,1);return r}static dateOnly(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}/${r}/${o}`}static dateWithDashes(e){const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate();return`${t}-${r}-${o}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate();return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),o=t.getMonth()+1,a=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${o<10?"0":""}${o}-${a<10?"0":""}${a} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=t.getDate(),s=t.getFullYear();return`${o} ${a}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),o=e.getMonth()+1,a=e.getDate(),s=`${r}/${o}/${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 r=t.getDate(),a=t.getMonth();return`${r} ${a}`}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"}),o=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${r}, ${o}`}static toISOTimeString(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes(),a=t.getSeconds();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}:${a<10?"0":""}${a}`}static toTimeInput(e){const t=ue.parseDate(e);if(!t)return null;const r=t.getHours(),o=t.getMinutes();return`${r<10?"0":""}${r}:${o<10?"0":""}${o}`}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),a=(t?t.getTime():Date.now())-r.getTime();return Math.floor(a/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,o=t<=e?e:t,a=t<=e?1:-1;let s=(o.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=o.getMonth(),s*a}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[a,s,l]=e.split("-").map(d=>+d);return new Date(a,s-1,l)}let o;if(o=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(o)}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,o=0;const a=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(r=Number(e[9]+e[10]),o=Number(e[9]+e[11])),a.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-r,d=Number(e[5]||0)-o,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 ee=ue;const 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:"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})),gt=m(An)`
849
+ `,Lt={"/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(Lt).find(t=>n===t||n.startsWith(t+"/"));return e?Lt[e]:void 0};function rr(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:i,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=X.useNavigate(),u=$(x=>x.filters),p=$(x=>x.hasCreateBtn),h=$(x=>x.setFilters),f=$(x=>x.setFilterItems),g=$(x=>x.setSortItems),[v,E]=S.useState(()=>{var x,b;try{const T=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return T?!!((b=(x=JSON.parse(T))==null?void 0:x.filters)!=null&&b.QuickSearch):!1}catch{return!1}}),[A,j]=S.useState(!1),{open:D}=ge(),[k,R]=S.useState(!1),{getMyFilters:G}=Se(),_=gt(),[Y,I]=S.useState([]),O=$(x=>x.selectedConfig),w=$(x=>x.setSelectedConfig),N=$(x=>x.configsVersion);S.useEffect(()=>{_==null||!G||G(String(_)).then(x=>I(x.data??[]))},[_,N,G]);function P(x){const b=Y.find(V=>V.id===x);if(!b)return;const{filterItems:T,sortItems:z}=JSON.parse(b.value);f(T,!0),g(z),w({id:b.id,name:b.name})}const L=dt(x=>{h({...u,QuickSearch:x.target.value})},500);function C(){n(!0)}function y(){r?D():c("new")}return o.jsxs(Dn,{children:[!d&&o.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:o.jsx(er,{})}),l&&o.jsx(l,{}),o.jsxs("div",{className:"page-actions",children:[Y.length>0&&o.jsx(kt,{showSearch:!0,placeholder:B("SavedConfiguration"),options:Y.map(x=>({value:x.id,label:x.name})),value:(O==null?void 0:O.id)??null,filterOption:rr,onChange:x=>x!=null?P(x):w(null)}),i&&s&&o.jsx("div",{children:o.jsx(kt,{options:s.options,placeholder:s.placeholder,onChange:x=>{s.onChange(x??null)}})}),t&&t(k,R),v?o.jsx("input",{type:"text",placeholder:oe("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:L}):o.jsx("button",{onClick:()=>E(!0),children:oe("Search")}),o.jsx(tr,{}),o.jsx(ft,{CustomFilters:e,children:o.jsx(Ae,{})}),o.jsx("button",{className:"icon",onClick:C,children:o.jsx(Qt,{})}),a&&a,p&&o.jsx("button",{onClick:y,className:"create-btn",children:oe("Create")})]}),A&&o.jsx(lt,{})]})},An=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),nr=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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(),i=t.getFullYear(),s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}/${l}/${i}`}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,i=t.getDate();return`${r}-${a<10?"0":""}${a}-${i<10?"0":""}${i}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const r=t.getFullYear(),a=t.getMonth()+1,i=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${r}-${a<10?"0":""}${a}-${i<10?"0":""}${i} `+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()],i=t.getDate(),s=t.getFullYear();return`${a} ${i}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const r=e.getFullYear(),a=e.getMonth()+1,i=e.getDate(),s=`${r}/${a}/${i}`,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(),i=t.getMonth();return`${r} ${i}`}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(),i=t.getSeconds();return`${r<10?"0":""}${r}:${a<10?"0":""}${a}:${i<10?"0":""}${i}`}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),i=(t?t.getTime():Date.now())-r.getTime();return Math.floor(i/864e5/365.25)}static subtractMonths(e,t){const r=t<=e?t:e,a=t<=e?e:t,i=t<=e?1:-1;let s=(a.getFullYear()-r.getFullYear())*12;return s-=r.getMonth(),s+=a.getMonth(),s*i}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[i,s,l]=e.split("-").map(d=>+d);return new Date(i,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 i=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])),i.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=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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})),ht=m(Bn)`
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=m(R.Modal)`
861
+ `,We=m(H.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
- `,rr=m.div`
914
+ `,ar=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
- `,nr=m.button`
931
+ `,or=m.button`
932
932
  color: var(--color-text-primary, #fff);
933
933
  display: flex;
934
934
  align-items: center;
@@ -954,7 +954,7 @@
954
954
 
955
955
  border-radius: var(--border-radius-025, 2px);
956
956
  padding-bottom: var(--spacing-200, 16px);
957
- `,Bn=m.span`
957
+ `,Gn=m.span`
958
958
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
959
959
  `,Ie=m.div`
960
960
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -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
- `,or=m.div`
969
+ `,ir=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=m(R.Button)`
974
+ `,Ke=m(H.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
- `,ar=m.div`
1000
+ `,sr=m.div`
1001
1001
  width: 50%;
1002
- `,ze=m(R.Button)`
1002
+ `,ze=m(H.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
- `,Gn=m(R.Button)`
1066
+ `,Un=m(H.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=m(R.Input)`
1127
+ `,mt=m(H.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
- `,Un=n=>new Promise((e,t)=>{const r=new FileReader;r.readAsDataURL(n),r.onload=()=>e(r.result),r.onerror=o=>t(o)});function ir(n){return n&&n.charAt(0).toLowerCase()+n.slice(1)}const _n=async n=>{try{await navigator.clipboard.writeText(n),R.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{R.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function sr(n,e){if(n.status===400){const t=n.response.data,r=[];for(const o in t.errors)r.push({name:ir(o),errors:t.errors[o]});e.setFields(r)}}const lr=({type:n,value:e,selectedConfig:t,onSuccess:r,postMyFilter:o,putMyFilter:a})=>{const[s]=R.Form.useForm(),l=ge(c=>c.setOnOk),d=ge(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 a({id:t.id,type:n,name:c.name,value:e??""}):await o({type:n,name:c.name,value:e??""}),r==null||r(c.name),d()}catch(c){const u=sr(c,s);s.setFields(u)}})},[n,e,t,r,s,l,d]),i.jsxs(R.Form,{form:s,children:[i.jsx(Ie,{children:B("ConfigurationName")}),i.jsx(R.Form.Item,{name:"name",children:i.jsx(ht,{})})]})},Wn=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"})),ke=m(Wn)`
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 lr(n){return n&&n.charAt(0).toLowerCase()+n.slice(1)}const Wn=async n=>{try{await navigator.clipboard.writeText(n),H.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{H.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function cr(n,e){if(n.status===400){const t=n.response.data,r=[];for(const a in t.errors)r.push({name:lr(a),errors:t.errors[a]});e.setFields(r)}}const dr=({type:n,value:e,selectedConfig:t,onSuccess:r,postMyFilter:a,putMyFilter:i})=>{const[s]=H.Form.useForm(),l=ge(c=>c.setOnOk),d=ge(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 i({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=cr(c,s);s.setFields(u)}})},[n,e,t,r,s,l,d]),o.jsxs(H.Form,{form:s,children:[o.jsx(Ie,{children:B("ConfigurationName")}),o.jsx(H.Form.Item,{name:"name",children:o.jsx(mt,{})})]})},Yn=n=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"})),ke=m(Yn)`
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
- `,Yn=()=>i.jsx(Ye,{children:i.jsx("div",{children:i.jsx("p",{children:B("DeleteRecordQuestion")})})}),Kn=m(R.Checkbox)`
1208
+ `,Kn=()=>o.jsx(Ye,{children:o.jsx("div",{children:o.jsx("p",{children:B("DeleteRecordQuestion")})})}),qn=m(H.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
- `,qn=({item:n})=>{var j,L,T,V,G,_,Y,I,$;const e=S.useRef(null),t=D(v=>v.filterItems),r=D(v=>v.setFilterItems),[o,a]=S.useState(n.selectType==be.VALUE);function s(){var v;(v=e==null?void 0:e.current)==null||v.focus()}function l(v){r(t.map(F=>F.title==n.title?{...F,filterValue:v.id,filterLabel:v.name}:F),!0),a(!1)}function d(v,F=!1){r(t.map(M=>M.title==n.title?{...M,filterValue:v.id,filterLabel:v.name,isCountryGroup:F}:M),!0),a(!1)}const[c,u]=S.useState(n.filterValue||[]),p=v=>{var k,C;const F=c.includes(v)?c.filter(y=>y!==v):[...c,v];u(F);const M=(C=(k=n==null?void 0:n.filters)==null?void 0:k.options)==null?void 0:C.filter(y=>F.includes(y.id)).map(y=>y.name).join(", ");r(t.map(y=>y.title===n.title?{...y,filterValue:F,filterLabel:M||""}:y),!0)};function h(v){r(t.map(F=>F.title==n.title?{...v,selectType:be.VALUE}:F))}const f=ct(v=>{const F=v.target.value;r(t.map(M=>M.title==n.title?{...M,filterValue:F}:M),!0)},500);function g(v){r(t.map(F=>F.title==n.title?{...F,selectType:be.NONE}:F)),a(v)}function w(){r(t.filter(v=>v.title!=n.title),!0)}S.useEffect(()=>{var v;o&&((v=n==null?void 0:n.filters)==null?void 0:v.type)!==se.SELECT&&setTimeout(()=>{s()},0)},[o]);const O={[se.INPUT]:i.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[se.SELECT]:i.jsx("div",{children:(L=(j=n==null?void 0:n.filters)==null?void 0:j.options)==null?void 0:L.map(v=>i.jsx("button",{onClick:()=>l(v),children:v.name},v.id))}),[se.TwoComponentSelect]:i.jsxs(i.Fragment,{children:[i.jsx(Tn,{children:(T=n==null?void 0:n.filters)==null?void 0:T.firstGroupName}),i.jsx(In,{children:(G=(V=n==null?void 0:n.filters)==null?void 0:V.options)==null?void 0:G.map(v=>i.jsx("button",{onClick:()=>d(v,!1),children:v.name},v.id))})]}),[se.MULTISELECT]:i.jsx("div",{children:(Y=(_=n==null?void 0:n.filters)==null?void 0:_.options)==null?void 0:Y.map(v=>i.jsx(On,{children:i.jsx(Kn,{onChange:()=>p(v==null?void 0:v.id),children:i.jsx(En,{children:v.name})})},v.id))}),[se.DATEPICKER]:i.jsx(Jt,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:v=>{if(!v)r(t.map(F=>F.title===n.title?{...F,filterValue:null,filterLabel:""}:F),!0);else{const F=v.map((M,k)=>{var C;return M?(C=ee.toLocal(M,k===0,k===v.length-1))==null?void 0:C.toISOString():null});r(t.map(M=>M.title===n.title?{...M,filterValue:F,filterLabel:`${v[0].format("MMM D, YYYY")} → ${v[1].format("MMM D, YYYY")}`}:M),!0)}a(!1)},getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body}})},A=i.jsx(lt,{style:{border:((I=n==null?void 0:n.filters)==null?void 0:I.type)===se.DATEPICKER?"none":"inherit"},children:O[(($=n==null?void 0:n.filters)==null?void 0:$.type)||se.INPUT]});return i.jsxs(et,{children:[i.jsx(ut,{placement:"bottomLeft",onSelect:h,children:i.jsxs("span",{children:[i.jsx(Xt,{}),n.title]})}),i.jsx(R.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:o,onOpenChange:g,popupRender:()=>A,trigger:["click"],getPopupContainer:v=>{var F;return((F=v==null?void 0:v.parentElement)==null?void 0:F.parentElement)??document.body},children:i.jsx("div",{children:n.filterValue?n.filterLabel?n.filterLabel:n.filterValue:"NotSelected"})}),i.jsx("span",{onClick:w,children:i.jsx(gt,{})})]})},Zn=()=>{const n=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),r=D(g=>g.resetStore),o=D(g=>g.selectedConfig),{deleteMyFilter:a}=we(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=ge(),u=ft();async function p(){try{if(!o||!a)return;await a(o.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function h(){d({component:Yn,title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{onClick:()=>{p(),c(),r()},children:i.jsxs("span",{className:"arrow-styled",children:["Delete",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:n,sortItems:e});d({component:lr,componentProps:{type:u,value:g,selectedConfig:o,onSuccess:w=>{o&&t({...o,name:w}),s()}},title:o?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:i.jsx(ze,{children:i.jsxs("span",{className:"arrow-styled",children:["Save",i.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}return i.jsxs(Dn,{children:[e.length>0&&i.jsx(Qt,{placement:"bottomLeft",children:i.jsx(et,{className:"sort",children:i.jsxs("span",{children:[e[0].title,e[0].direction==Q.ASC?i.jsx(dt,{}):i.jsx(pt,{})]})})}),n.map(g=>i.jsx(qn,{item:g},g.title)),i.jsx(ut,{placement:"bottomLeft",children:i.jsx(et,{className:"add-filter",children:i.jsxs("span",{children:[i.jsx(Vn,{}),"AddFilter"]})})}),i.jsxs($n,{children:[i.jsx("button",{onClick:f,children:o?"UpdateConfiguration":"SaveConfiguration"}),o&&i.jsx("button",{onClick:h,children:"DeleteConfiguration"}),i.jsxs("button",{onClick:r,children:[i.jsx(tr,{}),"ResetConditions"]})]})]})},Jn=m.div`
1233
+ `,Zn=({item:n})=>{var j,D,k,R,G,_,Y,I,O;const e=S.useRef(null),t=$(w=>w.filterItems),r=$(w=>w.setFilterItems),[a,i]=S.useState(n.selectType==ve.VALUE);function s(){var w;(w=e==null?void 0:e.current)==null||w.focus()}function l(w){r(t.map(N=>N.title==n.title?{...N,filterValue:w.id,filterLabel:w.name}:N),!0),i(!1)}function d(w,N=!1){r(t.map(P=>P.title==n.title?{...P,filterValue:w.id,filterLabel:w.name,isCountryGroup:N}:P),!0),i(!1)}const[c,u]=S.useState(n.filterValue||[]),p=w=>{var L,C;const N=c.includes(w)?c.filter(y=>y!==w):[...c,w];u(N);const P=(C=(L=n==null?void 0:n.filters)==null?void 0:L.options)==null?void 0:C.filter(y=>N.includes(y.id)).map(y=>y.name).join(", ");r(t.map(y=>y.title===n.title?{...y,filterValue:N,filterLabel:P||""}:y),!0)};function h(w){r(t.map(N=>N.title==n.title?{...w,selectType:ve.VALUE}:N))}const f=dt(w=>{const N=w.target.value;r(t.map(P=>P.title==n.title?{...P,filterValue:N}:P),!0)},500);function g(w){r(t.map(N=>N.title==n.title?{...N,selectType:ve.NONE}:N)),i(w)}function v(){r(t.filter(w=>w.title!=n.title),!0)}S.useEffect(()=>{var w;a&&((w=n==null?void 0:n.filters)==null?void 0:w.type)!==se.SELECT&&setTimeout(()=>{s()},0)},[a]);const E={[se.INPUT]:o.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[se.SELECT]:o.jsx("div",{children:(D=(j=n==null?void 0:n.filters)==null?void 0:j.options)==null?void 0:D.map(w=>o.jsx("button",{onClick:()=>l(w),children:w.name},w.id))}),[se.TwoComponentSelect]:o.jsxs(o.Fragment,{children:[o.jsx(zn,{children:(k=n==null?void 0:n.filters)==null?void 0:k.firstGroupName}),o.jsx(Pn,{children:(G=(R=n==null?void 0:n.filters)==null?void 0:R.options)==null?void 0:G.map(w=>o.jsx("button",{onClick:()=>d(w,!1),children:w.name},w.id))})]}),[se.MULTISELECT]:o.jsx("div",{children:(Y=(_=n==null?void 0:n.filters)==null?void 0:_.options)==null?void 0:Y.map(w=>o.jsx(In,{children:o.jsx(qn,{onChange:()=>p(w==null?void 0:w.id),children:o.jsx(Tn,{children:w.name})})},w.id))}),[se.DATEPICKER]:o.jsx(Xt,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:w=>{if(!w)r(t.map(N=>N.title===n.title?{...N,filterValue:null,filterLabel:""}:N),!0);else{const N=w.map((P,L)=>{var C;return P?(C=te.toLocal(P,L===0,L===w.length-1))==null?void 0:C.toISOString():null});r(t.map(P=>P.title===n.title?{...P,filterValue:N,filterLabel:`${w[0].format("MMM D, YYYY")} → ${w[1].format("MMM D, YYYY")}`}:P),!0)}i(!1)},getPopupContainer:w=>{var N;return((N=w==null?void 0:w.parentElement)==null?void 0:N.parentElement)??document.body}})},A=o.jsx(ct,{style:{border:((I=n==null?void 0:n.filters)==null?void 0:I.type)===se.DATEPICKER?"none":"inherit"},children:E[((O=n==null?void 0:n.filters)==null?void 0:O.type)||se.INPUT]});return o.jsxs(et,{children:[o.jsx(ft,{placement:"bottomLeft",onSelect:h,children:o.jsxs("span",{children:[o.jsx(Qt,{}),n.title]})}),o.jsx(H.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:a,onOpenChange:g,popupRender:()=>A,trigger:["click"],getPopupContainer:w=>{var N;return((N=w==null?void 0:w.parentElement)==null?void 0:N.parentElement)??document.body},children:o.jsx("div",{children:n.filterValue?n.filterLabel?n.filterLabel:n.filterValue:"NotSelected"})}),o.jsx("span",{onClick:v,children:o.jsx(ht,{})})]})},Jn=()=>{const n=$(g=>g.filterItems),e=$(g=>g.sortItems),t=$(g=>g.setSelectedConfig),r=$(g=>g.resetStore),a=$(g=>g.selectedConfig),{deleteMyFilter:i}=Se(),s=$(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=ge(),u=gt();async function p(){try{if(!a||!i)return;await i(a.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function h(){d({component:Kn,title:a?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(ze,{onClick:()=>{p(),c(),r()},children:o.jsxs("span",{className:"arrow-styled",children:["Delete",o.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:n,sortItems:e});d({component:dr,componentProps:{type:u,value:g,selectedConfig:a,onSuccess:v=>{a&&t({...a,name:v}),s()}},title:a?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(ze,{children:o.jsxs("span",{className:"arrow-styled",children:["Save",o.jsx(ke,{})]})}),cancelText:"Cancel"}}),l()}return o.jsxs(En,{children:[e.length>0&&o.jsx(tr,{placement:"bottomLeft",children:o.jsx(et,{className:"sort",children:o.jsxs("span",{children:[e[0].title,e[0].direction==ee.ASC?o.jsx(pt,{}):o.jsx(ut,{})]})})}),n.map(g=>o.jsx(Zn,{item:g},g.title)),o.jsx(ft,{placement:"bottomLeft",children:o.jsx(et,{className:"add-filter",children:o.jsxs("span",{children:[o.jsx(An,{}),"AddFilter"]})})}),o.jsxs(On,{children:[o.jsx("button",{onClick:f,children:a?"UpdateConfiguration":"SaveConfiguration"}),a&&o.jsx("button",{onClick:h,children:"DeleteConfiguration"}),o.jsxs("button",{onClick:r,children:[o.jsx(nr,{}),"ResetConditions"]})]})]})},Xn=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
- `,Xn=m.div`
1426
+ `,Qn=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
- `,Qn=m.div`
1459
+ `,ea=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
- `,eo=m.div`
1551
+ `,ta=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 kt(n,e){const t={};return e.forEach(r=>{const o=r[n.dataIndex];t[o]?t[o].push(r):t[o]=[r]}),t}function to(n){return Object.values(n).reduce((e,t)=>e+t.length,0)}function ro({item:n,columns:e,rowKey:t,onRowClick:r}){const o=D(a=>a.checkedValue);return i.jsx("tr",{onClick:r?()=>r(n):void 0,className:`${o&&o[n[t]]?"checked":""}`,children:e.map(a=>i.jsx("td",{children:a!=null&&a.render?a.render(n[a.dataIndex],n):n[a.dataIndex]},`${n[t]}-${a.dataIndex}`))},n[t])}function mt({rows:n,columns:e,rowKey:t,onRowClick:r}){return n.map(o=>i.jsx(ro,{item:o,columns:e,rowKey:t,onRowClick:r},o[t]))}function no({rowLength:n,columnLength:e}){return Array(n).fill(null).map((t,r)=>i.jsx("tr",{children:Array(e).fill(null).map((o,a)=>i.jsx("td",{children:i.jsx(R.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${r}-${a}`))},`skeleton-row-${r}`))}function oo({subGroups:n,columns:e,rowKey:t,onRowClick:r}){return i.jsx(i.Fragment,{children:Object.keys(n).map(o=>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:[o," ",i.jsx("span",{children:n[o].length}),i.jsx("span",{className:"line"})]})})]}),i.jsx(mt,{rows:n[o],columns:e,rowKey:t,onRowClick:r})]},o))})}function ao({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 io({dataSource:n,columns:e,isSubGroupped:t,getGroupLength:r,rowKey:o,onRowClick:a}){return i.jsx(i.Fragment,{children:Object.keys(n).map(s=>{var l;return i.jsxs(S.Fragment,{children:[i.jsx(ao,{label:s,colSpan:e.length,count:t?r(n[s]):(l=n[s])==null?void 0:l.length}),t?i.jsx(oo,{subGroups:n[s],columns:e,rowKey:o,onRowClick:a}):i.jsx(mt,{rows:n[s],columns:e,rowKey:o,onRowClick:a})]},s)})})}function so({pagination:n,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:r}){const[o,a]=S.useState(!1);return i.jsxs(Qn,{children:[i.jsx(R.Pagination,{current:n.current,pageSize:n.pageSize,total:t,showSizeChanger:!1,onChange:r}),i.jsx(R.Dropdown,{placement:"bottomRight",popupRender:()=>i.jsx(eo,{children:((n==null?void 0:n.items)||[{label:`10 ${B("Items")}`,value:10},{label:`25 ${B("Items")}`,value:25},{label:`50 ${B("Items")}`,value:50},{label:`100 ${B("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:o,onOpenChange:a,children:i.jsxs("div",{className:"page-size-select-header",children:[n.pageSize," ",B("ItemsPerPage")," ",i.jsx(it,{})]})})]})}const lo=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 co({col:n}){const[e,t]=S.useState(!1),r=D(f=>f.filterItems),o=D(f=>f.hideItems),a=D(f=>f.setFilterItems),s=D(f=>f.setSortItems),l=D(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(w=>f.title!=w.title);a([...g,{...f,selectType:be.VALUE}])}function u(f,g){l({...o,[f.dataIndex]:!0})}const p=()=>t(!1),h=[{icon:i.jsx(Ae,{}),text:B("Filter"),action:()=>c(n)},{icon:i.jsx(dt,{}),text:ae("Ascending"),action:()=>d(n,Q.ASC)},{icon:i.jsx(pt,{}),text:ae("Descending"),action:()=>d(n,Q.DESC)},{icon:i.jsx(lo,{}),text:B("HideInView"),action:()=>u(n)}];return n.filterDropdown===!1?i.jsx("th",{}):i.jsx(R.Dropdown,{placement:"bottomLeft",popupRender:()=>i.jsx(Xn,{children:h.map(({icon:f,text:g,action:w})=>i.jsxs("button",{onClick:()=>{w(),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 po=m.div`
1576
+ `;function Dt(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=$(i=>i.checkedValue);return o.jsx("tr",{onClick:r?()=>r(n):void 0,className:`${a&&a[n[t]]?"checked":""}`,children:e.map(i=>o.jsx("td",{children:i!=null&&i.render?i.render(n[i.dataIndex],n):n[i.dataIndex]},`${n[t]}-${i.dataIndex}`))},n[t])}function xt({rows:n,columns:e,rowKey:t,onRowClick:r}){return n.map(a=>o.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)=>o.jsx("tr",{children:Array(e).fill(null).map((a,i)=>o.jsx("td",{children:o.jsx(H.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${r}-${i}`))},`skeleton-row-${r}`))}function oa({subGroups:n,columns:e,rowKey:t,onRowClick:r}){return o.jsx(o.Fragment,{children:Object.keys(n).map(a=>o.jsxs(S.Fragment,{children:[o.jsxs("tr",{className:"sub-group-header",children:[o.jsx("td",{}),o.jsx("td",{colSpan:e.length,children:o.jsxs("div",{children:[a," ",o.jsx("span",{children:n[a].length}),o.jsx("span",{className:"line"})]})})]}),o.jsx(xt,{rows:n[a],columns:e,rowKey:t,onRowClick:r})]},a))})}function ia({label:n,colSpan:e,count:t}){return o.jsxs("tr",{className:"main-group-header",children:[o.jsx("td",{}),o.jsxs("td",{colSpan:e,children:[n," ",o.jsx("span",{children:t})]}),o.jsx("td",{})]})}function sa({dataSource:n,columns:e,isSubGroupped:t,getGroupLength:r,rowKey:a,onRowClick:i}){return o.jsx(o.Fragment,{children:Object.keys(n).map(s=>{var l;return o.jsxs(S.Fragment,{children:[o.jsx(ia,{label:s,colSpan:e.length,count:t?r(n[s]):(l=n[s])==null?void 0:l.length}),t?o.jsx(oa,{subGroups:n[s],columns:e,rowKey:a,onRowClick:i}):o.jsx(xt,{rows:n[s],columns:e,rowKey:a,onRowClick:i})]},s)})})}function la({pagination:n,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:r}){const[a,i]=S.useState(!1);return o.jsxs(ea,{children:[o.jsx(H.Pagination,{current:n.current,pageSize:n.pageSize,total:t,showSizeChanger:!1,onChange:r}),o.jsx(H.Dropdown,{placement:"bottomRight",popupRender:()=>o.jsx(ta,{children:((n==null?void 0:n.items)||[{label:`10 ${B("Items")}`,value:10},{label:`25 ${B("Items")}`,value:25},{label:`50 ${B("Items")}`,value:50},{label:`100 ${B("Items")}`,value:100}]).map(s=>o.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==n.pageSize&&o.jsx(Ee,{})]},s.value))}),trigger:["click"],open:a,onOpenChange:i,children:o.jsxs("div",{className:"page-size-select-header",children:[n.pageSize," ",B("ItemsPerPage")," ",o.jsx(it,{})]})})]})}const ca=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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}),M.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=$(f=>f.filterItems),a=$(f=>f.hideItems),i=$(f=>f.setFilterItems),s=$(f=>f.setSortItems),l=$(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(v=>f.title!=v.title);i([...g,{...f,selectType:ve.VALUE}])}function u(f,g){l({...a,[f.dataIndex]:!0})}const p=()=>t(!1),h=[{icon:o.jsx(Ae,{}),text:B("Filter"),action:()=>c(n)},{icon:o.jsx(pt,{}),text:oe("Ascending"),action:()=>d(n,ee.ASC)},{icon:o.jsx(ut,{}),text:oe("Descending"),action:()=>d(n,ee.DESC)},{icon:o.jsx(ca,{}),text:B("HideInView"),action:()=>u(n)}];return n.filterDropdown===!1?o.jsx("th",{}):o.jsx(H.Dropdown,{placement:"bottomLeft",popupRender:()=>o.jsx(Qn,{children:h.map(({icon:f,text:g,action:v})=>o.jsxs("button",{onClick:()=>{v(),p()},children:[f,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:f=>(f==null?void 0:f.parentElement)??document.body,children:o.jsx("th",{className:e?"active":"",children:o.jsx("span",{children:n.title})})})}const pa=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
- `,uo=m.div`
1585
+ `,ua=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
- `,fo=m.p`
1591
+ `,fa=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
- `,go=m.p`
1602
+ `,ga=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
- `,ho=m.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
- `;m(R.Button)`
1629
+ `;m(H.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 cr=({title:n,description:e,button:t,helpSpan:r})=>i.jsx(po,{children:i.jsxs(uo,{children:[i.jsx(fo,{children:n}),i.jsxs(go,{children:[e," ",r&&i.jsx(ho,{children:r})]}),t&&t]})}),mo=({activeTableView:n,columns:e,rowKey:t,dataSource:r,loading:o,pagination:a,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(L=>L.filters),p=D(L=>L.groupByArr),h=D(L=>L.setFilters),f=S.useMemo(()=>p.length>0?e.filter(L=>!p.some(T=>T.dataIndex==L.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:w}=S.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),O=S.useMemo(()=>{if(p[0]){const L=kt(p[0],r);if(p[1]){const T={};return Object.keys(L).forEach(V=>{T[V]=kt(p[1],L[V])}),T}return L}return r},[r,p]);function A(L){h({...u,PageSize:L,Page:1})}function j(L){h({...u,Page:L})}return i.jsxs(Jn,{children:[i.jsxs("table",{children:[n!=fe.LIST&&i.jsx("thead",{children:i.jsxs("tr",{children:[f.map(L=>i.jsx(co,{col:L},L.dataIndex)),i.jsx("th",{})]})}),i.jsx("tbody",{children:o?i.jsx(no,{rowLength:a.pageSize,columnLength:f.length}):(O==null?void 0:O.length)==0&&c?i.jsx("tr",{children:i.jsx("td",{colSpan:f.length,children:i.jsx(cr,{...c})})}):i.jsx(i.Fragment,{children:g?i.jsx(io,{dataSource:O,columns:f,isSubGroupped:w,getGroupLength:to,rowKey:t,onRowClick:l}):i.jsx(mt,{rows:O,columns:f,rowKey:t,onRowClick:l})})})]}),a&&!d&&i.jsx(so,{pagination:a,totalItemCount:s,onPerPageSelectChange:A,onPaginationChange:j})]})},xo=m.div`
1650
+ `;const pr=({title:n,description:e,button:t,helpSpan:r})=>o.jsx(pa,{children:o.jsxs(ua,{children:[o.jsx(fa,{children:n}),o.jsxs(ga,{children:[e," ",r&&o.jsx(ha,{children:r})]}),t&&t]})}),ma=({activeTableView:n,columns:e,rowKey:t,dataSource:r,loading:a,pagination:i,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=$(D=>D.filters),p=$(D=>D.groupByArr),h=$(D=>D.setFilters),f=S.useMemo(()=>p.length>0?e.filter(D=>!p.some(k=>k.dataIndex==D.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:v}=S.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),E=S.useMemo(()=>{if(p[0]){const D=Dt(p[0],r);if(p[1]){const k={};return Object.keys(D).forEach(R=>{k[R]=Dt(p[1],D[R])}),k}return D}return r},[r,p]);function A(D){h({...u,PageSize:D,Page:1})}function j(D){h({...u,Page:D})}return o.jsxs(Xn,{children:[o.jsxs("table",{children:[n!=fe.LIST&&o.jsx("thead",{children:o.jsxs("tr",{children:[f.map(D=>o.jsx(da,{col:D},D.dataIndex)),o.jsx("th",{})]})}),o.jsx("tbody",{children:a?o.jsx(aa,{rowLength:i.pageSize,columnLength:f.length}):(E==null?void 0:E.length)==0&&c?o.jsx("tr",{children:o.jsx("td",{colSpan:f.length,children:o.jsx(pr,{...c})})}):o.jsx(o.Fragment,{children:g?o.jsx(sa,{dataSource:E,columns:f,isSubGroupped:v,getGroupLength:ra,rowKey:t,onRowClick:l}):o.jsx(xt,{rows:E,columns:f,rowKey:t,onRowClick:l})})})]}),i&&!d&&o.jsx(la,{pagination:i,totalItemCount:s,onPerPageSelectChange:A,onPaginationChange:j})]})},xa=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
- `,yo=m.div`
1868
+ `,ya=m.div`
1869
1869
  display: flex;
1870
1870
  align-items: center;
1871
1871
  gap: 8px;
1872
- `,Lt=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"})),Dt=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"})),dr=m.div`
1872
+ `,$t=n=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"}),M.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"})),Et=n=>M.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"})),ur=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
- `,bo=m.div`
1913
+ `,ba=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
- `,vo=m.span`
1960
+ `,va=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
- `,wo=m(dr)`
1969
+ `,wa=m(ur)`
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
- `,So=m.div`
1974
+ `,Sa=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
- `,Co=m.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
- `,jo=m.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
- `,ko=m(R.Button)`
2003
+ `,ka=m(H.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
- `,xt=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 pr(n){if(!n)return n;let e=n[0].toLowerCase();for(let t=1;t<n.length;t++){const r=n[t-1],o=n[t],a=n[t+1];/[A-Z]/.test(o)?/[A-Z]/.test(r)&&/[A-Z]/.test(a)?e+=o.toLowerCase():(/[A-Z]/.test(r)&&(!a||/[^A-Z]/.test(a)),e+=o):e+=o}return e}function ve(n){return Object.entries(n).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(o=>isNaN(o)?pr(o):Number(o)),errors:t}))}m(R.Form.Item)`
2026
+ `,yt=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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"}),M.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),M.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 fr(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],i=n[t+1];/[A-Z]/.test(a)?/[A-Z]/.test(r)&&/[A-Z]/.test(i)?e+=a.toLowerCase():(/[A-Z]/.test(r)&&(!i||/[^A-Z]/.test(i)),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)?fr(a):Number(a)),errors:t}))}m(H.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 ur=m.div`
2073
+ `;const gr=m.div`
2074
2074
  display: flex;
2075
2075
  flex-direction: column;
2076
2076
  border-top: 1px solid black;
2077
- `;m(R.Button)`
2077
+ `;m(H.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 fr=m.span`
2087
+ `;const hr=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
- `,Lo=m.span`
2098
+ `,La=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
- `,Do=m.span`
2107
+ `,Da=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
- `,gr=m.div`
2116
+ `,mr=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
- `,hr=m.div`
2204
+ `,xr=m.div`
2205
2205
  display: flex;
2206
2206
  flex-direction: column;
2207
2207
  gap: 8px;
@@ -2263,7 +2263,7 @@
2263
2263
  }
2264
2264
  `;m.div`
2265
2265
  padding: 1.5rem;
2266
- `;const $o=m.div`
2266
+ `;const $a=m.div`
2267
2267
  display: flex;
2268
2268
  align-items: center;
2269
2269
  justify-content: center;
@@ -2281,7 +2281,7 @@
2281
2281
  color: var(--color-text-inverse-primary, #131412) !important;
2282
2282
  }
2283
2283
  }
2284
- `;m(R.Input.Password)`
2284
+ `;m(H.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 mr=({confirmationToken:n,backupCodeEndpoint:e,setBackupActivated:t,setVisible:r,id:o,setRefetchData:a})=>{const[s,l]=S.useState(),[d,c]=S.useState([]);async function u(){var p,h,f;try{const g=await e({confirmationToken:n,code:s,id:o});(p=g==null?void 0:g.data)!=null&&p.success&&(r(!1),a(w=>!w))}catch(g){const w=ve((f=(h=g==null?void 0:g.response)==null?void 0:h.data)==null?void 0:f.errors);c(w),console.log(g)}}return i.jsxs("div",{children:[i.jsx(Ye,{children:i.jsxs(hr,{children:[te("EnterBackupCode"),i.jsx(Ie,{children:te("BackupCodesDesc")})]})}),i.jsxs(gr,{className:d.length>0?"verification-error":"",children:[i.jsx(Ie,{children:te("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(xt,{})," ",p.errors[0]]},p.name)),i.jsx(Do,{children:te("BackupCodeSpan")})]}),i.jsxs(ur,{children:[i.jsx(Ke,{onClick:()=>{t(!1)},children:ae("Back")}),i.jsx(ze,{onClick:u,children:i.jsxs("span",{className:"arrow-styled",children:[ae("Continue")," ",i.jsx(ke,{})]})})]})]})},Eo=m.div`
2387
+ `;const yr=({confirmationToken:n,backupCodeEndpoint:e,setBackupActivated:t,setVisible:r,id:a,setRefetchData:i})=>{const[s,l]=S.useState(),[d,c]=S.useState([]);async function u(){var p,h,f;try{const g=await e({confirmationToken:n,code:s,id:a});(p=g==null?void 0:g.data)!=null&&p.success&&(r(!1),i(v=>!v))}catch(g){const v=we((f=(h=g==null?void 0:g.response)==null?void 0:h.data)==null?void 0:f.errors);c(v),console.log(g)}}return o.jsxs("div",{children:[o.jsx(Ye,{children:o.jsxs(xr,{children:[re("EnterBackupCode"),o.jsx(Ie,{children:re("BackupCodesDesc")})]})}),o.jsxs(mr,{className:d.length>0?"verification-error":"",children:[o.jsx(Ie,{children:re("BackupCode")}),o.jsx(mt,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>o.jsxs("span",{children:[o.jsx(yt,{})," ",p.errors[0]]},p.name)),o.jsx(Da,{children:re("BackupCodeSpan")})]}),o.jsxs(gr,{children:[o.jsx(Ke,{onClick:()=>{t(!1)},children:oe("Back")}),o.jsx(ze,{onClick:u,children:o.jsxs("span",{className:"arrow-styled",children:[oe("Continue")," ",o.jsx(ke,{})]})})]})]})},Ea=m.div`
2388
2388
  position: fixed;
2389
2389
  top: 0;
2390
2390
  left: 0;
@@ -2395,14 +2395,14 @@
2395
2395
  justify-content: center;
2396
2396
  align-items: center;
2397
2397
  z-index: 1000;
2398
- `,Oo=m.div`
2398
+ `,Oa=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
- `,To=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=o=>{o.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),n?Tr.createPortal(i.jsx(Eo,{onClick:e,children:i.jsx(Oo,{onClick:r=>r.stopPropagation(),children:t})}),To):null}const Io={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},xr=({isVisible:n,setVisible:e,code:t,mfaType:r,id:o,isBlocked:a,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=we(),{setUser:c}=Se(),[u,p]=S.useState(""),[h,f]=S.useState([]),[g,w]=S.useState(!1);function O(T){p(T)}async function A(){const T=l;if(T)try{f([]);const V=await T(t,u,o);c(V.data.value),L()}catch(V){if(console.log(V),V.status===400){const G=V.response.data,_=ve(G.errors);f(_)}}}async function j(T){const V=d;if(V)try{f([]);const G=await V(T);c(G.data.value)}catch(G){if(console.log(G),G.status===400){const _=G.response.data,Y=ve(_.errors);f(Y)}}}function L(){p(""),e(!1),f([])}return a?i.jsx(tt,{isOpen:a,onClose:s,children:i.jsxs(wo,{children:[i.jsxs(So,{children:[i.jsxs(Co,{children:[i.jsx("span",{children:B("ContactInformationBlocked")}),i.jsx("span",{onClick:s,children:i.jsx(gt,{})})]}),i.jsx(jo,{children:B("ContactInformationBlockedDesc")})]}),i.jsxs(ko,{children:[B("TryAgain"),i.jsx(ke,{})]})]})}):i.jsx(tt,{isOpen:n,onClose:L,children:g?i.jsx(mr,{setBackupActivated:w,backupCodeEndpoint:j,confirmationToken:t,id:o,setVisible:e}):i.jsxs(dr,{children:[i.jsx("h2",{children:te("EnterVerificationCode")}),i.jsx("p",{children:r!==void 0?B(Io[r]):""}),r!==1&&i.jsxs(i.Fragment,{children:[i.jsxs(bo,{className:h.length>0?"verification-error":"",children:[i.jsx(R.Input.OTP,{value:u,onChange:O}),i.jsxs(vo,{children:[te("DidnReceiveCode")," ",i.jsx(fr,{onClick:()=>w(!0),children:te("EnterBackupCode")})]}),h.map(T=>i.jsxs("span",{children:[i.jsx(xt,{}),T.errors[0]]},T.name))]}),i.jsxs("button",{onClick:A,disabled:u.length!==6,children:[ae("ShowContactInformation"),i.jsx(ke,{})]})]})]})})},yr=()=>{const{enableContactInfo:n,disableContactInfo:e}=we(),{setUser:t}=Se(),[r,o]=S.useState(!1),[a,s]=S.useState(null),[l,d]=S.useState(!1),c=async()=>{var h,f,g,w,O,A,j;if(n)try{d(!1);const L=await n();s({token:(f=(h=L.data)==null?void 0:h.value)==null?void 0:f.token,id:(w=(g=L.data)==null?void 0:g.value)==null?void 0:w.id,mfaType:(A=(O=L.data)==null?void 0:O.value)==null?void 0:A.mfaType}),o(!0)}catch(L){const T=(j=L.response)==null?void 0:j.data,V=T==null?void 0:T.errors;(V&&Array.isArray(V[""])&&V[""][0]==="TooManyAttempts"||V[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const h=await e();t(h.data.value)}const p=()=>{d(!1),o(!1)};return{isContactInfoModalVisible:r,setIsContactInfoModalVisible:o,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:r,setVisible:o,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}}},zo=({close:n})=>{var A;const{user:e}=Se(),t=D(j=>j.columns),r=D(j=>j.groupByArr),o=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:h}=yr();function f(j){const L=t.find(T=>T.dataIndex==j.value);l([L])}function g(j,L){d({...o,[j.dataIndex]:!!L})}function w(j,L){const T=new Date(j),V=new Date(L),G=Math.abs(V.getTime()-T.getTime()),_=Math.floor(G/(1e3*60))%60,Y=Math.floor(G/(1e3*60*60))%24,I=[];return Y>0&&I.push(`${Y}h`),_>0&&I.push(`${_}m`),I.join(" ")}function O(){c(),n()}return i.jsxs(xo,{children:[i.jsxs("header",{children:[i.jsx("span",{children:B("ViewOptions")}),i.jsx("button",{onClick:n,children:i.jsx(Lt,{})})]}),i.jsxs("div",{className:"setting-sidebar-content",children:[i.jsxs("ul",{className:"table-view-list",children:[i.jsxs("li",{className:a==fe.TABLE?"active":"",onClick:()=>s(fe.TABLE),children:[i.jsx(Dt,{}),i.jsx("span",{children:B("Table")})]}),i.jsxs("li",{className:a==fe.LIST?"active":"",onClick:()=>s(fe.LIST),children:[i.jsx(Ae,{}),i.jsx("span",{children:B("List")})]})]}),i.jsx("ul",{className:"grouping-list",children:i.jsxs("li",{children:[i.jsx("span",{children:B("Grouping")}),i.jsx(R.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:i.jsxs(yo,{children:[i.jsx(Ae,{}),B("NoGrouping")]}),value:((A=r[0])==null?void 0:A.dataIndex)||null,onChange:f})]})}),i.jsxs("div",{className:"properties-list",children:[i.jsx("span",{children:B("ShowProperties")}),i.jsx("ul",{children:t.map(j=>i.jsx("li",{className:o[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,o[j.dataIndex]!==!0),children:j.title},j.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:[B("HideContactInfo")," •"," ",w(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),i.jsx(Lt,{})]}):i.jsxs("button",{onClick:u,children:[ae("ShowContactInformation")," ",i.jsx(Dt,{})]}),i.jsxs("button",{onClick:O,children:[ae("ResetAllOptions"),i.jsx(tr,{})]})]}),i.jsx(xr,{...h})]})},Mo=({columns:n,getData:e,update:t,hasCreateBtn:r,GridPageTopLeftComponent:o,contentAfterPageHeader:a,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:h,createIsModal:f,editButton:g,noPagination:w,noDataProps:O,exportButton:A,hasSelect:j,selectProps:L,TableComponent:T,tableProps:V={},noNeedSidebarResponsiveButton:G,loadedData:_=()=>{}})=>{var Z,ce,ie;const{user:Y}=Se(),I=D(K=>K.filters),$=D(K=>K.filterItems),v=D(K=>K.sortItems),F=D(K=>K.hideItems),M=D(K=>K.activeTableView),k=D(K=>K.setColumns),C=D(K=>K.setHasCreateBtn),y=D(K=>K.setHasSelect),x=D(K=>K.setCheckedValue),{response:b,loading:E}=st(()=>e({...I,...p}),[I,Y,t]);Sn(),S.useEffect(()=>{b!=null&&b.data&&_(b.data)},[b,_]);const[z,N]=S.useState(!1),U=S.useRef(null),W=Zt(U),q=S.useMemo(()=>n.filter(de=>F[de.dataIndex]!==!0),[n,F]);return S.useEffect(()=>{C(r||!1),y(j||!1)},[j]),S.useEffect(()=>{k(n)},[n]),S.useEffect(()=>{x(l)},[l]),i.jsxs(jn,{children:[i.jsxs(Ln,{ref:U,children:[i.jsx(Nn,{noNeedSidebarResponsiveButton:G,hasSelect:j,selectProps:L,exportButton:A,setisSettingPopupVisible:N,CustomFilters:u,tableAdditionalFields:h,createIsModal:f,GridPageTopLeftComponent:o}),a,($.length>0||v.length>0)&&i.jsx(Zn,{})]}),i.jsx(zn,{height:`calc(100vh - ${`${W}px`})`,children:T?i.jsx(T,{dataSource:((Z=b==null?void 0:b.data)==null?void 0:Z.items)||[],...V,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items}}):i.jsx(mo,{noPagination:w,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],dataSource:((ce=b==null?void 0:b.data)==null?void 0:ce.items)||[],loading:E,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items},activeTableView:M,totalItemCount:((ie=b==null?void 0:b.data)==null?void 0:ie.totalItemCount)||0,onRowClick:s,noDataProps:O||null})}),z&&i.jsx(zo,{close:()=>N(!1)})]})},Po=n=>i.jsx(wn,{children:i.jsx(Mo,{...n})}),Ho=()=>{const n=ge(w=>w.isOpen),e=ge(w=>w.options),t=ge(w=>w.close),r=ne.useLocation();if(S.useEffect(()=>{n&&t()},[r.pathname]),!e||!n)return null;const{title:o,component:a,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:h}=e,f=()=>{h==null||h()},g=()=>{p==null||p()};return i.jsxs(We,{centered:!0,title:o||u?i.jsxs(rr,{children:[i.jsx("span",{children:o}),u&&i.jsx(nr,{onClick:t,children:i.jsx(gt,{})})]}):void 0,...l,children:[a&&i.jsx(a,{...s}),!c&&i.jsxs(or,{children:[i.jsx(Ke,{onClick:f,children:d==null?void 0:d.cancelText}),i.jsx(ar,{onClick:g,role:"button",tabIndex:0,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},Ro=({displayAddRuleModal:n,onClose:e,title:t,hideFooter:r=!1,children:o})=>i.jsx(We,{open:n,onCancel:e,closeIcon:!1,title:t,footer:r?null:void 0,destroyOnClose:!0,centered:!0,children:o}),Fo=m.div`
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(o.jsx(Ea,{onClick:e,children:o.jsx(Oa,{onClick:r=>r.stopPropagation(),children:t})}),Ta):null}const Ia={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},br=({isVisible:n,setVisible:e,code:t,mfaType:r,id:a,isBlocked:i,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=Se(),{setUser:c}=xe(),[u,p]=S.useState(""),[h,f]=S.useState([]),[g,v]=S.useState(!1);function E(k){p(k)}async function A(){const k=l;if(k)try{f([]);const R=await k(t,u,a);c(R.data.value),D()}catch(R){if(console.log(R),R.status===400){const G=R.response.data,_=we(G.errors);f(_)}}}async function j(k){const R=d;if(R)try{f([]);const G=await R(k);c(G.data.value)}catch(G){if(console.log(G),G.status===400){const _=G.response.data,Y=we(_.errors);f(Y)}}}function D(){p(""),e(!1),f([])}return i?o.jsx(tt,{isOpen:i,onClose:s,children:o.jsxs(wa,{children:[o.jsxs(Sa,{children:[o.jsxs(Ca,{children:[o.jsx("span",{children:B("ContactInformationBlocked")}),o.jsx("span",{onClick:s,children:o.jsx(ht,{})})]}),o.jsx(ja,{children:B("ContactInformationBlockedDesc")})]}),o.jsxs(ka,{children:[B("TryAgain"),o.jsx(ke,{})]})]})}):o.jsx(tt,{isOpen:n,onClose:D,children:g?o.jsx(yr,{setBackupActivated:v,backupCodeEndpoint:j,confirmationToken:t,id:a,setVisible:e}):o.jsxs(ur,{children:[o.jsx("h2",{children:re("EnterVerificationCode")}),o.jsx("p",{children:r!==void 0?B(Ia[r]):""}),r!==1&&o.jsxs(o.Fragment,{children:[o.jsxs(ba,{className:h.length>0?"verification-error":"",children:[o.jsx(H.Input.OTP,{value:u,onChange:E}),o.jsxs(va,{children:[re("DidnReceiveCode")," ",o.jsx(hr,{onClick:()=>v(!0),children:re("EnterBackupCode")})]}),h.map(k=>o.jsxs("span",{children:[o.jsx(yt,{}),k.errors[0]]},k.name))]}),o.jsxs("button",{onClick:A,disabled:u.length!==6,children:[oe("ShowContactInformation"),o.jsx(ke,{})]})]})]})})},vr=()=>{const{enableContactInfo:n,disableContactInfo:e}=Se(),{setUser:t}=xe(),[r,a]=S.useState(!1),[i,s]=S.useState(null),[l,d]=S.useState(!1),c=async()=>{var h,f,g,v,E,A,j;if(n)try{d(!1);const D=await n();s({token:(f=(h=D.data)==null?void 0:h.value)==null?void 0:f.token,id:(v=(g=D.data)==null?void 0:g.value)==null?void 0:v.id,mfaType:(A=(E=D.data)==null?void 0:E.value)==null?void 0:A.mfaType}),a(!0)}catch(D){const k=(j=D.response)==null?void 0:j.data,R=k==null?void 0:k.errors;(R&&Array.isArray(R[""])&&R[""][0]==="TooManyAttempts"||R[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const h=await e();t(h.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:i==null?void 0:i.token,mfaType:i==null?void 0:i.mfaType,id:i==null?void 0:i.id,isBlocked:l,onBlockStateClose:p}}},za=({close:n})=>{var A;const{user:e}=xe(),t=$(j=>j.columns),r=$(j=>j.groupByArr),a=$(j=>j.hideItems),i=$(j=>j.activeTableView),s=$(j=>j.setActiveTableView),l=$(j=>j.setGroupByArr),d=$(j=>j.setHideItems),c=$(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:h}=vr();function f(j){const D=t.find(k=>k.dataIndex==j.value);l([D])}function g(j,D){d({...a,[j.dataIndex]:!!D})}function v(j,D){const k=new Date(j),R=new Date(D),G=Math.abs(R.getTime()-k.getTime()),_=Math.floor(G/(1e3*60))%60,Y=Math.floor(G/(1e3*60*60))%24,I=[];return Y>0&&I.push(`${Y}h`),_>0&&I.push(`${_}m`),I.join(" ")}function E(){c(),n()}return o.jsxs(xa,{children:[o.jsxs("header",{children:[o.jsx("span",{children:B("ViewOptions")}),o.jsx("button",{onClick:n,children:o.jsx($t,{})})]}),o.jsxs("div",{className:"setting-sidebar-content",children:[o.jsxs("ul",{className:"table-view-list",children:[o.jsxs("li",{className:i==fe.TABLE?"active":"",onClick:()=>s(fe.TABLE),children:[o.jsx(Et,{}),o.jsx("span",{children:B("Table")})]}),o.jsxs("li",{className:i==fe.LIST?"active":"",onClick:()=>s(fe.LIST),children:[o.jsx(Ae,{}),o.jsx("span",{children:B("List")})]})]}),o.jsx("ul",{className:"grouping-list",children:o.jsxs("li",{children:[o.jsx("span",{children:B("Grouping")}),o.jsx(H.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:o.jsxs(ya,{children:[o.jsx(Ae,{}),B("NoGrouping")]}),value:((A=r[0])==null?void 0:A.dataIndex)||null,onChange:f})]})}),o.jsxs("div",{className:"properties-list",children:[o.jsx("span",{children:B("ShowProperties")}),o.jsx("ul",{children:t.map(j=>o.jsx("li",{className:a[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,a[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:[B("HideContactInfo")," •"," ",v(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),o.jsx($t,{})]}):o.jsxs("button",{onClick:u,children:[oe("ShowContactInformation")," ",o.jsx(Et,{})]}),o.jsxs("button",{onClick:E,children:[oe("ResetAllOptions"),o.jsx(nr,{})]})]}),o.jsx(br,{...h})]})},Pa=({columns:n,getData:e,update:t,hasCreateBtn:r,GridPageTopLeftComponent:a,contentAfterPageHeader:i,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:h,createIsModal:f,editButton:g,noPagination:v,noDataProps:E,exportButton:A,hasSelect:j,selectProps:D,TableComponent:k,tableProps:R={},noNeedSidebarResponsiveButton:G,loadedData:_=()=>{}})=>{var Z,ce,ie;const{user:Y}=xe(),I=$(K=>K.filters),O=$(K=>K.filterItems),w=$(K=>K.sortItems),N=$(K=>K.hideItems),P=$(K=>K.activeTableView),L=$(K=>K.setColumns),C=$(K=>K.setHasCreateBtn),y=$(K=>K.setHasSelect),x=$(K=>K.setCheckedValue),{response:b,loading:T}=st(()=>e({...I,...p}),[I,Y,t]);jn(),S.useEffect(()=>{b!=null&&b.data&&_(b.data)},[b,_]);const[z,V]=S.useState(!1),U=S.useRef(null),W=Jt(U),q=S.useMemo(()=>n.filter(de=>N[de.dataIndex]!==!0),[n,N]);return S.useEffect(()=>{C(r||!1),y(j||!1)},[j]),S.useEffect(()=>{L(n)},[n]),S.useEffect(()=>{x(l)},[l]),o.jsxs(Ln,{children:[o.jsxs($n,{ref:U,children:[o.jsx(Vn,{noNeedSidebarResponsiveButton:G,hasSelect:j,selectProps:D,exportButton:A,setisSettingPopupVisible:V,CustomFilters:u,tableAdditionalFields:h,createIsModal:f,GridPageTopLeftComponent:a}),i,(O.length>0||w.length>0)&&o.jsx(Jn,{})]}),o.jsx(Mn,{height:`calc(100vh - ${`${W}px`})`,children:k?o.jsx(k,{dataSource:((Z=b==null?void 0:b.data)==null?void 0:Z.items)||[],...R,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],loading:T,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items}}):o.jsx(ma,{noPagination:v,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...q],dataSource:((ce=b==null?void 0:b.data)==null?void 0:ce.items)||[],loading:T,pagination:{current:I.Page,pageSize:I.PageSize,items:c==null?void 0:c.items},activeTableView:P,totalItemCount:((ie=b==null?void 0:b.data)==null?void 0:ie.totalItemCount)||0,onRowClick:s,noDataProps:E||null})}),z&&o.jsx(za,{close:()=>V(!1)})]})},Ma=n=>o.jsx(Cn,{children:o.jsx(Pa,{...n})}),Ha=()=>{const n=ge(v=>v.isOpen),e=ge(v=>v.options),t=ge(v=>v.close),r=X.useLocation();if(S.useEffect(()=>{n&&t()},[r.pathname]),!e||!n)return null;const{title:a,component:i,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:h}=e,f=()=>{h==null||h()},g=()=>{p==null||p()};return o.jsxs(We,{centered:!0,title:a||u?o.jsxs(ar,{children:[o.jsx("span",{children:a}),u&&o.jsx(or,{onClick:t,children:o.jsx(ht,{})})]}):void 0,...l,children:[i&&o.jsx(i,{...s}),!c&&o.jsxs(ir,{children:[o.jsx(Ke,{onClick:f,children:d==null?void 0:d.cancelText}),o.jsx(sr,{onClick:g,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},Ra=({displayAddRuleModal:n,onClose:e,title:t,hideFooter:r=!1,children:a})=>o.jsx(We,{open:n,onCancel:e,closeIcon:!1,title:t,footer:r?null:void 0,destroyOnClose:!0,centered:!0,children:a}),Fa=m.div`
2406
2406
  height: var(--size-800, 4rem);
2407
2407
  display: flex;
2408
2408
  justify-content: space-between;
@@ -2439,16 +2439,16 @@
2439
2439
  display: flex;
2440
2440
  gap: 0.12rem;
2441
2441
  }
2442
- `,No=m.div`
2442
+ `,Na=m.div`
2443
2443
  cursor: pointer;
2444
- `,Vo=m(Wt)`
2444
+ `,Va=m(Yt)`
2445
2445
  width: 10.943px !important;
2446
2446
  height: 8.552px !important;
2447
2447
 
2448
2448
  path {
2449
2449
  fill: var(--color-icon-primary, #131412) !important;
2450
2450
  }
2451
- `,br=m(R.Breadcrumb)`
2451
+ `,wr=m(H.Breadcrumb)`
2452
2452
  font-family: var(--text-font-family-base, Geist);
2453
2453
  font-size: var(--typo-caption-size-medium, 0.875rem);
2454
2454
  font-weight: var(--text-weight-regular, 400);
@@ -2469,20 +2469,20 @@
2469
2469
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
2470
2470
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2471
2471
  }
2472
- `,Ao=({breadcrumbItems:n,logo:e,button:t,className:r,backButton:o=i.jsx(Vo,{})})=>{const a=ne.useNavigate();return i.jsxs(Fo,{className:r||"",children:[i.jsxs("div",{className:"page-starter",children:[e?i.jsx("div",{className:"icon",children:e}):i.jsx(No,{className:"icon",onClick:()=>a(-1),children:o}),i.jsx(br,{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 Bo={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},Go=({confirmationToken:n,updatedResponse:e,mfaType:t=1,id:r,setRefetchData:o,setVisible:a,visible:s})=>{const{confirmTwoFactor:l,resendOTP:d,confirmTwoFactorBackupCode:c}=we(),[u,p]=S.useState(""),[h,f]=S.useState(!0),[g,w]=S.useState(60),{close:O}=ge(),[A,j]=S.useState([]),[L,T]=S.useState(!1);async function V(){var $,v,F;const I=l;if(!(!u||!I))try{const M=await I({confirmationToken:n,code:u,id:r});($=M==null?void 0:M.data)!=null&&$.success&&(a(!1),o&&o(k=>!k),O())}catch(M){const k=ve((F=(v=M==null?void 0:M.response)==null?void 0:v.data)==null?void 0:F.errors);j(k),console.log("Error in Save OTP",M)}}async function G(){const I=d;if(I)try{const $=await I(n,r);$.data.success&&(e($),f(!0),w(60))}catch($){console.log("Error in OTP resend",$)}}function _(){a(!1)}function Y(I){p(I)}return S.useEffect(()=>{if(!h)return;const I=setInterval(()=>{w($=>$<=1?(clearInterval(I),f(!1),0):$-1)},1e3);return()=>clearInterval(I)},[h]),i.jsx(We,{open:s,onCancel:_,footer:[null],children:n?i.jsx(i.Fragment,{children:L?i.jsx(i.Fragment,{children:i.jsx(mr,{setBackupActivated:T,backupCodeEndpoint:c,setVisible:a,id:r,setRefetchData:o,confirmationToken:n})}):i.jsxs(i.Fragment,{children:[i.jsx(Ye,{children:i.jsxs(hr,{children:[te("EnterVerificationCode"),i.jsx(Ie,{children:te(Bo[t])})]})}),i.jsxs(gr,{className:A.length>0?"verification-error":"",children:[i.jsx(R.Input.OTP,{value:u,onChange:Y}),A.map(I=>i.jsxs("span",{children:[i.jsx(xt,{}),I.errors[0]]},I.name)),i.jsxs(Lo,{children:[te("DidnReceiveCode")," ",i.jsx(fr,{onClick:()=>T(!0),children:te("EnterBackupCode")})]})]}),i.jsxs(ur,{children:[t!==rt.TOTP&&i.jsx(Ke,{disabled:h,onClick:G,children:h?`${te("ResendAvailable")} ${g} ${B("Second")}`:`${te("Resend")}`}),i.jsxs(ze,{onClick:V,disabled:(u==null?void 0:u.length)!==6&&t!==rt.TOTP,children:[i.jsxs("span",{children:[" ",ae("Continue")]}),i.jsx(ke,{})]})]})]})}):i.jsx($o,{children:i.jsx(R.Spin,{})})})},Uo=m.div`
2472
+ `,Sr=({breadcrumbItems:n,logo:e,button:t,className:r,backButton:a=o.jsx(Va,{})})=>{const i=X.useNavigate();return o.jsxs(Fa,{className:r||"",children:[o.jsxs("div",{className:"page-starter",children:[e?o.jsx("div",{className:"icon",children:e}):o.jsx(Na,{className:"icon",onClick:()=>i(-1),children:a}),o.jsx(wr,{items:n})]}),o.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=({confirmationToken:n,updatedResponse:e,mfaType:t=1,id:r,setRefetchData:a,setVisible:i,visible:s})=>{const{confirmTwoFactor:l,resendOTP:d,confirmTwoFactorBackupCode:c}=Se(),[u,p]=S.useState(""),[h,f]=S.useState(!0),[g,v]=S.useState(60),{close:E}=ge(),[A,j]=S.useState([]),[D,k]=S.useState(!1);async function R(){var O,w,N;const I=l;if(!(!u||!I))try{const P=await I({confirmationToken:n,code:u,id:r});(O=P==null?void 0:P.data)!=null&&O.success&&(i(!1),a&&a(L=>!L),E())}catch(P){const L=we((N=(w=P==null?void 0:P.response)==null?void 0:w.data)==null?void 0:N.errors);j(L),console.log("Error in Save OTP",P)}}async function G(){const I=d;if(I)try{const O=await I(n,r);O.data.success&&(e(O),f(!0),v(60))}catch(O){console.log("Error in OTP resend",O)}}function _(){i(!1)}function Y(I){p(I)}return S.useEffect(()=>{if(!h)return;const I=setInterval(()=>{v(O=>O<=1?(clearInterval(I),f(!1),0):O-1)},1e3);return()=>clearInterval(I)},[h]),o.jsx(We,{open:s,onCancel:_,footer:[null],children:n?o.jsx(o.Fragment,{children:D?o.jsx(o.Fragment,{children:o.jsx(yr,{setBackupActivated:k,backupCodeEndpoint:c,setVisible:i,id:r,setRefetchData:a,confirmationToken:n})}):o.jsxs(o.Fragment,{children:[o.jsx(Ye,{children:o.jsxs(xr,{children:[re("EnterVerificationCode"),o.jsx(Ie,{children:re(Aa[t])})]})}),o.jsxs(mr,{className:A.length>0?"verification-error":"",children:[o.jsx(H.Input.OTP,{value:u,onChange:Y}),A.map(I=>o.jsxs("span",{children:[o.jsx(yt,{}),I.errors[0]]},I.name)),o.jsxs(La,{children:[re("DidnReceiveCode")," ",o.jsx(hr,{onClick:()=>k(!0),children:re("EnterBackupCode")})]})]}),o.jsxs(gr,{children:[t!==rt.TOTP&&o.jsx(Ke,{disabled:h,onClick:G,children:h?`${re("ResendAvailable")} ${g} ${B("Second")}`:`${re("Resend")}`}),o.jsxs(ze,{onClick:R,disabled:(u==null?void 0:u.length)!==6&&t!==rt.TOTP,children:[o.jsxs("span",{children:[" ",oe("Continue")]}),o.jsx(ke,{})]})]})]})}):o.jsx($a,{children:o.jsx(H.Spin,{})})})},Ga=m.div`
2473
2473
  width: 100%;
2474
2474
  height: 100%;
2475
- `,_o=({option:n})=>(S.useEffect(()=>{const e=document.getElementById("my-chart"),t=Hr.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(Uo,{id:"my-chart"}));m.div`
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]),o.jsx(Ga,{id:"my-chart"}));m.div`
2476
2476
  display: flex;
2477
2477
  justify-content: center;
2478
2478
  align-items: center;
2479
2479
  height: 100vh;
2480
2480
  background-color: ${n=>n.backgroundcolor};
2481
- `;const Wo=m(R.Spin)`
2481
+ `;const _a=m(H.Spin)`
2482
2482
  .ant-spin-dot-item {
2483
2483
  background-color: ${n=>n.backgroundcolor};
2484
2484
  }
2485
- `,Yo=({backgroundcolor:n})=>i.jsx("div",{children:i.jsx(Wo,{size:"large",backgroundcolor:n})}),Ko=m.div`
2485
+ `,Wa=({backgroundcolor:n})=>o.jsx("div",{children:o.jsx(_a,{size:"large",backgroundcolor:n})}),Ya=m.div`
2486
2486
  position: absolute;
2487
2487
  left: 0;
2488
2488
  top: 0;
@@ -2517,7 +2517,7 @@
2517
2517
  font-size: 1.125rem;
2518
2518
  max-width: 25rem;
2519
2519
  }
2520
- `,qo=m.keyframes`
2520
+ `,Ka=m.keyframes`
2521
2521
  0% {
2522
2522
  opacity: 90%;
2523
2523
  }
@@ -2527,21 +2527,21 @@
2527
2527
  100% {
2528
2528
  opacity: 90%;
2529
2529
  }
2530
- `,Pe=m.div`
2530
+ `,Me=m.div`
2531
2531
  background: #282828; /* Dark base color */
2532
2532
  border-radius: 4px;
2533
2533
  background-size: 1000px 100%;
2534
- animation: ${qo} 1.5s infinite linear;
2534
+ animation: ${Ka} 1.5s infinite linear;
2535
2535
  background: var(--color-interaction-press-primary, rgba(20, 20, 20, 0.1));
2536
- `,Zo=m(Pe)`
2536
+ `,qa=m(Me)`
2537
2537
  width: 70%; /* Mimics the main title area */
2538
2538
  height: 20px;
2539
2539
  margin-bottom: 10px;
2540
- `,pe=m(Pe)`
2540
+ `,pe=m(Me)`
2541
2541
  width: ${n=>n.width};
2542
2542
  height: ${n=>n.height};
2543
2543
  margin-bottom: ${n=>n.marginbottom};
2544
- `,Be=m(Pe)`
2544
+ `,Be=m(Me)`
2545
2545
  flex-grow: 1;
2546
2546
  height: 130px;
2547
2547
  margin: 0 1px;
@@ -2562,13 +2562,13 @@
2562
2562
  ${Be}:last-child {
2563
2563
  margin-right: 0;
2564
2564
  }
2565
- `,Jo=m.div`
2565
+ `,Za=m.div`
2566
2566
  padding: 20px;
2567
2567
  overflow-y: hidden;
2568
2568
  height: 100vh;
2569
2569
  position: relative;
2570
2570
  background: var(--color-bg-primary, #fff);
2571
- `,Xo=m.div`
2571
+ `,Ja=m.div`
2572
2572
  display: flex;
2573
2573
  width: fit-content;
2574
2574
  gap: 2rem;
@@ -2576,15 +2576,15 @@
2576
2576
  padding: 0.5rem;
2577
2577
  margin-top: 3rem;
2578
2578
  margin-bottom: 1.5rem;
2579
- `,Qo=m(Pe)`
2579
+ `,Xa=m(Me)`
2580
2580
  width: 4rem;
2581
2581
  height: 1rem;
2582
2582
  border-radius: 5px;
2583
- `,$t=m(Pe)`
2583
+ `,Ot=m(Me)`
2584
2584
  width: ${n=>n.width||"100%"};
2585
2585
  height: 20px;
2586
2586
  margin-bottom: 8px;
2587
- `,ea=m.div`
2587
+ `,Qa=m.div`
2588
2588
  border-radius: 2px;
2589
2589
  background: var(--color-bg-secondary, #232323);
2590
2590
  height: 40rem;
@@ -2592,7 +2592,7 @@
2592
2592
  flex-direction: column;
2593
2593
  padding: 1rem;
2594
2594
  margin-bottom: 2px;
2595
- `,Et=()=>i.jsxs(i.Fragment,{children:[i.jsx($t,{width:"80%"}),i.jsx($t,{width:"60%"})]}),ta=()=>i.jsxs(Jo,{children:[i.jsx(Ko,{children:i.jsxs("div",{children:[i.jsx("h2",{children:bt("ComingSoon")}),i.jsx("p",{children:bt("ComingSoonDesc")})]})}),i.jsx(Zo,{}),i.jsx(pe,{}),i.jsx(Xo,{children:[...Array(7)].map((n,e)=>i.jsx(Qo,{},e))}),i.jsx(Ze,{children:[...Array(5)].map((n,e)=>i.jsx(Be,{children:i.jsx(Et,{})},e))}),i.jsxs(ea,{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(Et,{})},e))})]}),ra=m(R.Table)`
2595
+ `,Tt=()=>o.jsxs(o.Fragment,{children:[o.jsx(Ot,{width:"80%"}),o.jsx(Ot,{width:"60%"})]}),eo=()=>o.jsxs(Za,{children:[o.jsx(Ya,{children:o.jsxs("div",{children:[o.jsx("h2",{children:wt("ComingSoon")}),o.jsx("p",{children:wt("ComingSoonDesc")})]})}),o.jsx(qa,{}),o.jsx(pe,{}),o.jsx(Ja,{children:[...Array(7)].map((n,e)=>o.jsx(Xa,{},e))}),o.jsx(Ze,{children:[...Array(5)].map((n,e)=>o.jsx(Be,{children:o.jsx(Tt,{})},e))}),o.jsxs(Qa,{children:[o.jsx(pe,{width:"20%",height:"18px",marginbottom:"10px"}),o.jsx(pe,{width:"20%",height:"18px",marginbottom:"20px"}),o.jsxs(Ze,{children:[o.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(pe,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"}),o.jsx(pe,{width:"120%",height:"18px",marginbottom:"10"}),o.jsx(pe,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),o.jsx(Ze,{children:[...Array(5)].map((n,e)=>o.jsx(Be,{children:o.jsx(Tt,{})},e))})]}),to=m(H.Table)`
2596
2596
  .ant-table-thead > tr > th {
2597
2597
  background: var(--color-bg-primary, #fff);
2598
2598
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2713,7 +2713,7 @@
2713
2713
  }
2714
2714
  }
2715
2715
  }
2716
- `,na=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"})),oa=({rowKey:n,CustomExpandableRow:e,columns:t,dataTableColumns:r,dataSource:o,expandableRowProps:a,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=S.useState([]),h=t||r;S.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return i.jsx(ra,{rowKey:n||"id",pagination:c,scroll:{x:1500},locale:{emptyText:i.jsx(R.Empty,{description:Fr("NoData")})},loading:d,columns:h,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>i.jsx(e,{...a,record:g}),expandIcon:({expanded:g})=>i.jsx(i.Fragment,{children:g?i.jsx("span",{className:"arrow-svg",children:i.jsx(na,{})}):i.jsx("span",{className:"arrow-svg",children:i.jsx(it,{})})}),expandRowByClick:!0},dataSource:o})},aa=m(R.Tabs)`
2716
+ `,ro=n=>M.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},M.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:i,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=S.useState([]),h=t||r;S.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return o.jsx(to,{rowKey:n||"id",pagination:c,scroll:{x:1500},locale:{emptyText:o.jsx(H.Empty,{description:Vr("NoData")})},loading:d,columns:h,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>o.jsx(e,{...i,record:g}),expandIcon:({expanded:g})=>o.jsx(o.Fragment,{children:g?o.jsx("span",{className:"arrow-svg",children:o.jsx(ro,{})}):o.jsx("span",{className:"arrow-svg",children:o.jsx(it,{})})}),expandRowByClick:!0},dataSource:a})},ao=m(H.Tabs)`
2717
2717
  display: flex;
2718
2718
  gap: var(--spacing-025, 2px);
2719
2719
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2811,23 +2811,23 @@
2811
2811
  display: flex;
2812
2812
  gap: 5px;
2813
2813
  }
2814
- `;const ia=m.div`
2814
+ `;const oo=m.div`
2815
2815
  position: relative;
2816
2816
  @media (min-width: 1080px) {
2817
2817
  .tab-select {
2818
2818
  display: none;
2819
2819
  }
2820
2820
  }
2821
- `,sa=m.div`
2821
+ `,io=m.div`
2822
2822
  position: absolute;
2823
2823
  left: 20px;
2824
2824
  top: 10px;
2825
2825
  z-index: 1000;
2826
- `,H=n=>typeof n=="string",De=()=>{let n,e;const t=new Promise((r,o)=>{n=r,e=o});return t.resolve=n,t.reject=e,t},Ot=n=>n==null?"":String(n),la=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},ca=/###/g,Tt=n=>n&&n.includes("###")?n.replace(ca,"."):n,It=n=>!n||H(n),Oe=(n,e,t)=>{const r=H(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(It(n))return{};const a=Tt(r[o]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++o}return It(n)?{}:{obj:n,k:Tt(r[o])}},zt=(n,e,t)=>{const{obj:r,k:o}=Oe(n,e,Object);if(r!==void 0||e.length===1){r[o]=t;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=Oe(n,s,Object);for(;l.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),l=Oe(n,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},da=(n,e,t,r)=>{const{obj:o,k:a}=Oe(n,e,Object);o[a]=o[a]||[],o[a].push(t)},Ge=(n,e)=>{const{obj:t,k:r}=Oe(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},pa=(n,e,t)=>{const r=Ge(n,t);return r!==void 0?r:Ge(e,t)},vr=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?H(n[r])||n[r]instanceof String||H(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):vr(n[r],e[r],t):n[r]=e[r]);return n},ye=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ua={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fa=n=>H(n)?n.replace(/[&<>"'\/]/g,e=>ua[e]):n;class ga{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 ha=[" ",",","?","!",";"],ma=new ga(20),xa=(n,e,t)=>{e=e||"",t=t||"";const r=ha.filter(s=>!e.includes(s)&&!t.includes(s));if(r.length===0)return!0;const o=ma.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(n);if(!a){const s=n.indexOf(t);s>0&&!o.test(n.substring(0,s))&&(a=!0)}return a},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 o=n;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,l="";for(let d=a;d<r.length;++d)if(d!==a&&(l+=t),l+=r[d],s=o[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<r.length-1)continue;a+=d-a+1;break}o=s}return o},Me=n=>n==null?void 0:n.replace(/_/g,"-"),ya={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||ya,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,o){return o&&!this.debug?null:(H(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 o=this.observers[r].get(t)||0;this.observers[r].set(t,o+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=(...o)=>{t(...o),this.off(e,r)};return this.on(e,r),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let s=0;s<a;s++)o(e,...t)})}}class Mt 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,o={}){var c,u;const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):H(r)&&a?l.push(...r.split(a)):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||!H(r)?d:nt((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],r,a)}addResource(e,t,r,o,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(s?r.split(s):r)),e.includes(".")&&(l=e.split("."),o=t,t=l[1]),this.addNamespaces(t),zt(this.data,l,o),a.silent||this.emit("added",e,t,r,o)}addResources(e,t,r,o={silent:!1}){for(const a in r)(H(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});o.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,o,a,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),o=r,r=t,t=l[1]),this.addNamespaces(t);let d=Ge(this.data,l)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?vr(d,r,a):d={...d,...r},zt(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(o=>t[o]&&Object.keys(t[o]).length>0)}toJSON(){return this.data}}var wr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,o){return n.forEach(a=>{var s;e=((s=this.processors[a])==null?void 0:s.process(e,t,r,o))??e}),e}};const Sr=Symbol("i18next/PATH_KEY");function ba(){const n=[],e=Object.create(null);let t;return e.get=(r,o)=>{var a;return(a=t==null?void 0:t.revoke)==null||a.call(t),o===Sr?n:(n.push(o),t=Proxy.revocable(r,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function je(n,e){const{[Sr]:t}=n(ba()),r=(e==null?void 0:e.keySeparator)??".",o=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&o){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]}${o}${t.slice(1).join(r)}`}return t.join(r)}const Je=n=>!H(n)&&typeof n!="boolean"&&typeof n!="number";class _e extends qe{constructor(e,t={}){super(),la(["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 o=this.resolve(e,r);if((o==null?void 0:o.res)===void 0)return!1;const a=Je(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const s=r&&e.includes(r),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xa(e,r,o);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:H(a)?[a]:a};const c=e.split(r);(r!==o||r===o&&this.options.ns.includes(c[0]))&&(a=c.shift()),e=c.join(o)}return{key:e,namespaces:H(a)?[a]:a}}translate(e,t,r){let o=typeof t=="object"?{...t}:t;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=je(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(M=>typeof M=="function"?je(M,{...this.options,...o}):String(M));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],o),c=d[d.length-1];let u=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=o.lng||this.language,h=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return h?a?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(o)}:l;const f=this.resolve(e,o);let g=f==null?void 0:f.res;const w=(f==null?void 0:f.usedKey)||l,O=(f==null?void 0:f.exactUsedKey)||l,A=["[object Number]","[object Function]","[object RegExp]"],j=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,T=o.count!==void 0&&!H(o.count),V=_e.hasDefaultValue(o),G=T?this.pluralResolver.getSuffix(p,o.count,o):"",_=o.ordinal&&T?this.pluralResolver.getSuffix(p,o.count,{ordinal:!1}):"",Y=T&&!o.ordinal&&o.count===0,I=Y&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${G}`]||o[`defaultValue${_}`]||o.defaultValue;let $=g;L&&!g&&V&&($=I);const v=Je($),F=Object.prototype.toString.apply($);if(L&&$&&v&&!A.includes(F)&&!(H(j)&&Array.isArray($))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,$,{...o,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(f.res=M,f.usedParams=this.getUsedParamsDetails(o),f):M}if(s){const M=Array.isArray($),k=M?[]:{},C=M?O:w;for(const y in $)if(Object.prototype.hasOwnProperty.call($,y)){const x=`${C}${s}${y}`;V&&!g?k[y]=this.translate(x,{...o,defaultValue:Je(I)?I[y]:void 0,joinArrays:!1,ns:d}):k[y]=this.translate(x,{...o,joinArrays:!1,ns:d}),k[y]===x&&(k[y]=$[y])}g=k}}else if(L&&H(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,o,r));else{let M=!1,k=!1;!this.isValidLookup(g)&&V&&(M=!0,g=I),this.isValidLookup(g)||(k=!0,g=l);const y=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&k?void 0:g,x=V&&I!==g&&this.options.updateMissing;if(k||M||x){if(this.logger.log(x?"updateKey":"missingKey",p,c,l,x?I:g),s){const N=this.resolve(l,{...o,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 b=[];const E=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&E&&E[0])for(let N=0;N<E.length;N++)b.push(E[N]);else this.options.saveMissingTo==="all"?b=this.languageUtils.toResolveHierarchy(o.lng||this.language):b.push(o.lng||this.language);const z=(N,U,W)=>{var Z;const q=V&&W!==g?W:y;this.options.missingKeyHandler?this.options.missingKeyHandler(N,c,U,q,x,o):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(N,c,U,q,x,o),this.emit("missingKey",N,c,U,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?b.forEach(N=>{const U=this.pluralResolver.getSuffixes(N,o);Y&&o[`defaultValue${this.options.pluralSeparator}zero`]&&!U.includes(`${this.options.pluralSeparator}zero`)&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(W=>{z([N],l+W,o[`defaultValue${W}`]||I)})}):z(b,l,I))}g=this.extendTranslation(g,e,o,f,r),k&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(k||M)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,M?g:void 0,o))}return a?(f.res=g,f.usedParams=this.getUsedParamsDetails(o),f):g}extendTranslation(e,t,r,o,a){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=H(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 h=r.replace&&!H(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||o.usedLng,r),u){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;p<g&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(a==null?void 0:a[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=H(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(e=wr.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,o,a,s,l;return H(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?je(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(d,t),u=c.key;o=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=t.count!==void 0&&!H(t.count),f=h&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(H(t.context)||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(O=>{var A,j;this.isValidLookup(r)||(l=O,!this.checkedLoadedFor[`${w[0]}-${O}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${w[0]}-${O}`]=!0,this.logger.warn(`key "${o}" for languages "${w.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!!!")),w.forEach(L=>{var G;if(this.isValidLookup(r))return;s=L;const T=[u];if((G=this.i18nFormat)!=null&&G.addLookupKeys)this.i18nFormat.addLookupKeys(T,u,L,O,t);else{let _;h&&(_=this.pluralResolver.getSuffix(L,t.count,t));const Y=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&_.startsWith(I)&&T.push(u+_.replace(I,this.options.pluralSeparator)),T.push(u+_),f&&T.push(u+Y)),g){const $=`${u}${this.options.contextSeparator||"_"}${t.context}`;T.push($),h&&(t.ordinal&&_.startsWith(I)&&T.push($+_.replace(I,this.options.pluralSeparator)),T.push($+_),f&&T.push($+Y))}}let V;for(;V=T.pop();)this.isValidLookup(r)||(a=V,r=this.getResource(L,O,V,t))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r,o={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,o):this.resourceStore.getResource(e,t,r,o)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!H(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of t)delete o[a]}return o}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 Pt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=le.create("languageUtils")}getScriptPartFromCode(e){if(e=Me(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=Me(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(H(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 o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(t=o)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return t=o;const a=this.getLanguagePartFromCode(r);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)),H(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),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return H(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))):H(e)&&a(this.formatLanguageCode(e)),r.forEach(s=>{o.includes(s)||a(this.formatLanguageCode(s))}),o}}const Ht={zero:0,one:1,two:2,few:3,many:4,other:5},Rt={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class va{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=le.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=Me(e==="dev"?"en":e),o=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Rt;if(!e.match(/-|_/))return Rt;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[a]=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(o=>`${t}${o}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>Ht[o]-Ht[a]).map(o=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,t,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Ft=(n,e,t,r=".",o=!0)=>{let a=pa(n,e,t);return!a&&o&&H(t)&&(a=nt(n,t,r),a===void 0&&(a=nt(e,t,r))),a},Xe=n=>n.replace(/\$/g,"$$$$");class Nt{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:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:O,maxReplaces:A,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:fa,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?ye(a):s||"{{",this.suffix=l?ye(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?ye(h):f||ye("$t("),this.nestingSuffix=g?ye(g):w||ye(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=A||1e3,this.alwaysFormat=j!==void 0?j:!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,o){var f;let a,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Ft(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,r,{...o,...t,interpolationkey:g}):j}const w=g.split(this.formatSeparator),O=w.shift().trim(),A=w.join(this.formatSeparator).trim();return this.format(Ft(t,d,O,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...o,...t,interpolationkey:O})};this.resetRegExp();const u=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((f=o==null?void 0:o.interpolation)==null?void 0:f.skipOnVariables)!==void 0?o.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;a=g.regex.exec(e);){const w=a[1].trim();if(s=c(w),s===void 0)if(typeof u=="function"){const A=u(e,a,o);s=H(A)?A:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(p){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),s="";else!H(s)&&!this.useRawValueToEscape&&(s=Ot(s));const O=g.safeValue(s);if(e=e.replace(a[0],O),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,r={}){let o,a,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${ye(u)}[ ]*{`));let h=`{${p[1]}`;d=p[0],h=this.interpolate(h,s);const f=h.match(/'/g),g=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,w),`${d}${u}${h}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;o=this.nestingRegexp.exec(e);){let d=[];s={...r},s=s.replace&&!H(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(c!==-1&&(d=o[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),o[1]=o[1].slice(0,c)),a=t(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&!H(a))return a;H(a)||(a=Ot(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const wa=n=>{let e=n.toLowerCase().trim();const t={};if(n.includes("(")){const r=n.split("(");e=r[0].toLowerCase().trim();const o=r[1].slice(0,-1);e==="currency"&&!o.includes(":")?t.currency||(t.currency=o.trim()):e==="relativetime"&&!o.includes(":")?t.range||(t.range=o.trim()):o.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}},Vt=n=>{const e={};return(t,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const s=r+JSON.stringify(a);let l=e[s];return l||(l=n(Me(r),o),e[s]=l),l(t)}},Sa=n=>(e,t,r)=>n(Me(t),r)(e);class Ca{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?Vt:Sa;this.formats={number:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a});return l=>s.format(l)}),currency:r((o,a)=>{const s=new Intl.NumberFormat(o,{...a,style:"currency"});return l=>s.format(l)}),datetime:r((o,a)=>{const s=new Intl.DateTimeFormat(o,{...a});return l=>s.format(l)}),relativetime:r((o,a)=>{const s=new Intl.RelativeTimeFormat(o,{...a});return l=>s.format(l,a.range||"day")}),list:r((o,a)=>{const s=new Intl.ListFormat(o,{...a});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Vt(t)}format(e,t,r,o={}){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}=wa(d);if(this.formats[c]){let h=l;try{const f=((p=o==null?void 0:o.formatParams)==null?void 0:p[o.interpolationkey])||{},g=f.locale||f.lng||o.locale||o.lng||r;h=this.formats[c](l,g,{...u,...o,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const ja=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class ka extends qe{constructor(e,t,r,o={}){var a,s;super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=le.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(s=(a=this.backend)==null?void 0:a.init)==null||s.call(a,r,o.backend,o)}queueLoad(e,t,r,o){const a={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const h=`${c}|${p}`;!r.reload&&this.store.hasResourceBundle(c,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,u=!1,s[h]===void 0&&(s[h]=!0),a[h]===void 0&&(a[h]=!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:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const o=e.split("|"),a=o[0],s=o[1];t&&this.emit("failedLoading",a,s,t),!t&&r&&this.store.addResourceBundle(a,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=>{da(d.loaded,[a],s),ja(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,o=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,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&&o<this.maxRetries){setTimeout(()=>{this.read(e,t,r,o+1,a*2,s)},a);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={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();H(e)&&(e=this.languageUtils.toResolveHierarchy(e)),H(t)&&(t=[t]);const a=this.queueLoad(e,t,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.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("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${o} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${o}`,l),this.loaded(e,s,l)})}saveMissing(e,t,r,o,a,s={},l=()=>{}){var d,c,u,p,h;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((h=this.backend)!=null&&h.create){const f={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let w;g.length===5?w=g(e,t,r,o,f):w=g(e,t,r,o),w&&typeof w.then=="function"?w.then(O=>l(null,O)).catch(l):l(null,w)}catch(w){l(w)}else g(e,t,r,o,l,f)}!e||!e[0]||this.store.addResource(e[0],t,r,o)}}}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]),H(n[1])&&(e.defaultValue=n[1]),H(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}),At=n=>(H(n.ns)&&(n.ns=[n.ns]),H(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),H(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&!n.supportedLngs.includes("cimode")&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),Ne=()=>{},La=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=At(e),this.services={},this.logger=le,this.modules={external:[]},La(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&&(H(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Qe();this.options={...r,...this.options,...At(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 o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?le.init(o(this.modules.logger),this.options):le.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Ca;const u=new Pt(this.options);this.store=new Mt(this.options.resources,this.options);const p=this.services;p.logger=le,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new va(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=o(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Nt(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ka(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new _e(this.services,this.options),this.translator.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.external.forEach(h=>{h.init&&h.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 a,s;let r=t;const o=H(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.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))})};o?d(o):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),r(c)})}else r(null)}reloadResources(e,t,r){const o=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,a=>{o.resolve(),r(a)}),o}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"&&wr.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 o=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&&(o(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=H(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(H(l)?[l]:l);c&&(this.language||o(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,h=>{a(h,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 o=(a,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([a,s].concat(l)):d={...s},d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs,d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||o.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=je(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(a)?p=a.map(h=>(typeof h=="function"&&(h=je(h,c)),`${d.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=je(a,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${a}`:a),this.t(p,d)};return H(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}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],o=this.options?this.options.fallbackLng:!1,a=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)&&(!o||s(a,e)))}loadNamespaces(e,t){const r=De();return this.options.ns?(H(e)&&(e=[e]),e.forEach(o=>{this.options.ns.includes(o)||this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=De();H(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>!o.includes(s)&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}dir(e){var o,a;if(e||(e=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.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=((a=this.services)==null?void 0:a.languageUtils)||new Pt(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 o={...this.options,...e,isClone:!0},a=new Te(o);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)},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),{});a.store=new Mt(l,o),a.services.resourceStore=a.store}if(e.interpolation){const d={...Qe().interpolation,...this.options.interpolation,...e.interpolation},c={...o,interpolation:d};a.services.interpolator=new Nt(c)}return a.translator=new _e(a.services,o),a.translator.on("*",(l,...d)=>{a.emit(l,...d)}),a.init(o,t),a.translator.options=o,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 X=Te.createInstance();X.createInstance;X.dir;X.init;X.loadResources;X.reloadResources;X.use;X.changeLanguage;X.getFixedT;X.t;X.exists;X.setDefaultNamespace;X.hasLoadedNamespace;X.loadNamespaces;X.loadLanguages;X.use(zr).use(Ir).use(Gt.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 Da(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ve={exports:{}},$a=Ve.exports,Bt;function Ea(){return Bt||(Bt=1,(function(n,e){(function(t,r){n.exports=r()})($a,(function(){var t=1e3,r=6e4,o=36e5,a="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",h="quarter",f="year",g="date",w="Invalid Date",O=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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(k){var C=["th","st","nd","rd"],y=k%100;return"["+k+(C[(y-20)%10]||C[y]||C[0])+"]"}},L=function(k,C,y){var x=String(k);return!x||x.length>=C?k:""+Array(C+1-x.length).join(y)+k},T={s:L,z:function(k){var C=-k.utcOffset(),y=Math.abs(C),x=Math.floor(y/60),b=y%60;return(C<=0?"+":"-")+L(x,2,"0")+":"+L(b,2,"0")},m:function k(C,y){if(C.date()<y.date())return-k(y,C);var x=12*(y.year()-C.year())+(y.month()-C.month()),b=C.clone().add(x,p),E=y-b<0,z=C.clone().add(x+(E?-1:1),p);return+(-(x+(y-b)/(E?b-z:z-b))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:p,y:f,w:u,d:c,D:g,h:d,m:l,s,ms:a,Q:h}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},V="en",G={};G[V]=j;var _="$isDayjsObject",Y=function(k){return k instanceof F||!(!k||!k[_])},I=function k(C,y,x){var b;if(!C)return V;if(typeof C=="string"){var E=C.toLowerCase();G[E]&&(b=E),y&&(G[E]=y,b=E);var z=C.split("-");if(!b&&z.length>1)return k(z[0])}else{var N=C.name;G[N]=C,b=N}return!x&&b&&(V=b),b||!x&&V},$=function(k,C){if(Y(k))return k.clone();var y=typeof C=="object"?C:{};return y.date=k,y.args=arguments,new F(y)},v=T;v.l=I,v.i=Y,v.w=function(k,C){return $(k,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var F=(function(){function k(y){this.$L=I(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[_]=!0}var C=k.prototype;return C.parse=function(y){this.$d=(function(x){var b=x.date,E=x.utc;if(b===null)return new Date(NaN);if(v.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var z=b.match(O);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return E?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(b)})(y),this.init()},C.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},C.$utils=function(){return v},C.isValid=function(){return this.$d.toString()!==w},C.isSame=function(y,x){var b=$(y);return this.startOf(x)<=b&&b<=this.endOf(x)},C.isAfter=function(y,x){return $(y)<this.startOf(x)},C.isBefore=function(y,x){return this.endOf(x)<$(y)},C.$g=function(y,x,b){return v.u(y)?this[x]:this.set(b,y)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(y,x){var b=this,E=!!v.u(x)||x,z=v.p(y),N=function(de,re){var me=v.w(b.$u?Date.UTC(b.$y,re,de):new Date(b.$y,re,de),b);return E?me:me.endOf(c)},U=function(de,re){return v.w(b.toDate()[de].apply(b.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(re)),b)},W=this.$W,q=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(z){case f:return E?N(1,0):N(31,11);case p:return E?N(1,q):N(0,q+1);case u:var ie=this.$locale().weekStart||0,K=(W<ie?W+7:W)-ie;return N(E?Z-K:Z+(6-K),q);case c:case g:return U(ce+"Hours",0);case d:return U(ce+"Minutes",1);case l:return U(ce+"Seconds",2);case s:return U(ce+"Milliseconds",3);default:return this.clone()}},C.endOf=function(y){return this.startOf(y,!1)},C.$set=function(y,x){var b,E=v.p(y),z="set"+(this.$u?"UTC":""),N=(b={},b[c]=z+"Date",b[g]=z+"Date",b[p]=z+"Month",b[f]=z+"FullYear",b[d]=z+"Hours",b[l]=z+"Minutes",b[s]=z+"Seconds",b[a]=z+"Milliseconds",b)[E],U=E===c?this.$D+(x-this.$W):x;if(E===p||E===f){var W=this.clone().set(g,1);W.$d[N](U),W.init(),this.$d=W.set(g,Math.min(this.$D,W.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},C.set=function(y,x){return this.clone().$set(y,x)},C.get=function(y){return this[v.p(y)]()},C.add=function(y,x){var b,E=this;y=Number(y);var z=v.p(x),N=function(q){var Z=$(E);return v.w(Z.date(Z.date()+Math.round(q*y)),E)};if(z===p)return this.set(p,this.$M+y);if(z===f)return this.set(f,this.$y+y);if(z===c)return N(1);if(z===u)return N(7);var U=(b={},b[l]=r,b[d]=o,b[s]=t,b)[z]||1,W=this.$d.getTime()+y*U;return v.w(W,this)},C.subtract=function(y,x){return this.add(-1*y,x)},C.format=function(y){var x=this,b=this.$locale();if(!this.isValid())return b.invalidDate||w;var E=y||"YYYY-MM-DDTHH:mm:ssZ",z=v.z(this),N=this.$H,U=this.$m,W=this.$M,q=b.weekdays,Z=b.months,ce=b.meridiem,ie=function(re,me,Le,He){return re&&(re[me]||re(x,E))||Le[me].slice(0,He)},K=function(re){return v.s(N%12||12,re,"0")},de=ce||function(re,me,Le){var He=re<12?"AM":"PM";return Le?He.toLowerCase():He};return E.replace(A,(function(re,me){return me||(function(Le){switch(Le){case"YY":return String(x.$y).slice(-2);case"YYYY":return v.s(x.$y,4,"0");case"M":return W+1;case"MM":return v.s(W+1,2,"0");case"MMM":return ie(b.monthsShort,W,Z,3);case"MMMM":return ie(Z,W);case"D":return x.$D;case"DD":return v.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return ie(b.weekdaysMin,x.$W,q,2);case"ddd":return ie(b.weekdaysShort,x.$W,q,3);case"dddd":return q[x.$W];case"H":return String(N);case"HH":return v.s(N,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return de(N,U,!0);case"A":return de(N,U,!1);case"m":return String(U);case"mm":return v.s(U,2,"0");case"s":return String(x.$s);case"ss":return v.s(x.$s,2,"0");case"SSS":return v.s(x.$ms,3,"0");case"Z":return z}return null})(re)||z.replace(":","")}))},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(y,x,b){var E,z=this,N=v.p(x),U=$(y),W=(U.utcOffset()-this.utcOffset())*r,q=this-U,Z=function(){return v.m(z,U)};switch(N){case f:E=Z()/12;break;case p:E=Z();break;case h:E=Z()/3;break;case u:E=(q-W)/6048e5;break;case c:E=(q-W)/864e5;break;case d:E=q/o;break;case l:E=q/r;break;case s:E=q/t;break;default:E=q}return b?E:v.a(E)},C.daysInMonth=function(){return this.endOf(p).$D},C.$locale=function(){return G[this.$L]},C.locale=function(y,x){if(!y)return this.$L;var b=this.clone(),E=I(y,x,!0);return E&&(b.$L=E),b},C.clone=function(){return v.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},k})(),M=F.prototype;return $.prototype=M,[["$ms",a],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(k){M[k[1]]=function(C){return this.$g(C,k[0],k[1])}})),$.extend=function(k,C){return k.$i||(k(C,F,$),k.$i=!0),$},$.locale=I,$.isDayjs=Y,$.unix=function(k){return $(1e3*k)},$.en=G[V],$.Ls=G,$.p={},$}))})(Ve)),Ve.exports}var Oa=Ea();const Cr=Da(Oa),Ta=({setDateFilter:n,setShowRange:e,setDates:t})=>{const r=s=>s&&s>Cr().endOf("day"),o=s=>{if(s&&s[0]&&s[1]){const l=ee.toISODateString(s[0].toDate()),d=ee.toISODateString(s[1].toDate());t([l,d]),n(c=>({...c,startDate:l,endDate:d})),e(!1)}},a={lang:{locale:X.language,shortMonths:[oe("0"),oe("1"),oe("2"),oe("3"),oe("4"),oe("5"),oe("6"),oe("7"),oe("8"),oe("9"),oe("10"),oe("11")],shortWeekDays:[xe("Sun"),xe("Mon"),xe("Tue"),xe("Wed"),xe("Thu"),xe("Fri"),xe("Sat")]}};return i.jsx(Jt,{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=>o(s),disabledDate:r})},Ia=m(R.Empty)`
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},It=n=>n==null?"":String(n),so=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},lo=/###/g,zt=n=>n&&n.includes("###")?n.replace(lo,"."):n,Pt=n=>!n||F(n),Oe=(n,e,t)=>{const r=F(e)?e.split("."):e;let a=0;for(;a<r.length-1;){if(Pt(n))return{};const i=zt(r[a]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++a}return Pt(n)?{}:{obj:n,k:zt(r[a])}},Mt=(n,e,t)=>{const{obj:r,k:a}=Oe(n,e,Object);if(r!==void 0||e.length===1){r[a]=t;return}let i=e[e.length-1],s=e.slice(0,e.length-1),l=Oe(n,s,Object);for(;l.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),l=Oe(n,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${i}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${i}`]=t},co=(n,e,t,r)=>{const{obj:a,k:i}=Oe(n,e,Object);a[i]=a[i]||[],a[i].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},be=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 ho=[" ",",","?","!",";"],mo=new go(20),xo=(n,e,t)=>{e=e||"",t=t||"";const r=ho.filter(s=>!e.includes(s)&&!t.includes(s));if(r.length===0)return!0;const a=mo.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!a.test(n);if(!i){const s=n.indexOf(t);s>0&&!a.test(n.substring(0,s))&&(i=!0)}return i},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 i=0;i<r.length;){if(!a||typeof a!="object")return;let s,l="";for(let d=i;d<r.length;++d)if(d!==i&&(l+=t),l+=r[d],s=a[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<r.length-1)continue;i+=d-i+1;break}a=s}return a},Pe=n=>n==null?void 0:n.replace(/_/g,"-"),yo={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||yo,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,i])=>{for(let s=0;s<i;s++)a(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,i])=>{for(let s=0;s<i;s++)a(e,...t)})}}class Ht 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 i=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)&&i?l.push(...r.split(i)):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,i)}addResource(e,t,r,a,i={silent:!1}){const s=i.keySeparator!==void 0?i.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),Mt(this.data,l,a),i.silent||this.emit("added",e,t,r,a)}addResources(e,t,r,a={silent:!1}){for(const i in r)(F(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});a.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,a,i,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,i):d={...d,...r},Mt(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(i=>{var s;e=((s=this.processors[i])==null?void 0:s.process(e,t,r,a))??e}),e}};const kr=Symbol("i18next/PATH_KEY");function bo(){const n=[],e=Object.create(null);let t;return e.get=(r,a)=>{var i;return(i=t==null?void 0:t.revoke)==null||i.call(t),a===kr?n:(n.push(a),t=Proxy.revocable(r,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function je(n,e){const{[kr]:t}=n(bo()),r=(e==null?void 0:e.keySeparator)??".",a=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&a){const i=e==null?void 0:e.ns,s=Array.isArray(i)?i: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 i=Je(a.res);return!(r.returnObjects===!1&&i)}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 i=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(i)?[i]:i};const c=e.split(r);(r!==a||r===a&&this.options.ns.includes(c[0]))&&(i=c.shift()),e=c.join(a)}return{key:e,namespaces:F(i)?[i]:i}}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=je(e,{...this.options,...a})),Array.isArray(e)||(e=[String(e)]),e=e.map(P=>typeof P=="function"?je(P,{...this.options,...a}):String(P));const i=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,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return h?i?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${u}${l}`:i?{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 v=(f==null?void 0:f.usedKey)||l,E=(f==null?void 0:f.exactUsedKey)||l,A=["[object Number]","[object Function]","[object RegExp]"],j=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,k=a.count!==void 0&&!F(a.count),R=_e.hasDefaultValue(a),G=k?this.pluralResolver.getSuffix(p,a.count,a):"",_=a.ordinal&&k?this.pluralResolver.getSuffix(p,a.count,{ordinal:!1}):"",Y=k&&!a.ordinal&&a.count===0,I=Y&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${G}`]||a[`defaultValue${_}`]||a.defaultValue;let O=g;D&&!g&&R&&(O=I);const w=Je(O),N=Object.prototype.toString.apply(O);if(D&&O&&w&&!A.includes(N)&&!(F(j)&&Array.isArray(O))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,O,{...a,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return i?(f.res=P,f.usedParams=this.getUsedParamsDetails(a),f):P}if(s){const P=Array.isArray(O),L=P?[]:{},C=P?E:v;for(const y in O)if(Object.prototype.hasOwnProperty.call(O,y)){const x=`${C}${s}${y}`;R&&!g?L[y]=this.translate(x,{...a,defaultValue:Je(I)?I[y]:void 0,joinArrays:!1,ns:d}):L[y]=this.translate(x,{...a,joinArrays:!1,ns:d}),L[y]===x&&(L[y]=O[y])}g=L}}else if(D&&F(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,a,r));else{let P=!1,L=!1;!this.isValidLookup(g)&&R&&(P=!0,g=I),this.isValidLookup(g)||(L=!0,g=l);const y=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:g,x=R&&I!==g&&this.options.updateMissing;if(L||P||x){if(this.logger.log(x?"updateKey":"missingKey",p,c,l,x?I:g),s){const V=this.resolve(l,{...a,keySeparator:!1});V&&V.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 b=[];const T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&T&&T[0])for(let V=0;V<T.length;V++)b.push(T[V]);else this.options.saveMissingTo==="all"?b=this.languageUtils.toResolveHierarchy(a.lng||this.language):b.push(a.lng||this.language);const z=(V,U,W)=>{var Z;const q=R&&W!==g?W:y;this.options.missingKeyHandler?this.options.missingKeyHandler(V,c,U,q,x,a):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(V,c,U,q,x,a),this.emit("missingKey",V,c,U,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?b.forEach(V=>{const U=this.pluralResolver.getSuffixes(V,a);Y&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!U.includes(`${this.options.pluralSeparator}zero`)&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(W=>{z([V],l+W,a[`defaultValue${W}`]||I)})}):z(b,l,I))}g=this.extendTranslation(g,e,a,f,r),L&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(L||P)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,P?g:void 0,a))}return i?(f.res=g,f.usedParams=this.getUsedParamsDetails(a),f):g}extendTranslation(e,t,r,a,i){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 h=r.replace&&!F(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,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)=>(i==null?void 0:i[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,i,s,l;return F(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?je(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 h=t.count!==void 0&&!F(t.count),f=h&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(F(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(E=>{var A,j;this.isValidLookup(r)||(l=E,!this.checkedLoadedFor[`${v[0]}-${E}`]&&((A=this.utils)!=null&&A.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${v[0]}-${E}`]=!0,this.logger.warn(`key "${a}" 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(D=>{var G;if(this.isValidLookup(r))return;s=D;const k=[u];if((G=this.i18nFormat)!=null&&G.addLookupKeys)this.i18nFormat.addLookupKeys(k,u,D,E,t);else{let _;h&&(_=this.pluralResolver.getSuffix(D,t.count,t));const Y=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&_.startsWith(I)&&k.push(u+_.replace(I,this.options.pluralSeparator)),k.push(u+_),f&&k.push(u+Y)),g){const O=`${u}${this.options.contextSeparator||"_"}${t.context}`;k.push(O),h&&(t.ordinal&&_.startsWith(I)&&k.push(O+_.replace(I,this.options.pluralSeparator)),k.push(O+_),f&&k.push(O+Y))}}let R;for(;R=k.pop();)this.isValidLookup(r)||(i=R,r=this.getResource(D,E,R,t))}))})}),{res:r,usedKey:a,exactUsedKey:i,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 i;return(i=this.i18nFormat)!=null&&i.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 i of t)delete a[i]}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 Rt{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 i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>s===i?!0:!s.includes("-")&&!i.includes("-")?!1:!!(s.includes("-")&&!i.includes("-")&&s.slice(0,s.indexOf("-"))===i||s.startsWith(i)&&i.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=[],i=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"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):F(e)&&i(this.formatLanguageCode(e)),r.forEach(s=>{a.includes(s)||i(this.formatLanguageCode(s))}),a}}const Ft={zero:0,one:1,two:2,few:3,many:4,other:5},Nt={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",i=JSON.stringify({cleanedCode:r,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];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!"),Nt;if(!e.match(/-|_/))return Nt;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[i]=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,i)=>Ft[a]-Ft[i]).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 Vt=(n,e,t,r=".",a=!0)=>{let i=po(n,e,t);return!i&&a&&F(t)&&(i=nt(n,t,r),i===void 0&&(i=nt(e,t,r))),i},Xe=n=>n.replace(/\$/g,"$$$$");class At{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:i,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:E,maxReplaces:A,alwaysFormat:j}=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=i?be(i):s||"{{",this.suffix=l?be(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?be(h):f||be("$t("),this.nestingSuffix=g?be(g):v||be(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=A||1e3,this.alwaysFormat=j!==void 0?j:!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 i,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Vt(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,r,{...a,...t,interpolationkey:g}):j}const v=g.split(this.formatSeparator),E=v.shift().trim(),A=v.join(this.formatSeparator).trim();return this.format(Vt(t,d,E,this.options.keySeparator,this.options.ignoreJSONStructure),A,r,{...a,...t,interpolationkey:E})};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;i=g.regex.exec(e);){const v=i[1].trim();if(s=c(v),s===void 0)if(typeof u=="function"){const A=u(e,i,a);s=F(A)?A:""}else if(a&&Object.prototype.hasOwnProperty.call(a,v))s="";else if(p){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),s="";else!F(s)&&!this.useRawValueToEscape&&(s=It(s));const E=g.safeValue(s);if(e=e.replace(i[0],E),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=i[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,r={}){let a,i,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${be(u)}[ ]*{`));let h=`{${p[1]}`;d=p[0],h=this.interpolate(h,s);const f=h.match(/'/g),g=h.match(/"/g);(((f==null?void 0:f.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,v),`${d}${u}${h}`}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)),i=t(l.call(this,a[1].trim(),s),s),i&&a[0]===e&&!F(i))return i;F(i)||(i=It(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),i=""),d.length&&(i=d.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:a[1].trim()}),i.trim())),e=e.replace(a[0],i),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}},Bt=n=>{const e={};return(t,r,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});const s=r+JSON.stringify(i);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?Bt:So;this.formats={number:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i});return l=>s.format(l)}),currency:r((a,i)=>{const s=new Intl.NumberFormat(a,{...i,style:"currency"});return l=>s.format(l)}),datetime:r((a,i)=>{const s=new Intl.DateTimeFormat(a,{...i});return l=>s.format(l)}),relativetime:r((a,i)=>{const s=new Intl.RelativeTimeFormat(a,{...i});return l=>s.format(l,i.range||"day")}),list:r((a,i)=>{const s=new Intl.ListFormat(a,{...i});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Bt(t)}format(e,t,r,a={}){if(!t||e==null)return e;const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&!i[0].includes(")")&&i.find(l=>l.includes(")"))){const l=i.findIndex(d=>d.includes(")"));i[0]=[i[0],...i.splice(1,l)].join(this.formatSeparator)}return i.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=wo(d);if(this.formats[c]){let h=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;h=this.formats[c](l,g,{...u,...a,...f})}catch(f){this.logger.warn(f)}return h}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 i,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=(i=this.backend)==null?void 0:i.init)==null||s.call(i,r,a.backend,a)}queueLoad(e,t,r,a){const i={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const h=`${c}|${p}`;!r.reload&&this.store.hasResourceBundle(c,p)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,u=!1,s[h]===void 0&&(s[h]=!0),i[h]===void 0&&(i[h]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const a=e.split("|"),i=a[0],s=a[1];t&&this.emit("failedLoading",i,s,t),!t&&r&&this.store.addResourceBundle(i,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,[i],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,i=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:i,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,i*2,s)},i);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 i=this.queueLoad(e,t,r,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.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],i=r[1];this.read(a,i,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${i} for language ${a} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${i} for language ${a}`,l),this.loaded(e,s,l)})}saveMissing(e,t,r,a,i,s={},l=()=>{}){var d,c,u,p,h;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((h=this.backend)!=null&&h.create){const f={...s,isUpdate:i},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(e,t,r,a,f):v=g(e,t,r,a),v&&typeof v.then=="function"?v.then(E=>l(null,E)).catch(l):l(null,v)}catch(v){l(v)}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}),Gt=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=Gt(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,...Gt(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 Rt(this.options);this.store=new Ht(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 At(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("*",(h,...f)=>{this.emit(h,...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("*",(h,...f)=>{this.emit(h,...f)}),this.modules.external.forEach(h=>{h.init&&h.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 i,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=(i=this.options.preload)==null?void 0:i.forEach)==null||s.call(i,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,i=>{a.resolve(),r(i)}),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)},i=(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,h=>{i(h,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=(i,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([i,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=je(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(i)?p=i.map(h=>(typeof h=="function"&&(h=je(h,c)),`${d.keyPrefix}${u}${h}`)):(typeof i=="function"&&(i=je(i,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${i}`:i),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,i=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(i,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||[],i=e.filter(s=>!a.includes(s)&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}dir(e){var a,i;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=((i=this.services)==null?void 0:i.languageUtils)||new Rt(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},i=new Te(a);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(l=>{i[l]=this[l]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},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),{});i.store=new Ht(l,a),i.services.resourceStore=i.store}if(e.interpolation){const d={...Qe().interpolation,...this.options.interpolation,...e.interpolation},c={...a,interpolation:d};i.services.interpolator=new At(c)}return i.translator=new _e(i.services,a),i.translator.on("*",(l,...d)=>{i.emit(l,...d)}),i.init(a,t),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}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(_t.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,Ut;function Eo(){return Ut||(Ut=1,(function(n,e){(function(t,r){n.exports=r()})($o,(function(){var t=1e3,r=6e4,a=36e5,i="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",h="quarter",f="year",g="date",v="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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(L){var C=["th","st","nd","rd"],y=L%100;return"["+L+(C[(y-20)%10]||C[y]||C[0])+"]"}},D=function(L,C,y){var x=String(L);return!x||x.length>=C?L:""+Array(C+1-x.length).join(y)+L},k={s:D,z:function(L){var C=-L.utcOffset(),y=Math.abs(C),x=Math.floor(y/60),b=y%60;return(C<=0?"+":"-")+D(x,2,"0")+":"+D(b,2,"0")},m:function L(C,y){if(C.date()<y.date())return-L(y,C);var x=12*(y.year()-C.year())+(y.month()-C.month()),b=C.clone().add(x,p),T=y-b<0,z=C.clone().add(x+(T?-1:1),p);return+(-(x+(y-b)/(T?b-z:z-b))||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:i,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},R="en",G={};G[R]=j;var _="$isDayjsObject",Y=function(L){return L instanceof N||!(!L||!L[_])},I=function L(C,y,x){var b;if(!C)return R;if(typeof C=="string"){var T=C.toLowerCase();G[T]&&(b=T),y&&(G[T]=y,b=T);var z=C.split("-");if(!b&&z.length>1)return L(z[0])}else{var V=C.name;G[V]=C,b=V}return!x&&b&&(R=b),b||!x&&R},O=function(L,C){if(Y(L))return L.clone();var y=typeof C=="object"?C:{};return y.date=L,y.args=arguments,new N(y)},w=k;w.l=I,w.i=Y,w.w=function(L,C){return O(L,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var N=(function(){function L(y){this.$L=I(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[_]=!0}var C=L.prototype;return C.parse=function(y){this.$d=(function(x){var b=x.date,T=x.utc;if(b===null)return new Date(NaN);if(w.u(b))return new Date;if(b instanceof Date)return new Date(b);if(typeof b=="string"&&!/Z$/i.test(b)){var z=b.match(E);if(z){var V=z[2]-1||0,U=(z[7]||"0").substring(0,3);return T?new Date(Date.UTC(z[1],V,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],V,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(b)})(y),this.init()},C.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},C.$utils=function(){return w},C.isValid=function(){return this.$d.toString()!==v},C.isSame=function(y,x){var b=O(y);return this.startOf(x)<=b&&b<=this.endOf(x)},C.isAfter=function(y,x){return O(y)<this.startOf(x)},C.isBefore=function(y,x){return this.endOf(x)<O(y)},C.$g=function(y,x,b){return w.u(y)?this[x]:this.set(b,y)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(y,x){var b=this,T=!!w.u(x)||x,z=w.p(y),V=function(de,ne){var me=w.w(b.$u?Date.UTC(b.$y,ne,de):new Date(b.$y,ne,de),b);return T?me:me.endOf(c)},U=function(de,ne){return w.w(b.toDate()[de].apply(b.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(ne)),b)},W=this.$W,q=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(z){case f:return T?V(1,0):V(31,11);case p:return T?V(1,q):V(0,q+1);case u:var ie=this.$locale().weekStart||0,K=(W<ie?W+7:W)-ie;return V(T?Z-K:Z+(6-K),q);case c:case g:return U(ce+"Hours",0);case d:return U(ce+"Minutes",1);case l:return U(ce+"Seconds",2);case s:return U(ce+"Milliseconds",3);default:return this.clone()}},C.endOf=function(y){return this.startOf(y,!1)},C.$set=function(y,x){var b,T=w.p(y),z="set"+(this.$u?"UTC":""),V=(b={},b[c]=z+"Date",b[g]=z+"Date",b[p]=z+"Month",b[f]=z+"FullYear",b[d]=z+"Hours",b[l]=z+"Minutes",b[s]=z+"Seconds",b[i]=z+"Milliseconds",b)[T],U=T===c?this.$D+(x-this.$W):x;if(T===p||T===f){var W=this.clone().set(g,1);W.$d[V](U),W.init(),this.$d=W.set(g,Math.min(this.$D,W.daysInMonth())).$d}else V&&this.$d[V](U);return this.init(),this},C.set=function(y,x){return this.clone().$set(y,x)},C.get=function(y){return this[w.p(y)]()},C.add=function(y,x){var b,T=this;y=Number(y);var z=w.p(x),V=function(q){var Z=O(T);return w.w(Z.date(Z.date()+Math.round(q*y)),T)};if(z===p)return this.set(p,this.$M+y);if(z===f)return this.set(f,this.$y+y);if(z===c)return V(1);if(z===u)return V(7);var U=(b={},b[l]=r,b[d]=a,b[s]=t,b)[z]||1,W=this.$d.getTime()+y*U;return w.w(W,this)},C.subtract=function(y,x){return this.add(-1*y,x)},C.format=function(y){var x=this,b=this.$locale();if(!this.isValid())return b.invalidDate||v;var T=y||"YYYY-MM-DDTHH:mm:ssZ",z=w.z(this),V=this.$H,U=this.$m,W=this.$M,q=b.weekdays,Z=b.months,ce=b.meridiem,ie=function(ne,me,Le,He){return ne&&(ne[me]||ne(x,T))||Le[me].slice(0,He)},K=function(ne){return w.s(V%12||12,ne,"0")},de=ce||function(ne,me,Le){var He=ne<12?"AM":"PM";return Le?He.toLowerCase():He};return T.replace(A,(function(ne,me){return me||(function(Le){switch(Le){case"YY":return String(x.$y).slice(-2);case"YYYY":return w.s(x.$y,4,"0");case"M":return W+1;case"MM":return w.s(W+1,2,"0");case"MMM":return ie(b.monthsShort,W,Z,3);case"MMMM":return ie(Z,W);case"D":return x.$D;case"DD":return w.s(x.$D,2,"0");case"d":return String(x.$W);case"dd":return ie(b.weekdaysMin,x.$W,q,2);case"ddd":return ie(b.weekdaysShort,x.$W,q,3);case"dddd":return q[x.$W];case"H":return String(V);case"HH":return w.s(V,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return de(V,U,!0);case"A":return de(V,U,!1);case"m":return String(U);case"mm":return w.s(U,2,"0");case"s":return String(x.$s);case"ss":return w.s(x.$s,2,"0");case"SSS":return w.s(x.$ms,3,"0");case"Z":return z}return null})(ne)||z.replace(":","")}))},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(y,x,b){var T,z=this,V=w.p(x),U=O(y),W=(U.utcOffset()-this.utcOffset())*r,q=this-U,Z=function(){return w.m(z,U)};switch(V){case f:T=Z()/12;break;case p:T=Z();break;case h:T=Z()/3;break;case u:T=(q-W)/6048e5;break;case c:T=(q-W)/864e5;break;case d:T=q/a;break;case l:T=q/r;break;case s:T=q/t;break;default:T=q}return b?T:w.a(T)},C.daysInMonth=function(){return this.endOf(p).$D},C.$locale=function(){return G[this.$L]},C.locale=function(y,x){if(!y)return this.$L;var b=this.clone(),T=I(y,x,!0);return T&&(b.$L=T),b},C.clone=function(){return w.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},L})(),P=N.prototype;return O.prototype=P,[["$ms",i],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(L){P[L[1]]=function(C){return this.$g(C,L[0],L[1])}})),O.extend=function(L,C){return L.$i||(L(C,N,O),L.$i=!0),O},O.locale=I,O.isDayjs=Y,O.unix=function(L){return O(1e3*L)},O.en=G[R],O.Ls=G,O.p={},O}))})(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)}},i={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:[ye("Sun"),ye("Mon"),ye("Tue"),ye("Wed"),ye("Thu"),ye("Fri"),ye("Sat")]}};return o.jsx(Xt,{dropdownClassName:"date-picker-column-style",locale:i,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=m(H.Empty)`
2827
2827
  .ant-empty-description {
2828
2828
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2829
2829
  }
2830
- `,za=m(R.Table)`
2830
+ `,zo=m(H.Table)`
2831
2831
  .ant-table-thead > tr > th {
2832
2832
  background: var(--color-bg-primary, #fff);
2833
2833
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2930,7 +2930,7 @@
2930
2930
  .ant-collapse-header {
2931
2931
  background-color: transparent !important;
2932
2932
  }
2933
- `,jr=m(R.Select)`
2933
+ `,bt=m(H.Select)`
2934
2934
  width: ${({$width:n})=>n??"100%"};
2935
2935
 
2936
2936
  min-height: ${({$height:n})=>n??"unset"};
@@ -3005,7 +3005,7 @@
3005
3005
  .anticon.anticon-close {
3006
3006
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
3007
3007
  }
3008
- `,Ma=({setDateFilters:n,hasAllFilter:e=!1})=>{const[t,r]=S.useState([]),o=[{key:"week",label:Ce("7D"),...ee.getCommonDateRange("week")},{key:"month",label:Ce("30D"),...ee.getCommonDateRange("month")},{key:"threeMonth",label:Ce("3M"),...ee.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Ce("6M"),...ee.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Ce("12M"),...ee.getCommonDateRange("twelveMonth")},{key:"year",label:Ce("YTD"),...ee.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${B("Custom")}: ${t[0]} / ${t[1]}`:B("Custom"),...ee.getCommonDateRange("custom")}],[a,s]=S.useState(),l=S.useMemo(()=>e?[{key:"all",label:B("All"),...ee.getCommonDateRange("all")},...o]:o,[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(ia,{id:"tabs-container",children:[i.jsx(aa,{type:"editable-card",items:l,onTabClick:d,activeKey:a?"custom":void 0,removeIcon:!0,hideAdd:!0}),a&&i.jsx(sa,{children:i.jsx(Ta,{setDates:r,setDateFilter:n,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),i.jsx(jr,{className:"tab-select",$width:"200px",placeholder:B("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},kr=m.div`
3008
+ `,Po=({setDateFilters:n,hasAllFilter:e=!1})=>{const[t,r]=S.useState([]),a=[{key:"week",label:Ce("7D"),...te.getCommonDateRange("week")},{key:"month",label:Ce("30D"),...te.getCommonDateRange("month")},{key:"threeMonth",label:Ce("3M"),...te.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Ce("6M"),...te.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Ce("12M"),...te.getCommonDateRange("twelveMonth")},{key:"year",label:Ce("YTD"),...te.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${B("Custom")}: ${t[0]} / ${t[1]}`:B("Custom"),...te.getCommonDateRange("custom")}],[i,s]=S.useState(),l=S.useMemo(()=>e?[{key:"all",label:B("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 o.jsxs(oo,{id:"tabs-container",children:[o.jsx(ao,{type:"editable-card",items:l,onTabClick:d,activeKey:i?"custom":void 0,removeIcon:!0,hideAdd:!0}),i&&o.jsx(io,{children:o.jsx(To,{setDates:r,setDateFilter:n,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),o.jsx(bt,{className:"tab-select",$width:"200px",placeholder:B("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},Dr=m.div`
3009
3009
  .ant-dropdown-menu {
3010
3010
  border-radius: 2px !important;
3011
3011
  background: var(--color-bg-quaternary, #2f2f2f) !important;
@@ -3031,7 +3031,7 @@
3031
3031
  padding: 8px 12px; /* აქ დაარეგულირე შიდა დაშორება */
3032
3032
  display: block;
3033
3033
  }
3034
- `,Pa=(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)},Ha=(n,e)=>{const t=new Blob([n],{type:"text/csv;charset=utf-8;"}),r=window.URL.createObjectURL(t),o=document.createElement("a");o.href=r,o.setAttribute("download",e),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(r)},Ra=m(R.Dropdown)`
3034
+ `,Mo=(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)},Ho=(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)},Ro=m(H.Dropdown)`
3035
3035
  background: var(--color-bg-secondary, #f0ededff) !important;
3036
3036
  font-size: 14px;
3037
3037
  font-weight: 500;
@@ -3045,14 +3045,14 @@
3045
3045
  font-weight: 500;
3046
3046
  color: var(--color-text-primary, #000000ff) !important;
3047
3047
  }
3048
- `,Fa=m.div`
3048
+ `,Fo=m.div`
3049
3049
  background-color: red;
3050
3050
  padding: 5px;
3051
3051
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3052
3052
  color: var(--color-text-primary, #fff);
3053
3053
  cursor: pointer;
3054
- `,Na=({exportFileName:n,filters:e,service:t})=>{const r=async a=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,a)).data;a==="xlsx"?Pa(u,`${n}.${a}`):Ha(u,`${n}`)}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Ra,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(kr,{children:a}),placement:"bottomLeft",children:i.jsx(Fa,{children:B("Export")})})},Lr=(n,e,t)=>{const r=n.filter(p=>e[p.id]),o=Object.keys(r[0]),a=r.map(p=>o.map(h=>{const f=p[h];return f==null?"":typeof f=="object"?Object.values(f).find(w=>typeof w!="object")??"":f})),s=[o,...a].map(p=>p.map(h=>`"${(h||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3055
- `),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)},Dr=(n,e,t)=>{const o=n.filter(p=>e[p.id]).map(p=>{const h={};return Object.entries(p).forEach(([f,g])=>{if(g==null)h[f]="";else if(typeof g=="object"){const w=Object.values(g).find(O=>typeof O!="object");h[f]=w??""}else h[f]=g}),h}),a=Fe.utils.json_to_sheet(o),s=Fe.utils.book_new();Fe.utils.book_append_sheet(s,a,"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)},Va=m(R.Dropdown)`
3054
+ `,No=({exportFileName:n,filters:e,service:t})=>{const r=async i=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,i)).data;i==="xlsx"?Mo(u,`${n}.${i}`):Ho(u,`${n}`)}catch(s){console.error("Export failed:",s)}},a=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return o.jsx(Ro,{menu:{items:a,className:"dropdown-menu"},popupRender:i=>o.jsx(Dr,{children:i}),placement:"bottomLeft",children:o.jsx(Fo,{children:B("Export")})})},$r=(n,e,t)=>{const r=n.filter(p=>e[p.id]),a=Object.keys(r[0]),i=r.map(p=>a.map(h=>{const f=p[h];return f==null?"":typeof f=="object"?Object.values(f).find(v=>typeof v!="object")??"":f})),s=[a,...i].map(p=>p.map(h=>`"${(h||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3055
+ `),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 h={};return Object.entries(p).forEach(([f,g])=>{if(g==null)h[f]="";else if(typeof g=="object"){const v=Object.values(g).find(E=>typeof E!="object");h[f]=v??""}else h[f]=g}),h}),i=Fe.utils.json_to_sheet(a),s=Fe.utils.book_new();Fe.utils.book_append_sheet(s,i,"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)},Vo=m(H.Dropdown)`
3056
3056
  background: var(--color-bg-secondary, #f0ededff) !important;
3057
3057
  font-size: 14px;
3058
3058
  font-weight: 500;
@@ -3066,11 +3066,134 @@
3066
3066
  font-weight: 500;
3067
3067
  color: var(--color-text-primary, #000000ff) !important;
3068
3068
  }
3069
- `,Aa=m.div`
3069
+ `,Ao=m.div`
3070
3070
  background-color: red;
3071
3071
  padding: 5px;
3072
3072
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3073
3073
  color: var(--color-text-primary, #fff);
3074
3074
  cursor: pointer;
3075
- `,Ba=({tableData:n,checked:e,fileName:t})=>{const r=async a=>{try{a==="xlsx"?Dr(n,e,t+".xlsx"):Lr(n,e,t+".csv")}catch(s){console.error("Export failed:",s)}},o=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return i.jsx(Va,{menu:{items:o,className:"dropdown-menu"},popupRender:a=>i.jsx(kr,{children:a}),placement:"bottomLeft",children:i.jsx(Aa,{children:B("Export")})})},Ga=({value:n,onChange:e,...t})=>{const r=n?Cr(n):null,o=a=>{a?e==null||e(ee.toISODateString(a.toDate())):e==null||e(null)};return i.jsx(R.DatePicker,{value:r,onChange:o,allowClear:!0,...t})},Ua=({id:n,refetchFormItems:e,redirectPrevPage:t,updateItem:r,addItem:o,getItemById:a,onSetFormValues:s})=>{const l=ne.useNavigate(),[d]=R.Form.useForm(),[c,u]=S.useState(n=="new"),[p,h]=S.useState(null),f=async w=>{const O=window.location.pathname,A=O.substring(0,O.lastIndexOf("/"));try{if(p){let j;return n?j=await r({...w,id:n}):j=await r(w),t!==!1&&j.data.success===!0&&l(A),j}else{const j=await o(w);return t!==!1&&j.data.success===!0&&l(A),j}}catch(j){if(j.status===400){const L=j.response.data,T=ve(L.errors);d.setFields(T)}}},g=async w=>{try{const O=await a(w),A=s?s(O.data):O.data;h(A),d.setFieldsValue(A)}catch(O){console.log(O,"Error in Form Controller.")}};return S.useEffect(()=>{u(n=="new"),n!="new"?g(Number(n)):d.resetFields()},[n,e]),{form:d,item:p,getItemById:a,isAddingForm:c,handleSave:f}},_a=({id:n,formItem:e,updateItem:t,addItem:r,getItemById:o})=>{const[a]=R.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 h=p.response.data,f=ve(h.errors);a.setFields(f)}throw p}},c=async u=>{try{const h=(await o(u)).data;l(h),a.setFieldsValue(h)}catch(p){console.log(p,"Error in Form Controller.")}};return S.useEffect(()=>{try{if(!e)return;l(e),a.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),S.useEffect(()=>{n&&c(Number(n))},[n]),{form:a,item:s,handleSave:d}},Wa=()=>{const n=ne.useNavigate(),{setUser:e}=Se(),[t,r]=S.useState({visible:!1,token:""}),o=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&&o(c)},finalizeLogin:o,twoFactor:t,setTwoFactor:r}};function Ya(n){const{navigator:e}=S.useContext(ne.UNSAFE_NavigationContext),t=ne.useLocation();S.useEffect(()=>{if(!n)return;const r=e.push,o=e.replace,a=s=>(...l)=>{R.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(r),e.replace=a(o),()=>{e.push=r,e.replace=o}},[n,e,t]),S.useEffect(()=>{const r=o=>{n&&(o.preventDefault(),o.returnValue="")};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r)}},[n])}function Ka(n){S.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&n(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function qa(n,e){if(!n)return"";const t=new Date(n);if(isNaN(t.getTime()))return"";const r=t.getDate(),o=t.getMonth(),a=t.getFullYear(),l=`${r} ${o}, ${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 Za(n,e="en-US"){return n<1?0:n?n.toLocaleString(e):""}const Ja=(n,e)=>Array.isArray(n)?n.filter(t=>t.type?(Array.isArray(t.type)?t.type:[t.type]).some(o=>e.includes(o)):!1):[],$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()),Xa=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,Qa=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,ei=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,ti=/^Commissions\[(\d+)\]$/;function ri(n){const{errors:e}=n.response.data,t=Object.keys(e)[0],r=e[t][0],o=t.match(Xa);if(o){const[,l,d,c,u,p]=o;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),itemIndex:Number(u),field:$e(p),message:r}}const a=t.match(Qa)||t.match(ei);if(a){const[,l,d,c]=a;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),message:r}}const s=t.match(ti);return s?{brandIndex:Number(s[1]),message:r}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=Qr;exports.AuthorizationLayout=yn;exports.BoxComponent=Yt;exports.CancelModalButton=Ke;exports.Chart=_o;exports.CloseButton=nr;exports.ColumnFilterType=se;exports.ComingSoon=ta;exports.ContactInfoModal=xr;exports.ContentContainer=Ye;exports.CreateModalButton=ze;exports.DateHelper=ee;exports.DatePickerToISO=Ga;exports.DateRangeFilterTabs=Ma;exports.ExcelExport=Na;exports.ExcelExportSelected=Ba;exports.ExpandableTable=oa;exports.FilterConfiguration=lr;exports.FilterSelectTypes=be;exports.GeneralInput=ht;exports.GenericModal=tt;exports.GridViewPage=Po;exports.LabelText=Ie;exports.ModalHost=Ho;exports.ModalHostButtonWrapper=ar;exports.NoData=cr;exports.NoDataSpanForSelect=Bn;exports.PackageServicesProvider=Rr;exports.PackageTranslationProvider=Nr;exports.PageBreadcrumb=Ao;exports.Popup=We;exports.PopupFooterContainer=or;exports.PopupHeader=rr;exports.PopupMFA=Ro;exports.RejectButton=Gn;exports.SortDirections=Q;exports.Spinner=Yo;exports.StyledBreadcrumb=br;exports.StyledEmpty=Ia;exports.StyledSelect=jr;exports.StyledTable=za;exports.TableViewOptions=fe;exports.TwoFactorPopup=Go;exports.catchErrorMessage=sr;exports.exportSelectedToCSV=Lr;exports.exportSelectedToXLSX=Dr;exports.formatDate=qa;exports.getBase64=Un;exports.handleCopy=_n;exports.handleDictionarySelectFilter=er;exports.lowercaseFirstLetter=ir;exports.numberFormatterWithComma=Za;exports.parseCommissionErrors=ri;exports.parseErrorMessageKey=pr;exports.parseServerErrors=ve;exports.showByType=Ja;exports.useAutofillStartDetection=Ka;exports.useContactInfoController=yr;exports.useDebounce=ct;exports.useElementHeight=Zt;exports.useFetch=st;exports.useFilterDataSourceType=ft;exports.useFormController=Ua;exports.useModalStore=ge;exports.useNavigationGuard=Ya;exports.useNewDesignFormController=_a;exports.usePackageServices=we;exports.useTwoFactor=Wa;exports.useUserStore=Se;
3075
+ `,Bo=({tableData:n,checked:e,fileName:t})=>{const r=async i=>{try{i==="xlsx"?Er(n,e,t+".xlsx"):$r(n,e,t+".csv")}catch(s){console.error("Export failed:",s)}},a=[{key:"1",label:`${B("ExportAs")} ${B("Xlsx")}`,onClick:()=>r("xlsx")},{key:"2",label:`${B("ExportAs")} ${B("Csv")}`,onClick:()=>r("csv")}];return o.jsx(Vo,{menu:{items:a,className:"dropdown-menu"},popupRender:i=>o.jsx(Dr,{children:i}),placement:"bottomLeft",children:o.jsx(Ao,{children:B("Export")})})},Go=({value:n,onChange:e,...t})=>{const r=n?Lr(n):null,a=i=>{i?e==null||e(te.toISODateString(i.toDate())):e==null||e(null)};return o.jsx(H.DatePicker,{value:r,onChange:a,allowClear:!0,...t})},Uo=m(H.Tabs)`
3076
+ display: flex;
3077
+ gap: var(--spacing-025, 2px);
3078
+ color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
3079
+ font-family: var(--text-font-family-base, Geist);
3080
+ font-size: var(--typo-caption-size-medium, 14px);
3081
+ font-style: normal;
3082
+ font-weight: var(--text-weight-regular, 400);
3083
+ line-height: var(--typo-caption-lineHeight-medium, 18px);
3084
+ letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
3085
+ padding: 1.5rem;
3086
+
3087
+ @media (max-width: 1024px) {
3088
+ .ant-tabs-nav-list {
3089
+ /* display: none; */
3090
+ }
3091
+
3092
+ .ant-tabs-extra-content {
3093
+ width: 100%;
3094
+ }
3095
+ }
3096
+
3097
+ .ant-tabs-tab {
3098
+ height: 32px;
3099
+ padding: 8px 4px;
3100
+ margin: 0 !important;
3101
+ padding: var(--spacing-050, 0.25rem) var(--spacing-150, 0.75rem);
3102
+
3103
+ .ant-tabs-tab-btn {
3104
+ font-family: var(--text-font-family-base, Geist);
3105
+ font-size: var(--typo-caption-size-medium, 0.875rem);
3106
+ font-style: normal;
3107
+ font-weight: var(--text-weight-regular, 400);
3108
+ line-height: var(--typo-caption-lineHeight-medium, 1.125rem);
3109
+ letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
3110
+
3111
+ border-radius: var(--border-radius-025, 2px);
3112
+ color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
3113
+ font-family: var(--text-font-family-base, Geist);
3114
+ font-size: var(--typo-caption-size-medium, 0.875rem);
3115
+ font-weight: var(--text-weight-regular, 400);
3116
+ line-height: var(--typo-caption-lineHeight-medium, 1.125rem);
3117
+ letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
3118
+ transition: color 0.2s;
3119
+
3120
+ &:hover,
3121
+ &:focus {
3122
+ color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
3123
+ }
3124
+ }
3125
+
3126
+ &.ant-tabs-tab-active {
3127
+ background: var(--color-bg-brand-special, #02e0ae);
3128
+
3129
+ .ant-tabs-tab-btn {
3130
+ color: var(--color-text-inverse-primary, #131412);
3131
+
3132
+ &:hover,
3133
+ &:focus {
3134
+ color: var(--color-text-inverse-primary, #131412);
3135
+ }
3136
+ }
3137
+ }
3138
+ }
3139
+ .ant-tabs-nav {
3140
+ margin: 0;
3141
+ border-bottom: 1px solid var(--color-border-primary, rgba(255, 255, 255, 0.1));
3142
+
3143
+ @media (max-width: 1024px) {
3144
+ border-bottom: none;
3145
+ }
3146
+
3147
+ &::before {
3148
+ display: none;
3149
+ }
3150
+ }
3151
+
3152
+ .ant-tabs-ink-bar {
3153
+ display: none;
3154
+ }
3155
+
3156
+ .ant-tabs-nav-list {
3157
+ border-radius: var(--border-radius-025, 2px);
3158
+ background: var(--color-bg-secondary);
3159
+ }
3160
+
3161
+ .ant-tabs-nav-more {
3162
+ display: none !important;
3163
+ }
3164
+ `,_o=m.div`
3165
+ display: flex;
3166
+ align-items: center;
3167
+ gap: 4px;
3168
+ `,Wo=m.div`
3169
+ display: flex;
3170
+ justify-content: space-between;
3171
+ width: 100% !important;
3172
+
3173
+ @media (max-width: 450px) {
3174
+ display: flex;
3175
+ flex-direction: column;
3176
+ gap: 10px;
3177
+ }
3178
+
3179
+ .partner-tab-select {
3180
+ width: 150px;
3181
+ @media (max-width: 450px) {
3182
+ width: 100%;
3183
+ }
3184
+ }
3185
+ `,Yo=m.div`
3186
+ display: none;
3187
+ @media (max-width: 1024px) {
3188
+ display: block;
3189
+ }
3190
+ align-items: start !important;
3191
+ `,Ko=m.div`
3192
+ display: none;
3193
+
3194
+ @media (max-width: 991px) {
3195
+ display: block;
3196
+ margin-left: 0.9rem;
3197
+ }
3198
+ `,qo=()=>{const[n,e]=S.useState(!1);return o.jsxs(Ko,{children:[o.jsx("button",{className:"icon sidebar",onClick:()=>e(!0),children:o.jsx(er,{})}),n&&o.jsx(lt,{})]})},Zo=({basePath:n,tabItems:e,contentMap:t,defaultTabKey:r="overview",logo:a,breadcrumbItems:i,needsBreadcrumb:s,customTabFilter:l})=>{const{hasPermission:d}=xe(),{id:c}=X.useParams(),u=X.useLocation(),p=X.useNavigate(),h=S.useMemo(()=>{const k=u.pathname.split("/");return k[k.length-1]||r},[u.pathname,r]),[f,g]=S.useState(null),[v,E]=S.useState(null),A=k=>{p(`${n}/${c}/${k}`)},j=()=>l?l(e):e.filter(k=>{var R;return(R=k.permission)==null?void 0:R.some(G=>d(G))}),D=()=>{const k=t[h]||t[r];return k?typeof k=="object"&&k!==null&&"type"in k?{...k,props:{...k.props,setExtraTabItem:g,setSecondExtraTab:E}}:k:null};return o.jsxs(o.Fragment,{children:[o.jsx(qo,{}),s&&o.jsx(Sr,{logo:a,breadcrumbItems:i}),o.jsx(Uo,{activeKey:h,onChange:A,tabBarExtraContent:{right:o.jsxs(Wo,{children:[o.jsx(Yo,{children:o.jsx(bt,{className:"partner-tab-select",placeholder:"Modules",onChange:k=>A(k),value:h,options:e.filter(k=>(k==null?void 0:k.label)!=="Details").map(k=>({value:k.key,label:k.label}))})}),o.jsxs(_o,{children:[v,f]})]})},items:j()}),o.jsx("div",{children:D()})]})},Jo=({id:n,refetchFormItems:e,redirectPrevPage:t,updateItem:r,addItem:a,getItemById:i,onSetFormValues:s})=>{const l=X.useNavigate(),[d]=H.Form.useForm(),[c,u]=S.useState(n=="new"),[p,h]=S.useState(null),f=async v=>{const E=window.location.pathname,A=E.substring(0,E.lastIndexOf("/"));try{if(p){let j;return n?j=await r({...v,id:n}):j=await r(v),t!==!1&&j.data.success===!0&&l(A),j}else{const j=await a(v);return t!==!1&&j.data.success===!0&&l(A),j}}catch(j){if(j.status===400){const D=j.response.data,k=we(D.errors);d.setFields(k)}}},g=async v=>{try{const E=await i(v),A=s?s(E.data):E.data;h(A),d.setFieldsValue(A)}catch(E){console.log(E,"Error in Form Controller.")}};return S.useEffect(()=>{u(n=="new"),n!="new"?g(Number(n)):d.resetFields()},[n,e]),{form:d,item:p,getItemById:i,isAddingForm:c,handleSave:f}},Xo=({id:n,formItem:e,updateItem:t,addItem:r,getItemById:a})=>{const[i]=H.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 h=p.response.data,f=we(h.errors);i.setFields(f)}throw p}},c=async u=>{try{const h=(await a(u)).data;l(h),i.setFieldsValue(h)}catch(p){console.log(p,"Error in Form Controller.")}};return S.useEffect(()=>{try{if(!e)return;l(e),i.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),S.useEffect(()=>{n&&c(Number(n))},[n]),{form:i,item:s,handleSave:d}},Qo=()=>{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 ei(n){const{navigator:e}=S.useContext(X.UNSAFE_NavigationContext),t=X.useLocation();S.useEffect(()=>{if(!n)return;const r=e.push,a=e.replace,i=s=>(...l)=>{H.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=i(r),e.replace=i(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 ti(n){S.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&n(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function ri(n,e){if(!n)return"";const t=new Date(n);if(isNaN(t.getTime()))return"";const r=t.getDate(),a=t.getMonth(),i=t.getFullYear(),l=`${r} ${a}, ${i}`;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 ni(n,e="en-US"){return n<1?0:n?n.toLocaleString(e):""}const ai=(n,e)=>Array.isArray(n)?n.filter(t=>t.type?(Array.isArray(t.type)?t.type:[t.type]).some(a=>e.includes(a)):!1):[],$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()),oi=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,ii=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,si=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,li=/^Commissions\[(\d+)\]$/;function ci(n){const{errors:e}=n.response.data,t=Object.keys(e)[0],r=e[t][0],a=t.match(oi);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 i=t.match(ii)||t.match(si);if(i){const[,l,d,c]=i;return{brandIndex:Number(l),generalType:$e(d),specificType:$e(c),message:r}}const s=t.match(li);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=Kt;exports.CancelModalButton=Ke;exports.Chart=Ua;exports.CloseButton=or;exports.ColumnFilterType=se;exports.ComingSoon=eo;exports.ContactInfoModal=br;exports.ContentContainer=Ye;exports.CreateModalButton=ze;exports.DateHelper=te;exports.DatePickerToISO=Go;exports.DateRangeFilterTabs=Po;exports.ExcelExport=No;exports.ExcelExportSelected=Bo;exports.ExpandableTable=no;exports.FilterConfiguration=dr;exports.FilterSelectTypes=ve;exports.GeneralInput=mt;exports.GenericModal=tt;exports.GenericTabsPage=Zo;exports.GridViewPage=Ma;exports.LabelText=Ie;exports.ModalHost=Ha;exports.ModalHostButtonWrapper=sr;exports.NoData=pr;exports.NoDataSpanForSelect=Gn;exports.PackageServicesProvider=Nr;exports.PackageTranslationProvider=Ar;exports.PageBreadcrumb=Sr;exports.Popup=We;exports.PopupFooterContainer=ir;exports.PopupHeader=ar;exports.PopupMFA=Ra;exports.RejectButton=Un;exports.SortDirections=ee;exports.Spinner=Wa;exports.StyledBreadcrumb=wr;exports.StyledEmpty=Io;exports.StyledSelect=bt;exports.StyledTable=zo;exports.TableViewOptions=fe;exports.TwoFactorPopup=Ba;exports.catchErrorMessage=cr;exports.exportSelectedToCSV=$r;exports.exportSelectedToXLSX=Er;exports.formatDate=ri;exports.getBase64=_n;exports.handleCopy=Wn;exports.handleDictionarySelectFilter=rr;exports.lowercaseFirstLetter=lr;exports.numberFormatterWithComma=ni;exports.parseCommissionErrors=ci;exports.parseErrorMessageKey=fr;exports.parseServerErrors=we;exports.showByType=ai;exports.useAutofillStartDetection=ti;exports.useContactInfoController=vr;exports.useDebounce=dt;exports.useElementHeight=Jt;exports.useFetch=st;exports.useFilterDataSourceType=gt;exports.useFormController=Jo;exports.useModalStore=ge;exports.useNavigationGuard=ei;exports.useNewDesignFormController=Xo;exports.usePackageServices=Se;exports.useTwoFactor=Qo;exports.useUserStore=xe;
3076
3199
  //# sourceMappingURL=index.cjs.map