@coveo/atomic 3.32.3-pre.d8395b7e5a → 3.32.3-pre.db0f81d011
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.
- package/dist/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/atomic-generated-answer.js +2 -4
- package/dist/atomic/components/atomic-generated-answer.js.map +1 -1
- package/dist/atomic/components/atomic-insight-generated-answer.js +2 -3
- package/dist/atomic/components/atomic-insight-generated-answer.js.map +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-did-you-mean/atomic-commerce-did-you-mean.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-facet/atomic-commerce-facet.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-facets/atomic-commerce-facets.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-layout/atomic-commerce-layout.js +2 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-layout/atomic-commerce-layout.tw.css.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.js +0 -3
- package/dist/atomic/components/components/commerce/atomic-commerce-pager/atomic-commerce-pager.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +3 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-refine-toggle/atomic-commerce-refine-toggle.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.js +1 -4
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-sort-dropdown/atomic-commerce-sort-dropdown.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-timeframe-facet/atomic-commerce-timeframe-facet.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.js +2 -1
- package/dist/atomic/components/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-product-price/atomic-product-price.js +0 -1
- package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +0 -2
- package/dist/atomic/components/components/commerce/atomic-product-template/atomic-product-template.js +0 -2
- package/dist/atomic/components/components/common/facets/facet-value-checkbox/facet-value-checkbox.js +1 -0
- package/dist/atomic/components/components/common/facets/facet-value-link/facet-value-link.js +1 -0
- package/dist/atomic/components/generated-answer-common.js +0 -23
- package/dist/atomic/components/generated-answer-common.js.map +1 -1
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/{p-320ab8c0.js → p-1a4b7b6a.js} +2 -2
- package/dist/atomic/p-2857ab2b.js +2 -0
- package/dist/atomic/p-2857ab2b.js.map +1 -0
- package/dist/atomic/{p-8ace8433.entry.js → p-360fe5f0.entry.js} +2 -2
- package/dist/atomic/p-50dc4fa2.entry.js +2 -0
- package/dist/atomic/p-50dc4fa2.entry.js.map +1 -0
- package/dist/atomic/{p-e74a4a8c.entry.js → p-8b638782.entry.js} +2 -2
- package/dist/atomic/{p-4fb01481.entry.js → p-a3aafe56.entry.js} +2 -2
- package/dist/atomic/{p-0dc126bb.entry.js → p-e2135441.entry.js} +2 -2
- package/dist/atomic/p-e2135441.entry.js.map +1 -0
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-879b5a35.js → analytics-config-f1488691.js} +2 -2
- package/dist/cjs/{analytics-config-879b5a35.js.map → analytics-config-f1488691.js.map} +1 -1
- package/dist/cjs/atomic-generated-answer.cjs.entry.js +2 -4
- package/dist/cjs/atomic-generated-answer.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-generated-answer.cjs.entry.js +2 -4
- package/dist/cjs/atomic-insight-generated-answer.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic.cjs.js +1 -1
- package/dist/cjs/{generated-answer-common-1f24d687.js → generated-answer-common-1f7e3c88.js} +1 -24
- package/dist/cjs/generated-answer-common-1f7e3c88.js.map +1 -0
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-3175e6f5.js → analytics-config-438a352a.js} +2 -2
- package/dist/esm/{analytics-config-3175e6f5.js.map → analytics-config-438a352a.js.map} +1 -1
- package/dist/esm/atomic-generated-answer.entry.js +2 -4
- package/dist/esm/atomic-generated-answer.entry.js.map +1 -1
- package/dist/esm/atomic-insight-generated-answer.entry.js +2 -4
- package/dist/esm/atomic-insight-generated-answer.entry.js.map +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-search-interface.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/{generated-answer-common-83e389e1.js → generated-answer-common-ee9bfc67.js} +1 -24
- package/dist/esm/generated-answer-common-ee9bfc67.js.map +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-did-you-mean/atomic-commerce-did-you-mean.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-facet/atomic-commerce-facet.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-facets/atomic-commerce-facets.d.ts +0 -1
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +1 -2
- package/dist/types/components/commerce/atomic-commerce-layout/atomic-commerce-layout.d.ts +2 -1
- package/dist/types/components/commerce/atomic-commerce-no-products/atomic-commerce-no-products.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-numeric-facet/atomic-commerce-numeric-facet.d.ts +0 -3
- package/dist/types/components/commerce/atomic-commerce-pager/atomic-commerce-pager.d.ts +0 -1
- package/dist/types/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-query-error/atomic-commerce-query-error.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-query-summary/atomic-commerce-query-summary.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +3 -1
- package/dist/types/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.d.ts +0 -1
- package/dist/types/components/commerce/atomic-commerce-refine-toggle/atomic-commerce-refine-toggle.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.d.ts +1 -4
- package/dist/types/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.d.ts +1 -2
- package/dist/types/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-sort-dropdown/atomic-commerce-sort-dropdown.d.ts +0 -2
- package/dist/types/components/commerce/atomic-commerce-timeframe-facet/atomic-commerce-timeframe-facet.d.ts +0 -2
- package/dist/types/components/commerce/atomic-product-field-condition/atomic-product-field-condition.d.ts +0 -2
- package/dist/types/components/commerce/atomic-product-link/atomic-product-link.d.ts +2 -1
- package/dist/types/components/commerce/atomic-product-multi-value-text/atomic-product-multi-value-text.d.ts +0 -2
- package/dist/types/components/commerce/atomic-product-numeric-field-value/atomic-product-numeric-field-value.d.ts +0 -1
- package/dist/types/components/commerce/atomic-product-price/atomic-product-price.d.ts +0 -1
- package/dist/types/components/commerce/atomic-product-rating/atomic-product-rating.d.ts +0 -2
- package/dist/types/components/commerce/atomic-product-template/atomic-product-template.d.ts +0 -2
- package/dist/types/components/common/generated-answer/generated-answer-common.d.ts +0 -1
- package/dist/types/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.d.ts +3 -3
- package/dist/types/components/search/atomic-generated-answer/atomic-generated-answer.d.ts +3 -3
- package/dist/types/components.d.ts +8 -8
- package/docs/atomic-docs.json +6 -6
- package/package.json +3 -3
- package/dist/atomic/p-0dc126bb.entry.js.map +0 -1
- package/dist/atomic/p-c6e1a7ab.entry.js +0 -2
- package/dist/atomic/p-c6e1a7ab.entry.js.map +0 -1
- package/dist/atomic/p-cf3b7218.js +0 -2
- package/dist/atomic/p-cf3b7218.js.map +0 -1
- package/dist/cjs/generated-answer-common-1f24d687.js.map +0 -1
- package/dist/esm/generated-answer-common-83e389e1.js.map +0 -1
- /package/dist/atomic/{p-320ab8c0.js.map → p-1a4b7b6a.js.map} +0 -0
- /package/dist/atomic/{p-8ace8433.entry.js.map → p-360fe5f0.entry.js.map} +0 -0
- /package/dist/atomic/{p-e74a4a8c.entry.js.map → p-8b638782.entry.js.map} +0 -0
- /package/dist/atomic/{p-4fb01481.entry.js.map → p-a3aafe56.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as t}from"./p-35e58270.js";import{VERSION as e}from"@coveo/headless";import{h as n}from"./p-dc3df5ce.js";import{D as i}from"./p-f284897c.js";const s=t=>typeof t==="string";const r=()=>{let t;let e;const n=new Promise(((n,i)=>{t=n;e=i}));n.resolve=t;n.reject=e;return n};const o=t=>{if(t==null)return"";return""+t};const f=(t,e,n)=>{t.forEach((t=>{if(e[t])n[t]=e[t]}))};const u=/###/g;const c=t=>t&&t.indexOf("###")>-1?t.replace(u,"."):t;const a=t=>!t||s(t);const h=(t,e,n)=>{const i=!s(e)?e:e.split(".");let r=0;while(r<i.length-1){if(a(t))return{};const e=c(i[r]);if(!t[e]&&n)t[e]=new n;if(Object.prototype.hasOwnProperty.call(t,e)){t=t[e]}else{t={}}++r}if(a(t))return{};return{obj:t,k:c(i[r])}};const l=(t,e,n)=>{const{obj:i,k:s}=h(t,e,Object);if(i!==undefined||e.length===1){i[s]=n;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let f=h(t,o,Object);while(f.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);f=h(t,o,Object);if(f?.obj&&typeof f.obj[`${f.k}.${r}`]!=="undefined"){f.obj=undefined}}f.obj[`${f.k}.${r}`]=n};const d=(t,e,n,i)=>{const{obj:s,k:r}=h(t,e,Object);s[r]=s[r]||[];s[r].push(n)};const p=(t,e)=>{const{obj:n,k:i}=h(t,e);if(!n)return undefined;if(!Object.prototype.hasOwnProperty.call(n,i))return undefined;return n[i]};const m=(t,e,n)=>{const i=p(t,n);if(i!==undefined){return i}return p(e,n)};const b=(t,e,n)=>{for(const i in e){if(i!=="__proto__"&&i!=="constructor"){if(i in t){if(s(t[i])||t[i]instanceof String||s(e[i])||e[i]instanceof String){if(n)t[i]=e[i]}else{b(t[i],e[i],n)}}else{t[i]=e[i]}}}return t};const g=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var j={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const y=t=>{if(s(t)){return t.replace(/[&<>"'\/]/g,(t=>j[t]))}return t};class v{constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const n=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,n);this.regExpQueue.push(t);return n}}const w=[" ",",","?","!",";"];const $=new v(20);const O=(t,e,n)=>{e=e||"";n=n||"";const i=w.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(i.length===0)return true;const s=$.getRegExp(`(${i.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!s.test(t);if(!r){const e=t.indexOf(n);if(e>0&&!s.test(t.substring(0,e))){r=true}}return r};const S=(t,e,n=".")=>{if(!t)return undefined;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return undefined;return t[e]}const i=e.split(n);let s=t;for(let t=0;t<i.length;){if(!s||typeof s!=="object"){return undefined}let e;let r="";for(let o=t;o<i.length;++o){if(o!==t){r+=n}r+=i[o];e=s[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<i.length-1){continue}t+=o-t+1;break}}s=e}return s};const k=t=>t?.replace("_","-");const x={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class L{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:";this.logger=t||x;this.options=e;this.debug=e.debug}log(...t){return this.forward(t,"log","",true)}warn(...t){return this.forward(t,"warn","",true)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(t,e,n,i){if(i&&!this.debug)return null;if(s(t[0]))t[0]=`${n}${this.prefix} ${t[0]}`;return this.logger[e](t)}create(t){return new L(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new L(this.logger,t)}}var N=new L;class R{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t,...e){if(this.observers[t]){const n=Array.from(this.observers[t].entries());n.forEach((([t,n])=>{for(let i=0;i<n;i++){t(...e)}}))}if(this.observers["*"]){const n=Array.from(this.observers["*"].entries());n.forEach((([n,i])=>{for(let s=0;s<i;s++){n.apply(n,[t,...e])}}))}}}class P extends R{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(t,e,n,i={}){const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const o=i.ignoreJSONStructure!==undefined?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;if(t.indexOf(".")>-1){f=t.split(".")}else{f=[t,e];if(n){if(Array.isArray(n)){f.push(...n)}else if(s(n)&&r){f.push(...n.split(r))}else{f.push(n)}}}const u=p(this.data,f);if(!u&&!e&&!n&&t.indexOf(".")>-1){t=f[0];e=f[1];n=f.slice(2).join(".")}if(u||!o||!s(n))return u;return S(this.data?.[t]?.[e],n,r)}addResource(t,e,n,i,s={silent:false}){const r=s.keySeparator!==undefined?s.keySeparator:this.options.keySeparator;let o=[t,e];if(n)o=o.concat(r?n.split(r):n);if(t.indexOf(".")>-1){o=t.split(".");i=e;e=o[1]}this.addNamespaces(e);l(this.data,o,i);if(!s.silent)this.emit("added",t,e,n,i)}addResources(t,e,n,i={silent:false}){for(const i in n){if(s(n[i])||Array.isArray(n[i]))this.addResource(t,e,i,n[i],{silent:true})}if(!i.silent)this.emit("added",t,e,n)}addResourceBundle(t,e,n,i,s,r={silent:false,skipCopy:false}){let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");i=n;n=e;e=o[1]}this.addNamespaces(e);let f=p(this.data,o)||{};if(!r.skipCopy)n=JSON.parse(JSON.stringify(n));if(i){b(f,n,s)}else{f={...f,...n}}l(this.data,o,f);if(!r.silent)this.emit("added",t,e,n)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const n=e&&Object.keys(e)||[];return!!n.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,s){t.forEach((t=>{e=this.processors[t]?.process(e,n,i,s)??e}));return e}};const T={};const I=t=>!s(t)&&typeof t!=="boolean"&&typeof t!=="number";class z extends R{constructor(t,e={}){super();f(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=N.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t,e={interpolation:{}}){const n={...e};if(t==null)return false;const i=this.resolve(t,n);return i?.res!==undefined}extractFromKey(t,e){let n=e.nsSeparator!==undefined?e.nsSeparator:this.options.nsSeparator;if(n===undefined)n=":";const i=e.keySeparator!==undefined?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1;const f=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!O(t,n,i);if(o&&!f){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0){return{key:t,namespaces:s(r)?[r]:r}}const o=t.split(n);if(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)r=o.shift();t=o.join(i)}return{key:t,namespaces:s(r)?[r]:r}}translate(t,e,n){let i=typeof e==="object"?{...e}:e;if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof options==="object")i={...i};if(!i)i={};if(t==null)return"";if(!Array.isArray(t))t=[String(t)];const r=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const o=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:f,namespaces:u}=this.extractFromKey(t[t.length-1],i);const c=u[u.length-1];let a=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(a===undefined)a=":";const h=i.lng||this.language;const l=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode"){if(l){if(r){return{res:`${c}${a}${f}`,usedKey:f,exactUsedKey:f,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(i)}}return`${c}${a}${f}`}if(r){return{res:f,usedKey:f,exactUsedKey:f,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(i)}}return f}const d=this.resolve(t,i);let p=d?.res;const m=d?.usedKey||f;const b=d?.exactUsedKey||f;const g=["[object Number]","[object Function]","[object RegExp]"];const j=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const y=!this.i18nFormat||this.i18nFormat.handleAsObject;const v=i.count!==undefined&&!s(i.count);const w=z.hasDefaultValue(i);const $=v?this.pluralResolver.getSuffix(h,i.count,i):"";const O=i.ordinal&&v?this.pluralResolver.getSuffix(h,i.count,{ordinal:false}):"";const S=v&&!i.ordinal&&i.count===0;const k=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${$}`]||i[`defaultValue${O}`]||i.defaultValue;let x=p;if(y&&!p&&w){x=k}const L=I(x);const N=Object.prototype.toString.apply(x);if(y&&x&&L&&g.indexOf(N)<0&&!(s(j)&&Array.isArray(x))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,x,{...i,ns:u}):`key '${f} (${this.language})' returned an object instead of string.`;if(r){d.res=t;d.usedParams=this.getUsedParamsDetails(i);return d}return t}if(o){const t=Array.isArray(x);const e=t?[]:{};const n=t?b:m;for(const t in x){if(Object.prototype.hasOwnProperty.call(x,t)){const s=`${n}${o}${t}`;if(w&&!p){e[t]=this.translate(s,{...i,defaultValue:I(k)?k[t]:undefined,...{joinArrays:false,ns:u}})}else{e[t]=this.translate(s,{...i,...{joinArrays:false,ns:u}})}if(e[t]===s)e[t]=x[t]}}p=e}}else if(y&&s(j)&&Array.isArray(p)){p=p.join(j);if(p)p=this.extendTranslation(p,t,i,n)}else{let e=false;let s=false;if(!this.isValidLookup(p)&&w){e=true;p=k}if(!this.isValidLookup(p)){s=true;p=f}const r=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const u=r&&s?undefined:p;const l=w&&k!==p&&this.options.updateMissing;if(s||e||l){this.logger.log(l?"updateKey":"missingKey",h,c,f,l?k:p);if(o){const t=this.resolve(f,{...i,keySeparator:false});if(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 e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let n=0;n<e.length;n++){t.push(e[n])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const n=(t,e,n)=>{const s=w&&n!==p?n:u;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,c,e,s,l,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,c,e,s,l,i)}this.emit("missingKey",t,c,e,p)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&v){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{n([t],f+e,i[`defaultValue${e}`]||k)}))}))}else{n(t,f,k)}}}p=this.extendTranslation(p,t,i,d,n);if(s&&p===f&&this.options.appendNamespaceToMissingKey){p=`${c}${a}${f}`}if((s||e)&&this.options.parseMissingKeyHandler){p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${a}${f}`:f,e?p:undefined,i)}}if(r){d.res=p;d.usedParams=this.getUsedParamsDetails(i);return d}return p}extendTranslation(t,e,n,i,r){if(this.i18nFormat?.parse){t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i})}else if(!n.skipInterpolation){if(n.interpolation)this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});const o=s(t)&&(n?.interpolation?.skipOnVariables!==undefined?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(o){const e=t.match(this.interpolator.nestingRegexp);f=e&&e.length}let u=n.replace&&!s(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables)u={...this.options.interpolation.defaultVariables,...u};t=this.interpolator.interpolate(t,u,n.lng||this.language||i.usedLng,n);if(o){const e=t.match(this.interpolator.nestingRegexp);const i=e&&e.length;if(f<i)n.nest=false}if(!n.lng&&i&&i.res)n.lng=this.language||i.usedLng;if(n.nest!==false)t=this.interpolator.nest(t,((...t)=>{if(r?.[0]===t[0]&&!n.context){this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`);return null}return this.translate(...t,e)}),n);if(n.interpolation)this.interpolator.reset()}const o=n.postProcess||this.options.postProcess;const f=s(o)?[o]:o;if(t!=null&&f?.length&&n.applyPostProcessor!==false){t=C.handle(f,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)}return t}resolve(t,e={}){let n;let i;let r;let o;let f;if(s(t))t=[t];t.forEach((t=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(t,e);const c=u.key;i=c;let a=u.namespaces;if(this.options.fallbackNS)a=a.concat(this.options.fallbackNS);const h=e.count!==undefined&&!s(e.count);const l=h&&!e.ordinal&&e.count===0;const d=e.context!==undefined&&(s(e.context)||typeof e.context==="number")&&e.context!=="";const p=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);a.forEach((t=>{if(this.isValidLookup(n))return;f=t;if(!T[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)){T[`${p[0]}-${t}`]=true;this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${f}" 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!!!")}p.forEach((i=>{if(this.isValidLookup(n))return;o=i;const s=[c];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(s,c,i,t,e)}else{let t;if(h)t=this.pluralResolver.getSuffix(i,e.count,e);const n=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h){s.push(c+t);if(e.ordinal&&t.indexOf(r)===0){s.push(c+t.replace(r,this.options.pluralSeparator))}if(l){s.push(c+n)}}if(d){const i=`${c}${this.options.contextSeparator}${e.context}`;s.push(i);if(h){s.push(i+t);if(e.ordinal&&t.indexOf(r)===0){s.push(i+t.replace(r,this.options.pluralSeparator))}if(l){s.push(i+n)}}}}let f;while(f=s.pop()){if(!this.isValidLookup(n)){r=f;n=this.getResource(i,t,f,e)}}}))}))}));return{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:f}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,n,i={}){if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,n,i);return this.resourceStore.getResource(t,e,n,i)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const n=t.replace&&!s(t.replace);let i=n?t.replace:t;if(n&&typeof t.count!=="undefined"){i.count=t.count}if(this.options.interpolation.defaultVariables){i={...this.options.interpolation.defaultVariables,...i}}if(!n){i={...i};for(const t of e){delete i[t]}}return i}static hasDefaultValue(t){const e="defaultValue";for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&undefined!==t[n]){return true}}return false}}class A{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=N.create("languageUtils")}getScriptPartFromCode(t){t=k(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=k(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(s(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}if(e&&this.options.lowerCaseLng){e=e.toLowerCase()}if(e)return e;if(this.options.lowerCaseLng){return t.toLowerCase()}return t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const n=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(n))e=n}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const n=this.getScriptPartFromCode(t);if(this.isSupportedCode(n))return e=n;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(t,e){if(!t)return[];if(typeof t==="function")t=t(e);if(s(t))t=[t];if(Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];if(!n)n=t[this.getScriptPartFromCode(e)];if(!n)n=t[this.formatLanguageCode(e)];if(!n)n=t[this.getLanguagePartFromCode(e)];if(!n)n=t.default;return n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes((e===false?[]:e)||this.options.fallbackLng||[],t);const i=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){i.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(s(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(t))}else if(s(t)){r(this.formatLanguageCode(t))}n.forEach((t=>{if(i.indexOf(t)<0)r(this.formatLanguageCode(t))}));return i}}const E={zero:0,one:1,two:2,few:3,many:4,other:5};const M={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class U{constructor(t,e={}){this.languageUtils=t;this.options=e;this.logger=N.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const n=k(t==="dev"?"en":t);const i=e.ordinal?"ordinal":"cardinal";const s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache){return this.pluralRulesCache[s]}let r;try{r=new Intl.PluralRules(n,{type:i})}catch(n){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return M}if(!t.match(/-|_/))return M;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}this.pluralRulesCache[s]=r;return r}needsPlural(t,e={}){let n=this.getRule(t,e);if(!n)n=this.getRule("dev",e);return n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,n={}){return this.getSuffixes(t,n).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let n=this.getRule(t,e);if(!n)n=this.getRule("dev",e);if(!n)return[];return n.resolvedOptions().pluralCategories.sort(((t,e)=>E[t]-E[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e,n={}){const i=this.getRule(t,n);if(i){return`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,n)}}const B=(t,e,n,i=".",r=true)=>{let o=m(t,e,n);if(!o&&r&&s(n)){o=S(t,n,i);if(o===undefined)o=S(e,n,i)}return o};const V=t=>t.replace(/\$/g,"$$$$");class H{constructor(t={}){this.logger=N.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(t={}){if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:f,formatSeparator:u,unescapeSuffix:c,unescapePrefix:a,nestingPrefix:h,nestingPrefixEscaped:l,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:j}=t.interpolation;this.escape=e!==undefined?e:y;this.escapeValue=n!==undefined?n:true;this.useRawValueToEscape=i!==undefined?i:false;this.prefix=s?g(s):r||"{{";this.suffix=o?g(o):f||"}}";this.formatSeparator=u||",";this.unescapePrefix=c?"":a||"-";this.unescapeSuffix=this.unescapePrefix?"":c||"";this.nestingPrefix=h?g(h):l||g("$t(");this.nestingSuffix=d?g(d):p||g(")");this.nestingOptionsSeparator=m||",";this.maxReplaces=b||1e3;this.alwaysFormat=j!==undefined?j:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return 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,n,i){let r;let f;let u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const a=t=>{if(t.indexOf(this.formatSeparator)<0){const s=B(e,c,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,undefined,n,{...i,...e,interpolationkey:t}):s}const s=t.split(this.formatSeparator);const r=s.shift().trim();const o=s.join(this.formatSeparator).trim();return this.format(B(e,c,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...i,...e,interpolationkey:r})};this.resetRegExp();const h=i?.missingInterpolationHandler||this.options.missingInterpolationHandler;const l=i?.interpolation?.skipOnVariables!==undefined?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?V(this.escape(t)):V(t)}];d.forEach((e=>{u=0;while(r=e.regex.exec(t)){const n=r[1].trim();f=a(n);if(f===undefined){if(typeof h==="function"){const e=h(t,r,i);f=s(e)?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n)){f=""}else if(l){f=r[0];continue}else{this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`);f=""}}else if(!s(f)&&!this.useRawValueToEscape){f=o(f)}const c=e.safeValue(f);t=t.replace(r[0],c);if(l){e.regex.lastIndex+=f.length;e.regex.lastIndex-=r[0].length}else{e.regex.lastIndex=0}u++;if(u>=this.maxReplaces){break}}}));return t}nest(t,e,n={}){let i;let r;let f;const u=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const i=t.split(new RegExp(`${n}[ ]*{`));let s=`{${i[1]}`;t=i[0];s=this.interpolate(s,f);const r=s.match(/'/g);const o=s.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){s=s.replace(/'/g,'"')}try{f=JSON.parse(s);if(e)f={...e,...f}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${n}${s}`}if(f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1)delete f.defaultValue;return t};while(i=this.nestingRegexp.exec(t)){let c=[];f={...n};f=f.replace&&!s(f.replace)?f.replace:f;f.applyPostProcessor=false;delete f.defaultValue;const a=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(a!==-1){c=i[1].slice(a).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean);i[1]=i[1].slice(0,a)}r=e(u.call(this,i[1].trim(),f),f);if(r&&i[0]===t&&!s(r))return r;if(!s(r))r=o(r);if(!r){this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`);r=""}if(c.length){r=c.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:i[1].trim()})),r.trim())}t=t.replace(i[0],r);this.regexp.lastIndex=0}return t}}const q=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);if(e==="currency"&&s.indexOf(":")<0){if(!n.currency)n.currency=s.trim()}else if(e==="relativetime"&&s.indexOf(":")<0){if(!n.range)n.range=s.trim()}else{const t=s.split(";");t.forEach((t=>{if(t){const[e,...i]=t.split(":");const s=i.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!n[r])n[r]=s;if(s==="false")n[r]=false;if(s==="true")n[r]=true;if(!isNaN(s))n[r]=parseInt(s,10)}}))}}return{formatName:e,formatOptions:n}};const D=t=>{const e={};return(n,i,s)=>{let r=s;if(s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]){r={...r,[s.interpolationkey]:undefined}}const o=i+JSON.stringify(r);let f=e[o];if(!f){f=t(k(i),s);e[o]=f}return f(n)}};const K=t=>(e,n,i)=>t(k(n),i)(e);class F{constructor(t={}){this.logger=N.create("formatter");this.options=t;this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const n=e.cacheInBuiltFormats?D:K;this.formats={number:n(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:n(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:n(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:n(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:n(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=D(e)}format(t,e,n,i={}){const s=e.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find((t=>t.indexOf(")")>-1))){const t=s.findIndex((t=>t.indexOf(")")>-1));s[0]=[s[0],...s.splice(1,t)].join(this.formatSeparator)}const r=s.reduce(((t,e)=>{const{formatName:s,formatOptions:r}=q(e);if(this.formats[s]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};const f=o.locale||o.lng||i.locale||i.lng||n;e=this.formats[s](t,f,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${s}`)}return t}),t);return r}}const _=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class J extends R{constructor(t,e,n,i={}){super();this.backend=t;this.store=e;this.services=n;this.languageUtils=n.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?.init?.(n,i.backend,i)}queueLoad(t,e,n,i){const s={};const r={};const o={};const f={};t.forEach((t=>{let i=true;e.forEach((e=>{const o=`${t}|${e}`;if(!n.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;i=false;if(r[o]===undefined)r[o]=true;if(s[o]===undefined)s[o]=true;if(f[e]===undefined)f[e]=true}}));if(!i)o[t]=true}));if(Object.keys(s).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i})}return{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(f)}}loaded(t,e,n){const i=t.split("|");const s=i[0];const r=i[1];if(e)this.emit("failedLoading",s,r,e);if(!e&&n){this.store.addResourceBundle(s,r,n,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&n)this.state[t]=0;const o={};this.queue.forEach((n=>{d(n.loaded,[s],r);_(n,t);if(e)n.errors.push(e);if(n.pendingCount===0&&!n.done){Object.keys(n.loaded).forEach((t=>{if(!o[t])o[t]={};const e=n.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));n.done=true;if(n.errors.length){n.callback(n.errors)}else{n.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,n,i=0,s=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:s,callback:r});return}this.readingCalls++;const o=(o,f)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&f&&i<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,n,i+1,s*2,r)}),s);return}r(o,f)};const f=this.backend[n].bind(this.backend);if(f.length===2){try{const n=f(t,e);if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}return}return f(t,e,o)}prepareLoading(t,e,n={},i){if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(s(t))t=this.languageUtils.toResolveHierarchy(t);if(s(e))e=[e];const r=this.queueLoad(t,e,n,i);if(!r.toLoad.length){if(!r.pending.length)i();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:true},n)}loadOne(t,e=""){const n=t.split("|");const i=n[0];const s=n[1];this.read(i,s,"read",undefined,undefined,((n,r)=>{if(n)this.logger.warn(`${e}loading namespace ${s} for language ${i} failed`,n);if(!n&&r)this.logger.log(`${e}loaded namespace ${s} for language ${i}`,r);this.loaded(t,n,r)}))}saveMissing(t,e,n,i,s,r={},o=(()=>{})){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${n}" 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!!!");return}if(n===undefined||n===null||n==="")return;if(this.backend?.create){const f={...r,isUpdate:s};const u=this.backend.create.bind(this.backend);if(u.length<6){try{let s;if(u.length===5){s=u(t,e,n,i,f)}else{s=u(t,e,n,i)}if(s&&typeof s.then==="function"){s.then((t=>o(null,t))).catch(o)}else{o(null,s)}}catch(t){o(t)}}else{u(t,e,n,i,o,f)}}if(!t||!t[0])return;this.store.addResource(t[0],e,n,i)}}const X=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]==="object")e=t[1];if(s(t[1]))e.defaultValue=t[1];if(s(t[2]))e.tDescription=t[2];if(typeof t[2]==="object"||typeof t[3]==="object"){const n=t[3]||t[2];Object.keys(n).forEach((t=>{e[t]=n[t]}))}return e},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true},cacheInBuiltFormats:true});const Y=t=>{if(s(t.ns))t.ns=[t.ns];if(s(t.fallbackLng))t.fallbackLng=[t.fallbackLng];if(s(t.fallbackNS))t.fallbackNS=[t.fallbackNS];if(t.supportedLngs?.indexOf?.("cimode")<0){t.supportedLngs=t.supportedLngs.concat(["cimode"])}if(typeof t.initImmediate==="boolean")t.initAsync=t.initImmediate;return t};const W=()=>{};const G=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class Z extends R{constructor(t={},e){super();this.options=Y(t);this.services={};this.logger=N;this.modules={external:[]};G(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=true;if(typeof t==="function"){e=t;t={}}if(t.defaultNS==null&&t.ns){if(s(t.ns)){t.defaultNS=t.ns}else if(t.ns.indexOf("translation")<0){t.defaultNS=t.ns[0]}}const n=X();this.options={...n,...this.options,...Y(t)};this.options.interpolation={...n.interpolation,...this.options.interpolation};if(t.keySeparator!==undefined){this.options.userDefinedKeySeparator=t.keySeparator}if(t.nsSeparator!==undefined){this.options.userDefinedNsSeparator=t.nsSeparator}const i=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){N.init(i(this.modules.logger),this.options)}else{N.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=F}const e=new A(this.options);this.store=new P(this.options.resources,this.options);const s=this.services;s.logger=N;s.resourceStore=this.store;s.languageUtils=e;s.pluralResolver=new U(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});const r=this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format;if(r){this.logger.warn(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`)}if(t&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)){s.formatter=i(t);if(s.formatter.init)s.formatter.init(s,this.options);this.options.interpolation.format=s.formatter.format.bind(s.formatter)}s.interpolator=new H(this.options);s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};s.backendConnector=new J(i(this.modules.backend),s.resourceStore,s,this.options);s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)}));if(this.modules.languageDetector){s.languageDetector=i(this.modules.languageDetector);if(s.languageDetector.init)s.languageDetector.init(s,this.options.detection,this.options)}if(this.modules.i18nFormat){s.i18nFormat=i(this.modules.i18nFormat);if(s.i18nFormat.init)s.i18nFormat.init(this)}this.translator=new z(this.services,this.options);this.translator.on("*",((t,...e)=>{this.emit(t,...e)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!e)e=W;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const o=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];o.forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));const f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach((t=>{this[t]=(...e)=>{this.store[t](...e);return this}}));const u=r();const c=()=>{const t=(t,n)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);u.resolve(n);e(t,n)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){c()}else{setTimeout(c,0)}return u}loadResources(t,e=W){let n=e;const i=s(t)?t:this.language;if(typeof t==="function")n=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const n=this.services.languageUtils.toResolveHierarchy(e);n.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!i){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(i)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);n(t)}))}else{n(null)}}reloadResources(t,e,n){const i=r();if(typeof t==="function"){n=t;t=undefined}if(typeof e==="function"){n=e;e=undefined}if(!t)t=this.languages;if(!e)e=this.options.ns;if(!n)n=W;this.services.backendConnector.reload(t,e,(t=>{i.resolve();n(t)}));return 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()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){C.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}if(!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;this.languages.unshift(t)}}changeLanguage(t,e){this.isLanguageChangingTo=t;const n=r();this.emit("languageChanging",t);const i=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const o=(s,r)=>{if(r){if(this.isLanguageChangingTo===t){i(r);this.translator.changeLanguage(r);this.isLanguageChangingTo=undefined;this.emit("languageChanged",r);this.logger.log("languageChanged",r)}}else{this.isLanguageChangingTo=undefined}n.resolve(((...t)=>this.t(...t)));if(e)e(s,((...t)=>this.t(...t)))};const f=e=>{if(!t&&!e&&this.services.languageDetector)e=[];const n=s(e)?e:e&&e[0];const r=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(s(e)?[e]:e);if(r){if(!this.language){i(r)}if(!this.translator.language)this.translator.changeLanguage(r);this.services.languageDetector?.cacheUserLanguage?.(r)}this.loadResources(r,(t=>{o(t,r)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){f(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(f)}else{this.services.languageDetector.detect(f)}}else{f(t)}return n}getFixedT(t,e,n){const i=(t,e,...s)=>{let r;if(typeof e!=="object"){r=this.options.overloadTranslationOptionHandler([t,e].concat(s))}else{r={...e}}r.lng=r.lng||i.lng;r.lngs=r.lngs||i.lngs;r.ns=r.ns||i.ns;if(r.keyPrefix!=="")r.keyPrefix=r.keyPrefix||n||i.keyPrefix;const o=this.options.keySeparator||".";let f;if(r.keyPrefix&&Array.isArray(t)){f=t.map((t=>`${r.keyPrefix}${o}${t}`))}else{f=r.keyPrefix?`${r.keyPrefix}${o}${t}`:t}return this.t(f,r)};if(s(t)){i.lng=t}else{i.lngs=t}i.ns=e;i.keyPrefix=n;return i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const n=e.lng||this.resolvedLanguage||this.languages[0];const i=this.options?this.options.fallbackLng:false;const s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return true;const r=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return n===-1||n===0||n===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(n,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(n,t)&&(!i||r(s,t)))return true;return false}loadNamespaces(t,e){const n=r();if(!this.options.ns){if(e)e();return Promise.resolve()}if(s(t))t=[t];t.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{n.resolve();if(e)e(t)}));return n}loadLanguages(t,e){const n=r();if(s(t))t=[t];const i=this.options.preload||[];const o=t.filter((t=>i.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(e)e();return Promise.resolve()}this.options.preload=i.concat(o);this.loadResources((t=>{n.resolve();if(e)e(t)}));return n}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=["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"];const n=this.services?.languageUtils||new A(X());if(t.toLowerCase().indexOf("-latn")>1)return"ltr";return e.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){return new Z(t,e)}cloneInstance(t={},e=W){const n=t.forkResourceStore;if(n)delete t.forkResourceStore;const i={...this.options,...t,...{isClone:true}};const s=new Z(i);if(t.debug!==undefined||t.prefix!==undefined){s.logger=s.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{s[t]=this[t]}));s.services={...this.services};s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)};if(n){const t=Object.keys(this.store.data).reduce(((t,e)=>{t[e]={...this.store.data[e]};t[e]=Object.keys(t[e]).reduce(((n,i)=>{n[i]={...t[e][i]};return n}),t[e]);return t}),{});s.store=new P(t,i);s.services.resourceStore=s.store}s.translator=new z(s.services,i);s.translator.on("*",((t,...e)=>{s.emit(t,...e)}));s.init(i,e);s.translator.options=i;s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)};return s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Q=Z.createInstance();Q.createInstance=Z.createInstance;function tt(){return window}function et(t){return{version:"3.32.3-pre.d8395b7e5a",headlessVersion:t}}function nt(){return et("").version}function it(t,e){if(tt()[t]){return}tt()[t]=et(e)}const st={af:()=>import("./p-3c099031.js").then((function(t){return t.a})),am:()=>import("./p-c87690e2.js").then((function(t){return t.a})),"ar-DZ":()=>import("./p-7c3db1b6.js").then((function(t){return t.a})),"ar-IQ":()=>import("./p-9659caca.js").then((function(t){return t.a})),"ar-KW":()=>import("./p-6f1d2845.js").then((function(t){return t.a})),"ar-LY":()=>import("./p-a13c6436.js").then((function(t){return t.a})),"ar-MA":()=>import("./p-c22943b1.js").then((function(t){return t.a})),"ar-SA":()=>import("./p-054edfff.js").then((function(t){return t.a})),"ar-TN":()=>import("./p-09fd85b0.js").then((function(t){return t.a})),ar:()=>import("./p-b1271f93.js").then((function(t){return t.a})),az:()=>import("./p-efab8b3e.js").then((function(t){return t.a})),be:()=>import("./p-b1cf2121.js").then((function(t){return t.b})),bg:()=>import("./p-23fe0271.js").then((function(t){return t.b})),bi:()=>import("./p-471f92a1.js").then((function(t){return t.b})),bm:()=>import("./p-8e3bce04.js").then((function(t){return t.b})),"bn-BD":()=>import("./p-d023b747.js").then((function(t){return t.b})),bn:()=>import("./p-b532c3b4.js").then((function(t){return t.b})),bo:()=>import("./p-b65e1ace.js").then((function(t){return t.b})),br:()=>import("./p-0a0bba8e.js").then((function(t){return t.b})),bs:()=>import("./p-c88f3b27.js").then((function(t){return t.b})),ca:()=>import("./p-4f69d4b6.js").then((function(t){return t.c})),cs:()=>import("./p-d3ff7338.js").then((function(t){return t.c})),cv:()=>import("./p-3269cb86.js").then((function(t){return t.c})),cy:()=>import("./p-b1df53e9.js").then((function(t){return t.c})),"de-AT":()=>import("./p-42b532d7.js").then((function(t){return t.d})),da:()=>import("./p-8202e9af.js").then((function(t){return t.d})),"de-CH":()=>import("./p-5ab08619.js").then((function(t){return t.d})),de:()=>import("./p-00299df3.js").then((function(t){return t.d})),dv:()=>import("./p-a887c4d4.js").then((function(t){return t.d})),el:()=>import("./p-fc7bfc8e.js").then((function(t){return t.e})),"en-AU":()=>import("./p-32cc14f7.js").then((function(t){return t.e})),"en-CA":()=>import("./p-a8260596.js").then((function(t){return t.e})),"en-GB":()=>import("./p-81d97ebc.js").then((function(t){return t.e})),"en-IE":()=>import("./p-5e08bfc5.js").then((function(t){return t.e})),"en-IL":()=>import("./p-2bad6025.js").then((function(t){return t.e})),"en-IN":()=>import("./p-f51cba86.js").then((function(t){return t.e})),"en-NZ":()=>import("./p-7e2b0488.js").then((function(t){return t.e})),"en-SG":()=>import("./p-453fd434.js").then((function(t){return t.e})),"en-TT":()=>import("./p-31b5e03e.js").then((function(t){return t.e})),eo:()=>import("./p-2bab8d88.js").then((function(t){return t.e})),en:()=>import("./p-64eaf609.js").then((function(t){return t.e})),"es-DO":()=>import("./p-7a8aa43b.js").then((function(t){return t.e})),"es-MX":()=>import("./p-75c7286f.js").then((function(t){return t.e})),"es-PR":()=>import("./p-3ce1b85f.js").then((function(t){return t.e})),"es-US":()=>import("./p-8a105c02.js").then((function(t){return t.e})),et:()=>import("./p-a96e28a4.js").then((function(t){return t.e})),es:()=>import("./p-543cdc32.js").then((function(t){return t.e})),eu:()=>import("./p-b4d42ed4.js").then((function(t){return t.e})),fa:()=>import("./p-8ba8e244.js").then((function(t){return t.f})),fo:()=>import("./p-262f73d0.js").then((function(t){return t.f})),fi:()=>import("./p-4a1063ca.js").then((function(t){return t.f})),"fr-CA":()=>import("./p-a7e47a8a.js").then((function(t){return t.f})),"fr-CH":()=>import("./p-46a7eb81.js").then((function(t){return t.f})),fr:()=>import("./p-bb9daef3.js").then((function(t){return t.f})),fy:()=>import("./p-6042ffd7.js").then((function(t){return t.f})),ga:()=>import("./p-26f44631.js").then((function(t){return t.g})),gd:()=>import("./p-75202177.js").then((function(t){return t.g})),"gom-LATN":()=>import("./p-d7998253.js").then((function(t){return t.g})),gl:()=>import("./p-50561ab0.js").then((function(t){return t.g})),gu:()=>import("./p-83a77107.js").then((function(t){return t.g})),he:()=>import("./p-5ceee30e.js").then((function(t){return t.h})),hi:()=>import("./p-1882fbca.js").then((function(t){return t.h})),hr:()=>import("./p-b8a4aa4b.js").then((function(t){return t.h})),hu:()=>import("./p-0c3fbc77.js").then((function(t){return t.h})),ht:()=>import("./p-43f31fbe.js").then((function(t){return t.h})),"hy-AM":()=>import("./p-f56ce40e.js").then((function(t){return t.h})),id:()=>import("./p-6557bf7e.js").then((function(t){return t.i})),is:()=>import("./p-ace08720.js").then((function(t){return t.i})),"it-CH":()=>import("./p-f1f21d6e.js").then((function(t){return t.i})),it:()=>import("./p-81838009.js").then((function(t){return t.i})),ja:()=>import("./p-ac2eb8a3.js").then((function(t){return t.j})),jv:()=>import("./p-bba54ad4.js").then((function(t){return t.j})),ka:()=>import("./p-d346fda6.js").then((function(t){return t.k})),kk:()=>import("./p-85533b73.js").then((function(t){return t.k})),km:()=>import("./p-713d90d0.js").then((function(t){return t.k})),kn:()=>import("./p-c4c45b46.js").then((function(t){return t.k})),ko:()=>import("./p-197861d9.js").then((function(t){return t.k})),ku:()=>import("./p-b6eaf7f2.js").then((function(t){return t.k})),ky:()=>import("./p-61ce88da.js").then((function(t){return t.k})),lb:()=>import("./p-23045923.js").then((function(t){return t.l})),lo:()=>import("./p-cb7d2749.js").then((function(t){return t.l})),lt:()=>import("./p-ce6a7078.js").then((function(t){return t.l})),lv:()=>import("./p-411f2bcd.js").then((function(t){return t.l})),me:()=>import("./p-645e157a.js").then((function(t){return t.m})),mi:()=>import("./p-bd5ec388.js").then((function(t){return t.m})),mk:()=>import("./p-32cdf6c7.js").then((function(t){return t.m})),ml:()=>import("./p-0362d1fa.js").then((function(t){return t.m})),mn:()=>import("./p-8753fa48.js").then((function(t){return t.m})),mr:()=>import("./p-3ff71c40.js").then((function(t){return t.m})),"ms-MY":()=>import("./p-b7727e4c.js").then((function(t){return t.m})),ms:()=>import("./p-55c53d7a.js").then((function(t){return t.m})),mt:()=>import("./p-d8cf9350.js").then((function(t){return t.m})),my:()=>import("./p-f4289c7e.js").then((function(t){return t.m})),nb:()=>import("./p-7cbb15ea.js").then((function(t){return t.n})),ne:()=>import("./p-45fe81ce.js").then((function(t){return t.n})),"nl-BE":()=>import("./p-f3cd0211.js").then((function(t){return t.n})),nl:()=>import("./p-884a6d47.js").then((function(t){return t.n})),pl:()=>import("./p-b50b877c.js").then((function(t){return t.p})),"pt-BR":()=>import("./p-4f22eacd.js").then((function(t){return t.p})),pt:()=>import("./p-b0d972cd.js").then((function(t){return t.p})),rn:()=>import("./p-581d79f1.js").then((function(t){return t.r})),ro:()=>import("./p-4fb790a7.js").then((function(t){return t.r})),ru:()=>import("./p-5306660e.js").then((function(t){return t.r})),rw:()=>import("./p-b67e688b.js").then((function(t){return t.r})),sd:()=>import("./p-c71d32b8.js").then((function(t){return t.s})),se:()=>import("./p-428e5beb.js").then((function(t){return t.s})),si:()=>import("./p-639d46d2.js").then((function(t){return t.s})),sk:()=>import("./p-388dd6d3.js").then((function(t){return t.s})),sl:()=>import("./p-00f52fed.js").then((function(t){return t.s})),sq:()=>import("./p-2980dae7.js").then((function(t){return t.s})),"sr-CYRL":()=>import("./p-4e7f106a.js").then((function(t){return t.s})),ss:()=>import("./p-b738cbbc.js").then((function(t){return t.s})),"sv-FI":()=>import("./p-830c2d51.js").then((function(t){return t.s})),sr:()=>import("./p-e7feeccc.js").then((function(t){return t.s})),sv:()=>import("./p-e4be788b.js").then((function(t){return t.s})),sw:()=>import("./p-8a78f354.js").then((function(t){return t.s})),ta:()=>import("./p-f2ff8291.js").then((function(t){return t.t})),te:()=>import("./p-84bb7a02.js").then((function(t){return t.t})),tet:()=>import("./p-c08286c7.js").then((function(t){return t.t})),tg:()=>import("./p-b84bfa14.js").then((function(t){return t.t})),th:()=>import("./p-8792b623.js").then((function(t){return t.t})),tk:()=>import("./p-a7a17cb4.js").then((function(t){return t.t})),"tl-PH":()=>import("./p-80d26cad.js").then((function(t){return t.t})),tlh:()=>import("./p-dbaccc34.js").then((function(t){return t.t})),tr:()=>import("./p-9c4d6a70.js").then((function(t){return t.t})),tzl:()=>import("./p-a59b3b6c.js").then((function(t){return t.t})),"tzm-LATN":()=>import("./p-9ad32c93.js").then((function(t){return t.t})),tzm:()=>import("./p-eff31a13.js").then((function(t){return t.t})),"ug-CN":()=>import("./p-c0ccfcbe.js").then((function(t){return t.u})),uk:()=>import("./p-e36692c2.js").then((function(t){return t.u})),ur:()=>import("./p-e759fb8b.js").then((function(t){return t.u})),"uz-LATN":()=>import("./p-7819f99b.js").then((function(t){return t.u})),uz:()=>import("./p-fdf12072.js").then((function(t){return t.u})),vi:()=>import("./p-93d3253f.js").then((function(t){return t.v})),"x-PSEUDO":()=>import("./p-6bb4463b.js").then((function(t){return t.x})),yo:()=>import("./p-e13d41d3.js").then((function(t){return t.y})),"zh-CN":()=>import("./p-16e217b0.js").then((function(t){return t.z})),"zh-HK":()=>import("./p-75dd9c7a.js").then((function(t){return t.z})),"zh-TW":()=>import("./p-7a311621.js").then((function(t){return t.z})),zh:()=>import("./p-a7944a8b.js").then((function(t){return t.z})),"oc-LNC":()=>import("./p-89b21606.js").then((function(t){return t.o})),nn:()=>import("./p-5826d382.js").then((function(t){return t.n})),"pa-IN":()=>import("./p-ebe0100b.js").then((function(t){return t.p}))};const rt=t=>console.warn(`Cannot load dayjs locale file for "${t}"`);const ot=t=>{if(st[t]){return t}if(t.includes("-")){const e=t.split("-")[0];if(st[e]){return e}}return t};function ft(e){const n=ot(e);if(!st[n]){rt(n);return}try{st[n]().then((()=>t.locale(n)))}catch(t){rt(n)}}function ut(t){"@babel/helpers - typeof";return ut="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},ut(t)}function ct(){return typeof XMLHttpRequest==="function"||(typeof XMLHttpRequest==="undefined"?"undefined":ut(XMLHttpRequest))==="object"}function at(t){return!!t&&typeof t.then==="function"}function ht(t){if(at(t)){return t}return Promise.resolve(t)}function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pt(t,e,n){return(e=mt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mt(t){var e=bt(t,"string");return"symbol"==gt(e)?e:e+""}function bt(t,e){if("object"!=gt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=gt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function gt(t){"@babel/helpers - typeof";return gt="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},gt(t)}var jt=typeof fetch==="function"?fetch:undefined;if(typeof global!=="undefined"&&global.fetch){jt=global.fetch}else if(typeof window!=="undefined"&&window.fetch){jt=window.fetch}var yt;if(ct()){if(typeof global!=="undefined"&&global.XMLHttpRequest){yt=global.XMLHttpRequest}else if(typeof window!=="undefined"&&window.XMLHttpRequest){yt=window.XMLHttpRequest}}var vt;if(typeof ActiveXObject==="function"){if(typeof global!=="undefined"&&global.ActiveXObject){vt=global.ActiveXObject}else if(typeof window!=="undefined"&&window.ActiveXObject){vt=window.ActiveXObject}}if(typeof jt!=="function")jt=undefined;if(!jt&&!yt&&!vt){try{import("./p-6f1cd43d.js").then((function(t){return t.b})).then((function(t){jt=t.default})).catch((function(){}))}catch(t){}}var wt=function t(e,n){if(n&>(n)==="object"){var i="";for(var s in n){i+="&"+encodeURIComponent(s)+"="+encodeURIComponent(n[s])}if(!i)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+i.slice(1)}return e};var $t=function t(e,n,i,s){var r=function t(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then((function(t){i(null,{status:e.status,data:t})})).catch(i)};if(s){var o=s(e,n);if(o instanceof Promise){o.then(r).catch(i);return}}if(typeof fetch==="function"){fetch(e,n).then(r).catch(i)}else{jt(e,n).then(r).catch(i)}};var Ot=false;var St=function t(e,n,i,s){if(e.queryStringParams){n=wt(n,e.queryStringParams)}var r=dt({},typeof e.customHeaders==="function"?e.customHeaders():e.customHeaders);if(typeof window==="undefined"&&typeof global!=="undefined"&&typeof global.process!=="undefined"&&global.process.versions&&global.process.versions.node){r["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")}if(i)r["Content-Type"]="application/json";var o=typeof e.requestOptions==="function"?e.requestOptions(i):e.requestOptions;var f=dt({method:i?"POST":"GET",body:i?e.stringify(i):undefined,headers:r},Ot?{}:o);var u=typeof e.alternateFetch==="function"&&e.alternateFetch.length>=1?e.alternateFetch:undefined;try{$t(n,f,s,u)}catch(t){if(!o||Object.keys(o).length===0||!t.message||t.message.indexOf("not implemented")<0){return s(t)}try{Object.keys(o).forEach((function(t){delete f[t]}));$t(n,f,s,u);Ot=true}catch(t){s(t)}}};var kt=function t(e,n,i,s){if(i&>(i)==="object"){i=wt("",i).slice(1)}if(e.queryStringParams){n=wt(n,e.queryStringParams)}try{var r=yt?new yt:new vt("MSXML2.XMLHTTP.3.0");r.open(i?"POST":"GET",n,1);if(!e.crossDomain){r.setRequestHeader("X-Requested-With","XMLHttpRequest")}r.withCredentials=!!e.withCredentials;if(i){r.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(r.overrideMimeType){r.overrideMimeType("application/json")}var o=e.customHeaders;o=typeof o==="function"?o():o;if(o){for(var f in o){r.setRequestHeader(f,o[f])}}r.onreadystatechange=function(){r.readyState>3&&s(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})};r.send(i)}catch(t){console&&console.log(t)}};var xt=function t(e,n,i,s){if(typeof i==="function"){s=i;i=undefined}s=s||function(){};if(jt&&n.indexOf("file:")!==0){return St(e,n,i,s)}if(ct()||typeof ActiveXObject==="function"){return kt(e,n,i,s)}s(new Error("No fetch and no xhr implementation found!"))};function Lt(t){"@babel/helpers - typeof";return Lt="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},Lt(t)}function Nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(n),!0).forEach((function(e){It(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ct(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,zt(i.key),i)}}function Tt(t,e,n){return e&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function It(t,e,n){return(e=zt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zt(t){var e=At(t,"string");return"symbol"==Lt(e)?e:e+""}function At(t,e){if("object"!=Lt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Lt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var Et=function t(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function t(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function t(e,n,i){return It({},n,i||"")},parseLoadPayload:function t(e,n){return undefined},request:xt,reloadInterval:typeof window!=="undefined"?false:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:false,withCredentials:false,overrideMimeType:false,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}};var Mt=function(){function t(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};Pt(this,t);this.services=e;this.options=n;this.allOptions=i;this.type="backend";this.init(e,n,i)}return Tt(t,[{key:"init",value:function t(e){var n=this;var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.services=e;this.options=Rt(Rt(Rt({},Et()),this.options||{}),i);this.allOptions=s;if(this.services&&this.options.reloadInterval){var r=setInterval((function(){return n.reload()}),this.options.reloadInterval);if(Lt(r)==="object"&&typeof r.unref==="function")r.unref()}}},{key:"readMulti",value:function t(e,n,i){this._readAny(e,e,n,n,i)}},{key:"read",value:function t(e,n,i){this._readAny([e],e,[n],n,i)}},{key:"_readAny",value:function t(e,n,i,s,r){var o=this;var f=this.options.loadPath;if(typeof this.options.loadPath==="function"){f=this.options.loadPath(e,i)}f=ht(f);f.then((function(t){if(!t)return r(null,{});var f=o.services.interpolator.interpolate(t,{lng:e.join("+"),ns:i.join("+")});o.loadUrl(f,r,n,s)}))}},{key:"loadUrl",value:function t(e,n,i,s){var r=this;var o=typeof i==="string"?[i]:i;var f=typeof s==="string"?[s]:s;var u=this.options.parseLoadPayload(o,f);this.options.request(this.options,e,u,(function(t,o){if(o&&(o.status>=500&&o.status<600||!o.status))return n("failed loading "+e+"; status code: "+o.status,true);if(o&&o.status>=400&&o.status<500)return n("failed loading "+e+"; status code: "+o.status,false);if(!o&&t&&t.message){var f=t.message.toLowerCase();var u=["failed","fetch","network","load"].find((function(t){return f.indexOf(t)>-1}));if(u){return n("failed loading "+e+": "+t.message,true)}}if(t)return n(t,false);var c,a;try{if(typeof o.data==="string"){c=r.options.parse(o.data,i,s)}else{c=o.data}}catch(t){a="failed parsing "+e+" to json"}if(a)return n(a,false);n(null,c)}))}},{key:"create",value:function t(e,n,i,s,r){var o=this;if(!this.options.addPath)return;if(typeof e==="string")e=[e];var f=this.options.parsePayload(n,i,s);var u=0;var c=[];var a=[];e.forEach((function(t){var i=o.options.addPath;if(typeof o.options.addPath==="function"){i=o.options.addPath(t,n)}var s=o.services.interpolator.interpolate(i,{lng:t,ns:n});o.options.request(o.options,s,f,(function(t,n){u+=1;c.push(t);a.push(n);if(u===e.length){if(typeof r==="function")r(c,a)}}))}))}},{key:"reload",value:function t(){var e=this;var n=this.services,i=n.backendConnector,s=n.languageUtils,r=n.logger;var o=i.language;if(o&&o.toLowerCase()==="cimode")return;var f=[];var u=function t(e){var n=s.toResolveHierarchy(e);n.forEach((function(t){if(f.indexOf(t)<0)f.push(t)}))};u(o);if(this.allOptions.preload)this.allOptions.preload.forEach((function(t){return u(t)}));f.forEach((function(t){e.allOptions.ns.forEach((function(e){i.read(t,e,"read",null,null,(function(n,s){if(n)r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n);if(!n&&s)r.log("loaded namespace ".concat(e," for language ").concat(t),s);i.loaded("".concat(t,"|").concat(e),n,s)}))}))}))}}])}();Mt.type="backend";function Ut(t){const e=new URL("./",window.document.baseURI).href;const n=new URL(t,e);return n.origin!==window.location.origin?n.href:n.pathname}const Bt=["dev","en","fr","cs","da","de","el","es","fi","hu","id","it","ja","ko","nl","no","pl","pt","pt-br","ru","sv","th","tr","zh","zh-cn","zh-tw","zn","es-es"];const Vt="translation";function Ht(t){return Bt.includes(t.toLowerCase())}function qt(t){return{loadPath:`${Ut(t.languageAssetsPath)}/{{lng}}.json?lng={{lng}}&ns={{ns}}`,request:async(t,e,n,i)=>{try{const[t,n]=e.split("?");const s=new URLSearchParams(n);const r=s.get("lng");const o=s.get("ns");if(!Ht(r)){throw new Error(`Unsupported locale "${r}"`)}if(o!==Vt){throw new Error(`Unsupported namespace "${o}"`)}const f=await fetch(t);if(f.status!==200&&f.status!==304){throw new Error(`Unsuccessful request returned status "${f.status}"`)}i(null,{status:f.status,data:await f.json()})}catch(t){i(t,{status:404,data:""})}}}}function Dt(t){return t.i18n.use(Mt).init({debug:t.logLevel==="debug",lng:t.language,nsSeparator:"___",fallbackLng:"en",backend:qt(t),interpolation:{escape:t=>i.sanitize(t)},compatibilityJSON:"v4"})}const Kt=(t,e)=>`A ${e} is configured on the ${t} interface element, but the ${t} interface was initialized with an engine. You should only configure the ${e} in the target engine.`;class Ft{constructor(t,i){this.atomicInterface=t;this.hangingComponentsInitialization=[];it(e,i);const{connectedCallback:s,render:r}=t;t.connectedCallback=()=>{this.i18nPromise=Dt(t);return s&&s.call(t)};t.render=()=>{if(t.error){return n("atomic-component-error",{element:t.host,error:t.error})}return r&&r.call(t)}}onComponentInitializing(t){t.preventDefault();t.stopPropagation();if(this.atomicInterface.engine){t.detail(this.atomicInterface.bindings);return}this.hangingComponentsInitialization.push(t)}async onInitialization(t){if(this.atomicInterface.engine){this.atomicInterface.engine.logger.warn(`The ${this.interfaceTagname} component "initialize" has already been called.`,this.atomicInterface.host);return}this.atomicInterface.updateIconAssetsPath();t();if(this.atomicInterface.registerFieldsToInclude){this.atomicInterface.registerFieldsToInclude()}ft(this.language);await this.i18nPromise;this.initComponents()}onAnalyticsChange(){const{engine:t,analytics:e}=this.atomicInterface;if(!this.engineIsCreated(t)){return}if(!e){t.disableAnalytics();return}t.enableAnalytics()}onLanguageChange(){const{i18n:t,language:e}=this.atomicInterface;ft(this.language);const{resolve:n,promise:i}=Promise.withResolvers();new Mt(t.services,qt(this.atomicInterface)).read(this.language,Vt,(async(i,s)=>{t.addResourceBundle(this.language,Vt,s,true,false);await t.changeLanguage(e);n()}));return i}engineIsCreated(t){if(!t){console.error(`You have to call "initialize" on the ${this.interfaceTagname} component before modifying the props or calling other public methods.`,this.atomicInterface.host);return false}return true}get interfaceTagname(){return this.atomicInterface.host.tagName.toLowerCase()}initComponents(){this.hangingComponentsInitialization.forEach((t=>t.detail(this.atomicInterface.bindings)))}get language(){return this.atomicInterface.language||"en"}}function _t(t,e,n){if(n.analytics?.analyticsClientMiddleware){return n.analytics.analyticsClientMiddleware(t,e)}return e}function Jt(t){if(t.customData){t.customData.coveoAtomicVersion=nt()}return t}function Xt(){return{documentLocation:document.location.href,...document.referrer&&{originLevel3:document.referrer}}}const Yt=/^(\d+\.\d+\.\d+)/;function Wt(){return{source:{"@coveo/atomic":Yt.exec(nt())?.[0]||"0.0.0"}}}function Gt(t,e){const n={enabled:e,documentLocation:document.location.href,...document.referrer&&{originLevel3:document.referrer}};const i=t.analytics??{};Object.assign(i,Wt());Object.assign(n,i);return n}export{Ft as C,_t as a,Jt as b,Xt as c,Wt as d,Gt as g,Q as i,Kt as m};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{d as t}from"./p-35e58270.js";import{VERSION as e}from"@coveo/headless";import{h as n}from"./p-dc3df5ce.js";import{D as i}from"./p-f284897c.js";const s=t=>typeof t==="string";const r=()=>{let t;let e;const n=new Promise(((n,i)=>{t=n;e=i}));n.resolve=t;n.reject=e;return n};const o=t=>{if(t==null)return"";return""+t};const f=(t,e,n)=>{t.forEach((t=>{if(e[t])n[t]=e[t]}))};const u=/###/g;const c=t=>t&&t.indexOf("###")>-1?t.replace(u,"."):t;const a=t=>!t||s(t);const h=(t,e,n)=>{const i=!s(e)?e:e.split(".");let r=0;while(r<i.length-1){if(a(t))return{};const e=c(i[r]);if(!t[e]&&n)t[e]=new n;if(Object.prototype.hasOwnProperty.call(t,e)){t=t[e]}else{t={}}++r}if(a(t))return{};return{obj:t,k:c(i[r])}};const l=(t,e,n)=>{const{obj:i,k:s}=h(t,e,Object);if(i!==undefined||e.length===1){i[s]=n;return}let r=e[e.length-1];let o=e.slice(0,e.length-1);let f=h(t,o,Object);while(f.obj===undefined&&o.length){r=`${o[o.length-1]}.${r}`;o=o.slice(0,o.length-1);f=h(t,o,Object);if(f?.obj&&typeof f.obj[`${f.k}.${r}`]!=="undefined"){f.obj=undefined}}f.obj[`${f.k}.${r}`]=n};const d=(t,e,n,i)=>{const{obj:s,k:r}=h(t,e,Object);s[r]=s[r]||[];s[r].push(n)};const p=(t,e)=>{const{obj:n,k:i}=h(t,e);if(!n)return undefined;if(!Object.prototype.hasOwnProperty.call(n,i))return undefined;return n[i]};const m=(t,e,n)=>{const i=p(t,n);if(i!==undefined){return i}return p(e,n)};const b=(t,e,n)=>{for(const i in e){if(i!=="__proto__"&&i!=="constructor"){if(i in t){if(s(t[i])||t[i]instanceof String||s(e[i])||e[i]instanceof String){if(n)t[i]=e[i]}else{b(t[i],e[i],n)}}else{t[i]=e[i]}}}return t};const g=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var j={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const y=t=>{if(s(t)){return t.replace(/[&<>"'\/]/g,(t=>j[t]))}return t};class v{constructor(t){this.capacity=t;this.regExpMap=new Map;this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(e!==undefined){return e}const n=new RegExp(t);if(this.regExpQueue.length===this.capacity){this.regExpMap.delete(this.regExpQueue.shift())}this.regExpMap.set(t,n);this.regExpQueue.push(t);return n}}const w=[" ",",","?","!",";"];const $=new v(20);const O=(t,e,n)=>{e=e||"";n=n||"";const i=w.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(i.length===0)return true;const s=$.getRegExp(`(${i.map((t=>t==="?"?"\\?":t)).join("|")})`);let r=!s.test(t);if(!r){const e=t.indexOf(n);if(e>0&&!s.test(t.substring(0,e))){r=true}}return r};const S=(t,e,n=".")=>{if(!t)return undefined;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return undefined;return t[e]}const i=e.split(n);let s=t;for(let t=0;t<i.length;){if(!s||typeof s!=="object"){return undefined}let e;let r="";for(let o=t;o<i.length;++o){if(o!==t){r+=n}r+=i[o];e=s[r];if(e!==undefined){if(["string","number","boolean"].indexOf(typeof e)>-1&&o<i.length-1){continue}t+=o-t+1;break}}s=e}return s};const k=t=>t?.replace("_","-");const x={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class L{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:";this.logger=t||x;this.options=e;this.debug=e.debug}log(...t){return this.forward(t,"log","",true)}warn(...t){return this.forward(t,"warn","",true)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",true)}forward(t,e,n,i){if(i&&!this.debug)return null;if(s(t[0]))t[0]=`${n}${this.prefix} ${t[0]}`;return this.logger[e](t)}create(t){return new L(this.logger,{...{prefix:`${this.prefix}:${t}:`},...this.options})}clone(t){t=t||this.options;t.prefix=t.prefix||this.prefix;return new L(this.logger,t)}}var N=new L;class R{constructor(){this.observers={}}on(t,e){t.split(" ").forEach((t=>{if(!this.observers[t])this.observers[t]=new Map;const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)}));return this}off(t,e){if(!this.observers[t])return;if(!e){delete this.observers[t];return}this.observers[t].delete(e)}emit(t,...e){if(this.observers[t]){const n=Array.from(this.observers[t].entries());n.forEach((([t,n])=>{for(let i=0;i<n;i++){t(...e)}}))}if(this.observers["*"]){const n=Array.from(this.observers["*"].entries());n.forEach((([n,i])=>{for(let s=0;s<i;s++){n.apply(n,[t,...e])}}))}}}class P extends R{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super();this.data=t||{};this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}if(this.options.ignoreJSONStructure===undefined){this.options.ignoreJSONStructure=true}}addNamespaces(t){if(this.options.ns.indexOf(t)<0){this.options.ns.push(t)}}removeNamespaces(t){const e=this.options.ns.indexOf(t);if(e>-1){this.options.ns.splice(e,1)}}getResource(t,e,n,i={}){const r=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const o=i.ignoreJSONStructure!==undefined?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let f;if(t.indexOf(".")>-1){f=t.split(".")}else{f=[t,e];if(n){if(Array.isArray(n)){f.push(...n)}else if(s(n)&&r){f.push(...n.split(r))}else{f.push(n)}}}const u=p(this.data,f);if(!u&&!e&&!n&&t.indexOf(".")>-1){t=f[0];e=f[1];n=f.slice(2).join(".")}if(u||!o||!s(n))return u;return S(this.data?.[t]?.[e],n,r)}addResource(t,e,n,i,s={silent:false}){const r=s.keySeparator!==undefined?s.keySeparator:this.options.keySeparator;let o=[t,e];if(n)o=o.concat(r?n.split(r):n);if(t.indexOf(".")>-1){o=t.split(".");i=e;e=o[1]}this.addNamespaces(e);l(this.data,o,i);if(!s.silent)this.emit("added",t,e,n,i)}addResources(t,e,n,i={silent:false}){for(const i in n){if(s(n[i])||Array.isArray(n[i]))this.addResource(t,e,i,n[i],{silent:true})}if(!i.silent)this.emit("added",t,e,n)}addResourceBundle(t,e,n,i,s,r={silent:false,skipCopy:false}){let o=[t,e];if(t.indexOf(".")>-1){o=t.split(".");i=n;n=e;e=o[1]}this.addNamespaces(e);let f=p(this.data,o)||{};if(!r.skipCopy)n=JSON.parse(JSON.stringify(n));if(i){b(f,n,s)}else{f={...f,...n}}l(this.data,o,f);if(!r.silent)this.emit("added",t,e,n)}removeResourceBundle(t,e){if(this.hasResourceBundle(t,e)){delete this.data[t][e]}this.removeNamespaces(e);this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==undefined}getResourceBundle(t,e){if(!e)e=this.options.defaultNS;return this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);const n=e&&Object.keys(e)||[];return!!n.find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,s){t.forEach((t=>{e=this.processors[t]?.process(e,n,i,s)??e}));return e}};const T={};const I=t=>!s(t)&&typeof t!=="boolean"&&typeof t!=="number";class z extends R{constructor(t,e={}){super();f(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this);this.options=e;if(this.options.keySeparator===undefined){this.options.keySeparator="."}this.logger=N.create("translator")}changeLanguage(t){if(t)this.language=t}exists(t,e={interpolation:{}}){const n={...e};if(t==null)return false;const i=this.resolve(t,n);return i?.res!==undefined}extractFromKey(t,e){let n=e.nsSeparator!==undefined?e.nsSeparator:this.options.nsSeparator;if(n===undefined)n=":";const i=e.keySeparator!==undefined?e.keySeparator:this.options.keySeparator;let r=e.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1;const f=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!O(t,n,i);if(o&&!f){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0){return{key:t,namespaces:s(r)?[r]:r}}const o=t.split(n);if(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)r=o.shift();t=o.join(i)}return{key:t,namespaces:s(r)?[r]:r}}translate(t,e,n){let i=typeof e==="object"?{...e}:e;if(typeof i!=="object"&&this.options.overloadTranslationOptionHandler){i=this.options.overloadTranslationOptionHandler(arguments)}if(typeof options==="object")i={...i};if(!i)i={};if(t==null)return"";if(!Array.isArray(t))t=[String(t)];const r=i.returnDetails!==undefined?i.returnDetails:this.options.returnDetails;const o=i.keySeparator!==undefined?i.keySeparator:this.options.keySeparator;const{key:f,namespaces:u}=this.extractFromKey(t[t.length-1],i);const c=u[u.length-1];let a=i.nsSeparator!==undefined?i.nsSeparator:this.options.nsSeparator;if(a===undefined)a=":";const h=i.lng||this.language;const l=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode"){if(l){if(r){return{res:`${c}${a}${f}`,usedKey:f,exactUsedKey:f,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(i)}}return`${c}${a}${f}`}if(r){return{res:f,usedKey:f,exactUsedKey:f,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(i)}}return f}const d=this.resolve(t,i);let p=d?.res;const m=d?.usedKey||f;const b=d?.exactUsedKey||f;const g=["[object Number]","[object Function]","[object RegExp]"];const j=i.joinArrays!==undefined?i.joinArrays:this.options.joinArrays;const y=!this.i18nFormat||this.i18nFormat.handleAsObject;const v=i.count!==undefined&&!s(i.count);const w=z.hasDefaultValue(i);const $=v?this.pluralResolver.getSuffix(h,i.count,i):"";const O=i.ordinal&&v?this.pluralResolver.getSuffix(h,i.count,{ordinal:false}):"";const S=v&&!i.ordinal&&i.count===0;const k=S&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${$}`]||i[`defaultValue${O}`]||i.defaultValue;let x=p;if(y&&!p&&w){x=k}const L=I(x);const N=Object.prototype.toString.apply(x);if(y&&x&&L&&g.indexOf(N)<0&&!(s(j)&&Array.isArray(x))){if(!i.returnObjects&&!this.options.returnObjects){if(!this.options.returnedObjectHandler){this.logger.warn("accessing an object - but returnObjects options is not enabled!")}const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,x,{...i,ns:u}):`key '${f} (${this.language})' returned an object instead of string.`;if(r){d.res=t;d.usedParams=this.getUsedParamsDetails(i);return d}return t}if(o){const t=Array.isArray(x);const e=t?[]:{};const n=t?b:m;for(const t in x){if(Object.prototype.hasOwnProperty.call(x,t)){const s=`${n}${o}${t}`;if(w&&!p){e[t]=this.translate(s,{...i,defaultValue:I(k)?k[t]:undefined,...{joinArrays:false,ns:u}})}else{e[t]=this.translate(s,{...i,...{joinArrays:false,ns:u}})}if(e[t]===s)e[t]=x[t]}}p=e}}else if(y&&s(j)&&Array.isArray(p)){p=p.join(j);if(p)p=this.extendTranslation(p,t,i,n)}else{let e=false;let s=false;if(!this.isValidLookup(p)&&w){e=true;p=k}if(!this.isValidLookup(p)){s=true;p=f}const r=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey;const u=r&&s?undefined:p;const l=w&&k!==p&&this.options.updateMissing;if(s||e||l){this.logger.log(l?"updateKey":"missingKey",h,c,f,l?k:p);if(o){const t=this.resolve(f,{...i,keySeparator:false});if(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 e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&e&&e[0]){for(let n=0;n<e.length;n++){t.push(e[n])}}else if(this.options.saveMissingTo==="all"){t=this.languageUtils.toResolveHierarchy(i.lng||this.language)}else{t.push(i.lng||this.language)}const n=(t,e,n)=>{const s=w&&n!==p?n:u;if(this.options.missingKeyHandler){this.options.missingKeyHandler(t,c,e,s,l,i)}else if(this.backendConnector?.saveMissing){this.backendConnector.saveMissing(t,c,e,s,l,i)}this.emit("missingKey",t,c,e,p)};if(this.options.saveMissing){if(this.options.saveMissingPlurals&&v){t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,i);if(S&&i[`defaultValue${this.options.pluralSeparator}zero`]&&e.indexOf(`${this.options.pluralSeparator}zero`)<0){e.push(`${this.options.pluralSeparator}zero`)}e.forEach((e=>{n([t],f+e,i[`defaultValue${e}`]||k)}))}))}else{n(t,f,k)}}}p=this.extendTranslation(p,t,i,d,n);if(s&&p===f&&this.options.appendNamespaceToMissingKey){p=`${c}${a}${f}`}if((s||e)&&this.options.parseMissingKeyHandler){p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${a}${f}`:f,e?p:undefined,i)}}if(r){d.res=p;d.usedParams=this.getUsedParamsDetails(i);return d}return p}extendTranslation(t,e,n,i,r){if(this.i18nFormat?.parse){t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i})}else if(!n.skipInterpolation){if(n.interpolation)this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});const o=s(t)&&(n?.interpolation?.skipOnVariables!==undefined?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(o){const e=t.match(this.interpolator.nestingRegexp);f=e&&e.length}let u=n.replace&&!s(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables)u={...this.options.interpolation.defaultVariables,...u};t=this.interpolator.interpolate(t,u,n.lng||this.language||i.usedLng,n);if(o){const e=t.match(this.interpolator.nestingRegexp);const i=e&&e.length;if(f<i)n.nest=false}if(!n.lng&&i&&i.res)n.lng=this.language||i.usedLng;if(n.nest!==false)t=this.interpolator.nest(t,((...t)=>{if(r?.[0]===t[0]&&!n.context){this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${e[0]}`);return null}return this.translate(...t,e)}),n);if(n.interpolation)this.interpolator.reset()}const o=n.postProcess||this.options.postProcess;const f=s(o)?[o]:o;if(t!=null&&f?.length&&n.applyPostProcessor!==false){t=C.handle(f,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)}return t}resolve(t,e={}){let n;let i;let r;let o;let f;if(s(t))t=[t];t.forEach((t=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(t,e);const c=u.key;i=c;let a=u.namespaces;if(this.options.fallbackNS)a=a.concat(this.options.fallbackNS);const h=e.count!==undefined&&!s(e.count);const l=h&&!e.ordinal&&e.count===0;const d=e.context!==undefined&&(s(e.context)||typeof e.context==="number")&&e.context!=="";const p=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);a.forEach((t=>{if(this.isValidLookup(n))return;f=t;if(!T[`${p[0]}-${t}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)){T[`${p[0]}-${t}`]=true;this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${f}" 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!!!")}p.forEach((i=>{if(this.isValidLookup(n))return;o=i;const s=[c];if(this.i18nFormat?.addLookupKeys){this.i18nFormat.addLookupKeys(s,c,i,t,e)}else{let t;if(h)t=this.pluralResolver.getSuffix(i,e.count,e);const n=`${this.options.pluralSeparator}zero`;const r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h){s.push(c+t);if(e.ordinal&&t.indexOf(r)===0){s.push(c+t.replace(r,this.options.pluralSeparator))}if(l){s.push(c+n)}}if(d){const i=`${c}${this.options.contextSeparator}${e.context}`;s.push(i);if(h){s.push(i+t);if(e.ordinal&&t.indexOf(r)===0){s.push(i+t.replace(r,this.options.pluralSeparator))}if(l){s.push(i+n)}}}}let f;while(f=s.pop()){if(!this.isValidLookup(n)){r=f;n=this.getResource(i,t,f,e)}}}))}))}));return{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:f}}isValidLookup(t){return t!==undefined&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,n,i={}){if(this.i18nFormat?.getResource)return this.i18nFormat.getResource(t,e,n,i);return this.resourceStore.getResource(t,e,n,i)}getUsedParamsDetails(t={}){const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"];const n=t.replace&&!s(t.replace);let i=n?t.replace:t;if(n&&typeof t.count!=="undefined"){i.count=t.count}if(this.options.interpolation.defaultVariables){i={...this.options.interpolation.defaultVariables,...i}}if(!n){i={...i};for(const t of e){delete i[t]}}return i}static hasDefaultValue(t){const e="defaultValue";for(const n in t){if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&undefined!==t[n]){return true}}return false}}class A{constructor(t){this.options=t;this.supportedLngs=this.options.supportedLngs||false;this.logger=N.create("languageUtils")}getScriptPartFromCode(t){t=k(t);if(!t||t.indexOf("-")<0)return null;const e=t.split("-");if(e.length===2)return null;e.pop();if(e[e.length-1].toLowerCase()==="x")return null;return this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){t=k(t);if(!t||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(s(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}if(e&&this.options.lowerCaseLng){e=e.toLowerCase()}if(e)return e;if(this.options.lowerCaseLng){return t.toLowerCase()}return t}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){if(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs){t=this.getLanguagePartFromCode(t)}return!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;t.forEach((t=>{if(e)return;const n=this.formatLanguageCode(t);if(!this.options.supportedLngs||this.isSupportedCode(n))e=n}));if(!e&&this.options.supportedLngs){t.forEach((t=>{if(e)return;const n=this.getScriptPartFromCode(t);if(this.isSupportedCode(n))return e=n;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>{if(t===i)return t;if(t.indexOf("-")<0&&i.indexOf("-")<0)return;if(t.indexOf("-")>0&&i.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===i)return t;if(t.indexOf(i)===0&&i.length>1)return t}))}))}if(!e)e=this.getFallbackCodes(this.options.fallbackLng)[0];return e}getFallbackCodes(t,e){if(!t)return[];if(typeof t==="function")t=t(e);if(s(t))t=[t];if(Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];if(!n)n=t[this.getScriptPartFromCode(e)];if(!n)n=t[this.formatLanguageCode(e)];if(!n)n=t[this.getLanguagePartFromCode(e)];if(!n)n=t.default;return n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes((e===false?[]:e)||this.options.fallbackLng||[],t);const i=[];const r=t=>{if(!t)return;if(this.isSupportedCode(t)){i.push(t)}else{this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`)}};if(s(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)){if(this.options.load!=="languageOnly")r(this.formatLanguageCode(t));if(this.options.load!=="languageOnly"&&this.options.load!=="currentOnly")r(this.getScriptPartFromCode(t));if(this.options.load!=="currentOnly")r(this.getLanguagePartFromCode(t))}else if(s(t)){r(this.formatLanguageCode(t))}n.forEach((t=>{if(i.indexOf(t)<0)r(this.formatLanguageCode(t))}));return i}}const E={zero:0,one:1,two:2,few:3,many:4,other:5};const M={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class U{constructor(t,e={}){this.languageUtils=t;this.options=e;this.logger=N.create("pluralResolver");this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const n=k(t==="dev"?"en":t);const i=e.ordinal?"ordinal":"cardinal";const s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache){return this.pluralRulesCache[s]}let r;try{r=new Intl.PluralRules(n,{type:i})}catch(n){if(!Intl){this.logger.error("No Intl support, please use an Intl polyfill!");return M}if(!t.match(/-|_/))return M;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}this.pluralRulesCache[s]=r;return r}needsPlural(t,e={}){let n=this.getRule(t,e);if(!n)n=this.getRule("dev",e);return n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,n={}){return this.getSuffixes(t,n).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let n=this.getRule(t,e);if(!n)n=this.getRule("dev",e);if(!n)return[];return n.resolvedOptions().pluralCategories.sort(((t,e)=>E[t]-E[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`))}getSuffix(t,e,n={}){const i=this.getRule(t,n);if(i){return`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`}this.logger.warn(`no plural rule found for: ${t}`);return this.getSuffix("dev",e,n)}}const B=(t,e,n,i=".",r=true)=>{let o=m(t,e,n);if(!o&&r&&s(n)){o=S(t,n,i);if(o===undefined)o=S(e,n,i)}return o};const V=t=>t.replace(/\$/g,"$$$$");class H{constructor(t={}){this.logger=N.create("interpolator");this.options=t;this.format=t?.interpolation?.format||(t=>t);this.init(t)}init(t={}){if(!t.interpolation)t.interpolation={escapeValue:true};const{escape:e,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:f,formatSeparator:u,unescapeSuffix:c,unescapePrefix:a,nestingPrefix:h,nestingPrefixEscaped:l,nestingSuffix:d,nestingSuffixEscaped:p,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:j}=t.interpolation;this.escape=e!==undefined?e:y;this.escapeValue=n!==undefined?n:true;this.useRawValueToEscape=i!==undefined?i:false;this.prefix=s?g(s):r||"{{";this.suffix=o?g(o):f||"}}";this.formatSeparator=u||",";this.unescapePrefix=c?"":a||"-";this.unescapeSuffix=this.unescapePrefix?"":c||"";this.nestingPrefix=h?g(h):l||g("$t(");this.nestingSuffix=d?g(d):p||g(")");this.nestingOptionsSeparator=m||",";this.maxReplaces=b||1e3;this.alwaysFormat=j!==undefined?j:false;this.resetRegExp()}reset(){if(this.options)this.init(this.options)}resetRegExp(){const t=(t,e)=>{if(t?.source===e){t.lastIndex=0;return t}return 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,n,i){let r;let f;let u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};const a=t=>{if(t.indexOf(this.formatSeparator)<0){const s=B(e,c,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,undefined,n,{...i,...e,interpolationkey:t}):s}const s=t.split(this.formatSeparator);const r=s.shift().trim();const o=s.join(this.formatSeparator).trim();return this.format(B(e,c,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...i,...e,interpolationkey:r})};this.resetRegExp();const h=i?.missingInterpolationHandler||this.options.missingInterpolationHandler;const l=i?.interpolation?.skipOnVariables!==undefined?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;const d=[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?V(this.escape(t)):V(t)}];d.forEach((e=>{u=0;while(r=e.regex.exec(t)){const n=r[1].trim();f=a(n);if(f===undefined){if(typeof h==="function"){const e=h(t,r,i);f=s(e)?e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n)){f=""}else if(l){f=r[0];continue}else{this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`);f=""}}else if(!s(f)&&!this.useRawValueToEscape){f=o(f)}const c=e.safeValue(f);t=t.replace(r[0],c);if(l){e.regex.lastIndex+=f.length;e.regex.lastIndex-=r[0].length}else{e.regex.lastIndex=0}u++;if(u>=this.maxReplaces){break}}}));return t}nest(t,e,n={}){let i;let r;let f;const u=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const i=t.split(new RegExp(`${n}[ ]*{`));let s=`{${i[1]}`;t=i[0];s=this.interpolate(s,f);const r=s.match(/'/g);const o=s.match(/"/g);if((r?.length??0)%2===0&&!o||o.length%2!==0){s=s.replace(/'/g,'"')}try{f=JSON.parse(s);if(e)f={...e,...f}}catch(e){this.logger.warn(`failed parsing options string in nesting for key ${t}`,e);return`${t}${n}${s}`}if(f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1)delete f.defaultValue;return t};while(i=this.nestingRegexp.exec(t)){let c=[];f={...n};f=f.replace&&!s(f.replace)?f.replace:f;f.applyPostProcessor=false;delete f.defaultValue;const a=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(a!==-1){c=i[1].slice(a).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean);i[1]=i[1].slice(0,a)}r=e(u.call(this,i[1].trim(),f),f);if(r&&i[0]===t&&!s(r))return r;if(!s(r))r=o(r);if(!r){this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`);r=""}if(c.length){r=c.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:i[1].trim()})),r.trim())}t=t.replace(i[0],r);this.regexp.lastIndex=0}return t}}const q=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);if(e==="currency"&&s.indexOf(":")<0){if(!n.currency)n.currency=s.trim()}else if(e==="relativetime"&&s.indexOf(":")<0){if(!n.range)n.range=s.trim()}else{const t=s.split(";");t.forEach((t=>{if(t){const[e,...i]=t.split(":");const s=i.join(":").trim().replace(/^'+|'+$/g,"");const r=e.trim();if(!n[r])n[r]=s;if(s==="false")n[r]=false;if(s==="true")n[r]=true;if(!isNaN(s))n[r]=parseInt(s,10)}}))}}return{formatName:e,formatOptions:n}};const D=t=>{const e={};return(n,i,s)=>{let r=s;if(s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]){r={...r,[s.interpolationkey]:undefined}}const o=i+JSON.stringify(r);let f=e[o];if(!f){f=t(k(i),s);e[o]=f}return f(n)}};const K=t=>(e,n,i)=>t(k(n),i)(e);class F{constructor(t={}){this.logger=N.create("formatter");this.options=t;this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const n=e.cacheInBuiltFormats?D:K;this.formats={number:n(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:n(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:n(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:n(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:n(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=D(e)}format(t,e,n,i={}){const s=e.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find((t=>t.indexOf(")")>-1))){const t=s.findIndex((t=>t.indexOf(")")>-1));s[0]=[s[0],...s.splice(1,t)].join(this.formatSeparator)}const r=s.reduce(((t,e)=>{const{formatName:s,formatOptions:r}=q(e);if(this.formats[s]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};const f=o.locale||o.lng||i.locale||i.lng||n;e=this.formats[s](t,f,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}else{this.logger.warn(`there was no format function for ${s}`)}return t}),t);return r}}const _=(t,e)=>{if(t.pending[e]!==undefined){delete t.pending[e];t.pendingCount--}};class J extends R{constructor(t,e,n,i={}){super();this.backend=t;this.store=e;this.services=n;this.languageUtils=n.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?.init?.(n,i.backend,i)}queueLoad(t,e,n,i){const s={};const r={};const o={};const f={};t.forEach((t=>{let i=true;e.forEach((e=>{const o=`${t}|${e}`;if(!n.reload&&this.store.hasResourceBundle(t,e)){this.state[o]=2}else if(this.state[o]<0);else if(this.state[o]===1){if(r[o]===undefined)r[o]=true}else{this.state[o]=1;i=false;if(r[o]===undefined)r[o]=true;if(s[o]===undefined)s[o]=true;if(f[e]===undefined)f[e]=true}}));if(!i)o[t]=true}));if(Object.keys(s).length||Object.keys(r).length){this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i})}return{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(f)}}loaded(t,e,n){const i=t.split("|");const s=i[0];const r=i[1];if(e)this.emit("failedLoading",s,r,e);if(!e&&n){this.store.addResourceBundle(s,r,n,undefined,undefined,{skipCopy:true})}this.state[t]=e?-1:2;if(e&&n)this.state[t]=0;const o={};this.queue.forEach((n=>{d(n.loaded,[s],r);_(n,t);if(e)n.errors.push(e);if(n.pendingCount===0&&!n.done){Object.keys(n.loaded).forEach((t=>{if(!o[t])o[t]={};const e=n.loaded[t];if(e.length){e.forEach((e=>{if(o[t][e]===undefined)o[t][e]=true}))}}));n.done=true;if(n.errors.length){n.callback(n.errors)}else{n.callback()}}}));this.emit("loaded",o);this.queue=this.queue.filter((t=>!t.done))}read(t,e,n,i=0,s=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:s,callback:r});return}this.readingCalls++;const o=(o,f)=>{this.readingCalls--;if(this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}if(o&&f&&i<this.maxRetries){setTimeout((()=>{this.read.call(this,t,e,n,i+1,s*2,r)}),s);return}r(o,f)};const f=this.backend[n].bind(this.backend);if(f.length===2){try{const n=f(t,e);if(n&&typeof n.then==="function"){n.then((t=>o(null,t))).catch(o)}else{o(null,n)}}catch(t){o(t)}return}return f(t,e,o)}prepareLoading(t,e,n={},i){if(!this.backend){this.logger.warn("No backend was added via i18next.use. Will not load resources.");return i&&i()}if(s(t))t=this.languageUtils.toResolveHierarchy(t);if(s(e))e=[e];const r=this.queueLoad(t,e,n,i);if(!r.toLoad.length){if(!r.pending.length)i();return null}r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:true},n)}loadOne(t,e=""){const n=t.split("|");const i=n[0];const s=n[1];this.read(i,s,"read",undefined,undefined,((n,r)=>{if(n)this.logger.warn(`${e}loading namespace ${s} for language ${i} failed`,n);if(!n&&r)this.logger.log(`${e}loaded namespace ${s} for language ${i}`,r);this.loaded(t,n,r)}))}saveMissing(t,e,n,i,s,r={},o=(()=>{})){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(e)){this.logger.warn(`did not save key "${n}" 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!!!");return}if(n===undefined||n===null||n==="")return;if(this.backend?.create){const f={...r,isUpdate:s};const u=this.backend.create.bind(this.backend);if(u.length<6){try{let s;if(u.length===5){s=u(t,e,n,i,f)}else{s=u(t,e,n,i)}if(s&&typeof s.then==="function"){s.then((t=>o(null,t))).catch(o)}else{o(null,s)}}catch(t){o(t)}}else{u(t,e,n,i,o,f)}}if(!t||!t[0])return;this.store.addResource(t[0],e,n,i)}}const X=()=>({debug:false,initAsync:true,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:false,supportedLngs:false,nonExplicitSupportedLngs:false,load:"all",preload:false,simplifyPluralSuffix:true,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:false,saveMissing:false,updateMissing:false,saveMissingTo:"fallback",saveMissingPlurals:true,missingKeyHandler:false,missingInterpolationHandler:false,postProcess:false,postProcessPassResolved:false,returnNull:false,returnEmptyString:true,returnObjects:false,joinArrays:false,returnedObjectHandler:false,parseMissingKeyHandler:false,appendNamespaceToMissingKey:false,appendNamespaceToCIMode:false,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]==="object")e=t[1];if(s(t[1]))e.defaultValue=t[1];if(s(t[2]))e.tDescription=t[2];if(typeof t[2]==="object"||typeof t[3]==="object"){const n=t[3]||t[2];Object.keys(n).forEach((t=>{e[t]=n[t]}))}return e},interpolation:{escapeValue:true,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:true},cacheInBuiltFormats:true});const Y=t=>{if(s(t.ns))t.ns=[t.ns];if(s(t.fallbackLng))t.fallbackLng=[t.fallbackLng];if(s(t.fallbackNS))t.fallbackNS=[t.fallbackNS];if(t.supportedLngs?.indexOf?.("cimode")<0){t.supportedLngs=t.supportedLngs.concat(["cimode"])}if(typeof t.initImmediate==="boolean")t.initAsync=t.initImmediate;return t};const W=()=>{};const G=t=>{const e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach((e=>{if(typeof t[e]==="function"){t[e]=t[e].bind(t)}}))};class Z extends R{constructor(t={},e){super();this.options=Y(t);this.services={};this.logger=N;this.modules={external:[]};G(this);if(e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync){this.init(t,e);return this}setTimeout((()=>{this.init(t,e)}),0)}}init(t={},e){this.isInitializing=true;if(typeof t==="function"){e=t;t={}}if(t.defaultNS==null&&t.ns){if(s(t.ns)){t.defaultNS=t.ns}else if(t.ns.indexOf("translation")<0){t.defaultNS=t.ns[0]}}const n=X();this.options={...n,...this.options,...Y(t)};this.options.interpolation={...n.interpolation,...this.options.interpolation};if(t.keySeparator!==undefined){this.options.userDefinedKeySeparator=t.keySeparator}if(t.nsSeparator!==undefined){this.options.userDefinedNsSeparator=t.nsSeparator}const i=t=>{if(!t)return null;if(typeof t==="function")return new t;return t};if(!this.options.isClone){if(this.modules.logger){N.init(i(this.modules.logger),this.options)}else{N.init(null,this.options)}let t;if(this.modules.formatter){t=this.modules.formatter}else{t=F}const e=new A(this.options);this.store=new P(this.options.resources,this.options);const s=this.services;s.logger=N;s.resourceStore=this.store;s.languageUtils=e;s.pluralResolver=new U(e,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});const r=this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format;if(r){this.logger.warn(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`)}if(t&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)){s.formatter=i(t);if(s.formatter.init)s.formatter.init(s,this.options);this.options.interpolation.format=s.formatter.format.bind(s.formatter)}s.interpolator=new H(this.options);s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)};s.backendConnector=new J(i(this.modules.backend),s.resourceStore,s,this.options);s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)}));if(this.modules.languageDetector){s.languageDetector=i(this.modules.languageDetector);if(s.languageDetector.init)s.languageDetector.init(s,this.options.detection,this.options)}if(this.modules.i18nFormat){s.i18nFormat=i(this.modules.i18nFormat);if(s.i18nFormat.init)s.i18nFormat.init(this)}this.translator=new z(this.services,this.options);this.translator.on("*",((t,...e)=>{this.emit(t,...e)}));this.modules.external.forEach((t=>{if(t.init)t.init(this)}))}this.format=this.options.interpolation.format;if(!e)e=W;if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);if(t.length>0&&t[0]!=="dev")this.options.lng=t[0]}if(!this.services.languageDetector&&!this.options.lng){this.logger.warn("init: no languageDetector is used and no lng is defined")}const o=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];o.forEach((t=>{this[t]=(...e)=>this.store[t](...e)}));const f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach((t=>{this[t]=(...e)=>{this.store[t](...e);return this}}));const u=r();const c=()=>{const t=(t,n)=>{this.isInitializing=false;if(this.isInitialized&&!this.initializedStoreOnce)this.logger.warn("init: i18next is already initialized. You should call init just once!");this.isInitialized=true;if(!this.options.isClone)this.logger.log("initialized",this.options);this.emit("initialized",this.options);u.resolve(n);e(t,n)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};if(this.options.resources||!this.options.initAsync){c()}else{setTimeout(c,0)}return u}loadResources(t,e=W){let n=e;const i=s(t)?t:this.language;if(typeof t==="function")n=t;if(!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const t=[];const e=e=>{if(!e)return;if(e==="cimode")return;const n=this.services.languageUtils.toResolveHierarchy(e);n.forEach((e=>{if(e==="cimode")return;if(t.indexOf(e)<0)t.push(e)}))};if(!i){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.forEach((t=>e(t)))}else{e(i)}this.options.preload?.forEach?.((t=>e(t)));this.services.backendConnector.load(t,this.options.ns,(t=>{if(!t&&!this.resolvedLanguage&&this.language)this.setResolvedLanguage(this.language);n(t)}))}else{n(null)}}reloadResources(t,e,n){const i=r();if(typeof t==="function"){n=t;t=undefined}if(typeof e==="function"){n=e;e=undefined}if(!t)t=this.languages;if(!e)e=this.options.ns;if(!n)n=W;this.services.backendConnector.reload(t,e,(t=>{i.resolve();n(t)}));return 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()");if(t.type==="backend"){this.modules.backend=t}if(t.type==="logger"||t.log&&t.warn&&t.error){this.modules.logger=t}if(t.type==="languageDetector"){this.modules.languageDetector=t}if(t.type==="i18nFormat"){this.modules.i18nFormat=t}if(t.type==="postProcessor"){C.addPostProcessor(t)}if(t.type==="formatter"){this.modules.formatter=t}if(t.type==="3rdParty"){this.modules.external.push(t)}return this}setResolvedLanguage(t){if(!t||!this.languages)return;if(["cimode","dev"].indexOf(t)>-1)return;for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(["cimode","dev"].indexOf(e)>-1)continue;if(this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}if(!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;this.languages.unshift(t)}}changeLanguage(t,e){this.isLanguageChangingTo=t;const n=r();this.emit("languageChanging",t);const i=t=>{this.language=t;this.languages=this.services.languageUtils.toResolveHierarchy(t);this.resolvedLanguage=undefined;this.setResolvedLanguage(t)};const o=(s,r)=>{if(r){if(this.isLanguageChangingTo===t){i(r);this.translator.changeLanguage(r);this.isLanguageChangingTo=undefined;this.emit("languageChanged",r);this.logger.log("languageChanged",r)}}else{this.isLanguageChangingTo=undefined}n.resolve(((...t)=>this.t(...t)));if(e)e(s,((...t)=>this.t(...t)))};const f=e=>{if(!t&&!e&&this.services.languageDetector)e=[];const n=s(e)?e:e&&e[0];const r=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(s(e)?[e]:e);if(r){if(!this.language){i(r)}if(!this.translator.language)this.translator.changeLanguage(r);this.services.languageDetector?.cacheUserLanguage?.(r)}this.loadResources(r,(t=>{o(t,r)}))};if(!t&&this.services.languageDetector&&!this.services.languageDetector.async){f(this.services.languageDetector.detect())}else if(!t&&this.services.languageDetector&&this.services.languageDetector.async){if(this.services.languageDetector.detect.length===0){this.services.languageDetector.detect().then(f)}else{this.services.languageDetector.detect(f)}}else{f(t)}return n}getFixedT(t,e,n){const i=(t,e,...s)=>{let r;if(typeof e!=="object"){r=this.options.overloadTranslationOptionHandler([t,e].concat(s))}else{r={...e}}r.lng=r.lng||i.lng;r.lngs=r.lngs||i.lngs;r.ns=r.ns||i.ns;if(r.keyPrefix!=="")r.keyPrefix=r.keyPrefix||n||i.keyPrefix;const o=this.options.keySeparator||".";let f;if(r.keyPrefix&&Array.isArray(t)){f=t.map((t=>`${r.keyPrefix}${o}${t}`))}else{f=r.keyPrefix?`${r.keyPrefix}${o}${t}`:t}return this.t(f,r)};if(s(t)){i.lng=t}else{i.lngs=t}i.ns=e;i.keyPrefix=n;return i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized){this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages);return false}if(!this.languages||!this.languages.length){this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages);return false}const n=e.lng||this.resolvedLanguage||this.languages[0];const i=this.options?this.options.fallbackLng:false;const s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return true;const r=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return n===-1||n===0||n===2};if(e.precheck){const t=e.precheck(this,r);if(t!==undefined)return t}if(this.hasResourceBundle(n,t))return true;if(!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return true;if(r(n,t)&&(!i||r(s,t)))return true;return false}loadNamespaces(t,e){const n=r();if(!this.options.ns){if(e)e();return Promise.resolve()}if(s(t))t=[t];t.forEach((t=>{if(this.options.ns.indexOf(t)<0)this.options.ns.push(t)}));this.loadResources((t=>{n.resolve();if(e)e(t)}));return n}loadLanguages(t,e){const n=r();if(s(t))t=[t];const i=this.options.preload||[];const o=t.filter((t=>i.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));if(!o.length){if(e)e();return Promise.resolve()}this.options.preload=i.concat(o);this.loadResources((t=>{n.resolve();if(e)e(t)}));return n}dir(t){if(!t)t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language);if(!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=["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"];const n=this.services?.languageUtils||new A(X());if(t.toLowerCase().indexOf("-latn")>1)return"ltr";return e.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){return new Z(t,e)}cloneInstance(t={},e=W){const n=t.forkResourceStore;if(n)delete t.forkResourceStore;const i={...this.options,...t,...{isClone:true}};const s=new Z(i);if(t.debug!==undefined||t.prefix!==undefined){s.logger=s.logger.clone(t)}const r=["store","services","language"];r.forEach((t=>{s[t]=this[t]}));s.services={...this.services};s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)};if(n){const t=Object.keys(this.store.data).reduce(((t,e)=>{t[e]={...this.store.data[e]};t[e]=Object.keys(t[e]).reduce(((n,i)=>{n[i]={...t[e][i]};return n}),t[e]);return t}),{});s.store=new P(t,i);s.services.resourceStore=s.store}s.translator=new z(s.services,i);s.translator.on("*",((t,...e)=>{s.emit(t,...e)}));s.init(i,e);s.translator.options=i;s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)};return s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Q=Z.createInstance();Q.createInstance=Z.createInstance;function tt(){return window}function et(t){return{version:"3.32.3-pre.db0f81d011",headlessVersion:t}}function nt(){return et("").version}function it(t,e){if(tt()[t]){return}tt()[t]=et(e)}const st={af:()=>import("./p-3c099031.js").then((function(t){return t.a})),am:()=>import("./p-c87690e2.js").then((function(t){return t.a})),"ar-DZ":()=>import("./p-7c3db1b6.js").then((function(t){return t.a})),"ar-IQ":()=>import("./p-9659caca.js").then((function(t){return t.a})),"ar-KW":()=>import("./p-6f1d2845.js").then((function(t){return t.a})),"ar-LY":()=>import("./p-a13c6436.js").then((function(t){return t.a})),"ar-MA":()=>import("./p-c22943b1.js").then((function(t){return t.a})),"ar-SA":()=>import("./p-054edfff.js").then((function(t){return t.a})),"ar-TN":()=>import("./p-09fd85b0.js").then((function(t){return t.a})),ar:()=>import("./p-b1271f93.js").then((function(t){return t.a})),az:()=>import("./p-efab8b3e.js").then((function(t){return t.a})),be:()=>import("./p-b1cf2121.js").then((function(t){return t.b})),bg:()=>import("./p-23fe0271.js").then((function(t){return t.b})),bi:()=>import("./p-471f92a1.js").then((function(t){return t.b})),bm:()=>import("./p-8e3bce04.js").then((function(t){return t.b})),"bn-BD":()=>import("./p-d023b747.js").then((function(t){return t.b})),bn:()=>import("./p-b532c3b4.js").then((function(t){return t.b})),bo:()=>import("./p-b65e1ace.js").then((function(t){return t.b})),br:()=>import("./p-0a0bba8e.js").then((function(t){return t.b})),bs:()=>import("./p-c88f3b27.js").then((function(t){return t.b})),ca:()=>import("./p-4f69d4b6.js").then((function(t){return t.c})),cs:()=>import("./p-d3ff7338.js").then((function(t){return t.c})),cv:()=>import("./p-3269cb86.js").then((function(t){return t.c})),cy:()=>import("./p-b1df53e9.js").then((function(t){return t.c})),"de-AT":()=>import("./p-42b532d7.js").then((function(t){return t.d})),da:()=>import("./p-8202e9af.js").then((function(t){return t.d})),"de-CH":()=>import("./p-5ab08619.js").then((function(t){return t.d})),de:()=>import("./p-00299df3.js").then((function(t){return t.d})),dv:()=>import("./p-a887c4d4.js").then((function(t){return t.d})),el:()=>import("./p-fc7bfc8e.js").then((function(t){return t.e})),"en-AU":()=>import("./p-32cc14f7.js").then((function(t){return t.e})),"en-CA":()=>import("./p-a8260596.js").then((function(t){return t.e})),"en-GB":()=>import("./p-81d97ebc.js").then((function(t){return t.e})),"en-IE":()=>import("./p-5e08bfc5.js").then((function(t){return t.e})),"en-IL":()=>import("./p-2bad6025.js").then((function(t){return t.e})),"en-IN":()=>import("./p-f51cba86.js").then((function(t){return t.e})),"en-NZ":()=>import("./p-7e2b0488.js").then((function(t){return t.e})),"en-SG":()=>import("./p-453fd434.js").then((function(t){return t.e})),"en-TT":()=>import("./p-31b5e03e.js").then((function(t){return t.e})),eo:()=>import("./p-2bab8d88.js").then((function(t){return t.e})),en:()=>import("./p-64eaf609.js").then((function(t){return t.e})),"es-DO":()=>import("./p-7a8aa43b.js").then((function(t){return t.e})),"es-MX":()=>import("./p-75c7286f.js").then((function(t){return t.e})),"es-PR":()=>import("./p-3ce1b85f.js").then((function(t){return t.e})),"es-US":()=>import("./p-8a105c02.js").then((function(t){return t.e})),et:()=>import("./p-a96e28a4.js").then((function(t){return t.e})),es:()=>import("./p-543cdc32.js").then((function(t){return t.e})),eu:()=>import("./p-b4d42ed4.js").then((function(t){return t.e})),fa:()=>import("./p-8ba8e244.js").then((function(t){return t.f})),fo:()=>import("./p-262f73d0.js").then((function(t){return t.f})),fi:()=>import("./p-4a1063ca.js").then((function(t){return t.f})),"fr-CA":()=>import("./p-a7e47a8a.js").then((function(t){return t.f})),"fr-CH":()=>import("./p-46a7eb81.js").then((function(t){return t.f})),fr:()=>import("./p-bb9daef3.js").then((function(t){return t.f})),fy:()=>import("./p-6042ffd7.js").then((function(t){return t.f})),ga:()=>import("./p-26f44631.js").then((function(t){return t.g})),gd:()=>import("./p-75202177.js").then((function(t){return t.g})),"gom-LATN":()=>import("./p-d7998253.js").then((function(t){return t.g})),gl:()=>import("./p-50561ab0.js").then((function(t){return t.g})),gu:()=>import("./p-83a77107.js").then((function(t){return t.g})),he:()=>import("./p-5ceee30e.js").then((function(t){return t.h})),hi:()=>import("./p-1882fbca.js").then((function(t){return t.h})),hr:()=>import("./p-b8a4aa4b.js").then((function(t){return t.h})),hu:()=>import("./p-0c3fbc77.js").then((function(t){return t.h})),ht:()=>import("./p-43f31fbe.js").then((function(t){return t.h})),"hy-AM":()=>import("./p-f56ce40e.js").then((function(t){return t.h})),id:()=>import("./p-6557bf7e.js").then((function(t){return t.i})),is:()=>import("./p-ace08720.js").then((function(t){return t.i})),"it-CH":()=>import("./p-f1f21d6e.js").then((function(t){return t.i})),it:()=>import("./p-81838009.js").then((function(t){return t.i})),ja:()=>import("./p-ac2eb8a3.js").then((function(t){return t.j})),jv:()=>import("./p-bba54ad4.js").then((function(t){return t.j})),ka:()=>import("./p-d346fda6.js").then((function(t){return t.k})),kk:()=>import("./p-85533b73.js").then((function(t){return t.k})),km:()=>import("./p-713d90d0.js").then((function(t){return t.k})),kn:()=>import("./p-c4c45b46.js").then((function(t){return t.k})),ko:()=>import("./p-197861d9.js").then((function(t){return t.k})),ku:()=>import("./p-b6eaf7f2.js").then((function(t){return t.k})),ky:()=>import("./p-61ce88da.js").then((function(t){return t.k})),lb:()=>import("./p-23045923.js").then((function(t){return t.l})),lo:()=>import("./p-cb7d2749.js").then((function(t){return t.l})),lt:()=>import("./p-ce6a7078.js").then((function(t){return t.l})),lv:()=>import("./p-411f2bcd.js").then((function(t){return t.l})),me:()=>import("./p-645e157a.js").then((function(t){return t.m})),mi:()=>import("./p-bd5ec388.js").then((function(t){return t.m})),mk:()=>import("./p-32cdf6c7.js").then((function(t){return t.m})),ml:()=>import("./p-0362d1fa.js").then((function(t){return t.m})),mn:()=>import("./p-8753fa48.js").then((function(t){return t.m})),mr:()=>import("./p-3ff71c40.js").then((function(t){return t.m})),"ms-MY":()=>import("./p-b7727e4c.js").then((function(t){return t.m})),ms:()=>import("./p-55c53d7a.js").then((function(t){return t.m})),mt:()=>import("./p-d8cf9350.js").then((function(t){return t.m})),my:()=>import("./p-f4289c7e.js").then((function(t){return t.m})),nb:()=>import("./p-7cbb15ea.js").then((function(t){return t.n})),ne:()=>import("./p-45fe81ce.js").then((function(t){return t.n})),"nl-BE":()=>import("./p-f3cd0211.js").then((function(t){return t.n})),nl:()=>import("./p-884a6d47.js").then((function(t){return t.n})),pl:()=>import("./p-b50b877c.js").then((function(t){return t.p})),"pt-BR":()=>import("./p-4f22eacd.js").then((function(t){return t.p})),pt:()=>import("./p-b0d972cd.js").then((function(t){return t.p})),rn:()=>import("./p-581d79f1.js").then((function(t){return t.r})),ro:()=>import("./p-4fb790a7.js").then((function(t){return t.r})),ru:()=>import("./p-5306660e.js").then((function(t){return t.r})),rw:()=>import("./p-b67e688b.js").then((function(t){return t.r})),sd:()=>import("./p-c71d32b8.js").then((function(t){return t.s})),se:()=>import("./p-428e5beb.js").then((function(t){return t.s})),si:()=>import("./p-639d46d2.js").then((function(t){return t.s})),sk:()=>import("./p-388dd6d3.js").then((function(t){return t.s})),sl:()=>import("./p-00f52fed.js").then((function(t){return t.s})),sq:()=>import("./p-2980dae7.js").then((function(t){return t.s})),"sr-CYRL":()=>import("./p-4e7f106a.js").then((function(t){return t.s})),ss:()=>import("./p-b738cbbc.js").then((function(t){return t.s})),"sv-FI":()=>import("./p-830c2d51.js").then((function(t){return t.s})),sr:()=>import("./p-e7feeccc.js").then((function(t){return t.s})),sv:()=>import("./p-e4be788b.js").then((function(t){return t.s})),sw:()=>import("./p-8a78f354.js").then((function(t){return t.s})),ta:()=>import("./p-f2ff8291.js").then((function(t){return t.t})),te:()=>import("./p-84bb7a02.js").then((function(t){return t.t})),tet:()=>import("./p-c08286c7.js").then((function(t){return t.t})),tg:()=>import("./p-b84bfa14.js").then((function(t){return t.t})),th:()=>import("./p-8792b623.js").then((function(t){return t.t})),tk:()=>import("./p-a7a17cb4.js").then((function(t){return t.t})),"tl-PH":()=>import("./p-80d26cad.js").then((function(t){return t.t})),tlh:()=>import("./p-dbaccc34.js").then((function(t){return t.t})),tr:()=>import("./p-9c4d6a70.js").then((function(t){return t.t})),tzl:()=>import("./p-a59b3b6c.js").then((function(t){return t.t})),"tzm-LATN":()=>import("./p-9ad32c93.js").then((function(t){return t.t})),tzm:()=>import("./p-eff31a13.js").then((function(t){return t.t})),"ug-CN":()=>import("./p-c0ccfcbe.js").then((function(t){return t.u})),uk:()=>import("./p-e36692c2.js").then((function(t){return t.u})),ur:()=>import("./p-e759fb8b.js").then((function(t){return t.u})),"uz-LATN":()=>import("./p-7819f99b.js").then((function(t){return t.u})),uz:()=>import("./p-fdf12072.js").then((function(t){return t.u})),vi:()=>import("./p-93d3253f.js").then((function(t){return t.v})),"x-PSEUDO":()=>import("./p-6bb4463b.js").then((function(t){return t.x})),yo:()=>import("./p-e13d41d3.js").then((function(t){return t.y})),"zh-CN":()=>import("./p-16e217b0.js").then((function(t){return t.z})),"zh-HK":()=>import("./p-75dd9c7a.js").then((function(t){return t.z})),"zh-TW":()=>import("./p-7a311621.js").then((function(t){return t.z})),zh:()=>import("./p-a7944a8b.js").then((function(t){return t.z})),"oc-LNC":()=>import("./p-89b21606.js").then((function(t){return t.o})),nn:()=>import("./p-5826d382.js").then((function(t){return t.n})),"pa-IN":()=>import("./p-ebe0100b.js").then((function(t){return t.p}))};const rt=t=>console.warn(`Cannot load dayjs locale file for "${t}"`);const ot=t=>{if(st[t]){return t}if(t.includes("-")){const e=t.split("-")[0];if(st[e]){return e}}return t};function ft(e){const n=ot(e);if(!st[n]){rt(n);return}try{st[n]().then((()=>t.locale(n)))}catch(t){rt(n)}}function ut(t){"@babel/helpers - typeof";return ut="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},ut(t)}function ct(){return typeof XMLHttpRequest==="function"||(typeof XMLHttpRequest==="undefined"?"undefined":ut(XMLHttpRequest))==="object"}function at(t){return!!t&&typeof t.then==="function"}function ht(t){if(at(t)){return t}return Promise.resolve(t)}function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function dt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){pt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pt(t,e,n){return(e=mt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mt(t){var e=bt(t,"string");return"symbol"==gt(e)?e:e+""}function bt(t,e){if("object"!=gt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=gt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function gt(t){"@babel/helpers - typeof";return gt="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},gt(t)}var jt=typeof fetch==="function"?fetch:undefined;if(typeof global!=="undefined"&&global.fetch){jt=global.fetch}else if(typeof window!=="undefined"&&window.fetch){jt=window.fetch}var yt;if(ct()){if(typeof global!=="undefined"&&global.XMLHttpRequest){yt=global.XMLHttpRequest}else if(typeof window!=="undefined"&&window.XMLHttpRequest){yt=window.XMLHttpRequest}}var vt;if(typeof ActiveXObject==="function"){if(typeof global!=="undefined"&&global.ActiveXObject){vt=global.ActiveXObject}else if(typeof window!=="undefined"&&window.ActiveXObject){vt=window.ActiveXObject}}if(typeof jt!=="function")jt=undefined;if(!jt&&!yt&&!vt){try{import("./p-6f1cd43d.js").then((function(t){return t.b})).then((function(t){jt=t.default})).catch((function(){}))}catch(t){}}var wt=function t(e,n){if(n&>(n)==="object"){var i="";for(var s in n){i+="&"+encodeURIComponent(s)+"="+encodeURIComponent(n[s])}if(!i)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+i.slice(1)}return e};var $t=function t(e,n,i,s){var r=function t(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then((function(t){i(null,{status:e.status,data:t})})).catch(i)};if(s){var o=s(e,n);if(o instanceof Promise){o.then(r).catch(i);return}}if(typeof fetch==="function"){fetch(e,n).then(r).catch(i)}else{jt(e,n).then(r).catch(i)}};var Ot=false;var St=function t(e,n,i,s){if(e.queryStringParams){n=wt(n,e.queryStringParams)}var r=dt({},typeof e.customHeaders==="function"?e.customHeaders():e.customHeaders);if(typeof window==="undefined"&&typeof global!=="undefined"&&typeof global.process!=="undefined"&&global.process.versions&&global.process.versions.node){r["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")}if(i)r["Content-Type"]="application/json";var o=typeof e.requestOptions==="function"?e.requestOptions(i):e.requestOptions;var f=dt({method:i?"POST":"GET",body:i?e.stringify(i):undefined,headers:r},Ot?{}:o);var u=typeof e.alternateFetch==="function"&&e.alternateFetch.length>=1?e.alternateFetch:undefined;try{$t(n,f,s,u)}catch(t){if(!o||Object.keys(o).length===0||!t.message||t.message.indexOf("not implemented")<0){return s(t)}try{Object.keys(o).forEach((function(t){delete f[t]}));$t(n,f,s,u);Ot=true}catch(t){s(t)}}};var kt=function t(e,n,i,s){if(i&>(i)==="object"){i=wt("",i).slice(1)}if(e.queryStringParams){n=wt(n,e.queryStringParams)}try{var r=yt?new yt:new vt("MSXML2.XMLHTTP.3.0");r.open(i?"POST":"GET",n,1);if(!e.crossDomain){r.setRequestHeader("X-Requested-With","XMLHttpRequest")}r.withCredentials=!!e.withCredentials;if(i){r.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}if(r.overrideMimeType){r.overrideMimeType("application/json")}var o=e.customHeaders;o=typeof o==="function"?o():o;if(o){for(var f in o){r.setRequestHeader(f,o[f])}}r.onreadystatechange=function(){r.readyState>3&&s(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})};r.send(i)}catch(t){console&&console.log(t)}};var xt=function t(e,n,i,s){if(typeof i==="function"){s=i;i=undefined}s=s||function(){};if(jt&&n.indexOf("file:")!==0){return St(e,n,i,s)}if(ct()||typeof ActiveXObject==="function"){return kt(e,n,i,s)}s(new Error("No fetch and no xhr implementation found!"))};function Lt(t){"@babel/helpers - typeof";return Lt="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},Lt(t)}function Nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(n),!0).forEach((function(e){It(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ct(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,zt(i.key),i)}}function Tt(t,e,n){return e&&Ct(t.prototype,e),n&&Ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function It(t,e,n){return(e=zt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zt(t){var e=At(t,"string");return"symbol"==Lt(e)?e:e+""}function At(t,e){if("object"!=Lt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Lt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var Et=function t(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function t(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function t(e,n,i){return It({},n,i||"")},parseLoadPayload:function t(e,n){return undefined},request:xt,reloadInterval:typeof window!=="undefined"?false:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:false,withCredentials:false,overrideMimeType:false,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}};var Mt=function(){function t(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};Pt(this,t);this.services=e;this.options=n;this.allOptions=i;this.type="backend";this.init(e,n,i)}return Tt(t,[{key:"init",value:function t(e){var n=this;var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};this.services=e;this.options=Rt(Rt(Rt({},Et()),this.options||{}),i);this.allOptions=s;if(this.services&&this.options.reloadInterval){var r=setInterval((function(){return n.reload()}),this.options.reloadInterval);if(Lt(r)==="object"&&typeof r.unref==="function")r.unref()}}},{key:"readMulti",value:function t(e,n,i){this._readAny(e,e,n,n,i)}},{key:"read",value:function t(e,n,i){this._readAny([e],e,[n],n,i)}},{key:"_readAny",value:function t(e,n,i,s,r){var o=this;var f=this.options.loadPath;if(typeof this.options.loadPath==="function"){f=this.options.loadPath(e,i)}f=ht(f);f.then((function(t){if(!t)return r(null,{});var f=o.services.interpolator.interpolate(t,{lng:e.join("+"),ns:i.join("+")});o.loadUrl(f,r,n,s)}))}},{key:"loadUrl",value:function t(e,n,i,s){var r=this;var o=typeof i==="string"?[i]:i;var f=typeof s==="string"?[s]:s;var u=this.options.parseLoadPayload(o,f);this.options.request(this.options,e,u,(function(t,o){if(o&&(o.status>=500&&o.status<600||!o.status))return n("failed loading "+e+"; status code: "+o.status,true);if(o&&o.status>=400&&o.status<500)return n("failed loading "+e+"; status code: "+o.status,false);if(!o&&t&&t.message){var f=t.message.toLowerCase();var u=["failed","fetch","network","load"].find((function(t){return f.indexOf(t)>-1}));if(u){return n("failed loading "+e+": "+t.message,true)}}if(t)return n(t,false);var c,a;try{if(typeof o.data==="string"){c=r.options.parse(o.data,i,s)}else{c=o.data}}catch(t){a="failed parsing "+e+" to json"}if(a)return n(a,false);n(null,c)}))}},{key:"create",value:function t(e,n,i,s,r){var o=this;if(!this.options.addPath)return;if(typeof e==="string")e=[e];var f=this.options.parsePayload(n,i,s);var u=0;var c=[];var a=[];e.forEach((function(t){var i=o.options.addPath;if(typeof o.options.addPath==="function"){i=o.options.addPath(t,n)}var s=o.services.interpolator.interpolate(i,{lng:t,ns:n});o.options.request(o.options,s,f,(function(t,n){u+=1;c.push(t);a.push(n);if(u===e.length){if(typeof r==="function")r(c,a)}}))}))}},{key:"reload",value:function t(){var e=this;var n=this.services,i=n.backendConnector,s=n.languageUtils,r=n.logger;var o=i.language;if(o&&o.toLowerCase()==="cimode")return;var f=[];var u=function t(e){var n=s.toResolveHierarchy(e);n.forEach((function(t){if(f.indexOf(t)<0)f.push(t)}))};u(o);if(this.allOptions.preload)this.allOptions.preload.forEach((function(t){return u(t)}));f.forEach((function(t){e.allOptions.ns.forEach((function(e){i.read(t,e,"read",null,null,(function(n,s){if(n)r.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n);if(!n&&s)r.log("loaded namespace ".concat(e," for language ").concat(t),s);i.loaded("".concat(t,"|").concat(e),n,s)}))}))}))}}])}();Mt.type="backend";function Ut(t){const e=new URL("./",window.document.baseURI).href;const n=new URL(t,e);return n.origin!==window.location.origin?n.href:n.pathname}const Bt=["dev","en","fr","cs","da","de","el","es","fi","hu","id","it","ja","ko","nl","no","pl","pt","pt-br","ru","sv","th","tr","zh","zh-cn","zh-tw","zn","es-es"];const Vt="translation";function Ht(t){return Bt.includes(t.toLowerCase())}function qt(t){return{loadPath:`${Ut(t.languageAssetsPath)}/{{lng}}.json?lng={{lng}}&ns={{ns}}`,request:async(t,e,n,i)=>{try{const[t,n]=e.split("?");const s=new URLSearchParams(n);const r=s.get("lng");const o=s.get("ns");if(!Ht(r)){throw new Error(`Unsupported locale "${r}"`)}if(o!==Vt){throw new Error(`Unsupported namespace "${o}"`)}const f=await fetch(t);if(f.status!==200&&f.status!==304){throw new Error(`Unsuccessful request returned status "${f.status}"`)}i(null,{status:f.status,data:await f.json()})}catch(t){i(t,{status:404,data:""})}}}}function Dt(t){return t.i18n.use(Mt).init({debug:t.logLevel==="debug",lng:t.language,nsSeparator:"___",fallbackLng:"en",backend:qt(t),interpolation:{escape:t=>i.sanitize(t)},compatibilityJSON:"v4"})}const Kt=(t,e)=>`A ${e} is configured on the ${t} interface element, but the ${t} interface was initialized with an engine. You should only configure the ${e} in the target engine.`;class Ft{constructor(t,i){this.atomicInterface=t;this.hangingComponentsInitialization=[];it(e,i);const{connectedCallback:s,render:r}=t;t.connectedCallback=()=>{this.i18nPromise=Dt(t);return s&&s.call(t)};t.render=()=>{if(t.error){return n("atomic-component-error",{element:t.host,error:t.error})}return r&&r.call(t)}}onComponentInitializing(t){t.preventDefault();t.stopPropagation();if(this.atomicInterface.engine){t.detail(this.atomicInterface.bindings);return}this.hangingComponentsInitialization.push(t)}async onInitialization(t){if(this.atomicInterface.engine){this.atomicInterface.engine.logger.warn(`The ${this.interfaceTagname} component "initialize" has already been called.`,this.atomicInterface.host);return}this.atomicInterface.updateIconAssetsPath();t();if(this.atomicInterface.registerFieldsToInclude){this.atomicInterface.registerFieldsToInclude()}ft(this.language);await this.i18nPromise;this.initComponents()}onAnalyticsChange(){const{engine:t,analytics:e}=this.atomicInterface;if(!this.engineIsCreated(t)){return}if(!e){t.disableAnalytics();return}t.enableAnalytics()}onLanguageChange(){const{i18n:t,language:e}=this.atomicInterface;ft(this.language);const{resolve:n,promise:i}=Promise.withResolvers();new Mt(t.services,qt(this.atomicInterface)).read(this.language,Vt,(async(i,s)=>{t.addResourceBundle(this.language,Vt,s,true,false);await t.changeLanguage(e);n()}));return i}engineIsCreated(t){if(!t){console.error(`You have to call "initialize" on the ${this.interfaceTagname} component before modifying the props or calling other public methods.`,this.atomicInterface.host);return false}return true}get interfaceTagname(){return this.atomicInterface.host.tagName.toLowerCase()}initComponents(){this.hangingComponentsInitialization.forEach((t=>t.detail(this.atomicInterface.bindings)))}get language(){return this.atomicInterface.language||"en"}}function _t(t,e,n){if(n.analytics?.analyticsClientMiddleware){return n.analytics.analyticsClientMiddleware(t,e)}return e}function Jt(t){if(t.customData){t.customData.coveoAtomicVersion=nt()}return t}function Xt(){return{documentLocation:document.location.href,...document.referrer&&{originLevel3:document.referrer}}}const Yt=/^(\d+\.\d+\.\d+)/;function Wt(){return{source:{"@coveo/atomic":Yt.exec(nt())?.[0]||"0.0.0"}}}function Gt(t,e){const n={enabled:e,documentLocation:document.location.href,...document.referrer&&{originLevel3:document.referrer}};const i=t.analytics??{};Object.assign(i,Wt());Object.assign(n,i);return n}export{Ft as C,_t as a,Jt as b,Xt as c,Wt as d,Gt as g,Q as i,Kt as m};
|
|
2
|
+
//# sourceMappingURL=p-1a4b7b6a.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as t}from"./p-dc3df5ce.js";import{S as e,a as n}from"./p-946fe85f.js";import{g as s}from"./p-634ca060.js";import{H as i}from"./p-66d48d1a.js";import{B as r}from"./p-28a6dd9b.js";import{D as o}from"./p-f284897c.js";import{c as a}from"./p-0462f723.js";import{A as c}from"./p-b700cfe1.js";import{A as l}from"./p-35fb03be.js";const h=e=>{const n={onClick:()=>e.onToggle?.(!e.checked),"arial-label":e.ariaLabel,"aria-checked":String(!!e.checked),part:e.part,tabIndex:e.tabIndex,title:e.title};const s=["w-12","h-6","p-1","rounded-full",e.checked?"bg-primary":"bg-neutral"].join(" ");const i=["w-4","h-4","rounded-full","bg-white",e.checked?"ml-6":""].join(" ");const r=["rounded-full","btn-outline-neutral",e.withToggle?"flex":"hidden"].join(" ");return t("button",{role:"switch",...n,class:r},t("div",{class:s},t("div",{class:i})))};const u=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="1.5" y="1.50024" width="9" height="10" rx="1.5" stroke="currentColor"/>\n<path d="M3.5 8.50024H8.5" stroke="currentColor" stroke-linecap="round"/>\n<path d="M3.5 4.50024L8.5 4.50024" stroke="currentColor" stroke-linecap="round"/>\n<path d="M3.5 6.50024L8.5 6.50024" stroke="currentColor" stroke-linecap="round"/>\n<path d="M4.5 14.5002L11.5 14.5002C12.6046 14.5002 13.5 13.6048 13.5 12.5002L13.5 5.50024" stroke="currentColor" stroke-linecap="round"/>\n</svg>\n`;const f=e=>t(r,{title:e.title,part:"copy-button",style:"text-transparent",class:`rounded-md p-2 ${e.isCopied?"copied":""} ${e.error?"error":""}`,onClick:e.onClick},t("div",{class:"icon-container text-neutral-dark"},t("atomic-icon",{class:"w-5",icon:u})));const p=`<svg\n width="14"\n height="14"\n viewBox="0 0 14 14"\n fill="none"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n xmlns:svg="http://www.w3.org/2000/svg">\n <path\n class="line"\n d="m 11.00003,8.49978 h 0.5 c 0.55229,0 1,0.44771 1,1 v 0 c 0,0.55228 -0.44771,1 -1,1 L 10,10.49996 h 1 c 0.55228,0 0.99999,0.44771 1,1 v 0 c 0,0.55228 -0.44772,1 -1,1 H 9.5 l -3.52786,-6e-5 c -0.31049,0 -0.61672,-0.07229 -0.89443,-0.21115 L 3.5,11.4999 m 0,-6.5 c 0,-0.2761 -0.2239,-0.5 -0.5,-0.5 H 1 c -0.2761,0 -0.5,0.2239 -0.5,0.5 v 7 c 0,0.27614 0.2239,0.5 0.5,0.5 h 2 c 0.2761,0 0.5,-0.22386 0.5,-0.5 v -0.5 -6.5 h 0.9415 c 0.3471,10e-6 0.6694,-0.18 0.85145,-0.4755 L 6.48493,2.5895 C 6.49482,2.5735 6.50005,2.555 6.50005,2.5361 L 6.50004,1.477 C 6.50004,0.9374 6.93748,0.5 7.47709,0.5 v 0 c 0.32669,0 0.63296,0.165 0.81417,0.4368 v 0 C 8.7432,1.6147 8.91025,2.4487 8.75047,3.2476 L 8.5000098,4.498621 12.5,4.497321 c 0,0 1,-0.07687 1,0.9999998 0,0.983123 -1,1 -1,1 l -2.460584,0.00258 h 2 c 0.55228,0 1,0.44772 1,1 v 0 c 0,0.55228 -0.44772,1 -1,1 h -2"\n stroke="currentColor"\n stroke-linecap="round"\n stroke-linejoin="round"\n id="path1" />\n</svg>\n`;const d=e=>t(r,{title:e.title,style:"text-transparent",part:"feedback-button",class:`feedback-button rounded-md p-2 ${e.variant} ${e.active?"active":""}`,onClick:e.onClick,ariaPressed:`${e.active}`},t("atomic-icon",{class:"w-5",icon:p}));var g={exports:{}};(function(t,e){(function(t,n){n(e)})(a,(function(t){function e(){return{async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}t.defaults=e();function n(e){t.defaults=e}const s=/[&<>"']/;const i=new RegExp(s.source,"g");const r=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/;const o=new RegExp(r.source,"g");const a={"&":"&","<":"<",">":">",'"':""","'":"'"};const c=t=>a[t];function l(t,e){if(e){if(s.test(t)){return t.replace(i,c)}}else{if(r.test(t)){return t.replace(o,c)}}return t}const h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function u(t){return t.replace(h,((t,e)=>{e=e.toLowerCase();if(e==="colon")return":";if(e.charAt(0)==="#"){return e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1))}return""}))}const f=/(^|[^\[])\^/g;function p(t,e){let n=typeof t==="string"?t:t.source;e=e||"";const s={replace:(t,e)=>{let i=typeof e==="string"?e:e.source;i=i.replace(f,"$1");n=n.replace(t,i);return s},getRegex:()=>new RegExp(n,e)};return s}function d(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch(t){return null}return t}const g={exec:()=>null};function w(t,e){const n=t.replace(/\|/g,((t,e,n)=>{let s=false;let i=e;while(--i>=0&&n[i]==="\\")s=!s;if(s){return"|"}else{return" |"}})),s=n.split(/ \|/);let i=0;if(!s[0].trim()){s.shift()}if(s.length>0&&!s[s.length-1].trim()){s.pop()}if(e){if(s.length>e){s.splice(e)}else{while(s.length<e)s.push("")}}for(;i<s.length;i++){s[i]=s[i].trim().replace(/\\\|/g,"|")}return s}function b(t,e,n){const s=t.length;if(s===0){return""}let i=0;while(i<s){const r=t.charAt(s-i-1);if(r===e&&!n){i++}else if(r!==e&&n){i++}else{break}}return t.slice(0,s-i)}function m(t,e){if(t.indexOf(e[1])===-1){return-1}let n=0;for(let s=0;s<t.length;s++){if(t[s]==="\\"){s++}else if(t[s]===e[0]){n++}else if(t[s]===e[1]){n--;if(n<0){return s}}}return-1}function k(t,e,n,s){const i=e.href;const r=e.title?l(e.title):null;const o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){s.state.inLink=true;const t={type:"link",raw:n,href:i,title:r,text:o,tokens:s.inlineTokens(o)};s.state.inLink=false;return t}return{type:"image",raw:n,href:i,title:r,text:l(o)}}function x(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null){return e}const s=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(e===null){return t}const[n]=e;if(n.length>=s.length){return t.slice(s.length)}return t})).join("\n")}class ${options;rules;lexer;constructor(e){this.options=e||t.defaults}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0){return{type:"space",raw:e[0]}}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:!this.options.pedantic?b(t,"\n"):t}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0];const n=x(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=b(t,"#");if(this.options.pedantic){t=e.trim()}else if(!e||/ $/.test(e)){t=e.trim()}}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e){return{type:"hr",raw:e[0]}}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");t=b(t.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=true;const s=this.lexer.blockTokens(t);this.lexer.state.top=n;return{type:"blockquote",raw:e[0],tokens:s,text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const s=n.length>1;const i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:false,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`;if(this.options.pedantic){n=s?n:"[*+-]"}const r=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let o="";let a="";let c=false;while(t){let n=false;if(!(e=r.exec(t))){break}if(this.rules.block.hr.test(t)){break}o=e[0];t=t.substring(o.length);let s=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length)));let l=t.split("\n",1)[0];let h=0;if(this.options.pedantic){h=2;a=s.trimStart()}else{h=e[2].search(/[^ ]/);h=h>4?1:h;a=s.slice(h);h+=e[1].length}let u=false;if(!s&&/^ *$/.test(l)){o+=l+"\n";t=t.substring(l.length+1);n=true}if(!n){const e=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`);const n=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);const i=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`);const r=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);while(t){const c=t.split("\n",1)[0];l=c;if(this.options.pedantic){l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")}if(i.test(l)){break}if(r.test(l)){break}if(e.test(l)){break}if(n.test(t)){break}if(l.search(/[^ ]/)>=h||!l.trim()){a+="\n"+l.slice(h)}else{if(u){break}if(s.search(/[^ ]/)>=4){break}if(i.test(s)){break}if(r.test(s)){break}if(n.test(s)){break}a+="\n"+l}if(!u&&!l.trim()){u=true}o+=c+"\n";t=t.substring(c.length+1);s=l.slice(h)}}if(!i.loose){if(c){i.loose=true}else if(/\n *\n *$/.test(o)){c=true}}let f=null;let p;if(this.options.gfm){f=/^\[[ xX]\] /.exec(a);if(f){p=f[0]!=="[ ] ";a=a.replace(/^\[[ xX]\] +/,"")}}i.items.push({type:"list_item",raw:o,task:!!f,checked:p,loose:false,text:a,tokens:[]});i.raw+=o}i.items[i.items.length-1].raw=o.trimEnd();i.items[i.items.length-1].text=a.trimEnd();i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++){this.lexer.state.top=false;i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]);if(!i.loose){const e=i.items[t].tokens.filter((t=>t.type==="space"));const n=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));i.loose=n}}if(i.loose){for(let t=0;t<i.items.length;t++){i.items[t].loose=true}}return i}}html(t){const e=this.rules.block.html.exec(t);if(e){const t={type:"html",block:true,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]};return t}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(/\s+/g," ");const n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"";const s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:s}}}table(t){const e=this.rules.block.table.exec(t);if(!e){return}if(!/[:|]/.test(e[2])){return}const n=w(e[1]);const s=e[2].replace(/^\||\| *$/g,"").split("|");const i=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[];const r={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length!==s.length){return}for(const t of s){if(/^ *-+: *$/.test(t)){r.align.push("right")}else if(/^ *:-+: *$/.test(t)){r.align.push("center")}else if(/^ *:-+ *$/.test(t)){r.align.push("left")}else{r.align.push(null)}}for(const t of n){r.header.push({text:t,tokens:this.lexer.inline(t)})}for(const t of i){r.rows.push(w(t,r.header.length).map((t=>({text:t,tokens:this.lexer.inline(t)}))))}return r}lheading(t){const e=this.rules.block.lheading.exec(t);if(e){return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t=e[1].charAt(e[1].length-1)==="\n"?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e){return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}}escape(t){const e=this.rules.inline.escape.exec(t);if(e){return{type:"escape",raw:e[0],text:l(e[1])}}}tag(t){const e=this.rules.inline.tag.exec(t);if(e){if(!this.lexer.state.inLink&&/^<a /i.test(e[0])){this.lexer.state.inLink=true}else if(this.lexer.state.inLink&&/^<\/a>/i.test(e[0])){this.lexer.state.inLink=false}if(!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])){this.lexer.state.inRawBlock=true}else if(this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])){this.lexer.state.inRawBlock=false}return{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:false,text:e[0]}}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t)){return}const e=b(t.slice(0,-1),"\\");if((t.length-e.length)%2===0){return}}else{const t=m(e[2],"()");if(t>-1){const n=e[0].indexOf("!")===0?5:4;const s=n+e[1].length+t;e[2]=e[2].substring(0,t);e[0]=e[0].substring(0,s).trim();e[3]=""}}let n=e[2];let s="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);if(t){n=t[1];s=t[3]}}else{s=e[3]?e[3].slice(1,-1):""}n=n.trim();if(/^</.test(n)){if(this.options.pedantic&&!/>$/.test(t)){n=n.slice(1)}else{n=n.slice(1,-1)}}return k(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=(n[2]||n[1]).replace(/\s+/g," ");const s=e[t.toLowerCase()];if(!s){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return k(n,s,n[0],this.lexer)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!s)return;if(s[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=s[1]||s[2]||"";if(!i||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let i,r,o=n,a=0;const c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;c.lastIndex=0;e=e.slice(-1*t.length+n);while((s=c.exec(e))!=null){i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6];if(!i)continue;r=[...i].length;if(s[3]||s[4]){o+=r;continue}else if(s[5]||s[6]){if(n%3&&!((n+r)%3)){a+=r;continue}}o-=r;if(o>0)continue;r=Math.min(r,r+o+a);const e=[...s[0]][0].length;const c=t.slice(0,n+s.index+e+r);if(Math.min(n,r)%2){const t=c.slice(1,-1);return{type:"em",raw:c,text:t,tokens:this.lexer.inlineTokens(t)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t);const s=/^ /.test(t)&&/ $/.test(t);if(n&&s){t=t.substring(1,t.length-1)}t=l(t,true);return{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e){return{type:"br",raw:e[0]}}}del(t){const e=this.rules.inline.del.exec(t);if(e){return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;if(e[2]==="@"){t=l(e[1]);n="mailto:"+t}else{t=l(e[1]);n=t}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if(e[2]==="@"){t=l(e[0]);n="mailto:"+t}else{let s;do{s=e[0];e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(s!==e[0]);t=l(e[0]);if(e[1]==="www."){n="http://"+e[0]}else{n=e[0]}}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;if(this.lexer.state.inRawBlock){t=e[0]}else{t=l(e[0])}return{type:"text",raw:e[0],text:t}}}}const y=/^(?: *(?:\n|$))+/;const v=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/;const A=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;const _=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;const S=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;const C=/(?:[*+-]|\d{1,9}[.)])/;const z=p(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,C).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex();const T=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;const q=/^[^\n]+/;const E=/(?!\s*\])(?:\\.|[^\[\]\\])+/;const Z=p(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",E).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();const L=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,C).getRegex();const R="address|article|aside|base|basefont|blockquote|body|caption"+"|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption"+"|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe"+"|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option"+"|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title"+"|tr|track|ul";const M=/<!--(?:-?>|[\s\S]*?(?:-->|$))/;const I=p("^ {0,3}(?:"+"<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)"+"|comment[^\\n]*(\\n+|$)"+"|<\\?[\\s\\S]*?(?:\\?>\\n*|$)"+"|<![A-Z][\\s\\S]*?(?:>\\n*|$)"+"|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)"+"|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)"+"|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)"+"|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)"+")","i").replace("comment",M).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();const j=p(T).replace("hr",_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex();const B=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",j).getRegex();const G={blockquote:B,code:v,def:Z,fences:A,heading:S,hr:_,html:I,lheading:z,list:L,newline:y,paragraph:j,table:g,text:q};const D=p("^ *([^\\n ].*)\\n"+" {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)"+"(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex();const H={...G,table:D,paragraph:p(T).replace("hr",_).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",D).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()};const P={...G,html:p("^ *(?:comment *(?:\\n|\\s*$)"+"|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)"+"|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M).replace(/tag/g,"(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub"+"|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)"+"\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(T).replace("hr",_).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()};const F=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;const O=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;const N=/^( {2,}|\\)\n(?!\s*$)/;const V=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;const X="\\p{P}\\p{S}";const U=p(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,X).getRegex();const Q=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;const J=p(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,X).getRegex();const K=p("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)"+"|[^*]+(?=[^*])"+"|(?!\\*)[punct](\\*+)(?=[\\s]|$)"+"|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)"+"|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])"+"|[\\s](\\*+)(?!\\*)(?=[punct])"+"|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])"+"|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,X).getRegex();const W=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)"+"|[^_]+(?=[^_])"+"|(?!_)[punct](_+)(?=[\\s]|$)"+"|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)"+"|(?!_)[punct\\s](_+)(?=[^punct\\s])"+"|[\\s](_+)(?!_)(?=[punct])"+"|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,X).getRegex();const Y=p(/\\([punct])/,"gu").replace(/punct/g,X).getRegex();const tt=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();const et=p(M).replace("(?:--\x3e|$)","--\x3e").getRegex();const nt=p("^comment"+"|^</[a-zA-Z][\\w:-]*\\s*>"+"|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>"+"|^<\\?[\\s\\S]*?\\?>"+"|^<![a-zA-Z]+\\s[\\s\\S]*?>"+"|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",et).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();const st=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;const it=p(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",st).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();const rt=p(/^!?\[(label)\]\[(ref)\]/).replace("label",st).replace("ref",E).getRegex();const ot=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",E).getRegex();const at=p("reflink|nolink(?!\\()","g").replace("reflink",rt).replace("nolink",ot).getRegex();const ct={_backpedal:g,anyPunctuation:Y,autolink:tt,blockSkip:Q,br:N,code:O,del:g,emStrongLDelim:J,emStrongRDelimAst:K,emStrongRDelimUnd:W,escape:F,link:it,nolink:ot,punctuation:U,reflink:rt,reflinkSearch:at,tag:nt,text:V,url:g};const lt={...ct,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",st).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",st).getRegex()};const ht={...ct,escape:p(F).replace("])","~|])").getRegex(),url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};const ut={...ht,br:p(N).replace("{2,}","*").getRegex(),text:p(ht.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};const ft={normal:G,gfm:H,pedantic:P};const pt={normal:ct,gfm:ht,breaks:ut,pedantic:lt};class dt{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[];this.tokens.links=Object.create(null);this.options=e||t.defaults;this.options.tokenizer=this.options.tokenizer||new $;this.tokenizer=this.options.tokenizer;this.tokenizer.options=this.options;this.tokenizer.lexer=this;this.inlineQueue=[];this.state={inLink:false,inRawBlock:false,top:true};const n={block:ft.normal,inline:pt.normal};if(this.options.pedantic){n.block=ft.pedantic;n.inline=pt.pedantic}else if(this.options.gfm){n.block=ft.gfm;if(this.options.breaks){n.inline=pt.breaks}else{n.inline=pt.gfm}}this.tokenizer.rules=n}static get rules(){return{block:ft,inline:pt}}static lex(t,e){const n=new dt(e);return n.lex(t)}static lexInline(t,e){const n=new dt(e);return n.inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,"\n");this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}this.inlineQueue=[];return this.tokens}blockTokens(t,e=[]){if(this.options.pedantic){t=t.replace(/\t/g," ").replace(/^ +$/gm,"")}else{t=t.replace(/^( *)(\t+)/gm,((t,e,n)=>e+" ".repeat(n.length)))}let n;let s;let i;let r;while(t){if(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((s=>{if(n=s.call({lexer:this},t,e)){t=t.substring(n.raw.length);e.push(n);return true}return false}))){continue}if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);if(n.raw.length===1&&e.length>0){e[e.length-1].raw+="\n"}else{e.push(n)}continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);s=e[e.length-1];if(s&&(s.type==="paragraph"||s.type==="text")){s.raw+="\n"+n.raw;s.text+="\n"+n.text;this.inlineQueue[this.inlineQueue.length-1].src=s.text}else{e.push(n)}continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);s=e[e.length-1];if(s&&(s.type==="paragraph"||s.type==="text")){s.raw+="\n"+n.raw;s.text+="\n"+n.raw;this.inlineQueue[this.inlineQueue.length-1].src=s.text}else if(!this.tokens.links[n.tag]){this.tokens.links[n.tag]={href:n.href,title:n.title}}continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length);e.push(n);continue}i=t;if(this.options.extensions&&this.options.extensions.startBlock){let e=Infinity;const n=t.slice(1);let s;this.options.extensions.startBlock.forEach((t=>{s=t.call({lexer:this},n);if(typeof s==="number"&&s>=0){e=Math.min(e,s)}}));if(e<Infinity&&e>=0){i=t.substring(0,e+1)}}if(this.state.top&&(n=this.tokenizer.paragraph(i))){s=e[e.length-1];if(r&&s.type==="paragraph"){s.raw+="\n"+n.raw;s.text+="\n"+n.text;this.inlineQueue.pop();this.inlineQueue[this.inlineQueue.length-1].src=s.text}else{e.push(n)}r=i.length!==t.length;t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);s=e[e.length-1];if(s&&s.type==="text"){s.raw+="\n"+n.raw;s.text+="\n"+n.text;this.inlineQueue.pop();this.inlineQueue[this.inlineQueue.length-1].src=s.text}else{e.push(n)}continue}if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}else{throw new Error(e)}}}this.state.top=true;return e}inline(t,e=[]){this.inlineQueue.push({src:t,tokens:e});return e}inlineTokens(t,e=[]){let n,s,i;let r=t;let o;let a,c;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0){while((o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null){if(t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))){r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)}}}}while((o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null){r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex)}while((o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null){r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex)}while(t){if(!a){c=""}a=false;if(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>{if(n=s.call({lexer:this},t,e)){t=t.substring(n.raw.length);e.push(n);return true}return false}))){continue}if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length);s=e[e.length-1];if(s&&n.type==="text"&&s.type==="text"){s.raw+=n.raw;s.text+=n.text}else{e.push(n)}continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);s=e[e.length-1];if(s&&n.type==="text"&&s.type==="text"){s.raw+=n.raw;s.text+=n.text}else{e.push(n)}continue}if(n=this.tokenizer.emStrong(t,r,c)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length);e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length);e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length);e.push(n);continue}i=t;if(this.options.extensions&&this.options.extensions.startInline){let e=Infinity;const n=t.slice(1);let s;this.options.extensions.startInline.forEach((t=>{s=t.call({lexer:this},n);if(typeof s==="number"&&s>=0){e=Math.min(e,s)}}));if(e<Infinity&&e>=0){i=t.substring(0,e+1)}}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length);if(n.raw.slice(-1)!=="_"){c=n.raw.slice(-1)}a=true;s=e[e.length-1];if(s&&s.type==="text"){s.raw+=n.raw;s.text+=n.text}else{e.push(n)}continue}if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}else{throw new Error(e)}}}return e}}class gt{options;constructor(e){this.options=e||t.defaults}code(t,e,n){const s=(e||"").match(/^\S*/)?.[0];t=t.replace(/\n$/,"")+"\n";if(!s){return"<pre><code>"+(n?t:l(t,true))+"</code></pre>\n"}return'<pre><code class="language-'+l(s)+'">'+(n?t:l(t,true))+"</code></pre>\n"}blockquote(t){return`<blockquote>\n${t}</blockquote>\n`}html(t,e){return t}heading(t,e,n){return`<h${e}>${t}</h${e}>\n`}hr(){return"<hr>\n"}list(t,e,n){const s=e?"ol":"ul";const i=e&&n!==1?' start="'+n+'"':"";return"<"+s+i+">\n"+t+"</"+s+">\n"}listitem(t,e,n){return`<li>${t}</li>\n`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>\n`}table(t,e){if(e)e=`<tbody>${e}</tbody>`;return"<table>\n"+"<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return`<tr>\n${t}</tr>\n`}tablecell(t,e){const n=e.header?"th":"td";const s=e.align?`<${n} align="${e.align}">`:`<${n}>`;return s+t+`</${n}>\n`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,n){const s=d(t);if(s===null){return n}t=s;let i='<a href="'+t+'"';if(e){i+=' title="'+e+'"'}i+=">"+n+"</a>";return i}image(t,e,n){const s=d(t);if(s===null){return n}t=s;let i=`<img src="${t}" alt="${n}"`;if(e){i+=` title="${e}"`}i+=">";return i}text(t){return t}}class wt{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class bt{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults;this.options.renderer=this.options.renderer||new gt;this.renderer=this.options.renderer;this.renderer.options=this.options;this.textRenderer=new wt}static parse(t,e){const n=new bt(e);return n.parse(t)}static parseInline(t,e){const n=new bt(e);return n.parseInline(t)}parse(t,e=true){let n="";for(let s=0;s<t.length;s++){const i=t[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const t=i;const e=this.options.extensions.renderers[t.type].call({parser:this},t);if(e!==false||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}switch(i.type){case"space":{continue}case"hr":{n+=this.renderer.hr();continue}case"heading":{const t=i;n+=this.renderer.heading(this.parseInline(t.tokens),t.depth,u(this.parseInline(t.tokens,this.textRenderer)));continue}case"code":{const t=i;n+=this.renderer.code(t.text,t.lang,!!t.escaped);continue}case"table":{const t=i;let e="";let s="";for(let e=0;e<t.header.length;e++){s+=this.renderer.tablecell(this.parseInline(t.header[e].tokens),{header:true,align:t.align[e]})}e+=this.renderer.tablerow(s);let r="";for(let e=0;e<t.rows.length;e++){const n=t.rows[e];s="";for(let e=0;e<n.length;e++){s+=this.renderer.tablecell(this.parseInline(n[e].tokens),{header:false,align:t.align[e]})}r+=this.renderer.tablerow(s)}n+=this.renderer.table(e,r);continue}case"blockquote":{const t=i;const e=this.parse(t.tokens);n+=this.renderer.blockquote(e);continue}case"list":{const t=i;const e=t.ordered;const s=t.start;const r=t.loose;let o="";for(let e=0;e<t.items.length;e++){const n=t.items[e];const s=n.checked;const i=n.task;let a="";if(n.task){const t=this.renderer.checkbox(!!s);if(r){if(n.tokens.length>0&&n.tokens[0].type==="paragraph"){n.tokens[0].text=t+" "+n.tokens[0].text;if(n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"){n.tokens[0].tokens[0].text=t+" "+n.tokens[0].tokens[0].text}}else{n.tokens.unshift({type:"text",text:t+" "})}}else{a+=t+" "}}a+=this.parse(n.tokens,r);o+=this.renderer.listitem(a,i,!!s)}n+=this.renderer.list(o,e,s);continue}case"html":{const t=i;n+=this.renderer.html(t.text,t.block);continue}case"paragraph":{const t=i;n+=this.renderer.paragraph(this.parseInline(t.tokens));continue}case"text":{let r=i;let o=r.tokens?this.parseInline(r.tokens):r.text;while(s+1<t.length&&t[s+1].type==="text"){r=t[++s];o+="\n"+(r.tokens?this.parseInline(r.tokens):r.text)}n+=e?this.renderer.paragraph(o):o;continue}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent){console.error(t);return""}else{throw new Error(t)}}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let s=0;s<t.length;s++){const i=t[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const t=this.options.extensions.renderers[i.type].call({parser:this},i);if(t!==false||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}switch(i.type){case"escape":{const t=i;n+=e.text(t.text);break}case"html":{const t=i;n+=e.html(t.text);break}case"link":{const t=i;n+=e.link(t.href,t.title,this.parseInline(t.tokens,e));break}case"image":{const t=i;n+=e.image(t.href,t.title,t.text);break}case"strong":{const t=i;n+=e.strong(this.parseInline(t.tokens,e));break}case"em":{const t=i;n+=e.em(this.parseInline(t.tokens,e));break}case"codespan":{const t=i;n+=e.codespan(t.text);break}case"br":{n+=e.br();break}case"del":{const t=i;n+=e.del(this.parseInline(t.tokens,e));break}case"text":{const t=i;n+=e.text(t.text);break}default:{const t='Token with "'+i.type+'" type was not found.';if(this.options.silent){console.error(t);return""}else{throw new Error(t)}}}}return n}}class mt{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}class kt{defaults=e();options=this.setOptions;parse=this.#t(dt.lex,bt.parse);parseInline=this.#t(dt.lexInline,bt.parseInline);Parser=bt;Renderer=gt;TextRenderer=wt;Lexer=dt;Tokenizer=$;Hooks=mt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const s of t){n=n.concat(e.call(this,s));switch(s.type){case"table":{const t=s;for(const s of t.header){n=n.concat(this.walkTokens(s.tokens,e))}for(const s of t.rows){for(const t of s){n=n.concat(this.walkTokens(t.tokens,e))}}break}case"list":{const t=s;n=n.concat(this.walkTokens(t.items,e));break}default:{const t=s;if(this.defaults.extensions?.childTokens?.[t.type]){this.defaults.extensions.childTokens[t.type].forEach((s=>{const i=t[s].flat(Infinity);n=n.concat(this.walkTokens(i,e))}))}else if(t.tokens){n=n.concat(this.walkTokens(t.tokens,e))}}}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((t=>{const n={...t};n.async=this.defaults.async||n.async||false;if(t.extensions){t.extensions.forEach((t=>{if(!t.name){throw new Error("extension name required")}if("renderer"in t){const n=e.renderers[t.name];if(n){e.renderers[t.name]=function(...e){let s=t.renderer.apply(this,e);if(s===false){s=n.apply(this,e)}return s}}else{e.renderers[t.name]=t.renderer}}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline"){throw new Error("extension level must be 'block' or 'inline'")}const n=e[t.level];if(n){n.unshift(t.tokenizer)}else{e[t.level]=[t.tokenizer]}if(t.start){if(t.level==="block"){if(e.startBlock){e.startBlock.push(t.start)}else{e.startBlock=[t.start]}}else if(t.level==="inline"){if(e.startInline){e.startInline.push(t.start)}else{e.startInline=[t.start]}}}}if("childTokens"in t&&t.childTokens){e.childTokens[t.name]=t.childTokens}}));n.extensions=e}if(t.renderer){const e=this.defaults.renderer||new gt(this.defaults);for(const n in t.renderer){if(!(n in e)){throw new Error(`renderer '${n}' does not exist`)}if(n==="options"){continue}const s=n;const i=t.renderer[s];const r=e[s];e[s]=(...t)=>{let n=i.apply(e,t);if(n===false){n=r.apply(e,t)}return n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new $(this.defaults);for(const n in t.tokenizer){if(!(n in e)){throw new Error(`tokenizer '${n}' does not exist`)}if(["options","rules","lexer"].includes(n)){continue}const s=n;const i=t.tokenizer[s];const r=e[s];e[s]=(...t)=>{let n=i.apply(e,t);if(n===false){n=r.apply(e,t)}return n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new mt;for(const n in t.hooks){if(!(n in e)){throw new Error(`hook '${n}' does not exist`)}if(n==="options"){continue}const s=n;const i=t.hooks[s];const r=e[s];if(mt.passThroughHooks.has(n)){e[s]=t=>{if(this.defaults.async){return Promise.resolve(i.call(e,t)).then((t=>r.call(e,t)))}const n=i.call(e,t);return r.call(e,n)}}else{e[s]=(...t)=>{let n=i.apply(e,t);if(n===false){n=r.apply(e,t)}return n}}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens;const s=t.walkTokens;n.walkTokens=function(t){let n=[];n.push(s.call(this,t));if(e){n=n.concat(e.call(this,t))}return n}}this.defaults={...this.defaults,...n}}));return this}setOptions(t){this.defaults={...this.defaults,...t};return this}lexer(t,e){return dt.lex(t,e??this.defaults)}parser(t,e){return bt.parse(t,e??this.defaults)}#t(t,e){return(n,s)=>{const i={...s};const r={...this.defaults,...i};if(this.defaults.async===true&&i.async===false){if(!r.silent){console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.")}r.async=true}const o=this.#e(!!r.silent,!!r.async);if(typeof n==="undefined"||n===null){return o(new Error("marked(): input parameter is undefined or null"))}if(typeof n!=="string"){return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"))}if(r.hooks){r.hooks.options=r}if(r.async){return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then((e=>t(e,r))).then((t=>r.hooks?r.hooks.processAllTokens(t):t)).then((t=>r.walkTokens?Promise.all(this.walkTokens(t,r.walkTokens)).then((()=>t)):t)).then((t=>e(t,r))).then((t=>r.hooks?r.hooks.postprocess(t):t)).catch(o)}try{if(r.hooks){n=r.hooks.preprocess(n)}let s=t(n,r);if(r.hooks){s=r.hooks.processAllTokens(s)}if(r.walkTokens){this.walkTokens(s,r.walkTokens)}let i=e(s,r);if(r.hooks){i=r.hooks.postprocess(i)}return i}catch(t){return o(t)}}}#e(t,e){return n=>{n.message+="\nPlease report this to https://github.com/markedjs/marked.";if(t){const t="<p>An error occurred:</p><pre>"+l(n.message+"",true)+"</pre>";if(e){return Promise.resolve(t)}return t}if(e){return Promise.reject(n)}throw n}}}const xt=new kt;function $t(t,e){return xt.parse(t,e)}$t.options=$t.setOptions=function(t){xt.setOptions(t);$t.defaults=xt.defaults;n($t.defaults);return $t};$t.getDefaults=e;$t.defaults=t.defaults;$t.use=function(...t){xt.use(...t);$t.defaults=xt.defaults;n($t.defaults);return $t};$t.walkTokens=function(t,e){return xt.walkTokens(t,e)};$t.parseInline=xt.parseInline;$t.Parser=bt;$t.parser=bt.parse;$t.Renderer=gt;$t.TextRenderer=wt;$t.Lexer=dt;$t.lexer=dt.lex;$t.Tokenizer=$;$t.Hooks=mt;$t.parse=$t;const yt=$t.options;const vt=$t.setOptions;const At=$t.use;const _t=$t.walkTokens;const St=$t.parseInline;const Ct=$t;const zt=bt.parse;const Tt=dt.lex;t.Hooks=mt;t.Lexer=dt;t.Marked=kt;t.Parser=bt;t.Renderer=gt;t.TextRenderer=wt;t.Tokenizer=$;t.getDefaults=e;t.lexer=Tt;t.marked=$t;t.options=yt;t.parse=Ct;t.parseInline=St;t.parser=zt;t.setOptions=vt;t.use=At;t.walkTokens=_t}))})(g,g.exports);const w=t=>{const e=t.replace(/<[^>]*>/g," ");const n=e.replace(/\s{2,}/g," ");return n.trim()};const b=/(\*{1,3}|`)($|\w[\w\s]*$)/;const m=t=>{const e=b.exec(t);if(e){const n=e[1];const s={"***":'<strong part="answer-strong"><em part="answer-emphasis">$2</em></strong>',"**":'<strong part="answer-strong">$2</strong>',"*":'<em part="answer-emphasis">$2</em>',"`":'<code part="answer-inline-code">$2</code>'};return t.replace(b,s[n])}return t};const k=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");const x={blockquote(t){return`<blockquote part="answer-quote-block">${t}</blockquote>`},code(t){return`<pre part="answer-code-block"><code>${k(t)}</code></pre>`},codespan(t){return`<code part="answer-inline-code">${t}</code>`},em(t){return`<em part="answer-emphasis">${t}</em>`},heading(t,e){const n=w(t);return`<div part="answer-heading-${e}" aria-label="${n}">${t}</div>`},html(t){return k(t)},list(t,e,n){const s=e?"ol":"ul";const i=e?"answer-ordered-list":"answer-unordered-list";const r=e&&n!==1?`<${s} part="${i}" start="${n}">`:`<${s} part="${i}">`;return`${r}${t}</${s}>`},listitem(t){const e=t.replace(/^<p[^>]*>/,"").replace(/<\/p>\n?$/,"");const n=m(e);return`<li part="answer-list-item">${n}</li>`},paragraph(t){return`<p part="answer-paragraph">${t}</p>`},strong(t){return`<strong part="answer-strong">${t}</strong>`},table(t,e){return`<div part="answer-table-container" class="scrollable-table"><table part="answer-table"><thead>${t}</thead><tbody>${e}</tbody></table></div>`},tablecell(t,e){const n=e.header?"th":"td";const s=e.header?"answer-table-header":"answer-table-content";const i=e.align?`<${n} part="${s}" align="${e.align}">`:`<${n} part="${s}">`;return`${i}${t}</${n}>`},text(t){return m(t)}};const $=t=>g.exports.marked.use({renderer:x}).parse(t);const y=e=>{const n=o.sanitize($(e.answer??""),{ADD_ATTR:["part"]});return t("div",{part:"generated-text",class:`text-on-background mb-0 ${e.isStreaming?"cursor":""}`,innerHTML:n})};const v=e=>t("p",{part:"generated-text",class:`text-on-background mb-0 whitespace-pre-wrap ${e.isStreaming?"cursor":""}`},e.answer);const A=(e,n)=>t("div",{part:"generated-container",class:"mt-6"},e.answerContentFormat==="text/markdown"?t(y,{answer:e.answer,isStreaming:e.isStreaming}):t(v,{answer:e.answer,isStreaming:e.isStreaming}),t("div",{class:"footer mt-6"},n));const _=e=>t("div",{part:"retry-container",class:"mt-4"},t("div",{class:"text-neutral-dark mx-auto text-center"},e.message),t(r,{class:"mx-auto mt-4 block px-4 py-2",style:"outline-primary",onClick:e.onClick},e.buttonLabel));const S=e=>t(r,{style:"text-primary",part:"answer-show-button",class:"hidden items-center hover:bg-transparent",onClick:()=>e.onClick()},t("div",{class:"text-base font-light"},e.isCollapsed?e.i18n.t("show-more"):e.i18n.t("show-less")),t("atomic-icon",{part:"answer-show-icon",class:"ml-2 w-3.5",icon:e.isCollapsed?c:l}));const C=(e,n)=>e.isVisible?t("div",{class:"source-citations"},t("p",{part:"citations-label",class:"text-neutral-dark mb-2 shrink-0"},e.label),t("ol",{class:"citations-container flex list-none flex-wrap items-center gap-2"},n)):null;class z{constructor(t){this.props=t;this.storage=new e;this._data=this.readStoredData()}insertFeedbackModal(){this.modalRef=document.createElement("atomic-generated-answer-feedback-modal");this.modalRef.generatedAnswer=this.props.getGeneratedAnswer();this.props.host.insertAdjacentElement("beforebegin",this.modalRef)}readStoredData(){const{withToggle:t}=this.props;const e=this.storage.getParsedJSON(n.GENERATED_ANSWER_DATA,{isVisible:true});return{isVisible:t&&e.isVisible||!t}}writeStoredData(t){this.storage.setJSON(n.GENERATED_ANSWER_DATA,t)}get data(){return this._data}set data(t){this._data=t}getGeneratedAnswerStatus(){const t=!this.props.getGeneratedAnswerState()?.isVisible;const e=!!this.props.getGeneratedAnswerState()?.isStreaming;const n=!!this.props.getGeneratedAnswerState()?.answer;const s=!!this.props.getGeneratedAnswerState()?.error;if(t){return this.props.getBindings().i18n.t("generated-answer-hidden")}if(e){return this.props.getBindings().i18n.t("generating-answer")}if(s){return this.props.getBindings().i18n.t("answer-could-not-be-generated")}if(n){return this.props.getBindings().i18n.t("answer-generated",{answer:this.props.getGeneratedAnswerState()?.answer})}return""}get hasRetryableError(){return!this.props.getSearchStatusState()?.hasError&&this.props.getGeneratedAnswerState()?.error?.isRetryable}get hasNoAnswerGenerated(){const{answer:t,citations:e}=this.props.getGeneratedAnswerState()??{};return t===undefined&&!e?.length&&!this.hasRetryableError}get isAnswerVisible(){return this.props.getGeneratedAnswerState()?.isVisible}get toggleTooltip(){const t=this.isAnswerVisible?"generated-answer-toggle-on":"generated-answer-toggle-off";return this.props.getBindings().i18n.t(t)}get hasClipboard(){return!!navigator?.clipboard?.writeText}get copyToClipboardTooltip(){if(this.props.getCopyError()){return this.props.getBindings().i18n.t("failed-to-copy-generated-answer")}return!this.props.getCopied()?this.props.getBindings().i18n.t("copy-generated-answer"):this.props.getBindings().i18n.t("generated-answer-copied")}get hasCustomNoAnswerMessage(){const t=s(this.props.host,"no-answer-message");return!!t}async copyToClipboard(t){try{await navigator.clipboard.writeText(t);this.props.setCopied(true);this.props.getGeneratedAnswer()?.logCopyToClipboard()}catch(t){this.props.setCopyError(true);this.props.getBindings().engine.logger.error(`Failed to copy to clipboard: ${t}`)}setTimeout((()=>{this.props.setCopied(false);this.props.setCopyError(false)}),2e3)}clickOnShowButton(){if(this.props.getGeneratedAnswerState()?.expanded){this.props.getGeneratedAnswer()?.collapse()}else{this.props.getGeneratedAnswer()?.expand()}}getCitation(t){const{title:e}=t;const{i18n:n}=this.props.getBindings();return e.trim()!==""?t:{...t,title:n.t("no-title")}}renderCitations(){const{getGeneratedAnswerState:e,buildInteractiveCitation:n,getGeneratedAnswer:s,disableCitationAnchoring:i}=this.props;const{citations:r}=e()??{};const{logCitationHover:o}=s()??{};return r?.map(((e,s)=>{const r=n({options:{citation:e}});return t("li",{key:e.id,class:"max-w-full"},t("atomic-citation",{citation:this.getCitation(e),index:s,sendHoverEndEvent:t=>{o?.(e.id,t)},interactiveCitation:r,disableCitationAnchoring:i,exportparts:"citation,citation-popover"}))}))}renderFeedbackAndCopyButtons(){const{getGeneratedAnswerState:e,getBindings:n,getCopied:s,getCopyError:i}=this.props;const{i18n:r}=n();const{liked:o,disliked:a,answer:c,isStreaming:l}=e()??{};const h=["feedback-buttons","flex","h-9","absolute","top-6","shrink-0","gap-2",this.props.withToggle?"right-20":"right-6"].join(" ");if(l){return null}return t("div",{class:h},t(d,{title:r.t("this-answer-was-helpful"),variant:"like",active:!!o,onClick:()=>this.clickLike()}),t(d,{title:r.t("this-answer-was-not-helpful"),variant:"dislike",active:!!a,onClick:()=>this.clickDislike()}),this.hasClipboard?t(f,{title:this.copyToClipboardTooltip,isCopied:s(),error:i(),onClick:async()=>{if(c){await this.copyToClipboard(c)}}}):null)}setIsAnswerHelpful(t){if(this.modalRef){this.modalRef.helpful=t}}openFeedbackModal(){if(this.modalRef&&!this.props.getGeneratedAnswerState()?.feedbackSubmitted){this.modalRef.isOpen=true}}clickDislike(){this.setIsAnswerHelpful(false);this.props.getGeneratedAnswer()?.dislike();this.openFeedbackModal()}clickLike(){this.setIsAnswerHelpful(true);this.props.getGeneratedAnswer()?.like();this.openFeedbackModal()}renderDisclaimer(){const{getGeneratedAnswerState:e,getBindings:n}=this.props;const{i18n:s}=n();const{isStreaming:i}=e()??{};if(i){return null}return t("div",{class:"text-neutral-dark text-xs/[1rem]"},t("slot",{name:"disclaimer",slot:"disclaimer"},s.t("generated-answer-disclaimer")))}renderShowButton(){const{getGeneratedAnswerState:e,getBindings:n,collapsible:s}=this.props;const{i18n:i}=n();const{expanded:r,isStreaming:o}=e()??{};const a=s&&!o;if(!a){return null}return t(S,{i18n:i,onClick:()=>this.clickOnShowButton(),isCollapsed:!r})}renderGeneratingAnswerLabel(){const{getGeneratedAnswerState:e,getBindings:n,collapsible:s}=this.props;const{i18n:i}=n();const{isStreaming:r}=e()??{};const o=s&&r;if(!o){return null}return t("div",{part:"is-generating",class:"text-primary hidden text-base font-light"},i.t("generating-answer"),"...")}renderContent(){const{getGeneratedAnswerState:e,getBindings:n,getGeneratedAnswer:s}=this.props;const{i18n:r}=n();const{isStreaming:o,answer:a,citations:c,answerContentFormat:l}=e()??{};return t("div",{part:"generated-content"},t("div",{class:"flex items-center"},t(i,{level:0,part:"header-label",class:"text-primary bg-primary-background inline-block rounded-md px-2.5 py-2 font-medium"},r.t("generated-answer-title")),t("div",{class:"ml-auto flex h-9 items-center"},t(h,{part:"toggle",checked:this.isAnswerVisible,onToggle:t=>{t?s()?.show():s()?.hide()},ariaLabel:r.t("generated-answer-title"),title:this.toggleTooltip,withToggle:this.props.withToggle}))),this.hasRetryableError&&this.isAnswerVisible?t(_,{onClick:()=>s()?.retry(),buttonLabel:r.t("retry"),message:r.t("retry-stream-message")}):null,!this.hasRetryableError&&this.isAnswerVisible?t(A,{answer:a,answerContentFormat:l,isStreaming:!!o},this.renderFeedbackAndCopyButtons(),t(C,{label:r.t("citations"),isVisible:!!c?.length},this.renderCitations())):null,!this.hasRetryableError&&this.isAnswerVisible&&t("div",{part:"generated-answer-footer",class:"mt-6 flex justify-end"},this.renderGeneratingAnswerLabel(),this.renderShowButton(),this.renderDisclaimer()))}renderCustomNoAnswerMessage(){const{getBindings:e}=this.props;const{i18n:n}=e();return t("div",{part:"generated-content"},t("div",{class:"flex items-center"},t(i,{level:0,part:"header-label",class:"text-primary bg-primary-background inline-block rounded-md px-2.5 py-2 font-medium"},n.t("generated-answer-title"))),t("div",{part:"generated-container",class:"mt-6 break-words"},t("slot",{name:"no-answer-message"})))}render(){const{getGeneratedAnswerState:e}=this.props;const{cannotAnswer:n}=e()??{};const s="mx-auto mt-0 mb-4 border border-neutral shadow-lg p-6 bg-background rounded-lg p-6 text-on-background";if(this.hasNoAnswerGenerated){return n&&this.hasCustomNoAnswerMessage?t("div",null,t("aside",{class:s,part:"container"},t("article",null,this.renderCustomNoAnswerMessage()))):null}return t("div",null,t("aside",{class:s,part:"container"},t("article",null,this.renderContent())))}}export{z as G};
|
|
2
|
+
//# sourceMappingURL=p-2857ab2b.js.map
|