-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathhidePodcasts.js
3 lines (3 loc) · 56 KB
/
hidePodcasts.js
1
2
3
!async function(){for(;!Spicetify.React||!Spicetify.ReactDOM;)await new Promise(e=>setTimeout(e,10));(()=>{function p(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:".",i=!(4<arguments.length&&void 0!==arguments[4])||arguments[4];let o=K(e,t,s);return o=!o&&i&&R(s)&&void 0===(o=y(e,s,a))?y(t,s,a):o}var F=Object.create,n=Object.defineProperty,T=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,V=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty,e=(e,t)=>function(){return t||(0,e[l(e)[0]])((t={exports:{}}).exports,t),t.exports},t=(e,t,s)=>{s=null!=e?F(V(e)):{};var a=!t&&e&&e.__esModule?s:n(s,"default",{value:e,enumerable:!0}),i=e,o=void 0,r=void 0;if(i&&"object"==typeof i||"function"==typeof i)for(let e of l(i))U.call(a,e)||e===o||n(a,e,{get:()=>i[e],enumerable:!(r=T(i,e))||r.enumerable});return a},s=e({"external-global-plugin:react"(e,t){t.exports=Spicetify.React}}),e=e({"node_modules/.pnpm/[email protected]/node_modules/void-elements/index.js"(e,t){t.exports={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}}}),R=e=>"string"==typeof e,h=()=>{let s,a;var e=new Promise((e,t)=>{s=e,a=t});return e.resolve=s,e.reject=a,e},c=e=>null==e?"":""+e,z=(e,t,s)=>{e.forEach(e=>{t[e]&&(s[e]=t[e])})},J=/###/g,r=e=>e&&-1<e.indexOf("###")?e.replace(J,"."):e,d=e=>!e||R(e),g=(e,t,s)=>{var a=R(t)?t.split("."):t;let i=0;for(;i<a.length-1;){if(d(e))return{};var o=r(a[i]);!e[o]&&s&&(e[o]=new s),e=Object.prototype.hasOwnProperty.call(e,o)?e[o]:{},++i}return d(e)?{}:{obj:e,k:r(a[i])}},u=(a,i,o)=>{var{obj:e,k:t}=g(a,i,Object);if(void 0!==e||1===i.length)e[t]=o;else{let e=i[i.length-1],t=i.slice(0,i.length-1),s=g(a,t,Object);for(;void 0===s.obj&&t.length;)e=t[t.length-1]+"."+e,t=t.slice(0,t.length-1),(s=g(a,t,Object))?.obj&&void 0!==s.obj[s.k+"."+e]&&(s.obj=void 0);s.obj[s.k+"."+e]=o}},H=(e,t,s,a)=>{var{obj:e,k:t}=g(e,t,Object);e[t]=e[t]||[],e[t].push(s)},f=(e,t)=>{var{obj:e,k:t}=g(e,t);if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]},K=(e,t,s)=>{e=f(e,s);return void 0!==e?e:f(t,s)},m=(e,t,s)=>{for(const a in t)"__proto__"!==a&&"constructor"!==a&&(a in e?R(e[a])||e[a]instanceof String||R(t[a])||t[a]instanceof String?s&&(e[a]=t[a]):m(e[a],t[a],s):e[a]=t[a]);return e},v=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),B={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Q=e=>R(e)?e.replace(/[&<>"'\/]/g,e=>B[e]):e,$=[" ",",","?","!",";"],q=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){var t=this.regExpMap.get(e);return void 0!==t||(t=new RegExp(e),this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,t),this.regExpQueue.push(e)),t}}(20),G=(e,t,s)=>{t=t||"",s=s||"";var a=$.filter(e=>t.indexOf(e)<0&&s.indexOf(e)<0);if(0===a.length)return!0;var i,a=q.getRegExp(`(${a.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!a.test(e);return o||0<(i=e.indexOf(s))&&!a.test(e.substring(0,i))&&(o=!0),o},y=function(e,t){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;var r=t.split(o);let i=e;for(let a=0;a<r.length;){if(!i||"object"!=typeof i)return;let t,s="";for(let e=a;e<r.length;++e)if(e!==a&&(s+=o),s+=r[e],void 0!==(t=i[s])&&!(-1<["string","number","boolean"].indexOf(typeof t)&&e<r.length-1)){a+=e-a+1;break}i=t}return i}},b=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?.[e]?.apply?.(console,t)}},a=class{constructor(e){this.init(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})}init(e){var t=1<arguments.length&&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),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,a){return a&&!this.debug?null:(R(e[0])&&(e[0]=""+s+this.prefix+" "+e[0]),this.logger[t](e))}create(e){return new a(this.logger,{prefix:this.prefix+`:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new a(this.logger,e)}},x=new a,i=class{constructor(){this.observers={}}on(e,s){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);var t=this.observers[e].get(s)||0;this.observers[e].set(s,t+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(a){for(var e=arguments.length,i=new Array(1<e?e-1:0),t=1;t<e;t++)i[t-1]=arguments[t];this.observers[a]&&Array.from(this.observers[a].entries()).forEach(e=>{var[t,s]=e;for(let e=0;e<s;e++)t(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(e=>{var[t,s]=e;for(let e=0;e<s;e++)t.apply(t,[a,...i])})}},S=class extends i{constructor(e){var t=1<arguments.length&&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){e=this.options.ns.indexOf(e);-1<e&&this.options.ns.splice(e,1)}getResource(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=(void 0!==a.keySeparator?a:this.options).keySeparator,a=(void 0!==a.ignoreJSONStructure?a:this.options).ignoreJSONStructure;let o;-1<e.indexOf(".")?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):R(s)&&i?o.push(...s.split(i)):o.push(s)));var r=f(this.data,o);return!r&&!t&&!s&&-1<e.indexOf(".")&&(e=o[0],t=o[1],s=o.slice(2).join(".")),!r&&a&&R(s)?y(this.data?.[e]?.[t],s,i):r}addResource(e,t,s,a){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=(void 0!==i.keySeparator?i:this.options).keySeparator;let r=[e,t];s&&(r=r.concat(o?s.split(o):s)),-1<e.indexOf(".")&&(a=t,t=(r=e.split("."))[1]),this.addNamespaces(t),u(this.data,r,a),i.silent||this.emit("added",e,t,s,a)}addResources(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in s)(R(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});a.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,a,i){var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1};let r=[e,t],n=(-1<e.indexOf(".")&&(a=s,s=t,t=(r=e.split("."))[1]),this.addNamespaces(t),f(this.data,r)||{});o.skipCopy||(s=JSON.parse(JSON.stringify(s))),a?m(n,s,i):n={...n,...s},u(this.data,r,n),o.silent||this.emit("added",e,t,s)}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){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&0<Object.keys(t[e]).length)}toJSON(){return this.data}},k={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,a,i){return e.forEach(e=>{t=this.processors[e]?.process(t,s,a,i)??t}),t}},o={},N=class extends i{constructor(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};super(),z(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=x.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){return null!=e&&void 0!==this.resolve(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{interpolation:{}})?.res}extractFromKey(e,t){let s=(void 0!==t.nsSeparator?t:this.options).nsSeparator;void 0===s&&(s=":");var a=(void 0!==t.keySeparator?t:this.options).keySeparator;let i=t.ns||this.options.defaultNS||[];var o=s&&-1<e.indexOf(s),t=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||G(e,s,a));if(o&&!t){o=e.match(this.interpolator.nestingRegexp);if(o&&0<o.length)return{key:e,namespaces:R(i)?[i]:i};t=e.split(s);(s!==a||s===a&&-1<this.options.ns.indexOf(t[0]))&&(i=t.shift()),e=t.join(a)}return{key:e,namespaces:R(i)?[i]:i}}translate(s,a,i){if(a=(a="object"==typeof(a="object"!=typeof a&&this.options.overloadTranslationOptionHandler?this.options.overloadTranslationOptionHandler(arguments):a)?{...a}:a)||{},null==s)return"";Array.isArray(s)||(s=[String(s)]);var e=(void 0!==a.returnDetails?a:this.options).returnDetails,o=(void 0!==a.keySeparator?a:this.options).keySeparator;const{key:r,namespaces:t}=this.extractFromKey(s[s.length-1],a),n=t[t.length-1];var l=a.lng||this.language,h=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase())return h?(h=a.nsSeparator||this.options.nsSeparator,e?{res:""+n+h+r,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:n,usedParams:this.getUsedParamsDetails(a)}:""+n+h+r):e?{res:r,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:n,usedParams:this.getUsedParamsDetails(a)}:r;h=this.resolve(s,a);let d=h?.res;var g=h?.usedKey||r,u=h?.exactUsedKey||r,p=Object.prototype.toString.apply(d),c=(void 0!==a.joinArrays?a:this.options).joinArrays,f=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!R(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(f&&d&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||R(c)&&Array.isArray(d))if(f&&R(c)&&Array.isArray(d))d=(d=d.join(c))&&this.extendTranslation(d,s,a,i);else{let e=!1,t=!1;m=void 0!==a.count&&!R(a.count);const S=N.hasDefaultValue(a);var p=m?this.pluralResolver.getSuffix(l,a.count,a):"",f=a.ordinal&&m?this.pluralResolver.getSuffix(l,a.count,{ordinal:!1}):"";const k=m&&!a.ordinal&&0===a.count,w=k&&a[`defaultValue${this.options.pluralSeparator}zero`]||a["defaultValue"+p]||a["defaultValue"+f]||a.defaultValue,L=(!this.isValidLookup(d)&&S&&(e=!0,d=w),this.isValidLookup(d)||(t=!0,d=r),(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&t?void 0:d),O=S&&w!==d&&this.options.updateMissing;if(t||e||O){this.logger.log(O?"updateKey":"missingKey",l,n,r,O?w:d),o&&(c=this.resolve(r,{...a,keySeparator:!1}))&&c.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 t=[];var v=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if("fallback"===this.options.saveMissingTo&&v&&v[0])for(let e=0;e<v.length;e++)t.push(v[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(a.lng||this.language):t.push(a.lng||this.language);const C=(e,t,s)=>{s=S&&s!==d?s:L;this.options.missingKeyHandler?this.options.missingKeyHandler(e,n,t,s,O,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,n,t,s,O,a),this.emit("missingKey",e,n,t,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?t.forEach(t=>{var e=this.pluralResolver.getSuffixes(t,a);k&&a[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(this.options.pluralSeparator+"zero")<0&&e.push(this.options.pluralSeparator+"zero"),e.forEach(e=>{C([t],r+e,a["defaultValue"+e]||w)})}):C(t,r,w))}d=this.extendTranslation(d,s,a,h,i),t&&d===r&&this.options.appendNamespaceToMissingKey&&(d=n+":"+r),(t||e)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?n+":"+r:r,e?d:void 0))}else{if(!a.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),p=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,d,{...a,ns:t}):`key '${r} (${this.language})' returned an object instead of string.`,e?(h.res=p,h.usedParams=this.getUsedParamsDetails(a),h):p;if(o){var y,f=Array.isArray(d),b=f?[]:{},x=f?u:g;for(const P in d)Object.prototype.hasOwnProperty.call(d,P)&&(y=""+x+o+P,b[P]=this.translate(y,{...a,joinArrays:!1,ns:t}),b[P]===y)&&(b[P]=d[P]);d=b}}return e?(h.res=d,h.usedParams=this.getUsedParamsDetails(a),h):d}extendTranslation(s,a,i,o,r){var n=this;if(this.i18nFormat?.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});var l=R(s)&&(void 0!==i?.interpolation?.skipOnVariables?i:this.options).interpolation.skipOnVariables;let e,t=(l&&(h=s.match(this.interpolator.nestingRegexp),e=h&&h.length),i.replace&&!R(i.replace)?i.replace:i);this.options.interpolation.defaultVariables&&(t={...this.options.interpolation.defaultVariables,...t}),s=this.interpolator.interpolate(s,t,i.lng||this.language||o.usedLng,i),l&&(l=(h=s.match(this.interpolator.nestingRegexp))&&h.length,e<l)&&(i.nest=!1),!i.lng&&o&&o.res&&(i.lng=this.language||o.usedLng),!1!==i.nest&&(s=this.interpolator.nest(s,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r?.[0]!==t[0]||i.context?n.translate(...t,a):(n.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: `+a[0]),null)},i)),i.interpolation&&this.interpolator.reset()}var h=i.postProcess||this.options.postProcess,l=R(h)?[h]:h;return s=null!=s&&l?.length&&!1!==i.applyPostProcessor?k.handle(l,s,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(i)},...i}:i,this):s}resolve(e){let g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},u,a,p,c,i;return(e=R(e)?[e]:e).forEach(t=>{if(!this.isValidLookup(u)){t=this.extractFromKey(t,g);const n=t.key;a=n;let e=t.namespaces;this.options.fallbackNS&&(e=e.concat(this.options.fallbackNS));const l=void 0!==g.count&&!R(g.count),h=l&&!g.ordinal&&0===g.count,d=void 0!==g.context&&(R(g.context)||"number"==typeof g.context)&&""!==g.context,s=g.lngs||this.languageUtils.toResolveHierarchy(g.lng||this.language,g.fallbackLng);e.forEach(r=>{this.isValidLookup(u)||(i=r,o[s[0]+"-"+r]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(o[s[0]+"-"+r]=!0,this.logger.warn(`key "${a}" for languages "${s.join(", ")}" won't get resolved as namespace "${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!!!")),s.forEach(t=>{if(!this.isValidLookup(u)){c=t;var e,s=[n];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,n,t,r,g);else{let e;l&&(e=this.pluralResolver.getSuffix(t,g.count,g));var a,i=this.options.pluralSeparator+"zero",o=this.options.pluralSeparator+"ordinal"+this.options.pluralSeparator;l&&(s.push(n+e),g.ordinal&&0===e.indexOf(o)&&s.push(n+e.replace(o,this.options.pluralSeparator)),h)&&s.push(n+i),d&&(a=""+n+this.options.contextSeparator+g.context,s.push(a),l)&&(s.push(a+e),g.ordinal&&0===e.indexOf(o)&&s.push(a+e.replace(o,this.options.pluralSeparator)),h)&&s.push(a+i)}for(;e=s.pop();)this.isValidLookup(u)||(p=e,u=this.getResource(t,r,e,g))}}))})}}),{res:u,usedKey:a,exactUsedKey:p,usedLng:c,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return(this.i18nFormat?.getResource?this.i18nFormat:this.resourceStore).getResource(e,t,s,a)}getUsedParamsDetails(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!R(e.replace);let s=t?e.replace:e;if(t&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!t){s={...s};for(const a of["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"])delete s[a]}return s}static hasDefaultValue(e){var t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&void 0!==e[s])return!0;return!1}},w=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}getScriptPartFromCode(e){return!(e=b(e))||e.indexOf("-")<0||2===(e=e.split("-")).length||(e.pop(),"x"===e[e.length-1].toLowerCase())?null:this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(e){return!(e=b(e))||e.indexOf("-")<0?e:(e=e.split("-"),this.formatLanguageCode(e[0]))}formatLanguageCode(t){if(R(t)&&-1<t.indexOf("-")){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(e){}return(e=e&&this.options.lowerCaseLng?e.toLowerCase():e)?e:this.options.lowerCaseLng?t.toLowerCase():t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(e){return"languageOnly"!==this.options.load&&!this.options.nonExplicitSupportedLngs||(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||-1<this.supportedLngs.indexOf(e)}getBestMatchFromCodes(e){if(!e)return null;let s;return e.forEach(e=>{s||(e=this.formatLanguageCode(e),this.options.supportedLngs&&!this.isSupportedCode(e))||(s=e)}),!s&&this.options.supportedLngs&&e.forEach(e=>{if(!s){const t=this.getLanguagePartFromCode(e);if(this.isSupportedCode(t))return s=t;s=this.options.supportedLngs.find(e=>e===t||!(e.indexOf("-")<0&&t.indexOf("-")<0)&&(0<e.indexOf("-")&&t.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===t||0===e.indexOf(t)&&1<t.length)?e:void 0)}}),s=s||this.getFallbackCodes(this.options.fallbackLng)[0]}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),R(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return(s=(s=(s=(s=s||e[this.getScriptPartFromCode(t)])||e[this.formatLanguageCode(t)])||e[this.getLanguagePartFromCode(t)])||e.default)||[]}toResolveHierarchy(e,t){t=this.getFallbackCodes(t||this.options.fallbackLng||[],e);const s=[],a=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn("rejecting language code not found in supportedLngs: "+e))};return R(e)&&(-1<e.indexOf("-")||-1<e.indexOf("_"))?("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))):R(e)&&a(this.formatLanguageCode(e)),t.forEach(e=>{s.indexOf(e)<0&&a(this.formatLanguageCode(e))}),s}},L={zero:0,one:1,two:2,few:3,many:4,other:5},O={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},_=class{constructor(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=x.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(t){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=b("dev"===t?"en":t),e=s.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:a,type:e});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(a,{type:e})}catch(e){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),O;if(!t.match(/-|_/))return O;a=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(a,s)}return this.pluralRulesCache[i]=o}needsPlural(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};let s=this.getRule(e,t);return 1<(s=s||this.getRule("dev",t))?.resolvedOptions().pluralCategories.length}getPluralFormsOfKey(e,t){return this.getSuffixes(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).map(e=>""+t+e)}getSuffixes(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=this.getRule(e,t);return(s=s||this.getRule("dev",t))?s.resolvedOptions().pluralCategories.sort((e,t)=>L[e]-L[t]).map(e=>""+this.options.prepend+(t.ordinal?"ordinal"+this.options.prepend:"")+e):[]}getSuffix(e,t){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a=this.getRule(e,s);return a?""+this.options.prepend+(s.ordinal?"ordinal"+this.options.prepend:"")+a.select(t):(this.logger.warn("no plural rule found for: "+e),this.getSuffix("dev",t,s))}},C=e=>e.replace(/\$/g,"$$$$"),W=class{constructor(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.logger=x.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},{escape:e,escapeValue:t,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:o,suffixEscaped:r,formatSeparator:n,unescapeSuffix:l,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:g,nestingSuffix:u,nestingSuffixEscaped:p,nestingOptionsSeparator:c,maxReplaces:f,alwaysFormat:m}=(e.interpolation||(e.interpolation={escapeValue:!0}),e.interpolation);this.escape=void 0!==e?e:Q,this.escapeValue=void 0===t||t,this.useRawValueToEscape=void 0!==s&&s,this.prefix=a?v(a):i||"{{",this.suffix=o?v(o):r||"}}",this.formatSeparator=n||",",this.unescapePrefix=l?"":h||"-",this.unescapeSuffix=!this.unescapePrefix&&l||"",this.nestingPrefix=d?v(d):g||v("$t("),this.nestingSuffix=u?v(u):p||v(")"),this.nestingOptionsSeparator=c||",",this.maxReplaces=f||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){var e=(e,t)=>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(a,s,i,o){let r,n,l;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=e=>{var t;return e.indexOf(this.formatSeparator)<0?(t=p(s,h,e,this.options.keySeparator,this.options.ignoreJSONStructure),this.alwaysFormat?this.format(t,void 0,i,{...o,...s,interpolationkey:e}):t):(e=(t=e.split(this.formatSeparator)).shift().trim(),t=t.join(this.formatSeparator).trim(),this.format(p(s,h,e,this.options.keySeparator,this.options.ignoreJSONStructure),t,i,{...o,...s,interpolationkey:e}))},g=(this.resetRegExp(),o?.missingInterpolationHandler||this.options.missingInterpolationHandler),u=(void 0!==o?.interpolation?.skipOnVariables?o:this.options).interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>C(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?C(this.escape(e)):C(e)}].forEach(e=>{for(l=0;r=e.regex.exec(a);){var t=r[1].trim();if(void 0===(n=d(t)))if("function"==typeof g){var s=g(a,r,o);n=R(s)?s:""}else{if(!o||!Object.prototype.hasOwnProperty.call(o,t)){if(u){n=r[0];continue}this.logger.warn(`missed to pass in variable ${t} for interpolating `+a)}n=""}else R(n)||this.useRawValueToEscape||(n=c(n));s=e.safeValue(n);if(a=a.replace(r[0],s),u?(e.regex.lastIndex+=n.length,e.regex.lastIndex-=r[0].length):e.regex.lastIndex=0,++l>=this.maxReplaces)break}}),a}nest(s,a){let i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o,r,n;for(var l,h=(s,e)=>{var a=this.nestingOptionsSeparator;if(!(s.indexOf(a)<0)){var i=s.split(new RegExp(a+"[ ]*{"));let t="{"+i[1];s=i[0];var i=(t=this.interpolate(t,n)).match(/'/g),o=t.match(/"/g);((i?.length??0)%2!=0||o)&&o.length%2==0||(t=t.replace(/'/g,'"'));try{n=JSON.parse(t),e&&(n={...e,...n})}catch(e){return this.logger.warn("failed parsing options string in nesting for key "+s,e),""+s+a+t}n.defaultValue&&-1<n.defaultValue.indexOf(this.prefix)&&delete n.defaultValue}return s};o=this.nestingRegexp.exec(s);){let e=[],t=((n=(n={...i}).replace&&!R(n.replace)?n.replace:n).applyPostProcessor=!1,delete n.defaultValue,!1);if(-1===o[0].indexOf(this.formatSeparator)||/{.*}/.test(o[1])||(l=o[1].split(this.formatSeparator).map(e=>e.trim()),o[1]=l.shift(),e=l,t=!0),(r=a(h.call(this,o[1].trim(),n),n))&&o[0]===s&&!R(r))return r;(r=R(r)?r:c(r))||(this.logger.warn(`missed to resolve ${o[1]} for nesting `+s),r=""),t&&(r=e.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:o[1].trim()}),r.trim())),s=s.replace(o[0],r),this.regexp.lastIndex=0}return s}},Y=e=>{let t=e.toLowerCase().trim();const s={};return-1<e.indexOf("(")&&(e=e.split("("),t=e[0].toLowerCase().trim(),e=e[1].substring(0,e[1].length-1),"currency"===t&&e.indexOf(":")<0?s.currency||(s.currency=e.trim()):"relativetime"===t&&e.indexOf(":")<0?s.range||(s.range=e.trim()):e.split(";").forEach(e=>{var t;e&&([e,...t]=e.split(":"),t=t.join(":").trim().replace(/^'+|'+$/g,""),e=e.trim(),s[e]||(s[e]=t),"false"===t&&(s[e]=!1),"true"===t&&(s[e]=!0),isNaN(t)||(s[e]=parseInt(t,10)))})),{formatName:t,formatOptions:s}},P=r=>{const n={};return(e,t,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});var i=t+JSON.stringify(a);let o=n[i];return o||(o=r(b(t),s),n[i]=o),o(e)}},Z=class{constructor(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.logger=x.create("formatter"),this.options=e,this.formats={number:P((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:P((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:P((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:P((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:P((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})},this.init(e)}init(e){this.formatSeparator=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=P(t)}format(e,t,r){let n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};var t=t.split(this.formatSeparator),s=(1<t.length&&1<t[0].indexOf("(")&&t[0].indexOf(")")<0&&t.find(e=>-1<e.indexOf(")"))&&(s=t.findIndex(e=>-1<e.indexOf(")")),t[0]=[t[0],...t.splice(1,s)].join(this.formatSeparator)),t.reduce((t,s)=>{var{formatName:s,formatOptions:a}=Y(s);if(this.formats[s]){let e=t;try{var i=n?.formatParams?.[n.interpolationkey]||{},o=i.locale||i.lng||n.locale||n.lng||r;e=this.formats[s](t,o,{...a,...n,...i})}catch(e){this.logger.warn(e)}return e}return this.logger.warn("there was no format function for "+s),t},e));return s}},ee=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)},te=class extends i{constructor(e,t,s){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=a,this.logger=x.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=0<=a.maxRetries?a.maxRetries:5,this.retryTimeout=1<=a.retryTimeout?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,a.backend,a)}queueLoad(e,t,i,s){const o={},r={},n={},l={};return e.forEach(s=>{let a=!0;t.forEach(e=>{var t=s+"|"+e;!i.reload&&this.store.hasResourceBundle(s,e)?this.state[t]=2:this.state[t]<0||(1===this.state[t]?void 0===r[t]&&(r[t]=!0):(this.state[t]=1,a=!1,void 0===r[t]&&(r[t]=!0),void 0===o[t]&&(o[t]=!0),void 0===l[e]&&(l[e]=!0)))}),a||(n[s]=!0)}),(Object.keys(o).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(r),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){var a=e.split("|");const i=a[0],o=a[1],r=(t&&this.emit("failedLoading",i,o,t),!t&&s&&this.store.addResourceBundle(i,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0),{});this.queue.forEach(s=>{H(s.loaded,[i],o),ee(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(t=>{r[t]||(r[t]={});var e=s.loaded[t];e.length&&e.forEach(e=>{void 0===r[t][e]&&(r[t][e]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",r),this.queue=this.queue.filter(e=>!e.done)}read(a,i,o){let r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,l=5<arguments.length?arguments[5]:void 0;if(!a.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:a,ns:i,fcName:o,tried:r,wait:n,callback:l});else{this.readingCalls++;const s=(e,t)=>{var s;this.readingCalls--,0<this.waitingReads.length&&(s=this.waitingReads.shift(),this.read(s.lng,s.ns,s.fcName,s.tried,s.wait,s.callback)),e&&t&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,a,i,o,r+1,2*n,l)},n):l(e,t)};var e=this.backend[o].bind(this.backend);if(2!==e.length)return e(a,i,s);try{var t=e(a,i);t&&"function"==typeof t.then?t.then(e=>s(null,e)).catch(s):s(null,t)}catch(e){s(e)}}}prepareLoading(e,t){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a=3<arguments.length?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();R(e)&&(e=this.languageUtils.toResolveHierarchy(e)),R(t)&&(t=[t]);e=this.queueLoad(e,t,s,a);if(!e.toLoad.length)return e.pending.length||a(),null;e.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(s){let a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";var e=s.split("|");const i=e[0],o=e[1];this.read(i,o,"read",void 0,void 0,(e,t)=>{e&&this.logger.warn(`${a}loading namespace ${o} for language ${i} failed`,e),!e&&t&&this.logger.log(`${a}loaded namespace ${o} for language `+i,t),this.loaded(s,e,t)})}saveMissing(t,s,a,i,o){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{};let n=6<arguments.length&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(s))this.logger.warn(`did not save key "${a}" as the namespace "${s}" 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!=a&&""!==a){if(this.backend?.create){r={...r,isUpdate:o},o=this.backend.create.bind(this.backend);if(o.length<6)try{let e;(e=5===o.length?o(t,s,a,i,r):o(t,s,a,i))&&"function"==typeof e.then?e.then(e=>n(null,e)).catch(n):n(null,e)}catch(e){n(e)}else o(t,s,a,i,n,r)}t&&t[0]&&this.store.addResource(t[0],s,a,i)}}},se=()=>({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=>{let t={};if("object"==typeof e[1]&&(t=e[1]),R(e[1])&&(t.defaultValue=e[1]),R(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ae=e=>(R(e.ns)&&(e.ns=[e.ns]),R(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),R(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),M=()=>{},ie=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{"function"==typeof t[e]&&(t[e]=t[e].bind(t))})},j=class extends i{constructor(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0;if(super(),this.options=ae(e),this.services={},this.logger=x,this.modules={external:[]},ie(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var i=this;let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},s=1<arguments.length?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(s=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&(R(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));var t=se(),a=(this.options={...t,...this.options,...ae(e)},this.options.interpolation={...t.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),e=>e?"function"==typeof e?new e:e:null);if(!this.options.isClone){this.modules.logger?x.init(a(this.modules.logger),this.options):x.init(null,this.options);let e;e=this.modules.formatter||Z;var o=new w(this.options),r=(this.store=new S(this.options.resources,this.options),this.services);r.logger=x,r.resourceStore=this.store,r.languageUtils=o,r.pluralResolver=new _(o,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==t.interpolation.format||(r.formatter=a(e),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new W(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new te(a(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(e){for(var t=arguments.length,s=new Array(1<t?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];i.emit(e,...s)}),this.modules.languageDetector&&(r.languageDetector=a(this.modules.languageDetector),r.languageDetector.init)&&r.languageDetector.init(r,this.options.detection,this.options),this.modules.i18nFormat&&(r.i18nFormat=a(this.modules.i18nFormat),r.i18nFormat.init)&&r.i18nFormat.init(this),this.translator=new N(this.services,this.options),this.translator.on("*",function(e){for(var t=arguments.length,s=new Array(1<t?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];i.emit(e,...s)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}this.format=this.options.interpolation.format,s=s||M,!this.options.fallbackLng||this.services.languageDetector||this.options.lng||0<(o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng)).length&&"dev"!==o[0]&&(this.options.lng=o[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(e=>{this[e]=function(){return i.store[e](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=function(){return i.store[e](...arguments),i}});const n=h();t=()=>{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),n.resolve(t),s(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?t():setTimeout(t,0),n}loadResources(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:M;var s=R(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const a=[],i=e=>{e&&"cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&a.indexOf(e)<0&&a.push(e)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>i(e)),this.options.preload?.forEach?.(e=>i(e)),this.services.backendConnector.load(a,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,s){const a=h();return"function"==typeof e&&(s=e,e=void 0),"function"==typeof t&&(s=t,t=void 0),e=e||this.languages,t=t||this.options.ns,s=s||M,this.services.backendConnector.reload(e,t,e=>{a.resolve(),s(e)}),a}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)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&&k.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this;throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()")}setResolvedLanguage(e){if(e&&this.languages&&!(-1<["cimode","dev"].indexOf(e)))for(let e=0;e<this.languages.length;e++){var t=this.languages[e];if(!(-1<["cimode","dev"].indexOf(t))&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(s,a){var i=this;this.isLanguageChangingTo=s;const o=h(),r=(this.emit("languageChanging",s),e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)}),n=(e,t)=>{t?(r(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit("languageChanged",t),this.logger.log("languageChanged",t)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(...arguments)}),a&&a(e,function(){return i.t(...arguments)})};var e=e=>{s||e||!this.services.languageDetector||(e=[]);const t=R(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);t&&(this.language||r(t),this.translator.language||this.translator.changeLanguage(t),this.services.languageDetector?.cacheUserLanguage?.(t)),this.loadResources(t,e=>{n(e,t)})};return s||!this.services.languageDetector||this.services.languageDetector.async?!s&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(e):this.services.languageDetector.detect(e):e(s):e(this.services.languageDetector.detect()),o}getFixedT(e,t,l){var h=this;function d(e,t){let s;if("object"!=typeof t){for(var a=arguments.length,i=new Array(2<a?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];s=h.options.overloadTranslationOptionHandler([e,t].concat(i))}else s={...t};s.lng=s.lng||d.lng,s.lngs=s.lngs||d.lngs,s.ns=s.ns||d.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||l||d.keyPrefix);const r=h.options.keySeparator||".";let n;return n=s.keyPrefix&&Array.isArray(e)?e.map(e=>""+s.keyPrefix+r+e):s.keyPrefix?""+s.keyPrefix+r+e:e,h.t(n,s)}return R(e)?d.lng=e:d.lngs=e,d.ns=t,d.keyPrefix=l,d}t(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.translator?.translate(...t)}exists(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.translator?.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){var t=1<arguments.length&&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 s=t.lng||this.resolvedLanguage||this.languages[0],a=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;var o=(e,t)=>{e=this.services.backendConnector.state[e+"|"+t];return-1===e||0===e||2===e};if(t.precheck){t=t.precheck(this,o);if(void 0!==t)return t}return!!this.hasResourceBundle(s,e)||!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(s,e)||a&&!o(i,e)))}loadNamespaces(e,t){const s=h();return this.options.ns?((e=R(e)?[e]:e).forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=h(),a=(R(e)&&(e=[e]),this.options.preload||[]);e=e.filter(e=>a.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return e.length?(this.options.preload=a.concat(e),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){var t;return!(e=e||this.resolvedLanguage||(0<this.languages?.length?this.languages[0]:this.language))||(t=this.services?.languageUtils||new w(se()),-1<["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")?"rtl":"ltr"}static createInstance(){return new j(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},1<arguments.length?arguments[1]:void 0)}cloneInstance(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:M,s=e.forkResourceStore,a=(s&&delete e.forkResourceStore,{...this.options,...e,isClone:!0});const i=new j(a);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},s&&(e=Object.keys(this.store.data).reduce((s,a)=>(s[a]={...this.store.data[a]},Object.keys(s[a]).reduce((e,t)=>(e[t]={...s[a][t]},e),{})),{}),i.store=new S(e,a),i.services.resourceStore=i.store),i.translator=new N(i.services,a),i.translator.on("*",function(e){for(var t=arguments.length,s=new Array(1<t?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];i.emit(e,...s)}),i.init(a,t),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},A=j.createInstance(),oe=(A.createInstance=j.createInstance,A.createInstance,A.dir,A.init,A.loadResources,A.reloadResources,A.use,A.changeLanguage,A.getFixedT,A.t,A.exists,A.setDefaultNamespace,A.hasLoadedNamespace,A.loadNamespaces,A.loadLanguages,t(s(),1),t(s(),1),t(e()),/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g),re={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ne=e=>re[e],le={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(oe,ne)},i={type:"3rdParty",init(e){var t;[t={}]=[e.options.react],le={...le,...t},0}},{slice:he,forEach:de}=((0,t(s(),1).createContext)(),t(s(),1),t(s(),1),t(s(),1),t(s(),1),t(s(),1),[]);function ge(s){return de.call(he.call(arguments,1),e=>{if(e)for(const t in e)void 0===s[t]&&(s[t]=e[t])}),s}var ue=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,pe=function(e,t,s,a){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};s&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*s*1e3)),a&&(i.domain=a),document.cookie=((e,t,s)=>{s=s||{},s.path=s.path||"/",t=encodeURIComponent(t);let a=e+"="+t;if(0<s.maxAge){e=+s.maxAge;if(Number.isNaN(e))throw new Error("maxAge should be a Number");a+="; Max-Age="+Math.floor(e)}if(s.domain){if(!ue.test(s.domain))throw new TypeError("option domain is invalid");a+="; Domain="+s.domain}if(s.path){if(!ue.test(s.path))throw new TypeError("option path is invalid");a+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(a+="; HttpOnly"),s.secure&&(a+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a})(e,encodeURIComponent(t),i)},ce=function(e){var s=e+"=",a=document.cookie.split(";");for(let t=0;t<a.length;t++){let e=a[t];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(s))return e.substring(s.length,e.length)}return null},fe={name:"cookie",lookup(e){e=e.lookupCookie;if(e&&"undefined"!=typeof document)return ce(e)||void 0},cacheUserLanguage(e,t){var{lookupCookie:t,cookieMinutes:s,cookieDomain:a,cookieOptions:i}=t;t&&"undefined"!=typeof document&&pe(t,e,s,a,i)}},me={name:"querystring",lookup(e){var t=e["lookupQuerystring"];let s;if("undefined"!=typeof window){let e=window.location["search"];var a=(e=!window.location.search&&-1<window.location.hash?.indexOf("?")?window.location.hash.substring(window.location.hash.indexOf("?")):e).substring(1).split("&");for(let e=0;e<a.length;e++){var i=a[e].indexOf("=");0<i&&a[e].substring(0,i)===t&&(s=a[e].substring(i+1))}}return s}},E=null,ve=()=>{if(null===E)try{E="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){E=!1}return E},ye={name:"localStorage",lookup(e){e=e.lookupLocalStorage;if(e&&ve())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(e,t){t=t.lookupLocalStorage;t&&ve()&&window.localStorage.setItem(t,e)}},D=null,be=()=>{if(null===D)try{D="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){D=!1}return D},xe={name:"sessionStorage",lookup(e){e=e.lookupSessionStorage;if(e&&be())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(e,t){t=t.lookupSessionStorage;t&&be()&&window.sessionStorage.setItem(t,e)}},Se={name:"navigator",lookup(e){var t=[];if("undefined"!=typeof navigator){var{languages:s,userLanguage:a,language:i}=navigator;if(s)for(let e=0;e<s.length;e++)t.push(s[e]);a&&t.push(a),i&&t.push(i)}return 0<t.length?t:void 0}},ke={name:"htmlTag",lookup(e){e=e.htmlTag;let t;e=e||("undefined"!=typeof document?document.documentElement:null);return t=e&&"function"==typeof e.getAttribute?e.getAttribute("lang"):t}},we={name:"path",lookup(e){e=e.lookupFromPathIndex;if("undefined"!=typeof window){var t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(t))return t["number"==typeof e?e:0]?.replace("/","")}}},Le={name:"subdomain",lookup(e){var e=e["lookupFromSubdomainIndex"],e="number"==typeof e?e+1:1,t="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(t)return t[e]}};function Oe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}var e=class{constructor(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=ge(t,this.options||{},Oe()),"string"==typeof this.options.convertDetectedLanguage&&-1<this.options.convertDetectedLanguage.indexOf("15897")&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(fe),this.addDetector(me),this.addDetector(ye),this.addDetector(xe),this.addDetector(Se),this.addDetector(ke),this.addDetector(we),this.addDetector(Le)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e=e||this.options.order;let s=[];return e.forEach(t=>{if(this.detectors[t]){let e=this.detectors[t].lookup(this.options);(e=e&&"string"==typeof e?[e]:e)&&(s=s.concat(e))}}),s=s.map(e=>this.options.convertDetectedLanguage(e)),this.services.languageUtils.getBestMatchFromCodes?s:0<s.length?s[0]:null}cacheUserLanguage(t,e){!(e=e||this.options.caches)||this.options.excludeCacheFor&&-1<this.options.excludeCacheFor.indexOf(t)||e.forEach(e=>{this.detectors[e]&&this.detectors[e].cacheUserLanguage(t,this.options)})}},I=(e.type="languageDetector",(t,e)=>{t=localStorage.getItem(t);if(!t)return e;try{return JSON.parse(t)}catch(e){return t}}),Ce=t=>{let s=[];return[".main-yourLibraryX-filters",".main-home-filterChipsContainer .search-searchCategory-catergoryGrid",".search-searchCategory-SearchCategory .search-searchCategory-catergoryGrid"].forEach(e=>{var e=document.querySelector(e);e&&(e=Array.from(e.querySelectorAll("button")).filter(e=>{return console.log("=== btn ===",e),(e.querySelector("span")?.innerText)?.includes(t)}),s=s.concat(e))}),s},t={ca:{translation:{menu:{title:"Amagar podcasts",enabled:"Activat",aggressiveMode:"Mode agressiu"},search:{}}},da:{translation:{menu:{title:"Gem podcasts",enabled:"Aktiveret",aggressiveMode:"Aggressiv indstilling",hideAudiobooks:"Gem lydbøger"},search:{}}},en:{translation:{menu:{title:"Hide podcasts",enabled:"Enabled",aggressiveMode:"Aggressive mode",hideAudiobooks:"Hide audiobooks"},search:{}}},fr:{translation:{menu:{title:"Masquer les podcasts",enabled:"Activé",aggressiveMode:"Mode agressif",hideAudiobooks:"Masquer les livres audio"},search:{}}},de:{translation:{menu:{title:"Podcasts verstecken",enabled:"Aktiviert",aggressiveMode:"Aggressiver Modus"},search:{}}},it:{translation:{menu:{title:"Nascondi podcast",enabled:"Attivato",aggressiveMode:"Modalità aggressiva"},search:{}}},"pt-BR":{translation:{menu:{title:"Esconder podcasts",enabled:"Habilitado",aggressiveMode:"Modo agressivo"},search:{}}},"pl-PL":{translation:{menu:{title:"Schowaj podcasty",enabled:"Włączony",aggressiveMode:"Tryb agresywny"},search:{}}},ru:{translation:{menu:{title:"Скрытие подкастов",enabled:"Включено",aggressiveMode:"Агрессивный режим"},search:{}}},tr:{translation:{menu:{title:"Podcast'leri gizle",enabled:"Etkin",aggressiveMode:"Agresif mod"},search:{}}},"zh-CN":{translation:{menu:{title:"隐藏播客",enabled:"启用",aggressiveMode:"增强模式"},search:{}}}},Pe=(A.use(i).use(e).init({resources:t,detection:{order:["navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1}}),"HidePodcastsEnabled"),Re="HidePodcastsAggressiveMode",Ne="HidePodcastsHideAudioBooks";var Me=async function(){var e=A["t"];let{Player:t,Menu:s,Platform:a,Locale:i}=Spicetify,o=document.querySelector(".main-view-container__scroll-node-child");for(;!(t&&s&&a&&i&&o);)await new Promise(e=>setTimeout(e,100)),t=Spicetify.Player,s=Spicetify.Menu,a=Spicetify.Platform,i=Spicetify.Locale,o=document.querySelector(".main-view-container__scroll-node-child");console.debug("HidePodcasts: Loaded");let r=I(Pe,!0),n=I(Re,!1),l=I(Ne,!1);var h=new s.Item(e("menu.enabled"),r,e=>{r=!r,localStorage.setItem(Pe,r),e.setState(r),u()}),d=new s.Item(e("menu.aggressiveMode"),n,e=>{n=!n,localStorage.setItem(Re,n),e.setState(n),location.reload()}),g=new s.Item(e("menu.hideAudiobooks"),l,e=>{l=!l,localStorage.setItem(Ne,l),e.setState(l),u()});function u(){({podcasts:e,audiobooks:t}={podcasts:r,audiobooks:l}),document.body.classList.toggle("hide-podcasts-enabled",e),document.body.classList.toggle("hide-audiobooks-enabled",t);var e=i,t=(console.debug("=== Tagging podcasts ==="),console.debug("=== (Most of this is done via CSS) ==="),e=e.get("search.title.shows")||"Podcasts",e=Ce(e),console.debug("=== podcastChips ===",e),e.forEach(e=>{e.classList.add("podcast-item")}),i);console.debug("=== Tagging audiobooks ==="),console.debug("=== (Most of this is done via CSS) ==="),t=t.get("shared.library.filter.book")||"Audiobooks",t=Ce(t),console.debug("=== audiobookChips ===",t),t.forEach(e=>{e.classList.add("audiobook-item")})}function p(t){const s=new MutationObserver(function(){var e;o&&(e=(e=>{switch(e){case"/search":return"#searchPage .search-searchBrowse-browseAllWrapper";case"/":return".main-shelf-shelf";default:return"section"}})(t),e=o.querySelector(e))&&(console.debug(t,e),u(),n||s.disconnect())});s.observe(o,{childList:!0,subtree:!0})}new s.SubMenu(e("menu.title"),[h,d,g]).register(),p(a.History.location.pathname),a.History.listen(({pathname:e})=>{console.debug("HidePodcasts: Page changed",e),p(e)})};(async()=>{await Me()})()})();(async()=>{var e;document.getElementById("hidePodcasts")||((e=document.createElement("style")).id="hidePodcasts",e.textContent=String.raw`
.hide-podcasts-enabled .podcast-item{display:none!important}.hide-podcasts-enabled .queue-tabBar-header a[href="/collection/podcasts"]{display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href^="/episode/"]),.hide-podcasts-enabled .main-shelf-shelf:has(a[href^="/show/"]){visibility:hidden;height:0;min-height:unset;margin:0}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu4i"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu9e"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnuk0"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnuk1"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnuk2"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnujZ"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnuk3"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu3L"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu3N"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu4z"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu4B"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu4x"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu4y"]){display:none!important}.hide-podcasts-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnu3P"]){display:none!important}.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5DAB3zgCauRwnvdEQjJ"],.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5DArNBzkmxXHCqFLx2J"],.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5IMCbQBLjfX9OdDrA5X"],.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5IMCbQBLl5gxKLgufp8"],.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5IMCbQBLyUJhSxhaPc6"],.hide-podcasts-enabled .x-categoryCard-CategoryCard[href="/genre/podcasts-web"]{display:none!important}.hide-podcasts-enabled .main-yourLibraryX-listItem:has(#listrow-title-spotify\:collection\:your-episodes){display:none!important}.hide-audiobooks-enabled .audiobook-item{display:none!important}.hide-audiobooks-enabled .main-shelf-shelf:has(a[href*="0JQ5DAnM3wGh0gz1MXnue2"]){display:none!important}.hide-audiobooks-enabled .x-categoryCard-CategoryCard[href="/genre/0JQ5DAqbMKFETqK4t8f1n3"]{display:none!important}
`.trim(),document.head.appendChild(e))})()}();