UNPKG

20.6 kBJavaScriptView Raw
1/* single-spa@5.9.2 - SystemJS - prod */
2System.register(["single-spa"],(function(t){"use strict";var n;return{setters:[function(t){n=t.LOAD_ERROR}],execute:function(){t({addErrorHandler:s,checkActivityFunctions:At,ensureJQuerySupport:pt,getAppNames:Tt,getAppStatus:Pt,getMountedApps:Ot,mountRootParcel:$,navigateToUrl:rt,pathToActiveWhen:Dt,registerApplication:bt,removeErrorHandler:f,setBootstrapMaxTime:J,setMountMaxTime:Q,setUnloadMaxTime:q,setUnmountMaxTime:V,start:Gt,triggerAppChange:jt,unloadApplication:St,unregisterApplication:Nt});var e=Object.freeze({__proto__:null,get start(){return Gt},get ensureJQuerySupport(){return pt},get setBootstrapMaxTime(){return J},get setMountMaxTime(){return Q},get setUnmountMaxTime(){return V},get setUnloadMaxTime(){return q},get registerApplication(){return bt},get unregisterApplication(){return Nt},get getMountedApps(){return Ot},get getAppStatus(){return Pt},get unloadApplication(){return St},get checkActivityFunctions(){return At},get getAppNames(){return Tt},get pathToActiveWhen(){return Dt},get navigateToUrl(){return rt},get triggerAppChange(){return jt},get addErrorHandler(){return s},get removeErrorHandler(){return f},get mountRootParcel(){return $},get NOT_LOADED(){return h},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return d},get BOOTSTRAPPING(){return v},get NOT_MOUNTED(){return w},get MOUNTING(){return g},get UPDATING(){return y},get LOAD_ERROR(){return T},get MOUNTED(){return E},get UNMOUNTING(){return O},get SKIP_BECAUSE_BROKEN(){return P}});function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var i=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,u=function(){try{var t=new i("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?i:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},a=[];function c(t,n,e){var r=p(t,n,e);a.length?a.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function s(t){if("function"!=typeof t)throw Error(l(28,!1));a.push(t)}function f(t){if("function"!=typeof t)throw Error(l(29,!1));var n=!1;return a=a.filter((function(e){var r=e===t;return n=n||r,!r})),n}function l(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function p(t,n,e){var r,o="".concat(_(n)," '").concat(N(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(l(30,!1,n.status,N(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=N(n),n.status=e,r}var h=t("NOT_LOADED","NOT_LOADED"),m=t("LOADING_SOURCE_CODE","LOADING_SOURCE_CODE"),d=t("NOT_BOOTSTRAPPED","NOT_BOOTSTRAPPED"),v=t("BOOTSTRAPPING","BOOTSTRAPPING"),w=t("NOT_MOUNTED","NOT_MOUNTED"),g=t("MOUNTING","MOUNTING"),E=t("MOUNTED","MOUNTED"),y=t("UPDATING","UPDATING"),O=t("UNMOUNTING","UNMOUNTING"),T=t("LOAD_ERROR","LOAD_ERROR"),P=t("SKIP_BECAUSE_BROKEN","SKIP_BECAUSE_BROKEN");function b(t){return t.status===E}function A(t){try{return t.activeWhen(window.location)}catch(n){return c(n,t,P),!1}}function N(t){return t.name}function S(t){return Boolean(t.unmountThisParcel)}function _(t){return S(t)?"parcel":"application"}function U(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function D(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function M(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!D(n,(function(t){return"function"!=typeof t}))));var n}function R(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=_(t),o=N(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return L(e)?e:Promise.reject(l(15,!1,r,o,n,u))}))}),Promise.resolve())}}function L(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function j(t,n){return Promise.resolve().then((function(){return t.status!==d?t:(t.status=v,t.bootstrap?z(t,"bootstrap").then(e).catch((function(e){if(n)throw p(e,t,P);return c(e,t,P),t})):Promise.resolve().then(e))}));function e(){return t.status=w,t}}function I(t,n){return Promise.resolve().then((function(){if(t.status!==E)return t;t.status=O;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw p(r,t,P);c(r,t,P)}))})).then((function(){return t}));function r(){return z(t,"unmount").then((function(){t.status=w})).catch((function(e){if(n)throw p(e,t,P);c(e,t,P)}))}}))}var x=!1,B=!1;function G(t,n){return Promise.resolve().then((function(){return t.status!==w?t:(x||(window.dispatchEvent(new u("single-spa:before-first-mount")),x=!0),z(t,"mount").then((function(){return t.status=E,B||(window.dispatchEvent(new u("single-spa:first-mount")),B=!0),t})).catch((function(e){return t.status=E,I(t,!0).then(r,r);function r(){if(n)throw p(e,t,P);return c(e,t,P),t}})))}))}var C=0,W={parcels:{}};function $(){return k.apply(W,arguments)}function k(t,n){var e=this;if(!t||"object"!==r(t)&&"function"!=typeof t)throw Error(l(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(l(3,!1,r(t.name)));if("object"!==r(n))throw Error(l(4,!1,name,r(n)));if(!n.domElement)throw Error(l(5,!1,name));var o,i=C++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},c={id:i,parcels:{},status:u?m:d,customProps:n,parentName:N(e),unmountThisParcel:function(){return g.then((function(){if(c.status!==E)throw Error(l(6,!1,name,c.status));return I(c,!0)})).then((function(t){return c.parentName&&delete e.parcels[c.id],t})).then((function(t){return f(t),t})).catch((function(t){throw c.status=P,h(t),t}))}};e.parcels[i]=c;var s=a();if(!s||"function"!=typeof s.then)throw Error(l(7,!1));var f,h,v=(s=s.then((function(t){if(!t)throw Error(l(8,!1));var n=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!M(t.bootstrap))throw Error(l(9,!1,n));if(!M(t.mount))throw Error(l(10,!1,n));if(!M(t.unmount))throw Error(l(11,!1,n));if(t.update&&!M(t.update))throw Error(l(12,!1,n));var e=R(t,"bootstrap"),r=R(t,"mount"),u=R(t,"unmount");c.status=d,c.name=n,c.bootstrap=e,c.mount=r,c.unmount=u,c.timeouts=X(t.timeouts),t.update&&(c.update=R(t,"update"),o.update=function(t){return c.customProps=t,K(function(t){return Promise.resolve().then((function(){if(t.status!==E)throw Error(l(32,!1,N(t)));return t.status=y,z(t,"update").then((function(){return t.status=E,t})).catch((function(n){throw p(n,t,P)}))}))}(c))})}))).then((function(){return j(c,!0)})),g=v.then((function(){return G(c,!0)})),O=new Promise((function(t,n){f=t,h=n}));return o={mount:function(){return K(Promise.resolve().then((function(){if(c.status!==w)throw Error(l(13,!1,name,c.status));return e.parcels[i]=c,G(c)})))},unmount:function(){return K(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:K(s),bootstrapPromise:K(v),mountPromise:K(g),unmountPromise:K(O)}}function K(t){return t.then((function(){return null}))}function F(t){var n=N(t),o="function"==typeof t.customProps?t.customProps(n,window.location):t.customProps;("object"!==r(o)||null===o||Array.isArray(o))&&(o={},console.warn(l(40,!1),n,o));var i=U({},o,{name:n,mountParcel:k.bind(t),singleSpa:e});return S(t)&&(i.unmountSelf=t.unmountThisParcel),i}var H={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function J(t,n,e){if("number"!=typeof t||t<=0)throw Error(l(16,!1));H.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function Q(t,n,e){if("number"!=typeof t||t<=0)throw Error(l(17,!1));H.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function V(t,n,e){if("number"!=typeof t||t<=0)throw Error(l(18,!1));H.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function q(t,n,e){if("number"!=typeof t||t<=0)throw Error(l(19,!1));H.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function z(t,n){var e=t.timeouts[n],r=e.warningMillis,o=_(t);return new Promise((function(i,u){var a=!1,c=!1;t[n](F(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),e.millis);var s=l(31,!1,n,o,N(t),e.millis);function f(t){if(!a)if(!0===t)c=!0,e.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var n=t,o=n*r;console.warn(s),o+r<e.millis&&setTimeout((function(){return f(n+1)}),r)}}}))}function X(t){var n={};for(var e in H)n[e]=U({},H[e],t&&t[e]||{});return n}function Y(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==h&&t.status!==T?t:(t.status=m,t.loadPromise=Promise.resolve().then((function(){var o=t.loadApp(F(t));if(!L(o))throw e=!0,Error(l(33,!1,N(t)));return o.then((function(e){var o;t.loadErrorTime=null,"object"!==r(n=e)&&(o=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!M(n.bootstrap)&&(o=35),M(n.mount)||(o=36),M(n.unmount)||(o=37);var i=_(n);if(o){var u;try{u=JSON.stringify(n)}catch(t){}return console.error(l(o,!1,i,N(t),u),n),c(void 0,t,P),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=U({},t.devtools.overlays,n.devtools.overlays)),t.status=d,t.bootstrap=R(n,"bootstrap"),t.mount=R(n,"mount"),t.unmount=R(n,"unmount"),t.unload=R(n,"unload"),t.timeouts=X(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var r;return delete t.loadPromise,e?r=P:(r=T,t.loadErrorTime=(new Date).getTime()),c(n,t,r),t})));var n,e}))}var Z,tt="undefined"!=typeof window,nt={hashchange:[],popstate:[]},et=["hashchange","popstate"];function rt(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(l(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=ft(window.location.href),r=ft(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function ot(t){var n=this;if(t){var e=t[0].type;et.indexOf(e)>=0&&nt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function it(){It([],arguments)}function ut(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Z&&e===o||(Ct()?window.dispatchEvent(at(window.history.state,n)):It([])),r}}function at(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}if(tt){window.addEventListener("hashchange",it),window.addEventListener("popstate",it);var ct=window.addEventListener,st=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&et.indexOf(t)>=0)||D(nt[t],(function(t){return t===n})))return ct.apply(this,arguments);nt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&et.indexOf(t)>=0))return st.apply(this,arguments);nt[t]=nt[t].filter((function(t){return t!==n}))},window.history.pushState=ut(window.history.pushState,"pushState"),window.history.replaceState=ut(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(l(41,!1)):window.singleSpaNavigate=rt}function ft(t){var n=document.createElement("a");return n.href=t,n}var lt=!1;function pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!lt){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return ht.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return ht.call(this,e,window.removeEventListener,t,n,arguments)},lt=!0}}function ht(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){et.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var mt={};function dt(t){return Promise.resolve().then((function(){var e=mt[N(t)];if(!e)return t;if(t.status===h)return vt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==w&&t.status!==n)return t;var r=t.status===n?Promise.resolve():z(t,"unload");return t.status="UNLOADING",r.then((function(){return vt(t,e),t})).catch((function(n){return function(t,n,e){delete mt[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,c(e,t,P),n.reject(e)}(t,e,n),t}))}))}function vt(t,n){delete mt[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=h,n.resolve()}function wt(t,n,e,r){mt[N(t)]={app:t,resolve:e,reject:r},Object.defineProperty(mt[N(t)],"promise",{get:n})}function gt(t){return mt[t]}var Et=[];function yt(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return Et.forEach((function(i){var u=i.status!==P&&A(i);switch(i.status){case T:u&&o-i.loadErrorTime>=200&&e.push(i);break;case h:case m:u&&e.push(i);break;case d:case w:!u&&gt(N(i))?t.push(i):u&&r.push(i);break;case E:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Ot(){return Et.filter(b).map(N)}function Tt(){return Et.map(N)}function Pt(t){var n=D(Et,(function(n){return N(n)===t}));return n?n.status:null}function bt(t,n,e,o){var i=function(t,n,e,o){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===r(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(l(39,!1));var n=["name","app","activeWhen","customProps"],e=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==e.length)throw Error(l(38,!1,n.join(", "),e.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(l(20,!1));if("object"!==r(t.app)&&"function"!=typeof t.app)throw Error(l(20,!1));var o=function(t){return"string"==typeof t||"function"==typeof t};if(!(o(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(o)))throw Error(l(24,!1));if(!Ut(t.customProps))throw Error(l(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(l(20,!1));if(!n)throw Error(l(23,!1));if("function"!=typeof e)throw Error(l(24,!1));if(!Ut(r))throw Error(l(22,!1))}(t,n,e,o),u.name=t,u.loadApp=n,u.activeWhen=e,u.customProps=o),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:Dt(t)})),function(t){return n.some((function(n){return n(t)}))}}(u.activeWhen),u}(t,n,e,o);if(-1!==Tt().indexOf(i.name))throw Error(l(21,!1,i.name));Et.push(U({loadErrorTime:null,status:h,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),tt&&(pt(),It())}function At(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Et.filter((function(n){return n.activeWhen(t)})).map(N)}function Nt(t){if(0===Et.filter((function(n){return N(n)===t})).length)throw Error(l(25,!1,t));return St(t).then((function(){var n=Et.map(N).indexOf(t);Et.splice(n,1)}))}function St(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(l(26,!1));var e=D(Et,(function(n){return N(n)===t}));if(!e)throw Error(l(27,!1,t));var r,o=gt(N(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){wt(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,_t(e,o.resolve,o.reject)):r=new Promise((function(t,n){wt(e,(function(){return r}),t,n),_t(e,t,n)})),r}function _t(t,n,e){I(t).then(dt).then((function(){n(),setTimeout((function(){It()}))})).catch(e)}function Ut(t){return!t||"function"==typeof t||"object"===r(t)&&null!==t&&!Array.isArray(t)}function Dt(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.href.replace(t.origin,"").replace(t.search,"").split("?")[0];return e.test(n)}}var Mt=!1,Rt=[],Lt=tt&&window.location.href;function jt(){return It()}function It(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Mt)return new Promise((function(t,e){Rt.push({resolve:t,reject:e,eventArguments:n})}));var e,r=yt(),i=r.appsToUnload,a=r.appsToUnmount,c=r.appsToLoad,s=r.appsToMount,f=!1,l=Lt,p=Lt=window.location.href;return Ct()?(Mt=!0,e=i.concat(c,a,s),v()):(e=c,d());function m(){f=!0}function d(){return Promise.resolve().then((function(){var t=c.map(Y);return Promise.all(t).then(y).then((function(){return[]})).catch((function(t){throw y(),t}))}))}function v(){return Promise.resolve().then((function(){if(window.dispatchEvent(new u(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",O(!0))),window.dispatchEvent(new u("single-spa:before-routing-event",O(!0,{cancelNavigation:m}))),f)return window.dispatchEvent(new u("single-spa:before-mount-routing-event",O(!0))),g(),void rt(l);var n=i.map(dt),r=a.map(I).map((function(t){return t.then(dt)})).concat(n),o=Promise.all(r);o.then((function(){window.dispatchEvent(new u("single-spa:before-mount-routing-event",O(!0)))}));var p=c.map((function(t){return Y(t).then((function(t){return xt(t,o)}))})),h=s.filter((function(t){return c.indexOf(t)<0})).map((function(t){return xt(t,o)}));return o.catch((function(t){throw y(),t})).then((function(){return y(),Promise.all(p.concat(h)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(g)}))}))}function g(){var n=Ot();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new u(r,O())),window.dispatchEvent(new u("single-spa:routing-event",O()))}catch(t){setTimeout((function(){throw t}))}if(Mt=!1,Rt.length>0){var o=Rt;Rt=[],It(o)}return n}function y(){t.forEach((function(t){ot(t.eventArguments)})),ot(n)}function O(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],u=arguments.length>1?arguments[1]:void 0,m={},d=(o(t={},E,[]),o(t,w,[]),o(t,h,[]),o(t,P,[]),t);r?(c.concat(s).forEach((function(t,n){g(t,E)})),i.forEach((function(t){g(t,h)})),a.forEach((function(t){g(t,w)}))):e.forEach((function(t){g(t)}));var v={detail:{newAppStatuses:m,appsByNewStatus:d,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:l,newUrl:p,navigationIsCanceled:f}};return u&&U(v.detail,u),v;function g(t,n){var e=N(t);n=n||Pt(e),m[e]=n,(d[n]=d[n]||[]).push(e)}}}function xt(t,n){return A(t)?j(t).then((function(t){return n.then((function(){return A(t)?G(t):t}))})):n.then((function(){return t}))}var Bt=!1;function Gt(t){var n;Bt=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,Z=n),tt&&It()}function Ct(){return Bt}tt&&setTimeout((function(){Bt||console.warn(l(1,!1))}),5e3);var Wt={getRawAppData:function(){return[].concat(Et)},reroute:It,NOT_LOADED:h,toLoadPromise:Y,toBootstrapPromise:j,unregisterApplication:Nt};tt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Wt)}}}));
3//# sourceMappingURL=single-spa.min.js.map