UNPKG

@curatedotfun/telegram

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