*/varCe,Ge;functionke(){if(Ge)returnCe;Ge=1;letn=Ze();constt=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,p=["currency","percent","byte","time","ordinal","number"],d=["trillion","billion","million","thousand"],v=["prefix","infix","postfix"],y=["sign","parenthesis"],O={type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},g={output:{type:"string",validValues:p},base:{type:"string",validValues:["decimal","binary","general"],restriction:(D,F)=>F.output==="byte",message:"`base` must be provided only when the output is `byte`",mandatory:D=>D.output==="byte"},characteristic:{type:"number",restriction:D=>D>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:d},average:"boolean",lowPrecision:{type:"boolean",restriction:(D,F)=>F.average===!0,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:v},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:D=>D>=0,message:"value must be positive"},{restriction:(D,F)=>!F.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:D=>D>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:y},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(D,F)=>F.output==="percent",message:"`prefixSymbol` can be provided only when the output is `percent`"}},B={languageTag:{type:"string",mandatory:!0,restriction:D=>D.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:O,spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};functionT(D,F){letL=_(D),Q=X(F);returnL&&Q}function_(D){returnn.unformat(D)!==void0}functionA(D,F,L,Q=!1){lette=Object.keys(D).map(R=>{if(!F[R])returnconsole.error(`${L} Invalid key: ${R}`),!1;letN=D[R],x=F[R];if(typeofx=="string"&&(x={type:x}),x.type==="format"){if(!A(N,g,`[Validate ${R}]`,!0))return!1}elseif(typeofN!==x.type)returnconsole.error(`${L}${R} type mismatched: "${x.type}" expected, "${typeofN}" provided`),!1;if(x.restrictions&&x.restrictions.length){letC=x.restrictions.length;for(letI=0;I<C;I++){let{restriction:S,message:W}=x.restrictions[I];if(!S(N,D))returnconsole.error(`${L}${R} invalid value: ${W}`),!1}}returnx.restriction&&!x.restriction(N,D)?(console.error(`${L}${R} invalid value: ${x.message}`),!1):x.validValues&&x.validValues.indexOf(N)===-1?(console.error(`${L}${R} invalid value: must be among ${JSON.stringify(x.validValues)}, "${N}" provided`),!1):!(x.children&&!A(N,x.children,`[Validate ${R}]`))});returnQ||te.push(...Object.keys(F).map(R=>{letN=F[R];if(typeofN=="string"&&(N={type:N}),N.mandatory){letx=N.mandatory;if(typeofx=="function"&&(x=x(D)),x&&D[R]===void0)returnconsole.error(`${L} Missing mandatory key "${R}"`),!1}return!0})
*/varPe,je;functionRe(){if(je)returnPe;je=1;constn=et(),t=ke(),p=Ue;letd={},v,y={},O=null,M={};functionw(B){v=B}functiong(){returny[v]}returnd.languages=()=>Object.assign({},y),d.currentLanguage=()=>v,d.currentBytes=()=>g().bytes||{},d.currentCurrency=()=>g().currency,d.currentAbbreviations=()=>g().abbreviations,d.currentDelimiters=()=>g().delimiters,d.currentOrdinal=()=>g().ordinal,d.currentDefaults=()=>Object.assign({},g().defaults,M),d.currentOrdinalDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().ordinalFormat),d.currentByteDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().byteFormat),d.currentPercentageDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().percentageFormat),d.currentCurrencyDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().currencyFormat),d.currentTimeDefaultFormat=()=>Object.assign({},d.currentDefaults(),g().timeFormat),d.setDefaults=B=>{B=p.parseFormat(B),t.validateFormat(B)&&(M=B)},d.getZeroFormat=()=>O,d.setZeroFormat=B=>O=typeofB=="string"?B:null,d.hasZeroFormat=()=>O!==null,d.languageData=B=>{if(B){if(y[B])returny[B];thrownewError(`Unknown tag "${B}"`)}returng()},d.registerLanguage=(B,T=!1)=>{if(!t.validateLanguage(B))thrownewError("Invalid language data");y[B.languageTag]=B,T&&w(B.languageTag)},d.setLanguage=(B,T=n.languageTag)=>{if(!y[B]){let_=B.split("-")[0],A=Object.keys(y).find(X=>X.split("-")[0]===_);if(!y[A]){w(T);return}w(A);return}w(B)},d.registerLanguage(n),v=n.languageTag,Pe=d,Pe}functionyt(n){thrownewError('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}/*!
*/functionvt(n,t){n.forEach(p=>{letd;try{d=yt(`../languages/${p}`)}catch{console.error(`Unable to load "${p}". No matching language file found.`)}d&&t.registerLanguage(d)})}varwt=n=>({loadLanguagesInNode:t=>vt(t,n)}),ze={exports:{}};(function(n){(function(t){varp,d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,v=Math.ceil,y=Math.floor,O="[BigNumber Error] ",M=O+"Number primitive has more than 15 significant digits: ",w=1e14,g=14,B=9007199254740991,T=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,A=1e9;functionX(N){varx,C,I,S=b.prototype={constructor:b,toString:null,valueOf:null},W=newb(1),q=20,G=4,ee=-7,re=21,he=-1e7,ae=1e7,pe=!1,ve=1,ce=0,$e={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"",suffix:""},ge="0123456789abcdefghijklmnopqrstuvwxyz",Me=!0;functionb(e,r){vari,f,l,s,h,a,o,c,u=this;if(!(uinstanceofb))returnnewb(e,r);if(r==null){if(e&&e._isBigNumber===!0){u.s=e.s,!e.c||e.e>ae?u.c=u.e=null:e.e<he?u.c=[u.e=0]:(u.e=e.e,u.c=e.c.slice());return}if((a=typeofe=="number")&&e*0==0){if(u.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,h=e;h>=10;h/=10,s++);s>ae?u.c=u.e=null:(u.e=s,u.c=[e]);return}c=String(e)}else{if(!d.test(c=String(e)))returnI(u,c,a);u.s=c.charCodeAt(0)==45?(c=c.slice(1),-1):1}(s=c.indexOf("."))>-1&&(c=c.replace(".","")),(h=c.search(/e/i))>0?(s<0&&(s=h),s+=+c.slice(h+1),c=c.substring(0,h)):s<0&&(s=c.length)}else{if(L(r,2,ge.length,"Base"),r==10&&Me)returnu=newb(e),ne(u,q+u.e+1,G);if(c=String(e),a=typeofe=="number"){if(e*0!=0)returnI(u,c,a,r);if(u.s=1/e<0?(c=c.slice(1),-1):1,b.DEBUG&&c.replace(/^0\.0*|\./,"").length>15)throwError(M+e)}elseu.s=c.charCodeAt(0)===45?(c=c.slice(1),-1):1;for(i=ge.slice(0,r),s=h=0,o=c.length;h<o;h++)if(i.indexOf(f=c.charAt(h))<0){if(f=="."){if(h>s){s=o;continue}}elseif(!l&&(c==c.toUpperCase()&&(c=c.toLowerCase())||c==c.toLowerCase()&&(c=c.toUpperCase()))){l=!0,h=-1,s=0;continue}returnI(u,String(e),a,r)}a=!1,c=C(c,r,10,u.s),(s=c.indexOf("."))>-1?c=c.replace(".",""):s=c.length}for(h=0;c.charCodeAt(h)===48;h++);for(o=c.length;c.charCodeAt(--o)===48;);if(c=c.slice(h,++o)){if(o-=h,a&&b.DEBUG&&o>15&&(e>B||e!==y(e)))throwError(M+u.s*e);if((s=s-h-1)>ae)u.c=u.e=null;elseif(s<he)u.c=[u.e=0];else{if(u.e=s,u.c=[],h=(s+1)%g,s<0&&(h+=g),h<o){for(h&&u.c.push(+c.slice(0,h)),o-=g;h<o;)u.c.push(+c.slice(h,h+=g));h=g-(c=c.slice(h)).length}elseh-=o;for(;h--;c+="0");u.c.push(+c)}}elseu.c=[u.e=0]}b.clone=X,b.ROUND_UP=0,b.ROUND_DOWN=1,b.ROUND_CEIL=2,b.ROUND_FLOOR=3,b.ROUND_HALF_UP=4,b.ROUND_HALF_DOWN=5,b.ROUND_HALF_EVEN=6,b.ROUND_HALF_CEIL=7,b.ROUND_HALF_FLOOR=8,b.EUCLID=9,b.config=b.set=function(e){varr,i;if(e!=null)if(typeofe=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(i=e[r],L(i,0,A,r),q=i),e.hasOwnProperty(r="ROUNDING_MODE")&&(i=e[r],L(i,0,8,r),G=i),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(i=e[r],i&&i.pop?(L(i[0],-A,0,r),L(i[1],0,A,r),ee=i[0],re=i[1]):(L(i,-A,A,r),ee=-(re=i<0?-i:i))),e.hasOwnProperty(r="RANGE"))if(i=e[r],i&&i.pop)L(i[0],-A,-1,r),L(i[1],1,A,r),he=i[0],ae=i[1];elseif(L(i,-A,A,r),i)he=-(ae=i<0?-i:i);elsethrowError(O+r+" cannot be zero: "+i);if(e.hasOwnProperty(r="CRYPTO"))if(i=e[r],i===!!i)if(i)if(typeofcrypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))pe=i;elsethrowpe=!i,Error(O+"crypto unavailable");elsepe=i;elsethrowError(O+r+" not true or false: "+i);if(e.hasOwnProperty(r="MODULO_MODE")&&(i=e[r],L(i,0,9,r),ve=i),e.hasOwnProperty(r="POW_PRECISION")&&(i=e[r],L(i,0,A,r),ce=i),e.hasOwnProperty(r="FORMAT"))if(i=e[r],typeofi=="object")$e=i;elsethrowError(O+r+" not an object: "+i);if(e.hasOwnProperty(r="ALPHABET"))if(i=e[r],typeofi=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(i))Me=i.slice(0,10)=="0123456789",ge=i;elsethrowError(O+r+" invalid: "+i)}elsethrowError(O+"Object expected: "+e);return{DECIMAL_PLACES:q,ROUNDING_MODE:G,EXPONENTIAL_AT:[ee,re],RANGE:[he,ae],CRYPTO:pe,MODULO_MODE:ve,POW_PRECISION:ce,FORMAT:$e,ALPHABET:ge}},b.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!b.DEBUG)return!0;varr,i,f=e.c,l=e.e,s=e.s;e: