gant-core 0.2.36 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/CHANGELOG.md +14 -0
  4. package/eslint.config.mjs +26 -0
  5. package/lib/cli/acorn.js +2 -1
  6. package/lib/cli/angular.js +2 -1
  7. package/lib/cli/babel.js +2 -1
  8. package/lib/cli/config/defineConfig.js +103 -1
  9. package/lib/cli/config/index.js +2 -1
  10. package/lib/cli/copyfiles/index.js +2 -1
  11. package/lib/cli/create/config/index.js +3 -2
  12. package/lib/cli/create/index.js +1 -0
  13. package/lib/cli/create/module/index.js +2 -9
  14. package/lib/cli/estree.js +2 -1
  15. package/lib/cli/flow.js +2 -1
  16. package/lib/cli/glimmer.js +2 -1
  17. package/lib/cli/graphql.js +2 -1
  18. package/lib/cli/html.js +2 -1
  19. package/lib/cli/i18n/index.js +3 -2
  20. package/lib/cli/i18n/utils.js +2 -1
  21. package/lib/cli/index.d.ts +1836 -0
  22. package/lib/cli/index.js +2 -1
  23. package/lib/cli/markdown.js +2 -1
  24. package/lib/cli/meriyah.js +2 -1
  25. package/lib/cli/postcss.js +2 -1
  26. package/lib/cli/routes/index.js +2 -1
  27. package/lib/cli/template/template.vue.config.txt +1 -1
  28. package/lib/cli/template/types.d.txt +134 -132
  29. package/lib/cli/tsconfig/index.js +2 -1
  30. package/lib/cli/typescript.js +2 -1
  31. package/lib/cli/utils/detectPort.js +3 -0
  32. package/lib/cli/utils/getJavascriptfile.js +2 -1
  33. package/lib/cli/utils/index.js +2 -1
  34. package/lib/cli/webpack/Webpack.js +2 -1
  35. package/lib/cli/webpack/config/analyzer.config.js +2 -1
  36. package/lib/cli/webpack/config/browsers.js +1 -0
  37. package/lib/cli/webpack/config/cssRules.js +2 -1
  38. package/lib/cli/webpack/config/default.config.js +2 -1
  39. package/lib/cli/webpack/config/development.config.js +2 -1
  40. package/lib/cli/webpack/config/framework/index.js +3 -0
  41. package/lib/cli/webpack/config/framework/react.js +3 -0
  42. package/lib/cli/webpack/config/framework/vue.js +3 -0
  43. package/lib/cli/webpack/config/index.js +1 -0
  44. package/lib/cli/webpack/config/production.config.js +2 -1
  45. package/lib/cli/webpack/plugins/copy.js +2 -1
  46. package/lib/cli/webpack/plugins/index.js +2 -1
  47. package/lib/cli/yaml.js +2 -1
  48. package/lib/core/i18n/index.js +1 -1
  49. package/lib/core/index.js +1 -1
  50. package/lib/core/microservices/index.js +10 -1
  51. package/lib/core/request/index.js +1 -1
  52. package/lib/core/store/index.js +1 -1
  53. package/lib/core/theme/index.js +1 -1
  54. package/lib/core/utils/index.js +83 -1
  55. package/lib/types/index.d.ts +115 -104
  56. package/package.json +62 -44
  57. package/rollup.config.js +27 -10
  58. package/tsconfig.json +1 -0
  59. package/lib/core/cache/index.js.map +0 -1
  60. package/lib/core/event/index.js.map +0 -1
  61. package/lib/core/i18n/index.js.map +0 -1
  62. package/lib/core/index.js.map +0 -1
  63. package/lib/core/microservices/index.js.map +0 -1
  64. package/lib/core/request/index.js.map +0 -1
  65. package/lib/core/store/index.js.map +0 -1
  66. package/lib/core/theme/index.js.map +0 -1
  67. package/lib/core/utils/index.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{get as t}from"lodash-es";import{r as e}from"../request/index.js";const s={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class i{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||s,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,s,i){return i&&!this.debug?null:("string"==typeof t[0]&&(t[0]=`${s}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new i(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new i(this.logger,t)}}var n=new i;class o{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i<e;i++)s[i-1]=arguments[i];if(this.observers[t]){Array.from(this.observers[t].entries()).forEach((t=>{let[e,i]=t;for(let t=0;t<i;t++)e(...s)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((e=>{let[i,n]=e;for(let e=0;e<n;e++)i.apply(i,[t,...s])}))}}}function r(){let t,e;const s=new Promise(((s,i)=>{t=s,e=i}));return s.resolve=t,s.reject=e,s}function a(t){return null==t?"":""+t}const l=/###/g;function u(t,e,s){function i(t){return t&&t.indexOf("###")>-1?t.replace(l,"."):t}function n(){return!t||"string"==typeof t}const o="string"!=typeof e?e:e.split(".");let r=0;for(;r<o.length-1;){if(n())return{};const e=i(o[r]);!t[e]&&s&&(t[e]=new s),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++r}return n()?{}:{obj:t,k:i(o[r])}}function h(t,e,s){const{obj:i,k:n}=u(t,e,Object);if(void 0!==i||1===e.length)return void(i[n]=s);let o=e[e.length-1],r=e.slice(0,e.length-1),a=u(t,r,Object);for(;void 0===a.obj&&r.length;)o=`${r[r.length-1]}.${o}`,r=r.slice(0,r.length-1),a=u(t,r,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=s}function p(t,e){const{obj:s,k:i}=u(t,e);if(s)return s[i]}function c(t,e,s){for(const i in e)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof e[i]||e[i]instanceof String?s&&(t[i]=e[i]):c(t[i],e[i],s):t[i]=e[i]);return t}function g(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function f(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(t=>d[t])):t}const m=[" ",",","?","!",";"],y=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}(20);function v(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||"object"!=typeof n)return;let e,o="";for(let r=t;r<i.length;++r)if(r!==t&&(o+=s),o+=i[r],e=n[o],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&r<i.length-1)continue;t+=r-t+1;break}n=e}return n}function b(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class x extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,e],s&&(Array.isArray(s)?r.push(...s):"string"==typeof s&&n?r.push(...s.split(n)):r.push(s)));const a=p(this.data,r);return!a&&!e&&!s&&t.indexOf(".")>-1&&(t=r[0],e=r[1],s=r.slice(2).join(".")),a||!o||"string"!=typeof s?a:v(this.data&&this.data[t]&&this.data[t][e],s,n)}addResource(t,e,s,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let r=[t,e];s&&(r=r.concat(o?s.split(o):s)),t.indexOf(".")>-1&&(r=t.split("."),i=e,e=r[1]),this.addNamespaces(e),h(this.data,r,i),n.silent||this.emit("added",t,e,s,i)}addResources(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in s)"string"!=typeof s[i]&&"[object Array]"!==Object.prototype.toString.apply(s[i])||this.addResource(t,e,i,s[i],{silent:!0});i.silent||this.emit("added",t,e,s)}addResourceBundle(t,e,s,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},r=[t,e];t.indexOf(".")>-1&&(r=t.split("."),i=s,s=e,e=r[1]),this.addNamespaces(e);let a=p(this.data,r)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?c(a,s,n):a={...a,...s},h(this.data,r,a),o.silent||this.emit("added",t,e,s)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var S={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){return t.forEach((t=>{this.processors[t]&&(e=this.processors[t].process(e,s,i,n))})),e}};const k={};class O extends o{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s,i;super(),s=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{s[t]&&(i[t]=s[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=n.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;const s=this.resolve(t,e);return s&&void 0!==s.res}extractFromKey(t,e){let s=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");const i=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let n=e.ns||this.options.defaultNS||[];const o=s&&t.indexOf(s)>-1,r=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||function(t,e,s){e=e||"",s=s||"";const i=m.filter((t=>e.indexOf(t)<0&&s.indexOf(t)<0));if(0===i.length)return!0;const n=y.getRegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let o=!n.test(t);if(!o){const e=t.indexOf(s);e>0&&!n.test(t.substring(0,e))&&(o=!0)}return o}(t,s,i));if(o&&!r){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:n};const o=t.split(s);(s!==i||s===i&&this.options.ns.indexOf(o[0])>-1)&&(n=o.shift()),t=o.join(i)}return"string"==typeof n&&(n=[n]),{key:t,namespaces:n}}translate(t,e,s){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const i=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:o,namespaces:r}=this.extractFromKey(t[t.length-1],e),a=r[r.length-1],l=e.lng||this.language,u=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){const t=e.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${t}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(e)}:`${a}${t}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(e)}:o}const h=this.resolve(t,e);let p=h&&h.res;const c=h&&h.usedKey||o,g=h&&h.exactUsedKey||o,d=Object.prototype.toString.apply(p),f=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&p&&("string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(d)<0&&("string"!=typeof f||"[object Array]"!==d)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(c,p,{...e,ns:r}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=t,h.usedParams=this.getUsedParamsDetails(e),h):t}if(n){const t="[object Array]"===d,s=t?[]:{},i=t?g:c;for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){const o=`${i}${n}${t}`;s[t]=this.translate(o,{...e,joinArrays:!1,ns:r}),s[t]===o&&(s[t]=p[t])}p=s}}else if(m&&"string"==typeof f&&"[object Array]"===d)p=p.join(f),p&&(p=this.extendTranslation(p,t,e,s));else{let i=!1,r=!1;const u=void 0!==e.count&&"string"!=typeof e.count,c=O.hasDefaultValue(e),g=u?this.pluralResolver.getSuffix(l,e.count,e):"",d=e.ordinal&&u?this.pluralResolver.getSuffix(l,e.count,{ordinal:!1}):"",f=u&&!e.ordinal&&0===e.count&&this.pluralResolver.shouldUseIntlApi(),m=f&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${g}`]||e[`defaultValue${d}`]||e.defaultValue;!this.isValidLookup(p)&&c&&(i=!0,p=m),this.isValidLookup(p)||(r=!0,p=o);const y=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:p,v=c&&m!==p&&this.options.updateMissing;if(r||i||v){if(this.logger.log(v?"updateKey":"missingKey",l,a,o,v?m:p),n){const t=this.resolve(o,{...e,keySeparator:!1});t&&t.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=[];const s=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&s&&s[0])for(let e=0;e<s.length;e++)t.push(s[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const i=(t,s,i)=>{const n=c&&i!==p?i:y;this.options.missingKeyHandler?this.options.missingKeyHandler(t,a,s,n,v,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,a,s,n,v,e),this.emit("missingKey",t,a,s,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?t.forEach((t=>{const s=this.pluralResolver.getSuffixes(t,e);f&&e[`defaultValue${this.options.pluralSeparator}zero`]&&s.indexOf(`${this.options.pluralSeparator}zero`)<0&&s.push(`${this.options.pluralSeparator}zero`),s.forEach((s=>{i([t],o+s,e[`defaultValue${s}`]||m)}))})):i(t,o,m))}p=this.extendTranslation(p,t,e,h,s),r&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${a}:${o}`),(r||i)&&this.options.parseMissingKeyHandler&&(p="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,i?p:void 0):this.options.parseMissingKeyHandler(p))}return i?(h.res=p,h.usedParams=this.getUsedParamsDetails(e),h):p}extendTranslation(t,e,s,i,n){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const r="string"==typeof t&&(s&&s.interpolation&&void 0!==s.interpolation.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let l=s.replace&&"string"!=typeof s.replace?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),t=this.interpolator.interpolate(t,l,s.lng||this.language,s),r){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(s.nest=!1)}!s.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(s.lng=i.usedLng),!1!==s.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return n&&n[0]===i[0]&&!s.context?(o.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${e[0]}`),null):o.translate(...i,e)}),s)),s.interpolation&&this.interpolator.reset()}const r=s.postProcess||this.options.postProcess,a="string"==typeof r?[r]:r;return null!=t&&a&&a.length&&!1!==s.applyPostProcessor&&(t=S.handle(a,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),t}resolve(t){let e,s,i,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,r),l=a.key;s=l;let u=a.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const h=void 0!==r.count&&"string"!=typeof r.count,p=h&&!r.ordinal&&0===r.count&&this.pluralResolver.shouldUseIntlApi(),c=void 0!==r.context&&("string"==typeof r.context||"number"==typeof r.context)&&""!==r.context,g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);u.forEach((t=>{this.isValidLookup(e)||(o=t,!k[`${g[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(k[`${g[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),g.forEach((s=>{if(this.isValidLookup(e))return;n=s;const o=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(o,l,s,t,r);else{let t;h&&(t=this.pluralResolver.getSuffix(s,r.count,r));const e=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(o.push(l+t),r.ordinal&&0===t.indexOf(i)&&o.push(l+t.replace(i,this.options.pluralSeparator)),p&&o.push(l+e)),c){const s=`${l}${this.options.contextSeparator}${r.context}`;o.push(s),h&&(o.push(s+t),r.ordinal&&0===t.indexOf(i)&&o.push(s+t.replace(i,this.options.pluralSeparator)),p&&o.push(s+e))}}let a;for(;a=o.pop();)this.isValidLookup(e)||(i=a,e=this.getResource(s,t,a,r))})))}))})),{res:e,usedKey:s,exactUsedKey:i,usedLng:n,usedNS:o}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,s,i):this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=t.replace&&"string"!=typeof t.replace;let i=s?t.replace:t;if(s&&void 0!==t.count&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const t of e)delete i[t]}return i}static hasDefaultValue(t){const e="defaultValue";for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&e===s.substring(0,12)&&void 0!==t[s])return!0;return!1}}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}class L{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=n.create("languageUtils")}getScriptPartFromCode(t){if(!(t=b(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=b(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if("string"==typeof t&&t.indexOf("-")>-1){const e=["hans","hant","latn","cyrl","cans","mong","arab"];let s=t.split("-");return this.options.lowerCaseLng?s=s.map((t=>t.toLowerCase())):2===s.length?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),e.indexOf(s[1].toLowerCase())>-1&&(s[1]=w(s[1].toLowerCase()))):3===s.length&&(s[0]=s[0].toLowerCase(),2===s[1].length&&(s[1]=s[1].toUpperCase()),"sgn"!==s[0]&&2===s[2].length&&(s[2]=s[2].toUpperCase()),e.indexOf(s[1].toLowerCase())>-1&&(s[1]=w(s[1].toLowerCase())),e.indexOf(s[2].toLowerCase())>-1&&(s[2]=w(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(s)||(e=s)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return e=s;e=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];let s=t[e];return s||(s=t[this.getScriptPartFromCode(e)]),s||(s=t[this.formatLanguageCode(e)]),s||(s=t[this.getLanguagePartFromCode(e)]),s||(s=t.default),s||[]}toResolveHierarchy(t,e){const s=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],n=t=>{t&&(this.isSupportedCode(t)?i.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return"string"==typeof t&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&n(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&n(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&n(this.getLanguagePartFromCode(t))):"string"==typeof t&&n(this.formatLanguageCode(t)),s.forEach((t=>{i.indexOf(t)<0&&n(this.formatLanguageCode(t))})),i}}let N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};const R=["v1","v2","v3"],C=["v4"],P={zero:0,one:1,two:2,few:3,many:4,other:5};class j{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=n.create("pluralResolver"),this.options.compatibilityJSON&&!C.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const t={};return N.forEach((e=>{e.lngs.forEach((s=>{t[s]={numbers:e.nr,plurals:$[e.fc]}}))})),t}()}addRule(t,e){this.rules[t]=e}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(b("dev"===t?"en":t),{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this.getRule(t,e);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this.getRule(t,e);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort(((t,e)=>P[t]-P[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):s.numbers.map((s=>this.getSuffix(t,s,e))):[]}getSuffix(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(t,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:this.getSuffixRetroCompatible(i,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const s=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let i=t.numbers[s];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));const n=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:n():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?n():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!R.includes(this.options.compatibilityJSON)}}function E(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=function(t,e,s){const i=p(t,s);return void 0!==i?i:p(e,s)}(t,e,s);return!o&&n&&"string"==typeof s&&(o=v(t,s,i),void 0===o&&(o=v(e,s,i))),o}class I{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=n.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const e=t.interpolation;this.escape=void 0!==e.escape?e.escape:f,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?g(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?g(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?g(e.nestingPrefix):e.nestingPrefixEscaped||g("$t("),this.nestingSuffix=e.nestingSuffix?g(e.nestingSuffix):e.nestingSuffixEscaped||g(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t&&t.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,s,i){let n,o,r;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(t){return t.replace(/\$/g,"$$$$")}const h=t=>{if(t.indexOf(this.formatSeparator)<0){const n=E(e,l,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,void 0,s,{...i,...e,interpolationkey:t}):n}const n=t.split(this.formatSeparator),o=n.shift().trim(),r=n.join(this.formatSeparator).trim();return this.format(E(e,l,o,this.options.keySeparator,this.options.ignoreJSONStructure),r,s,{...i,...e,interpolationkey:o})};this.resetRegExp();const p=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,c=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>u(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?u(this.escape(t)):u(t)}].forEach((e=>{for(r=0;n=e.regex.exec(t);){const s=n[1].trim();if(o=h(s),void 0===o)if("function"==typeof p){const e=p(t,n,i);o="string"==typeof e?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s))o="";else{if(c){o=n[0];continue}this.logger.warn(`missed to pass in variable ${s} for interpolating ${t}`),o=""}else"string"==typeof o||this.useRawValueToEscape||(o=a(o));const l=e.safeValue(o);if(t=t.replace(n[0],l),c?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=n[0].length):e.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,e){let s,i,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function r(t,e){const s=this.nestingOptionsSeparator;if(t.indexOf(s)<0)return t;const i=t.split(new RegExp(`${s}[ ]*{`));let o=`{${i[1]}`;t=i[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);(r&&r.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),e&&(n={...e,...n})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${s}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t}for(;s=this.nestingRegexp.exec(t);){let l=[];n={...o},n=n.replace&&"string"!=typeof n.replace?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;let u=!1;if(-1!==s[0].indexOf(this.formatSeparator)&&!/{.*}/.test(s[1])){const t=s[1].split(this.formatSeparator).map((t=>t.trim()));s[1]=t.shift(),l=t,u=!0}if(i=e(r.call(this,s[1].trim(),n),n),i&&s[0]===t&&"string"!=typeof i)return i;"string"!=typeof i&&(i=a(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),u&&(i=l.reduce(((t,e)=>this.format(t,e,o.lng,{...o,interpolationkey:s[1].trim()})),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}function F(t){const e={};return function(s,i,n){const o=i+JSON.stringify(n);let r=e[o];return r||(r=t(b(i),n),e[o]=r),r(s)}}class V{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=n.create("formatter"),this.options=t,this.formats={number:F(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:F(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:F(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:F(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:F(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))},this.init(t)}init(t){const e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=F(e)}format(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.split(this.formatSeparator).reduce(((t,e)=>{const{formatName:n,formatOptions:o}=function(t){let e=t.toLowerCase().trim();const s={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);"currency"===e&&n.indexOf(":")<0?s.currency||(s.currency=n.trim()):"relativetime"===e&&n.indexOf(":")<0?s.range||(s.range=n.trim()):n.split(";").forEach((t=>{if(!t)return;const[e,...i]=t.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,"");s[e.trim()]||(s[e.trim()]=n),"false"===n&&(s[e.trim()]=!1),"true"===n&&(s[e.trim()]=!0),isNaN(n)||(s[e.trim()]=parseInt(n,10))}))}return{formatName:e,formatOptions:s}}(e);if(this.formats[n]){let e=t;try{const r=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},a=r.locale||r.lng||i.locale||i.lng||s;e=this.formats[n](t,a,{...o,...i,...r})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${n}`),t}),t)}}class A extends o{constructor(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=n.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,i.backend,i)}queueLoad(t,e,s,i){const n={},o={},r={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const r=`${t}|${e}`;!s.reload&&this.store.hasResourceBundle(t,e)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===o[r]&&(o[r]=!0):(this.state[r]=1,i=!1,void 0===o[r]&&(o[r]=!0),void 0===n[r]&&(n[r]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(r[t]=!0)})),(Object.keys(n).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(o),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|"),n=i[0],o=i[1];e&&this.emit("failedLoading",n,o,e),s&&this.store.addResourceBundle(n,o,s,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2;const r={};this.queue.forEach((s=>{!function(t,e,s,i){const{obj:n,k:o}=u(t,e,Object);n[o]=n[o]||[],i&&(n[o]=n[o].concat(s)),i||n[o].push(s)}(s.loaded,[n],o),function(t,e){void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)}(s,t),e&&s.errors.push(e),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((t=>{r[t]||(r[t]={});const 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((t=>!t.done))}read(t,e,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:o});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}r&&a&&i<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,s,i+1,2*n,o)}),n):o(r,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(t,e,r);try{const s=a(t,e);s&&"function"==typeof s.then?s.then((t=>r(null,t))).catch(r):r(null,s)}catch(t){r(t)}}prepareLoading(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);const n=this.queueLoad(t,e,s,i);if(!n.toLoad.length)return n.pending.length||i(),null;n.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:!0},s)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const s=t.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,((s,o)=>{s&&this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s),!s&&o&&this.logger.log(`${e}loaded namespace ${n} for language ${i}`,o),this.loaded(t,s,o)}))}saveMissing(t,e,s,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${s}" as the namespace "${e}" 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!=s&&""!==s){if(this.backend&&this.backend.create){const a={...o,isUpdate:n},l=this.backend.create.bind(this.backend);if(l.length<6)try{let n;n=5===l.length?l(t,e,s,i,a):l(t,e,s,i),n&&"function"==typeof n.then?n.then((t=>r(null,t))).catch(r):r(null,n)}catch(t){r(t)}else l(t,e,s,i,r,a)}t&&t[0]&&this.store.addResource(t[0],e,s,i)}}}function D(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if("object"==typeof t[1]&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const s=t[3]||t[2];Object.keys(s).forEach((t=>{e[t]=s[t]}))}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function U(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function T(){}class K extends o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var s;if(super(),this.options=U(t),this.services={},this.logger=n,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((t=>{"function"==typeof s[t]&&(s[t]=s[t].bind(s))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(s=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=D();function o(t){return t?"function"==typeof t?new t:t:null}if(this.options={...i,...this.options,...U(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){let e;this.modules.logger?n.init(o(this.modules.logger),this.options):n.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=V);const s=new L(this.options);this.store=new x(this.options.resources,this.options);const r=this.services;r.logger=n,r.resourceStore=this.store,r.languageUtils=s,r.pluralResolver=new j(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(r.formatter=o(e),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new I(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new A(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(e){for(var s=arguments.length,i=new Array(s>1?s-1:0),n=1;n<s;n++)i[n-1]=arguments[n];t.emit(e,...i)})),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(e){for(var s=arguments.length,i=new Array(s>1?s-1:0),n=1;n<s;n++)i[n-1]=arguments[n];t.emit(e,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,s||(s=T),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[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 t.store[e](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=function(){return t.store[e](...arguments),t}}));const a=r(),l=()=>{const t=(t,e)=>{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),a.resolve(e),s(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T;const s="string"==typeof t?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&"cimode"===s.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)}))};if(s)i(s);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t)))}this.options.preload&&this.options.preload.forEach((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,e,s){const i=r();return t||(t=this.languages),e||(e=this.options.ns),s||(s=T),this.services.backendConnector.reload(t,e,(t=>{i.resolve(),s(t)})),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&S.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var s=this;this.isLanguageChangingTo=t;const i=r();this.emit("languageChanging",t);const n=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(t,o)=>{o?(n(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,i.resolve((function(){return s.t(...arguments)})),e&&e(t,(function(){return s.t(...arguments)}))},a=e=>{t||e||!this.services.languageDetector||(e=[]);const s="string"==typeof e?e:this.services.languageUtils.getBestMatchFromCodes(e);s&&(this.language||n(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(s)),this.loadResources(s,(t=>{o(t,s)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),i}getFixedT(t,e,s){var i=this;const n=function(t,e){let o;if("object"!=typeof e){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];o=i.options.overloadTranslationOptionHandler([t,e].concat(a))}else o={...e};o.lng=o.lng||n.lng,o.lngs=o.lngs||n.lngs,o.ns=o.ns||n.ns,o.keyPrefix=o.keyPrefix||s||n.keyPrefix;const u=i.options.keySeparator||".";let h;return h=o.keyPrefix&&Array.isArray(t)?t.map((t=>`${o.keyPrefix}${u}${t}`)):o.keyPrefix?`${o.keyPrefix}${u}${t}`:t,i.t(h,o)};return"string"==typeof t?n.lng=t:n.lngs=t,n.ns=e,n.keyPrefix=s,n}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&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;const s=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const o=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return-1===s||2===s};if(e.precheck){const t=e.precheck(this,o);if(void 0!==t)return t}return!!this.hasResourceBundle(s,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(s,t)||i&&!o(n,t)))}loadNamespaces(t,e){const s=r();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{s.resolve(),e&&e(t)})),s):(e&&e(),Promise.resolve())}loadLanguages(t,e){const s=r();"string"==typeof t&&(t=[t]);const i=this.options.preload||[],n=t.filter((t=>i.indexOf(t)<0));return n.length?(this.options.preload=i.concat(n),this.loadResources((t=>{s.resolve(),e&&e(t)})),s):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new L(D());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new K(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T;const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},n=new K(i);void 0===t.debug&&void 0===t.prefix||(n.logger=n.logger.clone(t));return["store","services","language"].forEach((t=>{n[t]=this[t]})),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s&&(n.store=new x(this.store.data,i),n.services.resourceStore=n.store),n.translator=new O(n.services,i),n.translator.on("*",(function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i<e;i++)s[i-1]=arguments[i];n.emit(t,...s)})),n.init(i,e),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const M=K.createInstance();M.createInstance=K.createInstance,M.createInstance,M.dir,M.init,M.loadResources,M.reloadResources,M.use,M.changeLanguage,M.getFixedT,M.t,M.exists,M.setDefaultNamespace,M.hasLoadedNamespace,M.loadNamespaces,M.loadLanguages;let z={};const H=async(t,s)=>{const i=await(n=t,e("/langPluginContent/getFWPluginContentByPluginKey",{method:"post",data:{value:n},serviceId:"fwPlatform"}));var n;z=i;let o=J;return s?.i18n&&(await M.init(s?.i18nInitOptions||{},s?.i18nCallback),o=(t,e,s="fe")=>{const i={};return e?.map(((t,e)=>{i[`${e}`]=t})),M.t(t,i)}),window.tr=o,s?.i18n?M:null},J=(e,s,i="fe")=>{let n=t(z,`${i}.${e}`,e);return n||(n=e),o=s,n.replace(/\${(\d+)}/g,(function(t,e){const s=parseInt(e);return void 0!==o?.[s]?o[s]:t}));var o},B=(t,e,s="fe")=>window.tr(t,e,s);export{H as i,B as t};
1
+ import{get as e}from"lodash-es";import{r as t}from"../request/index.js";const s=e=>"string"==typeof e,i=()=>{let e,t;const s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s},n=e=>null==e?"":""+e,o=/###/g,r=e=>e&&e.indexOf("###")>-1?e.replace(o,"."):e,a=e=>!e||s(e),l=(e,t,i)=>{const n=s(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(a(e))return{};const t=r(n[o]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return a(e)?{}:{obj:e,k:r(n[o])}},h=(e,t,s)=>{const{obj:i,k:n}=l(e,t,Object);if(void 0!==i||1===t.length)return void(i[n]=s);let o=t[t.length-1],r=t.slice(0,t.length-1),a=l(e,r,Object);for(;void 0===a.obj&&r.length;)o=`${r[r.length-1]}.${o}`,r=r.slice(0,r.length-1),a=l(e,r,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=s},u=(e,t)=>{const{obj:s,k:i}=l(e,t);if(s)return s[i]},p=(e,t,i)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?s(e[n])||e[n]instanceof String||s(t[n])||t[n]instanceof String?i&&(e[n]=t[n]):p(e[n],t[n],i):e[n]=t[n]);return e},c=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const d=e=>s(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e;const f=[" ",",","?","!",";"],m=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20),v=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const i=t.split(s);let n=e;for(let e=0;e<i.length;){if(!n||"object"!=typeof n)return;let t,o="";for(let r=e;r<i.length;++r)if(r!==e&&(o+=s),o+=i[r],t=n[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&r<i.length-1)continue;e+=r-e+1;break}n=t}return n},y=e=>e&&e.replace("_","-"),b={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class x{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||b,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,i,n){return n&&!this.debug?null:(s(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new x(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new x(this.logger,e)}}var k=new x;class S{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const s=this.observers[e].get(t)||0;this.observers[e].set(t,s+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,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,i]=e;for(let e=0;e<i;e++)t(...s)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[i,n]=t;for(let t=0;t<n;t++)i.apply(i,[e,...s])})}}}class O extends S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,r=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):s(i)&&o?a.push(...i.split(o)):a.push(i)));const l=u(this.data,a);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),!l&&r&&s(i)?v(this.data&&this.data[e]&&this.data[e][t],i,o):l}addResource(e,t,s,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let r=[e,t];s&&(r=r.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(r=e.split("."),i=t,t=r[1]),this.addNamespaces(t),h(this.data,r,i),n.silent||this.emit("added",e,t,s,i)}addResources(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in i)(s(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});n.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,s,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},r=[e,t];e.indexOf(".")>-1&&(r=e.split("."),i=s,s=t,t=r[1]),this.addNamespaces(t);let a=u(this.data,r)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?p(a,s,n):a={...a,...s},h(this.data,r,a),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),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var L={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,n){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,s,i,n))}),t}};const w={};class N extends S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s,i;super(),s=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{s[e]&&(i[e]=s[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=k.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const s=this.resolve(e,t);return s&&void 0!==s.res}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,s)=>{t=t||"",s=s||"";const i=f.filter(e=>t.indexOf(e)<0&&s.indexOf(e)<0);if(0===i.length)return!0;const n=m.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!n.test(e);if(!o){const t=e.indexOf(s);t>0&&!n.test(e.substring(0,t))&&(o=!0)}return o})(e,i,n));if(r&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:s(o)?[o]:o};const r=e.split(i);(i!==n||i===n&&this.options.ns.indexOf(r[0])>-1)&&(o=r.shift()),e=r.join(n)}return{key:e,namespaces:s(o)?[o]:o}}translate(e,t,i){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const n=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],h=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(u){const e=t.nsSeparator||this.options.nsSeparator;return n?{res:`${l}${e}${r}`,usedKey:r,exactUsedKey:r,usedLng:h,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${e}${r}`}return n?{res:r,usedKey:r,exactUsedKey:r,usedLng:h,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:r}const p=this.resolve(e,t);let c=p&&p.res;const g=p&&p.usedKey||r,d=p&&p.exactUsedKey||r,f=Object.prototype.toString.apply(c),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=!s(c)&&"boolean"!=typeof c&&"number"!=typeof c;if(!(v&&c&&y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(f)<0)||s(m)&&Array.isArray(c))if(v&&s(m)&&Array.isArray(c))c=c.join(m),c&&(c=this.extendTranslation(c,e,t,i));else{let n=!1,a=!1;const u=void 0!==t.count&&!s(t.count),g=N.hasDefaultValue(t),d=u?this.pluralResolver.getSuffix(h,t.count,t):"",f=t.ordinal&&u?this.pluralResolver.getSuffix(h,t.count,{ordinal:!1}):"",m=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${d}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(c)&&g&&(n=!0,c=v),this.isValidLookup(c)||(a=!0,c=r);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:c,b=g&&v!==c&&this.options.updateMissing;if(a||n||b){if(this.logger.log(b?"updateKey":"missingKey",h,l,r,b?v:c),o){const e=this.resolve(r,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const s=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&s&&s[0])for(let t=0;t<s.length;t++)e.push(s[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const i=(e,s,i)=>{const n=g&&i!==c?i:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,s,n,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,s,n,b,t),this.emit("missingKey",e,l,s,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{const s=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&s.indexOf(`${this.options.pluralSeparator}zero`)<0&&s.push(`${this.options.pluralSeparator}zero`),s.forEach(s=>{i([e],r+s,t[`defaultValue${s}`]||v)})}):i(e,r,v))}c=this.extendTranslation(c,e,t,p,i),a&&c===r&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${r}`),(a||n)&&this.options.parseMissingKeyHandler&&(c="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${r}`:r,n?c:void 0):this.options.parseMissingKeyHandler(c))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,c,{...t,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return n?(p.res=e,p.usedParams=this.getUsedParamsDetails(t),p):e}if(o){const e=Array.isArray(c),s=e?[]:{},i=e?d:g;for(const e in c)if(Object.prototype.hasOwnProperty.call(c,e)){const n=`${i}${o}${e}`;s[e]=this.translate(n,{...t,joinArrays:!1,ns:a}),s[e]===n&&(s[e]=c[e])}c=s}}return n?(p.res=c,p.usedParams=this.getUsedParamsDetails(t),p):c}extendTranslation(e,t,i,n,o){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const a=s(e)&&(i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(a){const t=e.match(this.interpolator.nestingRegexp);l=t&&t.length}let h=i.replace&&!s(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,i.lng||this.language||n.usedLng,i),a){const t=e.match(this.interpolator.nestingRegexp);l<(t&&t.length)&&(i.nest=!1)}!i.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,s=new Array(e),n=0;n<e;n++)s[n]=arguments[n];return o&&o[0]===s[0]&&!i.context?(r.logger.warn(`It seems you are nesting recursively key: ${s[0]} in key: ${t[0]}`),null):r.translate(...s,t)},i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,l=s(a)?[a]:a;return null!=e&&l&&l.length&&!1!==i.applyPostProcessor&&(e=L.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let t,i,n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const l=this.extractFromKey(e,a),h=l.key;i=h;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=void 0!==a.count&&!s(a.count),c=p&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),g=void 0!==a.context&&(s(a.context)||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(r=e,!w[`${d[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(r)&&(w[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${d.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!!!")),d.forEach(s=>{if(this.isValidLookup(t))return;o=s;const i=[h];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,h,s,e,a);else{let e;p&&(e=this.pluralResolver.getSuffix(s,a.count,a));const t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(i.push(h+e),a.ordinal&&0===e.indexOf(n)&&i.push(h+e.replace(n,this.options.pluralSeparator)),c&&i.push(h+t)),g){const s=`${h}${this.options.contextSeparator}${a.context}`;i.push(s),p&&(i.push(s+e),a.ordinal&&0===e.indexOf(n)&&i.push(s+e.replace(n,this.options.pluralSeparator)),c&&i.push(s+t))}}let r;for(;r=i.pop();)this.isValidLookup(t)||(n=r,t=this.getResource(s,e,r,a))}))})}),{res:t,usedKey:i,exactUsedKey:n,usedLng:o,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!s(e.replace);let n=i?e.replace:e;if(i&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,12)&&void 0!==e[s])return!0;return!1}}const C=e=>e.charAt(0).toUpperCase()+e.slice(1);class R{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create("languageUtils")}getScriptPartFromCode(e){if(!(e=y(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=y(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(s(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(e=>e.toLowerCase()):2===s.length?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=C(s[1].toLowerCase()))):3===s.length&&(s[0]=s[0].toLowerCase(),2===s[1].length&&(s[1]=s[1].toUpperCase()),"sgn"!==s[0]&&2===s[2].length&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=C(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=C(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const s=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(s)||(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(e=>e===s?e:e.indexOf("-")<0&&s.indexOf("-")<0?void 0:e.indexOf("-")>0&&s.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),s(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let 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){const i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return s(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):s(e)&&o(this.formatLanguageCode(e)),i.forEach(e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))}),n}}let $=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],P={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const j=["v1","v2","v3"],E=["v4"],I={zero:0,one:1,two:2,few:3,many:4,other:5};class F{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=k.create("pluralResolver"),this.options.compatibilityJSON&&!E.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return $.forEach(t=>{t.lngs.forEach(s=>{e[s]={numbers:t.nr,plurals:P[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const s=y("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let o;try{o=new Intl.PluralRules(s,{type:i})}catch(s){if(!e.match(/-|_/))return;const i=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(i,t)}return this.pluralRulesCache[n]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((e,t)=>I[e]-I[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):s.numbers.map(s=>this.getSuffix(e,s,t)):[]}getSuffix(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));const n=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:n():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?n():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!j.includes(this.options.compatibilityJSON)}}const A=function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=((e,t,s)=>{const i=u(e,s);return void 0!==i?i:u(t,s)})(e,t,i);return!r&&o&&s(i)&&(r=v(e,i,n),void 0===r&&(r=v(t,i,n))),r},V=e=>e.replace(/\$/g,"$$$$");class D{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:o,suffix:r,suffixEscaped:a,formatSeparator:l,unescapeSuffix:h,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:d,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=n?c(n):o||"{{",this.suffix=r?c(r):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=h?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=p?c(p):g||c("$t("),this.nestingSuffix=f?c(f):m||c(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${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,o){let r,a,l;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const s=A(t,h,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,{...o,...t,interpolationkey:e}):s}const s=e.split(this.formatSeparator),n=s.shift().trim(),r=s.join(this.formatSeparator).trim();return this.format(A(t,h,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,i,{...o,...t,interpolationkey:n})};this.resetRegExp();const p=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,c=o&&o.interpolation&&void 0!==o.interpolation.skipOnVariables?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>V(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?V(this.escape(e)):V(e)}].forEach(t=>{for(l=0;r=t.regex.exec(e);){const i=r[1].trim();if(a=u(i),void 0===a)if("function"==typeof p){const t=p(e,r,o);a=s(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,i))a="";else{if(c){a=r[0];continue}this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),a=""}else s(a)||this.useRawValueToEscape||(a=n(a));const h=t.safeValue(a);if(e=e.replace(r[0],h),c?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t){let i,o,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const l=(e,t)=>{const s=this.nestingOptionsSeparator;if(e.indexOf(s)<0)return e;const i=e.split(new RegExp(`${s}[ ]*{`));let n=`{${i[1]}`;e=i[0],n=this.interpolate(n,r);const o=n.match(/'/g),a=n.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(n=n.replace(/'/g,'"'));try{r=JSON.parse(n),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${n}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let h=[];r={...a},r=r.replace&&!s(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let u=!1;if(-1!==i[0].indexOf(this.formatSeparator)&&!/{.*}/.test(i[1])){const e=i[1].split(this.formatSeparator).map(e=>e.trim());i[1]=e.shift(),h=e,u=!0}if(o=t(l.call(this,i[1].trim(),r),r),o&&i[0]===e&&!s(o))return o;s(o)||(o=n(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),o=""),u&&(o=h.reduce((e,t)=>this.format(e,t,a.lng,{...a,interpolationkey:i[1].trim()}),o.trim())),e=e.replace(i[0],o),this.regexp.lastIndex=0}return e}}const U=e=>{const t={};return(s,i,n)=>{let o=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(o={...o,[n.interpolationkey]:void 0});const r=i+JSON.stringify(o);let a=t[r];return a||(a=e(y(i),n),t[r]=a),a(s)}};class T{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=k.create("formatter"),this.options=e,this.formats={number:U((e,t)=>{const s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:U((e,t)=>{const s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:U((e,t)=>{const s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:U((e,t)=>{const s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:U((e,t)=>{const s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=U(t)}format(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(e=>e.indexOf(")")>-1)){const e=n.findIndex(e=>e.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,e)].join(this.formatSeparator)}return n.reduce((e,t)=>{const{formatName:n,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const s={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const n=i[1].substring(0,i[1].length-1);"currency"===t&&n.indexOf(":")<0?s.currency||(s.currency=n.trim()):"relativetime"===t&&n.indexOf(":")<0?s.range||(s.range=n.trim()):n.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();s[o]||(s[o]=n),"false"===n&&(s[o]=!1),"true"===n&&(s[o]=!0),isNaN(n)||(s[o]=parseInt(n,10))}})}return{formatName:t,formatOptions:s}})(t);if(this.formats[n]){let t=e;try{const r=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},a=r.locale||r.lng||i.locale||i.lng||s;t=this.formats[n](e,a,{...o,...i,...r})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${n}`),e},e)}}class K extends S{constructor(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=k.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,i.backend,i)}queueLoad(e,t,s,i){const n={},o={},r={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const r=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===o[r]&&(o[r]=!0):(this.state[r]=1,i=!1,void 0===o[r]&&(o[r]=!0),void 0===n[r]&&(n[r]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(r[e]=!0)}),(Object.keys(n).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(o),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){const i=e.split("|"),n=i[0],o=i[1];t&&this.emit("failedLoading",n,o,t),!t&&s&&this.store.addResourceBundle(n,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const r={};this.queue.forEach(s=>{((e,t,s)=>{const{obj:i,k:n}=l(e,t,Object);i[n]=i[n]||[],i[n].push(s)})(s.loaded,[n],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(s,e),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{r[e]||(r[e]={});const t=s.loaded[e];t.length&&t.forEach(t=>{void 0===r[e][t]&&(r[e][t]=!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(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:n,callback:o});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}r&&a&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*n,o)},n):o(r,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(e,t,r);try{const s=a(e,t);s&&"function"==typeof s.then?s.then(e=>r(null,e)).catch(r):r(null,s)}catch(e){r(e)}}prepareLoading(e,t){let 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();s(e)&&(e=this.languageUtils.toResolveHierarchy(e)),s(t)&&(t=[t]);const o=this.queueLoad(e,t,i,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.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(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const s=e.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`,s),!s&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${i}`,o),this.loaded(e,s,o)})}saveMissing(e,t,s,i,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${s}" 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!!!");else if(null!=s&&""!==s){if(this.backend&&this.backend.create){const a={...o,isUpdate:n},l=this.backend.create.bind(this.backend);if(l.length<6)try{let n;n=5===l.length?l(e,t,s,i,a):l(e,t,s,i),n&&"function"==typeof n.then?n.then(e=>r(null,e)).catch(r):r(null,n)}catch(e){r(e)}else l(e,t,s,i,r,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}}const M=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),s(e[1])&&(t.defaultValue=e[1]),s(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}}),z=e=>(s(e.ns)&&(e.ns=[e.ns]),s(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),s(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),H=()=>{};class J extends S{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var s;if(super(),this.options=z(e),this.services={},this.logger=k,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(e=>{"function"==typeof s[e]&&(s[e]=s[e].bind(s))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(s(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const o=M();this.options={...o,...this.options,...z(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?k.init(r(this.modules.logger),this.options):k.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=T);const s=new R(this.options);this.store=new O(this.options.resources,this.options);const i=this.services;i.logger=k,i.resourceStore=this.store,i.languageUtils=s,i.pluralResolver=new F(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(i.formatter=r(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new D(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new K(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var s=arguments.length,i=new Array(s>1?s-1:0),n=1;n<s;n++)i[n-1]=arguments[n];e.emit(t,...i)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new N(this.services,this.options),this.translator.on("*",function(t){for(var s=arguments.length,i=new Array(s>1?s-1:0),n=1;n<s;n++)i[n-1]=arguments[n];e.emit(t,...i)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=H),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const a=i(),l=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;const i=s(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],s=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(i)s(i);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>s(e))}this.options.preload&&this.options.preload.forEach(e=>s(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,s){const n=i();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=H),this.services.backendConnector.reload(e,t,e=>{n.resolve(),s(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&&L.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const o=i();this.emit("languageChanging",e);const r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(e,s)=>{s?(r(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},l=t=>{e||t||!this.services.languageDetector||(t=[]);const i=s(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);i&&(this.language||r(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(i)),this.loadResources(i,e=>{a(e,i)})};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(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),o}getFixedT(e,t,i){var n=this;const o=function(e,t){let s;if("object"!=typeof t){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];s=n.options.overloadTranslationOptionHandler([e,t].concat(a))}else s={...t};s.lng=s.lng||o.lng,s.lngs=s.lngs||o.lngs,s.ns=s.ns||o.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||i||o.keyPrefix);const h=n.options.keySeparator||".";let u;return u=s.keyPrefix&&Array.isArray(e)?e.map(e=>`${s.keyPrefix}${h}${e}`):s.keyPrefix?`${s.keyPrefix}${h}${e}`:e,n.t(u,s)};return s(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=i,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const o=(e,t)=>{const s=this.services.backendConnector.state[`${e}|${t}`];return-1===s||0===s||2===s};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!!this.hasResourceBundle(s,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!o(s,e)||i&&!o(n,e)))}loadNamespaces(e,t){const n=i();return this.options.ns?(s(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=i();s(e)&&(e=[e]);const o=this.options.preload||[],r=e.filter(e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=o.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new R(M());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new J(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},n=new J(i);void 0===e.debug&&void 0===e.prefix||(n.logger=n.logger.clone(e));return["store","services","language"].forEach(e=>{n[e]=this[e]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s&&(n.store=new O(this.store.data,i),n.services.resourceStore=n.store),n.translator=new N(n.services,i),n.translator.on("*",function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];n.emit(e,...s)}),n.init(i,t),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const B=J.createInstance();B.createInstance=J.createInstance,B.createInstance,B.dir,B.init,B.loadResources,B.reloadResources,B.use,B.changeLanguage,B.getFixedT,B.t,B.exists,B.setDefaultNamespace,B.hasLoadedNamespace,B.loadNamespaces,B.loadLanguages;let q={};const _=async(e,s)=>{const i=await(n=e,t("/langPluginContent/getFWPluginContentByPluginKey",{method:"post",data:{value:n},serviceId:"fwPlatform"}));var n;q=i;let o=W;return s?.i18n&&(await B.init(s?.i18nInitOptions||{},s?.i18nCallback),o=(e,t,s="fe")=>{const i={};return t?.map((e,t)=>{i[`${t}`]=e}),B.t(e,i)}),o},W=(t,s,i="fe")=>{let n=e(q,`${i}.${t}`,t);return n||(n=t),o=s,n.replace(/\${(\d+)}/g,function(e,t){const s=parseInt(t);return void 0!==o?.[s]?o[s]:e});var o};export{_ as i};
2
2
  //# sourceMappingURL=index.js.map
package/lib/core/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as R}from"./request/index.js";export{r as request}from"./request/index.js";export{e as expireCache}from"./cache/index.js";import{g as S,u as U}from"./store/index.js";export{a as MENU_BREADCRUMBS_UPDATE,M as MENU_HISTORY_UPDATE,c as codeListStore,i as companydataStore,l as loginStore,m as menuStore,p as parameterStore,s as storageStore}from"./store/index.js";import{i as O}from"./i18n/index.js";export{t as tr}from"./i18n/index.js";export{P as PresetColors,T as TinyColor,A as bounds,b as compactAlgorithm,J as convertDecimalToHex,K as convertHexToDecimal,a as darkAlgorithm,d as defaultAlgorithm,f as formatAliasToken,u as fromRatio,g as getAliasToken,h as getAlphaColor,k as getBackgroundColor,i as getDarkenSolidColor,j as getLightenSolidColor,e as getTokenCssVar,D as hslToRgb,F as hsvToRgb,w as inputToRGB,o as isReadable,y as isValidCSSUnit,v as legacyRandom,l as lighten,c as meetingDerivative,p as mostReadable,n as names,M as numberInputToObject,L as parseIntFromHex,z as random,r as readability,G as rgbToHex,C as rgbToHsl,E as rgbToHsv,B as rgbToRgb,I as rgbaToArgbHex,H as rgbaToHex,s as seed,x as stringInputToObject,m as tinycolor,q as toMsFilter,t as token}from"./theme/index.js";export{g as getTraceId}from"./microservices/index.js";import{g as $,a as _}from"./utils/index.js";export{b as getAntdLocaleKey,c as getRoutes,s as setLocaleKey}from"./utils/index.js";import"lodash-es";export*from"axios";import"mitt";const N="X-G-TRACE-ID",V=e=>s=>{const{url:a="",serviceId:r}=s,o={};Object.keys(e).forEach((s=>{e[s].forEach((e=>{o[e]=s}))})),Object.keys(e).forEach((e=>{}));let t=`${a}.api`;const[,i]=t.split("/");return t=r?`/${r}${t}`:o[i]?`/${o[i]}${t}`:t,delete s.serviceId,s.url=t,s},X=e=>s=>{const a=_();return s.headers={...s.headers,[N]:a,needHtmlEscape:"false",userLanguage:e,...U.userIdentity},s};var Y=async({microServiceMap:e,dynamicLangCallback:s,...a})=>{R.interceptors.request.use(V(e)),await S.findPlantform();const r=$();R.interceptors.request.use(X(r)),await O(r),await(s?.());return await S.init(a)};export{_ as generateUuid,$ as getLocaleKey,S as globalStore,Y as init,O as initDynamicLang,R as requestInstance,X as useRequestHeader,V as useRequestMicroSevices,U as userStore};
1
+ export{r as request,a as requestInstance}from"./request/index.js";export{e as expireCache}from"./cache/index.js";export{M as MENU_BREADCRUMBS_UPDATE,a as MENU_HISTORY_UPDATE,c as codeListStore,i as companydataStore,g as globalStore,l as loginStore,m as menuStore,p as parameterStore,s as storageStore,u as userStore}from"./store/index.js";export{i as initI18n}from"./i18n/index.js";export{P as PresetColors,T as TinyColor,b as bounds,c as cmykToRgb,d as compactAlgorithm,a as convertDecimalToHex,e as convertHexToDecimal,f as darkAlgorithm,g as defaultAlgorithm,h as formatAliasToken,i as fromRatio,j as getAliasToken,k as getAlphaColor,l as getBackgroundColor,m as getDarkenSolidColor,n as getLightenSolidColor,o as getTokenCssVar,p as hslToRgb,q as hsvToRgb,r as inputToRGB,s as isReadable,t as isValidCSSUnit,u as legacyRandom,v as lighten,w as meetingDerivative,x as mostReadable,y as names,z as numberInputToObject,A as parseIntFromHex,B as random,C as readability,D as rgbToCmyk,E as rgbToHex,F as rgbToHsl,G as rgbToHsv,H as rgbToRgb,I as rgbaToArgbHex,J as rgbaToHex,K as seed,L as stringInputToObject,M as toMsFilter,N as token}from"./theme/index.js";export*from"axios";import"lodash-es";import"mitt";var S;!function(a){a.development="development",a.production="production",a.test="test"}(S||(S={}));export{S as Env};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,11 @@
1
- import{get as e}from"lodash-es";const o="x-g-trace-id",r=r=>e(r,"headers",o)||e(r,"config.headers",o);export{r as g};
1
+ import { get } from 'lodash-es';
2
+
3
+ /**
4
+ * 异常处理程序
5
+ */
6
+ const TraceIdKey = 'x-g-trace-id';
7
+ const getTraceId = (response) => get(response, 'headers', TraceIdKey) ||
8
+ get(response, 'config.headers', TraceIdKey);
9
+
10
+ export { getTraceId as g };
2
11
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import e from"axios";import{forEach as t}from"lodash-es";const s=e.create({}),r=new class{handlers;constructor(){this.handlers=[]}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){t(this.handlers,(function(t){null!==t&&e(t)}))}},n={showSuccess:!1,successMessage:"",showWarning:!1,showError:!0,getParams:!1,isStream:!1,dangerParse:!1},o=function(e,t,o){const a={...n,...o},{getParams:h,isStream:c}=a,l=[];r.forEach((function(e){l.push(e)}));let i=s.request({method:"post",...t,url:e}),u=0;for(;u<l.length;){const e=l[u]?.fulfilled,t=l[u]?.rejected;i=i.then((t=>"function"==typeof e?e(t,a):t)).catch((e=>"function"==typeof t?t(e,a):Promise.reject(e))),u++}return i.then((e=>{const{data:t}=e;return h?e:c?t:t.data}))};["post","get","put","delete"].forEach((e=>{o[e]=function(t,s,...r){return o(t,{...s,method:e},...r)}}));const a={...s,interceptors:{request:s.interceptors.request,response:r}};export{a,o as r};
1
+ import e from"axios";import{forEach as t}from"lodash-es";const s=e.create({}),r=new class{handlers;constructor(){this.handlers=[]}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){t(this.handlers,function(t){null!==t&&e(t)})}},n={showSuccess:!1,successMessage:"",showWarning:!1,showError:!0,getParams:!1,isStream:!1,dangerParse:!1},o=function(e,t,o){const a={...n,...o},{getParams:h,isStream:c}=a,l=[];r.forEach(function(e){l.push(e)});let i=s.request({method:"post",...t,url:e}),u=0;for(;u<l.length;){const e=l[u]?.fulfilled,t=l[u]?.rejected;i=i.then(t=>"function"==typeof e?e(t,a):t).catch(e=>"function"==typeof t?t(e,a):Promise.reject(e)),u++}return i.then(e=>{const{data:t}=e;return h?e:c?t:t.data})};["post","get","put","delete"].forEach(e=>{o[e]=function(t,s,...r){return o(t,{...s,method:e},...r)}});const a={...s,interceptors:{request:s.interceptors.request,response:r}};export{a,o as r};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{r as t}from"../request/index.js";import{groupBy as e,get as s,reduce as a,find as i,keyBy as n,pick as r,isEmpty as o,findIndex as c,isPlainObject as h,cloneDeep as u,mapValues as d,uniqBy as g}from"lodash-es";import m from"mitt";const l=new class{codeLists=[];codeMaps={};async findAllCodeList(){const s=await t("/codeList/findAll",{data:{},serviceId:"fwPlatform"})||[],a=e(s,"type");this.codeLists=s,this.codeMaps=a}getCodeLocaleList=t=>s(this.codeMaps,t,[]);getCodeLocaleName=(t,e)=>{const s=this.getCodeLocaleList(t);function n(t){const e=i(s,(e=>e.value===String(t)));return e?.name||""}if(Array.isArray(e)){const t=a(e,((t="",e="")=>t+","+n(e)),"");return t.slice(1,t.length)}if(String(e).indexOf(",")>=0){const t=e.replace("[","").replace("]","").split(","),s=a(t,((t="",e="")=>t+","+n(e)),"");return s.slice(1,s.length)}return n(e)}};l.getCodeLocaleList,l.getCodeLocaleName;const p=new class{parameterList=[];parameterMap={};findAllParameters=async()=>{const e=await t("/parameter/findAll",{serviceId:"fwPlatform",data:{}},{showError:!1})||[],s=n(e,"name");this.parameterList=e,this.parameterMap=s};getSystemParameterByName=t=>"string"==typeof t?this.parameterMap[t]:r(this.parameterMap,t)};const y=(({prefixKey:t="",storage:e=localStorage}={})=>new class{storage=e;prefixKey=t;getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,e,s=604800){const a=JSON.stringify({value:e,expire:null!==s?(new Date).getTime()+1e3*s:null});this.storage.setItem(this.getKey(t),a)}get(t,e=null){const s=this.storage.getItem(this.getKey(t));if(s)try{const e=JSON.parse(s),{value:a,expire:i}=e;if(null===i||i>=Date.now())return a;this.remove(t)}catch(t){return console.error(t),e}return e}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,e,s=604800){document.cookie=`${this.getKey(t)}=${e}; Max-Age=${s}`}getCookie(t){const e=document.cookie.split("; ");for(let s=0,a=e.length;s<a;s++){const a=e[s].split("=");if(a[0]===this.getKey(t))return a[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let e=t.length;e--;)document.cookie=t[e]+"=0;expire="+new Date(0).toUTCString()}})();class f{userIdentity={};currentUser={};isSuperAdmin=!1;roles=[];functions=[];delegations=[];userSetting={};users=[];getUserIdentity(){if(!o(this.userIdentity))return this.userIdentity;const t=y?.get("userIdentity");return t||{}}setUserIdentity(t){return this.userIdentity={...this.userIdentity,...t},y.set("userIdentity",this.userIdentity),this.userIdentity}clearUserIdentity(){y.remove("userIdentity"),this.userIdentity={}}setUserAggregateInfo=({delegations:t,roles:e,functions:s,isSuperAdmin:a,currentUser:i})=>{this.delegations=t,this.roles=e,this.functions=s,this.isSuperAdmin=a,this.currentUser=i};getUserSettingType=t=>`${this.currentUser.id}-${t}`;getUserSetting=async e=>{const s=this.getUserSettingType(e),a=this.currentUser.id;if(this.userSetting[s])return this.userSetting[s];const i=await async function(e){return t("/accountUserSelf/getUserData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:a+e}),n=i?.bigData?JSON.parse(i.bigData):void 0;return this.userSetting[s]=n,n};updateUserSetting=async(e,s)=>{const a=this.getUserSettingType(e),i=this.currentUser.id;return await async function(e,s){return t("/accountUserSelf/setUserData",{data:e,serviceId:"fwSecurity"},s)}({dataType:e,dataId:i+e,bigData:JSON.stringify(s)}),this.userSetting[a]=s,s};removeUserSetting=async e=>{const s=this.getUserSettingType(e),a=this.currentUser.id;await async function(e,s){return t("/accountUserSelf/delUserData",{data:e,serviceId:"fwSecurity"},s)}({dataType:e,dataId:a}),delete this.userSetting[s]};getUserInfo=async(e,a)=>{const i=c(this.users,(t=>a?t.userLoginName===e:t.id===e));if(i>-1)return s(this.users,`[${i}]`);const n=a?await async function(e){return t("/security/getUserByUserLoginName",{method:"POST",data:{userLoginName:e},serviceId:"fwSecurity"})}(e):await async function(e){return t("/security/getUserById",{method:"POST",data:{id:e},serviceId:"fwSecurity"})}(e);return h(n)&&this.users.push(n),n}}const w=/^https?:\/\/(([a-zA-Z0-9_-])+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?[a-zA-Z0-9_-](\?)?)*)*$/i,S=/^https?:\/\/(([a-zA-Z0-9_-])+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?[a-zA-Z0-9_-](\?)?)*)*$/i,L=t=>w.test(t)||S.test(t)||0===t?.indexOf("/")?t:"/"+t,I="MENU_HISTORY_UPDATE",P="MENU_BREADCRUMBS_UPDATE";m();class U{menuDataMaps={};menuData=[];menuPathMaps={};breadcrumbs=[];menuHistorys=[];userId;emitter;constructor(){this.emitter=m()}addListenerMenuHistorys=t=>{this.emitter.on(I,t)};removeListenerMenuHistorys=t=>this.emitter.off(I,t);addListenerBreadcrumbs=t=>this.emitter.on(P,t);removeListenerBreadcrumbs=t=>this.emitter.off(P,t);getTreeMenuData=(t,e,s)=>t.map((t=>{const{id:a,path:i,leaf:n}=t,r=e[a],o={...t,key:a,path:s?s+L(i):L(i)};if(r&&!n){const t=this.getTreeMenuData(r,e,o.path);o.children=t}return this.menuDataMaps[o.path]=o,o})).sort(((t,e)=>t.seqNum-e.seqNum));init=(t,s)=>{const a=u(t);if(o(a))return;const i=e(a,"parentResourceId"),{ROOT:n,...r}=i;this.menuData=this.getTreeMenuData(n,r),this.menuData=[...this.menuData];const c=d(this.menuDataMaps,"name");this.updateMenuMaps(c),this.initMenuHistorys(s)};updateMenuMaps=t=>{this.menuPathMaps={...this.menuPathMaps,...t};const e=this.menuHistorys.map((t=>{const e=this.menuPathMaps[t.pathname];return{pathname:t.pathname,name:e||t.name}})),s=this.breadcrumbs.map((t=>{const e=this.menuPathMaps[t.pathname];return{...t,name:e||t.name}}));this.updatehistorys(e),this.updateBreadcrumbs(s)};liseterHistorys=t=>{let e=this.menuHistorys;this.menuDataMaps[t]?.leaf&&!e.some((e=>e.pathname===t))&&(e=[{pathname:t,name:this.menuPathMaps[t]},...e],this.updatehistorys(e))};updatehistorys=t=>{if(!this.userId)return;const e=t.map((t=>({...t,name:t.name?t.name:this.menuPathMaps[t.pathname]})));this.menuHistorys=e,this.menuHistorys=g(this.menuHistorys,"pathname"),this.emitter.emit(I,this.menuHistorys),y.set(`${this.userId}-menu-history`,this.menuHistorys)};initMenuHistorys=t=>{this.userId=t;const e=y.get(`${t}-menu-history`,this.menuHistorys);this.updatehistorys(e)};liseterBreadcrumbs=t=>{const e=t.split("/");let s=1;const a=[],i={pathname:t,name:this.menuPathMaps[t]};for(;s<e.length;){const t=e.slice(0,s).join("/");this.menuPathMaps[t]&&a.push({name:this.menuPathMaps[t],pathname:t}),s++}a.push(i),this.updateBreadcrumbs(a)};updateBreadcrumbs=t=>{this.breadcrumbs=t,this.breadcrumbs=g(this.breadcrumbs,"pathname"),this.emitter.emit(P,t)}}class C{loginPathname;BASE="/";get baseLoginPathname(){return`${this.BASE}${this.loginPathname?.replace("/","")}`}tokenValue="";get isLoginPathname(){const t=window.location.pathname;return this.baseLoginPathname==t}getRealPath=t=>`${this.BASE}${t.replace("/","")}`;chekToken=async()=>{const e=await t("/authentication/checkToken",{serviceId:"fwSecurity"},{showError:!1});return e&&this.isLoginPathname&&window.location.replace(this.BASE),e};getLoginMethod=async()=>t("/authentication/getLoginMethod",{serviceId:"fwSecurity"});redirectBaseLogin=async()=>{const t=window.location.pathname,e=window.location.href;if(this.isLoginPathname)return!0;const s=new URLSearchParams(window.location.search),a=new URLSearchParams;"true"===s.get("forceLocal")&&a.append("forceLocal","true"),t!==this.BASE&&"/"!==t&&a.append("redirectUrl",e);const i=decodeURIComponent(a.toString());return window.location.replace(`${this.baseLoginPathname}${i?"?"+decodeURIComponent(a.toString()):""}`),!1};checkPassword=async()=>"noPass"!==await t("/security/checkPasswordUpdateTime",{data:{}},{showError:!1})||(this.tokenValue=await t("/authentication/extractToken",{data:{}}),!1);refactorToken=async()=>{var e;await(e=this.tokenValue,t("/authentication/refactorToken",{data:{value:e}}))};login=async t=>{const e=await this.baseLogin(t);return e.error,e};baseLogin=async e=>{const s={error:void 0,data:void 0};try{const a=await function(e){return t("/authentication/login",{data:e,serviceId:"fwSecurity"})}(e),{userToken:i,traceId:n}=a;if(i){s.data=a;return await this.checkPassword()||(s.error="passwordExpiration"),s}return n?(s.data=a,s.error="SLIDER_VERIFICATION_LOGIN",s):(s.error="passwordError",s)}catch(t){return s.error="validateError",s}};loginSuccess=()=>{let t=new URLSearchParams(window.location.search).get("redirectUrl");t?window.location.href=t:window.location.replace(this.BASE)};baseLoginOut=async e=>{const s=new URLSearchParams,a=window.location.href;window.location.pathname!==this.BASE&&s.append("redirectUrl",a),await t("/authentication/logout",{data:{},serviceId:"fwSecurity"}),e?window.location.replace(`${this.baseLoginPathname}?${s.toString()}`):window.location.replace(this.baseLoginPathname)}}const k={sso:!1,ssoUrlSearchParams:["ticket"],ssoCheckTokenUrl:"",ssoSuccessUrlkey:"successUrl",ssoLoginUrl:window.location.origin+"/fwSecurity/ssoAuth/login.api",ssologinOutUrl:window.location.origin+"/fwSecurity/ssoAuth/logout.api"};class v{init(t){this.ssoConfig={...this.ssoConfig,...t}}ssoConfig=k;isSso=async e=>{if(!this.ssoConfig.sso)return!1;let s=!1;try{s=await t("/ssoAuthConfig/checkOnlyRedirect",{},{showError:!1})}catch(t){console.error("sso",t)}return e&&(s=await e()),!!s};ssoLogin=()=>{const{ssoSuccessUrlkey:t,ssoUrlSearchParams:e,ssoLoginUrl:s}=this.ssoConfig,a=new URLSearchParams(window.location.search.slice(1)),i=new URLSearchParams,n=window.location.href;return i.append(t,encodeURIComponent(n)),e.map((t=>{const e=a.get(t);e&&i.append(t,e)})),window.location.href=`${s}?${i.toString()}`,!1};ssoLoginOut=()=>{window.location.href=this.ssoConfig.ssologinOutUrl}}class D{getValidateCodeImage=e=>function(e={}){return t("/authentication/getValidateCode",{data:e,serviceId:"fwSecurity"})}(e);sliderVerificationCodeImage=()=>t("/authentication/sliderVerificationCode",{method:"POST",serviceId:"fwSecurity"});checkCaptcha=e=>{return s=e,t("/authentication/checkCaptcha",{method:"POST",data:{...s},serviceId:"fwSecurity"});var s}}class A extends C{ssoLogin;validate;noCheckPermissionsPath=[];ssoCallback;constructor(){super(),this.ssoLogin=new v,this.validate=new D}init=(t,e="/",s)=>{this.BASE=e,this.ssoCallback=s,this.noCheckPermissionsPath=t?.noCheckPermissionsPath,this.ssoLogin.init(t),this.loginPathname=t?.loginPathname||"/login"};isNoLoginRequiredPage=()=>{const t=window.location.pathname,e=this.noCheckPermissionsPath?.some((e=>this.getRealPath(e)==t));return e};loginOut=async()=>{await this.ssoLogin.isSso(this.ssoCallback)&&this.ssoLogin.ssoLoginOut(),await this.baseLoginOut()};loginAuthentication=async e=>{var s;await(s=e,t("/authentication/beforeLoginCheckCode",{method:"POST",data:{...s},serviceId:"fwSecurity"})),this.loginSuccess()};redirectLogin=async()=>{if(this.ssoLogin.ssoConfig.sso){if(await this.ssoLogin.isSso())return this.ssoCallback()?(this.ssoLogin.ssoLogin(),!1):!!this.isNoLoginRequiredPage()||this.redirectBaseLogin()}return!!this.isNoLoginRequiredPage()||(!!this.isLoginPathname||await this.redirectBaseLogin())}}const M=new class{userStore;menuStore;loginStore;isSuperAdmin=!1;loginCallback;constructor(){this.userStore=new f,this.menuStore=new U,this.loginStore=new A}platformLanguages=[];productInfo={isProdEnv:!1,productName:""};get isPrd(){return this.productInfo?.isProdEnv}get userInfo(){return this.userStore.currentUser}get menuData(){return this.menuStore.menuData}findPlantform=async()=>{const e=await t("/platformManage/getPlatformAggregateInfo",{method:"POST"},{showError:!1});this.platformLanguages=e.platformLanguages,this.productInfo=e.productInfo};getAggregateInfo=async e=>{const s=await async function(){return t("/security/findUserAggregateInfo",{method:"POST"})}(),{user:a,startMenus:i,isSuperAdmin:n,...r}=s;this.userStore.setUserAggregateInfo({...r,currentUser:a}),this.isSuperAdmin=n;const c="function"==typeof e?await e(s):e;this.menuStore.init(o(c)?i:c,a.id)};init=async t=>{const{base:e="/",menuData:s,loginSuccessCallback:a,ssoCallback:i}=t;this.loginStore.init(t?.loginConfig,e,i);try{const t=await this.loginStore.chekToken();return t?(this.userStore.setUserIdentity(t),await this.getAggregateInfo(s),await l.findAllCodeList(),await p.findAllParameters(),await(a?.()),!0):await this.loginStore.redirectLogin()}catch(t){console.error(t)}return!1}};const b="company-v1";var T=new class{data={};getCompanyDataType=t=>`${b}-${t}`;getCompanyData=async e=>{const s=this.getCompanyDataType(e);if(this.data[s])return this.data[s];const a=await async function(e){return t("/companyData/getCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b}),i=a?.bigData?JSON.parse(a.bigData):void 0;return this.data[s]=i,i};updateCompanyData=async(e,s)=>{const a=this.getCompanyDataType(e);return await async function(e){return t("/companyData/setCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b,bigData:JSON.stringify(s)}),this.data[a]=s,s};removeCompanyData=async e=>{const s=this.getCompanyDataType(e);await async function(e){return t("/companyData/delCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b}),delete this.data[s]}};const O=l,E=p,$=M.userStore,B=M.loginStore,N=M.menuStore;export{I as M,P as a,O as c,M as g,T as i,B as l,N as m,E as p,y as s,$ as u};
1
+ import{r as t}from"../request/index.js";import{groupBy as e,get as s,reduce as a,find as i,keyBy as n,pick as r,isEmpty as o,findIndex as c,isPlainObject as h,cloneDeep as u,mapValues as d,uniqBy as g}from"lodash-es";import m from"mitt";const l=new class{codeLists=[];codeMaps={};async findAllCodeList(){const s=await t("/codeList/findAll",{data:{},serviceId:"fwPlatform"})||[],a=e(s,"type");this.codeLists=s,this.codeMaps=a}getCodeLocaleList=t=>s(this.codeMaps,t,[]);getCodeLocaleName=(t,e)=>{const s=this.getCodeLocaleList(t);function n(t){const e=i(s,e=>e.value===String(t));return e?.name||""}if(Array.isArray(e)){const t=a(e,(t="",e="")=>t+","+n(e),"");return t.slice(1,t.length)}if(String(e).indexOf(",")>=0){const t=e.replace("[","").replace("]","").split(","),s=a(t,(t="",e="")=>t+","+n(e),"");return s.slice(1,s.length)}return n(e)}};l.getCodeLocaleList,l.getCodeLocaleName;const p=new class{parameterList=[];parameterMap={};findAllParameters=async()=>{const e=await t("/parameter/findAll",{serviceId:"fwPlatform",data:{}},{showError:!1})||[],s=n(e,"name");this.parameterList=e,this.parameterMap=s};getSystemParameterByName=t=>"string"==typeof t?this.parameterMap[t]:r(this.parameterMap,t)};const y=(({prefixKey:t="",storage:e=localStorage}={})=>new class{storage=e;prefixKey=t;getKey(t){return`${this.prefixKey}${t}`.toUpperCase()}set(t,e,s=604800){const a=JSON.stringify({value:e,expire:null!==s?(new Date).getTime()+1e3*s:null});this.storage.setItem(this.getKey(t),a)}get(t,e=null){const s=this.storage.getItem(this.getKey(t));if(s)try{const e=JSON.parse(s),{value:a,expire:i}=e;if(null===i||i>=Date.now())return a;this.remove(t)}catch(t){return console.error(t),e}return e}remove(t){this.storage.removeItem(this.getKey(t))}clear(){this.storage.clear()}setCookie(t,e,s=604800){document.cookie=`${this.getKey(t)}=${e}; Max-Age=${s}`}getCookie(t){const e=document.cookie.split("; ");for(let s=0,a=e.length;s<a;s++){const a=e[s].split("=");if(a[0]===this.getKey(t))return a[1]}return""}removeCookie(t){this.setCookie(t,1,-1)}clearCookie(){const t=document.cookie.match(/[^ =;]+(?==)/g);if(t)for(let e=t.length;e--;)document.cookie=t[e]+"=0;expire="+new Date(0).toUTCString()}})();class f{userIdentity={};currentUser={};isSuperAdmin=!1;roles=[];functions=[];delegations=[];userSetting={};users=[];getUserIdentity(){if(!o(this.userIdentity))return this.userIdentity;const t=y?.get("userIdentity");return t||{}}setUserIdentity(t){return this.userIdentity={...this.userIdentity,...t},y.set("userIdentity",this.userIdentity),this.userIdentity}clearUserIdentity(){y.remove("userIdentity"),this.userIdentity={}}setUserAggregateInfo=({delegations:t,roles:e,functions:s,isSuperAdmin:a,currentUser:i})=>{this.delegations=t,this.roles=e,this.functions=s,this.isSuperAdmin=a,this.currentUser=i};getUserSettingType=t=>`${this.currentUser.id}-${t}`;getUserSetting=async e=>{const s=this.getUserSettingType(e),a=this.currentUser.id;if(this.userSetting[s])return this.userSetting[s];const i=await async function(e){return t("/accountUserSelf/getUserData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:a+e}),n=i?.bigData?JSON.parse(i.bigData):void 0;return this.userSetting[s]=n,n};updateUserSetting=async(e,s)=>{const a=this.getUserSettingType(e),i=this.currentUser.id;return await async function(e,s){return t("/accountUserSelf/setUserData",{data:e,serviceId:"fwSecurity"},s)}({dataType:e,dataId:i+e,bigData:JSON.stringify(s)}),this.userSetting[a]=s,s};removeUserSetting=async e=>{const s=this.getUserSettingType(e),a=this.currentUser.id;await async function(e,s){return t("/accountUserSelf/delUserData",{data:e,serviceId:"fwSecurity"},s)}({dataType:e,dataId:a}),delete this.userSetting[s]};getUserInfo=async(e,a)=>{const i=c(this.users,t=>a?t.userLoginName===e:t.id===e);if(i>-1)return s(this.users,`[${i}]`);const n=a?await async function(e){return t("/security/getUserByUserLoginName",{method:"POST",data:{userLoginName:e},serviceId:"fwSecurity"})}(e):await async function(e){return t("/security/getUserById",{method:"POST",data:{id:e},serviceId:"fwSecurity"})}(e);return h(n)&&this.users.push(n),n}}const w=/^https?:\/\/(([a-zA-Z0-9_-])+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?[a-zA-Z0-9_-](\?)?)*)*$/i,S=/^https?:\/\/(([a-zA-Z0-9_-])+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?[a-zA-Z0-9_-](\?)?)*)*$/i,L=t=>w.test(t)||S.test(t)||0===t?.indexOf("/")?t:"/"+t,I="MENU_HISTORY_UPDATE",P="MENU_BREADCRUMBS_UPDATE";m();class U{menuDataMaps={};menuData=[];menuPathMaps={};breadcrumbs=[];menuHistorys=[];userId;emitter;constructor(){this.emitter=m()}addListenerMenuHistorys=t=>{this.emitter.on(I,t)};removeListenerMenuHistorys=t=>this.emitter.off(I,t);addListenerBreadcrumbs=t=>this.emitter.on(P,t);removeListenerBreadcrumbs=t=>this.emitter.off(P,t);getTreeMenuData=(t,e,s)=>t.map(t=>{const{id:a,path:i,leaf:n}=t,r=e[a],o={...t,key:a,path:s?s+L(i):L(i)};if(r&&!n){const t=this.getTreeMenuData(r,e,o.path);o.children=t}return this.menuDataMaps[o.path]=o,o}).sort((t,e)=>t.seqNum-e.seqNum);init=(t,s)=>{const a=u(t);if(o(a))return;const i=e(a,"parentResourceId"),{ROOT:n,...r}=i;this.menuData=this.getTreeMenuData(n,r),this.menuData=[...this.menuData];const c=d(this.menuDataMaps,"name");this.updateMenuMaps(c),this.initMenuHistorys(s)};updateMenuMaps=t=>{this.menuPathMaps={...this.menuPathMaps,...t};const e=this.menuHistorys.map(t=>{const e=this.menuPathMaps[t.pathname];return{pathname:t.pathname,name:e||t.name}}),s=this.breadcrumbs.map(t=>{const e=this.menuPathMaps[t.pathname];return{...t,name:e||t.name}});this.updatehistorys(e),this.updateBreadcrumbs(s)};liseterHistorys=t=>{let e=this.menuHistorys;this.menuDataMaps[t]?.leaf&&!e.some(e=>e.pathname===t)&&(e=[{pathname:t,name:this.menuPathMaps[t]},...e],this.updatehistorys(e))};updatehistorys=t=>{if(!this.userId)return;const e=t.map(t=>({...t,name:t.name?t.name:this.menuPathMaps[t.pathname]}));this.menuHistorys=e,this.menuHistorys=g(this.menuHistorys,"pathname"),this.emitter.emit(I,this.menuHistorys),y.set(`${this.userId}-menu-history`,this.menuHistorys)};initMenuHistorys=t=>{this.userId=t;const e=y.get(`${t}-menu-history`,this.menuHistorys);this.updatehistorys(e)};liseterBreadcrumbs=t=>{const e=t.split("/");let s=1;const a=[],i={pathname:t,name:this.menuPathMaps[t]};for(;s<e.length;){const t=e.slice(0,s).join("/");this.menuPathMaps[t]&&a.push({name:this.menuPathMaps[t],pathname:t}),s++}a.push(i),this.updateBreadcrumbs(a)};updateBreadcrumbs=t=>{this.breadcrumbs=t,this.breadcrumbs=g(this.breadcrumbs,"pathname"),this.emitter.emit(P,t)}}class C{loginPathname;BASE="/";get baseLoginPathname(){return`${this.BASE}${this.loginPathname?.replace("/","")}`}tokenValue="";get isLoginPathname(){const t=window.location.pathname;return this.baseLoginPathname==t}getRealPath=t=>`${this.BASE}${t.replace("/","")}`;chekToken=async()=>{const e=await t("/authentication/checkToken",{serviceId:"fwSecurity"},{showError:!1});return e&&this.isLoginPathname&&window.location.replace(this.BASE),e};getLoginMethod=async()=>t("/authentication/getLoginMethod",{serviceId:"fwSecurity"});redirectBaseLogin=async()=>{const t=window.location.pathname,e=window.location.href;if(this.isLoginPathname)return!0;const s=new URLSearchParams(window.location.search),a=new URLSearchParams;"true"===s.get("forceLocal")&&a.append("forceLocal","true"),t!==this.BASE&&"/"!==t&&a.append("redirectUrl",e);const i=decodeURIComponent(a.toString());return window.location.replace(`${this.baseLoginPathname}${i?"?"+decodeURIComponent(a.toString()):""}`),!1};checkPassword=async()=>"noPass"!==await t("/security/checkPasswordUpdateTime",{data:{}},{showError:!1})||(this.tokenValue=await t("/authentication/extractToken",{data:{}}),!1);refactorToken=async()=>{var e;await(e=this.tokenValue,t("/authentication/refactorToken",{data:{value:e}}))};login=async t=>{const e=await this.baseLogin(t);return e.error,e};baseLogin=async e=>{const s={error:void 0,data:void 0};try{const a=await function(e){return t("/authentication/login",{data:e,serviceId:"fwSecurity"})}(e),{userToken:i,traceId:n}=a;if(i){s.data=a;return await this.checkPassword()||(s.error="passwordExpiration"),s}return n?(s.data=a,s.error="SLIDER_VERIFICATION_LOGIN",s):(s.error="passwordError",s)}catch(t){return s.error="validateError",s}};loginSuccess=()=>{let t=new URLSearchParams(window.location.search).get("redirectUrl");t?window.location.href=t:window.location.replace(this.BASE)};baseLoginOut=async e=>{const s=new URLSearchParams,a=window.location.href;window.location.pathname!==this.BASE&&s.append("redirectUrl",a),await t("/authentication/logout",{data:{},serviceId:"fwSecurity"}),e?window.location.replace(`${this.baseLoginPathname}?${s.toString()}`):window.location.replace(this.baseLoginPathname)}}const k={sso:!1,ssoUrlSearchParams:["ticket"],ssoCheckTokenUrl:"",ssoSuccessUrlkey:"successUrl",ssoLoginUrl:window.location.origin+"/fwSecurity/ssoAuth/login.api",ssologinOutUrl:window.location.origin+"/fwSecurity/ssoAuth/logout.api"};class v{init(t){this.ssoConfig={...this.ssoConfig,...t}}ssoConfig=k;isSso=async e=>{if(!this.ssoConfig.sso)return!1;let s=!1;try{s=await t("/ssoAuthConfig/checkOnlyRedirect",{},{showError:!1})}catch(t){console.error("sso",t)}return e&&(s=await e()),!!s};ssoLogin=()=>{const{ssoSuccessUrlkey:t,ssoUrlSearchParams:e,ssoLoginUrl:s}=this.ssoConfig,a=new URLSearchParams(window.location.search.slice(1)),i=new URLSearchParams,n=window.location.href;return i.append(t,encodeURIComponent(n)),e.map(t=>{const e=a.get(t);e&&i.append(t,e)}),window.location.href=`${s}?${i.toString()}`,!1};ssoLoginOut=()=>{window.location.href=this.ssoConfig.ssologinOutUrl}}class D{getValidateCodeImage=e=>function(e={}){return t("/authentication/getValidateCode",{data:e,serviceId:"fwSecurity"})}(e);sliderVerificationCodeImage=()=>t("/authentication/sliderVerificationCode",{method:"POST",serviceId:"fwSecurity"});checkCaptcha=e=>{return s=e,t("/authentication/checkCaptcha",{method:"POST",data:{...s},serviceId:"fwSecurity"});var s}}class A extends C{ssoLogin;validate;noCheckPermissionsPath=[];ssoCallback;constructor(){super(),this.ssoLogin=new v,this.validate=new D}init=(t,e="/",s)=>{this.BASE=e,this.ssoCallback=s,this.noCheckPermissionsPath=t?.noCheckPermissionsPath,this.ssoLogin.init(t),this.loginPathname=t?.loginPathname||"/login"};isNoLoginRequiredPage=()=>{const t=window.location.pathname,e=this.noCheckPermissionsPath?.some(e=>this.getRealPath(e)==t);return e};loginOut=async()=>{await this.ssoLogin.isSso(this.ssoCallback)&&this.ssoLogin.ssoLoginOut(),await this.baseLoginOut()};loginAuthentication=async e=>{var s;await(s=e,t("/authentication/beforeLoginCheckCode",{method:"POST",data:{...s},serviceId:"fwSecurity"})),this.loginSuccess()};redirectLogin=async()=>{if(this.ssoLogin.ssoConfig.sso){if(await this.ssoLogin.isSso())return this.ssoCallback()?(this.ssoLogin.ssoLogin(),!1):!!this.isNoLoginRequiredPage()||this.redirectBaseLogin()}return!!this.isNoLoginRequiredPage()||(!!this.isLoginPathname||await this.redirectBaseLogin())}}const M=new class{userStore;menuStore;loginStore;isSuperAdmin=!1;loginCallback;constructor(){this.userStore=new f,this.menuStore=new U,this.loginStore=new A}platformLanguages=[];productInfo={isProdEnv:!1,productName:""};get isPrd(){return this.productInfo?.isProdEnv}get userInfo(){return this.userStore.currentUser}get menuData(){return this.menuStore.menuData}findPlantform=async()=>{const e=await t("/platformManage/getPlatformAggregateInfo",{method:"POST"},{showError:!1});this.platformLanguages=e.platformLanguages,this.productInfo=e.productInfo};getAggregateInfo=async e=>{const s=await async function(){return t("/security/findUserAggregateInfo",{method:"POST"})}(),{user:a,startMenus:i,isSuperAdmin:n,...r}=s;this.userStore.setUserAggregateInfo({...r,currentUser:a}),this.isSuperAdmin=n;const c="function"==typeof e?await e(s):e;this.menuStore.init(o(c)?i:c,a.id)};init=async t=>{const{base:e="/",menuData:s,loginSuccessCallback:a,ssoCallback:i}=t;this.loginStore.init(t?.loginConfig,e,i);try{const t=await this.loginStore.chekToken();return t?(this.userStore.setUserIdentity(t),await this.getAggregateInfo(s),await l.findAllCodeList(),await p.findAllParameters(),await(a?.()),!0):await this.loginStore.redirectLogin()}catch(t){console.error(t)}return!1}};const b="company-v1";var T=new class{data={};getCompanyDataType=t=>`${b}-${t}`;getCompanyData=async e=>{const s=this.getCompanyDataType(e);if(this.data[s])return this.data[s];const a=await async function(e){return t("/companyData/getCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b}),i=a?.bigData?JSON.parse(a.bigData):void 0;return this.data[s]=i,i};updateCompanyData=async(e,s)=>{const a=this.getCompanyDataType(e);return await async function(e){return t("/companyData/setCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b,bigData:JSON.stringify(s)}),this.data[a]=s,s};removeCompanyData=async e=>{const s=this.getCompanyDataType(e);await async function(e){return t("/companyData/delCompanyData",{data:e,serviceId:"fwSecurity"})}({dataType:e,dataId:b}),delete this.data[s]}};const O=l,E=p,$=M.userStore,B=M.loginStore,N=M.menuStore;export{P as M,I as a,O as c,M as g,T as i,B as l,N as m,E as p,y as s,$ as u};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{mapValues as r,toLower as e,isObject as o,pick as t,mergeWith as n,isEmpty as a,omit as i}from"lodash-es";function c(r,e){(function(r){return"string"==typeof r&&-1!==r.indexOf(".")&&1===parseFloat(r)})(r)&&(r="100%");var o=function(r){return"string"==typeof r&&-1!==r.indexOf("%")}(r);return r=360===e?r:Math.min(e,Math.max(0,parseFloat(r))),o&&(r=parseInt(String(r*e),10)/100),Math.abs(r-e)<1e-6?1:r=360===e?(r<0?r%e+e:r%e)/parseFloat(String(e)):r%e/parseFloat(String(e))}function s(r){return Math.min(1,Math.max(0,r))}function l(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function u(r){return r<=1?"".concat(100*Number(r),"%"):r}function g(r){return 1===r.length?"0"+r:String(r)}function h(r,e,o){return{r:255*c(r,255),g:255*c(e,255),b:255*c(o,255)}}function d(r,e,o){r=c(r,255),e=c(e,255),o=c(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,i=0,s=(t+n)/2;if(t===n)i=0,a=0;else{var l=t-n;switch(i=s>.5?l/(2-t-n):l/(t+n),t){case r:a=(e-o)/l+(e<o?6:0);break;case e:a=(o-r)/l+2;break;case o:a=(r-e)/l+4}a/=6}return{h:a,s:i,l:s}}function f(r,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?r+6*o*(e-r):o<.5?e:o<2/3?r+(e-r)*(2/3-o)*6:r}function p(r,e,o){var t,n,a;if(r=c(r,360),e=c(e,100),o=c(o,100),0===e)n=o,a=o,t=o;else{var i=o<.5?o*(1+e):o+e-o*e,s=2*o-i;t=f(s,i,r+1/3),n=f(s,i,r),a=f(s,i,r-1/3)}return{r:255*t,g:255*n,b:255*a}}function b(r,e,o){r=c(r,255),e=c(e,255),o=c(o,255);var t=Math.max(r,e,o),n=Math.min(r,e,o),a=0,i=t,s=t-n,l=0===t?0:s/t;if(t===n)a=0;else{switch(t){case r:a=(e-o)/s+(e<o?6:0);break;case e:a=(o-r)/s+2;break;case o:a=(r-e)/s+4}a/=6}return{h:a,s:l,v:i}}function x(r,e,o){r=6*c(r,360),e=c(e,100),o=c(o,100);var t=Math.floor(r),n=r-t,a=o*(1-e),i=o*(1-n*e),s=o*(1-(1-n)*e),l=t%6;return{r:255*[o,i,a,a,s,o][l],g:255*[s,o,o,i,a,a][l],b:255*[a,a,s,o,o,i][l]}}function v(r,e,o,t){var n=[g(Math.round(r).toString(16)),g(Math.round(e).toString(16)),g(Math.round(o).toString(16))];return t&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function m(r,e,o,t,n){var a=[g(Math.round(r).toString(16)),g(Math.round(e).toString(16)),g(Math.round(o).toString(16)),g(S(t))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function y(r,e,o,t){return[g(S(t)),g(Math.round(r).toString(16)),g(Math.round(e).toString(16)),g(Math.round(o).toString(16))].join("")}function S(r){return Math.round(255*parseFloat(r)).toString(16)}function w(r){return M(r)/255}function M(r){return parseInt(r,16)}function B(r){return{r:r>>16,g:(65280&r)>>8,b:255&r}}var H={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function k(r){var e={r:0,g:0,b:0},o=1,t=null,n=null,a=null,i=!1,c=!1;return"string"==typeof r&&(r=R(r)),"object"==typeof r&&(L(r.r)&&L(r.g)&&L(r.b)?(e=h(r.r,r.g,r.b),i=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):L(r.h)&&L(r.s)&&L(r.v)?(t=u(r.s),n=u(r.v),e=x(r.h,t,n),i=!0,c="hsv"):L(r.h)&&L(r.s)&&L(r.l)&&(t=u(r.s),a=u(r.l),e=p(r.h,t,a),i=!0,c="hsl"),Object.prototype.hasOwnProperty.call(r,"a")&&(o=r.a)),o=l(o),{ok:i,format:r.format||c,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:o}}var A="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),z="[\\s|\\(]+(".concat(A,")[,|\\s]+(").concat(A,")[,|\\s]+(").concat(A,")\\s*\\)?"),F="[\\s|\\(]+(".concat(A,")[,|\\s]+(").concat(A,")[,|\\s]+(").concat(A,")[,|\\s]+(").concat(A,")\\s*\\)?"),T={CSS_UNIT:new RegExp(A),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function R(r){if(0===(r=r.trim().toLowerCase()).length)return!1;var e=!1;if(H[r])r=H[r],e=!0;else if("transparent"===r)return{r:0,g:0,b:0,a:0,format:"name"};var o=T.rgb.exec(r);return o?{r:o[1],g:o[2],b:o[3]}:(o=T.rgba.exec(r))?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=T.hsl.exec(r))?{h:o[1],s:o[2],l:o[3]}:(o=T.hsla.exec(r))?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=T.hsv.exec(r))?{h:o[1],s:o[2],v:o[3]}:(o=T.hsva.exec(r))?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=T.hex8.exec(r))?{r:M(o[1]),g:M(o[2]),b:M(o[3]),a:w(o[4]),format:e?"name":"hex8"}:(o=T.hex6.exec(r))?{r:M(o[1]),g:M(o[2]),b:M(o[3]),format:e?"name":"hex"}:(o=T.hex4.exec(r))?{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),a:w(o[4]+o[4]),format:e?"name":"hex8"}:!!(o=T.hex3.exec(r))&&{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),format:e?"name":"hex"}}function L(r){return Boolean(T.CSS_UNIT.exec(String(r)))}var C=function(){function r(e,o){var t;if(void 0===e&&(e=""),void 0===o&&(o={}),e instanceof r)return e;"number"==typeof e&&(e=B(e)),this.originalInput=e;var n=k(e);this.originalInput=e,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(t=o.format)&&void 0!==t?t:n.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return r.prototype.isDark=function(){return this.getBrightness()<128},r.prototype.isLight=function(){return!this.isDark()},r.prototype.getBrightness=function(){var r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},r.prototype.getLuminance=function(){var r=this.toRgb(),e=r.r/255,o=r.g/255,t=r.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))},r.prototype.getAlpha=function(){return this.a},r.prototype.setAlpha=function(r){return this.a=l(r),this.roundA=Math.round(100*this.a)/100,this},r.prototype.isMonochrome=function(){return 0===this.toHsl().s},r.prototype.toHsv=function(){var r=b(this.r,this.g,this.b);return{h:360*r.h,s:r.s,v:r.v,a:this.a}},r.prototype.toHsvString=function(){var r=b(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.v);return 1===this.a?"hsv(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsva(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHsl=function(){var r=d(this.r,this.g,this.b);return{h:360*r.h,s:r.s,l:r.l,a:this.a}},r.prototype.toHslString=function(){var r=d(this.r,this.g,this.b),e=Math.round(360*r.h),o=Math.round(100*r.s),t=Math.round(100*r.l);return 1===this.a?"hsl(".concat(e,", ").concat(o,"%, ").concat(t,"%)"):"hsla(".concat(e,", ").concat(o,"%, ").concat(t,"%, ").concat(this.roundA,")")},r.prototype.toHex=function(r){return void 0===r&&(r=!1),v(this.r,this.g,this.b,r)},r.prototype.toHexString=function(r){return void 0===r&&(r=!1),"#"+this.toHex(r)},r.prototype.toHex8=function(r){return void 0===r&&(r=!1),m(this.r,this.g,this.b,this.a,r)},r.prototype.toHex8String=function(r){return void 0===r&&(r=!1),"#"+this.toHex8(r)},r.prototype.toHexShortString=function(r){return void 0===r&&(r=!1),1===this.a?this.toHexString(r):this.toHex8String(r)},r.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},r.prototype.toRgbString=function(){var r=Math.round(this.r),e=Math.round(this.g),o=Math.round(this.b);return 1===this.a?"rgb(".concat(r,", ").concat(e,", ").concat(o,")"):"rgba(".concat(r,", ").concat(e,", ").concat(o,", ").concat(this.roundA,")")},r.prototype.toPercentageRgb=function(){var r=function(r){return"".concat(Math.round(100*c(r,255)),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},r.prototype.toPercentageRgbString=function(){var r=function(r){return Math.round(100*c(r,255))};return 1===this.a?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},r.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var r="#"+v(this.r,this.g,this.b,!1),e=0,o=Object.entries(H);e<o.length;e++){var t=o[e],n=t[0];if(r===t[1])return n}return!1},r.prototype.toString=function(r){var e=Boolean(r);r=null!=r?r:this.format;var o=!1,t=this.a<1&&this.a>=0;return e||!t||!r.startsWith("hex")&&"name"!==r?("rgb"===r&&(o=this.toRgbString()),"prgb"===r&&(o=this.toPercentageRgbString()),"hex"!==r&&"hex6"!==r||(o=this.toHexString()),"hex3"===r&&(o=this.toHexString(!0)),"hex4"===r&&(o=this.toHex8String(!0)),"hex8"===r&&(o=this.toHex8String()),"name"===r&&(o=this.toName()),"hsl"===r&&(o=this.toHslString()),"hsv"===r&&(o=this.toHsvString()),o||this.toHexString()):"name"===r&&0===this.a?this.toName():this.toRgbString()},r.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},r.prototype.clone=function(){return new r(this.toString())},r.prototype.lighten=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l+=e/100,o.l=s(o.l),new r(o)},r.prototype.brighten=function(e){void 0===e&&(e=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(-e/100*255))),o.g=Math.max(0,Math.min(255,o.g-Math.round(-e/100*255))),o.b=Math.max(0,Math.min(255,o.b-Math.round(-e/100*255))),new r(o)},r.prototype.darken=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.l-=e/100,o.l=s(o.l),new r(o)},r.prototype.tint=function(r){return void 0===r&&(r=10),this.mix("white",r)},r.prototype.shade=function(r){return void 0===r&&(r=10),this.mix("black",r)},r.prototype.desaturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s-=e/100,o.s=s(o.s),new r(o)},r.prototype.saturate=function(e){void 0===e&&(e=10);var o=this.toHsl();return o.s+=e/100,o.s=s(o.s),new r(o)},r.prototype.greyscale=function(){return this.desaturate(100)},r.prototype.spin=function(e){var o=this.toHsl(),t=(o.h+e)%360;return o.h=t<0?360+t:t,new r(o)},r.prototype.mix=function(e,o){void 0===o&&(o=50);var t=this.toRgb(),n=new r(e).toRgb(),a=o/100;return new r({r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b,a:(n.a-t.a)*a+t.a})},r.prototype.analogous=function(e,o){void 0===e&&(e=6),void 0===o&&(o=30);var t=this.toHsl(),n=360/o,a=[this];for(t.h=(t.h-(n*e>>1)+720)%360;--e;)t.h=(t.h+n)%360,a.push(new r(t));return a},r.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new r(e)},r.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var o=this.toHsv(),t=o.h,n=o.s,a=o.v,i=[],c=1/e;e--;)i.push(new r({h:t,s:n,v:a})),a=(a+c)%1;return i},r.prototype.splitcomplement=function(){var e=this.toHsl(),o=e.h;return[this,new r({h:(o+72)%360,s:e.s,l:e.l}),new r({h:(o+216)%360,s:e.s,l:e.l})]},r.prototype.onBackground=function(e){var o=this.toRgb(),t=new r(e).toRgb(),n=o.a+t.a*(1-o.a);return new r({r:(o.r*o.a+t.r*t.a*(1-o.a))/n,g:(o.g*o.a+t.g*t.a*(1-o.a))/n,b:(o.b*o.a+t.b*t.a*(1-o.a))/n,a:n})},r.prototype.triad=function(){return this.polyad(3)},r.prototype.tetrad=function(){return this.polyad(4)},r.prototype.polyad=function(e){for(var o=this.toHsl(),t=o.h,n=[this],a=360/e,i=1;i<e;i++)n.push(new r({h:(t+i*a)%360,s:o.s,l:o.l}));return n},r.prototype.equals=function(e){return this.toRgbString()===new r(e).toRgbString()},r}();function X(r,e){return void 0===r&&(r=""),void 0===e&&(e={}),new C(r,e)}function D(r,e){var o=new C(r),t=new C(e);return(Math.max(o.getLuminance(),t.getLuminance())+.05)/(Math.min(o.getLuminance(),t.getLuminance())+.05)}function E(r,e,o){var t,n;void 0===o&&(o={level:"AA",size:"small"});var a=D(r,e);switch((null!==(t=o.level)&&void 0!==t?t:"AA")+(null!==(n=o.size)&&void 0!==n?n:"small")){case"AAsmall":case"AAAlarge":return a>=4.5;case"AAlarge":return a>=3;case"AAAsmall":return a>=7;default:return!1}}function I(r,e,o){void 0===o&&(o={includeFallbackColors:!1,level:"AA",size:"small"});for(var t=null,n=0,a=o.includeFallbackColors,i=o.level,c=o.size,s=0,l=e;s<l.length;s++){var u=l[s],g=D(r,u);g>n&&(n=g,t=new C(u))}return E(r,t,{level:i,size:c})||!a?t:(o.includeFallbackColors=!1,I(r,["#fff","#000"],o))}function W(r,e){var o=new C(r),t="#"+y(o.r,o.g,o.b,o.a),n=t,a=o.gradientType?"GradientType = 1, ":"";if(e){var i=new C(e);n="#"+y(i.r,i.g,i.b,i.a)}return"progid:DXImageTransform.Microsoft.gradient(".concat(a,"startColorstr=").concat(t,",endColorstr=").concat(n,")")}function P(r,e){var o={r:u(r.r),g:u(r.g),b:u(r.b)};return void 0!==r.a&&(o.a=Number(r.a)),new C(o,e)}function O(){return new C({r:Math.random(),g:Math.random(),b:Math.random()})}function $(r){if(void 0===r&&(r={}),void 0!==r.count&&null!==r.count){var e=r.count,o=[];for(r.count=void 0;e>o.length;)r.count=null,r.seed&&(r.seed+=1),o.push($(r));return r.count=e,o}var t=function(r,e){var o=N(function(r){var e=parseInt(r,10);if(!Number.isNaN(e)&&e<360&&e>0)return[e,e];if("string"==typeof r){var o=Q.find((function(e){return e.name===r}));if(o){var t=j(o);if(t.hueRange)return t.hueRange}var n=new C(r);if(n.isValid){var a=n.toHsv().h;return[a,a]}}return[0,360]}(r),e);o<0&&(o=360+o);return o}(r.hue,r.seed),n=function(r,e){if("monochrome"===e.hue)return 0;if("random"===e.luminosity)return N([0,100],e.seed);var o=G(r).saturationRange,t=o[0],n=o[1];switch(e.luminosity){case"bright":t=55;break;case"dark":t=n-10;break;case"light":n=55}return N([t,n],e.seed)}(t,r),a=function(r,e,o){var t=function(r,e){for(var o=G(r).lowerBounds,t=0;t<o.length-1;t++){var n=o[t][0],a=o[t][1],i=o[t+1][0],c=o[t+1][1];if(e>=n&&e<=i){var s=(c-a)/(i-n);return s*e+(a-s*n)}}return 0}(r,e),n=100;switch(o.luminosity){case"dark":n=t+20;break;case"light":t=(n+t)/2;break;case"random":t=0,n=100}return N([t,n],o.seed)}(t,n,r),i={h:t,s:n,v:a};return void 0!==r.alpha&&(i.a=r.alpha),new C(i)}function G(r){r>=334&&r<=360&&(r-=360);for(var e=0,o=Q;e<o.length;e++){var t=j(o[e]);if(t.hueRange&&r>=t.hueRange[0]&&r<=t.hueRange[1])return t}throw Error("Color not found")}function N(r,e){if(void 0===e)return Math.floor(r[0]+Math.random()*(r[1]+1-r[0]));var o=r[1]||1,t=r[0]||0,n=(e=(9301*e+49297)%233280)/233280;return Math.floor(t+n*(o-t))}function j(r){var e=r.lowerBounds[0][0],o=r.lowerBounds[r.lowerBounds.length-1][0],t=r.lowerBounds[r.lowerBounds.length-1][1],n=r.lowerBounds[0][1];return{name:r.name,hueRange:r.hueRange,lowerBounds:r.lowerBounds,saturationRange:[e,o],brightnessRange:[t,n]}}var Q=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}],q=2,U=.16,V=.05,_=.05,J=.15,K=5,Y=4,Z=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function rr(r){var e=b(r.r,r.g,r.b);return{h:360*e.h,s:e.s,v:e.v}}function er(r){var e=r.r,o=r.g,t=r.b;return"#".concat(v(e,o,t,!1))}function or(r,e,o){var t;return(t=Math.round(r.h)>=60&&Math.round(r.h)<=240?o?Math.round(r.h)-q*e:Math.round(r.h)+q*e:o?Math.round(r.h)+q*e:Math.round(r.h)-q*e)<0?t+=360:t>=360&&(t-=360),t}function tr(r,e,o){return 0===r.h&&0===r.s?r.s:((t=o?r.s-U*e:e===Y?r.s+U:r.s+V*e)>1&&(t=1),o&&e===K&&t>.1&&(t=.1),t<.06&&(t=.06),Number(t.toFixed(2)));var t}function nr(r,e,o){var t;return(t=o?r.v+_*e:r.v-J*e)>1&&(t=1),Number(t.toFixed(2))}function ar(r){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=[],t=k(r),n=K;n>0;n-=1){var a=rr(t),i=er(k({h:or(a,n,!0),s:tr(a,n,!0),v:nr(a,n,!0)}));o.push(i)}o.push(er(t));for(var c=1;c<=Y;c+=1){var s=rr(t),l=er(k({h:or(s,c),s:tr(s,c),v:nr(s,c)}));o.push(l)}return"dark"===e.theme?Z.map((function(r){var t,n,a,i=r.index,c=r.opacity;return er((t=k(e.backgroundColor||"#141414"),n=k(o[i]),a=100*c/100,{r:(n.r-t.r)*a+t.r,g:(n.g-t.g)*a+t.g,b:(n.b-t.b)*a+t.b}))})):o}var ir={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},cr={},sr={};Object.keys(ir).forEach((function(r){cr[r]=ar(ir[r]),cr[r].primary=cr[r][5],sr[r]=ar(ir[r],{theme:"dark",backgroundColor:"#141414"}),sr[r].primary=sr[r][5]}));const lr=r=>{const{controlHeight:e}=r;return{controlHeightSM:.75*e,controlHeightXS:.5*e,controlHeightLG:1.25*e}};function ur(r){const{sizeUnit:e,sizeStep:o}=r;return{sizeXXL:e*(o+8),sizeXL:e*(o+4),sizeLG:e*(o+2),sizeMD:e*(o+1),sizeMS:e*o,size:e*o,sizeSM:e*(o-1),sizeXS:e*(o-2),sizeXXS:e*(o-3)}}const gr={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},hr={...gr,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:'microsoft yahei,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontWeight:400,fontSize:12,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacity:1,wireframe:!1,motion:!0,layoutHeaderHeight:50,layoutSiderWidth:200,layoutIconSize:24,layoutNavHeight:40,gradientColors:["rgba(0, 64, 237,0.3)","rgba(0, 229, 237,0.3)"]};function dr(r,e){const o=parseInt(r,16)+e,t=o>255?255:o;return t.toString(16).length>1?t.toString(16):`0${t.toString(16)}`}function fr(r,e){return r=r.indexOf("#")>=0?r.substring(1,r.length):r,e=Math.trunc(255*e/100),`#${dr(r.substring(0,2),e)}${dr(r.substring(2,4),e)}${dr(r.substring(4,6),e)}`}function pr(t,n){if("object"!=typeof t||Array.isArray(t))return;const a={};return r(t,((r,t)=>{const i=n?`--${n}-`+t:"--"+t,c="number"!=typeof r||["lineheight","opacity","weight"].some((r=>e(t).includes(r)))?r:r+"px";if(o(r))return pr(c,t);a[i]=c})),a}const br=(r,e)=>new C(r).setAlpha(e).toRgbString(),xr=(r,e)=>new C(r).darken(e).toHexString(),vr=(r,e)=>new C(r).lighten(e).toHexString(),mr=(r,e)=>new C(r).onBackground(e).toRgbString(),yr=(r,e)=>e.map((e=>mr(e,r)));function Sr(r,{generateColorPalettes:e,generateNeutralColorPalettes:o}){const{colorSuccess:t,colorWarning:n,colorError:a,colorInfo:i,colorPrimary:c,colorBgBase:s,colorTextBase:l}=r,u=e(c),g=e(t),h=e(n),d=e(a),f=e(i),p=o(s,l),b=yr(p.colorBgBase,r.gradientColors),x=e(r.colorLink||r.colorInfo);return{...p,gradientColors:b,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:g[1],colorSuccessBgHover:g[2],colorSuccessBorder:g[3],colorSuccessBorderHover:g[4],colorSuccessHover:g[4],colorSuccess:g[6],colorSuccessActive:g[7],colorSuccessTextHover:g[8],colorSuccessText:g[9],colorSuccessTextActive:g[10],colorErrorBg:d[1],colorErrorBgHover:d[2],colorErrorBorder:d[3],colorErrorBorderHover:d[4],colorErrorHover:d[5],colorError:d[6],colorErrorActive:d[7],colorErrorTextHover:d[8],colorErrorText:d[9],colorErrorTextActive:d[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:f[1],colorInfoBgHover:f[2],colorInfoBorder:f[3],colorInfoBorderHover:f[4],colorInfoHover:f[4],colorInfo:f[6],colorInfoActive:f[7],colorInfoTextHover:f[8],colorInfoText:f[9],colorInfoTextActive:f[10],colorLinkHover:x[4],colorLink:x[6],colorLinkActive:x[7],colorBgMask:new C("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}const wr=r=>{let e=r,o=r,t=r,n=r,a=r,i=r;return r<6&&r>=5?e=r+1:r<16&&r>=6?e=r+2:r>=16&&(e=16),r<7&&r>=5?o=4:r<8&&r>=7?o=5:r<14&&r>=8?o=6:r<16&&r>=14?o=7:r>=16&&(o=8),r<6&&r>=2?t=1:r>=6&&(t=2),r>4&&r<8?i=4:r>=8&&(i=6),n=e>0?e+4:e,a=e>0?e+8:e,{borderRadius:r>16?16:r,borderRadiusXS:t,borderRadiusSM:o,borderRadiusLG:e,borderRadiusXL:n,borderRadiusXXL:a,borderRadiusOuter:i}};function Mr(r){const{motionUnit:e,motionBase:o,borderRadius:t,lineWidth:n,opacity:a,layoutHeaderHeight:i}=r;return{motionDurationFast:`${(o+e).toFixed(1)}s`,motionDurationMid:`${(o+2*e).toFixed(1)}s`,motionDurationSlow:`${(o+3*e).toFixed(1)}s`,lineWidthBold:n+1,...wr(t),opacityImage:a,opacity1:.8*a,opacity2:.6*a}}const Br=r=>{const e=ar(r);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},Hr=(r,e)=>{let o=r||"#fff",t=e||"#000";return o=new C(o).lighten()?o:new C(o).lighten(100).toRgbString(),t=new C(t).isDark()?t:new C(t).darken(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorText:br(t,.88),colorTextSecondary:br(t,.65),colorTextTertiary:br(t,.45),colorTextQuaternary:br(t,.25),colorFill:br(t,.15),colorFillSecondary:br(t,.06),colorFillTertiary:br(t,.04),colorFillQuaternary:br(t,.02),colorBgLayout:xr(o,4),colorBgContainer:xr(o,0),colorBgElevated:xr(o,0),colorBgSpotlight:br(t,.85),colorBorder:xr(o,15),colorBorderSecondary:xr(o,6)}};const kr=r=>{const e=function(r){const e=new Array(10).fill(null).map(((e,o)=>{const t=r*2.71828**((o-1)/5),n=o>1?Math.floor(t):Math.ceil(t);return 2*Math.floor(n/2)}));return e[1]=r,e.map((r=>({size:r,lineHeight:(r+8)/r})))}(r),o=e.map((r=>r.size)),t=e.map((r=>r.lineHeight));return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:t[1],lineHeightLG:t[2],lineHeightSM:t[0],lineHeightHeading1:t[6],lineHeightHeading2:t[5],lineHeightHeading3:t[4],lineHeightHeading4:t[3],lineHeightHeading5:t[2]}};function Ar(r){const e=Object.keys(gr).map((e=>{const o=ar(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...r,...e,...Sr(r,{generateColorPalettes:Br,generateNeutralColorPalettes:Hr}),...kr(r.fontSize),...ur(r),...lr(r),...Mr(r)}}const zr=r=>{const e=ar(r,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},Fr=(r,e)=>{let o=r||"#000",t=e||"#fff";return o=new C(o).isDark()?o:new C(o).darken(100).toRgbString(),t=new C(t).isLight()?t:new C(t).lighten(100).toRgbString(),{colorBgBase:o,colorTextBase:t,colorText:br(t,.85),colorTextSecondary:br(t,.65),colorTextTertiary:br(t,.45),colorTextQuaternary:br(t,.25),colorFill:br(t,.18),colorFillSecondary:br(t,.12),colorFillTertiary:br(t,.08),colorFillQuaternary:br(t,.04),colorBgElevated:vr(o,12),colorBgContainer:vr(o,8),colorBgLayout:vr(o,0),colorBgSpotlight:vr(o,26),colorBorder:vr(o,26),colorBorderSecondary:vr(o,19)}},Tr=(r,e)=>{const o=Object.keys(gr).map((e=>{const o=ar(r[e],{theme:"dark"});return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{});return{...e??Ar(r),...o,...Sr(r,{generateColorPalettes:zr,generateNeutralColorPalettes:Fr})}};function Rr(r){const{sizeUnit:e,sizeStep:o}=r,t=o-2;return{sizeXXL:e*(t+10),sizeXL:e*(t+6),sizeLG:e*(t+2),sizeMD:e*(t+2),sizeMS:e*(t+1),size:e*t,sizeSM:e*t,sizeXS:e*(t-1),sizeXXS:e*(t-1)}}const Lr=(r,e)=>{const o=e??Ar(r),t=o.fontSizeSM,n=o.controlHeight-4;return{...o,...Rr(e??r),...kr(t),controlHeight:n,...lr({...o,controlHeight:n})}},Cr=(r,e)=>{const o=r||"#fff",t=e||"#000";return{colorBgBase:o,colorTextBase:t,colorText:br(t,.9),colorTextSecondary:br(t,.8),colorTextTertiary:br(t,.7),colorTextQuaternary:br(t,.6),colorFill:br(t,.3),colorFillSecondary:br(t,.2),colorFillTertiary:br(t,.1),colorFillQuaternary:br(t,.06),colorBgLayout:xr(o,6),colorBgContainer:xr(o,0),colorBgElevated:xr(o,0),colorBgSpotlight:br(t,1),colorBorder:xr(o,30),colorBorderSecondary:xr(o,12)}};function Xr(r,e){const o=e??Ar(r),t=Object.keys(gr).map((e=>{const o=ar(r[e]);return new Array(10).fill(1).reduce(((r,t,n)=>(r[`${e}-${n+1}`]=o[n],r[`${e}${n+1}`]=o[n],r)),{})})).reduce(((r,e)=>r={...r,...e}),{}),{fontSize:n,colorBgBase:a,colorTextBase:i}=o;return{...o,...t,...Cr(a,i),fontSizeSM:n,fontSize:n+2,fontSizeLG:n+3,fontSizeXL:n+4}}function Dr(r){return r>=0&&r<=255}function Er(r,e){const{r:o,g:t,b:n,a:a}=new C(r).toRgb();if(a<1)return r;const{r:i,g:c,b:s}=new C(e).toRgb();for(let r=.01;r<=1;r+=.01){const e=Math.round((o-i*(1-r))/r),a=Math.round((t-c*(1-r))/r),l=Math.round((n-s*(1-r))/r);if(Dr(e)&&Dr(a)&&Dr(l))return new C({r:e,g:a,b:l,a:Math.round(100*r)/100}).toRgbString()}return new C({r:o,g:t,b:n,a:1}).toRgbString()}function Ir(r){const{override:e,...o}=r,t={...e};Object.keys(hr).forEach((r=>{delete t[r]}));const n={...o,...t},a=1200,i=1600;if(!1===n.motion){const r="0s";n.motionDurationFast=r,n.motionDurationMid=r,n.motionDurationSlow=r}return{...n,colorFillContent:n.colorFillSecondary,colorFillContentHover:n.colorFill,colorFillAlter:n.colorFillQuaternary,colorBgContainerDisabled:n.colorFillTertiary,colorBorderBg:n.colorBgContainer,colorSplit:Er(n.colorBorderSecondary,n.colorBgContainer),colorTextPlaceholder:n.colorTextQuaternary,colorTextDisabled:n.colorTextQuaternary,colorTextHeading:n.colorText,colorTextLabel:n.colorTextSecondary,colorTextDescription:n.colorTextTertiary,colorTextLightSolid:n.colorWhite,colorHighlight:n.colorError,colorBgTextHover:n.colorFillSecondary,colorBgTextActive:n.colorFill,colorIcon:n.colorTextTertiary,colorIconHover:n.colorText,colorErrorOutline:Er(n.colorErrorBg,n.colorBgContainer),colorWarningOutline:Er(n.colorWarningBg,n.colorBgContainer),fontSizeIcon:n.fontSizeSM,lineWidthFocus:2*n.lineWidth,lineWidth:n.lineWidth,controlOutlineWidth:2*n.lineWidth,controlInteractiveSize:n.controlHeight/2,controlItemBgHover:n.colorFillTertiary,controlItemBgActive:n.colorPrimaryBg,controlItemBgActiveHover:n.colorPrimaryBgHover,controlItemBgActiveDisabled:n.colorFill,controlTmpOutline:n.colorFillQuaternary,controlOutline:Er(n.colorPrimaryBg,n.colorBgContainer),lineType:n.lineType,borderRadius:n.borderRadius,borderRadiusXS:n.borderRadiusXS,borderRadiusSM:n.borderRadiusSM,borderRadiusLG:n.borderRadiusLG,fontWeightStrong:700,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:n.sizeXXS,paddingXS:n.sizeXS,paddingSM:n.sizeSM,padding:n.size,paddingMD:n.sizeMD,paddingLG:n.sizeLG,paddingXL:n.sizeXL,paddingContentHorizontalLG:n.sizeLG,paddingContentVerticalLG:n.sizeMS,paddingContentHorizontal:n.sizeMS,paddingContentVertical:n.sizeSM,paddingContentHorizontalSM:n.size,paddingContentVerticalSM:n.sizeXS,marginXXS:n.sizeXXS,marginXS:n.sizeXS,marginSM:n.sizeSM,margin:n.size,marginMD:n.sizeMD,marginLG:n.sizeLG,marginXL:n.sizeXL,marginXXL:n.sizeXXL,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:a,screenXLMin:a,screenXLMax:1599,screenXXL:i,screenXXLMin:i,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n 0 1px 2px -2px rgba(0, 0, 0, 0.16),\n 0 3px 6px 0 rgba(0, 0, 0, 0.12),\n 0 5px 12px 4px rgba(0, 0, 0, 0.09)\n ",boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...t}}const Wr=(r=hr,e="default")=>{let o=t(r,Object.keys(hr));o=n(hr,o);const c=a(e)?["default"]:"string"==typeof e?[e]:e,s=Ar(o),l=i(r,Object.keys(hr));let u=s;return c.map((r=>{switch(r){case"dark":return void(u=Tr(o,u));case"compact":return void(u=Lr(o,u));case"meeting":return void(u=Xr(o,u))}})),Ir({...u,override:l})},Pr=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Or=Wr();export{Q as A,h as B,d as C,p as D,b as E,x as F,v as G,m as H,y as I,S as J,w as K,M as L,B as M,Pr as P,C as T,Tr as a,Lr as b,Xr as c,Ar as d,pr as e,Ir as f,Wr as g,br as h,xr as i,vr as j,mr as k,fr as l,X as m,H as n,E as o,I as p,W as q,D as r,hr as s,Or as t,P as u,O as v,k as w,R as x,L as y,$ as z};
1
+ import{mapValues as t,toLower as r,isObject as e,pick as o,mergeWith as n,isEmpty as i,omit as s}from"lodash-es";function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function h(t){var r=function(t,r){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r);if("object"!=a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==a(r)?r:r+""}function c(t,r,e){return(r=h(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}const l=Math.round;function u(t,r){const e=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],o=e.map(t=>parseFloat(t));for(let t=0;t<3;t+=1)o[t]=r(o[t]||0,e[t]||"",t);return e[3]?o[3]=e[3].includes("%")?o[3]/100:o[3]:o[3]=1,o}const g=(t,r,e)=>0===e?t:t/100;function d(t,r){const e=r||255;return t>e?e:t<0?0:t}class f{constructor(t){function r(r){return r[0]in t&&r[1]in t&&r[2]in t}if(c(this,"isValid",!0),c(this,"r",0),c(this,"g",0),c(this,"b",0),c(this,"a",1),c(this,"_h",void 0),c(this,"_s",void 0),c(this,"_l",void 0),c(this,"_v",void 0),c(this,"_max",void 0),c(this,"_min",void 0),c(this,"_brightness",void 0),t)if("string"==typeof t){const e=t.trim();function o(t){return e.startsWith(t)}/^#?[A-F\d]{3,8}$/i.test(e)?this.fromHexString(e):o("rgb")?this.fromRgbString(e):o("hsl")?this.fromHslString(e):(o("hsv")||o("hsb"))&&this.fromHsvString(e)}else if(t instanceof f)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=d(t.r),this.g=d(t.g),this.b=d(t.b),this.a="number"==typeof t.a?d(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else{if(!r("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t));this.fromHsv(t)}else;}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(t){const r=t/255;return r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t(this.r)+.7152*t(this.g)+.0722*t(this.b)}getHue(){if(void 0===this._h){const t=this.getMax()-this.getMin();this._h=0===t?0:l(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(void 0===this._s){const t=this.getMax()-this.getMin();this._s=0===t?0:t/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(t=10){const r=this.getHue(),e=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:r,s:e,l:o,a:this.a})}lighten(t=10){const r=this.getHue(),e=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:r,s:e,l:o,a:this.a})}mix(t,r=50){const e=this._c(t),o=r/100,n=t=>(e[t]-this[t])*o+this[t],i={r:l(n("r")),g:l(n("g")),b:l(n("b")),a:l(100*n("a"))/100};return this._c(i)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),e=this.a+r.a*(1-this.a),o=t=>l((this[t]*this.a+r[t]*r.a*(1-this.a))/e);return this._c({r:o("r"),g:o("g"),b:o("b"),a:e})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=2===r.length?r:"0"+r;const e=(this.g||0).toString(16);t+=2===e.length?e:"0"+e;const o=(this.b||0).toString(16);if(t+=2===o.length?o:"0"+o,"number"==typeof this.a&&this.a>=0&&this.a<1){const r=l(255*this.a).toString(16);t+=2===r.length?r:"0"+r}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=l(100*this.getSaturation()),e=l(100*this.getLightness());return 1!==this.a?`hsla(${t},${r}%,${e}%,${this.a})`:`hsl(${t},${r}%,${e}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,e){const o=this.clone();return o[t]=d(r,e),o}_c(t){return new this.constructor(t)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function e(t,e){return parseInt(r[t]+r[e||t],16)}r.length<6?(this.r=e(0),this.g=e(1),this.b=e(2),this.a=r[3]?e(3)/255:1):(this.r=e(0,1),this.g=e(2,3),this.b=e(4,5),this.a=r[6]?e(6,7)/255:1)}fromHsl({h:t,s:r,l:e,a:o}){if(this._h=t%360,this._s=r,this._l=e,this.a="number"==typeof o?o:1,r<=0){const t=l(255*e);this.r=t,this.g=t,this.b=t}let n=0,i=0,s=0;const a=t/60,h=(1-Math.abs(2*e-1))*r,c=h*(1-Math.abs(a%2-1));a>=0&&a<1?(n=h,i=c):a>=1&&a<2?(n=c,i=h):a>=2&&a<3?(i=h,s=c):a>=3&&a<4?(i=c,s=h):a>=4&&a<5?(n=c,s=h):a>=5&&a<6&&(n=h,s=c);const u=e-h/2;this.r=l(255*(n+u)),this.g=l(255*(i+u)),this.b=l(255*(s+u))}fromHsv({h:t,s:r,v:e,a:o}){this._h=t%360,this._s=r,this._v=e,this.a="number"==typeof o?o:1;const n=l(255*e);if(this.r=n,this.g=n,this.b=n,r<=0)return;const i=t/60,s=Math.floor(i),a=i-s,h=l(e*(1-r)*255),c=l(e*(1-r*a)*255),u=l(e*(1-r*(1-a))*255);switch(s){case 0:this.g=u,this.b=h;break;case 1:this.r=c,this.b=h;break;case 2:this.r=h,this.b=u;break;case 3:this.r=h,this.g=c;break;case 4:this.r=u,this.g=h;break;default:this.g=h,this.b=c}}fromHsvString(t){const r=u(t,g);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=u(t,g);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=u(t,(t,r)=>r.includes("%")?l(t/100*255):t);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var b=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function m(t,r,e){var o;return(o=Math.round(t.h)>=60&&Math.round(t.h)<=240?e?Math.round(t.h)-2*r:Math.round(t.h)+2*r:e?Math.round(t.h)+2*r:Math.round(t.h)-2*r)<0?o+=360:o>=360&&(o-=360),o}function p(t,r,e){return 0===t.h&&0===t.s?t.s:((o=e?t.s-.16*r:4===r?t.s+.16:t.s+.05*r)>1&&(o=1),e&&5===r&&o>.1&&(o=.1),o<.06&&(o=.06),Math.round(100*o)/100);var o}function x(t,r,e){var o;return o=e?t.v+.05*r:t.v-.15*r,o=Math.max(0,Math.min(1,o)),Math.round(100*o)/100}function S(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=[],o=new f(t),n=o.toHsv(),i=5;i>0;i-=1){var s=new f({h:m(n,i,!0),s:p(n,i,!0),v:x(n,i,!0)});e.push(s)}e.push(o);for(var a=1;a<=4;a+=1){var h=new f({h:m(n,a),s:p(n,a),v:x(n,a)});e.push(h)}return"dark"===r.theme?b.map(function(t){var o=t.index,n=t.amount;return new f(r.backgroundColor||"#141414").mix(e[o],n).toHexString()}):e.map(function(t){return t.toHexString()})}const y=t=>{const{controlHeight:r}=t;return{controlHeightSM:.75*r,controlHeightXS:.5*r,controlHeightLG:1.25*r}};function v(t){const{sizeUnit:r,sizeStep:e}=t;return{sizeXXL:r*(e+8),sizeXL:r*(e+4),sizeLG:r*(e+2),sizeMD:r*(e+1),sizeMS:r*e,size:r*e,sizeSM:r*(e-1),sizeXS:r*(e-2),sizeXXS:r*(e-3)}}const M={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},w={...M,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:'microsoft yahei,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontWeight:400,fontSize:12,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacity:1,wireframe:!1,motion:!0,layoutHeaderHeight:50,layoutSiderWidth:200,layoutIconSize:24,layoutNavHeight:40,gradientColors:["rgba(0, 64, 237,0.3)","rgba(0, 229, 237,0.3)"]};function H(t,r){(function(t){return"string"==typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");const e=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=360===r?t:Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*r),10)/100),Math.abs(t-r)<1e-6?1:t=360===r?(t<0?t%r+r:t%r)/parseFloat(String(r)):t%r/parseFloat(String(r))}function B(t){return Math.min(1,Math.max(0,t))}function k(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function z(t){return Number(t)<=1?100*Number(t)+"%":t}function A(t){return 1===t.length?"0"+t:String(t)}function R(t,r,e){return{r:255*H(t,255),g:255*H(r,255),b:255*H(e,255)}}function T(t,r,e){t=H(t,255),r=H(r,255),e=H(e,255);const o=Math.max(t,r,e),n=Math.min(t,r,e);let i=0,s=0;const a=(o+n)/2;if(o===n)s=0,i=0;else{const h=o-n;switch(s=a>.5?h/(2-o-n):h/(o+n),o){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4}i/=6}return{h:i,s:s,l:a}}function $(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*e*(r-t):e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}function F(t,r,e){let o,n,i;if(t=H(t,360),r=H(r,100),e=H(e,100),0===r)n=e,i=e,o=e;else{const s=e<.5?e*(1+r):e+r-e*r,a=2*e-s;o=$(a,s,t+1/3),n=$(a,s,t),i=$(a,s,t-1/3)}return{r:255*o,g:255*n,b:255*i}}function L(t,r,e){t=H(t,255),r=H(r,255),e=H(e,255);const o=Math.max(t,r,e),n=Math.min(t,r,e);let i=0;const s=o,a=o-n,h=0===o?0:a/o;if(o===n)i=0;else{switch(o){case t:i=(r-e)/a+(r<e?6:0);break;case r:i=(e-t)/a+2;break;case e:i=(t-r)/a+4}i/=6}return{h:i,s:h,v:s}}function _(t,r,e){t=6*H(t,360),r=H(r,100),e=H(e,100);const o=Math.floor(t),n=t-o,i=e*(1-r),s=e*(1-n*r),a=e*(1-(1-n)*r),h=o%6;return{r:255*[e,s,i,i,a,e][h],g:255*[a,e,e,s,i,i][h],b:255*[i,i,a,e,e,s][h]}}function C(t,r,e,o){const n=[A(Math.round(t).toString(16)),A(Math.round(r).toString(16)),A(Math.round(e).toString(16))];return o&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function X(t,r,e,o,n){const i=[A(Math.round(t).toString(16)),A(Math.round(r).toString(16)),A(Math.round(e).toString(16)),A(W(o))];return n&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function E(t,r,e,o){return[A(W(o)),A(Math.round(t).toString(16)),A(Math.round(r).toString(16)),A(Math.round(e).toString(16))].join("")}function I(t,r,e,o){const n=o/100;return{r:255*(1-t/100)*(1-n),g:255*(1-r/100)*(1-n),b:255*(1-e/100)*(1-n)}}function D(t,r,e){let o=1-t/255,n=1-r/255,i=1-e/255,s=Math.min(o,n,i);return 1===s?(o=0,n=0,i=0):(o=(o-s)/(1-s)*100,n=(n-s)/(1-s)*100,i=(i-s)/(1-s)*100),s*=100,{c:Math.round(o),m:Math.round(n),y:Math.round(i),k:Math.round(s)}}function W(t){return Math.round(255*parseFloat(t)).toString(16)}function P(t){return O(t)/255}function O(t){return parseInt(t,16)}function N(t){return{r:t>>16,g:(65280&t)>>8,b:255&t}}const G={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function j(t){let r={r:0,g:0,b:0},e=1,o=null,n=null,i=null,s=!1,a=!1;return"string"==typeof t&&(t=J(t)),"object"==typeof t&&(K(t.r)&&K(t.g)&&K(t.b)?(r=R(t.r,t.g,t.b),s=!0,a="%"===String(t.r).substr(-1)?"prgb":"rgb"):K(t.h)&&K(t.s)&&K(t.v)?(o=z(t.s),n=z(t.v),r=_(t.h,o,n),s=!0,a="hsv"):K(t.h)&&K(t.s)&&K(t.l)?(o=z(t.s),i=z(t.l),r=F(t.h,o,i),s=!0,a="hsl"):K(t.c)&&K(t.m)&&K(t.y)&&K(t.k)&&(r=I(t.c,t.m,t.y,t.k),s=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=k(e),{ok:s,format:t.format||a,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:e}}const q="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",Q="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",U="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",V={CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+U),cmyk:new RegExp("cmyk"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function J(t){if(0===(t=t.trim().toLowerCase()).length)return!1;let r=!1;if(G[t])t=G[t],r=!0;else if("transparent"===t)return{r:0,g:0,b:0,a:0,format:"name"};let e=V.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=V.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=V.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=V.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=V.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=V.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=V.cmyk.exec(t),e?{c:e[1],m:e[2],y:e[3],k:e[4]}:(e=V.hex8.exec(t),e?{r:O(e[1]),g:O(e[2]),b:O(e[3]),a:P(e[4]),format:r?"name":"hex8"}:(e=V.hex6.exec(t),e?{r:O(e[1]),g:O(e[2]),b:O(e[3]),format:r?"name":"hex"}:(e=V.hex4.exec(t),e?{r:O(e[1]+e[1]),g:O(e[2]+e[2]),b:O(e[3]+e[3]),a:P(e[4]+e[4]),format:r?"name":"hex8"}:(e=V.hex3.exec(t),!!e&&{r:O(e[1]+e[1]),g:O(e[2]+e[2]),b:O(e[3]+e[3]),format:r?"name":"hex"}))))))))))}function K(t){return"number"==typeof t?!Number.isNaN(t):V.CSS_UNIT.test(t)}class Y{constructor(t="",r={}){if(t instanceof Y)return t;"number"==typeof t&&(t=N(t)),this.originalInput=t;const e=j(t);this.originalInput=t,this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this.roundA=Math.round(100*this.a)/100,this.format=r.format??e.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=e.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3}getLuminance(){const t=this.toRgb();let r,e,o;const n=t.r/255,i=t.g/255,s=t.b/255;return r=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),e=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),o=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*e+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=k(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return 0===t}toHsv(){const t=L(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=L(this.r,this.g,this.b),r=Math.round(360*t.h),e=Math.round(100*t.s),o=Math.round(100*t.v);return 1===this.a?`hsv(${r}, ${e}%, ${o}%)`:`hsva(${r}, ${e}%, ${o}%, ${this.roundA})`}toHsl(){const t=T(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}}toHslString(){const t=T(this.r,this.g,this.b),r=Math.round(360*t.h),e=Math.round(100*t.s),o=Math.round(100*t.l);return 1===this.a?`hsl(${r}, ${e}%, ${o}%)`:`hsla(${r}, ${e}%, ${o}%, ${this.roundA})`}toHex(t=!1){return C(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return X(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return 1===this.a?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),r=Math.round(this.g),e=Math.round(this.b);return 1===this.a?`rgb(${t}, ${r}, ${e})`:`rgba(${t}, ${r}, ${e}, ${this.roundA})`}toPercentageRgb(){const t=t=>`${Math.round(100*H(t,255))}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=t=>Math.round(100*H(t,255));return 1===this.a?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...D(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:r,y:e,k:o}=D(this.r,this.g,this.b);return`cmyk(${t}, ${r}, ${e}, ${o})`}toName(){if(0===this.a)return"transparent";if(this.a<1)return!1;const t="#"+C(this.r,this.g,this.b,!1);for(const[r,e]of Object.entries(G))if(t===e)return r;return!1}toString(t){const r=Boolean(t);t=t??this.format;let e=!1;const o=this.a<1&&this.a>=0;return r||!o||!t.startsWith("hex")&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),"cmyk"===t&&(e=this.toCmykString()),e||this.toHexString()):"name"===t&&0===this.a?this.toName():this.toRgbString()}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Y(this.toString())}lighten(t=10){const r=this.toHsl();return r.l+=t/100,r.l=B(r.l),new Y(r)}brighten(t=10){const r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),new Y(r)}darken(t=10){const r=this.toHsl();return r.l-=t/100,r.l=B(r.l),new Y(r)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const r=this.toHsl();return r.s-=t/100,r.s=B(r.s),new Y(r)}saturate(t=10){const r=this.toHsl();return r.s+=t/100,r.s=B(r.s),new Y(r)}greyscale(){return this.desaturate(100)}spin(t){const r=this.toHsl(),e=(r.h+t)%360;return r.h=e<0?360+e:e,new Y(r)}mix(t,r=50){const e=this.toRgb(),o=new Y(t).toRgb(),n=r/100,i={r:(o.r-e.r)*n+e.r,g:(o.g-e.g)*n+e.g,b:(o.b-e.b)*n+e.b,a:(o.a-e.a)*n+e.a};return new Y(i)}analogous(t=6,r=30){const e=this.toHsl(),o=360/r,n=[this];for(e.h=(e.h-(o*t>>1)+720)%360;--t;)e.h=(e.h+o)%360,n.push(new Y(e));return n}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new Y(t)}monochromatic(t=6){const r=this.toHsv(),{h:e}=r,{s:o}=r;let{v:n}=r;const i=[],s=1/t;for(;t--;)i.push(new Y({h:e,s:o,v:n})),n=(n+s)%1;return i}splitcomplement(){const t=this.toHsl(),{h:r}=t;return[this,new Y({h:(r+72)%360,s:t.s,l:t.l}),new Y({h:(r+216)%360,s:t.s,l:t.l})]}onBackground(t){const r=this.toRgb(),e=new Y(t).toRgb(),o=r.a+e.a*(1-r.a);return new Y({r:(r.r*r.a+e.r*e.a*(1-r.a))/o,g:(r.g*r.a+e.g*e.a*(1-r.a))/o,b:(r.b*r.a+e.b*e.a*(1-r.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const r=this.toHsl(),{h:e}=r,o=[this],n=360/t;for(let i=1;i<t;i++)o.push(new Y({h:(e+i*n)%360,s:r.s,l:r.l}));return o}equals(t){const r=new Y(t);return"cmyk"===this.format||"cmyk"===r.format?this.toCmykString()===r.toCmykString():this.toRgbString()===r.toRgbString()}}function Z(t,r){const e=new Y(t),o=new Y(r);return(Math.max(e.getLuminance(),o.getLuminance())+.05)/(Math.min(e.getLuminance(),o.getLuminance())+.05)}function tt(t,r,e={level:"AA",size:"small"}){const o=Z(t,r);switch((e.level??"AA")+(e.size??"small")){case"AAsmall":case"AAAlarge":return o>=4.5;case"AAlarge":return o>=3;case"AAAsmall":return o>=7;default:return!1}}function rt(t,r,e={includeFallbackColors:!1,level:"AA",size:"small"}){let o=null,n=0;const{includeFallbackColors:i,level:s,size:a}=e;for(const e of r){const r=Z(t,e);r>n&&(n=r,o=new Y(e))}return tt(t,o,{level:s,size:a})||!i?o:(e.includeFallbackColors=!1,rt(t,["#fff","#000"],e))}function et(t,r){const e=new Y(t),o="#"+E(e.r,e.g,e.b,e.a);let n=o;const i=e.gradientType?"GradientType = 1, ":"";if(r){const t=new Y(r);n="#"+E(t.r,t.g,t.b,t.a)}return`progid:DXImageTransform.Microsoft.gradient(${i}startColorstr=${o},endColorstr=${n})`}function ot(t,r){const e={r:z(t.r),g:z(t.g),b:z(t.b)};return void 0!==t.a&&(e.a=Number(t.a)),new Y(e,r)}function nt(){return new Y({r:Math.random(),g:Math.random(),b:Math.random()})}function it(t={}){if(void 0!==t.count&&null!==t.count){const r=t.count,e=[];for(t.count=void 0;r>e.length;)t.count=null,t.seed&&(t.seed+=1),e.push(it(t));return t.count=r,e}const r=function(t,r){let e=at(function(t){const r=parseInt(t,10);if(!Number.isNaN(r)&&r<360&&r>0)return[r,r];if("string"==typeof t){const r=ct.find(r=>r.name===t);if(r){const t=ht(r);if(t.hueRange)return t.hueRange}const e=new Y(t);if(e.isValid){const t=e.toHsv().h;return[t,t]}}return[0,360]}(t),r);e<0&&(e=360+e);return e}(t.hue,t.seed),e=function(t,r){if("monochrome"===r.hue)return 0;if("random"===r.luminosity)return at([0,100],r.seed);const{saturationRange:e}=st(t);let o=e[0],n=e[1];switch(r.luminosity){case"bright":o=55;break;case"dark":o=n-10;break;case"light":n=55}return at([o,n],r.seed)}(r,t),o=function(t,r,e){let o=function(t,r){const{lowerBounds:e}=st(t);for(let t=0;t<e.length-1;t++){const o=e[t][0],n=e[t][1],i=e[t+1][0],s=e[t+1][1];if(r>=o&&r<=i){const t=(s-n)/(i-o);return t*r+(n-t*o)}}return 0}(t,r),n=100;switch(e.luminosity){case"dark":n=o+20;break;case"light":o=(n+o)/2;break;case"random":o=0,n=100}return at([o,n],e.seed)}(r,e,t),n={h:r,s:e,v:o};return void 0!==t.alpha&&(n.a=t.alpha),new Y(n)}function st(t){t>=334&&t<=360&&(t-=360);for(const r of ct){const e=ht(r);if(e.hueRange&&t>=e.hueRange[0]&&t<=e.hueRange[1])return e}throw Error("Color not found")}function at(t,r){if(void 0===r)return Math.floor(t[0]+Math.random()*(t[1]+1-t[0]));const e=t[1]||1,o=t[0]||0,n=(r=(9301*r+49297)%233280)/233280;return Math.floor(o+n*(e-o))}function ht(t){const r=t.lowerBounds[0][0],e=t.lowerBounds[t.lowerBounds.length-1][0],o=t.lowerBounds[t.lowerBounds.length-1][1],n=t.lowerBounds[0][1];return{name:t.name,hueRange:t.hueRange,lowerBounds:t.lowerBounds,saturationRange:[r,e],brightnessRange:[o,n]}}const ct=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function lt(t,r){const e=parseInt(t,16)+r,o=e>255?255:e;return o.toString(16).length>1?o.toString(16):`0${o.toString(16)}`}function ut(t,r){return t=t.indexOf("#")>=0?t.substring(1,t.length):t,r=Math.trunc(255*r/100),`#${lt(t.substring(0,2),r)}${lt(t.substring(2,4),r)}${lt(t.substring(4,6),r)}`}function gt(o,n){if("object"!=typeof o||Array.isArray(o))return;const i={};return t(o,(t,o)=>{const s=n?`--${n}-`+o:"--"+o,a="number"!=typeof t||["lineheight","opacity","weight"].some(t=>r(o).includes(t))?t:t+"px";if(e(t))return gt(a,o);i[s]=a}),i}const dt=(t,r)=>new Y(t).setAlpha(r).toRgbString(),ft=(t,r)=>new Y(t).darken(r).toHexString(),bt=(t,r)=>new Y(t).lighten(r).toHexString(),mt=(t,r)=>new Y(t).onBackground(r).toRgbString();function pt(t,{generateColorPalettes:r,generateNeutralColorPalettes:e}){const{colorSuccess:o,colorWarning:n,colorError:i,colorInfo:s,colorPrimary:a,colorBgBase:h,colorTextBase:c}=t,l=r(a),u=r(o),g=r(n),d=r(i),f=r(s),b=e(h,c),m=((t,r)=>r.map(r=>mt(r,t)))(b.colorBgBase,t.gradientColors),p=r(t.colorLink||t.colorInfo);return{...b,gradientColors:m,colorPrimaryBg:l[1],colorPrimaryBgHover:l[2],colorPrimaryBorder:l[3],colorPrimaryBorderHover:l[4],colorPrimaryHover:l[5],colorPrimary:l[6],colorPrimaryActive:l[7],colorPrimaryTextHover:l[8],colorPrimaryText:l[9],colorPrimaryTextActive:l[10],colorSuccessBg:u[1],colorSuccessBgHover:u[2],colorSuccessBorder:u[3],colorSuccessBorderHover:u[4],colorSuccessHover:u[4],colorSuccess:u[6],colorSuccessActive:u[7],colorSuccessTextHover:u[8],colorSuccessText:u[9],colorSuccessTextActive:u[10],colorErrorBg:d[1],colorErrorBgHover:d[2],colorErrorBorder:d[3],colorErrorBorderHover:d[4],colorErrorHover:d[5],colorError:d[6],colorErrorActive:d[7],colorErrorTextHover:d[8],colorErrorText:d[9],colorErrorTextActive:d[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:f[1],colorInfoBgHover:f[2],colorInfoBorder:f[3],colorInfoBorderHover:f[4],colorInfoHover:f[4],colorInfo:f[6],colorInfoActive:f[7],colorInfoTextHover:f[8],colorInfoText:f[9],colorInfoTextActive:f[10],colorLinkHover:p[4],colorLink:p[6],colorLinkActive:p[7],colorBgMask:new Y("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"}}const xt=t=>{let r=t,e=t,o=t,n=t,i=t,s=t;return t<6&&t>=5?r=t+1:t<16&&t>=6?r=t+2:t>=16&&(r=16),t<7&&t>=5?e=4:t<8&&t>=7?e=5:t<14&&t>=8?e=6:t<16&&t>=14?e=7:t>=16&&(e=8),t<6&&t>=2?o=1:t>=6&&(o=2),t>4&&t<8?s=4:t>=8&&(s=6),n=r>0?r+4:r,i=r>0?r+8:r,{borderRadius:t>16?16:t,borderRadiusXS:o,borderRadiusSM:e,borderRadiusLG:r,borderRadiusXL:n,borderRadiusXXL:i,borderRadiusOuter:s}};function St(t){const{motionUnit:r,motionBase:e,borderRadius:o,lineWidth:n,opacity:i,layoutHeaderHeight:s}=t;return{motionDurationFast:`${(e+r).toFixed(1)}s`,motionDurationMid:`${(e+2*r).toFixed(1)}s`,motionDurationSlow:`${(e+3*r).toFixed(1)}s`,lineWidthBold:n+1,...xt(o),opacityImage:i,opacity1:.8*i,opacity2:.6*i}}const yt=t=>{const r=S(t);return{1:r[0],2:r[1],3:r[2],4:r[3],5:r[4],6:r[5],7:r[6],8:r[4],9:r[5],10:r[6]}},vt=(t,r)=>{let e=t||"#fff",o=r||"#000";return e=new Y(e).lighten()?e:new Y(e).lighten(100).toRgbString(),o=new Y(o).isDark()?o:new Y(o).darken(100).toRgbString(),{colorBgBase:e,colorTextBase:o,colorText:dt(o,.88),colorTextSecondary:dt(o,.65),colorTextTertiary:dt(o,.45),colorTextQuaternary:dt(o,.25),colorFill:dt(o,.15),colorFillSecondary:dt(o,.06),colorFillTertiary:dt(o,.04),colorFillQuaternary:dt(o,.02),colorBgLayout:ft(e,4),colorBgContainer:ft(e,0),colorBgElevated:ft(e,0),colorBgSpotlight:dt(o,.85),colorBorder:ft(e,15),colorBorderSecondary:ft(e,6)}};const Mt=t=>{const r=function(t){const r=new Array(10).fill(null).map((r,e)=>{const o=t*2.71828**((e-1)/5),n=e>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(n/2)});return r[1]=t,r.map(t=>({size:t,lineHeight:(t+8)/t}))}(t),e=r.map(t=>t.size),o=r.map(t=>t.lineHeight);return{fontSizeSM:e[0],fontSize:e[1],fontSizeLG:e[2],fontSizeXL:e[3],fontSizeHeading1:e[6],fontSizeHeading2:e[5],fontSizeHeading3:e[4],fontSizeHeading4:e[3],fontSizeHeading5:e[2],lineHeight:o[1],lineHeightLG:o[2],lineHeightSM:o[0],lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}};function wt(t){const r=Object.keys(M).map(r=>{const e=S(t[r]);return new Array(10).fill(1).reduce((t,o,n)=>(t[`${r}-${n+1}`]=e[n],t[`${r}${n+1}`]=e[n],t),{})}).reduce((t,r)=>t={...t,...r},{});return{...t,...r,...pt(t,{generateColorPalettes:yt,generateNeutralColorPalettes:vt}),...Mt(t.fontSize),...v(t),...y(t),...St(t)}}const Ht=t=>{const r=S(t,{theme:"dark"});return{1:r[0],2:r[1],3:r[2],4:r[3],5:r[6],6:r[5],7:r[4],8:r[6],9:r[5],10:r[4]}},Bt=(t,r)=>{let e=t||"#000",o=r||"#fff";return e=new Y(e).isDark()?e:new Y(e).darken(100).toRgbString(),o=new Y(o).isLight()?o:new Y(o).lighten(100).toRgbString(),{colorBgBase:e,colorTextBase:o,colorText:dt(o,.85),colorTextSecondary:dt(o,.65),colorTextTertiary:dt(o,.45),colorTextQuaternary:dt(o,.25),colorFill:dt(o,.18),colorFillSecondary:dt(o,.12),colorFillTertiary:dt(o,.08),colorFillQuaternary:dt(o,.04),colorBgElevated:bt(e,12),colorBgContainer:bt(e,8),colorBgLayout:bt(e,0),colorBgSpotlight:bt(e,26),colorBorder:bt(e,26),colorBorderSecondary:bt(e,19)}},kt=(t,r)=>{const e=Object.keys(M).map(r=>{const e=S(t[r],{theme:"dark"});return new Array(10).fill(1).reduce((t,o,n)=>(t[`${r}-${n+1}`]=e[n],t[`${r}${n+1}`]=e[n],t),{})}).reduce((t,r)=>t={...t,...r},{});return{...r??wt(t),...e,...pt(t,{generateColorPalettes:Ht,generateNeutralColorPalettes:Bt})}};function zt(t){const{sizeUnit:r,sizeStep:e}=t,o=e-2;return{sizeXXL:r*(o+10),sizeXL:r*(o+6),sizeLG:r*(o+2),sizeMD:r*(o+2),sizeMS:r*(o+1),size:r*o,sizeSM:r*o,sizeXS:r*(o-1),sizeXXS:r*(o-1)}}const At=(t,r)=>{const e=r??wt(t),o=e.fontSizeSM,n=e.controlHeight-4;return{...e,...zt(r??t),...Mt(o),controlHeight:n,...y({...e,controlHeight:n})}},Rt=(t,r)=>{const e=t||"#fff",o=r||"#000";return{colorBgBase:e,colorTextBase:o,colorText:dt(o,.9),colorTextSecondary:dt(o,.8),colorTextTertiary:dt(o,.7),colorTextQuaternary:dt(o,.6),colorFill:dt(o,.3),colorFillSecondary:dt(o,.2),colorFillTertiary:dt(o,.1),colorFillQuaternary:dt(o,.06),colorBgLayout:ft(e,6),colorBgContainer:ft(e,0),colorBgElevated:ft(e,0),colorBgSpotlight:dt(o,1),colorBorder:ft(e,30),colorBorderSecondary:ft(e,12)}};function Tt(t,r){const e=r??wt(t),o=Object.keys(M).map(r=>{const e=S(t[r]);return new Array(10).fill(1).reduce((t,o,n)=>(t[`${r}-${n+1}`]=e[n],t[`${r}${n+1}`]=e[n],t),{})}).reduce((t,r)=>t={...t,...r},{}),{fontSize:n,colorBgBase:i,colorTextBase:s}=e;return{...e,...o,...Rt(i,s),fontSizeSM:n,fontSize:n+2,fontSizeLG:n+3,fontSizeXL:n+4}}function $t(t){return t>=0&&t<=255}function Ft(t,r){const{r:e,g:o,b:n,a:i}=new Y(t).toRgb();if(i<1)return t;const{r:s,g:a,b:h}=new Y(r).toRgb();for(let t=.01;t<=1;t+=.01){const r=Math.round((e-s*(1-t))/t),i=Math.round((o-a*(1-t))/t),c=Math.round((n-h*(1-t))/t);if($t(r)&&$t(i)&&$t(c))return new Y({r:r,g:i,b:c,a:Math.round(100*t)/100}).toRgbString()}return new Y({r:e,g:o,b:n,a:1}).toRgbString()}function Lt(t){const{override:r,...e}=t,o={...r};Object.keys(w).forEach(t=>{delete o[t]});const n={...e,...o},i=1200,s=1600;if(!1===n.motion){const t="0s";n.motionDurationFast=t,n.motionDurationMid=t,n.motionDurationSlow=t}return{...n,colorFillContent:n.colorFillSecondary,colorFillContentHover:n.colorFill,colorFillAlter:n.colorFillQuaternary,colorBgContainerDisabled:n.colorFillTertiary,colorBorderBg:n.colorBgContainer,colorSplit:Ft(n.colorBorderSecondary,n.colorBgContainer),colorTextPlaceholder:n.colorTextQuaternary,colorTextDisabled:n.colorTextQuaternary,colorTextHeading:n.colorText,colorTextLabel:n.colorTextSecondary,colorTextDescription:n.colorTextTertiary,colorTextLightSolid:n.colorWhite,colorHighlight:n.colorError,colorBgTextHover:n.colorFillSecondary,colorBgTextActive:n.colorFill,colorIcon:n.colorTextTertiary,colorIconHover:n.colorText,colorErrorOutline:Ft(n.colorErrorBg,n.colorBgContainer),colorWarningOutline:Ft(n.colorWarningBg,n.colorBgContainer),fontSizeIcon:n.fontSizeSM,lineWidthFocus:2*n.lineWidth,lineWidth:n.lineWidth,controlOutlineWidth:2*n.lineWidth,controlInteractiveSize:n.controlHeight/2,controlItemBgHover:n.colorFillTertiary,controlItemBgActive:n.colorPrimaryBg,controlItemBgActiveHover:n.colorPrimaryBgHover,controlItemBgActiveDisabled:n.colorFill,controlTmpOutline:n.colorFillQuaternary,controlOutline:Ft(n.colorPrimaryBg,n.colorBgContainer),lineType:n.lineType,borderRadius:n.borderRadius,borderRadiusXS:n.borderRadiusXS,borderRadiusSM:n.borderRadiusSM,borderRadiusLG:n.borderRadiusLG,fontWeightStrong:700,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:n.sizeXXS,paddingXS:n.sizeXS,paddingSM:n.sizeSM,padding:n.size,paddingMD:n.sizeMD,paddingLG:n.sizeLG,paddingXL:n.sizeXL,paddingContentHorizontalLG:n.sizeLG,paddingContentVerticalLG:n.sizeMS,paddingContentHorizontal:n.sizeMS,paddingContentVertical:n.sizeMS-2,paddingContentHorizontalSM:n.sizeSM,paddingContentVerticalSM:n.sizeXS,marginXXS:n.sizeXXS,marginXS:n.sizeXS,marginSM:n.sizeSM,margin:n.size,marginMD:n.sizeMD,marginLG:n.sizeLG,marginXL:n.sizeXL,marginXXL:n.sizeXXL,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:i,screenXLMin:i,screenXLMax:1599,screenXXL:s,screenXXLMin:s,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:"\n 0 1px 2px -2px rgba(0, 0, 0, 0.16),\n 0 3px 6px 0 rgba(0, 0, 0, 0.12),\n 0 5px 12px 4px rgba(0, 0, 0, 0.09)\n ",boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...o}}const _t=(t=w,r="default")=>{let e=o(t,Object.keys(w));e=n(w,e);const a=i(r)?["default"]:"string"==typeof r?[r]:r,h=wt(e),c=s(t,Object.keys(w));let l=h;return a.map(t=>{switch(t){case"dark":return void(l=kt(e,l));case"compact":return void(l=At(e,l));case"meeting":return void(l=Tt(e,l))}}),Lt({...l,override:c})},Ct=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Xt=_t();export{O as A,it as B,Z as C,D,C as E,T as F,L as G,R as H,E as I,X as J,w as K,J as L,et as M,Xt as N,Ct as P,Y as T,W as a,ct as b,I as c,At as d,P as e,kt as f,wt as g,Lt as h,ot as i,_t as j,dt as k,mt as l,ft as m,bt as n,gt as o,F as p,_ as q,j as r,tt as s,K as t,nt as u,ut as v,Tt as w,rt as x,G as y,N as z};
2
2
  //# sourceMappingURL=index.js.map