PageSourceSearch

https://ohsome.com/static/i18next-DHCxiuaf.js

js ohsome.com collected 2026-09-29 00:03:24 UTC 66,637 bytes, 1 lines download raw bytes

1import{g as e,r as t}from"./react-CH-bOe9I.js";const n=e({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var s=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function o(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},o=e.match(/<\/?([^\s]+?)[/\s>]/);if(o&&(t.name=o[1],(n[o[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var i=e.indexOf("--\x3e");return{type:"comment",comment:-1!==i?e.slice(4,i):""}}for(var a=new RegExp(s),r=null;null!==(r=a.exec(e));)if(r[0].trim())if(r[1]){var l=r[1].trim(),c=[l,""];l.indexOf("=")>-1&&(c=l.split("=")),t.attrs[c[0]]=c[1],a.lastIndex--}else r[2]&&(t.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return t}var i=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,a=/^\s*$/,r=Object.create(null);var l=function(e,t){t||(t={}),t.components||(t.components=r);var n,s=[],l=[],c=-1,u=!1;if(0!==e.indexOf("<")){var h=e.indexOf("<");s.push({type:"text",content:-1===h?e:e.substring(0,h)})}return e.replace(i,(function(i,r){if(u){if(i!=="</"+n.name+">")return;u=!1}var h,p="/"!==i.charAt(1),d=i.startsWith("\x3c!--"),g=r+i.length,f=e.charAt(g);if(d){var m=o(i);return c<0?(s.push(m),s):((h=l[c]).children.push(m),s)}if(p&&(c++,"tag"===(n=o(i)).type&&t.components[n.name]&&(n.type="component",u=!0),n.voidElement||u||!f||"<"===f||n.children.push({type:"text",content:e.slice(g,e.indexOf("<",g))}),0===c&&s.push(n),(h=l[c-1])&&h.children.push(n),l[c]=n),(!p||n.voidElement)&&(c>-1&&(n.voidElement||n.name===i.slice(2,-1))&&(c--,n=-1===c?s:l[c]),!u&&"<"!==f&&f)){h=-1===c?s:l[c].children;var v=e.indexOf("<",g),y=e.slice(g,-1===v?void 0:v);a.test(y)&&(y=" "),(v>-1&&c+h.length>=0||" "!==y)&&h.push({type:"text",content:y})}})),s};const c=(...e)=>{(null==console?void 0:console.warn)&&(f(e[0])&&(e[0]="react-i18next:: ".concat(e[0])),console.warn(...e))},u={},h=(...e)=>{f(e[0])&&u[e[0]]||(f(e[0])&&(u[e[0]]=new Date),c(...e))},p=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout((()=>{e.off("initialized",n)}),0),t()};e.on("initialized",n)}},d=(e,t,n)=>{e.loadNamespaces(t,p(e,n))},g=(e,t,n,s)=>{f(n)&&(n=[n]),n.forEach((t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,p(e,s))},f=e=>"string"==typeof e,m=e=>"object"==typeof e&&null!==e,v=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},b=e=>y[e];
1let x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(v,b)};const k=()=>x;let S;const w=()=>S,O=(e,t)=>{var n,s;if(!e)return!1;const o=null!=(s=null==(n=e.props)?void 0:n.children)?s:e.children;return t?o.length>0:!!o},L=e=>{var t,n,s;if(!e)return[];const o=null!=(n=null==(t=e.props)?void 0:t.children)?n:e.children;return(null==(s=e.props)?void 0:s.i18nIsDynamicList)?N(o):o},N=e=>Array.isArray(e)?e:[e],C=(e,n)=>{var s;if(!e)return"";let o="";const i=N(e),a=(null==n?void 0:n.transSupportBasicHtmlNodes)&&null!=(s=n.transKeepBasicHtmlNodesFor)?s:[];return i.forEach(((e,s)=>{if(f(e))o+="".concat(e);else if(t.isValidElement(e)){const{props:t,type:i}=e,r=Object.keys(t).length,l=a.indexOf(i)>-1,c=t.children;if(c||!l||r)if(!c&&(!l||r)||t.i18nIsDynamicList)o+="<".concat(s,"></").concat(s,">");else if(l&&1===r&&f(c))o+="<".concat(i,">").concat(c,"</").concat(i,">");else{const e=C(c,n);o+="<".concat(s,">").concat(e,"</").concat(s,">")}else o+="<".concat(i,"/>")}else if(null===e)c("Trans: the passed in value is invalid - seems you passed in a null child.");else if(m(e)){const{format:t,...n}=e,s=Object.keys(n);if(1===s.length){const e=t?"".concat(s[0],", ").concat(t):s[0];o+="{{".concat(e,"}}")}else c("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else c("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),o},R=(e,n,s,o,i,a)=>{if(""===n)return[];const r=o.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(r.map((e=>"<".concat(e))).join("|")).test(n);if(!e&&!c&&!a)return[n];const u={},h=e=>{N(e).forEach((e=>{f(e)||(O(e)?h(L(e)):m(e)&&!t.isValidElement(e)&&Object.assign(u,e))}))};h(e);const p=l("<0>".concat(n,"</0>")),d={...u,...i},g=(e,n,s)=>{var o;const i=L(e),a=y(i,n.children,s);return(e=>Array.isArray(e)&&e.every(t.isValidElement))(i)&&0===a.length||(null==(o=e.props)?void 0:o.i18nIsDynamicList)?i:a},v=(e,n,s,o,i)=>{e.dummy?(e.children=n,s.push(t.cloneElement(e,{key:o},i?void 0:n))):s.push(...t.Children.map([e],(e=>{const s={...e.props};return delete s.i18nIsDynamicList,t.createElement(e.type,{...s,key:o,ref:e.ref},i?null:n)})))},y=(n,i,l)=>{const u=N(n);return N(i).reduce(((n,i,h)=>{var p,b;const x=(null==(b=null==(p=i.children)?void 0:p[0])?void 0:b.content)&&s.services.interpolator.interpolate(i.children[0].content,d,s.language);if("tag"===i.type){let a=u[parseInt(i.name,10)];1!==l.length||a||(a=l[0][i.name]),a||(a={});const p=0!==Object.keys(i.attrs).length?((e,t)=>{const n={...t};return n.props=Object.assign(e.props,t.props),n})({props:i.attrs},a):a,b=t.isValidElement(p),k=b&&O(i,!0)&&!i.voidElement,S=c&&m(p)&&p.dummy&&!b,w=m(e)&&Object.hasOwnProperty.call(e,i.name);if(f(p)){const e=s.services.interpolator.interpolate(p,d,s.language);n.push(e)}else if(O(p)||k){const e=g(p,i,l);v(p,e,n,h)}else if(S){const e=y(u,i.children,l);v(p,e,n,h)}else if(Number.isNaN(parseFloat(i.name)))if(w){const e=g(p,i,l);v(p,e,n,h,i.voidElement)}else if(o.transSupportBasicHtmlNodes&&r.indexOf(i.name)>-1)if(i.voidElement)n.push(t.createElement(i.name,{key:"".concat(i.name,"-").concat(h)}));else{const e=y(u,i.children,l);n.push(t.createElement(i.name,{key:"".concat(i.name,"-").concat(h)},e))}else if(i.voidElement)n.push("<".concat(i.name," />"));else{const e=y(u,i.children,l);n.push("<".concat(i.name,">").concat(e,"</").concat(i.name,">"))}else if(m(p)&&!b){const e=i.children[0]?x:null;e&&n.push(e)}else v(p,x,n,h,1!==i.children.length||!x)}else if("text"===i.type){const e=o.transWrapTextNodes,r=a?o.unescape(s.services.interpolator.interpolate(i.content,d,s.language)):s.services.interpolator.interpolate(i.content,d,s.language);e?n.push(t.createElement(e,{key:"".concat(i.name,"-").concat(h)},r)):n.push(r)}return n}),[])},b=y([{dummy:!0,children:e||[]}],p,N(e||[]));return L(b[0])};const E={type:"3rdParty",init(e){((e={})=>{x={...x,...e}})(e.options.react),(e=>{S=e})(e)}},P=t.createContext();
1class j{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach((e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)}))}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function I({children:e,count:n,parent:s,i18nKey:o,context:i,tOptions:a={},values:r,defaults:l,components:c,ns:u,i18n:p,t:d,shouldUnescape:g,...m}){var v;const{i18n:y,defaultNS:b}=t.useContext(P)||{},x=p||y||w(),S=d||(null==x?void 0:x.t.bind(x));return function({children:e,count:n,parent:s,i18nKey:o,context:i,tOptions:a={},values:r,defaults:l,components:c,ns:u,i18n:p,t:d,shouldUnescape:g,...m}){var v,y,b,x,S,O;const L=p||w();if(!L)return h("You will need to pass in an i18next instance by using i18nextReactModule"),e;const N=d||L.t.bind(L)||(e=>e),E={...k(),...null==(v=L.options)?void 0:v.react};let P=u||N.ns||(null==(y=L.options)?void 0:y.defaultNS);P=f(P)?[P]:P||["translation"];const j=C(e,E),I=l||j||E.transEmptyNodeValue||o,{hashTransKey:F}=E,A=o||(F?F(j||I):j||I);(null==(x=null==(b=L.options)?void 0:b.interpolation)?void 0:x.defaultVariables)&&(r=r&&Object.keys(r).length>0?{...r,...L.options.interpolation.defaultVariables}:{...L.options.interpolation.defaultVariables});const D=r||void 0!==n&&!(null==(O=null==(S=L.options)?void 0:S.interpolation)?void 0:O.alwaysFormat)||!e?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},U={...a,context:i||a.context,count:n,...r,...D,defaultValue:I,ns:P},T=A?N(A,U):I;c&&Object.keys(c).forEach((e=>{c[e].key||(c[e]=t.cloneElement(c[e],{key:e}));const n=c[e];"function"==typeof n.type||!n.props||!n.props.children||T.indexOf("".concat(e,"/>"))<0&&T.indexOf("".concat(e," />"))<0||(c[e]=t.createElement((function(){return t.createElement(t.Fragment,null,n)})))}));const V=R(c||e,T,L,E,U,g),K=null!=s?s:E.defaultTransParent;return K?t.createElement(K,m,V):V}({children:e,count:n,parent:s,i18nKey:o,context:i,tOptions:a,values:r,defaults:l,components:c,ns:u||(null==S?void 0:S.ns)||b||(null==(v=null==x?void 0:x.options)?void 0:v.defaultNS),i18n:x,t:d,shouldUnescape:g,...m})}const F=(e,t,n,s)=>e.getFixedT(t,n,s),A=(e,n={})=>{var s,o,i,a;const{i18n:r}=n,{i18n:l,defaultNS:c}=t.useContext(P)||{},u=r||l||w();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new j),!u){h("You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>f(t)?t:m(t)&&f(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}(null==(s=u.options.react)?void 0:s.wait)&&h("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const p={...k(),...u.options.react,...n},{useSuspense:v,keyPrefix:y}=p;let b=c||(null==(o=u.options)?void 0:o.defaultNS);b=f(b)?[b]:b||["translation"],null==(a=(i=u.reportNamespaces).addUsedNamespaces)||a.call(i,b);const x=(u.isInitialized||u.initializedStoreOnce)&&b.every((e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,s)=>{var o;if((null==(o=n.bindI18n)?void 0:o.indexOf("languageChanging"))>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))return!1}}):(h("i18n.languages were undefined or empty",t.languages),!0))(e,u,p))),S=((e,n,s,o)=>t.useCallback(F(e,n,s,o),[e,n,s,o]))(u,n.lng||null,"fallback"===p.nsMode?b:b[0],y),O=()=>S,L=()=>F(u,n.lng||null,"fallback"===p.nsMode?b:b[0],y),[N,C]=t.useState(O);let R=b.join();n.lng&&(R="".concat(n.lng).concat(R));const E=((e,n)=>{const s=t.useRef();return t.useEffect((()=>{s.current=e}),[e,n]),s.current})(R),I=t.useRef(!0);t.useEffect((()=>{const{bindI18n:e,bindI18nStore:t}=p;I.current=!0,x||v||(n.lng?g(u,n.lng,b,(()=>{I.current&&C(L)})):d(u,b,(()=>{I.current&&C(L)}))),x&&E&&E!==R&&I.current&&C(L);const s=()=>{I.current&&C(L)};return e&&(null==u||u.on(e,s)),t&&(null==u||u.store.on(t,s)),()=>{I.current=!1,u&&(null==e||e.split(" ").forEach((e=>u.off(e,s)))),t&&u&&t.split(" ").forEach((e=>u.store.off(e,s)))}}),[u,R]),t.useEffect((()=>{I.current&&x&&C(O)}),[u,y,x]);const A=[N,u,x];if(A.t=N,A.i18n=u,A.ready=x,x)return A;if(!x&&!v)return A;throw new Promise((e=>{n.lng?g(u,n.lng,b,(()=>e())):d(u,b,(()=>e()))}))};function D({i18n:e,defaultNS:n,children:s}){const o=t.useMemo((()=>({i18n:e,defaultNS:n})),[e,n]);return t.createElement(P.Provider,{value:o},s)}const U=e=>"string"==typeof e,T=()=>{let e,t;const n=new Promise(((n,s)=>{e=n,t=s}));return n.resolve=e,n.reject=t,n},V=e=>null==e?"":""+e,K=/###/g,M=e=>e&&e.indexOf("###")>-1?e.replace(K,"."):e,z=e=>!e||U(e),H=(e,t,n)=>{const s=U(t)?t.split("."):t;let o=0;for(;o<s.length-1;){if(z(e))return{};const t=M(s[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return z(e)?{}:{obj:e,k:M(s[o])}},B=(e,t,n)=>{const{obj:s,k:o}=H(e,t,Object);if(void 0!==s||1===t.length)return void(s[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),r=H(e,a,Object);for(;void 0===r.obj&&a.length;)i="".concat(a[a.length-1],".").concat(i),a=a.slice(0,a.length-1),r=H(e,a,Object),r&&r.obj&&void 0!==r.obj["".concat(r.k,".").concat(i)]&&(r.obj=void 0);r.obj["".concat(r.k,".").concat(i)]=n},J=(e,t)=>
vendor: 4,268 bytes, line 1
1{const{obj:n,k:s}=H(e,t);if(n)return n[s]},q=(e,t,n)=>{for(const s in t)"__proto__"!==s&&"constructor"!==s&&(s in e?U(e[s])||e[s]instanceof String||U(t[s])||t[s]instanceof String?n&&(e[s]=t[s]):q(e[s],t[s],n):e[s]=t[s]);return e},$=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var W={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const _=e=>U(e)?e.replace(/[&<>"'\/]/g,(e=>W[e])):e;const Y=[" ",",","?","!",";"],Q=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),G=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const s=t.split(n);let o=e;for(let i=0;i<s.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let a=i;a<s.length;++a)if(a!==i&&(t+=n),t+=s[a],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<s.length-1)continue;i+=a-i+1;break}o=e}return o},Z=e=>e&&e.replace("_","-"),X={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ee{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||X,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(U(e[0])&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}create(e){return new ee(this.logger,{prefix:"".concat(this.prefix,":").concat(e,":"),...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ee(this.logger,e)}}var te=new ee;class ne{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,s]=e;for(let o=0;o<s;o++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[s,o]=t;for(let i=0;i<o;i++)s.apply(s,[e,...n])}))}}}class se extends ne{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,i=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):U(n)&&o?a.push(...n.split(o)):a.push(n)));const r=J(this.data,a);return!r&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!r&&i&&U(n)?G(this.data&&this.data[e]&&this.data[e][t],n,o):r}addResource(e,t,n,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];
vendor: 1,659 bytes, line 1
1n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),B(this.data,a,s),o.silent||this.emit("added",e,t,n,s)}addResources(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)(U(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=n,n=t,t=a[1]),this.addNamespaces(t);let r=J(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?q(r,n,o):r={...r,...n},B(this.data,a,r),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var oe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,s,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,s,o))})),t}};const ie={};class ae extends ne{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,s;super(),n=e,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"].forEach((e=>{n[e]&&(s[e]=n[e])})),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=te.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const s=Y.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===s.length)return!0;const o=Q.getRegExp("(".concat(s.map((e=>"?"===e?"\\?":e)).join("|"),")"));let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,s));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(s)}return U(o)&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const s=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),r=a[a.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return s?{res:"".concat(r).concat(e).concat(i),usedKey:i,exactUsedKey:i,usedLng:l,usedNS:r,usedParams:this.getUsedParamsDetails(t)}:"".concat(r).concat(e).concat(i)}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:r,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let h=u&&u.res;const p=u&&u.usedKey||i,d=u&&u.exactUsedKey||i,g=Object.prototype.toString.apply(h),f=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!U(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(!(m&&h&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0)||U(f)&&Array.isArray(h))if(m&&U(f)&&Array.isArray(h))h=h.join(f),h&&(h=this.extendTranslation(h,e,t,n));else{let s=!1,a=!1;const c=void 0!==t.count&&!U(t.count),p=ae.hasDefaultValue(t),d=c?this.pluralResolver.getSuffix(l,t.count,t):"",g=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",f=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=f&&t["defaultValue".concat(this.options.pluralSeparator,"zero")]||t["defaultValue".concat(d)]||t["defaultValue".concat(g)]||t.defaultValue;!this.isValidLookup(h)&&p&&(s=!0,h=m),this.isValidLookup(h)||(a=!0,h=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:h,y=p&&m!==h&&this.options.updateMissing;if(a||s||y){if(this.logger.log(y?"updateKey":"missingKey",l,r,i,y?m:h),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const s=(e,n,s)=>{const o=p&&s!==h?s:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,r,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,r,n,o,y,t),this.emit
1("missingKey",e,r,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);f&&t["defaultValue".concat(this.options.pluralSeparator,"zero")]&&n.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&n.push("".concat(this.options.pluralSeparator,"zero")),n.forEach((n=>{s([e],i+n,t["defaultValue".concat(n)]||m)}))})):s(e,i,m))}h=this.extendTranslation(h,e,t,u,n),a&&h===i&&this.options.appendNamespaceToMissingKey&&(h="".concat(r,":").concat(i)),(a||s)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(r,":").concat(i):i,s?h:void 0):this.options.parseMissingKeyHandler(h))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...t,ns:a}):"key '".concat(i," (").concat(this.language,")' returned an object instead of string.");return s?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e=Array.isArray(h),n=e?[]:{},s=e?d:p;for(const i in h)if(Object.prototype.hasOwnProperty.call(h,i)){const e="".concat(s).concat(o).concat(i);n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=h[i])}h=n}}return s?(u.res=h,u.usedParams=this.getUsedParamsDetails(t),u):h}extendTranslation(e,t,n,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=U(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(a){const t=e.match(this.interpolator.nestingRegexp);r=t&&t.length}let l=n.replace&&!U(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||s.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);r<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&s&&s.res&&(n.lng=this.language||s.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,s=new Array(e),a=0;a<e;a++)s[a]=arguments[a];return o&&o[0]===s[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(s[0]," in key: ").concat(t[0])),null):i.translate(...s,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,r=U(a)?[a]:a;return null!=e&&r&&r.length&&!1!==n.applyPostProcessor&&(e=oe.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,s,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return U(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const r=this.extractFromKey(e,a),l=r.key;n=l;let c=r.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==a.count&&!U(a.count),h=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&(U(a.context)||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);
vendor: 9,272 bytes, line 1
1c.forEach((e=>{this.isValidLookup(t)||(i=e,!ie["".concat(d[0],"-").concat(e)]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(ie["".concat(d[0],"-").concat(e)]=!0,this.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t="".concat(this.options.pluralSeparator,"zero"),s="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(u&&(i.push(l+e),a.ordinal&&0===e.indexOf(s)&&i.push(l+e.replace(s,this.options.pluralSeparator)),h&&i.push(l+t)),p){const n="".concat(l).concat(this.options.contextSeparator).concat(a.context);i.push(n),u&&(i.push(n+e),a.ordinal&&0===e.indexOf(s)&&i.push(n+e.replace(s,this.options.pluralSeparator)),h&&i.push(n+t))}}let r;for(;r=i.pop();)this.isValidLookup(t)||(s=r,t=this.getResource(n,e,r,a))})))}))})),{res:t,usedKey:n,exactUsedKey:s,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!U(e.replace);let s=n?e.replace:e;if(n&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const e of t)delete s[e]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const re=e=>e.charAt(0).toUpperCase()+e.slice(1);class le{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=te.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Z(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Z(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(U(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(t){}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map((e=>e.toLowerCase())):2===s.length?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),n.indexOf(s[1].toLowerCase())>-1&&(s[1]=re(s[1].toLowerCase()))):3===s.length&&(s[0]=s[0].toLowerCase(),2===s[1].length&&(s[1]=s[1].toUpperCase()),"sgn"!==s[0]&&2===s[2].length&&(s[2]=s[2].toUpperCase()),n.indexOf(s[1].toLowerCase())>-1&&(s[1]=re(s[1].toLowerCase())),n.indexOf(s[2].toLowerCase())>-1&&(s[2]=re(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),U(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],o=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return U(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):U(e)&&o(this.formatLanguageCode(e)),n.forEach((e=>{s.indexOf(e)<0&&o(this.formatLanguageCode(e))})),s}}let ce=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ue={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const he=["v1","v2","v3"],pe=["v4"],de={zero:0,one:1,two:2,few:3,many:4,other:5};class ge{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=te.create("pluralResolver"),this.options.compatibilityJSON&&!pe.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return ce.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:ue[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Z("dev"===e?"en":e),s=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:s});return this.pluralRulesCache[o]=i,i}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};
1return this.getSuffixes(e,n).map((e=>"".concat(t).concat(e)))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>de[e]-de[t])).map((e=>"".concat(this.options.prepend).concat(t.ordinal?"ordinal".concat(this.options.prepend):"").concat(e))):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.getRule(e,n);return s?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(s.select(t)):this.getSuffixRetroCompatible(s,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let s=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===s?s="plural":1===s&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}
vendor: 8,575 bytes, line 1
1shouldUseIntlApi(){return!he.includes(this.options.compatibilityJSON)}}const fe=function(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const s=J(e,n);return void 0!==s?s:J(t,n)})(e,t,n);return!i&&o&&U(n)&&(i=G(e,n,s),void 0===i&&(i=G(t,n,s))),i},me=e=>e.replace(/\$/g,"$$$$");class ve{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=te.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:r,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:d,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:_,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):i||"{{",this.suffix=a?$(a):r||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?$(h):p||$("$t("),this.nestingSuffix=d?$(d):g||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}interpolate(e,t,n,s){let o,i,a;const r=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=fe(t,r,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...s,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(fe(t,r,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...s,...t,interpolationkey:i})};this.resetRegExp();const c=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,u=s&&s.interpolation&&void 0!==s.interpolation.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>me(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?me(this.escape(e)):me(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,s);i=U(t)?t:""}else if(s&&Object.prototype.hasOwnProperty.call(s,n))i="";else{if(u){i=o[0];continue}this.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else U(i)||this.useRawValueToEscape||(i=V(i));const r=t.safeValue(i);if(e=e.replace(o[0],r),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,s,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const s=e.split(new RegExp("".concat(n,"[ ]*{")));let i="{".concat(s[1]);e=s[0],i=this.interpolate(i,o);const a=i.match(/'/g),r=i.match(/"/g);(a&&a.length%2==0&&!r||r.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(l){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),l),"".concat(e).concat(n).concat(i)}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let r=[];o={...i},o=o.replace&&!U(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),r=e,l=!0}if(s=t(a.call(this,n[1].trim(),o),o),s&&n[0]===e&&!U(s))return s;U(s)||(s=V(s)),s||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),s=""),l&&(s=r.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}const ye=e=>{const t={};return(n,s,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=s+JSON.stringify(i);let r=t[a];return r||(r=e(Z(s),o),t[a]=r),r(n)}};class be{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=te.create("formatter"),this.options=e,this.formats={number:ye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:ye(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:ye(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:ye(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:ye(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ye(t)}format(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...s]=e.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},r=a.locale||a.lng||s.locale||s.lng||n;t=this.formats[o](e,r,{...i,...s,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn("there was no format function for ".concat(o)),e}),e)}}class xe extends ne{constructor(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=te.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,s.backend,s)}queueLoad(e,t,n,s){const o={},i={},a={},r={};return e.forEach((e=>{let s=!0;t.forEach((t=>{const a="".concat(e,"|").concat(t);!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,s=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===r[t]&&(r[t]=!0)))})),s||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(r)}}loaded(e,t,n){const s=e.split("|"),o=s[0],i=s[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:s,k:o}=H(e,t,Object);s[o]=s[o]||[],s[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEac
vendor: 4,530 bytes, line 1
1h((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:o,callback:i});this.readingCalls++;const a=(a,r)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&r&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,s+1,2*o,i)}),o):i(a,r)},r=this.backend[n].bind(this.backend);if(2!==r.length)return r(e,t,a);try{const n=r(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();U(e)&&(e=this.languageUtils.toResolveHierarchy(e)),U(t)&&(t=[t]);const o=this.queueLoad(e,t,n,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),s=n[0],o=n[1];this.read(s,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn("".concat(t,"loading namespace ").concat(o," for language ").concat(s," failed"),n),!n&&i&&this.logger.log("".concat(t,"loaded namespace ").concat(o," for language ").concat(s),i),this.loaded(e,n,i)}))}saveMissing(e,t,n,s,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,s,l):c(e,t,n,s),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(r){a(r)}else c(e,t,n,s,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,s)}}}const ke=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),U(e[1])&&(t.defaultValue=e[1]),U(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Se=e=>(U(e.ns)&&(e.ns=[e.ns]),U(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),U(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),we=()=>{};class Oe extends ne{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Se(e),this.services={},this.logger=te,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEac
vendor: 4,298 bytes, line 1
1h((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(U(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=ke();this.options={...s,...this.options,...Se(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?te.init(o(this.modules.logger),this.options):te.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=be);const n=new le(this.options);this.store=new se(this.options.resources,this.options);const i=this.services;i.logger=te,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new ge(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new ve(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new xe(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];e.emit(t,...s)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new ae(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];e.emit(t,...s)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=we),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=T(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:we;const n=U(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],s=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)s(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>s(e)))}
vendor: 3,608 bytes, line 1
1this.options.preload&&this.options.preload.forEach((e=>s(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const s=T();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=we),this.services.backendConnector.reload(e,t,(e=>{s.resolve(),n(e)})),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&oe.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const s=T();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,s.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=U(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),s}getFixedT(e,t,n){var s=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,r=new Array(a>2?a-2:0),l=2;l<a;l++)r[l-2]=arguments[l];i=s.options.overloadTranslationOptionHandler([e,t].concat(r))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c=s.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map((e=>"".concat(i.keyPrefix).concat(c).concat(e))):i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(e):e,s.t(u,i)};return U(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||s&&!i(o,e)))}loadNamespaces(e,t){const n=T();return this.options.ns?(U(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=T();U(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter((e=>s.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=s.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new le(ke());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:we;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Oe(s);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new se(this.store.data,s),o.services.resourceStore=o.store),o.translator=new ae(o.services,s),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];o.emit(e,...n)})),o.init(s,t),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Le=Oe.createInstance();Le.createInstance=Oe.createInstance,Le.createInstance,Le.dir,Le.init,Le.loadResources,Le.reloadResources,Le.use,Le.changeLanguage,Le.getFixedT;const Ne=Le.t;Le.exists,Le.setDefaultNamespace,Le.hasLoadedNamespace,Le.loadNamespaces,Le.loadLanguages;const{slice:Ce,forEach:Re}=[];const Ee=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Pe={create(e,t,n,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),s&&(o.domain=s),document.cookie=((e,t,n)=>{const s=n||{};s.path=s.path||"/";const o=encodeURIComponent(t);let i="".concat(e,"=").concat(o);if(s.maxAge>0){const e=s.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(e))}if(s.domain){if(!Ee.test(s.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(s.domain)}if(s.path){if(!Ee.test(s.path))throw new TypeError("option path is invalid");i+="; Path=".concat(s.path)}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw new TypeError("option expires is invali
1d");i+="; Expires=".concat(s.expires.toUTCString())}if(s.httpOnly&&(i+="; HttpOnly"),s.secure&&(i+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i})(e,encodeURIComponent(t),o)},read(e){const t="".concat(e,"="),n=document.cookie.split(";");for(let s=0;s<n.length;s++){let e=n[s];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e){this.create(e,"",-1)}};var je={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Pe.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:s,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Pe.create(n,e,s,o,i)}},Ie={name:"querystring",lookup(e){var t;let n,{lookupQuerystring:s}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&(null==(t=window.location.hash)?void 0:t.indexOf("?"))>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const o=e.substring(1).split("&");for(let t=0;t<o.length;t++){const e=o[t].indexOf("=");if(e>0){o[t].substring(0,e)===s&&(n=o[t].substring(e+1))}}}return n}};let Fe=null;const Ae=()=>{if(null!==Fe)return Fe;try{Fe="undefined"!==window&&null!==window.localStorage;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Fe=!1}return Fe};var De={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Ae())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Ae()&&window.localStorage.setItem(n,e)}};let Ue=null;const Te=()=>{if(null!==Ue)return Ue;try{Ue="undefined"!==window&&null!==window.sessionStorage;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Ue=!1}return Ue};var Ve={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Te())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Te()&&window.sessionStorage.setItem(n,e)}},Ke={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:s}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),s&&t.push(s)}return t.length>0?t:void 0}},Me={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const s=n||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(t=s.getAttribute("lang")),t}},ze={name:"path",lookup(e){var t;let{lookupFromPathIndex:n}=e;if("undefined"==typeof window)return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(s))return;return null==(t=s["number"==typeof n?n:0])?void 0:t.replace("/","")}},He={name:"subdomain",lookup(e){var t,n;let{lookupFromSubdomainIndex:s}=e;const o="number"==typeof s?s+1:1,i="undefined"!=typeof window&&(null==(n=null==(t=window.location)?void 0:t.hostname)?void 0:n.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[o]}};class Be{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return Re.call(Ce.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(je),this.addDetector(Ie),this.addDetector(De),this.addDetector(Ve),this.addDetector(Ke),this.addDetector(Me),this.addDetector(ze),this.addDetector(He)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let t=[];return e.forEach((e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}})),t=t.map((e=>this.options.convertDetectedLanguage(e))),this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}
1cacheUserLanguage(e,t){t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}Be.type="languageDetector";export{Be as B,D as I,I as T,E as a,Le as i,Ne as t,A as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.