2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
|
import{c as e,u as n}from"./c.743a15a1.js";import"./c.2610e8cd.js";import{t as a}from"./c.a0946910.js";var r=/-u(?:-[0-9a-z]{2,8})+/gi;function t(e,n,a){if(void 0===a&&(a=Error),!e)throw new a(n)}function o(e,n){for(var a=n;;){if(e.has(a))return a;var r=a.lastIndexOf("-");if(!~r)return;r>=2&&"-"===a[r-2]&&(r-=2),a=a.slice(0,r)}}function s(e,n){t(2===n.length,"key must have 2 elements");var a=e.length,r="-".concat(n,"-"),o=e.indexOf(r);if(-1!==o){for(var s=o+4,l=s,i=s,f=!1;!f;){var c=e.indexOf("-",i);2===(-1===c?a-i:c-i)?f=!0:-1===c?(l=a,f=!0):(l=c,i=c+1)}return e.slice(s,l)}if(r="-".concat(n),-1!==(o=e.indexOf(r))&&o+3===a)return""}function l(e,n,a,l,i,f){var c;c="lookup"===a.localeMatcher?function(e,n,a){for(var t={locale:""},s=0,l=n;s<l.length;s++){var i=l[s],f=i.replace(r,""),c=o(e,f);if(c)return t.locale=c,i!==f&&(t.extension=i.slice(f.length+1,i.length)),t}return t.locale=a(),t}(e,n,f):function(e,n,a){var t,s={},l={},i={},f=new Set;e.forEach((function(e){var n=new Intl.Locale(e).minimize().toString(),a=Intl.getCanonicalLocales(e)[0]||e;s[n]=e,l[e]=e,i[a]=e,f.add(n),f.add(e),f.add(a)}));for(var c=0,u=n;c<u.length;c++){var d=u[c];if(t)break;var m=d.replace(r,"");if(e.has(m)){t=m;break}if(f.has(m)){t=m;break}var h=new Intl.Locale(m),v=h.maximize().toString(),L=h.minimize().toString();if(f.has(L)){t=L;break}t=o(f,v)}return t?{locale:l[t]||i[t]||s[t]||t}:{locale:a()}}(e,n,f);for(var u=c.locale,d={locale:"",dataLocale:u},m="-u",h=0,v=l;h<v.length;h++){var L=v[h];t(u in i,"Missing locale data for ".concat(u));var g=i[u];t("object"==typeof g&&null!==g,"locale data ".concat(L," must be an object"));var p=g[L];t(Array.isArray(p),"keyLocaleData for ".concat(L," must be an array"));var b=p[0];t("string"==typeof b||null===b,"value must be string or null but got ".concat(typeof b," in key ").concat(L));var k="";if(c.extension){var E=s(c.extension,L);void 0!==E&&(""!==E?~p.indexOf(E)&&(b=E,k="-".concat(L,"-").concat(b)):~E.indexOf("true")&&(b="true",k="-".concat(L)))}if(L in a){var M=a[L];t("string"==typeof M||null==M,"optionsValue must be String, Undefined or Null"),~p.indexOf(M)&&M!==b&&(b=M,k="")}d[L]=b,m+=k}if(m.length>2){var S=u.indexOf("-x-");if(-1===S)u+=m;else{var C=u.slice(0,S),y=u.slice(S,u.length);u=C+m+y}u=Intl.getCanonicalLocales(u)[0]}return d.locale=u,d}function i(e,n,a,r){return l(n.reduce((function(e,n){return e.add(n),e}),new Set),function(e){return Intl.getCanonicalLocales(e)}(e),{localeMatcher:(null==r?void 0:r.algorithm)||"best fit"},[],{},(function(){return a})).locale}var f=Object.freeze({__proto__:null,match:i,LookupSupportedLocales:function(e,n){for(var a=[],t=0,s=n;t<s.length;t++){var l=o(e,s[t].replace(r,""));l&&a.push(l)}return a},ResolveLocale:l}),c=["af","ak","am","an","ar","ars","as","asa","ast","az","bal","be","bem","bez","bg","bho","bm","bn","bo","br","brx","bs","ca","ce","ceb","cgg","chr","ckb","cs","cy","da","de","doi","dsb","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fil","fo","fr","fur","fy","ga","gd","gl","gsw","gu","guw","gv","ha","haw","he","hi","hnj","hr","hsb","hu","hy","ia","id","ig","ii","io","is","it","iu","ja","jbo","jgo","jmc","jv","jw","ka","kab","kaj","kcg","kde","kea","kk","kkj","kl","km","kn","ko","ks","ksb","ksh","ku","kw","ky","lag","lb","lg","lij","lkt","ln","lo","lt","lv","mas","mg","mgo","mk","ml","mn","mo","mr","ms","mt","my","nah","naq","nb","nd","ne","nl","nn","nnh","no","nqo","nr","nso","ny","nyn","om","or","os","osa","pa","pap","pcm","pl","prg","ps","pt-PT","pt","rm","ro","rof","ru","rwk","sah","saq","sat","sc","scn","sd","sdh","se","seh","ses","sg","sh","shi","si","sk","sl","sma","smi","smj","smn","sms","sn","so","sq","sr","ss","ssy","st","su","sv","sw","syr","ta","te","teo","th","ti","tig","tk","tl","tn","to","tpi","tr","ts","tzm","ug","uk","und","ur","uz","ve","vi","vo","vun","wa","wae","wo","xh","xog","yi","yo","yue","zh","zu"];var u=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.CanonicalizeLocaleList=void 0,n.CanonicalizeLocaleList=function(e){return Intl.getCanonicalLocales(e)}}));n(u),u.CanonicalizeLocaleList;var d=e((functi
|