commit faa9313d220d1f39eb5b1eae48127a9adbf005ab Author: quantv Date: Thu Jul 9 07:30:53 2026 +0000 Upload files to "/" diff --git a/qtube.js b/qtube.js new file mode 100644 index 0000000..789dd35 --- /dev/null +++ b/qtube.js @@ -0,0 +1,3 @@ +!function(){"use strict";var e,t=[{architecture:"Linux arm64-v8a",os:"Android 10",rasterizer:"gles",manufacturer:"Sony",deviceType:"ATV",chipsetModel:"sdm845",modelYear:13140765,firmwareVersion:"52.1.C.0.268",brand:"KDDI",model:"SOV38"},{architecture:"Linux armeabi-v7a",os:"Android 14",rasterizer:"gles",manufacturer:"Google",deviceType:"ATV",chipsetModel:"sabrina",modelYear:2020,firmwareVersion:"UTTC.250917.004",brand:"google",model:"Chromecast"},{architecture:"Linux armeabi-v7a",os:"Android 12",rasterizer:"gles",manufacturer:"TCL",deviceType:"ATV",chipsetModel:"merak",modelYear:2023,firmwareVersion:"STT2.221228.001",brand:"TCL",model:"Smart TV Pro"},{architecture:"Linux armeabi-v7a",os:"Android 7.1.2",rasterizer:"gles",manufacturer:"Amazon",deviceType:"ATV",chipsetModel:"mt8695",modelYear:0,firmwareVersion:"NS6294",brand:"Amazon",model:"AFTMM"}];if(document.querySelector(".content-container")&&window.h5vcc&&window.h5vcc.tizentube&&window.h5vcc.tizentube.SetUserAgent){var i=localStorage.getItem("userAgent");i&&(window.h5vcc.tizentube.SetUserAgent(i),location.reload());var n=t[Math.floor(Math.random()*t.length)],a=`Mozilla/5.0 (${(e=n).architecture}; ${e.os}) Cobalt/25.lts.30.1034958-gold (unlike Gecko) v8/8.8.278.17-jit ${e.rasterizer} Starboard/15, ${e.manufacturer}_${e.deviceType}_${e.chipsetModel}_${e.modelYear}/${e.firmwareVersion} (${e.brand}, ${e.model}) com.google.android.youtube.tv/5.30.301`;localStorage.setItem("userAgent",a),window.h5vcc.tizentube.SetUserAgent(a),location.reload()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw r}}}}function m(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function v(e){for(var t=1;t3?(a=m===n)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=h&&((a=i<2&&hn||n>m)&&(r[4]=i,r[5]=n,p.n=m,s=0))}if(a||i>1)return o;throw d=!0,n}return function(a,c,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,m),s=c,l=m;(t=s<2?e:l)||!d;){r||(s?s<3?(s>1&&(p.n=-1),h(s,l)):p.n=l:p.v=l);try{if(u=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(d=p.n<0)?l:i.call(n,p))!==o)break}catch(t){r=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(i,a,r),!0),u}var o={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(y(t={},n,function(){return this}),t),d=u.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,y(d,"constructor",u),y(u,"constructor",l),l.displayName="GeneratorFunction",y(u,a,"GeneratorFunction"),y(d),y(d,a,"Generator"),y(d,n,function(){return this}),y(d,"toString",function(){return"[object Generator]"}),(b=function(){return{w:r,m:p}})()}function y(e,t,i,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}y=function(e,t,i,n){if(t)a?a(e,t,{value:i,enumerable:!n,configurable:!n,writable:!n}):e[t]=i;else{function r(t,i){y(e,t,function(e){return this._invoke(t,i,e)})}r("next",0),r("throw",1),r("return",2)}},y(e,t,i,n)}function S(e,t){return o(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,a,r,o,s=[],l=!0,u=!1;try{if(r=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||w(e,t)||g()}function k(e){return o(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||g()}function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function w(e,t){if(e){if("string"==typeof e)return r(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(e,t):void 0}}var T="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},D="URLSearchParams"in T,C="Symbol"in T&&"iterator"in Symbol,E="FileReader"in T&&"Blob"in T&&function(){try{return new Blob,!0}catch(e){return!1}}(),A="FormData"in T,P="ArrayBuffer"in T;if(P)var B=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],z=ArrayBuffer.isView||function(e){return e&&B.indexOf(Object.prototype.toString.call(e))>-1};function I(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function F(e){return"string"!=typeof e&&(e=String(e)),e}function O(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return C&&(t[Symbol.iterator]=function(){return t}),t}function M(e){this.map={},e instanceof M?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function j(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function R(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function N(e){var t=new FileReader,i=R(t);return t.readAsArrayBuffer(e),i}function L(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:E&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:A&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:D&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():P&&E&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=L(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):P&&(ArrayBuffer.prototype.isPrototypeOf(e)||z(e))?this._bodyArrayBuffer=L(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):D&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},E&&(this.blob=function(){var e=j(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=j(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(E)return this.blob().then(N);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,i,n,a,r=j(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,i=R(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),a=n?n[1]:"utf-8",t.readAsText(e,a),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in T)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function U(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),a=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}}),t}function W(e,t){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new M(t.headers),this.url=t.url||"",this._initBody(e)}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})},_.call(H.prototype),_.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},W.error=function(){var e=new W(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var K=[301,302,303,307,308];W.redirect=function(e,t){if(-1===K.indexOf(t))throw new RangeError("Invalid status code");return new W(null,{status:t,headers:{location:e}})};var G=T.DOMException;try{new G}catch(e){(G=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack}).prototype=Object.create(Error.prototype),G.prototype.constructor=G}function q(e,t){return new Promise(function(i,n){var a=new H(e,t);if(a.signal&&a.signal.aborted)return n(new G("Aborted","AbortError"));var r=new XMLHttpRequest;function o(){r.abort()}if(r.onload=function(){var e,t,n={statusText:r.statusText,headers:(e=r.getAllResponseHeaders()||"",t=new M,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var a=i.join(":").trim();try{t.append(n,a)}catch(e){console.warn("Response "+e.message)}}}),t)};0===a.url.indexOf("file://")&&(r.status<200||r.status>599)?n.status=200:n.status=r.status,n.url="responseURL"in r?r.responseURL:n.headers.get("X-Request-URL");var o="response"in r?r.response:r.responseText;setTimeout(function(){i(new W(o,n))},0)},r.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},r.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},r.onabort=function(){setTimeout(function(){n(new G("Aborted","AbortError"))},0)},r.open(a.method,function(e){try{return""===e&&T.location.href?T.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?r.withCredentials=!0:"omit"===a.credentials&&(r.withCredentials=!1),"responseType"in r&&(E?r.responseType="blob":P&&(r.responseType="arraybuffer")),t&&"object"===x(t.headers)&&!(t.headers instanceof M||T.Headers&&t.headers instanceof T.Headers)){var s=[];Object.getOwnPropertyNames(t.headers).forEach(function(e){s.push(I(e)),r.setRequestHeader(e,F(t.headers[e]))}),a.headers.forEach(function(e,t){-1===s.indexOf(t)&&r.setRequestHeader(t,e)})}else a.headers.forEach(function(e,t){r.setRequestHeader(t,e)});a.signal&&(a.signal.addEventListener("abort",o),r.onreadystatechange=function(){4===r.readyState&&a.signal.removeEventListener("abort",o)}),r.send(void 0===a._bodyInit?null:a._bodyInit)})}q.polyfill=!0,T.fetch||(T.fetch=q,T.Headers=M,T.Request=H,T.Response=W);var J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $,Y,Q={};function Z(){if(Y)return $;Y=1;var e=function(e){return e&&e.Math===Math&&e};return $=e("object"==("undefined"==typeof globalThis?"undefined":x(globalThis))&&globalThis)||e("object"==("undefined"==typeof window?"undefined":x(window))&&window)||e("object"==("undefined"==typeof self?"undefined":x(self))&&self)||e("object"==x(J)&&J)||e("object"==x($)&&$)||function(){return this}()||Function("return this")()}var ee,te,ie,ne,ae,re,oe,se,le={};function ue(){return te?ee:(te=1,ee=function(e){try{return!!e()}catch(e){return!0}})}function ce(){if(ne)return ie;ne=1;var e=ue();return ie=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function de(){if(re)return ae;re=1;var e=ue();return ae=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function pe(){if(se)return oe;se=1;var e=de(),t=Function.prototype.call;return oe=e?t.bind(t):function(){return t.apply(t,arguments)},oe}var he,me,ge,fe,ve,be,ye,Se,ke,xe,we,Te,De,Ce,Ee,Ae,Pe,Be,ze,Ie,Fe,Oe,Me,je,Re,Ne,Le,_e,Ve,He,Ue,We,Ke,Ge,qe,Je,Xe,$e,Ye,Qe,Ze,et={};function tt(){return ge?me:(ge=1,me=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function it(){if(ve)return fe;ve=1;var e=de(),t=Function.prototype,i=t.call,n=e&&t.bind.bind(i,i);return fe=e?n:function(e){return function(){return i.apply(e,arguments)}},fe}function nt(){if(ke)return Se;ke=1;var e=it(),t=ue(),i=function(){if(ye)return be;ye=1;var e=it(),t=e({}.toString),i=e("".slice);return be=function(e){return i(t(e),8,-1)}}(),n=Object,a=e("".split);return Se=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?a(e,""):n(e)}:n}function at(){return we?xe:(we=1,xe=function(e){return null==e})}function rt(){if(De)return Te;De=1;var e=at(),t=TypeError;return Te=function(i){if(e(i))throw new t("Can't call method on "+i);return i}}function ot(){if(Ee)return Ce;Ee=1;var e=nt(),t=rt();return Ce=function(i){return e(t(i))}}function st(){if(Pe)return Ae;Pe=1;var e="object"==("undefined"==typeof document?"undefined":x(document))&&document.all;return Ae=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function lt(){if(ze)return Be;ze=1;var e=st();return Be=function(t){return"object"==x(t)?null!==t:e(t)}}function ut(){if(Fe)return Ie;Fe=1;var e=Z(),t=st();return Ie=function(i,n){return arguments.length<2?(a=e[i],t(a)?a:void 0):e[i]&&e[i][n];var a},Ie}function ct(){if(Le)return Ne;Le=1;var e,t,i=Z(),n=function(){if(Re)return je;Re=1;var e=Z().navigator,t=e&&e.userAgent;return je=t?String(t):""}(),a=i.process,r=i.Deno,o=a&&a.versions||r&&r.version,s=o&&o.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),Ne=t}function dt(){if(Ve)return _e;Ve=1;var e=ct(),t=ue(),i=Z().String;return _e=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function pt(){if(Ue)return He;Ue=1;var e=dt();return He=e&&!Symbol.sham&&"symbol"==x(Symbol.iterator)}function ht(){if(Ke)return We;Ke=1;var e=ut(),t=st(),i=function(){if(Me)return Oe;Me=1;var e=it();return Oe=e({}.isPrototypeOf)}(),n=pt(),a=Object;return We=n?function(e){return"symbol"==x(e)}:function(n){var r=e("Symbol");return t(r)&&i(r.prototype,a(n))}}function mt(){if(qe)return Ge;qe=1;var e=String;return Ge=function(t){try{return e(t)}catch(e){return"Object"}}}function gt(){if(Xe)return Je;Xe=1;var e=st(),t=mt(),i=TypeError;return Je=function(n){if(e(n))return n;throw new i(t(n)+" is not a function")}}function ft(){if(Ye)return $e;Ye=1;var e=gt(),t=at();return $e=function(i,n){var a=i[n];return t(a)?void 0:e(a)}}function vt(){if(Ze)return Qe;Ze=1;var e=pe(),t=st(),i=lt(),n=TypeError;return Qe=function(a,r){var o,s;if("string"===r&&t(o=a.toString)&&!i(s=e(o,a)))return s;if(t(o=a.valueOf)&&!i(s=e(o,a)))return s;if("string"!==r&&t(o=a.toString)&&!i(s=e(o,a)))return s;throw new n("Can't convert object to primitive value")}}var bt,yt,St,kt,xt,wt,Tt,Dt,Ct,Et,At,Pt,Bt,zt,It,Ft,Ot,Mt,jt,Rt,Nt,Lt,_t,Vt,Ht={exports:{}};function Ut(){if(kt)return St;kt=1;var e=Z(),t=Object.defineProperty;return St=function(i,n){try{t(e,i,{value:n,configurable:!0,writable:!0})}catch(t){e[i]=n}return n},St}function Wt(){if(xt)return Ht.exports;xt=1;var e=yt?bt:(yt=1,bt=!1),t=Z(),i=Ut(),n="__core-js_shared__",a=Ht.exports=t[n]||i(n,{});return(a.versions||(a.versions=[])).push({version:"3.46.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ht.exports}function Kt(){if(Tt)return wt;Tt=1;var e=Wt();return wt=function(t,i){return e[t]||(e[t]=i||{})},wt}function Gt(){if(Ct)return Dt;Ct=1;var e=rt(),t=Object;return Dt=function(i){return t(e(i))}}function qt(){if(At)return Et;At=1;var e=it(),t=Gt(),i=e({}.hasOwnProperty);return Et=Object.hasOwn||function(e,n){return i(t(e),n)},Et}function Jt(){if(Bt)return Pt;Bt=1;var e=it(),t=0,i=Math.random(),n=e(1.1.toString);return Pt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+i,36)},Pt}function Xt(){if(It)return zt;It=1;var e=Z(),t=Kt(),i=qt(),n=Jt(),a=dt(),r=pt(),o=e.Symbol,s=t("wks"),l=r?o.for||o:o&&o.withoutSetter||n;return zt=function(e){return i(s,e)||(s[e]=a&&i(o,e)?o[e]:l("Symbol."+e)),s[e]}}function $t(){if(Ot)return Ft;Ot=1;var e=pe(),t=lt(),i=ht(),n=ft(),a=vt(),r=Xt(),o=TypeError,s=r("toPrimitive");return Ft=function(r,l){if(!t(r)||i(r))return r;var u,c=n(r,s);if(c){if(void 0===l&&(l="default"),u=e(c,r,l),!t(u)||i(u))return u;throw new o("Can't convert object to primitive value")}return void 0===l&&(l="number"),a(r,l)}}function Yt(){if(jt)return Mt;jt=1;var e=$t(),t=ht();return Mt=function(i){var n=e(i,"string");return t(n)?n:n+""},Mt}function Qt(){if(_t)return Lt;_t=1;var e=ce(),t=ue(),i=function(){if(Nt)return Rt;Nt=1;var e=Z(),t=lt(),i=e.document,n=t(i)&&t(i.createElement);return Rt=function(e){return n?i.createElement(e):{}}}();return Lt=!e&&!t(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function Zt(){if(Vt)return le;Vt=1;var e=ce(),t=pe(),i=function(){if(he)return et;he=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,i=t&&!e.call({1:2},1);return et.f=i?function(e){var i=t(this,e);return!!i&&i.enumerable}:e,et}(),n=tt(),a=ot(),r=Yt(),o=qt(),s=Qt(),l=Object.getOwnPropertyDescriptor;return le.f=e?l:function(e,u){if(e=a(e),u=r(u),s)try{return l(e,u)}catch(e){}if(o(e,u))return n(!t(i.f,e,u),e[u])},le}var ei,ti,ii,ni,ai,ri,oi,si={};function li(){if(ni)return ii;ni=1;var e=lt(),t=String,i=TypeError;return ii=function(n){if(e(n))return n;throw new i(t(n)+" is not an object")}}function ui(){if(ai)return si;ai=1;var e=ce(),t=Qt(),i=function(){if(ti)return ei;ti=1;var e=ce(),t=ue();return ei=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}(),n=li(),a=Yt(),r=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",u="configurable",c="writable";return si.f=e?i?function(e,t,i){if(n(e),t=a(t),n(i),"function"==typeof e&&"prototype"===t&&"value"in i&&c in i&&!i[c]){var r=s(e,t);r&&r[c]&&(e[t]=i.value,i={configurable:u in i?i[u]:r[u],enumerable:l in i?i[l]:r[l],writable:!1})}return o(e,t,i)}:o:function(e,i,s){if(n(e),i=a(i),n(s),t)try{return o(e,i,s)}catch(e){}if("get"in s||"set"in s)throw new r("Accessors not supported");return"value"in s&&(e[i]=s.value),e},si}function ci(){if(oi)return ri;oi=1;var e=ce(),t=ui(),i=tt();return ri=e?function(e,n,a){return t.f(e,n,i(1,a))}:function(e,t,i){return e[t]=i,e},ri}var di,pi,hi,mi,gi,fi,vi,bi,yi,Si,ki,xi,wi,Ti,Di,Ci={exports:{}};function Ei(){if(mi)return hi;mi=1;var e=it(),t=st(),i=Wt(),n=e(Function.toString);return t(i.inspectSource)||(i.inspectSource=function(e){return n(e)}),hi=i.inspectSource}function Ai(){if(bi)return vi;bi=1;var e=Kt(),t=Jt(),i=e("keys");return vi=function(e){return i[e]||(i[e]=t(e))},vi}function Pi(){return Si?yi:(Si=1,yi={})}function Bi(){if(xi)return ki;xi=1;var e,t,i,n=function(){if(fi)return gi;fi=1;var e=Z(),t=st(),i=e.WeakMap;return gi=t(i)&&/native code/.test(String(i))}(),a=Z(),r=lt(),o=ci(),s=qt(),l=Wt(),u=Ai(),c=Pi(),d="Object already initialized",p=a.TypeError,h=a.WeakMap;if(n||l.state){var m=l.state||(l.state=new h);m.get=m.get,m.has=m.has,m.set=m.set,e=function(e,t){if(m.has(e))throw new p(d);return t.facade=e,m.set(e,t),t},t=function(e){return m.get(e)||{}},i=function(e){return m.has(e)}}else{var g=u("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new p(d);return t.facade=e,o(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},i=function(e){return s(e,g)}}return ki={set:e,get:t,has:i,enforce:function(n){return i(n)?t(n):e(n,{})},getterFor:function(e){return function(i){var n;if(!r(i)||(n=t(i)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}}}}function zi(){if(wi)return Ci.exports;wi=1;var e=it(),t=ue(),i=st(),n=qt(),a=ce(),r=function(){if(pi)return di;pi=1;var e=ce(),t=qt(),i=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,a=t(i,"name"),r=a&&"something"===function(){}.name,o=a&&(!e||e&&n(i,"name").configurable);return di={EXISTS:a,PROPER:r,CONFIGURABLE:o}}().CONFIGURABLE,o=Ei(),s=Bi(),l=s.enforce,u=s.get,c=String,d=Object.defineProperty,p=e("".slice),h=e("".replace),m=e([].join),g=a&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),f=String(String).split("String"),v=Ci.exports=function(e,t,i){"Symbol("===p(c(t),0,7)&&(t="["+h(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!n(e,"name")||r&&e.name!==t)&&(a?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&i&&n(i,"arity")&&e.length!==i.arity&&d(e,"length",{value:i.arity});try{i&&n(i,"constructor")&&i.constructor?a&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var o=l(e);return n(o,"source")||(o.source=m(f,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return i(this)&&u(this).source||o(this)},"toString"),Ci.exports}function Ii(){if(Di)return Ti;Di=1;var e=st(),t=ui(),i=zi(),n=Ut();return Ti=function(a,r,o,s){s||(s={});var l=s.enumerable,u=void 0!==s.name?s.name:r;if(e(o)&&i(o,u,s),s.global)l?a[r]=o:n(r,o);else{try{s.unsafe?a[r]&&(l=!0):delete a[r]}catch(e){}l?a[r]=o:t.f(a,r,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Ti}var Fi,Oi,Mi,ji,Ri,Ni,Li,_i,Vi,Hi,Ui,Wi,Ki,Gi,qi,Ji,Xi,$i={};function Yi(){if(ji)return Mi;ji=1;var e=function(){if(Oi)return Fi;Oi=1;var e=Math.ceil,t=Math.floor;return Fi=Math.trunc||function(i){var n=+i;return(n>0?t:e)(n)}}();return Mi=function(t){var i=+t;return i!=i||0===i?0:e(i)}}function Qi(){if(Ni)return Ri;Ni=1;var e=Yi(),t=Math.max,i=Math.min;return Ri=function(n,a){var r=e(n);return r<0?t(r+a,0):i(r,a)}}function Zi(){if(_i)return Li;_i=1;var e=Yi(),t=Math.min;return Li=function(i){var n=e(i);return n>0?t(n,9007199254740991):0}}function en(){if(Hi)return Vi;Hi=1;var e=Zi();return Vi=function(t){return e(t.length)}}function tn(){if(Gi)return Ki;Gi=1;var e=it(),t=qt(),i=ot(),n=function(){if(Wi)return Ui;Wi=1;var e=ot(),t=Qi(),i=en(),n=function(n){return function(a,r,o){var s=e(a),l=i(s);if(0===l)return!n&&-1;var u,c=t(o,l);if(n&&r!=r){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((n||c in s)&&s[c]===r)return n||c||0;return!n&&-1}};return Ui={includes:n(!0),indexOf:n(!1)}}().indexOf,a=Pi(),r=e([].push);return Ki=function(e,o){var s,l=i(e),u=0,c=[];for(s in l)!t(a,s)&&t(l,s)&&r(c,s);for(;o.length>u;)t(l,s=o[u++])&&(~n(c,s)||r(c,s));return c},Ki}var nn,an,rn,on,sn,ln,un,cn,dn,pn,hn,mn,gn,fn={};function vn(){if(rn)return an;rn=1;var e=ut(),t=it(),i=function(){if(Xi)return $i;Xi=1;var e=tn(),t=(Ji?qi:(Ji=1,qi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])).concat("length","prototype");return $i.f=Object.getOwnPropertyNames||function(i){return e(i,t)},$i}(),n=(nn||(nn=1,fn.f=Object.getOwnPropertySymbols),fn),a=li(),r=t([].concat);return an=e("Reflect","ownKeys")||function(e){var t=i.f(a(e)),o=n.f;return o?r(t,o(e)):t}}function bn(){if(sn)return on;sn=1;var e=qt(),t=vn(),i=Zt(),n=ui();return on=function(a,r,o){for(var s=t(r),l=n.f,u=i.f,c=0;cd;)void 0!==(o=l(s,t=u[d++]))&&r(c,t,o);return c}})}());var kn=e=>"string"==typeof e,xn=()=>{var e,t,i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},wn=e=>null==e?"":""+e,Tn=/###/g,Dn=e=>e&&e.indexOf("###")>-1?e.replace(Tn,"."):e,Cn=e=>!e||kn(e),En=(e,t,i)=>{for(var n=kn(t)?t.split("."):t,a=0;a{var n=En(e,t,Object),a=n.obj,r=n.k;if(void 0===a&&1!==t.length){for(var o=t[t.length-1],s=t.slice(0,t.length-1),l=En(e,s,Object);void 0===l.obj&&s.length;){var u;o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),null!==(u=l=En(e,s,Object))&&void 0!==u&&u.obj&&void 0!==l.obj[`${l.k}.${o}`]&&(l.obj=void 0)}l.obj[`${l.k}.${o}`]=i}else a[r]=i},Pn=(e,t)=>{var i=En(e,t),n=i.obj,a=i.k;if(n&&Object.prototype.hasOwnProperty.call(n,a))return n[a]},Bn=(e,t,i)=>{for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?kn(e[n])||e[n]instanceof String||kn(t[n])||t[n]instanceof String?i&&(e[n]=t[n]):Bn(e[n],t[n],i):e[n]=t[n]);return e},zn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),In={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Fn=e=>kn(e)?e.replace(/[&<>"'\/]/g,e=>In[e]):e;var On=[" ",",","?","!",";"],Mn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);if(void 0!==t)return t;var i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}(20),jn=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}for(var n=t.split(i),a=e,r=0;r-1&&lnull==e?void 0:e.replace(/_/g,"-"),Nn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,n;null===(i=console)||void 0===i||null===(i=i[e])||void 0===i||null===(n=i.apply)||void 0===n||n.call(i,console,t)}};class Ln{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Nn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i{this.observers[e]||(this.observers[e]=new Map);var i=this.observers[e].get(t)||0;this.observers[e].set(t,i+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,i=new Array(t>1?t-1:0),n=1;n{for(var t=S(e,2),n=t[0],a=t[1],r=0;r{for(var n=S(t,2),a=n[0],r=n[1],o=0;o1&&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){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){var n,a,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,s=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):kn(i)&&o?a.push(...i.split(o)):a.push(i)));var l=Pn(this.data,a);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),!l&&s&&kn(i)?jn(null===(n=this.data)||void 0===n||null===(n=n[e])||void 0===n?void 0:n[t],i,o):l}addResource(e,t,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(n=t,t=(o=e.split("."))[1]),this.addNamespaces(t),An(this.data,o,n),a.silent||this.emit("added",e,t,i,n)}addResources(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var a in i)(kn(i[a])||Array.isArray(i[a]))&&this.addResource(e,t,a,i[a],{silent:!0});n.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,n,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(n=i,i=t,t=(o=e.split("."))[1]),this.addNamespaces(t);var s=Pn(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?Bn(s,i,a):s=v(v({},s),i),An(this.data,o,s),r.silent||this.emit("added",e,t,i)}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),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Un={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,a){return e.forEach(e=>{var r,o;t=null!==(r=null===(o=this.processors[e])||void 0===o?void 0:o.process(t,i,n,a))&&void 0!==r?r:t}),t}},Wn=Symbol("i18next/PATH_KEY");function Kn(e,t){var i,n,a,r,o,s=e((r=[],(o=Object.create(null)).get=(e,t)=>{var i,n;return null===(i=a)||void 0===i||null===(n=i.revoke)||void 0===n||n.call(i),t===Wn?r:(r.push(t),(a=Proxy.revocable(e,o)).proxy)},Proxy.revocable(Object.create(null),o).proxy)),l=s[Wn],u=null!==(i=null==t?void 0:t.keySeparator)&&void 0!==i?i:".",c=null!==(n=null==t?void 0:t.nsSeparator)&&void 0!==n?n:":";if(l.length>1&&c){var d=null==t?void 0:t.ns;if((d?Array.isArray(d)?d:[d]:[]).includes(l[0]))return`${l[0]}${c}${l.slice(1).join(u)}`}return l.join(u)}var Gn={},qn=e=>!kn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Jn extends Vn{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=_n.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){var t=v({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}});if(null==e)return!1;var i=this.resolve(e,t);if(void 0===(null==i?void 0:i.res))return!1;var n=qn(i.res);return!1!==t.returnObjects||!n}extractFromKey(e,t){var i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=t.ns||this.options.defaultNS||[],r=i&&e.indexOf(i)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,i)=>{t=t||"",i=i||"";var n=On.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;var a=Mn.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),r=!a.test(e);if(!r){var o=e.indexOf(i);o>0&&!a.test(e.substring(0,o))&&(r=!0)}return r})(e,i,n));if(r&&!o){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:kn(a)?[a]:a};var l=e.split(i);(i!==n||i===n&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(n)}return{key:e,namespaces:kn(a)?[a]:a}}translate(e,t,i){var n="object"===x(t)?v({},t):t;if("object"!==x(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"===x(n)&&(n=v({},n)),n||(n={}),null==e)return"";"function"==typeof e&&(e=Kn(e,v(v({},this.options),n))),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?Kn(e,v(v({},this.options),n)):String(e));var a=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],n),s=o.key,l=o.namespaces,u=l[l.length-1],c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");var d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?a?{res:`${u}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${c}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:s;var h=this.resolve(e,n),m=null==h?void 0:h.res,g=(null==h?void 0:h.usedKey)||s,f=(null==h?void 0:h.exactUsedKey)||s,b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,S=void 0!==n.count&&!kn(n.count),k=Jn.hasDefaultValue(n),w=S?this.pluralResolver.getSuffix(d,n.count,n):"",T=n.ordinal&&S?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",D=S&&!n.ordinal&&0===n.count,C=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${T}`]||n.defaultValue,E=m;y&&!m&&k&&(E=C);var A=qn(E),P=Object.prototype.toString.apply(E);if(!(y&&E&&A&&["[object Number]","[object Function]","[object RegExp]"].indexOf(P)<0)||kn(b)&&Array.isArray(E))if(y&&kn(b)&&Array.isArray(m))(m=m.join(b))&&(m=this.extendTranslation(m,e,n,i));else{var B=!1,z=!1;!this.isValidLookup(m)&&k&&(B=!0,m=C),this.isValidLookup(m)||(z=!0,m=s);var I=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:m,F=k&&C!==m&&this.options.updateMissing;if(z||B||F){if(this.logger.log(F?"updateKey":"missingKey",d,u,s,F?C:m),r){var O=this.resolve(s,v(v({},n),{},{keySeparator:!1}));O&&O.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.")}var M=[],j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&j&&j[0])for(var R=0;R{var a,r=k&&i!==m?i:I;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,r,F,n):null!==(a=this.backendConnector)&&void 0!==a&&a.saveMissing&&this.backendConnector.saveMissing(e,u,t,r,F,n),this.emit("missingKey",e,u,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?M.forEach(e=>{var t=this.pluralResolver.getSuffixes(e,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{N([e],s+t,n[`defaultValue${t}`]||C)})}):N(M,s,C))}m=this.extendTranslation(m,e,n,h,i),z&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${u}${c}${s}`),(z||B)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${s}`:s,B?m:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,E,v(v({},n),{},{ns:l})):`key '${s} (${this.language})' returned an object instead of string.`;return a?(h.res=L,h.usedParams=this.getUsedParamsDetails(n),h):L}if(r){var _=Array.isArray(E),V=_?[]:{},H=_?f:g;for(var U in E)if(Object.prototype.hasOwnProperty.call(E,U)){var W=`${H}${r}${U}`;V[U]=k&&!m?this.translate(W,v(v({},n),{},{defaultValue:qn(C)?C[U]:void 0},{joinArrays:!1,ns:l})):this.translate(W,v(v({},n),{joinArrays:!1,ns:l})),V[U]===W&&(V[U]=E[U])}m=V}}return a?(h.res=m,h.usedParams=this.getUsedParamsDetails(n),h):m}extendTranslation(e,t,i,n,a){var r,o=this;if(null!==(r=this.i18nFormat)&&void 0!==r&&r.parse)e=this.i18nFormat.parse(e,v(v({},this.options.interpolation.defaultVariables),i),i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){var s;i.interpolation&&this.interpolator.init(v(v({},i),{interpolation:v(v({},this.options.interpolation),i.interpolation)}));var l,u=kn(e)&&(void 0!==(null==i||null===(s=i.interpolation)||void 0===s?void 0:s.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(u){var c=e.match(this.interpolator.nestingRegexp);l=c&&c.length}var d=i.replace&&!kn(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(d=v(v({},this.options.interpolation.defaultVariables),d)),e=this.interpolator.interpolate(e,d,i.lng||this.language||n.usedLng,i),u){var p=e.match(this.interpolator.nestingRegexp);l<(p&&p.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return kn(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?Kn(e,v(v({},this.options),o)):e)),e.forEach(e=>{if(!this.isValidLookup(t)){var s=this.extractFromKey(e,o),l=s.key;i=l;var u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));var c=void 0!==o.count&&!kn(o.count),d=c&&!o.ordinal&&0===o.count,p=void 0!==o.context&&(kn(o.context)||"number"==typeof o.context)&&""!==o.context,h=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);u.forEach(e=>{var s,u;this.isValidLookup(t)||(r=e,Gn[`${h[0]}-${e}`]||null===(s=this.utils)||void 0===s||!s.hasLoadedNamespace||null!==(u=this.utils)&&void 0!==u&&u.hasLoadedNamespace(r)||(Gn[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${h.join(", ")}" won't get resolved as namespace "${r}" 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!!!")),h.forEach(i=>{var r;if(!this.isValidLookup(t)){a=i;var s,u=[l];if(null!==(r=this.i18nFormat)&&void 0!==r&&r.addLookupKeys)this.i18nFormat.addLookupKeys(u,l,i,e,o);else{var h;c&&(h=this.pluralResolver.getSuffix(i,o.count,o));var m=`${this.options.pluralSeparator}zero`,g=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(o.ordinal&&0===h.indexOf(g)&&u.push(l+h.replace(g,this.options.pluralSeparator)),u.push(l+h),d&&u.push(l+m)),p){var f=`${l}${this.options.contextSeparator||"_"}${o.context}`;u.push(f),c&&(o.ordinal&&0===h.indexOf(g)&&u.push(f+h.replace(g,this.options.pluralSeparator)),u.push(f+h),d&&u.push(f+m))}}for(;s=u.pop();)this.isValidLookup(t)||(n=s,t=this.getResource(i,e,s,o))}}))})}}),{res:t,usedKey:i,exactUsedKey:n,usedLng:a,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i){var n,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return null!==(n=this.i18nFormat)&&void 0!==n&&n.getResource?this.i18nFormat.getResource(e,t,i,a):this.resourceStore.getResource(e,t,i,a)}getUsedParamsDetails(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!kn(e.replace),i=t?e.replace:e;if(t&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i=v(v({},this.options.interpolation.defaultVariables),i)),!t){i=v({},i);var n,a=h(["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]);try{for(a.s();!(n=a.n()).done;){delete i[n.value]}}catch(e){a.e(e)}finally{a.f()}}return i}static hasDefaultValue(e){var t="defaultValue";for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,12)&&void 0!==e[i])return!0;return!1}}class Xn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_n.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Rn(e))||e.indexOf("-")<0)return null;var 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=Rn(e))||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(kn(e)&&e.indexOf("-")>-1){var t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){return e?(e.forEach(e=>{if(!t){var i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(!t){var i=this.getScriptPartFromCode(e);if(this.isSupportedCode(i))return t=i;var 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):null;var t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),kn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];var i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){var i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],a=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return kn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):kn(e)&&a(this.formatLanguageCode(e)),i.forEach(e=>{n.indexOf(e)<0&&a(this.formatLanguageCode(e))}),n}}var $n={zero:0,one:1,two:2,few:3,many:4,other:5},Yn={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Qn{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=_n.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Rn("dev"===e?"en":e),a=i.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:a});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];try{t=new Intl.PluralRules(n,{type:a})}catch(n){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Yn;if(!e.match(/-|_/))return Yn;var o=this.languageUtils.getLanguagePartFromCode(e);t=this.getRule(o,i)}return this.pluralRulesCache[r]=t,t}needsPlural(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,i);return n||(n=this.getRule("dev",i)),(null===(t=n)||void 0===t?void 0:t.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((e,t)=>$n[e]-$n[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,i);return n?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}var Zn=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=((e,t,i)=>{var n=Pn(e,i);return void 0!==n?n:Pn(t,i)})(e,t,i);return!r&&a&&kn(i)&&void 0===(r=jn(e,i,n))&&(r=jn(t,i,n)),r},ea=e=>e.replace(/\$/g,"$$$$");class ta{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_n.create("interpolator"),this.options=t,this.format=(null==t||null===(e=t.interpolation)||void 0===e?void 0:e.format)||(e=>e),this.init(t)}init(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation,i=t.escape,n=t.escapeValue,a=t.useRawValueToEscape,r=t.prefix,o=t.prefixEscaped,s=t.suffix,l=t.suffixEscaped,u=t.formatSeparator,c=t.unescapeSuffix,d=t.unescapePrefix,p=t.nestingPrefix,h=t.nestingPrefixEscaped,m=t.nestingSuffix,g=t.nestingSuffixEscaped,f=t.nestingOptionsSeparator,v=t.maxReplaces,b=t.alwaysFormat;this.escape=void 0!==i?i:Fn,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==a&&a,this.prefix=r?zn(r):o||"{{",this.suffix=s?zn(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?zn(p):h||zn("$t("),this.nestingSuffix=m?zn(m):g||zn(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,n){var a,r,o,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){var a=Zn(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,i,v(v(v({},n),t),{},{interpolationkey:e})):a}var r=e.split(this.formatSeparator),o=r.shift().trim(),s=r.join(this.formatSeparator).trim();return this.format(Zn(t,l,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,i,v(v(v({},n),t),{},{interpolationkey:o}))};this.resetRegExp();var c=(null==n?void 0:n.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=void 0!==(null==n||null===(a=n.interpolation)||void 0===a?void 0:a.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ea(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ea(this.escape(e)):ea(e)}].forEach(t=>{for(s=0;r=t.regex.exec(e);){var i=r[1].trim();if(void 0===(o=u(i)))if("function"==typeof c){var a=c(e,r,n);o=kn(a)?a:""}else if(n&&Object.prototype.hasOwnProperty.call(n,i))o="";else{if(d){o=r[0];continue}this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),o=""}else kn(o)||this.useRawValueToEscape||(o=wn(o));var l=t.safeValue(o);if(e=e.replace(r[0],l),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){for(var i,n,a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(e,t)=>{var i,n,r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var o=e.split(new RegExp(`${zn(r)}[ ]*{`)),s=`{${o[1]}`;e=o[0];var l=(s=this.interpolate(s,a)).match(/'/g),u=s.match(/"/g);((null!==(i=null==l?void 0:l.length)&&void 0!==i?i:0)%2==0&&!u||(null!==(n=null==u?void 0:u.length)&&void 0!==n?n:0)%2!=0)&&(s=s.replace(/'/g,'"'));try{a=JSON.parse(s),t&&(a=v(v({},t),a))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${s}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};i=this.nestingRegexp.exec(e);){var s=[];(a=(a=v({},r)).replace&&!kn(a.replace)?a.replace:a).applyPostProcessor=!1,delete a.defaultValue;var l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==l&&(s=i[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),(n=t(o.call(this,i[1].trim(),a),a))&&i[0]===e&&!kn(n))return n;kn(n)||(n=wn(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),s.length&&(n=s.reduce((e,t)=>this.format(e,t,r.lng,v(v({},r),{},{interpolationkey:i[1].trim()})),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}}var ia=e=>{var t={};return(i,n,a)=>{var r=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(r=v(v({},r),{},{[a.interpolationkey]:void 0}));var o=n+JSON.stringify(r),s=t[o];return s||(s=e(Rn(n),a),t[o]=s),s(i)}},na=e=>(t,i,n)=>e(Rn(i),n)(t);class aa{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_n.create("formatter"),this.options=e,this.init(e)}init(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||",";var i=t.cacheInBuiltFormats?ia:na;this.formats={number:i((e,t)=>{var i=new Intl.NumberFormat(e,v({},t));return e=>i.format(e)}),currency:i((e,t)=>{var i=new Intl.NumberFormat(e,v(v({},t),{},{style:"currency"}));return e=>i.format(e)}),datetime:i((e,t)=>{var i=new Intl.DateTimeFormat(e,v({},t));return e=>i.format(e)}),relativetime:i((e,t)=>{var i=new Intl.RelativeTimeFormat(e,v({},t));return e=>i.format(e,t.range||"day")}),list:i((e,t)=>{var i=new Intl.ListFormat(e,v({},t));return e=>i.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ia(t)}format(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(e=>e.indexOf(")")>-1)){var r=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,r)].join(this.formatSeparator)}var o=a.reduce((e,t)=>{var a=(e=>{var t=e.toLowerCase().trim(),i={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var a=n[1].substring(0,n[1].length-1);"currency"===t&&a.indexOf(":")<0?i.currency||(i.currency=a.trim()):"relativetime"===t&&a.indexOf(":")<0?i.range||(i.range=a.trim()):a.split(";").forEach(e=>{if(e){var t=k(e.split(":")),n=t[0],a=t.slice(1).join(":").trim().replace(/^'+|'+$/g,""),r=n.trim();i[r]||(i[r]=a),"false"===a&&(i[r]=!1),"true"===a&&(i[r]=!0),isNaN(a)||(i[r]=parseInt(a,10))}})}return{formatName:t,formatOptions:i}})(t),r=a.formatName,o=a.formatOptions;if(this.formats[r]){var s=e;try{var l,u=(null==n||null===(l=n.formatParams)||void 0===l?void 0:l[n.interpolationkey])||{},c=u.locale||u.lng||n.locale||n.lng||i;s=this.formats[r](e,c,v(v(v({},o),n),u))}catch(e){this.logger.warn(e)}return s}return this.logger.warn(`there was no format function for ${r}`),e},e);return o}}class ra extends Vn{constructor(e,t,i){var n,a,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=_n.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],null===(n=this.backend)||void 0===n||null===(a=n.init)||void 0===a||a.call(n,i,r.backend,r)}queueLoad(e,t,i,n){var a={},r={},o={},s={};return e.forEach(e=>{var n=!0;t.forEach(t=>{var o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,n=!1,void 0===r[o]&&(r[o]=!0),void 0===a[o]&&(a[o]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(a).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(a),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,i){var n=e.split("|"),a=n[0],r=n[1];t&&this.emit("failedLoading",a,r,t),!t&&i&&this.store.addResourceBundle(a,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);var o={};this.queue.forEach(i=>{var n,s,l,u,c;n=i.loaded,s=r,l=En(n,[a],Object),u=l.obj,c=l.k,u[c]=u[c]||[],u[c].push(s),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});var t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:a,callback:r});else{this.readingCalls++;var o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){var l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}o&&s&&n{this.read.call(this,e,t,i,n+1,2*a,r)},a):r(o,s)},s=this.backend[i].bind(this.backend);if(2!==s.length)return s(e,t,o);try{var l=s(e,t);l&&"function"==typeof l.then?l.then(e=>o(null,e)).catch(o):o(null,l)}catch(e){o(e)}}}prepareLoading(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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."),n&&n();kn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),kn(t)&&(t=[t]);var a=this.queueLoad(e,t,i,n);if(!a.toLoad.length)return a.pending.length||n(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),n=i[0],a=i[1];this.read(n,a,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${n} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${a} for language ${n}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,n,a){var r,o,s,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(null===(r=this.services)||void 0===r||null===(r=r.utils)||void 0===r||!r.hasLoadedNamespace||null!==(o=this.services)&&void 0!==o&&null!==(o=o.utils)&&void 0!==o&&o.hasLoadedNamespace(t)){if(null!=i&&""!==i){if(null!==(s=this.backend)&&void 0!==s&&s.create){var c=v(v({},l),{},{isUpdate:a}),d=this.backend.create.bind(this.backend);if(d.length<6)try{var p;(p=5===d.length?d(e,t,i,n,c):d(e,t,i,n))&&"function"==typeof p.then?p.then(e=>u(null,e)).catch(u):u(null,p)}catch(e){u(e)}else d(e,t,i,n,u,c)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}else this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}var oa=()=>({debug:!1,initAsync:!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=>{var t={};if("object"===x(e[1])&&(t=e[1]),kn(e[1])&&(t.defaultValue=e[1]),kn(e[2])&&(t.tDescription=e[2]),"object"===x(e[2])||"object"===x(e[3])){var i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),sa=e=>{var t,i;return kn(e.ns)&&(e.ns=[e.ns]),kn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),kn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(i=t.indexOf)||void 0===i?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},la=()=>{},ua="__i18next_supportNoticeShown";class ca extends Vn{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sa(t),this.services={},this.logger=_n,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(kn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n,a,r,o,s,l,u=oa();this.options=v(v(v({},u),this.options),sa(t)),this.options.interpolation=v(v({},u.interpolation),this.options.interpolation),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=u.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||((null==(n=this)||null===(a=n.modules)||void 0===a||null===(a=a.backend)||void 0===a||null===(a=a.name)||void 0===a?void 0:a.indexOf("Locize"))>0||(null==n||null===(r=n.modules)||void 0===r||null===(r=r.backend)||void 0===r||null===(r=r.constructor)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.indexOf("Locize"))>0||null!=n&&null!==(o=n.options)&&void 0!==o&&null!==(o=o.backend)&&void 0!==o&&o.backends&&n.options.backend.backends.some(e=>{var t,i;return(null==e||null===(t=e.name)||void 0===t?void 0:t.indexOf("Locize"))>0||(null==e||null===(i=e.constructor)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.indexOf("Locize"))>0})||null!=n&&null!==(s=n.options)&&void 0!==s&&null!==(s=s.backend)&&void 0!==s&&s.projectId||null!=n&&null!==(l=n.options)&&void 0!==l&&null!==(l=l.backend)&&void 0!==l&&l.backendOptions&&n.options.backend.backendOptions.some(e=>null==e?void 0:e.projectId))||"undefined"!=typeof globalThis&&globalThis[ua]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[ua]=!0));var c=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){var d;this.modules.logger?_n.init(c(this.modules.logger),this.options):_n.init(null,this.options),d=this.modules.formatter?this.modules.formatter:aa;var p=new Xn(this.options);this.store=new Hn(this.options.resources,this.options);var h=this.services;h.logger=_n,h.resourceStore=this.store,h.languageUtils=p,h.pluralResolver=new Qn(p,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!d||this.options.interpolation.format&&this.options.interpolation.format!==u.interpolation.format||(h.formatter=c(d),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new ta(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new ra(c(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a1?i-1:0),a=1;a{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,i||(i=la),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&"dev"!==m[0]&&(this.options.lng=m[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}});var g=xn(),f=()=>{var 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),g.resolve(t),i(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),g}loadResources(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:la,i=kn(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){var n,a;if("cimode"===(null==i?void 0:i.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return t();var r=[],o=e=>{e&&("cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&r.indexOf(e)<0&&r.push(e)}))};if(i)o(i);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>o(e));null===(n=this.options.preload)||void 0===n||null===(a=n.forEach)||void 0===a||a.call(n,e=>o(e)),this.services.backendConnector.load(r,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,i){var n=xn();return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=la),this.services.backendConnector.reload(e,t,e=>{n.resolve(),i(e)}),n}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&&Un.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(var t=0;t-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;var n=xn();this.emit("languageChanging",e);var a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,o)=>{o?this.isLanguageChangingTo===e&&(a(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve(function(){return i.t(...arguments)}),t&&t(r,function(){return i.t(...arguments)})},o=t=>{e||t||!this.services.languageDetector||(t=[]);var i,n,o=kn(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(o)?o:this.services.languageUtils.getBestMatchFromCodes(kn(t)?[t]:t);s&&(this.language||a(s),this.translator.language||this.translator.changeLanguage(s),null===(i=this.services.languageDetector)||void 0===i||null===(n=i.cacheUserLanguage)||void 0===n||n.call(i,s));this.loadResources(s,e=>{r(e,s)})};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(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,i){var n=this,a=function(e,t){var r;if("object"!==x(t)){for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l("function"==typeof e&&(e=Kn(e,v(v({},n.options),t))),`${r.keyPrefix}${c}${e}`)):("function"==typeof e&&(e=Kn(e,v(v({},n.options),t))),u=r.keyPrefix?`${r.keyPrefix}${c}${e}`:e),n.t(u,r)};return kn(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=i,a}t(){for(var e,t=arguments.length,i=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var r=(e,t)=>{var i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){var o=t.precheck(this,r);if(void 0!==o)return o}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!r(i,e)||n&&!r(a,e)))}loadNamespaces(e,t){var i=xn();return this.options.ns?(kn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){var i=xn();kn(e)&&(e=[e]);var n=this.options.preload||[],a=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){var t,i;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{var n=new Intl.Locale(e);if(n&&n.getTextInfo){var a=n.getTextInfo();if(a&&a.direction)return a.direction}}catch(e){}var r=(null===(i=this.services)||void 0===i?void 0:i.languageUtils)||new Xn(oa());return e.toLowerCase().indexOf("-latn")>1?"ltr":["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(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){var e=new ca(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0);return e.createInstance=ca.createInstance,e}cloneInstance(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:la,i=e.forkResourceStore;i&&delete e.forkResourceStore;var n=v(v(v({},this.options),e),{isClone:!0}),a=new ca(n);void 0===e.debug&&void 0===e.prefix||(a.logger=a.logger.clone(e));if(["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services=v({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i){var r=Object.keys(this.store.data).reduce((e,t)=>(e[t]=v({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((i,n)=>(i[n]=v({},e[t][n]),i),e[t]),e),{});a.store=new Hn(r,n),a.services.resourceStore=a.store}if(e.interpolation){var o=v(v(v({},oa().interpolation),this.options.interpolation),e.interpolation),s=v(v({},n),{},{interpolation:o});a.services.interpolator=new ta(s)}return a.translator=new Jn(a.services,n),a.translator.on("*",function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n