@fctc/sme-widget-ui 4.1.10-beta.5 → 4.1.10-beta.7
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/hooks.d.ts +46 -0
- package/dist/hooks.js +1 -0
- package/dist/hooks.mjs +1 -1
- package/dist/icons.d.mts +10 -19
- package/dist/icons.d.ts +93 -0
- package/dist/icons.js +2 -0
- package/dist/icons.mjs +2 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +20 -0
- package/dist/index.js +45 -0
- package/dist/index.mjs +45 -1
- package/dist/types.d.ts +62 -0
- package/dist/types.js +1 -0
- package/dist/types.mjs +1 -1
- package/dist/utils.d.mts +21 -17
- package/dist/utils.d.ts +44 -0
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +1 -1
- package/dist/widgets.d.mts +2 -21
- package/dist/widgets.d.ts +496 -0
- package/dist/widgets.js +45 -0
- package/dist/widgets.mjs +45 -1
- package/package.json +3 -2
- package/dist/chunk-KVH366MY.mjs +0 -1
- package/dist/chunk-O6IVOXHJ.mjs +0 -2
- package/dist/chunk-QH3T7FI4.mjs +0 -1
- package/dist/chunk-RPIB4YDU.mjs +0 -46
- package/dist/chunk-U7MAFS3I.mjs +0 -1
- package/dist/chunk-YEKQJ4YC.mjs +0 -1
- package/dist/index.css +0 -1
- package/dist/widgets.css +0 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import z from 'zod';
|
|
3
|
+
|
|
4
|
+
interface ValuePropsType {
|
|
5
|
+
id: number | string;
|
|
6
|
+
display_name: number | string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
interface IInputFieldProps {
|
|
10
|
+
name?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
defaultValue?: string | number | ValuePropsType | any;
|
|
16
|
+
invisible?: boolean;
|
|
17
|
+
methods?: any;
|
|
18
|
+
onChange?: (name: string, value: any) => void;
|
|
19
|
+
onBlur?: Function;
|
|
20
|
+
onRefetch?: Function;
|
|
21
|
+
isForm?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
value?: string | number | ValuePropsType | null | Record<any, any> | any;
|
|
24
|
+
string?: string;
|
|
25
|
+
isEditTable?: boolean;
|
|
26
|
+
formValues?: any;
|
|
27
|
+
model?: string;
|
|
28
|
+
relation?: string;
|
|
29
|
+
domain?: any;
|
|
30
|
+
idForm?: boolean;
|
|
31
|
+
widget?: string;
|
|
32
|
+
options?: any;
|
|
33
|
+
filename?: string;
|
|
34
|
+
baseClassName?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const loginSchema: z.ZodObject<{
|
|
37
|
+
username: z.ZodString;
|
|
38
|
+
password: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
username: string;
|
|
41
|
+
password: string;
|
|
42
|
+
}, {
|
|
43
|
+
username: string;
|
|
44
|
+
password: string;
|
|
45
|
+
}>;
|
|
46
|
+
type LoginData = z.infer<typeof loginSchema>;
|
|
47
|
+
type Provider = 'google';
|
|
48
|
+
type LoginProps = {
|
|
49
|
+
forgotPasswordUrl?: string;
|
|
50
|
+
providers?: Provider[];
|
|
51
|
+
buttonClassName?: string;
|
|
52
|
+
isLoading?: boolean;
|
|
53
|
+
db?: string;
|
|
54
|
+
stayLoginIn?: boolean;
|
|
55
|
+
hideForgotPassword?: boolean;
|
|
56
|
+
onSubmit?: (data: LoginData) => void;
|
|
57
|
+
setStayLoginIn?: Dispatch<SetStateAction<boolean>>;
|
|
58
|
+
onLoginSocial?: (db: string) => void;
|
|
59
|
+
onLoginGoogle?: (db: string) => void;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export { type IInputFieldProps, type LoginData, type LoginProps, type Provider, type ValuePropsType, loginSchema };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var n=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var o=n__default.default.object({username:n__default.default.string().min(1,{message:"Vui l\xF2ng nh\u1EADp t\xEAn \u0111\u0103ng nh\u1EADp"}).max(255,{message:"T\xEAn \u0111\u0103ng nh\u1EADp kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1"}),password:n__default.default.string().min(1,{message:"Vui l\xF2ng nh\u1EADp m\u1EADt kh\u1EA9u"}).max(255,{message:"M\u1EADt kh\u1EA9u kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1"})});exports.loginSchema=o;
|
package/dist/types.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
import n from'zod';var o=n.object({username:n.string().min(1,{message:"Vui l\xF2ng nh\u1EADp t\xEAn \u0111\u0103ng nh\u1EADp"}).max(255,{message:"T\xEAn \u0111\u0103ng nh\u1EADp kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1"}),password:n.string().min(1,{message:"Vui l\xF2ng nh\u1EADp m\u1EADt kh\u1EA9u"}).max(255,{message:"M\u1EADt kh\u1EA9u kh\xF4ng \u0111\u01B0\u1EE3c qu\xE1 255 k\xFD t\u1EF1"})});export{o as loginSchema};
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
declare const useFormatDate: () => {
|
|
2
|
-
getRelativeTime: (dateString: string) => string;
|
|
3
|
-
};
|
|
4
|
-
declare function validateInput(value: string, type: 'text' | 'number' | 'phone' | 'email'): boolean;
|
|
5
|
-
declare function getPasswordMessage(min?: string, max?: string, upcase?: string, digit?: string, special?: string): string;
|
|
6
|
-
declare const range: (start: number, end: number) => number[];
|
|
7
|
-
declare const formatNumberOnly: (num: number) => string;
|
|
8
|
-
declare const parseFormattedNumber: (val: string) => number | "" | "0";
|
|
9
|
-
declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
|
|
10
|
-
declare const isObjectEmpty: (obj: object) => boolean;
|
|
11
|
-
declare const convertFloatToTime: (floatValue: number) => string;
|
|
12
1
|
declare const isBase64Image: (str: any) => boolean;
|
|
13
2
|
declare const checkIsImageLink: (url: any) => boolean;
|
|
14
3
|
declare const formatFileSize: (size: any) => string;
|
|
4
|
+
declare const getFileLabel: (name: string) => "PDF" | "JSON" | "ZIP" | "MP4" | "XLS" | "IMG" | "FILE";
|
|
5
|
+
declare const ALLOWED_MIME_TYPES: Set<string>;
|
|
6
|
+
declare const ALLOWED_EXTS: string[];
|
|
7
|
+
declare const ACCEPT_TYPES: string;
|
|
8
|
+
|
|
9
|
+
declare const formatNumberOnly: (num: number) => string;
|
|
10
|
+
declare const parseFormattedNumber: (val: string) => number | "0" | "";
|
|
11
|
+
declare const convertFloatToTime: (floatValue: number) => string;
|
|
15
12
|
declare const convertTimeToFloat: (timeString: string) => number;
|
|
16
13
|
declare const formatFloatNumber: (value: number | string) => string;
|
|
14
|
+
|
|
15
|
+
declare function validateInput(value: string, type: 'text' | 'number' | 'phone' | 'email'): boolean;
|
|
16
|
+
declare function getPasswordMessage(min?: string, max?: string, upcase?: string, digit?: string, special?: string): string;
|
|
17
|
+
declare const uppercaseFirstLetter: (str: string) => string;
|
|
18
|
+
|
|
19
|
+
declare const range: (start: number, end: number) => number[];
|
|
20
|
+
|
|
21
|
+
declare const useFormatDate: () => {
|
|
22
|
+
getRelativeTime: (dateString: string) => string;
|
|
23
|
+
};
|
|
24
|
+
declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
|
|
25
|
+
|
|
17
26
|
declare const generateTagColors: (name: string, id: number) => {
|
|
18
27
|
background: string;
|
|
19
28
|
border: string;
|
|
20
29
|
textColor: string;
|
|
21
30
|
};
|
|
22
|
-
declare const getFileLabel: (name: string) => "PDF" | "JSON" | "ZIP" | "MP4" | "XLS" | "IMG" | "FILE";
|
|
23
|
-
declare const ALLOWED_MIME_TYPES: Set<string>;
|
|
24
|
-
declare const ALLOWED_EXTS: string[];
|
|
25
|
-
declare const ACCEPT_TYPES: string;
|
|
26
|
-
declare const uppercaseFirstLetter: (str: string) => string;
|
|
27
31
|
|
|
28
32
|
declare const COLORS: {
|
|
29
33
|
name: string;
|
|
@@ -37,4 +41,4 @@ declare const SearchType: {
|
|
|
37
41
|
GROUP: string;
|
|
38
42
|
};
|
|
39
43
|
|
|
40
|
-
export { ACCEPT_TYPES, ALLOWED_EXTS, ALLOWED_MIME_TYPES, COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, generateTagColors, getFileLabel, getPasswordMessage, isBase64Image,
|
|
44
|
+
export { ACCEPT_TYPES, ALLOWED_EXTS, ALLOWED_MIME_TYPES, COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, generateTagColors, getFileLabel, getPasswordMessage, isBase64Image, parseFormattedNumber, range, uppercaseFirstLetter, useFormatDate, validateAndParseDate, validateInput };
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const isBase64Image: (str: any) => boolean;
|
|
2
|
+
declare const checkIsImageLink: (url: any) => boolean;
|
|
3
|
+
declare const formatFileSize: (size: any) => string;
|
|
4
|
+
declare const getFileLabel: (name: string) => "PDF" | "JSON" | "ZIP" | "MP4" | "XLS" | "IMG" | "FILE";
|
|
5
|
+
declare const ALLOWED_MIME_TYPES: Set<string>;
|
|
6
|
+
declare const ALLOWED_EXTS: string[];
|
|
7
|
+
declare const ACCEPT_TYPES: string;
|
|
8
|
+
|
|
9
|
+
declare const formatNumberOnly: (num: number) => string;
|
|
10
|
+
declare const parseFormattedNumber: (val: string) => number | "0" | "";
|
|
11
|
+
declare const convertFloatToTime: (floatValue: number) => string;
|
|
12
|
+
declare const convertTimeToFloat: (timeString: string) => number;
|
|
13
|
+
declare const formatFloatNumber: (value: number | string) => string;
|
|
14
|
+
|
|
15
|
+
declare function validateInput(value: string, type: 'text' | 'number' | 'phone' | 'email'): boolean;
|
|
16
|
+
declare function getPasswordMessage(min?: string, max?: string, upcase?: string, digit?: string, special?: string): string;
|
|
17
|
+
declare const uppercaseFirstLetter: (str: string) => string;
|
|
18
|
+
|
|
19
|
+
declare const range: (start: number, end: number) => number[];
|
|
20
|
+
|
|
21
|
+
declare const useFormatDate: () => {
|
|
22
|
+
getRelativeTime: (dateString: string) => string;
|
|
23
|
+
};
|
|
24
|
+
declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
|
|
25
|
+
|
|
26
|
+
declare const generateTagColors: (name: string, id: number) => {
|
|
27
|
+
background: string;
|
|
28
|
+
border: string;
|
|
29
|
+
textColor: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare const COLORS: {
|
|
33
|
+
name: string;
|
|
34
|
+
color: string;
|
|
35
|
+
id: number;
|
|
36
|
+
}[];
|
|
37
|
+
declare const DOTS = "...";
|
|
38
|
+
declare const SearchType: {
|
|
39
|
+
FILTER: string;
|
|
40
|
+
SEARCH: string;
|
|
41
|
+
GROUP: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { ACCEPT_TYPES, ALLOWED_EXTS, ALLOWED_MIME_TYPES, COLORS, DOTS, SearchType, checkIsImageLink, convertFloatToTime, convertTimeToFloat, formatFileSize, formatFloatNumber, formatNumberOnly, generateTagColors, getFileLabel, getPasswordMessage, isBase64Image, parseFormattedNumber, range, uppercaseFirstLetter, useFormatDate, validateAndParseDate, validateInput };
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var C=require('moment'),react=require('react');require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var C__default=/*#__PURE__*/_interopDefault(C);var pt=Object.create;var Le=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var xt=Object.getPrototypeOf,yt=Object.prototype.hasOwnProperty;var bt=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var St=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of mt(e))!yt.call(r,s)&&s!==t&&Le(r,s,{get:()=>e[s],enumerable:!(n=ht(e,s))||n.enumerable});return r};var wt=(r,e,t)=>(t=r!=null?pt(xt(r)):{},St(!r||!r.__esModule?Le(t,"default",{value:r,enumerable:true}):t,r));var je=bt((wn,Me)=>{Me.exports={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};});var oe=r=>{if(!/^data:image\/(png|jpeg|jpg|gif|webp);base64,/.test(r))return false;try{let t=r.split(",")[1];return !!t&&atob(t).length>0}catch{return false}},Oe=r=>/\.(jpg|jpeg|png|gif|bmp|webp|svg|tiff|ico)$/i.test(r)||oe(r),$e=r=>{if(r<1024)return `${r} B`;let e=Math.floor(Math.log(r)/Math.log(1024)),t=["B","KB","MB","GB","TB"];return `${(r/Math.pow(1024,e)).toFixed(2)} ${t[e]}`},Ne=r=>{let e=(r?.split(".").pop()||"").toLowerCase();return e==="pdf"?"PDF":e==="json"?"JSON":e==="zip"?"ZIP":e==="mp4"?"MP4":e==="xls"||e==="xlsx"?"XLS":e==="png"||e==="jpg"||e==="jpeg"?"IMG":"FILE"},le=new Set(["image/jpeg","image/png","application/pdf","video/mp4","application/zip","application/x-zip-compressed","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/json"]),ue=[".pdf",".json",".mp4",".zip",".xls",".xlsx",".jpeg",".jpg",".png"],Pe=[...ue,...Array.from(le)].join(",");var ke=r=>isNaN(r)?"":r?.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g,","),Ce=r=>{if(!r)return "0";let e=r.replace(/[^\d]/g,"");return e?parseFloat(e):""},Ie=r=>{let e=Math.floor(r),t=Math.round((r-e)*60),n=String(e).padStart(2,"0"),s=String(t).padStart(2,"0");return `${n}:${s}`},Te=r=>{let[e,t]=r.split(":").map(Number);return e+t/60},Re=r=>{if(r==null||r==="")return "";let e=typeof r=="string"?parseFloat(r.replace(/,/g,"")):r;return isNaN(e)?"":e.toLocaleString("en-US",{minimumFractionDigits:e%1===0?0:1,maximumFractionDigits:20})};function Ee(r,e){return e==="text"?/^[\p{L}\s]+$/u.test(r):e==="number"?/^[0-9]+$/.test(r):e==="email"?/^[a-zA-Z0-9._]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(r):e==="phone"?/^(0|\+?84)[0-9]{9}$/.test(r):false}function De(r,e,t,n,s){let i=`M?t kh?u ph?i c\uFFFD t? ${r} d?n ${e} k\uFFFD t?`;return (t||t==="0")&&(i+=`, ${t} ch? in hoa`),(n||n==="0")&&(i+=`, ${n} s?`),(s||s==="0")&&(i+=`, ${s} k\uFFFD t? d?c bi?t`),i}var Ae=r=>{let e=r?.toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)};var Fe=(r,e)=>{let t=e-r+1;return Array.from({length:t},(n,s)=>s+r)};wt(je());var Lt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ot={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},$t=r=>Ot[r],_e=r=>r.replace(Lt,$t);var Ve={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:true,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:true,unescape:_e},Z=(r={})=>{Ve={...Ve,...r};};var Q={type:"3rdParty",init(r){Z(r.options.react);}};react.createContext();var S=r=>typeof r=="string",G=()=>{let r,e,t=new Promise((n,s)=>{r=n,e=s;});return t.resolve=r,t.reject=e,t},He=r=>r==null?"":""+r,Ft=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n]);});},Mt=/###/g,Ye=r=>r&&r.indexOf("###")>-1?r.replace(Mt,"."):r,Be=r=>!r||S(r),J=(r,e,t)=>{let n=S(e)?e.split("."):e,s=0;for(;s<n.length-1;){if(Be(r))return {};let i=Ye(n[s]);!r[i]&&t&&(r[i]=new t),Object.prototype.hasOwnProperty.call(r,i)?r=r[i]:r={},++s;}return Be(r)?{}:{obj:r,k:Ye(n[s])}},Ue=(r,e,t)=>{let{obj:n,k:s}=J(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let i=e[e.length-1],a=e.slice(0,e.length-1),o=J(r,a,Object);for(;o.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),o=J(r,a,Object),o?.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=t;},jt=(r,e,t,n)=>{let{obj:s,k:i}=J(r,e,Object);s[i]=s[i]||[],s[i].push(t);},te=(r,e)=>{let{obj:t,k:n}=J(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},_t=(r,e,t)=>{let n=te(r,t);return n!==void 0?n:te(e,t)},qe=(r,e,t)=>{for(let n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?S(r[n])||r[n]instanceof String||S(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):qe(r[n],e[n],t):r[n]=e[n]);return r},M=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Vt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ht=r=>S(r)?r.replace(/[&<>"'\/]/g,e=>Vt[e]):r,ge=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[];}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let 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}},Yt=[" ",",","?","!",";"],Bt=new ge(20),Ut=(r,e,t)=>{e=e||"",t=t||"";let n=Yt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return true;let s=Bt.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`),i=!s.test(r);if(!i){let a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(i=true);}return i},pe=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;let n=e.split(t),s=r;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let a,o="";for(let l=i;l<n.length;++l)if(l!==i&&(o+=t),o+=n[l],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<n.length-1)continue;i+=l-i+1;break}s=a;}return s},ne=r=>r?.replace("_","-"),Kt={type:"logger",log(r){this.output("log",r);},warn(r){this.output("warn",r);},error(r){this.output("error",r);},output(r,e){console?.[r]?.apply?.(console,e);}},he=class r{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Kt,this.options=t,this.debug=t.debug;}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",true)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",true)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(e,t,n,s){return s&&!this.debug?null:(S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new r(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new r(this.logger,e)}},E=new he,_=class{constructor(){this.observers={};}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1);}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t);}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let f=0;f<l;f++)o(...n);}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let f=0;f<l;f++)o.apply(o,[e,...n]);});}},se=class extends _{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{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=true);}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e);}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1);}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):S(n)&&i?o.push(...n.split(i)):o.push(n)));let l=te(this.data,o);return !l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!a||!S(n)?l:pe(this.data?.[e]?.[t],n,i)}addResource(e,t,n,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:false},a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),Ue(this.data,o,s),i.silent||this.emit("added",e,t,n,s);}addResources(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:false};for(let i in n)(S(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:true});s.silent||this.emit("added",e,t,n);}addResourceBundle(e,t,n,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:false,skipCopy:false},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let l=te(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?qe(l,n,i):l={...l,...n},Ue(this.data,o,l),a.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){let t=this.getDataByLanguage(e);return !!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},Qe={processors:{},addPostProcessor(r){this.processors[r.name]=r;},handle(r,e,t,n,s){return r.forEach(i=>{e=this.processors[i]?.process(e,t,n,s)??e;}),e}},Ke={},ze=r=>!S(r)&&typeof r!="boolean"&&typeof r!="number",re=class r extends _{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ft(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=E.create("translator");}changeLanguage(e){e&&(this.language=e);}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?false:this.resolve(e,t)?.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ut(e,n,s);if(a&&!o){let l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return {key:e,namespaces:S(i)?[i]:i};let f=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(f[0])>-1)&&(i=f.shift()),e=f.join(s);}return {key:e,namespaces:S(i)?[i]:i}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return "";Array.isArray(e)||(e=[String(e)]);let s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],f=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(c){let O=t.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${O}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}let h=this.resolve(e,t),u=h?.res,m=h?.usedKey||a,d=h?.exactUsedKey||a,p=["[object Number]","[object Function]","[object RegExp]"],g=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,y=t.count!==void 0&&!S(t.count),b=r.hasDefaultValue(t),w=y?this.pluralResolver.getSuffix(f,t.count,t):"",L=t.ordinal&&y?this.pluralResolver.getSuffix(f,t.count,{ordinal:false}):"",I=y&&!t.ordinal&&t.count===0,$=I&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${w}`]||t[`defaultValue${L}`]||t.defaultValue,v=u;x&&!u&&b&&(v=$);let A=ze(v),Y=Object.prototype.toString.apply(v);if(x&&v&&A&&p.indexOf(Y)<0&&!(S(g)&&Array.isArray(v))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,v,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(h.res=O,h.usedParams=this.getUsedParamsDetails(t),h):O}if(i){let O=Array.isArray(v),N=O?[]:{},T=O?d:m;for(let R in v)if(Object.prototype.hasOwnProperty.call(v,R)){let D=`${T}${i}${R}`;b&&!u?N[R]=this.translate(D,{...t,defaultValue:ze($)?$[R]:void 0,joinArrays:false,ns:o}):N[R]=this.translate(D,{...t,joinArrays:false,ns:o}),N[R]===D&&(N[R]=v[R]);}u=N;}}else if(x&&S(g)&&Array.isArray(u))u=u.join(g),u&&(u=this.extendTranslation(u,e,t,n));else {let O=false,N=false;!this.isValidLookup(u)&&b&&(O=true,u=$),this.isValidLookup(u)||(N=true,u=a);let R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:u,D=b&&$!==u&&this.options.updateMissing;if(N||O||D){if(this.logger.log(D?"updateKey":"missingKey",f,l,a,D?$:u),i){let k=this.resolve(a,{...t,keySeparator:false});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");}let B=[],W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let k=0;k<W.length;k++)B.push(W[k]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(t.lng||this.language):B.push(t.lng||this.language);let we=(k,F,U)=>{let ve=b&&U!==u?U:R;this.options.missingKeyHandler?this.options.missingKeyHandler(k,l,F,ve,D,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(k,l,F,ve,D,t),this.emit("missingKey",k,l,F,u);};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?B.forEach(k=>{let F=this.pluralResolver.getSuffixes(k,t);I&&t[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(U=>{we([k],a+U,t[`defaultValue${U}`]||$);});}):we(B,a,$));}u=this.extendTranslation(u,e,t,h,n),N&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(N||O)&&this.options.parseMissingKeyHandler&&(u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,O?u:void 0));}return s?(h.res=u,h.usedParams=this.getUsedParamsDetails(t),h):u}extendTranslation(e,t,n,s,i){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let f=S(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(f){let u=e.match(this.interpolator.nestingRegexp);c=u&&u.length;}let h=n.replace&&!S(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||s.usedLng,n),f){let u=e.match(this.interpolator.nestingRegexp),m=u&&u.length;c<m&&(n.nest=false);}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==false&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,m=new Array(u),d=0;d<u;d++)m[d]=arguments[d];return i?.[0]===m[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):a.translate(...m,t)},n)),n.interpolation&&this.interpolator.reset();}let o=n.postProcess||this.options.postProcess,l=S(o)?[o]:o;return e!=null&&l?.length&&n.applyPostProcessor!==false&&(e=Qe.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,i,a,o;return S(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;let f=this.extractFromKey(l,t),c=f.key;s=c;let h=f.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let u=t.count!==void 0&&!S(t.count),m=u&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(g=>{this.isValidLookup(n)||(o=g,!Ke[`${p[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Ke[`${p[0]}-${g}`]=true,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),p.forEach(x=>{if(this.isValidLookup(n))return;a=x;let y=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,x,g,t);else {let w;u&&(w=this.pluralResolver.getSuffix(x,t.count,t));let L=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(y.push(c+w),t.ordinal&&w.indexOf(I)===0&&y.push(c+w.replace(I,this.options.pluralSeparator)),m&&y.push(c+L)),d){let $=`${c}${this.options.contextSeparator}${t.context}`;y.push($),u&&(y.push($+w),t.ordinal&&w.indexOf(I)===0&&y.push($+w.replace(I,this.options.pluralSeparator)),m&&y.push($+L));}}let b;for(;b=y.pop();)this.isValidLookup(n)||(i=b,n=this.getResource(x,g,b,t));}));});}),{res:n,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!S(e.replace),s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(let i of t)delete s[i];}return s}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return true;return false}},ie=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||false,this.logger=E.create("languageUtils");}getScriptPartFromCode(e){if(e=ne(e),!e||e.indexOf("-")<0)return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ne(e),!e||e.indexOf("-")<0)return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.indexOf("-")>-1){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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;let s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s);}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;let s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i});}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return [];if(typeof e=="function"&&(e=e(t)),S(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){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));};return S(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):S(e)&&i(this.formatLanguageCode(e)),n.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a));}),s}},Ge={zero:0,one:1,two:2,few:3,many:4,other:5},Je={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},me=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=E.create("pluralResolver"),this.pluralRulesCache={};}addRule(e,t){this.rules[e]=t;}clearCache(){this.pluralRulesCache={};}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ne(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:s});}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Je;if(!e.match(/-|_/))return Je;let l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t);}return this.pluralRulesCache[i]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>Ge[s]-Ge[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}},Xe=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:true,i=_t(r,e,t);return !i&&s&&S(t)&&(i=pe(r,t,n),i===void 0&&(i=pe(e,t,n))),i},de=r=>r.replace(/\$/g,"$$$$"),xe=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=E.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:true});let{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:f,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:u,nestingPrefixEscaped:m,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:x,alwaysFormat:y}=e.interpolation;this.escape=t!==void 0?t:Ht,this.escapeValue=n!==void 0?n:true,this.useRawValueToEscape=s!==void 0?s:false,this.prefix=i?M(i):a||"{{",this.suffix=o?M(o):l||"}}",this.formatSeparator=f||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?M(u):m||M("$t("),this.nestingSuffix=d?M(d):p||M(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=x||1e3,this.alwaysFormat=y!==void 0?y:false,this.resetRegExp();}reset(){this.options&&this.init(this.options);}resetRegExp(){let e=(t,n)=>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,s){let i,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=m=>{if(m.indexOf(this.formatSeparator)<0){let x=Xe(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...s,...t,interpolationkey:m}):x}let d=m.split(this.formatSeparator),p=d.shift().trim(),g=d.join(this.formatSeparator).trim();return this.format(Xe(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...s,...t,interpolationkey:p})};this.resetRegExp();let c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return [{regex:this.regexpUnescape,safeValue:m=>de(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?de(this.escape(m)):de(m)}].forEach(m=>{for(o=0;i=m.regex.exec(e);){let d=i[1].trim();if(a=f(d),a===void 0)if(typeof c=="function"){let g=c(e,i,s);a=S(g)?g:"";}else if(s&&Object.prototype.hasOwnProperty.call(s,d))a="";else if(h){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`),a="";else !S(a)&&!this.useRawValueToEscape&&(a=He(a));let p=m.safeValue(a);if(e=e.replace(i[0],p),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,a,o=(l,f)=>{let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let h=l.split(new RegExp(`${c}[ ]*{`)),u=`{${h[1]}`;l=h[0],u=this.interpolate(u,a);let m=u.match(/'/g),d=u.match(/"/g);((m?.length??0)%2===0&&!d||d.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),f&&(a={...f,...a});}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${c}${u}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];a={...n},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=false,delete a.defaultValue;let f=false;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){let c=s[1].split(this.formatSeparator).map(h=>h.trim());s[1]=c.shift(),l=c,f=true;}if(i=t(o.call(this,s[1].trim(),a),a),i&&s[0]===e&&!S(i))return i;S(i)||(i=He(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),f&&(i=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0;}return e}},zt=r=>{let e=r.toLowerCase().trim(),t={};if(r.indexOf("(")>-1){let n=r.split("(");e=n[0].toLowerCase().trim();let s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),f=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=f),f==="false"&&(t[c]=false),f==="true"&&(t[c]=true),isNaN(f)||(t[c]=parseInt(f,10));}});}return {formatName:e,formatOptions:t}},j=r=>{let e={};return (t,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});let a=n+JSON.stringify(i),o=e[a];return o||(o=r(ne(n),s),e[a]=o),o(t)}},ye=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=E.create("formatter"),this.options=e,this.formats={number:j((t,n)=>{let s=new Intl.NumberFormat(t,{...n});return i=>s.format(i)}),currency:j((t,n)=>{let s=new Intl.NumberFormat(t,{...n,style:"currency"});return i=>s.format(i)}),datetime:j((t,n)=>{let s=new Intl.DateTimeFormat(t,{...n});return i=>s.format(i)}),relativetime:j((t,n)=>{let s=new Intl.RelativeTimeFormat(t,{...n});return i=>s.format(i,n.range||"day")}),list:j((t,n)=>{let s=new Intl.ListFormat(t,{...n});return i=>s.format(i)})},this.init(e);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";}add(e,t){this.formats[e.toLowerCase().trim()]=t;}addCached(e,t){this.formats[e.toLowerCase().trim()]=j(t);}format(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){let o=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator);}return i.reduce((o,l)=>{let{formatName:f,formatOptions:c}=zt(l);if(this.formats[f]){let h=o;try{let u=s?.formatParams?.[s.interpolationkey]||{},m=u.locale||u.lng||s.locale||s.lng||n;h=this.formats[f](o,m,{...c,...s,...u});}catch(u){this.logger.warn(u);}return h}else this.logger.warn(`there was no format function for ${f}`);return o},e)}},Gt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--);},be=class extends _{constructor(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=E.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s);}queueLoad(e,t,n,s){let i={},a={},o={},l={};return e.forEach(f=>{let c=true;t.forEach(h=>{let u=`${f}|${h}`;!n.reload&&this.store.hasResourceBundle(f,h)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=true):(this.state[u]=1,c=false,a[u]===void 0&&(a[u]=true),i[u]===void 0&&(i[u]=true),l[h]===void 0&&(l[h]=true)));}),c||(o[f]=true);}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let s=e.split("|"),i=s[0],a=s[1];t&&this.emit("failedLoading",i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:true}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(l=>{jt(l.loaded,[i],a),Gt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(f=>{o[f]||(o[f]={});let c=l.loaded[f];c.length&&c.forEach(h=>{o[f][h]===void 0&&(o[f][h]=true);});}),l.done=true,l.errors.length?l.callback(l.errors):l.callback());}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done);}read(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:a});return}this.readingCalls++;let o=(f,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback);}if(f&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,i*2,a);},i);return}a(f,c);},l=this.backend[n].bind(this.backend);if(l.length===2){try{let f=l(e,t);f&&typeof f.then=="function"?f.then(c=>o(null,c)).catch(o):o(null,f);}catch(f){o(f);}return}return l(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);let i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a);});}load(e,t,n){this.prepareLoading(e,t,{},n);}reload(e,t,n){this.prepareLoading(e,t,{reload:true},n);}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,o),this.loaded(e,a,o);});}saveMissing(e,t,n,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.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(this.backend?.create){let l={...a,isUpdate:i},f=this.backend.create.bind(this.backend);if(f.length<6)try{let c;f.length===5?c=f(e,t,n,s,l):c=f(e,t,n,s),c&&typeof c.then=="function"?c.then(h=>o(null,h)).catch(o):o(null,c);}catch(c){o(c);}else f(e,t,n,s,o,l);}!e||!e[0]||this.store.addResource(e[0],t,n,s);}}},We=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),S(r[1])&&(e.defaultValue=r[1]),S(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){let t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n];});}return e},interpolation:{escapeValue:true,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}),Ze=r=>(S(r.ns)&&(r.ns=[r.ns]),S(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),S(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs?.indexOf?.("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r),ee=()=>{},Jt=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r));});},ae=class r extends _{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ze(e),this.services={},this.logger=E,this.modules={external:[]},Jt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t);},0);}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=true,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(S(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let s=We();this.options={...s,...this.options,...Ze(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);let i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?E.init(i(this.modules.logger),this.options):E.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=ye;let h=new ie(this.options);this.store=new se(this.options.resources,this.options);let u=this.services;u.logger=E,u.resourceStore=this.store,u.languageUtils=h,u.pluralResolver=new me(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(u.formatter=i(c),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new xe(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new be(i(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(m){for(var d=arguments.length,p=new Array(d>1?d-1:0),g=1;g<d;g++)p[g-1]=arguments[g];e.emit(m,...p);}),this.modules.languageDetector&&(u.languageDetector=i(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=i(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new re(this.services,this.options),this.translator.on("*",function(m){for(var d=arguments.length,p=new Array(d>1?d-1:0),g=1;g<d;g++)p[g-1]=arguments[g];e.emit(m,...p);}),this.modules.external.forEach(m=>{m.init&&m.init(this);});}if(this.format=this.options.interpolation.format,n||(n=ee),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let 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]=function(){return e.store[c](...arguments)};}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e};});let l=G(),f=()=>{let c=(h,u)=>{this.isInitializing=false,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=true,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(u),n(h,u);};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?f():setTimeout(f,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee,s=S(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(f=>{f!=="cimode"&&i.indexOf(f)<0&&i.push(f);});};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload?.forEach?.(o=>a(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o);});}else n(null);}reloadResources(e,t,n){let s=G();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=ee),this.services.backendConnector.reload(e,t,i=>{s.resolve(),n(i);}),s}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"&&Qe.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"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){let n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let s=G();this.emit("languageChanging",e);let i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l);},a=(l,f)=>{f?(i(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return n.t(...arguments)}),t&&t(l,function(){return n.t(...arguments)});},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);let f=S(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);f&&(this.language||i(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,c=>{a(c,f);});};return !e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,t,n){var s=this;let i=function(a,o){let l;if(typeof o!="object"){for(var f=arguments.length,c=new Array(f>2?f-2:0),h=2;h<f;h++)c[h-2]=arguments[h];l=s.options.overloadTranslationOptionHandler([a,o].concat(c));}else l={...o};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||i.keyPrefix);let u=s.options.keySeparator||".",m;return l.keyPrefix&&Array.isArray(a)?m=a.map(d=>`${l.keyPrefix}${u}${d}`):m=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,s.t(m,l)};return S(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e;}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),false;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),false;let n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:false,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return true;let a=(o,l)=>{let f=this.services.backendConnector.state[`${o}|${l}`];return f===-1||f===0||f===2};if(t.precheck){let o=t.precheck(this,a);if(o!==void 0)return o}return !!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!s||a(i,e)))}loadNamespaces(e,t){let n=G();return this.options.ns?(S(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s);}),this.loadResources(s=>{n.resolve(),t&&t(s);}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=G();S(e)&&(e=[e]);let s=this.options.preload||[],i=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{n.resolve(),t&&t(a);}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return "rtl";let 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=this.services?.languageUtils||new ie(We());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new r(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee,n=e.forkResourceStore;n&&delete e.forkResourceStore;let s={...this.options,...e,isClone:true},i=new r(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(o=>{i[o]=this[o];}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let o=Object.keys(this.store.data).reduce((l,f)=>(l[f]={...this.store.data[f]},Object.keys(l[f]).reduce((c,h)=>(c[h]={...l[f][h]},c),{})),{});i.store=new se(o,s),i.services.resourceStore=i.store;}return i.translator=new re(i.services,s),i.translator.on("*",function(o){for(var l=arguments.length,f=new Array(l>1?l-1:0),c=1;c<l;c++)f[c-1]=arguments[c];i.emit(o,...f);}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return {options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},P=ae.createInstance();P.createInstance=ae.createInstance;P.createInstance;P.dir;P.init;P.loadResources;P.reloadResources;P.use;P.changeLanguage;P.getFixedT;P.t;P.exists;P.setDefaultNamespace;P.hasLoadedNamespace;P.loadNamespaces;P.loadLanguages;var{slice:Xt,forEach:Wt}=[];function Zt(r){return Wt.call(Xt.call(arguments,1),e=>{if(e)for(let t in e)r[t]===void 0&&(r[t]=e[t]);}),r}function qt(r){return typeof r!="string"?false:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(r))}var et=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Qt=function(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e),i=`${r}=${s}`;if(n.maxAge>0){let a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`;}if(n.domain){if(!et.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`;}if(n.path){if(!et.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`;}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`;}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case true:i+="; SameSite=Strict";break;case "lax":i+="; SameSite=Lax";break;case "strict":i+="; SameSite=Strict";break;case "none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i},tt={create(r,e,t,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),n&&(s.domain=n),document.cookie=Qt(r,e,s);},read(r){let e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let s=t[n];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(r,e){this.create(r,"",-1,e);}},en={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return tt.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&tt.create(t,r,n,s,i);}},tn={name:"querystring",lookup(r){let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));let i=n.substring(1).split("&");for(let a=0;a<i.length;a++){let o=i[a].indexOf("=");o>0&&i[a].substring(0,o)===e&&(t=i[a].substring(o+1));}}return t}},nn={name:"hash",lookup(r){let{lookupHash:e,lookupFromHashIndex:t}=r,n;if(typeof window<"u"){let{hash:s}=window.location;if(s&&s.length>2){let i=s.substring(1);if(e){let a=i.split("&");for(let o=0;o<a.length;o++){let l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1));}}if(n)return n;if(!n&&t>-1){let a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return n}},V=null,nt=()=>{if(V!==null)return V;try{if(V=typeof window<"u"&&window.localStorage!==null,!V)return !1;let r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r);}catch{V=false;}return V},sn={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&nt())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&nt()&&window.localStorage.setItem(t,r);}},H=null,st=()=>{if(H!==null)return H;try{if(H=typeof window<"u"&&window.sessionStorage!==null,!H)return !1;let r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r);}catch{H=false;}return H},rn={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&st())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&st()&&window.sessionStorage.setItem(t,r);}},an={name:"navigator",lookup(r){let e=[];if(typeof navigator<"u"){let{languages:t,userLanguage:n,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);n&&e.push(n),s&&e.push(s);}return e.length>0?e:void 0}},on={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t,n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},ln={name:"path",lookup(r){let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;let t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},un={name:"subdomain",lookup(r){let{lookupFromSubdomainIndex:e}=r,t=typeof e=="number"?e+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},rt=false;try{document.cookie,rt=!0;}catch{}var it=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rt||it.splice(1,1);var cn=()=>({order:it,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}),X=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Zt(t,this.options||{},cn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(en),this.addDetector(tn),this.addDetector(sn),this.addDetector(rn),this.addDetector(an),this.addDetector(on),this.addDetector(ln),this.addDetector(un),this.addDetector(nn);}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let s=this.detectors[n].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s));}}),t=t.filter(n=>n!=null&&!qt(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options);}));}};X.type="languageDetector";var at={"search...":"T\xECm ki\u1EBFm...",search:"T\xECm ki\u1EBFm",search_more:"T\xECm ki\u1EBFm th\xEAm",for:"cho",cancel:"H\u1EE7y",empty_data:"D\u1EEF li\u1EC7u tr\u1ED1ng",detail_button:"Chi ti\u1EBFt",cancel_button:"H\u1EE7y",choose:"Ch\u1ECDn",total:"T\u1ED5ng ti\u1EC1n",no:"Kh\xF4ng",loading:"\u0110ang t\u1EA3i",active:"Ho\u1EA1t \u0111\u1ED9ng",in_active:"Ng\u01B0ng ho\u1EA1t \u0111\u1ED9ng",new:"M\u1EDBi",add_line:"Th\xEAm d\xF2ng",choose_place:"Vui l\xF2ng ch\u1ECDn",filter_by:"B\u1ED9 l\u1ECDc",group_by:"Nh\xF3m theo",or:"ho\u1EB7c",second_ago:"gi\xE2y tr\u01B0\u1EDBc",minute_ago:"ph\xFAt tr\u01B0\u1EDBc",hour_ago:"gi\u1EDD tr\u01B0\u1EDBc",day_ago:"ng\xE0y tr\u01B0\u1EDBc",month_ago:"th\xE1ng tr\u01B0\u1EDBc",year_ago:"n\u0103m tr\u01B0\u1EDBc",second_future:"gi\xE2y n\u1EEFa",minute_future:"ph\xFAt n\u1EEFa",hour_future:"gi\u1EDD n\u1EEFa",day_future:"ng\xE0y n\u1EEFa",month_future:"th\xE1ng n\u1EEFa",year_future:"n\u0103m n\u1EEFa",now:"B\xE2y gi\u1EDD",download_file:"T\u1EA3i xu\u1ED1ng t\u1EC7p n\xE0y",upload_success:"T\u1EA3i t\u1EC7p l\xEAn th\xE0nh c\xF4ng",upload_failure:"T\u1EA3i t\u1EC7p l\xEAn th\u1EA5t b\u1EA1i",file_accept_single:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 m\u1ED7i t\u1EC7p c\xF3 dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 10MB.",file_accept_total:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 t\u1ED5ng dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 50MB.",must_required:"l\xE0 b\u1EAFt bu\u1ED9c.","none-validated":"Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",invalid_number:"\u0110\u1ECBnh d\u1EA1ng s\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7",upload_file_placeholder:"T\u1EA3i t\u1EC7p c\u1EE7a b\u1EA1n","no-available":"Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn n\xE0o",paid_amount:"S\u1ED1 ti\u1EC1n \u0111\xE3 tr\u1EA3",remanining_amount:"S\u1ED1 ti\u1EC1n c\xF2n l\u1EA1i",only_image_accept:"Ch\u1EC9 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn h\xECnh \u1EA3nh","text-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp ch\u1EEF (kh\xF4ng ch\u1EE9a s\u1ED1 v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","number-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp s\u1ED1 (kh\xF4ng ch\u1EE9a ch\u1EEF v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","email-only":"Email kh\xF4ng h\u1EE3p l\u1EC7","phone-only":"S\u1ED1 \u0111i\u1EC7n tho\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",message:"M\u1EADt kh\u1EA9u ph\u1EA3i c\xF3 t\u1EEB {{min}} \u0111\u1EBFn {{max}} k\xFD t\u1EF1","message-text-error":" kh\xF4ng \u0111\u01B0\u1EE3c v\u01B0\u1EE3t qu\xE1 {{max}} k\xFD t\u1EF1",upcase:", {{count}} ch\u1EEF in hoa",digit:", {{count}} s\u1ED1",special:", {{count}} k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t",upload_files_accept:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP",show_all:"Xem t\u1EA5t c\u1EA3",upload_max_files:"B\u1EA1n ch\u1EC9 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn t\u1ED1i \u0111a 5 t\u1EADp tin v\xE0 5 \u1EA3nh",file_too_large:" M\u1ED7i file ho\u1EB7c h\xECnh \u1EA3nh dung l\u01B0\u1EE3ng t\u1ED1i \u0111a 10MB",remove_all:"X\xF3a t\u1EA5t c\u1EA3",download:"T\u1EA3i xu\u1ED1ng",please_enter:"Vui l\xF2ng nh\u1EADp"};var ot={"none-validated":"Invalid value","search...":"Search...",search:"Search",search_more:"Search more",for:"for",cancel:"Cancel",choose:"Choose",total:"Total",no:"No",loading:"Loading",detail_button:"Detail",cancel_button:"Cancel",empty_data:"No data",new:"New",add_line:"Add a line",choose_place:"Please choose",filter_by:"Filter",group_by:"Group By",or:"or",now:"Now",second_ago:"seconds ago",minute_ago:"minutes ago",hour_ago:"hours ago",day_ago:"days ago",month_ago:"months ago",year_ago:"years ago",second_future:"seconds",minute_future:"minutes",hour_future:"hours",day_future:"days",month_future:"months",year_future:"years",download_file:"Download this file",upload_success:"Upload file success",upload_failure:"Upload file failure",file_accept_single:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",file_accept_total:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",must_required:"is required",invalid_number:"Invalid number",active:"Active",in_active:"Inactive",upload_file_placeholder:"Upload your file","no-available":"No options available",paid_amount:"Amount Paid",remanining_amount:"Amount Remaining",only_image_accept:"Only accept image","text-only":"Only letters (no numbers or special characters)","number-only":"Only enter numbers (no letters or special characters)","email-only":"Invalid email address","phone-only":"Invalid phone number",message:"Password must be between {{min}} and {{max}} characters","message-text-error":" must not exceed {{max}} characters",upcase:", {{count}} uppercase letter",digit:", {{count}} digit",special:", {{count}} special character",upload_files_accept:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed",show_all:"Show all",upload_max_files:"You can only upload a maximum of 5 files and 5 images",file_too_large:"Image/file size exceeds the 10MB limit",remove_all:"Remove all",download:"Download",please_enter:"Please enter"};P.use(X).use(Q).init({resources:{vi:{translation:at},en:{translation:ot}},fallbackLng:"vi",lng:"vi_VN",debug:false,nonExplicitSupportedLngs:true,interpolation:{escapeValue:false},detection:{caches:["cookie"]}});var hn=react.createContext(null);var Se=()=>{let r=react.useContext(hn);if(!r)throw new Error("useI18n must be used within I18nProvider");return r};var lt=()=>{let{t:r}=Se();return {getRelativeTime:t=>{let n=[{unit:"year",seconds:31536e3,keyPast:"year_ago",keyFuture:"year_future"},{unit:"month",seconds:2592e3,keyPast:"month_ago",keyFuture:"month_future"},{unit:"day",seconds:86400,keyPast:"day_ago",keyFuture:"day_future"},{unit:"hour",seconds:3600,keyPast:"hour_ago",keyFuture:"hour_future"},{unit:"minute",seconds:60,keyPast:"minute_ago",keyFuture:"minute_future"},{unit:"second",seconds:1,keyPast:"second_ago",keyFuture:"second_future"}],s=new Date,i,a,o,l=0,f=0,c=0,h=t.split(/[- :]/).map(Number);h[0]>31?[i,a,o]=h:[o,a,i]=h,h.length>3&&([l,f,c]=h.slice(3));let u=new Date(i,a-1,o,l,f,c);l===0&&f===0&&c===0&&u.setHours(23,59,59);let m=Math.floor((u.getTime()-s.getTime())/1e3),d=m>0,p=Math.abs(m);for(let{seconds:g,keyPast:x,keyFuture:y}of n){let b=p/g;if(b>=1)return b=d?Math.ceil(b):Math.floor(b),d?`${b} ${r(y,{count:b})}`:`${b} ${r(x,{count:b})}`}return r("now")}}},ut=(r,e=false)=>{if(!r||typeof r!="string")return null;let t=r.replace(/[^0-9-\/:\s]/g,""),n="YYYY-MM-DD",s="YYYY-MM-DD HH:mm:ss",i=C__default.default().format("DD"),a=C__default.default().format("MM"),o=C__default.default().format("YYYY"),l="00:00:00",f=parseInt(o)+10,c=(d,p,g)=>C__default.default(`${d}-${p}-${g}`,"DD-MM-YYYY",true).isValid(),h=(d,p="00",g="00")=>{let x=parseInt(d,10),y=parseInt(p,10),b=parseInt(g,10);return x>=0&&x<=23&&y>=0&&y<=59&&b>=0&&b<=59},u=(d,p,g,x=l)=>{let y=C__default.default(`${d}-${p}-${g} ${x}`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?e?(y=y.subtract(7,"hours"),y.format(s)):y.format(n):null};if(e&&r.match(/^\d{1,2}[\/-]\d{1,2}[\/-]\d{2,4}\s+\d{1,2}(:\d{1,2}(:\d{1,2})?)?$/)){let[d,p]=r.split(/\s+/),g=d.split(/[\/-]/),x=p.split(":"),y=g[0].padStart(2,"0"),b=g[1].padStart(2,"0"),w=g[2].length<=2?`20${g[2].padStart(2,"0")}`:g[2].padStart(4,"0"),L=x[0].padStart(2,"0"),I=x[1]?x[1].padStart(2,"0"):"00",$=x[2]?x[2].padStart(2,"0"):"00";if(c(y,b,w)&&h(L,I,$)){let v=C__default.default(`${y}-${b}-${w} ${L}:${I}:${$}`,"DD-MM-YYYY HH:mm:ss");return v.isValid()?(v=v.subtract(7,"hours"),v.format(s)):null}return null}if(t.match(/^\d{4}-\d{2}-\d{2}$/)){let[d,p,g]=t.split("-");return c(g,p,d)?u(g,p,d):null}if(t.match(/^\d{1,2}\/\d{1,2}\/\d{2,4}$/)){let[d,p,g]=t.split("/"),x=d.padStart(2,"0"),y=p.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(x,y,b)?u(x,y,b):null}if(t.match(/^\d{1,2}-\d{1,2}-\d{2,4}$/)){let[d,p,g]=t.split("-"),x=d.padStart(2,"0"),y=p.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(x,y,b)?u(x,y,b):null}if(t.match(/^\d{1,2}[\/-]\d{1,2}$/)){let[d,p]=t.split(/[\/-]/),g=d.padStart(2,"0"),x=p.padStart(2,"0");return c(g,x,o)?u(g,x,o):null}if(t.match(/^\d{4}$/)){let d=parseInt(t,10);if(d>=2e3&&d<=f)return c(i,a,d.toString())?u(i,a,d.toString()):null;let p=t.slice(0,2),g=t.slice(2,4);return c(p,g,o)?u(p,g,o):null}if(t.startsWith("-")&&/^\-\d+$/.test(t)){let d=Math.abs(parseInt(t,10)),p=C__default.default().subtract(d,"days");return e&&(p=p.subtract(7,"hours")),p.isValid()?e?p.format(s):p.format(n):null}if(r.match(/^\d{1,2}[^0-9-\/]+\d{1,2}[^0-9-\/]+\d{2,4}.*$/)){let d=r.split(/[^0-9-\/]+/).filter(Boolean),p=d[0].padStart(2,"0"),g=d[1].padStart(2,"0"),x=d[2];return x=x.length===2?`20${x}`:x.padStart(4,"0"),c(p,g,x)?u(p,g,x):null}if(e){if(t.length===9){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,9).padStart(2,"0");if(c(d,p,g)&&h(x)){let y=C__default.default(`${d}-${p}-${g} ${x}:00:00`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?(y=y.subtract(7,"hours"),y.format(s)):null}return null}if(t.length===10){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10);if(c(d,p,g)&&h(x)){let y=C__default.default(`${d}-${p}-${g} ${x}:00:00`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?(y=y.subtract(7,"hours"),y.format(s)):null}return null}if(t.length===11){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,11).padStart(2,"0");if(c(d,p,g)&&h(x,y)){let b=C__default.default(`${d}-${p}-${g} ${x}:${y}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(s)):null}return null}if(t.length===12){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12);if(c(d,p,g)&&h(x,y)){let b=C__default.default(`${d}-${p}-${g} ${x}:${y}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(s)):null}return null}if(t.length===13){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12),b=t.slice(12,13).padStart(2,"0");if(c(d,p,g)&&h(x,y,b)){let w=C__default.default(`${d}-${p}-${g} ${x}:${y}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(s)):null}return null}if(t.length===14){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12),b=t.slice(12,14);if(c(d,p,g)&&h(x,y,b)){let w=C__default.default(`${d}-${p}-${g} ${x}:${y}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(s)):null}return null}}let m=t.length;if(m===1||m===2){let d=t.padStart(2,"0");return c(d,a,o)?u(d,a,o):null}if(m===3){let d=t.slice(0,2),p=t.slice(2,3).padStart(2,"0");return c(d,p,o)?u(d,p,o):null}if(m===6){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,6);return g=`20${g}`,parseInt(p)>12?c(d,a,o)?u(d,a,o):null:c(d,p,g)?u(d,p,g):null}if(m===7)return null;if(m===8){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8);return c(d,p,g)?u(d,p,g):null}return null};var ct=(r,e)=>{let t=r+e/2,n=0;for(let L=0;L<t.length;L++)n=t.charCodeAt(L)+((n<<5)-n);let s=n>>16&255,i=n>>8&255,a=n&255,o=s/255,l=i/255,f=a/255,c=Math.max(o,l,f),h=Math.min(o,l,f),u=c-h,m=0;u!==0&&(c===o?m=(l-f)/u%6:c===l?m=(f-o)/u+2:m=(o-l)/u+4),m=Math.round(m*60),m<0&&(m+=360);let d=.35,p=.92,g=.45,x=.78,y=.55,b=.32,w=(L,I,$)=>{let v=(1-Math.abs(2*$-1))*I,A=v*(1-Math.abs(L/60%2-1)),Y=$-v/2,O=0,N=0,T=0;return 0<=L&&L<60?[O,N,T]=[v,A,0]:60<=L&&L<120?[O,N,T]=[A,v,0]:120<=L&&L<180?[O,N,T]=[0,v,A]:180<=L&&L<240?[O,N,T]=[0,A,v]:240<=L&&L<300?[O,N,T]=[A,0,v]:[O,N,T]=[v,0,A],`rgb(${Math.round((O+Y)*255)}, ${Math.round((N+Y)*255)}, ${Math.round((T+Y)*255)})`};return {background:w(m,d,p),border:w(m,g,x),textColor:w(m,y,b)}};var ft=[{name:"no_color",color:"RGBA(230.1375,221.3625,221.3625,1)",id:0},{name:"red",color:"rgba(255,155.5,155.5,1)",id:1},{name:"orange",color:"RGBA(247.0375,198.06116071,152.4625,1)",id:2},{name:"yellow",color:"RGBA(252.88960843, 226.89175248, 135.61039157,1)",id:3},{name:"cyan",color:"RGBA(187.45210396, 215.03675558, 248.04789604,1)",id:4},{name:"purple",color:"RGBA(216.79194664, 167.70805336, 203.91748283,1)",id:5},{name:"almond",color:"RGBA(247.84539474, 213.9484835, 199.65460526,1)",id:6},{name:"teal",color:"RGBA(136.6125, 224.8875, 218.94591346,1)",id:7},{name:"blue",color:"RGBA(150.60535714, 165.68382711, 248.89464286,1)",id:8},{name:"raspberry",color:"RGBA(254.94583333, 157.55416667, 203.95543194,1)",id:9},{name:"green",color:"RGBA(182.62075688, 236.87924312, 189.81831118,1)",id:10},{name:"violet",color:"RGBA(230.11575613, 219.41069277, 252.08930723,1)",id:11}],dt="...",gt={FILTER:"filter_by",SEARCH:"search_by",GROUP:"group_by"};exports.ACCEPT_TYPES=Pe;exports.ALLOWED_EXTS=ue;exports.ALLOWED_MIME_TYPES=le;exports.COLORS=ft;exports.DOTS=dt;exports.SearchType=gt;exports.checkIsImageLink=Oe;exports.convertFloatToTime=Ie;exports.convertTimeToFloat=Te;exports.formatFileSize=$e;exports.formatFloatNumber=Re;exports.formatNumberOnly=ke;exports.generateTagColors=ct;exports.getFileLabel=Ne;exports.getPasswordMessage=De;exports.isBase64Image=oe;exports.parseFormattedNumber=Ce;exports.range=Fe;exports.uppercaseFirstLetter=Ae;exports.useFormatDate=lt;exports.validateAndParseDate=ut;exports.validateInput=Ee;
|
package/dist/utils.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{x as ACCEPT_TYPES,w as ALLOWED_EXTS,v as ALLOWED_MIME_TYPES,z as COLORS,A as DOTS,B as SearchType,p as checkIsImageLink,n as convertFloatToTime,r as convertTimeToFloat,q as formatFileSize,s as formatFloatNumber,j as formatNumberOnly,t as generateTagColors,u as getFileLabel,h as getPasswordMessage,o as isBase64Image,m as isObjectEmpty,k as parseFormattedNumber,i as range,y as uppercaseFirstLetter,f as useFormatDate,l as validateAndParseDate,g as validateInput}from'./chunk-QH3T7FI4.mjs';import'./chunk-YEKQJ4YC.mjs';
|
|
1
|
+
import C from'moment';import {createContext,useContext}from'react';import'react/jsx-runtime';var pt=Object.create;var Le=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var xt=Object.getPrototypeOf,yt=Object.prototype.hasOwnProperty;var bt=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var St=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of mt(e))!yt.call(r,s)&&s!==t&&Le(r,s,{get:()=>e[s],enumerable:!(n=ht(e,s))||n.enumerable});return r};var wt=(r,e,t)=>(t=r!=null?pt(xt(r)):{},St(!r||!r.__esModule?Le(t,"default",{value:r,enumerable:true}):t,r));var je=bt((wn,Me)=>{Me.exports={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,link:true,meta:true,param:true,source:true,track:true,wbr:true};});var oe=r=>{if(!/^data:image\/(png|jpeg|jpg|gif|webp);base64,/.test(r))return false;try{let t=r.split(",")[1];return !!t&&atob(t).length>0}catch{return false}},Oe=r=>/\.(jpg|jpeg|png|gif|bmp|webp|svg|tiff|ico)$/i.test(r)||oe(r),$e=r=>{if(r<1024)return `${r} B`;let e=Math.floor(Math.log(r)/Math.log(1024)),t=["B","KB","MB","GB","TB"];return `${(r/Math.pow(1024,e)).toFixed(2)} ${t[e]}`},Ne=r=>{let e=(r?.split(".").pop()||"").toLowerCase();return e==="pdf"?"PDF":e==="json"?"JSON":e==="zip"?"ZIP":e==="mp4"?"MP4":e==="xls"||e==="xlsx"?"XLS":e==="png"||e==="jpg"||e==="jpeg"?"IMG":"FILE"},le=new Set(["image/jpeg","image/png","application/pdf","video/mp4","application/zip","application/x-zip-compressed","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/json"]),ue=[".pdf",".json",".mp4",".zip",".xls",".xlsx",".jpeg",".jpg",".png"],Pe=[...ue,...Array.from(le)].join(",");var ke=r=>isNaN(r)?"":r?.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g,","),Ce=r=>{if(!r)return "0";let e=r.replace(/[^\d]/g,"");return e?parseFloat(e):""},Ie=r=>{let e=Math.floor(r),t=Math.round((r-e)*60),n=String(e).padStart(2,"0"),s=String(t).padStart(2,"0");return `${n}:${s}`},Te=r=>{let[e,t]=r.split(":").map(Number);return e+t/60},Re=r=>{if(r==null||r==="")return "";let e=typeof r=="string"?parseFloat(r.replace(/,/g,"")):r;return isNaN(e)?"":e.toLocaleString("en-US",{minimumFractionDigits:e%1===0?0:1,maximumFractionDigits:20})};function Ee(r,e){return e==="text"?/^[\p{L}\s]+$/u.test(r):e==="number"?/^[0-9]+$/.test(r):e==="email"?/^[a-zA-Z0-9._]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(r):e==="phone"?/^(0|\+?84)[0-9]{9}$/.test(r):false}function De(r,e,t,n,s){let i=`M?t kh?u ph?i c\uFFFD t? ${r} d?n ${e} k\uFFFD t?`;return (t||t==="0")&&(i+=`, ${t} ch? in hoa`),(n||n==="0")&&(i+=`, ${n} s?`),(s||s==="0")&&(i+=`, ${s} k\uFFFD t? d?c bi?t`),i}var Ae=r=>{let e=r?.toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)};var Fe=(r,e)=>{let t=e-r+1;return Array.from({length:t},(n,s)=>s+r)};wt(je());var Lt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ot={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},$t=r=>Ot[r],_e=r=>r.replace(Lt,$t);var Ve={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:true,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:true,unescape:_e},Z=(r={})=>{Ve={...Ve,...r};};var Q={type:"3rdParty",init(r){Z(r.options.react);}};createContext();var S=r=>typeof r=="string",G=()=>{let r,e,t=new Promise((n,s)=>{r=n,e=s;});return t.resolve=r,t.reject=e,t},He=r=>r==null?"":""+r,Ft=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n]);});},Mt=/###/g,Ye=r=>r&&r.indexOf("###")>-1?r.replace(Mt,"."):r,Be=r=>!r||S(r),J=(r,e,t)=>{let n=S(e)?e.split("."):e,s=0;for(;s<n.length-1;){if(Be(r))return {};let i=Ye(n[s]);!r[i]&&t&&(r[i]=new t),Object.prototype.hasOwnProperty.call(r,i)?r=r[i]:r={},++s;}return Be(r)?{}:{obj:r,k:Ye(n[s])}},Ue=(r,e,t)=>{let{obj:n,k:s}=J(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let i=e[e.length-1],a=e.slice(0,e.length-1),o=J(r,a,Object);for(;o.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),o=J(r,a,Object),o?.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=t;},jt=(r,e,t,n)=>{let{obj:s,k:i}=J(r,e,Object);s[i]=s[i]||[],s[i].push(t);},te=(r,e)=>{let{obj:t,k:n}=J(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},_t=(r,e,t)=>{let n=te(r,t);return n!==void 0?n:te(e,t)},qe=(r,e,t)=>{for(let n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?S(r[n])||r[n]instanceof String||S(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):qe(r[n],e[n],t):r[n]=e[n]);return r},M=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Vt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ht=r=>S(r)?r.replace(/[&<>"'\/]/g,e=>Vt[e]):r,ge=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[];}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let 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}},Yt=[" ",",","?","!",";"],Bt=new ge(20),Ut=(r,e,t)=>{e=e||"",t=t||"";let n=Yt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return true;let s=Bt.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`),i=!s.test(r);if(!i){let a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(i=true);}return i},pe=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;let n=e.split(t),s=r;for(let i=0;i<n.length;){if(!s||typeof s!="object")return;let a,o="";for(let l=i;l<n.length;++l)if(l!==i&&(o+=t),o+=n[l],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<n.length-1)continue;i+=l-i+1;break}s=a;}return s},ne=r=>r?.replace("_","-"),Kt={type:"logger",log(r){this.output("log",r);},warn(r){this.output("warn",r);},error(r){this.output("error",r);},output(r,e){console?.[r]?.apply?.(console,e);}},he=class r{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Kt,this.options=t,this.debug=t.debug;}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",true)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",true)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(e,t,n,s){return s&&!this.debug?null:(S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new r(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new r(this.logger,e)}},E=new he,_=class{constructor(){this.observers={};}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let s=this.observers[n].get(t)||0;this.observers[n].set(t,s+1);}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t);}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let f=0;f<l;f++)o(...n);}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let f=0;f<l;f++)o.apply(o,[e,...n]);});}},se=class extends _{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{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=true);}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e);}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1);}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):S(n)&&i?o.push(...n.split(i)):o.push(n)));let l=te(this.data,o);return !l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!a||!S(n)?l:pe(this.data?.[e]?.[t],n,i)}addResource(e,t,n,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:false},a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),Ue(this.data,o,s),i.silent||this.emit("added",e,t,n,s);}addResources(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:false};for(let i in n)(S(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:true});s.silent||this.emit("added",e,t,n);}addResourceBundle(e,t,n,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:false,skipCopy:false},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let l=te(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?qe(l,n,i):l={...l,...n},Ue(this.data,o,l),a.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){let t=this.getDataByLanguage(e);return !!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},Qe={processors:{},addPostProcessor(r){this.processors[r.name]=r;},handle(r,e,t,n,s){return r.forEach(i=>{e=this.processors[i]?.process(e,t,n,s)??e;}),e}},Ke={},ze=r=>!S(r)&&typeof r!="boolean"&&typeof r!="number",re=class r extends _{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ft(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=E.create("translator");}changeLanguage(e){e&&(this.language=e);}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return e==null?false:this.resolve(e,t)?.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ut(e,n,s);if(a&&!o){let l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return {key:e,namespaces:S(i)?[i]:i};let f=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(f[0])>-1)&&(i=f.shift()),e=f.join(s);}return {key:e,namespaces:S(i)?[i]:i}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return "";Array.isArray(e)||(e=[String(e)]);let s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],f=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(c){let O=t.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${O}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}let h=this.resolve(e,t),u=h?.res,m=h?.usedKey||a,d=h?.exactUsedKey||a,p=["[object Number]","[object Function]","[object RegExp]"],g=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,y=t.count!==void 0&&!S(t.count),b=r.hasDefaultValue(t),w=y?this.pluralResolver.getSuffix(f,t.count,t):"",L=t.ordinal&&y?this.pluralResolver.getSuffix(f,t.count,{ordinal:false}):"",I=y&&!t.ordinal&&t.count===0,$=I&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${w}`]||t[`defaultValue${L}`]||t.defaultValue,v=u;x&&!u&&b&&(v=$);let A=ze(v),Y=Object.prototype.toString.apply(v);if(x&&v&&A&&p.indexOf(Y)<0&&!(S(g)&&Array.isArray(v))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,v,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(h.res=O,h.usedParams=this.getUsedParamsDetails(t),h):O}if(i){let O=Array.isArray(v),N=O?[]:{},T=O?d:m;for(let R in v)if(Object.prototype.hasOwnProperty.call(v,R)){let D=`${T}${i}${R}`;b&&!u?N[R]=this.translate(D,{...t,defaultValue:ze($)?$[R]:void 0,joinArrays:false,ns:o}):N[R]=this.translate(D,{...t,joinArrays:false,ns:o}),N[R]===D&&(N[R]=v[R]);}u=N;}}else if(x&&S(g)&&Array.isArray(u))u=u.join(g),u&&(u=this.extendTranslation(u,e,t,n));else {let O=false,N=false;!this.isValidLookup(u)&&b&&(O=true,u=$),this.isValidLookup(u)||(N=true,u=a);let R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:u,D=b&&$!==u&&this.options.updateMissing;if(N||O||D){if(this.logger.log(D?"updateKey":"missingKey",f,l,a,D?$:u),i){let k=this.resolve(a,{...t,keySeparator:false});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");}let B=[],W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let k=0;k<W.length;k++)B.push(W[k]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(t.lng||this.language):B.push(t.lng||this.language);let we=(k,F,U)=>{let ve=b&&U!==u?U:R;this.options.missingKeyHandler?this.options.missingKeyHandler(k,l,F,ve,D,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(k,l,F,ve,D,t),this.emit("missingKey",k,l,F,u);};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?B.forEach(k=>{let F=this.pluralResolver.getSuffixes(k,t);I&&t[`defaultValue${this.options.pluralSeparator}zero`]&&F.indexOf(`${this.options.pluralSeparator}zero`)<0&&F.push(`${this.options.pluralSeparator}zero`),F.forEach(U=>{we([k],a+U,t[`defaultValue${U}`]||$);});}):we(B,a,$));}u=this.extendTranslation(u,e,t,h,n),N&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(N||O)&&this.options.parseMissingKeyHandler&&(u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,O?u:void 0));}return s?(h.res=u,h.usedParams=this.getUsedParamsDetails(t),h):u}extendTranslation(e,t,n,s,i){var a=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let f=S(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(f){let u=e.match(this.interpolator.nestingRegexp);c=u&&u.length;}let h=n.replace&&!S(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||s.usedLng,n),f){let u=e.match(this.interpolator.nestingRegexp),m=u&&u.length;c<m&&(n.nest=false);}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==false&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,m=new Array(u),d=0;d<u;d++)m[d]=arguments[d];return i?.[0]===m[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):a.translate(...m,t)},n)),n.interpolation&&this.interpolator.reset();}let o=n.postProcess||this.options.postProcess,l=S(o)?[o]:o;return e!=null&&l?.length&&n.applyPostProcessor!==false&&(e=Qe.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,i,a,o;return S(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;let f=this.extractFromKey(l,t),c=f.key;s=c;let h=f.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let u=t.count!==void 0&&!S(t.count),m=u&&!t.ordinal&&t.count===0,d=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(g=>{this.isValidLookup(n)||(o=g,!Ke[`${p[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Ke[`${p[0]}-${g}`]=true,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),p.forEach(x=>{if(this.isValidLookup(n))return;a=x;let y=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,c,x,g,t);else {let w;u&&(w=this.pluralResolver.getSuffix(x,t.count,t));let L=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(y.push(c+w),t.ordinal&&w.indexOf(I)===0&&y.push(c+w.replace(I,this.options.pluralSeparator)),m&&y.push(c+L)),d){let $=`${c}${this.options.contextSeparator}${t.context}`;y.push($),u&&(y.push($+w),t.ordinal&&w.indexOf(I)===0&&y.push($+w.replace(I,this.options.pluralSeparator)),m&&y.push($+L));}}let b;for(;b=y.pop();)this.isValidLookup(n)||(i=b,n=this.getResource(x,g,b,t));}));});}),{res:n,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!S(e.replace),s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(let i of t)delete s[i];}return s}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return true;return false}},ie=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||false,this.logger=E.create("languageUtils");}getScriptPartFromCode(e){if(e=ne(e),!e||e.indexOf("-")<0)return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=ne(e),!e||e.indexOf("-")<0)return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.indexOf("-")>-1){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.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;let s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s);}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;let s=this.getLanguagePartFromCode(n);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i});}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return [];if(typeof e=="function"&&(e=e(t)),S(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){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));};return S(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):S(e)&&i(this.formatLanguageCode(e)),n.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a));}),s}},Ge={zero:0,one:1,two:2,few:3,many:4,other:5},Je={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},me=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=E.create("pluralResolver"),this.pluralRulesCache={};}addRule(e,t){this.rules[e]=t;}clearCache(){this.pluralRulesCache={};}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ne(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:s});}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Je;if(!e.match(/-|_/))return Je;let l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t);}return this.pluralRulesCache[i]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,i)=>Ge[s]-Ge[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}},Xe=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:true,i=_t(r,e,t);return !i&&s&&S(t)&&(i=pe(r,t,n),i===void 0&&(i=pe(e,t,n))),i},de=r=>r.replace(/\$/g,"$$$$"),xe=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=E.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:true});let{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:f,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:u,nestingPrefixEscaped:m,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:x,alwaysFormat:y}=e.interpolation;this.escape=t!==void 0?t:Ht,this.escapeValue=n!==void 0?n:true,this.useRawValueToEscape=s!==void 0?s:false,this.prefix=i?M(i):a||"{{",this.suffix=o?M(o):l||"}}",this.formatSeparator=f||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?M(u):m||M("$t("),this.nestingSuffix=d?M(d):p||M(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=x||1e3,this.alwaysFormat=y!==void 0?y:false,this.resetRegExp();}reset(){this.options&&this.init(this.options);}resetRegExp(){let e=(t,n)=>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,s){let i,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=m=>{if(m.indexOf(this.formatSeparator)<0){let x=Xe(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...s,...t,interpolationkey:m}):x}let d=m.split(this.formatSeparator),p=d.shift().trim(),g=d.join(this.formatSeparator).trim();return this.format(Xe(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...s,...t,interpolationkey:p})};this.resetRegExp();let c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return [{regex:this.regexpUnescape,safeValue:m=>de(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?de(this.escape(m)):de(m)}].forEach(m=>{for(o=0;i=m.regex.exec(e);){let d=i[1].trim();if(a=f(d),a===void 0)if(typeof c=="function"){let g=c(e,i,s);a=S(g)?g:"";}else if(s&&Object.prototype.hasOwnProperty.call(s,d))a="";else if(h){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${d} for interpolating ${e}`),a="";else !S(a)&&!this.useRawValueToEscape&&(a=He(a));let p=m.safeValue(a);if(e=e.replace(i[0],p),h?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,a,o=(l,f)=>{let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let h=l.split(new RegExp(`${c}[ ]*{`)),u=`{${h[1]}`;l=h[0],u=this.interpolate(u,a);let m=u.match(/'/g),d=u.match(/"/g);((m?.length??0)%2===0&&!d||d.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),f&&(a={...f,...a});}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${c}${u}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];a={...n},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=false,delete a.defaultValue;let f=false;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){let c=s[1].split(this.formatSeparator).map(h=>h.trim());s[1]=c.shift(),l=c,f=true;}if(i=t(o.call(this,s[1].trim(),a),a),i&&s[0]===e&&!S(i))return i;S(i)||(i=He(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),f&&(i=l.reduce((c,h)=>this.format(c,h,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0;}return e}},zt=r=>{let e=r.toLowerCase().trim(),t={};if(r.indexOf("(")>-1){let n=r.split("(");e=n[0].toLowerCase().trim();let s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),f=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=f),f==="false"&&(t[c]=false),f==="true"&&(t[c]=true),isNaN(f)||(t[c]=parseInt(f,10));}});}return {formatName:e,formatOptions:t}},j=r=>{let e={};return (t,n,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});let a=n+JSON.stringify(i),o=e[a];return o||(o=r(ne(n),s),e[a]=o),o(t)}},ye=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=E.create("formatter"),this.options=e,this.formats={number:j((t,n)=>{let s=new Intl.NumberFormat(t,{...n});return i=>s.format(i)}),currency:j((t,n)=>{let s=new Intl.NumberFormat(t,{...n,style:"currency"});return i=>s.format(i)}),datetime:j((t,n)=>{let s=new Intl.DateTimeFormat(t,{...n});return i=>s.format(i)}),relativetime:j((t,n)=>{let s=new Intl.RelativeTimeFormat(t,{...n});return i=>s.format(i,n.range||"day")}),list:j((t,n)=>{let s=new Intl.ListFormat(t,{...n});return i=>s.format(i)})},this.init(e);}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";}add(e,t){this.formats[e.toLowerCase().trim()]=t;}addCached(e,t){this.formats[e.toLowerCase().trim()]=j(t);}format(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){let o=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator);}return i.reduce((o,l)=>{let{formatName:f,formatOptions:c}=zt(l);if(this.formats[f]){let h=o;try{let u=s?.formatParams?.[s.interpolationkey]||{},m=u.locale||u.lng||s.locale||s.lng||n;h=this.formats[f](o,m,{...c,...s,...u});}catch(u){this.logger.warn(u);}return h}else this.logger.warn(`there was no format function for ${f}`);return o},e)}},Gt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--);},be=class extends _{constructor(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=E.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s);}queueLoad(e,t,n,s){let i={},a={},o={},l={};return e.forEach(f=>{let c=true;t.forEach(h=>{let u=`${f}|${h}`;!n.reload&&this.store.hasResourceBundle(f,h)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=true):(this.state[u]=1,c=false,a[u]===void 0&&(a[u]=true),i[u]===void 0&&(i[u]=true),l[h]===void 0&&(l[h]=true)));}),c||(o[f]=true);}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let s=e.split("|"),i=s[0],a=s[1];t&&this.emit("failedLoading",i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:true}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(l=>{jt(l.loaded,[i],a),Gt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(f=>{o[f]||(o[f]={});let c=l.loaded[f];c.length&&c.forEach(h=>{o[f][h]===void 0&&(o[f][h]=true);});}),l.done=true,l.errors.length?l.callback(l.errors):l.callback());}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done);}read(e,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:i,callback:a});return}this.readingCalls++;let o=(f,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback);}if(f&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,i*2,a);},i);return}a(f,c);},l=this.backend[n].bind(this.backend);if(l.length===2){try{let f=l(e,t);f&&typeof f.then=="function"?f.then(c=>o(null,c)).catch(o):o(null,f);}catch(f){o(f);}return}return l(e,t,o)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);let i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a);});}load(e,t,n){this.prepareLoading(e,t,{},n);}reload(e,t,n){this.prepareLoading(e,t,{reload:true},n);}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,o),this.loaded(e,a,o);});}saveMissing(e,t,n,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.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(this.backend?.create){let l={...a,isUpdate:i},f=this.backend.create.bind(this.backend);if(f.length<6)try{let c;f.length===5?c=f(e,t,n,s,l):c=f(e,t,n,s),c&&typeof c.then=="function"?c.then(h=>o(null,h)).catch(o):o(null,c);}catch(c){o(c);}else f(e,t,n,s,o,l);}!e||!e[0]||this.store.addResource(e[0],t,n,s);}}},We=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),S(r[1])&&(e.defaultValue=r[1]),S(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){let t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n];});}return e},interpolation:{escapeValue:true,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true}}),Ze=r=>(S(r.ns)&&(r.ns=[r.ns]),S(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),S(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs?.indexOf?.("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r),ee=()=>{},Jt=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r));});},ae=class r extends _{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ze(e),this.services={},this.logger=E,this.modules={external:[]},Jt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t);},0);}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=true,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(S(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let s=We();this.options={...s,...this.options,...Ze(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);let i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?E.init(i(this.modules.logger),this.options):E.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=ye;let h=new ie(this.options);this.store=new se(this.options.resources,this.options);let u=this.services;u.logger=E,u.resourceStore=this.store,u.languageUtils=h,u.pluralResolver=new me(h,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(u.formatter=i(c),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new xe(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new be(i(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(m){for(var d=arguments.length,p=new Array(d>1?d-1:0),g=1;g<d;g++)p[g-1]=arguments[g];e.emit(m,...p);}),this.modules.languageDetector&&(u.languageDetector=i(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=i(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new re(this.services,this.options),this.translator.on("*",function(m){for(var d=arguments.length,p=new Array(d>1?d-1:0),g=1;g<d;g++)p[g-1]=arguments[g];e.emit(m,...p);}),this.modules.external.forEach(m=>{m.init&&m.init(this);});}if(this.format=this.options.interpolation.format,n||(n=ee),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let 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]=function(){return e.store[c](...arguments)};}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e};});let l=G(),f=()=>{let c=(h,u)=>{this.isInitializing=false,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=true,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(u),n(h,u);};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?f():setTimeout(f,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee,s=S(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(s?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(f=>{f!=="cimode"&&i.indexOf(f)<0&&i.push(f);});};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload?.forEach?.(o=>a(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o);});}else n(null);}reloadResources(e,t,n){let s=G();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=ee),this.services.backendConnector.reload(e,t,i=>{s.resolve(),n(i);}),s}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"&&Qe.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"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){let n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let s=G();this.emit("languageChanging",e);let i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l);},a=(l,f)=>{f?(i(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,s.resolve(function(){return n.t(...arguments)}),t&&t(l,function(){return n.t(...arguments)});},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);let f=S(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);f&&(this.language||i(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,c=>{a(c,f);});};return !e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,t,n){var s=this;let i=function(a,o){let l;if(typeof o!="object"){for(var f=arguments.length,c=new Array(f>2?f-2:0),h=2;h<f;h++)c[h-2]=arguments[h];l=s.options.overloadTranslationOptionHandler([a,o].concat(c));}else l={...o};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||i.keyPrefix);let u=s.options.keySeparator||".",m;return l.keyPrefix&&Array.isArray(a)?m=a.map(d=>`${l.keyPrefix}${u}${d}`):m=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,s.t(m,l)};return S(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e;}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),false;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),false;let n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:false,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return true;let a=(o,l)=>{let f=this.services.backendConnector.state[`${o}|${l}`];return f===-1||f===0||f===2};if(t.precheck){let o=t.precheck(this,a);if(o!==void 0)return o}return !!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!s||a(i,e)))}loadNamespaces(e,t){let n=G();return this.options.ns?(S(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s);}),this.loadResources(s=>{n.resolve(),t&&t(s);}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=G();S(e)&&(e=[e]);let s=this.options.preload||[],i=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{n.resolve(),t&&t(a);}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return "rtl";let 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=this.services?.languageUtils||new ie(We());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new r(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee,n=e.forkResourceStore;n&&delete e.forkResourceStore;let s={...this.options,...e,isClone:true},i=new r(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(o=>{i[o]=this[o];}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let o=Object.keys(this.store.data).reduce((l,f)=>(l[f]={...this.store.data[f]},Object.keys(l[f]).reduce((c,h)=>(c[h]={...l[f][h]},c),{})),{});i.store=new se(o,s),i.services.resourceStore=i.store;}return i.translator=new re(i.services,s),i.translator.on("*",function(o){for(var l=arguments.length,f=new Array(l>1?l-1:0),c=1;c<l;c++)f[c-1]=arguments[c];i.emit(o,...f);}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return {options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},P=ae.createInstance();P.createInstance=ae.createInstance;P.createInstance;P.dir;P.init;P.loadResources;P.reloadResources;P.use;P.changeLanguage;P.getFixedT;P.t;P.exists;P.setDefaultNamespace;P.hasLoadedNamespace;P.loadNamespaces;P.loadLanguages;var{slice:Xt,forEach:Wt}=[];function Zt(r){return Wt.call(Xt.call(arguments,1),e=>{if(e)for(let t in e)r[t]===void 0&&(r[t]=e[t]);}),r}function qt(r){return typeof r!="string"?false:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(r))}var et=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Qt=function(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e),i=`${r}=${s}`;if(n.maxAge>0){let a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`;}if(n.domain){if(!et.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`;}if(n.path){if(!et.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`;}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`;}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case true:i+="; SameSite=Strict";break;case "lax":i+="; SameSite=Lax";break;case "strict":i+="; SameSite=Strict";break;case "none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i},tt={create(r,e,t,n){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),n&&(s.domain=n),document.cookie=Qt(r,e,s);},read(r){let e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let s=t[n];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(r,e){this.create(r,"",-1,e);}},en={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return tt.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&tt.create(t,r,n,s,i);}},tn={name:"querystring",lookup(r){let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));let i=n.substring(1).split("&");for(let a=0;a<i.length;a++){let o=i[a].indexOf("=");o>0&&i[a].substring(0,o)===e&&(t=i[a].substring(o+1));}}return t}},nn={name:"hash",lookup(r){let{lookupHash:e,lookupFromHashIndex:t}=r,n;if(typeof window<"u"){let{hash:s}=window.location;if(s&&s.length>2){let i=s.substring(1);if(e){let a=i.split("&");for(let o=0;o<a.length;o++){let l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1));}}if(n)return n;if(!n&&t>-1){let a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return n}},V=null,nt=()=>{if(V!==null)return V;try{if(V=typeof window<"u"&&window.localStorage!==null,!V)return !1;let r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r);}catch{V=false;}return V},sn={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&nt())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&nt()&&window.localStorage.setItem(t,r);}},H=null,st=()=>{if(H!==null)return H;try{if(H=typeof window<"u"&&window.sessionStorage!==null,!H)return !1;let r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r);}catch{H=false;}return H},rn={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&st())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&st()&&window.sessionStorage.setItem(t,r);}},an={name:"navigator",lookup(r){let e=[];if(typeof navigator<"u"){let{languages:t,userLanguage:n,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);n&&e.push(n),s&&e.push(s);}return e.length>0?e:void 0}},on={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t,n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},ln={name:"path",lookup(r){let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;let t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},un={name:"subdomain",lookup(r){let{lookupFromSubdomainIndex:e}=r,t=typeof e=="number"?e+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}},rt=false;try{document.cookie,rt=!0;}catch{}var it=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];rt||it.splice(1,1);var cn=()=>({order:it,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}),X=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t);}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Zt(t,this.options||{},cn()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(en),this.addDetector(tn),this.addDetector(sn),this.addDetector(rn),this.addDetector(an),this.addDetector(on),this.addDetector(ln),this.addDetector(un),this.addDetector(nn);}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let s=this.detectors[n].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s));}}),t=t.filter(n=>n!=null&&!qt(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options);}));}};X.type="languageDetector";var at={"search...":"T\xECm ki\u1EBFm...",search:"T\xECm ki\u1EBFm",search_more:"T\xECm ki\u1EBFm th\xEAm",for:"cho",cancel:"H\u1EE7y",empty_data:"D\u1EEF li\u1EC7u tr\u1ED1ng",detail_button:"Chi ti\u1EBFt",cancel_button:"H\u1EE7y",choose:"Ch\u1ECDn",total:"T\u1ED5ng ti\u1EC1n",no:"Kh\xF4ng",loading:"\u0110ang t\u1EA3i",active:"Ho\u1EA1t \u0111\u1ED9ng",in_active:"Ng\u01B0ng ho\u1EA1t \u0111\u1ED9ng",new:"M\u1EDBi",add_line:"Th\xEAm d\xF2ng",choose_place:"Vui l\xF2ng ch\u1ECDn",filter_by:"B\u1ED9 l\u1ECDc",group_by:"Nh\xF3m theo",or:"ho\u1EB7c",second_ago:"gi\xE2y tr\u01B0\u1EDBc",minute_ago:"ph\xFAt tr\u01B0\u1EDBc",hour_ago:"gi\u1EDD tr\u01B0\u1EDBc",day_ago:"ng\xE0y tr\u01B0\u1EDBc",month_ago:"th\xE1ng tr\u01B0\u1EDBc",year_ago:"n\u0103m tr\u01B0\u1EDBc",second_future:"gi\xE2y n\u1EEFa",minute_future:"ph\xFAt n\u1EEFa",hour_future:"gi\u1EDD n\u1EEFa",day_future:"ng\xE0y n\u1EEFa",month_future:"th\xE1ng n\u1EEFa",year_future:"n\u0103m n\u1EEFa",now:"B\xE2y gi\u1EDD",download_file:"T\u1EA3i xu\u1ED1ng t\u1EC7p n\xE0y",upload_success:"T\u1EA3i t\u1EC7p l\xEAn th\xE0nh c\xF4ng",upload_failure:"T\u1EA3i t\u1EC7p l\xEAn th\u1EA5t b\u1EA1i",file_accept_single:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 m\u1ED7i t\u1EC7p c\xF3 dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 10MB.",file_accept_total:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP v\xE0 t\u1ED5ng dung l\u01B0\u1EE3ng t\u1ED1i \u0111a l\xE0 50MB.",must_required:"l\xE0 b\u1EAFt bu\u1ED9c.","none-validated":"Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7",invalid_number:"\u0110\u1ECBnh d\u1EA1ng s\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7",upload_file_placeholder:"T\u1EA3i t\u1EC7p c\u1EE7a b\u1EA1n","no-available":"Kh\xF4ng c\xF3 l\u1EF1a ch\u1ECDn n\xE0o",paid_amount:"S\u1ED1 ti\u1EC1n \u0111\xE3 tr\u1EA3",remanining_amount:"S\u1ED1 ti\u1EC1n c\xF2n l\u1EA1i",only_image_accept:"Ch\u1EC9 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn h\xECnh \u1EA3nh","text-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp ch\u1EEF (kh\xF4ng ch\u1EE9a s\u1ED1 v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","number-only":"Ch\u1EC9 \u0111\u01B0\u1EE3c nh\u1EADp s\u1ED1 (kh\xF4ng ch\u1EE9a ch\u1EEF v\xE0 k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t)","email-only":"Email kh\xF4ng h\u1EE3p l\u1EC7","phone-only":"S\u1ED1 \u0111i\u1EC7n tho\u1EA1i kh\xF4ng h\u1EE3p l\u1EC7",message:"M\u1EADt kh\u1EA9u ph\u1EA3i c\xF3 t\u1EEB {{min}} \u0111\u1EBFn {{max}} k\xFD t\u1EF1","message-text-error":" kh\xF4ng \u0111\u01B0\u1EE3c v\u01B0\u1EE3t qu\xE1 {{max}} k\xFD t\u1EF1",upcase:", {{count}} ch\u1EEF in hoa",digit:", {{count}} s\u1ED1",special:", {{count}} k\xFD t\u1EF1 \u0111\u1EB7c bi\u1EC7t",upload_files_accept:"Ch\u1EC9 ch\u1EA5p nh\u1EADn c\xE1c \u0111\u1ECBnh d\u1EA1ng JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP",show_all:"Xem t\u1EA5t c\u1EA3",upload_max_files:"B\u1EA1n ch\u1EC9 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn t\u1ED1i \u0111a 5 t\u1EADp tin v\xE0 5 \u1EA3nh",file_too_large:" M\u1ED7i file ho\u1EB7c h\xECnh \u1EA3nh dung l\u01B0\u1EE3ng t\u1ED1i \u0111a 10MB",remove_all:"X\xF3a t\u1EA5t c\u1EA3",download:"T\u1EA3i xu\u1ED1ng",please_enter:"Vui l\xF2ng nh\u1EADp"};var ot={"none-validated":"Invalid value","search...":"Search...",search:"Search",search_more:"Search more",for:"for",cancel:"Cancel",choose:"Choose",total:"Total",no:"No",loading:"Loading",detail_button:"Detail",cancel_button:"Cancel",empty_data:"No data",new:"New",add_line:"Add a line",choose_place:"Please choose",filter_by:"Filter",group_by:"Group By",or:"or",now:"Now",second_ago:"seconds ago",minute_ago:"minutes ago",hour_ago:"hours ago",day_ago:"days ago",month_ago:"months ago",year_ago:"years ago",second_future:"seconds",minute_future:"minutes",hour_future:"hours",day_future:"days",month_future:"months",year_future:"years",download_file:"Download this file",upload_success:"Upload file success",upload_failure:"Upload file failure",file_accept_single:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and each file should be up to 10MB.",file_accept_total:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed, and total should be up to 50MB.",must_required:"is required",invalid_number:"Invalid number",active:"Active",in_active:"Inactive",upload_file_placeholder:"Upload your file","no-available":"No options available",paid_amount:"Amount Paid",remanining_amount:"Amount Remaining",only_image_accept:"Only accept image","text-only":"Only letters (no numbers or special characters)","number-only":"Only enter numbers (no letters or special characters)","email-only":"Invalid email address","phone-only":"Invalid phone number",message:"Password must be between {{min}} and {{max}} characters","message-text-error":" must not exceed {{max}} characters",upcase:", {{count}} uppercase letter",digit:", {{count}} digit",special:", {{count}} special character",upload_files_accept:"Only JPEG, PNG, PDF, MP4, XLS, XLXS, ZIP, JSON formats are allowed",show_all:"Show all",upload_max_files:"You can only upload a maximum of 5 files and 5 images",file_too_large:"Image/file size exceeds the 10MB limit",remove_all:"Remove all",download:"Download",please_enter:"Please enter"};P.use(X).use(Q).init({resources:{vi:{translation:at},en:{translation:ot}},fallbackLng:"vi",lng:"vi_VN",debug:false,nonExplicitSupportedLngs:true,interpolation:{escapeValue:false},detection:{caches:["cookie"]}});var hn=createContext(null);var Se=()=>{let r=useContext(hn);if(!r)throw new Error("useI18n must be used within I18nProvider");return r};var lt=()=>{let{t:r}=Se();return {getRelativeTime:t=>{let n=[{unit:"year",seconds:31536e3,keyPast:"year_ago",keyFuture:"year_future"},{unit:"month",seconds:2592e3,keyPast:"month_ago",keyFuture:"month_future"},{unit:"day",seconds:86400,keyPast:"day_ago",keyFuture:"day_future"},{unit:"hour",seconds:3600,keyPast:"hour_ago",keyFuture:"hour_future"},{unit:"minute",seconds:60,keyPast:"minute_ago",keyFuture:"minute_future"},{unit:"second",seconds:1,keyPast:"second_ago",keyFuture:"second_future"}],s=new Date,i,a,o,l=0,f=0,c=0,h=t.split(/[- :]/).map(Number);h[0]>31?[i,a,o]=h:[o,a,i]=h,h.length>3&&([l,f,c]=h.slice(3));let u=new Date(i,a-1,o,l,f,c);l===0&&f===0&&c===0&&u.setHours(23,59,59);let m=Math.floor((u.getTime()-s.getTime())/1e3),d=m>0,p=Math.abs(m);for(let{seconds:g,keyPast:x,keyFuture:y}of n){let b=p/g;if(b>=1)return b=d?Math.ceil(b):Math.floor(b),d?`${b} ${r(y,{count:b})}`:`${b} ${r(x,{count:b})}`}return r("now")}}},ut=(r,e=false)=>{if(!r||typeof r!="string")return null;let t=r.replace(/[^0-9-\/:\s]/g,""),n="YYYY-MM-DD",s="YYYY-MM-DD HH:mm:ss",i=C().format("DD"),a=C().format("MM"),o=C().format("YYYY"),l="00:00:00",f=parseInt(o)+10,c=(d,p,g)=>C(`${d}-${p}-${g}`,"DD-MM-YYYY",true).isValid(),h=(d,p="00",g="00")=>{let x=parseInt(d,10),y=parseInt(p,10),b=parseInt(g,10);return x>=0&&x<=23&&y>=0&&y<=59&&b>=0&&b<=59},u=(d,p,g,x=l)=>{let y=C(`${d}-${p}-${g} ${x}`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?e?(y=y.subtract(7,"hours"),y.format(s)):y.format(n):null};if(e&&r.match(/^\d{1,2}[\/-]\d{1,2}[\/-]\d{2,4}\s+\d{1,2}(:\d{1,2}(:\d{1,2})?)?$/)){let[d,p]=r.split(/\s+/),g=d.split(/[\/-]/),x=p.split(":"),y=g[0].padStart(2,"0"),b=g[1].padStart(2,"0"),w=g[2].length<=2?`20${g[2].padStart(2,"0")}`:g[2].padStart(4,"0"),L=x[0].padStart(2,"0"),I=x[1]?x[1].padStart(2,"0"):"00",$=x[2]?x[2].padStart(2,"0"):"00";if(c(y,b,w)&&h(L,I,$)){let v=C(`${y}-${b}-${w} ${L}:${I}:${$}`,"DD-MM-YYYY HH:mm:ss");return v.isValid()?(v=v.subtract(7,"hours"),v.format(s)):null}return null}if(t.match(/^\d{4}-\d{2}-\d{2}$/)){let[d,p,g]=t.split("-");return c(g,p,d)?u(g,p,d):null}if(t.match(/^\d{1,2}\/\d{1,2}\/\d{2,4}$/)){let[d,p,g]=t.split("/"),x=d.padStart(2,"0"),y=p.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(x,y,b)?u(x,y,b):null}if(t.match(/^\d{1,2}-\d{1,2}-\d{2,4}$/)){let[d,p,g]=t.split("-"),x=d.padStart(2,"0"),y=p.padStart(2,"0"),b=g.length<=2?`20${g.padStart(2,"0")}`:g.padStart(4,"0");return c(x,y,b)?u(x,y,b):null}if(t.match(/^\d{1,2}[\/-]\d{1,2}$/)){let[d,p]=t.split(/[\/-]/),g=d.padStart(2,"0"),x=p.padStart(2,"0");return c(g,x,o)?u(g,x,o):null}if(t.match(/^\d{4}$/)){let d=parseInt(t,10);if(d>=2e3&&d<=f)return c(i,a,d.toString())?u(i,a,d.toString()):null;let p=t.slice(0,2),g=t.slice(2,4);return c(p,g,o)?u(p,g,o):null}if(t.startsWith("-")&&/^\-\d+$/.test(t)){let d=Math.abs(parseInt(t,10)),p=C().subtract(d,"days");return e&&(p=p.subtract(7,"hours")),p.isValid()?e?p.format(s):p.format(n):null}if(r.match(/^\d{1,2}[^0-9-\/]+\d{1,2}[^0-9-\/]+\d{2,4}.*$/)){let d=r.split(/[^0-9-\/]+/).filter(Boolean),p=d[0].padStart(2,"0"),g=d[1].padStart(2,"0"),x=d[2];return x=x.length===2?`20${x}`:x.padStart(4,"0"),c(p,g,x)?u(p,g,x):null}if(e){if(t.length===9){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,9).padStart(2,"0");if(c(d,p,g)&&h(x)){let y=C(`${d}-${p}-${g} ${x}:00:00`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?(y=y.subtract(7,"hours"),y.format(s)):null}return null}if(t.length===10){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10);if(c(d,p,g)&&h(x)){let y=C(`${d}-${p}-${g} ${x}:00:00`,"DD-MM-YYYY HH:mm:ss");return y.isValid()?(y=y.subtract(7,"hours"),y.format(s)):null}return null}if(t.length===11){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,11).padStart(2,"0");if(c(d,p,g)&&h(x,y)){let b=C(`${d}-${p}-${g} ${x}:${y}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(s)):null}return null}if(t.length===12){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12);if(c(d,p,g)&&h(x,y)){let b=C(`${d}-${p}-${g} ${x}:${y}:00`,"DD-MM-YYYY HH:mm:ss");return b.isValid()?(b=b.subtract(7,"hours"),b.format(s)):null}return null}if(t.length===13){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12),b=t.slice(12,13).padStart(2,"0");if(c(d,p,g)&&h(x,y,b)){let w=C(`${d}-${p}-${g} ${x}:${y}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(s)):null}return null}if(t.length===14){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8),x=t.slice(8,10),y=t.slice(10,12),b=t.slice(12,14);if(c(d,p,g)&&h(x,y,b)){let w=C(`${d}-${p}-${g} ${x}:${y}:${b}`,"DD-MM-YYYY HH:mm:ss");return w.isValid()?(w=w.subtract(7,"hours"),w.format(s)):null}return null}}let m=t.length;if(m===1||m===2){let d=t.padStart(2,"0");return c(d,a,o)?u(d,a,o):null}if(m===3){let d=t.slice(0,2),p=t.slice(2,3).padStart(2,"0");return c(d,p,o)?u(d,p,o):null}if(m===6){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,6);return g=`20${g}`,parseInt(p)>12?c(d,a,o)?u(d,a,o):null:c(d,p,g)?u(d,p,g):null}if(m===7)return null;if(m===8){let d=t.slice(0,2),p=t.slice(2,4),g=t.slice(4,8);return c(d,p,g)?u(d,p,g):null}return null};var ct=(r,e)=>{let t=r+e/2,n=0;for(let L=0;L<t.length;L++)n=t.charCodeAt(L)+((n<<5)-n);let s=n>>16&255,i=n>>8&255,a=n&255,o=s/255,l=i/255,f=a/255,c=Math.max(o,l,f),h=Math.min(o,l,f),u=c-h,m=0;u!==0&&(c===o?m=(l-f)/u%6:c===l?m=(f-o)/u+2:m=(o-l)/u+4),m=Math.round(m*60),m<0&&(m+=360);let d=.35,p=.92,g=.45,x=.78,y=.55,b=.32,w=(L,I,$)=>{let v=(1-Math.abs(2*$-1))*I,A=v*(1-Math.abs(L/60%2-1)),Y=$-v/2,O=0,N=0,T=0;return 0<=L&&L<60?[O,N,T]=[v,A,0]:60<=L&&L<120?[O,N,T]=[A,v,0]:120<=L&&L<180?[O,N,T]=[0,v,A]:180<=L&&L<240?[O,N,T]=[0,A,v]:240<=L&&L<300?[O,N,T]=[A,0,v]:[O,N,T]=[v,0,A],`rgb(${Math.round((O+Y)*255)}, ${Math.round((N+Y)*255)}, ${Math.round((T+Y)*255)})`};return {background:w(m,d,p),border:w(m,g,x),textColor:w(m,y,b)}};var ft=[{name:"no_color",color:"RGBA(230.1375,221.3625,221.3625,1)",id:0},{name:"red",color:"rgba(255,155.5,155.5,1)",id:1},{name:"orange",color:"RGBA(247.0375,198.06116071,152.4625,1)",id:2},{name:"yellow",color:"RGBA(252.88960843, 226.89175248, 135.61039157,1)",id:3},{name:"cyan",color:"RGBA(187.45210396, 215.03675558, 248.04789604,1)",id:4},{name:"purple",color:"RGBA(216.79194664, 167.70805336, 203.91748283,1)",id:5},{name:"almond",color:"RGBA(247.84539474, 213.9484835, 199.65460526,1)",id:6},{name:"teal",color:"RGBA(136.6125, 224.8875, 218.94591346,1)",id:7},{name:"blue",color:"RGBA(150.60535714, 165.68382711, 248.89464286,1)",id:8},{name:"raspberry",color:"RGBA(254.94583333, 157.55416667, 203.95543194,1)",id:9},{name:"green",color:"RGBA(182.62075688, 236.87924312, 189.81831118,1)",id:10},{name:"violet",color:"RGBA(230.11575613, 219.41069277, 252.08930723,1)",id:11}],dt="...",gt={FILTER:"filter_by",SEARCH:"search_by",GROUP:"group_by"};export{Pe as ACCEPT_TYPES,ue as ALLOWED_EXTS,le as ALLOWED_MIME_TYPES,ft as COLORS,dt as DOTS,gt as SearchType,Oe as checkIsImageLink,Ie as convertFloatToTime,Te as convertTimeToFloat,$e as formatFileSize,Re as formatFloatNumber,ke as formatNumberOnly,ct as generateTagColors,Ne as getFileLabel,De as getPasswordMessage,oe as isBase64Image,Ce as parseFormattedNumber,Fe as range,Ae as uppercaseFirstLetter,lt as useFormatDate,ut as validateAndParseDate,Ee as validateInput};
|
package/dist/widgets.d.mts
CHANGED
|
@@ -274,16 +274,6 @@ declare const DropdownField: <T>(props: TDropdownSelectorProps<T>) => JSX.Elemen
|
|
|
274
274
|
|
|
275
275
|
declare const FeeField: (props: IInputFieldProps) => JSX.Element;
|
|
276
276
|
|
|
277
|
-
interface IFileUploadProps extends IInputFieldProps {
|
|
278
|
-
useUploadImage?: any;
|
|
279
|
-
useUploadFile?: any;
|
|
280
|
-
useGetImage?: any;
|
|
281
|
-
isBase64File?: any;
|
|
282
|
-
downloadFunction?: (url: string, filename: string) => void;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
declare const FileUploadField: (props: IFileUploadProps) => JSX.Element;
|
|
286
|
-
|
|
287
277
|
declare const FloatField: (props: IInputFieldProps) => JSX.Element;
|
|
288
278
|
|
|
289
279
|
declare const FloatTimeField: React__default.FC<IInputFieldProps>;
|
|
@@ -492,7 +482,7 @@ declare const ModalConfirm: ({ name, isShowModal, onClick, onClose, title, conte
|
|
|
492
482
|
content?: React.ReactNode;
|
|
493
483
|
}) => JSX.Element;
|
|
494
484
|
|
|
495
|
-
declare const ModalDetail: ({
|
|
485
|
+
declare const ModalDetail: ({ title, model, idForm, aid, renderDetail, context, }: any) => React$1.ReactPortal;
|
|
496
486
|
|
|
497
487
|
declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
|
|
498
488
|
isOpen: boolean;
|
|
@@ -503,13 +493,4 @@ declare const ModalLayer: ({ isOpen, onClose, title, children, }: {
|
|
|
503
493
|
|
|
504
494
|
declare const LayerLoading: () => JSX.Element;
|
|
505
495
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
declare const ButtonSelectFiles: ({ fileInputRef, selectedFiles, setSelectedFiles, setUploadError, model, id, widget, useUploadImage, useUploadFile, env, service, user, isText, }: any) => JSX.Element;
|
|
509
|
-
|
|
510
|
-
interface VideoPlayerProps {
|
|
511
|
-
src: string;
|
|
512
|
-
}
|
|
513
|
-
declare const VideoPlayer: ({ src }: VideoPlayerProps) => JSX.Element;
|
|
514
|
-
|
|
515
|
-
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, ButtonSelectFiles, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, type CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FileUploadField, FloatField, FloatTimeField, HtmlField, type IActiveBadgeProps, type IAvatarProps, type IBinaryFieldProps, type IButtonBadgeProps, type ICharFieldProps, type IColorFieldProps, type IColorWrapperProps, type ICopyLinkButtonProps, type IDateFieldProps, type IDownLoadBinary, type IDownloadFileProps, type IDurationProps, type IFileUploadProps, type IMany2ManyTagsProps, type IMonetaryProps, type IOptionProps, type IPaginationProps, type IPriorityFieldProps, type IProviderEinvoicesProps, type IRadioGroupProps, type IRatingStarProps, type ISelectDropdownProps, type IStatusDropdownFieldProps, type IStatusSingleFieldProps, ImageField, IntegerField, type Item, LayerLoading, LoadingSmall, Login, Many2ManyField, type Many2ManyProps, Many2ManyTagField, Many2OneField, type Many2OneProps, Many2manyBinaryField, MiniQRLink, type MiniQrType, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, ProviderEinvoice, RadioGroupField, RatingStarField, RemainingDaysField, Row, Search, SecureField, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusSingle, StatusbarDurationField, type TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, UrlDownload, type UrlDownloadType, VideoPlayer, usePagination };
|
|
496
|
+
export { ActiveBadgeField, AvatarField, BinaryField, ButtonBadgeField, CharField, CheckboxField, ColorField, ColorWrapper, CopyLinkButtonField, Countdown, type CountdownProps, DateField, DateOptionField, DownLoadBinaryField, DownloadFileField, DropdownField, EmptyTable, FeeField, FloatField, FloatTimeField, HtmlField, type IActiveBadgeProps, type IAvatarProps, type IBinaryFieldProps, type IButtonBadgeProps, type ICharFieldProps, type IColorFieldProps, type IColorWrapperProps, type ICopyLinkButtonProps, type IDateFieldProps, type IDownLoadBinary, type IDownloadFileProps, type IDurationProps, type IMany2ManyTagsProps, type IMonetaryProps, type IOptionProps, type IPaginationProps, type IPriorityFieldProps, type IProviderEinvoicesProps, type IRadioGroupProps, type IRatingStarProps, type ISelectDropdownProps, type IStatusDropdownFieldProps, type IStatusSingleFieldProps, ImageField, IntegerField, type Item, LayerLoading, Login, Many2ManyField, type Many2ManyProps, Many2ManyTagField, Many2OneField, type Many2OneProps, Many2manyBinaryField, MiniQRLink, type MiniQrType, ModalConfirm, ModalDetail, ModalLayer, MonetaryField, PaginationView, PaidBadgedField, PriorityField, ProviderEinvoice, RadioGroupField, RatingStarField, RemainingDaysField, Row, Search, SecureField, SelectDropdownField, StatusBarOptionField, StatusDropdownField, StatusSingle, StatusbarDurationField, type TDropdownSelectorProps, TableBody, TableFilter, TableFooter, TableGroup, TableHead, TextAreaField, ToggleButtonField, UrlDownload, type UrlDownloadType, usePagination };
|