affiliate-front-shared 1.3.24 → 1.3.26

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,4 +1,4 @@
1
- "use strict";var $n=Object.defineProperty;var In=(r,e,t)=>e in r?$n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var et=(r,e,t)=>In(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),T=require("antd"),m=require("styled-components"),re=require("react-router"),Ot=require("zustand"),$r=require("react-i18next"),Mn=require("echarts"),Pn=require("react-dom"),zn=require("i18next-browser-languagedetector"),Hn=require("i18next-http-backend"),Rn=require("xlsx"),Nn=require("lodash");function Dt(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const $=Dt(x),An=Dt(Mn),tt=Dt(Rn),Ir=x.createContext({});function Fn({services:r,children:e}){return o.jsx(Ir.Provider,{value:r,children:e})}function me(){return x.useContext(Ir)}let Ce=r=>r;function Yt(r){Ce=r}const V=(r,e)=>Ce(`general.${r}`,e),Z=(r,e)=>Ce(`actions.${r}`,e),G=(r,e)=>Ce(`authentication.${r}`,e),de=(r,e)=>Ce(`months.${r}`,e),Pe=(r,e)=>Ce(`date.${r}`,e),Oe=(r,e)=>Ce(`weekDays.${r}`,e),Vn=(r,e)=>Ce(`noData.${r}`,e),Kt=(r,e)=>Ce(`comingSoon.${r}`,e);function Bn({t:r,children:e}){return Yt(r),x.useEffect(()=>{Yt(r)},[r]),o.jsx(o.Fragment,{children:e})}const Tt=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),_n=m(Tt)`
1
+ "use strict";var $n=Object.defineProperty;var In=(r,e,t)=>e in r?$n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var et=(r,e,t)=>In(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),x=require("react"),T=require("antd"),m=require("styled-components"),re=require("react-router"),Ot=require("zustand"),$r=require("react-i18next"),Mn=require("echarts"),Pn=require("react-dom"),zn=require("i18next-browser-languagedetector"),Hn=require("i18next-http-backend"),Rn=require("xlsx"),Nn=require("lodash");function Dt(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const $=Dt(x),An=Dt(Mn),tt=Dt(Rn),Ir=x.createContext({});function Fn({services:r,children:e}){return a.jsx(Ir.Provider,{value:r,children:e})}function we(){return x.useContext(Ir)}let Ce=r=>r;function Yt(r){Ce=r}const V=(r,e)=>Ce(`general.${r}`,e),Z=(r,e)=>Ce(`actions.${r}`,e),G=(r,e)=>Ce(`authentication.${r}`,e),de=(r,e)=>Ce(`months.${r}`,e),Pe=(r,e)=>Ce(`date.${r}`,e),Oe=(r,e)=>Ce(`weekDays.${r}`,e),Vn=(r,e)=>Ce(`noData.${r}`,e),Kt=(r,e)=>Ce(`comingSoon.${r}`,e);function Bn({t:r,children:e}){return Yt(r),x.useEffect(()=>{Yt(r)},[r]),a.jsx(a.Fragment,{children:e})}const Tt=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z",fill:"currentColor",fillOpacity:.75})),_n=m(Tt)`
2
2
  color: var(--color-text-primary, #131412);
3
3
  `,Un=m.div`
4
4
  background: var(--color-bg-secondary, #f5f5f5);
@@ -112,7 +112,7 @@
112
112
  margin-left: 1.5rem !important;
113
113
  }
114
114
  }
115
- `,$t=(r,e=[])=>{const[t,n]=x.useState(null),[i,a]=x.useState(null),[s,l]=x.useState(!0),[d,c]=x.useState(null),u=async()=>{var p;try{l(!0),n(null);const h=await r();n(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 x.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:i}},Ee=Ot.create((r,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),r({user:t})},setThemeMode:t=>{const n=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;r({prefersDark:n,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",n?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),r({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const n=e().user;return n!=null&&n.permissions?!!n.permissions[t]:!1}})),Ue=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),Kn=m(Ue)`
115
+ `,$t=(r,e=[])=>{const[t,n]=x.useState(null),[i,o]=x.useState(null),[s,l]=x.useState(!0),[d,c]=x.useState(null),u=async()=>{var p;try{l(!0),n(null);const f=await r();n(f),(p=f==null?void 0:f.data)!=null&&p.items&&o(f.data.items)}catch{c("Failed to fetch data")}finally{l(!1)}};return x.useEffect(()=>{u()},[...e]),{response:t,loading:s,error:d,fetchData:u,listItems:i}},Ee=Ot.create((r,e)=>({user:localStorage.getItem("userData")?JSON.parse(localStorage.getItem("userData")):null,prefersDark:!1,storedThemeMode:null,setUser:t=>{localStorage.setItem("useToken",t.token),localStorage.setItem("userData",JSON.stringify(t)),r({user:t})},setThemeMode:t=>{const n=t===null?window.matchMedia("(prefers-color-scheme: dark)").matches:!!t;r({prefersDark:n,storedThemeMode:t}),document.documentElement.setAttribute("data-theme",n?"dark":"light"),localStorage.setItem("themeMode",JSON.stringify(t))},logout:()=>{localStorage.removeItem("userData"),localStorage.removeItem("useToken"),r({user:null})},isSentsitiveInfoVisible:()=>{const t=e().user;return t!=null&&t.sensitiveDataExpiration?new Date<new Date(t.sensitiveDataExpiration):!1},isTokenActive:()=>{const t=e().user;return t!=null&&t.expired?new Date<new Date(t.expired):!1},isManager:()=>{const t=e().user;return(t==null?void 0:t.type)==="Manager"},hasPermission:t=>{const n=e().user;return n!=null&&n.permissions?!!n.permissions[t]:!1}})),Ue=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z",fill:"currentColor"})),Kn=m(Ue)`
116
116
  display: flex;
117
117
  justify-content: center;
118
118
  color: var(--color-text-primary, #131412) !important;
@@ -179,7 +179,7 @@
179
179
  width: 256px;
180
180
  position: absolute !important;
181
181
  z-index: 10000;
182
- `,Qn=({closeProfileDropdown:r})=>{const e=re.useNavigate(),{getCustomers:t,postSelectedCustomer:n}=me(),{storedThemeMode:i,logout:a,setThemeMode:s,user:l}=Ee(),{i18n:d}=$r.useTranslation();function c(){a(),e("/authorization/login")}function u(v){d.changeLanguage(v),window.location.reload()}const p=(v,L)=>o.jsxs(qn,{children:[o.jsx(Zn,{children:v}),L&&o.jsx("span",{children:o.jsx(Kn,{})})]}),{response:h}=$t(t??(()=>Promise.resolve({data:[]})),[]);async function f(v){if(!n)return;const M=(await n(v)).data.value;localStorage.setItem("useToken",M.token),localStorage.setItem("userData",JSON.stringify(M))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return o.jsx(Jn,{children:o.jsxs(ee,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:v=>v.parentElement||document.body,onClick:()=>r(!1),children:[o.jsx(ee.Item,{onClick:g,children:"Profile"},"10-1"),o.jsxs(ee.Item,{children:[" ","Notifications"]},"10-2"),o.jsxs(ee.Item,{children:[" ","SecurityAccess"]},"10-3"),o.jsx(ee.Divider,{}),o.jsxs(ee.SubMenu,{title:"Language",children:[o.jsx(ee.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),o.jsx(ee.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),o.jsxs(ee.SubMenu,{title:"ColorTheme",children:[o.jsx(ee.Item,{onClick:()=>s(!1),children:p("Light",i===!1)},"30-1"),o.jsx(ee.Item,{onClick:()=>s(!0),children:p("Dark",i===!0)},"30-2"),o.jsx(ee.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,i===null)},"30-3")]},"30"),o.jsx(ee.Divider,{}),o.jsx(ee.SubMenu,{title:"ConnectedAccounts",children:((h==null?void 0:h.data)||[]).map(v=>o.jsx(ee.Item,{onClick:()=>f(v.id),children:p(v.name)},v.id))},"40"),o.jsx(ee.Divider,{}),o.jsx(ee.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},It=({items:r,topLogoPrimaryUrl:e,shortName:t})=>{const n=re.useLocation(),[i,a]=x.useState(!1),s=x.useRef(null),l=()=>a(d=>!d);return x.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&a(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),o.jsxs(Un,{className:"sidebar-wrapper",children:[o.jsxs(Gn,{ref:s,children:[o.jsxs(Wn,{onClick:l,children:[o.jsx("img",{src:e,alt:"logo"}),o.jsx("span",{children:t}),o.jsx(_n,{})]}),o.jsx("div",{children:i&&o.jsx(Qn,{closeProfileDropdown:a})})]}),o.jsx(Yn,{mode:"inline",selectedKeys:[n.pathname],items:r})]})},Xn=m.div`
182
+ `,Qn=({closeProfileDropdown:r})=>{const e=re.useNavigate(),{getCustomers:t,postSelectedCustomer:n}=we(),{storedThemeMode:i,logout:o,setThemeMode:s,user:l}=Ee(),{i18n:d}=$r.useTranslation();function c(){o(),e("/authorization/login")}function u(v){d.changeLanguage(v),window.location.reload()}const p=(v,L)=>a.jsxs(qn,{children:[a.jsx(Zn,{children:v}),L&&a.jsx("span",{children:a.jsx(Kn,{})})]}),{response:f}=$t(t??(()=>Promise.resolve({data:[]})),[]);async function h(v){if(!n)return;const M=(await n(v)).data.value;localStorage.setItem("useToken",M.token),localStorage.setItem("userData",JSON.stringify(M))}const g=()=>{(l==null?void 0:l.type)==="Manager"?e(`/affiliate-manager/profile/${l.id}`):e(`/affiliate-users/profile/${l==null?void 0:l.affiliateUserId}`)};return a.jsx(Jn,{children:a.jsxs(ee,{mode:window.innerWidth<780?"inline":"vertical",getPopupContainer:v=>v.parentElement||document.body,onClick:()=>r(!1),children:[a.jsx(ee.Item,{onClick:g,children:"Profile"},"10-1"),a.jsxs(ee.Item,{children:[" ","Notifications"]},"10-2"),a.jsxs(ee.Item,{children:[" ","SecurityAccess"]},"10-3"),a.jsx(ee.Divider,{}),a.jsxs(ee.SubMenu,{title:"Language",children:[a.jsx(ee.Item,{onClick:()=>u("en"),children:p("English",d.language==="en")},"20-1"),a.jsx(ee.Item,{onClick:()=>u("ka"),children:p("Georgian",d.language==="ka")},"20-2")]},"20"),a.jsxs(ee.SubMenu,{title:"ColorTheme",children:[a.jsx(ee.Item,{onClick:()=>s(!1),children:p("Light",i===!1)},"30-1"),a.jsx(ee.Item,{onClick:()=>s(!0),children:p("Dark",i===!0)},"30-2"),a.jsx(ee.Item,{onClick:()=>s(null),children:p(`DefinedBySystem (${window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light"})`,i===null)},"30-3")]},"30"),a.jsx(ee.Divider,{}),a.jsx(ee.SubMenu,{title:"ConnectedAccounts",children:((f==null?void 0:f.data)||[]).map(v=>a.jsx(ee.Item,{onClick:()=>h(v.id),children:p(v.name)},v.id))},"40"),a.jsx(ee.Divider,{}),a.jsx(ee.Item,{onClick:c,children:"LogOut"},"100")]},"10")})},It=({items:r,topLogoPrimaryUrl:e,shortName:t})=>{const n=re.useLocation(),[i,o]=x.useState(!1),s=x.useRef(null),l=()=>o(d=>!d);return x.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&o(!1)}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),a.jsxs(Un,{className:"sidebar-wrapper",children:[a.jsxs(Gn,{ref:s,children:[a.jsxs(Wn,{onClick:l,children:[a.jsx("img",{src:e,alt:"logo"}),a.jsx("span",{children:t}),a.jsx(_n,{})]}),a.jsx("div",{children:i&&a.jsx(Qn,{closeProfileDropdown:o})})]}),a.jsx(Yn,{mode:"inline",selectedKeys:[n.pathname],items:r})]})},Xn=m.div`
183
183
  min-height: 100vh;
184
184
  min-height: 100dvh;
185
185
  background: var(--color-bg-primary, #fff);
@@ -206,7 +206,7 @@
206
206
  max-height: 100vh;
207
207
  `,ti=m.div`
208
208
  background: var(--color-bg-primary, #fff);
209
- `,ri=({children:r})=>o.jsxs(Xn,{children:[o.jsx(It,{}),o.jsx(ei,{children:o.jsx(ti,{children:r})})]}),ni=m.div`
209
+ `,ri=({children:r})=>a.jsxs(Xn,{children:[a.jsx(It,{}),a.jsx(ei,{children:a.jsx(ti,{children:r})})]}),ni=m.div`
210
210
  display: grid;
211
211
  grid-template-columns: 33.625rem 1fr;
212
212
  min-height: 100vh;
@@ -227,7 +227,7 @@
227
227
  }
228
228
  `,ii=m.span`
229
229
  font-size: 15px;
230
- `,ai=m.button`
230
+ `,oi=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
- `,oi=m.div`
244
+ `,ai=m.div`
245
245
  display: flex;
246
246
  flex-direction: column;
247
247
  padding: 0 1.5rem;
@@ -427,7 +427,7 @@
427
427
  `;const yi=m.span`
428
428
  color: ${r=>r.color};
429
429
  font-size: 12px;
430
- `,Pr=({boxBottomText:r,boxTopText:e,onClick:t,className:n,color:i,commissionStatus:a})=>o.jsx(o.Fragment,{children:o.jsx(gi,{children:o.jsxs(mi,{color:i,onClick:t,className:n,children:[o.jsx(vi,{children:e}),o.jsx(xi,{children:r}),a&&e===V("Commission")&&o.jsx(yi,{color:i,children:a})]})})}),bi=({pageTitle:r,pageDesc:e,logoPrimaryUrl:t,shortName:n,colorPrimary:i,children:a})=>{const[s]=re.useSearchParams(),l=s.get("backPath"),d=re.useNavigate();function c(u){d(u)}return o.jsxs(ni,{children:[o.jsxs(oi,{children:[o.jsx("header",{children:l&&o.jsx(ai,{onClick:()=>c(l),children:o.jsx(hi,{})})}),o.jsx(si,{children:o.jsxs(li,{children:[o.jsx(pi,{children:r}),o.jsx(di,{children:e})]})}),o.jsx(ui,{children:o.jsx(Pr,{boxTopText:o.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:o.jsx(ii,{children:n})})}),a,o.jsxs(fi,{children:[o.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),o.jsxs("nav",{children:[o.jsx("a",{href:"",children:o.jsx(qt,{children:G("TermsOfUsage")})}),o.jsx("a",{href:"",children:o.jsx(qt,{children:G("PrivacyPolicy")})})]})]})]}),o.jsx(ci,{backgroundcolor:i,children:o.jsx("img",{src:t,alt:"logo"})})]})};var we=(r=>(r[r.TABLE=0]="TABLE",r[r.LIST=1]="LIST",r[r.BOARD=2]="BOARD",r))(we||{}),ae=(r=>(r[r.ASC=0]="ASC",r[r.DESC=1]="DESC",r))(ae||{}),Te=(r=>(r[r.NONE=0]="NONE",r[r.COLUMN=1]="COLUMN",r[r.TYPE=2]="TYPE",r[r.VALUE=3]="VALUE",r))(Te||{}),fe=(r=>(r[r.INPUT=0]="INPUT",r[r.SELECT=1]="SELECT",r[r.TwoComponentSelect=2]="TwoComponentSelect",r[r.DATEPICKER=3]="DATEPICKER",r[r.MULTISELECT=4]="MULTISELECT",r))(fe||{});const Zt=r=>{let e;const t=new Set,n=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const h=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(f=>f(e,h))}},i=()=>e,l={setState:n,getState:i,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=r(n,i,l);return l},wi=(r=>r?Zt(r):Zt),zr={Page:1,PageSize:25},Jt={filters:zr,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:we.TABLE},Ci=()=>wi((r,e)=>({columns:[],...Jt,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>r({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>r(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,n=we.TABLE)=>{if(e().isHydrated)return;const i=sessionStorage.getItem(t);if(i)try{const a=JSON.parse(i);r({filters:a.filters??zr,filterItems:a.filterItems??[],sortItems:a.sortItems??[],activeTableView:a.activeTableView??n,hideItems:a.hideItems??{},groupByArr:a.groupByArr??[],selectedConfig:a.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}r({activeTableView:n,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>r({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>r({checkedValue:t}),hasSelect:!1,setHasSelect:t=>r({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&r({filters:t})},setSortItems:t=>{e().isHydrated&&(r({sortItems:t}),r(n=>{const{Sort:i,Asc:a,...s}=n.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===ae.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,n=!1)=>{if(!e().isHydrated||(r({filterItems:t}),!n))return;const{filters:i,sortItems:a}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=i,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),r({filters:{Page:1,PageSize:s,QuickSearch:c||"",...a.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>r({hideItems:t}),setGroupByArr:t=>r({groupByArr:t}),setActiveTableView:t=>r({activeTableView:t}),setColumns:t=>r({columns:t}),resetStore:()=>{r({...Jt,isHydrated:!0,selectedConfig:null})}})),Hr=x.createContext(null),ji=({children:r})=>{const e=x.useRef();return e.current||(e.current=Ci()),o.jsx(Hr.Provider,{value:e.current,children:r})},D=r=>{const e=x.useContext(Hr);if(!e)throw new Error("GridViewStoreProvider is missing");return Ot.useStore(e,r)},Si=()=>{const r=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),n=D(u=>u.filterItems),i=D(u=>u.sortItems),a=D(u=>u.hideItems),s=D(u=>u.groupByArr),l=D(u=>u.activeTableView),d=D(u=>u.selectedConfig),c=re.useLocation();x.useEffect(()=>(r(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),x.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:n,sortItems:i,activeTableView:l,hideItems:a,groupByArr:s,selectedConfig:d}))},[t,n,i,l,a,s,d,e])};function Rr(r){const[e,t]=x.useState(0);return x.useEffect(()=>{if(!r.current)return;const n=new ResizeObserver(([i])=>{t(i.contentRect.height)});return n.observe(r.current),t(r.current.clientHeight),()=>n.disconnect()},[r]),e}const{RangePicker:ki}=T.DatePicker,Li=m.div`
430
+ `,Pr=({boxBottomText:r,boxTopText:e,onClick:t,className:n,color:i,commissionStatus:o})=>a.jsx(a.Fragment,{children:a.jsx(gi,{children:a.jsxs(mi,{color:i,onClick:t,className:n,children:[a.jsx(vi,{children:e}),a.jsx(xi,{children:r}),o&&e===V("Commission")&&a.jsx(yi,{color:i,children:o})]})})}),bi=({pageTitle:r,pageDesc:e,logoPrimaryUrl:t,shortName:n,colorPrimary:i,children:o})=>{const[s]=re.useSearchParams(),l=s.get("backPath"),d=re.useNavigate();function c(u){d(u)}return a.jsxs(ni,{children:[a.jsxs(ai,{children:[a.jsx("header",{children:l&&a.jsx(oi,{onClick:()=>c(l),children:a.jsx(hi,{})})}),a.jsx(si,{children:a.jsxs(li,{children:[a.jsx(pi,{children:r}),a.jsx(di,{children:e})]})}),a.jsx(ui,{children:a.jsx(Pr,{boxTopText:a.jsx("img",{className:"card-logo",src:t,alt:"logo"}),boxBottomText:a.jsx(ii,{children:n})})}),o,a.jsxs(fi,{children:[a.jsx("img",{className:"terms-logo",width:60,height:20,src:t,alt:"logo"}),a.jsxs("nav",{children:[a.jsx("a",{href:"",children:a.jsx(qt,{children:G("TermsOfUsage")})}),a.jsx("a",{href:"",children:a.jsx(qt,{children:G("PrivacyPolicy")})})]})]})]}),a.jsx(ci,{backgroundcolor:i,children:a.jsx("img",{src:t,alt:"logo"})})]})};var be=(r=>(r[r.TABLE=0]="TABLE",r[r.LIST=1]="LIST",r[r.BOARD=2]="BOARD",r))(be||{}),oe=(r=>(r[r.ASC=0]="ASC",r[r.DESC=1]="DESC",r))(oe||{}),Te=(r=>(r[r.NONE=0]="NONE",r[r.COLUMN=1]="COLUMN",r[r.TYPE=2]="TYPE",r[r.VALUE=3]="VALUE",r))(Te||{}),fe=(r=>(r[r.INPUT=0]="INPUT",r[r.SELECT=1]="SELECT",r[r.TwoComponentSelect=2]="TwoComponentSelect",r[r.DATEPICKER=3]="DATEPICKER",r[r.MULTISELECT=4]="MULTISELECT",r))(fe||{});const Zt=r=>{let e;const t=new Set,n=(c,u)=>{const p=typeof c=="function"?c(e):c;if(!Object.is(p,e)){const f=e;e=u??(typeof p!="object"||p===null)?p:Object.assign({},e,p),t.forEach(h=>h(e,f))}},i=()=>e,l={setState:n,getState:i,getInitialState:()=>d,subscribe:c=>(t.add(c),()=>t.delete(c))},d=e=r(n,i,l);return l},wi=(r=>r?Zt(r):Zt),zr={Page:1,PageSize:25},Jt={filters:zr,filterItems:[],sortItems:[],hideItems:{},groupByArr:[],activeTableView:be.TABLE},Ci=()=>wi((r,e)=>({columns:[],...Jt,isHydrated:!1,hasDeleteBtn:!1,selectedConfig:null,setSelectedConfig:t=>r({selectedConfig:t}),configsVersion:0,bumpConfigsVersion:()=>r(t=>({configsVersion:t.configsVersion+1})),hydrateFromStorage:(t,n=be.TABLE)=>{if(e().isHydrated)return;const i=sessionStorage.getItem(t);if(i)try{const o=JSON.parse(i);r({filters:o.filters??zr,filterItems:o.filterItems??[],sortItems:o.sortItems??[],activeTableView:o.activeTableView??n,hideItems:o.hideItems??{},groupByArr:o.groupByArr??[],selectedConfig:o.selectedConfig??null,isHydrated:!0});return}catch{console.warn("Failed to hydrate grid view state")}r({activeTableView:n,isHydrated:!0})},hasCreateBtn:!1,setHasCreateBtn:t=>r({hasCreateBtn:!!t}),checkedValue:!0,setCheckedValue:t=>r({checkedValue:t}),hasSelect:!1,setHasSelect:t=>r({hasSelect:!!t}),setFilters:t=>{e().isHydrated&&r({filters:t})},setSortItems:t=>{e().isHydrated&&(r({sortItems:t}),r(n=>{const{Sort:i,Asc:o,...s}=n.filters,l=t.length>0?{Sort:t[0].param,Asc:t[0].direction===oe.ASC}:{};return{filters:{...s,...l}}}))},setFilterItems:(t,n=!1)=>{if(!e().isHydrated||(r({filterItems:t}),!n))return;const{filters:i,sortItems:o}=e(),{PageSize:s,Sort:l,Asc:d,QuickSearch:c}=i,u={};t.forEach(p=>{u[p.dataIndex]=p.filterValue,p.isCountryGroup!==void 0&&(u.isCountryGroup=p.isCountryGroup)}),r({filters:{Page:1,PageSize:s,QuickSearch:c||"",...o.length>0?{Sort:l,Asc:d}:{},...u}})},setHideItems:t=>r({hideItems:t}),setGroupByArr:t=>r({groupByArr:t}),setActiveTableView:t=>r({activeTableView:t}),setColumns:t=>r({columns:t}),resetStore:()=>{r({...Jt,isHydrated:!0,selectedConfig:null})}})),Hr=x.createContext(null),ji=({children:r})=>{const e=x.useRef();return e.current||(e.current=Ci()),a.jsx(Hr.Provider,{value:e.current,children:r})},D=r=>{const e=x.useContext(Hr);if(!e)throw new Error("GridViewStoreProvider is missing");return Ot.useStore(e,r)},Si=()=>{const r=D(u=>u.hydrateFromStorage),e=D(u=>u.isHydrated),t=D(u=>u.filters),n=D(u=>u.filterItems),i=D(u=>u.sortItems),o=D(u=>u.hideItems),s=D(u=>u.groupByArr),l=D(u=>u.activeTableView),d=D(u=>u.selectedConfig),c=re.useLocation();x.useEffect(()=>(r(`grid-filters:${c.pathname}`),sessionStorage.clear()),[]),x.useEffect(()=>{e&&sessionStorage.setItem(`grid-filters:${c.pathname}`,JSON.stringify({filters:t,filterItems:n,sortItems:i,activeTableView:l,hideItems:o,groupByArr:s,selectedConfig:d}))},[t,n,i,l,o,s,d,e])};function Rr(r){const[e,t]=x.useState(0);return x.useEffect(()=>{if(!r.current)return;const n=new ResizeObserver(([i])=>{t(i.contentRect.height)});return n.observe(r.current),t(r.current.clientHeight),()=>n.disconnect()},[r]),e}const{RangePicker:ki}=T.DatePicker,Li=m.div`
431
431
  background: var(--color-bg-primary, #fff);
432
432
  `,Ei=m.div`
433
433
  height: var(--size-800, 4rem);
@@ -819,7 +819,7 @@
819
819
  overflow: hidden;
820
820
  `,zi=m.div`
821
821
  height: ${r=>r.height||"100%"};
822
- `,at=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),$.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),$.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Ar=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),Fr=r=>$.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),$.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),$.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),$.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),Pt=(r,e,t=[])=>{const n=x.useMemo(()=>Nn.debounce(r,e),t);return x.useEffect(()=>()=>{n.cancel()},[n]),n},zt=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),Ht=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),Hi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),$.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Ri=({children:r,overlay:e,placement:t="bottomRight"})=>{const[n,i]=x.useState(!1);return o.jsx(T.Dropdown,{open:n,onOpenChange:i,placement:t,popupRender:()=>typeof e=="function"?e(i):e,trigger:["click"],children:o.jsx("button",{className:"icon",children:r})})},Vr=({placement:r,children:e})=>{const t=D(f=>f.columns),n=D(f=>f.sortItems),i=D(f=>f.setSortItems),a=n[0],[s,l]=x.useState(""),[d,c]=x.useState((a==null?void 0:a.direction)===ae.ASC?ae.ASC:ae.DESC),u=t.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())&&f.sortable!==!1);function p(f,g){i([{title:f.title,dataIndex:f.dataIndex.charAt(0).toUpperCase()+f.dataIndex.slice(1),direction:g}])}function h(){i([])}return o.jsx(Ri,{overlay:f=>o.jsxs(Mt,{children:[o.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),o.jsx("div",{children:u.map((g,v)=>o.jsxs("button",{onClick:()=>{g.title==(a==null?void 0:a.title)?h():p(g,d)},children:[g.title,g.title==(a==null?void 0:a.title)&&o.jsx("span",{children:o.jsx(Ue,{})})]},v))}),o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>{c(ae.ASC),a&&p(a,ae.ASC)},children:[o.jsx(zt,{}),"Ascending",d===ae.ASC&&o.jsx(Ue,{})]}),o.jsxs("button",{onClick:()=>{c(ae.DESC),a&&p(a,ae.DESC)},children:[o.jsx(Ht,{}),"Descending",d===ae.DESC&&o.jsx(Ue,{})]})]})]}),placement:r||"bottomRight",children:e||o.jsx(Hi,{})})},Rt=({placement:r,children:e,onSelect:t,CustomFilters:n})=>{const[i,a]=x.useState(!1),[s,l]=x.useState(""),d=D(h=>h.columns),c=D(h=>h.filterItems),u=D(h=>h.setFilterItems);function p(h){t?t(h):u([...c,{...h,selectType:Te.VALUE}]),a(!1)}return o.jsx(T.Dropdown,{open:i,onOpenChange:a,placement:r||"bottomRight",popupRender:()=>o.jsxs(Mt,{children:[o.jsx("input",{type:"text",placeholder:Z("Search")+"...",value:s,onChange: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))}),n&&o.jsx(n,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:a})]}),trigger:["click"],children:o.jsx("button",{className:"icon",children:e})})},Ni={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Ai={okText:"Create",cancelText:"Cancel"},Le=Ot.create((r,e)=>{const t=n=>({...n,popupOptions:{...Ni,...n.popupOptions},footerOptions:{...Ai,...n.footerOptions},hideFooter:n.hideFooter??!1,onCancel:n.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:n=>r({options:t(n)}),openModal:n=>r({isOpen:!0,options:t(n)}),open:()=>r(n=>n.options?{...n,isOpen:!0}:n),close:()=>r({isOpen:!1}),setOnOk:n=>r(i=>i.options?{options:{...i.options,onOk:n}}:i),setOnCancel:n=>r(i=>i.options?{options:{...i.options,onCancel:n}}:i),setComponentProps:n=>r(i=>i.options?{options:{...i.options,componentProps:{...i.options.componentProps,...n}}}:i),setPopupOptions:n=>r(i=>i.options?{options:{...i.options,popupOptions:{...i.options.popupOptions,...n}}}:i),setFooterOptions:n=>r(i=>i.options?{options:{...i.options,footerOptions:n==null?void 0:{...i.options.footerOptions,...n}}}:i),setHideFooter:n=>r(i=>i.options?{options:{...i.options,hideFooter:n,footerOptions:n?void 0:i.options.footerOptions}}:i),setTitle:n=>r(i=>i.options?{options:{...i.options,title:n}}:i)}}),Qt=m(T.Select)`
822
+ `,ot=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z",fill:"#131412"}),$.createElement("path",{d:"M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z",fill:"#131412"}),$.createElement("path",{d:"M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z",fill:"#131412"})),Ar=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z",fill:"currentColor"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z",fill:"currentColor"})),Fr=r=>$.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M4 12H0V8H4V12Z",fill:"white"}),$.createElement("path",{d:"M12 12H8V8H12V12Z",fill:"white"}),$.createElement("path",{d:"M4 4H0V0H4V4Z",fill:"white"}),$.createElement("path",{d:"M12 4H8V0H12V4Z",fill:"white"})),Pt=(r,e,t=[])=>{const n=x.useMemo(()=>Nn.debounce(r,e),t);return x.useEffect(()=>()=>{n.cancel()},[n]),n},zt=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z",fill:"currentColor",fillOpacity:.75})),Ht=r=>$.createElement("svg",{width:24,height:24,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z",fill:"currentColor",fillOpacity:.75})),Hi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z",fill:"#131412"}),$.createElement("path",{d:"M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z",fill:"#131412"})),Ri=({children:r,overlay:e,placement:t="bottomRight"})=>{const[n,i]=x.useState(!1);return a.jsx(T.Dropdown,{open:n,onOpenChange:i,placement:t,popupRender:()=>typeof e=="function"?e(i):e,trigger:["click"],children:a.jsx("button",{className:"icon",children:r})})},Vr=({placement:r,children:e})=>{const t=D(h=>h.columns),n=D(h=>h.sortItems),i=D(h=>h.setSortItems),o=n[0],[s,l]=x.useState(""),[d,c]=x.useState((o==null?void 0:o.direction)===oe.ASC?oe.ASC:oe.DESC),u=t.filter(h=>h.title.toLowerCase().includes(s.toLowerCase())&&h.sortable!==!1);function p(h,g){i([{title:h.title,dataIndex:h.dataIndex.charAt(0).toUpperCase()+h.dataIndex.slice(1),direction:g}])}function f(){i([])}return a.jsx(Ri,{overlay:h=>a.jsxs(Mt,{children:[a.jsx("input",{type:"text",placeholder:"Search...",value:s,onChange:g=>l(g.target.value)}),a.jsx("div",{children:u.map((g,v)=>a.jsxs("button",{onClick:()=>{g.title==(o==null?void 0:o.title)?f():p(g,d)},children:[g.title,g.title==(o==null?void 0:o.title)&&a.jsx("span",{children:a.jsx(Ue,{})})]},v))}),a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>{c(oe.ASC),o&&p(o,oe.ASC)},children:[a.jsx(zt,{}),"Ascending",d===oe.ASC&&a.jsx(Ue,{})]}),a.jsxs("button",{onClick:()=>{c(oe.DESC),o&&p(o,oe.DESC)},children:[a.jsx(Ht,{}),"Descending",d===oe.DESC&&a.jsx(Ue,{})]})]})]}),placement:r||"bottomRight",children:e||a.jsx(Hi,{})})},Rt=({placement:r,children:e,onSelect:t,CustomFilters:n})=>{const[i,o]=x.useState(!1),[s,l]=x.useState(""),d=D(f=>f.columns),c=D(f=>f.filterItems),u=D(f=>f.setFilterItems);function p(f){t?t(f):u([...c,{...f,selectType:Te.VALUE}]),o(!1)}return a.jsx(T.Dropdown,{open:i,onOpenChange:o,placement:r||"bottomRight",popupRender:()=>a.jsxs(Mt,{children:[a.jsx("input",{type:"text",placeholder:Z("Search")+"...",value:s,onChange:f=>l(f.target.value)}),a.jsx("div",{children:d.filter(f=>f.filterable!==!1).filter(f=>!c.some(h=>h.title==f.title)).filter(f=>f.filterable!==!1).filter(f=>f.title.toLowerCase().includes(s)).map((f,h)=>a.jsx("button",{onClick:()=>p(f),children:f.title},h))}),n&&a.jsx(n,{setFilterItems:u,filterItems:c,columns:d,setDropdownOpen:o})]}),trigger:["click"],children:a.jsx("button",{className:"icon",children:e})})},Ni={open:!0,closeIcon:!1,footer:null,maskClosable:!0},Ai={okText:"Create",cancelText:"Cancel"},Le=Ot.create((r,e)=>{const t=n=>({...n,popupOptions:{...Ni,...n.popupOptions},footerOptions:{...Ai,...n.footerOptions},hideFooter:n.hideFooter??!1,onCancel:n.onCancel??(()=>e().close())});return{options:null,isOpen:!1,store:n=>r({options:t(n)}),openModal:n=>r({isOpen:!0,options:t(n)}),open:()=>r(n=>n.options?{...n,isOpen:!0}:n),close:()=>r({isOpen:!1}),setOnOk:n=>r(i=>i.options?{options:{...i.options,onOk:n}}:i),setOnCancel:n=>r(i=>i.options?{options:{...i.options,onCancel:n}}:i),setComponentProps:n=>r(i=>i.options?{options:{...i.options,componentProps:{...i.options.componentProps,...n}}}:i),setPopupOptions:n=>r(i=>i.options?{options:{...i.options,popupOptions:{...i.options.popupOptions,...n}}}:i),setFooterOptions:n=>r(i=>i.options?{options:{...i.options,footerOptions:n==null?void 0:{...i.options.footerOptions,...n}}}:i),setHideFooter:n=>r(i=>i.options?{options:{...i.options,hideFooter:n,footerOptions:n?void 0:i.options.footerOptions}}:i),setTitle:n=>r(i=>i.options?{options:{...i.options,title:n}}:i)}}),Qt=m(T.Select)`
823
823
  width: 200px;
824
824
 
825
825
  display: flex;
@@ -846,7 +846,7 @@
846
846
  line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
847
847
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
848
848
  }
849
- `,Xt={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},Nt=()=>{const{pathname:r}=re.useLocation(),e=Object.keys(Xt).find(t=>r===t||r.startsWith(t+"/"));return e?Xt[e]:void 0};function Br(r,e){return e.label.toLowerCase().includes(r.toLowerCase())||e.value==r}const Fi=({setisSettingPopupVisible:r,CustomFilters:e,tableAdditionalFields:t,createIsModal:n,exportButton:i,hasSelect:a,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=re.useNavigate(),u=D(b=>b.filters),p=D(b=>b.hasCreateBtn),h=D(b=>b.setFilters),f=D(b=>b.setFilterItems),g=D(b=>b.setSortItems),[v,L]=x.useState(()=>{var b,C;try{const I=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return I?!!((C=(b=JSON.parse(I))==null?void 0:b.filters)!=null&&C.QuickSearch):!1}catch{return!1}}),[M,j]=x.useState(!1),{open:O}=Le(),[S,z]=x.useState(!1),{getMyFilters:U}=me(),Y=Nt(),[B,F]=x.useState([]),H=D(b=>b.selectedConfig),y=D(b=>b.setSelectedConfig),R=D(b=>b.configsVersion);x.useEffect(()=>{Y==null||!U||U(String(Y)).then(b=>F(b.data??[]))},[Y,R,U]);function _(b){const C=B.find(A=>A.id===b);if(!C)return;const{filterItems:I,sortItems:P}=JSON.parse(C.value);f(I,!0),g(P),y({id:C.id,name:C.name})}const E=Pt(b=>{h({...u,QuickSearch:b.target.value})},500);function k(){r(!0)}function w(){n?O():c("new")}return o.jsxs(Ei,{children:[!d&&o.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:o.jsx(Fr,{})}),l&&o.jsx(l,{}),o.jsxs("div",{className:"page-actions",children:[B.length>0&&o.jsx(Qt,{showSearch:!0,placeholder:V("SavedConfiguration"),options:B.map(b=>({value:b.id,label:b.name})),value:(H==null?void 0:H.id)??null,filterOption:Br,onChange:b=>b!=null?_(b):y(null)}),a&&s&&o.jsx("div",{children:o.jsx(Qt,{options:s.options,placeholder:s.placeholder,onChange:b=>{s.onChange(b??null)}})}),t&&t(S,z),v?o.jsx("input",{type:"text",placeholder:Z("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:E}):o.jsx("button",{onClick:()=>L(!0),children:Z("Search")}),o.jsx(Vr,{}),o.jsx(Rt,{CustomFilters:e,children:o.jsx(at,{})}),o.jsx("button",{className:"icon",onClick:k,children:o.jsx(Ar,{})}),i&&i,p&&o.jsx("button",{onClick:w,className:"create-btn",children:Z("Create")})]}),M&&o.jsx(It,{})]})},Vi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),_r=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),be=class be{static equals(e,t){const n=e??null,i=t??null;return n===i?!0:!n||!i?!1:n.getTime()===i.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const n=t.getMonth()+1,i=t.getDate(),a=t.getFullYear(),s=n<10?`0${n}`:`${n}`,l=i<10?`0${i}`:`${i}`;return`${s}/${l}/${a}`}static toLocal(e,t=!1,n=!1){const i=this.parseDate(e);return i?(t&&i.setHours(0,0,0,0),n&&i.setHours(23,59,59,999),this.utcToLocal(i)):null}static getDates(e,t){const n=new Array;let i=new Date(e.valueOf());for(;i<=t;)n.push(new Date(i)),i=this.addDays(i,1);return n}static dateOnly(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}/${n}/${i}`}static dateWithDashes(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}-${n}-${i}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,a=t.getDate();return`${n}-${i<10?"0":""}${i}-${a<10?"0":""}${a}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,a=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${n}-${i<10?"0":""}${i}-${a<10?"0":""}${a} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=t.getDate(),s=t.getFullYear();return`${i} ${a}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=e.getFullYear(),i=e.getMonth()+1,a=e.getDate(),s=`${n}/${i}/${a}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=t.getDate(),a=t.getMonth();return`${n} ${a}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),i=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${n}, ${i}`}static toISOTimeString(e){const t=be.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes(),a=t.getSeconds();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}:${a<10?"0":""}${a}`}static toTimeInput(e){const t=be.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const n=e;return n.setFullYear(e.getFullYear()+t),n}static addMonths(e,t){if(!t)return e;const n=e;return n.setMonth(n.getMonth()+t),n}static addDays(e,t){if(!t)return e;const n=e;return n.setDate(n.getDate()+t),n}static addHours(e,t){if(!t)return e;const n=new Date(e);return n.setHours(n.getHours()+t),n}static addMinutes(e,t){if(!t)return e;const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}static addSeconds(e,t){if(!t)return e;const n=e;return n.setSeconds(n.getSeconds()+t),n}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const n=this.toDate(e),a=(t?t.getTime():Date.now())-n.getTime();return Math.floor(a/864e5/365.25)}static subtractMonths(e,t){const n=t<=e?t:e,i=t<=e?e:t,a=t<=e?1:-1;let s=(i.getFullYear()-n.getFullYear())*12;return s-=n.getMonth(),s+=i.getMonth(),s*a}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const n=parseFloat(e);if(!isNaN(e-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[a,s,l]=e.split("-").map(d=>+d);return new Date(a,s-1,l)}let i;if(i=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(i)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let n=0,i=0;const a=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),a.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-n,d=Number(e[5]||0)-i,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};et(be,"getCommonDateRange",e=>{let t=new Date,n=new Date;switch(e){case"week":n.setDate(t.getDate()-7);break;case"month":n.setDate(t.getDate()-30);break;case"threeMonth":n.setMonth(t.getMonth()-3),n.setDate(1);break;case"sixMonth":n.setMonth(t.getMonth()-6),n.setDate(1);break;case"twelveMonth":n.setMonth(t.getMonth()-12),n.setDate(1);break;case"year":n.setMonth(0),n.setDate(1);break;case"all":t=null,n=null;break;case"custom":break;default:n.setDate(t.getDate()-7)}return{startDate:n?be.toISODateString(n):null,endDate:t?be.toISODateString(t):null}}),et(be,"_utcDiff",-new Date().getTimezoneOffset()*6e4),et(be,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let oe=be;const Bi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),At=m(Bi)`
849
+ `,Xt={"/reports/activity-report":1,"/reports/commission-report":2,"/reports/deposit-report":3,"/reports/media-report":4,"/reports/payments-report":5,"/reports/registation-report":6,"/affiliate-manager":7,"/end-user":8,"/marketing-tools":9,"/sub-affiliates":10,"/affiliate-users":14,"/country-group":11,"/email-constructor":15,"/roles":12,"/tags":13},Nt=()=>{const{pathname:r}=re.useLocation(),e=Object.keys(Xt).find(t=>r===t||r.startsWith(t+"/"));return e?Xt[e]:void 0};function Br(r,e){return e.label.toLowerCase().includes(r.toLowerCase())||e.value==r}const Fi=({setisSettingPopupVisible:r,CustomFilters:e,tableAdditionalFields:t,createIsModal:n,exportButton:i,hasSelect:o,selectProps:s,GridPageTopLeftComponent:l,noNeedSidebarResponsiveButton:d})=>{const c=re.useNavigate(),u=D(b=>b.filters),p=D(b=>b.hasCreateBtn),f=D(b=>b.setFilters),h=D(b=>b.setFilterItems),g=D(b=>b.setSortItems),[v,L]=x.useState(()=>{var b,C;try{const I=sessionStorage.getItem(`grid-filters:${window.location.pathname}`);return I?!!((C=(b=JSON.parse(I))==null?void 0:b.filters)!=null&&C.QuickSearch):!1}catch{return!1}}),[M,j]=x.useState(!1),{open:O}=Le(),[S,z]=x.useState(!1),{getMyFilters:U}=we(),Y=Nt(),[B,F]=x.useState([]),H=D(b=>b.selectedConfig),y=D(b=>b.setSelectedConfig),R=D(b=>b.configsVersion);x.useEffect(()=>{Y==null||!U||U(String(Y)).then(b=>F(b.data??[]))},[Y,R,U]);function _(b){const C=B.find(A=>A.id===b);if(!C)return;const{filterItems:I,sortItems:P}=JSON.parse(C.value);h(I,!0),g(P),y({id:C.id,name:C.name})}const E=Pt(b=>{f({...u,QuickSearch:b.target.value})},500);function k(){r(!0)}function w(){n?O():c("new")}return a.jsxs(Ei,{children:[!d&&a.jsx("button",{className:"icon sidebar",onClick:()=>j(!0),children:a.jsx(Fr,{})}),l&&a.jsx(l,{}),a.jsxs("div",{className:"page-actions",children:[B.length>0&&a.jsx(Qt,{showSearch:!0,placeholder:V("SavedConfiguration"),options:B.map(b=>({value:b.id,label:b.name})),value:(H==null?void 0:H.id)??null,filterOption:Br,onChange:b=>b!=null?_(b):y(null)}),o&&s&&a.jsx("div",{children:a.jsx(Qt,{options:s.options,placeholder:s.placeholder,onChange:b=>{s.onChange(b??null)}})}),t&&t(S,z),v?a.jsx("input",{type:"text",placeholder:Z("QuickSearch"),defaultValue:(u==null?void 0:u.QuickSearch)??"",onChange:E}):a.jsx("button",{onClick:()=>L(!0),children:Z("Search")}),a.jsx(Vr,{}),a.jsx(Rt,{CustomFilters:e,children:a.jsx(ot,{})}),a.jsx("button",{className:"icon",onClick:k,children:a.jsx(Ar,{})}),i&&i,p&&a.jsx("button",{onClick:w,className:"create-btn",children:Z("Create")})]}),M&&a.jsx(It,{})]})},Vi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z",fill:"white"})),_r=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z",fill:"#131412"})),ye=class ye{static equals(e,t){const n=e??null,i=t??null;return n===i?!0:!n||!i?!1:n.getTime()===i.getTime()}static toMMddyyyy(e){const t=this.parseDate(e);if(!t)return null;const n=t.getMonth()+1,i=t.getDate(),o=t.getFullYear(),s=n<10?`0${n}`:`${n}`,l=i<10?`0${i}`:`${i}`;return`${s}/${l}/${o}`}static toLocal(e,t=!1,n=!1){const i=this.parseDate(e);return i?(t&&i.setHours(0,0,0,0),n&&i.setHours(23,59,59,999),this.utcToLocal(i)):null}static getDates(e,t){const n=new Array;let i=new Date(e.valueOf());for(;i<=t;)n.push(new Date(i)),i=this.addDays(i,1);return n}static dateOnly(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}/${n}/${i}`}static dateWithDashes(e){const t=e.getFullYear(),n=e.getMonth()+1,i=e.getDate();return`${t}-${n}-${i}`}static today(){return this.dateOnly(new Date)}static toISODateString(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,o=t.getDate();return`${n}-${i<10?"0":""}${i}-${o<10?"0":""}${o}`}static toISODateStringWithTime(e){const t=this.parseDate(e);if(!t)return null;const n=t.getFullYear(),i=t.getMonth()+1,o=t.getDate(),s=t.getHours(),l=t.getMinutes(),d=`${s<10?"0":""}${s}:${l<10?"0":""}${l}`;return`${n}-${i<10?"0":""}${i}-${o<10?"0":""}${o} `+d}static monthDayYear(e){const t=this.parseDate(e);if(!t)return null;const i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],o=t.getDate(),s=t.getFullYear();return`${i} ${o}, ${s}`}static withdrawalTableDateFormat(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=e.getFullYear(),i=e.getMonth()+1,o=e.getDate(),s=`${n}/${i}/${o}`,l=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${s}, ${l}`}static getDateOnlyMonthAndNumber(e){if(!e)return"";const t=new Date(e);if(isNaN(t.getTime()))return"";const n=t.getDate(),o=t.getMonth();return`${n} ${o}`}static fromDateOrStringToTable(e){const t=this.parseDate(e);if(!t||isNaN(t.getTime()))return null;const n=t.toLocaleString("en-US",{month:"long",day:"numeric",year:"numeric"}),i=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1});return`${n}, ${i}`}static toISOTimeString(e){const t=ye.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes(),o=t.getSeconds();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}:${o<10?"0":""}${o}`}static toTimeInput(e){const t=ye.parseDate(e);if(!t)return null;const n=t.getHours(),i=t.getMinutes();return`${n<10?"0":""}${n}:${i<10?"0":""}${i}`}static utcToLocal(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static localToUtc(e){const t=e instanceof Date?e:new Date(e);return new Date(t.getTime()+this._utcDiff)}static addYears(e,t){if(!t)return e;const n=e;return n.setFullYear(e.getFullYear()+t),n}static addMonths(e,t){if(!t)return e;const n=e;return n.setMonth(n.getMonth()+t),n}static addDays(e,t){if(!t)return e;const n=e;return n.setDate(n.getDate()+t),n}static addHours(e,t){if(!t)return e;const n=new Date(e);return n.setHours(n.getHours()+t),n}static addMinutes(e,t){if(!t)return e;const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}static addSeconds(e,t){if(!t)return e;const n=e;return n.setSeconds(n.getSeconds()+t),n}static isToday(e){const t=new Date;return this.isSameDate(e,t)}static clone(e){return new Date(+e)}static isAnotherMonth(e,t){return t&&e.getMonth()!==t.getMonth()}static isWeekend(e){return e.getDay()===0||e.getDay()===6}static isSameDate(e,t){return t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}static getAge(e,t){if(e==null||e===""||e!==e)return null;const n=this.toDate(e),o=(t?t.getTime():Date.now())-n.getTime();return Math.floor(o/864e5/365.25)}static subtractMonths(e,t){const n=t<=e?t:e,i=t<=e?e:t,o=t<=e?1:-1;let s=(i.getFullYear()-n.getFullYear())*12;return s-=n.getMonth(),s+=i.getMonth(),s*o}static subtractDays(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n/864e5)}static subtractHours(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5/36e5)}static subtractMinutes(e,t){if(!t)return null;t=this.toDate(t);const n=t.getTime()-e.getTime();return Math.floor(n%864e5%36e5/6e4)}static parseDate(e){return typeof e>"u"||e==null||e===""?null:this.toDate(e)}static toDate(e){if(this.isDate(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){e=e.trim();const n=parseFloat(e);if(!isNaN(e-n))return new Date(n);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[o,s,l]=e.split("-").map(d=>+d);return new Date(o,s-1,l)}let i;if(i=e.match(this.ISO8601_DATE_REGEX))return this.isoStringToDate(i)}const t=new Date(e);if(!this.isDate(t))throw new Error(`Unable to convert "${e}" into a date`);return t}static isoStringToDate(e){const t=new Date(0);let n=0,i=0;const o=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),o.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const l=Number(e[4]||0)-n,d=Number(e[5]||0)-i,c=Number(e[6]||0),u=Math.round(parseFloat("0."+(e[7]||0))*1e3);return s.call(t,l,d,c,u),t}static isDate(e){return e instanceof Date&&!isNaN(e.valueOf())}};et(ye,"getCommonDateRange",e=>{let t=new Date,n=new Date;switch(e){case"week":n.setDate(t.getDate()-7);break;case"month":n.setDate(t.getDate()-30);break;case"threeMonth":n.setMonth(t.getMonth()-3),n.setDate(1);break;case"sixMonth":n.setMonth(t.getMonth()-6),n.setDate(1);break;case"twelveMonth":n.setMonth(t.getMonth()-12),n.setDate(1);break;case"year":n.setMonth(0),n.setDate(1);break;case"all":t=null,n=null;break;case"custom":break;default:n.setDate(t.getDate()-7)}return{startDate:n?ye.toISODateString(n):null,endDate:t?ye.toISODateString(t):null}}),et(ye,"_utcDiff",-new Date().getTimezoneOffset()*6e4),et(ye,"ISO8601_DATE_REGEX",/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);let ae=ye;const Bi=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z",fill:"currentColor",fillOpacity:.75})),At=m(Bi)`
850
850
  width: 25px;
851
851
  height: 25px;
852
852
  cursor: pointer;
@@ -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
- `,Gi=r=>new Promise((e,t)=>{const n=new FileReader;n.readAsDataURL(r),n.onload=()=>e(n.result),n.onerror=i=>t(i)});function Yr(r){return r&&r.charAt(0).toLowerCase()+r.slice(1)}const Kr=async r=>{try{await navigator.clipboard.writeText(r),T.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function qr(r,e){if(r.status===400){const t=r.response.data,n=[];for(const i in t.errors)n.push({name:Yr(i),errors:t.errors[i]});e.setFields(n)}}const Zr=({type:r,value:e,selectedConfig:t,onSuccess:n,postMyFilter:i,putMyFilter:a})=>{const[s]=T.Form.useForm(),l=Le(c=>c.setOnOk),d=Le(c=>c.close);return x.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),x.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await a({id:t.id,type:r,name:c.name,value:e??""}):await i({type:r,name:c.name,value:e??""}),n==null||n(c.name),d()}catch(c){const u=qr(c,s);s.setFields(u)}})},[r,e,t,n,s,l,d]),o.jsxs(T.Form,{form:s,children:[o.jsx(le,{children:V("ConfigurationName")}),o.jsx(T.Form.Item,{name:"name",children:o.jsx(pt,{})})]})},Wi=r=>$.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),ce=m(Wi)`
1198
+ `,Gi=r=>new Promise((e,t)=>{const n=new FileReader;n.readAsDataURL(r),n.onload=()=>e(n.result),n.onerror=i=>t(i)});function Yr(r){return r&&r.charAt(0).toLowerCase()+r.slice(1)}const Kr=async r=>{try{await navigator.clipboard.writeText(r),T.notification.success({className:"bottom-right-notification",placement:"bottomRight",message:"Copy To Clipboard"})}catch{T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Failed to copy text."})}};function qr(r,e){if(r.status===400){const t=r.response.data,n=[];for(const i in t.errors)n.push({name:Yr(i),errors:t.errors[i]});e.setFields(n)}}const Zr=({type:r,value:e,selectedConfig:t,onSuccess:n,postMyFilter:i,putMyFilter:o})=>{const[s]=T.Form.useForm(),l=Le(c=>c.setOnOk),d=Le(c=>c.close);return x.useEffect(()=>{t&&s.setFieldsValue({name:t.name})},[t,s]),x.useEffect(()=>{l(async()=>{try{const c=await s.validateFields();t?await o({id:t.id,type:r,name:c.name,value:e??""}):await i({type:r,name:c.name,value:e??""}),n==null||n(c.name),d()}catch(c){const u=qr(c,s);s.setFields(u)}})},[r,e,t,n,s,l,d]),a.jsxs(T.Form,{form:s,children:[a.jsx(le,{children:V("ConfigurationName")}),a.jsx(T.Form.Item,{name:"name",children:a.jsx(pt,{})})]})},Wi=r=>$.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z",fill:"currentColor"})),ce=m(Wi)`
1199
1199
  cursor: pointer;
1200
1200
  svg {
1201
1201
  width: 1rem;
@@ -1205,7 +1205,7 @@
1205
1205
  transition: 0.1s;
1206
1206
  }
1207
1207
  }
1208
- `,Yi=()=>o.jsx(je,{children:o.jsx("div",{children:o.jsx("p",{children:V("DeleteRecordQuestion")})})}),Ki=m(T.Checkbox)`
1208
+ `,Yi=()=>a.jsx(je,{children:a.jsx("div",{children:a.jsx("p",{children:V("DeleteRecordQuestion")})})}),Ki=m(T.Checkbox)`
1209
1209
  .ant-checkbox-inner {
1210
1210
  background-color: transparent;
1211
1211
  border: 1px solid #ccc;
@@ -1230,7 +1230,7 @@
1230
1230
  .ant-checkbox-checked .ant-checkbox-inner::after {
1231
1231
  border-color: black;
1232
1232
  }
1233
- `,qi=({item:r})=>{var j,O,S,z,U,Y,B,F,H;const e=x.useRef(null),t=D(y=>y.filterItems),n=D(y=>y.setFilterItems),[i,a]=x.useState(r.selectType==Te.VALUE);function s(){var y;(y=e==null?void 0:e.current)==null||y.focus()}function l(y){n(t.map(R=>R.title==r.title?{...R,filterValue:y.id,filterLabel:y.name}:R),!0),a(!1)}function d(y,R=!1){n(t.map(_=>_.title==r.title?{..._,filterValue:y.id,filterLabel:y.name,isCountryGroup:R}:_),!0),a(!1)}const[c,u]=x.useState(r.filterValue||[]),p=y=>{var E,k;const R=c.includes(y)?c.filter(w=>w!==y):[...c,y];u(R);const _=(k=(E=r==null?void 0:r.filters)==null?void 0:E.options)==null?void 0:k.filter(w=>R.includes(w.id)).map(w=>w.name).join(", ");n(t.map(w=>w.title===r.title?{...w,filterValue:R,filterLabel:_||""}:w),!0)};function h(y){n(t.map(R=>R.title==r.title?{...y,selectType:Te.VALUE}:R))}const f=Pt(y=>{const R=y.target.value;n(t.map(_=>_.title==r.title?{..._,filterValue:R}:_),!0)},500);function g(y){n(t.map(R=>R.title==r.title?{...R,selectType:Te.NONE}:R)),a(y)}function v(){n(t.filter(y=>y.title!=r.title),!0)}x.useEffect(()=>{var y;i&&((y=r==null?void 0:r.filters)==null?void 0:y.type)!==fe.SELECT&&setTimeout(()=>{s()},0)},[i]);const L={[fe.INPUT]:o.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:f}),[fe.SELECT]:o.jsx("div",{children:(O=(j=r==null?void 0:r.filters)==null?void 0:j.options)==null?void 0:O.map(y=>o.jsx("button",{onClick:()=>l(y),children:y.name},y.id))}),[fe.TwoComponentSelect]:o.jsxs(o.Fragment,{children:[o.jsx(Mi,{children:(S=r==null?void 0:r.filters)==null?void 0:S.firstGroupName}),o.jsx(Pi,{children:(U=(z=r==null?void 0:r.filters)==null?void 0:z.options)==null?void 0:U.map(y=>o.jsx("button",{onClick:()=>d(y,!1),children:y.name},y.id))})]}),[fe.MULTISELECT]:o.jsx("div",{children:(B=(Y=r==null?void 0:r.filters)==null?void 0:Y.options)==null?void 0:B.map(y=>o.jsx(Ii,{children:o.jsx(Ki,{onChange:()=>p(y==null?void 0:y.id),children:o.jsx($i,{children:y.name})})},y.id))}),[fe.DATEPICKER]:o.jsx(Nr,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:y=>{if(!y)n(t.map(R=>R.title===r.title?{...R,filterValue:null,filterLabel:""}:R),!0);else{const R=y.map((_,E)=>{var k;return _?(k=oe.toLocal(_,E===0,E===y.length-1))==null?void 0:k.toISOString():null});n(t.map(_=>_.title===r.title?{..._,filterValue:R,filterLabel:`${y[0].format("MMM D, YYYY")} → ${y[1].format("MMM D, YYYY")}`}:_),!0)}a(!1)},getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body}})},M=o.jsx(Mt,{style:{border:((F=r==null?void 0:r.filters)==null?void 0:F.type)===fe.DATEPICKER?"none":"inherit"},children:L[((H=r==null?void 0:r.filters)==null?void 0:H.type)||fe.INPUT]});return o.jsxs(bt,{children:[o.jsx(Rt,{placement:"bottomLeft",onSelect:h,children:o.jsxs("span",{children:[o.jsx(Ar,{}),r.title]})}),o.jsx(T.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:i,onOpenChange:g,popupRender:()=>M,trigger:["click"],getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body},children:o.jsx("div",{children:r.filterValue?r.filterLabel?r.filterLabel:r.filterValue:"NotSelected"})}),o.jsx("span",{onClick:v,children:o.jsx(At,{})})]})},Zi=()=>{const r=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),n=D(g=>g.resetStore),i=D(g=>g.selectedConfig),{deleteMyFilter:a}=me(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=Le(),u=Nt();async function p(){try{if(!i||!a)return;await a(i.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function h(){d({component:Yi,title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(Ne,{onClick:()=>{p(),c(),n()},children:o.jsxs("span",{className:"arrow-styled",children:["Delete",o.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}function f(){const g=JSON.stringify({filterItems:r,sortItems:e});d({component:Zr,componentProps:{type:u,value:g,selectedConfig:i,onSuccess:v=>{i&&t({...i,name:v}),s()}},title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:o.jsx(Ne,{children:o.jsxs("span",{className:"arrow-styled",children:["Save",o.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}return o.jsxs(Di,{children:[e.length>0&&o.jsx(Vr,{placement:"bottomLeft",children:o.jsx(bt,{className:"sort",children:o.jsxs("span",{children:[e[0].title,e[0].direction==ae.ASC?o.jsx(zt,{}):o.jsx(Ht,{})]})})}),r.map(g=>o.jsx(qi,{item:g},g.title)),o.jsx(Rt,{placement:"bottomLeft",children:o.jsx(bt,{className:"add-filter",children:o.jsxs("span",{children:[o.jsx(Vi,{}),"AddFilter"]})})}),o.jsxs(Ti,{children:[o.jsx("button",{onClick:f,children:i?"UpdateConfiguration":"SaveConfiguration"}),i&&o.jsx("button",{onClick:h,children:"DeleteConfiguration"}),o.jsxs("button",{onClick:n,children:[o.jsx(_r,{}),"ResetConditions"]})]})]})},Ji=m.div`
1233
+ `,qi=({item:r})=>{var j,O,S,z,U,Y,B,F,H;const e=x.useRef(null),t=D(y=>y.filterItems),n=D(y=>y.setFilterItems),[i,o]=x.useState(r.selectType==Te.VALUE);function s(){var y;(y=e==null?void 0:e.current)==null||y.focus()}function l(y){n(t.map(R=>R.title==r.title?{...R,filterValue:y.id,filterLabel:y.name}:R),!0),o(!1)}function d(y,R=!1){n(t.map(_=>_.title==r.title?{..._,filterValue:y.id,filterLabel:y.name,isCountryGroup:R}:_),!0),o(!1)}const[c,u]=x.useState(r.filterValue||[]),p=y=>{var E,k;const R=c.includes(y)?c.filter(w=>w!==y):[...c,y];u(R);const _=(k=(E=r==null?void 0:r.filters)==null?void 0:E.options)==null?void 0:k.filter(w=>R.includes(w.id)).map(w=>w.name).join(", ");n(t.map(w=>w.title===r.title?{...w,filterValue:R,filterLabel:_||""}:w),!0)};function f(y){n(t.map(R=>R.title==r.title?{...y,selectType:Te.VALUE}:R))}const h=Pt(y=>{const R=y.target.value;n(t.map(_=>_.title==r.title?{..._,filterValue:R}:_),!0)},500);function g(y){n(t.map(R=>R.title==r.title?{...R,selectType:Te.NONE}:R)),o(y)}function v(){n(t.filter(y=>y.title!=r.title),!0)}x.useEffect(()=>{var y;i&&((y=r==null?void 0:r.filters)==null?void 0:y.type)!==fe.SELECT&&setTimeout(()=>{s()},0)},[i]);const L={[fe.INPUT]:a.jsx("input",{ref:e,type:"text",placeholder:"Search...",className:"filter-item-search",onChange:h}),[fe.SELECT]:a.jsx("div",{children:(O=(j=r==null?void 0:r.filters)==null?void 0:j.options)==null?void 0:O.map(y=>a.jsx("button",{onClick:()=>l(y),children:y.name},y.id))}),[fe.TwoComponentSelect]:a.jsxs(a.Fragment,{children:[a.jsx(Mi,{children:(S=r==null?void 0:r.filters)==null?void 0:S.firstGroupName}),a.jsx(Pi,{children:(U=(z=r==null?void 0:r.filters)==null?void 0:z.options)==null?void 0:U.map(y=>a.jsx("button",{onClick:()=>d(y,!1),children:y.name},y.id))})]}),[fe.MULTISELECT]:a.jsx("div",{children:(B=(Y=r==null?void 0:r.filters)==null?void 0:Y.options)==null?void 0:B.map(y=>a.jsx(Ii,{children:a.jsx(Ki,{onChange:()=>p(y==null?void 0:y.id),children:a.jsx($i,{children:y.name})})},y.id))}),[fe.DATEPICKER]:a.jsx(Nr,{open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],onChange:y=>{if(!y)n(t.map(R=>R.title===r.title?{...R,filterValue:null,filterLabel:""}:R),!0);else{const R=y.map((_,E)=>{var k;return _?(k=ae.toLocal(_,E===0,E===y.length-1))==null?void 0:k.toISOString():null});n(t.map(_=>_.title===r.title?{..._,filterValue:R,filterLabel:`${y[0].format("MMM D, YYYY")} → ${y[1].format("MMM D, YYYY")}`}:_),!0)}o(!1)},getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body}})},M=a.jsx(Mt,{style:{border:((F=r==null?void 0:r.filters)==null?void 0:F.type)===fe.DATEPICKER?"none":"inherit"},children:L[((H=r==null?void 0:r.filters)==null?void 0:H.type)||fe.INPUT]});return a.jsxs(bt,{children:[a.jsx(Rt,{placement:"bottomLeft",onSelect:f,children:a.jsxs("span",{children:[a.jsx(Ar,{}),r.title]})}),a.jsx(T.Dropdown,{overlayClassName:"debug-dropdwon",placement:"bottomLeft",open:i,onOpenChange:g,popupRender:()=>M,trigger:["click"],getPopupContainer:y=>{var R;return((R=y==null?void 0:y.parentElement)==null?void 0:R.parentElement)??document.body},children:a.jsx("div",{children:r.filterValue?r.filterLabel?r.filterLabel:r.filterValue:"NotSelected"})}),a.jsx("span",{onClick:v,children:a.jsx(At,{})})]})},Zi=()=>{const r=D(g=>g.filterItems),e=D(g=>g.sortItems),t=D(g=>g.setSelectedConfig),n=D(g=>g.resetStore),i=D(g=>g.selectedConfig),{deleteMyFilter:o}=we(),s=D(g=>g.bumpConfigsVersion),{open:l,store:d,close:c}=Le(),u=Nt();async function p(){try{if(!i||!o)return;await o(i.id),t(null),s()}catch(g){console.log(g,"Error happened deleting configuration")}}function f(){d({component:Yi,title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:a.jsx(Ne,{onClick:()=>{p(),c(),n()},children:a.jsxs("span",{className:"arrow-styled",children:["Delete",a.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}function h(){const g=JSON.stringify({filterItems:r,sortItems:e});d({component:Zr,componentProps:{type:u,value:g,selectedConfig:i,onSuccess:v=>{i&&t({...i,name:v}),s()}},title:i?"UpdateConfiguration":"NameYourConfiguration",footerOptions:{okText:a.jsx(Ne,{children:a.jsxs("span",{className:"arrow-styled",children:["Save",a.jsx(ce,{})]})}),cancelText:"Cancel"}}),l()}return a.jsxs(Di,{children:[e.length>0&&a.jsx(Vr,{placement:"bottomLeft",children:a.jsx(bt,{className:"sort",children:a.jsxs("span",{children:[e[0].title,e[0].direction==oe.ASC?a.jsx(zt,{}):a.jsx(Ht,{})]})})}),r.map(g=>a.jsx(qi,{item:g},g.title)),a.jsx(Rt,{placement:"bottomLeft",children:a.jsx(bt,{className:"add-filter",children:a.jsxs("span",{children:[a.jsx(Vi,{}),"AddFilter"]})})}),a.jsxs(Ti,{children:[a.jsx("button",{onClick:h,children:i?"UpdateConfiguration":"SaveConfiguration"}),i&&a.jsx("button",{onClick:f,children:"DeleteConfiguration"}),a.jsxs("button",{onClick:n,children:[a.jsx(_r,{}),"ResetConditions"]})]})]})},Ji=m.div`
1234
1234
  height: 100%;
1235
1235
  display: flex;
1236
1236
  flex-direction: column;
@@ -1548,7 +1548,7 @@
1548
1548
  @media (max-width: 991px) {
1549
1549
  padding: 0 1rem;
1550
1550
  }
1551
- `,ea=m.div`
1551
+ `,eo=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 er(r,e){const t={};return e.forEach(n=>{const i=n[r.dataIndex];t[i]?t[i].push(n):t[i]=[n]}),t}function ta(r){return Object.values(r).reduce((e,t)=>e+t.length,0)}function ra({item:r,columns:e,rowKey:t,onRowClick:n}){const i=D(a=>a.checkedValue);return o.jsx("tr",{onClick:n?()=>n(r):void 0,className:`${i&&i[r[t]]?"checked":""}`,children:e.map(a=>o.jsx("td",{children:a!=null&&a.render?a.render(r[a.dataIndex],r):r[a.dataIndex]},`${r[t]}-${a.dataIndex}`))},r[t])}function Ft({rows:r,columns:e,rowKey:t,onRowClick:n}){return r.map(i=>o.jsx(ra,{item:i,columns:e,rowKey:t,onRowClick:n},i[t]))}function na({rowLength:r,columnLength:e}){return Array(r).fill(null).map((t,n)=>o.jsx("tr",{children:Array(e).fill(null).map((i,a)=>o.jsx("td",{children:o.jsx(T.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${n}-${a}`))},`skeleton-row-${n}`))}function ia({subGroups:r,columns:e,rowKey:t,onRowClick:n}){return o.jsx(o.Fragment,{children:Object.keys(r).map(i=>o.jsxs(x.Fragment,{children:[o.jsxs("tr",{className:"sub-group-header",children:[o.jsx("td",{}),o.jsx("td",{colSpan:e.length,children:o.jsxs("div",{children:[i," ",o.jsx("span",{children:r[i].length}),o.jsx("span",{className:"line"})]})})]}),o.jsx(Ft,{rows:r[i],columns:e,rowKey:t,onRowClick:n})]},i))})}function aa({label:r,colSpan:e,count:t}){return o.jsxs("tr",{className:"main-group-header",children:[o.jsx("td",{}),o.jsxs("td",{colSpan:e,children:[r," ",o.jsx("span",{children:t})]}),o.jsx("td",{})]})}function oa({dataSource:r,columns:e,isSubGroupped:t,getGroupLength:n,rowKey:i,onRowClick:a}){return o.jsx(o.Fragment,{children:Object.keys(r).map(s=>{var l;return o.jsxs(x.Fragment,{children:[o.jsx(aa,{label:s,colSpan:e.length,count:t?n(r[s]):(l=r[s])==null?void 0:l.length}),t?o.jsx(ia,{subGroups:r[s],columns:e,rowKey:i,onRowClick:a}):o.jsx(Ft,{rows:r[s],columns:e,rowKey:i,onRowClick:a})]},s)})})}function sa({pagination:r,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:n}){const[i,a]=x.useState(!1);return o.jsxs(Xi,{children:[o.jsx(T.Pagination,{current:r.current,pageSize:r.pageSize,total:t,showSizeChanger:!1,onChange:n}),o.jsx(T.Dropdown,{placement:"bottomRight",popupRender:()=>o.jsx(ea,{children:((r==null?void 0:r.items)||[{label:`10 ${V("Items")}`,value:10},{label:`25 ${V("Items")}`,value:25},{label:`50 ${V("Items")}`,value:50},{label:`100 ${V("Items")}`,value:100}]).map(s=>o.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==r.pageSize&&o.jsx(Ue,{})]},s.value))}),trigger:["click"],open:i,onOpenChange:a,children:o.jsxs("div",{className:"page-size-select-header",children:[r.pageSize," ",V("ItemsPerPage")," ",o.jsx(Tt,{})]})})]})}const la=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),$.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function ca({col:r}){const[e,t]=x.useState(!1),n=D(f=>f.filterItems),i=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=n.filter(v=>f.title!=v.title);a([...g,{...f,selectType:Te.VALUE}])}function u(f,g){l({...i,[f.dataIndex]:!0})}const p=()=>t(!1),h=[{icon:o.jsx(at,{}),text:V("Filter"),action:()=>c(r)},{icon:o.jsx(zt,{}),text:Z("Ascending"),action:()=>d(r,ae.ASC)},{icon:o.jsx(Ht,{}),text:Z("Descending"),action:()=>d(r,ae.DESC)},{icon:o.jsx(la,{}),text:V("HideInView"),action:()=>u(r)}];return r.filterDropdown===!1?o.jsx("th",{}):o.jsx(T.Dropdown,{placement:"bottomLeft",popupRender:()=>o.jsx(Qi,{children: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:r.title})})})}const da=m.div`
1576
+ `;function er(r,e){const t={};return e.forEach(n=>{const i=n[r.dataIndex];t[i]?t[i].push(n):t[i]=[n]}),t}function to(r){return Object.values(r).reduce((e,t)=>e+t.length,0)}function ro({item:r,columns:e,rowKey:t,onRowClick:n}){const i=D(o=>o.checkedValue);return a.jsx("tr",{onClick:n?()=>n(r):void 0,className:`${i&&i[r[t]]?"checked":""}`,children:e.map(o=>a.jsx("td",{children:o!=null&&o.render?o.render(r[o.dataIndex],r):r[o.dataIndex]},`${r[t]}-${o.dataIndex}`))},r[t])}function Ft({rows:r,columns:e,rowKey:t,onRowClick:n}){return r.map(i=>a.jsx(ro,{item:i,columns:e,rowKey:t,onRowClick:n},i[t]))}function no({rowLength:r,columnLength:e}){return Array(r).fill(null).map((t,n)=>a.jsx("tr",{children:Array(e).fill(null).map((i,o)=>a.jsx("td",{children:a.jsx(T.Skeleton,{active:!0,title:!1,paragraph:{rows:1,width:"100%"}})},`${n}-${o}`))},`skeleton-row-${n}`))}function io({subGroups:r,columns:e,rowKey:t,onRowClick:n}){return a.jsx(a.Fragment,{children:Object.keys(r).map(i=>a.jsxs(x.Fragment,{children:[a.jsxs("tr",{className:"sub-group-header",children:[a.jsx("td",{}),a.jsx("td",{colSpan:e.length,children:a.jsxs("div",{children:[i," ",a.jsx("span",{children:r[i].length}),a.jsx("span",{className:"line"})]})})]}),a.jsx(Ft,{rows:r[i],columns:e,rowKey:t,onRowClick:n})]},i))})}function oo({label:r,colSpan:e,count:t}){return a.jsxs("tr",{className:"main-group-header",children:[a.jsx("td",{}),a.jsxs("td",{colSpan:e,children:[r," ",a.jsx("span",{children:t})]}),a.jsx("td",{})]})}function ao({dataSource:r,columns:e,isSubGroupped:t,getGroupLength:n,rowKey:i,onRowClick:o}){return a.jsx(a.Fragment,{children:Object.keys(r).map(s=>{var l;return a.jsxs(x.Fragment,{children:[a.jsx(oo,{label:s,colSpan:e.length,count:t?n(r[s]):(l=r[s])==null?void 0:l.length}),t?a.jsx(io,{subGroups:r[s],columns:e,rowKey:i,onRowClick:o}):a.jsx(Ft,{rows:r[s],columns:e,rowKey:i,onRowClick:o})]},s)})})}function so({pagination:r,onPerPageSelectChange:e,totalItemCount:t,onPaginationChange:n}){const[i,o]=x.useState(!1);return a.jsxs(Xi,{children:[a.jsx(T.Pagination,{current:r.current,pageSize:r.pageSize,total:t,showSizeChanger:!1,onChange:n}),a.jsx(T.Dropdown,{placement:"bottomRight",popupRender:()=>a.jsx(eo,{children:((r==null?void 0:r.items)||[{label:`10 ${V("Items")}`,value:10},{label:`25 ${V("Items")}`,value:25},{label:`50 ${V("Items")}`,value:50},{label:`100 ${V("Items")}`,value:100}]).map(s=>a.jsxs("button",{onClick:()=>e(s.value),children:[s.label," ",s.value==r.pageSize&&a.jsx(Ue,{})]},s.value))}),trigger:["click"],open:i,onOpenChange:o,children:a.jsxs("div",{className:"page-size-select-header",children:[r.pageSize," ",V("ItemsPerPage")," ",a.jsx(Tt,{})]})})]})}const lo=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z",fill:"currentColor",fillOpacity:.75}),$.createElement("path",{d:"M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z",fill:"currentColor",fillOpacity:.75}));function co({col:r}){const[e,t]=x.useState(!1),n=D(h=>h.filterItems),i=D(h=>h.hideItems),o=D(h=>h.setFilterItems),s=D(h=>h.setSortItems),l=D(h=>h.setHideItems);function d(h,g){s([{title:h.title,dataIndex:h.dataIndex.charAt(0).toUpperCase()+h.dataIndex.slice(1),direction:g}])}function c(h){const g=n.filter(v=>h.title!=v.title);o([...g,{...h,selectType:Te.VALUE}])}function u(h,g){l({...i,[h.dataIndex]:!0})}const p=()=>t(!1),f=[{icon:a.jsx(ot,{}),text:V("Filter"),action:()=>c(r)},{icon:a.jsx(zt,{}),text:Z("Ascending"),action:()=>d(r,oe.ASC)},{icon:a.jsx(Ht,{}),text:Z("Descending"),action:()=>d(r,oe.DESC)},{icon:a.jsx(lo,{}),text:V("HideInView"),action:()=>u(r)}];return r.filterDropdown===!1?a.jsx("th",{}):a.jsx(T.Dropdown,{placement:"bottomLeft",popupRender:()=>a.jsx(Qi,{children:f.map(({icon:h,text:g,action:v})=>a.jsxs("button",{onClick:()=>{v(),p()},children:[h,g]},g))}),trigger:["click"],open:e,onOpenChange:t,getPopupContainer:h=>(h==null?void 0:h.parentElement)??document.body,children:a.jsx("th",{className:e?"active":"",children:a.jsx("span",{children:r.title})})})}const po=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
- `,pa=m.div`
1585
+ `,uo=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
- `,ua=m.p`
1591
+ `,fo=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
- `,fa=m.p`
1602
+ `,ho=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
- `,ha=m.span`
1619
+ `,go=m.span`
1620
1620
  color: var(--color-text-status-info, #17adc1);
1621
1621
 
1622
1622
  /* caption/medium-r */
@@ -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 Jr=({title:r,description:e,button:t,helpSpan:n})=>o.jsx(da,{children:o.jsxs(pa,{children:[o.jsx(ua,{children:r}),o.jsxs(fa,{children:[e," ",n&&o.jsx(ha,{children:n})]}),t&&t]})}),ga=({activeTableView:r,columns:e,rowKey:t,dataSource:n,loading:i,pagination:a,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(O=>O.filters),p=D(O=>O.groupByArr),h=D(O=>O.setFilters),f=x.useMemo(()=>p.length>0?e.filter(O=>!p.some(S=>S.dataIndex==O.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:v}=x.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),L=x.useMemo(()=>{if(p[0]){const O=er(p[0],n);if(p[1]){const S={};return Object.keys(O).forEach(z=>{S[z]=er(p[1],O[z])}),S}return O}return n},[n,p]);function M(O){h({...u,PageSize:O,Page:1})}function j(O){h({...u,Page:O})}return o.jsxs(Ji,{children:[o.jsxs("table",{children:[r!=we.LIST&&o.jsx("thead",{children:o.jsxs("tr",{children:[f.map(O=>o.jsx(ca,{col:O},O.dataIndex)),o.jsx("th",{})]})}),o.jsx("tbody",{children:i?o.jsx(na,{rowLength:a.pageSize,columnLength:f.length}):(L==null?void 0:L.length)==0&&c?o.jsx("tr",{children:o.jsx("td",{colSpan:f.length,children:o.jsx(Jr,{...c})})}):o.jsx(o.Fragment,{children:g?o.jsx(oa,{dataSource:L,columns:f,isSubGroupped:v,getGroupLength:ta,rowKey:t,onRowClick:l}):o.jsx(Ft,{rows:L,columns:f,rowKey:t,onRowClick:l})})})]}),a&&!d&&o.jsx(sa,{pagination:a,totalItemCount:s,onPerPageSelectChange:M,onPaginationChange:j})]})},ma=m.div`
1650
+ `;const Jr=({title:r,description:e,button:t,helpSpan:n})=>a.jsx(po,{children:a.jsxs(uo,{children:[a.jsx(fo,{children:r}),a.jsxs(ho,{children:[e," ",n&&a.jsx(go,{children:n})]}),t&&t]})}),mo=({activeTableView:r,columns:e,rowKey:t,dataSource:n,loading:i,pagination:o,totalItemCount:s,onRowClick:l,noPagination:d,noDataProps:c})=>{const u=D(O=>O.filters),p=D(O=>O.groupByArr),f=D(O=>O.setFilters),h=x.useMemo(()=>p.length>0?e.filter(O=>!p.some(S=>S.dataIndex==O.dataIndex)):e,[e,p]),{isTableGroupped:g,isTableSubGroupped:v}=x.useMemo(()=>({isTableGroupped:!!p[0],isTableSubGroupped:!!p[1]}),[p]),L=x.useMemo(()=>{if(p[0]){const O=er(p[0],n);if(p[1]){const S={};return Object.keys(O).forEach(z=>{S[z]=er(p[1],O[z])}),S}return O}return n},[n,p]);function M(O){f({...u,PageSize:O,Page:1})}function j(O){f({...u,Page:O})}return a.jsxs(Ji,{children:[a.jsxs("table",{children:[r!=be.LIST&&a.jsx("thead",{children:a.jsxs("tr",{children:[h.map(O=>a.jsx(co,{col:O},O.dataIndex)),a.jsx("th",{})]})}),a.jsx("tbody",{children:i?a.jsx(no,{rowLength:o.pageSize,columnLength:h.length}):(L==null?void 0:L.length)==0&&c?a.jsx("tr",{children:a.jsx("td",{colSpan:h.length,children:a.jsx(Jr,{...c})})}):a.jsx(a.Fragment,{children:g?a.jsx(ao,{dataSource:L,columns:h,isSubGroupped:v,getGroupLength:to,rowKey:t,onRowClick:l}):a.jsx(Ft,{rows:L,columns:h,rowKey:t,onRowClick:l})})})]}),o&&!d&&a.jsx(so,{pagination:o,totalItemCount:s,onPerPageSelectChange:M,onPaginationChange:j})]})},xo=m.div`
1651
1651
  display: flex;
1652
1652
  flex-direction: column;
1653
1653
  position: fixed;
@@ -1865,7 +1865,7 @@
1865
1865
  z-index: 9;
1866
1866
  }
1867
1867
  }
1868
- `,xa=m.div`
1868
+ `,vo=m.div`
1869
1869
  display: flex;
1870
1870
  align-items: center;
1871
1871
  gap: 8px;
@@ -1910,7 +1910,7 @@
1910
1910
  fill: var(--color-icon-inverse);
1911
1911
  }
1912
1912
  }
1913
- `,va=m.div`
1913
+ `,yo=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
- `,ya=m.span`
1960
+ `,bo=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
- `,ba=m(Qr)`
1969
+ `,wo=m(Qr)`
1970
1970
  border-radius: var(--border-radius-025, 2px);
1971
1971
  background: var(--color-bg-status-error, #fd7f60) !important;
1972
1972
  border: 2px solid var(--color-bg-secondary, #f5f5f5);
1973
1973
  padding-top: 0 !important;
1974
- `,wa=m.div`
1974
+ `,Co=m.div`
1975
1975
  width: 100%;
1976
1976
  display: flex;
1977
1977
  flex-direction: column;
1978
1978
  gap: var(--spacing-050, 4px);
1979
1979
  padding: var(--spacing-400, 32px) var(--spacing-300, 24px) !important;
1980
- `,Ca=m.div`
1980
+ `,jo=m.div`
1981
1981
  display: flex;
1982
1982
  justify-content: space-between;
1983
1983
  color: var(--color-text-contrast-onlight-primary, #131412);
@@ -1989,7 +1989,7 @@
1989
1989
  font-weight: var(--text-weight-medium, 500);
1990
1990
  line-height: var(--typo-subheading-lineHeight-medium, 28px); /* 116.667% */
1991
1991
  letter-spacing: var(--typo-subheading-spacing-medium, -0.5px);
1992
- `,ja=m.div`
1992
+ `,So=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
- `,Sa=m(T.Button)`
2003
+ `,ko=m(T.Button)`
2004
2004
  border-radius: var(--border-radius-025, 2px);
2005
2005
  background: var(--color-bg-brand-special, #02e0ae);
2006
2006
  display: flex;
@@ -2023,7 +2023,7 @@
2023
2023
  color: var(--color-text-inverse-primary, #131412) !important;
2024
2024
  border-top: 2px solid var(--color-bg-secondary, #f5f5f5) !important;
2025
2025
  }
2026
- `,Ze=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),$.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function Xr(r){if(!r)return r;let e=r[0].toLowerCase();for(let t=1;t<r.length;t++){const n=r[t-1],i=r[t],a=r[t+1];/[A-Z]/.test(i)?/[A-Z]/.test(n)&&/[A-Z]/.test(a)?e+=i.toLowerCase():(/[A-Z]/.test(n)&&(!a||/[^A-Z]/.test(a)),e+=i):e+=i}return e}function $e(r){return Object.entries(r).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(i=>isNaN(i)?Xr(i):Number(i)),errors:t}))}m(T.Form.Item)`
2026
+ `,Ze=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z",fill:"#FD6C49"}),$.createElement("path",{d:"M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z",fill:"#FD6C49"}),$.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z",fill:"#FD6C49"}));function Xr(r){if(!r)return r;let e=r[0].toLowerCase();for(let t=1;t<r.length;t++){const n=r[t-1],i=r[t],o=r[t+1];/[A-Z]/.test(i)?/[A-Z]/.test(n)&&/[A-Z]/.test(o)?e+=i.toLowerCase():(/[A-Z]/.test(n)&&(!o||/[^A-Z]/.test(o)),e+=i):e+=i}return e}function $e(r){return Object.entries(r).map(([e,t])=>({name:e.replace(/\[(\d+)\]/g,".$1").split(".").map(i=>isNaN(i)?Xr(i):Number(i)),errors:t}))}m(T.Form.Item)`
2027
2027
  margin-bottom: 2.5rem;
2028
2028
  padding: 0 1.5rem;
2029
2029
  display: flex;
@@ -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
- `,ka=m.span`
2098
+ `,Lo=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
- `,La=m.span`
2107
+ `,Eo=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);
@@ -2261,14 +2261,14 @@
2261
2261
  letter-spacing: var(--typo-body-spacing-small, 0.00938rem);
2262
2262
  }
2263
2263
  }
2264
- `,Ea=m.div`
2264
+ `,Oo=m.div`
2265
2265
  padding: 1.5rem;
2266
2266
  `,Vt=m.div`
2267
2267
  display: flex;
2268
2268
  align-items: center;
2269
2269
  justify-content: center;
2270
2270
  padding: 1.5rem;
2271
- `,Oa=m.div`
2271
+ `,Do=m.div`
2272
2272
  display: flex;
2273
2273
  align-items: center;
2274
2274
  padding: 24px;
@@ -2281,7 +2281,7 @@
2281
2281
  color: var(--color-text-inverse-primary, #131412) !important;
2282
2282
  }
2283
2283
  }
2284
- `,Da=m(T.Input.Password)`
2284
+ `,To=m(T.Input.Password)`
2285
2285
  input[type='number'] {
2286
2286
  &::-webkit-outer-spin-button,
2287
2287
  &::-webkit-inner-spin-button {
@@ -2384,7 +2384,7 @@
2384
2384
  fill: var(--color-text-primary, #131412) !important;
2385
2385
  }
2386
2386
  }
2387
- `,Bt=({confirmationToken:r,backupCodeEndpoint:e,setBackupActivated:t,setVisible:n,id:i,setRefetchData:a})=>{const[s,l]=x.useState(),[d,c]=x.useState([]);async function u(){var p,h,f;try{const g=await e({confirmationToken:r,code:s,id:i});(p=g==null?void 0:g.data)!=null&&p.success&&(n(!1),a(v=>!v))}catch(g){const v=$e((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(je,{children:o.jsxs(Se,{children:[G("EnterBackupCode"),o.jsx(le,{children:G("BackupCodesDesc")})]})}),o.jsxs(tn,{className:d.length>0?"verification-error":"",children:[o.jsx(le,{children:G("BackupCode")}),o.jsx(pt,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{})," ",p.errors[0]]},p.name)),o.jsx(La,{children:G("BackupCodeSpan")})]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:()=>{t(!1)},children:Z("Back")}),o.jsx(Ne,{onClick:u,children:o.jsxs("span",{className:"arrow-styled",children:[Z("Continue")," ",o.jsx(ce,{})]})})]})]})},Ta=m.div`
2387
+ `,Bt=({confirmationToken:r,backupCodeEndpoint:e,setBackupActivated:t,setVisible:n,id:i,setRefetchData:o})=>{const[s,l]=x.useState(),[d,c]=x.useState([]);async function u(){var p,f,h;try{const g=await e({confirmationToken:r,code:s,id:i});(p=g==null?void 0:g.data)!=null&&p.success&&(n(!1),o(v=>!v))}catch(g){const v=$e((h=(f=g==null?void 0:g.response)==null?void 0:f.data)==null?void 0:h.errors);c(v),console.log(g)}}return a.jsxs("div",{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("EnterBackupCode"),a.jsx(le,{children:G("BackupCodesDesc")})]})}),a.jsxs(tn,{className:d.length>0?"verification-error":"",children:[a.jsx(le,{children:G("BackupCode")}),a.jsx(pt,{value:s,onChange:p=>l(p.target.value),placeholder:"xxxx-xxxx-xxxx"}),d.map(p=>a.jsxs("span",{children:[a.jsx(Ze,{})," ",p.errors[0]]},p.name)),a.jsx(Eo,{children:G("BackupCodeSpan")})]}),a.jsxs(pe,{children:[a.jsx(te,{onClick:()=>{t(!1)},children:Z("Back")}),a.jsx(Ne,{onClick:u,children:a.jsxs("span",{className:"arrow-styled",children:[Z("Continue")," ",a.jsx(ce,{})]})})]})]})},$o=m.div`
2388
2388
  position: fixed;
2389
2389
  top: 0;
2390
2390
  left: 0;
@@ -2395,17 +2395,17 @@
2395
2395
  justify-content: center;
2396
2396
  align-items: center;
2397
2397
  z-index: 1000;
2398
- `,$a=m.div`
2398
+ `,Io=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
- `,Ia=document.getElementById("modal-root")||(()=>{const r=document.createElement("div");return r.id="modal-root",document.body.appendChild(r),r})();function wt({isOpen:r,onClose:e,children:t}){return x.useEffect(()=>{const n=i=>{i.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),r?Pn.createPortal(o.jsx(Ta,{onClick:e,children:o.jsx($a,{onClick:n=>n.stopPropagation(),children:t})}),Ia):null}const Ma={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},nn=({isVisible:r,setVisible:e,code:t,mfaType:n,id:i,isBlocked:a,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=me(),{setUser:c}=Ee(),[u,p]=x.useState(""),[h,f]=x.useState([]),[g,v]=x.useState(!1);function L(S){p(S)}async function M(){const S=l;if(S)try{f([]);const z=await S(t,u,i);c(z.data.value),O()}catch(z){if(console.log(z),z.status===400){const U=z.response.data,Y=$e(U.errors);f(Y)}}}async function j(S){const z=d;if(z)try{f([]);const U=await z(S);c(U.data.value)}catch(U){if(console.log(U),U.status===400){const Y=U.response.data,B=$e(Y.errors);f(B)}}}function O(){p(""),e(!1),f([])}return a?o.jsx(wt,{isOpen:a,onClose:s,children:o.jsxs(ba,{children:[o.jsxs(wa,{children:[o.jsxs(Ca,{children:[o.jsx("span",{children:V("ContactInformationBlocked")}),o.jsx("span",{onClick:s,children:o.jsx(At,{})})]}),o.jsx(ja,{children:V("ContactInformationBlockedDesc")})]}),o.jsxs(Sa,{children:[V("TryAgain"),o.jsx(ce,{})]})]})}):o.jsx(wt,{isOpen:r,onClose:O,children:g?o.jsx(Bt,{setBackupActivated:v,backupCodeEndpoint:j,confirmationToken:t,id:i,setVisible:e}):o.jsxs(Qr,{children:[o.jsx("h2",{children:G("EnterVerificationCode")}),o.jsx("p",{children:n!==void 0?V(Ma[n]):""}),n!==1&&o.jsxs(o.Fragment,{children:[o.jsxs(va,{className:h.length>0?"verification-error":"",children:[o.jsx(T.Input.OTP,{value:u,onChange:L}),o.jsxs(ya,{children:[G("DidnReceiveCode")," ",o.jsx(en,{onClick:()=>v(!0),children:G("EnterBackupCode")})]}),h.map(S=>o.jsxs("span",{children:[o.jsx(Ze,{}),S.errors[0]]},S.name))]}),o.jsxs("button",{onClick:M,disabled:u.length!==6,children:[Z("ShowContactInformation"),o.jsx(ce,{})]})]})]})})},an=()=>{const{enableContactInfo:r,disableContactInfo:e}=me(),{setUser:t}=Ee(),[n,i]=x.useState(!1),[a,s]=x.useState(null),[l,d]=x.useState(!1),c=async()=>{var h,f,g,v,L,M,j;if(r)try{d(!1);const O=await r();s({token:(f=(h=O.data)==null?void 0:h.value)==null?void 0:f.token,id:(v=(g=O.data)==null?void 0:g.value)==null?void 0:v.id,mfaType:(M=(L=O.data)==null?void 0:L.value)==null?void 0:M.mfaType}),i(!0)}catch(O){const S=(j=O.response)==null?void 0:j.data,z=S==null?void 0:S.errors;(z&&Array.isArray(z[""])&&z[""][0]==="TooManyAttempts"||z[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const h=await e();t(h.data.value)}const p=()=>{d(!1),i(!1)};return{isContactInfoModalVisible:n,setIsContactInfoModalVisible:i,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:n,setVisible:i,code:a==null?void 0:a.token,mfaType:a==null?void 0:a.mfaType,id:a==null?void 0:a.id,isBlocked:l,onBlockStateClose:p}}},Pa=({close:r})=>{var M;const{user:e}=Ee(),t=D(j=>j.columns),n=D(j=>j.groupByArr),i=D(j=>j.hideItems),a=D(j=>j.activeTableView),s=D(j=>j.setActiveTableView),l=D(j=>j.setGroupByArr),d=D(j=>j.setHideItems),c=D(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:h}=an();function f(j){const O=t.find(S=>S.dataIndex==j.value);l([O])}function g(j,O){d({...i,[j.dataIndex]:!!O})}function v(j,O){const S=new Date(j),z=new Date(O),U=Math.abs(z.getTime()-S.getTime()),Y=Math.floor(U/(1e3*60))%60,B=Math.floor(U/(1e3*60*60))%24,F=[];return B>0&&F.push(`${B}h`),Y>0&&F.push(`${Y}m`),F.join(" ")}function L(){c(),r()}return o.jsxs(ma,{children:[o.jsxs("header",{children:[o.jsx("span",{children:V("ViewOptions")}),o.jsx("button",{onClick:r,children:o.jsx(tr,{})})]}),o.jsxs("div",{className:"setting-sidebar-content",children:[o.jsxs("ul",{className:"table-view-list",children:[o.jsxs("li",{className:a==we.TABLE?"active":"",onClick:()=>s(we.TABLE),children:[o.jsx(rr,{}),o.jsx("span",{children:V("Table")})]}),o.jsxs("li",{className:a==we.LIST?"active":"",onClick:()=>s(we.LIST),children:[o.jsx(at,{}),o.jsx("span",{children:V("List")})]})]}),o.jsx("ul",{className:"grouping-list",children:o.jsxs("li",{children:[o.jsx("span",{children:V("Grouping")}),o.jsx(T.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:o.jsxs(xa,{children:[o.jsx(at,{}),V("NoGrouping")]}),value:((M=n[0])==null?void 0:M.dataIndex)||null,onChange:f})]})}),o.jsxs("div",{className:"properties-list",children:[o.jsx("span",{children:V("ShowProperties")}),o.jsx("ul",{children:t.map(j=>o.jsx("li",{className:i[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,i[j.dataIndex]!==!0),children:j.title},j.dataIndex))})]})]}),o.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?o.jsxs("button",{onClick:p,children:[V("HideContactInfo")," •"," ",v(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),o.jsx(tr,{})]}):o.jsxs("button",{onClick:u,children:[Z("ShowContactInformation")," ",o.jsx(rr,{})]}),o.jsxs("button",{onClick:L,children:[Z("ResetAllOptions"),o.jsx(_r,{})]})]}),o.jsx(nn,{...h})]})},za=({columns:r,getData:e,update:t,hasCreateBtn:n,GridPageTopLeftComponent:i,contentAfterPageHeader:a,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:h,createIsModal:f,editButton:g,noPagination:v,noDataProps:L,exportButton:M,hasSelect:j,selectProps:O,TableComponent:S,tableProps:z={},noNeedSidebarResponsiveButton:U,loadedData:Y=()=>{}})=>{var Q,xe,ue;const{user:B}=Ee(),F=D(q=>q.filters),H=D(q=>q.filterItems),y=D(q=>q.sortItems),R=D(q=>q.hideItems),_=D(q=>q.activeTableView),E=D(q=>q.setColumns),k=D(q=>q.setHasCreateBtn),w=D(q=>q.setHasSelect),b=D(q=>q.setCheckedValue),{response:C,loading:I}=$t(()=>e({...F,...p}),[F,B,t]);Si(),x.useEffect(()=>{C!=null&&C.data&&Y(C.data)},[C,Y]);const[P,A]=x.useState(!1),W=x.useRef(null),K=Rr(W),J=x.useMemo(()=>r.filter(ve=>R[ve.dataIndex]!==!0),[r,R]);return x.useEffect(()=>{k(n||!1),w(j||!1)},[j]),x.useEffect(()=>{E(r)},[r]),x.useEffect(()=>{b(l)},[l]),o.jsxs(Li,{children:[o.jsxs(Oi,{ref:W,children:[o.jsx(Fi,{noNeedSidebarResponsiveButton:U,hasSelect:j,selectProps:O,exportButton:M,setisSettingPopupVisible:A,CustomFilters:u,tableAdditionalFields:h,createIsModal:f,GridPageTopLeftComponent:i}),a,(H.length>0||y.length>0)&&o.jsx(Zi,{})]}),o.jsx(zi,{height:`calc(100vh - ${`${K}px`})`,children:S?o.jsx(S,{dataSource:((Q=C==null?void 0:C.data)==null?void 0:Q.items)||[],...z,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items}}):o.jsx(ga,{noPagination:v,editButton:g,createIsModal:f,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],dataSource:((xe=C==null?void 0:C.data)==null?void 0:xe.items)||[],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items},activeTableView:_,totalItemCount:((ue=C==null?void 0:C.data)==null?void 0:ue.totalItemCount)||0,onRowClick:s,noDataProps:L||null})}),P&&o.jsx(Pa,{close:()=>A(!1)})]})},Ha=r=>o.jsx(ji,{children:o.jsx(za,{...r})}),Ra=()=>{const r=Le(v=>v.isOpen),e=Le(v=>v.options),t=Le(v=>v.close),n=re.useLocation();if(x.useEffect(()=>{r&&t()},[n.pathname]),!e||!r)return null;const{title:i,component:a,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:h}=e,f=()=>{h==null||h()},g=()=>{p==null||p()};return o.jsxs(dt,{centered:!0,title:i||u?o.jsxs(Ur,{children:[o.jsx("span",{children:i}),u&&o.jsx(Gr,{onClick:t,children:o.jsx(At,{})})]}):void 0,...l,children:[a&&o.jsx(a,{...s}),!c&&o.jsxs(Re,{children:[o.jsx(te,{onClick:f,children:d==null?void 0:d.cancelText}),o.jsx(Wr,{onClick:g,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},on=({displayAddRuleModal:r,onClose:e,title:t,hideFooter:n=!1,children:i})=>o.jsx(dt,{open:r,onCancel:e,closeIcon:!1,title:t,footer:n?null:void 0,destroyOnClose:!0,centered:!0,children:i}),nr=({onClose:r,setCurrentStep:e,setConfirmationToken:t,enableTwoFactorService:n,setRefetch:i,setIdOf2FA:a})=>{async function s(){var d,c,u,p;const l=n;if(l)try{const h=await l();(c=(d=h.data)==null?void 0:d.value)!=null&&c.isTwoFactorRequired?(t(h.data.value.token),a(h.data.value.id),e(Me.VERIFY_EMAIL_CODE)):((u=h==null?void 0:h.data)!=null&&u.success&&!((p=h==null?void 0:h.data)!=null&&p.value)&&i(f=>!f),r())}catch(h){console.error("Failed to toggle 2FA:",h)}}return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),o.jsx(le,{children:G("SetupTwoFactorAuthenticationDesc")})]})}),o.jsx(pe,{onClick:s,children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:V("Email")}),o.jsx(ce,{})]})})}),o.jsx(pe,{onClick:()=>e(Me.SELECT_AUTHENTICATOR_APP),children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:G("AuthenticatorApp")}),o.jsx(ce,{})]})})}),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Na=({onClose:r,setCurrentStep:e,setBackupCodes:t,setRefetch:n})=>{const{verifyMFA:i}=me(),[a,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){var h;const p=i;if(p)try{const f=await p(a);(h=f.data)!=null&&h.success&&(e(Me.BACKUP_CODES),t(f.data.value.recoveryCodes))}catch(f){console.log(f)}finally{n(f=>f+1)}}return o.jsxs("div",{children:[o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G("YouMaySeeVerificationCode")})]}),o.jsxs(rn,{children:[o.jsx(T.Input.OTP,{value:a,onChange:c}),l.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{}),p.errors[0]]},p.name))]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:u,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]})},Aa=({onClose:r,setCurrentStep:e})=>{const t=[G("Microsoft"),G("Google"),G("Other")];return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),o.jsxs(le,{children:[" ",G("SetupTwoFactorAuthenticationDesc")]})]})}),t.map(n=>o.jsx(pe,{onClick:()=>e(Me.CONNECT_AUTHENTICATOR),children:o.jsx(Re,{children:o.jsxs(te,{children:[o.jsx("span",{children:n}),o.jsx(ce,{})]})})},n)),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Fa=m.div`
2405
+ `,Mo=document.getElementById("modal-root")||(()=>{const r=document.createElement("div");return r.id="modal-root",document.body.appendChild(r),r})();function wt({isOpen:r,onClose:e,children:t}){return x.useEffect(()=>{const n=i=>{i.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e]),r?Pn.createPortal(a.jsx($o,{onClick:e,children:a.jsx(Io,{onClick:n=>n.stopPropagation(),children:t})}),Mo):null}const Po={1:"Enable2FaFirst",2:"ToViewOtpContactInfoDesc",3:"ToViewTotpContactInfoDesc",4:"ToViewBackupCodeContactInfoDesc"},nn=({isVisible:r,setVisible:e,code:t,mfaType:n,id:i,isBlocked:o,onBlockStateClose:s})=>{const{confirmContactInfo:l,confirmContactInfoBackup:d}=we(),{setUser:c}=Ee(),[u,p]=x.useState(""),[f,h]=x.useState([]),[g,v]=x.useState(!1);function L(S){p(S)}async function M(){const S=l;if(S)try{h([]);const z=await S(t,u,i);c(z.data.value),O()}catch(z){if(console.log(z),z.status===400){const U=z.response.data,Y=$e(U.errors);h(Y)}}}async function j(S){const z=d;if(z)try{h([]);const U=await z(S);c(U.data.value)}catch(U){if(console.log(U),U.status===400){const Y=U.response.data,B=$e(Y.errors);h(B)}}}function O(){p(""),e(!1),h([])}return o?a.jsx(wt,{isOpen:o,onClose:s,children:a.jsxs(wo,{children:[a.jsxs(Co,{children:[a.jsxs(jo,{children:[a.jsx("span",{children:V("ContactInformationBlocked")}),a.jsx("span",{onClick:s,children:a.jsx(At,{})})]}),a.jsx(So,{children:V("ContactInformationBlockedDesc")})]}),a.jsxs(ko,{children:[V("TryAgain"),a.jsx(ce,{})]})]})}):a.jsx(wt,{isOpen:r,onClose:O,children:g?a.jsx(Bt,{setBackupActivated:v,backupCodeEndpoint:j,confirmationToken:t,id:i,setVisible:e}):a.jsxs(Qr,{children:[a.jsx("h2",{children:G("EnterVerificationCode")}),a.jsx("p",{children:n!==void 0?V(Po[n]):""}),n!==1&&a.jsxs(a.Fragment,{children:[a.jsxs(yo,{className:f.length>0?"verification-error":"",children:[a.jsx(T.Input.OTP,{value:u,onChange:L}),a.jsxs(bo,{children:[G("DidnReceiveCode")," ",a.jsx(en,{onClick:()=>v(!0),children:G("EnterBackupCode")})]}),f.map(S=>a.jsxs("span",{children:[a.jsx(Ze,{}),S.errors[0]]},S.name))]}),a.jsxs("button",{onClick:M,disabled:u.length!==6,children:[Z("ShowContactInformation"),a.jsx(ce,{})]})]})]})})},on=()=>{const{enableContactInfo:r,disableContactInfo:e}=we(),{setUser:t}=Ee(),[n,i]=x.useState(!1),[o,s]=x.useState(null),[l,d]=x.useState(!1),c=async()=>{var f,h,g,v,L,M,j;if(r)try{d(!1);const O=await r();s({token:(h=(f=O.data)==null?void 0:f.value)==null?void 0:h.token,id:(v=(g=O.data)==null?void 0:g.value)==null?void 0:v.id,mfaType:(M=(L=O.data)==null?void 0:L.value)==null?void 0:M.mfaType}),i(!0)}catch(O){const S=(j=O.response)==null?void 0:j.data,z=S==null?void 0:S.errors;(z&&Array.isArray(z[""])&&z[""][0]==="TooManyAttempts"||z[""][0]==="IsNotAllowed")&&d(!0)}};async function u(){if(!e)return;const f=await e();t(f.data.value)}const p=()=>{d(!1),i(!1)};return{isContactInfoModalVisible:n,setIsContactInfoModalVisible:i,isBlocked:l,setIsBlocked:d,onBlockStateClose:p,handleEnableContactInfo:c,handleDisableContactInfo:u,ContactInfoModalProps:{isVisible:n,setVisible:i,code:o==null?void 0:o.token,mfaType:o==null?void 0:o.mfaType,id:o==null?void 0:o.id,isBlocked:l,onBlockStateClose:p}}},zo=({close:r})=>{var M;const{user:e}=Ee(),t=D(j=>j.columns),n=D(j=>j.groupByArr),i=D(j=>j.hideItems),o=D(j=>j.activeTableView),s=D(j=>j.setActiveTableView),l=D(j=>j.setGroupByArr),d=D(j=>j.setHideItems),c=D(j=>j.resetStore),{handleEnableContactInfo:u,handleDisableContactInfo:p,ContactInfoModalProps:f}=on();function h(j){const O=t.find(S=>S.dataIndex==j.value);l([O])}function g(j,O){d({...i,[j.dataIndex]:!!O})}function v(j,O){const S=new Date(j),z=new Date(O),U=Math.abs(z.getTime()-S.getTime()),Y=Math.floor(U/(1e3*60))%60,B=Math.floor(U/(1e3*60*60))%24,F=[];return B>0&&F.push(`${B}h`),Y>0&&F.push(`${Y}m`),F.join(" ")}function L(){c(),r()}return a.jsxs(xo,{children:[a.jsxs("header",{children:[a.jsx("span",{children:V("ViewOptions")}),a.jsx("button",{onClick:r,children:a.jsx(tr,{})})]}),a.jsxs("div",{className:"setting-sidebar-content",children:[a.jsxs("ul",{className:"table-view-list",children:[a.jsxs("li",{className:o==be.TABLE?"active":"",onClick:()=>s(be.TABLE),children:[a.jsx(rr,{}),a.jsx("span",{children:V("Table")})]}),a.jsxs("li",{className:o==be.LIST?"active":"",onClick:()=>s(be.LIST),children:[a.jsx(ot,{}),a.jsx("span",{children:V("List")})]})]}),a.jsx("ul",{className:"grouping-list",children:a.jsxs("li",{children:[a.jsx("span",{children:V("Grouping")}),a.jsx(T.Select,{className:"teeest",showSearch:!0,options:t.map(j=>({value:j.dataIndex,label:j.title})),labelInValue:!0,placeholder:a.jsxs(vo,{children:[a.jsx(ot,{}),V("NoGrouping")]}),value:((M=n[0])==null?void 0:M.dataIndex)||null,onChange:h})]})}),a.jsxs("div",{className:"properties-list",children:[a.jsx("span",{children:V("ShowProperties")}),a.jsx("ul",{children:t.map(j=>a.jsx("li",{className:i[j.dataIndex]===!0?"hide":"",onClick:()=>g(j,i[j.dataIndex]!==!0),children:j.title},j.dataIndex))})]})]}),a.jsxs("footer",{children:[e!=null&&e.sensitiveDataExpiration&&new Date(e==null?void 0:e.sensitiveDataExpiration)>new Date?a.jsxs("button",{onClick:p,children:[V("HideContactInfo")," •"," ",v(new Date(e==null?void 0:e.sensitiveDataExpiration),new Date),a.jsx(tr,{})]}):a.jsxs("button",{onClick:u,children:[Z("ShowContactInformation")," ",a.jsx(rr,{})]}),a.jsxs("button",{onClick:L,children:[Z("ResetAllOptions"),a.jsx(_r,{})]})]}),a.jsx(nn,{...f})]})},Ho=({columns:r,getData:e,update:t,hasCreateBtn:n,GridPageTopLeftComponent:i,contentAfterPageHeader:o,onRowClick:s,checkedValue:l,rowKey:d,pagination:c,CustomFilters:u,initialFilterValues:p,tableAdditionalFields:f,createIsModal:h,editButton:g,noPagination:v,noDataProps:L,exportButton:M,hasSelect:j,selectProps:O,TableComponent:S,tableProps:z={},noNeedSidebarResponsiveButton:U,loadedData:Y=()=>{}})=>{var Q,me,ue;const{user:B}=Ee(),F=D(q=>q.filters),H=D(q=>q.filterItems),y=D(q=>q.sortItems),R=D(q=>q.hideItems),_=D(q=>q.activeTableView),E=D(q=>q.setColumns),k=D(q=>q.setHasCreateBtn),w=D(q=>q.setHasSelect),b=D(q=>q.setCheckedValue),{response:C,loading:I}=$t(()=>e({...F,...p}),[F,B,t]);Si(),x.useEffect(()=>{C!=null&&C.data&&Y(C.data)},[C,Y]);const[P,A]=x.useState(!1),W=x.useRef(null),K=Rr(W),J=x.useMemo(()=>r.filter(xe=>R[xe.dataIndex]!==!0),[r,R]);return x.useEffect(()=>{k(n||!1),w(j||!1)},[j]),x.useEffect(()=>{E(r)},[r]),x.useEffect(()=>{b(l)},[l]),a.jsxs(Li,{children:[a.jsxs(Oi,{ref:W,children:[a.jsx(Fi,{noNeedSidebarResponsiveButton:U,hasSelect:j,selectProps:O,exportButton:M,setisSettingPopupVisible:A,CustomFilters:u,tableAdditionalFields:f,createIsModal:h,GridPageTopLeftComponent:i}),o,(H.length>0||y.length>0)&&a.jsx(Zi,{})]}),a.jsx(zi,{height:`calc(100vh - ${`${K}px`})`,children:S?a.jsx(S,{dataSource:((Q=C==null?void 0:C.data)==null?void 0:Q.items)||[],...z,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items}}):a.jsx(mo,{noPagination:v,editButton:g,createIsModal:h,rowKey:d||"id",columns:[{title:"",dataIndex:""},...J],dataSource:((me=C==null?void 0:C.data)==null?void 0:me.items)||[],loading:I,pagination:{current:F.Page,pageSize:F.PageSize,items:c==null?void 0:c.items},activeTableView:_,totalItemCount:((ue=C==null?void 0:C.data)==null?void 0:ue.totalItemCount)||0,onRowClick:s,noDataProps:L||null})}),P&&a.jsx(zo,{close:()=>A(!1)})]})},Ro=r=>a.jsx(ji,{children:a.jsx(Ho,{...r})}),No=()=>{const r=Le(v=>v.isOpen),e=Le(v=>v.options),t=Le(v=>v.close),n=re.useLocation();if(x.useEffect(()=>{r&&t()},[n.pathname]),!e||!r)return null;const{title:i,component:o,componentProps:s,popupOptions:l,footerOptions:d,hideFooter:c,showCloseButton:u,onOk:p,onCancel:f}=e,h=()=>{f==null||f()},g=()=>{p==null||p()};return a.jsxs(dt,{centered:!0,title:i||u?a.jsxs(Ur,{children:[a.jsx("span",{children:i}),u&&a.jsx(Gr,{onClick:t,children:a.jsx(At,{})})]}):void 0,...l,children:[o&&a.jsx(o,{...s}),!c&&a.jsxs(Re,{children:[a.jsx(te,{onClick:h,children:d==null?void 0:d.cancelText}),a.jsx(Wr,{onClick:g,role:"button",tabIndex:0,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&g()},children:d==null?void 0:d.okText})]})]})},an=({displayAddRuleModal:r,onClose:e,title:t,hideFooter:n=!1,children:i})=>a.jsx(dt,{open:r,onCancel:e,closeIcon:!1,title:t,footer:n?null:void 0,destroyOnClose:!0,centered:!0,children:i}),nr=({onClose:r,setCurrentStep:e,setConfirmationToken:t,enableTwoFactorService:n,setRefetch:i,setIdOf2FA:o})=>{async function s(){var d,c,u,p;const l=n;if(l)try{const f=await l();(c=(d=f.data)==null?void 0:d.value)!=null&&c.isTwoFactorRequired?(t(f.data.value.token),o(f.data.value.id),e(Me.VERIFY_EMAIL_CODE)):((u=f==null?void 0:f.data)!=null&&u.success&&!((p=f==null?void 0:f.data)!=null&&p.value)&&i(h=>!h),r())}catch(f){console.error("Failed to toggle 2FA:",f)}}return a.jsxs("div",{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),a.jsx(le,{children:G("SetupTwoFactorAuthenticationDesc")})]})}),a.jsx(pe,{onClick:s,children:a.jsx(Re,{children:a.jsxs(te,{children:[a.jsx("span",{children:V("Email")}),a.jsx(ce,{})]})})}),a.jsx(pe,{onClick:()=>e(Me.SELECT_AUTHENTICATOR_APP),children:a.jsx(Re,{children:a.jsxs(te,{children:[a.jsx("span",{children:G("AuthenticatorApp")}),a.jsx(ce,{})]})})}),a.jsx(pe,{children:a.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Ao=({onClose:r,setCurrentStep:e,setBackupCodes:t,setRefetch:n})=>{const{verifyMFA:i}=we(),[o,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){var f;const p=i;if(p)try{const h=await p(o);(f=h.data)!=null&&f.success&&(e(Me.BACKUP_CODES),t(h.data.value.recoveryCodes))}catch(h){console.log(h)}finally{n(h=>h+1)}}return a.jsxs("div",{children:[a.jsxs(Se,{children:[G("EnterVerificationCode"),a.jsx(le,{children:G("YouMaySeeVerificationCode")})]}),a.jsxs(rn,{children:[a.jsx(T.Input.OTP,{value:o,onChange:c}),l.map(p=>a.jsxs("span",{children:[a.jsx(Ze,{}),p.errors[0]]},p.name))]}),a.jsxs(pe,{children:[a.jsx(te,{onClick:r,children:Z("Cancel")}),a.jsxs(te,{onClick:u,children:[a.jsx("span",{children:Z("Continue")}),a.jsx(ce,{})]})]})]})},Fo=({onClose:r,setCurrentStep:e})=>{const t=[G("Microsoft"),G("Google"),G("Other")];return a.jsxs("div",{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("SetupTwoFactorAuthentication"),a.jsxs(le,{children:[" ",G("SetupTwoFactorAuthenticationDesc")]})]})}),t.map(n=>a.jsx(pe,{onClick:()=>e(Me.CONNECT_AUTHENTICATOR),children:a.jsx(Re,{children:a.jsxs(te,{children:[a.jsx("span",{children:n}),a.jsx(ce,{})]})})},n)),a.jsx(pe,{children:a.jsx(te,{onClick:r,children:Z("Cancel")})})]})},Vo=m.div`
2406
2406
  display: flex;
2407
2407
  justify-content: center;
2408
- `,Va=m.div`
2408
+ `,Bo=m.div`
2409
2409
  position: relative;
2410
2410
  width: 100%;
2411
2411
  input {
@@ -2415,7 +2415,7 @@
2415
2415
  cursor: pointer;
2416
2416
  }
2417
2417
  }
2418
- `,Ba=m.div`
2418
+ `,_o=m.div`
2419
2419
  position: absolute;
2420
2420
  right: 10px;
2421
2421
  top: 50%;
@@ -2423,21 +2423,21 @@
2423
2423
  cursor: pointer;
2424
2424
  width: 20px;
2425
2425
  height: 20px;
2426
- `,_a=m.div`
2426
+ `,Uo=m.div`
2427
2427
  padding: 20px;
2428
2428
  display: flex;
2429
2429
  flex-direction: column;
2430
2430
  gap: 5px;
2431
- `,Ua=m.div`
2431
+ `,Go=m.div`
2432
2432
  width: 100%;
2433
2433
  display: flex;
2434
2434
  gap: 1px;
2435
- `;var sn=x.createContext({});function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(null,arguments)}function Ga(r){if(Array.isArray(r))return r}function Wa(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,a,s,l=[],d=!0,c=!1;try{if(a=(t=t.call(r)).next,e!==0)for(;!(d=(n=a.call(t)).done)&&(l.push(n.value),l.length!==e);d=!0);}catch(u){c=!0,i=u}finally{try{if(!d&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw i}}return l}}function ir(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function Ya(r,e){if(r){if(typeof r=="string")return ir(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ir(r,e):void 0}}function Ka(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2436
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ln(r,e){return Ga(r)||Wa(r,e)||Ya(r,e)||Ka()}function Ie(r){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(r)}function qa(r,e){if(Ie(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Za(r){var e=qa(r,"string");return Ie(e)=="symbol"?e:e+""}function ie(r,e,t){return(e=Za(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ja(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function cn(r,e){if(r==null)return{};var t,n,i=Ja(r,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(n=0;n<a.length;n++)t=a[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function dn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}};/*!
2435
+ `;var sn=x.createContext({});function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(null,arguments)}function Wo(r){if(Array.isArray(r))return r}function Yo(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,o,s,l=[],d=!0,c=!1;try{if(o=(t=t.call(r)).next,e!==0)for(;!(d=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);d=!0);}catch(u){c=!0,i=u}finally{try{if(!d&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(c)throw i}}return l}}function ir(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function Ko(r,e){if(r){if(typeof r=="string")return ir(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ir(r,e):void 0}}function qo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2436
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ln(r,e){return Wo(r)||Yo(r,e)||Ko(r,e)||qo()}function Ie(r){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(r)}function Zo(r,e){if(Ie(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(Ie(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Jo(r){var e=Zo(r,"string");return Ie(e)=="symbol"?e:e+""}function ie(r,e,t){return(e=Jo(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Qo(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function cn(r,e){if(r==null)return{};var t,n,i=Qo(r,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(n=0;n<o.length;n++)t=o[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function dn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}};/*!
2437
2437
  Copyright (c) 2018 Jed Watson.
2438
2438
  Licensed under the MIT License (MIT), see
2439
2439
  http://jedwatson.github.io/classnames
2440
- */var ar;function Qa(){return ar||(ar=1,(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var a="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(a=i(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return t.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var l in a)e.call(a,l)&&a[l]&&(s=i(s,l));return s}function i(a,s){return s?a?a+" "+s:a+s:a}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(ht)),ht.exports}var Xa=Qa();const eo=dn(Xa),X=Math.round;function gt(r,e){const t=r.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=e(n[i]||0,t[i]||"",i);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const or=(r,e,t)=>t===0?r:r/100;function Ve(r,e){const t=e||255;return r>t?t:r<0?0:r}class ze{constructor(e){ie(this,"isValid",!0),ie(this,"r",0),ie(this,"g",0),ie(this,"b",0),ie(this,"a",1),ie(this,"_h",void 0),ie(this,"_s",void 0),ie(this,"_l",void 0),ie(this,"_v",void 0),ie(this,"_max",void 0),ie(this,"_min",void 0),ie(this,"_brightness",void 0);function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let i=function(a){return n.startsWith(a)};const n=e.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(e instanceof ze)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Ve(e.r),this.g=Ve(e.g),this.b=Ve(e.b),this.a=typeof e.a=="number"?Ve(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(a){const s=a/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),i=e(this.b);return .2126*t+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=X(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:t,s:n,l:i,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:t,s:n,l:i,a:this.a})}mix(e,t=50){const n=this._c(e),i=t/100,a=l=>(n[l]-this[l])*i+this[l],s={r:X(a("r")),g:X(a("g")),b:X(a("b")),a:X(a("a")*100)/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),i=a=>X((this[a]*this.a+t[a]*t.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=X(this.a*255).toString(16);e+=a.length===2?a:"0"+a}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=X(this.getSaturation()*100),n=X(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const i=this.clone();return i[e]=Ve(t,n),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(i,a){return parseInt(t[i]+t[a||i],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:i}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof i=="number"?i:1,t<=0){const h=X(n*255);this.r=h,this.g=h,this.b=h}let a=0,s=0,l=0;const d=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(d%2-1));d>=0&&d<1?(a=c,s=u):d>=1&&d<2?(a=u,s=c):d>=2&&d<3?(s=c,l=u):d>=3&&d<4?(s=u,l=c):d>=4&&d<5?(a=u,l=c):d>=5&&d<6&&(a=c,l=u);const p=n-c/2;this.r=X((a+p)*255),this.g=X((s+p)*255),this.b=X((l+p)*255)}fromHsv({h:e,s:t,v:n,a:i}){this._h=e%360,this._s=t,this._v=n,this.a=typeof i=="number"?i:1;const a=X(n*255);if(this.r=a,this.g=a,this.b=a,t<=0)return;const s=e/60,l=Math.floor(s),d=s-l,c=X(n*(1-t)*255),u=X(n*(1-t*d)*255),p=X(n*(1-t*(1-d))*255);switch(l){case 0:this.g=p,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=p;break;case 3:this.r=c,this.g=u;break;case 4:this.r=p,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const t=gt(e,or);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=gt(e,or);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=gt(e,(n,i)=>i.includes("%")?X(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}var rt=2,sr=.16,to=.05,ro=.05,no=.15,pn=5,un=4,io=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function lr(r,e,t){var n;return Math.round(r.h)>=60&&Math.round(r.h)<=240?n=t?Math.round(r.h)-rt*e:Math.round(r.h)+rt*e:n=t?Math.round(r.h)+rt*e:Math.round(r.h)-rt*e,n<0?n+=360:n>=360&&(n-=360),n}function cr(r,e,t){if(r.h===0&&r.s===0)return r.s;var n;return t?n=r.s-sr*e:e===un?n=r.s+sr:n=r.s+to*e,n>1&&(n=1),t&&e===pn&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function dr(r,e,t){var n;return t?n=r.v+ro*e:n=r.v-no*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function ao(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=new ze(r),i=n.toHsv(),a=pn;a>0;a-=1){var s=new ze({h:lr(i,a,!0),s:cr(i,a,!0),v:dr(i,a,!0)});t.push(s)}t.push(n);for(var l=1;l<=un;l+=1){var d=new ze({h:lr(i,l),s:cr(i,l),v:dr(i,l)});t.push(d)}return e.theme==="dark"?io.map(function(c){var u=c.index,p=c.amount;return new ze(e.backgroundColor||"#141414").mix(t[u],p).toHexString()}):t.map(function(c){return c.toHexString()})}var Ct=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ct.primary=Ct[5];function pr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function he(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pr(Object(t),!0).forEach(function(n){ie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pr(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function oo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function so(r,e){if(!r)return!1;if(r.contains)return r.contains(e);for(var t=e;t;){if(t===r)return!0;t=t.parentNode}return!1}var ur="data-rc-order",fr="data-rc-priority",lo="rc-util-key",jt=new Map;function fn(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.mark;return e?e.startsWith("data-")?e:"data-".concat(e):lo}function _t(r){if(r.attachTo)return r.attachTo;var e=document.querySelector("head");return e||document.body}function co(r){return r==="queue"?"prependQueue":r?"prepend":"append"}function Ut(r){return Array.from((jt.get(r)||r).children).filter(function(e){return e.tagName==="STYLE"})}function hn(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!oo())return null;var t=e.csp,n=e.prepend,i=e.priority,a=i===void 0?0:i,s=co(n),l=s==="prependQueue",d=document.createElement("style");d.setAttribute(ur,s),l&&a&&d.setAttribute(fr,"".concat(a)),t!=null&&t.nonce&&(d.nonce=t==null?void 0:t.nonce),d.innerHTML=r;var c=_t(e),u=c.firstChild;if(n){if(l){var p=(e.styles||Ut(c)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(ur)))return!1;var f=Number(h.getAttribute(fr)||0);return a>=f});if(p.length)return c.insertBefore(d,p[p.length-1].nextSibling),d}c.insertBefore(d,u)}else c.appendChild(d);return d}function po(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=_t(e);return(e.styles||Ut(t)).find(function(n){return n.getAttribute(fn(e))===r})}function uo(r,e){var t=jt.get(r);if(!t||!so(document,t)){var n=hn("",e),i=n.parentNode;jt.set(r,i),r.removeChild(n)}}function fo(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=_t(t),i=Ut(n),a=he(he({},t),{},{styles:i});uo(n,a);var s=po(e,a);if(s){var l,d;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((d=a.csp)===null||d===void 0?void 0:d.nonce)){var c;s.nonce=(c=a.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==r&&(s.innerHTML=r),s}var u=hn(r,a);return u.setAttribute(fn(a),e),u}function gn(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}function ho(r){return gn(r)instanceof ShadowRoot}function go(r){return ho(r)?gn(r):null}var St={},Gt=[],mo=function(e){Gt.push(e)};function xo(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","warning")},e);t&&console.error("Warning: ".concat(t))}}function vo(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","note")},e);t&&console.warn("Note: ".concat(t))}}function yo(){St={}}function mn(r,e,t){!e&&!St[t]&&(r(!1,t),St[t]=!0)}function ut(r,e){mn(xo,r,e)}function bo(r,e){mn(vo,r,e)}ut.preMessage=mo;ut.resetWarned=yo;ut.noteOnce=bo;function wo(r){return r.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Co(r,e){ut(r,"[@ant-design/icons] ".concat(e))}function hr(r){return Ie(r)==="object"&&typeof r.name=="string"&&typeof r.theme=="string"&&(Ie(r.icon)==="object"||typeof r.icon=="function")}function gr(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(r).reduce(function(e,t){var n=r[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[wo(t)]=n}return e},{})}function kt(r,e,t){return t?x.createElement(r.tag,he(he({key:e},gr(r.attrs)),t),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))})):x.createElement(r.tag,he({key:e},gr(r.attrs)),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))}))}function xn(r){return ao(r)[0]}function vn(r){return r?Array.isArray(r)?r:[r]:[]}var jo=`
2440
+ */var or;function Xo(){return or||(or=1,(function(r){(function(){var e={}.hasOwnProperty;function t(){for(var o="",s=0;s<arguments.length;s++){var l=arguments[s];l&&(o=i(o,n(l)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var l in o)e.call(o,l)&&o[l]&&(s=i(s,l));return s}function i(o,s){return s?o?o+" "+s:o+s:o}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(ht)),ht.exports}var ea=Xo();const ta=dn(ea),X=Math.round;function gt(r,e){const t=r.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=e(n[i]||0,t[i]||"",i);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const ar=(r,e,t)=>t===0?r:r/100;function Ve(r,e){const t=e||255;return r>t?t:r<0?0:r}class ze{constructor(e){ie(this,"isValid",!0),ie(this,"r",0),ie(this,"g",0),ie(this,"b",0),ie(this,"a",1),ie(this,"_h",void 0),ie(this,"_s",void 0),ie(this,"_l",void 0),ie(this,"_v",void 0),ie(this,"_max",void 0),ie(this,"_min",void 0),ie(this,"_brightness",void 0);function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let i=function(o){return n.startsWith(o)};const n=e.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(e instanceof ze)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Ve(e.r),this.g=Ve(e.g),this.b=Ve(e.b),this.a=typeof e.a=="number"?Ve(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const s=o/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),i=e(this.b);return .2126*t+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=X(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:t,s:n,l:i,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:t,s:n,l:i,a:this.a})}mix(e,t=50){const n=this._c(e),i=t/100,o=l=>(n[l]-this[l])*i+this[l],s={r:X(o("r")),g:X(o("g")),b:X(o("b")),a:X(o("a")*100)/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),i=o=>X((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=X(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=X(this.getSaturation()*100),n=X(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const i=this.clone();return i[e]=Ve(t,n),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(i,o){return parseInt(t[i]+t[o||i],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:i}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof i=="number"?i:1,t<=0){const f=X(n*255);this.r=f,this.g=f,this.b=f}let o=0,s=0,l=0;const d=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(d%2-1));d>=0&&d<1?(o=c,s=u):d>=1&&d<2?(o=u,s=c):d>=2&&d<3?(s=c,l=u):d>=3&&d<4?(s=u,l=c):d>=4&&d<5?(o=u,l=c):d>=5&&d<6&&(o=c,l=u);const p=n-c/2;this.r=X((o+p)*255),this.g=X((s+p)*255),this.b=X((l+p)*255)}fromHsv({h:e,s:t,v:n,a:i}){this._h=e%360,this._s=t,this._v=n,this.a=typeof i=="number"?i:1;const o=X(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const s=e/60,l=Math.floor(s),d=s-l,c=X(n*(1-t)*255),u=X(n*(1-t*d)*255),p=X(n*(1-t*(1-d))*255);switch(l){case 0:this.g=p,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=p;break;case 3:this.r=c,this.g=u;break;case 4:this.r=p,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const t=gt(e,ar);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=gt(e,ar);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=gt(e,(n,i)=>i.includes("%")?X(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}var rt=2,sr=.16,ra=.05,na=.05,ia=.15,pn=5,un=4,oa=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function lr(r,e,t){var n;return Math.round(r.h)>=60&&Math.round(r.h)<=240?n=t?Math.round(r.h)-rt*e:Math.round(r.h)+rt*e:n=t?Math.round(r.h)+rt*e:Math.round(r.h)-rt*e,n<0?n+=360:n>=360&&(n-=360),n}function cr(r,e,t){if(r.h===0&&r.s===0)return r.s;var n;return t?n=r.s-sr*e:e===un?n=r.s+sr:n=r.s+ra*e,n>1&&(n=1),t&&e===pn&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function dr(r,e,t){var n;return t?n=r.v+na*e:n=r.v-ia*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function aa(r){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=[],n=new ze(r),i=n.toHsv(),o=pn;o>0;o-=1){var s=new ze({h:lr(i,o,!0),s:cr(i,o,!0),v:dr(i,o,!0)});t.push(s)}t.push(n);for(var l=1;l<=un;l+=1){var d=new ze({h:lr(i,l),s:cr(i,l),v:dr(i,l)});t.push(d)}return e.theme==="dark"?oa.map(function(c){var u=c.index,p=c.amount;return new ze(e.backgroundColor||"#141414").mix(t[u],p).toHexString()}):t.map(function(c){return c.toHexString()})}var Ct=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ct.primary=Ct[5];function pr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function he(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pr(Object(t),!0).forEach(function(n){ie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):pr(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function sa(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function la(r,e){if(!r)return!1;if(r.contains)return r.contains(e);for(var t=e;t;){if(t===r)return!0;t=t.parentNode}return!1}var ur="data-rc-order",fr="data-rc-priority",ca="rc-util-key",jt=new Map;function fn(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=r.mark;return e?e.startsWith("data-")?e:"data-".concat(e):ca}function _t(r){if(r.attachTo)return r.attachTo;var e=document.querySelector("head");return e||document.body}function da(r){return r==="queue"?"prependQueue":r?"prepend":"append"}function Ut(r){return Array.from((jt.get(r)||r).children).filter(function(e){return e.tagName==="STYLE"})}function hn(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!sa())return null;var t=e.csp,n=e.prepend,i=e.priority,o=i===void 0?0:i,s=da(n),l=s==="prependQueue",d=document.createElement("style");d.setAttribute(ur,s),l&&o&&d.setAttribute(fr,"".concat(o)),t!=null&&t.nonce&&(d.nonce=t==null?void 0:t.nonce),d.innerHTML=r;var c=_t(e),u=c.firstChild;if(n){if(l){var p=(e.styles||Ut(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(ur)))return!1;var h=Number(f.getAttribute(fr)||0);return o>=h});if(p.length)return c.insertBefore(d,p[p.length-1].nextSibling),d}c.insertBefore(d,u)}else c.appendChild(d);return d}function pa(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=_t(e);return(e.styles||Ut(t)).find(function(n){return n.getAttribute(fn(e))===r})}function ua(r,e){var t=jt.get(r);if(!t||!la(document,t)){var n=hn("",e),i=n.parentNode;jt.set(r,i),r.removeChild(n)}}function fa(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=_t(t),i=Ut(n),o=he(he({},t),{},{styles:i});ua(n,o);var s=pa(e,o);if(s){var l,d;if((l=o.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((d=o.csp)===null||d===void 0?void 0:d.nonce)){var c;s.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return s.innerHTML!==r&&(s.innerHTML=r),s}var u=hn(r,o);return u.setAttribute(fn(o),e),u}function gn(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}function ha(r){return gn(r)instanceof ShadowRoot}function ga(r){return ha(r)?gn(r):null}var St={},Gt=[],ma=function(e){Gt.push(e)};function xa(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","warning")},e);t&&console.error("Warning: ".concat(t))}}function va(r,e){if(process.env.NODE_ENV!=="production"&&!r&&console!==void 0){var t=Gt.reduce(function(n,i){return i(n??"","note")},e);t&&console.warn("Note: ".concat(t))}}function ya(){St={}}function mn(r,e,t){!e&&!St[t]&&(r(!1,t),St[t]=!0)}function ut(r,e){mn(xa,r,e)}function ba(r,e){mn(va,r,e)}ut.preMessage=ma;ut.resetWarned=ya;ut.noteOnce=ba;function wa(r){return r.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Ca(r,e){ut(r,"[@ant-design/icons] ".concat(e))}function hr(r){return Ie(r)==="object"&&typeof r.name=="string"&&typeof r.theme=="string"&&(Ie(r.icon)==="object"||typeof r.icon=="function")}function gr(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(r).reduce(function(e,t){var n=r[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[wa(t)]=n}return e},{})}function kt(r,e,t){return t?x.createElement(r.tag,he(he({key:e},gr(r.attrs)),t),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))})):x.createElement(r.tag,he({key:e},gr(r.attrs)),(r.children||[]).map(function(n,i){return kt(n,"".concat(e,"-").concat(r.tag,"-").concat(i))}))}function xn(r){return aa(r)[0]}function vn(r){return r?Array.isArray(r)?r:[r]:[]}var ja=`
2441
2441
  .anticon {
2442
2442
  display: inline-flex;
2443
2443
  align-items: center;
@@ -2492,10 +2492,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2492
2492
  transform: rotate(360deg);
2493
2493
  }
2494
2494
  }
2495
- `,So=function(e){var t=x.useContext(sn),n=t.csp,i=t.prefixCls,a=t.layer,s=jo;i&&(s=s.replace(/anticon/g,i)),a&&(s="@layer ".concat(a,` {
2495
+ `,Sa=function(e){var t=x.useContext(sn),n=t.csp,i=t.prefixCls,o=t.layer,s=ja;i&&(s=s.replace(/anticon/g,i)),o&&(s="@layer ".concat(o,` {
2496
2496
  `).concat(s,`
2497
- }`)),x.useEffect(function(){var l=e.current,d=go(l);fo(s,"@ant-design-icons",{prepend:!a,csp:n,attachTo:d})},[])},ko=["icon","className","onClick","style","primaryColor","secondaryColor"],Ge={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Lo(r){var e=r.primaryColor,t=r.secondaryColor;Ge.primaryColor=e,Ge.secondaryColor=t||xn(e),Ge.calculated=!!t}function Eo(){return he({},Ge)}var Ae=function(e){var t=e.icon,n=e.className,i=e.onClick,a=e.style,s=e.primaryColor,l=e.secondaryColor,d=cn(e,ko),c=$.useRef(),u=Ge;if(s&&(u={primaryColor:s,secondaryColor:l||xn(s)}),So(c),Co(hr(t),"icon should be icon definiton, but got ".concat(t)),!hr(t))return null;var p=t;return p&&typeof p.icon=="function"&&(p=he(he({},p),{},{icon:p.icon(u.primaryColor,u.secondaryColor)})),kt(p.icon,"svg-".concat(p.name),he(he({className:n,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:c}))};Ae.displayName="IconReact";Ae.getTwoToneColors=Eo;Ae.setTwoToneColors=Lo;function yn(r){var e=vn(r),t=ln(e,2),n=t[0],i=t[1];return Ae.setTwoToneColors({primaryColor:n,secondaryColor:i})}function Oo(){var r=Ae.getTwoToneColors();return r.calculated?[r.primaryColor,r.secondaryColor]:r.primaryColor}var Do=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];yn(Ct.primary);var Je=$.forwardRef(function(r,e){var t=r.className,n=r.icon,i=r.spin,a=r.rotate,s=r.tabIndex,l=r.onClick,d=r.twoToneColor,c=cn(r,Do),u=$.useContext(sn),p=u.prefixCls,h=p===void 0?"anticon":p,f=u.rootClassName,g=eo(f,h,ie(ie({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),t),v=s;v===void 0&&l&&(v=-1);var L=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,M=vn(d),j=ln(M,2),O=j[0],S=j[1];return $.createElement("span",Ke({role:"img","aria-label":n.name},c,{ref:e,tabIndex:v,onClick:l,className:g}),$.createElement(Ae,{icon:n,primaryColor:O,secondaryColor:S,style:L}))});Je.displayName="AntdIcon";Je.getTwoToneColor=Oo;Je.setTwoToneColor=yn;var To={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},$o=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:To}))},bn=$.forwardRef($o);process.env.NODE_ENV!=="production"&&(bn.displayName="CopyOutlined");var Io={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Mo=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:Io}))},wn=$.forwardRef(Mo);process.env.NODE_ENV!=="production"&&(wn.displayName="DownloadOutlined");const Po=({onClose:r,setCurrentStep:e})=>{const{initiateMFA:t}=me(),[n,i]=x.useState(null);async function a(){if(t)try{const s=await t();i(s.data.value)}catch(s){console.log(s)}}return x.useEffect(()=>{a()},[]),o.jsx("div",{children:n?o.jsxs(o.Fragment,{children:[o.jsx(je,{children:o.jsx(Se,{children:G("EnterAuthenticationCode")})}),o.jsx(Fa,{children:o.jsx("img",{src:`data:image/png;base64,${n.qrCodeImage}`})}),o.jsx("br",{}),o.jsxs(_a,{children:[o.jsxs(le,{children:[" ",G("CopyCodeManually")]}),o.jsxs(Va,{onClick:()=>Kr(n.totpSecret),children:[o.jsx(pt,{value:n.totpSecret,disabled:!0}),o.jsx(Ba,{children:o.jsx(bn,{})})]})]}),o.jsx(Re,{children:o.jsxs(Ua,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:()=>e(Me.VERIFY_AUTHENTICATOR_CODE),children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})})]}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},zo=({onClose:r,setRefetch:e})=>{const{disableMFA:t}=me(),[n,i]=x.useState("");function a(l){i(l.target.value)}async function s(){if(t)try{await t(n),r()}catch(l){console.log(l,"err")}finally{e(l=>l+1)}}return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("DisableTwoFactor"),o.jsx(le,{children:G("DisableTwoFactorDesc")})]})}),o.jsxs(Ea,{children:[o.jsx(le,{children:V("Password")}),o.jsx(Da,{value:n,onChange:a,placeholder:V("EnterPassword")})]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(Ne,{onClick:s,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]})},Ho=({onClose:r,confirmationToken:e,setRefetch:t,idOf2FA:n})=>{const{confirmTwoFactor:i}=me(),[a,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){if(i)try{(await i({confirmationToken:e,code:a,id:n})).data.success&&r()}catch(p){console.log(p)}finally{t(p=>p+1)}}return o.jsx("div",{children:e?o.jsxs(o.Fragment,{children:[o.jsxs(Se,{children:[o.jsx("div",{children:G("EnterVerificationCode")}),o.jsx(le,{children:G("BackupCodesDesc")})]}),o.jsxs(rn,{children:[o.jsx(T.Input.OTP,{value:a,onChange:c}),l.map(p=>o.jsxs("span",{children:[o.jsx(Ze,{}),p.errors[0]]},p.name))]}),o.jsxs(pe,{children:[o.jsx(te,{onClick:r,children:Z("Cancel")}),o.jsxs(te,{onClick:u,disabled:(a==null?void 0:a.length)!=6,children:[o.jsx("span",{children:Z("Continue")}),o.jsx(ce,{})]})]})]}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},Ro=({onClose:r,backupCodes:e})=>{const t=()=>{const n=e.join(`
2498
- `),i=new Blob([n],{type:"text/plain;charset=utf-8"}),a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download="backup-codes.txt",s.click(),URL.revokeObjectURL(a)};return o.jsxs("div",{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G("BackupCodesDesc")})]})}),o.jsx(Oa,{children:o.jsx(T.Button,{type:"primary",icon:o.jsx(wn,{}),onClick:t,children:G("DownloadBackupCodes")})}),o.jsx(pe,{children:o.jsx(te,{onClick:r,children:Z("Cancel")})})]})};var Me=(r=>(r[r.SELECT_MFA_OPTION=0]="SELECT_MFA_OPTION",r[r.SELECT_AUTHENTICATOR_APP=1]="SELECT_AUTHENTICATOR_APP",r[r.CONNECT_AUTHENTICATOR=2]="CONNECT_AUTHENTICATOR",r[r.VERIFY_AUTHENTICATOR_CODE=3]="VERIFY_AUTHENTICATOR_CODE",r[r.VERIFY_EMAIL_CODE=4]="VERIFY_EMAIL_CODE",r[r.DISABLE_AUTHENTICATOR=5]="DISABLE_AUTHENTICATOR",r[r.BACKUP_CODES=6]="BACKUP_CODES",r[r.ENTER_BACKUP_CODE=7]="ENTER_BACKUP_CODE",r))(Me||{});const No=({isOpen:r,setIsOpen:e,modal:t=0,setRefetch:n,enableTwoFactorService:i})=>{const[a,s]=x.useState(t),[l,d]=x.useState(""),[c,u]=x.useState(),[p,h]=x.useState("");function f(){e(!1)}const g=x.useMemo(()=>{switch(a){case 0:return nr;case 1:return Aa;case 2:return Po;case 3:return Na;case 4:return Ho;case 5:return zo;case 6:return Ro;default:return nr}},[a]),v=x.useMemo(()=>{switch(a){case 0:return{onClose:f,setCurrentStep:s,setConfirmationToken:d,setRefetch:n,setIdOf2FA:u,enableTwoFactorService:i};case 1:return{onClose:f,setCurrentStep:s};case 2:return{onClose:f,setCurrentStep:s};case 3:return{onClose:f,setCurrentStep:s,setBackupCodes:h,setRefetch:n};case 4:return{onClose:f,setCurrentStep:s,confirmationToken:l,setRefetch:n,idOf2FA:c};case 5:return{onClose:f,setRefetch:n};case 6:return{onClose:f,backupCodes:p};case 7:return{onClose:f,confirmationToken:l,setRefetch:n,idOf2FA:c};default:return{onClose:f}}},[a,l,p]);return o.jsx(on,{displayAddRuleModal:r,onClose:f,hideFooter:!0,children:o.jsx(g,{...v})})},Ao=m.div`
2497
+ }`)),x.useEffect(function(){var l=e.current,d=ga(l);fa(s,"@ant-design-icons",{prepend:!o,csp:n,attachTo:d})},[])},ka=["icon","className","onClick","style","primaryColor","secondaryColor"],Ge={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function La(r){var e=r.primaryColor,t=r.secondaryColor;Ge.primaryColor=e,Ge.secondaryColor=t||xn(e),Ge.calculated=!!t}function Ea(){return he({},Ge)}var Ae=function(e){var t=e.icon,n=e.className,i=e.onClick,o=e.style,s=e.primaryColor,l=e.secondaryColor,d=cn(e,ka),c=$.useRef(),u=Ge;if(s&&(u={primaryColor:s,secondaryColor:l||xn(s)}),Sa(c),Ca(hr(t),"icon should be icon definiton, but got ".concat(t)),!hr(t))return null;var p=t;return p&&typeof p.icon=="function"&&(p=he(he({},p),{},{icon:p.icon(u.primaryColor,u.secondaryColor)})),kt(p.icon,"svg-".concat(p.name),he(he({className:n,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:c}))};Ae.displayName="IconReact";Ae.getTwoToneColors=Ea;Ae.setTwoToneColors=La;function yn(r){var e=vn(r),t=ln(e,2),n=t[0],i=t[1];return Ae.setTwoToneColors({primaryColor:n,secondaryColor:i})}function Oa(){var r=Ae.getTwoToneColors();return r.calculated?[r.primaryColor,r.secondaryColor]:r.primaryColor}var Da=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];yn(Ct.primary);var Je=$.forwardRef(function(r,e){var t=r.className,n=r.icon,i=r.spin,o=r.rotate,s=r.tabIndex,l=r.onClick,d=r.twoToneColor,c=cn(r,Da),u=$.useContext(sn),p=u.prefixCls,f=p===void 0?"anticon":p,h=u.rootClassName,g=ta(h,f,ie(ie({},"".concat(f,"-").concat(n.name),!!n.name),"".concat(f,"-spin"),!!i||n.name==="loading"),t),v=s;v===void 0&&l&&(v=-1);var L=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,M=vn(d),j=ln(M,2),O=j[0],S=j[1];return $.createElement("span",Ke({role:"img","aria-label":n.name},c,{ref:e,tabIndex:v,onClick:l,className:g}),$.createElement(Ae,{icon:n,primaryColor:O,secondaryColor:S,style:L}))});Je.displayName="AntdIcon";Je.getTwoToneColor=Oa;Je.setTwoToneColor=yn;var Ta={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},$a=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:Ta}))},bn=$.forwardRef($a);process.env.NODE_ENV!=="production"&&(bn.displayName="CopyOutlined");var Ia={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Ma=function(e,t){return $.createElement(Je,Ke({},e,{ref:t,icon:Ia}))},wn=$.forwardRef(Ma);process.env.NODE_ENV!=="production"&&(wn.displayName="DownloadOutlined");const Pa=({onClose:r,setCurrentStep:e})=>{const{initiateMFA:t}=we(),[n,i]=x.useState(null);async function o(){if(t)try{const s=await t();i(s.data.value)}catch(s){console.log(s)}}return x.useEffect(()=>{o()},[]),a.jsx("div",{children:n?a.jsxs(a.Fragment,{children:[a.jsx(je,{children:a.jsx(Se,{children:G("EnterAuthenticationCode")})}),a.jsx(Vo,{children:a.jsx("img",{src:`data:image/png;base64,${n.qrCodeImage}`})}),a.jsx("br",{}),a.jsxs(Uo,{children:[a.jsxs(le,{children:[" ",G("CopyCodeManually")]}),a.jsxs(Bo,{onClick:()=>Kr(n.totpSecret),children:[a.jsx(pt,{value:n.totpSecret,disabled:!0}),a.jsx(_o,{children:a.jsx(bn,{})})]})]}),a.jsx(Re,{children:a.jsxs(Go,{children:[a.jsx(te,{onClick:r,children:Z("Cancel")}),a.jsxs(te,{onClick:()=>e(Me.VERIFY_AUTHENTICATOR_CODE),children:[a.jsx("span",{children:Z("Continue")}),a.jsx(ce,{})]})]})})]}):a.jsx(Vt,{children:a.jsx(T.Spin,{})})})},za=({onClose:r,setRefetch:e,disableMFAService:t})=>{const[n,i]=x.useState("");function o(l){i(l.target.value)}async function s(){if(t)try{await t(n),r()}catch(l){console.log(l,"err")}finally{e(l=>l+1)}}return a.jsxs("div",{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("DisableTwoFactor"),a.jsx(le,{children:G("DisableTwoFactorDesc")})]})}),a.jsxs(Oo,{children:[a.jsx(le,{children:V("Password")}),a.jsx(To,{value:n,onChange:o,placeholder:V("EnterPassword")})]}),a.jsxs(pe,{children:[a.jsx(te,{onClick:r,children:Z("Cancel")}),a.jsxs(Ne,{onClick:s,children:[a.jsx("span",{children:Z("Continue")}),a.jsx(ce,{})]})]})]})},Ha=({onClose:r,confirmationToken:e,setRefetch:t,idOf2FA:n})=>{const{confirmTwoFactor:i}=we(),[o,s]=x.useState(""),[l,d]=x.useState([]);function c(p){s(p)}async function u(){if(i)try{(await i({confirmationToken:e,code:o,id:n})).data.success&&r()}catch(p){console.log(p)}finally{t(p=>p+1)}}return a.jsx("div",{children:e?a.jsxs(a.Fragment,{children:[a.jsxs(Se,{children:[a.jsx("div",{children:G("EnterVerificationCode")}),a.jsx(le,{children:G("BackupCodesDesc")})]}),a.jsxs(rn,{children:[a.jsx(T.Input.OTP,{value:o,onChange:c}),l.map(p=>a.jsxs("span",{children:[a.jsx(Ze,{}),p.errors[0]]},p.name))]}),a.jsxs(pe,{children:[a.jsx(te,{onClick:r,children:Z("Cancel")}),a.jsxs(te,{onClick:u,disabled:(o==null?void 0:o.length)!=6,children:[a.jsx("span",{children:Z("Continue")}),a.jsx(ce,{})]})]})]}):a.jsx(Vt,{children:a.jsx(T.Spin,{})})})},Ra=({onClose:r,backupCodes:e})=>{const t=()=>{const n=e.join(`
2498
+ `),i=new Blob([n],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.download="backup-codes.txt",s.click(),URL.revokeObjectURL(o)};return a.jsxs("div",{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("EnterVerificationCode"),a.jsx(le,{children:G("BackupCodesDesc")})]})}),a.jsx(Do,{children:a.jsx(T.Button,{type:"primary",icon:a.jsx(wn,{}),onClick:t,children:G("DownloadBackupCodes")})}),a.jsx(pe,{children:a.jsx(te,{onClick:r,children:Z("Cancel")})})]})};var Me=(r=>(r[r.SELECT_MFA_OPTION=0]="SELECT_MFA_OPTION",r[r.SELECT_AUTHENTICATOR_APP=1]="SELECT_AUTHENTICATOR_APP",r[r.CONNECT_AUTHENTICATOR=2]="CONNECT_AUTHENTICATOR",r[r.VERIFY_AUTHENTICATOR_CODE=3]="VERIFY_AUTHENTICATOR_CODE",r[r.VERIFY_EMAIL_CODE=4]="VERIFY_EMAIL_CODE",r[r.DISABLE_AUTHENTICATOR=5]="DISABLE_AUTHENTICATOR",r[r.BACKUP_CODES=6]="BACKUP_CODES",r[r.ENTER_BACKUP_CODE=7]="ENTER_BACKUP_CODE",r))(Me||{});const Na=({isOpen:r,setIsOpen:e,modal:t=0,setRefetch:n,enableTwoFactorService:i,disableMFAService:o})=>{const[s,l]=x.useState(t),[d,c]=x.useState(""),[u,p]=x.useState(),[f,h]=x.useState("");function g(){e(!1)}const v=x.useMemo(()=>{switch(s){case 0:return nr;case 1:return Fo;case 2:return Pa;case 3:return Ao;case 4:return Ha;case 5:return za;case 6:return Ra;default:return nr}},[s]),L=x.useMemo(()=>{switch(s){case 0:return{onClose:g,setCurrentStep:l,setConfirmationToken:c,setRefetch:n,setIdOf2FA:p,enableTwoFactorService:i,disableMFAService:o};case 1:return{onClose:g,setCurrentStep:l};case 2:return{onClose:g,setCurrentStep:l};case 3:return{onClose:g,setCurrentStep:l,setBackupCodes:h,setRefetch:n};case 4:return{onClose:g,setCurrentStep:l,confirmationToken:d,setRefetch:n,idOf2FA:u};case 5:return{onClose:g,setRefetch:n,disableMFAService:o};case 6:return{onClose:g,backupCodes:f};case 7:return{onClose:g,confirmationToken:d,setRefetch:n,idOf2FA:u};default:return{onClose:g}}},[s,d,f]);return a.jsx(an,{displayAddRuleModal:r,onClose:g,hideFooter:!0,children:a.jsx(v,{...L})})},Aa=m.div`
2499
2499
  height: var(--size-800, 4rem);
2500
2500
  display: flex;
2501
2501
  justify-content: space-between;
@@ -2532,9 +2532,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2532
2532
  display: flex;
2533
2533
  gap: 0.12rem;
2534
2534
  }
2535
- `,Fo=m.div`
2535
+ `,Fa=m.div`
2536
2536
  cursor: pointer;
2537
- `,Vo=m(Mr)`
2537
+ `,Va=m(Mr)`
2538
2538
  width: 10.943px !important;
2539
2539
  height: 8.552px !important;
2540
2540
 
@@ -2562,20 +2562,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2562
2562
  letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
2563
2563
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2564
2564
  }
2565
- `,jn=({breadcrumbItems:r,logo:e,button:t,className:n,backButton:i=o.jsx(Vo,{})})=>{const a=re.useNavigate();return o.jsxs(Ao,{className:n||"",children:[o.jsxs("div",{className:"page-starter",children:[e?o.jsx("div",{className:"icon",children:e}):o.jsx(Fo,{className:"icon",onClick:()=>a(-1),children:i}),o.jsx(Cn,{items:r})]}),o.jsx("div",{children:t&&t})]})};var Lt=(r=>(r[r.None=1]="None",r[r.OTP=2]="OTP",r[r.TOTP=3]="TOTP",r[r.BackupCode=4]="BackupCode",r))(Lt||{});const Bo={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},_o=({confirmTwoFactor:r,resendOTP:e,confirmationToken:t,updatedResponse:n,mfaType:i=1,id:a,setRefetchData:s,backupCodeEndpoint:l,setVisible:d,visible:c})=>{const[u,p]=x.useState(""),[h,f]=x.useState(!0),[g,v]=x.useState(60),[L,M]=x.useState([]),[j,O]=x.useState(!1);async function S(){var B,F,H;if(u)try{const y=await r({confirmationToken:t,code:u,id:a});(B=y==null?void 0:y.data)!=null&&B.success&&(d(!1),s&&s(R=>!R))}catch(y){const R=$e((H=(F=y==null?void 0:y.response)==null?void 0:F.data)==null?void 0:H.errors);M(R),console.log("Error in Save OTP",y)}}async function z(){if(e)try{const B=await e(t,a);B.data.success&&(n(B),f(!0),v(60))}catch(B){console.log("Error in OTP resend",B)}}function U(){d(!1)}function Y(B){p(B)}return x.useEffect(()=>{if(!h)return;const B=setInterval(()=>{v(F=>F<=1?(clearInterval(B),f(!1),0):F-1)},1e3);return()=>clearInterval(B)},[h]),o.jsx(dt,{open:c,onCancel:U,footer:[null],children:t?o.jsx(o.Fragment,{children:j?o.jsx(o.Fragment,{children:o.jsx(Bt,{setBackupActivated:O,backupCodeEndpoint:l,setVisible:d,id:a,setRefetchData:s,confirmationToken:t})}):o.jsxs(o.Fragment,{children:[o.jsx(je,{children:o.jsxs(Se,{children:[G("EnterVerificationCode"),o.jsx(le,{children:G(Bo[i])})]})}),o.jsxs(tn,{className:L.length>0?"verification-error":"",children:[o.jsx(T.Input.OTP,{value:u,onChange:Y}),L.map(B=>o.jsxs("span",{children:[o.jsx(Ze,{}),B.errors[0]]},B.name)),o.jsxs(ka,{children:[G("DidnReceiveCode")," ",o.jsx(en,{onClick:()=>O(!0),children:G("EnterBackupCode")})]})]}),o.jsxs(pe,{children:[i!==Lt.TOTP&&o.jsx(te,{disabled:h,onClick:z,children:h?`${G("ResendAvailable")} ${g} ${V("Second")}`:`${G("Resend")}`}),o.jsxs(Ne,{onClick:S,disabled:(u==null?void 0:u.length)!==6&&i!==Lt.TOTP,children:[o.jsxs("span",{children:[" ",Z("Continue")]}),o.jsx(ce,{})]})]})]})}):o.jsx(Vt,{children:o.jsx(T.Spin,{})})})},Uo=m.div`
2565
+ `,jn=({breadcrumbItems:r,logo:e,button:t,className:n,backButton:i=a.jsx(Va,{})})=>{const o=re.useNavigate();return a.jsxs(Aa,{className:n||"",children:[a.jsxs("div",{className:"page-starter",children:[e?a.jsx("div",{className:"icon",children:e}):a.jsx(Fa,{className:"icon",onClick:()=>o(-1),children:i}),a.jsx(Cn,{items:r})]}),a.jsx("div",{children:t&&t})]})};var Lt=(r=>(r[r.None=1]="None",r[r.OTP=2]="OTP",r[r.TOTP=3]="TOTP",r[r.BackupCode=4]="BackupCode",r))(Lt||{});const Ba={1:"",2:"OtpDesc",3:"TotpDesc",4:"TotpDesc"},_a=({confirmTwoFactor:r,resendOTP:e,confirmationToken:t,updatedResponse:n,mfaType:i=1,id:o,setRefetchData:s,backupCodeEndpoint:l,setVisible:d,visible:c})=>{const[u,p]=x.useState(""),[f,h]=x.useState(!0),[g,v]=x.useState(60),[L,M]=x.useState([]),[j,O]=x.useState(!1);async function S(){var B,F,H;if(u)try{const y=await r({confirmationToken:t,code:u,id:o});(B=y==null?void 0:y.data)!=null&&B.success&&(d(!1),s&&s(R=>!R))}catch(y){const R=$e((H=(F=y==null?void 0:y.response)==null?void 0:F.data)==null?void 0:H.errors);M(R),console.log("Error in Save OTP",y)}}async function z(){if(e)try{const B=await e(t,o);B.data.success&&(n(B),h(!0),v(60))}catch(B){console.log("Error in OTP resend",B)}}function U(){d(!1)}function Y(B){p(B)}return x.useEffect(()=>{if(!f)return;const B=setInterval(()=>{v(F=>F<=1?(clearInterval(B),h(!1),0):F-1)},1e3);return()=>clearInterval(B)},[f]),a.jsx(dt,{open:c,onCancel:U,footer:[null],children:t?a.jsx(a.Fragment,{children:j?a.jsx(a.Fragment,{children:a.jsx(Bt,{setBackupActivated:O,backupCodeEndpoint:l,setVisible:d,id:o,setRefetchData:s,confirmationToken:t})}):a.jsxs(a.Fragment,{children:[a.jsx(je,{children:a.jsxs(Se,{children:[G("EnterVerificationCode"),a.jsx(le,{children:G(Ba[i])})]})}),a.jsxs(tn,{className:L.length>0?"verification-error":"",children:[a.jsx(T.Input.OTP,{value:u,onChange:Y}),L.map(B=>a.jsxs("span",{children:[a.jsx(Ze,{}),B.errors[0]]},B.name)),a.jsxs(Lo,{children:[G("DidnReceiveCode")," ",a.jsx(en,{onClick:()=>O(!0),children:G("EnterBackupCode")})]})]}),a.jsxs(pe,{children:[i!==Lt.TOTP&&a.jsx(te,{disabled:f,onClick:z,children:f?`${G("ResendAvailable")} ${g} ${V("Second")}`:`${G("Resend")}`}),a.jsxs(Ne,{onClick:S,disabled:(u==null?void 0:u.length)!==6&&i!==Lt.TOTP,children:[a.jsxs("span",{children:[" ",Z("Continue")]}),a.jsx(ce,{})]})]})]})}):a.jsx(Vt,{children:a.jsx(T.Spin,{})})})},Ua=m.div`
2566
2566
  width: 100%;
2567
2567
  height: 100%;
2568
- `,Go=({option:r})=>(x.useEffect(()=>{const e=document.getElementById("my-chart"),t=An.init(e);t.setOption(r);const n=()=>t.resize();return window.addEventListener("resize",n,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",n),t.dispose()}},[r]),o.jsx(Uo,{id:"my-chart"}));m.div`
2568
+ `,Ga=({option:r})=>(x.useEffect(()=>{const e=document.getElementById("my-chart"),t=An.init(e);t.setOption(r);const n=()=>t.resize();return window.addEventListener("resize",n,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",n),t.dispose()}},[r]),a.jsx(Ua,{id:"my-chart"}));m.div`
2569
2569
  display: flex;
2570
2570
  justify-content: center;
2571
2571
  align-items: center;
2572
2572
  height: 100vh;
2573
2573
  background-color: ${r=>r.backgroundcolor};
2574
- `;const Wo=m(T.Spin)`
2574
+ `;const Wa=m(T.Spin)`
2575
2575
  .ant-spin-dot-item {
2576
2576
  background-color: ${r=>r.backgroundcolor};
2577
2577
  }
2578
- `,Yo=({backgroundcolor:r})=>o.jsx("div",{children:o.jsx(Wo,{size:"large",backgroundcolor:r})}),Ko=m.div`
2578
+ `,Ya=({backgroundcolor:r})=>a.jsx("div",{children:a.jsx(Wa,{size:"large",backgroundcolor:r})}),Ka=m.div`
2579
2579
  position: absolute;
2580
2580
  left: 0;
2581
2581
  top: 0;
@@ -2610,7 +2610,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2610
2610
  font-size: 1.125rem;
2611
2611
  max-width: 25rem;
2612
2612
  }
2613
- `,qo=m.keyframes`
2613
+ `,qa=m.keyframes`
2614
2614
  0% {
2615
2615
  opacity: 90%;
2616
2616
  }
@@ -2624,17 +2624,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2624
2624
  background: #282828; /* Dark base color */
2625
2625
  border-radius: 4px;
2626
2626
  background-size: 1000px 100%;
2627
- animation: ${qo} 1.5s infinite linear;
2627
+ animation: ${qa} 1.5s infinite linear;
2628
2628
  background: var(--color-interaction-press-primary, rgba(20, 20, 20, 0.1));
2629
- `,Zo=m(Qe)`
2629
+ `,Za=m(Qe)`
2630
2630
  width: 70%; /* Mimics the main title area */
2631
2631
  height: 20px;
2632
2632
  margin-bottom: 10px;
2633
- `,ye=m(Qe)`
2633
+ `,ve=m(Qe)`
2634
2634
  width: ${r=>r.width};
2635
2635
  height: ${r=>r.height};
2636
2636
  margin-bottom: ${r=>r.marginbottom};
2637
- `,ot=m(Qe)`
2637
+ `,at=m(Qe)`
2638
2638
  flex-grow: 1;
2639
2639
  height: 130px;
2640
2640
  margin: 0 1px;
@@ -2649,19 +2649,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2649
2649
  margin-bottom: 2px;
2650
2650
  justify-content: space-between;
2651
2651
  margin-top: auto;
2652
- ${ot}:first-child {
2652
+ ${at}:first-child {
2653
2653
  margin-left: 0;
2654
2654
  }
2655
- ${ot}:last-child {
2655
+ ${at}:last-child {
2656
2656
  margin-right: 0;
2657
2657
  }
2658
- `,Jo=m.div`
2658
+ `,Ja=m.div`
2659
2659
  padding: 20px;
2660
2660
  overflow-y: hidden;
2661
2661
  height: 100vh;
2662
2662
  position: relative;
2663
2663
  background: var(--color-bg-primary, #fff);
2664
- `,Qo=m.div`
2664
+ `,Qa=m.div`
2665
2665
  display: flex;
2666
2666
  width: fit-content;
2667
2667
  gap: 2rem;
@@ -2669,7 +2669,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2669
2669
  padding: 0.5rem;
2670
2670
  margin-top: 3rem;
2671
2671
  margin-bottom: 1.5rem;
2672
- `,Xo=m(Qe)`
2672
+ `,Xa=m(Qe)`
2673
2673
  width: 4rem;
2674
2674
  height: 1rem;
2675
2675
  border-radius: 5px;
@@ -2685,7 +2685,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2685
2685
  flex-direction: column;
2686
2686
  padding: 1rem;
2687
2687
  margin-bottom: 2px;
2688
- `,xr=()=>o.jsxs(o.Fragment,{children:[o.jsx(mr,{width:"80%"}),o.jsx(mr,{width:"60%"})]}),ts=()=>o.jsxs(Jo,{children:[o.jsx(Ko,{children:o.jsxs("div",{children:[o.jsx("h2",{children:Kt("ComingSoon")}),o.jsx("p",{children:Kt("ComingSoonDesc")})]})}),o.jsx(Zo,{}),o.jsx(ye,{}),o.jsx(Qo,{children:[...Array(7)].map((r,e)=>o.jsx(Xo,{},e))}),o.jsx(mt,{children:[...Array(5)].map((r,e)=>o.jsx(ot,{children:o.jsx(xr,{})},e))}),o.jsxs(es,{children:[o.jsx(ye,{width:"20%",height:"18px",marginbottom:"10px"}),o.jsx(ye,{width:"20%",height:"18px",marginbottom:"20px"}),o.jsxs(mt,{children:[o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10px"}),o.jsx(ye,{width:"120%",height:"18px",marginbottom:"10"}),o.jsx(ye,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),o.jsx(mt,{children:[...Array(5)].map((r,e)=>o.jsx(ot,{children:o.jsx(xr,{})},e))})]}),rs=m(T.Table)`
2688
+ `,xr=()=>a.jsxs(a.Fragment,{children:[a.jsx(mr,{width:"80%"}),a.jsx(mr,{width:"60%"})]}),ts=()=>a.jsxs(Ja,{children:[a.jsx(Ka,{children:a.jsxs("div",{children:[a.jsx("h2",{children:Kt("ComingSoon")}),a.jsx("p",{children:Kt("ComingSoonDesc")})]})}),a.jsx(Za,{}),a.jsx(ve,{}),a.jsx(Qa,{children:[...Array(7)].map((r,e)=>a.jsx(Xa,{},e))}),a.jsx(mt,{children:[...Array(5)].map((r,e)=>a.jsx(at,{children:a.jsx(xr,{})},e))}),a.jsxs(es,{children:[a.jsx(ve,{width:"20%",height:"18px",marginbottom:"10px"}),a.jsx(ve,{width:"20%",height:"18px",marginbottom:"20px"}),a.jsxs(mt,{children:[a.jsx(ve,{width:"12%",height:"18px",marginbottom:"10"}),a.jsx(ve,{width:"12%",height:"18px",marginbottom:"10"}),a.jsx(ve,{width:"12%",height:"18px",marginbottom:"10"}),a.jsx(ve,{width:"12%",height:"18px",marginbottom:"10px"}),a.jsx(ve,{width:"120%",height:"18px",marginbottom:"10"}),a.jsx(ve,{width:"12%",height:"18px",marginbottom:"10px"})]})]}),a.jsx(mt,{children:[...Array(5)].map((r,e)=>a.jsx(at,{children:a.jsx(xr,{})},e))})]}),rs=m(T.Table)`
2689
2689
  .ant-table-thead > tr > th {
2690
2690
  background: var(--color-bg-primary, #fff);
2691
2691
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2806,7 +2806,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2806
2806
  }
2807
2807
  }
2808
2808
  }
2809
- `,ns=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),is=({rowKey:r,CustomExpandableRow:e,columns:t,dataTableColumns:n,dataSource:i,expandableRowProps:a,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=x.useState([]),h=t||n;x.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function f(g){p(g),l&&l([])}return o.jsx(rs,{rowKey:r||"id",pagination:c,scroll:{x:1500},locale:{emptyText:o.jsx(T.Empty,{description:Vn("NoData")})},loading:d,columns:h,expandedRowKeys:u,onExpandedRowsChange:f,expandable:{expandedRowRender:g=>o.jsx(e,{...a,record:g}),expandIcon:({expanded:g})=>o.jsx(o.Fragment,{children:g?o.jsx("span",{className:"arrow-svg",children:o.jsx(ns,{})}):o.jsx("span",{className:"arrow-svg",children:o.jsx(Tt,{})})}),expandRowByClick:!0},dataSource:i})},as=m(T.Tabs)`
2809
+ `,ns=r=>$.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},$.createElement("path",{d:"M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z",fill:"currentColor"})),is=({rowKey:r,CustomExpandableRow:e,columns:t,dataTableColumns:n,dataSource:i,expandableRowProps:o,expandedRows:s,setExpandedRow:l,loading:d,pagination:c})=>{const[u,p]=x.useState([]),f=t||n;x.useEffect(()=>{s&&s.length>0&&p(g=>[...s,...g])},[s]);function h(g){p(g),l&&l([])}return a.jsx(rs,{rowKey:r||"id",pagination:c,scroll:{x:1500},locale:{emptyText:a.jsx(T.Empty,{description:Vn("NoData")})},loading:d,columns:f,expandedRowKeys:u,onExpandedRowsChange:h,expandable:{expandedRowRender:g=>a.jsx(e,{...o,record:g}),expandIcon:({expanded:g})=>a.jsx(a.Fragment,{children:g?a.jsx("span",{className:"arrow-svg",children:a.jsx(ns,{})}):a.jsx("span",{className:"arrow-svg",children:a.jsx(Tt,{})})}),expandRowByClick:!0},dataSource:i})},os=m(T.Tabs)`
2810
2810
  display: flex;
2811
2811
  gap: var(--spacing-025, 2px);
2812
2812
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -2904,7 +2904,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2904
2904
  display: flex;
2905
2905
  gap: 5px;
2906
2906
  }
2907
- `;const os=m.div`
2907
+ `;const as=m.div`
2908
2908
  position: relative;
2909
2909
  @media (min-width: 1080px) {
2910
2910
  .tab-select {
@@ -2916,7 +2916,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2916
2916
  left: 20px;
2917
2917
  top: 10px;
2918
2918
  z-index: 1000;
2919
- `,N=r=>typeof r=="string",Be=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},vr=r=>r==null?"":String(r),ls=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},cs=/###/g,yr=r=>r&&r.includes("###")?r.replace(cs,"."):r,br=r=>!r||N(r),We=(r,e,t)=>{const n=N(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(br(r))return{};const a=yr(n[i]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++i}return br(r)?{}:{obj:r,k:yr(n[i])}},wr=(r,e,t)=>{const{obj:n,k:i}=We(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=We(r,s,Object);for(;l.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),l=We(r,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},ds=(r,e,t,n)=>{const{obj:i,k:a}=We(r,e,Object);i[a]=i[a]||[],i[a].push(t)},st=(r,e)=>{const{obj:t,k:n}=We(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},ps=(r,e,t)=>{const n=st(r,t);return n!==void 0?n:st(e,t)},Sn=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?N(r[n])||r[n]instanceof String||N(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Sn(r[n],e[n],t):r[n]=e[n]);return r},De=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),us={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fs=r=>N(r)?r.replace(/[&<>"'\/]/g,e=>us[e]):r;class hs{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const gs=[" ",",","?","!",";"],ms=new hs(20),xs=(r,e,t)=>{e=e||"",t=t||"";const n=gs.filter(s=>!e.includes(s)&&!t.includes(s));if(n.length===0)return!0;const i=ms.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!i.test(r);if(!a){const s=r.indexOf(t);s>0&&!i.test(r.substring(0,s))&&(a=!0)}return a},Et=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let s,l="";for(let d=a;d<n.length;++d)if(d!==a&&(l+=t),l+=n[d],s=i[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<n.length-1)continue;a+=d-a+1;break}i=s}return i},qe=r=>r==null?void 0:r.replace(/_/g,"-"),vs={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class lt{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||vs,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(N(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new lt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new lt(this.logger,e)}}var ge=new lt;class ft{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,a])=>{for(let s=0;s<a;s++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let s=0;s<a;s++)i(e,...t)})}}class Cr extends ft{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){var c,u;const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],n&&(Array.isArray(n)?l.push(...n):N(n)&&a?l.push(...n.split(a)):l.push(n)));const d=st(this.data,l);return!d&&!t&&!n&&e.includes(".")&&(e=l[0],t=l[1],n=l.slice(2).join(".")),d||!s||!N(n)?d:Et((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],n,a)}addResource(e,t,n,i,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];n&&(l=l.concat(s?n.split(s):n)),e.includes(".")&&(l=e.split("."),i=t,t=l[1]),this.addNamespaces(t),wr(this.data,l,i),a.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const a in n)(N(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,a,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),i=n,n=t,t=l[1]),this.addNamespaces(t);let d=st(this.data,l)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Sn(d,n,a):d={...d,...n},wr(this.data,l,d),s.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var kn={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(a=>{var s;e=((s=this.processors[a])==null?void 0:s.process(e,t,n,i))??e}),e}};const Ln=Symbol("i18next/PATH_KEY");function ys(){const r=[],e=Object.create(null);let t;return e.get=(n,i)=>{var a;return(a=t==null?void 0:t.revoke)==null||a.call(t),i===Ln?r:(r.push(i),t=Proxy.revocable(n,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function He(r,e){const{[Ln]:t}=r(ys()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&i){const a=e==null?void 0:e.ns,s=Array.isArray(a)?a:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${i}${t.slice(1).join(n)}`}return t.join(n)}const xt=r=>!N(r)&&typeof r!="boolean"&&typeof r!="number";class ct extends ft{constructor(e,t={}){super(),ls(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const a=xt(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const s=n&&e.includes(n),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xs(e,n,i);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:N(a)?[a]:a};const c=e.split(n);(n!==i||n===i&&this.options.ns.includes(c[0]))&&(a=c.shift()),e=c.join(i)}return{key:e,namespaces:N(a)?[a]:a}}translate(e,t,n){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=He(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(_=>typeof _=="function"?He(_,{...this.options,...i}):String(_));const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],i),c=d[d.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=i.lng||this.language,h=i.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(i)}:`${c}${u}${l}`:a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:l;const f=this.resolve(e,i);let g=f==null?void 0:f.res;const v=(f==null?void 0:f.usedKey)||l,L=(f==null?void 0:f.exactUsedKey)||l,M=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,S=i.count!==void 0&&!N(i.count),z=ct.hasDefaultValue(i),U=S?this.pluralResolver.getSuffix(p,i.count,i):"",Y=i.ordinal&&S?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",B=S&&!i.ordinal&&i.count===0,F=B&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${U}`]||i[`defaultValue${Y}`]||i.defaultValue;let H=g;O&&!g&&z&&(H=F);const y=xt(H),R=Object.prototype.toString.apply(H);if(O&&H&&y&&!M.includes(R)&&!(N(j)&&Array.isArray(H))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,H,{...i,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(f.res=_,f.usedParams=this.getUsedParamsDetails(i),f):_}if(s){const _=Array.isArray(H),E=_?[]:{},k=_?L:v;for(const w in H)if(Object.prototype.hasOwnProperty.call(H,w)){const b=`${k}${s}${w}`;z&&!g?E[w]=this.translate(b,{...i,defaultValue:xt(F)?F[w]:void 0,joinArrays:!1,ns:d}):E[w]=this.translate(b,{...i,joinArrays:!1,ns:d}),E[w]===b&&(E[w]=H[w])}g=E}}else if(O&&N(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,i,n));else{let _=!1,E=!1;!this.isValidLookup(g)&&z&&(_=!0,g=F),this.isValidLookup(g)||(E=!0,g=l);const w=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:g,b=z&&F!==g&&this.options.updateMissing;if(E||_||b){if(this.logger.log(b?"updateKey":"missingKey",p,c,l,b?F:g),s){const A=this.resolve(l,{...i,keySeparator:!1});A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let C=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let A=0;A<I.length;A++)C.push(I[A]);else this.options.saveMissingTo==="all"?C=this.languageUtils.toResolveHierarchy(i.lng||this.language):C.push(i.lng||this.language);const P=(A,W,K)=>{var Q;const J=z&&K!==g?K:w;this.options.missingKeyHandler?this.options.missingKeyHandler(A,c,W,J,b,i):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(A,c,W,J,b,i),this.emit("missingKey",A,c,W,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?C.forEach(A=>{const W=this.pluralResolver.getSuffixes(A,i);B&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!W.includes(`${this.options.pluralSeparator}zero`)&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(K=>{P([A],l+K,i[`defaultValue${K}`]||F)})}):P(C,l,F))}g=this.extendTranslation(g,e,i,f,n),E&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(E||_)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,_?g:void 0,i))}return a?(f.res=g,f.usedParams=this.getUsedParamsDetails(i),f):g}extendTranslation(e,t,n,i,a){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=N(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const f=e.match(this.interpolator.nestingRegexp);p=f&&f.length}let h=n.replace&&!N(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,n.lng||this.language||i.usedLng,n),u){const f=e.match(this.interpolator.nestingRegexp),g=f&&f.length;p<g&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>(a==null?void 0:a[0])===f[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`),null):this.translate(...f,t),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=N(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(e=kn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,a,s,l;return N(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?He(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(d,t),u=c.key;i=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const h=t.count!==void 0&&!N(t.count),f=h&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(N(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(L=>{var M,j;this.isValidLookup(n)||(l=L,!this.checkedLoadedFor[`${v[0]}-${L}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${v[0]}-${L}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(O=>{var U;if(this.isValidLookup(n))return;s=O;const S=[u];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(S,u,O,L,t);else{let Y;h&&(Y=this.pluralResolver.getSuffix(O,t.count,t));const B=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&Y.startsWith(F)&&S.push(u+Y.replace(F,this.options.pluralSeparator)),S.push(u+Y),f&&S.push(u+B)),g){const H=`${u}${this.options.contextSeparator||"_"}${t.context}`;S.push(H),h&&(t.ordinal&&Y.startsWith(F)&&S.push(H+Y.replace(F,this.options.pluralSeparator)),S.push(H+Y),f&&S.push(H+B))}}let z;for(;z=S.pop();)this.isValidLookup(n)||(a=z,n=this.getResource(O,L,z,t))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,i={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!N(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of t)delete i[a]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}}class jr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(N(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return t=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(s=>s===a?!0:!s.includes("-")&&!a.includes("-")?!1:!!(s.includes("-")&&!a.includes("-")&&s.slice(0,s.indexOf("-"))===a||s.startsWith(a)&&a.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),N(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],a=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return N(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):N(e)&&a(this.formatLanguageCode(e)),n.forEach(s=>{i.includes(s)||a(this.formatLanguageCode(s))}),i}}const Sr={zero:0,one:1,two:2,few:3,many:4,other:5},kr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bs{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=qe(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),kr;if(!e.match(/-|_/))return kr;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[a]=s,s}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>Sr[i]-Sr[a]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Lr=(r,e,t,n=".",i=!0)=>{let a=ps(r,e,t);return!a&&i&&N(t)&&(a=Et(r,t,n),a===void 0&&(a=Et(e,t,n))),a},vt=r=>r.replace(/\$/g,"$$$$");class Er{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:L,maxReplaces:M,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:fs,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?De(a):s||"{{",this.suffix=l?De(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?De(h):f||De("$t("),this.nestingSuffix=g?De(g):v||De(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=M||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var 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=Lr(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,n,{...i,...t,interpolationkey:g}):j}const v=g.split(this.formatSeparator),L=v.shift().trim(),M=v.join(this.formatSeparator).trim();return this.format(Lr(t,d,L,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:L})};this.resetRegExp();const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((f=i==null?void 0:i.interpolation)==null?void 0:f.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>vt(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?vt(this.escape(g)):vt(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const v=a[1].trim();if(s=c(v),s===void 0)if(typeof u=="function"){const M=u(e,a,i);s=N(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(p){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),s="";else!N(s)&&!this.useRawValueToEscape&&(s=vr(s));const L=g.safeValue(s);if(e=e.replace(a[0],L),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,a,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${De(u)}[ ]*{`));let 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(;i=this.nestingRegexp.exec(e);){let d=[];s={...n},s=s.replace&&!N(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(c!==-1&&(d=i[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,c)),a=t(l.call(this,i[1].trim(),s),s),a&&i[0]===e&&!N(a))return a;N(a)||(a=vr(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),d.length&&(a=d.reduce((u,p)=>this.format(u,p,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],a),this.regexp.lastIndex=0}return e}}const ws=r=>{let e=r.toLowerCase().trim();const t={};if(r.includes("(")){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?t.currency||(t.currency=i.trim()):e==="relativetime"&&!i.includes(":")?t.range||(t.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Or=r=>{const e={};return(t,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const s=n+JSON.stringify(a);let l=e[s];return l||(l=r(qe(n),i),e[s]=l),l(t)}},Cs=r=>(e,t,n)=>r(qe(t),n)(e);class js{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Or:Cs;this.formats={number:n((i,a)=>{const s=new Intl.NumberFormat(i,{...a});return l=>s.format(l)}),currency:n((i,a)=>{const s=new Intl.NumberFormat(i,{...a,style:"currency"});return l=>s.format(l)}),datetime:n((i,a)=>{const s=new Intl.DateTimeFormat(i,{...a});return l=>s.format(l)}),relativetime:n((i,a)=>{const s=new Intl.RelativeTimeFormat(i,{...a});return l=>s.format(l,a.range||"day")}),list:n((i,a)=>{const s=new Intl.ListFormat(i,{...a});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Or(t)}format(e,t,n,i={}){if(!t||e==null)return e;const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&!a[0].includes(")")&&a.find(l=>l.includes(")"))){const l=a.findIndex(d=>d.includes(")"));a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=ws(d);if(this.formats[c]){let h=l;try{const f=((p=i==null?void 0:i.formatParams)==null?void 0:p[i.interpolationkey])||{},g=f.locale||f.lng||i.locale||i.lng||n;h=this.formats[c](l,g,{...u,...i,...f})}catch(f){this.logger.warn(f)}return h}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const Ss=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class ks extends ft{constructor(e,t,n,i={}){var a,s;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ge.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(a=this.backend)==null?void 0:a.init)==null||s.call(a,n,i.backend,i)}queueLoad(e,t,n,i){const a={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const h=`${c}|${p}`;!n.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:i}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const i=e.split("|"),a=i[0],s=i[1];t&&this.emit("failedLoading",a,s,t),!t&&n&&this.store.addResourceBundle(a,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const l={};this.queue.forEach(d=>{ds(d.loaded,[a],s),Ss(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,n,i=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:a,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read(e,t,n,i+1,a*2,s)},a);return}s(c,u)},d=this.backend[n].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();N(e)&&(e=this.languageUtils.toResolveHierarchy(e)),N(t)&&(t=[t]);const a=this.queueLoad(e,t,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${a} for language ${i} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${i}`,l),this.loaded(e,s,l)})}saveMissing(e,t,n,i,a,s={},l=()=>{}){var d,c,u,p,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 "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((h=this.backend)!=null&&h.create){const f={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(e,t,n,i,f):v=g(e,t,n,i),v&&typeof v.then=="function"?v.then(L=>l(null,L)).catch(l):l(null,v)}catch(v){l(v)}else g(e,t,n,i,l,f)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const yt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),N(r[1])&&(e.defaultValue=r[1]),N(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Dr=r=>(N(r.ns)&&(r.ns=[r.ns]),N(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),N(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&!r.supportedLngs.includes("cimode")&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),nt=()=>{},Ls=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ye extends ft{constructor(e={},t){if(super(),this.options=Dr(e),this.services={},this.logger=ge,this.modules={external:[]},Ls(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(N(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=yt();this.options={...n,...this.options,...Dr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ge.init(i(this.modules.logger),this.options):ge.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=js;const u=new jr(this.options);this.store=new Cr(this.options.resources,this.options);const p=this.services;p.logger=ge,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new bs(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=i(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Er(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ks(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...f)=>{this.emit(h,...f)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",(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=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=Be(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=nt){var a,s;let n=t;const i=N(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};i?d(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(a=this.options.preload)==null?void 0:a.forEach)==null||s.call(a,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const i=Be();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=nt),this.services.backendConnector.reload(e,t,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&kn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Be();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?this.isLanguageChangingTo===e&&(i(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=N(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(N(l)?[l]:l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,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),n}getFixedT(e,t,n){const i=(a,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([a,s].concat(l)):d={...s},d.lng=d.lng||i.lng,d.lngs=d.lngs||i.lngs,d.ns=d.ns||i.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||n||i.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=He(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(a)?p=a.map(h=>(typeof h=="function"&&(h=He(h,c)),`${d.keyPrefix}${u}${h}`)):(typeof a=="function"&&(a=He(a,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${a}`:a),this.t(p,d)};return N(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(a,e)))}loadNamespaces(e,t){const n=Be();return this.options.ns?(N(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Be();N(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(s=>!i.includes(s)&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=i.concat(a),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}dir(e){var i,a;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new jr(yt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new Ye(e,t);return n.createInstance=Ye.createInstance,n}cloneInstance(e={},t=nt){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new Ye(i);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});a.store=new Cr(l,i),a.services.resourceStore=a.store}if(e.interpolation){const d={...yt().interpolation,...this.options.interpolation,...e.interpolation},c={...i,interpolation:d};a.services.interpolator=new Er(c)}return a.translator=new ct(a.services,i),a.translator.on("*",(l,...d)=>{a.emit(l,...d)}),a.init(i,t),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ne=Ye.createInstance();ne.createInstance;ne.dir;ne.init;ne.loadResources;ne.reloadResources;ne.use;ne.changeLanguage;ne.getFixedT;ne.t;ne.exists;ne.setDefaultNamespace;ne.hasLoadedNamespace;ne.loadNamespaces;ne.loadLanguages;ne.use(Hn).use(zn).use($r.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});var it={exports:{}},Es=it.exports,Tr;function Os(){return Tr||(Tr=1,(function(r,e){(function(t,n){r.exports=n()})(Es,(function(){var t=1e3,n=6e4,i=36e5,a="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",h="quarter",f="year",g="date",v="Invalid Date",L=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var k=["th","st","nd","rd"],w=E%100;return"["+E+(k[(w-20)%10]||k[w]||k[0])+"]"}},O=function(E,k,w){var b=String(E);return!b||b.length>=k?E:""+Array(k+1-b.length).join(w)+E},S={s:O,z:function(E){var k=-E.utcOffset(),w=Math.abs(k),b=Math.floor(w/60),C=w%60;return(k<=0?"+":"-")+O(b,2,"0")+":"+O(C,2,"0")},m:function E(k,w){if(k.date()<w.date())return-E(w,k);var b=12*(w.year()-k.year())+(w.month()-k.month()),C=k.clone().add(b,p),I=w-C<0,P=k.clone().add(b+(I?-1:1),p);return+(-(b+(w-C)/(I?C-P:P-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:p,y:f,w:u,d:c,D:g,h:d,m:l,s,ms:a,Q:h}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},z="en",U={};U[z]=j;var Y="$isDayjsObject",B=function(E){return E instanceof R||!(!E||!E[Y])},F=function E(k,w,b){var C;if(!k)return z;if(typeof k=="string"){var I=k.toLowerCase();U[I]&&(C=I),w&&(U[I]=w,C=I);var P=k.split("-");if(!C&&P.length>1)return E(P[0])}else{var A=k.name;U[A]=k,C=A}return!b&&C&&(z=C),C||!b&&z},H=function(E,k){if(B(E))return E.clone();var w=typeof k=="object"?k:{};return w.date=E,w.args=arguments,new R(w)},y=S;y.l=F,y.i=B,y.w=function(E,k){return H(E,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var R=(function(){function E(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[Y]=!0}var k=E.prototype;return k.parse=function(w){this.$d=(function(b){var C=b.date,I=b.utc;if(C===null)return new Date(NaN);if(y.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var P=C.match(L);if(P){var A=P[2]-1||0,W=(P[7]||"0").substring(0,3);return I?new Date(Date.UTC(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)):new Date(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)}}return new Date(C)})(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return y},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(w,b){var C=H(w);return this.startOf(b)<=C&&C<=this.endOf(b)},k.isAfter=function(w,b){return H(w)<this.startOf(b)},k.isBefore=function(w,b){return this.endOf(b)<H(w)},k.$g=function(w,b,C){return y.u(w)?this[b]:this.set(C,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,b){var C=this,I=!!y.u(b)||b,P=y.p(w),A=function(ve,se){var ke=y.w(C.$u?Date.UTC(C.$y,se,ve):new Date(C.$y,se,ve),C);return I?ke:ke.endOf(c)},W=function(ve,se){return y.w(C.toDate()[ve].apply(C.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(se)),C)},K=this.$W,J=this.$M,Q=this.$D,xe="set"+(this.$u?"UTC":"");switch(P){case f:return I?A(1,0):A(31,11);case p:return I?A(1,J):A(0,J+1);case u:var ue=this.$locale().weekStart||0,q=(K<ue?K+7:K)-ue;return A(I?Q-q:Q+(6-q),J);case c:case g:return W(xe+"Hours",0);case d:return W(xe+"Minutes",1);case l:return W(xe+"Seconds",2);case s:return W(xe+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,b){var C,I=y.p(w),P="set"+(this.$u?"UTC":""),A=(C={},C[c]=P+"Date",C[g]=P+"Date",C[p]=P+"Month",C[f]=P+"FullYear",C[d]=P+"Hours",C[l]=P+"Minutes",C[s]=P+"Seconds",C[a]=P+"Milliseconds",C)[I],W=I===c?this.$D+(b-this.$W):b;if(I===p||I===f){var K=this.clone().set(g,1);K.$d[A](W),K.init(),this.$d=K.set(g,Math.min(this.$D,K.daysInMonth())).$d}else A&&this.$d[A](W);return this.init(),this},k.set=function(w,b){return this.clone().$set(w,b)},k.get=function(w){return this[y.p(w)]()},k.add=function(w,b){var C,I=this;w=Number(w);var P=y.p(b),A=function(J){var Q=H(I);return y.w(Q.date(Q.date()+Math.round(J*w)),I)};if(P===p)return this.set(p,this.$M+w);if(P===f)return this.set(f,this.$y+w);if(P===c)return A(1);if(P===u)return A(7);var W=(C={},C[l]=n,C[d]=i,C[s]=t,C)[P]||1,K=this.$d.getTime()+w*W;return y.w(K,this)},k.subtract=function(w,b){return this.add(-1*w,b)},k.format=function(w){var b=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var I=w||"YYYY-MM-DDTHH:mm:ssZ",P=y.z(this),A=this.$H,W=this.$m,K=this.$M,J=C.weekdays,Q=C.months,xe=C.meridiem,ue=function(se,ke,Fe,Xe){return se&&(se[ke]||se(b,I))||Fe[ke].slice(0,Xe)},q=function(se){return y.s(A%12||12,se,"0")},ve=xe||function(se,ke,Fe){var Xe=se<12?"AM":"PM";return Fe?Xe.toLowerCase():Xe};return I.replace(M,(function(se,ke){return ke||(function(Fe){switch(Fe){case"YY":return String(b.$y).slice(-2);case"YYYY":return y.s(b.$y,4,"0");case"M":return K+1;case"MM":return y.s(K+1,2,"0");case"MMM":return ue(C.monthsShort,K,Q,3);case"MMMM":return ue(Q,K);case"D":return b.$D;case"DD":return y.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ue(C.weekdaysMin,b.$W,J,2);case"ddd":return ue(C.weekdaysShort,b.$W,J,3);case"dddd":return J[b.$W];case"H":return String(A);case"HH":return y.s(A,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return ve(A,W,!0);case"A":return ve(A,W,!1);case"m":return String(W);case"mm":return y.s(W,2,"0");case"s":return String(b.$s);case"ss":return y.s(b.$s,2,"0");case"SSS":return y.s(b.$ms,3,"0");case"Z":return P}return null})(se)||P.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,b,C){var I,P=this,A=y.p(b),W=H(w),K=(W.utcOffset()-this.utcOffset())*n,J=this-W,Q=function(){return y.m(P,W)};switch(A){case f:I=Q()/12;break;case p:I=Q();break;case h:I=Q()/3;break;case u:I=(J-K)/6048e5;break;case c:I=(J-K)/864e5;break;case d:I=J/i;break;case l:I=J/n;break;case s:I=J/t;break;default:I=J}return C?I:y.a(I)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return U[this.$L]},k.locale=function(w,b){if(!w)return this.$L;var C=this.clone(),I=F(w,b,!0);return I&&(C.$L=I),C},k.clone=function(){return y.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},E})(),_=R.prototype;return H.prototype=_,[["$ms",a],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",f],["$D",g]].forEach((function(E){_[E[1]]=function(k){return this.$g(k,E[0],E[1])}})),H.extend=function(E,k){return E.$i||(E(k,R,H),E.$i=!0),H},H.locale=F,H.isDayjs=B,H.unix=function(E){return H(1e3*E)},H.en=U[z],H.Ls=U,H.p={},H}))})(it)),it.exports}var Ds=Os();const En=dn(Ds),Ts=({setDateFilter:r,setShowRange:e,setDates:t})=>{const n=s=>s&&s>En().endOf("day"),i=s=>{if(s&&s[0]&&s[1]){const l=oe.toISODateString(s[0].toDate()),d=oe.toISODateString(s[1].toDate());t([l,d]),r(c=>({...c,startDate:l,endDate:d})),e(!1)}},a={lang:{locale:ne.language,shortMonths:[de("0"),de("1"),de("2"),de("3"),de("4"),de("5"),de("6"),de("7"),de("8"),de("9"),de("10"),de("11")],shortWeekDays:[Oe("Sun"),Oe("Mon"),Oe("Tue"),Oe("Wed"),Oe("Thu"),Oe("Fri"),Oe("Sat")]}};return o.jsx(Nr,{dropdownClassName:"date-picker-column-style",locale:a,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>i(s),disabledDate:n})},$s=m(T.Empty)`
2919
+ `,N=r=>typeof r=="string",Be=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},vr=r=>r==null?"":String(r),ls=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},cs=/###/g,yr=r=>r&&r.includes("###")?r.replace(cs,"."):r,br=r=>!r||N(r),We=(r,e,t)=>{const n=N(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(br(r))return{};const o=yr(n[i]);!r[o]&&t&&(r[o]=new t),Object.prototype.hasOwnProperty.call(r,o)?r=r[o]:r={},++i}return br(r)?{}:{obj:r,k:yr(n[i])}},wr=(r,e,t)=>{const{obj:n,k:i}=We(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let o=e[e.length-1],s=e.slice(0,e.length-1),l=We(r,s,Object);for(;l.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),l=We(r,s,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=t},ds=(r,e,t,n)=>{const{obj:i,k:o}=We(r,e,Object);i[o]=i[o]||[],i[o].push(t)},st=(r,e)=>{const{obj:t,k:n}=We(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},ps=(r,e,t)=>{const n=st(r,t);return n!==void 0?n:st(e,t)},Sn=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?N(r[n])||r[n]instanceof String||N(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Sn(r[n],e[n],t):r[n]=e[n]);return r},De=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),us={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},fs=r=>N(r)?r.replace(/[&<>"'\/]/g,e=>us[e]):r;class hs{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const gs=[" ",",","?","!",";"],ms=new hs(20),xs=(r,e,t)=>{e=e||"",t=t||"";const n=gs.filter(s=>!e.includes(s)&&!t.includes(s));if(n.length===0)return!0;const i=ms.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(r);if(!o){const s=r.indexOf(t);s>0&&!i.test(r.substring(0,s))&&(o=!0)}return o},Et=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let o=0;o<n.length;){if(!i||typeof i!="object")return;let s,l="";for(let d=o;d<n.length;++d)if(d!==o&&(l+=t),l+=n[d],s=i[l],s!==void 0){if(["string","number","boolean"].includes(typeof s)&&d<n.length-1)continue;o+=d-o+1;break}i=s}return i},qe=r=>r==null?void 0:r.replace(/_/g,"-"),vs={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class lt{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||vs,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(N(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new lt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new lt(this.logger,e)}}var ge=new lt;class ft{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let s=0;s<o;s++)i(e,...t)})}}class Cr extends ft{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){var c,u;const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.includes(".")?l=e.split("."):(l=[e,t],n&&(Array.isArray(n)?l.push(...n):N(n)&&o?l.push(...n.split(o)):l.push(n)));const d=st(this.data,l);return!d&&!t&&!n&&e.includes(".")&&(e=l[0],t=l[1],n=l.slice(2).join(".")),d||!s||!N(n)?d:Et((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[t],n,o)}addResource(e,t,n,i,o={silent:!1}){const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[e,t];n&&(l=l.concat(s?n.split(s):n)),e.includes(".")&&(l=e.split("."),i=t,t=l[1]),this.addNamespaces(t),wr(this.data,l,i),o.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const o in n)(N(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,o,s={silent:!1,skipCopy:!1}){let l=[e,t];e.includes(".")&&(l=e.split("."),i=n,n=t,t=l[1]),this.addNamespaces(t);let d=st(this.data,l)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Sn(d,n,o):d={...d,...n},wr(this.data,l,d),s.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var kn={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(o=>{var s;e=((s=this.processors[o])==null?void 0:s.process(e,t,n,i))??e}),e}};const Ln=Symbol("i18next/PATH_KEY");function ys(){const r=[],e=Object.create(null);let t;return e.get=(n,i)=>{var o;return(o=t==null?void 0:t.revoke)==null||o.call(t),i===Ln?r:(r.push(i),t=Proxy.revocable(n,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function He(r,e){const{[Ln]:t}=r(ys()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&i){const o=e==null?void 0:e.ns,s=Array.isArray(o)?o:null;if(s&&s.length>1&&s.slice(1).includes(t[0]))return`${t[0]}${i}${t.slice(1).join(n)}`}return t.join(n)}const xt=r=>!N(r)&&typeof r!="boolean"&&typeof r!="number";class ct extends ft{constructor(e,t={}){super(),ls(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const o=xt(i.res);return!(n.returnObjects===!1&&o)}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=n&&e.includes(n),l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!xs(e,n,i);if(s&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:N(o)?[o]:o};const c=e.split(n);(n!==i||n===i&&this.options.ns.includes(c[0]))&&(o=c.shift()),e=c.join(i)}return{key:e,namespaces:N(o)?[o]:o}}translate(e,t,n){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=He(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(_=>typeof _=="function"?He(_,{...this.options,...i}):String(_));const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],i),c=d[d.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const p=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return f?o?{res:`${c}${u}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:`${c}${u}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:l;const h=this.resolve(e,i);let g=h==null?void 0:h.res;const v=(h==null?void 0:h.usedKey)||l,L=(h==null?void 0:h.exactUsedKey)||l,M=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,S=i.count!==void 0&&!N(i.count),z=ct.hasDefaultValue(i),U=S?this.pluralResolver.getSuffix(p,i.count,i):"",Y=i.ordinal&&S?this.pluralResolver.getSuffix(p,i.count,{ordinal:!1}):"",B=S&&!i.ordinal&&i.count===0,F=B&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${U}`]||i[`defaultValue${Y}`]||i.defaultValue;let H=g;O&&!g&&z&&(H=F);const y=xt(H),R=Object.prototype.toString.apply(H);if(O&&H&&y&&!M.includes(R)&&!(N(j)&&Array.isArray(H))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,H,{...i,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(h.res=_,h.usedParams=this.getUsedParamsDetails(i),h):_}if(s){const _=Array.isArray(H),E=_?[]:{},k=_?L:v;for(const w in H)if(Object.prototype.hasOwnProperty.call(H,w)){const b=`${k}${s}${w}`;z&&!g?E[w]=this.translate(b,{...i,defaultValue:xt(F)?F[w]:void 0,joinArrays:!1,ns:d}):E[w]=this.translate(b,{...i,joinArrays:!1,ns:d}),E[w]===b&&(E[w]=H[w])}g=E}}else if(O&&N(j)&&Array.isArray(g))g=g.join(j),g&&(g=this.extendTranslation(g,e,i,n));else{let _=!1,E=!1;!this.isValidLookup(g)&&z&&(_=!0,g=F),this.isValidLookup(g)||(E=!0,g=l);const w=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:g,b=z&&F!==g&&this.options.updateMissing;if(E||_||b){if(this.logger.log(b?"updateKey":"missingKey",p,c,l,b?F:g),s){const A=this.resolve(l,{...i,keySeparator:!1});A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let C=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let A=0;A<I.length;A++)C.push(I[A]);else this.options.saveMissingTo==="all"?C=this.languageUtils.toResolveHierarchy(i.lng||this.language):C.push(i.lng||this.language);const P=(A,W,K)=>{var Q;const J=z&&K!==g?K:w;this.options.missingKeyHandler?this.options.missingKeyHandler(A,c,W,J,b,i):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(A,c,W,J,b,i),this.emit("missingKey",A,c,W,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?C.forEach(A=>{const W=this.pluralResolver.getSuffixes(A,i);B&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!W.includes(`${this.options.pluralSeparator}zero`)&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(K=>{P([A],l+K,i[`defaultValue${K}`]||F)})}):P(C,l,F))}g=this.extendTranslation(g,e,i,h,n),E&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${u}${l}`),(E||_)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${l}`:l,_?g:void 0,i))}return o?(h.res=g,h.usedParams=this.getUsedParamsDetails(i),h):g}extendTranslation(e,t,n,i,o){var d,c;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=N(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(u){const h=e.match(this.interpolator.nestingRegexp);p=h&&h.length}let f=n.replace&&!N(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,n.lng||this.language||i.usedLng,n),u){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;p<g&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(o==null?void 0:o[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=N(s)?[s]:s;return e!=null&&(l!=null&&l.length)&&n.applyPostProcessor!==!1&&(e=kn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,o,s,l;return N(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(d=>typeof d=="function"?He(d,{...this.options,...t}):d)),e.forEach(d=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(d,t),u=c.key;i=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const f=t.count!==void 0&&!N(t.count),h=f&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(N(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(L=>{var M,j;this.isValidLookup(n)||(l=L,!this.checkedLoadedFor[`${v[0]}-${L}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${v[0]}-${L}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(O=>{var U;if(this.isValidLookup(n))return;s=O;const S=[u];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(S,u,O,L,t);else{let Y;f&&(Y=this.pluralResolver.getSuffix(O,t.count,t));const B=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(t.ordinal&&Y.startsWith(F)&&S.push(u+Y.replace(F,this.options.pluralSeparator)),S.push(u+Y),h&&S.push(u+B)),g){const H=`${u}${this.options.contextSeparator||"_"}${t.context}`;S.push(H),f&&(t.ordinal&&Y.startsWith(F)&&S.push(H+Y.replace(F,this.options.pluralSeparator)),S.push(H+Y),h&&S.push(H+B))}}let z;for(;z=S.pop();)this.isValidLookup(n)||(o=z,n=this.getResource(O,L,z,t))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,i={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!N(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const o of t)delete i[o]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(t)&&e[n]!==void 0)return!0;return!1}}class jr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=qe(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(N(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return t=i;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(s=>s===o?!0:!s.includes("-")&&!o.includes("-")?!1:!!(s.includes("-")&&!o.includes("-")&&s.slice(0,s.indexOf("-"))===o||s.startsWith(o)&&o.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),N(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return N(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):N(e)&&o(this.formatLanguageCode(e)),n.forEach(s=>{i.includes(s)||o(this.formatLanguageCode(s))}),i}}const Sr={zero:0,one:1,two:2,few:3,many:4,other:5},kr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bs{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=qe(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),kr;if(!e.match(/-|_/))return kr;const d=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(d,t)}return this.pluralRulesCache[o]=s,s}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,o)=>Sr[i]-Sr[o]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Lr=(r,e,t,n=".",i=!0)=>{let o=ps(r,e,t);return!o&&i&&N(t)&&(o=Et(r,t,n),o===void 0&&(o=Et(e,t,n))),o},vt=r=>r.replace(/\$/g,"$$$$");class Er{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:l,suffixEscaped:d,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:L,maxReplaces:M,alwaysFormat:j}=e.interpolation;this.escape=t!==void 0?t:fs,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?De(o):s||"{{",this.suffix=l?De(l):d||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?De(f):h||De("$t("),this.nestingSuffix=g?De(g):v||De(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=M||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var h;let o,s,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(!g.includes(this.formatSeparator)){const j=Lr(t,d,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,n,{...i,...t,interpolationkey:g}):j}const v=g.split(this.formatSeparator),L=v.shift().trim(),M=v.join(this.formatSeparator).trim();return this.format(Lr(t,d,L,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:L})};this.resetRegExp();const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>vt(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?vt(this.escape(g)):vt(g)}].forEach(g=>{for(l=0;o=g.regex.exec(e);){const v=o[1].trim();if(s=c(v),s===void 0)if(typeof u=="function"){const M=u(e,o,i);s=N(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))s="";else if(p){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),s="";else!N(s)&&!this.useRawValueToEscape&&(s=vr(s));const L=g.safeValue(s);if(e=e.replace(o[0],L),p?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,o,s;const l=(d,c)=>{const u=this.nestingOptionsSeparator;if(!d.includes(u))return d;const p=d.split(new RegExp(`${De(u)}[ ]*{`));let f=`{${p[1]}`;d=p[0],f=this.interpolate(f,s);const h=f.match(/'/g),g=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,v),`${d}${u}${f}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,d};for(;i=this.nestingRegexp.exec(e);){let d=[];s={...n},s=s.replace&&!N(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(c!==-1&&(d=i[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,c)),o=t(l.call(this,i[1].trim(),s),s),o&&i[0]===e&&!N(o))return o;N(o)||(o=vr(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),d.length&&(o=d.reduce((u,p)=>this.format(u,p,n.lng,{...n,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}const ws=r=>{let e=r.toLowerCase().trim();const t={};if(r.includes("(")){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?t.currency||(t.currency=i.trim()):e==="relativetime"&&!i.includes(":")?t.range||(t.range=i.trim()):i.split(";").forEach(s=>{if(s){const[l,...d]=s.split(":"),c=d.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=c),c==="false"&&(t[u]=!1),c==="true"&&(t[u]=!0),isNaN(c)||(t[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Or=r=>{const e={};return(t,n,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=n+JSON.stringify(o);let l=e[s];return l||(l=r(qe(n),i),e[s]=l),l(t)}},Cs=r=>(e,t,n)=>r(qe(t),n)(e);class js{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Or:Cs;this.formats={number:n((i,o)=>{const s=new Intl.NumberFormat(i,{...o});return l=>s.format(l)}),currency:n((i,o)=>{const s=new Intl.NumberFormat(i,{...o,style:"currency"});return l=>s.format(l)}),datetime:n((i,o)=>{const s=new Intl.DateTimeFormat(i,{...o});return l=>s.format(l)}),relativetime:n((i,o)=>{const s=new Intl.RelativeTimeFormat(i,{...o});return l=>s.format(l,o.range||"day")}),list:n((i,o)=>{const s=new Intl.ListFormat(i,{...o});return l=>s.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Or(t)}format(e,t,n,i={}){if(!t||e==null)return e;const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&!o[0].includes(")")&&o.find(l=>l.includes(")"))){const l=o.findIndex(d=>d.includes(")"));o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,d)=>{var p;const{formatName:c,formatOptions:u}=ws(d);if(this.formats[c]){let f=l;try{const h=((p=i==null?void 0:i.formatParams)==null?void 0:p[i.interpolationkey])||{},g=h.locale||h.lng||i.locale||i.lng||n;f=this.formats[c](l,g,{...u,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${c}`);return l},e)}}const Ss=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class ks extends ft{constructor(e,t,n,i={}){var o,s;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ge.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,n,i.backend,i)}queueLoad(e,t,n,i){const o={},s={},l={},d={};return e.forEach(c=>{let u=!0;t.forEach(p=>{const f=`${c}|${p}`;!n.reload&&this.store.hasResourceBundle(c,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),d[p]===void 0&&(d[p]=!0)))}),u||(l[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,t,n){const i=e.split("|"),o=i[0],s=i[1];t&&this.emit("failedLoading",o,s,t),!t&&n&&this.store.addResourceBundle(o,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const l={};this.queue.forEach(d=>{ds(d.loaded,[o],s),Ss(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(c=>{l[c]||(l[c]={});const u=d.loaded[c];u.length&&u.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,t,n,i=0,o=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read(e,t,n,i+1,o*2,s)},o);return}s(c,u)},d=this.backend[n].bind(this.backend);if(d.length===2){try{const c=d(e,t);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return d(e,t,l)}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();N(e)&&(e=this.languageUtils.toResolveHierarchy(e)),N(t)&&(t=[t]);const o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`,s),!s&&l&&this.logger.log(`${t}loaded namespace ${o} for language ${i}`,l),this.loaded(e,s,l)})}saveMissing(e,t,n,i,o,s={},l=()=>{}){var d,c,u,p,f;if((c=(d=this.services)==null?void 0:d.utils)!=null&&c.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const h={...s,isUpdate:o},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(e,t,n,i,h):v=g(e,t,n,i),v&&typeof v.then=="function"?v.then(L=>l(null,L)).catch(l):l(null,v)}catch(v){l(v)}else g(e,t,n,i,l,h)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const yt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),N(r[1])&&(e.defaultValue=r[1]),N(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Dr=r=>(N(r.ns)&&(r.ns=[r.ns]),N(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),N(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&!r.supportedLngs.includes("cimode")&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),nt=()=>{},Ls=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ye extends ft{constructor(e={},t){if(super(),this.options=Dr(e),this.services={},this.logger=ge,this.modules={external:[]},Ls(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(N(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=yt();this.options={...n,...this.options,...Dr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ge.init(i(this.modules.logger),this.options):ge.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=js;const u=new jr(this.options);this.store=new Cr(this.options.resources,this.options);const p=this.services;p.logger=ge,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new bs(u,{prepend:this.options.pluralSeparator}),c&&(p.formatter=i(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Er(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ks(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,t||(t=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const l=Be(),d=()=>{const c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),l}loadResources(e,t=nt){var o,s;let n=t;const i=N(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const l=[],d=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(p=>{p!=="cimode"&&(l.includes(p)||l.push(p))})};i?d(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>d(u)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,c=>d(c)),this.services.backendConnector.load(l,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,t,n){const i=Be();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=nt),this.services.backendConnector.reload(e,t,o=>{i.resolve(),n(o)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&kn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!["cimode","dev"].includes(n)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Be();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,d)=>{d?this.isLanguageChangingTo===e&&(i(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},s=l=>{var u,p;!e&&!l&&this.services.languageDetector&&(l=[]);const d=N(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(N(l)?[l]:l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(p=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||p.call(u,c)),this.loadResources(c,f=>{o(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),n}getFixedT(e,t,n){const i=(o,s,...l)=>{let d;typeof s!="object"?d=this.options.overloadTranslationOptionHandler([o,s].concat(l)):d={...s},d.lng=d.lng||i.lng,d.lngs=d.lngs||i.lngs,d.ns=d.ns||i.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||n||i.keyPrefix);const c={...this.options,...d};typeof d.keyPrefix=="function"&&(d.keyPrefix=He(d.keyPrefix,c));const u=this.options.keySeparator||".";let p;return d.keyPrefix&&Array.isArray(o)?p=o.map(f=>(typeof f=="function"&&(f=He(f,c)),`${d.keyPrefix}${u}${f}`)):(typeof o=="function"&&(o=He(o,c)),p=d.keyPrefix?`${d.keyPrefix}${u}${o}`:o),this.t(p,d)};return N(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(l,d)=>{const c=this.services.backendConnector.state[`${l}|${d}`];return c===-1||c===0||c===2};if(t.precheck){const l=t.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(o,e)))}loadNamespaces(e,t){const n=Be();return this.options.ns?(N(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Be();N(e)&&(e=[e]);const i=this.options.preload||[],o=e.filter(s=>!i.includes(s)&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}dir(e){var i,o;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const s=new Intl.Locale(e);if(s&&s.getTextInfo){const l=s.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((o=this.services)==null?void 0:o.languageUtils)||new jr(yt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new Ye(e,t);return n.createInstance=Ye.createInstance,n}cloneInstance(e={},t=nt){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},o=new Ye(i);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const l=Object.keys(this.store.data).reduce((d,c)=>(d[c]={...this.store.data[c]},d[c]=Object.keys(d[c]).reduce((u,p)=>(u[p]={...d[c][p]},u),d[c]),d),{});o.store=new Cr(l,i),o.services.resourceStore=o.store}if(e.interpolation){const d={...yt().interpolation,...this.options.interpolation,...e.interpolation},c={...i,interpolation:d};o.services.interpolator=new Er(c)}return o.translator=new ct(o.services,i),o.translator.on("*",(l,...d)=>{o.emit(l,...d)}),o.init(i,t),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ne=Ye.createInstance();ne.createInstance;ne.dir;ne.init;ne.loadResources;ne.reloadResources;ne.use;ne.changeLanguage;ne.getFixedT;ne.t;ne.exists;ne.setDefaultNamespace;ne.hasLoadedNamespace;ne.loadNamespaces;ne.loadLanguages;ne.use(Hn).use(zn).use($r.initReactI18next).init({fallbackLng:"en",supportedLngs:["en","ka"],debug:!1,backend:{loadPath:"/locales/langs/{{lng}}.json"},detection:{order:["localStorage"],lookupLocalStorage:"Language",caches:["localStorage"]},interpolation:{escapeValue:!1}});var it={exports:{}},Es=it.exports,Tr;function Os(){return Tr||(Tr=1,(function(r,e){(function(t,n){r.exports=n()})(Es,(function(){var t=1e3,n=6e4,i=36e5,o="millisecond",s="second",l="minute",d="hour",c="day",u="week",p="month",f="quarter",h="year",g="date",v="Invalid Date",L=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,j={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var k=["th","st","nd","rd"],w=E%100;return"["+E+(k[(w-20)%10]||k[w]||k[0])+"]"}},O=function(E,k,w){var b=String(E);return!b||b.length>=k?E:""+Array(k+1-b.length).join(w)+E},S={s:O,z:function(E){var k=-E.utcOffset(),w=Math.abs(k),b=Math.floor(w/60),C=w%60;return(k<=0?"+":"-")+O(b,2,"0")+":"+O(C,2,"0")},m:function E(k,w){if(k.date()<w.date())return-E(w,k);var b=12*(w.year()-k.year())+(w.month()-k.month()),C=k.clone().add(b,p),I=w-C<0,P=k.clone().add(b+(I?-1:1),p);return+(-(b+(w-C)/(I?C-P:P-C))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:p,y:h,w:u,d:c,D:g,h:d,m:l,s,ms:o,Q:f}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},z="en",U={};U[z]=j;var Y="$isDayjsObject",B=function(E){return E instanceof R||!(!E||!E[Y])},F=function E(k,w,b){var C;if(!k)return z;if(typeof k=="string"){var I=k.toLowerCase();U[I]&&(C=I),w&&(U[I]=w,C=I);var P=k.split("-");if(!C&&P.length>1)return E(P[0])}else{var A=k.name;U[A]=k,C=A}return!b&&C&&(z=C),C||!b&&z},H=function(E,k){if(B(E))return E.clone();var w=typeof k=="object"?k:{};return w.date=E,w.args=arguments,new R(w)},y=S;y.l=F,y.i=B,y.w=function(E,k){return H(E,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var R=(function(){function E(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[Y]=!0}var k=E.prototype;return k.parse=function(w){this.$d=(function(b){var C=b.date,I=b.utc;if(C===null)return new Date(NaN);if(y.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var P=C.match(L);if(P){var A=P[2]-1||0,W=(P[7]||"0").substring(0,3);return I?new Date(Date.UTC(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)):new Date(P[1],A,P[3]||1,P[4]||0,P[5]||0,P[6]||0,W)}}return new Date(C)})(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return y},k.isValid=function(){return this.$d.toString()!==v},k.isSame=function(w,b){var C=H(w);return this.startOf(b)<=C&&C<=this.endOf(b)},k.isAfter=function(w,b){return H(w)<this.startOf(b)},k.isBefore=function(w,b){return this.endOf(b)<H(w)},k.$g=function(w,b,C){return y.u(w)?this[b]:this.set(C,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,b){var C=this,I=!!y.u(b)||b,P=y.p(w),A=function(xe,se){var ke=y.w(C.$u?Date.UTC(C.$y,se,xe):new Date(C.$y,se,xe),C);return I?ke:ke.endOf(c)},W=function(xe,se){return y.w(C.toDate()[xe].apply(C.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(se)),C)},K=this.$W,J=this.$M,Q=this.$D,me="set"+(this.$u?"UTC":"");switch(P){case h:return I?A(1,0):A(31,11);case p:return I?A(1,J):A(0,J+1);case u:var ue=this.$locale().weekStart||0,q=(K<ue?K+7:K)-ue;return A(I?Q-q:Q+(6-q),J);case c:case g:return W(me+"Hours",0);case d:return W(me+"Minutes",1);case l:return W(me+"Seconds",2);case s:return W(me+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,b){var C,I=y.p(w),P="set"+(this.$u?"UTC":""),A=(C={},C[c]=P+"Date",C[g]=P+"Date",C[p]=P+"Month",C[h]=P+"FullYear",C[d]=P+"Hours",C[l]=P+"Minutes",C[s]=P+"Seconds",C[o]=P+"Milliseconds",C)[I],W=I===c?this.$D+(b-this.$W):b;if(I===p||I===h){var K=this.clone().set(g,1);K.$d[A](W),K.init(),this.$d=K.set(g,Math.min(this.$D,K.daysInMonth())).$d}else A&&this.$d[A](W);return this.init(),this},k.set=function(w,b){return this.clone().$set(w,b)},k.get=function(w){return this[y.p(w)]()},k.add=function(w,b){var C,I=this;w=Number(w);var P=y.p(b),A=function(J){var Q=H(I);return y.w(Q.date(Q.date()+Math.round(J*w)),I)};if(P===p)return this.set(p,this.$M+w);if(P===h)return this.set(h,this.$y+w);if(P===c)return A(1);if(P===u)return A(7);var W=(C={},C[l]=n,C[d]=i,C[s]=t,C)[P]||1,K=this.$d.getTime()+w*W;return y.w(K,this)},k.subtract=function(w,b){return this.add(-1*w,b)},k.format=function(w){var b=this,C=this.$locale();if(!this.isValid())return C.invalidDate||v;var I=w||"YYYY-MM-DDTHH:mm:ssZ",P=y.z(this),A=this.$H,W=this.$m,K=this.$M,J=C.weekdays,Q=C.months,me=C.meridiem,ue=function(se,ke,Fe,Xe){return se&&(se[ke]||se(b,I))||Fe[ke].slice(0,Xe)},q=function(se){return y.s(A%12||12,se,"0")},xe=me||function(se,ke,Fe){var Xe=se<12?"AM":"PM";return Fe?Xe.toLowerCase():Xe};return I.replace(M,(function(se,ke){return ke||(function(Fe){switch(Fe){case"YY":return String(b.$y).slice(-2);case"YYYY":return y.s(b.$y,4,"0");case"M":return K+1;case"MM":return y.s(K+1,2,"0");case"MMM":return ue(C.monthsShort,K,Q,3);case"MMMM":return ue(Q,K);case"D":return b.$D;case"DD":return y.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ue(C.weekdaysMin,b.$W,J,2);case"ddd":return ue(C.weekdaysShort,b.$W,J,3);case"dddd":return J[b.$W];case"H":return String(A);case"HH":return y.s(A,2,"0");case"h":return q(1);case"hh":return q(2);case"a":return xe(A,W,!0);case"A":return xe(A,W,!1);case"m":return String(W);case"mm":return y.s(W,2,"0");case"s":return String(b.$s);case"ss":return y.s(b.$s,2,"0");case"SSS":return y.s(b.$ms,3,"0");case"Z":return P}return null})(se)||P.replace(":","")}))},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,b,C){var I,P=this,A=y.p(b),W=H(w),K=(W.utcOffset()-this.utcOffset())*n,J=this-W,Q=function(){return y.m(P,W)};switch(A){case h:I=Q()/12;break;case p:I=Q();break;case f:I=Q()/3;break;case u:I=(J-K)/6048e5;break;case c:I=(J-K)/864e5;break;case d:I=J/i;break;case l:I=J/n;break;case s:I=J/t;break;default:I=J}return C?I:y.a(I)},k.daysInMonth=function(){return this.endOf(p).$D},k.$locale=function(){return U[this.$L]},k.locale=function(w,b){if(!w)return this.$L;var C=this.clone(),I=F(w,b,!0);return I&&(C.$L=I),C},k.clone=function(){return y.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},E})(),_=R.prototype;return H.prototype=_,[["$ms",o],["$s",s],["$m",l],["$H",d],["$W",c],["$M",p],["$y",h],["$D",g]].forEach((function(E){_[E[1]]=function(k){return this.$g(k,E[0],E[1])}})),H.extend=function(E,k){return E.$i||(E(k,R,H),E.$i=!0),H},H.locale=F,H.isDayjs=B,H.unix=function(E){return H(1e3*E)},H.en=U[z],H.Ls=U,H.p={},H}))})(it)),it.exports}var Ds=Os();const En=dn(Ds),Ts=({setDateFilter:r,setShowRange:e,setDates:t})=>{const n=s=>s&&s>En().endOf("day"),i=s=>{if(s&&s[0]&&s[1]){const l=ae.toISODateString(s[0].toDate()),d=ae.toISODateString(s[1].toDate());t([l,d]),r(c=>({...c,startDate:l,endDate:d})),e(!1)}},o={lang:{locale:ne.language,shortMonths:[de("0"),de("1"),de("2"),de("3"),de("4"),de("5"),de("6"),de("7"),de("8"),de("9"),de("10"),de("11")],shortWeekDays:[Oe("Sun"),Oe("Mon"),Oe("Tue"),Oe("Wed"),Oe("Thu"),Oe("Fri"),Oe("Sat")]}};return a.jsx(Nr,{dropdownClassName:"date-picker-column-style",locale:o,open:!0,allowClear:!0,format:"MMM D, YYYY",placeholder:["From","To"],getPopupContainer:s=>{var l;return((l=s==null?void 0:s.parentElement)==null?void 0:l.parentElement)??document.body},onOpenChange:s=>{s||e(!1)},onChange:s=>i(s),disabledDate:n})},$s=m(T.Empty)`
2920
2920
  .ant-empty-description {
2921
2921
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
2922
2922
  }
@@ -3110,7 +3110,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3110
3110
  .anticon.anticon-close {
3111
3111
  color: var(--color-text-secondary, rgba(255, 255, 255, 0.5)) !important;
3112
3112
  }
3113
- `,Ps=({setDateFilters:r,hasAllFilter:e=!1})=>{const[t,n]=x.useState([]),i=[{key:"week",label:Pe("7D"),...oe.getCommonDateRange("week")},{key:"month",label:Pe("30D"),...oe.getCommonDateRange("month")},{key:"threeMonth",label:Pe("3M"),...oe.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Pe("6M"),...oe.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Pe("12M"),...oe.getCommonDateRange("twelveMonth")},{key:"year",label:Pe("YTD"),...oe.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${V("Custom")}: ${t[0]} / ${t[1]}`:V("Custom"),...oe.getCommonDateRange("custom")}],[a,s]=x.useState(),l=x.useMemo(()=>e?[{key:"all",label:V("All"),...oe.getCommonDateRange("all")},...i]:i,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&r(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return o.jsxs(os,{id:"tabs-container",children:[o.jsx(as,{type:"editable-card",items:l,onTabClick:d,activeKey:a?"custom":void 0,removeIcon:!0,hideAdd:!0}),a&&o.jsx(ss,{children:o.jsx(Ts,{setDates:n,setDateFilter:r,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),o.jsx(Wt,{className:"tab-select",$width:"200px",placeholder:V("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},On=m.div`
3113
+ `,Ps=({setDateFilters:r,hasAllFilter:e=!1})=>{const[t,n]=x.useState([]),i=[{key:"week",label:Pe("7D"),...ae.getCommonDateRange("week")},{key:"month",label:Pe("30D"),...ae.getCommonDateRange("month")},{key:"threeMonth",label:Pe("3M"),...ae.getCommonDateRange("threeMonth")},{key:"sixMonth",label:Pe("6M"),...ae.getCommonDateRange("sixMonth")},{key:"twelveMonth",label:Pe("12M"),...ae.getCommonDateRange("twelveMonth")},{key:"year",label:Pe("YTD"),...ae.getCommonDateRange("year")},{key:"custom",label:t.length===2&&t[0]!==""?`${V("Custom")}: ${t[0]} / ${t[1]}`:V("Custom"),...ae.getCommonDateRange("custom")}],[o,s]=x.useState(),l=x.useMemo(()=>e?[{key:"all",label:V("All"),...ae.getCommonDateRange("all")},...i]:i,[e,t]);function d(c){if(c==="custom")s(!0);else{s(!1);const u=l.find(p=>p.key===c);u&&r(p=>({...p,startDate:u.startDate,endDate:u.endDate}))}return c}return a.jsxs(as,{id:"tabs-container",children:[a.jsx(os,{type:"editable-card",items:l,onTabClick:d,activeKey:o?"custom":void 0,removeIcon:!0,hideAdd:!0}),o&&a.jsx(ss,{children:a.jsx(Ts,{setDates:n,setDateFilter:r,setShowRange:s,getPopupContainer:()=>document.getElementById("tabs-container")})}),a.jsx(Wt,{className:"tab-select",$width:"200px",placeholder:V("Choose"),getPopupContainer:c=>c.parentElement,onChange:d,options:l.map(c=>({value:c.key,label:c.label}))})]})},On=m.div`
3114
3114
  .ant-dropdown-menu {
3115
3115
  border-radius: 2px !important;
3116
3116
  background: var(--color-bg-quaternary, #2f2f2f) !important;
@@ -3156,8 +3156,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3156
3156
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3157
3157
  color: var(--color-text-primary, #fff);
3158
3158
  cursor: pointer;
3159
- `,As=({exportFileName:r,filters:e,service:t})=>{const n=async a=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,a)).data;a==="xlsx"?zs(u,`${r}.${a}`):Hs(u,`${r}`)}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return o.jsx(Rs,{menu:{items:i,className:"dropdown-menu"},popupRender:a=>o.jsx(On,{children:a}),placement:"bottomLeft",children:o.jsx(Ns,{children:V("Export")})})},Dn=(r,e,t)=>{const n=r.filter(p=>e[p.id]),i=Object.keys(n[0]),a=n.map(p=>i.map(h=>{const f=p[h];return f==null?"":typeof f=="object"?Object.values(f).find(v=>typeof v!="object")??"":f})),s=[i,...a].map(p=>p.map(h=>`"${(h||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3160
- `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Tn=(r,e,t)=>{const i=r.filter(p=>e[p.id]).map(p=>{const h={};return Object.entries(p).forEach(([f,g])=>{if(g==null)h[f]="";else if(typeof g=="object"){const v=Object.values(g).find(L=>typeof L!="object");h[f]=v??""}else h[f]=g}),h}),a=tt.utils.json_to_sheet(i),s=tt.utils.book_new();tt.utils.book_append_sheet(s,a,"Data");const l=tt.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Fs=m(T.Dropdown)`
3159
+ `,As=({exportFileName:r,filters:e,service:t})=>{const n=async o=>{try{const{PageSize:s,Page:l,...d}=e,u=(await t(d,o)).data;o==="xlsx"?zs(u,`${r}.${o}`):Hs(u,`${r}`)}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return a.jsx(Rs,{menu:{items:i,className:"dropdown-menu"},popupRender:o=>a.jsx(On,{children:o}),placement:"bottomLeft",children:a.jsx(Ns,{children:V("Export")})})},Dn=(r,e,t)=>{const n=r.filter(p=>e[p.id]),i=Object.keys(n[0]),o=n.map(p=>i.map(f=>{const h=p[f];return h==null?"":typeof h=="object"?Object.values(h).find(v=>typeof v!="object")??"":h})),s=[i,...o].map(p=>p.map(f=>`"${(f||"").toString().replace(/"/g,'""')}"`).join(",")).join(`\r
3160
+ `),l="\uFEFF",d=new Blob([l+s],{type:"text/csv;charset=utf-8;"}),c=document.createElement("a"),u=URL.createObjectURL(d);c.setAttribute("href",u),c.setAttribute("download",t),document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)},Tn=(r,e,t)=>{const i=r.filter(p=>e[p.id]).map(p=>{const f={};return Object.entries(p).forEach(([h,g])=>{if(g==null)f[h]="";else if(typeof g=="object"){const v=Object.values(g).find(L=>typeof L!="object");f[h]=v??""}else f[h]=g}),f}),o=tt.utils.json_to_sheet(i),s=tt.utils.book_new();tt.utils.book_append_sheet(s,o,"Data");const l=tt.write(s,{bookType:"xlsx",type:"array"}),d=new Blob([l],{type:"application/octet-stream"}),c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)},Fs=m(T.Dropdown)`
3161
3161
  background: var(--color-bg-secondary, #f0ededff) !important;
3162
3162
  font-size: 14px;
3163
3163
  font-weight: 500;
@@ -3177,7 +3177,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3177
3177
  background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
3178
3178
  color: var(--color-text-primary, #fff);
3179
3179
  cursor: pointer;
3180
- `,Bs=({tableData:r,checked:e,fileName:t})=>{const n=async a=>{try{a==="xlsx"?Tn(r,e,t+".xlsx"):Dn(r,e,t+".csv")}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return o.jsx(Fs,{menu:{items:i,className:"dropdown-menu"},popupRender:a=>o.jsx(On,{children:a}),placement:"bottomLeft",children:o.jsx(Vs,{children:V("Export")})})},_s=({value:r,onChange:e,...t})=>{const n=r?En(r):null,i=a=>{a?e==null||e(oe.toISODateString(a.toDate())):e==null||e(null)};return o.jsx(T.DatePicker,{value:n,onChange:i,allowClear:!0,...t})},{Dragger:Us}=T.Upload,Gs=m(Us)`
3180
+ `,Bs=({tableData:r,checked:e,fileName:t})=>{const n=async o=>{try{o==="xlsx"?Tn(r,e,t+".xlsx"):Dn(r,e,t+".csv")}catch(s){console.error("Export failed:",s)}},i=[{key:"1",label:`${V("ExportAs")} ${V("Xlsx")}`,onClick:()=>n("xlsx")},{key:"2",label:`${V("ExportAs")} ${V("Csv")}`,onClick:()=>n("csv")}];return a.jsx(Fs,{menu:{items:i,className:"dropdown-menu"},popupRender:o=>a.jsx(On,{children:o}),placement:"bottomLeft",children:a.jsx(Vs,{children:V("Export")})})},_s=({value:r,onChange:e,...t})=>{const n=r?En(r):null,i=o=>{o?e==null||e(ae.toISODateString(o.toDate())):e==null||e(null)};return a.jsx(T.DatePicker,{value:n,onChange:i,allowClear:!0,...t})},{Dragger:Us}=T.Upload,Gs=m(Us)`
3181
3181
  &.default-design {
3182
3182
  .ant-upload {
3183
3183
  padding: 0 !important;
@@ -3259,7 +3259,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3259
3259
  font-weight: var(--text-weight-regular, 400);
3260
3260
  line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
3261
3261
  letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
3262
- `;const Ws=({value:r=[],onChange:e,children:t,inputDesign:n,addFilesService:i,...a})=>{const s=async d=>{var f,g;const{file:c}=d,u=URL.createObjectURL(c),p={name:c.name,uid:c.uid,status:"uploading",url:u},h=[...r,p];e(h);try{const v=new FormData;v.append("files",c);const L=await i(v);if((f=L==null?void 0:L.data)!=null&&f.success){const M=(g=L==null?void 0:L.data)==null?void 0:g.value[0];e(h.map(j=>j.uid===c.uid?{...j,status:"done",...M}:j))}else e(h.filter(M=>M.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}catch{e(h.filter(L=>L.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}},l=d=>{e(r.filter(c=>c.uid!==d.uid))};return o.jsx(Gs,{className:n?"input-design":"default-design",multiple:a.maxCount!==void 0&&a.maxCount>1,customRequest:s,showUploadList:!!a.showUploadList,fileList:r,onRemove:l,maxCount:a.maxCount,...a,children:r.length<(a.maxCount||15)&&t})},Ys=m(T.Tabs)`
3262
+ `;const Ws=({value:r=[],onChange:e,children:t,inputDesign:n,addFilesService:i,...o})=>{const s=async d=>{var h,g;const{file:c}=d,u=URL.createObjectURL(c),p={name:c.name,uid:c.uid,status:"uploading",url:u},f=[...r,p];e(f);try{const v=new FormData;v.append("files",c);const L=await i(v);if((h=L==null?void 0:L.data)!=null&&h.success){const M=(g=L==null?void 0:L.data)==null?void 0:g.value[0];e(f.map(j=>j.uid===c.uid?{...j,status:"done",...M}:j))}else e(f.filter(M=>M.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}catch{e(f.filter(L=>L.uid!==c.uid)),T.notification.error({className:"bottom-right-notification",placement:"bottomRight",message:"Error",description:"Upload failed"})}},l=d=>{e(r.filter(c=>c.uid!==d.uid))};return a.jsx(Gs,{className:n?"input-design":"default-design",multiple:o.maxCount!==void 0&&o.maxCount>1,customRequest:s,showUploadList:!!o.showUploadList,fileList:r,onRemove:l,maxCount:o.maxCount,...o,children:r.length<(o.maxCount||15)&&t})},Ys=m(T.Tabs)`
3263
3263
  display: flex;
3264
3264
  gap: var(--spacing-025, 2px);
3265
3265
  color: var(--color-text-secondary, rgba(19, 20, 18, 0.75));
@@ -3382,5 +3382,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3382
3382
  display: block;
3383
3383
  margin-left: 0.9rem;
3384
3384
  }
3385
- `,Qs=()=>{const[r,e]=x.useState(!1);return o.jsxs(Js,{children:[o.jsx("button",{className:"icon sidebar",onClick:()=>e(!0),children:o.jsx(Fr,{})}),r&&o.jsx(It,{})]})},Xs=({basePath:r,tabItems:e,contentMap:t,defaultTabKey:n="overview",logo:i,breadcrumbItems:a,needsBreadcrumb:s,customTabFilter:l})=>{const{hasPermission:d}=Ee(),{id:c}=re.useParams(),u=re.useLocation(),p=re.useNavigate(),h=x.useMemo(()=>{const S=u.pathname.split("/");return S[S.length-1]||n},[u.pathname,n]),[f,g]=x.useState(null),[v,L]=x.useState(null),M=S=>{p(`${r}/${c}/${S}`)},j=()=>l?l(e):e.filter(S=>{var z;return(z=S.permission)==null?void 0:z.some(U=>d(U))}),O=()=>{const S=t[h]||t[n];return S?typeof S=="object"&&S!==null&&"type"in S?{...S,props:{...S.props,setExtraTabItem:g,setSecondExtraTab:L}}:S:null};return o.jsxs(o.Fragment,{children:[o.jsx(Qs,{}),s&&o.jsx(jn,{logo:i,breadcrumbItems:a}),o.jsx(Ys,{activeKey:h,onChange:M,tabBarExtraContent:{right:o.jsxs(qs,{children:[o.jsx(Zs,{children:o.jsx(Wt,{className:"partner-tab-select",placeholder:"Modules",onChange:S=>M(S),value:h,options:e.filter(S=>(S==null?void 0:S.label)!=="Details").map(S=>({value:S.key,label:S.label}))})}),o.jsxs(Ks,{children:[v,f]})]})},items:j()}),o.jsx("div",{children:O()})]})},el=({id:r,refetchFormItems:e,redirectPrevPage:t,updateItem:n,addItem:i,getItemById:a,onSetFormValues:s})=>{const l=re.useNavigate(),[d]=T.Form.useForm(),[c,u]=x.useState(r=="new"),[p,h]=x.useState(null),f=async v=>{const L=window.location.pathname,M=L.substring(0,L.lastIndexOf("/"));try{if(p){let j;return r?j=await n({...v,id:r}):j=await n(v),t!==!1&&j.data.success===!0&&l(M),j}else{const j=await i(v);return t!==!1&&j.data.success===!0&&l(M),j}}catch(j){if(j.status===400){const O=j.response.data,S=$e(O.errors);d.setFields(S)}}},g=async v=>{try{const L=await a(v),M=s?s(L.data):L.data;h(M),d.setFieldsValue(M)}catch(L){console.log(L,"Error in Form Controller.")}};return x.useEffect(()=>{u(r=="new"),r!="new"?g(Number(r)):d.resetFields()},[r,e]),{form:d,item:p,getItemById:a,isAddingForm:c,handleSave:f}},tl=({id:r,formItem:e,updateItem:t,addItem:n,getItemById:i})=>{const[a]=T.Form.useForm(),[s,l]=x.useState(null),d=async u=>{try{let p;return r?p=await t({...u}):p=await n(u),p}catch(p){if(p.status===400){const h=p.response.data,f=$e(h.errors);a.setFields(f)}throw p}},c=async u=>{try{const h=(await i(u)).data;l(h),a.setFieldsValue(h)}catch(p){console.log(p,"Error in Form Controller.")}};return x.useEffect(()=>{try{if(!e)return;l(e),a.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),x.useEffect(()=>{r&&c(Number(r))},[r]),{form:a,item:s,handleSave:d}},rl=()=>{const r=re.useNavigate(),{setUser:e}=Ee(),[t,n]=x.useState({visible:!1,token:""}),i=s=>{e(s),n({visible:!1,token:""}),r("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){n({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&i(c)},finalizeLogin:i,twoFactor:t,setTwoFactor:n}};function nl(r){const{navigator:e}=x.useContext(re.UNSAFE_NavigationContext),t=re.useLocation();x.useEffect(()=>{if(!r)return;const n=e.push,i=e.replace,a=s=>(...l)=>{T.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=a(n),e.replace=a(i),()=>{e.push=n,e.replace=i}},[r,e,t]),x.useEffect(()=>{const n=i=>{r&&(i.preventDefault(),i.returnValue="")};return window.addEventListener("beforeunload",n),()=>{window.removeEventListener("beforeunload",n)}},[r])}function il(r){x.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&r(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function al(r,e){if(!r)return"";const t=new Date(r);if(isNaN(t.getTime()))return"";const n=t.getDate(),i=t.getMonth(),a=t.getFullYear(),l=`${n} ${i}, ${a}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function ol(r,e="en-US"){return r<1?0:r?r.toLocaleString(e):""}const _e=r=>r.replace(/^[A-Z]+/,e=>e.length===r.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),sl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,ll=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,cl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,dl=/^Commissions\[(\d+)\]$/;function pl(r){const{errors:e}=r.response.data,t=Object.keys(e)[0],n=e[t][0],i=t.match(sl);if(i){const[,l,d,c,u,p]=i;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),itemIndex:Number(u),field:_e(p),message:n}}const a=t.match(ll)||t.match(cl);if(a){const[,l,d,c]=a;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),message:n}}const s=t.match(dl);return s?{brandIndex:Number(s[1]),message:n}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=ri;exports.AuthorizationLayout=bi;exports.BoxComponent=Pr;exports.CancelModalButton=te;exports.Chart=Go;exports.CloseButton=Gr;exports.ColumnFilterType=fe;exports.ComingSoon=ts;exports.ContactInfoModal=nn;exports.ContentContainer=je;exports.CreateModalButton=Ne;exports.DateHelper=oe;exports.DatePickerToISO=_s;exports.DateRangeFilterTabs=Ps;exports.EnterBackupCode=Bt;exports.ExcelExport=As;exports.ExcelExportSelected=Bs;exports.ExpandableTable=is;exports.FilterConfiguration=Zr;exports.FilterSelectTypes=Te;exports.GeneralInput=pt;exports.GenericModal=wt;exports.GenericTabsPage=Xs;exports.GridViewPage=Ha;exports.LabelText=le;exports.MFAModalManager=No;exports.MFA_STEP=Me;exports.ModalHost=Ra;exports.ModalHostButtonWrapper=Wr;exports.NoData=Jr;exports.NoDataSpanForSelect=_i;exports.PackageServicesProvider=Fn;exports.PackageTranslationProvider=Bn;exports.PageBreadcrumb=jn;exports.Popup=dt;exports.PopupFooterContainer=Re;exports.PopupHeader=Ur;exports.PopupMFA=on;exports.RejectButton=Ui;exports.SortDirections=ae;exports.Spinner=Yo;exports.StyledBreadcrumb=Cn;exports.StyledEmpty=$s;exports.StyledSelect=Wt;exports.StyledTable=Is;exports.StyledTooltip=Ms;exports.TableViewOptions=we;exports.TwoFactorPopup=_o;exports.UploadFiles=Ws;exports.catchErrorMessage=qr;exports.exportSelectedToCSV=Dn;exports.exportSelectedToXLSX=Tn;exports.formatDate=al;exports.getBase64=Gi;exports.handleCopy=Kr;exports.handleDictionarySelectFilter=Br;exports.lowercaseFirstLetter=Yr;exports.numberFormatterWithComma=ol;exports.parseCommissionErrors=pl;exports.parseErrorMessageKey=Xr;exports.parseServerErrors=$e;exports.useAutofillStartDetection=il;exports.useContactInfoController=an;exports.useDebounce=Pt;exports.useElementHeight=Rr;exports.useFetch=$t;exports.useFilterDataSourceType=Nt;exports.useFormController=el;exports.useModalStore=Le;exports.useNavigationGuard=nl;exports.useNewDesignFormController=tl;exports.usePackageServices=me;exports.useTwoFactor=rl;exports.useUserStore=Ee;
3385
+ `,Qs=()=>{const[r,e]=x.useState(!1);return a.jsxs(Js,{children:[a.jsx("button",{className:"icon sidebar",onClick:()=>e(!0),children:a.jsx(Fr,{})}),r&&a.jsx(It,{})]})},Xs=({basePath:r,tabItems:e,contentMap:t,defaultTabKey:n="overview",logo:i,breadcrumbItems:o,needsBreadcrumb:s,customTabFilter:l})=>{const{hasPermission:d}=Ee(),{id:c}=re.useParams(),u=re.useLocation(),p=re.useNavigate(),f=x.useMemo(()=>{const S=u.pathname.split("/");return S[S.length-1]||n},[u.pathname,n]),[h,g]=x.useState(null),[v,L]=x.useState(null),M=S=>{p(`${r}/${c}/${S}`)},j=()=>l?l(e):e.filter(S=>{var z;return(z=S.permission)==null?void 0:z.some(U=>d(U))}),O=()=>{const S=t[f]||t[n];return S?typeof S=="object"&&S!==null&&"type"in S?{...S,props:{...S.props,setExtraTabItem:g,setSecondExtraTab:L}}:S:null};return a.jsxs(a.Fragment,{children:[a.jsx(Qs,{}),s&&a.jsx(jn,{logo:i,breadcrumbItems:o}),a.jsx(Ys,{activeKey:f,onChange:M,tabBarExtraContent:{right:a.jsxs(qs,{children:[a.jsx(Zs,{children:a.jsx(Wt,{className:"partner-tab-select",placeholder:"Modules",onChange:S=>M(S),value:f,options:e.filter(S=>(S==null?void 0:S.label)!=="Details").map(S=>({value:S.key,label:S.label}))})}),a.jsxs(Ks,{children:[v,h]})]})},items:j()}),a.jsx("div",{children:O()})]})},el=({id:r,refetchFormItems:e,redirectPrevPage:t,updateItem:n,addItem:i,getItemById:o,onSetFormValues:s})=>{const l=re.useNavigate(),[d]=T.Form.useForm(),[c,u]=x.useState(r=="new"),[p,f]=x.useState(null),h=async v=>{const L=window.location.pathname,M=L.substring(0,L.lastIndexOf("/"));try{if(p){let j;return r?j=await n({...v,id:r}):j=await n(v),t!==!1&&j.data.success===!0&&l(M),j}else{const j=await i(v);return t!==!1&&j.data.success===!0&&l(M),j}}catch(j){if(j.status===400){const O=j.response.data,S=$e(O.errors);d.setFields(S)}}},g=async v=>{try{const L=await o(v),M=s?s(L.data):L.data;f(M),d.setFieldsValue(M)}catch(L){console.log(L,"Error in Form Controller.")}};return x.useEffect(()=>{u(r=="new"),r!="new"?g(Number(r)):d.resetFields()},[r,e]),{form:d,item:p,getItemById:o,isAddingForm:c,handleSave:h}},tl=({id:r,formItem:e,updateItem:t,addItem:n,getItemById:i})=>{const[o]=T.Form.useForm(),[s,l]=x.useState(null),d=async u=>{try{let p;return r?p=await t({...u}):p=await n(u),p}catch(p){if(p.status===400){const f=p.response.data,h=$e(f.errors);o.setFields(h)}throw p}},c=async u=>{try{const f=(await i(u)).data;l(f),o.setFieldsValue(f)}catch(p){console.log(p,"Error in Form Controller.")}};return x.useEffect(()=>{try{if(!e)return;l(e),o.setFieldsValue(e)}catch(u){console.log(u,"Error in Form Controller.")}},[e]),x.useEffect(()=>{r&&c(Number(r))},[r]),{form:o,item:s,handleSave:d}},rl=()=>{const r=re.useNavigate(),{setUser:e}=Ee(),[t,n]=x.useState({visible:!1,token:""}),i=s=>{e(s),n({visible:!1,token:""}),r("/")};return{handleTwoFactorResponse:(s,l)=>{const{success:d,value:c}=s.data;if(!d)throw new Error("Authentication failed");if(c.isTwoFactorRequired){n({visible:!0,token:c.token,id:c.id,mfaType:c.mfaType});return}l&&i(c)},finalizeLogin:i,twoFactor:t,setTwoFactor:n}};function nl(r){const{navigator:e}=x.useContext(re.UNSAFE_NavigationContext),t=re.useLocation();x.useEffect(()=>{if(!r)return;const n=e.push,i=e.replace,o=s=>(...l)=>{T.Modal.confirm({title:"UnsavedChanges",content:"UnsavedMoveDesc",okText:"Leave",className:"custom-confirm-modal",cancelText:"Save",okButtonProps:{className:"ok-text-btn"},cancelButtonProps:{className:"no-hover-cancel-btn"},onOk:()=>{s(...l)},onCancel:()=>{}})};return e.push=o(n),e.replace=o(i),()=>{e.push=n,e.replace=i}},[r,e,t]),x.useEffect(()=>{const n=i=>{r&&(i.preventDefault(),i.returnValue="")};return window.addEventListener("beforeunload",n),()=>{window.removeEventListener("beforeunload",n)}},[r])}function il(r){x.useEffect(()=>{const e=t=>{t.animationName==="onAutoFillStart"&&r(t)};return document.addEventListener("animationstart",e,!0),()=>{document.removeEventListener("animationstart",e,!0)}},[])}function ol(r,e){if(!r)return"";const t=new Date(r);if(isNaN(t.getTime()))return"";const n=t.getDate(),i=t.getMonth(),o=t.getFullYear(),l=`${n} ${i}, ${o}`;if(e!=null&&e.withTime){const d=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${l} ${d}:${c}`}return l}function al(r,e="en-US"){return r<1?0:r?r.toLocaleString(e):""}const _e=r=>r.replace(/^[A-Z]+/,e=>e.length===r.length?e.toLowerCase():e.length>1?e.slice(0,-1).toLowerCase()+e.slice(-1):e.toLowerCase()),sl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/,ll=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/,cl=/^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/,dl=/^Commissions\[(\d+)\]$/;function pl(r){const{errors:e}=r.response.data,t=Object.keys(e)[0],n=e[t][0],i=t.match(sl);if(i){const[,l,d,c,u,p]=i;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),itemIndex:Number(u),field:_e(p),message:n}}const o=t.match(ll)||t.match(cl);if(o){const[,l,d,c]=o;return{brandIndex:Number(l),generalType:_e(d),specificType:_e(c),message:n}}const s=t.match(dl);return s?{brandIndex:Number(s[1]),message:n}:(console.warn("parseCommissionErrors: unrecognized key format from the validations on commissions",t),null)}exports.AdminLayout=ri;exports.AuthorizationLayout=bi;exports.BoxComponent=Pr;exports.CancelModalButton=te;exports.Chart=Ga;exports.CloseButton=Gr;exports.ColumnFilterType=fe;exports.ComingSoon=ts;exports.ContactInfoModal=nn;exports.ContentContainer=je;exports.CreateModalButton=Ne;exports.DateHelper=ae;exports.DatePickerToISO=_s;exports.DateRangeFilterTabs=Ps;exports.EnterBackupCode=Bt;exports.ExcelExport=As;exports.ExcelExportSelected=Bs;exports.ExpandableTable=is;exports.FilterConfiguration=Zr;exports.FilterSelectTypes=Te;exports.GeneralInput=pt;exports.GenericModal=wt;exports.GenericTabsPage=Xs;exports.GridViewPage=Ro;exports.LabelText=le;exports.MFAModalManager=Na;exports.MFA_STEP=Me;exports.ModalHost=No;exports.ModalHostButtonWrapper=Wr;exports.NoData=Jr;exports.NoDataSpanForSelect=_i;exports.PackageServicesProvider=Fn;exports.PackageTranslationProvider=Bn;exports.PageBreadcrumb=jn;exports.Popup=dt;exports.PopupFooterContainer=Re;exports.PopupHeader=Ur;exports.PopupMFA=an;exports.RejectButton=Ui;exports.SortDirections=oe;exports.Spinner=Ya;exports.StyledBreadcrumb=Cn;exports.StyledEmpty=$s;exports.StyledSelect=Wt;exports.StyledTable=Is;exports.StyledTooltip=Ms;exports.TableViewOptions=be;exports.TwoFactorPopup=_a;exports.UploadFiles=Ws;exports.catchErrorMessage=qr;exports.exportSelectedToCSV=Dn;exports.exportSelectedToXLSX=Tn;exports.formatDate=ol;exports.getBase64=Gi;exports.handleCopy=Kr;exports.handleDictionarySelectFilter=Br;exports.lowercaseFirstLetter=Yr;exports.numberFormatterWithComma=al;exports.parseCommissionErrors=pl;exports.parseErrorMessageKey=Xr;exports.parseServerErrors=$e;exports.useAutofillStartDetection=il;exports.useContactInfoController=on;exports.useDebounce=Pt;exports.useElementHeight=Rr;exports.useFetch=$t;exports.useFilterDataSourceType=Nt;exports.useFormController=el;exports.useModalStore=Le;exports.useNavigationGuard=nl;exports.useNewDesignFormController=tl;exports.usePackageServices=we;exports.useTwoFactor=rl;exports.useUserStore=Ee;
3386
3386
  //# sourceMappingURL=index.cjs.map