@luigi-project/core 2.21.4-dev.202504300034 → 2.21.4-dev.20250510038

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/luigi.js CHANGED
@@ -1,4 +1,4 @@
1
- var ek=Object.defineProperty;var tk=(i,e,t)=>e in i?ek(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Un=(i,e,t)=>tk(i,typeof e!="symbol"?e+"":e,t);function Ue(){}function nk(i,e){for(const t in e)i[t]=e[t];return i}function ik(i){return!!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function J_(i){return i()}function Jf(){return Object.create(null)}function Qe(i){i.forEach(J_)}function ki(i){return typeof i=="function"}function Dt(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let ts;function tt(i,e){return i===e?!0:(ts||(ts=document.createElement("a")),ts.href=e,i===ts.href)}function lk(i){return Object.keys(i).length===0}function zo(i,...e){if(i==null){for(const n of e)n(void 0);return Ue}const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function hl(i){let e;return zo(i,t=>e=t)(),e}function Si(i,e,t){i.$$.on_destroy.push(zo(e,t))}function hs(i,e,t,n){if(i){const l=j_(i,e,t,n);return i[0](l)}}function j_(i,e,t,n){return i[1]&&n?nk(t.ctx.slice(),i[1](n(e))):t.ctx}function gs(i,e,t,n){return i[2],e.dirty}function _s(i,e,t,n,l,r){if(l){const a=j_(e,t,n,r);i.p(a,l)}}function ps(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function Hn(i){return i??""}function Y_(i){return i&&ki(i.destroy)?i.destroy:Ue}const wl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function w(i,e){i.appendChild(e)}function L(i,e,t){i.insertBefore(e,t||null)}function T(i){i.parentNode&&i.parentNode.removeChild(i)}function ht(i,e){for(let t=0;t<i.length;t+=1)i[t]&&i[t].d(e)}function k(i){return document.createElement(i)}function rk(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Te(i){return document.createTextNode(i)}function W(){return Te(" ")}function ke(){return Te("")}function ee(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function St(i){return function(e){return e.preventDefault(),i.call(this,e)}}function Vt(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function f(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function ak(i){return Array.from(i.childNodes)}function Ae(i,e){e=""+e,i.data!==e&&(i.data=e)}function jf(i,e){i.value=e??""}function Bn(i,e,t,n){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,"")}function Zt(i,e,t){i.classList.toggle(e,!!t)}function sk(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}class Cr{constructor(e=!1){Un(this,"is_svg",!1);Un(this,"e");Un(this,"n");Un(this,"t");Un(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=rk(t.nodeName):this.e=k(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)L(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(T)}}let Xr;function Ji(i){Xr=i}function kl(){if(!Xr)throw new Error("Function called outside component initialization");return Xr}function Zn(i){kl().$$.before_update.push(i)}function rn(i){kl().$$.on_mount.push(i)}function ea(i){kl().$$.after_update.push(i)}function ta(i){kl().$$.on_destroy.push(i)}function Xt(){const i=kl();return(e,t,{cancelable:n=!1}={})=>{const l=i.$$.callbacks[e];if(l){const r=sk(e,t,{cancelable:n});return l.slice().forEach(a=>{a.call(i,r)}),!r.defaultPrevented}return!0}}function Yr(i,e){return kl().$$.context.set(i,e),e}function Pt(i){return kl().$$.context.get(i)}function Ki(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const _r=[],Ye=[];let mr=[];const Fo=[],ok=Promise.resolve();let Uo=!1;function uk(){Uo||(Uo=!0,ok.then(Go))}function Bo(i){mr.push(i)}function Ct(i){Fo.push(i)}const Vo=new Set;let dr=0;function Go(){if(dr!==0)return;const i=Xr;do{try{for(;dr<_r.length;){const e=_r[dr];dr++,Ji(e),fk(e.$$)}}catch(e){throw _r.length=0,dr=0,e}for(Ji(null),_r.length=0,dr=0;Ye.length;)Ye.pop()();for(let e=0;e<mr.length;e+=1){const t=mr[e];Vo.has(t)||(Vo.add(t),t())}mr.length=0}while(_r.length);for(;Fo.length;)Fo.pop()();Uo=!1,Vo.clear(),Ji(i)}function fk(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(Bo)}}function ck(i){const e=[],t=[];mr.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),mr=e}const is=new Set;let ql;function be(){ql={r:0,c:[],p:ql}}function ve(){ql.r||Qe(ql.c),ql=ql.p}function R(i,e){i&&i.i&&(is.delete(i),i.i(e))}function U(i,e,t,n){if(i&&i.o){if(is.has(i))return;is.add(i),ql.c.push(()=>{is.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function rs(i,e){const t=e.token={};function n(l,r,a,o){if(e.token!==t)return;e.resolved=o;let c=e.ctx;a!==void 0&&(c=c.slice(),c[a]=o);const h=l&&(e.current=l)(c);let d=!1;e.block&&(e.blocks?e.blocks.forEach((g,p)=>{p!==r&&g&&(be(),U(g,1,1,()=>{e.blocks[p]===g&&(e.blocks[p]=null)}),ve())}):e.block.d(1),h.c(),R(h,1),h.m(e.mount(),e.anchor),d=!0),e.block=h,e.blocks&&(e.blocks[r]=h),d&&Go()}if(ik(i)){const l=kl();if(i.then(r=>{Ji(l),n(e.then,1,e.value,r),Ji(null)},r=>{if(Ji(l),n(e.catch,2,e.error,r),Ji(null),!e.hasCatch)throw r}),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,i),!0;e.resolved=i}}function Q_(i,e,t){const n=e.slice(),{resolved:l}=i;i.current===i.then&&(n[i.value]=l),i.current===i.catch&&(n[i.error]=l),i.block.p(n,t)}function Ve(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function yt(i,e,t){const n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function Be(i){i&&i.c()}function Me(i,e,t){const{fragment:n,after_update:l}=i.$$;n&&n.m(e,t),Bo(()=>{const r=i.$$.on_mount.map(J_).filter(ki);i.$$.on_destroy?i.$$.on_destroy.push(...r):Qe(r),i.$$.on_mount=[]}),l.forEach(Bo)}function Fe(i,e){const t=i.$$;t.fragment!==null&&(ck(t.after_update),Qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function dk(i,e){i.$$.dirty[0]===-1&&(_r.push(i),uk(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Ot(i,e,t,n,l,r,a=null,o=[-1]){const c=Xr;Ji(i);const h=i.$$={fragment:null,ctx:[],props:r,update:Ue,not_equal:l,bound:Jf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Jf(),dirty:o,skip_bound:!1,root:e.target||c.$$.root};a&&a(h.root);let d=!1;if(h.ctx=t?t(i,e.props||{},(g,p,...b)=>{const m=b.length?b[0]:p;return h.ctx&&l(h.ctx[g],h.ctx[g]=m)&&(!h.skip_bound&&h.bound[g]&&h.bound[g](m),d&&dk(i,g)),p}):[],h.update(),d=!0,Qe(h.before_update),h.fragment=n?n(h.ctx):!1,e.target){if(e.hydrate){const g=ak(e.target);h.fragment&&h.fragment.l(g),g.forEach(T)}else h.fragment&&h.fragment.c();e.intro&&R(i.$$.fragment),Me(i,e.target,e.anchor),Go()}Ji(c)}class Mt{constructor(){Un(this,"$$");Un(this,"$$set")}$destroy(){Fe(this,1),this.$destroy=Ue}$on(e,t){if(!ki(t))return Ue;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const l=n.indexOf(t);l!==-1&&n.splice(l,1)}}$set(e){this.$$set&&!lk(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const hk="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(hk);class gk{constructor(){this.handles={},this.keyExistencyTimeout=2e4,this.keyExistencyCheckInterval=50}wrapAsPromise(e){return new Promise(t=>{t(e)})}applyFunctionPromisified(e,t){return e=e.apply(this,t),ie.isPromise(e)?e:this.wrapAsPromise(e)}getConfigValueFromObjectAsync(e,t,...n){let l=ie.getConfigValueFromObject(e,t);return ie.isFunction(l)?this.applyFunctionPromisified(l,n):this.wrapAsPromise(l)}}const as=new gk;class _k{convertCustomMessageInternalToUser(e){return e.data}convertCustomMessageUserToInternal(e){return{msg:"custom",data:e}}}const ss=new _k;class pk{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&&t.hasOwnProperty("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)){let t=this.getChildren(e).children;for(let n=0;n<t.length;n++)this.deleteNodesRecursively(t[n])}this.dataManagement.delete(e)}}const Qn=new pk;let mk=class{constructor(){this.configReadyCallback=function(){},this.initialized=!1,this.USER_SETTINGS_KEY="luigi.preferences.userSettings"}setConfigCallbacks(e){this.configReadyCallback=e}async setConfig(e){this.config=e,window.Luigi._store.update(()=>({config:e})),this._configModificationTimestamp=new Date,this.initialized||(this.initialized=!0,this.configReadyCallback().then(async()=>{Xk.luigiAfterInit(),await this.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}))}getConfig(){return this.config}configChanged(...e){const t=bn.optimizeScope(e);t.length>0?t.forEach(n=>{window.Luigi._store.fire(n,{current:window.Luigi._store})}):window.Luigi._store.update(n=>n)}setErrorMessage(e){var t=document.createTextNode(e),n=document.createElement("div");n.setAttribute("class","fd-ui"),n.setAttribute("style","text-align: center;");var l=document.createElement("div");l.setAttribute("class","fd-message-strip fd-message-strip--error"),l.setAttribute("style","max-width: 800px; display: inline-block; margin-top: 40px;"),l.appendChild(t),n.appendChild(l),ji.getLuigiContainer().appendChild(n)}getConfigValue(e){return ie.getConfigValueFromObject(this.getConfig(),e)}getConfigBooleanValue(e){const t=ie.getConfigValueFromObject(this.getConfig(),e);return t===!0||t==="true"}getConfigValueAsync(e,...t){return as.getConfigValueFromObjectAsync(this.getConfig(),e,t)}async executeConfigFnAsync(e,t=!1,...n){const l=this.getConfigValue(e);if(ie.isFunction(l))try{return await as.applyFunctionPromisified(l,n)}catch(r){if(t)return Promise.reject(r)}return Promise.resolve(void 0)}isAuthorizationEnabled(){return wi.isAuthorizationEnabled()}unload(){this.initialized=!1,window.Luigi._store.clear(),gn.unload(),Wn.removeAllEventListeners();const e=ji.getLuigiContainer();for(;e.firstChild;)e.removeChild(e.lastChild)}async readUserSettings(){const e=await this.getConfigValueAsync("userSettings"),t=e||await this.getConfigValueAsync("settings.userSettings");if(t&&ie.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"),l=n||await this.getConfigValueAsync("settings.userSettings");if(l&&ie.isFunction(l.storeUserSettings))return l.storeUserSettings(e,t);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(e)),this.configChanged()}reset(){const e=this.getConfig();this.unload(),this.setConfig(e)}clearNavigationCache(){Qn.deleteCache();const e=t=>{t&&t.forEach&&t.forEach(n=>{n.titleResolver&&n.titleResolver._cache&&(n.titleResolver._cache=void 0),n.children&&e(n.children)})};e(this.getConfig().navigation.nodes)}setGlobalContext(e,t){this.config&&this.config.navigation&&(this.config.navigation.globalContext=e,t||this.configChanged("navigation"))}getGlobalContext(){var e,t;return((t=(e=this.config)==null?void 0:e.navigation)==null?void 0:t.globalContext)||{}}updateContextValues(e){const t=Ee.getMicrofrontendIframes();t&&t.length>0&&t.forEach(n=>{n.luigi&&Ee.sendMessageToIframe(n,{msg:"luigi.navigate",context:JSON.stringify(Object.assign({},JSON.parse(n.luigi._lastUpdatedMessage.context),e)),nodeParams:n.luigi._lastUpdatedMessage.nodeParams,pathParams:JSON.stringify(Object.assign({},n.luigi.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(n.luigi.currentNode))),internal:Ee.applyCoreStateData(JSON.parse(n.luigi._lastUpdatedMessage.internal))})}),document.querySelector(".wcContainer")&&document.querySelectorAll("[lui_web_component=true]").forEach(l=>{l.context=Object.assign({},l.context,e)})}};const os=new mk;let bk=class{constructor(){}isAuthorizationEnabled(){return!!te.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&gn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&gn.logout()}async handleAuthEvent(e,t,n,l){const r=await te.executeConfigFnAsync("auth.events."+e,!1,t,n);let a=r===void 0||!!r;if(a&&l){window.location.href=l;return}return a}get store(){return te.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:()=>di.getStorageKey(),getStorageType:()=>di.getStorageType(),getAuthData:()=>di.getAuthData(),setAuthData:e=>di.setAuthData(e),removeAuthData:()=>di.removeAuthData(),setNewlyAuthorized:()=>{di.setNewlyAuthorized(),gn.resetExpirationChecks()}}}};const Z_=new bk,hn={desktopMinWidth:600},vk=[{type:"main",selector:".iframeContainer iframe"},{type:"split-view",selector:".iframeSplitViewCnt iframe"},{type:"modal",selector:".iframeModalCtn._modal iframe"},{type:"drawer",selector:".iframeModalCtn._drawer iframe"},{type:"user-settings",selector:".iframeUserSettingsCtn iframe"}],wk={cssSelector:"[luigi-app-root]"},kk={cssSelector:"[luigi-app-loading-indicator]"};let Sk=class{getLuigiContainer(){return this.getCustomLuigiContainer()||this.getDefaultLuigiContainer()}isCustomLuigiContainer(){return this.getLuigiContainer()===this.getCustomLuigiContainer()}getCustomLuigiContainer(){return document.querySelector(wk.cssSelector)}getDefaultLuigiContainer(){return document.querySelector("body")}getShellbar(){return document.getElementsByClassName("lui-shellbar-wrapper")[0]}getShellbarActions(){return document.getElementsByClassName("lui-shellbar_group--actions")[0]}getMicrofrontends(){return Ee.getMicrofrontendsInDom()}getMicrofrontendIframes(){return Ee.getMicrofrontendIframes()}getCurrentMicrofrontendIframe(){return Ee.getCurrentMicrofrontendIframe()}getNavFooterContainer(){return document.getElementsByClassName("lui-side-nav__footer")[0]}};const X_=new Sk;class Ck{constructor(){this.promises={}}setPromise(e,t){this.promises[e]=t}getPromise(e){return this.promises[e]}}class Tn extends Ck{constructor(e){super(),Object.assign(this,e),this.options={preserveView:!1,nodeParams:{},errorSkipNavigation:!1,fromContext:null,fromParent:!1,fromClosestContext:!1,relative:!1,link:""}}async navigate(e,t,n,l,r){if(this.options.errorSkipNavigation)return this.options.errorSkipNavigation=!1,Promise.reject(new Error("navigation skipped"));this.options.preserveView=t;const a=e[0]!=="/";if(e==="/"&&(n||l||r))return console.warn("Navigation with an absolute path prevented."),Promise.reject(new Error("Navigation with an absolute path prevented."));const o=ie.createRemotePromise(),c={msg:"luigi.navigation.open",params:Object.assign(this.options,{link:e,relative:a,modal:n,splitView:l,drawer:r}),remotePromiseId:o.id};return this.sendPostMessageToLuigiCore(c),o}navigateToIntent(e,t={}){var l;let n="#?intent=";if(n+=e,t&&((l=Object.keys(t))!=null&&l.length)){const r=Object.entries(t);if(r.length>0){n+="?";for(const[a,o]of r)n+=a+"="+o+"&";n=n.slice(0,-1)}}this.navigate(n)}openAsModal(e,t={},n){if(ie.isFunction(n)){const l=ie.createRemotePromise();l.then(r=>{n(r)}),t.onClosePromiseId=l.id}return this.navigate(e,!0,t)}openAsDrawer(e,t={}){return this.navigate(e,!0,void 0,void 0,t)}openAsSplitView(e,t={}){return this.navigate(e,!0,void 0,t),Luigi.splitView.splitViewHandle}fromContext(e){return this.options.fromContext=e,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(e){return e&&Object.assign(this.options.nodeParams,e),this}pathExists(e){if(ie.isFunction(Luigi.pathExists))return Luigi.pathExists(e);console.error("Luigi.navigation().pathExists(path) is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}hasBack(){return Luigi.hasBack()}goBack(e){this.sendPostMessageToLuigiCore({msg:"luigi.navigation.back",goBackContext:e&&JSON.stringify(e)})}getCurrentRoute(){return Luigi._app.ctx[Luigi._app.props.buildPathForGetCurrentRoute](this.options)}sendPostMessageToLuigiCore(e){window.postMessage(e,"*")}}class yk{constructor(){}updateTopNavigation(){window.postMessage({msg:"luigi.navigation.update-badge-counters"},"*")}navigate(e,t,n,l,r){return new Tn().navigate(e,t,n,l,r)}navigateToIntent(e,t){return new Tn().navigateToIntent(e,t)}openAsModal(e,t,n){return new Tn().openAsModal(e,t,n)}openAsSplitView(e,t={}){if(e==="/"){console.warn("Navigation with an absolute path prevented.");return}return new Tn().openAsSplitView(e,t)}openAsDrawer(e,t){return new Tn().openAsDrawer(e,t)}fromContext(e){return new Tn().fromContext(e)}fromClosestContext(){return new Tn().fromClosestContext()}fromVirtualTreeRoot(){return new Tn().fromVirtualTreeRoot()}fromParent(){return new Tn().fromParent()}getCurrentRoute(){return new Tn().getCurrentRoute()}withParams(e){return new Tn().withParams(e)}pathExists(e){return new Tn().pathExists(e)}hasBack(){return new Tn().hasBack()}goBack(e){return new Tn().goBack(e)}}const $_=new yk,Pk={luigi:{unsavedChangesAlert:{header:"Unsaved changes detected",body:"Unsaved changes will be lost. Do you want to continue?"},confirmationModal:{header:"Confirmation",body:"Are you sure you want to do this?"},button:{dismiss:"No",confirm:"Yes"},requestedRouteNotFound:"Could not find the requested route {route}.",notExactTargetNode:"Could not map the exact target node for the requested route {route}.",navigation:{up:"Up"}}},Ik=Pk;class Nk{constructor(){this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.translationTable=Ik,this.listeners={}}_init(){bn.doOnStoreChange(window.Luigi._store,()=>{this._initCustomImplementation()},["settings"])}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(e){e&&(sessionStorage.setItem(this.currentLocaleStorageKey,e),this._notifyLocaleChange(e))}addCurrentLocaleChangeListener(e){if(ie.isFunction(e)){const t=ie.getRandomId();return this.listeners[t]=e,t}else console.error("Provided locale change listener is not a function.")}removeCurrentLocaleChangeListener(e){e&&this.listeners[e]?delete this.listeners[e]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}_notifyLocaleChange(e){Object.getOwnPropertyNames(this.listeners).forEach(t=>{this.listeners[t](e)}),os.configChanged()}_initCustomImplementation(){this.translationImpl=os.getConfigValue("settings.customTranslationImplementation"),ie.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}getTranslation(e,t=void 0,n=void 0){if(!e)return"";if(this.translationImpl){const r=this.translationImpl.getTranslation(e,t,n);if(r!==e)return r}const l=this.findTranslation(e,this.translationTable,t);return l||e}findTranslation(e,t,n){let l=e.split(".");for(let r=0;r<l.length;r++){let a=l[r];if(t.hasOwnProperty(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("{"+Sr.escapeKeyForRegexp(n)+"}","gi"),t[n])}),e}}const x_=new Nk;class Tk{sendToAll(e){const t=ss.convertCustomMessageUserToInternal(e);Ee.getMicrofrontendsInDom().map(n=>n.container).map(n=>Ee.sendMessageToIframe(n,t))}send(e,t){const n=ss.convertCustomMessageUserToInternal(t);Ee.getMicrofrontendsInDom().filter(l=>l.id===e).map(l=>l.container).map(l=>Ee.sendMessageToIframe(l,n))}}const Lk=new Tk,hr=[];function Ak(i,e){return{subscribe:vr(i,e).subscribe}}function vr(i,e=Ue){let t;const n=new Set;function l(o){if(Dt(i,o)&&(i=o,t)){const c=!hr.length;for(const h of n)h[1](),hr.push(h,i);if(c){for(let h=0;h<hr.length;h+=2)hr[h][0](hr[h+1]);hr.length=0}}}function r(o){l(o(i))}function a(o,c=Ue){const h=[o,c];return n.add(h),n.size===1&&(t=e(l,r)||Ue),o(i),()=>{n.delete(h),n.size===0&&t&&(t(),t=null)}}return{set:l,update:r,subscribe:a}}class Ek{initial(){this.responsiveNavSetting=te.getConfigValue("settings.responsiveNavigation");const e=this.responsiveNavSetting==="semiCollapsible"||this.responsiveNavSetting==="Fiori3";JSON.parse(localStorage.getItem(le.COL_NAV_KEY))!==!1&&e&&(this.isSemiCollapsed=this.getCollapsed()),this.semiCollapsible=!!e;let t=this.isSemiCollapsed===void 0;return this.semiCollapsible&&window.innerWidth!==0&&window.innerWidth<hn.desktopMinWidth?this.isSemiCollapsed=t?!0:this.getCollapsed():this.isSemiCollapsed=t?!1:this.getCollapsed(),this.setCollapsed(this.isSemiCollapsed),this.previousWindowWidth=window.innerWidth,{isSemiCollapsed:this.isSemiCollapsed,semiCollapsible:this.semiCollapsible}}onValueChanged(e){this.valueChangedFns?this.valueChangedFns.push(e):this.valueChangedFns=[e]}onResize(e){const t=window.innerWidth!==0&&window.innerWidth<hn.desktopMinWidth&&this.previousWindowWidth>=hn.desktopMinWidth,n=window.innerWidth!==0&&window.innerWidth>hn.desktopMinWidth&&this.previousWindowWidth>=hn.desktopMinWidth;return t&&this.setCollapsed(!0,!1),!this.isStoredCollapsed()&&n&&this.setCollapsed(!1,!1),e=this.closePopupMenu(e),{isSemiCollapsed:this.isSemiCollapsed,selectedCategory:e}}setCollapsed(e,t=!0){document.body.classList.remove("semiCollapsed"),e&&document.body.classList.add("semiCollapsed"),this.isSemiCollapsed=e,t&&localStorage.setItem(le.COL_NAV_KEY,e),this.valueChangedFns instanceof Array&&this.valueChangedFns.forEach(n=>n({isSemiCollapsed:this.isSemiCollapsed}))}isStoredCollapsed(){return JSON.parse(localStorage.getItem(le.COL_NAV_KEY))}getCollapsed(){return this.isStoredCollapsed()?!0:this.isSemiCollapsed}closePopupMenu(e){var t;return e&&(e=null,(t=document.getElementsByClassName("fd-app__sidebar")[0])==null||t.classList.remove("isBlocked")),e}buttonClicked(e){return this.closePopupMenu(),this.getCollapsed()?this.setCollapsed(!1):(this.setCollapsed(!0),document.getElementsByClassName("lui-fd-side-nav-wrapper")[0]&&(document.getElementsByClassName("lui-fd-side-nav-wrapper")[0].setAttribute("style","overflow-y:hidden;"),window.setTimeout(function(){document.getElementsByClassName("lui-fd-side-nav-wrapper")[0].setAttribute("style","overflow-y:auto;")}))),this.isSemiCollapsed}}const vi=new Ek;let Rk=class{constructor(){this.documentTitle=vr()}hideAppLoadingIndicator(){const e=document.querySelector(kk.cssSelector);e&&(e.classList.add("hidden"),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},500))}showAlert(e){if(ie.isFunction(Luigi.showAlert))return Luigi.showAlert(e);console.error("Luigi.ux().showAlert() is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}showConfirmationModal(e){if(ie.isFunction(Luigi.showConfirmationModal))return Luigi.showConfirmationModal(e);console.error("Luigi.ux().showConfirmationModal() is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}setDocumentTitle(e){this.documentTitle.set(e),Luigi.configChanged("settings.header")}getDocumentTitle(){return hl(this.documentTitle)}collapseLeftSideNav(e){vi.setCollapsed(e)}openUserSettings(){Luigi.openUserSettings()}closeUserSettings(){Luigi.closeUserSettings()}removeBackdrop(){new Tn().sendPostMessageToLuigiCore({msg:"luigi.remove-backdrop"})}getDirtyStatus(){return Luigi.getDirtyStatus()}getCurrentTheme(){return Luigi.theming().getCurrentTheme()}};const ep=new Rk;let Dk=class{openSearchField(){Luigi.openSearchField()}closeSearchField(){Luigi.closeSearchField()}clearSearchField(){Luigi.clearSearchField()}showSearchResult(e){Luigi.showSearchResult(e)}closeSearchResult(){Luigi.closeSearchResult()}getSearchString(){return Luigi.getGlobalSearchString()}setSearchString(e){Luigi.setGlobalSearchString(e)}setSearchInputPlaceholder(e){Luigi.setSearchInputPlaceholder(e)}};const tp=new Dk;let Vk=class{constructor(){this.currentTheme}async getAvailableThemes(){return await te.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(e){this.currentTheme=e,window.Luigi.__cssVars=void 0}async getThemeObject(e){const t=await this.getAvailableThemes();return t&&t.find(n=>n.id===e)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.currentTheme)return this.currentTheme;const e=te.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!!te.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const e=te.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 l=getComputedStyle(document.documentElement).getPropertyValue("--"+n);l&&(window.Luigi.__cssVars[n]=l)})}catch(t){ie.isFunction(te.getConfigValue("settings.theming.variables.errorHandling"))?te.getConfigValue("settings.theming.variables.errorHandling")(t):console.error("CSS variables file error: ",t)}else te.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=()=>{const t=te.getConfigValue("settings.theming");t&&t.nodeViewURLDecorator&&t.nodeViewURLDecorator.queryStringParameter&&$r.add({type:"queryString",uid:"theming",key:t.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const n=this.getCurrentTheme(),l=t.nodeViewURLDecorator.queryStringParameter.value;return l?l(n):n}}),t&&t.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")};bn.doOnStoreChange(window.Luigi._store,()=>{e()},["settings.theming"])}};const np=new Vk;let Ok=class{constructor(){this.featureToggleList=vr([])}setFeatureToggle(e,t=!1){this.isValid(e)&&(e.startsWith("!")&&!t||this.isDuplicatedOrDisabled(e)||hl(this.featureToggleList).push(e))}unsetFeatureToggle(e){if(!this.isValid(e))return;const t=hl(this.featureToggleList).indexOf(e);if(t===-1){console.warn("Feature toggle name is not in the list.");return}hl(this.featureToggleList).splice(t,1)}getActiveFeatureToggleList(){return[...hl(this.featureToggleList)].filter(e=>!e.startsWith("!"))}isValid(e){return ie.isString(e)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(e){return hl(this.featureToggleList).includes(e)?(console.warn("Feature toggle name already exists"),!0):hl(this.featureToggleList).includes(`!${e}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}};const ip=new Ok;let Mk=class{constructor(){}getSearchParams(){const e={},t=new URL(location);if(te.getConfigValue("routing.useHashRouting"))for(const[n,l]of new URLSearchParams(t.hash.split("?")[1]))e[n]=l;else for(const[n,l]of t.searchParams.entries())e[n]=l;return e}addSearchParams(e,t){if(!ie.isObject(e)){console.log("Params argument must be an object");return}const n=new URL(location);te.getConfigValue("routing.useHashRouting")?n.hash=me.addParamsOnHashRouting(e,n.hash):me.modifySearchParams(e,n.searchParams),this.handleBrowserHistory(t,n),te.configChanged()}addNodeParams(e,t){if(!ie.isObject(e)){console.log("Params argument must be an object");return}const n=me.getContentViewParamPrefix(),l=new URL(location);te.getConfigValue("routing.useHashRouting")?l.hash=me.addParamsOnHashRouting(e,l.hash,n):me.modifySearchParams(e,l.searchParams,n),this.handleBrowserHistory(t,l),te.configChanged()}sanitizeUrl(e){return new URL(location).origin===new URL(e).origin?e:void 0}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)}getAnchor(){const{hash:e}=new URL(location);return te.getConfigValue("routing.useHashRouting")&&e.split("#").length===2?"":e.split("#").pop()}setAnchor(e){if(te.getConfigValue("routing.useHashRouting")){const{hash:t}=new URL(location),n=t.split("#"),r=n.length>2?n.slice(0,-1):n;window.location.hash=[...r,e].join("#")}else window.location.hash=e}};const lp=new Mk,te=os,wi=Z_,ji=X_,rp=$_,Et=x_,na=ep,Fk=tp,Ho=np,Ko=ip,gl=lp;window.Luigi=os;window.Luigi.auth=()=>Z_;window.Luigi.elements=()=>X_;window.Luigi.navigation=()=>$_;window.Luigi.i18n=()=>x_;window.Luigi.customMessages=()=>Lk;window.Luigi.ux=()=>ep;window.Luigi.globalSearch=()=>tp;window.Luigi.theming=()=>np;window.Luigi.featureToggles=()=>ip;window.Luigi.routing=()=>lp;class Uk{constructor(){this.iframeNavFallbackTimeout=2e3,this.timeoutHandle}getActiveIframe(e){return[...e.children].filter(n=>n.tagName==="IFRAME").find(ie.isElementVisible)}setActiveIframeToPrevious(e){const t=Ee.getMainIframes(),n=this.getPreservedViewsInDom(t);if(n.length===0)return;const l=this.getActiveIframe(e);Ee.hideElementChildren(e),l&&e.removeChild(l),n[0].pv=void 0,n[0].style.display="block"}removeInactiveIframes(e){Array.from(e.children).forEach(n=>{!ie.isElementVisible(n)&&!n.vg&&n.tagName==="IFRAME"&&e.removeChild(n)})}hasIsolatedView(e,t,n){return e||n&&e!==!1&&!t}getPreservedViewsInDom(e){return e.filter(t=>t.pv)}canCache(e){const t=le.getViewGroupSettings(e);return t&&t.preloadUrl}notifyInactiveIframes(){const e={msg:"luigi-client.inactive-microfrontend",context:JSON.stringify({}),nodeParams:JSON.stringify({}),pathParams:JSON.stringify({}),internal:JSON.stringify({currentLocale:Et.getCurrentLocale()})};Ee.sendMessageToVisibleIframes(e)}switchActiveIframe(e,t,n){const l=this.getActiveIframe(e);if(l!==t){let r=!1;Array.from(e.children).forEach(o=>{if(o===l)if(n)e.removeChild(o);else{const c=le.getViewGroupSettings(o.vg);if(c&&this.notifyInactiveIframes(),o.style.display="none",c.preloadUrl){const h={msg:"luigi.navigate",viewUrl:c.preloadUrl,context:JSON.stringify({}),nodeParams:JSON.stringify({}),pathParams:JSON.stringify({}),internal:JSON.stringify({currentLocale:Et.getCurrentLocale()})};Ee.sendMessageToIframe(o,h)}}o===t&&(r=!0)}),t&&(t.style.display="block",r||e.insertBefore(t,e.firstChild))}return t}setOkResponseHandler(e,t,n){this.timeoutHandle=setTimeout(async()=>{e.navigateOk?e.navigateOk=void 0:(Ee.removeIframe(e.iframe,n),e.iframe=void 0,e.isFallbackFrame=!0,console.info("navigate: luigi-client did not respond, using fallback by replacing iframe"),await this.navigateIframe(e,t,n))},this.iframeNavFallbackTimeout)}checkIframe(e,t,n,l,r){this.timeoutHandle=setTimeout(()=>{t.get().showLoadingIndicator&&(e.viewUrl?(n=e.viewUrl,t.set({viewUrl:n}),this.iframeNavFallbackTimeout=0,this.setOkResponseHandler(l,t,r)):le.handleUnresponsiveClient(e))},e.timeout)}initHandshakeFailed(e){if(!(e&&e.iframe&&e.iframe.luigi))return!0;const t=e.iframe.luigi.clientVersion;return e.iframe.luigi.initOk===void 0?!0:!t||ie.semverCompare("1.1.1",t)!==-1?!1:!e.iframe.luigi.initOk}async navigateIframe(e,t,n){clearTimeout(this.timeoutHandle);const l=t.get();let r=l.viewUrl;r&&(r=me.substituteViewUrl(r,l));const a=Ee.isSameViewGroup(e,t),o=this.hasIsolatedView(l.previousNodeValues.isolateView,a,e.isolateAllViews),c=this.hasIsolatedView(l.isolateView,a,e.isolateAllViews),h=Ee.canReuseIframe(e,t);let d=this.getActiveIframe(n);const g=Ee.getMainIframes(),p=this.getPreservedViewsInDom(g);let b,m=!1;if(p.length>0&&(b=p.shift(),b===d&&(m=!0,d=void 0,e.iframe=void 0)),!m&&!t.get().isNavigateBack){d&&o&&(d=this.switchActiveIframe(n,void 0,!0)),d&&c&&(d=this.switchActiveIframe(n,void 0,!d.vg));let v;if(!c&&l.viewGroup){const y=Ee.getMainIframes().filter(P=>P.vg===l.viewGroup);y.length>0&&(v=y[0],d=this.switchActiveIframe(n,v,d&&!d.vg))}d&&!v&&(d.vg?d=this.switchActiveIframe(n,void 0,!1):h||(d=this.switchActiveIframe(n,void 0,!0))),e.iframe=d}if(!e.iframe||this.initHandshakeFailed(e)){if(e.iframe&&n.removeChild(e.iframe),m?(this.notifyInactiveIframes(),Ee.hideElementChildren(n)):Ee.removeElementChildren(n),l.viewUrl){ie.getConfigValueFromObject(l,"currentNode.loadingIndicator.enabled")!==!1?t.set({showLoadingIndicator:!0}):t.set({showLoadingIndicator:!1}),e.navigateOk=void 0;const v=l.viewGroup&&!c&&this.canCache(l.viewGroup);e.iframe=Ee.createIframe(r,v?l.viewGroup:void 0,t.get().currentNode,"main",l),n.insertBefore(e.iframe,n.firstChild),e.builderCompatibilityMode?e.iframe.addEventListener("load",()=>{e.iframe._ready=!0;const y=["init",JSON.stringify(l.context)];Ee.sendMessageToIframe(e.iframe,y)}):e.iframe.addEventListener("load",()=>{e.iframe._ready=!0});const C=l.currentNode.pageErrorHandler;C?this.checkIframe(C,t,r,e,n):e.defaultPageErrorHandler&&this.checkIframe(e.defaultPageErrorHandler,t,r,e,n)}}else{t.set({showLoadingIndicator:!1});const v=t.get().goBackContext;e.iframe.style.display="block",e.iframe.luigi.nextViewUrl=r,e.iframe.luigi.nextClientPermissions=t.get().currentNode.clientPermissions,e.iframe.vg=this.canCache(l.viewGroup)?l.viewGroup:void 0,e.iframe.luigi.currentNode=l.currentNode;const C=await t.prepareInternalData(e),y={msg:"luigi.navigate",viewUrl:r,context:JSON.stringify(Object.assign({},l.context,{goBackContext:v})),nodeParams:JSON.stringify(Object.assign({},l.nodeParams)),pathParams:JSON.stringify(Object.assign({},l.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(e.iframe.luigi.currentNode))),internal:JSON.stringify(C)};l.isNavigationSyncEnabled?(Ee.getVisibleIframes().forEach(N=>{N!==e.iframe&&(N.userSettingsGroup?Luigi.readUserSettings().then(I=>{Ee.sendMessageToIframe(N,{msg:"luigi.navigate",context:{userSettingsData:I[N.userSettingsGroup]},internal:Ee.applyCoreStateData(N.luigi._lastUpdatedMessage.internal)})}):Ee.sendMessageToIframe(N,{msg:"luigi.navigate",context:N.luigi._lastUpdatedMessage.context,nodeParams:N.luigi._lastUpdatedMessage.nodeParams,pathParams:JSON.stringify(Object.assign({},N.luigi.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(e.iframe.luigi.currentNode))),internal:Ee.applyCoreStateData(N.luigi._lastUpdatedMessage.internal)}))}),Ee.sendMessageToIframe(e.iframe,y),this.setOkResponseHandler(e,t,n)):t.set({isNavigationSyncEnabled:!0}),t.set({goBackContext:void 0,isNavigateBack:!1})}}}const ci=new Uk;class Bk{constructor(){this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(e=3,t){if(te.getConfigValue("navigation.preloadViewGroups")===!1)return;const l=le.getAllViewGroupSettings();if(!l)return;const r=Ee.getIframeContainer(),a=Ee.getMainIframes(),o=new Date().getTime();if(a.filter(g=>g.luigi&&g.luigi.preloading&&o-g.luigi.createdAt<3e4).length>0){console.debug("skipping view group preloading (busy)");return}const h=a.map(g=>g.vg).filter(Boolean),d=Object.entries(l).filter(([g,p])=>!h.includes(g)).filter(([g,p])=>p&&p.preloadUrl);t&&d.forEach(([g,p])=>{p.loadOnStartup&&this.preloadIframeOnBackground(p,g,r)}),!t&&d.filter((g,p)=>p<e).forEach(([g,p])=>{console.debug("preloading view group "+g+" - "+p.preloadUrl),this.preloadIframeOnBackground(p,g,r)})}preloadIframeOnBackground(e,t,n){const l=Ee.createIframe(e.preloadUrl,t,null,"main");l.style.display="none",l.luigi.preloading=!0,n.appendChild(l)}preload(e){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,e)},e),this.shouldPreload=!0}viewGroupLoaded(e){if(e.luigi.preloading){const t=new Date().getTime()-e.luigi.createdAt;let n=1;t<500?n=3:t<1e3&&(n=2),this.preloadBatchSize=n,console.debug("preload batch size: "+this.preloadBatchSize),setTimeout(()=>{e.luigi.preloading=!1},this.preloadBatchSize>2?500:1e3)}}}const gr=new Bk;class Hk{async getNavigationPath(e,t=""){try{const n=ie.getTrimmedUrl(t);if(!e)return console.error("No navigation nodes provided in the configuration."),[{}];let l;if(Qn.hasRootNode()&&(l=Qn.getRootNode().node),!l){const g=await e;ie.isObject(g)?(l=g,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:g},l.children=await this.getChildren(l),Qn.setRootNode(l)}const r=n.split("/"),o={...te.getConfigValue("navigation.globalContext")||{},...l.context||{}},c=await this.buildNode(r,[l],l.children,o),h=c.navigationPath.filter(g=>g.pathSegment).map(g=>g.pathSegment);c.isExistingRoute=!n||r.length===h.length;const d=n.split("/");return c.matchedPath=d.filter((g,p)=>h[p]&&h[p].startsWith(":")||h[p]===g).join("/"),c}catch(n){console.error("Failed to load top navigation nodes.",n)}}async getChildren(e,t){if(!e)return[];let n=[];if(Qn.hasChildren(e)){let r=Qn.getChildren(e);r&&(n=r.children)}else try{n=await as.getConfigValueFromObjectAsync(e,"children",t||e.context),n==null&&(n=[]),n=n.map(r=>this.getExpandStructuralPathSegment(r)).map(r=>this.bindChildToParent(r,e))||[]}catch(r){console.error("Could not lazy-load children for node",r)}let l=this.getAccessibleNodes(e,n,t);return Qn.setChildren(e,{children:n,filteredChildren:l}),l}async getFilteredChildren(e){return Qn.hasChildren(e)?qt.getChildrenFromCache(e):await qt.getChildren(e)}getChildrenFromCache(e){let t=Qn.getChildren(e);return t?t.filteredChildren:[]}getAccessibleNodes(e,t,n){return t?t.filter(l=>le.isNodeAccessPermitted(l,e,n)):[]}bindChildToParent(e,t){return t&&t.pathSegment&&(e.parent=t),e}getExpandStructuralPathSegment(e){if(e&&e.pathSegment&&e.pathSegment.indexOf("/")!==-1){const t=e.pathSegment.split("/"),n={...e},l=(r,a)=>{const o=r.shift();let c={};return r.length?(c.pathSegment=o,a.hideFromNav&&(c.hideFromNav=a.hideFromNav),c.children=[l(r,a)]):(c=n,c.pathSegment=o),c};return l(t,e)}return e}async buildNode(e,t,n,l,r={}){l.parentNavigationContexts||(l.parentNavigationContexts=[]);let a={navigationPath:t,context:l,pathParams:r};if(e.length>0&&n&&n.length>0){const o=e[0],c=this.findMatchingNode(o,n);if(c){t.push(c);let h=le.applyContext(l,c.context,c.navigationContext);c.pathSegment.startsWith(":")&&(r[c.pathSegment.replace(":","")]=Sr.sanitizeParam(o)),h=me.substituteDynamicParamsInObject(h,r);try{this.buildVirtualTree(c,e,r);let d=await this.getChildren(c,h);const g=e.slice(1);a=this.buildNode(g,t,d,h,r)}catch(d){console.error("Error getting nodes children",d)}}}return a}buildVirtualViewUrl(e,t,n){let l="";for(const r in t)r.startsWith("virtualSegment")&&(l+=":"+r+"/");return n?(l+=":virtualSegment_"+n+"/",e+"/"+l):e}buildVirtualTree(e,t,n){const l=e.virtualTree,r=e._virtualTree,a=e._virtualViewUrl||e.viewUrl;if((l||r)&&t[0]){let o=e._virtualPathIndex;if(l&&(o=0,e.keepSelectedForChildren=!0),o>50)return;o++;const h=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],d=ie.removeProperties(e,h);Object.assign(d,{pathSegment:":virtualSegment_"+o,label:":virtualSegment_"+o,viewUrl:ie.trimTrailingSlash(this.buildVirtualViewUrl(a,n,o)),_virtualTree:!0,_virtualPathIndex:o,_virtualViewUrl:a});const g=Array.isArray(e.children)&&e.children.length>0?e.children[0]._virtualTree:!1;e.children&&!g&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
1
+ var ek=Object.defineProperty;var tk=(i,e,t)=>e in i?ek(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Un=(i,e,t)=>tk(i,typeof e!="symbol"?e+"":e,t);function Ue(){}function nk(i,e){for(const t in e)i[t]=e[t];return i}function ik(i){return!!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function J_(i){return i()}function Jf(){return Object.create(null)}function Qe(i){i.forEach(J_)}function ki(i){return typeof i=="function"}function Dt(i,e){return i!=i?e==e:i!==e||i&&typeof i=="object"||typeof i=="function"}let ts;function tt(i,e){return i===e?!0:(ts||(ts=document.createElement("a")),ts.href=e,i===ts.href)}function lk(i){return Object.keys(i).length===0}function zo(i,...e){if(i==null){for(const n of e)n(void 0);return Ue}const t=i.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function hl(i){let e;return zo(i,t=>e=t)(),e}function Si(i,e,t){i.$$.on_destroy.push(zo(e,t))}function hs(i,e,t,n){if(i){const l=j_(i,e,t,n);return i[0](l)}}function j_(i,e,t,n){return i[1]&&n?nk(t.ctx.slice(),i[1](n(e))):t.ctx}function gs(i,e,t,n){return i[2],e.dirty}function _s(i,e,t,n,l,r){if(l){const a=j_(e,t,n,r);i.p(a,l)}}function ps(i){if(i.ctx.length>32){const e=[],t=i.ctx.length/32;for(let n=0;n<t;n++)e[n]=-1;return e}return-1}function Hn(i){return i??""}function Y_(i){return i&&ki(i.destroy)?i.destroy:Ue}const wl=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function w(i,e){i.appendChild(e)}function L(i,e,t){i.insertBefore(e,t||null)}function T(i){i.parentNode&&i.parentNode.removeChild(i)}function ht(i,e){for(let t=0;t<i.length;t+=1)i[t]&&i[t].d(e)}function k(i){return document.createElement(i)}function rk(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function Te(i){return document.createTextNode(i)}function W(){return Te(" ")}function ke(){return Te("")}function ee(i,e,t,n){return i.addEventListener(e,t,n),()=>i.removeEventListener(e,t,n)}function St(i){return function(e){return e.preventDefault(),i.call(this,e)}}function Vt(i){return function(e){return e.stopPropagation(),i.call(this,e)}}function f(i,e,t){t==null?i.removeAttribute(e):i.getAttribute(e)!==t&&i.setAttribute(e,t)}function ak(i){return Array.from(i.childNodes)}function Ae(i,e){e=""+e,i.data!==e&&(i.data=e)}function jf(i,e){i.value=e??""}function Bn(i,e,t,n){t==null?i.style.removeProperty(e):i.style.setProperty(e,t,"")}function Zt(i,e,t){i.classList.toggle(e,!!t)}function sk(i,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(i,{detail:e,bubbles:t,cancelable:n})}class Cr{constructor(e=!1){Un(this,"is_svg",!1);Un(this,"e");Un(this,"n");Un(this,"t");Un(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=rk(t.nodeName):this.e=k(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)L(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(T)}}let Xr;function Ji(i){Xr=i}function kl(){if(!Xr)throw new Error("Function called outside component initialization");return Xr}function Zn(i){kl().$$.before_update.push(i)}function rn(i){kl().$$.on_mount.push(i)}function ea(i){kl().$$.after_update.push(i)}function ta(i){kl().$$.on_destroy.push(i)}function Xt(){const i=kl();return(e,t,{cancelable:n=!1}={})=>{const l=i.$$.callbacks[e];if(l){const r=sk(e,t,{cancelable:n});return l.slice().forEach(a=>{a.call(i,r)}),!r.defaultPrevented}return!0}}function Yr(i,e){return kl().$$.context.set(i,e),e}function Pt(i){return kl().$$.context.get(i)}function Ki(i,e){const t=i.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const _r=[],Ye=[];let mr=[];const Fo=[],ok=Promise.resolve();let Uo=!1;function uk(){Uo||(Uo=!0,ok.then(Go))}function Bo(i){mr.push(i)}function Ct(i){Fo.push(i)}const Vo=new Set;let dr=0;function Go(){if(dr!==0)return;const i=Xr;do{try{for(;dr<_r.length;){const e=_r[dr];dr++,Ji(e),fk(e.$$)}}catch(e){throw _r.length=0,dr=0,e}for(Ji(null),_r.length=0,dr=0;Ye.length;)Ye.pop()();for(let e=0;e<mr.length;e+=1){const t=mr[e];Vo.has(t)||(Vo.add(t),t())}mr.length=0}while(_r.length);for(;Fo.length;)Fo.pop()();Uo=!1,Vo.clear(),Ji(i)}function fk(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(Bo)}}function ck(i){const e=[],t=[];mr.forEach(n=>i.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),mr=e}const is=new Set;let ql;function be(){ql={r:0,c:[],p:ql}}function ve(){ql.r||Qe(ql.c),ql=ql.p}function R(i,e){i&&i.i&&(is.delete(i),i.i(e))}function U(i,e,t,n){if(i&&i.o){if(is.has(i))return;is.add(i),ql.c.push(()=>{is.delete(i),n&&(t&&i.d(1),n())}),i.o(e)}else n&&n()}function rs(i,e){const t=e.token={};function n(l,r,a,o){if(e.token!==t)return;e.resolved=o;let c=e.ctx;a!==void 0&&(c=c.slice(),c[a]=o);const h=l&&(e.current=l)(c);let d=!1;e.block&&(e.blocks?e.blocks.forEach((g,p)=>{p!==r&&g&&(be(),U(g,1,1,()=>{e.blocks[p]===g&&(e.blocks[p]=null)}),ve())}):e.block.d(1),h.c(),R(h,1),h.m(e.mount(),e.anchor),d=!0),e.block=h,e.blocks&&(e.blocks[r]=h),d&&Go()}if(ik(i)){const l=kl();if(i.then(r=>{Ji(l),n(e.then,1,e.value,r),Ji(null)},r=>{if(Ji(l),n(e.catch,2,e.error,r),Ji(null),!e.hasCatch)throw r}),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,i),!0;e.resolved=i}}function Q_(i,e,t){const n=e.slice(),{resolved:l}=i;i.current===i.then&&(n[i.value]=l),i.current===i.catch&&(n[i.error]=l),i.block.p(n,t)}function Ve(i){return(i==null?void 0:i.length)!==void 0?i:Array.from(i)}function yt(i,e,t){const n=i.$$.props[e];n!==void 0&&(i.$$.bound[n]=t,t(i.$$.ctx[n]))}function Be(i){i&&i.c()}function Me(i,e,t){const{fragment:n,after_update:l}=i.$$;n&&n.m(e,t),Bo(()=>{const r=i.$$.on_mount.map(J_).filter(ki);i.$$.on_destroy?i.$$.on_destroy.push(...r):Qe(r),i.$$.on_mount=[]}),l.forEach(Bo)}function Fe(i,e){const t=i.$$;t.fragment!==null&&(ck(t.after_update),Qe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function dk(i,e){i.$$.dirty[0]===-1&&(_r.push(i),uk(),i.$$.dirty.fill(0)),i.$$.dirty[e/31|0]|=1<<e%31}function Ot(i,e,t,n,l,r,a=null,o=[-1]){const c=Xr;Ji(i);const h=i.$$={fragment:null,ctx:[],props:r,update:Ue,not_equal:l,bound:Jf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Jf(),dirty:o,skip_bound:!1,root:e.target||c.$$.root};a&&a(h.root);let d=!1;if(h.ctx=t?t(i,e.props||{},(g,p,...b)=>{const m=b.length?b[0]:p;return h.ctx&&l(h.ctx[g],h.ctx[g]=m)&&(!h.skip_bound&&h.bound[g]&&h.bound[g](m),d&&dk(i,g)),p}):[],h.update(),d=!0,Qe(h.before_update),h.fragment=n?n(h.ctx):!1,e.target){if(e.hydrate){const g=ak(e.target);h.fragment&&h.fragment.l(g),g.forEach(T)}else h.fragment&&h.fragment.c();e.intro&&R(i.$$.fragment),Me(i,e.target,e.anchor),Go()}Ji(c)}class Mt{constructor(){Un(this,"$$");Un(this,"$$set")}$destroy(){Fe(this,1),this.$destroy=Ue}$on(e,t){if(!ki(t))return Ue;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const l=n.indexOf(t);l!==-1&&n.splice(l,1)}}$set(e){this.$$set&&!lk(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const hk="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(hk);class gk{constructor(){this.handles={},this.keyExistencyTimeout=2e4,this.keyExistencyCheckInterval=50}wrapAsPromise(e){return new Promise(t=>{t(e)})}applyFunctionPromisified(e,t){return e=e.apply(this,t),ie.isPromise(e)?e:this.wrapAsPromise(e)}getConfigValueFromObjectAsync(e,t,...n){let l=ie.getConfigValueFromObject(e,t);return ie.isFunction(l)?this.applyFunctionPromisified(l,n):this.wrapAsPromise(l)}}const as=new gk;class _k{convertCustomMessageInternalToUser(e){return e.data}convertCustomMessageUserToInternal(e){return{msg:"custom",data:e}}}const ss=new _k;class pk{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&&t.hasOwnProperty("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)){let t=this.getChildren(e).children;for(let n=0;n<t.length;n++)this.deleteNodesRecursively(t[n])}this.dataManagement.delete(e)}}const Qn=new pk;let mk=class{constructor(){this.configReadyCallback=function(){},this.initialized=!1,this.USER_SETTINGS_KEY="luigi.preferences.userSettings"}setConfigCallbacks(e){this.configReadyCallback=e}async setConfig(e){this.config=e,window.Luigi._store.update(()=>({config:e})),this._configModificationTimestamp=new Date,this.initialized||(this.initialized=!0,this.configReadyCallback().then(async()=>{Xk.luigiAfterInit(),await this.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}))}getConfig(){return this.config}configChanged(...e){const t=bn.optimizeScope(e);t.length>0?t.forEach(n=>{window.Luigi._store.fire(n,{current:window.Luigi._store})}):window.Luigi._store.update(n=>n)}setErrorMessage(e){var t=document.createTextNode(e),n=document.createElement("div");n.setAttribute("class","fd-ui"),n.setAttribute("style","text-align: center;");var l=document.createElement("div");l.setAttribute("class","fd-message-strip fd-message-strip--error"),l.setAttribute("style","max-width: 800px; display: inline-block; margin-top: 40px;"),l.appendChild(t),n.appendChild(l),ji.getLuigiContainer().appendChild(n)}getConfigValue(e){return ie.getConfigValueFromObject(this.getConfig(),e)}getConfigBooleanValue(e){const t=ie.getConfigValueFromObject(this.getConfig(),e);return t===!0||t==="true"}getConfigValueAsync(e,...t){return as.getConfigValueFromObjectAsync(this.getConfig(),e,t)}async executeConfigFnAsync(e,t=!1,...n){const l=this.getConfigValue(e);if(ie.isFunction(l))try{return await as.applyFunctionPromisified(l,n)}catch(r){if(t)return Promise.reject(r)}return Promise.resolve(void 0)}isAuthorizationEnabled(){return wi.isAuthorizationEnabled()}unload(){this.initialized=!1,window.Luigi._store.clear(),gn.unload(),Wn.removeAllEventListeners();const e=ji.getLuigiContainer();for(;e.firstChild;)e.removeChild(e.lastChild)}async readUserSettings(){const e=await this.getConfigValueAsync("userSettings"),t=e||await this.getConfigValueAsync("settings.userSettings");if(t&&ie.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"),l=n||await this.getConfigValueAsync("settings.userSettings");if(l&&ie.isFunction(l.storeUserSettings))return l.storeUserSettings(e,t);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(e)),this.configChanged()}reset(){const e=this.getConfig();this.unload(),this.setConfig(e)}clearNavigationCache(){Qn.deleteCache();const e=t=>{t&&t.forEach&&t.forEach(n=>{n.titleResolver&&n.titleResolver._cache&&(n.titleResolver._cache=void 0),n.children&&e(n.children)})};e(this.getConfig().navigation.nodes)}setGlobalContext(e,t){this.config&&this.config.navigation&&(this.config.navigation.globalContext=e,t||this.configChanged("navigation"))}getGlobalContext(){var e,t;return((t=(e=this.config)==null?void 0:e.navigation)==null?void 0:t.globalContext)||{}}updateContextValues(e){const t=Ee.getMicrofrontendIframes();t&&t.length>0&&t.forEach(n=>{n.luigi&&Ee.sendMessageToIframe(n,{msg:"luigi.navigate",context:JSON.stringify(Object.assign({},JSON.parse(n.luigi._lastUpdatedMessage.context),e)),nodeParams:n.luigi._lastUpdatedMessage.nodeParams,pathParams:JSON.stringify(Object.assign({},n.luigi.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(n.luigi.currentNode))),internal:Ee.applyCoreStateData(JSON.parse(n.luigi._lastUpdatedMessage.internal))})}),document.querySelector(".wcContainer")&&document.querySelectorAll("[lui_web_component=true]").forEach(l=>{l.context=Object.assign({},l.context,e)})}};const os=new mk;let bk=class{constructor(){}isAuthorizationEnabled(){return!!te.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&gn.startAuthorization()}logout(){this.isAuthorizationEnabled()&&gn.logout()}async handleAuthEvent(e,t,n,l){const r=await te.executeConfigFnAsync("auth.events."+e,!1,t,n);let a=r===void 0||!!r;if(a&&l){window.location.href=l;return}return a}get store(){return te.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:()=>di.getStorageKey(),getStorageType:()=>di.getStorageType(),getAuthData:()=>di.getAuthData(),setAuthData:e=>di.setAuthData(e),removeAuthData:()=>di.removeAuthData(),setNewlyAuthorized:()=>{di.setNewlyAuthorized(),gn.resetExpirationChecks()}}}};const Z_=new bk,hn={desktopMinWidth:600},vk=[{type:"main",selector:".iframeContainer iframe"},{type:"split-view",selector:".iframeSplitViewCnt iframe"},{type:"modal",selector:".iframeModalCtn._modal iframe"},{type:"drawer",selector:".iframeModalCtn._drawer iframe"},{type:"user-settings",selector:".iframeUserSettingsCtn iframe"}],wk={cssSelector:"[luigi-app-root]"},kk={cssSelector:"[luigi-app-loading-indicator]"};let Sk=class{getLuigiContainer(){return this.getCustomLuigiContainer()||this.getDefaultLuigiContainer()}isCustomLuigiContainer(){return this.getLuigiContainer()===this.getCustomLuigiContainer()}getCustomLuigiContainer(){return document.querySelector(wk.cssSelector)}getDefaultLuigiContainer(){return document.querySelector("body")}getShellbar(){return document.getElementsByClassName("lui-shellbar-wrapper")[0]}getShellbarActions(){return document.getElementsByClassName("lui-shellbar_group--actions")[0]}getMicrofrontends(){return Ee.getMicrofrontendsInDom()}getMicrofrontendIframes(){return Ee.getMicrofrontendIframes()}getCurrentMicrofrontendIframe(){return Ee.getCurrentMicrofrontendIframe()}getNavFooterContainer(){return document.getElementsByClassName("lui-side-nav__footer")[0]}};const X_=new Sk;class Ck{constructor(){this.promises={}}setPromise(e,t){this.promises[e]=t}getPromise(e){return this.promises[e]}}class Tn extends Ck{constructor(e){super(),Object.assign(this,e),this.options={preserveView:!1,nodeParams:{},errorSkipNavigation:!1,fromContext:null,fromParent:!1,fromClosestContext:!1,relative:!1,link:""}}async navigate(e,t,n,l,r){if(this.options.errorSkipNavigation)return this.options.errorSkipNavigation=!1,Promise.reject(new Error("navigation skipped"));this.options.preserveView=t;const a=e[0]!=="/";if(e==="/"&&(n||l||r))return console.warn("Navigation with an absolute path prevented."),Promise.reject(new Error("Navigation with an absolute path prevented."));const o=ie.createRemotePromise(),c={msg:"luigi.navigation.open",params:Object.assign(this.options,{link:e,relative:a,modal:n,splitView:l,drawer:r}),remotePromiseId:o.id};return this.sendPostMessageToLuigiCore(c),o}navigateToIntent(e,t={}){var l;let n="#?intent=";if(n+=e,t&&((l=Object.keys(t))!=null&&l.length)){const r=Object.entries(t);if(r.length>0){n+="?";for(const[a,o]of r)n+=a+"="+o+"&";n=n.slice(0,-1)}}this.navigate(n)}openAsModal(e,t={},n){if(ie.isFunction(n)){const l=ie.createRemotePromise();l.then(r=>{n(r)}),t.onClosePromiseId=l.id}return this.navigate(e,!0,t)}openAsDrawer(e,t={}){return this.navigate(e,!0,void 0,void 0,t)}openAsSplitView(e,t={}){return this.navigate(e,!0,void 0,t),Luigi.splitView.splitViewHandle}fromContext(e){return this.options.fromContext=e,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(e){return e&&Object.assign(this.options.nodeParams,e),this}pathExists(e){if(ie.isFunction(Luigi.pathExists))return Luigi.pathExists(e);console.error("Luigi.navigation().pathExists(path) is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}hasBack(){return Luigi.hasBack()}goBack(e){this.sendPostMessageToLuigiCore({msg:"luigi.navigation.back",goBackContext:e&&JSON.stringify(e)})}getCurrentRoute(){return Luigi._app.ctx[Luigi._app.props.buildPathForGetCurrentRoute](this.options)}sendPostMessageToLuigiCore(e){window.postMessage(e,"*")}}class yk{constructor(){}updateTopNavigation(){window.postMessage({msg:"luigi.navigation.update-badge-counters"},"*")}navigate(e,t,n,l,r){return new Tn().navigate(e,t,n,l,r)}navigateToIntent(e,t){return new Tn().navigateToIntent(e,t)}openAsModal(e,t,n){return new Tn().openAsModal(e,t,n)}openAsSplitView(e,t={}){if(e==="/"){console.warn("Navigation with an absolute path prevented.");return}return new Tn().openAsSplitView(e,t)}openAsDrawer(e,t){return new Tn().openAsDrawer(e,t)}fromContext(e){return new Tn().fromContext(e)}fromClosestContext(){return new Tn().fromClosestContext()}fromVirtualTreeRoot(){return new Tn().fromVirtualTreeRoot()}fromParent(){return new Tn().fromParent()}getCurrentRoute(){return new Tn().getCurrentRoute()}withParams(e){return new Tn().withParams(e)}pathExists(e){return new Tn().pathExists(e)}hasBack(){return new Tn().hasBack()}goBack(e){return new Tn().goBack(e)}}const $_=new yk,Pk={luigi:{unsavedChangesAlert:{header:"Unsaved changes detected",body:"Unsaved changes will be lost. Do you want to continue?"},confirmationModal:{header:"Confirmation",body:"Are you sure you want to do this?"},button:{dismiss:"No",confirm:"Yes"},requestedRouteNotFound:"Could not find the requested route {route}.",notExactTargetNode:"Could not map the exact target node for the requested route {route}.",navigation:{up:"Up"}}},Ik=Pk;class Nk{constructor(){this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.translationTable=Ik,this.listeners={}}_init(){bn.doOnStoreChange(window.Luigi._store,()=>{this._initCustomImplementation()},["settings"])}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(e){e&&(sessionStorage.setItem(this.currentLocaleStorageKey,e),this._notifyLocaleChange(e))}addCurrentLocaleChangeListener(e){if(ie.isFunction(e)){const t=ie.getRandomId();return this.listeners[t]=e,t}else console.error("Provided locale change listener is not a function.")}removeCurrentLocaleChangeListener(e){e&&this.listeners[e]?delete this.listeners[e]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}_notifyLocaleChange(e){Object.getOwnPropertyNames(this.listeners).forEach(t=>{this.listeners[t](e)}),os.configChanged()}_initCustomImplementation(){this.translationImpl=os.getConfigValue("settings.customTranslationImplementation"),ie.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}getTranslation(e,t=void 0,n=void 0){if(!e)return"";if(this.translationImpl){const r=this.translationImpl.getTranslation(e,t,n);if(r!==e)return r}const l=this.findTranslation(e,this.translationTable,t);return l||e}findTranslation(e,t,n){let l=e.split(".");for(let r=0;r<l.length;r++){let a=l[r];if(t.hasOwnProperty(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("{"+Sr.escapeKeyForRegexp(n)+"}","gi"),t[n])}),e}}const x_=new Nk;class Tk{sendToAll(e){const t=ss.convertCustomMessageUserToInternal(e);Ee.getMicrofrontendsInDom().map(n=>n.container).map(n=>Ee.sendMessageToIframe(n,t))}send(e,t){const n=ss.convertCustomMessageUserToInternal(t);Ee.getMicrofrontendsInDom().filter(l=>l.id===e).map(l=>l.container).map(l=>Ee.sendMessageToIframe(l,n))}}const Lk=new Tk,hr=[];function Ak(i,e){return{subscribe:vr(i,e).subscribe}}function vr(i,e=Ue){let t;const n=new Set;function l(o){if(Dt(i,o)&&(i=o,t)){const c=!hr.length;for(const h of n)h[1](),hr.push(h,i);if(c){for(let h=0;h<hr.length;h+=2)hr[h][0](hr[h+1]);hr.length=0}}}function r(o){l(o(i))}function a(o,c=Ue){const h=[o,c];return n.add(h),n.size===1&&(t=e(l,r)||Ue),o(i),()=>{n.delete(h),n.size===0&&t&&(t(),t=null)}}return{set:l,update:r,subscribe:a}}class Ek{initial(){this.responsiveNavSetting=te.getConfigValue("settings.responsiveNavigation");const e=this.responsiveNavSetting==="semiCollapsible"||this.responsiveNavSetting==="Fiori3";JSON.parse(localStorage.getItem(le.COL_NAV_KEY))!==!1&&e&&(this.isSemiCollapsed=this.getCollapsed()),this.semiCollapsible=!!e;let t=this.isSemiCollapsed===void 0;return this.semiCollapsible&&window.innerWidth!==0&&window.innerWidth<hn.desktopMinWidth?this.isSemiCollapsed=t?!0:this.getCollapsed():this.isSemiCollapsed=t?!1:this.getCollapsed(),this.setCollapsed(this.isSemiCollapsed),this.previousWindowWidth=window.innerWidth,{isSemiCollapsed:this.isSemiCollapsed,semiCollapsible:this.semiCollapsible}}onValueChanged(e){this.valueChangedFns?this.valueChangedFns.push(e):this.valueChangedFns=[e]}onResize(e){const t=window.innerWidth!==0&&window.innerWidth<hn.desktopMinWidth&&this.previousWindowWidth>=hn.desktopMinWidth,n=window.innerWidth!==0&&window.innerWidth>hn.desktopMinWidth&&this.previousWindowWidth>=hn.desktopMinWidth;return t&&this.setCollapsed(!0,!1),!this.isStoredCollapsed()&&n&&this.setCollapsed(!1,!1),e=this.closePopupMenu(e),{isSemiCollapsed:this.isSemiCollapsed,selectedCategory:e}}setCollapsed(e,t=!0){document.body.classList.remove("semiCollapsed"),e&&document.body.classList.add("semiCollapsed"),this.isSemiCollapsed=e,t&&localStorage.setItem(le.COL_NAV_KEY,e),this.valueChangedFns instanceof Array&&this.valueChangedFns.forEach(n=>n({isSemiCollapsed:this.isSemiCollapsed}))}isStoredCollapsed(){return JSON.parse(localStorage.getItem(le.COL_NAV_KEY))}getCollapsed(){return this.isStoredCollapsed()?!0:this.isSemiCollapsed}closePopupMenu(e){var t;return e&&(e=null,(t=document.getElementsByClassName("fd-app__sidebar")[0])==null||t.classList.remove("isBlocked")),e}buttonClicked(e){return this.closePopupMenu(),this.getCollapsed()?this.setCollapsed(!1):(this.setCollapsed(!0),document.getElementsByClassName("lui-fd-side-nav-wrapper")[0]&&(document.getElementsByClassName("lui-fd-side-nav-wrapper")[0].setAttribute("style","overflow-y:hidden;"),window.setTimeout(function(){document.getElementsByClassName("lui-fd-side-nav-wrapper")[0].setAttribute("style","overflow-y:auto;")}))),this.isSemiCollapsed}}const vi=new Ek;let Rk=class{constructor(){this.documentTitle=vr()}hideAppLoadingIndicator(){const e=document.querySelector(kk.cssSelector);e&&(e.classList.add("hidden"),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},500))}showAlert(e){if(ie.isFunction(Luigi.showAlert))return Luigi.showAlert(e);console.error("Luigi.ux().showAlert() is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}showConfirmationModal(e){if(ie.isFunction(Luigi.showConfirmationModal))return Luigi.showConfirmationModal(e);console.error("Luigi.ux().showConfirmationModal() is only available inside your configuration, after the configuration was initialized with Luigi.setConfig().")}setDocumentTitle(e){this.documentTitle.set(e),Luigi.configChanged("settings.header")}getDocumentTitle(){return hl(this.documentTitle)}collapseLeftSideNav(e){vi.setCollapsed(e)}openUserSettings(){Luigi.openUserSettings()}closeUserSettings(){Luigi.closeUserSettings()}removeBackdrop(){new Tn().sendPostMessageToLuigiCore({msg:"luigi.remove-backdrop"})}getDirtyStatus(){return Luigi.getDirtyStatus()}getCurrentTheme(){return Luigi.theming().getCurrentTheme()}};const ep=new Rk;let Dk=class{openSearchField(){Luigi.openSearchField()}closeSearchField(){Luigi.closeSearchField()}clearSearchField(){Luigi.clearSearchField()}showSearchResult(e){Luigi.showSearchResult(e)}closeSearchResult(){Luigi.closeSearchResult()}getSearchString(){return Luigi.getGlobalSearchString()}setSearchString(e){Luigi.setGlobalSearchString(e)}setSearchInputPlaceholder(e){Luigi.setSearchInputPlaceholder(e)}};const tp=new Dk;let Vk=class{constructor(){this.currentTheme}async getAvailableThemes(){return await te.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(e){this.currentTheme=e,window.Luigi.__cssVars=void 0}async getThemeObject(e){const t=await this.getAvailableThemes();return t&&t.find(n=>n.id===e)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.currentTheme)return this.currentTheme;const e=te.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!!te.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const e=te.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 l=getComputedStyle(document.documentElement).getPropertyValue("--"+n);l&&(window.Luigi.__cssVars[n]=l)})}catch(t){ie.isFunction(te.getConfigValue("settings.theming.variables.errorHandling"))?te.getConfigValue("settings.theming.variables.errorHandling")(t):console.error("CSS variables file error: ",t)}else te.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=()=>{const t=te.getConfigValue("settings.theming");t&&t.nodeViewURLDecorator&&t.nodeViewURLDecorator.queryStringParameter&&$r.add({type:"queryString",uid:"theming",key:t.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const n=this.getCurrentTheme(),l=t.nodeViewURLDecorator.queryStringParameter.value;return l?l(n):n}}),t&&t.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")};bn.doOnStoreChange(window.Luigi._store,()=>{e()},["settings.theming"])}};const np=new Vk;let Ok=class{constructor(){this.featureToggleList=vr([])}setFeatureToggle(e,t=!1){this.isValid(e)&&(e.startsWith("!")&&!t||this.isDuplicatedOrDisabled(e)||hl(this.featureToggleList).push(e))}unsetFeatureToggle(e){if(!this.isValid(e))return;const t=hl(this.featureToggleList).indexOf(e);if(t===-1){console.warn("Feature toggle name is not in the list.");return}hl(this.featureToggleList).splice(t,1)}getActiveFeatureToggleList(){return[...hl(this.featureToggleList)].filter(e=>!e.startsWith("!"))}isValid(e){return ie.isString(e)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(e){return hl(this.featureToggleList).includes(e)?(console.warn("Feature toggle name already exists"),!0):hl(this.featureToggleList).includes(`!${e}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}};const ip=new Ok;let Mk=class{constructor(){}getSearchParams(){const e={},t=new URL(location);if(te.getConfigValue("routing.useHashRouting"))for(const[n,l]of new URLSearchParams(t.hash.split("?")[1]))e[n]=l;else for(const[n,l]of t.searchParams.entries())e[n]=l;return e}addSearchParams(e,t){if(!ie.isObject(e)){console.log("Params argument must be an object");return}const n=new URL(location);te.getConfigValue("routing.useHashRouting")?n.hash=me.addParamsOnHashRouting(e,n.hash):me.modifySearchParams(e,n.searchParams),this.handleBrowserHistory(t,n),te.configChanged()}addNodeParams(e,t){if(!ie.isObject(e)){console.log("Params argument must be an object");return}const n=me.getContentViewParamPrefix(),l=new URL(location);te.getConfigValue("routing.useHashRouting")?l.hash=me.addParamsOnHashRouting(e,l.hash,n):me.modifySearchParams(e,l.searchParams,n),this.handleBrowserHistory(t,l),te.configChanged()}sanitizeUrl(e){return new URL(location).origin===new URL(e).origin?e:void 0}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)}getAnchor(){const{hash:e}=new URL(location);return te.getConfigValue("routing.useHashRouting")&&e.split("#").length===2?"":e.split("#").pop()}setAnchor(e){if(te.getConfigValue("routing.useHashRouting")){const{hash:t}=new URL(location),n=t.split("#"),r=n.length>2?n.slice(0,-1):n;window.location.hash=[...r,e].join("#")}else window.location.hash=e}};const lp=new Mk,te=os,wi=Z_,ji=X_,rp=$_,Et=x_,na=ep,Fk=tp,Ho=np,Ko=ip,gl=lp;window.Luigi=os;window.Luigi.auth=()=>Z_;window.Luigi.elements=()=>X_;window.Luigi.navigation=()=>$_;window.Luigi.i18n=()=>x_;window.Luigi.customMessages=()=>Lk;window.Luigi.ux=()=>ep;window.Luigi.globalSearch=()=>tp;window.Luigi.theming=()=>np;window.Luigi.featureToggles=()=>ip;window.Luigi.routing=()=>lp;class Uk{constructor(){this.iframeNavFallbackTimeout=2e3,this.timeoutHandle}getActiveIframe(e){return[...e.children].filter(n=>n.tagName==="IFRAME").find(ie.isElementVisible)}setActiveIframeToPrevious(e){const t=Ee.getMainIframes(),n=this.getPreservedViewsInDom(t);if(n.length===0)return;const l=this.getActiveIframe(e);Ee.hideElementChildren(e),l&&e.removeChild(l),n[0].pv=void 0,n[0].style.display="block"}removeInactiveIframes(e){Array.from(e.children).forEach(n=>{!ie.isElementVisible(n)&&!n.vg&&n.tagName==="IFRAME"&&e.removeChild(n)})}hasIsolatedView(e,t,n){return e||n&&e!==!1&&!t}getPreservedViewsInDom(e){return e.filter(t=>t.pv)}canCache(e){const t=le.getViewGroupSettings(e);return t&&t.preloadUrl}notifyInactiveIframes(){const e={msg:"luigi-client.inactive-microfrontend",context:JSON.stringify({}),nodeParams:JSON.stringify({}),pathParams:JSON.stringify({}),internal:JSON.stringify({currentLocale:Et.getCurrentLocale()})};Ee.sendMessageToVisibleIframes(e)}switchActiveIframe(e,t,n){const l=this.getActiveIframe(e);if(l!==t){let r=!1;Array.from(e.children).forEach(o=>{if(o===l)if(n)e.removeChild(o);else{const c=le.getViewGroupSettings(o.vg);if(c&&this.notifyInactiveIframes(),o.style.display="none",c.preloadUrl){const h={msg:"luigi.navigate",viewUrl:c.preloadUrl,context:JSON.stringify({}),nodeParams:JSON.stringify({}),pathParams:JSON.stringify({}),internal:JSON.stringify({currentLocale:Et.getCurrentLocale()})};Ee.sendMessageToIframe(o,h)}}o===t&&(r=!0)}),t&&(t.style.display="block",r||e.insertBefore(t,e.firstChild))}return t}setOkResponseHandler(e,t,n){var r,a;(a=le.getViewGroupSettings((r=e.iframe)==null?void 0:r.vg))!=null&&a.noClientCheck||(this.timeoutHandle=setTimeout(async()=>{e.navigateOk?e.navigateOk=void 0:(Ee.removeIframe(e.iframe,n),e.iframe=void 0,e.isFallbackFrame=!0,console.info("navigate: luigi-client did not respond, using fallback by replacing iframe"),await this.navigateIframe(e,t,n))},this.iframeNavFallbackTimeout))}checkIframe(e,t,n,l,r){this.timeoutHandle=setTimeout(()=>{t.get().showLoadingIndicator&&(e.viewUrl?(n=e.viewUrl,t.set({viewUrl:n}),this.iframeNavFallbackTimeout=0,this.setOkResponseHandler(l,t,r)):le.handleUnresponsiveClient(e))},e.timeout)}initHandshakeFailed(e){var l;if(!(e&&e.iframe&&e.iframe.luigi))return!0;const t=e.iframe.luigi.clientVersion;return((l=le.getViewGroupSettings(e.iframe.vg))==null?void 0:l.noClientCheck)?!1:e.iframe.luigi.initOk===void 0?!0:!t||ie.semverCompare("1.1.1",t)!==-1?!1:!e.iframe.luigi.initOk}async navigateIframe(e,t,n){clearTimeout(this.timeoutHandle);const l=t.get();let r=l.viewUrl;r&&(r=me.substituteViewUrl(r,l));const a=Ee.isSameViewGroup(e,t),o=this.hasIsolatedView(l.previousNodeValues.isolateView,a,e.isolateAllViews),c=this.hasIsolatedView(l.isolateView,a,e.isolateAllViews),h=Ee.canReuseIframe(e,t);let d=this.getActiveIframe(n);const g=Ee.getMainIframes(),p=this.getPreservedViewsInDom(g);let b,m=!1;if(p.length>0&&(b=p.shift(),b===d&&(m=!0,d=void 0,e.iframe=void 0)),!m&&!t.get().isNavigateBack){d&&o&&(d=this.switchActiveIframe(n,void 0,!0)),d&&c&&(d=this.switchActiveIframe(n,void 0,!d.vg));let v;if(!c&&l.viewGroup){const y=Ee.getMainIframes().filter(P=>P.vg===l.viewGroup);y.length>0&&(v=y[0],d=this.switchActiveIframe(n,v,d&&!d.vg))}d&&!v&&(d.vg?d=this.switchActiveIframe(n,void 0,!1):h||(d=this.switchActiveIframe(n,void 0,!0))),e.iframe=d}if(!e.iframe||this.initHandshakeFailed(e)){if(e.iframe&&n.removeChild(e.iframe),m?(this.notifyInactiveIframes(),Ee.hideElementChildren(n)):Ee.removeElementChildren(n),l.viewUrl){ie.getConfigValueFromObject(l,"currentNode.loadingIndicator.enabled")!==!1?t.set({showLoadingIndicator:!0}):t.set({showLoadingIndicator:!1}),e.navigateOk=void 0;const v=l.viewGroup&&!c&&this.canCache(l.viewGroup);e.iframe=Ee.createIframe(r,v?l.viewGroup:void 0,t.get().currentNode,"main",l),n.insertBefore(e.iframe,n.firstChild),e.builderCompatibilityMode?e.iframe.addEventListener("load",()=>{e.iframe._ready=!0;const y=["init",JSON.stringify(l.context)];Ee.sendMessageToIframe(e.iframe,y)}):e.iframe.addEventListener("load",()=>{e.iframe._ready=!0});const C=l.currentNode.pageErrorHandler;C?this.checkIframe(C,t,r,e,n):e.defaultPageErrorHandler&&this.checkIframe(e.defaultPageErrorHandler,t,r,e,n)}}else{t.set({showLoadingIndicator:!1});const v=t.get().goBackContext;e.iframe.style.display="block",e.iframe.luigi.nextViewUrl=r,e.iframe.luigi.nextClientPermissions=t.get().currentNode.clientPermissions,e.iframe.vg=this.canCache(l.viewGroup)?l.viewGroup:void 0,e.iframe.luigi.currentNode=l.currentNode;const C=await t.prepareInternalData(e),y={msg:"luigi.navigate",viewUrl:r,context:JSON.stringify(Object.assign({},l.context,{goBackContext:v})),nodeParams:JSON.stringify(Object.assign({},l.nodeParams)),pathParams:JSON.stringify(Object.assign({},l.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(e.iframe.luigi.currentNode))),internal:JSON.stringify(C)};l.isNavigationSyncEnabled?(Ee.getVisibleIframes().forEach(N=>{N!==e.iframe&&(N.userSettingsGroup?Luigi.readUserSettings().then(I=>{Ee.sendMessageToIframe(N,{msg:"luigi.navigate",context:{userSettingsData:I[N.userSettingsGroup]},internal:Ee.applyCoreStateData(N.luigi._lastUpdatedMessage.internal)})}):Ee.sendMessageToIframe(N,{msg:"luigi.navigate",context:N.luigi._lastUpdatedMessage.context,nodeParams:N.luigi._lastUpdatedMessage.nodeParams,pathParams:JSON.stringify(Object.assign({},N.luigi.pathParams)),searchParams:JSON.stringify(Object.assign({},me.prepareSearchParamsForClient(e.iframe.luigi.currentNode))),internal:Ee.applyCoreStateData(N.luigi._lastUpdatedMessage.internal)}))}),Ee.sendMessageToIframe(e.iframe,y),this.setOkResponseHandler(e,t,n)):t.set({isNavigationSyncEnabled:!0}),t.set({goBackContext:void 0,isNavigateBack:!1})}}}const ci=new Uk;class Bk{constructor(){this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(e=3,t){if(te.getConfigValue("navigation.preloadViewGroups")===!1)return;const l=le.getAllViewGroupSettings();if(!l)return;const r=Ee.getIframeContainer(),a=Ee.getMainIframes(),o=new Date().getTime();if(a.filter(g=>g.luigi&&g.luigi.preloading&&o-g.luigi.createdAt<3e4).length>0){console.debug("skipping view group preloading (busy)");return}const h=a.map(g=>g.vg).filter(Boolean),d=Object.entries(l).filter(([g,p])=>!h.includes(g)).filter(([g,p])=>p&&p.preloadUrl);t&&d.forEach(([g,p])=>{p.loadOnStartup&&this.preloadIframeOnBackground(p,g,r)}),!t&&d.filter((g,p)=>p<e).forEach(([g,p])=>{console.debug("preloading view group "+g+" - "+p.preloadUrl),this.preloadIframeOnBackground(p,g,r)})}preloadIframeOnBackground(e,t,n){const l=Ee.createIframe(e.preloadUrl,t,null,"main");l.style.display="none",l.luigi.preloading=!0,n.appendChild(l)}preload(e){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,e)},e),this.shouldPreload=!0}viewGroupLoaded(e){if(e.luigi.preloading){const t=new Date().getTime()-e.luigi.createdAt;let n=1;t<500?n=3:t<1e3&&(n=2),this.preloadBatchSize=n,console.debug("preload batch size: "+this.preloadBatchSize),setTimeout(()=>{e.luigi.preloading=!1},this.preloadBatchSize>2?500:1e3)}}}const gr=new Bk;class Hk{async getNavigationPath(e,t=""){try{const n=ie.getTrimmedUrl(t);if(!e)return console.error("No navigation nodes provided in the configuration."),[{}];let l;if(Qn.hasRootNode()&&(l=Qn.getRootNode().node),!l){const g=await e;ie.isObject(g)?(l=g,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:g},l.children=await this.getChildren(l),Qn.setRootNode(l)}const r=n.split("/"),o={...te.getConfigValue("navigation.globalContext")||{},...l.context||{}},c=await this.buildNode(r,[l],l.children,o),h=c.navigationPath.filter(g=>g.pathSegment).map(g=>g.pathSegment);c.isExistingRoute=!n||r.length===h.length;const d=n.split("/");return c.matchedPath=d.filter((g,p)=>h[p]&&h[p].startsWith(":")||h[p]===g).join("/"),c}catch(n){console.error("Failed to load top navigation nodes.",n)}}async getChildren(e,t){if(!e)return[];let n=[];if(Qn.hasChildren(e)){let r=Qn.getChildren(e);r&&(n=r.children)}else try{n=await as.getConfigValueFromObjectAsync(e,"children",t||e.context),n==null&&(n=[]),n=n.map(r=>this.getExpandStructuralPathSegment(r)).map(r=>this.bindChildToParent(r,e))||[]}catch(r){console.error("Could not lazy-load children for node",r)}let l=this.getAccessibleNodes(e,n,t);return Qn.setChildren(e,{children:n,filteredChildren:l}),l}async getFilteredChildren(e){return Qn.hasChildren(e)?qt.getChildrenFromCache(e):await qt.getChildren(e)}getChildrenFromCache(e){let t=Qn.getChildren(e);return t?t.filteredChildren:[]}getAccessibleNodes(e,t,n){return t?t.filter(l=>le.isNodeAccessPermitted(l,e,n)):[]}bindChildToParent(e,t){return t&&t.pathSegment&&(e.parent=t),e}getExpandStructuralPathSegment(e){if(e&&e.pathSegment&&e.pathSegment.indexOf("/")!==-1){const t=e.pathSegment.split("/"),n={...e},l=(r,a)=>{const o=r.shift();let c={};return r.length?(c.pathSegment=o,a.hideFromNav&&(c.hideFromNav=a.hideFromNav),c.children=[l(r,a)]):(c=n,c.pathSegment=o),c};return l(t,e)}return e}async buildNode(e,t,n,l,r={}){l.parentNavigationContexts||(l.parentNavigationContexts=[]);let a={navigationPath:t,context:l,pathParams:r};if(e.length>0&&n&&n.length>0){const o=e[0],c=this.findMatchingNode(o,n);if(c){t.push(c);let h=le.applyContext(l,c.context,c.navigationContext);c.pathSegment.startsWith(":")&&(r[c.pathSegment.replace(":","")]=Sr.sanitizeParam(o)),h=me.substituteDynamicParamsInObject(h,r);try{this.buildVirtualTree(c,e,r);let d=await this.getChildren(c,h);const g=e.slice(1);a=this.buildNode(g,t,d,h,r)}catch(d){console.error("Error getting nodes children",d)}}}return a}buildVirtualViewUrl(e,t,n){let l="";for(const r in t)r.startsWith("virtualSegment")&&(l+=":"+r+"/");return n?(l+=":virtualSegment_"+n+"/",e+"/"+l):e}buildVirtualTree(e,t,n){const l=e.virtualTree,r=e._virtualTree,a=e._virtualViewUrl||e.viewUrl;if((l||r)&&t[0]){let o=e._virtualPathIndex;if(l&&(o=0,e.keepSelectedForChildren=!0),o>50)return;o++;const h=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],d=ie.removeProperties(e,h);Object.assign(d,{pathSegment:":virtualSegment_"+o,label:":virtualSegment_"+o,viewUrl:ie.trimTrailingSlash(this.buildVirtualViewUrl(a,n,o)),_virtualTree:!0,_virtualPathIndex:o,_virtualViewUrl:a});const g=Array.isArray(e.children)&&e.children.length>0?e.children[0]._virtualTree:!1;e.children&&!g&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
2
2
  Children nodes are redundant and ignored when virtualTree is enabled.
3
3
  Please refer to documentation`),e.children=[d]}}findMatchingNode(e,t){let n=null;const l=t.filter(a=>!!a.pathSegment).length,r=t.filter(a=>a.pathSegment&&a.pathSegment.startsWith(":")).length;return e=e.includes("#")?e.split("#").shift():e,l>1&&(r===1&&(console.warn(`Invalid node setup detected.
4
4
  Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.