UNPKG

@curatedotfun/masa-source

Version:
3 lines 78.5 kB
(()=>{"use strict";var __webpack_modules__={725:function(e,t,r){var n=r(542),o=r(195);let i=null;function a(e){let t=o.getGlobalFederationInstance(e.name,e.version);return t?(t.initOptions(e),i||(i=t),t):(i=new(n.getGlobalFederationConstructor()||n.FederationHost)(e),n.setGlobalFederationInstance(i),i)}function s(...e){return n.assert(i,"Please call init first"),i.loadRemote.apply(i,e)}function l(...e){return n.assert(i,"Please call init first"),i.loadShare.apply(i,e)}function u(...e){return n.assert(i,"Please call init first"),i.loadShareSync.apply(i,e)}function c(...e){return n.assert(i,"Please call init first"),i.preloadRemote.apply(i,e)}function f(...e){return n.assert(i,"Please call init first"),i.registerRemotes.apply(i,e)}function h(...e){return n.assert(i,"Please call init first"),i.registerPlugins.apply(i,e)}function d(){return i}n.setGlobalFederationConstructor(n.FederationHost),Object.defineProperty(t,"FederationHost",{enumerable:!0,get:function(){return n.FederationHost}}),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return n.Module}}),Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return n.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return n.getRemoteInfo}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return n.loadScriptNode}}),Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return n.registerGlobalPlugins}}),t.getInstance=d,t.init=a,t.loadRemote=s,t.loadShare=l,t.loadShareSync=u,t.preloadRemote=c,t.registerPlugins=h,t.registerRemotes=f},195:function(e,t,r){var n=r(542);function o(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}t.getGlobalFederationInstance=function(e,t){let r=o();return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===o()||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},232:function(e,t){let r="RUNTIME-001",n="RUNTIME-002",o="RUNTIME-003",i="RUNTIME-004",a="RUNTIME-005",s="RUNTIME-006",l="RUNTIME-007",u="RUNTIME-008",c="TYPE-001",f="BUILD-001",h=e=>{let t=e.split("-")[0].toLowerCase();return`https://module-federation.io/guide/troubleshooting/${t}/${e}`},d=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(h(e)),n&&o.push(`Original Error Message: ${n}`),o.join("\n")};function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let m={[r]:"Failed to get remoteEntry exports.",[n]:'The remote entry interface does not contain "init"',[o]:"Failed to get manifest.",[i]:"Failed to locate remote.",[a]:"Invalid loadShareSync function call from bundler runtime",[s]:"Invalid loadShareSync function call from runtime",[l]:"Failed to get remote snapshot.",[u]:"Failed to load script resources."},_={[c]:"Failed to generate type declaration."},y={[f]:"Failed to find expose module."},g=p({},m,_,y);t.BUILD_001=f,t.RUNTIME_001=r,t.RUNTIME_002=n,t.RUNTIME_003=o,t.RUNTIME_004=i,t.RUNTIME_005=a,t.RUNTIME_006=s,t.RUNTIME_007=l,t.RUNTIME_008=u,t.TYPE_001=c,t.buildDescMap=y,t.errorDescMap=g,t.getShortErrorMsg=d,t.runtimeDescMap=m,t.typeDescMap=_},542:function(e,t,r){var n=r(335),o=r(851),i=r(232);let a="[ Federation Runtime ]",s=o.createLogger(a);function l(e,t){e||u(t)}function u(e){if(e instanceof Error)throw e.message=`${a}: ${e.message}`,e;throw Error(`${a}: ${e}`)}function c(e){e instanceof Error&&(e.message=`${a}: ${e.message}`),s.warn(e)}function f(e,t){return -1===e.findIndex(e=>e===t)&&e.push(t),e}function h(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function d(e){return void 0!==e.entry}function p(e){return!e.entry.includes(".json")&&e.entry.includes(".js")}async function m(e,t){try{return await e()}catch(e){t||c(e);return}}function _(e){return e&&"object"==typeof e}let y=Object.prototype.toString;function g(e){return"[object Object]"===y.call(e)}function E(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function b(e){return Array.isArray(e)?e:[e]}function S(e){let t={url:"",type:"global",globalName:""};return o.isBrowserEnv()||o.isReactNativeEnv()?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}let v=(e,t)=>{let r;return r=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),r+=t},R="object"==typeof globalThis?globalThis:window,I=(()=>{try{return document.defaultView}catch(e){return R}})(),N=I;function O(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function $(e,t){return Object.hasOwnProperty.call(e,t)}$(R,"__GLOBAL_LOADING_REMOTE_ENTRY__")||O(R,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});let T=R.__GLOBAL_LOADING_REMOTE_ENTRY__;function w(e){var t,r,n,o,i,a,s,l,u,c,f,h;$(e,"__VMOK__")&&!$(e,"__FEDERATION__")&&O(e,"__FEDERATION__",e.__VMOK__),$(e,"__FEDERATION__")||(O(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),O(e,"__VMOK__",e.__FEDERATION__)),null!=(s=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__)||(t.__GLOBAL_PLUGIN__=[]),null!=(l=(r=e.__FEDERATION__).__INSTANCES__)||(r.__INSTANCES__=[]),null!=(u=(n=e.__FEDERATION__).moduleInfo)||(n.moduleInfo={}),null!=(c=(o=e.__FEDERATION__).__SHARE__)||(o.__SHARE__={}),null!=(f=(i=e.__FEDERATION__).__MANIFEST_LOADING__)||(i.__MANIFEST_LOADING__={}),null!=(h=(a=e.__FEDERATION__).__PRELOADED_MAP__)||(a.__PRELOADED_MAP__=new Map)}function A(){R.__FEDERATION__.__GLOBAL_PLUGIN__=[],R.__FEDERATION__.__INSTANCES__=[],R.__FEDERATION__.moduleInfo={},R.__FEDERATION__.__SHARE__={},R.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(T).forEach(e=>{delete T[e]})}function M(e){R.__FEDERATION__.__INSTANCES__.push(e)}function k(){return R.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function P(e,t=o.isDebugMode()){t&&(R.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,R.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.11.2")}function D(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};for(let r of Object.keys(e)){let[n,o]=r.split(":"),i=`${n}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}throw Error("key must be string")}w(R),w(I);let F=()=>I.__FEDERATION__.moduleInfo,x=(e,t)=>{let r=D(t,h(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){let{version:t}=e,r=h(n._object_without_properties_loose(e,["version"])),o=D(I.__FEDERATION__.moduleInfo,r).value;if((null==o?void 0:o.version)===t)return o}},L=e=>x(e,I.__FEDERATION__.moduleInfo),H=(e,t)=>{let r=h(e);return I.__FEDERATION__.moduleInfo[r]=t,I.__FEDERATION__.moduleInfo},j=e=>(I.__FEDERATION__.moduleInfo=n._extends({},I.__FEDERATION__.moduleInfo,e),()=>{for(let t of Object.keys(e))delete I.__FEDERATION__.moduleInfo[t]}),C=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`,n=R[r];return{remoteEntryKey:r,entryExports:n}},U=e=>{let{__GLOBAL_PLUGIN__:t}=I.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):c(`The plugin ${e.name} has been registered.`)})},G=()=>I.__FEDERATION__.__GLOBAL_PLUGIN__,q=e=>R.__FEDERATION__.__PRELOADED_MAP__.get(e),B=e=>R.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),W="default",V="global",z="[0-9A-Za-z-]+",Y=`(?:\\+(${z}(?:\\.${z})*))`,K="0|[1-9]\\d*",X="[0-9]+",J="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Z=`(?:${X}|${J})`,Q=`(?:-?(${Z}(?:\\.${Z})*))`,ee=`(?:${K}|${J})`,et=`(?:-(${ee}(?:\\.${ee})*))`,er=`${K}|x|X|\\*`,en=`[v=\\s]*(${er})(?:\\.(${er})(?:\\.(${er})(?:${et})?${Y}?)?)?`,eo=`^\\s*(${en})\\s+-\\s+(${en})\\s*$`,ei=`(${X})\\.(${X})\\.(${X})`,ea=`[v=\\s]*${ei}${Q}?${Y}?`,es="((?:<|>)?=?)",el=`(\\s*)${es}\\s*(${ea}|${en})`,eu="(?:~>?)",ec=`(\\s*)${eu}\\s+`,ef="(?:\\^)",eh=`(\\s*)${ef}\\s+`,ed="(<|>)?=?\\s*\\*",ep=`^${ef}${en}$`,em=`(${K})\\.(${K})\\.(${K})`,e_=`v?${em}${et}?${Y}?`,ey=`^${eu}${en}$`,eg=`^${es}\\s*${en}$`,eE=`^${es}\\s*(${e_})$|^$`,eb="^\\s*>=\\s*0.0.0\\s*$";function eS(e){return new RegExp(e)}function ev(e){return!e||"x"===e.toLowerCase()||"*"===e}function eR(...e){return t=>e.reduce((e,t)=>t(e),t)}function eI(e){return e.match(eS(eE))}function eN(e,t,r,n){let o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function eO(e){return e.replace(eS(eo),(e,t,r,n,o,i,a,s,l,u,c,f)=>(t=ev(r)?"":ev(n)?`>=${r}.0.0`:ev(o)?`>=${r}.${n}.0`:`>=${t}`,s=ev(l)?"":ev(u)?`<${Number(l)+1}.0.0-0`:ev(c)?`<${l}.${Number(u)+1}.0-0`:f?`<=${l}.${u}.${c}-${f}`:`<=${s}`,`${t} ${s}`.trim()))}function e$(e){return e.replace(eS(el),"$1$2$3")}function eT(e){return e.replace(eS(ec),"$1~")}function ew(e){return e.replace(eS(eh),"$1^")}function eA(e){return e.trim().split(/\s+/).map(e=>e.replace(eS(ep),(e,t,r,n,o)=>{if(ev(t))return"";if(ev(r))return`>=${t}.0.0 <${Number(t)+1}.0.0-0`;if(ev(n))if("0"===t)return`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`;else return`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`;if(o)if("0"!==t)return`>=${t}.${r}.${n}-${o} <${Number(t)+1}.0.0-0`;else if("0"===r)return`>=${t}.${r}.${n}-${o} <${t}.${r}.${Number(n)+1}-0`;else return`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`;if("0"===t)if("0"===r)return`>=${t}.${r}.${n} <${t}.${r}.${Number(n)+1}-0`;else return`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`;return`>=${t}.${r}.${n} <${Number(t)+1}.0.0-0`})).join(" ")}function eM(e){return e.trim().split(/\s+/).map(e=>e.replace(eS(ey),(e,t,r,n,o)=>ev(t)?"":ev(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ev(n)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:o?`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`)).join(" ")}function ek(e){return e.split(/\s+/).map(e=>e.trim().replace(eS(eg),(e,t,r,n,o,i)=>{let a=ev(r),s=a||ev(n),l=s||ev(o);if("="===t&&l&&(t=""),i="",a)if(">"===t||"<"===t)return"<0.0.0-0";else return"*";return t&&l?(s&&(n=0),o=0,">"===t?(t=">=",s?(r=Number(r)+1,n=0):n=Number(n)+1,o=0):"<="===t&&(t="<",s?r=Number(r)+1:n=Number(n)+1),"<"===t&&(i="-0"),`${t+r}.${n}.${o}${i}`):s?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:l?`>=${r}.${n}.0${i} <${r}.${Number(n)+1}.0-0`:e})).join(" ")}function eP(e){return e.trim().replace(eS(ed),"")}function eD(e){return e.trim().replace(eS(eb),"")}function eF(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function ex(e,t){let{preRelease:r}=e,{preRelease:n}=t;if(void 0===r&&n)return 1;if(r&&void 0===n)return -1;if(void 0===r&&void 0===n)return 0;for(let e=0,t=r.length;e<=t;e++){let t=r[e],o=n[e];if(t!==o){if(void 0===t&&void 0===o)return 0;if(!t)return 1;if(!o)return -1;return eF(t,o)}}return 0}function eL(e,t){return eF(e.major,t.major)||eF(e.minor,t.minor)||eF(e.patch,t.patch)||ex(e,t)}function eH(e,t){return e.version===t.version}function ej(e,t){switch(e.operator){case"":case"=":return eH(e,t);case">":return 0>eL(e,t);case">=":return eH(e,t)||0>eL(e,t);case"<":return eL(e,t)>0;case"<=":return eH(e,t)||eL(e,t)>0;case void 0:return!0;default:return!1}}function eC(e){return eR(eA,eM,ek,eP)(e)}function eU(e){return eR(eO,e$,eT,ew)(e.trim()).split(/\s+/).join(" ")}function eG(e,t){if(!e)return!1;let r=eU(t).split(" ").map(e=>eC(e)).join(" ").split(/\s+/).map(e=>eD(e)),n=eI(e);if(!n)return!1;let[,o,,i,a,s,l]=n,u={operator:o,version:eN(i,a,s,l),major:i,minor:a,patch:s,preRelease:null==l?void 0:l.split(".")};for(let e of r){let t=eI(e);if(!t)return!1;let[,r,,n,o,i,a]=t;if(!ej({operator:r,version:eN(n,o,i,a),major:n,minor:o,patch:i,preRelease:null==a?void 0:a.split(".")},u))return!1}return!0}function eq(e,t,r,o){var i,a,s;let l;return l="get"in e?e.get:"lib"in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{throw Error(`Can not get shared '${r}'!`)}),e.strategy&&c('"shared.strategy is deprecated, please set in initOptions.shareStrategy instead!"'),n._extends({deps:[],useIn:[],from:t,loading:null},e,{shareConfig:n._extends({requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:l,loaded:null!=e&&!!e.loaded||"lib"in e||void 0,version:null!=(i=e.version)?i:"0",scope:Array.isArray(e.scope)?e.scope:[null!=(a=e.scope)?a:"default"],strategy:(null!=(s=e.strategy)?s:o)||"version-first"})}function eB(e,t){let r=t.shared||{},o=t.name,i=Object.keys(r).reduce((e,n)=>{let i=b(r[n]);return e[n]=e[n]||[],i.forEach(r=>{e[n].push(eq(r,o,n,t.shareStrategy))}),e},{}),a=n._extends({},e.shared);return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{shared:a,shareInfos:i}}function eW(e,t){let r=e=>{if(!Number.isNaN(Number(e))){let t=e.split("."),r=e;for(let e=0;e<3-t.length;e++)r+=".0";return r}return e};return!!eG(r(e),`<=${r(t)}`)}let eV=(e,t)=>{let r=t||function(e,t){return eW(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},ez=e=>!!e.loaded||"function"==typeof e.lib,eY=e=>!!e.loading;function eK(e,t,r){let n=e[t][r],o=function(e,t){return!ez(n[e])&&eW(e,t)};return eV(e[t][r],o)}function eX(e,t,r){let n=e[t][r],o=function(e,t){let r=e=>ez(e)||eY(e);if(r(n[t]))if(r(n[e]))return!!eW(e,t);else return!0;return!r(n[e])&&eW(e,t)};return eV(e[t][r],o)}function eJ(e){return"loaded-first"===e?eX:eK}function eZ(e,t,r,n){if(!e)return;let{shareConfig:o,scope:i=W,strategy:a}=r;for(let s of Array.isArray(i)?i:[i])if(o&&e[s]&&e[s][t]){let{requiredVersion:i}=o,l=eJ(a)(e,s,t),f=()=>{if(o.singleton){if("string"==typeof i&&!eG(l,i)){let n=`Version ${l} from ${l&&e[s][t][l].from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${i})`;o.strictVersion?u(n):c(n)}return e[s][t][l]}if(!1===i||"*"===i||eG(l,i))return e[s][t][l];for(let[r,n]of Object.entries(e[s][t]))if(eG(r,i))return n},h={shareScopeMap:e,scope:s,pkgName:t,version:l,GlobalFederation:N.__FEDERATION__,resolver:f};return(n.emit(h)||h).resolver()}}function eQ(){return N.__FEDERATION__.__SHARE__}function e0(e){var t;let{pkgName:r,extraOptions:n,shareInfos:o}=e,i=e=>{if(!e)return;let t={};e.forEach(e=>{t[e.version]=e});let r=function(e,r){return!ez(t[e])&&eW(e,r)},n=eV(t,r);return t[n]};return Object.assign({},(null!=(t=null==n?void 0:n.resolver)?t:i)(o[r]),null==n?void 0:n.customShareInfo)}var e1={global:{Global:N,nativeGlobal:I,resetFederationGlobalInfo:A,setGlobalFederationInstance:M,getGlobalFederationConstructor:k,setGlobalFederationConstructor:P,getInfoWithoutType:D,getGlobalSnapshot:F,getTargetSnapshotInfoByModuleInfo:x,getGlobalSnapshotInfoByModuleInfo:L,setGlobalSnapshotInfoByModuleInfo:H,addGlobalSnapshot:j,getRemoteEntryExports:C,registerGlobalPlugins:U,getGlobalHostPlugins:G,getPreloaded:q,setPreloaded:B},share:{getRegisteredShare:eZ,getGlobalShareScope:eQ}};function e2(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function e3(e,t){for(let r of e){let e=t.startsWith(r.name),n=t.replace(r.name,"");if(e){if(n.startsWith("/"))return{pkgNameOrAlias:r.name,expose:n=`.${n}`,remote:r};else if(""===n)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let o=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&o){if(i&&i.startsWith("/"))return{pkgNameOrAlias:r.alias,expose:i=`.${i}`,remote:r};else if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function e5(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}function e4(e,t){let r=G();return r.length>0&&r.forEach(t=>{(null==e?void 0:e.find(e=>e.name!==t.name))&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{t.forEach(t=>{t.applyPlugin(e)})}),e}async function e8({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):"undefined"!=typeof FEDERATION_ALLOW_NEW_FUNCTION?Function("callbacks",`import("${e}").then(callbacks[0]).catch(callbacks[1])`)([r,n]):import(e).then(r).catch(n)}catch(e){n(e)}})}async function e6({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):Function("callbacks",`System.import("${e}").then(callbacks[0]).catch(callbacks[1])`)([r,n])}catch(e){n(e)}})}async function e9({name:e,globalName:t,entry:r,loaderHook:n}){let{entryExports:a}=C(e,t);return a||o.loadScript(r,{attrs:{},createScriptHook:(e,t)=>{let r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&(r instanceof HTMLScriptElement||"script"in r||"timeout"in r))return r}}).then(()=>{let{remoteEntryKey:n,entryExports:o}=C(e,t);return l(o,i.getShortErrorMsg(i.RUNTIME_001,i.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),o}).catch(t=>{throw l(void 0,i.getShortErrorMsg(i.RUNTIME_008,i.runtimeDescMap,{remoteName:e,resourceUrl:r})),t})}async function e7({remoteInfo:e,remoteEntryExports:t,loaderHook:r}){let{entry:n,entryGlobalName:o,name:i,type:a}=e;switch(a){case"esm":case"module":return e8({entry:n,remoteEntryExports:t});case"system":return e6({entry:n,remoteEntryExports:t});default:return e9({entry:n,globalName:o,name:i,loaderHook:r})}}async function te({remoteInfo:e,loaderHook:t}){let{entry:r,entryGlobalName:n,name:a,type:s}=e,{entryExports:u}=C(a,n);return u||o.loadScriptNode(r,{attrs:{name:a,globalName:n,type:s},loaderHook:{createScriptHook:(e,r={})=>{let n=t.lifecycle.createScript.emit({url:e,attrs:r});if(n&&"url"in n)return n}}}).then(()=>{let{remoteEntryKey:e,entryExports:t}=C(a,n);return l(t,i.getShortErrorMsg(i.RUNTIME_001,i.runtimeDescMap,{remoteName:a,remoteEntryUrl:r,remoteEntryKey:e})),t}).catch(e=>{throw e})}function tt(e){let{entry:t,name:r}=e;return o.composeKeyWithSeparator(r,t)}async function tr({origin:e,remoteEntryExports:t,remoteInfo:r}){let n=tt(r);if(t)return t;if(!T[n]){let i=e.remoteHandler.hooks.lifecycle.loadEntry,a=e.loaderHook;T[n]=i.emit({loaderHook:a,remoteInfo:r,remoteEntryExports:t}).then(e=>e||(o.isBrowserEnv()?e7({remoteInfo:r,remoteEntryExports:t,loaderHook:a}):te({remoteInfo:r,loaderHook:a})))}return T[n]}function tn(e){return n._extends({},e,{entry:"entry"in e?e.entry:"",type:e.type||V,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||W})}let to=class{async getEntry(){let e;if(this.remoteEntryExports)return this.remoteEntryExports;try{e=await tr({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch(r){let t=tt(this.remoteInfo);e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:tr,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading:T,uniqueKey:t})}return l(e,`remoteEntryExports is undefined ${o.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,t,r,o){let a,{loadFactory:s=!0}=r||{loadFactory:!0},c=await this.getEntry();if(!this.inited){let t=this.host.shareScopeMap,r=this.remoteInfo.shareScope||"default";t[r]||(t[r]={});let a=t[r],s=[],l={version:this.remoteInfo.version||""};Object.defineProperty(l,"shareScopeMap",{value:t,enumerable:!1});let f=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:l,initScope:s,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==c?void 0:c.init)&&u(i.getShortErrorMsg(i.RUNTIME_002,i.runtimeDescMap,{remoteName:name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await c.init(f.shareScope,f.initScope,f.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(n._extends({},f,{id:e,remoteSnapshot:o,remoteEntryExports:c}))}this.lib=c,this.inited=!0,(a=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:c,expose:t,moduleInfo:this.remoteInfo}))||(a=await c.get(t)),l(a,`${h(this.remoteInfo)} remote don't export ${t}.`);let f=v(this.remoteInfo.name,t),d=this.wraperFactory(a,f);return s?await d():d}wraperFactory(e,t){function r(e,t){e&&"object"==typeof e&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for("mf_module_id"))&&Object.defineProperty(e,Symbol.for("mf_module_id"),{value:t,enumerable:!1})}return e instanceof Promise?async()=>{let n=await e();return r(n,t),n}:()=>{let n=e();return r(n,t),n}}constructor({remoteInfo:e,host:t}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}};class ti{on(e){"function"==typeof e&&this.listeners.add(e)}once(e){let t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class ta extends ti{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let n=0,o=t=>!1!==t&&(n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):t);t=o()}return Promise.resolve(t)}}function ts(e,t){if(!_(t))return!1;if(e!==t){for(let r in e)if(!(r in t))return!1}return!0}class tl extends ti{emit(e){for(let t of(_(e)||u(`The data for the "${this.type}" hook should be an object.`),this.listeners))try{let r=t(e);if(ts(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){c(e),this.onerror(e)}return e}constructor(e){super(),this.onerror=u,this.type=e}}class tu extends ti{emit(e){_(e)||u(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let r=0,n=t=>(c(t),this.onerror(t),e),o=i=>{if(ts(e,i)){if(e=i,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(e){return n(e)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}constructor(e){super(),this.onerror=u,this.type=e}}class tc{applyPlugin(e){l(g(e),"Plugin configuration is invalid.");let t=e.name;l(t,"A name must be provided by the plugin."),this.registerPlugins[t]||(this.registerPlugins[t]=e,Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){l(e,"A name is required.");let t=this.registerPlugins[e];l(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}inherit({lifecycle:e,registerPlugins:t}){Object.keys(e).forEach(t=>{l(!this.lifecycle[t],`The hook "${t}" has a conflict and cannot be inherited.`),this.lifecycle[t]=e[t]}),Object.keys(t).forEach(e=>{l(!this.registerPlugins[e],`The plugin "${e}" has a conflict and cannot be inherited.`),this.applyPlugin(t[e])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function tf(e){return n._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function th(e,t){return t.map(t=>{let r=e5(e,t.nameOrAlias);return l(r,`Unable to preload ${t.nameOrAlias} as it is not included in ${!r&&o.safeToString({remoteInfo:r,remotes:e})}`),{remote:r,preloadConfig:tf(t)}})}function td(e){return e?e.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[]}function tp(e,t,r,n=!0){let{cssAssets:i,jsAssetsWithoutEntry:a,entryAssets:s}=r;if(t.options.inBrowser){if(s.forEach(r=>{let{moduleInfo:n}=r,o=t.moduleCache.get(e.name);o?tr({origin:t,remoteInfo:n,remoteEntryExports:o.remoteEntryExports}):tr({origin:t,remoteInfo:n,remoteEntryExports:void 0})}),n){let e={rel:"preload",as:"style"};i.forEach(r=>{let{link:n,needAttach:i}=o.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});i&&document.head.appendChild(n)})}else{let e={rel:"stylesheet",type:"text/css"};i.forEach(r=>{let{link:n,needAttach:i}=o.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n},needDeleteLink:!1});i&&document.head.appendChild(n)})}if(n){let e={rel:"preload",as:"script"};a.forEach(r=>{let{link:n,needAttach:i}=o.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});i&&document.head.appendChild(n)})}else{let r={fetchpriority:"high",type:(null==e?void 0:e.type)==="module"?"module":"text/javascript"};a.forEach(e=>{let{script:n,needAttach:i}=o.createScript({url:e,cb:()=>{},attrs:r,createScriptHook:(e,r)=>{let n=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:r});if(n instanceof HTMLScriptElement)return n},needDeleteScript:!0});i&&document.head.appendChild(n)})}}}function tm(e,t){let r=S(t);r.url||u(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=o.getResourceUrl(t,r.url);o.isBrowserEnv()||n.startsWith("http")||(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function t_(){return{name:"snapshot-plugin",async afterResolve(e){let{remote:t,pkgNameOrAlias:r,expose:o,origin:i,remoteInfo:a}=e;if(!d(t)||!p(t)){let{remoteSnapshot:s,globalSnapshot:l}=await i.snapshotHandler.loadRemoteSnapshotInfo(t);tm(a,s);let u={remote:t,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},c=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:u,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:l});return c&&tp(a,i,c,!1),n._extends({},e,{remoteSnapshot:s})}return e}}}function ty(e){let t=e.split(":");return 1===t.length?{name:t[0],version:void 0}:2===t.length?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function tg(e,t,r,n,i={},a){let{value:s}=D(e,h(t)),l=a||s;if(l&&!o.isManifestProvider(l)&&(r(l,t,n),l.remotesInfo))for(let t of Object.keys(l.remotesInfo)){if(i[t])continue;i[t]=!0;let n=ty(t),o=l.remotesInfo[t];tg(e,{name:n.name,version:o.matchedVersion},r,!1,i,void 0)}}let tE=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function tb(e,t,r,n,i){let a=[],s=[],l=[],u=new Set,c=new Set,{options:f}=e,{preloadConfig:h}=t,{depsRemote:d}=h;if(tg(n,r,(t,r,n)=>{let i;if(n)i=h;else if(Array.isArray(d)){let e=d.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;i=tf(e)}else{if(!0!==d)return;i=h}let u=o.getResourceUrl(t,S(t).url);u&&l.push({name:r.name,moduleInfo:{name:r.name,entry:u,type:"remoteEntryType"in t?t.remoteEntryType:"global",entryGlobalName:"globalName"in t?t.globalName:r.name,shareScope:"",version:"version"in t?t.version:void 0},url:u});let c="modules"in t?t.modules:[],f=td(i.exposes);if(f.length&&"modules"in t){var p;c=null==t||null==(p=t.modules)?void 0:p.reduce((e,t)=>((null==f?void 0:f.indexOf(t.moduleName))!==-1&&e.push(t),e),[])}function m(e){let r=e.map(e=>o.getResourceUrl(t,e));return i.filter?r.filter(i.filter):r}if(c){let n=c.length;for(let o=0;o<n;o++){let n=c[o],l=`${r.name}/${n.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===n.moduleName?r.name:l,name:r.name,remoteSnapshot:t,preloadConfig:i,remote:r,origin:e}),q(l)||("all"===i.resourceCategory?(a.push(...m(n.assets.css.async)),a.push(...m(n.assets.css.sync)),s.push(...m(n.assets.js.async))):(i.resourceCategory="sync",a.push(...m(n.assets.css.sync))),s.push(...m(n.assets.js.sync)),B(l))}}},!0,{},i),i.shared){let t=(t,r)=>{let n=eZ(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);n&&"function"==typeof n.lib&&(r.assets.js.sync.forEach(e=>{u.add(e)}),r.assets.css.sync.forEach(e=>{c.add(e)}))};i.shared.forEach(e=>{var r;let n=null==(r=f.shared)?void 0:r[e.sharedName];if(!n)return;let o=e.version?n.find(t=>t.version===e.version):n;o&&b(o).forEach(r=>{t(r,e)})})}let p=s.filter(e=>!u.has(e)&&!tE("script",e));return{cssAssets:a.filter(e=>!c.has(e)&&!tE("link",e)),jsAssetsWithoutEntry:p,entryAssets:l.filter(e=>!tE("script",e.url))}}let tS=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){let{origin:t,preloadOptions:r,remoteInfo:n,remote:i,globalSnapshot:a,remoteSnapshot:s}=e;return o.isBrowserEnv()?d(i)&&p(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:n.name,entry:i.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(tm(n,s),tb(t,r,n,a,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function tv(e,t){let r=L({name:t.options.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&D(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:F(),remoteSnapshot:L({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:F(),remoteSnapshot:L({name:e.name,version:"version"in e?e.version:void 0})}}class tR{async loadSnapshot(e){let{options:t}=this.HostInstance,{hostGlobalSnapshot:r,remoteSnapshot:n,globalSnapshot:o}=this.getGlobalRemoteInfo(e),{remoteSnapshot:i,globalSnapshot:a}=await this.hooks.lifecycle.loadSnapshot.emit({options:t,moduleInfo:e,hostGlobalSnapshot:r,remoteSnapshot:n,globalSnapshot:o});return{remoteSnapshot:i,globalSnapshot:a}}async loadRemoteSnapshotInfo(e){let t,r,{options:a}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:a,moduleInfo:e});let s=L({name:this.HostInstance.options.name,version:this.HostInstance.options.version});s||(s={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},j({[this.HostInstance.options.name]:s})),s&&"remotesInfo"in s&&!D(s.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(s.remotesInfo=n._extends({},null==s?void 0:s.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let{hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:f}=this.getGlobalRemoteInfo(e),{remoteSnapshot:h,globalSnapshot:p}=await this.hooks.lifecycle.loadSnapshot.emit({options:a,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:f});if(h)if(o.isManifestProvider(h)){let i=o.isBrowserEnv()?h.remoteEntry:h.ssrRemoteEntry||h.remoteEntry||"",a=await this.getManifestJson(i,e,{}),s=H(n._extends({},e,{entry:i}),a);t=a,r=s}else{let{remoteSnapshot:n}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:h,from:"global"});t=n,r=p}else if(d(e)){let n=await this.getManifestJson(e.entry,e,{}),o=H(e,n),{remoteSnapshot:i}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:n,from:"global"});t=i,r=o}else u(i.getShortErrorMsg(i.RUNTIME_007,i.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(p)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({options:a,moduleInfo:e,remoteSnapshot:t}),{remoteSnapshot:t,globalSnapshot:r}}getGlobalRemoteInfo(e){return tv(e,this.HostInstance)}async getManifestJson(e,t,r){let n=async()=>{let r=this.manifestCache.get(e);if(r)return r;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{});t&&t instanceof Response||(t=await fetch(e,{})),r=await t.json()}catch(n){(r=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}))||(delete this.manifestLoading[e],u(i.getShortErrorMsg(i.RUNTIME_003,i.runtimeDescMap,{manifestUrl:e,moduleName:t.name},`${n}`)))}return l(r.metaData&&r.exposes&&r.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,r),r},a=async()=>{let r=await n(),i=o.generateSnapshotFromManifest(r,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:r,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=a().then(e=>e)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new tc({beforeLoadRemoteSnapshot:new ta("beforeLoadRemoteSnapshot"),loadSnapshot:new tu("loadGlobalSnapshot"),loadRemoteSnapshot:new tu("loadRemoteSnapshot"),afterLoadSnapshot:new tu("afterLoadSnapshot")}),this.manifestLoading=N.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class tI{registerShared(e,t){let{shareInfos:r,shared:n}=eB(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{!eZ(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)&&r&&r.lib&&this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:!0,shared:r,from:t.name})})}),{shareInfos:r,shared:n}}async loadShare(e,t){let{host:r}=this,n=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==n?void 0:n.scope)&&await Promise.all(n.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:n.strategy}))}));let{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});l(o,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);let i=eZ(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),a=e=>{e.useIn||(e.useIn=[]),f(e.useIn,r.options.name)};if(i&&i.lib)return a(i),i.lib;if(i&&i.loading&&!i.loaded){let e=await i.loading;return i.loaded=!0,i.lib||(i.lib=e),a(i),e}if(i){let t=(async()=>{let t=await i.get();o.lib=t,o.loaded=!0,a(o);let r=eZ(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0),t})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:t}),t}{if(null==t?void 0:t.customShareInfo)return!1;let n=(async()=>{let t=await o.get();o.lib=t,o.loaded=!0,a(o);let r=eZ(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0),t})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:n}),n}}initializeSharing(e=W,t){let{host:r}=this,n=null==t?void 0:t.from,o=null==t?void 0:t.strategy,i=null==t?void 0:t.initScope,a=[];if("build"!==n){let{initTokens:t}=this;i||(i=[]);let r=t[e];if(r||(r=t[e]={from:this.host.name}),i.indexOf(r)>=0)return a;i.push(r)}let s=this.shareScopeMap,l=r.options.name;s[e]||(s[e]={});let u=s[e],c=(e,t)=>{var r;let{version:n,eager:o}=t;u[e]=u[e]||{};let i=u[e],a=i[n],s=!!(a&&(a.eager||(null==(r=a.shareConfig)?void 0:r.eager)));(!a||"loaded-first"!==a.strategy&&!a.loaded&&(!o!=!s?o:l>a.from))&&(i[n]=t)},f=t=>t&&t.init&&t.init(s[e],i),h=async e=>{let{module:t}=await r.remoteHandler.getRemoteModuleAndOptions({id:e});if(t.getEntry){let n;try{n=await t.getEntry()}catch(t){n=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:t,from:"runtime",lifecycle:"beforeLoadShare",origin:r})}t.inited||(await f(n),t.inited=!0)}};return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&c(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===o)&&r.options.remotes.forEach(t=>{t.shareScope===e&&a.push(h(t.name))}),a}loadShareSync(e,t){let{host:r}=this,n=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==n?void 0:n.scope)&&n.scope.forEach(e=>{this.initializeSharing(e,{strategy:n.strategy})});let o=eZ(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),a=e=>{e.useIn||(e.useIn=[]),f(e.useIn,r.options.name)};if(o){if("function"==typeof o.lib)return a(o),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if("function"==typeof o.get){let t=o.get();if(!(t instanceof Promise))return a(o),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:o}),t}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){let o=n.get();if(o instanceof Promise){let n=(null==t?void 0:t.from)==="build"?i.RUNTIME_005:i.RUNTIME_006;throw Error(i.getShortErrorMsg(n,i.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=o,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw Error(i.getShortErrorMsg(i.RUNTIME_006,i.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}initShareScopeMap(e,t,r={}){let{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:o,loading:i,loaded:a,get:s}){let{version:l,scope:u="default"}=t,c=n._object_without_properties_loose(t,["version","scope"]);(Array.isArray(u)?u:[u]).forEach(t=>{if(this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),!this.shareScopeMap[t][e][l]){this.shareScopeMap[t][e][l]=n._extends({version:l,scope:["default"]},c,{lib:o,loaded:a,loading:i}),s&&(this.shareScopeMap[t][e][l].get=s);return}let r=this.shareScopeMap[t][e][l];i&&!r.loading&&(r.loading=i)})}_setGlobalShareScopeMap(e){let t=eQ(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}constructor(e){this.hooks=new tc({afterResolve:new tu("afterResolve"),beforeLoadShare:new tu("beforeLoadShare"),loadShare:new ta,resolveShare:new tl("resolveShare"),initContainerShareScopeMap:new tl("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class tN{formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:r,expose:n}=t,{name:o,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},i&&e.startsWith(o)){let t=e.replace(o,i);this.idToRemoteMap[t]={name:r.name,expose:n};return}if(i&&e.startsWith(i)){let t=e.replace(i,o);this.idToRemoteMap[t]={name:r.name,expose:n}}}async loadRemote(e,t){let{host:r}=this;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:i,remoteMatchInfo:a}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:s,remote:l,expose:u,id:c,remoteSnapshot:f}=a,h=await o.get(c,u,t,f),d=await this.hooks.lifecycle.onLoad.emit({id:c,pkgNameOrAlias:s,expose:u,exposeModule:n?h:void 0,exposeModuleFactory:n?void 0:h,remote:l,options:i,moduleInstance:o,origin:r});if(this.setIdToRemoteMap(e,a),"function"==typeof d)return d;return h}catch(i){let{from:n="runtime"}=t||{from:"runtime"},o=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:n,lifecycle:"onLoad",origin:r});if(!o)throw i;return o}}async preloadRemote(e){let{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=th(t.options.remotes,e);await Promise.all(r.map(async e=>{let{remote:r}=e,n=tn(r),{globalSnapshot:o,remoteSnapshot:i}=await t.snapshotHandler.loadRemoteSnapshotInfo(r),a=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:e,remote:r,remoteInfo:n,globalSnapshot:o,remoteSnapshot:i});a&&tp(n,t,a)}))}registerRemotes(e,t){let{host:r}=this;e.forEach(e=>{this.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}async getRemoteModuleAndOptions(e){let t,{host:r}=this,{id:o}=e;try{t=await this.hooks.lifecycle.beforeRequest.emit({id:o,options:r.options,origin:r})}catch(e){if(!(t=await this.hooks.lifecycle.errorLoadRemote.emit({id:o,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"})))throw e}let{id:a}=t,s=e3(r.options.remotes,a);l(s,i.getShortErrorMsg(i.RUNTIME_004,i.runtimeDescMap,{hostName:r.options.name,requestId:a}));let{remote:u}=s,c=tn(u),f=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(n._extends({id:a},s,{options:r.options,origin:r,remoteInfo:c})),{remote:h,expose:d}=f;l(h&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${a}.`);let p=r.moduleCache.get(h.name),m={host:r,remoteInfo:c};return p||(p=new to(m),r.moduleCache.set(h.name,p)),{module:p,moduleOptions:m,remoteMatchInfo:f}}registerRemote(e,t,r){let{host:n}=this,i=()=>{if(e.alias){let r=t.find(t=>{var r;return e.alias&&(t.name.startsWith(e.alias)||(null==(r=t.alias)?void 0:r.startsWith(e.alias)))});l(!r,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${r&&r.name} name or alias`)}"entry"in e&&o.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=W),e.type||(e.type=V)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});let a=t.find(t=>t.name===e.name);if(a){let s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];(null==r?void 0:r.force)&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),o.warn(s.join(" ")))}else i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n})}removeRemote(e){try{let{host:r}=this,{name:n}=e,i=r.options.remotes.findIndex(e=>e.name===n);-1!==i&&r.options.remotes.splice(i,1);let a=r.moduleCache.get(e.name);if(a){let n=a.remoteInfo,i=n.entryGlobalName;if(R[i]){var t;(null==(t=Object.getOwnPropertyDescriptor(R,i))?void 0:t.configurable)?delete R[i]:R[i]=void 0}let s=tt(a.remoteInfo);T[s]&&delete T[s],r.snapshotHandler.manifestCache.delete(n.entry);let l=n.buildVersion?o.composeKeyWithSeparator(n.name,n.buildVersion):n.name,u=R.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===l:e.name===l);if(-1!==u){let e=R.__FEDERATION__.__INSTANCES__[u];l=e.options.id||l;let t=eQ(),r=!0,o=[];Object.keys(t).forEach(e=>{let i=t[e];i&&Object.keys(i).forEach(t=>{let a=i[t];a&&Object.keys(a).forEach(i=>{let s=a[i];s&&Object.keys(s).forEach(a=>{let l=s[a];l&&"object"==typeof l&&l.from===n.name&&(l.loaded||l.loading?(l.useIn=l.useIn.filter(e=>e!==n.name),l.useIn.length?r=!1:o.push([e,t,i,a])):o.push([e,t,i,a]))})})})}),r&&(e.shareScopeMap={},delete t[l]),o.forEach(([e,r,n,o])=>{var i,a,s;null==(s=t[e])||null==(a=s[r])||null==(i=a[n])||delete i[o]}),R.__FEDERATION__.__INSTANCES__.splice(u,1)}let{hostGlobalSnapshot:c}=tv(e,r);if(c){let t=c&&"remotesInfo"in c&&c.remotesInfo&&D(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],N.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete N.__FEDERATION__.__MANIFEST_LOADING__[t])}r.moduleCache.delete(e.name)}}catch(e){s.log("removeRemote fail: ",e)}}constructor(e){this.hooks=new tc({beforeRegisterRemote:new tl("beforeRegisterRemote"),registerRemote:new tl("registerRemote"),beforeRequest:new tu("beforeRequest"),onLoad:new ta("onLoad"),handlePreloadModule:new ti("handlePreloadModule"),errorLoadRemote:new ta("errorLoadRemote"),beforePreloadRemote:new ta("beforePreloadRemote"),generatePreloadAssets:new ta("generatePreloadAssets"),afterPreloadRemote:new ta,loadEntry:new ta}),this.host=e,this.idToRemoteMap={}}}class tO{initOptions(e){this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=W,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let n=new to({host:this,remoteInfo:tn({name:e,entry:t})});return n.remoteEntryExports=r,this.moduleCache.set(e,n),n}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let{shared:r}=eB(e,t),{userOptions:o,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),a=this.remoteHandler.formatAndRegisterRemote(i,o),{shared:s}=this.sharedHandler.registerShared(i,o),l=[...i.plugins];o.plugins&&o.plugins.forEach(e=>{l.includes(e)||l.push(e)});let u=n._extends({},e,t,{plugins:l,remotes:a,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:u}),u}registerPlugins(e){let t=e4(e,[this.hooks,this.remoteHandler.hooks,this.sharedHandler.hooks,this.snapshotHandler.hooks,this.loaderHook,this.bridgeHook]);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}constructor(e){this.hooks=new tc({beforeInit:new tl("beforeInit"),init:new ti,beforeInitContainer:new tu("beforeInitContainer"),initContainer:new tu("initContainer")}),this.version="0.11.2",this.moduleCache=new Map,this.loaderHook=new tc({getModuleInfo:new ti,createScript:new ti,createLink:new ti,fetch:new ta,loadEntryError:new ta,getModuleFactory:new ta}),this.bridgeHook=new tc({beforeBridgeRender:new ti,afterBridgeRender:new ti,beforeBridgeDestroy:new ti,afterBridgeDestroy:new ti});let t={id:e2(),name:e.name,plugins:[t_(),tS()],remotes:[],shared:{},inBrowser:o.isBrowserEnv()};this.name=e.name,this.options=t,this.snapshotHandler=new tR(this),this.sharedHandler=new tI(this),this.remoteHandler=new tN(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...t.plugins,...e.plugins||[]]),this.options=this.formatOptions(t,e)}}var t$=Object.freeze({__proto__:null});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return o.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return o.loadScriptNode}}),t.CurrentGlobal=R,t.FederationHost=tO,t.Global=N,t.Module=to,t.addGlobalSnapshot=j,t.assert=l,t.getGlobalFederationConstructor=k,t.getGlobalSnapshot=F,t.getInfoWithoutType=D,t.getRegisteredShare=eZ,t.getRemoteEntry=tr,t.getRemoteInfo=tn,t.helpers=e1,t.isStaticResourcesEqual=E,t.matchRemoteWithNameAndExpose=e3,t.registerGlobalPlugins=U,t.resetFederationGlobalInfo=A,t.safeWrapper=m,t.satisfy=eG,t.setGlobalFederationConstructor=P,t.setGlobalFederationInstance=M,t.types=t$},335:function(e,t){function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}t._extends=r,t._object_without_properties_loose=n},851:function(__unused_webpack_module,exports,__webpack_require__){var polyfills=__webpack_require__(512);let FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",BROWSER_LOG_VALUE="1",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return"undefined"!=typeof window&&void 0!==window.document}function isReactNativeEnv(){var e;return"undefined"!=typeof navigator&&(null==(e=navigator)?void 0:e.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return localStorage.getItem(BROWSER_LOG_KEY)===BROWSER_LOG_VALUE}catch(e){}return!1}function isDebugMode(){return"undefined"!=typeof process&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:!!("undefined"!=typeof FEDERATION_DEBUG&&FEDERATION_DEBUG)||isBrowserDebug()}let getProcessEnv=function(){return"undefined"!=typeof process&&process.env?process.env:{}},LOG_CATEGORY="[ Federation Runtime ]",parseEntry=(e,t,r=SEPARATOR)=>{let n=e.split(r),o="development"===getProcessEnv().NODE_ENV&&t,i="*",a=e=>e.startsWith("http")||e.includes(MANIFEST_EXT);if(n.length>=2){let[t,...s]=n;e.startsWith(r)&&(t=n.slice(0,2).join(r),s=[o||n.slice(2).join(r)]);let l=o||s.join(r);return a(l)?{name:t,entry:l}:{name:t,version:l||i}}if(1===n.length){let[e]=n;return o&&a(o)?{name:e,entry:o}:{name:e,version:o||i}}throw`Invalid entry value: ${e}`},composeKeyWithSeparator=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}${SEPARATOR}${t}`:t:e,""):""},encodeName=function(e,t="",r=!1){try{let n=r?".js":"";return`${t}${e.replace(RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(e){throw e}},decodeName=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(RegExp(t,"g"),"")}return n=n.replace(RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(e){throw e}},generateExposeFilename=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",t)},generateShareFilename=(e,t)=>e?encodeName(e,"__federation_shared_",t):"",getResourceUrl=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?Function("return "+e.getPublicPath)()():Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},assert=(e,t)=>{e||error(t)},error=e=>{throw Error(`${LOG_CATEGORY}: ${e}`)},warn=e=>{console.war