reslib 2.1.1 → 2.2.0
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/build/auth/index.js +1 -1
- package/build/countries/index.js +1 -1
- package/build/currency/index.js +1 -1
- package/build/currency/session.js +1 -1
- package/build/exception/index.js +2 -2
- package/build/i18n/index.js +1 -1
- package/build/inputFormatter/index.js +1 -1
- package/build/logger/index.js +1 -1
- package/build/resources/index.js +1 -1
- package/build/session/index.js +1 -1
- package/build/utils/date/dateHelper.js +1 -1
- package/build/utils/date/index.js +1 -1
- package/build/utils/index.js +1 -1
- package/build/utils/json.d.ts +13 -6
- package/build/utils/json.js +1 -1
- package/build/utils/numbers.js +1 -1
- package/build/validator/index.js +1 -1
- package/build/validator/rules/array.js +2 -2
- package/build/validator/rules/boolean.js +2 -2
- package/build/validator/rules/date.js +2 -2
- package/build/validator/rules/default.js +2 -2
- package/build/validator/rules/enum.d.ts +5 -5
- package/build/validator/rules/enum.js +1 -1
- package/build/validator/rules/file.js +2 -2
- package/build/validator/rules/format.js +1 -1
- package/build/validator/rules/index.js +3 -3
- package/build/validator/rules/multiRules.js +2 -2
- package/build/validator/rules/numeric.js +2 -2
- package/build/validator/rules/object.js +2 -2
- package/build/validator/rules/string.js +1 -1
- package/build/validator/rules/target.js +2 -2
- package/build/validator/validator.d.ts +49 -0
- package/build/validator/validator.js +2 -2
- package/package.json +253 -253
package/build/i18n/index.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
%{failedRulesErrors}`,oneOf:`The field %{fieldName} must match at least one of the following validation rules:
|
|
3
3
|
%{failedRulesErrors}`,allOf:`The field %{fieldName} must match all of the following validation rules:
|
|
4
4
|
%{failedRulesErrors}`,validateNested:`The field %{fieldName} must be a valid nested object. Errors:
|
|
5
|
-
%{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",mongoId:"This field must be a valid MongoDB ObjectId",hexadecimal:"This field must be a valid hexadecimal value",object:"This field must be an object",isObject:"This field must be an object",invalidBulkData:"Invalid bulk data: an array is required",bulkValidationFailed:{one:"Bulk validation failed: 1 of %{totalCount} items failed",other:"Bulk validation failed: %{failureCount} of %{totalCount} items failed"},bulkValidationAllFailed:{one:"Validation failed for the single item",other:"All %{totalCount} items failed validation"},bulkValidationPartialFailure:"%{failureCount} items failed validation",separators:{multiple:", ",single:", "},nestedErrors:{separator:"; ",prefix:"",suffix:""},tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var Me={auth:q,currencies:X,countries:Q,dates:_,resources:ee,validator:te};function c(t){return !!(t&&typeof t=="string")}function f(...t){for(var e in t){let i=t[e];if(c(i))return i}return ""}function V(t){return !!(t==null||typeof t=="undefined"||typeof t=="string"&&t===""||Array.isArray(t)&&!t.length)}function g(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function A(t){return !t||typeof t!="object"?false:t instanceof Date?true:typeof t.getTime!="function"?false:!(Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))}var d=class d{static parseString(e,i){if(c(e)&&c(i))try{let a=b__default.default(e,i,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:i,isValid:!0}}catch(a){}try{if(Array.isArray(i)&&(i!=null&&i.length))for(let a of i){let r=ie(e,a);if(r)return r}for(let a of d.DATE_FORMATS){let r=ie(e,a);if(r)return r}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(e){let i=e?d.parseDate(e):new Date;return i?i.toISOString():""}static isoStringToDate(e){return new Date(e)}static parseDate(e,i){if(d.isDateObj(e))return e;if(!c(i)){let a=d.parseString(e);return a!=null&&a.isValid?a.date:null}if(V(e))return null;try{let a=b__default.default(e,i,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",e," format is : ",i);}return null}static toSQLDateTimeFormat(e){if(!d.isDateObj(e))return "";let i=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0");return `${i}-${a}-${r} ${n}:${o}:${l}`}static getI18n(e){return S.isI18nInstance(e)?e:S.getInstance()}static getDefaultDateTimeFormat(e){return f(this.getI18n(e).get("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(e){return f(this.getI18n(e).get("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(e){if(!d.isDateObj(e))return "";let i=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return `${i}-${a}-${r}`}static toSQLTimeFormat(e){if(!d.isDateObj(e))return "";let i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),r=String(e.getSeconds()).padStart(2,"0");return `${i}:${a}:${r}`}static getDefaultTimeFormat(e){return f(this.getI18n(e).get("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(e,i){if(e==null||typeof e=="boolean")return false;if(d.isDateObj(e))return true;if(g(e)){let r=new Date(e);return r&&!isNaN(r.getTime())}if(c(e))return !!d.parseDate(e,i);if(e!=null&&e.toString&&(e==null?void 0:e.toString())==parseInt(e).toString())return false;let a=new Date(e);return d.isDateObj(a)}static addToDate(e,i,a){if(g(e)||(e=0),V(i)&&(i=new Date),d.isValidDate(i)&&c(i)&&(i=new Date(i)),d.isValidDate(i)||(i=c(i)?new Date(i):new Date),c(a)&&typeof i["set"+a]=="function"&&typeof i["get"+a]=="function"){let r="set"+a,n="get"+a;i=new Date(i[r](i[n]()+e));}return i}static addDays(e,i){return d.addToDate(e,i,"Date")}static addMilliseconds(e,i){return g(e)||(e=0),d.isDateObj(i)||(i=new Date),i=i||new Date,new Date(i.getTime()+e)}static addSeconds(e,i){return g(e)||(e=0),d.addMilliseconds(e*1e3,i)}static addMinutes(e,i){return g(e)||(e=0),d.addMilliseconds(e*6e4,i)}static addHours(e,i){return g(e)||(e=0),d.addMilliseconds(e*36e5,i)}static addMonths(e,i,a){return d.addToDate(e,i,"Month")}static addWeeks(e,i){return e=(g(e)?e:0)*7,d.addToDate(e,i,"Date")}static addYears(e,i){g(e)||(e=0);let a=new Date(d.addToDate(0,i)),r=a.getFullYear();return r+e<0?e=0:e+=r,a.setFullYear(e),new Date(a)}static formatDate(e,i){try{let a=b__default.default(e);if(a.isValid())return a.format(f(i,d.getDefaultDateTimeFormat()))}catch(a){}return f(d.isValidDate(e)?e==null?void 0:e.toString():"")}static getUTCDateTimeDetails(e){let i=e?b__default.default.utc(e):b__default.default.utc();return {year:i.year(),day:i.day(),month:i.month(),monthString:i.format("MM"),hours:i.hours(),date:i.date(),minutes:i.minutes(),seconds:i.seconds(),monthName:i.format("MMMM"),dayName:i.format("dddd"),dayNameShort:i.format("ddd")}}};d.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],d.SQL_DATE_FORMAT="YYYY-MM-DD",d.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",d.SQL_TIME_FORMAT="HH:mm:ss",d.getCurrentMonthDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(i.getFullYear(),i.getMonth(),1),r=new Date(i.getFullYear(),i.getMonth()+1,0);return {first:a,last:r}},d.getPreviousWeekDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(i.getTime()-3600*24*7*1e3),r=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),l=new Date(a.setDate(o)),s=new Date(r.setDate(o+6));return {first:l,last:s}},d.getCurrentWeekDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=i.getDay(),r=i.getDate()-a+(a==0?-6:1),n=new Date(i),o=new Date(i.setDate(r));return n.setDate(n.getDate()+6),{first:o,last:n}},d.isDateObj=A;var y=d,ie=(t,e)=>{let i=b__default.default(t,e,true);try{if(i.isValid()&&i.format(e)===t||b__default.default.utc(i,!0).format(e)===t)return {date:i.toDate(),matchedFormat:e,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return y.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return y.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return y.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(t){return y.formatDate(this,t)};Date.prototype.addYears=function(t){return y.addYears(t,this)};Date.prototype.addMonths=function(t){return y.addMonths(t,this)};Date.prototype.addMinutes=function(t){return y.addMinutes(t,this)};Date.prototype.addSeconds=function(t){return y.addSeconds(t,this)};Date.prototype.addDays=function(t){return y.addDays(t,this)};Date.prototype.addWeeks=function(t){return y.addWeeks(t,this)};Date.prototype.addHours=function(t){return y.addHours(t,this)};var D=class D{static get logger(){let e=Reflect.getMetadata(D.loggerMetaData,D);return ae(e)&&(this._logger=e),this._logger?this._logger:console}static set logger(e){ae(e)&&Reflect.defineMetadata(D.loggerMetaData,e,D);}static _log(e,...i){let a=D.logger;e=f(e),e&&typeof a[e]=="function"?a[e](D.getDateTimeString(),...i):console.log("Logger level not found : [",e,"]",...i);}static getDateTimeString(){let{day:e,year:i,hours:a,minutes:r,seconds:n,dayNameShort:o,monthName:l}=y.getUTCDateTimeDetails(),s=e<10?"0"+e:e,u=a<10?"0"+a:a,M=r<10?"0"+r:r,T=n<10?"0"+n:n;return "["+[o,s,l,i].join(" ")+" "+[u,M,T].join(":")+"]"}static log(...e){this._log("log",...e);}static info(...e){this._log("info",...e);}static debug(...e){this._log("debug",...e);}static warn(...e){this._log("warn",...e);}static error(...e){this._log("error",...e);}};D.loggerMetaData=Symbol("logger-meta-data");var I=D,ae=t=>{if(!t)return false;try{return ["warn","info","error"].every(e=>typeof t[e]=="function")}catch(e){return false}};function De(t){return typeof t=="boolean"||!t||typeof t=="number"||typeof t=="string"||typeof t=="symbol"?false:Object(t).constructor===Promise||t.constructor&&(t.constructor.name==="Promise"||t.constructor.name==="AsyncFunction")||t instanceof Promise||typeof(t==null?void 0:t.then)=="function"&&typeof(t==null?void 0:t.catch)=="function"&&typeof(t==null?void 0:t.finally)=="function"?true:t&&typeof t.constructor=="function"&&Function.prototype.toString.call(t.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function re(t){return t&&Object.prototype.toString.call(t)==="[object Promise]"?true:De(t)}function ne(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var R=()=>{var t;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((t=process==null?void 0:process.versions)!=null&&t.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(e){}return false},Ce=()=>{var t,e;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((t=window==null?void 0:window.process)==null?void 0:t.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((e=process.versions)!=null&&e.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Te=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(t){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(e){}}return false},be=()=>typeof window=="undefined"&&typeof process!="undefined",oe=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),Se=()=>{if(!ne()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let t=navigator.userAgent.toLowerCase();return /android/i.test(t)},Ye=()=>{var t;return !oe()||!(window!=null&&window.ReactNativeWebView)?false:typeof((t=window==null?void 0:window.ReactNativeWebView)==null?void 0:t.postMessage)=="function"},we=()=>R()&&process.platform==="darwin",Ae=()=>R()&&process.platform==="win32",Ie=()=>R()&&process.platform==="linux",se={isWeb:ne,isLinux:Ie,isDarwin:we,isWin32:Ae,isNode:R,isElectron:Ce,isTouchDevice:Te,isServerSide:be,isClientSide:oe,isAndroidMobileBrowser:Se,isReactNativeWebview:Ye};var Y=class t{static decycle(e,i=[]){if(typeof e=="function")return;if(!e||typeof e!="object")return e;if(i.includes(e))return null;let a=i.concat([e]);return Array.isArray(e)?e.map(r=>t.decycle(r,a)):Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t.decycle(n,a)]))}static stringify(e,i=false){return typeof e=="string"?e:JSON.stringify(i!==false?t.decycle(e):e)}static isJSON(e){if(typeof e!="string")return false;let i=e.trim();if(i.length===0)return false;let a=i[0];if(a!=="{"&&a!=="[")return false;try{let r=JSON.parse(i);return r!==null&&typeof r=="object"}catch(r){return false}}static parse(e,i){if(typeof e=="string")try{e=JSON.parse(e,i);}catch(a){return e}if(e&&typeof e=="object")for(let a in e){let r=e[a];t.isJSON(r)&&(e[a]=t.parse(r,i));}return e}};var C=class C{static get storage(){var i;let e=Reflect.getMetadata(C.sessionStorageMetaData,C);if(B(e)&&(this._storage=e),this._storage)return this._storage;if(se.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((i=window.localStorage)!=null&&i.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,r)=>window.localStorage.setItem(a,r),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:r=>a[r],set:(r,n)=>a[r]=n,remove:r=>{delete a[r];},removeAll:()=>a={}};}return this._storage}static set storage(e){B(e)&&Reflect.defineMetadata(C.sessionStorageMetaData,e,C);}static get keyNamespace(){return c(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(e){c(e)&&(this._keyNamespace=e.trim().replace(/\s+/g,"-"));}static sanitizeKey(e){if(!e||!c(e))return "";e=e.trim().replace(/\s+/g,"-");let i=this.keyNamespace;return i?`${i}-${e}`:e}};C.sessionStorageMetaData=Symbol("sessionStorage"),C._keyNamespace=void 0;var h=C;function H(t){return h.sanitizeKey(t)}var de=(t,e)=>(t=t&&Y.stringify(t,e),t==null&&(t=""),t),le=t=>{if(re(t))return new Promise((e,i)=>{t.then(a=>{e(Y.parse(a));}).catch(a=>{i(a);});});if(t!=null)return Y.parse(t)},Ne=t=>{if(t=H(t),h.storage&&t&&typeof t=="string"){let e=h.storage.get(t);return le(e)}},ve=t=>{if(t=H(t),h.storage&&t&&typeof t=="string")return h.storage.remove(t)},Le=()=>{if(h.storage)return h.storage.removeAll()},B=t=>{if(!t)return false;try{return ["get","set","remove","removeAll"].every(e=>typeof t[e]=="function")}catch(e){return false}},W={get:Ne,set:(t,e,i=true)=>(t=H(t),h.storage.set(t,de(e,i))),remove:ve,handleGetValue:le,sanitizeKey:H,handleSetValue:de,isValidStorage:B,Manager:h,removeAll:Le};function N(t){return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"}function v(t){if(t instanceof RegExp)return true;if(!t||typeof t!="object"||!Object.prototype.toString.call(t).includes("RegExp"))return false;try{return new RegExp(t),!0}catch(e){return false}}function j(t){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:t===document?true:"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&typeof t=="object"&&t.nodeType===1&&!!t.nodeName}function m(t){if(t===null||typeof t!="object"||j(t)||A(t)||v(t)||N(t))return false;let e=Object.getPrototypeOf(t);if(e===null)return true;let i=e.constructor;if(typeof i!="function")return false;if(i===Object)return true;let a=i.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof e.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")&&typeof e.isPrototypeOf=="function"}function U(t){if(Array.isArray(t)){let a=[];for(var e=0;e<t.length;e++)a[e]=U(t[e]);return a}else if(m(t)&&t){let a={};for(var i in t)t.hasOwnProperty(i)&&(a[i]=U(t[i]));return a}else return t}Object.getSize=function(t,e=false){if(!t||typeof t!="object")return 0;if(Array.isArray(t))return t.length;typeof e!="boolean"&&(e=false);let i=0;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&(i++,e===true))return i;return i};function w(t,...e){let i=Array.isArray(t),a=m(t);(t==null||!i&&!a)&&(t={});for(let r=0;r<e.length;r++){let n=e[r];if(n==null)continue;let o=m(n),l=Array.isArray(n);if(!(!o&&!l)){if(i){l&&ce(t,n);continue}else if(l)continue;for(let s in n){let u=n[s];if(u==null)continue;if(u===n){t[s]=t;continue}let M=t[s],T=Array.isArray(M),O=Array.isArray(u);if(T){O?ce(t[s],u):t[s]=u;continue}else if(!m(M)){t[s]=u;continue}if(O||!m(u)){t[s]=u;continue}t[s]=w({},M,u);}}}return t}var ce=(t,e)=>{let i=e.length,a=0;for(let r=0;r<t.length;r++){let n=t[r],o=e[r];if(r<i){let l=Array.isArray(n),s=Array.isArray(o),u=m(n),M=m(o);l&&s||u&&M?(t[a]=w(l?[]:{},n,o),a++):o!=null?(t[a]=o,a++):n!=null&&(t[a]=n,a++);}}for(let r=t.length;r<i;r++)e[r]!==void 0&&e[r]!==null&&t.push(e[r]);return t};function E(t,e){return x(t,"",{},e)}function x(t,e="",i={},a){if(i=m(i)?i:{},N(t)||A(t)||v(t)||Array.isArray(t)&&(a!=null&&a.skipArrays))return e&&(i[e]=t),i;if(typeof t=="function"||typeof t=="object"&&!m(t)&&!Oe(t))return i;if(t instanceof Map||t instanceof WeakMap)return Array.from(t.entries()).forEach(([r,n])=>{let o=e?`${e}[${String(r)}]`:String(r);x(n,o,i,a);}),i;if(Array.isArray(t)||t instanceof Set||t instanceof WeakSet)return (Array.isArray(t)?t:Array.from(t)).forEach((n,o)=>{let l=e?`${e}[${o}]`:String(o);x(n,l,i,a);}),i;if(m(t))for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=t[r],o=e?e.endsWith("]")?`${e}.${r}`:`${e}.${r}`:r;x(n,o,i,a);}return i}function Oe(t){return Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof WeakMap||t instanceof WeakSet}function Pe(t){return Object.entries(t)}Object.typedEntries=Pe;Object.flatten=E;Object.clone=U;function L(t,e){if(t==null)return "";if(typeof t=="string")return t;if((typeof t=="number"||typeof t=="object"&&t instanceof Number)&&typeof t.formatNumber=="function")return t.formatNumber();if(t instanceof Date||typeof t=="object"&&t!==null&&t.constructor===Date)return typeof t.toFormat=="function"?t.toFormat():t.toISOString();if(t instanceof Error)return `Error: ${t.message}`;if(v(t))return t.toString();if(N(t))return String(t);if(Array.isArray(t))return JSON.stringify(t);if(typeof t=="object"&&t!==null){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString();if(typeof t.toString=="function"){let i=t.toString();if(i!=="[object Object]")return i}return JSON.stringify(t)}return typeof(t==null?void 0:t.toString)=="function"?t.toString():String(t)}function ue(t,e,i){let a=(i==null?void 0:i.valueFormatter)||L,r=f(t);if(!m(e)||!e)return r;let n=(i==null?void 0:i.tagRegex)||/%\{([^}]+)\}/g,o=new Set,l,s=f(t);for(;(l=n.exec(s))!==null;){let u=l[1];u!==void 0&&o.add(u);}return o.forEach(u=>{if(i!=null&&i.tagRegex){let z=new RegExp(i.tagRegex.source,i.tagRegex.flags);[...s.matchAll(z)].forEach(F=>{let fe=F[0];if(!F[1])return;let P=F[1],k=Object.prototype.hasOwnProperty.call(e,P)?e[P]:void 0,ye=k===void 0?"":(()=>{try{return a(k,P,L)}catch(xe){return L(k)}})(),pe=fe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp(pe,"g"),ye);});return}let M=`%{${u}}`,T=Object.prototype.hasOwnProperty.call(e,u)?e[u]:void 0,O=T===void 0?"":(()=>{try{return a(T,u,L)}catch(z){return L(T)}})(),me=M.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp(me,"g"),O);}),r}var p=class p{constructor(e={},i={}){this.locale="en";this._locales=["en"];this._fallbackLocale="en";this._translations={};this.namespaceResolvers={};this._namespacesLoaded={};this._hasDefaultTranslations=false;c(i.locale)&&(this.locale=i.locale),c(i.fallbackLocale)&&(this._fallbackLocale=i.fallbackLocale),typeof i.interpolate=="function"&&(this.interpolateFunc=i.interpolate),this._hasDefaultTranslations||(this.registerTranslations(K),this._hasDefaultTranslations=true),e&&this.registerTranslations(e),this.loadNamespaces();}static[Symbol.hasInstance](e){return this.isI18nInstance(e)}static isI18nInstance(e){return !e||typeof e!="object"?false:e.constructor&&e.constructor.name==="I18n"?true:typeof e.getLocale=="function"&&typeof e.translate=="function"&&typeof e.translateClass=="function"&&typeof e.registerTranslations=="function"&&typeof e.loadNamespace=="function"&&typeof e.registerNamespaceResolver=="function"}static getInstance(e){if(!p.instance){let i=p.getLocaleFromSession(),a=Object.assign({locale:i||"en"},e);p.instance=new p({},a);}return p.instance}static createInstance(e={},i={}){return new p(e,i)}static flattenObject(e){return m(e)?E(e):e}static getLocaleFromSession(){let e=W.get("i18n.locale");return c(e)?e:void 0}static registerMomentLocale(e,i){return c(e)&&m(i)&&Array.isArray(i.months)&&(this.momentLocales[e]=w({},this.momentLocales[e],i)),this.momentLocales}static getClassTanslationKeys(e){return $(e,Z)}translate(e,i){var o;i=i||{};let a=f(i==null?void 0:i.locale,this.getLocale()),r=Array.isArray(e)?e:[e],n;for(let l of r){if(!c(l))continue;let s=this.lookup(l,a);if(s===void 0&&a!==this._fallbackLocale&&(s=this.lookup(l,this._fallbackLocale)),s!==void 0){n=s;break}}if(n===void 0)return i.defaultValue!==void 0?i.defaultValue:this.missingTranslation(e,i);if(typeof i.count=="number"&&m(n)){let l=i.count,s="other";l===0&&n.zero!==void 0?s="zero":l===1&&n.one!==void 0&&(s="one"),n[s]!==void 0?n=n[s]:n.other&&(n=n.other);}return typeof n=="string"&&(g(i.count)&&!i.countStr&&(i.countStr=typeof((o=i.count)==null?void 0:o.formatNumber)=="function"?i.count.formatNumber():i.count.toString()),n=this.performInterpolation(n,i)),n}t(e,i){return this.translate(e,i)}has(e,i){let a=i||this.getLocale(),r=Array.isArray(e)?e:[e];for(let n of r)if(this.lookup(n,a)!==void 0)return true;return false}getLocale(){return this.locale}setLocale(e,i=false){return G(this,null,function*(){return this.locale===e&&i!==true&&this._namespacesLoaded[e]?this.locale:(yield this.loadNamespaces(e),this.locale=e,this.isDefaultInstance()&&p.setLocaleToSession(e),this.setMomentLocale(e),this.locale)})}setLocales(e){return this._locales=Array.isArray(e)?e:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}getLocales(){let e=Object.keys(this._translations),i=Array.isArray(this._locales)?this._locales:["en"],a=[...e,...i.filter(r=>!e.includes(r))];return Array.from(new Set(a))}hasLocale(e){return c(e)&&this.getLocales().includes(e)}isDefaultInstance(){return this===p.instance}registerTranslations(e){return this._translations=w({},this._translations,e),this._translations}getTranslations(e){return c(e)?this._translations[e]||{}:this._translations}registerNamespaceResolver(e,i){if(!c(e)||typeof i!="function"){console.warn("Invalid arguments for registerNamespaceResolver.");return}this.namespaceResolvers[e]=i;}loadNamespace(e,i,a=true){return !c(e)||!this.namespaceResolvers[e]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${e}".`)):(i=f(i,this.getLocale()),c(i)?this.namespaceResolvers[e](i).then(r=>{let n={};return n[i]=Object.assign({},r),m(r)&&a!==false&&this.registerTranslations(n),n}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${e}".`)))}loadNamespaces(e,i=true){return G(this,null,function*(){e=f(e,this.getLocale());let a=[],r={};for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&a.push(this.namespaceResolvers[o](e).then(l=>{w(r,l);}));yield Promise.all(a);let n={};return n[e]=r,i!==false&&this.registerTranslations(n),this._namespacesLoaded[e]=true,n})}get(e,i){i=f(i,this.getLocale());let a=(c(e)?e.trim().split("."):Array.isArray(e)?e:[]).filter(c);if(!a.length)return;let r=this.getTranslations(i);for(let n of a)if(m(r))r=r[n];else return;return r}translateClass(e,i){let a=p.getClassTanslationKeys(e);for(let r in a)c(a[r])&&(a[r]=this.translate(a[r],i));return a}translateObject(e,i){if(!m(e))return {};let a={};for(let r in e){let n=e[r];c(n)&&(a[r]=this.translate(n,i));}return a}applyTranslations(e){try{let i=Object.getOwnPropertyNames(e);for(let a of i){let r=Reflect.getMetadata(Z,e,a);if(r)try{e[a]=this.translate(r);}catch(n){I.error(n," resolving translation for key : ",r," on object : ",e);}}}catch(i){I.error(i," resolving translations for object : ",e);}}missingTranslation(e,i){let a=f(Array.isArray(e)?e.filter(c)[0]:f(e));return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,a,f(i==null?void 0:i.defaultValue),i):a}lookup(e,i){let a=this._translations[i];if(!a)return;if(Object.prototype.hasOwnProperty.call(a,e))return a[e];let r=e.split("."),n=a;for(let o of r)if(m(n)&&Object.prototype.hasOwnProperty.call(n,o))n=n[o];else return;return n}performInterpolation(e,i){let a=E(i);return this.interpolateFunc?this.interpolateFunc(this,e,i):this.defaultInterpolator(e,a)}defaultInterpolator(e,i){return ue(e,i,{tagRegex:/%\{([^}]+)\}/g})}static setLocaleToSession(e){W.set("i18n.locale",e);}getMomentLocale(e){return p.momentLocales[e]}setMomentLocale(e){try{return b__default.default.updateLocale(e,this.getMomentLocale(e)),!0}catch(i){console.error(i," setting moment locale : ",e);}return false}};p.momentLocales={};var S=p,ei=S.getInstance();var Z=Symbol("TRANSLATION_KEY");function ti(t){return J(Z,t)}exports.I18n=S;exports.Translate=ti;exports.i18n=ei;
|
|
5
|
+
%{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",mongoId:"This field must be a valid MongoDB ObjectId",hexadecimal:"This field must be a valid hexadecimal value",object:"This field must be an object",isObject:"This field must be an object",invalidBulkData:"Invalid bulk data: an array is required",bulkValidationFailed:{one:"Bulk validation failed: 1 of %{totalCount} items failed",other:"Bulk validation failed: %{failureCount} of %{totalCount} items failed"},bulkValidationAllFailed:{one:"Validation failed for the single item",other:"All %{totalCount} items failed validation"},bulkValidationPartialFailure:"%{failureCount} items failed validation",separators:{multiple:", ",single:", "},nestedErrors:{separator:"; ",prefix:"",suffix:""},tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var Me={auth:q,currencies:X,countries:Q,dates:_,resources:ee,validator:te};function c(t){return !!(t&&typeof t=="string")}function f(...t){for(var e in t){let i=t[e];if(c(i))return i}return ""}function V(t){return !!(t==null||typeof t=="undefined"||typeof t=="string"&&t===""||Array.isArray(t)&&!t.length)}function g(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function A(t){return !t||typeof t!="object"?false:t instanceof Date?true:typeof t.getTime!="function"?false:!(Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))}var d=class d{static parseString(e,i){if(c(e)&&c(i))try{let a=b__default.default(e,i,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:i,isValid:!0}}catch(a){}try{if(Array.isArray(i)&&(i!=null&&i.length))for(let a of i){let r=ie(e,a);if(r)return r}for(let a of d.DATE_FORMATS){let r=ie(e,a);if(r)return r}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(e){let i=e?d.parseDate(e):new Date;return i?i.toISOString():""}static isoStringToDate(e){return new Date(e)}static parseDate(e,i){if(d.isDateObj(e))return e;if(!c(i)){let a=d.parseString(e);return a!=null&&a.isValid?a.date:null}if(V(e))return null;try{let a=b__default.default(e,i,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",e," format is : ",i);}return null}static toSQLDateTimeFormat(e){if(!d.isDateObj(e))return "";let i=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),l=String(e.getSeconds()).padStart(2,"0");return `${i}-${a}-${r} ${n}:${o}:${l}`}static getI18n(e){return S.isI18nInstance(e)?e:S.getInstance()}static getDefaultDateTimeFormat(e){return f(this.getI18n(e).get("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(e){return f(this.getI18n(e).get("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(e){if(!d.isDateObj(e))return "";let i=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return `${i}-${a}-${r}`}static toSQLTimeFormat(e){if(!d.isDateObj(e))return "";let i=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),r=String(e.getSeconds()).padStart(2,"0");return `${i}:${a}:${r}`}static getDefaultTimeFormat(e){return f(this.getI18n(e).get("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(e,i){if(e==null||typeof e=="boolean")return false;if(d.isDateObj(e))return true;if(g(e)){let r=new Date(e);return r&&!isNaN(r.getTime())}if(c(e))return !!d.parseDate(e,i);if(e!=null&&e.toString&&(e==null?void 0:e.toString())==parseInt(e).toString())return false;let a=new Date(e);return d.isDateObj(a)}static addToDate(e,i,a){if(g(e)||(e=0),V(i)&&(i=new Date),d.isValidDate(i)&&c(i)&&(i=new Date(i)),d.isValidDate(i)||(i=c(i)?new Date(i):new Date),c(a)&&typeof i["set"+a]=="function"&&typeof i["get"+a]=="function"){let r="set"+a,n="get"+a;i=new Date(i[r](i[n]()+e));}return i}static addDays(e,i){return d.addToDate(e,i,"Date")}static addMilliseconds(e,i){return g(e)||(e=0),d.isDateObj(i)||(i=new Date),i=i||new Date,new Date(i.getTime()+e)}static addSeconds(e,i){return g(e)||(e=0),d.addMilliseconds(e*1e3,i)}static addMinutes(e,i){return g(e)||(e=0),d.addMilliseconds(e*6e4,i)}static addHours(e,i){return g(e)||(e=0),d.addMilliseconds(e*36e5,i)}static addMonths(e,i,a){return d.addToDate(e,i,"Month")}static addWeeks(e,i){return e=(g(e)?e:0)*7,d.addToDate(e,i,"Date")}static addYears(e,i){g(e)||(e=0);let a=new Date(d.addToDate(0,i)),r=a.getFullYear();return r+e<0?e=0:e+=r,a.setFullYear(e),new Date(a)}static formatDate(e,i){try{let a=b__default.default(e);if(a.isValid())return a.format(f(i,d.getDefaultDateTimeFormat()))}catch(a){}return f(d.isValidDate(e)?e==null?void 0:e.toString():"")}static getUTCDateTimeDetails(e){let i=e?b__default.default.utc(e):b__default.default.utc();return {year:i.year(),day:i.day(),month:i.month(),monthString:i.format("MM"),hours:i.hours(),date:i.date(),minutes:i.minutes(),seconds:i.seconds(),monthName:i.format("MMMM"),dayName:i.format("dddd"),dayNameShort:i.format("ddd")}}};d.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],d.SQL_DATE_FORMAT="YYYY-MM-DD",d.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",d.SQL_TIME_FORMAT="HH:mm:ss",d.getCurrentMonthDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(i.getFullYear(),i.getMonth(),1),r=new Date(i.getFullYear(),i.getMonth()+1,0);return {first:a,last:r}},d.getPreviousWeekDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(i.getTime()-3600*24*7*1e3),r=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),l=new Date(a.setDate(o)),s=new Date(r.setDate(o+6));return {first:l,last:s}},d.getCurrentWeekDaysRange=e=>{let i=d.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=i.getDay(),r=i.getDate()-a+(a==0?-6:1),n=new Date(i),o=new Date(i.setDate(r));return n.setDate(n.getDate()+6),{first:o,last:n}},d.isDateObj=A;var y=d,ie=(t,e)=>{let i=b__default.default(t,e,true);try{if(i.isValid()&&i.format(e)===t||b__default.default.utc(i,!0).format(e)===t)return {date:i.toDate(),matchedFormat:e,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return y.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return y.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return y.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(t){return y.formatDate(this,t)};Date.prototype.addYears=function(t){return y.addYears(t,this)};Date.prototype.addMonths=function(t){return y.addMonths(t,this)};Date.prototype.addMinutes=function(t){return y.addMinutes(t,this)};Date.prototype.addSeconds=function(t){return y.addSeconds(t,this)};Date.prototype.addDays=function(t){return y.addDays(t,this)};Date.prototype.addWeeks=function(t){return y.addWeeks(t,this)};Date.prototype.addHours=function(t){return y.addHours(t,this)};var D=class D{static get logger(){let e=Reflect.getMetadata(D.loggerMetaData,D);return ae(e)&&(this._logger=e),this._logger?this._logger:console}static set logger(e){ae(e)&&Reflect.defineMetadata(D.loggerMetaData,e,D);}static _log(e,...i){let a=D.logger;e=f(e),e&&typeof a[e]=="function"?a[e](D.getDateTimeString(),...i):console.log("Logger level not found : [",e,"]",...i);}static getDateTimeString(){let{day:e,year:i,hours:a,minutes:r,seconds:n,dayNameShort:o,monthName:l}=y.getUTCDateTimeDetails(),s=e<10?"0"+e:e,u=a<10?"0"+a:a,M=r<10?"0"+r:r,T=n<10?"0"+n:n;return "["+[o,s,l,i].join(" ")+" "+[u,M,T].join(":")+"]"}static log(...e){this._log("log",...e);}static info(...e){this._log("info",...e);}static debug(...e){this._log("debug",...e);}static warn(...e){this._log("warn",...e);}static error(...e){this._log("error",...e);}};D.loggerMetaData=Symbol("logger-meta-data");var I=D,ae=t=>{if(!t)return false;try{return ["warn","info","error"].every(e=>typeof t[e]=="function")}catch(e){return false}};function De(t){return typeof t=="boolean"||!t||typeof t=="number"||typeof t=="string"||typeof t=="symbol"?false:Object(t).constructor===Promise||t.constructor&&(t.constructor.name==="Promise"||t.constructor.name==="AsyncFunction")||t instanceof Promise||typeof(t==null?void 0:t.then)=="function"&&typeof(t==null?void 0:t.catch)=="function"&&typeof(t==null?void 0:t.finally)=="function"?true:t&&typeof t.constructor=="function"&&Function.prototype.toString.call(t.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function re(t){return t&&Object.prototype.toString.call(t)==="[object Promise]"?true:De(t)}function ne(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var R=()=>{var t;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((t=process==null?void 0:process.versions)!=null&&t.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(e){}return false},Ce=()=>{var t,e;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((t=window==null?void 0:window.process)==null?void 0:t.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((e=process.versions)!=null&&e.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Te=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(t){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(e){}}return false},be=()=>typeof window=="undefined"&&typeof process!="undefined",oe=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),Se=()=>{if(!ne()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let t=navigator.userAgent.toLowerCase();return /android/i.test(t)},Ye=()=>{var t;return !oe()||!(window!=null&&window.ReactNativeWebView)?false:typeof((t=window==null?void 0:window.ReactNativeWebView)==null?void 0:t.postMessage)=="function"},we=()=>R()&&process.platform==="darwin",Ae=()=>R()&&process.platform==="win32",Ie=()=>R()&&process.platform==="linux",se={isWeb:ne,isLinux:Ie,isDarwin:we,isWin32:Ae,isNode:R,isElectron:Ce,isTouchDevice:Te,isServerSide:be,isClientSide:oe,isAndroidMobileBrowser:Se,isReactNativeWebview:Ye};var Y=class t{static decycle(e,i=[]){if(typeof e=="function")return;if(!e||typeof e!="object")return e;if(i.includes(e))return null;let a=i.concat([e]);return Array.isArray(e)?e.map(r=>t.decycle(r,a)):Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t.decycle(n,a)]))}static stringify(e,i=false,a,r){return typeof e=="string"?e:JSON.stringify(i!==false?t.decycle(e):e,a,r)}static isJSON(e){if(typeof e!="string")return false;let i=e.trim();if(i.length===0)return false;let a=i[0];if(a!=="{"&&a!=="[")return false;try{let r=JSON.parse(i);return r!==null&&typeof r=="object"}catch(r){return false}}static parse(e,i){if(typeof e=="string")try{e=JSON.parse(e,i);}catch(a){return e}if(e&&typeof e=="object")for(let a in e){let r=e[a];t.isJSON(r)&&(e[a]=t.parse(r,i));}return e}};var C=class C{static get storage(){var i;let e=Reflect.getMetadata(C.sessionStorageMetaData,C);if(B(e)&&(this._storage=e),this._storage)return this._storage;if(se.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((i=window.localStorage)!=null&&i.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,r)=>window.localStorage.setItem(a,r),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:r=>a[r],set:(r,n)=>a[r]=n,remove:r=>{delete a[r];},removeAll:()=>a={}};}return this._storage}static set storage(e){B(e)&&Reflect.defineMetadata(C.sessionStorageMetaData,e,C);}static get keyNamespace(){return c(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(e){c(e)&&(this._keyNamespace=e.trim().replace(/\s+/g,"-"));}static sanitizeKey(e){if(!e||!c(e))return "";e=e.trim().replace(/\s+/g,"-");let i=this.keyNamespace;return i?`${i}-${e}`:e}};C.sessionStorageMetaData=Symbol("sessionStorage"),C._keyNamespace=void 0;var h=C;function H(t){return h.sanitizeKey(t)}var de=(t,e)=>(t=t&&Y.stringify(t,e),t==null&&(t=""),t),le=t=>{if(re(t))return new Promise((e,i)=>{t.then(a=>{e(Y.parse(a));}).catch(a=>{i(a);});});if(t!=null)return Y.parse(t)},Ne=t=>{if(t=H(t),h.storage&&t&&typeof t=="string"){let e=h.storage.get(t);return le(e)}},ve=t=>{if(t=H(t),h.storage&&t&&typeof t=="string")return h.storage.remove(t)},Le=()=>{if(h.storage)return h.storage.removeAll()},B=t=>{if(!t)return false;try{return ["get","set","remove","removeAll"].every(e=>typeof t[e]=="function")}catch(e){return false}},W={get:Ne,set:(t,e,i=true)=>(t=H(t),h.storage.set(t,de(e,i))),remove:ve,handleGetValue:le,sanitizeKey:H,handleSetValue:de,isValidStorage:B,Manager:h,removeAll:Le};function N(t){return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"}function v(t){if(t instanceof RegExp)return true;if(!t||typeof t!="object"||!Object.prototype.toString.call(t).includes("RegExp"))return false;try{return new RegExp(t),!0}catch(e){return false}}function j(t){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:t===document?true:"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&typeof t=="object"&&t.nodeType===1&&!!t.nodeName}function m(t){if(t===null||typeof t!="object"||j(t)||A(t)||v(t)||N(t))return false;let e=Object.getPrototypeOf(t);if(e===null)return true;let i=e.constructor;if(typeof i!="function")return false;if(i===Object)return true;let a=i.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof e.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")&&typeof e.isPrototypeOf=="function"}function U(t){if(Array.isArray(t)){let a=[];for(var e=0;e<t.length;e++)a[e]=U(t[e]);return a}else if(m(t)&&t){let a={};for(var i in t)t.hasOwnProperty(i)&&(a[i]=U(t[i]));return a}else return t}Object.getSize=function(t,e=false){if(!t||typeof t!="object")return 0;if(Array.isArray(t))return t.length;typeof e!="boolean"&&(e=false);let i=0;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&(i++,e===true))return i;return i};function w(t,...e){let i=Array.isArray(t),a=m(t);(t==null||!i&&!a)&&(t={});for(let r=0;r<e.length;r++){let n=e[r];if(n==null)continue;let o=m(n),l=Array.isArray(n);if(!(!o&&!l)){if(i){l&&ce(t,n);continue}else if(l)continue;for(let s in n){let u=n[s];if(u==null)continue;if(u===n){t[s]=t;continue}let M=t[s],T=Array.isArray(M),O=Array.isArray(u);if(T){O?ce(t[s],u):t[s]=u;continue}else if(!m(M)){t[s]=u;continue}if(O||!m(u)){t[s]=u;continue}t[s]=w({},M,u);}}}return t}var ce=(t,e)=>{let i=e.length,a=0;for(let r=0;r<t.length;r++){let n=t[r],o=e[r];if(r<i){let l=Array.isArray(n),s=Array.isArray(o),u=m(n),M=m(o);l&&s||u&&M?(t[a]=w(l?[]:{},n,o),a++):o!=null?(t[a]=o,a++):n!=null&&(t[a]=n,a++);}}for(let r=t.length;r<i;r++)e[r]!==void 0&&e[r]!==null&&t.push(e[r]);return t};function E(t,e){return x(t,"",{},e)}function x(t,e="",i={},a){if(i=m(i)?i:{},N(t)||A(t)||v(t)||Array.isArray(t)&&(a!=null&&a.skipArrays))return e&&(i[e]=t),i;if(typeof t=="function"||typeof t=="object"&&!m(t)&&!Oe(t))return i;if(t instanceof Map||t instanceof WeakMap)return Array.from(t.entries()).forEach(([r,n])=>{let o=e?`${e}[${String(r)}]`:String(r);x(n,o,i,a);}),i;if(Array.isArray(t)||t instanceof Set||t instanceof WeakSet)return (Array.isArray(t)?t:Array.from(t)).forEach((n,o)=>{let l=e?`${e}[${o}]`:String(o);x(n,l,i,a);}),i;if(m(t))for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=t[r],o=e?e.endsWith("]")?`${e}.${r}`:`${e}.${r}`:r;x(n,o,i,a);}return i}function Oe(t){return Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof WeakMap||t instanceof WeakSet}function Pe(t){return Object.entries(t)}Object.typedEntries=Pe;Object.flatten=E;Object.clone=U;function L(t,e){if(t==null)return "";if(typeof t=="string")return t;if((typeof t=="number"||typeof t=="object"&&t instanceof Number)&&typeof t.formatNumber=="function")return t.formatNumber();if(t instanceof Date||typeof t=="object"&&t!==null&&t.constructor===Date)return typeof t.toFormat=="function"?t.toFormat():t.toISOString();if(t instanceof Error)return `Error: ${t.message}`;if(v(t))return t.toString();if(N(t))return String(t);if(Array.isArray(t))return JSON.stringify(t);if(typeof t=="object"&&t!==null){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString();if(typeof t.toString=="function"){let i=t.toString();if(i!=="[object Object]")return i}return JSON.stringify(t)}return typeof(t==null?void 0:t.toString)=="function"?t.toString():String(t)}function ue(t,e,i){let a=(i==null?void 0:i.valueFormatter)||L,r=f(t);if(!m(e)||!e)return r;let n=(i==null?void 0:i.tagRegex)||/%\{([^}]+)\}/g,o=new Set,l,s=f(t);for(;(l=n.exec(s))!==null;){let u=l[1];u!==void 0&&o.add(u);}return o.forEach(u=>{if(i!=null&&i.tagRegex){let z=new RegExp(i.tagRegex.source,i.tagRegex.flags);[...s.matchAll(z)].forEach(F=>{let fe=F[0];if(!F[1])return;let P=F[1],k=Object.prototype.hasOwnProperty.call(e,P)?e[P]:void 0,ye=k===void 0?"":(()=>{try{return a(k,P,L)}catch(xe){return L(k)}})(),pe=fe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp(pe,"g"),ye);});return}let M=`%{${u}}`,T=Object.prototype.hasOwnProperty.call(e,u)?e[u]:void 0,O=T===void 0?"":(()=>{try{return a(T,u,L)}catch(z){return L(T)}})(),me=M.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r=r.replace(new RegExp(me,"g"),O);}),r}var p=class p{constructor(e={},i={}){this.locale="en";this._locales=["en"];this._fallbackLocale="en";this._translations={};this.namespaceResolvers={};this._namespacesLoaded={};this._hasDefaultTranslations=false;c(i.locale)&&(this.locale=i.locale),c(i.fallbackLocale)&&(this._fallbackLocale=i.fallbackLocale),typeof i.interpolate=="function"&&(this.interpolateFunc=i.interpolate),this._hasDefaultTranslations||(this.registerTranslations(K),this._hasDefaultTranslations=true),e&&this.registerTranslations(e),this.loadNamespaces();}static[Symbol.hasInstance](e){return this.isI18nInstance(e)}static isI18nInstance(e){return !e||typeof e!="object"?false:e.constructor&&e.constructor.name==="I18n"?true:typeof e.getLocale=="function"&&typeof e.translate=="function"&&typeof e.translateClass=="function"&&typeof e.registerTranslations=="function"&&typeof e.loadNamespace=="function"&&typeof e.registerNamespaceResolver=="function"}static getInstance(e){if(!p.instance){let i=p.getLocaleFromSession(),a=Object.assign({locale:i||"en"},e);p.instance=new p({},a);}return p.instance}static createInstance(e={},i={}){return new p(e,i)}static flattenObject(e){return m(e)?E(e):e}static getLocaleFromSession(){let e=W.get("i18n.locale");return c(e)?e:void 0}static registerMomentLocale(e,i){return c(e)&&m(i)&&Array.isArray(i.months)&&(this.momentLocales[e]=w({},this.momentLocales[e],i)),this.momentLocales}static getClassTanslationKeys(e){return $(e,Z)}translate(e,i){var o;i=i||{};let a=f(i==null?void 0:i.locale,this.getLocale()),r=Array.isArray(e)?e:[e],n;for(let l of r){if(!c(l))continue;let s=this.lookup(l,a);if(s===void 0&&a!==this._fallbackLocale&&(s=this.lookup(l,this._fallbackLocale)),s!==void 0){n=s;break}}if(n===void 0)return i.defaultValue!==void 0?i.defaultValue:this.missingTranslation(e,i);if(typeof i.count=="number"&&m(n)){let l=i.count,s="other";l===0&&n.zero!==void 0?s="zero":l===1&&n.one!==void 0&&(s="one"),n[s]!==void 0?n=n[s]:n.other&&(n=n.other);}return typeof n=="string"&&(g(i.count)&&!i.countStr&&(i.countStr=typeof((o=i.count)==null?void 0:o.formatNumber)=="function"?i.count.formatNumber():i.count.toString()),n=this.performInterpolation(n,i)),n}t(e,i){return this.translate(e,i)}has(e,i){let a=i||this.getLocale(),r=Array.isArray(e)?e:[e];for(let n of r)if(this.lookup(n,a)!==void 0)return true;return false}getLocale(){return this.locale}setLocale(e,i=false){return G(this,null,function*(){return this.locale===e&&i!==true&&this._namespacesLoaded[e]?this.locale:(yield this.loadNamespaces(e),this.locale=e,this.isDefaultInstance()&&p.setLocaleToSession(e),this.setMomentLocale(e),this.locale)})}setLocales(e){return this._locales=Array.isArray(e)?e:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}getLocales(){let e=Object.keys(this._translations),i=Array.isArray(this._locales)?this._locales:["en"],a=[...e,...i.filter(r=>!e.includes(r))];return Array.from(new Set(a))}hasLocale(e){return c(e)&&this.getLocales().includes(e)}isDefaultInstance(){return this===p.instance}registerTranslations(e){return this._translations=w({},this._translations,e),this._translations}getTranslations(e){return c(e)?this._translations[e]||{}:this._translations}registerNamespaceResolver(e,i){if(!c(e)||typeof i!="function"){console.warn("Invalid arguments for registerNamespaceResolver.");return}this.namespaceResolvers[e]=i;}loadNamespace(e,i,a=true){return !c(e)||!this.namespaceResolvers[e]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${e}".`)):(i=f(i,this.getLocale()),c(i)?this.namespaceResolvers[e](i).then(r=>{let n={};return n[i]=Object.assign({},r),m(r)&&a!==false&&this.registerTranslations(n),n}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${e}".`)))}loadNamespaces(e,i=true){return G(this,null,function*(){e=f(e,this.getLocale());let a=[],r={};for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&a.push(this.namespaceResolvers[o](e).then(l=>{w(r,l);}));yield Promise.all(a);let n={};return n[e]=r,i!==false&&this.registerTranslations(n),this._namespacesLoaded[e]=true,n})}get(e,i){i=f(i,this.getLocale());let a=(c(e)?e.trim().split("."):Array.isArray(e)?e:[]).filter(c);if(!a.length)return;let r=this.getTranslations(i);for(let n of a)if(m(r))r=r[n];else return;return r}translateClass(e,i){let a=p.getClassTanslationKeys(e);for(let r in a)c(a[r])&&(a[r]=this.translate(a[r],i));return a}translateObject(e,i){if(!m(e))return {};let a={};for(let r in e){let n=e[r];c(n)&&(a[r]=this.translate(n,i));}return a}applyTranslations(e){try{let i=Object.getOwnPropertyNames(e);for(let a of i){let r=Reflect.getMetadata(Z,e,a);if(r)try{e[a]=this.translate(r);}catch(n){I.error(n," resolving translation for key : ",r," on object : ",e);}}}catch(i){I.error(i," resolving translations for object : ",e);}}missingTranslation(e,i){let a=f(Array.isArray(e)?e.filter(c)[0]:f(e));return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,a,f(i==null?void 0:i.defaultValue),i):a}lookup(e,i){let a=this._translations[i];if(!a)return;if(Object.prototype.hasOwnProperty.call(a,e))return a[e];let r=e.split("."),n=a;for(let o of r)if(m(n)&&Object.prototype.hasOwnProperty.call(n,o))n=n[o];else return;return n}performInterpolation(e,i){let a=E(i);return this.interpolateFunc?this.interpolateFunc(this,e,i):this.defaultInterpolator(e,a)}defaultInterpolator(e,i){return ue(e,i,{tagRegex:/%\{([^}]+)\}/g})}static setLocaleToSession(e){W.set("i18n.locale",e);}getMomentLocale(e){return p.momentLocales[e]}setMomentLocale(e){try{return b__default.default.updateLocale(e,this.getMomentLocale(e)),!0}catch(i){console.error(i," setting moment locale : ",e);}return false}};p.momentLocales={};var S=p,ei=S.getInstance();var Z=Symbol("TRANSLATION_KEY");function ti(t){return J(Z,t)}exports.I18n=S;exports.Translate=ti;exports.i18n=ei;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
%{failedRulesErrors}`,oneOf:`The field %{fieldName} must match at least one of the following validation rules:
|
|
3
3
|
%{failedRulesErrors}`,allOf:`The field %{fieldName} must match all of the following validation rules:
|
|
4
4
|
%{failedRulesErrors}`,validateNested:`The field %{fieldName} must be a valid nested object. Errors:
|
|
5
|
-
%{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",mongoId:"This field must be a valid MongoDB ObjectId",hexadecimal:"This field must be a valid hexadecimal value",object:"This field must be an object",isObject:"This field must be an object",invalidBulkData:"Invalid bulk data: an array is required",bulkValidationFailed:{one:"Bulk validation failed: 1 of %{totalCount} items failed",other:"Bulk validation failed: %{failureCount} of %{totalCount} items failed"},bulkValidationAllFailed:{one:"Validation failed for the single item",other:"All %{totalCount} items failed validation"},bulkValidationPartialFailure:"%{failureCount} items failed validation",separators:{multiple:", ",single:", "},nestedErrors:{separator:"; ",prefix:"",suffix:""},tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var bt={auth:ke,currencies:Ee,countries:J,dates:xe,resources:Be,validator:He};function m(t){return !!(t&&typeof t=="string")}function c(...t){for(var e in t){let r=t[e];if(m(r))return r}return ""}function _(t){return !!(t==null||typeof t=="undefined"||typeof t=="string"&&t===""||Array.isArray(t)&&!t.length)}function T(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function ee(t){return !t||typeof t!="object"?false:t instanceof Date?true:typeof t.getTime!="function"?false:!(Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))}var y=class y{static parseString(e,r){if(m(e)&&m(r))try{let a=G__default.default(e,r,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:r,isValid:!0}}catch(a){}try{if(Array.isArray(r)&&(r!=null&&r.length))for(let a of r){let i=Ke(e,a);if(i)return i}for(let a of y.DATE_FORMATS){let i=Ke(e,a);if(i)return i}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(e){let r=e?y.parseDate(e):new Date;return r?r.toISOString():""}static isoStringToDate(e){return new Date(e)}static parseDate(e,r){if(y.isDateObj(e))return e;if(!m(r)){let a=y.parseString(e);return a!=null&&a.isValid?a.date:null}if(_(e))return null;try{let a=G__default.default(e,r,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",e," format is : ",r);}return null}static toSQLDateTimeFormat(e){if(!y.isDateObj(e))return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return `${r}-${a}-${i} ${n}:${o}:${s}`}static getI18n(e){return j.isI18nInstance(e)?e:j.getInstance()}static getDefaultDateTimeFormat(e){return c(this.getI18n(e).get("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(e){return c(this.getI18n(e).get("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(e){if(!y.isDateObj(e))return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return `${r}-${a}-${i}`}static toSQLTimeFormat(e){if(!y.isDateObj(e))return "";let r=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),i=String(e.getSeconds()).padStart(2,"0");return `${r}:${a}:${i}`}static getDefaultTimeFormat(e){return c(this.getI18n(e).get("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(e,r){if(e==null||typeof e=="boolean")return false;if(y.isDateObj(e))return true;if(T(e)){let i=new Date(e);return i&&!isNaN(i.getTime())}if(m(e))return !!y.parseDate(e,r);if(e!=null&&e.toString&&(e==null?void 0:e.toString())==parseInt(e).toString())return false;let a=new Date(e);return y.isDateObj(a)}static addToDate(e,r,a){if(T(e)||(e=0),_(r)&&(r=new Date),y.isValidDate(r)&&m(r)&&(r=new Date(r)),y.isValidDate(r)||(r=m(r)?new Date(r):new Date),m(a)&&typeof r["set"+a]=="function"&&typeof r["get"+a]=="function"){let i="set"+a,n="get"+a;r=new Date(r[i](r[n]()+e));}return r}static addDays(e,r){return y.addToDate(e,r,"Date")}static addMilliseconds(e,r){return T(e)||(e=0),y.isDateObj(r)||(r=new Date),r=r||new Date,new Date(r.getTime()+e)}static addSeconds(e,r){return T(e)||(e=0),y.addMilliseconds(e*1e3,r)}static addMinutes(e,r){return T(e)||(e=0),y.addMilliseconds(e*6e4,r)}static addHours(e,r){return T(e)||(e=0),y.addMilliseconds(e*36e5,r)}static addMonths(e,r,a){return y.addToDate(e,r,"Month")}static addWeeks(e,r){return e=(T(e)?e:0)*7,y.addToDate(e,r,"Date")}static addYears(e,r){T(e)||(e=0);let a=new Date(y.addToDate(0,r)),i=a.getFullYear();return i+e<0?e=0:e+=i,a.setFullYear(e),new Date(a)}static formatDate(e,r){try{let a=G__default.default(e);if(a.isValid())return a.format(c(r,y.getDefaultDateTimeFormat()))}catch(a){}return c(y.isValidDate(e)?e==null?void 0:e.toString():"")}static getUTCDateTimeDetails(e){let r=e?G__default.default.utc(e):G__default.default.utc();return {year:r.year(),day:r.day(),month:r.month(),monthString:r.format("MM"),hours:r.hours(),date:r.date(),minutes:r.minutes(),seconds:r.seconds(),monthName:r.format("MMMM"),dayName:r.format("dddd"),dayNameShort:r.format("ddd")}}};y.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],y.SQL_DATE_FORMAT="YYYY-MM-DD",y.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",y.SQL_TIME_FORMAT="HH:mm:ss",y.getCurrentMonthDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(r.getFullYear(),r.getMonth(),1),i=new Date(r.getFullYear(),r.getMonth()+1,0);return {first:a,last:i}},y.getPreviousWeekDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(r.getTime()-3600*24*7*1e3),i=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),s=new Date(a.setDate(o)),l=new Date(i.setDate(o+6));return {first:s,last:l}},y.getCurrentWeekDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=r.getDay(),i=r.getDate()-a+(a==0?-6:1),n=new Date(r),o=new Date(r.setDate(i));return n.setDate(n.getDate()+6),{first:o,last:n}},y.isDateObj=ee;var D=y,Ke=(t,e)=>{let r=G__default.default(t,e,true);try{if(r.isValid()&&r.format(e)===t||G__default.default.utc(r,!0).format(e)===t)return {date:r.toDate(),matchedFormat:e,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return D.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return D.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return D.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(t){return D.formatDate(this,t)};Date.prototype.addYears=function(t){return D.addYears(t,this)};Date.prototype.addMonths=function(t){return D.addMonths(t,this)};Date.prototype.addMinutes=function(t){return D.addMinutes(t,this)};Date.prototype.addSeconds=function(t){return D.addSeconds(t,this)};Date.prototype.addDays=function(t){return D.addDays(t,this)};Date.prototype.addWeeks=function(t){return D.addWeeks(t,this)};Date.prototype.addHours=function(t){return D.addHours(t,this)};var k=class k{static get logger(){let e=Reflect.getMetadata(k.loggerMetaData,k);return Ve(e)&&(this._logger=e),this._logger?this._logger:console}static set logger(e){Ve(e)&&Reflect.defineMetadata(k.loggerMetaData,e,k);}static _log(e,...r){let a=k.logger;e=c(e),e&&typeof a[e]=="function"?a[e](k.getDateTimeString(),...r):console.log("Logger level not found : [",e,"]",...r);}static getDateTimeString(){let{day:e,year:r,hours:a,minutes:i,seconds:n,dayNameShort:o,monthName:s}=D.getUTCDateTimeDetails(),l=e<10?"0"+e:e,d=a<10?"0"+a:a,g=i<10?"0"+i:i,u=n<10?"0"+n:n;return "["+[o,l,s,r].join(" ")+" "+[d,g,u].join(":")+"]"}static log(...e){this._log("log",...e);}static info(...e){this._log("info",...e);}static debug(...e){this._log("debug",...e);}static warn(...e){this._log("warn",...e);}static error(...e){this._log("error",...e);}};k.loggerMetaData=Symbol("logger-meta-data");var U=k,Ve=t=>{if(!t)return false;try{return ["warn","info","error"].every(e=>typeof t[e]=="function")}catch(e){return false}};function ht(t){return typeof t=="boolean"||!t||typeof t=="number"||typeof t=="string"||typeof t=="symbol"?false:Object(t).constructor===Promise||t.constructor&&(t.constructor.name==="Promise"||t.constructor.name==="AsyncFunction")||t instanceof Promise||typeof(t==null?void 0:t.then)=="function"&&typeof(t==null?void 0:t.catch)=="function"&&typeof(t==null?void 0:t.finally)=="function"?true:t&&typeof t.constructor=="function"&&Function.prototype.toString.call(t.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function Ge(t){return t&&Object.prototype.toString.call(t)==="[object Promise]"?true:ht(t)}function Ue(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var le=()=>{var t;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((t=process==null?void 0:process.versions)!=null&&t.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(e){}return false},Dt=()=>{var t,e;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((t=window==null?void 0:window.process)==null?void 0:t.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((e=process.versions)!=null&&e.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Ct=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(t){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(e){}}return false},Mt=()=>typeof window=="undefined"&&typeof process!="undefined",We=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),St=()=>{if(!Ue()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let t=navigator.userAgent.toLowerCase();return /android/i.test(t)},Nt=()=>{var t;return !We()||!(window!=null&&window.ReactNativeWebView)?false:typeof((t=window==null?void 0:window.ReactNativeWebView)==null?void 0:t.postMessage)=="function"},Tt=()=>le()&&process.platform==="darwin",Pt=()=>le()&&process.platform==="win32",At=()=>le()&&process.platform==="linux",Ze={isWeb:Ue,isLinux:At,isDarwin:Tt,isWin32:Pt,isNode:le,isElectron:Dt,isTouchDevice:Ct,isServerSide:Mt,isClientSide:We,isAndroidMobileBrowser:St,isReactNativeWebview:Nt};var Q=class t{static decycle(e,r=[]){if(typeof e=="function")return;if(!e||typeof e!="object")return e;if(r.includes(e))return null;let a=r.concat([e]);return Array.isArray(e)?e.map(i=>t.decycle(i,a)):Object.fromEntries(Object.entries(e).map(([i,n])=>[i,t.decycle(n,a)]))}static stringify(e,r=false){return typeof e=="string"?e:JSON.stringify(r!==false?t.decycle(e):e)}static isJSON(e){if(typeof e!="string")return false;let r=e.trim();if(r.length===0)return false;let a=r[0];if(a!=="{"&&a!=="[")return false;try{let i=JSON.parse(r);return i!==null&&typeof i=="object"}catch(i){return false}}static parse(e,r){if(typeof e=="string")try{e=JSON.parse(e,r);}catch(a){return e}if(e&&typeof e=="object")for(let a in e){let i=e[a];t.isJSON(i)&&(e[a]=t.parse(i,r));}return e}};var H=class H{static get storage(){var r;let e=Reflect.getMetadata(H.sessionStorageMetaData,H);if(he(e)&&(this._storage=e),this._storage)return this._storage;if(Ze.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((r=window.localStorage)!=null&&r.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,i)=>window.localStorage.setItem(a,i),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:i=>a[i],set:(i,n)=>a[i]=n,remove:i=>{delete a[i];},removeAll:()=>a={}};}return this._storage}static set storage(e){he(e)&&Reflect.defineMetadata(H.sessionStorageMetaData,e,H);}static get keyNamespace(){return m(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(e){m(e)&&(this._keyNamespace=e.trim().replace(/\s+/g,"-"));}static sanitizeKey(e){if(!e||!m(e))return "";e=e.trim().replace(/\s+/g,"-");let r=this.keyNamespace;return r?`${r}-${e}`:e}};H.sessionStorageMetaData=Symbol("sessionStorage"),H._keyNamespace=void 0;var F=H;function de(t){return F.sanitizeKey(t)}var $e=(t,e)=>(t=t&&Q.stringify(t,e),t==null&&(t=""),t),ze=t=>{if(Ge(t))return new Promise((e,r)=>{t.then(a=>{e(Q.parse(a));}).catch(a=>{r(a);});});if(t!=null)return Q.parse(t)},vt=t=>{if(t=de(t),F.storage&&t&&typeof t=="string"){let e=F.storage.get(t);return ze(e)}},Yt=t=>{if(t=de(t),F.storage&&t&&typeof t=="string")return F.storage.remove(t)},Rt=()=>{if(F.storage)return F.storage.removeAll()},he=t=>{if(!t)return false;try{return ["get","set","remove","removeAll"].every(e=>typeof t[e]=="function")}catch(e){return false}},E={get:vt,set:(t,e,r=true)=>(t=de(t),F.storage.set(t,$e(e,r))),remove:Yt,handleGetValue:ze,sanitizeKey:de,handleSetValue:$e,isValidStorage:he,Manager:F,removeAll:Rt};function W(t){return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"}function Z(t){if(t instanceof RegExp)return true;if(!t||typeof t!="object"||!Object.prototype.toString.call(t).includes("RegExp"))return false;try{return new RegExp(t),!0}catch(e){return false}}function De(t){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:t===document?true:"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&typeof t=="object"&&t.nodeType===1&&!!t.nodeName}function C(t){if(t===null||typeof t!="object"||De(t)||ee(t)||Z(t)||W(t))return false;let e=Object.getPrototypeOf(t);if(e===null)return true;let r=e.constructor;if(typeof r!="function")return false;if(r===Object)return true;let a=r.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof e.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")&&typeof e.isPrototypeOf=="function"}function Ce(t){if(Array.isArray(t)){let a=[];for(var e=0;e<t.length;e++)a[e]=Ce(t[e]);return a}else if(C(t)&&t){let a={};for(var r in t)t.hasOwnProperty(r)&&(a[r]=Ce(t[r]));return a}else return t}Object.getSize=function(t,e=false){if(!t||typeof t!="object")return 0;if(Array.isArray(t))return t.length;typeof e!="boolean"&&(e=false);let r=0;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&(r++,e===true))return r;return r};function L(t,...e){let r=Array.isArray(t),a=C(t);(t==null||!r&&!a)&&(t={});for(let i=0;i<e.length;i++){let n=e[i];if(n==null)continue;let o=C(n),s=Array.isArray(n);if(!(!o&&!s)){if(r){s&&Je(t,n);continue}else if(s)continue;for(let l in n){let d=n[l];if(d==null)continue;if(d===n){t[l]=t;continue}let g=t[l],u=Array.isArray(g),f=Array.isArray(d);if(u){f?Je(t[l],d):t[l]=d;continue}else if(!C(g)){t[l]=d;continue}if(f||!C(d)){t[l]=d;continue}t[l]=L({},g,d);}}}return t}var Je=(t,e)=>{let r=e.length,a=0;for(let i=0;i<t.length;i++){let n=t[i],o=e[i];if(i<r){let s=Array.isArray(n),l=Array.isArray(o),d=C(n),g=C(o);s&&l||d&&g?(t[a]=L(s?[]:{},n,o),a++):o!=null?(t[a]=o,a++):n!=null&&(t[a]=n,a++);}}for(let i=t.length;i<r;i++)e[i]!==void 0&&e[i]!==null&&t.push(e[i]);return t};function ce(t,e){return me(t,"",{},e)}function me(t,e="",r={},a){if(r=C(r)?r:{},W(t)||ee(t)||Z(t)||Array.isArray(t)&&(a!=null&&a.skipArrays))return e&&(r[e]=t),r;if(typeof t=="function"||typeof t=="object"&&!C(t)&&!It(t))return r;if(t instanceof Map||t instanceof WeakMap)return Array.from(t.entries()).forEach(([i,n])=>{let o=e?`${e}[${String(i)}]`:String(i);me(n,o,r,a);}),r;if(Array.isArray(t)||t instanceof Set||t instanceof WeakSet)return (Array.isArray(t)?t:Array.from(t)).forEach((n,o)=>{let s=e?`${e}[${o}]`:String(o);me(n,s,r,a);}),r;if(C(t))for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let n=t[i],o=e?e.endsWith("]")?`${e}.${i}`:`${e}.${i}`:i;me(n,o,r,a);}return r}function It(t){return Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof WeakMap||t instanceof WeakSet}function Ft(t){return Object.entries(t)}Object.typedEntries=Ft;Object.flatten=ce;Object.clone=Ce;function te(t,e){if(t==null)return "";if(typeof t=="string")return t;if((typeof t=="number"||typeof t=="object"&&t instanceof Number)&&typeof t.formatNumber=="function")return t.formatNumber();if(t instanceof Date||typeof t=="object"&&t!==null&&t.constructor===Date)return typeof t.toFormat=="function"?t.toFormat():t.toISOString();if(t instanceof Error)return `Error: ${t.message}`;if(Z(t))return t.toString();if(W(t))return String(t);if(Array.isArray(t))return JSON.stringify(t);if(typeof t=="object"&&t!==null){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString();if(typeof t.toString=="function"){let r=t.toString();if(r!=="[object Object]")return r}return JSON.stringify(t)}return typeof(t==null?void 0:t.toString)=="function"?t.toString():String(t)}function je(t,e,r){let a=(r==null?void 0:r.valueFormatter)||te,i=c(t);if(!C(e)||!e)return i;let n=(r==null?void 0:r.tagRegex)||/%\{([^}]+)\}/g,o=new Set,s,l=c(t);for(;(s=n.exec(l))!==null;){let d=s[1];d!==void 0&&o.add(d);}return o.forEach(d=>{if(r!=null&&r.tagRegex){let p=new RegExp(r.tagRegex.source,r.tagRegex.flags);[...l.matchAll(p)].forEach(S=>{let P=S[0];if(!S[1])return;let R=S[1],B=Object.prototype.hasOwnProperty.call(e,R)?e[R]:void 0,A=B===void 0?"":(()=>{try{return a(B,R,te)}catch(Pe){return te(B)}})(),Y=P.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(Y,"g"),A);});return}let g=`%{${d}}`,u=Object.prototype.hasOwnProperty.call(e,d)?e[d]:void 0,f=u===void 0?"":(()=>{try{return a(u,d,te)}catch(p){return te(u)}})(),b=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(b,"g"),f);}),i}var v=class v{constructor(e={},r={}){this.locale="en";this._locales=["en"];this._fallbackLocale="en";this._translations={};this.namespaceResolvers={};this._namespacesLoaded={};this._hasDefaultTranslations=false;m(r.locale)&&(this.locale=r.locale),m(r.fallbackLocale)&&(this._fallbackLocale=r.fallbackLocale),typeof r.interpolate=="function"&&(this.interpolateFunc=r.interpolate),this._hasDefaultTranslations||(this.registerTranslations(be),this._hasDefaultTranslations=true),e&&this.registerTranslations(e),this.loadNamespaces();}static[Symbol.hasInstance](e){return this.isI18nInstance(e)}static isI18nInstance(e){return !e||typeof e!="object"?false:e.constructor&&e.constructor.name==="I18n"?true:typeof e.getLocale=="function"&&typeof e.translate=="function"&&typeof e.translateClass=="function"&&typeof e.registerTranslations=="function"&&typeof e.loadNamespace=="function"&&typeof e.registerNamespaceResolver=="function"}static getInstance(e){if(!v.instance){let r=v.getLocaleFromSession(),a=Object.assign({locale:r||"en"},e);v.instance=new v({},a);}return v.instance}static createInstance(e={},r={}){return new v(e,r)}static flattenObject(e){return C(e)?ce(e):e}static getLocaleFromSession(){let e=E.get("i18n.locale");return m(e)?e:void 0}static registerMomentLocale(e,r){return m(e)&&C(r)&&Array.isArray(r.months)&&(this.momentLocales[e]=L({},this.momentLocales[e],r)),this.momentLocales}static getClassTanslationKeys(e){return we(e,Qe)}translate(e,r){var o;r=r||{};let a=c(r==null?void 0:r.locale,this.getLocale()),i=Array.isArray(e)?e:[e],n;for(let s of i){if(!m(s))continue;let l=this.lookup(s,a);if(l===void 0&&a!==this._fallbackLocale&&(l=this.lookup(s,this._fallbackLocale)),l!==void 0){n=l;break}}if(n===void 0)return r.defaultValue!==void 0?r.defaultValue:this.missingTranslation(e,r);if(typeof r.count=="number"&&C(n)){let s=r.count,l="other";s===0&&n.zero!==void 0?l="zero":s===1&&n.one!==void 0&&(l="one"),n[l]!==void 0?n=n[l]:n.other&&(n=n.other);}return typeof n=="string"&&(T(r.count)&&!r.countStr&&(r.countStr=typeof((o=r.count)==null?void 0:o.formatNumber)=="function"?r.count.formatNumber():r.count.toString()),n=this.performInterpolation(n,r)),n}t(e,r){return this.translate(e,r)}has(e,r){let a=r||this.getLocale(),i=Array.isArray(e)?e:[e];for(let n of i)if(this.lookup(n,a)!==void 0)return true;return false}getLocale(){return this.locale}setLocale(e,r=false){return pe(this,null,function*(){return this.locale===e&&r!==true&&this._namespacesLoaded[e]?this.locale:(yield this.loadNamespaces(e),this.locale=e,this.isDefaultInstance()&&v.setLocaleToSession(e),this.setMomentLocale(e),this.locale)})}setLocales(e){return this._locales=Array.isArray(e)?e:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}getLocales(){let e=Object.keys(this._translations),r=Array.isArray(this._locales)?this._locales:["en"],a=[...e,...r.filter(i=>!e.includes(i))];return Array.from(new Set(a))}hasLocale(e){return m(e)&&this.getLocales().includes(e)}isDefaultInstance(){return this===v.instance}registerTranslations(e){return this._translations=L({},this._translations,e),this._translations}getTranslations(e){return m(e)?this._translations[e]||{}:this._translations}registerNamespaceResolver(e,r){if(!m(e)||typeof r!="function"){console.warn("Invalid arguments for registerNamespaceResolver.");return}this.namespaceResolvers[e]=r;}loadNamespace(e,r,a=true){return !m(e)||!this.namespaceResolvers[e]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${e}".`)):(r=c(r,this.getLocale()),m(r)?this.namespaceResolvers[e](r).then(i=>{let n={};return n[r]=Object.assign({},i),C(i)&&a!==false&&this.registerTranslations(n),n}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${e}".`)))}loadNamespaces(e,r=true){return pe(this,null,function*(){e=c(e,this.getLocale());let a=[],i={};for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&a.push(this.namespaceResolvers[o](e).then(s=>{L(i,s);}));yield Promise.all(a);let n={};return n[e]=i,r!==false&&this.registerTranslations(n),this._namespacesLoaded[e]=true,n})}get(e,r){r=c(r,this.getLocale());let a=(m(e)?e.trim().split("."):Array.isArray(e)?e:[]).filter(m);if(!a.length)return;let i=this.getTranslations(r);for(let n of a)if(C(i))i=i[n];else return;return i}translateClass(e,r){let a=v.getClassTanslationKeys(e);for(let i in a)m(a[i])&&(a[i]=this.translate(a[i],r));return a}translateObject(e,r){if(!C(e))return {};let a={};for(let i in e){let n=e[i];m(n)&&(a[i]=this.translate(n,r));}return a}applyTranslations(e){try{let r=Object.getOwnPropertyNames(e);for(let a of r){let i=Reflect.getMetadata(Qe,e,a);if(i)try{e[a]=this.translate(i);}catch(n){U.error(n," resolving translation for key : ",i," on object : ",e);}}}catch(r){U.error(r," resolving translations for object : ",e);}}missingTranslation(e,r){let a=c(Array.isArray(e)?e.filter(m)[0]:c(e));return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,a,c(r==null?void 0:r.defaultValue),r):a}lookup(e,r){let a=this._translations[r];if(!a)return;if(Object.prototype.hasOwnProperty.call(a,e))return a[e];let i=e.split("."),n=a;for(let o of i)if(C(n)&&Object.prototype.hasOwnProperty.call(n,o))n=n[o];else return;return n}performInterpolation(e,r){let a=ce(r);return this.interpolateFunc?this.interpolateFunc(this,e,r):this.defaultInterpolator(e,a)}defaultInterpolator(e,r){return je(e,r,{tagRegex:/%\{([^}]+)\}/g})}static setLocaleToSession(e){E.set("i18n.locale",e);}getMomentLocale(e){return v.momentLocales[e]}setMomentLocale(e){try{return G__default.default.updateLocale(e,this.getMomentLocale(e)),!0}catch(r){console.error(r," setting moment locale : ",e);}return false}};v.momentLocales={};var j=v,re=j.getInstance();var Qe=Symbol("TRANSLATION_KEY");var Ot={};Object.keys(J).map(t=>{let e=J[t];Ot[e.dialCode]=e.code;});var $=class{static isValid(e){return C(e)&&m(e.code)}static getPhoneNumberExample(e){var r;return c((r=this.getCountry(e))==null?void 0:r.phoneNumberExample)}static getFlag(e){var r;return c((r=this.getCountry(e))==null?void 0:r.flag)}static getCurrency(e){var r;return (r=this.getCountry(e))==null?void 0:r.currency}static setCountry(e){this.isValid(e)&&(this.countries[e.code]=e);}static getCountry(e){if(m(e))return L({},re.t(`countries.${e}`),this.countries[e])}static getCountries(){let e=re.t("countries");return C(e)?L({},e,this.countries):this.countries}static setCountries(e){if(!C(e))return this.countries;for(let r in e){let a=e[r];this.isValid(a)&&(this.countries[r]=L({},this.countries[r],a));}return this.countries}};$.countries=J;function qe(t){return !!(t==null||typeof t=="number"&&isNaN(t)||typeof t=="string"&&t.trim()==="")}function wt(t){return c(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f")}function ue(t,e){var r=Object.prototype.toString.call(t);return r==="[object "+e+"]"}function ae(t,e){if(["boolean","undefined"].includes(typeof t)||t===null)return String(t);if(T(t))return t.formatNumber();if(t instanceof Date)return t.toFormat();if(t instanceof Error)return t==null?void 0:t.toString();e=Object.assign({},e);let{parenthesis:r}=e,a=r?"(":"",i=r?")":"";return typeof t=="string"?(e==null?void 0:e.escapeString)!==false?"'"+wt(t)+"'":t:ue(t,"RegExp")||ue(t,"Number")||ue(t,"Boolean")?t.toString():ue(t,"Date")?"new Date("+t.getTime()+")":Array.isArray(t)?"["+t.map(n=>ae(n,e)).join(",")+"]":typeof t=="object"?a+"{"+Object.keys(t).map(n=>{var o=t[n];return ae(n,e)+":"+ae(o,e)}).join(",")+"}"+i:t&&typeof(t==null?void 0:t.toString)=="function"?t==null?void 0:t.toString():String(t)}var O={USD:{symbol:"$",name:"US Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"USD",namePlural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbolNative:"$",decimalDigits:2,format:"%s %v",rounding:0,code:"CAD",namePlural:"Canadian dollars"},EUR:{symbol:"\u20AC",name:"Euro",symbolNative:"\u20AC",decimalDigits:2,rounding:0,code:"EUR",namePlural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbolNative:"\u062F.\u0625.\u200F",decimalDigits:2,rounding:0,code:"AED",namePlural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbolNative:"\u060B",decimalDigits:0,rounding:0,code:"AFN",namePlural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbolNative:"Lek",decimalDigits:0,rounding:0,code:"ALL",namePlural:"Albanian lek\xEB"},AMD:{symbol:"AMD",name:"Armenian Dram",symbolNative:"\u0564\u0580.",decimalDigits:0,rounding:0,code:"AMD",namePlural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"ARS",namePlural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"AUD",namePlural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbolNative:"\u043C\u0430\u043D.",decimalDigits:2,rounding:0,code:"AZN",namePlural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbolNative:"KM",decimalDigits:2,rounding:0,code:"BAM",namePlural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbolNative:"\u09F3",decimalDigits:2,rounding:0,code:"BDT",namePlural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbolNative:"\u043B\u0432.",decimalDigits:2,rounding:0,code:"BGN",namePlural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbolNative:"\u062F.\u0628.\u200F",decimalDigits:2,rounding:0,code:"BHD",namePlural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbolNative:"FBu",decimalDigits:0,rounding:0,code:"BIF",namePlural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"BND",namePlural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbolNative:"Bs",decimalDigits:2,rounding:0,code:"BOB",namePlural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbolNative:"R$",decimalDigits:2,rounding:0,code:"BRL",namePlural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbolNative:"P",decimalDigits:2,rounding:0,code:"BWP",namePlural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbolNative:"BYR",decimalDigits:0,rounding:0,code:"BYR",namePlural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"BZD",namePlural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbolNative:"FrCD",decimalDigits:2,rounding:0,code:"CDF",namePlural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbolNative:"CHF",decimalDigits:2,rounding:.05,code:"CHF",namePlural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbolNative:"$",decimalDigits:0,rounding:0,code:"CLP",namePlural:"Chilean pesos"},CNY:{symbol:"CN\xA5",name:"Chinese Yuan",symbolNative:"CN\xA5",decimalDigits:2,rounding:0,code:"CNY",namePlural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbolNative:"$",decimalDigits:0,rounding:0,code:"COP",namePlural:"Colombian pesos"},CRC:{symbol:"\u20A1",name:"Costa Rican Col\xF3n",symbolNative:"\u20A1",decimalDigits:0,rounding:0,code:"CRC",namePlural:"Costa Rican col\xF3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbolNative:"CV$",decimalDigits:2,rounding:0,code:"CVE",namePlural:"Cape Verdean escudos"},CZK:{symbol:"K\u010D",name:"Czech Republic Koruna",symbolNative:"K\u010D",decimalDigits:2,rounding:0,code:"CZK",namePlural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbolNative:"Fdj",decimalDigits:0,rounding:0,code:"DJF",namePlural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbolNative:"kr",decimalDigits:2,rounding:0,code:"DKK",namePlural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbolNative:"RD$",decimalDigits:2,rounding:0,code:"DOP",namePlural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbolNative:"\u062F.\u062C.\u200F",decimalDigits:2,rounding:0,code:"DZD",namePlural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbolNative:"kr",decimalDigits:2,rounding:0,code:"EEK",namePlural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbolNative:"\u062C.\u0645.\u200F",decimalDigits:2,rounding:0,code:"EGP",namePlural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbolNative:"Nfk",decimalDigits:2,rounding:0,code:"ERN",namePlural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbolNative:"Br",decimalDigits:2,rounding:0,code:"ETB",namePlural:"Ethiopian birrs"},GBP:{symbol:"\xA3",name:"British Pound Sterling",symbolNative:"\xA3",decimalDigits:2,rounding:0,code:"GBP",namePlural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbolNative:"GEL",decimalDigits:2,rounding:0,code:"GEL",namePlural:"Georgian laris"},GHS:{symbol:"GH\u20B5",name:"Ghanaian Cedi",symbolNative:"GH\u20B5",decimalDigits:2,rounding:0,code:"GHS",namePlural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbolNative:"FG",decimalDigits:0,rounding:0,code:"GNF",namePlural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbolNative:"Q",decimalDigits:2,rounding:0,code:"GTQ",namePlural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"HKD",namePlural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbolNative:"L",decimalDigits:2,rounding:0,code:"HNL",namePlural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbolNative:"kn",decimalDigits:2,rounding:0,code:"HRK",namePlural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbolNative:"Ft",decimalDigits:0,rounding:0,code:"HUF",namePlural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbolNative:"Rp",decimalDigits:0,rounding:0,code:"IDR",namePlural:"Indonesian rupiahs"},ILS:{symbol:"\u20AA",name:"Israeli New Sheqel",symbolNative:"\u20AA",decimalDigits:2,rounding:0,code:"ILS",namePlural:"Israeli new sheqels"},INR:{symbol:"Rs",name:"Indian Rupee",symbolNative:"\u099F\u0995\u09BE",decimalDigits:2,rounding:0,code:"INR",namePlural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbolNative:"\u062F.\u0639.\u200F",decimalDigits:0,rounding:0,code:"IQD",namePlural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbolNative:"\uFDFC",decimalDigits:0,rounding:0,code:"IRR",namePlural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xF3na",symbolNative:"kr",decimalDigits:0,rounding:0,code:"ISK",namePlural:"Icelandic kr\xF3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"JMD",namePlural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbolNative:"\u062F.\u0623.\u200F",decimalDigits:2,rounding:0,code:"JOD",namePlural:"Jordanian dinars"},JPY:{symbol:"\xA5",name:"Japanese Yen",symbolNative:"\uFFE5",decimalDigits:0,rounding:0,code:"JPY",namePlural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbolNative:"Ksh",decimalDigits:2,rounding:0,code:"KES",namePlural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbolNative:"\u17DB",decimalDigits:2,rounding:0,code:"KHR",namePlural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbolNative:"FC",decimalDigits:0,rounding:0,code:"KMF",namePlural:"Comorian francs"},KRW:{symbol:"\u20A9",name:"South Korean Won",symbolNative:"\u20A9",decimalDigits:0,rounding:0,code:"KRW",namePlural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbolNative:"\u062F.\u0643.\u200F",decimalDigits:2,rounding:0,code:"KWD",namePlural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbolNative:"\u0442\u04A3\u0433.",decimalDigits:2,rounding:0,code:"KZT",namePlural:"Kazakhstani tenges"},LBP:{symbol:"LB\xA3",name:"Lebanese Pound",symbolNative:"\u0644.\u0644.\u200F",decimalDigits:0,rounding:0,code:"LBP",namePlural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbolNative:"SL Re",decimalDigits:2,rounding:0,code:"LKR",namePlural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbolNative:"Lt",decimalDigits:2,rounding:0,code:"LTL",namePlural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbolNative:"Ls",decimalDigits:2,rounding:0,code:"LVL",namePlural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbolNative:"\u062F.\u0644.\u200F",decimalDigits:2,rounding:0,code:"LYD",namePlural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbolNative:"\u062F.\u0645.\u200F",decimalDigits:2,rounding:0,code:"MAD",namePlural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbolNative:"MDL",decimalDigits:2,rounding:0,code:"MDL",namePlural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbolNative:"MGA",decimalDigits:0,rounding:0,code:"MGA",namePlural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbolNative:"MKD",decimalDigits:2,rounding:0,code:"MKD",namePlural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbolNative:"K",decimalDigits:0,rounding:0,code:"MMK",namePlural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbolNative:"MOP$",decimalDigits:2,rounding:0,code:"MOP",namePlural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbolNative:"MURs",decimalDigits:0,rounding:0,code:"MUR",namePlural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"MXN",namePlural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbolNative:"RM",decimalDigits:2,rounding:0,code:"MYR",namePlural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbolNative:"MTn",decimalDigits:2,rounding:0,code:"MZN",namePlural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbolNative:"N$",decimalDigits:2,rounding:0,code:"NAD",namePlural:"Namibian dollars"},NGN:{symbol:"\u20A6",name:"Nigerian Naira",symbolNative:"\u20A6",decimalDigits:2,rounding:0,code:"NGN",namePlural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xF3rdoba",symbolNative:"C$",decimalDigits:2,rounding:0,code:"NIO",namePlural:"Nicaraguan c\xF3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbolNative:"kr",decimalDigits:2,rounding:0,code:"NOK",namePlural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbolNative:"\u0928\u0947\u0930\u0942",decimalDigits:2,rounding:0,code:"NPR",namePlural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"NZD",namePlural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbolNative:"\u0631.\u0639.\u200F",decimalDigits:2,rounding:0,code:"OMR",namePlural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbolNative:"B/.",decimalDigits:2,rounding:0,code:"PAB",namePlural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbolNative:"S/.",decimalDigits:2,rounding:0,code:"PEN",namePlural:"Peruvian nuevos soles"},PHP:{symbol:"\u20B1",name:"Philippine Peso",symbolNative:"\u20B1",decimalDigits:2,rounding:0,code:"PHP",namePlural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbolNative:"\u20A8",decimalDigits:0,rounding:0,code:"PKR",namePlural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbolNative:"z\u0142",decimalDigits:2,rounding:0,code:"PLN",namePlural:"Polish zlotys"},PYG:{symbol:"\u20B2",name:"Paraguayan Guarani",symbolNative:"\u20B2",decimalDigits:0,rounding:0,code:"PYG",namePlural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbolNative:"\u0631.\u0642.\u200F",decimalDigits:2,rounding:0,code:"QAR",namePlural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbolNative:"RON",decimalDigits:2,rounding:0,code:"RON",namePlural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbolNative:"\u0434\u0438\u043D.",decimalDigits:0,rounding:0,code:"RSD",namePlural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbolNative:"\u0440\u0443\u0431.",decimalDigits:2,rounding:0,code:"RUB",namePlural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbolNative:"FR",decimalDigits:0,rounding:0,code:"RWF",namePlural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbolNative:"\u0631.\u0633.\u200F",decimalDigits:2,rounding:0,code:"SAR",namePlural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbolNative:"SDG",decimalDigits:2,rounding:0,code:"SDG",namePlural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbolNative:"kr",decimalDigits:2,rounding:0,code:"SEK",namePlural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"SGD",namePlural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbolNative:"Ssh",decimalDigits:0,rounding:0,code:"SOS",namePlural:"Somali shillings"},SYP:{symbol:"SY\xA3",name:"Syrian Pound",symbolNative:"\u0644.\u0633.\u200F",decimalDigits:0,rounding:0,code:"SYP",namePlural:"Syrian pounds"},THB:{symbol:"\u0E3F",name:"Thai Baht",symbolNative:"\u0E3F",decimalDigits:2,rounding:0,code:"THB",namePlural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbolNative:"\u062F.\u062A.\u200F",decimalDigits:2,rounding:0,code:"TND",namePlural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02BBanga",symbolNative:"T$",decimalDigits:2,rounding:0,code:"TOP",namePlural:"Tongan pa\u02BBanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbolNative:"TL",decimalDigits:2,rounding:0,code:"TRY",namePlural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"TTD",namePlural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbolNative:"NT$",decimalDigits:2,rounding:0,code:"TWD",namePlural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbolNative:"TSh",decimalDigits:0,rounding:0,code:"TZS",namePlural:"Tanzanian shillings"},UAH:{symbol:"\u20B4",name:"Ukrainian Hryvnia",symbolNative:"\u20B4",decimalDigits:2,rounding:0,code:"UAH",namePlural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbolNative:"USh",decimalDigits:0,rounding:0,code:"UGX",namePlural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"UYU",namePlural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbolNative:"UZS",decimalDigits:0,rounding:0,code:"UZS",namePlural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xEDvar",symbolNative:"Bs.F.",decimalDigits:2,rounding:0,code:"VEF",namePlural:"Venezuelan bol\xEDvars"},VND:{symbol:"\u20AB",name:"Vietnamese Dong",symbolNative:"\u20AB",decimalDigits:0,rounding:0,code:"VND",namePlural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbolNative:"FCFA",decimalDigits:0,rounding:0,code:"XAF",namePlural:"francs CFA"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbolNative:"CFA",decimalDigits:0,rounding:0,code:"XOF",namePlural:"francs CFA"},YER:{symbol:"YR",name:"Yemeni Rial",symbolNative:"\u0631.\u064A.\u200F",decimalDigits:0,rounding:0,code:"YER",namePlural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbolNative:"R",decimalDigits:2,rounding:0,code:"ZAR",namePlural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbolNative:"ZK",decimalDigits:0,rounding:0,code:"ZMK",namePlural:"Zambian kwachas"}};var x=t=>t&&typeof t=="object"&&!Array.isArray(t)&&t.name&&typeof t.name=="string"&&t.symbol&&typeof t.symbol=="string";var Xe="%v %s",Me=t=>{let e=E.get("currencyFormat");return e&&typeof e=="string"&&e.includes("%v")?e:t!==false?Xe:""};function _e(t){return t=t&&typeof t=="string"?t.trim():"",E.set("currencyFormat",t)}var kt=t=>{if(!x(t)){let r=typeof t=="object"&&t&&!Array.isArray(t)?c(t.code,t.name):typeof t=="string"?t:void 0;r&&(r=r.trim().toUpperCase()),r&&x(O[r])?t=O[r]:typeof t=="string"&&(r=t.trim().toUpperCase(),x(O[r])&&(t=O[r]));}let e=Object.assign({},t);if(!e.format){let r=Me();r&&(e.format=r);}return e.format&&_e(e.format),E.set("appConfigCurrency",e),e},Et=()=>{var i,n,o,s;let t=Object.assign({},E.get("appConfigCurrency")),e=E.get("currencyCode");if(m(e)&&x(O[e.trim().toUpperCase()])&&(t=I(I({},O[e.trim().toUpperCase()]),t)),!m(t==null?void 0:t.format)){let l=Me(false);m(l)&&l.includes("%v")&&(t.format=l);}let a=O["USD"];return I(I({symbol:a.symbol,format:(i=a.format)!=null?i:"%v %s",decimalSeparator:(n=a.decimalSeparator)!=null?n:".",thousandSeparator:(o=a.thousandSeparator)!=null?o:",",decimalDigits:(s=a.decimalDigits)!=null?s:0},Object.assign({},re.get("currencies"))),t)},K={getFormat:Me,setFormat:_e,setCurrency:kt,getCurrency:Et,defaultCurrencyFormat:Xe};var xt=t=>t&&typeof t=="object";function Ne(t){let e=Object.assign({},K.getCurrency());if(t&&xt(t))for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r]!==void 0&&(e[r]=t[r]);if(m(e.format)){let r=rt(e.format);r.format&&(e.format=r.format),typeof r.decimalDigits=="number"&&(e.decimalDigits=r.decimalDigits);}return e}function Te(t,e){return t=typeof t=="number"?t:0,e=typeof e=="number"?e:0,t=Math.round(Math.abs(t)),isNaN(t)?e:t}function Bt(t){let e=K.getCurrency(),r=(e==null?void 0:e.format).toLowerCase();return typeof t=="string"&&(t=t.toLowerCase()),(typeof t!="string"||!t.match("%v"))&&(t=r),{pos:t,neg:t.replace("-","").replace("%v","-%v"),zero:t}}var ye=(t,e)=>{let r=K.getCurrency();if(t=t||0,typeof t=="number")return t;e=e||r.decimalSeparator;let a=new RegExp("[^0-9-"+e+"]","g"),i=parseFloat((""+t).replace(/\((?=\d+)(.*)\)/,"-$1").replace(a,"").replace(e,"."));return isNaN(i)?0:i},Se=(t,e)=>{let r=K.getCurrency();e=Te(e,r.decimalDigits);let i=String(t).replace(/[^\d.-]/g,"");if(i.length>15&&!i.includes("."))return i+"."+"0".repeat(e);try{let n=Number(i);if(isNaN(n))return "NaN";let o=+(n+"e"+e);return (+(Math.round(o)+"e-"+e)).toFixed(e)}catch(n){return "NaN"}},et=(t,e,r,a)=>{var u;t=ye(t);let i=x(e)?e:K.getCurrency();typeof e=="number"&&(i.decimalDigits=e),typeof i.decimalDigits!="number"&&(i.decimalDigits=(u=String(t).split(".")[1])==null?void 0:u.length),r!==void 0&&(i.thousandSeparator=r),a!==void 0&&(i.decimalSeparator=a);let n=Ne(i),o=Te(n.decimalDigits),s=t<0?"-":"",l=parseInt(Se(Math.abs(t||0),o),10)+"",d=l.length>3?l.length%3:0,g="";if(o){let f=String(parseFloat(Se(Math.abs(t),o))||0);f.includes(".")&&(g=c(f.split(".")[1]).trim());}return s+(d?l.substring(0,d)+n.thousandSeparator:"")+l.substring(d).replace(/(\d{3})(?=\d)/g,"$1"+n.thousandSeparator)+(o&&g?n.decimalSeparator+g:"")},tt=(t,e,r,a,i,n)=>{t=ye(t);let o=x(e)?e:K.getCurrency();e!==void 0&&typeof e=="string"&&(o.symbol=e),r!==void 0&&(o.decimalDigits=r),a!==void 0&&(o.thousandSeparator=a),i!==void 0&&(o.decimalSeparator=i),m(n)&&(o.format=n);let s=Ne(o),l=Bt(s.format),d=c(t>0?l.pos:t<0?l.neg:l.zero),g=c(s.symbol),u=d.replace(g&&"%s",g),f=et(Math.abs(t),Te(s.decimalDigits),s.thousandSeparator,s.decimalSeparator),b=u.replace("%v",f);return X(I({},s),{formattedValue:u,formattedNumber:f,symbol:s.symbol,usedFormat:d,result:b})},Ht=(t,e,r,a,i,n)=>tt(t,e,r,a,i,n).result,rt=t=>{t=c(t).trim();let e={};if(t){let r=/(\.)(\#{0,9}\s*$)/,a=t.match(r);Array.isArray(a)&&a.length===3&&(e.decimalDigits=c(a[2]).trim().length),t=t.replace(r,"");}return e.format=t,e},q={parse:ye,session:K,formatMoney:Ht,currencies:O,isCurrency:x,formatNumber:et,formatMoneyAsObject:tt,unformat:ye,toFixed:Se,prepareOptions:Ne,parseFormat:rt};var{currencies:at}=q;Number.prototype.countDecimals=function(){let t=String(this.toString()).match(/\.(\d+)/);return t?t[1].length:0};Number.prototype.formatNumber=function(t,e,r){return q.formatNumber(this.valueOf(),t,e,r)};Number.prototype.formatMoney=function(t,e,r,a,i){return q.formatMoney(this.valueOf(),t,e,r,a,i)};var Kt=(t,e,r,a)=>{var S;if(t===null||typeof t!="number"||isNaN(t))return {result:"",format:"",suffix:"",formattedValue:"",minAbreviationDecimalDigits:0,value:NaN};if(!isFinite(t)){let P=t>0?"\u221E":"-\u221E";return {result:P,value:t,format:"",suffix:"",formattedValue:P,minAbreviationDecimalDigits:0}}let i=Math.abs(t)<1e3,n=[{value:1e12,suffix:"T"},{value:1e9,suffix:"B"},{value:1e6,suffix:"M"},{value:1e3,suffix:"K"},{value:1,suffix:""}],o=t.countDecimals?t.countDecimals():Math.floor(t)===t?0:((S=t.toString().split(".")[1])==null?void 0:S.length)||0,s=n.find(P=>Math.abs(t)>=P.value)||n[n.length-1],l=i?t:t/(s.value===1?1:s.value),d=s.suffix,g=Vt(l,5);if(t===0)return {result:"0",value:0,format:"",suffix:"",formattedValue:"0",minAbreviationDecimalDigits:0};let f=T(e)&&e>0?e:s.value===1?Math.min(o,5):Math.max(g,0),b=l.toFixed(f);r=c(r),a=c(a,".");let p=b.toString().split(".");return p[0]=p[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),f>0&&p.length===1?p.push("0".repeat(f)):f>0&&p.length>1&&p[1].length<f&&(p[1]=p[1].padEnd(f,"0")),b=p.join(a),{result:b+d,value:t,format:d,suffix:d,formattedValue:b,minAbreviationDecimalDigits:g}};function Vt(t,e){let r=Math.abs(t);if(Number.isInteger(r))return 0;let a=r.toString().split(".")[1]||"",i=0;for(;i<a.length&&a[i]==="0";)i++;return r<1&&i>0?Math.min(i+e,a.length):Math.min(e,a.length)}var it=(t,e,r,a)=>Kt(t,e,r,a).result;Number.prototype.abreviate2FormatNumber=function(t,e,r){return it(this.valueOf(),t,e,r)};var nt=(t,e,r,a,i,n)=>{if(!T(t))return "";let l=q.formatMoneyAsObject(t,e,r,a,i,n),{formattedValue:o}=l,s=se(l,["formattedValue"]);return o.replace("%v",it(t,s.decimalDigits,s.thousandSeparator,s.decimalSeparator))};Number.prototype.abreviate2FormatMoney=function(t,e,r,a,i){return nt(this.valueOf(),t,e,r,a,i)};Object.keys(at).forEach(t=>{let e=t,r=at[e],a=`format${e}`,i=`abreviate2Format${e}`;Number.prototype[a]=function(n,o,s,l){return q.formatMoney(this.valueOf(),r,n,o,s,l)},Number.prototype[i]=function(n,o,s,l){return nt(this.valueOf(),r,n,o,s,l)};});var V=dt__default.default.PhoneNumberUtil.getInstance(),Ut=dt__default.default.AsYouTypeFormatter,M=/\d/,ot=/[a-zA-Z]/,h=class h{static formatValue(l){var d=l,{value:e,type:r,format:a,dateFormat:i,phoneCountryCode:n,abreviateNumber:o}=d,s=se(d,["value","type","format","dateFormat","phoneCountryCode","abreviateNumber"]);let g=r&&["decimal","numeric","number"].includes(String(r).toLowerCase()),u=e,f={};e=qe(e)?"":e,e||(u=g?0:String(e)),g&&(u=h.parseDecimal(e));let b=W(e)?String(e):D.isDateObj(e)?e:ae(e,{escapeString:false});if(typeof a=="function")b=a(X(I({},s),{dateFormat:i,phoneCountryCode:n,type:r,value:e}));else {let p=String(r).toLowerCase();if(i||["time","date","datetime"].includes(p)){i=c(i,p==="time"?D.getDefaultTimeFormat():p==="date"?D.getDefaultDateFormat():D.getDefaultDateTimeFormat());let N=D.parseDate(e);N&&(b=D.formatDate(N,i),f.dateValue=N),f.dateFormat=i;}else if(p==="tel"){let N=h.formatPhoneNumber(e,n);b=c(N,b),f.phoneCountryCode=c(n);let S=h.parsePhoneNumber(N,n);S?(f.dialCode=S.getCountryCode()+"",f.phoneCountryCode=c(V.getRegionCodeForNumber(S),n)):n&&(f.dialCode=h.getCountryDialCode(n)),f.phoneNumber=h.prefixPhoneNumberWithDialCode(b,f.dialCode).replace(/\s/g,"");}if(T(u)){let N=`abreviate2${c(a,"FormatNumber").trim().upperFirst()}`;o&&typeof Number.prototype[N]=="function"?b=u[N]():m(a)&&typeof Number.prototype[a]=="function"?b=u[a]():b=u.formatNumber();}}return I({formattedValue:b,isDecimalType:g,value:e,format:a,parsedValue:u,decimalValue:typeof u=="number"?u:0},f)}static getCountryDialCode(e){var a;let r=c((a=$.getCountry(e))==null?void 0:a.dialCode);if(r)return r;try{let i=V.getCountryCodeForRegion(e);if(i!==0)return i.toString()}catch(i){}return ""}static formatValueAsString(e){let{formattedValue:r}=h.formatValue(e);return r}static isValidMask(e){return Array.isArray(e)||typeof e=="function"}static normalizeNumber(e,r="."){return typeof e=="number"?e.toString():!e||e==null||e==null?"0":String(e).trim().replace(/\s/g,"").replace(/[,٫·]/g,r)}static formatWithMask(e){e=Object.assign({},e);let{value:r,maskAutoComplete:a,placeholderCharacter:i,mask:n,validate:o,obfuscationCharacter:s}=e,l=_(r)||r===void 0?"":["number","boolean","string"].includes(typeof r)?r.toString():r===null?"":(r==null?void 0:r.toString())||String(r),d=c(l),g=typeof n=="function"?n(X(I({},e),{value:d})):n,u=Array.isArray(g)?g:[],f=c(i,"_").charAt(0),b="";u.map(w=>{b+=String(m(w)?w:Array.isArray(w)&&m(w[1])?w[1]:f).charAt(0);});let p=b,N=true,S=w=>typeof o=="function"?o(w):true;if(!u.length||!d)return {maskHasObfuscation:false,maskedPlaceholder:p,masked:d,unmasked:d,obfuscated:d,maskArray:u,placeholder:b,isValid:N&&S(d),nonRegexReplacedChars:[]};let P="",R="",B="",A=0,Y=0,Pe=false,ut=b.length,Ae=[];for(;A<u.length&&!(Y>=d.length);){let w=u[A],z=d[Y],ie=[],{isValid:ve,masked:ge,obfuscated:yt,isMaskRegex:Ye}=st({maskChar:w,nonRegexReplacedChars:ie,valueChar:z,obfuscationCharacter:s,valueCharIndex:Y,maskCharIndex:A});P+=ge,R+=yt,B+=z,Ye&&ut>Y&&(p=p.substring(0,A)+ge+p.substring(Y+1)),A+=1,Y+=1;let Re=false;if(a&&!Ye&&A<u.length&&Y<u.length&&Y==d.length&&z!==ge){let ne=st({maskChar:u[A],nonRegexReplacedChars:[],valueChar:z,obfuscationCharacter:s,valueCharIndex:Y,maskCharIndex:A});ne.isMaskRegex&&ne.isValid&&ne.masked==z&&(P+=z,R+=ne.obfuscated,A+=1,Y+=1,ve=true,delete ie[0],Re=true);}if(ie[0]&&Ae.push(...ie),ve||(N=false),Re)break}return {masked:P,nonRegexReplacedChars:Ae,isValid:N&&S(d),maskHasObfuscation:Pe,placeholder:b,maskedPlaceholder:p,unmasked:B,obfuscated:R,maskArray:u}}static createDateMask(e){e=c(e);let r=h.MOMENT_MASKS_MAP,a=h.MOMENT_SEPARATOR_MAP,i=[],n="",o=0;for(;o<e.length;){if(a[e[o]]){n&&(i.push(...r[n]||[]),n=""),i.push(a[e[o]]),o++;continue}if(n+=e[o],r[n]){i.push(...r[n]),n="",o++;continue}Object.keys(r).some(s=>n&&s.startsWith(n))||n&&(i.push(...n.split("")),n=""),o++;}return n&&r[n]&&i.push(...r[n]),{mask:i,validate:s=>{if(!e||!m(s))return false;try{let l=G__default.default(s,e,!0);return l.isValid()&&l.format(e)===s}catch(l){}return false}}}static createPhoneNumberMask(e,r){let a=$.getPhoneNumberExample(e);if(m(a)){let i=h.createPhoneNumberMaskFromExample(a,e);if(i.mask.length)return i}if(!m(e))return {mask:[],validate:()=>false};try{let i=h.getPhoneNumberExample(e);if(!i)return {mask:[],validate:()=>!1};let n=r||dt.PhoneNumberFormat.INTERNATIONAL,o=V.format(i,n),s=i.getCountryCode()+"";return {dialCode:s,mask:ct(o,s),validate:l=>h.isValidPhoneNumber(l,e),countryCode:e}}catch(i){return {mask:[],validate:()=>false}}}static getPhoneNumberExample(e){if(!m(e))return null;let r=$.getPhoneNumberExample(e);if(m(r))return h.parsePhoneNumber(r);try{return V.getExampleNumber(e)}catch(a){return null}}static createPhoneNumberMaskFromExample(e,r,a){let i=lt(h.parsePhoneNumber(e,r),a);return i.mask.length>0?i:m(r)?lt(h.getPhoneNumberExample(r),a):{mask:[],validate:()=>false}}static parsePhoneNumber(e,r){e=c(e);try{return V.parse(e,c(r).toLowerCase())}catch(a){return null}}static prefixPhoneNumberWithDialCode(e,r){return typeof e!="string"?"":m(r)?(r="+"+r.ltrim("+"),!e.startsWith(r)&&!e.trim().startsWith("+")?r.trim()+" "+e.ltrim(" "):e):e}static isValidPhoneNumber(e,r){let a=this.parsePhoneNumber(e,r);return a?V.isValidNumber(a):false}static formatPhoneNumber(e,r){e=c(e);try{let a=new Ut(c(r).toLowerCase().trim());a.clear();let i="";return e.replace(/-/g,"").replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").split("").forEach(n=>{i=a.inputDigit(n);}),i||null}catch(a){return U.log(a," input formatter formatting phone number phoneNumber =",e,", countryCode=",r),null}}static cleanPhoneNumber(e){return m(e)?e.trim().replace(/\s/g,""):""}static extractDialCodeFromPhoneNumber(e,r){try{let a=h.parsePhoneNumber(e,r);if(a)return a.getCountryCode()+""}catch(a){}return ""}static isNumericString(e){return m(e)&&!Number.isNaN(parseFloat(e))&&Number.isFinite(Number(e))}static extractNumbersFromString(e){return m(e)?e.replace(/\D/g,""):""}};h.parseDecimal=e=>{if(typeof e=="number")return e;if(e==null||e==null||!e||typeof e!="string")return 0;let r=parseFloat(h.normalizeNumber(e));return typeof r=="number"&&!Number.isNaN(r)?r:0},h.endsWithDecimalSeparator=e=>{let r=String(e).trim().replace(/\s/g,"");return r.endsWith(".")||r.endsWith(",")||r.endsWith("\u066B")},h.MOMENT_MASKS_MAP={YYYY:Array(4).fill([M,"Y"]),YY:Array(2).fill([M,"Y"]),MM:Array(2).fill([M,"M"]),M:[[M,"M"]],MMMM:Array(9).fill([ot,"M"]),MMM:Array(3).fill([ot,"M"]),DD:Array(2).fill([M,"D"]),D:[[M,"D"]],HH:Array(2).fill([M,"H"]),H:[[M,"H"]],hh:Array(2).fill([M,"h"]),h:[[M,"h"]],mm:Array(2).fill([M,"m"]),m:[[M,"m"]],ss:Array(2).fill([M,"s"]),s:[[M,"s"]],SSS:Array(3).fill([M,"S"]),Z:[/[+-]/,M,M,M,M],ZZ:[/[+-]/,M,M,M,M],A:["A","M"],a:["a","m"]},h.MOMENT_SEPARATOR_MAP={"/":"/","-":"-",".":"."," ":" ",":":":",T:"T"},h.SINGLE_SPACE_MASK=" ",h.MASKS_WITH_VALIDATIONS={get DATE(){return h.createDateMask(D.getDefaultDateFormat())},get TIME(){return h.createDateMask(D.getDefaultTimeFormat())},get DATE_TIME(){return h.createDateMask(D.getDefaultDateTimeFormat())},CREDIT_CARD:{mask:[/\d/,/\d/,/\d/,/\d/," ",[/\d/],[/\d/],[/\d/],[/\d/]," ",[/\d/],[/\d/],[/\d/],[/\d/]," ",/\d/,/\d/,/\d/,/\d/],validate:()=>true}};var fe=h,ct=(t,e)=>{e=c(e),e&&(e="+"+e.ltrim("+")),fe.cleanPhoneNumber(t).startsWith(e);let a=[...e?t.substring(e.length):t].map(i=>/\d/.test(i)?/\d/:i);return e?[...e,...a]:a};function st({maskChar:t,valueChar:e,nonRegexReplacedChars:r,obfuscationCharacter:a,valueCharIndex:i,maskCharIndex:n}){let o=false,s=true,l="",d="",g=t,u=false;if(typeof t=="object"){let f=c(Array.isArray(t)?t[2]:void 0,a).charAt(0),b=Array.isArray(t)&&t[2]!==false&&f;b&&(o=true);let p=Array.isArray(t)?t[0]:t,N=String(p);g=p;try{let S=Z(p);u=S;let P=S&&RegExp(p).test(e),R=!S&&N===e,B=P||R,A=S?e:N;B||(s=!1),(P||!S)&&(l=A,d=b?f:A,!S&&!R&&r.push({index:i,maskIndex:n,from:e,to:N,valueChar:e,maskChar:t}));}catch(S){}}else m(t)?(l=t,d=t,t!==e&&(s=false,r.push({index:i,maskIndex:n,from:e,to:t,valueChar:e,maskChar:t}))):s=false;return {maskHasObfuscation:o,isMaskRegex:u,mask:g,isValid:s,masked:l,obfuscated:d,nonRegexReplacedChars:r}}function lt(t,e){try{if(t){let r=e||dt.PhoneNumberFormat.INTERNATIONAL,a=V.format(t,r);if(m(a)){let i=V.getRegionCodeForNumber(t),n=t.getCountryCode()+"";return {dialCode:n,mask:ct(a,n),validate:o=>fe.isValidPhoneNumber(o,i),countryCode:i}}}}catch(r){}return {mask:[],validate:()=>false}}exports.InputFormatter=fe;
|
|
5
|
+
%{nestedErrors}`,validateNestedInvalidType:"The field %{fieldName} must be an object, but received %{receivedType}",dateAfter:"This field must be after %{date}",dateBefore:"This field must be before %{date}",dateBetween:"This field must be between %{startDate} and %{endDate}",dateEquals:"This field must be equal to %{date}",futureDate:"This field must be a date in the future",pastDate:"This field must be a date in the past",file:"This field must be a valid file",fileSize:"This field must not exceed %{maxSize} bytes",fileType:"This field must be one of the following types: %{allowedTypes}",image:"This field must be a valid image file",fileExtension:"This field must have one of the following extensions: %{allowedExtensions}",minFileSize:"This field must be at least %{minSize} bytes",uuid:"This field must be a valid UUID",json:"This field must be valid JSON",base64:"This field must be valid Base64 encoded data",hexColor:"This field must be a valid hexadecimal color code",creditCard:"This field must be a valid credit card number",ip:"This field must be a valid IP address (version %{version})",macAddress:"This field must be a valid MAC address",matches:"This field must match the pattern %{pattern}",mongoId:"This field must be a valid MongoDB ObjectId",hexadecimal:"This field must be a valid hexadecimal value",object:"This field must be an object",isObject:"This field must be an object",invalidBulkData:"Invalid bulk data: an array is required",bulkValidationFailed:{one:"Bulk validation failed: 1 of %{totalCount} items failed",other:"Bulk validation failed: %{failureCount} of %{totalCount} items failed"},bulkValidationAllFailed:{one:"Validation failed for the single item",other:"All %{totalCount} items failed validation"},bulkValidationPartialFailure:"%{failureCount} items failed validation",separators:{multiple:", ",single:", "},nestedErrors:{separator:"; ",prefix:"",suffix:""},tests:{entity:{name:"Name",id:"Id",email:"Email",aString:"A String",url:"Url",note:"Note",createdAt:"Created At",updatedAt:"Updated At"}}};var bt={auth:ke,currencies:Ee,countries:J,dates:xe,resources:Be,validator:He};function m(t){return !!(t&&typeof t=="string")}function c(...t){for(var e in t){let r=t[e];if(m(r))return r}return ""}function _(t){return !!(t==null||typeof t=="undefined"||typeof t=="string"&&t===""||Array.isArray(t)&&!t.length)}function T(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}function ee(t){return !t||typeof t!="object"?false:t instanceof Date?true:typeof t.getTime!="function"?false:!(Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))}var y=class y{static parseString(e,r){if(m(e)&&m(r))try{let a=G__default.default(e,r,!0);if(a.isValid())return {date:a.toDate(),matchedFormat:r,isValid:!0}}catch(a){}try{if(Array.isArray(r)&&(r!=null&&r.length))for(let a of r){let i=Ke(e,a);if(i)return i}for(let a of y.DATE_FORMATS){let i=Ke(e,a);if(i)return i}return {date:null,matchedFormat:null,isValid:!1,error:"Unable to parse date string with any known format"}}catch(a){return {date:null,matchedFormat:null,isValid:false,error:a instanceof Error?a.message:"Unknown error occurred while parsing date"}}}static toIsoString(e){let r=e?y.parseDate(e):new Date;return r?r.toISOString():""}static isoStringToDate(e){return new Date(e)}static parseDate(e,r){if(y.isDateObj(e))return e;if(!m(r)){let a=y.parseString(e);return a!=null&&a.isValid?a.date:null}if(_(e))return null;try{let a=G__default.default(e,r,!0);if(a!=null&&a.isValid())return a.toDate()}catch(a){console.error(a," parsing date with moment : ",e," format is : ",r);}return null}static toSQLDateTimeFormat(e){if(!y.isDateObj(e))return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return `${r}-${a}-${i} ${n}:${o}:${s}`}static getI18n(e){return j.isI18nInstance(e)?e:j.getInstance()}static getDefaultDateTimeFormat(e){return c(this.getI18n(e).get("dates.defaultDateTimeFormat"),"YYYY-MM-DD HH:mm")}static getDefaultDateFormat(e){return c(this.getI18n(e).get("dates.defaultDateFormat"),"YYYY-MM-DD")}static toSQLDateFormat(e){if(!y.isDateObj(e))return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return `${r}-${a}-${i}`}static toSQLTimeFormat(e){if(!y.isDateObj(e))return "";let r=String(e.getHours()).padStart(2,"0"),a=String(e.getMinutes()).padStart(2,"0"),i=String(e.getSeconds()).padStart(2,"0");return `${r}:${a}:${i}`}static getDefaultTimeFormat(e){return c(this.getI18n(e).get("dates.defaultTimeFormat"),"HH:mm")}static isValidDate(e,r){if(e==null||typeof e=="boolean")return false;if(y.isDateObj(e))return true;if(T(e)){let i=new Date(e);return i&&!isNaN(i.getTime())}if(m(e))return !!y.parseDate(e,r);if(e!=null&&e.toString&&(e==null?void 0:e.toString())==parseInt(e).toString())return false;let a=new Date(e);return y.isDateObj(a)}static addToDate(e,r,a){if(T(e)||(e=0),_(r)&&(r=new Date),y.isValidDate(r)&&m(r)&&(r=new Date(r)),y.isValidDate(r)||(r=m(r)?new Date(r):new Date),m(a)&&typeof r["set"+a]=="function"&&typeof r["get"+a]=="function"){let i="set"+a,n="get"+a;r=new Date(r[i](r[n]()+e));}return r}static addDays(e,r){return y.addToDate(e,r,"Date")}static addMilliseconds(e,r){return T(e)||(e=0),y.isDateObj(r)||(r=new Date),r=r||new Date,new Date(r.getTime()+e)}static addSeconds(e,r){return T(e)||(e=0),y.addMilliseconds(e*1e3,r)}static addMinutes(e,r){return T(e)||(e=0),y.addMilliseconds(e*6e4,r)}static addHours(e,r){return T(e)||(e=0),y.addMilliseconds(e*36e5,r)}static addMonths(e,r,a){return y.addToDate(e,r,"Month")}static addWeeks(e,r){return e=(T(e)?e:0)*7,y.addToDate(e,r,"Date")}static addYears(e,r){T(e)||(e=0);let a=new Date(y.addToDate(0,r)),i=a.getFullYear();return i+e<0?e=0:e+=i,a.setFullYear(e),new Date(a)}static formatDate(e,r){try{let a=G__default.default(e);if(a.isValid())return a.format(c(r,y.getDefaultDateTimeFormat()))}catch(a){}return c(y.isValidDate(e)?e==null?void 0:e.toString():"")}static getUTCDateTimeDetails(e){let r=e?G__default.default.utc(e):G__default.default.utc();return {year:r.year(),day:r.day(),month:r.month(),monthString:r.format("MM"),hours:r.hours(),date:r.date(),minutes:r.minutes(),seconds:r.seconds(),monthName:r.format("MMMM"),dayName:r.format("dddd"),dayNameShort:r.format("ddd")}}};y.DATE_FORMATS=["YYYY-MM-DD","YYYY-MM-DDTHH:mm:ss","YYYY-MM-DDTHH:mm:ssZ","YYYY-MM-DDTHH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss[Z]","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DDTHH:mm:ss.SSSZ ","YYYY-MM-DDTHH:mm:ss.SSS","YYYY-MM-DD HH:mm:ss","YYYY-MM-DD HH:mm:ss.SSSZ","YYYY-MM-DDTHH:mm:ss.SSS[Z]","YYYY-MM-DD HH:mm:ssZ","YYYY-MM-DD HH:mmZ","MM/DD/YYYY","MM-DD-YYYY","MM.DD.YYYY","MM/DD/YY","MMMM DD, YYYY","MMM DD, YYYY","DD/MM/YYYY","DD-MM-YYYY","DD.MM.YYYY","DD/MM/YY","DD MMMM YYYY","DD MMM YYYY","HH:mm:ss.SSSZ","HH:mm:ssZ","HH:mmZ","YYYYMMDD","YYYYMMDDTHHMM","YYYYMMDDTHHMMSS","HH:mm:ss","HH:mm","hh:mm A","h:mm A","HH:mm:ss.SSS","YYYY-DDD","YYYY-Www","YYYY-Www-D","YYYY/MM/DD","YYYY.MM.DD","MMM D, YYYY","MMMM D, YYYY","D MMM YYYY","D MMMM YYYY","MMM D YYYY","ddd, DD MMM YYYY HH:mm:ss ZZ","ddd, DD MMM YYYY HH:mm:ss","dddd, MMMM D, YYYY","dddd, D MMMM YYYY","hh:mm:ss A","H:mm:ss","YYYY-[W]WW","YYYY-[W]WW-E","YYYY-MM-DDTHH:mm:ss.SSS","DD-MM-YYYY HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH:mm:ss","DD/MM/YYYY HH:mm:ss","MMM D YYYY, h:mm a","MMMM D YYYY, h:mm a","h:mm A MMM D, YYYY","MMMM D, YYYY","YY-MM-DD","DD-MM-YY","MM/DD/YY","MMM DD, YY","D MMM YY","D MMMM YY","YYYY MMM D","YYYY-MM-DD HH:mm","YYYY-MM-DD HH:mm:ss.SSS"],y.SQL_DATE_FORMAT="YYYY-MM-DD",y.SQL_DATE_TIME_FORMAT="YYYY-MM-DD HH:mm:ss",y.SQL_TIME_FORMAT="HH:mm:ss",y.getCurrentMonthDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(r.getFullYear(),r.getMonth(),1),i=new Date(r.getFullYear(),r.getMonth()+1,0);return {first:a,last:i}},y.getPreviousWeekDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=new Date(r.getTime()-3600*24*7*1e3),i=new Date(a),n=a.getDay(),o=a.getDate()-n+(n===0?-6:1),s=new Date(a.setDate(o)),l=new Date(i.setDate(o+6));return {first:s,last:l}},y.getCurrentWeekDaysRange=e=>{let r=y.isValidDate(e)?new Date(e):new Date().resetHours2Minutes2Seconds(),a=r.getDay(),i=r.getDate()-a+(a==0?-6:1),n=new Date(r),o=new Date(r.setDate(i));return n.setDate(n.getDate()+6),{first:o,last:n}},y.isDateObj=ee;var D=y,Ke=(t,e)=>{let r=G__default.default(t,e,true);try{if(r.isValid()&&r.format(e)===t||G__default.default.utc(r,!0).format(e)===t)return {date:r.toDate(),matchedFormat:e,isValid:!0}}catch(a){}return null};Date.prototype.toSQLDateTimeFormat=function(){return D.toSQLDateTimeFormat(this)};Date.prototype.toSQLDateFormat=function(){return D.toSQLDateFormat(this)};Date.prototype.toSQLTimeFormat=function(){return D.toSQLTimeFormat(this)};Date.prototype.resetHours=function(){return this.setHours(0),this};Date.prototype.resetMinutes=function(){return this.setMinutes(0),this};Date.prototype.resetSeconds=function(){return this.setSeconds(0),this};Date.prototype.resetMilliseconds=function(){return this.setMilliseconds(0),this};Date.prototype.resetHours2Minutes2Seconds=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.toFormat=function(t){return D.formatDate(this,t)};Date.prototype.addYears=function(t){return D.addYears(t,this)};Date.prototype.addMonths=function(t){return D.addMonths(t,this)};Date.prototype.addMinutes=function(t){return D.addMinutes(t,this)};Date.prototype.addSeconds=function(t){return D.addSeconds(t,this)};Date.prototype.addDays=function(t){return D.addDays(t,this)};Date.prototype.addWeeks=function(t){return D.addWeeks(t,this)};Date.prototype.addHours=function(t){return D.addHours(t,this)};var k=class k{static get logger(){let e=Reflect.getMetadata(k.loggerMetaData,k);return Ve(e)&&(this._logger=e),this._logger?this._logger:console}static set logger(e){Ve(e)&&Reflect.defineMetadata(k.loggerMetaData,e,k);}static _log(e,...r){let a=k.logger;e=c(e),e&&typeof a[e]=="function"?a[e](k.getDateTimeString(),...r):console.log("Logger level not found : [",e,"]",...r);}static getDateTimeString(){let{day:e,year:r,hours:a,minutes:i,seconds:n,dayNameShort:o,monthName:s}=D.getUTCDateTimeDetails(),l=e<10?"0"+e:e,d=a<10?"0"+a:a,g=i<10?"0"+i:i,u=n<10?"0"+n:n;return "["+[o,l,s,r].join(" ")+" "+[d,g,u].join(":")+"]"}static log(...e){this._log("log",...e);}static info(...e){this._log("info",...e);}static debug(...e){this._log("debug",...e);}static warn(...e){this._log("warn",...e);}static error(...e){this._log("error",...e);}};k.loggerMetaData=Symbol("logger-meta-data");var U=k,Ve=t=>{if(!t)return false;try{return ["warn","info","error"].every(e=>typeof t[e]=="function")}catch(e){return false}};function ht(t){return typeof t=="boolean"||!t||typeof t=="number"||typeof t=="string"||typeof t=="symbol"?false:Object(t).constructor===Promise||t.constructor&&(t.constructor.name==="Promise"||t.constructor.name==="AsyncFunction")||t instanceof Promise||typeof(t==null?void 0:t.then)=="function"&&typeof(t==null?void 0:t.catch)=="function"&&typeof(t==null?void 0:t.finally)=="function"?true:t&&typeof t.constructor=="function"&&Function.prototype.toString.call(t.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function Ge(t){return t&&Object.prototype.toString.call(t)==="[object Promise]"?true:ht(t)}function Ue(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var le=()=>{var t;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((t=process==null?void 0:process.versions)!=null&&t.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(e){}return false},Dt=()=>{var t,e;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((t=window==null?void 0:window.process)==null?void 0:t.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((e=process.versions)!=null&&e.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},Ct=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(t){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(e){}}return false},Mt=()=>typeof window=="undefined"&&typeof process!="undefined",We=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),St=()=>{if(!Ue()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let t=navigator.userAgent.toLowerCase();return /android/i.test(t)},Nt=()=>{var t;return !We()||!(window!=null&&window.ReactNativeWebView)?false:typeof((t=window==null?void 0:window.ReactNativeWebView)==null?void 0:t.postMessage)=="function"},Tt=()=>le()&&process.platform==="darwin",Pt=()=>le()&&process.platform==="win32",At=()=>le()&&process.platform==="linux",Ze={isWeb:Ue,isLinux:At,isDarwin:Tt,isWin32:Pt,isNode:le,isElectron:Dt,isTouchDevice:Ct,isServerSide:Mt,isClientSide:We,isAndroidMobileBrowser:St,isReactNativeWebview:Nt};var Q=class t{static decycle(e,r=[]){if(typeof e=="function")return;if(!e||typeof e!="object")return e;if(r.includes(e))return null;let a=r.concat([e]);return Array.isArray(e)?e.map(i=>t.decycle(i,a)):Object.fromEntries(Object.entries(e).map(([i,n])=>[i,t.decycle(n,a)]))}static stringify(e,r=false,a,i){return typeof e=="string"?e:JSON.stringify(r!==false?t.decycle(e):e,a,i)}static isJSON(e){if(typeof e!="string")return false;let r=e.trim();if(r.length===0)return false;let a=r[0];if(a!=="{"&&a!=="[")return false;try{let i=JSON.parse(r);return i!==null&&typeof i=="object"}catch(i){return false}}static parse(e,r){if(typeof e=="string")try{e=JSON.parse(e,r);}catch(a){return e}if(e&&typeof e=="object")for(let a in e){let i=e[a];t.isJSON(i)&&(e[a]=t.parse(i,r));}return e}};var H=class H{static get storage(){var r;let e=Reflect.getMetadata(H.sessionStorageMetaData,H);if(he(e)&&(this._storage=e),this._storage)return this._storage;if(Ze.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((r=window.localStorage)!=null&&r.getItem))this._storage={get:a=>window.localStorage.getItem(a),set:(a,i)=>window.localStorage.setItem(a,i),remove:a=>window.localStorage.removeItem(a),removeAll:()=>window.localStorage.clear()};else {let a={};this._storage={get:i=>a[i],set:(i,n)=>a[i]=n,remove:i=>{delete a[i];},removeAll:()=>a={}};}return this._storage}static set storage(e){he(e)&&Reflect.defineMetadata(H.sessionStorageMetaData,e,H);}static get keyNamespace(){return m(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(e){m(e)&&(this._keyNamespace=e.trim().replace(/\s+/g,"-"));}static sanitizeKey(e){if(!e||!m(e))return "";e=e.trim().replace(/\s+/g,"-");let r=this.keyNamespace;return r?`${r}-${e}`:e}};H.sessionStorageMetaData=Symbol("sessionStorage"),H._keyNamespace=void 0;var F=H;function de(t){return F.sanitizeKey(t)}var $e=(t,e)=>(t=t&&Q.stringify(t,e),t==null&&(t=""),t),ze=t=>{if(Ge(t))return new Promise((e,r)=>{t.then(a=>{e(Q.parse(a));}).catch(a=>{r(a);});});if(t!=null)return Q.parse(t)},vt=t=>{if(t=de(t),F.storage&&t&&typeof t=="string"){let e=F.storage.get(t);return ze(e)}},Yt=t=>{if(t=de(t),F.storage&&t&&typeof t=="string")return F.storage.remove(t)},Rt=()=>{if(F.storage)return F.storage.removeAll()},he=t=>{if(!t)return false;try{return ["get","set","remove","removeAll"].every(e=>typeof t[e]=="function")}catch(e){return false}},E={get:vt,set:(t,e,r=true)=>(t=de(t),F.storage.set(t,$e(e,r))),remove:Yt,handleGetValue:ze,sanitizeKey:de,handleSetValue:$e,isValidStorage:he,Manager:F,removeAll:Rt};function W(t){return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"}function Z(t){if(t instanceof RegExp)return true;if(!t||typeof t!="object"||!Object.prototype.toString.call(t).includes("RegExp"))return false;try{return new RegExp(t),!0}catch(e){return false}}function De(t){return typeof window!="object"||!window||typeof document=="undefined"||typeof HTMLElement=="undefined"||!HTMLElement?false:t===document?true:"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&typeof t=="object"&&t.nodeType===1&&!!t.nodeName}function C(t){if(t===null||typeof t!="object"||De(t)||ee(t)||Z(t)||W(t))return false;let e=Object.getPrototypeOf(t);if(e===null)return true;let r=e.constructor;if(typeof r!="function")return false;if(r===Object)return true;let a=r.prototype;return typeof a!="object"?false:a===Object.prototype?true:typeof e.hasOwnProperty=="function"&&Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")&&typeof e.isPrototypeOf=="function"}function Ce(t){if(Array.isArray(t)){let a=[];for(var e=0;e<t.length;e++)a[e]=Ce(t[e]);return a}else if(C(t)&&t){let a={};for(var r in t)t.hasOwnProperty(r)&&(a[r]=Ce(t[r]));return a}else return t}Object.getSize=function(t,e=false){if(!t||typeof t!="object")return 0;if(Array.isArray(t))return t.length;typeof e!="boolean"&&(e=false);let r=0;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&(r++,e===true))return r;return r};function L(t,...e){let r=Array.isArray(t),a=C(t);(t==null||!r&&!a)&&(t={});for(let i=0;i<e.length;i++){let n=e[i];if(n==null)continue;let o=C(n),s=Array.isArray(n);if(!(!o&&!s)){if(r){s&&Je(t,n);continue}else if(s)continue;for(let l in n){let d=n[l];if(d==null)continue;if(d===n){t[l]=t;continue}let g=t[l],u=Array.isArray(g),f=Array.isArray(d);if(u){f?Je(t[l],d):t[l]=d;continue}else if(!C(g)){t[l]=d;continue}if(f||!C(d)){t[l]=d;continue}t[l]=L({},g,d);}}}return t}var Je=(t,e)=>{let r=e.length,a=0;for(let i=0;i<t.length;i++){let n=t[i],o=e[i];if(i<r){let s=Array.isArray(n),l=Array.isArray(o),d=C(n),g=C(o);s&&l||d&&g?(t[a]=L(s?[]:{},n,o),a++):o!=null?(t[a]=o,a++):n!=null&&(t[a]=n,a++);}}for(let i=t.length;i<r;i++)e[i]!==void 0&&e[i]!==null&&t.push(e[i]);return t};function ce(t,e){return me(t,"",{},e)}function me(t,e="",r={},a){if(r=C(r)?r:{},W(t)||ee(t)||Z(t)||Array.isArray(t)&&(a!=null&&a.skipArrays))return e&&(r[e]=t),r;if(typeof t=="function"||typeof t=="object"&&!C(t)&&!It(t))return r;if(t instanceof Map||t instanceof WeakMap)return Array.from(t.entries()).forEach(([i,n])=>{let o=e?`${e}[${String(i)}]`:String(i);me(n,o,r,a);}),r;if(Array.isArray(t)||t instanceof Set||t instanceof WeakSet)return (Array.isArray(t)?t:Array.from(t)).forEach((n,o)=>{let s=e?`${e}[${o}]`:String(o);me(n,s,r,a);}),r;if(C(t))for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let n=t[i],o=e?e.endsWith("]")?`${e}.${i}`:`${e}.${i}`:i;me(n,o,r,a);}return r}function It(t){return Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof WeakMap||t instanceof WeakSet}function Ft(t){return Object.entries(t)}Object.typedEntries=Ft;Object.flatten=ce;Object.clone=Ce;function te(t,e){if(t==null)return "";if(typeof t=="string")return t;if((typeof t=="number"||typeof t=="object"&&t instanceof Number)&&typeof t.formatNumber=="function")return t.formatNumber();if(t instanceof Date||typeof t=="object"&&t!==null&&t.constructor===Date)return typeof t.toFormat=="function"?t.toFormat():t.toISOString();if(t instanceof Error)return `Error: ${t.message}`;if(Z(t))return t.toString();if(W(t))return String(t);if(Array.isArray(t))return JSON.stringify(t);if(typeof t=="object"&&t!==null){if(typeof t.toString=="function"&&t.toString!==Object.prototype.toString)return t.toString();if(typeof t.toString=="function"){let r=t.toString();if(r!=="[object Object]")return r}return JSON.stringify(t)}return typeof(t==null?void 0:t.toString)=="function"?t.toString():String(t)}function je(t,e,r){let a=(r==null?void 0:r.valueFormatter)||te,i=c(t);if(!C(e)||!e)return i;let n=(r==null?void 0:r.tagRegex)||/%\{([^}]+)\}/g,o=new Set,s,l=c(t);for(;(s=n.exec(l))!==null;){let d=s[1];d!==void 0&&o.add(d);}return o.forEach(d=>{if(r!=null&&r.tagRegex){let p=new RegExp(r.tagRegex.source,r.tagRegex.flags);[...l.matchAll(p)].forEach(S=>{let P=S[0];if(!S[1])return;let R=S[1],B=Object.prototype.hasOwnProperty.call(e,R)?e[R]:void 0,A=B===void 0?"":(()=>{try{return a(B,R,te)}catch(Pe){return te(B)}})(),Y=P.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(Y,"g"),A);});return}let g=`%{${d}}`,u=Object.prototype.hasOwnProperty.call(e,d)?e[d]:void 0,f=u===void 0?"":(()=>{try{return a(u,d,te)}catch(p){return te(u)}})(),b=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(b,"g"),f);}),i}var v=class v{constructor(e={},r={}){this.locale="en";this._locales=["en"];this._fallbackLocale="en";this._translations={};this.namespaceResolvers={};this._namespacesLoaded={};this._hasDefaultTranslations=false;m(r.locale)&&(this.locale=r.locale),m(r.fallbackLocale)&&(this._fallbackLocale=r.fallbackLocale),typeof r.interpolate=="function"&&(this.interpolateFunc=r.interpolate),this._hasDefaultTranslations||(this.registerTranslations(be),this._hasDefaultTranslations=true),e&&this.registerTranslations(e),this.loadNamespaces();}static[Symbol.hasInstance](e){return this.isI18nInstance(e)}static isI18nInstance(e){return !e||typeof e!="object"?false:e.constructor&&e.constructor.name==="I18n"?true:typeof e.getLocale=="function"&&typeof e.translate=="function"&&typeof e.translateClass=="function"&&typeof e.registerTranslations=="function"&&typeof e.loadNamespace=="function"&&typeof e.registerNamespaceResolver=="function"}static getInstance(e){if(!v.instance){let r=v.getLocaleFromSession(),a=Object.assign({locale:r||"en"},e);v.instance=new v({},a);}return v.instance}static createInstance(e={},r={}){return new v(e,r)}static flattenObject(e){return C(e)?ce(e):e}static getLocaleFromSession(){let e=E.get("i18n.locale");return m(e)?e:void 0}static registerMomentLocale(e,r){return m(e)&&C(r)&&Array.isArray(r.months)&&(this.momentLocales[e]=L({},this.momentLocales[e],r)),this.momentLocales}static getClassTanslationKeys(e){return we(e,Qe)}translate(e,r){var o;r=r||{};let a=c(r==null?void 0:r.locale,this.getLocale()),i=Array.isArray(e)?e:[e],n;for(let s of i){if(!m(s))continue;let l=this.lookup(s,a);if(l===void 0&&a!==this._fallbackLocale&&(l=this.lookup(s,this._fallbackLocale)),l!==void 0){n=l;break}}if(n===void 0)return r.defaultValue!==void 0?r.defaultValue:this.missingTranslation(e,r);if(typeof r.count=="number"&&C(n)){let s=r.count,l="other";s===0&&n.zero!==void 0?l="zero":s===1&&n.one!==void 0&&(l="one"),n[l]!==void 0?n=n[l]:n.other&&(n=n.other);}return typeof n=="string"&&(T(r.count)&&!r.countStr&&(r.countStr=typeof((o=r.count)==null?void 0:o.formatNumber)=="function"?r.count.formatNumber():r.count.toString()),n=this.performInterpolation(n,r)),n}t(e,r){return this.translate(e,r)}has(e,r){let a=r||this.getLocale(),i=Array.isArray(e)?e:[e];for(let n of i)if(this.lookup(n,a)!==void 0)return true;return false}getLocale(){return this.locale}setLocale(e,r=false){return pe(this,null,function*(){return this.locale===e&&r!==true&&this._namespacesLoaded[e]?this.locale:(yield this.loadNamespaces(e),this.locale=e,this.isDefaultInstance()&&v.setLocaleToSession(e),this.setMomentLocale(e),this.locale)})}setLocales(e){return this._locales=Array.isArray(e)?e:["en"],this._locales.includes("en")||this._locales.push("en"),this.getLocales()}getLocales(){let e=Object.keys(this._translations),r=Array.isArray(this._locales)?this._locales:["en"],a=[...e,...r.filter(i=>!e.includes(i))];return Array.from(new Set(a))}hasLocale(e){return m(e)&&this.getLocales().includes(e)}isDefaultInstance(){return this===v.instance}registerTranslations(e){return this._translations=L({},this._translations,e),this._translations}getTranslations(e){return m(e)?this._translations[e]||{}:this._translations}registerNamespaceResolver(e,r){if(!m(e)||typeof r!="function"){console.warn("Invalid arguments for registerNamespaceResolver.");return}this.namespaceResolvers[e]=r;}loadNamespace(e,r,a=true){return !m(e)||!this.namespaceResolvers[e]?Promise.reject(new Error(`Invalid namespace or resolver for namespace "${e}".`)):(r=c(r,this.getLocale()),m(r)?this.namespaceResolvers[e](r).then(i=>{let n={};return n[r]=Object.assign({},i),C(i)&&a!==false&&this.registerTranslations(n),n}):Promise.reject(new Error(`Locale is not set. Cannot load namespace "${e}".`)))}loadNamespaces(e,r=true){return pe(this,null,function*(){e=c(e,this.getLocale());let a=[],i={};for(let o in this.namespaceResolvers)Object.prototype.hasOwnProperty.call(this.namespaceResolvers,o)&&a.push(this.namespaceResolvers[o](e).then(s=>{L(i,s);}));yield Promise.all(a);let n={};return n[e]=i,r!==false&&this.registerTranslations(n),this._namespacesLoaded[e]=true,n})}get(e,r){r=c(r,this.getLocale());let a=(m(e)?e.trim().split("."):Array.isArray(e)?e:[]).filter(m);if(!a.length)return;let i=this.getTranslations(r);for(let n of a)if(C(i))i=i[n];else return;return i}translateClass(e,r){let a=v.getClassTanslationKeys(e);for(let i in a)m(a[i])&&(a[i]=this.translate(a[i],r));return a}translateObject(e,r){if(!C(e))return {};let a={};for(let i in e){let n=e[i];m(n)&&(a[i]=this.translate(n,r));}return a}applyTranslations(e){try{let r=Object.getOwnPropertyNames(e);for(let a of r){let i=Reflect.getMetadata(Qe,e,a);if(i)try{e[a]=this.translate(i);}catch(n){U.error(n," resolving translation for key : ",i," on object : ",e);}}}catch(r){U.error(r," resolving translations for object : ",e);}}missingTranslation(e,r){let a=c(Array.isArray(e)?e.filter(m)[0]:c(e));return typeof this.missingPlaceholder=="function"?this.missingPlaceholder(this,a,c(r==null?void 0:r.defaultValue),r):a}lookup(e,r){let a=this._translations[r];if(!a)return;if(Object.prototype.hasOwnProperty.call(a,e))return a[e];let i=e.split("."),n=a;for(let o of i)if(C(n)&&Object.prototype.hasOwnProperty.call(n,o))n=n[o];else return;return n}performInterpolation(e,r){let a=ce(r);return this.interpolateFunc?this.interpolateFunc(this,e,r):this.defaultInterpolator(e,a)}defaultInterpolator(e,r){return je(e,r,{tagRegex:/%\{([^}]+)\}/g})}static setLocaleToSession(e){E.set("i18n.locale",e);}getMomentLocale(e){return v.momentLocales[e]}setMomentLocale(e){try{return G__default.default.updateLocale(e,this.getMomentLocale(e)),!0}catch(r){console.error(r," setting moment locale : ",e);}return false}};v.momentLocales={};var j=v,re=j.getInstance();var Qe=Symbol("TRANSLATION_KEY");var Ot={};Object.keys(J).map(t=>{let e=J[t];Ot[e.dialCode]=e.code;});var $=class{static isValid(e){return C(e)&&m(e.code)}static getPhoneNumberExample(e){var r;return c((r=this.getCountry(e))==null?void 0:r.phoneNumberExample)}static getFlag(e){var r;return c((r=this.getCountry(e))==null?void 0:r.flag)}static getCurrency(e){var r;return (r=this.getCountry(e))==null?void 0:r.currency}static setCountry(e){this.isValid(e)&&(this.countries[e.code]=e);}static getCountry(e){if(m(e))return L({},re.t(`countries.${e}`),this.countries[e])}static getCountries(){let e=re.t("countries");return C(e)?L({},e,this.countries):this.countries}static setCountries(e){if(!C(e))return this.countries;for(let r in e){let a=e[r];this.isValid(a)&&(this.countries[r]=L({},this.countries[r],a));}return this.countries}};$.countries=J;function qe(t){return !!(t==null||typeof t=="number"&&isNaN(t)||typeof t=="string"&&t.trim()==="")}function wt(t){return c(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f")}function ue(t,e){var r=Object.prototype.toString.call(t);return r==="[object "+e+"]"}function ae(t,e){if(["boolean","undefined"].includes(typeof t)||t===null)return String(t);if(T(t))return t.formatNumber();if(t instanceof Date)return t.toFormat();if(t instanceof Error)return t==null?void 0:t.toString();e=Object.assign({},e);let{parenthesis:r}=e,a=r?"(":"",i=r?")":"";return typeof t=="string"?(e==null?void 0:e.escapeString)!==false?"'"+wt(t)+"'":t:ue(t,"RegExp")||ue(t,"Number")||ue(t,"Boolean")?t.toString():ue(t,"Date")?"new Date("+t.getTime()+")":Array.isArray(t)?"["+t.map(n=>ae(n,e)).join(",")+"]":typeof t=="object"?a+"{"+Object.keys(t).map(n=>{var o=t[n];return ae(n,e)+":"+ae(o,e)}).join(",")+"}"+i:t&&typeof(t==null?void 0:t.toString)=="function"?t==null?void 0:t.toString():String(t)}var O={USD:{symbol:"$",name:"US Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"USD",namePlural:"US dollars"},CAD:{symbol:"CA$",name:"Canadian Dollar",symbolNative:"$",decimalDigits:2,format:"%s %v",rounding:0,code:"CAD",namePlural:"Canadian dollars"},EUR:{symbol:"\u20AC",name:"Euro",symbolNative:"\u20AC",decimalDigits:2,rounding:0,code:"EUR",namePlural:"euros"},AED:{symbol:"AED",name:"United Arab Emirates Dirham",symbolNative:"\u062F.\u0625.\u200F",decimalDigits:2,rounding:0,code:"AED",namePlural:"UAE dirhams"},AFN:{symbol:"Af",name:"Afghan Afghani",symbolNative:"\u060B",decimalDigits:0,rounding:0,code:"AFN",namePlural:"Afghan Afghanis"},ALL:{symbol:"ALL",name:"Albanian Lek",symbolNative:"Lek",decimalDigits:0,rounding:0,code:"ALL",namePlural:"Albanian lek\xEB"},AMD:{symbol:"AMD",name:"Armenian Dram",symbolNative:"\u0564\u0580.",decimalDigits:0,rounding:0,code:"AMD",namePlural:"Armenian drams"},ARS:{symbol:"AR$",name:"Argentine Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"ARS",namePlural:"Argentine pesos"},AUD:{symbol:"AU$",name:"Australian Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"AUD",namePlural:"Australian dollars"},AZN:{symbol:"man.",name:"Azerbaijani Manat",symbolNative:"\u043C\u0430\u043D.",decimalDigits:2,rounding:0,code:"AZN",namePlural:"Azerbaijani manats"},BAM:{symbol:"KM",name:"Bosnia-Herzegovina Convertible Mark",symbolNative:"KM",decimalDigits:2,rounding:0,code:"BAM",namePlural:"Bosnia-Herzegovina convertible marks"},BDT:{symbol:"Tk",name:"Bangladeshi Taka",symbolNative:"\u09F3",decimalDigits:2,rounding:0,code:"BDT",namePlural:"Bangladeshi takas"},BGN:{symbol:"BGN",name:"Bulgarian Lev",symbolNative:"\u043B\u0432.",decimalDigits:2,rounding:0,code:"BGN",namePlural:"Bulgarian leva"},BHD:{symbol:"BD",name:"Bahraini Dinar",symbolNative:"\u062F.\u0628.\u200F",decimalDigits:2,rounding:0,code:"BHD",namePlural:"Bahraini dinars"},BIF:{symbol:"FBu",name:"Burundian Franc",symbolNative:"FBu",decimalDigits:0,rounding:0,code:"BIF",namePlural:"Burundian francs"},BND:{symbol:"BN$",name:"Brunei Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"BND",namePlural:"Brunei dollars"},BOB:{symbol:"Bs",name:"Bolivian Boliviano",symbolNative:"Bs",decimalDigits:2,rounding:0,code:"BOB",namePlural:"Bolivian bolivianos"},BRL:{symbol:"R$",name:"Brazilian Real",symbolNative:"R$",decimalDigits:2,rounding:0,code:"BRL",namePlural:"Brazilian reals"},BWP:{symbol:"BWP",name:"Botswanan Pula",symbolNative:"P",decimalDigits:2,rounding:0,code:"BWP",namePlural:"Botswanan pulas"},BYR:{symbol:"BYR",name:"Belarusian Ruble",symbolNative:"BYR",decimalDigits:0,rounding:0,code:"BYR",namePlural:"Belarusian rubles"},BZD:{symbol:"BZ$",name:"Belize Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"BZD",namePlural:"Belize dollars"},CDF:{symbol:"CDF",name:"Congolese Franc",symbolNative:"FrCD",decimalDigits:2,rounding:0,code:"CDF",namePlural:"Congolese francs"},CHF:{symbol:"CHF",name:"Swiss Franc",symbolNative:"CHF",decimalDigits:2,rounding:.05,code:"CHF",namePlural:"Swiss francs"},CLP:{symbol:"CL$",name:"Chilean Peso",symbolNative:"$",decimalDigits:0,rounding:0,code:"CLP",namePlural:"Chilean pesos"},CNY:{symbol:"CN\xA5",name:"Chinese Yuan",symbolNative:"CN\xA5",decimalDigits:2,rounding:0,code:"CNY",namePlural:"Chinese yuan"},COP:{symbol:"CO$",name:"Colombian Peso",symbolNative:"$",decimalDigits:0,rounding:0,code:"COP",namePlural:"Colombian pesos"},CRC:{symbol:"\u20A1",name:"Costa Rican Col\xF3n",symbolNative:"\u20A1",decimalDigits:0,rounding:0,code:"CRC",namePlural:"Costa Rican col\xF3ns"},CVE:{symbol:"CV$",name:"Cape Verdean Escudo",symbolNative:"CV$",decimalDigits:2,rounding:0,code:"CVE",namePlural:"Cape Verdean escudos"},CZK:{symbol:"K\u010D",name:"Czech Republic Koruna",symbolNative:"K\u010D",decimalDigits:2,rounding:0,code:"CZK",namePlural:"Czech Republic korunas"},DJF:{symbol:"Fdj",name:"Djiboutian Franc",symbolNative:"Fdj",decimalDigits:0,rounding:0,code:"DJF",namePlural:"Djiboutian francs"},DKK:{symbol:"Dkr",name:"Danish Krone",symbolNative:"kr",decimalDigits:2,rounding:0,code:"DKK",namePlural:"Danish kroner"},DOP:{symbol:"RD$",name:"Dominican Peso",symbolNative:"RD$",decimalDigits:2,rounding:0,code:"DOP",namePlural:"Dominican pesos"},DZD:{symbol:"DA",name:"Algerian Dinar",symbolNative:"\u062F.\u062C.\u200F",decimalDigits:2,rounding:0,code:"DZD",namePlural:"Algerian dinars"},EEK:{symbol:"Ekr",name:"Estonian Kroon",symbolNative:"kr",decimalDigits:2,rounding:0,code:"EEK",namePlural:"Estonian kroons"},EGP:{symbol:"EGP",name:"Egyptian Pound",symbolNative:"\u062C.\u0645.\u200F",decimalDigits:2,rounding:0,code:"EGP",namePlural:"Egyptian pounds"},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",symbolNative:"Nfk",decimalDigits:2,rounding:0,code:"ERN",namePlural:"Eritrean nakfas"},ETB:{symbol:"Br",name:"Ethiopian Birr",symbolNative:"Br",decimalDigits:2,rounding:0,code:"ETB",namePlural:"Ethiopian birrs"},GBP:{symbol:"\xA3",name:"British Pound Sterling",symbolNative:"\xA3",decimalDigits:2,rounding:0,code:"GBP",namePlural:"British pounds sterling"},GEL:{symbol:"GEL",name:"Georgian Lari",symbolNative:"GEL",decimalDigits:2,rounding:0,code:"GEL",namePlural:"Georgian laris"},GHS:{symbol:"GH\u20B5",name:"Ghanaian Cedi",symbolNative:"GH\u20B5",decimalDigits:2,rounding:0,code:"GHS",namePlural:"Ghanaian cedis"},GNF:{symbol:"FG",name:"Guinean Franc",symbolNative:"FG",decimalDigits:0,rounding:0,code:"GNF",namePlural:"Guinean francs"},GTQ:{symbol:"GTQ",name:"Guatemalan Quetzal",symbolNative:"Q",decimalDigits:2,rounding:0,code:"GTQ",namePlural:"Guatemalan quetzals"},HKD:{symbol:"HK$",name:"Hong Kong Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"HKD",namePlural:"Hong Kong dollars"},HNL:{symbol:"HNL",name:"Honduran Lempira",symbolNative:"L",decimalDigits:2,rounding:0,code:"HNL",namePlural:"Honduran lempiras"},HRK:{symbol:"kn",name:"Croatian Kuna",symbolNative:"kn",decimalDigits:2,rounding:0,code:"HRK",namePlural:"Croatian kunas"},HUF:{symbol:"Ft",name:"Hungarian Forint",symbolNative:"Ft",decimalDigits:0,rounding:0,code:"HUF",namePlural:"Hungarian forints"},IDR:{symbol:"Rp",name:"Indonesian Rupiah",symbolNative:"Rp",decimalDigits:0,rounding:0,code:"IDR",namePlural:"Indonesian rupiahs"},ILS:{symbol:"\u20AA",name:"Israeli New Sheqel",symbolNative:"\u20AA",decimalDigits:2,rounding:0,code:"ILS",namePlural:"Israeli new sheqels"},INR:{symbol:"Rs",name:"Indian Rupee",symbolNative:"\u099F\u0995\u09BE",decimalDigits:2,rounding:0,code:"INR",namePlural:"Indian rupees"},IQD:{symbol:"IQD",name:"Iraqi Dinar",symbolNative:"\u062F.\u0639.\u200F",decimalDigits:0,rounding:0,code:"IQD",namePlural:"Iraqi dinars"},IRR:{symbol:"IRR",name:"Iranian Rial",symbolNative:"\uFDFC",decimalDigits:0,rounding:0,code:"IRR",namePlural:"Iranian rials"},ISK:{symbol:"Ikr",name:"Icelandic Kr\xF3na",symbolNative:"kr",decimalDigits:0,rounding:0,code:"ISK",namePlural:"Icelandic kr\xF3nur"},JMD:{symbol:"J$",name:"Jamaican Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"JMD",namePlural:"Jamaican dollars"},JOD:{symbol:"JD",name:"Jordanian Dinar",symbolNative:"\u062F.\u0623.\u200F",decimalDigits:2,rounding:0,code:"JOD",namePlural:"Jordanian dinars"},JPY:{symbol:"\xA5",name:"Japanese Yen",symbolNative:"\uFFE5",decimalDigits:0,rounding:0,code:"JPY",namePlural:"Japanese yen"},KES:{symbol:"Ksh",name:"Kenyan Shilling",symbolNative:"Ksh",decimalDigits:2,rounding:0,code:"KES",namePlural:"Kenyan shillings"},KHR:{symbol:"KHR",name:"Cambodian Riel",symbolNative:"\u17DB",decimalDigits:2,rounding:0,code:"KHR",namePlural:"Cambodian riels"},KMF:{symbol:"CF",name:"Comorian Franc",symbolNative:"FC",decimalDigits:0,rounding:0,code:"KMF",namePlural:"Comorian francs"},KRW:{symbol:"\u20A9",name:"South Korean Won",symbolNative:"\u20A9",decimalDigits:0,rounding:0,code:"KRW",namePlural:"South Korean won"},KWD:{symbol:"KD",name:"Kuwaiti Dinar",symbolNative:"\u062F.\u0643.\u200F",decimalDigits:2,rounding:0,code:"KWD",namePlural:"Kuwaiti dinars"},KZT:{symbol:"KZT",name:"Kazakhstani Tenge",symbolNative:"\u0442\u04A3\u0433.",decimalDigits:2,rounding:0,code:"KZT",namePlural:"Kazakhstani tenges"},LBP:{symbol:"LB\xA3",name:"Lebanese Pound",symbolNative:"\u0644.\u0644.\u200F",decimalDigits:0,rounding:0,code:"LBP",namePlural:"Lebanese pounds"},LKR:{symbol:"SLRs",name:"Sri Lankan Rupee",symbolNative:"SL Re",decimalDigits:2,rounding:0,code:"LKR",namePlural:"Sri Lankan rupees"},LTL:{symbol:"Lt",name:"Lithuanian Litas",symbolNative:"Lt",decimalDigits:2,rounding:0,code:"LTL",namePlural:"Lithuanian litai"},LVL:{symbol:"Ls",name:"Latvian Lats",symbolNative:"Ls",decimalDigits:2,rounding:0,code:"LVL",namePlural:"Latvian lati"},LYD:{symbol:"LD",name:"Libyan Dinar",symbolNative:"\u062F.\u0644.\u200F",decimalDigits:2,rounding:0,code:"LYD",namePlural:"Libyan dinars"},MAD:{symbol:"MAD",name:"Moroccan Dirham",symbolNative:"\u062F.\u0645.\u200F",decimalDigits:2,rounding:0,code:"MAD",namePlural:"Moroccan dirhams"},MDL:{symbol:"MDL",name:"Moldovan Leu",symbolNative:"MDL",decimalDigits:2,rounding:0,code:"MDL",namePlural:"Moldovan lei"},MGA:{symbol:"MGA",name:"Malagasy Ariary",symbolNative:"MGA",decimalDigits:0,rounding:0,code:"MGA",namePlural:"Malagasy Ariaries"},MKD:{symbol:"MKD",name:"Macedonian Denar",symbolNative:"MKD",decimalDigits:2,rounding:0,code:"MKD",namePlural:"Macedonian denari"},MMK:{symbol:"MMK",name:"Myanma Kyat",symbolNative:"K",decimalDigits:0,rounding:0,code:"MMK",namePlural:"Myanma kyats"},MOP:{symbol:"MOP$",name:"Macanese Pataca",symbolNative:"MOP$",decimalDigits:2,rounding:0,code:"MOP",namePlural:"Macanese patacas"},MUR:{symbol:"MURs",name:"Mauritian Rupee",symbolNative:"MURs",decimalDigits:0,rounding:0,code:"MUR",namePlural:"Mauritian rupees"},MXN:{symbol:"MX$",name:"Mexican Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"MXN",namePlural:"Mexican pesos"},MYR:{symbol:"RM",name:"Malaysian Ringgit",symbolNative:"RM",decimalDigits:2,rounding:0,code:"MYR",namePlural:"Malaysian ringgits"},MZN:{symbol:"MTn",name:"Mozambican Metical",symbolNative:"MTn",decimalDigits:2,rounding:0,code:"MZN",namePlural:"Mozambican meticals"},NAD:{symbol:"N$",name:"Namibian Dollar",symbolNative:"N$",decimalDigits:2,rounding:0,code:"NAD",namePlural:"Namibian dollars"},NGN:{symbol:"\u20A6",name:"Nigerian Naira",symbolNative:"\u20A6",decimalDigits:2,rounding:0,code:"NGN",namePlural:"Nigerian nairas"},NIO:{symbol:"C$",name:"Nicaraguan C\xF3rdoba",symbolNative:"C$",decimalDigits:2,rounding:0,code:"NIO",namePlural:"Nicaraguan c\xF3rdobas"},NOK:{symbol:"Nkr",name:"Norwegian Krone",symbolNative:"kr",decimalDigits:2,rounding:0,code:"NOK",namePlural:"Norwegian kroner"},NPR:{symbol:"NPRs",name:"Nepalese Rupee",symbolNative:"\u0928\u0947\u0930\u0942",decimalDigits:2,rounding:0,code:"NPR",namePlural:"Nepalese rupees"},NZD:{symbol:"NZ$",name:"New Zealand Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"NZD",namePlural:"New Zealand dollars"},OMR:{symbol:"OMR",name:"Omani Rial",symbolNative:"\u0631.\u0639.\u200F",decimalDigits:2,rounding:0,code:"OMR",namePlural:"Omani rials"},PAB:{symbol:"B/.",name:"Panamanian Balboa",symbolNative:"B/.",decimalDigits:2,rounding:0,code:"PAB",namePlural:"Panamanian balboas"},PEN:{symbol:"S/.",name:"Peruvian Nuevo Sol",symbolNative:"S/.",decimalDigits:2,rounding:0,code:"PEN",namePlural:"Peruvian nuevos soles"},PHP:{symbol:"\u20B1",name:"Philippine Peso",symbolNative:"\u20B1",decimalDigits:2,rounding:0,code:"PHP",namePlural:"Philippine pesos"},PKR:{symbol:"PKRs",name:"Pakistani Rupee",symbolNative:"\u20A8",decimalDigits:0,rounding:0,code:"PKR",namePlural:"Pakistani rupees"},PLN:{symbol:"z\u0142",name:"Polish Zloty",symbolNative:"z\u0142",decimalDigits:2,rounding:0,code:"PLN",namePlural:"Polish zlotys"},PYG:{symbol:"\u20B2",name:"Paraguayan Guarani",symbolNative:"\u20B2",decimalDigits:0,rounding:0,code:"PYG",namePlural:"Paraguayan guaranis"},QAR:{symbol:"QR",name:"Qatari Rial",symbolNative:"\u0631.\u0642.\u200F",decimalDigits:2,rounding:0,code:"QAR",namePlural:"Qatari rials"},RON:{symbol:"RON",name:"Romanian Leu",symbolNative:"RON",decimalDigits:2,rounding:0,code:"RON",namePlural:"Romanian lei"},RSD:{symbol:"din.",name:"Serbian Dinar",symbolNative:"\u0434\u0438\u043D.",decimalDigits:0,rounding:0,code:"RSD",namePlural:"Serbian dinars"},RUB:{symbol:"RUB",name:"Russian Ruble",symbolNative:"\u0440\u0443\u0431.",decimalDigits:2,rounding:0,code:"RUB",namePlural:"Russian rubles"},RWF:{symbol:"RWF",name:"Rwandan Franc",symbolNative:"FR",decimalDigits:0,rounding:0,code:"RWF",namePlural:"Rwandan francs"},SAR:{symbol:"SR",name:"Saudi Riyal",symbolNative:"\u0631.\u0633.\u200F",decimalDigits:2,rounding:0,code:"SAR",namePlural:"Saudi riyals"},SDG:{symbol:"SDG",name:"Sudanese Pound",symbolNative:"SDG",decimalDigits:2,rounding:0,code:"SDG",namePlural:"Sudanese pounds"},SEK:{symbol:"Skr",name:"Swedish Krona",symbolNative:"kr",decimalDigits:2,rounding:0,code:"SEK",namePlural:"Swedish kronor"},SGD:{symbol:"S$",name:"Singapore Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"SGD",namePlural:"Singapore dollars"},SOS:{symbol:"Ssh",name:"Somali Shilling",symbolNative:"Ssh",decimalDigits:0,rounding:0,code:"SOS",namePlural:"Somali shillings"},SYP:{symbol:"SY\xA3",name:"Syrian Pound",symbolNative:"\u0644.\u0633.\u200F",decimalDigits:0,rounding:0,code:"SYP",namePlural:"Syrian pounds"},THB:{symbol:"\u0E3F",name:"Thai Baht",symbolNative:"\u0E3F",decimalDigits:2,rounding:0,code:"THB",namePlural:"Thai baht"},TND:{symbol:"DT",name:"Tunisian Dinar",symbolNative:"\u062F.\u062A.\u200F",decimalDigits:2,rounding:0,code:"TND",namePlural:"Tunisian dinars"},TOP:{symbol:"T$",name:"Tongan Pa\u02BBanga",symbolNative:"T$",decimalDigits:2,rounding:0,code:"TOP",namePlural:"Tongan pa\u02BBanga"},TRY:{symbol:"TL",name:"Turkish Lira",symbolNative:"TL",decimalDigits:2,rounding:0,code:"TRY",namePlural:"Turkish Lira"},TTD:{symbol:"TT$",name:"Trinidad and Tobago Dollar",symbolNative:"$",decimalDigits:2,rounding:0,code:"TTD",namePlural:"Trinidad and Tobago dollars"},TWD:{symbol:"NT$",name:"New Taiwan Dollar",symbolNative:"NT$",decimalDigits:2,rounding:0,code:"TWD",namePlural:"New Taiwan dollars"},TZS:{symbol:"TSh",name:"Tanzanian Shilling",symbolNative:"TSh",decimalDigits:0,rounding:0,code:"TZS",namePlural:"Tanzanian shillings"},UAH:{symbol:"\u20B4",name:"Ukrainian Hryvnia",symbolNative:"\u20B4",decimalDigits:2,rounding:0,code:"UAH",namePlural:"Ukrainian hryvnias"},UGX:{symbol:"USh",name:"Ugandan Shilling",symbolNative:"USh",decimalDigits:0,rounding:0,code:"UGX",namePlural:"Ugandan shillings"},UYU:{symbol:"$U",name:"Uruguayan Peso",symbolNative:"$",decimalDigits:2,rounding:0,code:"UYU",namePlural:"Uruguayan pesos"},UZS:{symbol:"UZS",name:"Uzbekistan Som",symbolNative:"UZS",decimalDigits:0,rounding:0,code:"UZS",namePlural:"Uzbekistan som"},VEF:{symbol:"Bs.F.",name:"Venezuelan Bol\xEDvar",symbolNative:"Bs.F.",decimalDigits:2,rounding:0,code:"VEF",namePlural:"Venezuelan bol\xEDvars"},VND:{symbol:"\u20AB",name:"Vietnamese Dong",symbolNative:"\u20AB",decimalDigits:0,rounding:0,code:"VND",namePlural:"Vietnamese dong"},XAF:{symbol:"FCFA",name:"CFA Franc BEAC",symbolNative:"FCFA",decimalDigits:0,rounding:0,code:"XAF",namePlural:"francs CFA"},XOF:{symbol:"CFA",name:"CFA Franc BCEAO",symbolNative:"CFA",decimalDigits:0,rounding:0,code:"XOF",namePlural:"francs CFA"},YER:{symbol:"YR",name:"Yemeni Rial",symbolNative:"\u0631.\u064A.\u200F",decimalDigits:0,rounding:0,code:"YER",namePlural:"Yemeni rials"},ZAR:{symbol:"R",name:"South African Rand",symbolNative:"R",decimalDigits:2,rounding:0,code:"ZAR",namePlural:"South African rand"},ZMK:{symbol:"ZK",name:"Zambian Kwacha",symbolNative:"ZK",decimalDigits:0,rounding:0,code:"ZMK",namePlural:"Zambian kwachas"}};var x=t=>t&&typeof t=="object"&&!Array.isArray(t)&&t.name&&typeof t.name=="string"&&t.symbol&&typeof t.symbol=="string";var Xe="%v %s",Me=t=>{let e=E.get("currencyFormat");return e&&typeof e=="string"&&e.includes("%v")?e:t!==false?Xe:""};function _e(t){return t=t&&typeof t=="string"?t.trim():"",E.set("currencyFormat",t)}var kt=t=>{if(!x(t)){let r=typeof t=="object"&&t&&!Array.isArray(t)?c(t.code,t.name):typeof t=="string"?t:void 0;r&&(r=r.trim().toUpperCase()),r&&x(O[r])?t=O[r]:typeof t=="string"&&(r=t.trim().toUpperCase(),x(O[r])&&(t=O[r]));}let e=Object.assign({},t);if(!e.format){let r=Me();r&&(e.format=r);}return e.format&&_e(e.format),E.set("appConfigCurrency",e),e},Et=()=>{var i,n,o,s;let t=Object.assign({},E.get("appConfigCurrency")),e=E.get("currencyCode");if(m(e)&&x(O[e.trim().toUpperCase()])&&(t=I(I({},O[e.trim().toUpperCase()]),t)),!m(t==null?void 0:t.format)){let l=Me(false);m(l)&&l.includes("%v")&&(t.format=l);}let a=O["USD"];return I(I({symbol:a.symbol,format:(i=a.format)!=null?i:"%v %s",decimalSeparator:(n=a.decimalSeparator)!=null?n:".",thousandSeparator:(o=a.thousandSeparator)!=null?o:",",decimalDigits:(s=a.decimalDigits)!=null?s:0},Object.assign({},re.get("currencies"))),t)},K={getFormat:Me,setFormat:_e,setCurrency:kt,getCurrency:Et,defaultCurrencyFormat:Xe};var xt=t=>t&&typeof t=="object";function Ne(t){let e=Object.assign({},K.getCurrency());if(t&&xt(t))for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r]!==void 0&&(e[r]=t[r]);if(m(e.format)){let r=rt(e.format);r.format&&(e.format=r.format),typeof r.decimalDigits=="number"&&(e.decimalDigits=r.decimalDigits);}return e}function Te(t,e){return t=typeof t=="number"?t:0,e=typeof e=="number"?e:0,t=Math.round(Math.abs(t)),isNaN(t)?e:t}function Bt(t){let e=K.getCurrency(),r=(e==null?void 0:e.format).toLowerCase();return typeof t=="string"&&(t=t.toLowerCase()),(typeof t!="string"||!t.match("%v"))&&(t=r),{pos:t,neg:t.replace("-","").replace("%v","-%v"),zero:t}}var ye=(t,e)=>{let r=K.getCurrency();if(t=t||0,typeof t=="number")return t;e=e||r.decimalSeparator;let a=new RegExp("[^0-9-"+e+"]","g"),i=parseFloat((""+t).replace(/\((?=\d+)(.*)\)/,"-$1").replace(a,"").replace(e,"."));return isNaN(i)?0:i},Se=(t,e)=>{let r=K.getCurrency();e=Te(e,r.decimalDigits);let i=String(t).replace(/[^\d.-]/g,"");if(i.length>15&&!i.includes("."))return i+"."+"0".repeat(e);try{let n=Number(i);if(isNaN(n))return "NaN";let o=+(n+"e"+e);return (+(Math.round(o)+"e-"+e)).toFixed(e)}catch(n){return "NaN"}},et=(t,e,r,a)=>{var u;t=ye(t);let i=x(e)?e:K.getCurrency();typeof e=="number"&&(i.decimalDigits=e),typeof i.decimalDigits!="number"&&(i.decimalDigits=(u=String(t).split(".")[1])==null?void 0:u.length),r!==void 0&&(i.thousandSeparator=r),a!==void 0&&(i.decimalSeparator=a);let n=Ne(i),o=Te(n.decimalDigits),s=t<0?"-":"",l=parseInt(Se(Math.abs(t||0),o),10)+"",d=l.length>3?l.length%3:0,g="";if(o){let f=String(parseFloat(Se(Math.abs(t),o))||0);f.includes(".")&&(g=c(f.split(".")[1]).trim());}return s+(d?l.substring(0,d)+n.thousandSeparator:"")+l.substring(d).replace(/(\d{3})(?=\d)/g,"$1"+n.thousandSeparator)+(o&&g?n.decimalSeparator+g:"")},tt=(t,e,r,a,i,n)=>{t=ye(t);let o=x(e)?e:K.getCurrency();e!==void 0&&typeof e=="string"&&(o.symbol=e),r!==void 0&&(o.decimalDigits=r),a!==void 0&&(o.thousandSeparator=a),i!==void 0&&(o.decimalSeparator=i),m(n)&&(o.format=n);let s=Ne(o),l=Bt(s.format),d=c(t>0?l.pos:t<0?l.neg:l.zero),g=c(s.symbol),u=d.replace(g&&"%s",g),f=et(Math.abs(t),Te(s.decimalDigits),s.thousandSeparator,s.decimalSeparator),b=u.replace("%v",f);return X(I({},s),{formattedValue:u,formattedNumber:f,symbol:s.symbol,usedFormat:d,result:b})},Ht=(t,e,r,a,i,n)=>tt(t,e,r,a,i,n).result,rt=t=>{t=c(t).trim();let e={};if(t){let r=/(\.)(\#{0,9}\s*$)/,a=t.match(r);Array.isArray(a)&&a.length===3&&(e.decimalDigits=c(a[2]).trim().length),t=t.replace(r,"");}return e.format=t,e},q={parse:ye,session:K,formatMoney:Ht,currencies:O,isCurrency:x,formatNumber:et,formatMoneyAsObject:tt,unformat:ye,toFixed:Se,prepareOptions:Ne,parseFormat:rt};var{currencies:at}=q;Number.prototype.countDecimals=function(){let t=String(this.toString()).match(/\.(\d+)/);return t?t[1].length:0};Number.prototype.formatNumber=function(t,e,r){return q.formatNumber(this.valueOf(),t,e,r)};Number.prototype.formatMoney=function(t,e,r,a,i){return q.formatMoney(this.valueOf(),t,e,r,a,i)};var Kt=(t,e,r,a)=>{var S;if(t===null||typeof t!="number"||isNaN(t))return {result:"",format:"",suffix:"",formattedValue:"",minAbreviationDecimalDigits:0,value:NaN};if(!isFinite(t)){let P=t>0?"\u221E":"-\u221E";return {result:P,value:t,format:"",suffix:"",formattedValue:P,minAbreviationDecimalDigits:0}}let i=Math.abs(t)<1e3,n=[{value:1e12,suffix:"T"},{value:1e9,suffix:"B"},{value:1e6,suffix:"M"},{value:1e3,suffix:"K"},{value:1,suffix:""}],o=t.countDecimals?t.countDecimals():Math.floor(t)===t?0:((S=t.toString().split(".")[1])==null?void 0:S.length)||0,s=n.find(P=>Math.abs(t)>=P.value)||n[n.length-1],l=i?t:t/(s.value===1?1:s.value),d=s.suffix,g=Vt(l,5);if(t===0)return {result:"0",value:0,format:"",suffix:"",formattedValue:"0",minAbreviationDecimalDigits:0};let f=T(e)&&e>0?e:s.value===1?Math.min(o,5):Math.max(g,0),b=l.toFixed(f);r=c(r),a=c(a,".");let p=b.toString().split(".");return p[0]=p[0].replace(/\B(?=(\d{3})+(?!\d))/g,r),f>0&&p.length===1?p.push("0".repeat(f)):f>0&&p.length>1&&p[1].length<f&&(p[1]=p[1].padEnd(f,"0")),b=p.join(a),{result:b+d,value:t,format:d,suffix:d,formattedValue:b,minAbreviationDecimalDigits:g}};function Vt(t,e){let r=Math.abs(t);if(Number.isInteger(r))return 0;let a=r.toString().split(".")[1]||"",i=0;for(;i<a.length&&a[i]==="0";)i++;return r<1&&i>0?Math.min(i+e,a.length):Math.min(e,a.length)}var it=(t,e,r,a)=>Kt(t,e,r,a).result;Number.prototype.abreviate2FormatNumber=function(t,e,r){return it(this.valueOf(),t,e,r)};var nt=(t,e,r,a,i,n)=>{if(!T(t))return "";let l=q.formatMoneyAsObject(t,e,r,a,i,n),{formattedValue:o}=l,s=se(l,["formattedValue"]);return o.replace("%v",it(t,s.decimalDigits,s.thousandSeparator,s.decimalSeparator))};Number.prototype.abreviate2FormatMoney=function(t,e,r,a,i){return nt(this.valueOf(),t,e,r,a,i)};Object.keys(at).forEach(t=>{let e=t,r=at[e],a=`format${e}`,i=`abreviate2Format${e}`;Number.prototype[a]=function(n,o,s,l){return q.formatMoney(this.valueOf(),r,n,o,s,l)},Number.prototype[i]=function(n,o,s,l){return nt(this.valueOf(),r,n,o,s,l)};});var V=dt__default.default.PhoneNumberUtil.getInstance(),Ut=dt__default.default.AsYouTypeFormatter,M=/\d/,ot=/[a-zA-Z]/,h=class h{static formatValue(l){var d=l,{value:e,type:r,format:a,dateFormat:i,phoneCountryCode:n,abreviateNumber:o}=d,s=se(d,["value","type","format","dateFormat","phoneCountryCode","abreviateNumber"]);let g=r&&["decimal","numeric","number"].includes(String(r).toLowerCase()),u=e,f={};e=qe(e)?"":e,e||(u=g?0:String(e)),g&&(u=h.parseDecimal(e));let b=W(e)?String(e):D.isDateObj(e)?e:ae(e,{escapeString:false});if(typeof a=="function")b=a(X(I({},s),{dateFormat:i,phoneCountryCode:n,type:r,value:e}));else {let p=String(r).toLowerCase();if(i||["time","date","datetime"].includes(p)){i=c(i,p==="time"?D.getDefaultTimeFormat():p==="date"?D.getDefaultDateFormat():D.getDefaultDateTimeFormat());let N=D.parseDate(e);N&&(b=D.formatDate(N,i),f.dateValue=N),f.dateFormat=i;}else if(p==="tel"){let N=h.formatPhoneNumber(e,n);b=c(N,b),f.phoneCountryCode=c(n);let S=h.parsePhoneNumber(N,n);S?(f.dialCode=S.getCountryCode()+"",f.phoneCountryCode=c(V.getRegionCodeForNumber(S),n)):n&&(f.dialCode=h.getCountryDialCode(n)),f.phoneNumber=h.prefixPhoneNumberWithDialCode(b,f.dialCode).replace(/\s/g,"");}if(T(u)){let N=`abreviate2${c(a,"FormatNumber").trim().upperFirst()}`;o&&typeof Number.prototype[N]=="function"?b=u[N]():m(a)&&typeof Number.prototype[a]=="function"?b=u[a]():b=u.formatNumber();}}return I({formattedValue:b,isDecimalType:g,value:e,format:a,parsedValue:u,decimalValue:typeof u=="number"?u:0},f)}static getCountryDialCode(e){var a;let r=c((a=$.getCountry(e))==null?void 0:a.dialCode);if(r)return r;try{let i=V.getCountryCodeForRegion(e);if(i!==0)return i.toString()}catch(i){}return ""}static formatValueAsString(e){let{formattedValue:r}=h.formatValue(e);return r}static isValidMask(e){return Array.isArray(e)||typeof e=="function"}static normalizeNumber(e,r="."){return typeof e=="number"?e.toString():!e||e==null||e==null?"0":String(e).trim().replace(/\s/g,"").replace(/[,٫·]/g,r)}static formatWithMask(e){e=Object.assign({},e);let{value:r,maskAutoComplete:a,placeholderCharacter:i,mask:n,validate:o,obfuscationCharacter:s}=e,l=_(r)||r===void 0?"":["number","boolean","string"].includes(typeof r)?r.toString():r===null?"":(r==null?void 0:r.toString())||String(r),d=c(l),g=typeof n=="function"?n(X(I({},e),{value:d})):n,u=Array.isArray(g)?g:[],f=c(i,"_").charAt(0),b="";u.map(w=>{b+=String(m(w)?w:Array.isArray(w)&&m(w[1])?w[1]:f).charAt(0);});let p=b,N=true,S=w=>typeof o=="function"?o(w):true;if(!u.length||!d)return {maskHasObfuscation:false,maskedPlaceholder:p,masked:d,unmasked:d,obfuscated:d,maskArray:u,placeholder:b,isValid:N&&S(d),nonRegexReplacedChars:[]};let P="",R="",B="",A=0,Y=0,Pe=false,ut=b.length,Ae=[];for(;A<u.length&&!(Y>=d.length);){let w=u[A],z=d[Y],ie=[],{isValid:ve,masked:ge,obfuscated:yt,isMaskRegex:Ye}=st({maskChar:w,nonRegexReplacedChars:ie,valueChar:z,obfuscationCharacter:s,valueCharIndex:Y,maskCharIndex:A});P+=ge,R+=yt,B+=z,Ye&&ut>Y&&(p=p.substring(0,A)+ge+p.substring(Y+1)),A+=1,Y+=1;let Re=false;if(a&&!Ye&&A<u.length&&Y<u.length&&Y==d.length&&z!==ge){let ne=st({maskChar:u[A],nonRegexReplacedChars:[],valueChar:z,obfuscationCharacter:s,valueCharIndex:Y,maskCharIndex:A});ne.isMaskRegex&&ne.isValid&&ne.masked==z&&(P+=z,R+=ne.obfuscated,A+=1,Y+=1,ve=true,delete ie[0],Re=true);}if(ie[0]&&Ae.push(...ie),ve||(N=false),Re)break}return {masked:P,nonRegexReplacedChars:Ae,isValid:N&&S(d),maskHasObfuscation:Pe,placeholder:b,maskedPlaceholder:p,unmasked:B,obfuscated:R,maskArray:u}}static createDateMask(e){e=c(e);let r=h.MOMENT_MASKS_MAP,a=h.MOMENT_SEPARATOR_MAP,i=[],n="",o=0;for(;o<e.length;){if(a[e[o]]){n&&(i.push(...r[n]||[]),n=""),i.push(a[e[o]]),o++;continue}if(n+=e[o],r[n]){i.push(...r[n]),n="",o++;continue}Object.keys(r).some(s=>n&&s.startsWith(n))||n&&(i.push(...n.split("")),n=""),o++;}return n&&r[n]&&i.push(...r[n]),{mask:i,validate:s=>{if(!e||!m(s))return false;try{let l=G__default.default(s,e,!0);return l.isValid()&&l.format(e)===s}catch(l){}return false}}}static createPhoneNumberMask(e,r){let a=$.getPhoneNumberExample(e);if(m(a)){let i=h.createPhoneNumberMaskFromExample(a,e);if(i.mask.length)return i}if(!m(e))return {mask:[],validate:()=>false};try{let i=h.getPhoneNumberExample(e);if(!i)return {mask:[],validate:()=>!1};let n=r||dt.PhoneNumberFormat.INTERNATIONAL,o=V.format(i,n),s=i.getCountryCode()+"";return {dialCode:s,mask:ct(o,s),validate:l=>h.isValidPhoneNumber(l,e),countryCode:e}}catch(i){return {mask:[],validate:()=>false}}}static getPhoneNumberExample(e){if(!m(e))return null;let r=$.getPhoneNumberExample(e);if(m(r))return h.parsePhoneNumber(r);try{return V.getExampleNumber(e)}catch(a){return null}}static createPhoneNumberMaskFromExample(e,r,a){let i=lt(h.parsePhoneNumber(e,r),a);return i.mask.length>0?i:m(r)?lt(h.getPhoneNumberExample(r),a):{mask:[],validate:()=>false}}static parsePhoneNumber(e,r){e=c(e);try{return V.parse(e,c(r).toLowerCase())}catch(a){return null}}static prefixPhoneNumberWithDialCode(e,r){return typeof e!="string"?"":m(r)?(r="+"+r.ltrim("+"),!e.startsWith(r)&&!e.trim().startsWith("+")?r.trim()+" "+e.ltrim(" "):e):e}static isValidPhoneNumber(e,r){let a=this.parsePhoneNumber(e,r);return a?V.isValidNumber(a):false}static formatPhoneNumber(e,r){e=c(e);try{let a=new Ut(c(r).toLowerCase().trim());a.clear();let i="";return e.replace(/-/g,"").replace(/ /g,"").replace(/\(/g,"").replace(/\)/g,"").split("").forEach(n=>{i=a.inputDigit(n);}),i||null}catch(a){return U.log(a," input formatter formatting phone number phoneNumber =",e,", countryCode=",r),null}}static cleanPhoneNumber(e){return m(e)?e.trim().replace(/\s/g,""):""}static extractDialCodeFromPhoneNumber(e,r){try{let a=h.parsePhoneNumber(e,r);if(a)return a.getCountryCode()+""}catch(a){}return ""}static isNumericString(e){return m(e)&&!Number.isNaN(parseFloat(e))&&Number.isFinite(Number(e))}static extractNumbersFromString(e){return m(e)?e.replace(/\D/g,""):""}};h.parseDecimal=e=>{if(typeof e=="number")return e;if(e==null||e==null||!e||typeof e!="string")return 0;let r=parseFloat(h.normalizeNumber(e));return typeof r=="number"&&!Number.isNaN(r)?r:0},h.endsWithDecimalSeparator=e=>{let r=String(e).trim().replace(/\s/g,"");return r.endsWith(".")||r.endsWith(",")||r.endsWith("\u066B")},h.MOMENT_MASKS_MAP={YYYY:Array(4).fill([M,"Y"]),YY:Array(2).fill([M,"Y"]),MM:Array(2).fill([M,"M"]),M:[[M,"M"]],MMMM:Array(9).fill([ot,"M"]),MMM:Array(3).fill([ot,"M"]),DD:Array(2).fill([M,"D"]),D:[[M,"D"]],HH:Array(2).fill([M,"H"]),H:[[M,"H"]],hh:Array(2).fill([M,"h"]),h:[[M,"h"]],mm:Array(2).fill([M,"m"]),m:[[M,"m"]],ss:Array(2).fill([M,"s"]),s:[[M,"s"]],SSS:Array(3).fill([M,"S"]),Z:[/[+-]/,M,M,M,M],ZZ:[/[+-]/,M,M,M,M],A:["A","M"],a:["a","m"]},h.MOMENT_SEPARATOR_MAP={"/":"/","-":"-",".":"."," ":" ",":":":",T:"T"},h.SINGLE_SPACE_MASK=" ",h.MASKS_WITH_VALIDATIONS={get DATE(){return h.createDateMask(D.getDefaultDateFormat())},get TIME(){return h.createDateMask(D.getDefaultTimeFormat())},get DATE_TIME(){return h.createDateMask(D.getDefaultDateTimeFormat())},CREDIT_CARD:{mask:[/\d/,/\d/,/\d/,/\d/," ",[/\d/],[/\d/],[/\d/],[/\d/]," ",[/\d/],[/\d/],[/\d/],[/\d/]," ",/\d/,/\d/,/\d/,/\d/],validate:()=>true}};var fe=h,ct=(t,e)=>{e=c(e),e&&(e="+"+e.ltrim("+")),fe.cleanPhoneNumber(t).startsWith(e);let a=[...e?t.substring(e.length):t].map(i=>/\d/.test(i)?/\d/:i);return e?[...e,...a]:a};function st({maskChar:t,valueChar:e,nonRegexReplacedChars:r,obfuscationCharacter:a,valueCharIndex:i,maskCharIndex:n}){let o=false,s=true,l="",d="",g=t,u=false;if(typeof t=="object"){let f=c(Array.isArray(t)?t[2]:void 0,a).charAt(0),b=Array.isArray(t)&&t[2]!==false&&f;b&&(o=true);let p=Array.isArray(t)?t[0]:t,N=String(p);g=p;try{let S=Z(p);u=S;let P=S&&RegExp(p).test(e),R=!S&&N===e,B=P||R,A=S?e:N;B||(s=!1),(P||!S)&&(l=A,d=b?f:A,!S&&!R&&r.push({index:i,maskIndex:n,from:e,to:N,valueChar:e,maskChar:t}));}catch(S){}}else m(t)?(l=t,d=t,t!==e&&(s=false,r.push({index:i,maskIndex:n,from:e,to:t,valueChar:e,maskChar:t}))):s=false;return {maskHasObfuscation:o,isMaskRegex:u,mask:g,isValid:s,masked:l,obfuscated:d,nonRegexReplacedChars:r}}function lt(t,e){try{if(t){let r=e||dt.PhoneNumberFormat.INTERNATIONAL,a=V.format(t,r);if(m(a)){let i=V.getRegionCodeForNumber(t),n=t.getCountryCode()+"";return {dialCode:n,mask:ct(a,n),validate:o=>fe.isValidPhoneNumber(o,i),countryCode:i}}}}catch(r){}return {mask:[],validate:()=>false}}exports.InputFormatter=fe;
|