UNPKG

@digital-blueprint/formalize-app

Version:

[GitHub Repository](https://github.com/digital-blueprint/formalize-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/formalize-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/formalize-app/) | [Formalize Bundle](https:

2,140 lines • 145 kB
/*!
* License: LGPL-2.1-or-later
* Dependencies:
* 
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* lit-html: BSD-3-Clause
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* universal-router: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
* cssfilter: MIT
* xss: MIT
* @dbp-toolkit/form-elements: LGPL-2.1-or-later
* html2pdf.js: MIT
* exceljs: MIT
* jspdf-autotable: MIT
* keycloak-js: Apache-2.0
* pdfjs-dist: Apache-2.0
* jszip: (MIT OR GPL-3.0-or-later)
* @babel/runtime: MIT
* fflate: MIT
* iobuffer: MIT
* pako: (MIT AND Zlib)
* fast-png: MIT
* jspdf: MIT
* core-js: MIT
* performance-now: MIT
* raf: MIT
* rgbcolor: MIT OR SEE LICENSE IN FEEL-FREE.md
* svg-pathdata: MIT
* stackblur-canvas: MIT
* canvg: MIT
* dompurify: (MPL-2.0 OR Apache-2.0)
* i18next: MIT
* @dbp-toolkit/common: LGPL-2.1-or-later
* @lit/reactive-element: BSD-3-Clause
* lit-element: BSD-3-Clause
* @open-wc/dedupe-mixin: MIT
* @open-wc/scoped-elements: MIT
*/
const e=e=>typeof e==`string`,t=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},n=e=>e==null?``:String(e),r=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},i=/###/g,a=e=>e&&e.includes(`###`)?e.replace(i,`.`):e,o=t=>!t||e(t),s=(t,n,r)=>{let i=e(n)?n.split(`.`):n,s=0;for(;s<i.length-1;){if(o(t))return{};let e=a(i[s]);!t[e]&&r&&(t[e]=new r),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++s}return o(t)?{}:{obj:t,k:a(i[s])}},c=(e,t,n)=>{let{obj:r,k:i}=s(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),c=s(e,o,Object);for(;c.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),c=s(e,o,Object),c?.obj&&c.obj[`${c.k}.${a}`]!==void 0&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},l=(e,t,n,r)=>{let{obj:i,k:a}=s(e,t,Object);i[a]=i[a]||[],i[a].push(n)},u=(e,t)=>{let{obj:n,k:r}=s(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},d=(e,t,n)=>{let r=u(e,n);return r===void 0?u(t,n):r},f=(t,n,r)=>{for(let i in n)i!==`__proto__`&&i!==`constructor`&&(Object.prototype.hasOwnProperty.call(t,i)?e(t[i])||t[i]instanceof String||e(n[i])||n[i]instanceof String?r&&(t[i]=n[i]):f(t[i],n[i],r):t[i]=n[i]);return t},p=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),m={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},h=t=>e(t)?t.replace(/[&<>"'\/]/g,e=>m[e]):t;var g=class{constructor(e){this.capacity=e,this.regExpMap=/* @__PURE__ */ new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}};const ee=[` `,`,`,`?`,`!`,`;`],te=new g(20),_=(e,t,n)=>{t||=``,n||=``;let r=ee.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=te.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},v=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},y=e=>e?.replace(/_/g,`-`),b={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}};var x=new class t{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||b,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(t,n,r,i){return i&&!this.debug?null:(t=t.map(t=>e(t)?t.replace(/[\r\n\x00-\x1F\x7F]/g,` `):t),e(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(e){return new t(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e||=this.options,e.prefix=e.prefix||this.prefix,new t(this.logger,e)}},S=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=/* @__PURE__ */ new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},C=class extends S{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(t,n,r,i={}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=i.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:i.ignoreJSONStructure,s;t.includes(`.`)?s=t.split(`.`):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):e(r)&&a?s.push(...r.split(a)):s.push(r)));let c=u(this.data,s);return!c&&!n&&!r&&t.includes(`.`)&&(t=s[0],n=s[1],r=s.slice(2).join(`.`)),c||!o||!e(r)?c:v(this.data?.[t]?.[n],r,a)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),c(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(t,n,r,i={silent:!1}){for(let i in r)(e(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});i.silent||this.emit(`added`,t,n,r)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=u(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?f(s,n,i):s={...s,...n},c(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},w={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}};const T=Symbol(`i18next/PATH_KEY`);function ne(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===T?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function E(e,t){let{[T]:n}=e(ne()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const re=t=>!e(t)&&typeof t!=`boolean`&&typeof t!=`number`;var ie=class t extends S{constructor(e,t={}){super(),r([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=x.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=re(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(t,n){let r=n.nsSeparator===void 0?this.options.nsSeparator:n.nsSeparator;r===void 0&&(r=`:`);let i=n.keySeparator===void 0?this.options.keySeparator:n.keySeparator,a=n.ns||this.options.defaultNS||[],o=r&&t.includes(r),s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!_(t,r,i);if(o&&!s){let n=t.match(this.interpolator.nestingRegexp);if(n&&n.length>0)return{key:t,namespaces:e(a)?[a]:a};let o=t.split(r);(r!==i||r===i&&this.options.ns.includes(o[0]))&&(a=o.shift()),t=o.join(i)}return{key:t,namespaces:e(a)?[a]:a}}translate(n,r,i){let a=typeof r==`object`?{...r}:r;if(typeof a!=`object`&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a==`object`&&(a={...a}),a||={},n==null)return``;typeof n==`function`&&(n=E(n,{...this.options,...a})),Array.isArray(n)||(n=[String(n)]),n=n.map(e=>typeof e==`function`?E(e,{...this.options,...a}):String(e));let o=a.returnDetails===void 0?this.options.returnDetails:a.returnDetails,s=a.keySeparator===void 0?this.options.keySeparator:a.keySeparator,{key:c,namespaces:l}=this.extractFromKey(n[n.length-1],a),u=l[l.length-1],d=a.nsSeparator===void 0?this.options.nsSeparator:a.nsSeparator;d===void 0&&(d=`:`);let f=a.lng||this.language,p=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?o?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${d}${c}`:o?{res:c,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:c;let m=this.resolve(n,a),h=m?.res,g=m?.usedKey||c,ee=m?.exactUsedKey||c,te=[`[object Number]`,`[object Function]`,`[object RegExp]`],_=a.joinArrays===void 0?this.options.joinArrays:a.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=a.count!==void 0&&!e(a.count),b=t.hasDefaultValue(a),x=y?this.pluralResolver.getSuffix(f,a.count,a):``,S=a.ordinal&&y?this.pluralResolver.getSuffix(f,a.count,{ordinal:!1}):``,C=y&&!a.ordinal&&a.count===0,w=C&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${x}`]||a[`defaultValue${S}`]||a.defaultValue,T=h;v&&!h&&b&&(T=w);let ne=re(T),ie=Object.prototype.toString.apply(T);if(v&&T&&ne&&!te.includes(ie)&&!(e(_)&&Array.isArray(T))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,T,{...a,ns:l}):`key '${c} (${this.language})' returned an object instead of string.`;return o?(m.res=e,m.usedParams=this.getUsedParamsDetails(a),m):e}if(s){let e=Array.isArray(T),t=e?[]:{},n=e?ee:g;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${s}${e}`;t[e]=b&&!h?this.translate(r,{...a,defaultValue:re(w)?w[e]:void 0,joinArrays:!1,ns:l}):this.translate(r,{...a,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=T[e])}h=t}}else if(v&&e(_)&&Array.isArray(h))h=h.join(_),h&&=this.extendTranslation(h,n,a,i);else{let e=!1,t=!1;!this.isValidLookup(h)&&b&&(e=!0,h=w),this.isValidLookup(h)||(t=!0,h=c);let r=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&t?void 0:h,o=b&&w!==h&&this.options.updateMissing;if(t||e||o){if(this.logger.log(o?`updateKey`:`missingKey`,f,u,y&&!o?`${c}${this.pluralResolver.getSuffix(f,a.count,a)}`:c,o?w:h),s){let e=this.resolve(c,{...a,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let n=(e,t,n)=>{let i=b&&n!==h?n:r;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,i,o,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,i,o,a),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,a);C&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],c+t,a[`defaultValue${t}`]||w)})}):n(e,c,w))}h=this.extendTranslation(h,n,a,m,i),t&&h===c&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${c}`),(t||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,e?h:void 0,a))}return o?(m.res=h,m.usedParams=this.getUsedParamsDetails(a),m):h}extendTranslation(t,n,r,i,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let o=e(t)&&(r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables),s;if(o){let e=t.match(this.interpolator.nestingRegexp);s=e&&e.length}let c=r.replace&&!e(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,r.lng||this.language||i.usedLng,r),o){let e=t.match(this.interpolator.nestingRegexp),n=e&&e.length;s<n&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...e)=>a?.[0]===e[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${n[0]}`),null):this.translate(...e,n),r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,s=e(o)?[o]:o;return t!=null&&s?.length&&r.applyPostProcessor!==!1&&(t=w.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,a,o,s;return e(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(e=>typeof e==`function`?E(e,{...this.options,...n}):e)),t.forEach(t=>{if(this.isValidLookup(r))return;let c=this.extractFromKey(t,n),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=n.count!==void 0&&!e(n.count),f=d&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(e(n.context)||typeof n.context==`number`)&&n.context!==``,m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(s=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(t=>{if(this.isValidLookup(r))return;o=t;let i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,t,e,n);else{let e;d&&(e=this.pluralResolver.getSuffix(t,n.count,n));let r=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(n.ordinal&&e.startsWith(a)&&i.push(l+e.replace(a,this.options.pluralSeparator)),i.push(l+e),f&&i.push(l+r)),p){let t=`${l}${this.options.contextSeparator||`_`}${n.context}`;i.push(t),d&&(n.ordinal&&e.startsWith(a)&&i.push(t+e.replace(a,this.options.pluralSeparator)),i.push(t+e),f&&i.push(t+r))}}let s;for(;s=i.pop();)this.isValidLookup(r)||(a=s,r=this.getResource(t,e,s,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(t={}){let n=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],r=t.replace&&!e(t.replace),i=r?t.replace:t;if(r&&t.count!==void 0&&(i={...i,count:t.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(let e of n)delete i[e]}return i}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},ae=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=y(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=y(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(t){if(e(t)&&t.includes(`-`)){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch{}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(t,n){if(!t)return[];if(typeof t==`function`&&(t=t(n)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||=t[this.getScriptPartFromCode(n)],r||=t[this.formatLanguageCode(n)],r||=t[this.getLanguagePartFromCode(n)],r||=t.default,r||[]}toResolveHierarchy(t,n){let r=this.options.fallbackLng,i=Array.isArray(r)?r.join(`|`):r;i!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=i);let a=n===void 0||n===!1||e(n),o=n===void 0&&typeof this.options.fallbackLng==`function`,s=e(t)&&a&&!o,c=null;if(s){let e;e=n===void 0?`undefined`:n===!1?`boolean:false`:`string:${n}`,c=`${t.length}:${t}|${e}`}if(c!==null){let e=this.resolveHierarchyCache[c];if(e!==void 0)return e.slice()}let l=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return e(t)&&(t.includes(`-`)||t.includes(`_`))?(this.options.load!==`languageOnly`&&d(this.formatLanguageCode(t)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&d(this.getScriptPartFromCode(t)),this.options.load!==`currentOnly`&&d(this.getLanguagePartFromCode(t))):e(t)&&d(this.formatLanguageCode(t)),l.forEach(e=>{u.includes(e)||d(this.formatLanguageCode(e))}),c===null?u:(this.resolveHierarchyCache[c]=u,u.slice())}};const oe={zero:0,one:1,two:2,few:3,many:4,other:5},se={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})};var ce=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=x.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=y(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),se;if(!e.match(/-|_/))return se;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>oe[e]-oe[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}};const le=(t,n,r,i=`.`,a=!0)=>{let o=d(t,n,r);return!o&&a&&e(r)&&(o=v(t,r,i),o===void 0&&(o=v(n,r,i))),o},ue=e=>e.replace(/\$/g,`$$$$`);var de=class{constructor(e={}){this.logger=x.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:ee,maxReplaces:te,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?h:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?p(i):a||`{{`,this.suffix=o?p(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?p(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?p(l):``,this.nestingPrefix=d?p(d):f||p(`$t(`),this.nestingSuffix=m?p(m):g||p(`)`),this.nestingOptionsSeparator=ee||`,`,this.maxReplaces=te||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,i,a){let o,s,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let t=le(r,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(t,void 0,i,{...a,...r,interpolationkey:e}):t}let t=e.split(this.formatSeparator),n=t.shift().trim(),o=t.join(this.formatSeparator).trim();return this.format(le(r,l,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,{...a,...r,interpolationkey:n})};this.resetRegExp(),!this.escapeValue&&typeof t==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let d=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=a?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:a.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(r=>{for(c=0;o=r.regex.exec(t);){let i=o[1].trim();if(s=u(i),s===void 0){if(typeof d==`function`){let n=d(t,o,a);s=e(n)?n:``}else if(a&&Object.prototype.hasOwnProperty.call(a,i))s=``;else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${i} for interpolating ${t}`),s=``}else!e(s)&&!this.useRawValueToEscape&&(s=n(s));let l=r.safeValue(s);if(t=t.replace(o[0],ue(l)),f?(r.regex.lastIndex+=l.length,r.regex.lastIndex-=o[0].length):r.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,r,i={}){let a,o,s,c=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${p(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,s);let a=i.match(/'/g),o=i.match(/"/g);((a?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,e};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...i},s=s.replace&&!e(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=/{.*}/s.test(a[1])?a[1].lastIndexOf(`}`)+1:a[1].indexOf(this.formatSeparator);if(u!==-1&&(l=a[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),o=r(c.call(this,a[1].trim(),s),s),o&&a[0]===t&&!e(o))return o;e(o)||(o=n(o)),o||=(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),``),l.length&&(o=l.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:a[1].trim()}),o.trim())),t=t.replace(a[0],ue(n(o))),this.regexp.lastIndex=0}return t}};const fe=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},pe=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(y(r),i),t[o]=s),s(n)}},me=e=>(t,n,r)=>e(y(n),r)(t);var he=class{constructor(e={}){this.logger=x.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?pe:me;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=pe(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=fe(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}};const ge=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};var _e=class extends S{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=x.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{l(n.loaded,[i],a),ge(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),i&&i();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(n)&&(n=[n]);let a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}};const ve=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let n={};if(typeof t[1]==`object`&&(n=t[1]),e(t[1])&&(n.defaultValue=t[1]),e(t[2])&&(n.tDescription=t[2]),typeof t[2]==`object`||typeof t[3]==`object`){let e=t[3]||t[2];Object.keys(e).forEach(t=>{n[t]=e[t]})}return n},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ye=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes(`cimode`)&&(t.supportedLngs=t.supportedLngs.concat([`cimode`])),t),D=()=>{},be=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},O=class n extends S{constructor(e={},t){if(super(),this.options=ye(e),this.services={},this.logger=x,this.modules={external:[]},be(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(n={},r){this.isInitializing=!0,typeof n==`function`&&(r=n,n={}),n.defaultNS==null&&n.ns&&(e(n.ns)?n.defaultNS=n.ns:n.ns.includes(`translation`)||(n.defaultNS=n.ns[0]));let i=ve();this.options={...i,...this.options,...ye(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);let a=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?x.init(a(this.modules.logger),this.options):x.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:he;let t=new ae(this.options);this.store=new C(this.options.resources,this.options);let n=this.services;n.logger=x,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new ce(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=a(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new de(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new _e(a(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=a(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=a(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new ie(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,r||=D,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=t(),s=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),o.resolve(t),r(e,t)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),o}loadResources(t,n=D){let r=n,i=e(t)?t:this.language;if(typeof t==`function`&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return r();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,n,r){let i=t();return typeof e==`function`&&(r=e,e=void 0),typeof n==`function`&&(r=n,n=void 0),e||=this.languages,n||=this.options.ns,r||=D,this.services.backendConnector.reload(e,n,e=>{i.resolve(),r(e)}),i}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&w.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(n,r){this.isLanguageChangingTo=n;let i=t();this.emit(`languageChanging`,n);let a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,t)=>{t?this.isLanguageChangingTo===n&&(a(t),this.translator.changeLanguage(t),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,t),this.logger.log(`languageChanged`,t)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),r&&r(e,(...e)=>this.t(...e))},s=t=>{!n&&!t&&this.services.languageDetector&&(t=[]);let r=e(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(e(t)?[t]:t);i&&(this.language||a(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return!n&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(n),i}getFixedT(t,n,r,i){let a=i?.scopeNs,o=(e,t,...n)=>{let i;i=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(n)),i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs;let s=i.ns!==void 0&&i.ns!==null;i.ns=i.ns||o.ns,i.keyPrefix!==``&&(i.keyPrefix=i.keyPrefix||r||o.keyPrefix);let c={...this.options,...i};Array.isArray(a)&&!s&&(c.ns=a),typeof i.keyPrefix==`function`&&(i.keyPrefix=E(i.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return i.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=E(e,c)),`${i.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=E(e,c)),u=i.keyPrefix?`${i.keyPrefix}${l}${e}`:e),this.t(u,i)};return e(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(n,r){let i=t();return this.options.ns?(e(n)&&(n=[n]),n.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),r&&r(e)}),i):(r&&r(),Promise.resolve())}loadLanguages(n,r){let i=t();e(n)&&(n=[n]);let a=this.options.preload||[],o=n.filter(e=>!a.includes(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{i.resolve(),r&&r(e)}),i):(r&&r(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=/* @__PURE__ */ `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`.split(`.`),n=this.services?.languageUtils||new ae(ve());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(e={},t){let r=new n(e,t);return r.createInstance=n.createInstance,r}cloneInstance(e={},t=D){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},a=new n(i);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new C(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),e.interpolation){let t={...ve().interpolation,...this.options.interpolation,...e.interpolation},n={...i,interpolation:t};a.services.interpolator=new de(n)}return a.translator=new ie(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,t),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();O.createInstance,O.dir,O.init,O.loadResources,O.reloadResources,O.use,O.changeLanguage,O.getFixedT,O.t,O.exists,O.setDefaultNamespace,O.hasLoadedNamespace,O.loadNamespaces,O.loadLanguages;const k={};async function xe(e,t){return await(await fetch(e+t+`/translation.json`,{headers:{"Content-Type":`application/json`}})).json()}async function Se(e,t){if(!e)return;let n=e+`::`+t;if(k[n]===void 0){let r=xe(e,t);return k[n]=r,r}return k[n]}function Ce(e,t=!1){let n=t?1e3:1024;if(Math.abs(e)<n)return e+` B`;let r=[`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],i=-1;do e/=n,++i;while(Math.abs(e)>=n&&i<r.length-1);return e.toFixed(1)+` `+r[i]}function we(e){return`--`+e+`-override`}function Te(e,t,n,r){r===void 0&&(r=`translation`);let i=we(r);var a={lng:t,fallbackLng:[n,t,...Object.keys(e)],debug:!1,ns:[i,r],defaultNS:r,fallbackNS:r,initImmediate:!1,initAsync:!1,resources:{}};Object.keys(e).forEach(function(t){a.resources[t]={[r]:e[t]}});var o=O.createInstance();return o.init(a),console.assert(o.isInitialized),o}async function Ee(e,t){let n=(t.dataset&&t.dataset.tagName||t.tagName).toLowerCase(),r=e.options.fallbackNS,i=we(r),a=!1;for(let r of e.languages){let o=t.langDir+`::`+r;if(await Se(t.langDir,r),k[o]=await k[o],e.removeResourceBundle(r,i),k[o]===void 0||k[o][n]===void 0)continue;let s=k[o][n];a=!0,e.addResourceBundle(r,i,s)}e.setDefaultNamespace(a?i:r),t.requestUpdate()}
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const A=globalThis,De=A.ShadowRoot&&(A.ShadyCSS===void 0||A.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,Oe=Symbol(),ke=/* @__PURE__ */ new WeakMap;var Ae=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Oe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(De&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=ke.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ke.set(t,e))}return e}toString(){return this.cssText}};const j=e=>new Ae(typeof e==`string`?e:e+``,void 0,Oe),M=(e,...t)=>new Ae(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,Oe),je=(e,t)=>{if(De)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=A.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},Me=De?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return j(t)})(e):e,{is:Ne,defineProperty:Pe,getOwnPropertyDescriptor:Fe,getOwnPropertyNames:Ie,getOwnPropertySymbols:Le,getPrototypeOf:Re}=Object,N=globalThis,ze=N.trustedTypes,Be=ze?ze.emptyScript:``,Ve=N.reactiveElementPolyfillSupport,P=(e,t)=>e,He={toAttribute(e,t){
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
switch(t){case Boolean:e=e?Be:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},Ue=(e,t)=>!Ne(e,t),We={attribute:!0,type:String,converter:He,reflect:!1,useDefault:!1,hasChanged:Ue};Symbol.metadata??=Symbol(`metadata`),N.litPropertyMetadata??=/* @__PURE__ */ new WeakMap;var F=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=We){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&Pe(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=Fe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??We}static _$Ei(){if(this.hasOwnProperty(P(`elementProperties`)))return;let e=Re(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P(`properties`))){let e=this.properties,t=[...Ie(e),...Le(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=/* @__PURE__ */ new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(Me(e))}else e!==void 0&&t.push(Me(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=/* @__PURE__ */ new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=/* @__PURE__ */ new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=/* @__PURE__ */ new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return je(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?He:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?He:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??Ue)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=/* @__PURE__ */ new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=/* @__PURE__ */ new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=/* @__PURE__ */ new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};F.elementStyles=[],F.shadowRootOptions={mode:`open`},F[P(`elementProperties`)]=/* @__PURE__ */ new Map,F[P(`finalized`)]=/* @__PURE__ */ new Map,Ve?.({ReactiveElement:F}),(N.reactiveElementVersions??=[]).push(`2.1.2`);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const Ge=globalThis,Ke=e=>e,I=Ge.trustedTypes,qe=I?I.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,Je=`$lit$`,L=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye=`?`+L,Xe=`<${Ye}>`,R=document,z=()=>R.createComment(``),B=e=>e===null||typeof e!=`object`&&typeof e!=`function`,Ze=Array.isArray,Qe=e=>Ze(e)||typeof e?.[Symbol.iterator]==`function`,$e=`[ 	
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,tt=/>/g,H=RegExp(`>|${$e}(?:([^\\s"'>=/]+)(${$e}*=${$e}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),nt=/'/g,rt=/"/g,it=/^(?:script|style|textarea|title)$/i,at=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),ot=at(1),st=at(2),ct=at(3),U=Symbol.for(`lit-noChange`),W=Symbol.for(`lit-nothing`),lt=/* @__PURE__ */ new WeakMap,G=R.createTreeWalker(R,129);function ut(e,t){if(!Ze(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return qe===void 0?t:qe.createHTML(t)}const dt=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=V;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===V?c[1]===`!--`?o=et:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=H):(it.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=H):o=tt:o===H?c[0]===`>`?(o=i??V,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?H:c[3]===`"`?rt:nt):o===rt||o===nt?o=H:o===et||o===tt?o=V:(o=H,i=void 0);let d=o===H&&e[t+1].startsWith(`/>`)?` `:``;a+=o===V?n+Xe:l>=0?(r.push(s),n.slice(0,l)+Je+n.slice(l)+L+d):n+L+(l===-2?t:d)}return[ut(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]};var ft=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=dt(t,n);if(this.el=e.createElement(l,r),G.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=G.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(Je)){let t=u[o++],n=i.getAttribute(e).split(L),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?mt:r[1]===`?`?ht:r[1]===`@`?gt:J}),i.removeAttribute(e)}else e.startsWith(L)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(it.test(i.tagName)){let e=i.textContent.split(L),t=e.length-1;if(t>0){i.textContent=I?I.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],z()),G.nextNode(),c.push({type:2,index:++a});i.append(e[t],z())}}}else if(i.nodeType===8){if(i.data===Ye)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(L,e+1))!==-1;)c.push({type:7,index:a}),e+=L.length-1}}a++}}static createElement(e,t){let n=R.createElement(`template`);return n.innerHTML=e,n}};function K(e,t,n=e,r){if(t===U)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=B(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=K(e,i._$AS(e,t.values),i,r)),t}var pt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??R).importNode(t,!0);G.currentNode=r;let i=G.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new q(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new _t(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=G.nextNode(),a++)}return G.currentNode=R,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},q=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=K(this,e,t),B(e)?e===W||e==null||e===``?(this._$AH!==W&&this._$AR(),this._$AH=W):e!==this._$AH&&e!==U&&this._(e):e._$litType$===void 0?e.nodeType===void 0?Qe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==W&&B(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=ft.createElement(ut(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new pt(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=lt.get(e.strings);return t===void 0&&lt.set(e.strings,t=new ft(e)),t}k(t){Ze(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(z()),this.O(z()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=Ke(e).nextSibling;Ke(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},J=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=W,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(/* @__PURE__ */ new String),this.strings=n):this._$AH=W}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=K(this,e,t,0),a=!B(e)||e!==this._$AH&&e!==U,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=K(this,r[n+o],t,o),s===U&&(s=this._$AH[o]),a||=!B(s)||s!==this._$AH[o],s===W?e=W:e!==W&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},mt=class extends J{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===W?void 0:e}},ht=class extends J{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==W)}},gt=class extends J{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=K(this,e,t,0)??W)===U)return;let n=this._$AH,r=e===W&&n!==W||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==W&&(n===W||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},_t=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){K(this,e)}};const vt={M:Je,P:L,A:Ye,C:1,L:dt,R:pt,D:Qe,V:K,I:q,H:J,N:ht,U:gt,B:mt,F:_t},yt=Ge.litHtmlPolyfillSupport;yt?.(ft,q),(Ge.litHtmlVersions??=[]).push(`3.3.3`);const bt=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new q(t.insertBefore(z(),e),e,void 0,n??{})}return i._$AI(e),i},xt=globalThis
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
;var Y=class extends F{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=bt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};Y._$litElement$=!0,Y.finalized=!0,xt.litElementHydrateSupport?.({LitElement:Y});const St=xt.litElementPolyfillSupport;St?.({LitElement:Y}),(xt.litElementVersions??=[]).push(`4.2.2`);
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Ct=e=>e??W,wt=e=>{let t=[];return Object.keys(e).forEach(n=>{t.push({id:n,text:e[n]})}),t},Tt=(e,t,n)=>(customElements.get(e)===t||customElements.define(e,t,n),!0),Et=e=>{let t=``;for(let n=0;n<e;n++)t+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return t},Dt=(e,t={})=>{let n=kt(t);return new URL(e,n).href},Ot=(e,t,n={})=>{if(t===void 0)return console.warn(`getAssetURL called without package name, use getAbsoluteURL instead`),Dt(e,n);let r=`local/`+e+`/`+t,i=kt(n);return new URL(r,i).href},kt=(e={})=>{let t=new URL(e.metaUrl===void 0?import.meta.url:e.metaUrl);return t.pathname.split(`/`).slice(-2)[0]===`shared`&&(t=new URL(`..`,t)),t};async function At(e,t){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];await t(e[i],i,e)}}async function jt(e,t){for(let n=0;n<e.length;n++)await t(e[n],n,e)}async function Mt(e){let t=e=>{switch(e){case`89504E47`:return`image/png`;case`47494638`:return`image/gif`;case`25504446`:return`application/pdf`;case`FFD8FFDB`:case`FFD8FFE0`:case`FFD8FFE1`:return`image/jpeg`;case`504B0304`:return`application/zip`;default:return`Unknown filetype`}};return await new Promise(n=>{let r=new FileReader;r.onloadend=function(){if(!(r.result instanceof ArrayBuffer)){n(`Unknown filetype`);return}let e=new Uint8Array(r.result),i=[];e.forEach(e=>{i.push(e.toString(16))});let a=i.join(``).toUpperCase();n(t(a))},r.readAsArrayBuffer(e.slice(0,4))})}const Nt=e=>{let t=String(e).substring(e.lastIndexOf(`/`)+1);return t.lastIndexOf(`.`)!==-1&&(t=t.substring(0,t.lastIndexOf(`.`))),t},Pt=e=>e.split(`.`).pop();function Ft(){let e=/* @__PURE__ */ new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=[...e].map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20,32)}`}var It=`@dbp-toolkit/common`;function X(e){return Ot(It,`icons/`+encodeURI(e)+`.svg`)}var Lt=class extends Y{constructor(){super(),this.name=`bolt`,this.ariaLabel=void 0}static get properties(){return{name:{type:String},ariaLabel:{type:String,attribute:`aria-label`,reflect:!0}}}static get styles(){return M`
            :host {
                display: inline-block;
                height: 1em;
                width: 1em;
                min-width: 1em;
                min-height: 1em;
                top: 0.125em;
                position: relative;
            }

            #svg {
                height: 100%;
                width: 100%;
                background-repeat: no-repeat;
                background-position: center;
                background-color: currentColor;
                mask-repeat: no-repeat;
                mask-position: center;
                mask-size: 100% 100%;
                -webkit-mask-repeat: no-repeat;
                -webkit-mask-position: center;
                -webkit-mask-size: 100% 100%;
            }
        `}render(){let e=X(this.name),t=this.name.trim().split(` `).join(``);return ot`
            <style>
                #svg {
                    -webkit-mask-image: var(--dbp-override-icon-${t}, url(${e}));
                    mask-image: var(--dbp-override-icon-${t}, url(${e}));
                }
            </style>
            <div
                id="svg"
                aria-label="${Ct(this.ariaLabel?this.ariaLabel:void 0)}"></div>
        `}};const Rt=/* @__PURE__ */ new WeakMap;function zt(e,t){let n=t;for(;n;){if(Rt.get(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function Z(e){return t=>{if(zt(e,t))return t;let n=e(t);return Rt.set(n,e),n}}const Bt=`3.0.0`,Vt=window.scopedElementsVersions||(window.scopedElementsVersions=[]);Vt.includes(Bt)||Vt.push(Bt);const Ht=Z(e=>class extends e{static scopedElements;static get scopedElementsVersion(){return Bt}static __registry;get registry(){return this.constructor.__registry}set registry(e){this.constructor.__registry=e}attachShadow(e){let{scopedElements:t}=this.constructor;if(!this.registry||this.registry===this.constructor.__registry&&!Object.prototype.hasOwnProperty.call(this.constructor,`__registry`)){this.registry=new CustomElementRegistry;for(let[e,n]of Object.entries(t??{}))this.registry.define(e,n)}return super.attachShadow({...e,customElements:this.registry,registry:this.registry})}}),Ut=Z(e=>class extends Ht(e){createRenderRoot(){let{shadowRootOptions:e,elementStyles:t}=this.constructor,n=this.attachShadow(e);return this.renderOptions.creationScope=n,je(n,t),this.renderOptions.renderBefore??=n.firstChild,n}});function Wt(){return!!(globalThis.ShadowRoot?.prototype.createElement&&globalThis.ShadowRoot?.prototype.importNode)}const Gt=Z(e=>class extends Ut(e){constructor(){super()}createScopedElement(e){return(Wt()?this.shadowRoot:document).createElement(e)}defineScopedElement(e,t){let n=this.registry.get(e),r=n&&n!==t;return!Wt()&&r&&console.error([`You are trying to re-register the "${e}" custom element with a different class via ScopedElementsMixin.`,`This is only possible with a CustomElementRegistry.`,`Your browser does not support this feature so you will need to load a polyfill for it.`,`Load "@webcomponents/scoped-custom-element-registry" before you register ANY web component to the global customElements registry.`,`e.g. add "<script src="/node_modules/@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min.js"><\/script>" as your first script tag.`,`For more details you can visit https://open-wc.org/docs/development/scoped-elements/`].join(`
`)),n?this.registry.get(e):this.registry.define(e,t)}attachShadow(e){let{scopedElements:t}=this.constructor;if(!this.registry||this.registry===this.constructor.__registry&&!Object.prototype.hasOwnProperty.call(this.constructor,`__registry`)){this.registry=Wt()?new CustomElementRegistry:customElements;for(let[e,n]of Object.entries(t??{}))this.defineScopedElement(e,n)}return Element.prototype.attachShadow.call(this,{...e,customElements:this.registry,registry:this.registry})}createRenderRoot(){let{shadowRootOptions:e,elementStyles:t}=this.constructor,n=this.attachShadow(e);return Wt()&&(this.renderOptions.creationScope=n),n instanceof ShadowRoot&&(je(n,t),this.renderOptions.renderBefore=this.renderOptions.renderBefore||n.firstChild),n}});function Kt(){return M`
        :host {
            /* new new variables */
            --dbp-background: var(--dbp-override-background, #ffffff);
            --dbp-content: var(--dbp-override-content, #222120);
            --dbp-content-surface: var(--dbp-override-content-surface, var(--dbp-content));
            --dbp-on-content-surface: var(--dbp-override-on-content-surface, var(--dbp-background));
            --dbp-border: var(--dbp-override-border, 1px solid #222120);
            --dbp-border-radius: var(--dbp-override-border-radius, 0px);
            --dbp-primary: var(--dbp-override-primary, #3775c1);
            --dbp-primary-surface: var(--dbp-override-primary-surface, var(--dbp-primary));
            --dbp-on-primary-surface: var(
                --dbp-override-on-primary-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-primary-surface-border-color: var(
                --dbp-override-primary-surface-border-color,
                var(--dbp-primary)
            );
            --dbp-secondary: var(--dbp-override-secondary, #222120);
            --dbp-secondary-surface: var(--dbp-override-secondary-surface, var(--dbp-secondary));
            --dbp-on-secondary-surface: var(
                --dbp-override-on-secondary-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-secondary-surface-border-color: var(
                --dbp-override-secondary-surface-border-color,
                var(--dbp-secondary)
            );
            --dbp-muted: var(--dbp-override-muted, #767676);
            --dbp-muted-surface: var(--dbp-override-muted-surface, var(--dbp-muted));
            --dbp-on-muted-surface: var(
                --dbp-override-on-muted-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-muted-surface-border-color: var(
                --dbp-override-muted-surface-border-color,
                var(--dbp-muted)
            );

            --dbp-selected: var(--dbp-override-selected, #eaeaea);
            --dbp-selected-surface: var(--dbp-override-selected-surface, var(--dbp-selected));
            --dbp-on-selected-surface: var(--dbp-override-on-selected-surface, var(--dbp-content));
            --dbp-selected-surface-border-color: var(
                --dbp-override-selected-surface-border-color,
                var(--dbp-selected)
            );

            --dbp-accent: var(--dbp-override-accent, #9e1e4d);
            --dbp-accent-surface: var(--dbp-override-accent-surface, var(--dbp-accent));
            --dbp-on-accent-surface: var(
                --dbp-override-on-accent-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-accent-surface-border-color: var(
                --dbp-override-accent-surface-border-color,
                var(--dbp-accent)
            );

            --dbp-info: var(--dbp-override-info, #38808a);
            --dbp-info-surface: var(--dbp-override-info-surface, var(--dbp-info));
            --dbp-on-info-surface: var(
                --dbp-override-on-info-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-info-surface-border-color: var(
                --dbp-override-info-surface-border-color,
                var(--dbp-info)
            );
            --dbp-success: var(--dbp-override-success, #338555);
            --dbp-success-surface: var(--dbp-override-success-surface, var(--dbp-success));
            --dbp-on-success-surface: var(
                --dbp-override-on-success-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-success-surface-border-color: var(
                --dbp-override-success-surface-border-color,
                var(--dbp-success)
            );
            --dbp-warning: var(--dbp-override-warning, #bf8808);
            --dbp-warning-surface: var(--dbp-override-warning-surface, var(--dbp-warning));
            --dbp-on-warning-surface: var(
                --dbp-override-on-warning-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-warning-surface-border-color: var(
                --dbp-override-warning-surface-border-color,
                var(--dbp-warning)
            );
            --dbp-danger: var(--dbp-override-danger, #cc3232);
            --dbp-danger-surface: var(--dbp-override-danger-surface, var(--dbp-danger));
            --dbp-on-danger-surface: var(
                --dbp-override-on-danger-surface,
                var(--dbp-on-content-surface)
            );
            --dbp-danger-surface-border-color: var(
                --dbp-override-danger-surface-border-color,
                var(--dbp-danger)
            );
            --dbp-hover-background-color: var(--dbp-override-hover-background-color);
            --dbp-hover-color: var(--dbp-override-hover-color);
        }

        #root {
            background-color: var(--dbp-background);
            color: var(--dbp-content);
        }

        ::-moz-selection {
            color: var(--dbp-on-primary-surface);
            background: var(--dbp-primary-surface);
        }

        ::selection {
            color: var(--dbp-on-primary-surface);
            background: var(--dbp-primary-surface);
        }
    `}function qt(e=!0){let t=e?M`
              blockquote,
              body,
              dd,
              dl,
              dt,
              fieldset,
              figure,
              h1,
              h2,
              h3,
              h4,
              h5,
              h6,
              hr,
              html,
              iframe,
              legend,
              li,
              ol,
              p,
              pre,
              textarea,
              ul {
                  margin: 0;
                  padding: 0;
              }
              /*here played around*/
              /*h1 {
                  font-weight: 300;
                  margin-bottom: 20px;
                  text-align: center;
              }*/
          `:M``;return M`
        h2 {
            font-size: 1.5rem;
            font-weight: 300;
            /*text-align: center;*/
        }

        h3 {
            font-size: 1.17rem;
            font-weight: 300;
            margin-top: 0px;
            margin-bottom: 0.75rem;
        }

        p {
            font-size: 1em;
        }

        .field.has-addons {
            display: flex;
            justify-content: flex-start;
        }

        .input,
        .textarea,
        .select select {
            border: solid 1px var(--dbp-muted);
            border-radius: var(--dbp-border-radius);
            padding-bottom: calc(0.375em - 1px);
            padding-left: calc(0.625em - 1px);
            padding-right: calc(0.625em - 1px);
            padding-top: calc(0.375em - 1px);
        }

        .input::placeholder,
        .textarea::placeholder,
        .select select::placeholder {
            color: var(--dbp-muted);
        }

        input,
        ::placeholder,
        textarea,
        select,
        button,
        .select select {
            font-size: inherit;
            font-family: inherit;
            font-weight: inherit;
        }

        input::-moz-focus-inner {
            border: 0;
        }

        :focus-visible {
            outline: none !important;
            outline-width: 0 !important;
            box-shadow: none;
            -moz-box-shadow: none;
            -webkit-box-shadow: none;
            box-shadow: 0px 0px 3px 1px var(--dbp-primary);
        }

        .control {
            box-sizing: border-box;
            clear: both;
            font-size: 1rem;
            position: relative;
            text-align: left;
        }

        .label {
            margin-bottom: 0.5em;
            display: block;
            font-weight: 600;
        }

        .hidden {
            display: none;
        }

        a {
            color: var(--dbp-content);
            cursor: pointer;
            text-decoration: none;
            word-wrap: break-word;
        }

        a.is-download {
            border-bottom: var(--dbp-border);
            transition:
                background-color 0.15s,
                color 0.15s;
        }

        a.is-download:hover {
            color: var(--dbp-hover-color, var(--dbp-content));
            background-color: var(--dbp-hover-background-color);
        }

        #headline h1 {
            font-size: 2em;
            font-weight: 300;
        }

        ${t}.int-link-internal

        .button[disabled], .file-cta[disabled], .file-name[disabled], .input[disabled], .pagination-ellipsis[disabled],
        .pagination-link[disabled], .pagination-next[disabled], .pagination-previous[disabled], .select fieldset[disabled] select,
        .select select[disabled], .textarea[disabled], fieldset[disabled] .button, fieldset[disabled] .file-cta,
        fieldset[disabled] .file-name, fieldset[disabled] .input, fieldset[disabled] .pagination-ellipsis,
        fieldset[disabled] .pagination-link, fieldset[disabled] .pagination-next, fieldset[disabled] .pagination-previous,
        fieldset[disabled] .select select, fieldset[disabled] .textarea {
            cursor: not-allowed;
        }

        .input,
        .select select,
        .textarea {
            background-color: var(--dbp-background);
            border-color: var(--dbp-muted);
            border-radius: var(--dbp-border-radius);
            color: var(--dbp-content);
        }

        *,
        ::after,
        ::before {
            box-sizing: inherit;
        }

        select:not(.select),
        .dropdown-menu {
            -moz-appearance: none;
            -webkit-appearance: none;
            background-color: var(--dbp-background);
            background: calc(100% - 0.4rem) center no-repeat
                url('${j(X(`chevron-down`))}');
            background-size: 25%;
            border: var(--dbp-border);
            border-radius: var(--dbp-border-radius);
            color: var(--dbp-content);
            padding: 0.14rem 1rem 0.14rem 0.14rem;
        }

        .input:disabled,
        .textarea:disabled,
        textarea:disabled,
        select:disabled,
        .select select:disabled {
            color: var(--dbp-muted);
            border-color: var(--dbp-muted);
            cursor: not-allowed;
        }

        ::-moz-selection {
            color: var(--dbp-on-primary-surface);
            background: var(--dbp-primary-surface);
        }

        ::selection {
            color: var(--dbp-on-primary-surface);
            background: var(--dbp-primary-surface);
        }
    `}function Jt(){return M`
        .notification {
            background-color: var(--dbp-background);
            color: var(--dbp-content);
            padding: 1.25rem 2.5rem 1.25rem 1.5rem;
            position: relative;
            border-radius: var(--dbp-border-radius);
            border: var(--dbp-border);
        }

        .notification.has-progress-bar {
            padding-bottom: 1rem;
        }

        .notification a:not(.button):not(.dropdown-item) {
            color: currentColor;
            text-decoration: underline;
        }

        .notification strong {
            color: currentColor;
        }

        .notification code,
        .notification pre {
            color: var(--dbp-on-muted-surface);
            background: var(--dbp-muted-surface);
            border-color: var(--dbp-muted-surface-border-color);
        }

        .notification pre code {
            background: transparent;
        }

        .notification dbp-icon {
            font-size: 1.4em;
            margin-right: 0.4em;
        }

        .notification > .delete {
            position: absolute;
            right: 0.5rem;
            top: 0.5rem;
        }

        .notification .title,
        .notification .subtitle,
        .notification .content {
            color: currentColor;
        }

        .notification.is-primary {
            background-color: var(--dbp-primary-surface);
            color: var(--dbp-on-primary-surface);
            border-color: var(--dbp-primary-surface-border-color);
        }

        .notification.is-info {
            background-color: var(--dbp-info-surface);
            color: var(--dbp-on-info-surface);
            border-color: var(--dbp-info-surface-border-color);
        }

        .notification.is-success {
            background-color: var(--dbp-success-surface);
            color: var(--dbp-on-success-surface);
            border-color: var(--dbp-success-surface-border-color);
        }

        .notification.is-warning {
            background-color: var(--dbp-warning-surface);
            color: var(--dbp-on-warning-surface);
            border-color: var(--dbp-warning-surface-border-color);
        }

        .notification.is-danger {
            background-color: var(--dbp-danger-surface);
            color: var(--dbp-on-danger-surface);
            border-color: var(--dbp-danger-surface-border-color);
        }

        .progress-container {
            width: 100%;
            margin-top: 0.5rem;
        }

        progress[value] {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            border: none;
            height: 10px;
        }

        .progress {
            height: 10px;
            animation: runProgress var(--dbp-progress-timeout, 5s) linear forwards 0.25s;
        }

        @keyframes runProgress {
            0% {
                width: 0%;
                background: rgba(255, 255, 255, 0.3);
            }

            100% {
                width: 100%;
                background: rgba(255, 255, 255, 1);
            }
        }

        .enter-animation {
            animation: slide-up 0.4s cubic-bezier(0.25, 0, 0.3, 1);
        }

        @keyframes slide-up {
            0% {
                transform: translateY(50%);
                opacity: 0.3;
            }
            75% {
                transform: translateY(10%);
                opacity: 0.75;
            }
            100% {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes scale-up {
            0% {
                transform: scale(0.75);
                opacity: 0.3;
            }
            75% {
                transform: scale(0.9);
                opacity: 0.75;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .is-removing {
            /*animation: fadeOut 0.25s forwards;*/
            animation: scale-down 2s ease-out; /*cubic-bezier(.25,0,.3,1);*/
        }

        @keyframes scale-down {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(0.9);
                opacity: 0.5;
            }
            100% {
                transform: scale(0.75);
                opacity: 0.15;
            }
        }

        @keyframes fadeOut {
            from {
                opacity: 1;
            }
            to {
                opacity: 0;
                transform: translateY(-100%);
            }
        }
    `}function Yt(){return M`
        button.button,
        .button,
        button.dt-button {
            border: var(--dbp-border);
            border-radius: var(--dbp-border-radius);
            color: var(--dbp-content);
            cursor: pointer;
            justify-content: center;
            padding-bottom: calc(0.375em - 1px);
            padding-left: 0.75em;
            padding-right: 0.75em;
            padding-top: calc(0.375em - 1px);
            text-align: center;
            white-space: nowrap;
            font-size: inherit;
            font-weight: bolder;
            font-family: inherit;
            transition:
                all 0.15s ease 0s,
                color 0.15s ease 0s;
            background: var(--dbp-secondary-surface);
            color: var(--dbp-on-secondary-surface);
            border-color: var(--dbp-secondary-surface-border-color);
        }

        button.button:hover:enabled,
        .button:hover:enabled,
        button.dt-button:hover:enabled,
        button.dt-button:hover:not(.disabled) {
            color: var(--dbp-hover-color, var(--dbp-on-secondary-surface));
            background-color: var(--dbp-hover-background-color, var(--dbp-secondary-surface));
            border-color: var(
                --dbp-hover-background-color,
                var(--dbp-secondary-surface-border-color)
            );
        }

        button.button.is-small,
        .button.is-small {
            border-radius: calc(var(--dbp-border-radius) / 2);
            font-size: 0.75rem;
        }

        button.button.is-icon,
        .button.is-icon {
            border: none;
            background: none;
            padding: 0px;
            width: var(--dbp-button-size, 40px);
            height: var(--dbp-button-size, 40px);
            display: flex;
            justify-content: center;
            align-items: center;
            color: currentColor;
        }

        button.button.is-icon dbp-icon,
        .button.is-icon dbp-icon {
            top: 0px;
        }

        button.button.is-icon:hover:enabled,
        .button.is-icon:hover:enabled {
            background-color: var(--dbp-hover-background-color, unset);
            color: var(--dbp-hover-color, currentColor);
            border: 0 none;
        }

        button.button.is-primary,
        .button.is-primary {
            background-color: var(--dbp-primary-surface);
            border-color: var(--dbp-primary-surface-border-color);
            color: var(--dbp-on-primary-surface);
        }

        button.button.is-primary:hover:enabled,
        .button.is-primary:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-primary-surface));
            color: var(--dbp-hover-color, var(--dbp-on-primary-surface));
            border-color: var(
                --dbp-hover-background-color,
                var(--dbp-primary-surface-border-color)
            );
        }

        button.button.is-secondary,
        .button.is-secondary {
            background-color: var(--dbp-secondary-surface);
            color: var(--dbp-on-secondary-surface);
            border-color: var(--dbp-secondary-surface-border-color);
        }

        button.button.is-secondary:hover:enabled,
        .button.is-secondary:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-secondary-surface));
            color: var(--dbp-hover-color, var(--dbp-on-secondary-surface));
            border-color: var(
                --dbp-hover-background-color,
                var(--dbp-secondary-surface-border-color)
            );
        }

        button.button.is-info,
        .button.is-info {
            background-color: var(--dbp-info-surface);
            color: var(--dbp-on-info-surface);
            border-color: var(--dbp-info-surface-border-color);
        }

        button.button.is-info:hover:enabled,
        .button.is-info:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-info-surface));
            color: var(--dbp-hover-color, var(--dbp-on-info-surface));
            border-color: var(--dbp-hover-background-color, var(--dbp-info-surface-border-color));
        }

        button.button.is-success,
        .button.is-success {
            background-color: var(--dbp-success-surface);
            border-color: var(--dbp-success-surface-border-color);
            color: var(--dbp-on-success-surface);
        }

        button.button.is-success:hover:enabled,
        .button.is-success:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-success-surface));
            color: var(--dbp-hover-color, var(--dbp-on-success-surface));
            border-color: var(
                --dbp-hover-background-color,
                var(--dbp-success-surface-border-color)
            );
        }

        button.button.is-warning,
        .button.is-warning {
            background-color: var(--dbp-warning-surface);
            border-color: var(--dbp-warning-surface-border-color);
            color: var(--dbp-on-warning-surface);
        }

        button.button.is-warning:hover:enabled,
        .button.is-warning:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-warning-surface));
            color: var(--dbp-hover-color, var(--dbp-on-warning-surface));
            border-color: var(
                --dbp-hover-background-color,
                var(--dbp-warning-surface-border-color)
            );
        }

        .button.button.is-danger,
        .button.is-danger {
            background-color: var(--dbp-danger-surface);
            border-color: var(--dbp-danger-surface-border-color);
            color: var(--dbp-on-danger-surface);
        }

        .button.button.is-danger:hover:enabled,
        .button.is-danger:hover:enabled {
            background-color: var(--dbp-hover-background-color, var(--dbp-danger-surface));
            color: var(--dbp-hover-color, var(--dbp-on-danger-surface));
            border-color: var(--dbp-hover-background-color, var(--dbp-danger-surface-border-color));
        }

        button.button[disabled],
        .button[disabled],
        fieldset[disabled] .button {
            opacity: 0.4;
            cursor: not-allowed;
        }

        button:focus-visible {
            outline: none !important;
            outline-width: 0 !important;
            box-shadow: none;
            -moz-box-shadow: none;
            -webkit-box-shadow: none;
            box-shadow: 0px 0px 3px 1px var(--dbp-primary);
        }
        @media (max-width: 560px) {
            :is(button, dbp-button) .button-label {
                display: none;
            }
        }
    `}function Xt(){return M`
        /*
        Radiobutton:
            <label class="button-container">
                Labeltext
                <input type="radio" name="myradiobutton">
                <span class="radiobutton"></span>
            </label>

        Checkbox:
            <label class="button-container">
                Labeltext
                <input type="checkbox" name="mycheckbox">
                <span class="checkmark"></span>
            </label>
         */

        .button-container {
            display: block;
            position: relative;
            padding-left: 35px;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .button-container input[type='radio'],
        .button-container input[type='checkbox'] {
            position: absolute;
            opacity: 0;
            cursor: pointer;
            height: 0;
            width: 0;
            left: 0px;
        }

        .checkmark {
            position: absolute;
            top: 0;
            left: 0;
            height: 21px;
            width: 21px;
            background-color: var(--dbp-background);
            border-radius: 0px;
            border: var(--dbp-border);
        }

        .radiobutton {
            position: absolute;
            top: 0;
            left: 0;
            height: 19px;
            width: 19px;
            background-color: var(--dbp-background);
            border: solid;
            border-radius: 100%;
            border: var(--dbp-border);

            box-sizing: content-box;
        }

        .button-container input[type='radio']:checked ~ .radiobutton:after {
            border-color: var(--dbp-background);
        }

        .button-container input[type='radio']:disabled ~ .radiobutton {
            border-color: var(--dbp-muted);
            background-color: var(--dbp-muted);
        }

        .button-container input[type='radio']:checked:disabled ~ .radiobutton:after {
            border-color: var(--dbp-muted);
            background-color: var(--dbp-muted);
        }

        .radiobutton:after {
            content: '';
            position: absolute;
            display: none;
        }

        .button-container input[type='radio']:checked ~ .radiobutton:after {
            display: block;
        }

        .button-container .radiobutton:after {
            left: 0px;
            top: 0px;
            width: 100%;
            height: 100%;
            background-color: var(--dbp-content);
            border: none;
            border-radius: 100%;
            border: 2px solid var(--dbp-background);
            box-sizing: border-box;
        }

        .button-container input[type='checkbox']:checked ~ .checkmark:after {
            border-bottom: 1px solid var(--dbp-content);
            border-right: 1px solid var(--dbp-content);
            border-width: 0 2px 2px 0;
        }

        .button-container input[type='checkbox']:focus-visible ~ .checkmark {
            outline: none !important;
            outline-width: 0 !important;
            box-shadow: none;
            -moz-box-shadow: none;
            -webkit-box-shadow: none;
            box-shadow: 0px 0px 3px 1px var(--dbp-primary);
        }

        .button-container input[type='checkbox']:disabled ~ .checkmark {
            border-color: var(--dbp-muted);
            background-color: var(--dbp-muted);
        }

        .button-container input[type='checkbox']:checked:disabled ~ .checkmark:after {
            border-color: var(--dbp-muted);
        }

        .checkmark:after {
            content: '';
            position: absolute;
            display: none;
        }

        .button-container input[type='checkbox']:checked ~ .checkmark:after {
            display: block;
        }

        .button-container .checkmark:after {
            left: 8px;
            top: 3px;
            width: 5px;
            height: 11px;
            border: 1px solid var(--dbp-content);
            border-width: 0 2px 2px 0;
            -webkit-transform: rotate(45deg);
            -ms-transform: rotate(45deg);
            transform: rotate(45deg);
        }

        @media only screen and (orientation: portrait) and (max-width: 768px) {
            .checkmark {
                width: 30px;
                height: 30px;
                top: 5px;
            }

            .button-container {
                line-height: 40px;
            }

            .button-container {
                padding-left: 40px;
            }

            .button-container .checkmark::after {
                left: 10px;
                width: 10px;
                height: 19px;
            }

            .button-container input[type='checkbox']:checked ~ .checkmark::after {
                top: 1px;
                left: 6px;
                width: 5px;
                height: 11px;
            }

            .button-container {
                line-height: 1em;
            }
        }
    `}function Zt(){return M`
        .tags {
            align-items: center;
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-start;
        }

        .tags .tag {
            margin-bottom: 0.5rem;
        }

        .tags .tag:not(:last-child) {
            margin-right: 0.5rem;
        }

        .tags:last-child {
            margin-bottom: -0.5rem;
        }

        .tags:not(:last-child) {
            margin-bottom: 1rem;
        }

        .tags.are-medium .tag:not(.is-normal):not(.is-large) {
            font-size: 1rem;
        }

        .tags.are-large .tag:not(.is-normal):not(.is-medium) {
            font-size: 1.25rem;
        }

        .tags.is-centered {
            justify-content: center;
        }

        .tags.is-centered .tag {
            margin-right: 0.25rem;
            margin-left: 0.25rem;
        }

        .tags.is-right {
            justify-content: flex-end;
        }

        .tags.is-right .tag:not(:first-child) {
            margin-left: 0.5rem;
        }

        .tags.is-right .tag:not(:last-child) {
            margin-right: 0;
        }

        .tags.has-addons .tag {
            margin-right: 0;
        }

        .tags.has-addons .tag:not(:first-child) {
            margin-left: 0;
            border-bottom-left-radius: 0;
            border-top-left-radius: 0;
        }

        .tags.has-addons .tag:not(:last-child) {
            border-bottom-right-radius: 0;
            border-top-right-radius: 0;
        }

        .tag:not(body) {
            align-items: center;
            background-color: var(--dbp-muted);
            border-radius: var(--dbp-border-radius);
            color: var(--dbp-muted);
            display: inline-flex;
            font-size: 0.75rem;
            height: 2em;
            justify-content: center;
            line-height: 1.5;
            padding-left: 0.75em;
            padding-right: 0.75em;
            white-space: nowrap;
        }

        .tag:not(body) .delete {
            margin-left: 0.25rem;
            margin-right: -0.375rem;
        }

        .tag:not(body).is-dark {
            background-color: var(--dbp-content-surface);
            color: var(--dbp-on-content-surface);
        }

        .tag:not(body).is-light {
            background-color: var(--dbp-background);
            color: var(--dbp-content);
        }

        .tag:not(body).is-normal {
            font-size: 0.75rem;
        }

        .tag:not(body).is-medium {
            font-size: 1rem;
        }

        .tag:not(body).is-large {
            font-size: 1.25rem;
        }

        .tag:not(body) .icon:first-child:not(:last-child) {
            margin-left: -0.375em;
            margin-right: 0.1875em;
        }

        .tag:not(body) .icon:last-child:not(:first-child) {
            margin-left: 0.1875em;
            margin-right: -0.375em;
        }

        .tag:not(body) .icon:first-child:last-child {
            margin-left: -0.375em;
            margin-right: -0.375em;
        }

        .tag:not(body).is-delete {
            margin-left: 1px;
            padding: 0;
            position: relative;
            width: 2em;
        }

        .tag:not(body).is-delete::before,
        .tag:not(body).is-delete::after {
            background-color: currentColor;
            content: '';
            display: block;
            left: 50%;
            position: absolute;
            top: 50%;
            -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
            transform: translateX(-50%) translateY(-50%) rotate(45deg);
            -webkit-transform-origin: center center;
            transform-origin: center center;
        }

        .tag:not(body).is-delete::before {
            height: 1px;
            width: 50%;
        }

        .tag:not(body).is-delete::after {
            height: 50%;
            width: 1px;
        }

        .tag:not(body).is-delete:hover,
        .tag:not(body).is-delete:focus {
            background-color: var(--dbp-background);
        }

        .tag:not(body).is-delete:active {
            background-color: var(--dbp-background);
        }

        .tag:not(body).is-rounded {
            border-radius: 290486px;
        }

        a.tag:hover {
            text-decoration: underline;
        }
    `}function Qt(){return M`
        .select2-container {
            border-color: var(--dbp-content);
            --dbp-select2-icon-color: var(--dbp-content);
        }

        .select2-container--disabled {
            --dbp-select2-icon-color: var(--dbp-muted);
        }

        .select2-container--default .select2-selection--single,
        .select2-container--default .select2-selection--multiple {
            /* Size of the chevron and clear icons, the offset of the chevron from the right
               edge, and the total gap we reserve to the right for it. Kept as variables so
               the icons and the padding around them stay in sync. */
            --dbp-select2-icon-size: 0.75em;
            --dbp-select2-icon-edge: 8px;
            --dbp-select2-icon-gap: 16px;
            /* Left padding of the selection content, so the placeholder and the selected
               value/entries start at the same position in both modes */
            --dbp-select2-content-padding-left: 8px;
        }

        .select2-dropdown {
            border-radius: var(--dbp-border-radius);
        }

        .select2-container--default .select2-selection--single,
        .select2-container--default .select2-selection--multiple {
            border-radius: var(--dbp-border-radius);
            min-height: 32px;
            padding: 0;
            display: flex;
            align-items: center;
        }

        .select2-container--below .select2-selection--single {
            display: flex;
            flex-direction: row-reverse;
            justify-content: space-between;
            position: relative;
        }
        .select2-container--default .select2-selection--single .select2-selection__clear {
            margin-right: 30px;
        }

        .select2-container--default .select2-selection--single .select2-selection__rendered {
            color: inherit;
            padding-left: var(--dbp-select2-content-padding-left);
            padding-right: 0;
            display: flex;
            align-items: center;
            margin-right: auto;
        }

        .select2-container--default .select2-selection--single .select2-selection__clear,
        .select2-container--default .select2-selection--multiple .select2-selection__clear {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 1em;
            min-width: 24px;
            min-height: 24px;
            padding: 0;
            color: var(--dbp-select2-icon-color);
        }

        .select2-container--default .select2-selection--multiple .select2-selection__clear {
            top: 0;
            /* Same as the margin-top of the entries below */
            margin-top: 4px;
            margin-right: calc(var(--dbp-select2-icon-size) + var(--dbp-select2-icon-gap));
            height: 1.5em;
            box-sizing: border-box;
        }

        .select2-container--default .select2-selection--single .select2-selection__clear > span,
        .select2-container--default .select2-selection--multiple .select2-selection__clear > span {
            display: none;
        }

        .select2-container--default .select2-selection--single .select2-selection__clear::before,
        .select2-container--default .select2-selection--multiple .select2-selection__clear::before {
            content: '';
            display: block;
            width: var(--dbp-select2-icon-size);
            height: var(--dbp-select2-icon-size);
            background-color: currentColor;
            mask: url('${j(X(`close`))}') center / contain no-repeat;
            -webkit-mask: url('${j(X(`close`))}') center / contain no-repeat;
        }

        .select2-container--default .select2-selection--multiple .select2-selection__rendered {
            background-color: var(--dbp-background);
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
            max-width: 100%;
            margin: 4px;
        }

        .select2-container--default .select2-search--dropdown .select2-search__field {
            background-color: var(--dbp-background);
        }

        .select2-container--default
            .select2-results__option--highlighted.select2-results__option--selectable {
            background-color: var(--dbp-primary-surface);
            color: var(--dbp-on-primary-surface);
        }

        .select2-container--default .select2-results__option--selected {
            background-color: var(--dbp-selected);
            color: var(--dbp-on-selected-surface);
        }

        .select2-container--default .select2-selection--multiple {
            background-color: var(--dbp-background);
            /* Make room for the chevron drawn via ::after below, so entries and the
               inline search field can't end up underneath it */
            padding-right: calc(var(--dbp-select2-icon-size) + var(--dbp-select2-icon-gap));
            position: relative;
        }

        .select2-container--default .select2-selection--single .select2-selection__arrow b {
            display: none;
        }

        /* Shared chevron appearance for both modes. Positioning differs per mode below. */
        .select2-container--default .select2-selection--multiple::after,
        .select2-container--default .select2-selection--single .select2-selection__arrow::after {
            content: '';
            width: var(--dbp-select2-icon-size);
            height: var(--dbp-select2-icon-size);
            background-color: var(--dbp-select2-icon-color);
            mask: url('${j(X(`chevron-down`))}') center / contain no-repeat;
            -webkit-mask: url('${j(X(`chevron-down`))}') center / contain
                no-repeat;
            pointer-events: none;
        }

        /* Single selection: select2 already provides an absolutely positioned arrow container
           flush against the right edge. We shift it left to match the multiple-selection
           spacing and center our chevron inside it. */
        .select2-container--default .select2-selection--single .select2-selection__arrow {
            display: flex;
            align-items: center;
            justify-content: center;
            height: calc(100% - 3px);
            right: var(--dbp-select2-icon-edge);
        }

        /* Nudge down slightly to sit centered on the line */
        .select2-container--default .select2-selection--single .select2-selection__arrow::after {
            margin-top: 2px;
        }

        /* Multiple selection: no arrow container exists, so we position the chevron ourselves,
           pinned to the first line (entries have margin-top 5px and height 1.5em) so it stays
           at the top when entries wrap. */
        .select2-container--default .select2-selection--multiple::after {
            position: absolute;
            top: calc(5px + var(--dbp-select2-icon-size) - 2px);
            right: var(--dbp-select2-icon-edge);
            transform: translateY(-50%);
        }

        /* When clearable, reserve room for both the chevron (far right) and the clear button
           to its left, so entries can't end up underneath either */
        .select2-container--default .select2-selection--multiple.select2-selection--clearable {
            padding: 0;
        }

        /* Flip the chevron while the dropdown is open, like select2 does by default */
        .select2-container--default.select2-container--open
            .select2-selection--single
            .select2-selection__arrow::after {
            transform: rotate(180deg);
        }

        .select2-container--default.select2-container--open .select2-selection--multiple::after {
            transform: translateY(-50%) rotate(180deg);
        }

        /* The tags of a multiple selection, styled like the rest of the control instead of
           the grey default of select2 */
        .select2-container--default .select2-selection--multiple .select2-selection__choice {
            background-color: var(--dbp-background);
            color: inherit;
            border: var(--dbp-border);
            border-color: var(--dbp-content);
            border-radius: var(--dbp-border-radius);
            /* Shared with the clear button above, see there. Only a minimum, so that long
               entries can grow instead of getting cut off. */
            min-height: 1.5em;
            box-sizing: border-box;

            /* Wrap long entries instead of cutting them off, like for a single selection */
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            overflow-wrap: break-word;

            margin: 0;
            display: flex;
            align-items: center;
            flex-direction: row-reverse;
            /* Override select2 default: display:inline-block; padding-left:20px; position:relative */
            padding: 0;
            padding-left: 0;
        }

        /* Space between the remove button and the entry's label */
        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__display {
            padding: 0 5px;
            word-break: break-word;
            overflow-wrap: break-word;
        }

        /* Same as for the clear button of a single selection, we replace the "×" text
           character with an icon we can center reliably */
        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__remove {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            min-width: 24px;
            min-height: 24px;
            color: var(--dbp-select2-icon-color);
            border-left: var(--dbp-border);
            border-color: var(--dbp-content);
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            border-top-right-radius: var(--dbp-border-radius);
            border-bottom-right-radius: var(--dbp-border-radius);
            /* Override select2 default: position:absolute; left:0; top:0; border-right; padding:0 4px */
            position: static;
            left: auto;
            top: auto;
            right: auto;
            border-right: none;
            padding: 0 5px;
            flex-shrink: 0;
            align-self: stretch;
        }

        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__remove
            > span {
            display: none;
        }

        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__remove::before {
            content: '';
            display: block;
            width: 0.75em;
            height: 0.75em;
            background-color: currentColor;
            mask: url('${j(X(`close`))}') center / contain no-repeat;
            -webkit-mask: url('${j(X(`close`))}') center / contain no-repeat;
        }

        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__remove:hover,
        .select2-container--default
            .select2-selection--multiple
            .select2-selection__choice__remove:focus {
            background-color: transparent;
            color: var(--dbp-content);
            outline: none;
        }

        .select2-container--default.select2-container--disabled .select2-selection--single,
        .select2-container--default.select2-container--disabled .select2-selection--multiple {
            background-color: var(--dbp-background);
            color: var(--dbp-muted);
            cursor: not-allowed;
        }

        .select2-container--default .select2-selection--single .select2-selection__placeholder {
            color: var(--dbp-muted);
        }

        .select2-container {
            max-width: 100%;
            min-width: 0;
        }

        /* The inline search field of a multiple selection uses the browser's default input
           font otherwise, which doesn't match the rest of the control */

        .select2-container--default .select2-search--inline {
            flex: 1 1 0;
            min-width: 0;
            width: auto;
            max-width: 100%;
            align-self: center;
            display: flex;
            align-items: center;
        }

        .select2-container--default
            .select2-selection--multiple:has(.select2-selection__choice)
            .select2-search--inline {
            flex: 0 1 auto;
            width: auto;
        }

        .select2-container--default .select2-search--inline .select2-search__field {
            font: inherit;
            margin: 0;
            padding: 0;
            border: 0;
            align-content: center;
            align-self: center;
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            overflow-wrap: anywhere;
            word-break: break-word;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            /* Select2 renders this as a textarea, whose intrinsic height varies by browser. */
            height: 1.5em;
            min-height: 1.5em;
            line-height: 1.5;
            vertical-align: middle;
            resize: none;
            overflow: hidden;
        }

        .select2-container--default
            .select2-selection--multiple:has(.select2-selection__choice)
            .select2-search--inline
            .select2-search__field {
            height: 1.5em;
            min-height: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* With a multiple selection the placeholder is rendered into the inline search field */
        .select2-container--default .select2-search--inline .select2-search__field::placeholder {
            color: var(--dbp-muted);
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
            text-overflow: clip;
        }

        .select2-container--default
            .select2-selection--multiple:has(.select2-selection__choice)
            .select2-search--inline
            .select2-search__field::placeholder {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .select2-container--default.select2-container--disabled .select2-selection__placeholder {
            color: var(--dbp-muted);
        }

        /* Work around single selections not wrapping and breaking responsivness */
        .select2-container--default .select2-selection--single {
            height: auto !important;
            min-height: 32px;
            display: flex;
            flex-direction: row-reverse;
            justify-content: space-between;
            position: relative;
            flex-wrap: wrap;
            align-items: center;
        }

        /* Make multiple selection also responsive and allow wrapping */
        .select2-container--default .select2-selection--multiple {
            height: auto !important;
            min-height: 32px;
            flex-wrap: wrap;
            /* Center single-line placeholder vertically (empty state).
               For wrapped tags the line stack should start at the top. */
            align-content: center;
            align-items: center;
            max-width: 100%;
            min-width: 0;
        }

        .select2-container--default .select2-selection--multiple.dbp-select2-selection--empty {
            height: 32px !important;
        }

        /* When tags are present keep multi-line wrap anchored at the top */
        .select2-container--default .select2-selection--multiple:has(.select2-selection__choice) {
            align-content: flex-start;
        }

        .select2-container--default .select2-selection__rendered {
            word-wrap: break-word !important;
            text-overflow: inherit !important;
            white-space: normal !important;
            margin: 0;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .select2-dropdown {
            background-color: var(--dbp-background);
        }

        .select2-container--default .select2-selection--single,
        .select2-container--default .select2-selection--multiple,
        .select2-container--default.select2-container--focus .select2-selection--multiple,
        .select2-dropdown,
        .select2-search__field,
        .select2-container--default .select2-search--dropdown .select2-search__field {
            background: var(--dbp-background);
            color: var(--dbp-content);
            border: var(--dbp-border);
            border-color: var(--dbp-muted);
        }

        /* Select2 focus indicator  */
        .select2-container--default.select2-container--focus .select2-selection--single,
        .select2-container--default.select2-container--focus .select2-selection--multiple,
        .select2-container--default.select2-container--open .select2-selection--single,
        .select2-container--default.select2-container--open .select2-selection--multiple {
            border-color: var(--dbp-content);
            box-shadow: 0px 0px 3px 1px var(--dbp-primary);
        }
    `}function $t(){return M`
        /**************************\\
          Modal Styles
        \\**************************/

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
        }

        .modal-overlay::before {
            content: '';
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            background-color: var(--dbp-content-surface);
            opacity: 0.6;
        }

        .modal-container {
            background-color: var(--dbp-background);
            max-width: 600px;
            max-height: 100vh;
            min-width: 60%;
            min-height: 50%;
            overflow-y: auto;
            box-sizing: border-box;
            display: grid;
            height: 70%;
            width: 70%;
            position: relative;
            border-radius: var(--dbp-border-radius);
        }

        .modal-close {
            background: transparent;
            border: none;
            font-size: 1.5rem;
            color: var(--dbp-accent);
            cursor: pointer;
            padding: 0px;
            position: relative;
            z-index: 9;
        }

        .modal-close .close-icon svg,
        .close-icon {
            pointer-events: none;
        }

        button.modal-close:focus {
            outline: none;
        }

        .modal-title {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
        }

        .modal-title-icon {
            color: var(--dbp-accent);
            margin-top: -5px;
            font-size: 1.3em;
        }

        .modal-title h2 {
            margin: 0;
            font-weight: 600;
        }

        #filter-modal-box p {
            margin: 0;
            text-align: left;
            padding-left: 20px;
        }

        @media only screen and (orientation: landscape) and (max-width: 768px) {
            .modal-container {
                width: 100%;
                height: 100%;
                max-width: 100%;
            }
        }

        @media only screen and (max-width: 768px) {
            .modal-close {
                width: 40px;
                height: 40px;
            }
        }
    `}function en(){return M`
        @media print {
            dialog[open] {
                display: block !important;
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                max-width: 100%;
                max-height: inherit;
                height: auto;
                box-shadow: none;
                border: none;
                background: white;
                filter: none;
            }

            .modal-container {
                max-height: inherit;
            }

            .modal-content {
                overflow-y: visible;
            }
        }
    `}function tn(){return M`
        :host {
            font-size: var(--dbp-modal--font-size, 1rem);
            --dbp-modal-animation: mmFadeIn;
            --dbp-modal-title-font-size: 1.5em;
            --dbp-modal-title-font-weight: 600;
            --dbp-modal-content-overflow-y: auto;
            --dbp-modal-overflow: hidden;
        }

        dialog:not([open]) {
            pointer-events: none;
            opacity: 0;
        }

        dialog[open] {
            animation-name: var(--dbp-modal-animation);
            animation-duration: 0.5s;
            animation-fill-mode: forwards;
        }

        :host([full-height-line]) dialog[open] {
            display: grid;
        }

        dialog {
            min-width: var(--dbp-modal-min-width, 250px);
            max-width: var(--dbp-modal-max-width, 75vw);
            min-height: var(--dbp-modal-min-height, 200px);
            max-height: var(--dbp-modal-max-height, 90vh);
            width: var(--dbp-modal-width);

            overflow: var(--dbp-modal-overflow);
            padding: var(--dbp-modal-padding-top, 15px) 20px 20px;
            border: 0 none;
            color: var(--dbp-content);
            background-color: var(--dbp-background);
            box-shadow:
                rgba(0, 0, 0, 0.3) 2px 4px 16px,
                rgba(0, 0, 0, 0.2) 4px 8px 32px,
                rgba(0, 0, 0, 0.1) 8px 16px 64px;

            transition: height 5s ease-in-out;
            transform: translateY(var(--dbp-modal-translate-y, 0));
        }

        .modal-container {
            display: grid;
            grid-template-columns: 1fr;
            grid-template-rows: auto 1fr auto;
            align-items: start;
            min-height: var(--dbp-modal-min-height);
            max-height: var(--dbp-modal-max-height, 90vh);
        }

        :host([full-height-line]) .modal-container {
            height: var(--dbp-modal-container-height);
        }

        .modal-container--full-height-line {
            position: relative;
        }

        .modal-container--full-height-line::before {
            content: '';
            display: var(--dbp-modal-full-height-line-display, block);
            position: absolute;
            top: calc(var(--dbp-modal-padding-top, 15px) * -1);
            bottom: -20px;
            left: var(--dbp-modal-full-height-line-left, 0);
            border-right: var(--dbp-modal-full-height-line-border, var(--dbp-border));
            z-index: 1;
            pointer-events: none;
        }

        .modal-header {
            height: var(--dbp-modal-header-height);
            overflow: hidden;
        }

        .modal-content {
            position: relative;
            overflow-y: var(--dbp-modal-content-overflow-y);
            max-height: 100%;
            min-height: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        :host([full-height-line]) .modal-content {
            min-height: var(--dbp-modal-content-min-height, 100%);
        }

        slot[name='content'] {
            display: block;
            width: 100%;
        }

        :host([full-height-line]) slot[name='content'] {
            height: var(--dbp-modal-content-slot-height);
            min-height: var(--dbp-modal-content-slot-min-height);
        }

        ::slotted([slot='content']) {
            width: 100%;
        }

        :host([full-height-line]) ::slotted([slot='content']) {
            height: var(--dbp-modal-slotted-content-height);
            min-height: var(--dbp-modal-slotted-content-min-height);
        }

        .modal-footer {
            height: var(--dbp-modal-footer-height);
        }

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: start;
            padding: 0;
            margin-bottom: 25px;
            margin-right: 0.5em;
        }

        .modal-close {
            background: transparent;
            border: none;
            font-size: 1.5rem;
            color: var(--dbp-accent);
            cursor: pointer;
            padding: 0px;
        }

        .modal-close .close-icon svg,
        .modal-close .close-icon {
            pointer-events: none;
        }

        button.modal-close:focus {
            filter: drop-shadow(rgba(255, 255, 255, 0.5), 1px 2px 4px);
        }

        .modal-title {
            margin: 0;
            padding: var(--dbp-modal-title-padding, 0.25em 0 0 0);
            font-weight: var(--dbp-modal-title-font-weight, 300);
            font-size: var(--dbp-modal-title-font-size, 1rem);
            background: var(--dbp-modal-title-background);
        }

        ::slotted([slot='header']) {
        }

        ::slotted([slot='footer']) {
        }

        ::backdrop {
            backdrop-filter: blur(5px);
            transition: backdrop-filter 0.5s ease;
            background: color-mix(in srgb, var(--dbp-background-color) 60%, transparent);
        }

        dialog + .backdrop {
            /* polyfill */
            backdrop-filter: blur(5px);
            transition: backdrop-filter 0.5s ease;
            background: color-mix(in srgb, var(--dbp-background-color) 60%, transparent);
        }

        @media only screen and (max-width: 490px) {
            dialog {
                max-width: none;
            }
        }

        /**************************\\
          Modal Animation Style
        \\**************************/
        @keyframes mmFadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes mmFadeOut {
            from {
                opacity: 1;
            }
            to {
                opacity: 0;
            }
        }

        @keyframes mmSlideIn {
            from {
                transform: translateY(15%);
            }
            to {
                transform: translateY(0);
            }
        }

        @keyframes mmSlideOut {
            from {
                transform: translateY(0);
            }
            to {
                transform: translateY(-10%);
            }
        }
    `}function nn(){return M`
        .text-left {
            text-align: left;
        }

        .text-center {
            text-align: center;
        }

        .text-right {
            text-align: right;
        }

        .text-lowercase {
            text-transform: lowercase;
        }

        .text-uppercase {
            text-transform: uppercase;
        }

        .text-capitalize {
            text-transform: capitalize;
        }
    `}function rn(){return M`
        h2:first-child {
            margin-top: 0;
            margin-bottom: 0px;
        }

        .subheadline {
            font-style: italic;
            padding-left: 2em;
            margin-top: -1px;
            /*line-height: 1.8;*/
            margin-bottom: 1.2em;
        }
    `}function an(){return M`
        .int-link-external,
        .int-link-internal,
        .link,
        .link-without-hover {
            border-bottom: var(--dbp-border);
            border-color: var(--dbp-content);
        }

        .int-link-external:hover,
        .int-link-internal:hover,
        .link:hover {
            color: var(--dbp-hover-color, var(--dbp-content));
            border-color: var(--dbp-hover-color, var(--dbp-content));
            background-color: var(--dbp-hover-background-color);
        }

        .int-link-external:after,
        .int-link-internal:after,
        .link:after,
        .link-without-hover:after {
            content: '\\00a0\\00a0\\00a0';
            background-color: var(--dbp-content);
            -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Ebene_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%2022.7%2062.4%22%20style%3D%22enable-background%3Anew%200%200%2022.7%2062.4%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cg%20transform%3D%22translate%28-382.21%20-336.98%29%22%3E%0A%09%3Cg%3E%0A%09%09%3Cpath%20d%3D%22M386.9%2C380.5c-0.2%2C0-0.4-0.1-0.6-0.3c-0.3-0.3-0.3-0.8%2C0.1-1.1l12.5-10.9l-12.5-10.9c-0.3-0.3-0.4-0.8-0.1-1.1%0A%09%09%09c0.3-0.3%2C0.8-0.4%2C1.1-0.1l13.1%2C11.5c0.2%2C0.2%2C0.3%2C0.4%2C0.3%2C0.6s-0.1%2C0.5-0.3%2C0.6l-13.1%2C11.5C387.3%2C380.4%2C387.1%2C380.5%2C386.9%2C380.5z%22%0A%09%09%09%2F%3E%0A%09%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A');
            mask-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Ebene_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%2022.7%2062.4%22%20style%3D%22enable-background%3Anew%200%200%2022.7%2062.4%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cg%20transform%3D%22translate%28-382.21%20-336.98%29%22%3E%0A%09%3Cg%3E%0A%09%09%3Cpath%20d%3D%22M386.9%2C380.5c-0.2%2C0-0.4-0.1-0.6-0.3c-0.3-0.3-0.3-0.8%2C0.1-1.1l12.5-10.9l-12.5-10.9c-0.3-0.3-0.4-0.8-0.1-1.1%0A%09%09%09c0.3-0.3%2C0.8-0.4%2C1.1-0.1l13.1%2C11.5c0.2%2C0.2%2C0.3%2C0.4%2C0.3%2C0.6s-0.1%2C0.5-0.3%2C0.6l-13.1%2C11.5C387.3%2C380.4%2C387.1%2C380.5%2C386.9%2C380.5z%22%0A%09%09%09%2F%3E%0A%09%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A');
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-position: center -2px;
            mask-position: center center;
            margin: 0 0 0 4px;
            padding: 0 0 0.25% 0;
            -webkit-mask-size: 100%;
            mask-size: 120%;
        }

        .int-link-external:hover::after,
        .int-link-internal:hover::after,
        .link:hover::after {
            background-color: var(--dbp-hover-color, var(--dbp-content));
        }
    `}function on(){return M`
        :host {
            /* Content-sized so the host is only as wide as its trigger button,
               which keeps the menu anchored to the button. max-width caps it to
               the parent so a long label wraps instead of overflowing. */
            display: inline-block;
            max-width: 100%;
            position: relative;
            /* defaults can be overridden per usage */
            --dbp-select-menu-left: 0;
            --dbp-select-menu-right: auto;
        }

        .select-container {
            position: relative;
            max-width: 100%;
        }

        :host([disabled]) {
            opacity: 0.6;
            pointer-events: none;
        }

        .menu {
            position: absolute;
            top: calc(100% + 0.25rem);
            width: max-content;
            max-width: var(--dbp-select-menu-max-width, calc(100vw - 2rem));
            padding: 0;
            margin: 0;
            list-style: none;
            border: 0 none;
            border-radius: 0;
            text-align: left;
            /* ✅ anchor controlled by vars */
            left: var(--dbp-select-menu-left);
            right: var(--dbp-select-menu-right);
            background: var(--dbp-background);
            box-shadow:
                0 6px 24px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.06);
            z-index: 10;
        }

        /* correct align behaviors */
        :host([align='left']) {
            --dbp-select-menu-left: 0;
            --dbp-select-menu-right: auto;
        }

        :host([align='right']) {
            --dbp-select-menu-left: auto;
            --dbp-select-menu-right: 0;
        }

        :host([allow-expand]) .trigger.button {
            width: 100%;
            display: flex;
            justify-content: space-between;
        }

        .item-button {
            display: flex;
            width: 100%;
            max-width: inherit;
            justify-content: left;
            border: 0 none;
            white-space: normal;
            color: var(--dbp-content);
            background-color: var(--dbp-surface);
        }

        .item-button span {
            min-width: 0;
            white-space: normal;
            overflow-wrap: anywhere;
            text-align: left;
        }

        .item-button dbp-icon {
            margin-right: 5px;
            transition: transform 150ms ease-in;
        }

        :host([open]) .icon-chevron {
            transform: rotate(180deg);
        }

        .icon-chevron {
            flex: 0 0 auto;
            align-self: center;
            font-size: 0.75rem;
            color: var(--dbp-select-chevron-color, var(--dbp-content));
        }

        :host(.select-version) .item-button[aria-checked='true'] {
            background-color: var(--dbp-selected, #555555);
        }

        .trigger.button {
            min-height: 32px;
            max-width: 100%;
            min-width: 0;
            border: 1px solid var(--dbp-select-border-color, var(--dbp-content));
            border-radius: var(--dbp-border-radius);
            display: flex;
            align-items: center;
            /* Keep the chevron at the trailing edge, so a wrapped multi-line
               label and the chevron stay visually separated */
            justify-content: space-between;
            gap: 0.5rem;
            text-align: -webkit-match-parent;
            text-align: match-parent;
        }

        /* Wrapping is the default: a trigger is a button whose label must stay
           readable, so it wraps instead of clipping when space is insufficient */
        .trigger-label {
            flex: 0 1 auto;
            min-width: 0;
            white-space: normal;
            overflow-wrap: anywhere;
            text-wrap: pretty;
            text-align: left;
            color: var(--dbp-select-placeholder-color, var(--dbp-content));
        }

        /* Opt-out for fixed-height contexts (e.g. toolbars, action menus with
           short static labels) where a single line is preferred. If the label
           is too long for the available width it is truncated with an ellipsis
           rather than overflowing the button. */
        .trigger.no-wrap .trigger-label {
            white-space: nowrap;
            overflow: hidden;
            overflow-wrap: normal;
            text-overflow: ellipsis;
        }
    `}const Q=new class{get debug(){return window.location.hash.includes(`debug`)?console.debug:()=>{}}};var sn=class extends Y{constructor(){super(),this._connected=!1,this._deferSubscribe=!1,this._deferUnSubscribe=!1,this.reflectAttribute=!0,this.subscribe=``,this.unsubscribe=``,this.providerRoot=!1,this._callbackStore=[],this._propertyStore={},this._lastProperties={},Q.debug(`AdapterLitElement(`+this.tagName+`) constructor()`)}getProperty(e){return this._propertyStore[e]}getPropertyByAttributeName(e){return this[this.findPropertyName(e)]}setPropertyByAttributeName(e,t){this[this.findPropertyName(e)]=t}setProperty(e,t){typeof t==`object`&&t?this.setPropertyByAttributeName(e,t):this.attributeChangedCallback(e,this.getPropertyByAttributeName(e),t),this._lastProperties[e]=t,this._propertyStore[e]=t}hasPropertyChanged(e,t){return this._lastProperties[e]!==t}hasProperty(e){return Object.hasOwnProperty.call(this._propertyStore,e)}connectedCallback(){if(super.connectedCallback(),this._deferUnSubscribe&&(this.unsubscribe.split(`,`).forEach(e=>this.unSubscribeProviderFor(e)),this._deferSubscribe=!1,this.unsubscribe=``),this._deferSubscribe&&=(this.subscribe.split(`,`).forEach(e=>this.subscribeProviderFor(e)),!1),this._connected=!0,this.addEventListener(`dbp-subscribe`,e=>{let t=e.detail.name;(this.hasProperty(t)||this.providerRoot)&&(Q.debug(`AdapterLitElementProvider(`+this.tagName+`) eventListener("dbp-subscribe",..) name "`+t+`" found.`),this._callbackStore.push({name:t,callback:e.detail.callback,sender:e.detail.sender}),e.detail.callback(this.getProperty(t)),e.stopPropagation())},!1),this.addEventListener(`dbp-unsubscribe`,e=>{let t=e.detail.name,n=e.detail.sender;(this.hasProperty(t)||this.providerRoot)&&(Q.debug(`AdapterLitElementProvider(`+this.tagName+`) eventListener("dbp-unsubscribe",..) name "`+t+`" found.`),this._callbackStore.forEach(e=>{if(e.sender===n&&e.name===t){let n=this._callbackStore.indexOf(e);this._callbackStore.splice(n,1),Q.debug(`AdapterLitElementProvider(`+this.tagName+`) eventListener for name "`+t+`" removed.`)}}),e.stopPropagation())},!1),this.addEventListener(`dbp-set-property`,e=>{let t=e.detail.name,n=e.detail.value;(this.hasProperty(t)||this.providerRoot)&&(Q.debug(`AdapterLitElementProvider(`+this.tagName+`) eventListener("dbp-set-property",..) name "`+t+`" found.`),this.setProperty(t,n),this._callbackStore.forEach(e=>{e.name===t&&e.callback(n)}),e.stopPropagation())},!1),new MutationObserver((e,t)=>{for(let t of e)if(t.type===`attributes`){let e=t.attributeName,n=this.getAttribute(e);this.hasPropertyChanged(e,n)&&(Q.debug(`AdapterLitElementProvider (`+this.tagName+`) observed attribute "`+e+`" changed`),this.setProperty(e,n),this._callbackStore.forEach(t=>{t.name===e&&t.callback(n)}))}}).observe(this,{attributes:!0,childList:!1,subtree:!1}),this.hasAttributes()){let e=this.attributes;for(let t=e.length-1;t>=0;t--)[`id`,`class`,`style`,`data-tag-name`].includes(e[t].name)||(this.setProperty(e[t].name,e[t].value),Q.debug(`AdapterLitElementProvider (`+this.tagName+`) found attribute "`+e[t].name+`" = "`+e[t].value+`"`))}}disconnectedCallback(){this.subscribe.split(`,`).forEach(e=>this.unSubscribeProviderFor(e)),super.disconnectedCallback()}subscribeProviderFor(e){Q.debug(`AdapterLitElement(`+this.tagName+`) subscribeProviderFor( `+e+` )`);let t=e.trim().split(`:`),n=t[0],r=t[1]||n,i=new CustomEvent(`dbp-subscribe`,{bubbles:!0,composed:!0,detail:{name:r,callback:e=>{e!==void 0&&(Q.debug(`AdapterLitElement(`+this.tagName+`) sub/Callback `+r+` -> `+n+` = `+e),typeof e==`object`&&e?this.setPropertyByAttributeName(n,e):(this.attributeChangedCallback(n,this.getPropertyByAttributeName(n),e),this.getAttribute(n)!==null&&(console.warn(`Provider callback: "`+n+`" is also an attribute in tag "`+this.tagName+`", this is not supported!`),this.reflectAttribute&&this.setAttribute(n,e))))},sender:this}});this.dispatchEvent(i)}unSubscribeProviderFor(e){Q.debug(`AdapterLitElement(`+this.tagName+`) unSubscribeProviderFor( `+e+` )`);let t=e.trim().split(`:`),n=t[1]||t[0],r=new CustomEvent(`dbp-unsubscribe`,{bubbles:!0,composed:!0,detail:{name:n,sender:this}});this.dispatchEvent(r)}static get properties(){return{...super.properties,subscribe:{type:String},unsubscribe:{type:String},providerRoot:{type:Boolean,attribute:`provider-root`}}}findPropertyName(e){let t=e,n=this.constructor.properties;for(let r in n)if(n[r].attribute===e){t=r;break}return t}attributeChangedCallback(e,t,n){switch(e){case`subscribe`:Q.debug(`AdapterLitElement() attributeChangesCallback( `+e+`, `+t+`, `+n+`)`),this.subscribe&&this.subscribe.length>0&&(this._connected?this.subscribe.split(`,`).forEach(e=>this.unSubscribeProviderFor(e)):(this._deferUnSubscribe=this.subscribe.length>0,this.unsubscribe=this.subscribe)),n!==null&&(this.subscribe=n,this._connected?n.split(`,`).forEach(e=>this.subscribeProviderFor(e)):this._deferSubscribe=n&&n.length>0);break;default:if(typeof t==`object`&&!t&&!n||!n&&t&&e)break;super.attributeChangedCallback(e,t,n)}}sendSetPropertyEvent(e,t,n=!1){let r=new CustomEvent(`dbp-set-property`,{bubbles:!0,composed:!0,detail:{name:e,value:t}});return(this.parentElement&&!n?this.parentElement:this).dispatchEvent(r)}};function cn(e){let t=new URL(e,`https://example.com`);return{pathname:t.pathname,pathSegments:t.pathname.split(`/`).filter(e=>e!==``).map(e=>decodeURIComponent(e)),queryParams:t.searchParams,queryString:t.search,hash:t.hash,fragment:t.hash.replace(/^#/,``)}}var ln=class extends sn{constructor(){super(),this.htmlOverrides=``,this._localTemplateSlotsImported=!1,this._globalSlotsContainer=null,this._globalTemplateSlotsImported=!1,this._renderDone=!1,this.routingUrl=``}static get properties(){return{...super.properties,htmlOverrides:{type:String,attribute:`html-overrides`},routingUrl:{type:String,attribute:`routing-url`}}}disconnectedCallback(){super.disconnectedCallback(),this._globalSlotsContainer!==null&&this._globalSlotsContainer.remove()}_(e){return this.renderRoot.querySelector(e)}_a(e){return this.renderRoot.querySelectorAll(e)}firstUpdated(e){super.firstUpdated(e),this._renderDone=!0,this._importTemplateSlots()}update(e){e.forEach((e,t)=>{t===`html-overrides`&&this._importTemplateSlots()}),super.update(e)}_importTemplateSlots(){this._renderDone&&(this._importLocalTemplateSlots(),this._importGlobalTemplateSlots())}_importLocalTemplateSlots(){if(this._localTemplateSlotsImported)return;let e=this.querySelectorAll(`:scope > template[slot]:not([slot=""]`);for(let t of e){if(!(t instanceof HTMLTemplateElement))continue;let e=document.createElement(`div`);e.slot=t.getAttribute(`slot`)??``,e.appendChild(t.content.cloneNode(!0)),t.remove(),this.appendChild(e)}this._localTemplateSlotsImported=!0}_importGlobalTemplateSlots(){if(this.htmlOverrides===``||this._globalTemplateSlotsImported)return;let e=document.querySelector(`template#`+this.htmlOverrides);if(e!==null){let t=e.content.cloneNode(!0).querySelector(`template#`+this.tagName.toLowerCase());if(t instanceof HTMLTemplateElement){let n=t.content.cloneNode(!0),r=[];for(let e of n.querySelectorAll(`[slot]:not([slot=""]`))e.parentNode===n&&r.push(e);for(let e of r)for(let t of this.querySelectorAll(`[slot="`+e.slot+`"]`))t.remove();let i=document.createElement(`div`);e.append(i),this._globalSlotsContainer=i;for(let e of r)i.appendChild(e);for(;i.childNodes.length;)this.appendChild(i.removeChild(i.childNodes[0]))}}this._globalTemplateSlotsImported=!0}getRoutingData(){return cn(this.routingUrl)}};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const un={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},dn=e=>(...t)=>({_$litDirective$:e,values:t});var fn=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};const pn=(e,t,n=`_i18n`)=>class extends e{constructor(...e){super(...e);let r=t();this[n]=r,this.lang=r.language}static get properties(){return{...e.properties,lang:{type:String}}}update(e){e.forEach((e,t)=>{t===`lang`&&this[n].changeLanguage(this.lang)}),super.update(e)}},mn=Z(e=>class extends e{static properties={auth:{type:Object},...e.properties};constructor(...e){super(...e),this.auth=null,this._previousAuthState=null,this._authPending=!0}update(e){if(e.has(`auth`)){let e=this._previousAuthState||{},t=this.auth||{},n=e[`login-status`]===`logged-in`,r=e[`login-status`]===`logged-out`,i=t[`login-status`]===`logged-in`,a=t[`login-status`]===`logged-out`;!n&&i&&(this._authPending=!1,this.loginCallback(t)),!r&&a&&(this._authPending?this._authPending=!1:this.logoutCallback()),this._previousAuthState={...t}}super.update(e)}isAuthPending(){return this._authPending}isLoggedIn(){return this.auth&&this.auth[`login-status`]===`logged-in`}loginCallback(e){}logoutCallback(){}});let $=null,hn=null;function gn(){return $||typeof document>`u`||!document.body?$:($=document.createElement(`div`),$.id=`dbp-notification-live-region`,$.setAttribute(`aria-atomic`,`true`),$.style.position=`absolute`,$.style.width=`1px`,$.style.height=`1px`,$.style.padding=`0`,$.style.margin=`-1px`,$.style.overflow=`hidden`,$.style.clip=`rect(0, 0, 0, 0)`,$.style.whiteSpace=`nowrap`,$.style.border=`0`,document.body.appendChild($),$)}function _n(e){let t=gn();if(!t)return;let n=e.type===`warning`||e.type===`danger`;t.setAttribute(`role`,n?`alert`:`status`),t.setAttribute(`aria-live`,n?`assertive`:`polite`),t.textContent=``,hn&&clearTimeout(hn),hn=setTimeout(()=>{t.textContent=[e.summary,e.body].filter(Boolean).join(`: `),hn=null},100)}function vn(e){_n(e);let t=new CustomEvent(`dbp-notification-send`,{bubbles:!0,cancelable:!0,detail:e});window.dispatchEvent(t)&&(alert([e.summary,e.body].filter(Boolean).join(`:

`)),console.log(`Use the web component dbp-notification to show fancy notifications.`))}typeof document<`u`&&document.body&&gn();
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{I:yn}=vt,bn=e=>e,xn=e=>e.strings===void 0,Sn=()=>document.createComment(``),Cn=(e,t,n)=>{let r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0){let t=r.insertBefore(Sn(),i),a=r.insertBefore(Sn(),i);n=new yn(t,a,e,e.options)}else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=bn(e).nextSibling;bn(r).insertBefore(e,i),e=t}}}return n},wn=(e,t,n=e)=>(e._$AI(t,n),e),Tn={},En=(e,t=Tn)=>e._$AH=t,Dn=e=>e._$AH,On=e=>{e._$AR(),e._$AA.remove()};export{Ce as $,Lt as A,Mt as B,Jt as C,nn as D,Zt as E,Tt as F,W as G,Et as H,Dt as I,ot as J,U as K,Ot as L,jt as M,At as N,Kt as O,Ft as P,Te as Q,Nt as R,en as S,Qt as T,Ct as U,wt as V,Y as W,M as X,st as Y,j as Z,on as _,wn as a,$t as b,mn as c,fn as d,Ee as et,un as f,Yt as g,rn as h,xn as i,X as j,Gt as k,pn as l,sn as m,On as n,Cn as o,ln as p,ct as q,En as r,vn as s,Dn as t,dn as u,qt as v,Xt as w,tn as x,an as y,Pt as z};
//# sourceMappingURL=directive-helpers.C6Xz79AM.js.map