@luigi-project/core-modular 0.0.1-dev.202601100039

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/App.svelte.d.ts +1 -0
  2. package/README.md +13 -0
  3. package/core-api/auth.d.ts +92 -0
  4. package/core-api/feature-toggles.d.ts +33 -0
  5. package/core-api/luigi.d.ts +79 -0
  6. package/core-api/navigation.d.ts +15 -0
  7. package/core-api/routing.d.ts +43 -0
  8. package/core-api/theming.d.ts +78 -0
  9. package/core-api/ux.d.ts +22 -0
  10. package/luigi-engine.d.ts +40 -0
  11. package/luigi.js +34 -0
  12. package/luigi.js.map +1 -0
  13. package/main.d.ts +1 -0
  14. package/modules/communicaton-module.d.ts +6 -0
  15. package/modules/routing-module.d.ts +18 -0
  16. package/modules/ui-module.d.ts +14 -0
  17. package/modules/ux-module.d.ts +49 -0
  18. package/package.json +22 -0
  19. package/services/auth-layer.service.d.ts +24 -0
  20. package/services/auth-store.service.d.ts +23 -0
  21. package/services/dirty-status.service.d.ts +41 -0
  22. package/services/i18n.service.d.ts +81 -0
  23. package/services/modal.service.d.ts +52 -0
  24. package/services/navigation.service.d.ts +213 -0
  25. package/services/node-data-management.service.d.ts +45 -0
  26. package/services/routing.service.d.ts +103 -0
  27. package/services/service-registry.d.ts +42 -0
  28. package/services/viewurl-decorator.d.ts +7 -0
  29. package/types/connector.d.ts +26 -0
  30. package/utilities/defaultLuigiTranslationTable.d.ts +1 -0
  31. package/utilities/helpers/async-helpers.d.ts +13 -0
  32. package/utilities/helpers/auth-helpers.d.ts +22 -0
  33. package/utilities/helpers/config-helpers.d.ts +19 -0
  34. package/utilities/helpers/escaping-helpers.d.ts +10 -0
  35. package/utilities/helpers/event-listener-helpers.d.ts +7 -0
  36. package/utilities/helpers/generic-helpers.d.ts +78 -0
  37. package/utilities/helpers/navigation-helpers.d.ts +15 -0
  38. package/utilities/helpers/routing-helpers.d.ts +254 -0
  39. package/utilities/helpers/storage-helpers.d.ts +25 -0
  40. package/utilities/helpers/usersetting-dialog-helpers.d.ts +8 -0
  41. package/utilities/luigi-config-defaults.d.ts +21 -0
  42. package/utilities/store.d.ts +11 -0
package/luigi.js ADDED
@@ -0,0 +1,34 @@
1
+ var pi=Object.defineProperty;var vt=i=>{throw TypeError(i)};var mi=(i,e,t)=>e in i?pi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>mi(i,typeof e!="symbol"?e+"":e,t),Ct=(i,e,t)=>e.has(i)||vt("Cannot "+t);var H=(i,e,t)=>(Ct(i,e,"read from private field"),t?t.call(i):e.get(i)),et=(i,e,t)=>e.has(i)?vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),tt=(i,e,t,n)=>(Ct(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t);const _i={luigi:{button:{confirm:"Yes",dismiss:"No"},confirmationModal:{body:"Are you sure you want to do this?",header:"Confirmation"},navigation:{up:"Up"},notExactTargetNode:"Could not map the exact target node for the requested route {route}.",requestedRouteNotFound:"Could not find the requested route {route}.",unsavedChangesAlert:{body:"Unsaved changes will be lost. Do you want to continue?",header:"Unsaved changes detected"}}},Si=_i,Be={sanitizeHtml(i=""){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/javascript:/g,"")},restoreSanitizedBrs(i=""){return i.replace(/&lt;br\/&gt;/g,"<br>").replace(/&lt;br \/&gt;/g,"<br>").replace(/&lt;br&gt;/g,"<br>").replace(/&lt;br &gt;/g,"<br>")},restoreSanitizedElements(i=""){let e=i;const t=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let n=0;n<t.length;n++){const r=new RegExp(`&lt;${t[n]}/&gt;`,"g"),s=new RegExp(`&lt;${t[n]} /&gt;`,"g"),a=new RegExp(`&lt;${t[n]}&gt;`,"g"),o=new RegExp(`&lt;${t[n]} &gt;`,"g"),l=new RegExp(`&lt;/${t[n]}[/]&gt;`,"g"),c=new RegExp(`&lt;/${t[n]} [/]&gt;`,"g"),f=new RegExp(`&lt;[/]${t[n]}&gt;`,"g"),h=new RegExp(`&lt;[/]${t[n]} &gt;`,"g");e=e.replace(r,`<${t[n]}>`).replace(s,`<${t[n]}>`).replace(a,`<${t[n]}>`).replace(o,`<${t[n]}>`).replace(l,`</${t[n]}>`).replace(c,`</${t[n]}>`).replace(f,`</${t[n]}>`).replace(h,`</${t[n]}>`)}return e},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&sol;")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",e,t){const r={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return e?Object.entries(e).reduce((s,[a,o])=>{const l=`_luigi_alert_${t}_link_${this.sanitizeParam(a)}`,c=this.restoreSanitizedBrs(this.sanitizeHtml(o.text)),f=`<a id="${l}">${c}</a>`,h=this.escapeKeyForRegexp(a),u=new RegExp(`({${h}})`,"g");return{sanitizedText:s.sanitizedText.replace(u,f),links:s.links.concat({elemId:l,url:o.url?encodeURI(this.sanitizeHtml(o.url)):void 0,dismissKey:o.dismissKey?encodeURI(this.sanitizeHtml(o.dismissKey)):void 0})}},r):r}},v={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&v.isFunction(i.then),isFunction:i=>i&&{}.toString.call(i)==="[object Function]",isString:i=>typeof i=="string"||i instanceof String,isObject:i=>!!(i&&typeof i=="object"&&!Array.isArray(i)),trimLeadingSlash:i=>v.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>v.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,e=!1)=>{const t=[];return i&&Array.from(document.querySelectorAll(i)).forEach(r=>{e?v.isElementVisible(r)&&t.push(r):t.push(r)}),t},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const e=i.startsWith("/");return i.length?window.location.origin+(e?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,e)=>{let t=0,n=i;const r=e.split(".");for(;n&&t<r.length;)n=n[r[t++]];return n},getConfigBooleanValue:(i,e)=>{const t=v.getConfigValueFromObject(i,e);return t===!0||t==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i)};class Ei{constructor(e){this.luigi=e,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Si}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(e=>{this.broadcastLocaleToAllContainers(e)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(e,t){var n,r;if(!((n=t==null?void 0:t.clientPermissions)!=null&&n.changeCurrentLocale)){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}e&&(t&&(t.locale=e),sessionStorage.setItem(this.currentLocaleStorageKey,e),this._notifyLocaleChange(e)),(r=this.luigi.getEngine()._connector)==null||r.setCurrentLocale(e)}addCurrentLocaleChangeListener(e){let t=null;return v.isFunction(e)?(t=v.getRandomId(),this.listeners[t]=e):console.error("Provided locale change listener is not a function."),t}removeCurrentLocaleChangeListener(e){e&&this.listeners[e]?delete this.listeners[e]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(e,t=void 0,n=void 0){if(!e)return"";if(this.translationImpl){const s=this.translationImpl.getTranslation(e,t,n);if(s!==e)return s}const r=this.findTranslation(e,this.translationTable,t);return r||e}_notifyLocaleChange(e){Object.getOwnPropertyNames(this.listeners).forEach(t=>{this.listeners[Number(t)](e)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),v.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(e){const t=v.getNodeList("luigi-container[lui_container]");t!=null&&t.length&&e&&t.forEach(n=>{n.locale=e,n.updateContext({locale:e})})}findTranslation(e,t,n){const r=e.split(".");for(let s=0;s<r.length;s++){const a=r[s];if(Object.prototype.hasOwnProperty.call(t,a)&&typeof t[a]=="object")t=t[a];else return n?this.findInterpolations(t[a],n):t[a]}}findInterpolations(e,t){return typeof e!="string"||!e.trim()||Object.keys(t).forEach(n=>{e=e.replace(new RegExp("{"+Be.escapeKeyForRegexp(n)+"}","gi"),t[n])}),e}}const Ue={wrapAsPromise:i=>new Promise(e=>{e(i)}),applyFunctionPromisified:(i,e)=>(i=i.apply(void 0,e),v.isPromise(i)?i:Ue.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,e,...t)=>{const n=v.getConfigValueFromObject(i,e);return v.isFunction(n)?Ue.applyFunctionPromisified(n,t):Ue.wrapAsPromise(n)}};class vi{constructor(){this.featureToggleList=new Set}setFeatureToggle(e,t=!1){this.isValid(e)&&(e.startsWith("!")&&!t||this.isDuplicatedOrDisabled(e)||this.featureToggleList.add(e))}unsetFeatureToggle(e){if(this.isValid(e)){if(!this.featureToggleList.has(e)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(e)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(t=>!t.startsWith("!"))}isValid(e){return v.isString(e)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(e){return this.featureToggleList.has(e)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${e}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class ye{constructor(e){this.luigi=e,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const e=[...this._modalStack];for(const{onInternalClose:t}of e)try{typeof t=="function"&&t()}catch(n){console.warn("onInternalClose threw an error",n)}this.clearModalStack()}registerModal(e){e&&this._modalStack.push(e)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(e){if(this._modalStack.length>0){const t=this._modalStack[0];t.modalsettings={...t.modalsettings,...e}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){this._modalStack.pop()}}class Ci{constructor(e){this.$subscribers=new Set,this.$value=e}set(e){this.$value=e,this.$subscribers.forEach(t=>{t(e)})}update(e){this.set(e(this.$value))}subscribe(e){return this.$subscribers.add(e),e(this.$value),()=>{this.$subscribers.delete(e)}}}function Mt(i){return i.$value}function je(i){return new Ci(i)}class Ti{setErrorMessage(e){var t,n;(n=(t=this.getLuigi().getEngine())==null?void 0:t._connector)==null||n.showFatalError(e)}getLuigi(){return window.Luigi}getConfigValue(e){return this.getLuigi().getConfigValue(e)}getConfigValueAsync(e){return this.getLuigi().getConfigValueAsync(e)}async executeConfigFnAsync(e,t=!1,...n){const r=this.getConfigValue(e);if(v.isFunction(r))try{return await Ue.applyFunctionPromisified(r,n)}catch(s){if(t)return Promise.reject(s)}return Promise.resolve(void 0)}}const F=new Ti;class wi{constructor(){this._internalStorage={},this._defaultStorage="localStorage",this._authKey="luigi.auth",this._newlyAuthorizedKey="luigi.newlyAuthorized",this._invalidStorageMsg="Configuration Error: Invalid auth.storage value defined. Must be one of localStorage, sessionStorage or none."}reset(){this._storageType=void 0}getStorageKey(){return this._authKey}getStorageType(){return this._storageType||(this._storageType=F.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(e){this._setStore(this.getStorageKey(),e)}removeAuthData(){this._setStore(this.getStorageKey(),void 0)}isNewlyAuthorized(){return!!this._getStore(this._newlyAuthorizedKey)}setNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,!0)}removeNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,void 0)}_getWebStorage(e){return window[e]}_setStore(e,t){switch(this.getStorageType()){case"localStorage":case"sessionStorage":t!==void 0?this._getWebStorage(this.getStorageType()).setItem(e,JSON.stringify(t)):this._getWebStorage(this.getStorageType()).removeItem(e);break;case"none":this._internalStorage[e]=t;break;default:console.error(this._invalidStorageMsg)}}_getStore(e){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(e));case"none":return this._internalStorage[e];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const q=new wi;class yi{constructor(){this._userInfoStore=je({}),this._loggedInStore=je(!1)}setUserInfo(e){this._userInfoStore.set(e)}setLoggedIn(e){this._loggedInStore.set(e)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const e=F.getConfigValue("auth.use");if(!e)return Promise.resolve(!0);const t=F.getConfigValue(`auth.${e}`),n=ce.parseUrlAuthErrors()||{};if(await ce.handleUrlAuthErrors(t,n.error,n.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(e,t),v.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(s=>(this.idpProviderInstance=s,this.checkAuth(t))).catch(s=>{const a=`Error: ${s.message||s}`;console.error(a,s.message&&s),F.setErrorMessage(a)}):this.checkAuth(t)}async checkAuth(e){const t=ce.getStoredAuthData();if(!t||!ce.isLoggedIn()){if(F.getConfigValue("auth.disableAutoLogin"))return;let r=!0;return t&&(r=await Se.handleAuthEvent("onAuthExpired",e)),r?this.startAuthorization():void 0}this.idpProviderInstance.settings&&v.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,t).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):v.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(e).then(r=>{this.setUserInfo(r),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(Mt(this._userInfoStore))),v.isFunction(F.getConfigValue("auth.events.onAuthSuccessful"))&&q.isNewlyAuthorized()&&await Se.handleAuthEvent("onAuthSuccessful",e,t),q.removeNewlyAuthorized(),v.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),v.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(e=>{q.setNewlyAuthorized(),e&&console.error(e)})}logout(){const e=ce.getStoredAuthData(),t=async s=>{await Se.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,s),q.removeAuthData()},n=F.getConfigValue(`auth.${F.getConfigValue("auth.use")}.logoutFn`),r=F.getConfigValueAsync("navigation.profile.logout.customLogoutFn");v.isFunction(n)?n(this.idpProviderInstance.settings,e,t):v.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(e,t):r&&v.isFunction(r)?r(e,t):t(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(e){return{message:e,name:"IdpProviderException"}}async getIdpProviderInstance(e,t){const n=v.getConfigValueFromObject(t,"idpProvider");if(n){const s=await new n(t);return["login"].forEach(a=>{if(!v.isFunction(s[a]))throw this.createIdpProviderException(`${a} function does not exist in custom IDP Provider ${e}`)}),s}if(v.isFunction(F.getConfigValue("auth.events.onAuthConfigError")))await Se.handleAuthEvent("onAuthConfigError",{idpProviderName:e,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${e} does not exist.`)}unload(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&v.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}}const ve=new yi;class bi{isAuthorizationEnabled(){return!!F.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&ve.startAuthorization()}logout(){this.isAuthorizationEnabled()&&ve.logout()}async handleAuthEvent(e,t,n,r){const s=await F.executeConfigFnAsync("auth.events."+e,!1,t,n),a=s===void 0||!!s;if(a&&r){window.location.href=r;return}return a}get store(){var e;return(e=F.getLuigi())!=null&&e.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>q.getStorageKey(),getStorageType:()=>q.getStorageType(),getAuthData:()=>q.getAuthData(),setAuthData:t=>q.setAuthData(t),removeAuthData:()=>q.removeAuthData(),setNewlyAuthorized:()=>{q.setNewlyAuthorized(),ve.resetExpirationChecks()}}}}const Se=new bi;class Ri{getStoredAuthData(){return q.getAuthData()}isLoggedIn(){const e=this.getStoredAuthData();return!!(e&&e.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const e=v.getUrlParameter("error"),t=v.getUrlParameter("errorDescription");if(e)return{error:e,errorDescription:t}}async handleUrlAuthErrors(e,t,n){return t?await Se.handleAuthEvent("onAuthError",e,{error:t,errorDescription:n},e.logoutUrl+"?post_logout_redirect_uri="+e.post_logout_redirect_uri+"&error="+t+"&errorDescription="+n):!0}}const ce=new Ri,M={normalizePath:i=>{if(!i||i.length<=0)return i;let e=i;return e.startsWith("#")&&(e=e.substring(1)),e.startsWith("/")&&(e=e.substring(1)),e},segmentMatches:(i,e,t)=>!!(i===e||e.startsWith(":")&&t&&t[e.substr(1)]===i),checkMatch:(i,e,t)=>{let n=!0;return v.trimTrailingSlash(v.trimLeadingSlash(i)).split("/").forEach((r,s)=>{var a,o;n&&(s+1>=e.length||!((a=e[s+1])!=null&&a.pathSegment)||!M.segmentMatches(r,((o=e[s+1])==null?void 0:o.pathSegment)??"",t??{}))&&(n=!1)}),n},checkVisibleForFeatureToggles:(i,e)=>{if(i!=null&&i.visibleForFeatureToggles){const t=(e==null?void 0:e.getActiveFeatureToggleList())||[];for(const n of i.visibleForFeatureToggles)if(n.startsWith("!")){if(t.includes(n.slice(1)))return!1}else if(!t.includes(n))return!1}return!0},generateTooltipText:(i,e,t)=>{let n=i==null?void 0:i.tooltipText;switch(n===void 0&&(n=t.getConfigValue("navigation.defaults.tooltipText")),n){case void 0:return e;case!1:return"";default:return t.i18n().getTranslation(n)}},isNodeAccessPermitted:(i,e,t,n)=>{if(n.auth().isAuthorizationEnabled()){const a=ce.isLoggedIn(),o=i.anonymousAccess;if(a&&o==="exclusive"||!a&&o!=="exclusive"&&o!==!0)return!1}const r=n.featureToggles();if(!M.checkVisibleForFeatureToggles(i,r))return!1;const s=n.getConfigValue("navigation.nodeAccessibilityResolver");return typeof s!="function"?!0:s(i,e,t)},updateHeaderTitle:(i,e)=>{const t=i==null?void 0:i.items;if(t&&e){let n="";return[...t].sort((r,s)=>(s.link||"").localeCompare(r.link||"")).some(r=>{let s=!1;if(s=M.checkMatch(r.link||"",e.nodesInPath??[]),!s&&r.selectionConditions&&r.selectionConditions.route&&(s=M.checkMatch(r.selectionConditions.route,e.nodesInPath??[]),s&&(r.selectionConditions.contextCriteria||[]).forEach(a=>{var o,l;s=s&&((l=(o=e==null?void 0:e.selectedNode)==null?void 0:o.context)==null?void 0:l[a.key])===a.value})),s)return n=r.title||"",!0}),n}},buildPath(i,e){return i.map(n=>{var s;const r=n.pathSegment;if(r!=null&&r.startsWith(":")){const a=r.slice(1),o=(s=e==null?void 0:e.pathParams)==null?void 0:s[a];if(o!=null)return encodeURIComponent(String(o))}return r}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let e="";return i.forEach(t=>{t&&(e+=(e?"_":"")+encodeURIComponent(t.toLowerCase().split(" ").join("")))}),e}},C={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,e,t){let n=e;const[r,s]=n.split("?"),a=new URLSearchParams(s);return this.modifySearchParams(i,a,t),n=r,a.toString()!==""&&(n+=`?${a.toString()}`),n},modifySearchParams(i,e,t){for(const[n,r]of Object.entries(i)){const s=t?`${t}${n}`:n;e.set(s,r),r===void 0&&e.delete(s)}},filterNodeParams(i,e){const t={},n=this.getContentViewParamPrefix(e);return i&&Object.entries(i).forEach(r=>{if(r[0].startsWith(n)){const s=r[0].substr(n.length);t[s]=r[1]}}),this.sanitizeParamsMap(t)},getContentViewParamPrefix(i){let e=i==null?void 0:i.getConfigValue("routing.nodeParamPrefix");return e===!1?e="":e||(e=this.defaultContentViewParamPrefix),e},sanitizeParamsMap(i){return Object.entries(i).reduce((e,t)=>(e[Be.sanitizeParam(t[0])]=Be.sanitizeParam(t[1]),e),{})},prepareSearchParamsForClient(i,e){const t={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(n=>{var r,s;n in e.routing().getSearchParams()&&((r=i.clientPermissions)!=null&&r.urlParameters)&&((s=i.clientPermissions.urlParameters[n])==null?void 0:s.read)===!0&&(t[n]=e.routing().getSearchParams()[n])}),t},getCurrentPath(i){if(i){const e=M.normalizePath(location.hash),[t,n]=e.split("?");return{path:t,query:n}}else return{path:M.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,e){return this.getQueryParams(e)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return C.getLocation().search?C.parseParams(C.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=C.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?C.parseParams(C.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let e=i.getConfigValue("routing.modalPathParam");return e||(e=this.defaultModalViewParamName),e},parseParams(i){const e=new URLSearchParams(i),t=new Map;for(const[n,r]of e.entries())t.set(n,r);return Object.fromEntries(t)},getModalParamsFromPath(i){const e=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return e&&JSON.parse(e)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,e){const t=new URLSearchParams(i);return t.delete(e),t.delete(`${e}Params`),t.toString()},handleHistoryState(i,e){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:e},i},encodeParams(i){const e=[];for(const t in i)e.push(encodeURIComponent(t)+"="+encodeURIComponent(i[t]));return e.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,e){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const n=e.getConfigValue("navigation.validWebcomponentUrls");if((n==null?void 0:n.length)>0)for(const r of n)try{if(new RegExp(r).test(i))return!0}catch(s){console.error(s)}return!1}return!0},setFeatureToggles(i,e,t){const n=this.sanitizeParamsMap(this.parseParams(e.split("?")[1]));let r;if(n[i]&&(r=n[i]),!r)return;const s=r.split(",");s.length>0&&s[0]!==""&&s.forEach(a=>t==null?void 0:t.setFeatureToggle(a,!0))},substituteDynamicParamsInObject(i,e,t=":",n=!1){return Object.entries(i).map(([r,s])=>{const a=n?Object.keys(e).find(o=>s&&s.indexOf(t+o)>=0):Object.keys(e).find(o=>s===t+o);return[r,a?n?s.replace(t+a,e[a]):e[a]:s]}).reduce((r,[s,a])=>Object.assign(r,{[s]:a}),{})}},it={logout:{label:"Sign Out",icon:"log"}};class de{constructor(e){this.luigi=e}getPathData(e){var c;const t=this.luigi.getConfig();let n=e.split("/");(n==null?void 0:n.length)>0&&n[0]===""&&(n=n.slice(1));let s=t.navigation.globalContext||{};const a=this.prepareRootNodes((c=t.navigation)==null?void 0:c.nodes,s);let o={};const l={selectedNodeChildren:a,nodesInPath:[{children:a}],rootNodes:a,pathParams:o};return n.forEach(f=>{var h,u,g;if(l.selectedNodeChildren){const p=this.findMatchingNode(f,l.selectedNodeChildren||[]);if(!p){console.log("No matching node found for segment:",f,"in children:",l.selectedNodeChildren);return}const S=p.context||{},T=M.mergeContext(s,S);let R=T;l.selectedNodeChildren=this.getAccessibleNodes(p,p.children||[],T),(h=p.pathSegment)!=null&&h.startsWith(":")&&(o[p.pathSegment.replace(":","")]=Be.sanitizeParam(f),R=C.substituteDynamicParamsInObject(T,o)),s=R,p.context=R,l.selectedNode=p,l.selectedNodeChildren=(u=l.selectedNode)!=null&&u.children?this.getAccessibleNodes(l.selectedNode,l.selectedNode.children,s):void 0,l.selectedNode&&((g=l.nodesInPath)==null||g.push(l.selectedNode))}}),l}findMatchingNode(e,t){let n;const r=t.filter(a=>!!a.pathSegment).length,s=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":")).length;if(r>1&&(s===1&&(console.warn(`Invalid node setup detected.
2
+ Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
3
+ Remove the static node from the configuration to resolve this warning.
4
+ Affected pathSegment:`,e,"Children:",t),t=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":"))),s>1)){console.error(`Invalid node setup detected.
5
+ Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
6
+ Invalid Children:`,t);return}return t.some(a=>{if(a.pathSegment===e||a.pathSegment&&a.pathSegment.startsWith(":"))return n=a,!0}),n}buildNavItems(e,t,n){const r={},s=[];return e==null||e.forEach(a=>{var o,l,c;if(M.isNodeAccessPermitted(a,this.getParentNode(n.selectedNode,n),((o=n==null?void 0:n.selectedNode)==null?void 0:o.context)||{},this.luigi))if(a.label&&(a.label=this.luigi.i18n().getTranslation(a.label),a.tooltip=this.resolveTooltipText(a,a.label)),a.category){const f=a.category.id||a.category.label||a.category,h=this.luigi.i18n().getTranslation(a.category.label||a.category.id||a.category);let u=r[f];u||(u={category:{icon:a.category.icon,id:f,label:h,nodes:[],tooltip:this.resolveTooltipText(a.category,h)}},r[f]=u,s.push(u)),(c=(l=u.category)==null?void 0:l.nodes)==null||c.push({node:a,selected:a===t})}else s.push({node:a,selected:a===t})}),s}shouldRedirect(e,t){var r;const n=t??this.getPathData(e);if(e=="")return n.rootNodes[0].pathSegment;if(n.selectedNode&&!n.selectedNode.viewUrl&&((r=n.selectedNode.children)!=null&&r.length))return e+"/"+n.selectedNode.children[0].pathSegment}getCurrentNode(e){var r;const t=this.getPathData(e),n=t.selectedNode;if(!(!n||!M.isNodeAccessPermitted(n,this.getParentNode(t.selectedNode,t),((r=t==null?void 0:t.selectedNode)==null?void 0:r.context)||{},this.luigi)))return n}getPathParams(e){return this.getPathData(e).pathParams}getTruncatedChildren(e){let t=!1,n=!1,r=[];return e.slice().reverse().forEach(s=>{(!t||s.tabNav)&&(s.tabNav===!1&&(n=!0),s.keepSelectedForChildren===!1?t=!0:(s.keepSelectedForChildren||s.tabNav&&!n)&&(t=!0,r=[])),r.push(s)}),r.reverse()}applyNavGroups(e){const t={},n=[],s=[];return e.forEach(a=>{if(a.node)s.push(a);else if(a.category){const o=a.category.id;o&&o.indexOf("::")>0?n.push(a):(a.category.isGroup,t[o]=a,s.push(a))}}),n.forEach(a=>{var c;const o=((c=a.category)==null?void 0:c.id.split("::")[0])||"",l=t[o];l&&l.category&&(l.category.isGroup||(l.category.isGroup=!0),l.category.nodes||(l.category.nodes=[]),l.category.nodes.push(a))}),s.filter(a=>{var o,l,c,f,h,u;if((o=a.category)!=null&&o.isGroup&&((l=a.category)!=null&&l.nodes)&&((c=a.category)==null?void 0:c.nodes.length)>0){for(let g=0;g<((f=a.category)==null?void 0:f.nodes.length);g++){const p=(h=a.category)==null?void 0:h.nodes[g];if(p.node&&!p.node.hideFromNav&&p.node.label||(u=p.category)!=null&&u.nodes&&p.category.nodes.filter(S=>{var T,R;return!((T=S.node)!=null&&T.hideFromNav)&&((R=S.node)==null?void 0:R.label)}).length>0)return!0}return!1}return!0})}getLeftNavData(e,t){var h,u,g;const n=t??this.getPathData(e);let r=[];const s=[];let a="";(h=n.nodesInPath)==null||h.forEach(p=>{p.children&&(p.tabNav||(a+="/"+(p.pathSegment||"")),s.push(p))});const o=this.getTruncatedChildren(n.nodesInPath);let l=[...o].pop(),c=n.selectedNode;(l!=null&&l.keepSelectedForChildren||l!=null&&l.tabNav)&&(c=l,o.pop(),l=[...o].pop()),c&&c.children&&n.rootNodes.includes(c)?r=this.buildNavItems(c.children,void 0,n):c&&c.tabNav?r=l!=null&&l.children?this.buildNavItems(l.children,c,n):[]:r=this.buildNavItems(((u=[...s].pop())==null?void 0:u.children)||[],c,n);const f=M.buildPath(s,n);return r=this.applyNavGroups(r),{selectedNode:c,items:r,basePath:a.replace(/\/\/+/g,"/"),sideNavFooterText:(g=this.luigi.getConfig().settings)==null?void 0:g.sideNavFooterText,navClick:p=>this.navItemClick(p,f)}}navItemClick(e,t){if(!e.pathSegment){console.error("Navigation error: pathSegment is not defined for the node.");return}let n="/";if(t.trim()!=="")n+=t+"/";else if(!e.isRootNode){console.error("Navigation error: parentPath is empty while the node is not a root node");return}n+=e.pathSegment,this.luigi.navigation().navigate(n)}getTopNavData(e,t){var u,g,p,S,T,R,$,N,z,G,K,J,B,x,P,I,_,te,Q,U,re,d,le,y,O,ge,pt,mt;const n=this.luigi.getConfig(),r=t??this.getPathData(e),s=this.prepareRootNodes((u=n.navigation)==null?void 0:u.nodes,((g=n.navigation)==null?void 0:g.globalContext)||{}),a=(T=(S=(p=n.navigation)==null?void 0:p.profile)==null?void 0:S.items)!=null&&T.length?JSON.parse(JSON.stringify(n.navigation.profile.items)):[],o=((R=n.navigation)==null?void 0:R.appSwitcher)&&this.getAppSwitcherData(($=n.navigation)==null?void 0:$.appSwitcher,(N=n.settings)==null?void 0:N.header),l=M.updateHeaderTitle(o,r);a!=null&&a.length&&a.map(k=>({...k,label:this.luigi.i18n().getTranslation(k.label||"")}));const c=this.luigi.i18n().getTranslation((K=(G=(z=n.navigation)==null?void 0:z.profile)==null?void 0:G.logout)==null?void 0:K.label)||it.logout.label,f=k=>{var Le;k.link?this.luigi.navigation().navigate(k.link):(Le=k.externalLink)!=null&&Le.url&&(k.externalLink.sameWindow?window.location.href=k.externalLink.url:window.open(k.externalLink.url,"_blank","noopener noreferrer"))},h={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&ce.isLoggedIn(),items:a,itemClick:f,logout:{altText:this.luigi.i18n().getTranslation((x=(B=(J=n.navigation)==null?void 0:J.profile)==null?void 0:B.logout)==null?void 0:x.altText)||it.logout.label,label:c,icon:((_=(I=(P=n.navigation)==null?void 0:P.profile)==null?void 0:I.logout)==null?void 0:_.icon)||it.logout.icon,testId:((U=(Q=(te=n.navigation)==null?void 0:te.profile)==null?void 0:Q.logout)==null?void 0:U.testId)||M.prepareForTests(c),doLogout:()=>{ve.logout()}},onUserInfoUpdate:k=>{var Le,_t,St,Et;if((_t=(Le=n.navigation)==null?void 0:Le.profile)!=null&&_t.staticUserInfoFn){const Ne=(Et=(St=n.navigation)==null?void 0:St.profile)==null?void 0:Et.staticUserInfoFn();Ne instanceof Promise?Ne.then(fi=>{k(fi)}):k(Ne)}else ve.getUserInfoStore().subscribe(Ne=>{k(Ne)})}};return{appTitle:l||((d=(re=n.settings)==null?void 0:re.header)==null?void 0:d.title),logo:(y=(le=n.settings)==null?void 0:le.header)==null?void 0:y.logo,topNodes:this.buildNavItems(s,void 0,r),productSwitcher:(O=n.navigation)==null?void 0:O.productSwitcher,profile:h,appSwitcher:((ge=n.navigation)==null?void 0:ge.appSwitcher)&&this.getAppSwitcherData((pt=n.navigation)==null?void 0:pt.appSwitcher,(mt=n.settings)==null?void 0:mt.header),navClick:k=>{this.navItemClick(k,"")}}}getParentNode(e,t){var n;if(e&&e===((n=t.nodesInPath)==null?void 0:n[t.nodesInPath.length-1]))return t.nodesInPath[t.nodesInPath.length-2]}getAppSwitcherData(e,t){var s;const n=e,r=n==null?void 0:n.showMainAppEntry;if(n&&n.items&&r){const a={title:this.luigi.i18n().getTranslation(t.title||""),subTitle:t.subTitle,link:"/"};if((s=n.items)==null||s.map(o=>({...o,title:this.luigi.i18n().getTranslation(o.title||"")})),n.items.some(o=>o.link===a.link))return n;n.items.unshift(a)}return n}getTabNavData(e,t){var f;const n=t??this.getPathData(e),r=n==null?void 0:n.selectedNode;let s;if(!r)return{};if(!r.tabNav&&(s=this.getParentNode(r,n),s&&!s.tabNav))return{};let a="";(f=n.nodesInPath)==null||f.forEach(h=>{h.children&&(a+="/"+(h.pathSegment||""))});const o=s?this.getTruncatedChildren(s.children):this.getTruncatedChildren(r.children),l=this.buildNavItems(o,r,n),c=M.buildPath(n.nodesInPath||[],n);return{selectedNode:r,items:l,basePath:a.replace(/\/\/+/g,"/"),navClick:h=>this.navItemClick(h,c)}}onNodeChange(e,t){const n=this.luigi.getConfigValue("navigation.nodeChangeHook");v.isFunction(n)?n(e,t):n!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(e){const t=this.getPathData(e);return{nodeObject:C.getLastNodeObject(t),pathData:t}}resolveTooltipText(e,t){return M.generateTooltipText(e,t,this.luigi)}prepareRootNodes(e,t){const n=JSON.parse(JSON.stringify(e))||[];return n.length?(n.forEach(r=>{r.isRootNode=!0}),e.forEach(r=>{var s;if((s=r==null?void 0:r.badgeCounter)!=null&&s.count){const a=n.find(o=>o.badgeCounter&&o.viewUrl===r.viewUrl);a&&(a.badgeCounter.count=r.badgeCounter.count)}}),this.getAccessibleNodes(void 0,n,t)):n}getAccessibleNodes(e,t,n){return t?t.filter(r=>M.isNodeAccessPermitted(r,e,n,this.luigi)):[]}}function ae(){}function Vt(i){return i()}function Tt(){return Object.create(null)}function qe(i){i.forEach(Vt)}function Ft(i){return typeof i=="function"}function Qt(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let He,ke;function wt(i,e){return i===e||(He||(He=document.createElement("a")),He.href=e,i===He.href)}function Ai(i,e,t){const n=(function(r){if(!r)return document;const s=r.getRootNode?r.getRootNode():r.ownerDocument;return s&&s.host?s:r.ownerDocument})(i);if(!n.getElementById(e)){const r=be("style");r.id=e,r.textContent=t,(function(s,a){(function(o,l){o.appendChild(l)})(s.head||s,a),a.sheet})(n,r)}}function ue(i,e,t){i.insertBefore(e,t||null)}function oe(i){i.parentNode&&i.parentNode.removeChild(i)}function be(i){return document.createElement(i)}function Ht(i){return document.createTextNode(i)}function W(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function Oe(i){ke=i}function Wt(){if(!ke)throw new Error("Function called outside component initialization");return ke}function Gt(i){Wt().$$.on_mount.push(i)}const me=[],Me=[];let Ce=[];const yt=[],Pi=Promise.resolve();let st=!1;function at(i){Ce.push(i)}const nt=new Set;let fe=0;function E(){if(fe!==0)return;const i=ke;do{try{for(;fe<me.length;){const e=me[fe];fe++,Oe(e),Ii(e.$$)}}catch(e){throw me.length=0,fe=0,e}for(Oe(null),me.length=0,fe=0;Me.length;)Me.pop()();for(let e=0;e<Ce.length;e+=1){const t=Ce[e];nt.has(t)||(nt.add(t),t())}Ce.length=0}while(me.length);for(;yt.length;)yt.pop()();st=!1,nt.clear(),Oe(i)}function Ii(i){if(i.fragment!==null){i.update(),qe(i.before_update);const e=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,e),i.after_update.forEach(at)}}const $i=new Set;function Li(i,e){const t=i.$$;t.fragment!==null&&((function(n){const r=[],s=[];Ce.forEach((a=>n.indexOf(a)===-1?r.push(a):s.push(a))),s.forEach((a=>a())),Ce=r})(t.after_update),qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ni(i,e){i.$$.dirty[0]===-1&&(me.push(i),st||(st=!0,Pi.then(E)),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Bt(i,e,t,n,r,s,a=null,o=[-1]){const l=ke;Oe(i);const c=i.$$={fragment:null,ctx:[],props:s,update:ae,not_equal:r,bound:Tt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:Tt(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};a&&a(c.root);let f=!1;if(c.ctx=t?t(i,e.props||{},((g,p,...S)=>{const T=S.length?S[0]:p;return c.ctx&&r(c.ctx[g],c.ctx[g]=T)&&(!c.skip_bound&&c.bound[g]&&c.bound[g](T),f&&Ni(i,g)),p})):[],c.update(),f=!0,qe(c.before_update),c.fragment=!!n&&n(c.ctx),e.target){if(e.hydrate){const g=(function(p){return Array.from(p.childNodes)})(e.target);c.fragment&&c.fragment.l(g),g.forEach(oe)}else c.fragment&&c.fragment.c();e.intro&&(h=i.$$.fragment)&&h.i&&($i.delete(h),h.i(u)),(function(g,p,S){const{fragment:T,after_update:R}=g.$$;T&&T.m(p,S),at((()=>{const $=g.$$.on_mount.map(Vt).filter(Ft);g.$$.on_destroy?g.$$.on_destroy.push(...$):qe($),g.$$.on_mount=[]})),R.forEach(at)})(i,e.target,e.anchor),E()}var h,u;Oe(l)}let jt;function Ge(i,e,t,n){var s;const r=(s=t[i])==null?void 0:s.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!t[i])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return e!=null?+e:e}}function qt(i,e,t,n,r,s){let a=class extends jt{constructor(){super(i,t,r),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((o=>(e[o].attribute||o).toLowerCase()))}};return Object.keys(e).forEach((o=>{Object.defineProperty(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){var c;l=Ge(o,l,e),this.$$d[o]=l,(c=this.$$c)==null||c.$set({[o]:l})}})})),n.forEach((o=>{Object.defineProperty(a.prototype,o,{get(){var l;return(l=this.$$c)==null?void 0:l[o]}})})),s&&(a=s(a)),i.element=a,a}typeof HTMLElement=="function"&&(jt=class extends HTMLElement{constructor(e,t,n){super();A(this,"$$ctor");A(this,"$$s");A(this,"$$c");A(this,"$$cn",!1);A(this,"$$d",{});A(this,"$$r",!1);A(this,"$$p_d",{});A(this,"$$l",{});A(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(a){return()=>{let o;return{c:function(){o=be("slot"),a!=="default"&&W(o,"name",a)},m:function(l,c){ue(l,o,c)},d:function(l){l&&oe(o)}}}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},r=(function(a){const o={};return a.childNodes.forEach((l=>{o[l.slot||"default"]=!0})),o})(this);for(const a of this.$$s)a in r&&(n[a]=[t(a)]);for(const a of this.attributes){const o=this.$$g_p(a.name);o in this.$$d||(this.$$d[o]=Ge(o,a.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||this[a]===void 0||(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const s=()=>{this.$$r=!0;for(const a in this.$$p_d)if(this.$$d[a]=this.$$c.$$.ctx[this.$$c.$$.props[a]],this.$$p_d[a].reflect){const o=Ge(a,this.$$d[a],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,o)}this.$$r=!1};this.$$c.$$.after_update.push(s),s();for(const a in this.$$l)for(const o of this.$$l[a]){const l=this.$$c.$on(a,o);this.$$l_u.set(o,l)}this.$$l={}}}attributeChangedCallback(e,t,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ge(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(e){return Object.keys(this.$$p_d).find((t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e))||e}});class zt{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){Li(this,1),this.$destroy=ae}$on(e,t){if(!Ft(t))return ae;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}$set(e){var t;this.$$set&&(t=e,Object.keys(t).length!==0)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var w;typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4"),(function(i){i.CUSTOM_MESSAGE="custom",i.GET_CONTEXT="luigi.get-context",i.SEND_CONTEXT_HANDSHAKE="luigi.init",i.CONTEXT_RECEIVED="luigi.init.ok",i.NAVIGATION_REQUEST="luigi.navigation.open",i.ALERT_REQUEST="luigi.ux.alert.show",i.ALERT_CLOSED="luigi.ux.alert.hide",i.INITIALIZED="luigi.init.ok",i.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",i.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",i.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",i.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",i.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",i.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",i.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",i.LOCAL_STORAGE_SET_REQUEST="storage",i.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",i.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",i.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",i.BACK_NAVIGATION_REQUEST="luigi.navigation.back",i.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",i.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",i.SEND_CONTEXT_OBJECT="luigi.navigate",i.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",i.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",i.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",i.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",i.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",i.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",i.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",i.AUTH_SET_TOKEN="luigi.auth.tokenIssued",i.ADD_BACKDROP_REQUEST="luigi.add-backdrop",i.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",i.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",i.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(w||(w={}));class Ui extends Event{constructor(e,t,n,r){super(e),this.detail=t,this.payload=n||t||{},this.callbackFn=r}callback(e){this.callbackFn&&this.callbackFn(e)}}const m={ADD_BACKDROP_REQUEST:"add-backdrop-request",ADD_NODE_PARAMS_REQUEST:"add-node-params-request",ADD_SEARCH_PARAMS_REQUEST:"add-search-params-request",ALERT_CLOSED:"close-alert-request",ALERT_REQUEST:"show-alert-request",BACK_NAVIGATION_REQUEST:"navigate-back-request",CHECK_PATH_EXISTS_REQUEST:"check-path-exists-request",CLOSE_CURRENT_MODAL_REQUEST:"close-current-modal-request",CLOSE_USER_SETTINGS_REQUEST:"close-user-settings-request",COLLAPSE_LEFT_NAV_REQUEST:"collapse-leftnav-request",CUSTOM_MESSAGE:"custom-message",GET_CONTEXT_REQUEST:"get-context-request",GET_CURRENT_ROUTE_REQUEST:"get-current-route-request",GO_BACK_REQUEST:"go-back-request",HAS_BACK_REQUEST:"has-back-request",HIDE_LOADING_INDICATOR_REQUEST:"hide-loading-indicator-request",INITIALIZED:"initialized",LOCAL_STORAGE_SET_REQUEST:"set-storage-request",NAVIGATION_COMPLETED_REPORT:"report-navigation-completed-request",NAVIGATION_REQUEST:"navigation-request",OPEN_USER_SETTINGS_REQUEST:"open-user-settings-request",PATH_EXISTS_REQUEST:"path-exists-request",REMOVE_BACKDROP_REQUEST:"remove-backdrop-request",RUNTIME_ERROR_HANDLING_REQUEST:"runtime-error-handling-request",SET_ANCHOR_LINK_REQUEST:"set-anchor-request",SET_CURRENT_LOCALE_REQUEST:"set-current-locale-request",SET_DIRTY_STATUS_REQUEST:"set-dirty-status-request",SET_DOCUMENT_TITLE_REQUEST:"set-document-title-request",SET_THIRD_PARTY_COOKIES_REQUEST:"set-third-party-cookies-request",SET_VIEW_GROUP_DATA_REQUEST:"set-viewgroup-data-request",SHOW_CONFIRMATION_MODAL_REQUEST:"show-confirmation-modal-request",SHOW_LOADING_INDICATOR_REQUEST:"show-loading-indicator-request",UPDATE_MODAL_PATH_DATA_REQUEST:"update-modal-path-data-request",UPDATE_MODAL_SETTINGS_REQUEST:"update-modal-settings-request",UPDATE_TOP_NAVIGATION_REQUEST:"update-top-navigation-request"};class ct{isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}sendCustomMessageToIframe(e,t,n){var s;const r=n||"custom";if((s=e==null?void 0:e.iframe)!=null&&s.contentWindow){const a=new URL(e.iframe.src);r==="custom"?e.iframe.contentWindow.postMessage({msg:r,data:t},a.origin):e.iframe.contentWindow.postMessage({msg:r,...t},a.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(e,t,n,r,s){this.dispatch(e,t,n,s,r)}dispatch(e,t,n,r,s){const a=new Ui(e,n,s,r);t.dispatchEvent(a)}getTargetContainer(e){let t;return globalThis.__luigi_container_manager.container.forEach((n=>{var r;(r=n.iframeHandle)!=null&&r.iframe&&n.iframeHandle.iframe.contentWindow===e.source&&(t=n)})),t}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:e=>{var r,s,a,o,l,c,f,h;const t=this.getTargetContainer(e),n=(s=(r=t==null?void 0:t.iframeHandle)==null?void 0:r.iframe)==null?void 0:s.contentWindow;if(n&&n===e.source)switch(e.data.msg){case w.CUSTOM_MESSAGE:{const u=e.data.data,g=u.id;delete u.id,this.dispatch(m.CUSTOM_MESSAGE,t,{id:g,_metaData:{},data:u})}break;case w.GET_CONTEXT:n.postMessage({msg:w.SEND_CONTEXT_HANDSHAKE,context:t.context||{},internal:{thirdPartyCookieCheck:{disabled:t.skipCookieCheck==="true"},currentTheme:t.theme,currentLocale:t.locale,activeFeatureToggleList:t.activeFeatureToggleList||[],cssVariables:t.cssVariables||{},anchor:t.anchor||"",userSettings:t.userSettings||null,drawer:t.drawer||!1,modal:t.modal||!1,viewStackSize:t.viewStackSize||0,isNavigateBack:t.isNavigateBack||!1},authData:t.authData||{},nodeParams:t.nodeParams||{},searchParams:t.searchParams||{},pathParams:t.pathParams||{}},e.origin);break;case w.NAVIGATION_REQUEST:this.dispatch(m.NAVIGATION_REQUEST,t,e.data.params,(u=>{n.postMessage({msg:w.CLOSE_MODAL_ANSWER,data:u},e.origin)}));break;case w.ALERT_REQUEST:this.dispatchWithPayload(m.ALERT_REQUEST,t,e,(o=(a=e.data)==null?void 0:a.data)==null?void 0:o.settings,(u=>{var g,p,S;t.notifyAlertClosed((S=(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.settings)==null?void 0:S.id,u)}));break;case w.INITIALIZED:this.dispatch(m.INITIALIZED,t,((l=e.data)==null?void 0:l.params)||{});break;case w.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(m.ADD_SEARCH_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case w.ADD_NODE_PARAMS_REQUEST:this.dispatch(m.ADD_NODE_PARAMS_REQUEST,t,{data:e.data.data,keepBrowserHistory:e.data.keepBrowserHistory});break;case w.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(m.SHOW_CONFIRMATION_MODAL_REQUEST,t,e.data.data,(c=e.data.data)==null?void 0:c.settings,(u=>{t.notifyConfirmationModalClosed(u)}));break;case w.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(m.SHOW_LOADING_INDICATOR_REQUEST,t,e);break;case w.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(m.HIDE_LOADING_INDICATOR_REQUEST,t,e);break;case w.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(m.SET_CURRENT_LOCALE_REQUEST,t,e,e.data.data);break;case w.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(m.LOCAL_STORAGE_SET_REQUEST,t,e,(f=e.data.data)==null?void 0:f.params);break;case w.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,t,e);break;case w.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(m.SET_ANCHOR_LINK_REQUEST,t,e,e.data.anchor);break;case w.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(m.SET_THIRD_PARTY_COOKIES_REQUEST,t,e);break;case w.BACK_NAVIGATION_REQUEST:{let u=((h=e.data)==null?void 0:h.goBackContext)||{};if(typeof u=="string")try{u=JSON.parse(u)}catch(g){console.warn(g)}this.dispatch(m.GO_BACK_REQUEST,t,u),this.dispatch(m.BACK_NAVIGATION_REQUEST,t,e)}break;case w.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(m.GET_CURRENT_ROUTE_REQUEST,t,e,e.data.data,(u=>{var g,p;n.postMessage({msg:w.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.id,route:u}},e.origin)}));break;case w.NAVIGATION_COMPLETED_REPORT:this.dispatch(m.NAVIGATION_COMPLETED_REPORT,t,e);break;case w.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(m.UPDATE_MODAL_PATH_DATA_REQUEST,t,e,e.data.params);break;case w.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(m.UPDATE_MODAL_SETTINGS_REQUEST,t,e,{addHistoryEntry:e.data.addHistoryEntry,updatedModalSettings:e.data.updatedModalSettings});break;case w.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(m.CHECK_PATH_EXISTS_REQUEST,t,e,e.data.data,(u=>{var g,p;n.postMessage({msg:w.SEND_PATH_EXISTS_ANSWER,data:{correlationId:(p=(g=e.data)==null?void 0:g.data)==null?void 0:p.id,pathExists:u}},e.origin)}));break;case w.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(m.SET_DIRTY_STATUS_REQUEST,t,e,{dirty:e.data.dirty});break;case w.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(m.SET_VIEW_GROUP_DATA_REQUEST,t,e.data.data);break;case w.ADD_BACKDROP_REQUEST:this.dispatch(m.ADD_BACKDROP_REQUEST,t,e);break;case w.REMOVE_BACKDROP_REQUEST:this.dispatch(m.REMOVE_BACKDROP_REQUEST,t,e);break;case w.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(m.CLOSE_CURRENT_MODAL_REQUEST,t,e)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(e){this.getContainerManager().container.push(e)}}const se=new ct,_e=new class{constructor(){this.updateContext=(i,e,t,n,r,s)=>{if(t){const a=e||{};se.sendCustomMessageToIframe(t,{context:i,nodeParams:n||{},pathParams:r||{},searchParams:s||{},internal:a,withoutSync:!0},w.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,e,t,n)=>{if(n){const r=t||{};se.sendCustomMessageToIframe(n,{context:e,internal:r,withoutSync:!1,viewUrl:i},w.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,e)=>{i&&e?se.sendCustomMessageToIframe(i,{authData:e},w.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,e,t,n,r)=>{if(t&&e._luigi_mfe_webcomponent)se.dispatch(i,e._luigi_mfe_webcomponent,r);else{const s={...r};s.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),s.id=i,se.sendCustomMessageToIframe(n,s)}},this.notifyConfirmationModalClosed=(i,e)=>{const t={data:{confirmed:i}};se.sendCustomMessageToIframe(e,t,w.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,e,t){const n=e?{id:i,dismissKey:e}:{id:i};se.sendCustomMessageToIframe(t,n,w.ALERT_CLOSED)}},bt=i=>{if(!i)return;const e=i;return e.forEach(((t,n)=>{e[n]=t+(t.indexOf(";")!=-1?"":";"),e[n]=i[n].replaceAll('"',"'")})),e.join(" ")};class Re{constructor(e){e?(this.rendererObject=e,this.config=e.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(e){return document.createElement("div")}attachCompoundItem(e,t){e.appendChild(t)}}class Oi extends Re{constructor(e){super(e||{use:{}}),e&&e.use&&e.use.extends&&(this.superRenderer=Kt({use:e.use.extends,config:e.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(e){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(e,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(e):super.createCompoundItemContainer(e)}attachCompoundItem(e,t){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(e,t,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(e,t):super.attachCompoundItem(e,t)}}class Di extends Re{createCompoundContainer(){const e="__lui_compound_"+new Date().getTime(),t=document.createElement("div");t.classList.add(e);let n="";return this.config.layouts&&this.config.layouts.forEach((r=>{if(r.minWidth||r.maxWidth){let s="@media only screen ";r.minWidth!=null&&(s+=`and (min-width: ${r.minWidth}px) `),r.maxWidth!=null&&(s+=`and (max-width: ${r.maxWidth}px) `),s+=`{
7
+ .${e} {
8
+ grid-template-columns: ${r.columns||"auto"};
9
+ grid-template-rows: ${r.rows||"auto"};
10
+ grid-gap: ${r.gap||"0"};
11
+ }
12
+ }
13
+ `,n+=s}})),t.innerHTML=`
14
+ <style scoped>
15
+ .${e} {
16
+ display: grid;
17
+ grid-template-columns: ${this.config.columns||"auto"};
18
+ grid-template-rows: ${this.config.rows||"auto"};
19
+ grid-gap: ${this.config.gap||"0"};
20
+ min-height: ${this.config.minHeight||"auto"};
21
+ }
22
+ ${n}
23
+ </style>
24
+ `,t}createCompoundItemContainer(e){const t=e||{},n=document.createElement("div");return n.setAttribute("style",`grid-row: ${t.row||"auto"}; grid-column: ${t.column||"auto"}`),n.classList.add("lui-compoundItemCnt"),n}}const Kt=i=>{const e=i.use;return e?e==="grid"?new Di(i):e.createCompoundContainer||e.createCompoundItemContainer||e.attachCompoundItem?new Oi(i):new Re(i):new Re(i)},Rt=(i,e,t,n)=>{e!=null&&e.eventListeners&&e.eventListeners.forEach((r=>{const s=r.source+"."+r.name,a=i[s],o={wcElementId:t,wcElement:n,action:r.action,converter:r.dataConverter};a?a.push(o):i[s]=[o]}))};function At(i){return String(i).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&#39;","'").replaceAll("&sol;","/")}class Jt{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new ct}dynamicImport(e){return Object.freeze(import(e))}processViewUrl(e,t){return e}attachWC(e,t,n,r,s,a,o){if(n&&n.contains(t)){const l=document.createElement(e);a&&l.setAttribute("nodeId",a),l.setAttribute("lui_web_component","true"),this.initWC(l,e,n,s,r,a,o),n.replaceChild(l,t),n._luigi_node&&(n._luigi_mfe_webcomponent=l),n.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(e,t,n){this.containerService.dispatch(e,this.thisComponent,t,n)}createClientAPI(e,t,n,r,s){return{linkManager:()=>{let a=null,o=!1,l=!1,c=!1,f={};const h={navigate:(u,g={})=>{const p={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f,...g};this.dispatchLuigiEvent(m.NAVIGATION_REQUEST,{link:u,...p})},navigateToIntent:(u,g={})=>{var S;let p="#?intent=";if(p+=u,g&&((S=Object.keys(g))==null?void 0:S.length)){const T=Object.entries(g);if(T.length>0){p+="?";for(const[R,$]of T)p+=R+"="+$+"&";p=p.slice(0,-1)}}h.navigate(p)},fromClosestContext:()=>(o=!0,h),fromContext:u=>(a=u,h),fromVirtualTreeRoot:()=>(l=!0,h),fromParent:()=>(c=!0,h),getCurrentRoute:()=>{const u={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((g,p)=>{this.containerService.dispatch(m.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...u},(S=>{S?g(S):p("No current route received.")}))}))},withParams:u=>(f=u,h),updateModalPathInternalNavigation:(u,g={},p=!1)=>{if(!u)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const S={fromClosestContext:o,fromContext:a,fromParent:c,fromVirtualTreeRoot:l,nodeParams:f};this.dispatchLuigiEvent(m.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(S,{history:p,link:u,modal:g}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(m.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:u=>{const g={fromContext:a,fromClosestContext:o,fromVirtualTreeRoot:l,fromParent:c,nodeParams:f};return new Promise(((p,S)=>{this.containerService.dispatch(m.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...g,link:u},(T=>{T?p(!0):S(!1)})),this.containerService.dispatch(m.PATH_EXISTS_REQUEST,this.thisComponent,{...g,link:u},(T=>{T?p(!0):S(!1)}))}))},openAsDrawer:(u,g={})=>{h.navigate(u,{drawer:g})},openAsModal:(u,g={})=>{h.navigate(u,{modal:g})},openAsSplitView:(u,g={})=>{h.navigate(u,{splitView:g})},goBack:u=>{this.dispatchLuigiEvent(m.GO_BACK_REQUEST,u)},hasBack:()=>!1,updateModalSettings:(u={},g=!1)=>{this.dispatchLuigiEvent(m.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:u,addHistoryEntry:g})}};return h},uxManager:()=>({showAlert:a=>(a.id=this.alertIndex++,new Promise((o=>{this.alertResolvers[a.id]=o,this.dispatchLuigiEvent(m.ALERT_REQUEST,a,(l=>{this.resolveAlert(a.id,l)}))}))),showConfirmationModal:a=>new Promise(((o,l)=>{this.modalResolver={resolve:o,reject:l},this.containerService.dispatch(m.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,a,(c=>{c?o():l()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(m.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(m.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(m.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:a=>{this.dispatchLuigiEvent(m.SET_DOCUMENT_TITLE_REQUEST,a)},setDirtyStatus:a=>{this.dispatchLuigiEvent(m.SET_DIRTY_STATUS_REQUEST,{dirty:a})},setCurrentLocale:a=>{a&&this.dispatchLuigiEvent(m.SET_CURRENT_LOCALE_REQUEST,{currentLocale:a})},removeBackdrop:()=>{this.dispatchLuigiEvent(m.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(m.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(m.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(m.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(m.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(m.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:a=>{e&&e.eventBus&&e.eventBus.onPublishEvent(a,t,n);const o={id:a.type,_metaData:{nodeId:t,wc_id:n,src:r},data:a.detail};this.dispatchLuigiEvent(m.CUSTOM_MESSAGE,o)},luigiClientInit:()=>{this.dispatchLuigiEvent(m.INITIALIZED,{})},addNodeParams:(a,o)=>{s||this.dispatchLuigiEvent(m.ADD_NODE_PARAMS_REQUEST,{params:a,data:a,keepBrowserHistory:o})},getNodeParams:a=>{return s?{}:a?(o=this.thisComponent.nodeParams,Object.entries(o).reduce(((l,c)=>(l[At(c[0])]=At(c[1]),l)),{})):this.thisComponent.nodeParams||{};var o},setAnchor:a=>{s||this.dispatchLuigiEvent(m.SET_ANCHOR_LINK_REQUEST,a)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(a={},o=!0)=>{this.dispatchLuigiEvent(m.ADD_SEARCH_PARAMS_REQUEST,{data:a,keepBrowserHistory:o})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:a=>{this.dispatchLuigiEvent(m.SET_VIEW_GROUP_DATA_REQUEST,a)}}}initWC(e,t,n,r,s,a,o){const l=this.createClientAPI(n,a,t,e,o);if(e.__postProcess){const c=new URL(document.baseURI).origin===new URL(r,document.baseURI).origin?new URL("./",new URL(r,document.baseURI)):new URL("./",r);e.__postProcess(s,l,c.origin+c.pathname)}else e.context=s,e.LuigiClient=l}generateWCId(e){let t="";const n=new URL(e,encodeURI(location.href)).href;for(let r=0;r<n.length;r++)t+=n.charCodeAt(r).toString(16);return"luigi-wc-"+t}registerWCFromUrl(e,t){const n=this.processViewUrl(e);return new Promise(((r,s)=>{this.checkWCUrl(n)?this.dynamicImport(n).then((a=>{try{if(!window.customElements.get(t)){let o=a.default;if(!HTMLElement.isPrototypeOf(o)){const l=Object.keys(a);for(let c=0;c<l.length&&(o=a[l[c]],!HTMLElement.isPrototypeOf(o));c++);}window.customElements.define(t,o)}r(1)}catch(o){s(o)}})).catch((a=>{s(a)})):s(`Error: View URL '${n}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(e,t,n){if(this.checkWCUrl(t)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(s,a)=>{window.customElements.define(this.generateWCId(s),a)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(s,a)=>{this.containerService.getContainerManager()._registerWebcomponent(s,a)}));const r=document.createElement("script");r.setAttribute("src",t),e.webcomponent.type==="module"&&r.setAttribute("type","module"),r.setAttribute("defer","true"),r.addEventListener("load",(()=>{n()})),document.body.appendChild(r)}else console.warn(`View URL '${t}' not allowed to be included`)}checkWCUrl(e){return!0}renderWebComponent(e,t,n,r,s,a){var f,h;const o=this.processViewUrl(e,{context:n}),l=((f=r==null?void 0:r.webcomponent)==null?void 0:f.tagName)||this.generateWCId(o),c=document.createElement("div");t.appendChild(c),t._luigi_node=r,window.customElements.get(l)?this.attachWC(l,c,t,n,o,s,a):window.luigiWCFn?window.luigiWCFn(o,l,c,(()=>{this.attachWC(l,c,t,n,o,s,a)})):(h=r==null?void 0:r.webcomponent)!=null&&h.selfRegistered?this.includeSelfRegisteredWCFromUrl(r,o,(()=>{this.attachWC(l,c,t,n,o,s,a)})):this.registerWCFromUrl(o,l).then((()=>{this.attachWC(l,c,t,n,o,s,a)})).catch((u=>{console.warn("ERROR =>",u),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,u)}))}createCompoundContainerAsync(e,t,n){return new Promise(((r,s)=>{var a,o;if(e.viewUrl)try{const l=((a=n==null?void 0:n.webcomponent)==null?void 0:a.tagName)||this.generateWCId(e.viewUrl);(o=n==null?void 0:n.webcomponent)!=null&&o.selfRegistered?this.includeSelfRegisteredWCFromUrl(n,e.viewUrl,(()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})):this.registerWCFromUrl(e.viewUrl,l).then((()=>{const c=document.createElement(l);c.setAttribute("lui_web_component","true"),this.initWC(c,l,c,e.viewUrl,t,"_root"),r(c)})).catch((c=>{console.warn("Error: ",c),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,c)}))}catch(l){s(l)}else r(e.createCompoundContainer())}))}renderWebComponentCompound(e,t,n){var s;let r;return e.webcomponent&&e.viewUrl?(r=new Re,r.viewUrl=this.processViewUrl(e.viewUrl,{context:n}),r.createCompoundItemContainer=a=>{const o=document.createElement("div");return a!=null&&a.slot&&o.setAttribute("slot",a.slot),o}):(s=e.compound)!=null&&s.renderer&&(r=Kt(e.compound.renderer)),r=r||new Re,new Promise((a=>{this.createCompoundContainerAsync(r,n,e).then((o=>{var c,f;t._luigi_mfe_webcomponent=o,t._luigi_node=e;const l={};o.eventBus={listeners:l,onPublishEvent:(h,u,g)=>{const p=l[u+"."+h.type]||[];p.push(...l["*."+h.type]||[]),p.forEach((S=>{const T=S.wcElement||o.querySelector("[nodeId="+S.wcElementId+"]");T?T.dispatchEvent(new CustomEvent(S.action,{detail:S.converter?S.converter(h.detail):h.detail})):console.debug("Could not find event target",S)}))}},(f=(c=e.compound)==null?void 0:c.children)==null||f.forEach(((h,u)=>{const g={...n,...h.context},p=r.createCompoundItemContainer(h.layoutConfig);p.eventBus=o.eventBus,r.attachCompoundItem(o,p);const S=h.id||"gen_"+u;this.renderWebComponent(h.viewUrl,p,g,h,S,!0),Rt(l,h,S)})),t.appendChild(o),Rt(l,e.compound,"_root",o),a(o)})).catch((o=>{console.warn("Error: ",o),this.containerService.dispatch(m.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,o)}))}))}resolveAlert(e,t){this.alertResolvers[e]?(this.alertResolvers[e](t===void 0||t),this.alertResolvers[e]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(e){this.modalResolver?(e?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const De=new class{isFunction(i){return i&&{}.toString.call(i)==="[object Function]"}isObject(i){return!(!i||typeof i!="object"||Array.isArray(i))}checkWebcomponentValue(i){return typeof i=="string"?JSON.parse(i):typeof i=="boolean"||typeof i=="object"?i:void console.warn("Webcomponent value has a wrong type.")}resolveContext(i){return i?typeof i=="string"?JSON.parse(i):i:{}}};function Pt(i){let e,t=(!i[4]||i[4]==="false")&&It(i);return{c(){t&&t.c(),e=Ht("")},m(n,r){t&&t.m(n,r),ue(n,e,r)},p(n,r){n[4]&&n[4]!=="false"?t&&(t.d(1),t=null):t?t.p(n,r):(t=It(n),t.c(),t.m(e.parentNode,e))},d(n){n&&oe(e),t&&t.d(n)}}}function It(i){let e,t,n,r,s,a;return{c(){e=be("style"),e.textContent=`main.lui-isolated,
25
+ .lui-isolated iframe {
26
+ width: 100%;
27
+ height: 100%;
28
+ border: none;
29
+ }
30
+
31
+ main.lui-isolated {
32
+ line-height: 0;
33
+ }`,t=Ht(" "),n=be("iframe"),wt(n.src,r=i[3])||W(n,"src",r),W(n,"title",i[1]),W(n,"allow",s=bt(i[0])),W(n,"sandbox",a=i[2]?i[2].join(" "):void 0)},m(o,l){ue(o,e,l),ue(o,t,l),ue(o,n,l),i[28](n)},p(o,l){8&l[0]&&!wt(n.src,r=o[3])&&W(n,"src",r),2&l[0]&&W(n,"title",o[1]),1&l[0]&&s!==(s=bt(o[0]))&&W(n,"allow",s),4&l[0]&&a!==(a=o[2]?o[2].join(" "):void 0)&&W(n,"sandbox",a)},d(o){o&&(oe(e),oe(t),oe(n)),i[28](null)}}}function xi(i){let e,t,n=i[5]&&Pt(i);return{c(){e=be("main"),n&&n.c(),W(e,"class",t=i[4]?void 0:"lui-isolated")},m(r,s){ue(r,e,s),n&&n.m(e,null),i[29](e)},p(r,s){r[5]?n?n.p(r,s):(n=Pt(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null),16&s[0]&&t!==(t=r[4]?void 0:"lui-isolated")&&W(e,"class",t)},i:ae,o:ae,d(r){r&&oe(e),n&&n.d(),i[29](null)}}}function ki(i,e,t){let{activeFeatureToggleList:n}=e,{allowRules:r}=e,{anchor:s}=e,{authData:a}=e,{clientPermissions:o}=e,{context:l}=e,{deferInit:c}=e,{dirtyStatus:f}=e,{documentTitle:h}=e,{hasBack:u}=e,{label:g}=e,{locale:p}=e,{noShadow:S}=e,{nodeParams:T}=e,{pathParams:R}=e,{sandboxRules:$}=e,{searchParams:N}=e,{skipCookieCheck:z}=e,{skipInitCheck:G}=e,{theme:K}=e,{userSettings:J}=e,{viewurl:B}=e,{webcomponent:x}=e;const P={};let I,_,te=!1;const Q=new Jt,U=d=>{if(!te){d.sendCustomMessage=(y,O)=>{_e.sendCustomMessage(y,d.getNoShadow()?d:I,!!x,P,O)},d.updateContext=(y,O)=>{if(t(8,l=y),x)(d.getNoShadow()?d:I)._luigi_mfe_webcomponent.context=y;else{const ge={...O||{},activeFeatureToggleList:d.activeFeatureToggleList||[],currentLocale:d.locale,currentTheme:d.theme,userSettings:d.userSettings||null,cssVariables:d.cssVariables||{},anchor:d.anchor||"",drawer:d.drawer||!1,modal:d.modal||!1,viewStackSize:d.viewStackSize||0,isNavigateBack:d.isNavigateBack||!1};_e.updateContext(y,ge,P,T,R,N)}},d.closeAlert=(y,O)=>{d.notifyAlertClosed(y,O)},d.notifyAlertClosed=(y,O)=>{d.isConnected&&(x?Q.resolveAlert(y,O):_e.notifyAlertClosed(y,O,P))},d.notifyConfirmationModalClosed=y=>{d.isConnected&&(x?Q.notifyConfirmationModalClosed(!!y):_e.notifyConfirmationModalClosed(!!y,P))},se.registerContainer(d),Q.thisComponent=d;const le=De.resolveContext(l);if(d.updateViewUrl=(y,O)=>{y!=null&&y.length&&_e.updateViewUrl(y,De.resolveContext(l),O,P)},x&&x!="false"){d.getNoShadow()?d.innerHTML="":(t(7,I.innerHTML="",I),d.attachShadow({mode:"open"}).append(I));const y=De.checkWebcomponentValue(x);Q.renderWebComponent(B,d.getNoShadow()?d:I,le,typeof y=="object"?{webcomponent:y}:{})}else d.getNoShadow()||(d.innerHTML="",d.attachShadow({mode:"open"}).append(I));G?(d.initialized=!0,setTimeout((()=>{Q.dispatchLuigiEvent(m.INITIALIZED,{})}))):x&&(d.getNoShadow()?d:I).addEventListener("wc_ready",(()=>{var y;(y=(d.getNoShadow()?d:I)._luigi_mfe_webcomponent)!=null&&y.deferLuigiClientWCInit||(d.initialized=!0,Q.dispatchLuigiEvent(m.INITIALIZED,{}))})),t(5,te=!0),d.containerInitialized=!0}};var re;return Gt((async()=>{t(27,_=I.parentNode),t(27,_.iframeHandle=P,_),t(27,_.init=()=>{U(_)},_),!c&&B&&U(_)})),re=async()=>{},Wt().$$.on_destroy.push(re),i.$$set=d=>{"activeFeatureToggleList"in d&&t(9,n=d.activeFeatureToggleList),"allowRules"in d&&t(0,r=d.allowRules),"anchor"in d&&t(10,s=d.anchor),"authData"in d&&t(11,a=d.authData),"clientPermissions"in d&&t(12,o=d.clientPermissions),"context"in d&&t(8,l=d.context),"deferInit"in d&&t(13,c=d.deferInit),"dirtyStatus"in d&&t(14,f=d.dirtyStatus),"documentTitle"in d&&t(15,h=d.documentTitle),"hasBack"in d&&t(16,u=d.hasBack),"label"in d&&t(1,g=d.label),"locale"in d&&t(17,p=d.locale),"noShadow"in d&&t(18,S=d.noShadow),"nodeParams"in d&&t(19,T=d.nodeParams),"pathParams"in d&&t(20,R=d.pathParams),"sandboxRules"in d&&t(2,$=d.sandboxRules),"searchParams"in d&&t(21,N=d.searchParams),"skipCookieCheck"in d&&t(22,z=d.skipCookieCheck),"skipInitCheck"in d&&t(23,G=d.skipInitCheck),"theme"in d&&t(24,K=d.theme),"userSettings"in d&&t(25,J=d.userSettings),"viewurl"in d&&t(3,B=d.viewurl),"webcomponent"in d&&t(4,x=d.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!te&&B&&!c&&_&&U(_)},[r,g,$,B,x,te,P,I,l,n,s,a,o,c,f,h,u,p,S,T,R,N,z,G,K,J,()=>n&&r&&s&&a&&o&&f&&h&&u&&p&&S&&T&&R&&$&&N&&z&&G&&K&&J,_,function(d){Me[d?"unshift":"push"]((()=>{P.iframe=d,t(6,P)}))},function(d){Me[d?"unshift":"push"]((()=>{I=d,t(7,I)}))}]}class Xt extends zt{constructor(e){super(),Bt(this,e,ki,xi,Qt,{activeFeatureToggleList:9,allowRules:0,anchor:10,authData:11,clientPermissions:12,context:8,deferInit:13,dirtyStatus:14,documentTitle:15,hasBack:16,label:1,locale:17,noShadow:18,nodeParams:19,pathParams:20,sandboxRules:2,searchParams:21,skipCookieCheck:22,skipInitCheck:23,theme:24,userSettings:25,viewurl:3,webcomponent:4,unwarn:26},null,[-1,-1])}get activeFeatureToggleList(){return this.$$.ctx[9]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),E()}get allowRules(){return this.$$.ctx[0]}set allowRules(e){this.$$set({allowRules:e}),E()}get anchor(){return this.$$.ctx[10]}set anchor(e){this.$$set({anchor:e}),E()}get authData(){return this.$$.ctx[11]}set authData(e){this.$$set({authData:e}),E()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(e){this.$$set({clientPermissions:e}),E()}get context(){return this.$$.ctx[8]}set context(e){this.$$set({context:e}),E()}get deferInit(){return this.$$.ctx[13]}set deferInit(e){this.$$set({deferInit:e}),E()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),E()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(e){this.$$set({documentTitle:e}),E()}get hasBack(){return this.$$.ctx[16]}set hasBack(e){this.$$set({hasBack:e}),E()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),E()}get locale(){return this.$$.ctx[17]}set locale(e){this.$$set({locale:e}),E()}get noShadow(){return this.$$.ctx[18]}set noShadow(e){this.$$set({noShadow:e}),E()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(e){this.$$set({nodeParams:e}),E()}get pathParams(){return this.$$.ctx[20]}set pathParams(e){this.$$set({pathParams:e}),E()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(e){this.$$set({sandboxRules:e}),E()}get searchParams(){return this.$$.ctx[21]}set searchParams(e){this.$$set({searchParams:e}),E()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(e){this.$$set({skipCookieCheck:e}),E()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),E()}get theme(){return this.$$.ctx[24]}set theme(e){this.$$set({theme:e}),E()}get userSettings(){return this.$$.ctx[25]}set userSettings(e){this.$$set({userSettings:e}),E()}get viewurl(){return this.$$.ctx[3]}set viewurl(e){this.$$set({viewurl:e}),E()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(e){this.$$set({webcomponent:e}),E()}get unwarn(){return this.$$.ctx[26]}}function Mi(i){Ai(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function Vi(i){let e;return{c(){e=be("main"),W(e,"class","svelte-1buc46y")},m(t,n){ue(t,e,n),i[21](e)},p:ae,i:ae,o:ae,d(t){t&&oe(e),i[21](null)}}}function Fi(i,e,t){let n,r,{activeFeatureToggleList:s}=e,{anchor:a}=e,{clientPermissions:o}=e,{compoundConfig:l}=e,{context:c}=e,{deferInit:f}=e,{dirtyStatus:h}=e,{documentTitle:u}=e,{hasBack:g}=e,{locale:p}=e,{noShadow:S}=e,{nodeParams:T}=e,{pathParams:R}=e,{searchParams:$}=e,{skipInitCheck:N}=e,{theme:z}=e,{userSettings:G}=e,{viewurl:K}=e,{webcomponent:J}=e,B=!1;const x=new ct,P=new Jt,I=_=>{if(!l||B)return;_.updateContext=(U,re)=>{const d=_.getNoShadow()?_:n;d._luigi_mfe_webcomponent.context=U,t(1,c=U);const le=d._luigi_mfe_webcomponent;if(le){const y=le.querySelectorAll("[lui_web_component]");y==null||y.forEach((O=>{const ge=O.context||{};O.context=Object.assign(ge,U)}))}};const te=De.resolveContext(c);t(2,f=!1),_.notifyAlertClosed=(U,re)=>{_.isConnected&&P.resolveAlert(U,re)},_.notifyConfirmationModalClosed=U=>{_.isConnected&&P.notifyConfirmationModalClosed(!!U)};const Q={compound:l,viewUrl:K,webcomponent:De.checkWebcomponentValue(J)||!0};_.getNoShadow()?_.innerHTML="":(t(0,n.innerHTML="",n),_.attachShadow({mode:"open"}).append(n)),P.renderWebComponentCompound(Q,_.getNoShadow()?_:n,te).then((U=>{r=U,N||!Q.viewUrl?(_.initialized=!0,setTimeout((()=>{P.dispatchLuigiEvent(m.INITIALIZED,{})}))):r.LuigiClient&&!r.deferLuigiClientWCInit&&(_.initialized=!0,P.dispatchLuigiEvent(m.INITIALIZED,{}))})),B=!0,_.containerInitialized=!0};return Gt((async()=>{const _=n.getRootNode()===document?n.parentNode:n.getRootNode().host;_.init=()=>{I(_)},f||I(_),x.registerContainer(_),P.thisComponent=_})),i.$$set=_=>{"activeFeatureToggleList"in _&&t(3,s=_.activeFeatureToggleList),"anchor"in _&&t(4,a=_.anchor),"clientPermissions"in _&&t(5,o=_.clientPermissions),"compoundConfig"in _&&t(6,l=_.compoundConfig),"context"in _&&t(1,c=_.context),"deferInit"in _&&t(2,f=_.deferInit),"dirtyStatus"in _&&t(7,h=_.dirtyStatus),"documentTitle"in _&&t(8,u=_.documentTitle),"hasBack"in _&&t(9,g=_.hasBack),"locale"in _&&t(10,p=_.locale),"noShadow"in _&&t(11,S=_.noShadow),"nodeParams"in _&&t(12,T=_.nodeParams),"pathParams"in _&&t(13,R=_.pathParams),"searchParams"in _&&t(14,$=_.searchParams),"skipInitCheck"in _&&t(15,N=_.skipInitCheck),"theme"in _&&t(16,z=_.theme),"userSettings"in _&&t(17,G=_.userSettings),"viewurl"in _&&t(18,K=_.viewurl),"webcomponent"in _&&t(19,J=_.webcomponent)},[n,c,f,s,a,o,l,h,u,g,p,S,T,R,$,N,z,G,K,J,()=>s&&a&&o&&h&&u&&g&&p&&S&&T&&R&&$&&N&&z&&G,function(_){Me[_?"unshift":"push"]((()=>{n=_,t(0,n)}))}]}qt(Xt,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},allowRules:{type:"Array",reflect:!1,attribute:"allow-rules"},anchor:{type:"String",reflect:!1,attribute:"anchor"},authData:{type:"Object",reflect:!1,attribute:"auth-data"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},label:{type:"String",reflect:!1,attribute:"label"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},sandboxRules:{type:"Array",reflect:!1,attribute:"sandbox-rules"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipCookieCheck:{type:"String",reflect:!1,attribute:"skip-cookie-check"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"sendCustomMessage",e("sendCustomMessage"));A(this,"updateContext",e("updateContext"));A(this,"updateViewUrl",e("updateViewUrl"));A(this,"closeAlert",e("closeAlert"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.error("Error in super.attributeChangedCallback",a)}this.containerInitialized&&(n==="context"&&this.updateContext(JSON.parse(s)),n==="auth-data"&&_e.updateAuthData(this.iframeHandle,JSON.parse(s)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class $t extends zt{constructor(e){super(),Bt(this,e,Fi,Vi,Qt,{activeFeatureToggleList:3,anchor:4,clientPermissions:5,compoundConfig:6,context:1,deferInit:2,dirtyStatus:7,documentTitle:8,hasBack:9,locale:10,noShadow:11,nodeParams:12,pathParams:13,searchParams:14,skipInitCheck:15,theme:16,userSettings:17,viewurl:18,webcomponent:19,unwarn:20},Mi)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(e){this.$$set({activeFeatureToggleList:e}),E()}get anchor(){return this.$$.ctx[4]}set anchor(e){this.$$set({anchor:e}),E()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(e){this.$$set({clientPermissions:e}),E()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(e){this.$$set({compoundConfig:e}),E()}get context(){return this.$$.ctx[1]}set context(e){this.$$set({context:e}),E()}get deferInit(){return this.$$.ctx[2]}set deferInit(e){this.$$set({deferInit:e}),E()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(e){this.$$set({dirtyStatus:e}),E()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(e){this.$$set({documentTitle:e}),E()}get hasBack(){return this.$$.ctx[9]}set hasBack(e){this.$$set({hasBack:e}),E()}get locale(){return this.$$.ctx[10]}set locale(e){this.$$set({locale:e}),E()}get noShadow(){return this.$$.ctx[11]}set noShadow(e){this.$$set({noShadow:e}),E()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(e){this.$$set({nodeParams:e}),E()}get pathParams(){return this.$$.ctx[13]}set pathParams(e){this.$$set({pathParams:e}),E()}get searchParams(){return this.$$.ctx[14]}set searchParams(e){this.$$set({searchParams:e}),E()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(e){this.$$set({skipInitCheck:e}),E()}get theme(){return this.$$.ctx[16]}set theme(e){this.$$set({theme:e}),E()}get userSettings(){return this.$$.ctx[17]}set userSettings(e){this.$$set({userSettings:e}),E()}get viewurl(){return this.$$.ctx[18]}set viewurl(e){this.$$set({viewurl:e}),E()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(e){this.$$set({webcomponent:e}),E()}get unwarn(){return this.$$.ctx[20]}}qt($t,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},anchor:{type:"String",reflect:!1,attribute:"anchor"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow",reflect:!1},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let e=t=>()=>console.warn(t+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{constructor(){super(...arguments);A(this,"updateContext",e("updateContext"));A(this,"notifyAlertClosed",e("notifyAlertClosed"));A(this,"notifyConfirmationModalClosed",e("notifyConfirmationModalClosed"))}attributeChangedCallback(n,r,s){try{super.attributeChangedCallback(n,r,s)}catch(a){console.warn("Error in attributeChangedCallback",a)}this.containerInitialized&&n==="context"&&this.updateContext(JSON.parse(s))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",Xt.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",$t.element);class Qi{constructor(){this.services=new Map}register(e,t,n=!0){this.services.set(e,{factory:t,singleton:n})}get(e){const t=this.services.get(e);if(!t)throw new Error(`Service '${e}' is not registered.`);return t.singleton?(t.instance||(t.instance=t.factory()),t.instance):t.factory()}}const b=new Qi;class Ae{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(e){this.decorators=this.decorators.filter(t=>t.uid!==e.uid).concat(e)}applyDecorators(e,t){if(!e)return e;const n=new URL(v.prependOrigin(e)),r=this.decorators.filter(s=>s.type==="queryString");for(let s=0;s<r.length;s++){const a=r[s];n.searchParams.has(a.key)&&n.searchParams.delete(a.key);const o=a.valueFn();n.searchParams.append(a.key,o)}return t&&(n.search=decodeURIComponent(n.search)),n.href}}const rt=async(i,e)=>{const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null;if(i.webcomponent&&!C.checkWCUrl(i.viewUrl,e))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const s=document.createElement("luigi-compound-container");return s.setAttribute("lui_container","true"),s.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.compoundConfig=i.compound,s.context=i.context,s.clientPermissions=i.clientPermissions,s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,e.getEngine()._comm.addListeners(s,e),s}else{const s=document.createElement("luigi-container");return s.setAttribute("lui_container","true"),s.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),s.webcomponent=i.webcomponent,s.context=i.context,s.clientPermissions=i.clientPermissions,s.cssVariables=await e.theming().getCSSVariables(),s.nodeParams=i.nodeParams,s.pathParams=i.pathParams,s.userSettingsGroup=i.userSettingsGroup,s.userSettings=r,s.searchParams=i.searchParams,s.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),s.locale=e.i18n().getCurrentLocale(),s.theme=e.theming().getCurrentTheme(),s.viewGroup=i.viewGroup,Yt(s,e),Zt(s,e),e.getEngine()._comm.addListeners(s,e),s}},Yt=(i,e)=>{const t=e.getConfigValue("settings.customSandboxRules");if(!(t!=null&&t.length))return;const n=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],r=t?[...new Set([...n,...t])]:n;i.sandboxRules=r},Zt=(i,e)=>{const t=e.getConfigValue("settings.allowRules");t!=null&&t.length&&(t.forEach((n,r)=>{t[r]=n+(n.indexOf(";")!=-1?"":";")}),i.allowRules=t)},D={navService:void 0,routingService:void 0,luigi:void 0,init:i=>{var e;console.log("Init UI..."),D.navService=b.get(de),D.routingService=b.get(he),D.luigi=i,(e=i.getEngine()._connector)==null||e.renderMainLayout()},update:i=>{var n,r,s;const e=D.routingService.getCurrentRoute();if(!e)return;const t=!i||i.length===0;(t||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&((n=D.luigi.getEngine()._connector)==null||n.renderTopNav(D.navService.getTopNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer"))&&((r=D.luigi.getEngine()._connector)==null||r.renderLeftNav(D.navService.getLeftNavData(e.path)),(s=D.luigi.getEngine()._connector)==null||s.renderTabNav(D.navService.getTabNavData(e.path))),(t||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&D.updateMainContent(e.node,D.luigi)},updateMainContent:async(i,e)=>{var a,o,l;const t=await e.readUserSettings(),r=i.userSettingsGroup&&typeof t=="object"&&t!==null?t[i.userSettingsGroup]:null,s=(a=e.getEngine()._connector)==null?void 0:a.getContainerWrapper();if((o=e.getEngine()._connector)==null||o.hideLoadingIndicator(s),i&&s){let c;if([...s.childNodes].forEach(f=>{var h;((h=f.tagName)==null?void 0:h.indexOf("LUIGI-"))===0&&(f.viewGroup?i.viewGroup===f.viewGroup?c=f:f.style.display="none":f.remove())}),c)c.style.display="block",c.viewurl=b.get(Ae).applyDecorators(i.viewUrl,i.decodeViewUrl),c.nodeParams=i.nodeParams,c.pathParams=i.pathParams,c.clientPermissions=i.clientPermissions,c.searchParams=C.prepareSearchParamsForClient(i,e),c.locale=e.i18n().getCurrentLocale(),c.theme=e.theming().getCurrentTheme(),c.activeFeatureToggleList=e.featureToggles().getActiveFeatureToggleList(),c.userSettingsGroup=i.userSettingsGroup,c.userSettings=r,Yt(c,e),Zt(c,e),c.updateContext(i.context||{});else{const f=await rt(i,e);s==null||s.appendChild(f);const h=e.getEngine()._connector;((l=i.loadingIndicator)==null?void 0:l.enabled)!==!1&&(h==null||h.showLoadingIndicator(s))}}},openModal:async(i,e,t,n)=>{var p,S;const r=await rt(e,i),s=b.get(he),a=b.get(ye);let o=!1,l,c;const h=new Promise(T=>{l=()=>{o||(o=!0,T(),a.removeLastModalFromStack())},c=()=>{l&&l(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},r.addEventListener(m.CLOSE_CURRENT_MODAL_REQUEST,c)}),u={closePromise:h,resolveFn:l,onCloseRequestHandler:c,onInternalClose:()=>{try{u.resolveFn&&u.resolveFn()}catch(T){console.warn("onInternalClose failed",T)}},modalsettings:t};a.registerModal(u),(p=i.getEngine()._connector)==null||p.renderModal(r,t,()=>{n==null||n(),a.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&a.getModalStackLength()===0&&s.removeModalDataFromUrl(!0)},()=>h);const g=i.getEngine()._connector;((S=e.loadingIndicator)==null?void 0:S.enabled)!==!1&&(g==null||g.showLoadingIndicator(r.parentElement))},updateModalSettings:(i,e,t)=>{var a;const n=b.get(ye);if(n.getModalStackLength()===0)return;n.updateFirstModalSettings(i);const r=b.get(he),s=C.getModalPathFromPath(t);s&&r.updateModalDataInUrl(s,n.getModalSettings(),e),(a=t.getEngine()._connector)==null||a.updateModalSettings(n.getModalSettings())},openDrawer:async(i,e,t,n)=>{var a,o;const r=await rt(e,i);(a=i.getEngine()._connector)==null||a.renderDrawer(r,t,n);const s=i.getEngine()._connector;((o=e.loadingIndicator)==null?void 0:o.enabled)!==!1&&(s==null||s.showLoadingIndicator(r.parentElement))}};class he{constructor(e){this.luigi=e}getNavigationService(){return this.navigationService||(this.navigationService=b.get(de)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const e=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||e).filter(n=>location.href.match(n)).length!==0}enableRouting(){var t;const e=this.luigi.getConfig();console.log("Init Routing...",e.routing),(t=e.routing)!=null&&t.useHashRouting?(window.addEventListener("hashchange",n=>{this.handleRouteChange(C.getCurrentPath(!0))}),this.handleRouteChange(C.getCurrentPath(!0))):(window.addEventListener("popstate",n=>{this.handleRouteChange(C.getCurrentPath())}),this.handleRouteChange(C.getCurrentPath()))}async handleRouteChange(e){var h,u,g;const t=e.path,n=e.query,r=t+(n?"?"+n:""),s=new URLSearchParams(n),a={};if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(r),await this.shouldShowModalPathInUrl(e),s.forEach((p,S)=>{a[S]=p});const o=this.getNavigationService().getPathData(t),l=C.filterNodeParams(a,this.luigi),c=this.getNavigationService().shouldRedirect(t,o);if(c){this.luigi.navigation().navigate(c);return}this.currentRoute={raw:window.location.href,path:t,nodeParams:l},(h=this.luigi.getEngine()._connector)==null||h.renderTopNav(this.getNavigationService().getTopNavData(t,o)),(u=this.luigi.getEngine()._connector)==null||u.renderLeftNav(this.getNavigationService().getLeftNavData(t,o)),(g=this.luigi.getEngine()._connector)==null||g.renderTabNav(this.getNavigationService().getTabNavData(t,o));const f=(o==null?void 0:o.selectedNode)??this.getNavigationService().getCurrentNode(t);f&&(this.currentRoute.node=f,f.nodeParams=l||{},f.pathParams=(o==null?void 0:o.pathParams)||{},f.searchParams=C.prepareSearchParamsForClient(f,this.luigi),this.getNavigationService().onNodeChange(this.previousNode,f),this.previousNode=f,D.updateMainContent(f,this.luigi))}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(e){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(e)}async handleBookmarkableModalPath(e){var o;const t=b.get(de),n=b.get(ye),r=new URLSearchParams((e==null?void 0:e.query)||""),s=C.getModalViewParamName(this.luigi),a=r.get(s);if(a){const l=r.get(`${s}Params`);try{const c=JSON.parse(l||"{}"),{nodeObject:f}=await t.extractDataFromPath(a);document.querySelector(".lui-modal luigi-container")?(o=this.luigi.getEngine()._connector)==null||o.updateModalSettings(c):this.luigi.navigation().openAsModal(a,c||f.openNodeInModal)}catch(c){console.error("Error parsing modal settings from URL parameters",c)}}else{n.closeModals();return}}appendModalDataToUrl(e,t){const n=C.getHashQueryParamSeparator(),r=C.getQueryParams(this.luigi),s=C.getModalViewParamName(this.luigi),a=r[s],o=new URL(location.href),l=this.luigi.getConfigValue("routing.useHashRouting");let c=history.state,f,h;if(l){let[u,g]=o.hash.split("?");f=u,h=C.getURLWithoutModalData(g,s),h&&(f+="?"+h)}else f=o.pathname,h=C.getURLWithoutModalData(o.search,s),h&&(f+="?"+C.getURLWithoutModalData(o.search,s));if(c=C.handleHistoryState(c,f),a!==e){if(r[s]=e,t&&Object.keys(t).length&&(r[`${s}Params`]=JSON.stringify(t)),l){const u=location.hash.indexOf(n);u!==-1&&(o.hash=o.hash.slice(0,u)),o.hash=`${o.hash}${n}${C.encodeParams(r)}`}else o.search=`?${C.encodeParams(r)}`;history.pushState(c,"",o.href)}else{const u=new URL(o);if(l){let g=u.hash.split("?")[0];u.hash=g,h&&(u.hash+="?"+h)}else u.search=h;history.replaceState({},"",u.href),history.pushState(c,"",o.href)}}removeModalDataFromUrl(e){const t=C.getQueryParams(this.luigi),n=C.getModalViewParamName(this.luigi);let r=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let a={};t[n]&&(a[n]=t[n]),t[`${n}Params`]&&(a[`${n}Params`]=t[`${n}Params`]);let o=C.encodeParams(a);r.hash.includes(`?${o}`)?r.hash=r.hash.replace(`?${o}`,""):r.hash.includes(`&${o}`)&&(r.hash=r.hash.replace(`&${o}`,""))}else{let a=new URLSearchParams(r.search.slice(1));a.delete(n),a.delete(`${n}Params`);let o="";Array.from(a.keys()).forEach(l=>{o+=(o===""?"?":"&")+l+"="+a.get(l)}),r.search=o}if(history.state&&history.state.modalHistoryLength>=0&&e){history.state.modalHistoryLength;const a=history.state.pathBeforeHistory;let o=!1;if(window.addEventListener("popstate",l=>{o?(history.replaceState({},"",a),history.pushState({},"",a),history.back()):(history.pushState({},"",a),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const l=history.length-1;o=!0,history.go(-l),window.Luigi.preventLoadingModalData=!0}else{const l=history.state.modalHistoryLength;history.go(-l)}}else history.pushState({},"",r.href)}setFeatureToggle(e){const t=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),n=this.luigi.featureToggles();t&&typeof e=="string"&&C.setFeatureToggles(t,e,n)}updateModalDataInUrl(e,t,n){let r=C.getHashQueryParamSeparator();const s=C.getQueryParams(this.luigi),a=C.getModalViewParamName(this.luigi);s[a]=e,t&&Object.keys(t).length&&(s[`${a}Params`]=JSON.stringify(t));const o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const c=location.hash.indexOf(r);c!==-1&&(o.hash=o.hash.slice(0,c)),o.hash=`${o.hash}${r}${C.encodeParams(s)}`}else o.search=`?${C.encodeParams(s)}`;n?history.pushState(window.state,"",o.href):history.replaceState(window.state,"",o.href)}}class Hi{constructor(e){var t;this.hashRouting=!1,this.navigate=(n,r,s,a)=>{const o=n.replace(/\/\/+/g,"/"),l=!1;if(s)this.openAsModal(n,s,a);else if(this.modalService.closeModals(),this.hashRouting)location.hash=o;else{window.history.pushState({path:o},"",o);const c={detail:{preventContextUpdate:l,withoutSync:!1}},f=new CustomEvent("popstate",c);window.dispatchEvent(f)}},this.openAsModal=async(n,r,s)=>{r.keepPrevious||await this.modalService.closeModals();const a=n.replace(/\/\/+/g,"/"),o=this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(a,l),this.luigi.getEngine()._ui.openModal(this.luigi,o,l,s)},this.openAsDrawer=(n,r,s)=>{const a=n.replace(/\/\/+/g,"/"),o=this.navService.getCurrentNode(a),l=r||{};l.title||(l.title=o.label),this.luigi.getEngine()._ui.openDrawer(this.luigi,o,l,s)},this.luigi=e,this.hashRouting=(t=e.getConfig().routing)==null?void 0:t.useHashRouting,this.navService=b.get(de),this.routingService=b.get(he),this.modalService=b.get(ye)}}class Wi{constructor(e){this.luigi=e}addSearchParams(e,t=!1){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?n.hash=C.addParamsOnHashRouting(e,n.hash):C.modifySearchParams(e,n.searchParams),this.handleBrowserHistory(t,n),this.luigi.configChanged()}getSearchParams(){const e={},t=["__proto__","constructor","prototype"],n=new URL(location.href);let r;if(this.luigi.getConfigValue("routing.useHashRouting")){const s=n.hash.split("?")[1];r=s?new URLSearchParams(s).entries():[]}else r=n.searchParams.entries();for(const[s,a]of r){if(t.some(o=>s===o)){console.warn(`Blocked because of potentially dangerous query param: ${s}`);continue}e[s]=a}return e}handleBrowserHistory(e,t){const n=this.sanitizeUrl(t.href);if(!n){console.warn("invalid url: "+n);return}e?window.history.pushState({},"",n):window.history.replaceState({},"",n)}sanitizeUrl(e){return new URL(location.href).origin===new URL(e).origin?e:void 0}addNodeParams(e,t){if(!v.isObject(e)){console.log("Params argument must be an object");return}const n=C.getContentViewParamPrefix(this.luigi),r=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?r.hash=C.addParamsOnHashRouting(e,r.hash,n):C.modifySearchParams(e,r.searchParams,n),this.handleBrowserHistory(t,r),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}var V,we;class Gi{constructor(e){et(this,V);et(this,we,"");tt(this,V,e)}async getAvailableThemes(){return await H(this,V).getConfigValueAsync("settings.theming.themes")}setCurrentTheme(e){tt(this,we,e),H(this,V).__cssVars=void 0}async getThemeObject(e){const t=await this.getAvailableThemes();return t==null?void 0:t.find(n=>n.id===e)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(H(this,we))return H(this,we);const e=H(this,V).getConfigValue("settings.theming");return e.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",e),e.defaultTheme}isThemingAvailable(){return!!H(this,V).getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const e=H(this,V).getConfigValue("settings.theming.variables.file");if(e)try{const t=await fetch(e);window.Luigi.__cssVars=(await t.json()).root,Object.keys(window.Luigi.__cssVars).forEach(n=>{const r=getComputedStyle(document.documentElement).getPropertyValue("--"+n);r&&(window.Luigi.__cssVars[n]=r)})}catch(t){v.isFunction(H(this,V).getConfigValue("settings.theming.variables.errorHandling"))?H(this,V).getConfigValue("settings.theming.variables.errorHandling")(t):console.error("CSS variables file error: ",t)}else H(this,V).getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(t=>{window.Luigi.__cssVars[t]=getComputedStyle(document.documentElement).getPropertyValue("--"+t)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const e=b.get(Ae);(()=>{const n=H(this,V).getConfigValue("settings.theming");n&&n.nodeViewURLDecorator&&n.nodeViewURLDecorator.queryStringParameter&&e.add({type:"queryString",uid:"theming",key:n.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const r=this.getCurrentTheme(),s=n.nodeViewURLDecorator.queryStringParameter.value;return s?s(r):r}}),n&&n.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}V=new WeakMap,we=new WeakMap;class ze{constructor(){this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(e,t){var n,r;if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const s=new Set;s.add(t),this.unsavedChanges={dirtySet:s}}this.unsavedChanges.persistUrl=window.location.href,e?(n=this.unsavedChanges.dirtySet)==null||n.add(t):(r=this.unsavedChanges.dirtySet)==null||r.delete(t)}clearDirtyState(e){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(e?this.unsavedChanges.dirtySet.delete(e):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}}let Lt;const L={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),L.luigi=i,L.documentTitle=je(void 0),Lt=b.get(ze)},processAlert:(i,e,t)=>{var r;if(!L.luigi)throw new Error("Luigi is not initialized.");const n={openFromClient:e,close:()=>{i.id&&t.notifyAlertClosed(i.id)},link:s=>{var a;if(i.links){const o=i.links[s];if(o&&(o.url&&((a=L.luigi)==null||a.navigation().navigate(o.url)),o.dismissKey&&i.id))return t.notifyAlertClosed(i.id,o.dismissKey),!0}return!1}};(r=L.luigi.getEngine()._connector)==null||r.renderAlert(i,n)},handleConfirmationModalRequest:(i,e)=>{var t;if(!L.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:L.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:L.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:L.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:L.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),(t=L.luigi.getEngine()._connector)==null||t.renderConfirmationModal(i,{confirm(){e.notifyConfirmationModalClosed(!0)},dismiss(){e.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,e)=>{if(!L.luigi)throw new Error("Luigi is not initialized.");Lt.updateDirtyStatus(i,e)}};class Bi{processUserSettingGroups(e,t){var o;const n=[],r=e==null?void 0:e.userSettingGroups,s=(o=t==null?void 0:t.userSettings)==null?void 0:o.userSettingGroups,a=r||s;if(v.isObject(a)){for(const l in a){const c={};c[l]=a[l],n.push(c)}return n}return n}getUserSettingsIframesInDom(){const e=document.querySelector(".iframeUserSettingsCtn");return e?[...e.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(e=>{e.style.display="none"})}findActiveCustomUserSettingsIframe(e){const t=document.querySelectorAll("[userSettingsGroup]");for(let n=0;n<t.length;n++)if(t[n].contentWindow===e)return t[n];return null}}const ji=new Bi;class qi{constructor(e){this.dirtyStatusService=b.get(ze),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=t=>new Promise(n=>{var s;t.id||(t.id=v.getRandomId().toString());const r={openFromClient:!1,close:()=>{n(!0)},link:a=>{var o;if(t.links){const l=t.links[a];if(l&&(l.url&&((o=this.luigi)==null||o.navigation().navigate(l.url)),l.dismissKey))return n(l.dismissKey),!0}return!1}};(s=this.luigi.getEngine()._connector)==null||s.renderAlert(t,r)}),this.showConfirmationModal=t=>(t&&(t={...t,header:this.luigi.i18n().getTranslation(t.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(t.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(t.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(t.buttonConfirm||"luigi.button.confirm")}),new Promise((n,r)=>{var s;(s=this.luigi.getEngine()._connector)==null||s.renderConfirmationModal(t,{confirm(){n(!0)},dismiss(){r()}})})),this.processUserSettingGroups=()=>{const t=this.luigi.getConfigValue("userSettings"),n=this.luigi.getConfigValue("settings");return ji.processUserSettingGroups(t,n)},this.openUserSettings=t=>{var n;(n=this.luigi.getEngine()._connector)==null||n.openUserSettings(t)},this.closeUserSettings=()=>{var t;(t=this.luigi.getEngine()._connector)==null||t.closeUserSettings()},this.setDocumentTitle=t=>{var n,r,s;(r=(n=this.luigi.getEngine()._ux)==null?void 0:n.documentTitle)==null||r.set(t),(s=this.luigi.getEngine()._connector)==null||s.setDocumentTitle(t)},this.getDocumentTitle=()=>{var t;return Mt((t=this.luigi.getEngine()._ux)==null?void 0:t.documentTitle)||window.document.title||""},this.hideAppLoadingIndicator=()=>{const t=document.querySelector(this.appLoadingIndicatorSelector);t&&(t.classList.add("hidden"),setTimeout(()=>{var n;(n=t.parentNode)==null||n.removeChild(t)},500))},this.showLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.showLoadingIndicator(t)},this.hideLoadingIndicator=t=>{var n;return(n=this.luigi.getEngine()._connector)==null?void 0:n.hideLoadingIndicator(t)},this.addBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.addBackdrop()},this.removeBackdrop=()=>{var t;return(t=this.luigi.getEngine()._connector)==null?void 0:t.removeBackdrop()},this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=e}}class zi{constructor(e){this.engine=e,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=t=>{this.config=t,this.setConfigCallback(this.getConfigReadyCallback()),this.engine.init(),this.initialized=!0,this.luigiAfterInit()},this.getConfig=()=>this.config,this.configChanged=(...t)=>{this.getEngine()._ui.update(t)},this.i18n=()=>(this._i18n||(this._i18n=new Ei(this)),this._i18n),this.navigation=()=>new Hi(this),this.ux=()=>new qi(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new vi),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new Wi(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new Gi(this)),this._theming),this.auth=()=>Se,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(e){return v.getConfigValueFromObject(this.getConfig(),e)}getConfigValueAsync(e,...t){return Ue.getConfigValueFromObjectAsync(this.getConfig(),e,t)}async readUserSettings(){const e=await this.getConfigValueAsync("userSettings"),t=e||await this.getConfigValueAsync("settings.userSettings");if(t&&v.isFunction(t.readUserSettings))return t.readUserSettings();const n=localStorage.getItem(this.USER_SETTINGS_KEY);return n&&JSON.parse(n)}async storeUserSettings(e,t){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&v.isFunction(r.storeUserSettings))return r.storeUserSettings(e,t);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(e)),this.configChanged()}luigiAfterInit(){v.getConfigBooleanValue(this.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{this.ux().hideAppLoadingIndicator()},0)}createConfigStore(){const e=je({}),t={};let n=[];return{subscribe:r=>{n.push(e.subscribe(r))},reset:r=>{e.update(r)},subscribeToScope:(r,s)=>{let a=t[s];a||(a=new Set,t[s]=a),a.add(r)},fire:(r,s)=>{const a=t[r];a&&[...a].forEach(o=>{o(s)})},clear:()=>{n.forEach(r=>{r()}),n=[]}}}getConfigReadyCallback(){return new Promise(e=>{this.i18n()._init(),e()})}setConfigCallback(e){this.configReadyCallback=e}}const Ki=!1;var Ji=Array.isArray,Xi=Array.from,Yi=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor;const ut=2,ei=4,ti=8,Zi=16,Fe=32,Xe=64,Ye=128,Ke=256,ne=512,ii=1024,ht=2048,ni=4096,Ze=8192,en=16384,tn=1<<18,nn=1<<19;function rn(i){return i===this.v}function sn(){throw new Error("effect_update_depth_exceeded")}function an(i){return{f:0,v:i,reactions:null,equals:rn,version:0}}var Ut,ri;function on(){if(Ut===void 0){Ut=window;var i=Element.prototype,e=Node.prototype;Nt(e,"firstChild").get,ri=Nt(e,"nextSibling").get,i.__click=void 0,i.__className="",i.__attributes=null,i.__styles=null,i.__e=void 0,Text.prototype.__t=void 0}}function ln(i=""){return document.createTextNode(i)}function cn(i){return ri.call(i)}function si(i){var e=i.children;if(e!==null){i.children=null;for(var t=0;t<e.length;t+=1){var n=e[t];(n.f&ut)!==0?ai(n):Qe(n)}}}function un(i){var e,t=ie;Ie(i.parent);try{si(i),e=di(i)}finally{Ie(t)}return e}function hn(i){var e=un(i),t=(Ee||(i.f&Ye)!==0)&&i.deps!==null?ht:ne;$e(i,t),i.equals(e)||(i.v=e,i.version=_n())}function ai(i){si(i),Ve(i,0),$e(i,Ze),i.v=i.children=i.deps=i.ctx=i.reactions=null}function dn(i,e){var t=e.last;t===null?e.last=e.first=i:(t.next=i,i.prev=t,e.last=i)}function dt(i,e,t,n=!0){var r=(i&Xe)!==0,s=ie,a={ctx:ee,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:i|ii,first:null,fn:e,last:null,next:null,parent:r?null:s,prev:null,teardown:null,transitions:null,version:0};if(t){var o=Te;try{Ot(!0),ft(a),a.f|=en}catch(f){throw Qe(a),f}finally{Ot(o)}}else e!==null&&yn(a);var l=t&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&nn)===0;if(!l&&!r&&n&&(s!==null&&dn(a,s),Z!==null&&(Z.f&ut)!==0)){var c=Z;(c.children??(c.children=[])).push(a)}return a}function gn(i){const e=dt(Xe,i,!0);return()=>{Qe(e)}}function fn(i){return dt(ei,i,!1)}function pn(i,e=!0){return dt(ti|Fe,i,!0,e)}function oi(i){var e=i.teardown;if(e!==null){const t=Z;Pe(null);try{e.call(null)}finally{Pe(t)}}}function li(i){var e=i.deriveds;if(e!==null){i.deriveds=null;for(var t=0;t<e.length;t+=1)ai(e[t])}}function ci(i,e=!1){var t=i.first;for(i.first=i.last=null;t!==null;){var n=t.next;Qe(t,e),t=n}}function mn(i){for(var e=i.first;e!==null;){var t=e.next;(e.f&Fe)===0&&Qe(e),e=t}}function Qe(i,e=!0){var t=!1;if((e||(i.f&tn)!==0)&&i.nodes_start!==null){for(var n=i.nodes_start,r=i.nodes_end;n!==null;){var s=n===r?null:cn(n);n.remove(),n=s}t=!0}li(i),ci(i,e&&!t),Ve(i,0),$e(i,Ze);var a=i.transitions;if(a!==null)for(const l of a)l.stop();oi(i);var o=i.parent;o!==null&&o.first!==null&&ui(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.parent=i.fn=i.nodes_start=i.nodes_end=null}function ui(i){var e=i.parent,t=i.prev,n=i.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===i&&(e.first=n),e.last===i&&(e.last=t))}let Je=!1,Te=!1;function Ot(i){Te=i}let ot=[],xe=0;let Z=null;function Pe(i){Z=i}let ie=null;function Ie(i){ie=i}let X=null,j=0,hi=0,Ee=!1,ee=null;function _n(){return++hi}function gt(i){var a,o;var e=i.f;if((e&ii)!==0)return!0;if((e&ht)!==0){var t=i.deps,n=(e&Ye)!==0;if(t!==null){var r;if((e&Ke)!==0){for(r=0;r<t.length;r++)((a=t[r]).reactions??(a.reactions=[])).push(i);i.f^=Ke}for(r=0;r<t.length;r++){var s=t[r];if(gt(s)&&hn(s),n&&ie!==null&&!Ee&&!((o=s==null?void 0:s.reactions)!=null&&o.includes(i))&&(s.reactions??(s.reactions=[])).push(i),s.version>i.version)return!0}}n||$e(i,ne)}return!1}function Sn(i,e,t){throw i}function di(i){var f;var e=X,t=j,n=Z,r=Ee,s=ee,a=i.f;X=null,j=0,Z=(a&(Fe|Xe))===0?i:null,Ee=!Te&&(a&Ye)!==0,ee=i.ctx;try{var o=(0,i.fn)(),l=i.deps;if(X!==null){var c;if(Ve(i,j),l!==null&&j>0)for(l.length=j+X.length,c=0;c<X.length;c++)l[j+c]=X[c];else i.deps=l=X;if(!Ee)for(c=j;c<l.length;c++)((f=l[c]).reactions??(f.reactions=[])).push(i)}else l!==null&&j<l.length&&(Ve(i,j),l.length=j);return o}finally{X=e,j=t,Z=n,Ee=r,ee=s}}function En(i,e){let t=e.reactions;if(t!==null){var n=t.indexOf(i);if(n!==-1){var r=t.length-1;r===0?t=e.reactions=null:(t[n]=t[r],t.pop())}}t===null&&(e.f&ut)!==0&&(X===null||!X.includes(e))&&($e(e,ht),(e.f&(Ye|Ke))===0&&(e.f^=Ke),Ve(e,0))}function Ve(i,e){var t=i.deps;if(t!==null)for(var n=e;n<t.length;n++)En(i,t[n])}function ft(i){var e=i.f;if((e&Ze)===0){$e(i,ne);var t=ie;ie=i;try{li(i),(e&Zi)!==0?mn(i):ci(i),oi(i);var n=di(i);i.teardown=typeof n=="function"?n:null,i.version=hi}catch(r){Sn(r)}finally{ie=t}}}function vn(){xe>1e3&&(xe=0,sn()),xe++}function Cn(i){var e=i.length;if(e!==0){vn();var t=Te;Te=!0;try{for(var n=0;n<e;n++){var r=i[n];(r.f&ne)===0&&(r.f^=ne);var s=[];gi(r,s),Tn(s)}}finally{Te=t}}}function Tn(i){var e=i.length;if(e!==0)for(var t=0;t<e;t++){var n=i[t];(n.f&(Ze|ni))===0&&gt(n)&&(ft(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?ui(n):n.fn=null))}}function wn(){if(Je=!1,xe>1001)return;const i=ot;ot=[],Cn(i),Je||(xe=0)}function yn(i){Je||(Je=!0,queueMicrotask(wn));for(var e=i;e.parent!==null;){e=e.parent;var t=e.f;if((t&(Xe|Fe))!==0){if((t&ne)===0)return;e.f^=ne}}ot.push(e)}function gi(i,e){var t=i.first,n=[];e:for(;t!==null;){var r=t.f,s=(r&Fe)!==0,a=s&&(r&ne)!==0;if(!a&&(r&ni)===0)if((r&ti)!==0){s?t.f^=ne:gt(t)&&ft(t);var o=t.first;if(o!==null){t=o;continue}}else(r&ei)!==0&&n.push(t);var l=t.next;if(l===null){let h=t.parent;for(;h!==null;){if(i===h)break e;var c=h.next;if(c!==null){t=c;continue e}h=h.parent}}t=l}for(var f=0;f<n.length;f++)o=n[f],e.push(o),gi(o,e)}const bn=-3585;function $e(i,e){i.f=i.f&bn|e}function Rn(i,e=!1,t){ee={p:ee,c:null,e:null,m:!1,s:i,x:null,l:null},e||(ee.l={s:null,u:null,r1:[],r2:an(!1)})}function An(i){const e=ee;if(e!==null){const a=e.e;if(a!==null){var t=ie,n=Z;e.e=null;try{for(var r=0;r<a.length;r++){var s=a[r];Ie(s.effect),Pe(s.reaction),fn(s.fn)}}finally{Ie(t),Pe(n)}}ee=e.p,e.m=!0}return{}}const Pn=new Set,Dt=new Set;function We(i){var $;var e=this,t=e.ownerDocument,n=i.type,r=(($=i.composedPath)==null?void 0:$.call(i))||[],s=r[0]||i.target,a=0,o=i.__root;if(o){var l=r.indexOf(o);if(l!==-1&&(e===document||e===window)){i.__root=e;return}var c=r.indexOf(e);if(c===-1)return;l<=c&&(a=l)}if(s=r[a]||i.target,s!==e){Yi(i,"currentTarget",{configurable:!0,get(){return s||t}});var f=Z,h=ie;Pe(null),Ie(null);try{for(var u,g=[];s!==null;){var p=s.assignedSlot||s.parentNode||s.host||null;try{var S=s["__"+n];if(S!==void 0&&!s.disabled)if(Ji(S)){var[T,...R]=S;T.apply(s,[i,...R])}else S.call(s,i)}catch(N){u?g.push(N):u=N}if(i.cancelBubble||p===e||p===null)break;s=p}if(u){for(let N of g)queueMicrotask(()=>{throw N});throw u}}finally{i.__root=e,delete i.currentTarget,Pe(f),Ie(h)}}}const In=["touchstart","touchmove"];function $n(i){return In.includes(i)}function Ln(i,e){return Nn(i,e)}const pe=new Map;function Nn(i,{target:e,anchor:t,props:n={},events:r,context:s,intro:a=!0}){on();var o=new Set,l=h=>{for(var u=0;u<h.length;u++){var g=h[u];if(!o.has(g)){o.add(g);var p=$n(g);e.addEventListener(g,We,{passive:p});var S=pe.get(g);S===void 0?(document.addEventListener(g,We,{passive:p}),pe.set(g,1)):pe.set(g,S+1)}}};l(Xi(Pn)),Dt.add(l);var c=void 0,f=gn(()=>{var h=t??e.appendChild(ln());return pn(()=>{if(s){Rn({});var u=ee;u.c=s}r&&(n.$$events=r),c=i(h,n)||{},s&&An()}),()=>{var p;for(var u of o){e.removeEventListener(u,We);var g=pe.get(u);--g===0?(document.removeEventListener(u,We),pe.delete(u)):pe.set(u,g)}Dt.delete(l),xt.delete(c),h!==t&&((p=h.parentNode)==null||p.removeChild(h))}});return xt.set(c,f),c}let xt=new WeakMap;const Un="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Un);function On(i){}const lt={init:i=>{b.get(he).enableRouting()},handlePageErrorHandler:(i,e,t)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)e.viewUrl=i.viewUrl,t.getEngine()._ui.updateMainContent(e,t);else if(i.errorFn)i.errorFn(e);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const n=i.redirectPath||"/";t.navigation().navigate(n)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const t=window.open(i.url,"_blank","noopener noreferrer");t&&(t.opener=null,t.focus())}},addSearchParamsFromClient(i,e,t){var o;const n=b.get(de),r=C.getCurrentPath(),s=n.getCurrentNode(r.path),a={...i};if((o=s==null?void 0:s.clientPermissions)!=null&&o.urlParameters){const l={};Object.keys(s.clientPermissions.urlParameters).forEach(c=>{c in a&&s.clientPermissions.urlParameters[c].write===!0&&(l[c]=a[c],delete a[c])});for(const c in a)console.warn(`No permission to add the search param "${c}" to the url`);Object.keys(l).length>0&&t.routing().addSearchParams(l,e)}}},Y={luigi:{},init:i=>{console.log("Init communication..."),Y.luigi=i},addListeners:(i,e)=>{i.addEventListener(m.INITIALIZED,t=>{var n;(n=L.luigi)==null||n.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(m.NAVIGATION_REQUEST,t=>{e.navigation().navigate(t.detail.link,t.detail.preserveView,t.detail.modal,t.callbackFn)}),i.addEventListener(m.ALERT_REQUEST,t=>{L.processAlert(t.payload,!0,i)}),i.addEventListener(m.SHOW_CONFIRMATION_MODAL_REQUEST,t=>{L.handleConfirmationModalRequest(t.payload,i)}),i.addEventListener(m.SET_DOCUMENT_TITLE_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.setDocumentTitle(t.detail.title)}),i.addEventListener(m.SHOW_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.showLoadingIndicator(i.parentNode)}),i.addEventListener(m.HIDE_LOADING_INDICATOR_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.hideLoadingIndicator(i.parentNode)}),i.addEventListener(m.ADD_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.addBackdrop()}),i.addEventListener(m.REMOVE_BACKDROP_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.removeBackdrop()}),i.addEventListener(m.SET_DIRTY_STATUS_REQUEST,t=>{var n,r,s;L.handleDirtyStatusRequest((r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.dirty,(s=t.detail)==null?void 0:s.source)}),i.addEventListener(m.ADD_NODE_PARAMS_REQUEST,t=>{e.routing().addNodeParams(t.payload.data,t.payload.keepBrowserHistory)}),i.addEventListener(m.OPEN_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.openUserSettings(t.detail)}),i.addEventListener(m.CLOSE_USER_SETTINGS_REQUEST,t=>{var n;(n=Y.luigi.getEngine()._connector)==null||n.closeUserSettings()}),i.addEventListener(m.ADD_SEARCH_PARAMS_REQUEST,t=>{lt.addSearchParamsFromClient(t.detail.data,t.detail.keepBrowserHistory,e)}),i.addEventListener(m.UPDATE_MODAL_SETTINGS_REQUEST,t=>{D.updateModalSettings(t.payload.updatedModalSettings,t.payload.addHistoryEntry,e)}),i.addEventListener(m.SET_CURRENT_LOCALE_REQUEST,t=>{var n,r,s;e.i18n().setCurrentLocale((s=(r=(n=t.detail)==null?void 0:n.data)==null?void 0:r.data)==null?void 0:s.currentLocale,i)})}};class kt{constructor(){this.dataManagement=new Map}setChildren(e,t){this.dataManagement.set(e,t),this.navPath=""}getChildren(e){return e?this.dataManagement.get(e):{}}hasChildren(e){const t=this.getChildren(e);return!!(t&&Object.prototype.hasOwnProperty.call(t,"children"))}setRootNode(e){this.dataManagement.set("_luigiRootNode",{node:e})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(e){if(this.hasChildren(e)){const t=this.getChildren(e).children;for(let n=0;n<t.length;n++)this.deleteNodesRecursively(t[n])}this.dataManagement.delete(e)}}class Dn{constructor(){this._ui=D,this._comm=Y,this._ux=L,this._routing=lt}bootstrap(e){this._app=Ln(On,{target:document.body}),this._connector=e}init(){const e=window.Luigi;ve.init().then(()=>{b.register(ze,()=>new ze),b.register(de,()=>new de(e)),b.register(kt,()=>new kt),b.register(he,()=>new he(e)),b.register(Ae,()=>new Ae),b.register(ye,()=>new ye(e)),e.theming()._init(),D.init(e),lt.init(e),Y.init(e),L.init(e)})}}window.Luigi=new zi(new Dn);
34
+ //# sourceMappingURL=luigi.js.map