@reventlessdev/reventless-host-shell 3.0.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/bin/start.mjs +26 -0
  2. package/dist/assets/__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-BaezSRSI.js +1 -0
  3. package/dist/assets/__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-DjktxNPA.js +24 -0
  4. package/dist/assets/_virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-CZiiMwGO.js +1 -0
  5. package/dist/assets/_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-DyN2-cW9.js +9 -0
  6. package/dist/assets/_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BPkY-A6Y.js +9 -0
  7. package/dist/assets/_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-iXrUa0b8.js +1 -0
  8. package/dist/assets/_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DOfR9NH3.js +1 -0
  9. package/dist/assets/hostInit-B-sFDoqT.js +1 -0
  10. package/dist/assets/index-CFSsOKn1.js +53 -0
  11. package/dist/assets/index-Coxr9JYr.js +1 -0
  12. package/dist/assets/preload-helper-BlTxHScW.js +1 -0
  13. package/dist/assets/remoteEntry-Dq8sP45x.js +1 -0
  14. package/dist/assets/virtualExposes-DN39MDG_.js +1 -0
  15. package/dist/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C7GyRUYR.js +7 -0
  16. package/dist/config.json +5 -0
  17. package/dist/index.html +12 -0
  18. package/dist/mf-entry-bootstrap-0.js +17 -0
  19. package/package.json +46 -0
  20. package/vite.config.mjs +54 -0
@@ -0,0 +1 @@
1
+ import{t as z,f as k}from"./index-CFSsOKn1.js";import"./virtualExposes-DN39MDG_.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C7GyRUYR.js";import"./preload-helper-BlTxHScW.js";import"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-DyN2-cW9.js";import"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BPkY-A6Y.js";import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-BaezSRSI.js";import"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DOfR9NH3.js";import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-DjktxNPA.js";class U{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:s,serializer:n,deserializer:l,serdeContext:c,defaultContentType:y}){this.marshaller=s,this.serializer=n,this.deserializer=l,this.serdeContext=c,this.defaultContentType=y}async serializeEventStream({eventStream:s,requestSchema:n,initialRequest:l}){const c=this.marshaller,y=n.getEventStreamMember(),S=n.getMemberSchema(y),d=this.serializer,h=this.defaultContentType,u=Symbol("initialRequestMarker"),p={async*[Symbol.asyncIterator](){if(l){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:h}};d.write(n,l);const e=d.flush();yield{[u]:!0,headers:r,body:e}}for await(const r of s)yield r}};return c.serialize(p,r=>{if(r[u])return{headers:r.headers,body:r.body};let e="";for(const i in r)if(i!=="__type"){e=i;break}const{additionalHeaders:t,body:a,eventType:o,explicitPayloadContentType:m}=this.writeEventBody(e,S,r);return{headers:{":event-type":{type:"string",value:o},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??h},...t},body:a}})}async deserializeEventStream({response:s,responseSchema:n,initialResponseContainer:l}){const c=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),h=Symbol("initialResponseMarker"),u=c.deserialize(s.body,async e=>{let t="";for(const o in e)if(o!=="__type"){t=o;break}const a=e[t].body;if(t==="initial-response"){const o=await this.deserializer.read(n,a);return delete o[y],{[h]:!0,...o}}else if(t in d){const o=d[t];if(o.isStructSchema()){const m={};let f=!1;for(const[i,g]of o.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(f=f||!!(v||w),w)g.isBlobSchema()?m[i]=a:g.isStringSchema()?m[i]=(this.serdeContext?.utf8Encoder??z)(a):g.isStructSchema()&&(m[i]=await this.deserializer.read(g,a));else if(v){const b=e[t].headers[i]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?m[i]=BigInt(b.toString()):m[i]=Number(b):m[i]=b)}}if(f)return{[t]:m};if(a.byteLength===0)return{[t]:{}}}return{[t]:await this.deserializer.read(o,a)}}else return{$unknown:e}}),p=u[Symbol.asyncIterator](),r=await p.next();if(r.done)return u;if(r.value?.[h]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const e in r.value)l[e]=r.value[e]}return{async*[Symbol.asyncIterator](){for(r?.value?.[h]||(yield r.value);;){const{done:e,value:t}=await p.next();if(e)break;yield t}}}}writeEventBody(s,n,l){const c=this.serializer;let y=s,S=null,d;const h=n.getSchema()[4].includes(s),u={};if(h){const e=n.getMemberSchema(s);if(e.isStructSchema()){for(const[t,a]of e.structIterator()){const{eventHeader:o,eventPayload:m}=a.getMergedTraits();if(m)S=t;else if(o){const f=l[s][t];let i="binary";a.isNumericSchema()?(-2)**31<=f&&f<=2**31-1?i="integer":i="long":a.isTimestampSchema()?i="timestamp":a.isStringSchema()?i="string":a.isBooleanSchema()&&(i="boolean"),f!=null&&(u[t]={type:i,value:f},delete l[s][t])}}if(S!==null){const t=e.getMemberSchema(S);t.isBlobSchema()?d="application/octet-stream":t.isStringSchema()&&(d="text/plain"),c.write(t,l[s][S])}else c.write(e,l[s])}else if(e.isUnitSchema())c.write(e,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[e,t]=l[s];y=e,c.write(15,t)}const p=c.flush()??new Uint8Array;return{body:typeof p=="string"?(this.serdeContext?.utf8Decoder??k)(p):p,eventType:y,explicitPayloadContentType:d,additionalHeaders:u}}}export{U as EventStreamSerde};
@@ -0,0 +1 @@
1
+ const p="modulepreload",v=function(l){return"/"+l},d={},y=function(f,c,E){let i=Promise.resolve();if(c&&c.length>0){let r=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),u=t?.nonce||t?.getAttribute("nonce");i=r(c.map(e=>{if(e=v(e),e in d)return;d[e]=!0;const o=e.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":p,o||(n.as="script"),n.crossOrigin="",n.href=e,u&&n.setAttribute("nonce",u),document.head.appendChild(n),o)return new Promise((m,h)=>{n.addEventListener("load",m),n.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${e}`)))})}))}function a(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return i.then(r=>{for(const t of r||[])t.status==="rejected"&&a(t.reason);return f().catch(a)})};export{y as _};
@@ -0,0 +1 @@
1
+ import"./preload-helper-BlTxHScW.js";import{g as r,i as a}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C7GyRUYR.js";export{r as get,a as init};
@@ -0,0 +1 @@
1
+ Promise.resolve();const e={};export{e as default};
@@ -0,0 +1,7 @@
1
+ import{_ as Be}from"./preload-helper-BlTxHScW.js";var lr={},cr={},Pt={},N={},L={},v={};const un="federation-manifest.json",fn=".json",dn="FEDERATION_DEBUG",B={AT:"@",HYPHEN:"-",SLASH:"/"},qe={[B.AT]:"scope_",[B.HYPHEN]:"_",[B.SLASH]:"__"},hn={[qe[B.AT]]:B.AT,[qe[B.HYPHEN]]:B.HYPHEN,[qe[B.SLASH]]:B.SLASH},mn=":",_n="mf-manifest.json",pn="mf-stats.json",gn={NPM:"npm",APP:"app"},yn="__MF_DEVTOOLS_MODULE_INFO__",En="ENCODE_NAME_PREFIX",Sn=".federation";let bn=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});v.BROWSER_LOG_KEY=dn;v.ENCODE_NAME_PREFIX=En;v.EncodedNameTransformMap=hn;v.FederationModuleManifest=un;v.MANIFEST_EXT=fn;v.MFModuleType=gn;v.MODULE_DEVTOOL_IDENTIFIER=yn;v.ManifestFileName=_n;v.NameTransformMap=qe;v.NameTransformSymbol=B;v.SEPARATOR=mn;v.StatsFileName=pn;v.TEMP_DIR=Sn;v.TreeShakingStatus=bn;var ur={},ee={},Dt=Object.defineProperty,Rn=(e,t)=>{let r={};for(var n in e)Dt(r,n,{get:e[n],enumerable:!0});return t||Dt(r,Symbol.toStringTag,{value:"Module"}),r};ee.__exportAll=Rn;(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(ur);var fr={};(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var hr={};(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(hr);var mr={};(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(mr);var _r={};(function(e){var r=ee.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(_r);var Y={},be={};const Tn=v,pr=!0;function gr(){return pr}function In(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function Nn(){try{if(gr()&&window.localStorage)return!!localStorage.getItem(Tn.BROWSER_LOG_KEY)}catch{return!1}return!1}function Mn(){return typeof process<"u"&&be&&be.FEDERATION_DEBUG?!!be.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:Nn()}const Pn=function(){return typeof process<"u"&&be?be:{}};Y.getProcessEnv=Pn;Y.isBrowserEnv=gr;Y.isBrowserEnvValue=pr;Y.isDebugMode=Mn;Y.isReactNativeEnv=In;var D={};const E=v,pt=Y,yr="[ Federation Runtime ]",vn=(e,t,r=E.SEPARATOR)=>{const n=e.split(r),o=pt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(E.MANIFEST_EXT);if(n.length>=2){let[a,...c]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return i(l)?{name:a,entry:l}:{name:a,version:l||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},On=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${E.SEPARATOR}${r}`:r:t,""):""},vt=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${E.NameTransformSymbol.AT}`,"g"),E.NameTransformMap[E.NameTransformSymbol.AT]).replace(new RegExp(`${E.NameTransformSymbol.HYPHEN}`,"g"),E.NameTransformMap[E.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${E.NameTransformSymbol.SLASH}`,"g"),E.NameTransformMap[E.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},An=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.AT]}`,"g"),E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.AT]]).replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.SLASH]}`,"g"),E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.SLASH]]).replace(new RegExp(`${E.NameTransformMap[E.NameTransformSymbol.HYPHEN]}`,"g"),E.EncodedNameTransformMap[E.NameTransformMap[E.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},$n=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),vt(r,"__federation_expose_",t)},kn=(e,t)=>e?vt(e,"__federation_shared_",t):"",wn=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!pt.isBrowserEnv()&&!pt.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Fn=(e,t)=>{e||Er(t)},Er=e=>{throw new Error(`${yr}: ${e}`)},Ln=e=>{console.warn(`${yr}: ${e}`)};function Dn(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Hn=/^([\d^=v<>~]|[*xX]$)/;function qn(e){return Hn.test(e)}D.assert=Fn;D.composeKeyWithSeparator=On;D.decodeName=An;D.encodeName=vt;D.error=Er;D.generateExposeFilename=$n;D.generateShareFilename=kn;D.getResourceUrl=wn;D.isRequiredVersion=qn;D.parseEntry=vn;D.safeToString=Dn;D.warn=Ln;var ue={};const ye=v,le=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function Sr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Cn(e,t={}){const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?Sr(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=e.remotes?.reduce((p,R)=>{let w;const O=R.federationContainerName;return a.includes(O)?w=n[O]:"version"in R?w=R.version:w=R.entry,p[O]={matchedVersion:w},p},{})||{}),Object.keys(r).forEach(p=>c[p]={matchedVersion:a.includes(p)?n[p]:r[p]});const{remoteEntry:{path:l,name:u,type:f},types:d={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:_,ssrRemoteEntry:m}=e.metaData,{exposes:y}=e;let g={version:o||"",buildVersion:h,globalName:_,remoteEntry:le(l,u),remoteEntryType:f,remoteTypes:le(d.path,d.name),remoteTypesZip:d.zip||"",remoteTypesAPI:d.api||"",remotesInfo:c,shared:e?.shared.map(p=>({assets:p.assets,sharedName:p.name,version:p.version,usedExports:p.referenceExports||[]})),modules:y?.map(p=>({moduleName:p.name,modulePath:p.path,assets:p.assets}))};if("publicPath"in e.metaData?(s={...g,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...g,getPublicPath:i()},m){const p=le(m.path,m.name);s.ssrRemoteEntry=p,s.ssrRemoteEntryType=m.type||"commonjs-module"}return s}function Un(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ye.MANIFEST_EXT))}function Gn(e){if(!e)return{statsFileName:ye.StatsFileName,manifestFileName:ye.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,c)=>a.replace(n,`${c}${n}`),i=r?o(r):ye.ManifestFileName;return{statsFileName:le(t,r?s(i,"-stats"):ye.StatsFileName),manifestFileName:le(t,i)}}ue.generateSnapshotFromManifest=Cn;ue.getManifestFileName=Gn;ue.inferAutoPublicPath=Sr;ue.isManifestProvider=Un;ue.simpleJoinRemoteEntry=le;var fe={};const Ht=Y,br="[ Module Federation ]",pe=console,Wn=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Bn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
2
+ `),r=t.filter(n=>!Wn.some(o=>n.includes(o)));return r.length?`Stack trace:
3
+ ${r.slice(0,5).join(`
4
+ `)}`:void 0}catch{return}}var Rr=class{constructor(e,t=pe){this.prefix=e,this.delegate=t??pe}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??pe}emit(e,t){const r=this.delegate,n=Ht.isDebugMode()?Bn():void 0,o=n?[...t,n]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=pe[i];if(typeof a=="function"){a.call(pe,this.prefix,...o);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){Ht.isDebugMode()&&this.emit("debug",e)}};function Tr(e){return new Rr(e)}function Ir(e){const t=new Rr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function jn(e,t,r){if(e.__mf_infrastructure_logger__&&t?.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const Vn=Tr(br),xn=Ir(br);fe.bindLoggerToCompiler=jn;fe.createInfrastructureLogger=Ir;fe.createLogger=Tr;fe.infrastructureLogger=xn;fe.logger=Vn;var de={};const Xn=D;async function Ot(e,t){try{return await e()}catch(r){!t&&Xn.warn(r);return}}function je(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Nr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const u=s[l],f=u.getAttribute("src");if(f&&je(f,e.url)){t=u,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=l?.type==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(n=u.timeout))),t.src||(t.src=e.url),l&&!u&&Object.keys(l).forEach(f=>{t&&(f==="async"||f==="defer"?t[f]=l[f]:t.getAttribute(f)||t.setAttribute(f,l[f]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&je(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const c=async(l,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const f=()=>{if(u?.type==="error"){const d=new Error(u?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);d.name="ScriptNetworkError",e?.onErrorCallback&&e?.onErrorCallback(d)}else i?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Ot(()=>{const{needDeleteScript:d=!0}=e;d&&t?.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const d=l(u);if(d instanceof Promise){const h=await d;return f(),h}return f(),d}f()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,{type:"error",isTimeout:!0})},n),{script:t,needAttach:r}}function Kn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const i=n[s],a=i.getAttribute("href"),c=i.getAttribute("rel");if(a&&je(a,e.url)&&c===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let s;const i=e.attrs;e.createLinkHook&&(s=e.createLinkHook(e.url,i),s instanceof HTMLLinkElement&&(t=s)),i&&!s&&Object.keys(i).forEach(a=>{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{i?.type==="error"?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Ot(()=>{const{needDeleteLink:c=!0}=e;c&&t?.parentNode&&t.parentNode.removeChild(t)}),s)){const c=s(i);return a(),c}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function zn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Nr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}de.createLink=Kn;de.createScript=Nr;de.isStaticResourcesEqual=je;de.loadScript=zn;de.safeWrapper=Ot;var At={};const Yn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Jn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};At.createScriptNode=Yn;At.loadScriptNode=Jn;var Mr={};function Zn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}Mr.normalizeOptions=Zn;var Pr={};const Qn=e=>e;Pr.createModuleFederationConfig=Qn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v,r=ur,n=fr,o=dr,s=hr,i=mr,a=_r,c=Y,l=D,u=ue,f=fe,d=de,h=At,_=Mr,m=Pr;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=l.assert,e.bindLoggerToCompiler=f.bindLoggerToCompiler,e.composeKeyWithSeparator=l.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=f.createInfrastructureLogger,e.createLink=d.createLink,e.createLogger=f.createLogger,e.createModuleFederationConfig=m.createModuleFederationConfig,e.createScript=d.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=l.decodeName,e.encodeName=l.encodeName,e.error=l.error,e.generateExposeFilename=l.generateExposeFilename,e.generateShareFilename=l.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=c.getProcessEnv,e.getResourceUrl=l.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=f.infrastructureLogger,e.isBrowserEnv=c.isBrowserEnv,e.isBrowserEnvValue=c.isBrowserEnvValue,e.isDebugMode=c.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=c.isReactNativeEnv,e.isRequiredVersion=l.isRequiredVersion,e.isStaticResourcesEqual=d.isStaticResourcesEqual,e.loadScript=d.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=f.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=_.normalizeOptions,e.parseEntry=l.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=l.safeToString,e.safeWrapper=d.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=l.warn})(L);var vr={},$t={};const eo=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,to=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(eo(e)),n&&o.push(`Original Error Message:
5
+ ${n}`),o.join(`
6
+ `)};$t.getShortErrorMsg=to;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$t;function r(n,o,s,i,a,c){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(vr);let ro=L,no=vr;const Z="[ Federation Runtime ]",gt=(0,ro.createLogger)(Z);function oo(e,t,r,n,o){e||(r!==void 0?yt(t,r,n,void 0,o):yt(t))}function yt(e,t,r,n,o){if(t!==void 0)return(0,no.logAndReport)(e,t,r??{},i=>{throw new Error(`${Z}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(Z)||(s.message=`${Z}: ${s.message}`),s):new Error(`${Z}: ${s}`)}function so(e){e instanceof Error&&(e.message.startsWith(Z)||(e.message=`${Z}: ${e.message}`)),gt.warn(e)}N.assert=oo;N.error=yt;N.logger=gt;N.warn=so;var T={};const io=N;let qt=L;function ao(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function lo(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function co(e){return typeof e.entry<"u"}function uo(e){return!e.entry.includes(".json")}async function fo(e,t){try{return await e()}catch(r){!t&&io.warn(r);return}}function ho(e){return e&&typeof e=="object"}const Or=Object.prototype.toString;function mo(e){return Or.call(e)==="[object Object]"}function _o(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function po(e){return Array.isArray(e)?e:[e]}function go(e){const t={url:"",type:"global",globalName:""};return qt.isBrowserEnvValue||(0,qt.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"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}const yo=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};T.addUniqueItem=ao;T.arrayOptions=po;T.getFMId=lo;T.getRemoteEntryInfoFromSnapshot=go;T.isObject=ho;T.isPlainObject=mo;T.isPureRemoteEntry=uo;T.isRemoteInfoWithEntry=co;T.isStaticResourcesEqual=_o;T.objectToString=Or;T.processModuleAlias=yo;T.safeWrapper=fo;var S={};const Ar=N,Et=T;let Eo=L;const P=typeof globalThis=="object"?globalThis:window,H=(()=>{try{return document.defaultView}catch{return P}})(),So=H;function Ce(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Ue(e,t){return Object.hasOwnProperty.call(e,t)}Ue(P,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Ce(P,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const St=P.__GLOBAL_LOADING_REMOTE_ENTRY__;function $r(e){Ue(e,"__VMOK__")&&!Ue(e,"__FEDERATION__")&&Ce(e,"__FEDERATION__",e.__VMOK__),Ue(e,"__FEDERATION__")||(Ce(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Ce(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}$r(P);$r(H);function bo(){P.__FEDERATION__.__GLOBAL_PLUGIN__=[],P.__FEDERATION__.__INSTANCES__=[],P.__FEDERATION__.moduleInfo={},P.__FEDERATION__.__SHARE__={},P.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(St).forEach(e=>{delete St[e]})}function Ro(e){P.__FEDERATION__.__INSTANCES__.push(e)}function To(){return P.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Io(e,t=(0,Eo.isDebugMode)()){t&&(P.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,P.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.4.0")}function bt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Ar.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const No=()=>H.__FEDERATION__.moduleInfo,kr=(e,t)=>{const r=bt(t,Et.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=Et.getFMId(o),i=bt(H.__FEDERATION__.moduleInfo,s).value;if(i?.version===n)return i}},Mo=e=>kr(e,H.__FEDERATION__.moduleInfo),Po=(e,t)=>{const r=Et.getFMId(e);return H.__FEDERATION__.moduleInfo[r]=t,H.__FEDERATION__.moduleInfo},vo=e=>(H.__FEDERATION__.moduleInfo={...H.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete H.__FEDERATION__.moduleInfo[r]}),Oo=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:P[r]}},Ao=e=>{const{__GLOBAL_PLUGIN__:t}=H.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Ar.warn(`The plugin ${r.name} has been registered.`)})},$o=()=>H.__FEDERATION__.__GLOBAL_PLUGIN__,ko=e=>P.__FEDERATION__.__PRELOADED_MAP__.get(e),wo=e=>P.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);S.CurrentGlobal=P;S.Global=So;S.addGlobalSnapshot=vo;S.getGlobalFederationConstructor=To;S.getGlobalHostPlugins=$o;S.getGlobalSnapshot=No;S.getGlobalSnapshotInfoByModuleInfo=Mo;S.getInfoWithoutType=bt;S.getPreloaded=ko;S.getRemoteEntryExports=Oo;S.getTargetSnapshotInfoByModuleInfo=kr;S.globalLoading=St;S.nativeGlobal=H;S.registerGlobalPlugins=Ao;S.resetFederationGlobalInfo=bo;S.setGlobalFederationConstructor=Io;S.setGlobalFederationInstance=Ro;S.setGlobalSnapshotInfoByModuleInfo=Po;S.setPreloaded=wo;var kt={},te={},G={};const Ct="[0-9A-Za-z-]+",wt=`(?:\\+(${Ct}(?:\\.${Ct})*))`,Re="0|[1-9]\\d*",Ge="[0-9]+",wr="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ut=`(?:${Ge}|${wr})`,Fo=`(?:-?(${Ut}(?:\\.${Ut})*))`,Gt=`(?:${Re}|${wr})`,Fr=`(?:-(${Gt}(?:\\.${Gt})*))`,et=`${Re}|x|X|\\*`,ce=`[v=\\s]*(${et})(?:\\.(${et})(?:\\.(${et})(?:${Fr})?${wt}?)?)?`,Lo=`^\\s*(${ce})\\s+-\\s+(${ce})\\s*$`,Do=`[v=\\s]*${`(${Ge})\\.(${Ge})\\.(${Ge})`}${Fo}?${wt}?`,Ft="((?:<|>)?=?)",Ho=`(\\s*)${Ft}\\s*(${Do}|${ce})`,Lr="(?:~>?)",qo=`(\\s*)${Lr}\\s+`,Dr="(?:\\^)",Co=`(\\s*)${Dr}\\s+`,Uo="(<|>)?=?\\s*\\*",Go=`^${Dr}${ce}$`,Wo=`v?${`(${Re})\\.(${Re})\\.(${Re})`}${Fr}?${wt}?`,Bo=`^${Lr}${ce}$`,jo=`^${Ft}\\s*${ce}$`,Vo=`^${Ft}\\s*(${Wo})$|^$`,xo="^\\s*>=\\s*0.0.0\\s*$";G.caret=Go;G.caretTrim=Co;G.comparator=Vo;G.comparatorTrim=Ho;G.gte0=xo;G.hyphenRange=Lo;G.star=Uo;G.tilde=Bo;G.tildeTrim=qo;G.xRange=jo;const Xo=G;function Hr(e){return new RegExp(e)}function Ko(e){return!e||e.toLowerCase()==="x"||e==="*"}function zo(...e){return t=>e.reduce((r,n)=>n(r),t)}function Yo(e){return e.match(Hr(Xo.comparator))}function Jo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}te.combineVersion=Jo;te.extractComparator=Yo;te.isXVersion=Ko;te.parseRegex=Hr;te.pipe=zo;var j={};const X=G,b=te;function Zo(e){return e.replace(b.parseRegex(X.hyphenRange),(t,r,n,o,s,i,a,c,l,u,f,d)=>(b.isXVersion(n)?r="":b.isXVersion(o)?r=`>=${n}.0.0`:b.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,b.isXVersion(l)?c="":b.isXVersion(u)?c=`<${Number(l)+1}.0.0-0`:b.isXVersion(f)?c=`<${l}.${Number(u)+1}.0-0`:d?c=`<=${l}.${u}.${f}-${d}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Qo(e){return e.replace(b.parseRegex(X.comparatorTrim),"$1$2$3")}function es(e){return e.replace(b.parseRegex(X.tildeTrim),"$1~")}function ts(e){return e.replace(b.parseRegex(X.caretTrim),"$1^")}function rs(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.caret),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function ns(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.tilde),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function os(e){return e.split(/\s+/).map(t=>t.trim().replace(b.parseRegex(X.xRange),(r,n,o,s,i,a)=>{const c=b.isXVersion(o),l=c||b.isXVersion(s),u=l||b.isXVersion(i);return n==="="&&u&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function ss(e){return e.trim().replace(b.parseRegex(X.star),"")}function is(e){return e.trim().replace(b.parseRegex(X.gte0),"")}j.parseCaretTrim=ts;j.parseCarets=rs;j.parseComparatorTrim=Qo;j.parseGTE0=is;j.parseHyphen=Zo;j.parseStar=ss;j.parseTildeTrim=es;j.parseTildes=ns;j.parseXRanges=os;var qr={};function We(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function as(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?We(i,a):-1:1}return 0}function ke(e,t){return We(e.major,t.major)||We(e.minor,t.minor)||We(e.patch,t.patch)||as(e,t)}function tt(e,t){return e.version===t.version}function ls(e,t){switch(e.operator){case"":case"=":return tt(e,t);case">":return ke(e,t)<0;case">=":return tt(e,t)||ke(e,t)<0;case"<":return ke(e,t)>0;case"<=":return tt(e,t)||ke(e,t)>0;case void 0:return!0;default:return!1}}qr.compare=ls;const ie=te,x=j,cs=qr;function us(e){return ie.pipe(x.parseCarets,x.parseTildes,x.parseXRanges,x.parseStar)(e)}function fs(e){return ie.pipe(x.parseHyphen,x.parseComparatorTrim,x.parseTildeTrim,x.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function ds(e,t){if(!e)return!1;const r=ie.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:ie.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a?.split(".")},l=t.split("||");for(const u of l){const f=u.trim();if(!f||f==="*"||f==="x")return!0;try{const d=fs(f);if(!d.trim())return!0;const h=d.split(" ").map(y=>us(y)).join(" ");if(!h.trim())return!0;const _=h.split(/\s+/).map(y=>x.parseGTE0(y)).filter(Boolean);if(_.length===0)continue;let m=!0;for(const y of _){const g=ie.extractComparator(y);if(!g){m=!1;break}const[,p,,R,w,O,I]=g;if(!cs.compare({operator:p,version:ie.combineVersion(R,w,O,I),major:R,minor:w,patch:O,preRelease:I?.split(".")},c)){m=!1;break}}if(m)return!0}catch(d){console.error(`[semver] Error processing range part "${f}":`,d);continue}}return!1}kt.satisfy=ds;var q={},re={};const hs="default",ms="global";re.DEFAULT_REMOTE_TYPE=ms;re.DEFAULT_SCOPE=hs;const Ve=N,Cr=T,Ur=S,_s=re,Ee=kt;let Rt=L;function ps(e,t,r,n){let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{Ve.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&Ve.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e?.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??Rt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function gs(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=Cr.arrayOptions(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(ps(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===Rt.TreeShakingStatus.NO_USE?!1:r===Rt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?Es(e,t):!0:!1}function Q(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Ee.satisfy(r(e),`<=${r(t)}`)}const Ie=(e,t)=>{const r=t||function(n,o){return Q(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},xe=e=>!!e.loaded||typeof e.lib=="function",ys=e=>!!e.loading,Es=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Ss(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!xe(o[c].treeShaking)&&Q(c,l):!1:!0:!xe(o[c])&&Q(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}const ne=e=>xe(e)||ys(e);function bs(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(ne(o[l].treeShaking))return ne(o[c].treeShaking)?!!Q(c,l):!0;if(ne(o[c].treeShaking))return!1}return ne(o[l])?ne(o[c])?!!Q(c,l):!0:ne(o[c])?!1:Q(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}function Rs(e){return e==="loaded-first"?bs:Ss}function Ts(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=_s.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(const l of c)if(o&&e[l]&&e[l][t]){const{requiredVersion:u}=o,{version:f,useTreesShaking:d}=Rs(i)(e,l,t,a),h=()=>{const m=e[l][t][f];if(o.singleton){if(typeof u=="string"&&!Ee.satisfy(f,u)){const y=`Version ${f} from ${f&&m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?Ve.error(y):Ve.warn(y)}return{shared:m,useTreesShaking:d}}else{if(u===!1||u==="*")return{shared:m,useTreesShaking:d};if(Ee.satisfy(f,u))return{shared:m,useTreesShaking:d};const y=Te(a);if(y){for(const[g,p]of Object.entries(e[l][t]))if(Te(p.treeShaking,a?.usedExports)&&Ee.satisfy(g,u))return{shared:p,useTreesShaking:y}}for(const[g,p]of Object.entries(e[l][t]))if(Ee.satisfy(g,u))return{shared:p,useTreesShaking:!1}}},_={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:Ur.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(_)||_).resolver()}}function Is(){return Ur.Global.__FEDERATION__.__SHARE__}function Ns(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(f=>{l[f.version]=f}),l[Ie(l,function(f,d){return!xe(l[f])&&Q(f,d)})]},s=r?.resolver??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const u of c)if(u)for(const[f,d]of Object.entries(u)){const h=l[f];i(h)&&i(d)?l[f]=a(h,d):d!==void 0&&(l[f]=d)}return l};return a(s(n[t]),r?.customShareInfo)}const Ms=(e,t)=>{e.useIn||(e.useIn=[]),Cr.addUniqueItem(e.useIn,t)};function Ps(e,t){return t&&e.treeShaking?e.treeShaking:e}q.addUseIn=Ms;q.directShare=Ps;q.formatShareConfigs=gs;q.getGlobalShareScope=Is;q.getRegisteredShare=Ts;q.getTargetSharedOptions=Ns;q.shouldUseTreeShaking=Te;var he={};function vs(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Os(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}he.matchRemote=Os;he.matchRemoteWithNameAndExpose=vs;var V={},K={},$={};const As="RUNTIME-001",$s="RUNTIME-002",ks="RUNTIME-003",ws="RUNTIME-004",Fs="RUNTIME-005",Ls="RUNTIME-006",Ds="RUNTIME-007",Hs="RUNTIME-008",qs="RUNTIME-009",Cs="RUNTIME-010",Us="RUNTIME-011",Gs="RUNTIME-012",Ws="TYPE-001",Bs="BUILD-001",js="BUILD-002";$.BUILD_001=Bs;$.BUILD_002=js;$.RUNTIME_001=As;$.RUNTIME_002=$s;$.RUNTIME_003=ks;$.RUNTIME_004=ws;$.RUNTIME_005=Fs;$.RUNTIME_006=Ls;$.RUNTIME_007=Ds;$.RUNTIME_008=Hs;$.RUNTIME_009=qs;$.RUNTIME_010=Cs;$.RUNTIME_011=Us;$.RUNTIME_012=Gs;$.TYPE_001=Ws;var Pe={};const k=$,Gr={[k.RUNTIME_001]:"Failed to get remoteEntry exports.",[k.RUNTIME_002]:'The remote entry interface does not contain "init"',[k.RUNTIME_003]:"Failed to get manifest.",[k.RUNTIME_004]:"Failed to locate remote.",[k.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[k.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[k.RUNTIME_007]:"Failed to get remote snapshot.",[k.RUNTIME_008]:"Failed to load script resources.",[k.RUNTIME_009]:"Please call createInstance first.",[k.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[k.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot.",[k.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},Wr={[k.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Br={[k.BUILD_001]:"Failed to find expose module.",[k.BUILD_002]:"PublicPath is required in prod mode."},Vs={...Gr,...Wr,...Br};Pe.buildDescMap=Br;Pe.errorDescMap=Vs;Pe.runtimeDescMap=Gr;Pe.typeDescMap=Wr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$,r=$t,n=Pe;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.RUNTIME_012=t.RUNTIME_012,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(K);const Ke=N,ae=S,Wt=re;let jr=L,Ne=K;const Vr=".then(callbacks[0]).catch(callbacks[1])";async function xs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Vr}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ke.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function Xs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Vr}`)([r,n])}catch(o){Ke.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Ks(e,t,r){const{remoteEntryKey:n,entryExports:o}=ae.getRemoteEntryExports(e,t);return o||Ke.error(Ne.RUNTIME_001,Ne.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function zs({name:e,globalName:t,entry:r,remoteInfo:n,loaderHook:o,getEntryUrl:s}){const{entryExports:i}=ae.getRemoteEntryExports(e,t);if(i)return i;const a=s?s(r):r;return(0,jr.loadScript)(a,{attrs:{},createScriptHook:(c,l)=>{const u=o.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:n});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>Ks(e,t,r),c=>{const l=c instanceof Error?c.message:String(c);Ke.error(Ne.RUNTIME_008,Ne.runtimeDescMap,{remoteName:e,resourceUrl:a},l)})}async function Ys({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return xs({entry:o,remoteEntryExports:t});case"system":return Xs({entry:o,remoteEntryExports:t});default:return zs({entry:o,globalName:s,name:i,remoteInfo:e,loaderHook:r,getEntryUrl:n})}}function Tt(e){const{entry:t,name:r}=e;return(0,jr.composeKeyWithSeparator)(r,t)}async function xr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=Tt(n);if(r)return r;if(!ae.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;ae.globalLoading[i]=a.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||Ys({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o})).catch(async l=>{const u=Tt(n),f=l instanceof Error&&l.message.includes("ScriptExecutionError");if(l instanceof Error&&l.message.includes(Ne.RUNTIME_008)&&!f&&!s){const d=_=>xr({..._,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:d,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:ae.globalLoading,uniqueKey:u});if(h)return h}throw l})}return ae.globalLoading[i]}function Js(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Wt.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Wt.DEFAULT_SCOPE}}V.getRemoteEntry=xr;V.getRemoteEntryUniqueKey=Tt;V.getRemoteInfo=Js;var Xr={};function Zs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Xr.getBuilderId=Zs;var Kr={};const Qs=S;function ei(e,t){const r=Qs.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e?.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Kr.registerPlugins=ei;var ve={};function ti(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function ri(e){const t={};for(const[r,n]of Object.entries(e.shared)){const o=n[0];o&&(t[r]={version:o.version,singleton:o.shareConfig?.singleton,requiredVersion:o.shareConfig?.requiredVersion===!1?!1:o.shareConfig?.requiredVersion,eager:o.eager,strictVersion:o.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?"host":"unknown"},mfConfig:{name:e.name,remotes:e.remotes?.map(ti)??[],shared:t}}}ve.optionsToMFContext=ri;var zr={},J={};const ni=N,oi=he,Bt=V;let Se=L;function Yr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function si(e,t){return t.map(r=>{const n=oi.matchRemote(e,r.nameOrAlias);return ni.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,Se.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Yr(r)}})}function ii(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function ai(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:c}=a,l=t.moduleCache.get(e.name);l?Bt.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}):Bt.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const a={rel:"preload",as:"script"};s.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};s.forEach(c=>{const{script:l,needAttach:u}=(0,Se.createScript)({url:c,cb:()=>{},attrs:a,createScriptHook:(f,d)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}J.defaultPreloadArgs=Yr;J.formatPreloadArgs=si;J.normalizePreloadExposes=ii;J.preloadAssets=ai;const A=S,jt=q,li=he,ci=V,ui=J,fi={getRegisteredShare:jt.getRegisteredShare,getGlobalShareScope:jt.getGlobalShareScope},di={Global:A.Global,nativeGlobal:A.nativeGlobal,resetFederationGlobalInfo:A.resetFederationGlobalInfo,setGlobalFederationInstance:A.setGlobalFederationInstance,getGlobalFederationConstructor:A.getGlobalFederationConstructor,setGlobalFederationConstructor:A.setGlobalFederationConstructor,getInfoWithoutType:A.getInfoWithoutType,getGlobalSnapshot:A.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:A.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:A.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:A.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:A.addGlobalSnapshot,getRemoteEntryExports:A.getRemoteEntryExports,registerGlobalPlugins:A.registerGlobalPlugins,getGlobalHostPlugins:A.getGlobalHostPlugins,getPreloaded:A.getPreloaded,setPreloaded:A.setPreloaded};var hi={global:di,share:fi,utils:{matchRemoteWithNameAndExpose:li.matchRemoteWithNameAndExpose,preloadAssets:ui.preloadAssets,getRemoteInfo:ci.getRemoteInfo}};zr.default=hi;var ze={};const rt=N,Vt=T,mi=V,_i=ve;let pi=L,xt=K;function gi(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var yi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await mi.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return rt.assert(e,`remoteEntryExports is undefined
7
+ ${(0,pi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=gi(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&rt.error(xt.RUNTIME_002,xt.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,_i.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),rt.assert(i,`${Vt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Vt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};ze.Module=yi;var Jr={},me={},Ei=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const 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()}};me.SyncHook=Ei;var Oe={};const Si=me;var bi=class extends Si.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};Oe.AsyncHook=bi;var _e={};const nt=N,Zr=T,Ri=me;function Qr(e,t){if(!Zr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var Ti=class extends Ri.SyncHook{constructor(e){super(),this.onerror=nt.error,this.type=e}emit(e){Zr.isObject(e)||nt.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(Qr(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){nt.warn(r),this.onerror(r)}return e}};_e.SyncWaterfallHook=Ti;_e.checkReturnData=Qr;var Ae={};const ot=N,Ii=T,Ni=me,Mi=_e;var Pi=class extends Ni.SyncHook{constructor(e){super(),this.onerror=ot.error,this.type=e}emit(e){Ii.isObject(e)||ot.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(ot.warn(s),this.onerror(s),e),o=s=>{if(Mi.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}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)}};Ae.AsyncWaterfallHook=Pi;var $e={};const we=N,vi=T;var Oi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){we.assert(vi.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;we.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(n=>{const o=e[n];o&&this.lifecycle[n].on(o)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};$e.PluginSystem=Oi;var Ye={};const Ai=N,It=T,$i=J;let Xt=L,Kt=K;function en(e,t){const r=It.getRemoteEntryInfoFromSnapshot(t);r.url||Ai.error(Kt.RUNTIME_011,Kt.runtimeDescMap,{remoteName:e.name});let n=(0,Xt.getResourceUrl)(t,r.url);!Xt.isBrowserEnvValue&&!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 ki(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!It.isRemoteInfoWithEntry(t)||!It.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});en(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&$i.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}Ye.assignRemoteInfo=en;Ye.snapshotPlugin=ki;var tn={};const Me=T,Nt=S,wi=q,zt=J,Fi=Ye;let Xe=L;function Li(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function rn(e,t,r,n,o={},s){const{value:i}=Nt.getInfoWithoutType(e,Me.getFMId(t)),a=s||i;if(a&&!(0,Xe.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=Li(l),f=a.remotesInfo[l];rn(e,{name:u.name,version:f.matchedVersion},r,!1,o,void 0)}}}const st=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Di(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(rn(n,r,(_,m,y)=>{let g;if(y)g=f;else if(Array.isArray(d)){const I=d.find(F=>F.nameOrAlias===m.name||F.nameOrAlias===m.alias);if(!I)return;g=zt.defaultPreloadArgs(I)}else if(d===!0)g=f;else return;const p=(0,Xe.getResourceUrl)(_,Me.getRemoteEntryInfoFromSnapshot(_).url);p&&a.push({name:m.name,moduleInfo:{name:m.name,entry:p,type:"remoteEntryType"in _?_.remoteEntryType:"global",entryGlobalName:"globalName"in _?_.globalName:m.name,shareScope:"",version:"version"in _?_.version:void 0},url:p});let R="modules"in _?_.modules:[];const w=zt.normalizePreloadExposes(g.exposes);w.length&&"modules"in _&&(R=_?.modules?.reduce((I,F)=>(w?.indexOf(F.moduleName)!==-1&&I.push(F),I),[]));function O(I){const F=I.map(W=>(0,Xe.getResourceUrl)(_,W));return g.filter?F.filter(g.filter):F}if(R){const I=R.length;for(let F=0;F<I;F++){const W=R[F],Qe=`${m.name}/${W.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:W.moduleName==="."?m.name:Qe,name:m.name,remoteSnapshot:_,preloadConfig:g,remote:m,origin:e}),!Nt.getPreloaded(Qe)&&(g.resourceCategory==="all"?(s.push(...O(W.assets.css.async)),s.push(...O(W.assets.css.sync)),i.push(...O(W.assets.js.async)),i.push(...O(W.assets.js.sync))):g.resourceCategory==="sync"&&(s.push(...O(W.assets.css.sync)),i.push(...O(W.assets.js.sync))),Nt.setPreloaded(Qe))}}},!0,{},o),o.shared&&o.shared.length>0){const _=(m,y)=>{const{shared:g}=wi.getRegisteredShare(e.shareScopeMap,y.sharedName,m,e.sharedHandler.hooks.lifecycle.resolveShare)||{};g&&typeof g.lib=="function"&&(y.assets.js.sync.forEach(p=>{c.add(p)}),y.assets.css.sync.forEach(p=>{l.add(p)}))};o.shared.forEach(m=>{const y=u.shared?.[m.sharedName];if(!y)return;const g=m.version?y.find(p=>p.version===m.version):y;g&&Me.arrayOptions(g).forEach(p=>{_(p,m)})})}const h=i.filter(_=>!c.has(_)&&!st("script",_));return{cssAssets:s.filter(_=>!l.has(_)&&!st("link",_)),jsAssetsWithoutEntry:h,entryAssets:a.filter(_=>!st("script",_.url))}}const Hi=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return Xe.isBrowserEnvValue?Me.isRemoteInfoWithEntry(o)&&Me.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Fi.assignRemoteInfo(n,i),Di(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};tn.generatePreloadAssetsPlugin=Hi;var Je={};const it=N,qi=T,U=S,Ci=V,Yt=ve,Ui=Oe,at=Ae,Gi=$e;let lt=L,Fe=K;function nn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var Wi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Gi.PluginSystem({beforeLoadRemoteSnapshot:new Ui.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new at.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new at.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new at.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,f;if(c)if((0,lt.isManifestProvider)(c)){const d=lt.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(d,e,{}),_=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:d},h);u=h,f=_}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=d,f=l}else if(qi.isRemoteInfoWithEntry(e)){const d=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,d),{remoteSnapshot:_}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:d,from:"global"});u=_,f=h}else it.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Yt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return nn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{},Ci.getRemoteInfo(t));(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],it.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Yt.optionsToMFContext(this.HostInstance.options)))}return it.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,lt.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Je.SnapshotHandler=Wi;Je.getGlobalRemoteInfo=nn;var on={};const ct=N,Bi=re,M=q,Jt=ve,ji=Oe,ut=_e,Zt=Ae,Vi=$e;let ge=K;var xi=class{constructor(e){this.hooks=new Vi.PluginSystem({beforeRegisterShare:new ut.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new Zt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new Zt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new ji.AsyncHook,resolveShare:new ut.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new ut.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=M.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),this.shareScopeMap[i]?.[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=M.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});ct.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=M.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=M.directShare(s,i);if(a.lib)return M.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),M.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return M.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t?.customShareInfo)return!1;const a=M.shouldUseTreeShaking(o.treeShaking),c=M.directShare(o,a),u=(async()=>{const f=await c.get();c.lib=f,c.loaded=!0,M.addUseIn(c,r.options.name);const{shared:d,useTreesShaking:h}=M.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(d){const _=M.directShare(d,h);_.lib=f,_.loaded=!0,d.from=o.from}return f})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Bi.DEFAULT_SCOPE,t){const{host:r}=this,n=t?.from,o=t?.strategy;let s=t?.initScope;const i=[];if(n!=="build"){const{initTokens:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(d,h)=>{const{version:_,eager:m}=h;l[d]=l[d]||{};const y=l[d],g=y[_]&&M.directShare(y[_]),p=!!(g&&("eager"in g&&g.eager||"shareConfig"in g&&g.shareConfig?.eager));(!g||g.strategy!=="loaded-first"&&!g.loaded&&(!m!=!p?m:c>y[_].from))&&(y[_]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let _;try{_=await h.getEntry()}catch(m){if(_=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:m,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!_)return}finally{_?.init&&!h.initing&&(h.remoteEntryExports=_,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,n=M.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=M.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return M.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return M.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&ct.error(t?.from==="build"?ge.RUNTIME_005:ge.RUNTIME_006,ge.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Jt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}ct.error(ge.RUNTIME_006,ge.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Jt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{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:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,f=Array.isArray(l)?l:[l],d=h=>{const _=(y,g,p)=>{p&&!y[g]&&(y[g]=p)},m=a?h.treeShaking:h;_(m,"loaded",s),_(m,"loading",o),_(m,"get",i)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const _=this.shareScopeMap[h][e][c];d(_),r&&_.from!==r&&(_.from=r)})}_setGlobalShareScopeMap(e){const t=M.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};on.SharedHandler=xi;var sn={};const Le=N,C=S,Qt=re,Xi=q,Ki=he,ft=V,zi=ve,er=J,Yi=ze,Ji=me,oe=Oe,tr=_e,Zi=Ae,Qi=$e,ea=Je;let dt=L,rr=K;var ta=class{constructor(e){this.hooks=new Qi.PluginSystem({beforeRegisterRemote:new tr.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new tr.SyncWaterfallHook("registerRemote"),beforeRequest:new Zi.AsyncWaterfallHook("beforeRequest"),onLoad:new oe.AsyncHook("onLoad"),handlePreloadModule:new Ji.SyncHook("handlePreloadModule"),errorLoadRemote:new oe.AsyncHook("errorLoadRemote"),beforePreloadRemote:new oe.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new oe.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new oe.AsyncHook,loadEntry:new oe.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:f}=i,d=await o.get(u,l,t,f),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?d:void 0,exposeModuleFactory:n?void 0:d,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:d}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=er.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=ft.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&er.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Ki.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(rr.RUNTIME_004,rr.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,zi.optionsToMFContext(t.options));const{remote:i}=s,a=ft.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let f=t.moduleCache.get(l.name);const d={host:t,remoteInfo:a};return f||(f=new Yi.Module(d),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:d,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));Le.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&dt.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Qt.DEFAULT_SCOPE),e.type||(e.type=Qt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,dt.warn)(i.join(" ")))}}removeRemote(e){try{const{host:t}=this,{name:r}=e,n=t.options.remotes.findIndex(s=>s.name===r);n!==-1&&t.options.remotes.splice(n,1);const o=t.moduleCache.get(e.name);if(o){const s=o.remoteInfo,i=s.entryGlobalName;C.CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(C.CurrentGlobal,i)?.configurable?delete C.CurrentGlobal[i]:C.CurrentGlobal[i]=void 0);const a=ft.getRemoteEntryUniqueKey(o.remoteInfo);C.globalLoading[a]&&delete C.globalLoading[a],t.snapshotHandler.manifestCache.delete(s.entry);let c=s.buildVersion?(0,dt.composeKeyWithSeparator)(s.name,s.buildVersion):s.name;const l=C.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>s.buildVersion?f.options.id===c:f.name===c);if(l!==-1){const f=C.CurrentGlobal.__FEDERATION__.__INSTANCES__[l];c=f.options.id||c;const d=Xi.getGlobalShareScope();let h=!0;const _=[];Object.keys(d).forEach(m=>{const y=d[m];y&&Object.keys(y).forEach(g=>{const p=y[g];p&&Object.keys(p).forEach(R=>{const w=p[R];w&&Object.keys(w).forEach(O=>{const I=w[O];I&&typeof I=="object"&&I.from===s.name&&(I.loaded||I.loading?(I.useIn=I.useIn.filter(F=>F!==s.name),I.useIn.length?h=!1:_.push([m,g,R,O])):_.push([m,g,R,O]))})})})}),h&&(f.shareScopeMap={},delete d[c]),_.forEach(([m,y,g,p])=>{delete d[m]?.[y]?.[g]?.[p]}),C.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(l,1)}const{hostGlobalSnapshot:u}=ea.getGlobalRemoteInfo(e,t);if(u){const f=u&&"remotesInfo"in u&&u.remotesInfo&&C.getInfoWithoutType(u.remotesInfo,e.name).key;f&&(delete u.remotesInfo[f],C.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete C.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}t.moduleCache.delete(e.name)}}catch(t){Le.logger.error(`removeRemote failed: ${t instanceof Error?t.message:String(t)}`)}}};sn.RemoteHandler=ta;const ra=N,na=re,oa=q,sa=Xr,ia=Kr,aa=V,la=ze,z=me,ht=Oe,ca=_e,nr=Ae,mt=$e,ua=Ye,fa=tn,da=Je,ha=on,ma=sn;let _a=L,_t=K;const pa=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ga=class{constructor(e){this.hooks=new mt.PluginSystem({beforeInit:new ca.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new nr.AsyncWaterfallHook("beforeInitContainer"),initContainer:new nr.AsyncWaterfallHook("initContainer")}),this.version="2.4.0",this.moduleCache=new Map,this.loaderHook=new mt.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ht.AsyncHook,loadEntryError:new ht.AsyncHook,getModuleFactory:new ht.AsyncHook}),this.bridgeHook=new mt.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=pa?[ua.snapshotPlugin(),fa.generatePreloadAssetsPlugin()]:[],r={id:sa.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:_a.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new da.SnapshotHandler(this),this.sharedHandler=new ha.SharedHandler(this),this.remoteHandler=new ma.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&ra.error((0,_t.getShortErrorMsg)(_t.RUNTIME_010,_t.runtimeDescMap)),this.registerPlugins(e.plugins);const 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=na.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=aa.getRemoteInfo({name:e,entry:t}),o=new la.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}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){const{allShareInfos:r}=oa.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i,id:n.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=ia.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Jr.ModuleFederation=ga;var an={},ln={},or=Object.defineProperty,ya=(e,t)=>{let r={};for(var n in e)or(r,n,{get:e[n],enumerable:!0});return t||or(r,Symbol.toStringTag,{value:"Module"}),r};ln.__exportAll=ya;(function(e){var r=ln.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(an);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N,r=T,n=S,o=kt,s=q,i=he,a=V,c=zr,l=ze,u=Jr,f=an;let d=L;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return d.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return d.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return f.type_exports}})})(Pt);let Ea=Pt;function Sa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ba(e,t){const r=Sa();return Ea.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}cr.getGlobalFederationInstance=ba;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cr;let r=Pt,n=K;function o(m){const y=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)({id:`${m.name}@${m.version||Date.now()}`,...m});return(0,r.setGlobalFederationInstance)(y),y}let s=null;function i(m){const y=t.getGlobalFederationInstance(m.name,m.version),g={...m,id:m.id||""};return y?(y.initOptions(g),s||(s=y),y):(s=o(g),s)}function a(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,m)}function c(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,m)}function l(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,m)}function u(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,m)}function f(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,m)}function d(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,m)}function h(){return s}function _(...m){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,m)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=d,e.registerRemotes=f,e.registerShared=_})(lr);typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const cn="__mf_init__virtual:mf:__mfe_internal__reventless_host_shell__mf_v__runtimeInit__mf_v__.js__";let Mt=globalThis[cn];if(!Mt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Mt=globalThis[cn]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ra=Mt.initResolve,Ze="__mf_module_cache__";globalThis[Ze]||={share:{},remote:{}};globalThis[Ze].share||={};globalThis[Ze].remote||={};const se=globalThis[Ze],sr={},ir="default",ar="__mfe_internal__reventless_host_shell";let De,He;async function Lt(e){for(let t=0;;t++)try{return await e()}catch(r){throw r}}async function Ta(){return De||(De=Lt(()=>Be(()=>import("./_virtual_mf-localSharedImportMap___mfe_internal__reventless_host_shell-CZiiMwGO.js"),[])).catch(e=>{throw De=void 0,e})),De}async function Ia(){return He||(He=Lt(()=>Be(()=>import("./virtualExposes-DN39MDG_.js"),[])).then(e=>e.default??e).catch(e=>{throw He=void 0,e})),He}async function Ma(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Ta();if(se.share.react===void 0){const i=await Be(()=>import("./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-DyN2-cW9.js").then(u=>u._),[]),c=(u=>{let f=u;for(let d=0;d<5;d++){const h=f?.default;if(!h||typeof h!="object")break;const _=Object.keys(f).filter(m=>m!=="default").map(m=>f[m]);if(_.length>0&&_.some(m=>m!==void 0))break;f=h}return f})(i),l=c===i?{...i}:c;Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),se.share.react=l}if(se.share["react-dom"]===void 0){const i=await Be(()=>import("./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-iXrUa0b8.js").then(u=>u._),[]),c=(u=>{let f=u;for(let d=0;d<5;d++){const h=f?.default;if(!h||typeof h!="object")break;const _=Object.keys(f).filter(m=>m!=="default").map(m=>f[m]);if(_.length>0&&_.some(m=>m!==void 0))break;f=h}return f})(i),l=c===i?{...i}:c;Object.defineProperty(l,"__esModule",{value:!0,enumerable:!1}),se.share["react-dom"]=l}const o=lr.init({name:ar,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=sr[ir];if(s||(s=sr[ir]={from:ar}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ra(o);try{await Lt(async()=>{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))})}catch(i){console.error("[Module Federation]",i)}for(const[i,a]of Object.entries(r)){if(a.shareConfig?.import!==!1||se.share[i]!==void 0)continue;const c=_=>{let m=_;for(let y=0;y<5;y++){const g=m?.default;if(!g||typeof g!="object")break;const p=Object.keys(m).filter(R=>R!=="default").map(R=>m[R]);if(p.length>0&&p.some(R=>R!==void 0))break;m=g}return m},l=e?.[i],u=l&&l[Object.keys(l)[0]];if(!u)continue;const f=u.lib||(u.loading?await u.loading:await u.get?.()),d=typeof f=="function"?f():f,h=await Promise.resolve(d);se.share[i]=c(h)}return o}}async function Pa(e){const t=await Ia();if(!(e in t))throw new Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{lr as d,Pa as g,Ma as i};
@@ -0,0 +1,5 @@
1
+ {
2
+ "apiEndpoint": "/graphql",
3
+ "platformApiEndpoint": "/platform-graphql",
4
+ "authMode": "local"
5
+ }
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Reventless</title>
7
+ <script type="module" crossorigin src="/mf-entry-bootstrap-0.js"></script>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ </body>
12
+ </html>
@@ -0,0 +1,17 @@
1
+
2
+ const __mfCacheGlobalKey = "__mf_module_cache__";
3
+ globalThis[__mfCacheGlobalKey] ||= { share: {}, remote: {} };
4
+ globalThis[__mfCacheGlobalKey].share ||= {};
5
+ globalThis[__mfCacheGlobalKey].remote ||= {};
6
+ const __mfModuleCache = globalThis[__mfCacheGlobalKey];
7
+
8
+ const __mfImport = (src) =>
9
+ globalThis.System && typeof globalThis.System.import === 'function'
10
+ ? globalThis.System.import(src)
11
+ : import(src);
12
+ (async () => {
13
+ const { initHost } = await __mfImport("/assets/hostInit-B-sFDoqT.js");
14
+ const runtime = await initHost();
15
+ const __mfRemotePreloads = [];
16
+ await Promise.all(__mfRemotePreloads);
17
+ })().then(() => __mfImport("/assets/index-CFSsOKn1.js"));
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@reventlessdev/reventless-host-shell",
3
+ "version": "3.0.0-alpha.33",
4
+ "description": "Reventless host shell SPA — loads plugin UI fragments at runtime via Module Federation",
5
+ "bin": {
6
+ "reventless-host-shell": "bin/start.mjs"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "dist/",
11
+ "vite.config.mjs"
12
+ ],
13
+ "scripts": {
14
+ "dev": "vite",
15
+ "preview": "vite preview",
16
+ "build:rescript": "rescript build",
17
+ "watch:rescript": "rescript build -w",
18
+ "build": "vite build",
19
+ "prepublishOnly": "pnpm -w run build && pnpm run build"
20
+ },
21
+ "dependencies": {
22
+ "@aws-sdk/client-cognito-identity-provider": "^3.658.0",
23
+ "@module-federation/runtime": "^0.18.0",
24
+ "@module-federation/vite": "^1.5.0",
25
+ "graphql-ws": "^5.16.0",
26
+ "jwt-decode": "^4.0.0",
27
+ "react": "^18.3.1",
28
+ "react-dom": "^18.3.1",
29
+ "react-error-boundary": "^4.1.2",
30
+ "react-relay": "^20.1.1",
31
+ "relay-runtime": "^20.1.1",
32
+ "rescript-relay": "^4.4.1",
33
+ "vite": "^6.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "@rescript/react": "^0.13.1",
37
+ "@reventlessdev/reventless-routes": "3.0.0-alpha.8",
38
+ "@reventlessdev/reventless-ui": "3.0.0-alpha.29",
39
+ "rescript": "^12.3.0"
40
+ },
41
+ "publishConfig": {
42
+ "registry": "https://registry.npmjs.org",
43
+ "access": "public"
44
+ },
45
+ "gitHead": "86ac1e1310d9d0f5da7d715041d9dac94892a7a9"
46
+ }
@@ -0,0 +1,54 @@
1
+ import { federation } from "@module-federation/vite"
2
+
3
+ // The host shell ships with no build-time remotes. Plugin remotes are
4
+ // discovered at runtime via the Platform_UIFragments GraphQL query and
5
+ // registered through @module-federation/runtime's registerRemotes(). The
6
+ // `remotes: {}` declaration here just initialises the federation runtime
7
+ // for the bundle.
8
+ const mfPlugin = federation({
9
+ name: "reventless_host_shell",
10
+ remotes: {},
11
+ shared: {
12
+ react: { singleton: true, requiredVersion: "^18.3.1" },
13
+ "react-dom": { singleton: true, requiredVersion: "^18.3.1" },
14
+ },
15
+ // No TS in this package — disable the @module-federation/dts-plugin so
16
+ // dev mode doesn't crash trying to read tsconfig.json.
17
+ dts: false,
18
+ })
19
+
20
+ // Local dev proxies — point the in-memory platform's split admin/data
21
+ // GraphQL servers at the paths that public/config.json names. In
22
+ // production, config.json points apiEndpoint and platformApiEndpoint at
23
+ // the deployed domain, so no proxy is involved.
24
+ const proxy = {
25
+ "/graphql": "http://localhost:4000",
26
+ // `ws: true` lets vite forward graphql-ws upgrade requests through the same
27
+ // path. Without it the WebSocket open would 404 and the host shell's
28
+ // onPluginStatusChange / onUIFragmentChange subscriptions never connect.
29
+ "/platform-graphql": {
30
+ target: "http://localhost:4001",
31
+ ws: true,
32
+ rewrite: path => path.replace(/^\/platform-graphql/, "/graphql"),
33
+ },
34
+ // Auth_InMemory's POST /__inmemory/login + /logout endpoints (Stage A4
35
+ // in reventless-core). Same origin as /graphql so the host-shell's
36
+ // AuthProvider can hit them without a separate base URL.
37
+ "/__inmemory": "http://localhost:4000",
38
+ }
39
+
40
+ export default {
41
+ plugins: [mfPlugin],
42
+ build: {
43
+ target: "esnext",
44
+ outDir: "dist",
45
+ emptyOutDir: true,
46
+ },
47
+ // `strictPort` keeps the dev/preview server on 5180 rather than silently
48
+ // bumping to 5181+ when the port is taken (e.g. a leftover server from a prior
49
+ // run). The VS Code runner relies on this fixed port; a real conflict should
50
+ // fail loudly so it can be freed (the extension's "Free Platform/UI Ports"
51
+ // button) rather than drift to a new port each restart.
52
+ server: { port: 5180, strictPort: true, proxy },
53
+ preview: { port: 5180, strictPort: true, proxy },
54
+ }