signalk-questdb 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coderabbit.yaml +17 -2
- package/.release-please-manifest.json +1 -1
- package/AGENTS.md +80 -0
- package/CLAUDE.md +1 -79
- package/README.md +34 -12
- package/dist/api-contract.d.ts +1 -1
- package/dist/change-gate.d.ts +6 -6
- package/dist/change-gate.js +8 -6
- package/dist/change-gate.js.map +1 -1
- package/dist/config/schema.d.ts +1 -0
- package/dist/config/schema.js +6 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +42 -54
- package/dist/index.js.map +1 -1
- package/dist/path-matcher.d.ts +5 -4
- package/dist/path-matcher.js +17 -10
- package/dist/path-matcher.js.map +1 -1
- package/dist/restore.d.ts +10 -6
- package/dist/restore.js +22 -8
- package/dist/restore.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AppPanel-C293yEHl.js → AppPanel-D_HLFa10.js} +1 -1
- package/public/assets/PluginConfigurationPanel-DhWC94G3.js +13 -0
- package/public/assets/{_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BH9mY6vj.js → _virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js} +1 -1
- package/public/assets/{_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-H1lSL0nN.js → _virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-BgRwx7LZ.js} +1 -1
- package/public/assets/{dist-BhVCbinB.js → dist-B4My1YVh.js} +1 -1
- package/public/assets/helpers-PTLizuYm.js +1 -0
- package/public/assets/hostInit-Dvn0aCSd.js +1 -0
- package/public/assets/{index-QJC86Uvi.js → index-j5iNctbW.js} +2 -2
- package/public/assets/pendingShares-BHVf8sM9.js +2 -0
- package/public/assets/{utils-D62kKhzq.js → utils-BesU7hIa.js} +1 -1
- package/public/assets/{vite-preload-helper-CRzLMJPS.js → vite-preload-helper-DclECHGd.js} +1 -1
- package/public/remoteEntry.js +2 -2
- package/public/assets/PluginConfigurationPanel-7qfy8fIR.js +0 -11
- package/public/assets/helpers-CvnX61Ju.js +0 -1
- package/public/assets/hostInit-Ds8KD_fS.js +0 -1
- package/public/assets/pendingShares-DemvETkM.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var e={AT:`@`,HYPHEN:`-`,SLASH:`/`},t={[e.AT]:`scope_`,[e.HYPHEN]:`_`,[e.SLASH]:`__`};t[e.AT],e.AT,t[e.HYPHEN],e.HYPHEN,t[e.SLASH],e.SLASH;var n=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function r(){return!0}function i(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function a(){try{if(r()&&window.localStorage)return!!localStorage.getItem(`FEDERATION_DEBUG`)}catch{return!1}return!1}function o(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:a()}var s=`[ Federation Runtime ]`,c=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function l(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?!r()&&!i()&&`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),``)}var u=e=>{console.warn(`${s}: ${e}`)};function d(e){try{return JSON.stringify(e,null,2)}catch{return``}}var f=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function p(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function m(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?p(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:m={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:ee},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,ne={version:i||``,buildVersion:ee,globalName:h,remoteEntry:f(l,u),remoteEntryType:d,remoteTypes:f(m.path,m.name),remoteTypesZip:m.zip||``,remoteTypesAPI:m.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={...ne,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={...ne,getPublicPath:o()},g){let e=f(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function ee(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var h=`[ Module Federation ]`,g=console,te=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function ne(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
2
2
|
`),n=t.filter(e=>!te.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
3
3
|
`)}`:void 0}catch{return}}var re=class{constructor(e,t=g){this.prefix=e,this.delegate=t??g}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??g}emit(e,t){let n=this.delegate,r=o()?ne():void 0,i=r?[...t,r]:t,a=(()=>{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(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=g[e];if(typeof t==`function`){t.call(g,this.prefix,...i);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){o()&&this.emit(`debug`,e)}};function ie(e){return new re(e)}function ae(e){let t=new re(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ie(h),ae(h);async function oe(e,t){try{return await e()}catch(e){!t&&u(e);return}}function se(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function ce(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&se(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&se(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.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.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,oe(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&se(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,oe(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function ue(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=ce({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var de=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,fe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(de(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
4
|
-
`)};function pe(e,t,n,r,i,a){return r(fe(e,t,n,i))}var _=`[ Federation Runtime ]`,me=ie(_);function v(e,t,n,r,i){e||(n===void 0?y(t):y(t,n,r,void 0,i))}function y(e,t,n,r,i){if(t!==void 0)return pe(e,t,n??{},e=>{throw Error(`${_}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(_)||(a.message=`${_}: ${a.message}`),a):Error(`${_}: ${a}`)}function b(e){e instanceof Error&&(e.message.startsWith(_)||(e.message=`${_}: ${e.message}`)),me.warn(e)}function he(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function x(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ge(e){return e.entry!==void 0}function _e(e){return!e.entry.includes(`.json`)}function ve(e){return e&&typeof e==`object`}var ye=Object.prototype.toString;function be(e){return ye.call(e)===`[object Object]`}function xe(e){return Array.isArray(e)?e:[e]}function Se(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Ce=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},we=2e3,S=typeof globalThis==`object`?globalThis:window,C=(()=>{try{return document.defaultView}catch{return S}})(),w=C;function T(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function E(e,t){return Object.hasOwnProperty.call(e,t)}E(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var D=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function Te(e){E(e,`__VMOK__`)&&!E(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),E(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),T(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,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Te(S),Te(C);function Ee(){S.__FEDERATION__.__GLOBAL_PLUGIN__=[],S.__FEDERATION__.__INSTANCES__=[],S.__FEDERATION__.moduleInfo={},S.__FEDERATION__.__SHARE__={},S.__FEDERATION__.__MANIFEST_LOADING__={},S.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(D).forEach(e=>{delete D[e]})}function De(e){S.__FEDERATION__.__INSTANCES__.push(e)}function Oe(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function ke(e,t=o()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.2`)}function O(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}y(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ae=()=>C.__FEDERATION__.moduleInfo,je=(e,t)=>{let n=O(t,x(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,...n}=e,r=x(n),i=O(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},k=e=>je(e,C.__FEDERATION__.moduleInfo),Me=(e,t)=>{let n=x(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Ne=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Pe=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Fe=e=>{let{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):b(`The plugin ${e.name} has been registered.`)})},Ie=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Le=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ze=e=>S.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Be=e=>{let t=S.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>we){let e=t.values().next().value;e!==void 0&&t.delete(e)}},Ve=`[0-9A-Za-z-]+`,He=`(?:\\+(${Ve}(?:\\.${Ve})*))`,A=`0|[1-9]\\d*`,j=`[0-9]+`,Ue=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,We=`(?:${j}|${Ue})`,Ge=`(?:-?(${We}(?:\\.${We})*))`,Ke=`(?:${A}|${Ue})`,qe=`(?:-(${Ke}(?:\\.${Ke})*))`,Je=`${A}|x|X|\\*`,M=`[v=\\s]*(${Je})(?:\\.(${Je})(?:\\.(${Je})(?:${qe})?${He}?)?)?`,Ye=`^\\s*(${M})\\s+-\\s+(${M})\\s*$`,Xe=`[v=\\s]*${`(${j})\\.(${j})\\.(${j})`}${Ge}?${He}?`,Ze=`((?:<|>)?=?)`,Qe=`(\\s*)${Ze}\\s*(${Xe}|${M})`,$e=`(?:~>?)`,et=`(\\s*)${$e}\\s+`,tt=`(?:\\^)`,nt=`(\\s*)${tt}\\s+`,rt=`(<|>)?=?\\s*\\*`,it=`^${tt}${M}$`,at=`v?${`(${A})\\.(${A})\\.(${A})`}${qe}?${He}?`,ot=`^${$e}${M}$`,st=`^${Ze}\\s*${M}$`,ct=`^${Ze}\\s*(${at})$|^$`,lt=`^\\s*>=\\s*0.0.0\\s*$`;function N(e){return new RegExp(e)}function P(e){return!e||e.toLowerCase()===`x`||e===`*`}function ut(...e){return t=>e.reduce((e,t)=>t(e),t)}function dt(e){return e.match(N(ct))}function ft(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function pt(e){return e.replace(N(Ye),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=P(n)?``:P(r)?`>=${n}.0.0`:P(i)?`>=${n}.${r}.0`:`>=${t}`,s=P(c)?``:P(l)?`<${Number(c)+1}.0.0-0`:P(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function mt(e){return e.replace(N(Qe),`$1$2$3`)}function ht(e){return e.replace(N(et),`$1~`)}function gt(e){return e.replace(N(nt),`$1^`)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(N(it),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function vt(e){return e.trim().split(/\s+/).map(e=>e.replace(N(ot),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(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 yt(e){return e.split(/\s+/).map(e=>e.trim().replace(N(st),(e,t,n,r,i,a)=>{let o=P(n),s=o||P(r),c=s||P(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function bt(e){return e.trim().replace(N(rt),``)}function xt(e){return e.trim().replace(N(lt),``)}function F(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function St(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?F(t,i):-1:1}return 0}function I(e,t){return F(e.major,t.major)||F(e.minor,t.minor)||F(e.patch,t.patch)||St(e,t)}function Ct(e,t){return e.version===t.version}function wt(e,t){switch(e.operator){case``:case`=`:return Ct(e,t);case`>`:return I(e,t)<0;case`>=`:return Ct(e,t)||I(e,t)<0;case`<`:return I(e,t)>0;case`<=`:return Ct(e,t)||I(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return ut(_t,vt,yt,bt)(e)}function Et(e){return ut(pt,mt,ht,gt)(e.trim()).split(/\s+/).join(` `)}function L(e,t){if(!e)return!1;let n=dt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ft(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Et(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Tt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>xt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=dt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:ft(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Dt=`default`,Ot=`global`;function kt(e,t,r,i){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{y(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&y(`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:a,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??i)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??n.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=xe(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function R(e,t){if(!e)return!1;let{status:r,mode:i}=e;return r===n.NO_USE?!1:r===n.CALCULATED?!0:i===`runtime-infer`?!t||Nt(e,t):!1}function z(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!!L(n(e),`<=${n(t)}`)}var B=(e,t)=>{let n=t||function(e,t){return z(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},jt=e=>!!e.loaded||typeof e.lib==`function`,Mt=e=>!!e.loading,Nt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pt(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&z(e,t):!1:!0:!jt(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}var V=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(V(i[t].treeShaking))return!V(i[e].treeShaking)||!!z(e,t);if(V(i[e].treeShaking))return!1}return V(i[t])?!V(i[e])||!!z(e,t):!V(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function H(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=Dt,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=It(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!L(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?y(e):b(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||L(u,l))return{shared:r,useTreesShaking:d};let n=R(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(R(i.treeShaking,c?.usedExports)&&L(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(L(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Lt(){return w.__FEDERATION__.__SHARE__}function Rt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[B(t,function(e,n){return!jt(t[e])&&z(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var U=(e,t)=>{e.useIn||=[],he(e.useIn,t)};function zt(e,t){return t&&e.treeShaking?e.treeShaking:e}function Bt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Vt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ht(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ut=`RUNTIME-001`,Wt=`RUNTIME-002`,Gt=`RUNTIME-003`,Kt=`RUNTIME-004`,qt=`RUNTIME-005`,Jt=`RUNTIME-006`,Yt=`RUNTIME-007`,Xt=`RUNTIME-008`,Zt=`RUNTIME-009`,Qt=`RUNTIME-010`,$t=`RUNTIME-011`,en=`RUNTIME-012`,tn=`RUNTIME-013`,nn=`RUNTIME-014`,rn=`RUNTIME-015`,an=`TYPE-001`,on=`BUILD-001`,sn=`BUILD-002`,W={[Ut]:`Failed to get remoteEntry exports.`,[Wt]:`The remote entry interface does not contain "init"`,[Gt]:`Failed to get manifest.`,[Kt]:`Failed to locate remote.`,[qt]:`Invalid loadShareSync function call from bundler runtime`,[Jt]:`Invalid loadShareSync function call from runtime`,[Yt]:`Failed to get remote snapshot.`,[Xt]:`Failed to load script resources.`,[Zt]:`Please call createInstance first.`,[Qt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[$t]:`The remoteEntry URL is missing from the remote snapshot.`,[en]:`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.`,[tn]:`The manifest is not a valid Module Federation manifest.`,[nn]:`The remote does not expose the requested module.`,[rn]:`Remote container initialization failed.`},cn={[an]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},ln={[on]:`Failed to find expose module.`,[sn]:`PublicPath is required in prod mode.`};({...W,...cn,...ln});var un=`.then(callbacks[0]).catch(callbacks[1])`,dn=new WeakMap,fn=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function pn(e){return e instanceof TypeError&&fn.some(t=>e.message.includes(t))}function mn(e){return e===`esm`||e===`module`}async function hn({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((i,a)=>{let o=e=>{if(pn(e)){let t=e instanceof Error?e.message:String(e);try{y(Xt,W,{remoteName:n,resourceUrl:s},t)}catch(e){a(e);return}}a(e)},s=r?r(e):e;try{t?i(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${s}")${un}`)([i,o]):import(s).then(i).catch(o)}catch(e){y(`Failed to load ESM entry from "${s}". ${e instanceof Error?e.message:String(e)}`)}})}async function gn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${un}`)([n,r])}catch(t){y(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function _n(e,t,n){let{remoteEntryKey:r,entryExports:i}=Pe(e,t);return i||y(Ut,W,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function vn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Pe(e,t);if(s)return s;let c=a?a(n):n;return ue(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>_n(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);y(Xt,W,{remoteName:e,resourceUrl:c},n)})}async function yn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return mn(c)?hn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?gn({entry:a,remoteEntryExports:t}):vn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function bn(e){let{entry:t,name:n}=e;return c(n,t)}async function xn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=bn(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!D[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook,l=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||yn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>xn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:D,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e});D[s]=l,l.then(void 0,()=>{D[s]===l&&delete D[s]}),dn.set(l,t)}let c=D[s];if(dn.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function G(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Sn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Cn(e){let t=new Map;return[...e||[],...Ie()].forEach(e=>{e&&(v(be(e),`Plugin configuration is invalid.`),v(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function wn(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function Tn(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return Cn(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=wn(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function En(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 K(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(En)??[],shared:t}}}function Dn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function On(e,t){return t.map(t=>{let n=Ht(e,t.nameOrAlias);return v(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&d({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Dn(t)}})}function kn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function An(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function q(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function jn(e,t,n,r){return n?ze(t)?Promise.resolve(q(e,t,`cached`)):(Be(t),r()):r()}async function Mn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return q(r,a,`cached`);try{if(!await xn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return q(r,a,`success`)}catch(e){return q(r,a,An(e)?`timeout`:`error`,e)}}function Nn({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=le({url:n,cb:()=>{o(q(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Pn({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=ce({url:n,cb:()=>{a(q(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Fn(e,t){return{...e,resourceType:t}}function In(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(Mn(t,e,r,Fn(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Pn,u={fetchpriority:`high`,type:`text/javascript`};r?(n=Nn,u={rel:`preload`,as:`script`}):mn(e.type)&&(n=Nn,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=Fn(i,`js`);l.push(jn(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var Ln={global:{Global:w,nativeGlobal:C,resetFederationGlobalInfo:Ee,setGlobalFederationInstance:De,getGlobalFederationConstructor:Oe,setGlobalFederationConstructor:ke,getInfoWithoutType:O,getGlobalSnapshot:Ae,getTargetSnapshotInfoByModuleInfo:je,getGlobalSnapshotInfoByModuleInfo:k,setGlobalSnapshotInfoByModuleInfo:Me,addGlobalSnapshot:Ne,getRemoteEntryExports:Pe,registerGlobalPlugins:Fe,getGlobalHostPlugins:Ie,getPreloaded:Le,setPreloaded:Re},share:{getRegisteredShare:H,getGlobalShareScope:Lt},utils:{matchRemoteWithNameAndExpose:Vt,preloadAssets:In,getRemoteInfo:G}};function Rn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function zn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Bn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Bt(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await xn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return v(r,`remoteEntryExports is undefined \n ${d(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=zn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&y(Wt,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,K(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){y(rn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,K(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||y(nn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Rn(r)},void 0,K(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Ce(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){v(be(e),`Plugin configuration is invalid.`);let t=e.name;v(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){v(e,`A name is required.`);let t=this.registerPlugins[e];v(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&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=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Vn(e,t){if(!ve(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Vn(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){b(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`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=>(b(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Vn(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Hn=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Un(e,t){let n=Se(t);n.url||y($t,W,{remoteName:e.name});let r=l(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Wn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ge(t)||!_e(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Bt(t.name,r)});Un(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&In(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function Gn(e){let 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 Kn(e,t,n,r,i={},a){let{value:o}=O(e,x(t)),s=a||o;if(s&&!ee(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Gn(r),a=s.remotesInfo[r];Kn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var qn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Jn(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,u=new Set,{options:d}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Kn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=Dn(e)}else if(p===!0)i=f;else return;let c=l(t,Se(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,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:c});let u=`modules`in t?t.modules:[],d=kn(i.exposes);d.length&&`modules`in t&&(u=t?.modules?.reduce((e,t)=>(d?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>l(t,e));return i.filter?n.filter(i.filter):n}if(u){let r=u.length;for(let s=0;s<r;s++){let r=u[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),Le(c)||(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Re(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=H(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{u.add(e)}))};i.shared.forEach(e=>{let n=d.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&xe(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!qn(`script`,e));return{cssAssets:a.filter(e=>!u.has(e)&&!qn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!qn(`script`,e.url))}}var Yn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ge(i)&&_e(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Un(r,o),Jn(t,n,r,a,o))}}};function Xn(e,t){let n=k({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&O(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:`version`in e?e.version:void 0})}}var Zn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`),beforeLoadManifest:new X(`beforeLoadManifest`),afterLoadManifest:new X(`afterLoadManifest`)}),this.manifestLoading=w.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=k({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ne({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!O(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(ee(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Me({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(ge(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Me(e,r);u=r,d=i}else y(Yt,W,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,K(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Xn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=G(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);t&&t instanceof Response||(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),y(Gt,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,K(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&y(tn,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,K(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=m(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Qn=class{constructor(){this.hooks=new J({})}},$n=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterRegisterShare:new Y(`afterRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){b(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){b(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,v(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=H(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=zt(c,l);if(t.lib)return U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return U(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=R(s.treeShaking),a=zt(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,U(a,n.options.name);let{shared:i,useTreesShaking:o}=H(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=zt(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&zt(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=H(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return U(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return U(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&y(t?.from===`build`?qt:Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}y(Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}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:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Lt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},er=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},tr=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}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:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Vt(n.options.remotes,e),i=e,a=r?.expose,o=r?G(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=G(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=On(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Bt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=G(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await In(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Bn({host:r,remoteInfo:G({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Vt(t.options.remotes,i);if(!a)try{y(Kt,W,{hostName:t.options.name,requestId:i},void 0,K(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=G(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;v(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Bn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));v(!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&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Dt,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),u(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=O(S.__FEDERATION__.moduleInfo,x(e)).key;delete S.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete w.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Xn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&O(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let i=bn(o.remoteInfo);D[i]&&delete D[i];let a=n.buildVersion?c(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=Lt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){me.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},nr=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,rr=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ir=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,ar=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.9.2`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y,afterBridgeRouteSync:new Y});let t=rr&&nr?[Wn(),Yn()]:[],n={id:Sn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=rr?new Zn(this):new Qn,this.sharedHandler=ir?new $n(this):new er,this.remoteHandler=rr?new tr(this):new Hn,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&y(fe(Qt,W)),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=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}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 n=ir?At(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=Tn(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},or=Ln;function sr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function cr(e,t){let n=sr();return S.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}export{ke as a,Oe as i,or as n,De as o,ar as r,cr as t};
|
|
4
|
+
`)};function pe(e,t,n,r,i,a){return r(fe(e,t,n,i))}var _=`[ Federation Runtime ]`,me=ie(_);function v(e,t,n,r,i){e||(n===void 0?y(t):y(t,n,r,void 0,i))}function y(e,t,n,r,i){if(t!==void 0)return pe(e,t,n??{},e=>{throw Error(`${_}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(_)||(a.message=`${_}: ${a.message}`),a):Error(`${_}: ${a}`)}function b(e){e instanceof Error&&(e.message.startsWith(_)||(e.message=`${_}: ${e.message}`)),me.warn(e)}function he(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function x(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ge(e){return e.entry!==void 0}function _e(e){return!e.entry.includes(`.json`)}function ve(e){return e&&typeof e==`object`}var ye=Object.prototype.toString;function be(e){return ye.call(e)===`[object Object]`}function xe(e){return Array.isArray(e)?e:[e]}function Se(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Ce=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},we=2e3,S=typeof globalThis==`object`?globalThis:window,C=(()=>{try{return document.defaultView}catch{return S}})(),w=C;function T(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function E(e,t){return Object.hasOwnProperty.call(e,t)}E(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var D=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function Te(e){E(e,`__VMOK__`)&&!E(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),E(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),T(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,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Te(S),Te(C);function Ee(){S.__FEDERATION__.__GLOBAL_PLUGIN__=[],S.__FEDERATION__.__INSTANCES__=[],S.__FEDERATION__.moduleInfo={},S.__FEDERATION__.__SHARE__={},S.__FEDERATION__.__MANIFEST_LOADING__={},S.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(D).forEach(e=>{delete D[e]})}function De(e){S.__FEDERATION__.__INSTANCES__.push(e)}function Oe(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function ke(e,t=o()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.3`)}function O(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}y(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ae=()=>C.__FEDERATION__.moduleInfo,je=(e,t)=>{let n=O(t,x(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,...n}=e,r=x(n),i=O(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},k=e=>je(e,C.__FEDERATION__.moduleInfo),Me=(e,t)=>{let n=x(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Ne=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Pe=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Fe=e=>{let{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):b(`The plugin ${e.name} has been registered.`)})},Ie=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Le=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ze=e=>S.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Be=e=>{let t=S.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>we){let e=t.values().next().value;e!==void 0&&t.delete(e)}},Ve=`[0-9A-Za-z-]+`,He=`(?:\\+(${Ve}(?:\\.${Ve})*))`,A=`0|[1-9]\\d*`,j=`[0-9]+`,Ue=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,We=`(?:${j}|${Ue})`,Ge=`(?:-?(${We}(?:\\.${We})*))`,Ke=`(?:${A}|${Ue})`,qe=`(?:-(${Ke}(?:\\.${Ke})*))`,Je=`${A}|x|X|\\*`,M=`[v=\\s]*(${Je})(?:\\.(${Je})(?:\\.(${Je})(?:${qe})?${He}?)?)?`,Ye=`^\\s*(${M})\\s+-\\s+(${M})\\s*$`,Xe=`[v=\\s]*${`(${j})\\.(${j})\\.(${j})`}${Ge}?${He}?`,Ze=`((?:<|>)?=?)`,Qe=`(\\s*)${Ze}\\s*(${Xe}|${M})`,$e=`(?:~>?)`,et=`(\\s*)${$e}\\s+`,tt=`(?:\\^)`,nt=`(\\s*)${tt}\\s+`,rt=`(<|>)?=?\\s*\\*`,it=`^${tt}${M}$`,at=`v?${`(${A})\\.(${A})\\.(${A})`}${qe}?${He}?`,ot=`^${$e}${M}$`,st=`^${Ze}\\s*${M}$`,ct=`^${Ze}\\s*(${at})$|^$`,lt=`^\\s*>=\\s*0.0.0\\s*$`;function N(e){return new RegExp(e)}function P(e){return!e||e.toLowerCase()===`x`||e===`*`}function ut(...e){return t=>e.reduce((e,t)=>t(e),t)}function dt(e){return e.match(N(ct))}function ft(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function pt(e){return e.replace(N(Ye),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=P(n)?``:P(r)?`>=${n}.0.0`:P(i)?`>=${n}.${r}.0`:`>=${t}`,s=P(c)?``:P(l)?`<${Number(c)+1}.0.0-0`:P(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function mt(e){return e.replace(N(Qe),`$1$2$3`)}function ht(e){return e.replace(N(et),`$1~`)}function gt(e){return e.replace(N(nt),`$1^`)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(N(it),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function vt(e){return e.trim().split(/\s+/).map(e=>e.replace(N(ot),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(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 yt(e){return e.split(/\s+/).map(e=>e.trim().replace(N(st),(e,t,n,r,i,a)=>{let o=P(n),s=o||P(r),c=s||P(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function bt(e){return e.trim().replace(N(rt),``)}function xt(e){return e.trim().replace(N(lt),``)}function F(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function St(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?F(t,i):-1:1}return 0}function I(e,t){return F(e.major,t.major)||F(e.minor,t.minor)||F(e.patch,t.patch)||St(e,t)}function Ct(e,t){return e.version===t.version}function wt(e,t){switch(e.operator){case``:case`=`:return Ct(e,t);case`>`:return I(e,t)<0;case`>=`:return Ct(e,t)||I(e,t)<0;case`<`:return I(e,t)>0;case`<=`:return Ct(e,t)||I(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return ut(_t,vt,yt,bt)(e)}function Et(e){return ut(pt,mt,ht,gt)(e.trim()).split(/\s+/).join(` `)}function L(e,t){if(!e)return!1;let n=dt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ft(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Et(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Tt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>xt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=dt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:ft(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Dt=`default`,Ot=`global`;function kt(e,t,r,i){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{y(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&y(`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:a,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??i)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??n.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=xe(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function R(e,t){if(!e)return!1;let{status:r,mode:i}=e;return r===n.NO_USE?!1:r===n.CALCULATED?!0:i===`runtime-infer`?!t||Nt(e,t):!1}function z(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!!L(n(e),`<=${n(t)}`)}var B=(e,t)=>{let n=t||function(e,t){return z(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},jt=e=>!!e.loaded||typeof e.lib==`function`,Mt=e=>!!e.loading,Nt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pt(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&z(e,t):!1:!0:!jt(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}var V=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(V(i[t].treeShaking))return!V(i[e].treeShaking)||!!z(e,t);if(V(i[e].treeShaking))return!1}return V(i[t])?!V(i[e])||!!z(e,t):!V(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function H(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=Dt,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=It(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!L(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?y(e):b(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||L(u,l))return{shared:r,useTreesShaking:d};let n=R(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(R(i.treeShaking,c?.usedExports)&&L(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(L(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Lt(){return w.__FEDERATION__.__SHARE__}function Rt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[B(t,function(e,n){return!jt(t[e])&&z(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var U=(e,t)=>{e.useIn||=[],he(e.useIn,t)};function zt(e,t){return t&&e.treeShaking?e.treeShaking:e}function Bt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Vt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ht(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ut=`RUNTIME-001`,Wt=`RUNTIME-002`,Gt=`RUNTIME-003`,Kt=`RUNTIME-004`,qt=`RUNTIME-005`,Jt=`RUNTIME-006`,Yt=`RUNTIME-007`,Xt=`RUNTIME-008`,Zt=`RUNTIME-009`,Qt=`RUNTIME-010`,$t=`RUNTIME-011`,en=`RUNTIME-012`,tn=`RUNTIME-013`,nn=`RUNTIME-014`,rn=`RUNTIME-015`,an=`TYPE-001`,on=`BUILD-001`,sn=`BUILD-002`,W={[Ut]:`Failed to get remoteEntry exports.`,[Wt]:`The remote entry interface does not contain "init"`,[Gt]:`Failed to get manifest.`,[Kt]:`Failed to locate remote.`,[qt]:`Invalid loadShareSync function call from bundler runtime`,[Jt]:`Invalid loadShareSync function call from runtime`,[Yt]:`Failed to get remote snapshot.`,[Xt]:`Failed to load script resources.`,[Zt]:`Please call createInstance first.`,[Qt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[$t]:`The remoteEntry URL is missing from the remote snapshot.`,[en]:`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.`,[tn]:`The manifest is not a valid Module Federation manifest.`,[nn]:`The remote does not expose the requested module.`,[rn]:`Remote container initialization failed.`},cn={[an]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},ln={[on]:`Failed to find expose module.`,[sn]:`PublicPath is required in prod mode.`};({...W,...cn,...ln});var un=`.then(callbacks[0]).catch(callbacks[1])`,dn=new WeakMap,fn=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function pn(e){return e instanceof TypeError&&fn.some(t=>e.message.includes(t))}function mn(e){return e===`esm`||e===`module`}async function hn({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((i,a)=>{let o=e=>{if(pn(e)){let t=e instanceof Error?e.message:String(e);try{y(Xt,W,{remoteName:n,resourceUrl:s},t)}catch(e){a(e);return}}a(e)},s=r?r(e):e;try{t?i(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${s}")${un}`)([i,o]):import(s).then(i).catch(o)}catch(e){y(`Failed to load ESM entry from "${s}". ${e instanceof Error?e.message:String(e)}`)}})}async function gn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${un}`)([n,r])}catch(t){y(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function _n(e,t,n){let{remoteEntryKey:r,entryExports:i}=Pe(e,t);return i||y(Ut,W,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function vn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Pe(e,t);if(s)return s;let c=a?a(n):n;return ue(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>_n(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);y(Xt,W,{remoteName:e,resourceUrl:c},n)})}async function yn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return mn(c)?hn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?gn({entry:a,remoteEntryExports:t}):vn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function bn(e){let{entry:t,name:n}=e;return c(n,t)}async function xn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=bn(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!D[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook,l=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||yn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>xn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:D,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e});D[s]=l,l.then(void 0,()=>{D[s]===l&&delete D[s]}),dn.set(l,t)}let c=D[s];if(dn.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function G(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Sn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Cn(e){let t=new Map;return[...e||[],...Ie()].forEach(e=>{e&&(v(be(e),`Plugin configuration is invalid.`),v(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function wn(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function Tn(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return Cn(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=wn(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function En(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 K(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(En)??[],shared:t}}}function Dn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function On(e,t){return t.map(t=>{let n=Ht(e,t.nameOrAlias);return v(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&d({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Dn(t)}})}function kn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function An(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function q(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function jn(e,t,n,r){return n?ze(t)?Promise.resolve(q(e,t,`cached`)):(Be(t),r()):r()}async function Mn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return q(r,a,`cached`);try{if(!await xn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return q(r,a,`success`)}catch(e){return q(r,a,An(e)?`timeout`:`error`,e)}}function Nn({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=le({url:n,cb:()=>{o(q(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Pn({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=ce({url:n,cb:()=>{a(q(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Fn(e,t){return{...e,resourceType:t}}function In(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(Mn(t,e,r,Fn(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Pn,u={fetchpriority:`high`,type:`text/javascript`};r?(n=Nn,u={rel:`preload`,as:`script`}):mn(e.type)&&(n=Nn,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=Fn(i,`js`);l.push(jn(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var Ln={global:{Global:w,nativeGlobal:C,resetFederationGlobalInfo:Ee,setGlobalFederationInstance:De,getGlobalFederationConstructor:Oe,setGlobalFederationConstructor:ke,getInfoWithoutType:O,getGlobalSnapshot:Ae,getTargetSnapshotInfoByModuleInfo:je,getGlobalSnapshotInfoByModuleInfo:k,setGlobalSnapshotInfoByModuleInfo:Me,addGlobalSnapshot:Ne,getRemoteEntryExports:Pe,registerGlobalPlugins:Fe,getGlobalHostPlugins:Ie,getPreloaded:Le,setPreloaded:Re},share:{getRegisteredShare:H,getGlobalShareScope:Lt},utils:{matchRemoteWithNameAndExpose:Vt,preloadAssets:In,getRemoteInfo:G}};function Rn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function zn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Bn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Bt(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await xn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return v(r,`remoteEntryExports is undefined \n ${d(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=zn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&y(Wt,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,K(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){y(rn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,K(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||y(nn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Rn(r)},void 0,K(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Ce(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){v(be(e),`Plugin configuration is invalid.`);let t=e.name;v(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){v(e,`A name is required.`);let t=this.registerPlugins[e];v(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&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=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Vn(e,t){if(!ve(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Vn(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){b(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`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=>(b(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Vn(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Hn=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Un(e,t){let n=Se(t);n.url||y($t,W,{remoteName:e.name});let r=l(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Wn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ge(t)||!_e(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Bt(t.name,r)});Un(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&In(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function Gn(e){let 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 Kn(e,t,n,r,i={},a){let{value:o}=O(e,x(t)),s=a||o;if(s&&!ee(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Gn(r),a=s.remotesInfo[r];Kn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var qn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Jn(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,u=new Set,{options:d}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Kn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=Dn(e)}else if(p===!0)i=f;else return;let c=l(t,Se(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,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:c});let u=`modules`in t?t.modules:[],d=kn(i.exposes);d.length&&`modules`in t&&(u=t?.modules?.reduce((e,t)=>(d?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>l(t,e));return i.filter?n.filter(i.filter):n}if(u){let r=u.length;for(let s=0;s<r;s++){let r=u[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),Le(c)||(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Re(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=H(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{u.add(e)}))};i.shared.forEach(e=>{let n=d.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&xe(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!qn(`script`,e));return{cssAssets:a.filter(e=>!u.has(e)&&!qn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!qn(`script`,e.url))}}var Yn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ge(i)&&_e(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Un(r,o),Jn(t,n,r,a,o))}}};function Xn(e,t){let n=k({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&O(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:`version`in e?e.version:void 0})}}var Zn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`),beforeLoadManifest:new X(`beforeLoadManifest`),afterLoadManifest:new X(`afterLoadManifest`)}),this.manifestLoading=w.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=k({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ne({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!O(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(ee(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Me({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(ge(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Me(e,r);u=r,d=i}else y(Yt,W,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,K(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Xn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=G(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);t&&t instanceof Response||(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),y(Gt,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,K(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&y(tn,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,K(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=m(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Qn=class{constructor(){this.hooks=new J({})}},$n=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterRegisterShare:new Y(`afterRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){b(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){b(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,v(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=H(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=zt(c,l);if(t.lib)return U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return U(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=R(s.treeShaking),a=zt(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,U(a,n.options.name);let{shared:i,useTreesShaking:o}=H(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=zt(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&zt(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=H(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return U(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return U(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&y(t?.from===`build`?qt:Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}y(Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}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:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Lt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},er=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},tr=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}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:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Vt(n.options.remotes,e),i=e,a=r?.expose,o=r?G(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=G(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=On(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Bt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=G(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await In(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Bn({host:r,remoteInfo:G({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Vt(t.options.remotes,i);if(!a)try{y(Kt,W,{hostName:t.options.name,requestId:i},void 0,K(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=G(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;v(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Bn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));v(!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&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Dt,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),u(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=O(S.__FEDERATION__.moduleInfo,x(e)).key;delete S.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete w.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Xn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&O(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let i=bn(o.remoteInfo);D[i]&&delete D[i];let a=n.buildVersion?c(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=Lt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){me.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},nr=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,rr=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ir=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,ar=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.9.3`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y,afterBridgeRouteSync:new Y});let t=rr&&nr?[Wn(),Yn()]:[],n={id:Sn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=rr?new Zn(this):new Qn,this.sharedHandler=ir?new $n(this):new er,this.remoteHandler=rr?new tr(this):new Hn,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&y(fe(Qt,W)),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=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}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 n=ir?At(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=Tn(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},or=Ln;function sr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function cr(e,t){let n=sr();return S.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}export{ke as a,Oe as i,or as n,De as o,ar as r,cr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e,t){return new URL(e,t).href},t={},n=function(e){return e.pathname.endsWith(`.css`)},r=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},i=function(i,a,o){let s=Promise.resolve();if(a&&a.length>0){let i,c=document.querySelector(`meta[property=csp-nonce]`),l=c?.nonce||c?.getAttribute(`nonce`);function u(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}s=u(a.map(a=>{a=e(a,o);let s=d(a),c=n(s);return r(t,s.href,()=>{if(i===void 0){i={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];i.all.add(n.href),n.rel===`stylesheet`&&i.styles.add(n.href)}}if((c?i.styles:i.all).has(s.href))return;let e=document.createElement(`link`);if(e.rel=c?`stylesheet`:`modulepreload`,c||(e.as=`script`),e.crossOrigin=``,e.href=s.href,l&&e.setAttribute(`nonce`,l),document.head.appendChild(e),c)return new Promise((t,n)=>{e.
|
|
1
|
+
var e=function(e,t){return new URL(e,t).href},t={},n=function(e){return e.pathname.endsWith(`.css`)},r=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},i=function(i,a,o){let s=Promise.resolve();if(a&&a.length>0){let i,c=document.querySelector(`meta[property=csp-nonce]`),l=c?.nonce||c?.getAttribute(`nonce`);function u(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}s=u(a.map(a=>{a=e(a,o);let s=d(a),c=n(s);return r(t,s.href,()=>{if(i===void 0){i={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];i.all.add(n.href),n.rel===`stylesheet`&&i.styles.add(n.href)}}if((c?i.styles:i.all).has(s.href))return;let e=document.createElement(`link`);if(e.rel=c?`stylesheet`:`modulepreload`,c||(e.as=`script`),e.crossOrigin=``,e.href=s.href,l&&e.setAttribute(`nonce`,l),document.head.appendChild(e),c)return new Promise((t,n)=>{let r=i=>{e.removeEventListener(`load`,r),e.removeEventListener(`error`,r),i.type===`error`?n(Error(`Unable to preload CSS for ${s}`)):t(i)};e.addEventListener(`load`,r),e.addEventListener(`error`,r)})})}).filter(e=>e!==void 0))}function c(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return s.then(e=>{for(let t of e||[])t.status===`rejected`&&c(t.reason);return i().catch(c)})};export{i as t};
|
package/public/remoteEntry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t as e}from"./assets/dist-BhVCbinB.js";import{t}from"./assets/helpers-CvnX61Ju.js";import{t as n}from"./assets/vite-preload-helper-CRzLMJPS.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>{i.delete(t),r.remove(),n(Error(`[Module Federation] Failed to load CSS asset: ${t}`))},document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let e=await o(`./PluginConfigurationPanel`,()=>n(()=>import(`./assets/PluginConfigurationPanel-7qfy8fIR.js`),[],import.meta.url)),t=e&&e.__mf_remote_dependency_pending;t&&typeof t.then==`function`&&await t;let r={};return Object.assign(r,e),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let e=await o(`./AppPanel`,()=>n(()=>import(`./assets/AppPanel-C293yEHl.js`),[],import.meta.url)),t=e&&e.__mf_remote_dependency_pending;t&&typeof t.then==`function`&&await t;let r={};return Object.assign(r,e),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__97224418320974__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,{initReject:f}=u,p=e=>{throw f(e),e},m=`__mf_module_cache__`;globalThis[m]||={share:{},remote:{}},globalThis[m].share||={},globalThis[m].remote||={};var h=globalThis[m];for(let e of Object.keys(h.share))if(e.startsWith(`default:`)){let t=e.slice(8);h.share[t]===void 0&&(h.share[t]=h.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;h.share[t]===void 0&&(h.share[t]=h.share[e])}var g={},_=Array.isArray(`default`)?`default`:[`default`],v=`default`,y=`signalk_questdb`,b=[[`react`]],x,S;async function C(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var w=Symbol(`mf.originalSharedProvider`),T={emit:e=>e},E=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],D=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[w]:r});return n},O=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},k=(e,n,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=E(r),s=D(a,i),c={};for(let e of o)c[e||`default`]={[n]:s};let l=t.getRegisteredShare(c,n,{...r,scope:o,strategy:i},T)?.shared;return l?.[w]||l},A=(e,t,n,r)=>{let i=e=>j(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=k(a,t,n,r);return i(o)?void 0:o},j=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),M=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(j(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?M(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||j(u,s)))return{provider:u,scopeRootProvider:l}};async function N(){return x||=C(()=>n(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BH9mY6vj.js`),[],import.meta.url)).catch(e=>{throw x=void 0,e}),x}async function P(){return c}async function F(t={},n=[],r={}){let i=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},a=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},o=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),c=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},l=(e,t)=>e[s]?.[t.canonical],f=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},m=(e,t)=>{if(e===t)return!0;let n=f(e),r=f(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},x=(e,t,n,r)=>{let i=a(e,t);if(i!==void 0&&m(i,n))return n;e[t.canonical]=n;let l=t.aliases||[];for(let t of l)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let u=e[s];r===void 0?u&&delete u[t.canonical]:c(e)[t.canonical]=r;let d=e[o]?.[t.canonical];if(d)for(let e of d)e(n);return n},w=Symbol.for(`module-federation.tree-shaking-shared-cache`),T=e=>{let t=e[w];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,w,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},E=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=T(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},D=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),M=e=>{let t=e[D];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,D,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},P=(e,t,n)=>{let r=a(e,t);return r===void 0?e[D]?.[t.canonical]?.[n]:r},F=(e,t,n,r)=>{let i=M(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},I=globalThis.__FEDERATION__?.__INSTANCES__||[],te=n.find(e=>e?.from)?.from,ne=I.find(e=>e?.options?.name===te&&e?.shareScopeMap?.default===t)||I.find(e=>e?.options?.name!==y&&e?.shareScopeMap?.default===t),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{for(let[n,r]of Object.entries(G.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===R[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[e,n]of Object.entries(t)){let t=L[e]=Object.create(null);for(let[e,r]of Object.entries(n))t[e]=Object.assign({},r)}let{usedShared:R,usedRemotes:ce}=await N();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(L).some(e=>Object.values(e||{}).some(z)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(e,n,r,i)=>{if(typeof A!=`function`)return;let a=ue(e),o=!i||a===e?[[e,n]]:[[e,n],[a,R[a]]];for(let[n,i]of o){if(!i)continue;let a=A(r?n===e?r:L[n]:L[n]??t[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=B(e,t,n,!0);return r&&z(r)&&!r.lib&&!r.loaded?r:void 0};var V=g[v];if(V||=g[v]={from:y},n.indexOf(V)>=0)return;n.push(V);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],H=`__mf_vite_runtime_share_load_id__`,he=0,U=new Map,W=new Map,G=e({name:y,remotes:ce,shared:R,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});G.initShareScopeMap(`default`,oe(`default`,t));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[H],n=t===void 0?void 0:W.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=G.sharedHandler.hooks.lifecycle.resolveShare;G.__mfKeepAdoptedProviders||(G.__mfKeepAdoptedProviders=!0,G.sharedHandler?.hooks?.lifecycle?.afterRegisterShare?.on?.(e=>{let{shared:t,previousShared:n,registeredShared:r}=e||{},i=G.shareScopeMap?.[e.scope]?.[e.pkgName];t&&i&&(t.shareConfig?.import===!1?r===t&&n&&n.shareConfig?.import!==!1&&i[t.version]===t&&(i[t.version]=n):r!==t&&r?.shareConfig?.import===!1&&!r.loaded&&i[t.version]===r&&(i[t.version]=t))}));let K=new WeakMap;ve.on(e=>{let t=e.shareInfo?.[H],n=e.resolver;return typeof n==`function`&&(e.resolver=(...r)=>{let i=n(...r);if(i?.shared?.shareConfig?.import===!1&&typeof k==`function`&&R[e.pkgName]){let t=k(e.shareScopeMap?.[e.scope]?.[e.pkgName],e.pkgName,R[e.pkgName],`version-first`);t&&t.shareConfig?.import!==!1&&(i={shared:t,useTreesShaking:i.useTreesShaking})}let a=i?.shared;return a&&(typeof a==`object`||typeof a==`function`)&&!K.has(a)&&K.set(a,{from:a.from}),t!==void 0&&a&&U.set(t,a),i}),e});let ye=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},be=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),xe=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Se=async(e,t,n)=>{let r=++he;W.set(r,{pinned:n});try{let n=await G.loadShare(e,{customShareInfo:{shareConfig:t,[H]:r}});return{factory:n===!1?void 0:n,selectedProvider:U.get(r)}}finally{U.delete(r),W.delete(r)}},Ce=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=ye(n,r,i,a);if(!c)return;let l;try{l=await Se(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=be(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=K.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??xe(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=K.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},q=new Set,J=new Map,we=async(e,n,r)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=A(r,e,n,`version-first`),c=O(r,s);if(!c||n.shareConfig?.import===!1&&j(s,n)||s?.shareConfig?.import===!1)return;let{version:l}=c;if(!o&&l!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let u=i(e,o,n.version,n.scope);if(a(h.share,u)!==void 0)return;let d=t[e],f=d?.[l];if(c.registered&&!j(f,s))return;let p,m=s.lib;if(!m&&z(s)||(!m&&s.loading&&(m=await s.loading),!m&&s.loaded&&typeof s.get==`function`&&(m=await s.get()),!m))return;let g=typeof m==`function`?m():m,_=await Promise.resolve(g),v=c.registered?f:s;p={provider:v,selection:{provider:v,version:l,from:s.from,registered:c.registered},resolved:_};let y=p?.provider,b=p?.selection;if(!b)return;let S=p?.resolved;if(S===void 0||a(h.share,u)!==void 0||b.registered&&d?.[b.version]!==y)return;x(h.share,u,fe(S),b.from),q.add(y)}catch(t){console.error(`[Module Federation] Failed to bridge materialized shared module "`+e+`"`,t)}},Y=async(e,n,r,o,s)=>{try{let c=i(e,n.shareConfig?.singleton,n.version,n.scope),u=a(h.share,c),d=l(h.share,c),f=A(r,e,n,`version-first`),p=f||k(r,e,n,`version-first`)||n,m=O(r,p);if(!m)return;let g=j(p,n),{version:_}=m;if(!n.shareConfig?.singleton&&_!==n.version)return;let v=o?.[_],b=ee(I,ne,t,`default`,e,m,f,v,`version-first`);if(!b&&!g)return;let{provider:S,scopeRootProvider:C}=b||{provider:p,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&j(S,n)||S?.shareConfig?.import===!1||u!==void 0&&d!==y)return;let w=t[e],T=w?.[_];if(m.registered&&!C&&!j(T,S))return;let E=await Ce(e,n.shareConfig,w,_,T,S,m.registered&&!g),D=E?.provider,M=E?.selection;if(!M||j(D,n)||s&&(s.version!==M.version||!j({from:M.from},s.provider))||q.has(D))return;let N=E?.resolved;if(N===void 0)return;let P=a(h.share,c),F=l(h.share,c);if(P!==void 0&&F!==y||M.registered&&w?.[M.version]!==D)return;s||J.set(e,{version:M.version,provider:{from:M.from}}),q.add(D);let te=fe(N);x(h.share,c,te,M.from)}catch(t){console.error(`[Module Federation] Failed to bridge external shared module "`+e+`"`,t)}};for(let e of b)await Promise.all(e.map(async e=>{let t=R[e];t&&t.materialize!==!1&&!t.treeShaking&&await we(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(a(h.share,n)!==void 0)continue;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);o!==void 0&&x(h.share,n,o,l(h.share,r))}let Te=[`react`],Ee=[[`react`]],X=new Map(Te.map((e,t)=>[e,t])),De={},Z=Te.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1&&!R[e].lazy));h.providerInit||=new Map;let Oe=(e,t)=>{let n=h.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return h.providerInit.set(e,r),r.catch(()=>h.providerInit.delete(e)),r};var ke=async e=>{let t=new Set(e);for(let e of Ee)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||a(h.share,n)!==void 0)return;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);if(o!==void 0){x(h.share,n,o,l(h.share,r));return}let s=typeof B==`function`?B(e,t):void 0;if(s){let r=s.lib;if(!r&&s.loading&&(r=await s.loading),!r&&s.loaded&&typeof s.get==`function`&&(r=await s.get()),r){let e=typeof r==`function`?r():r,t=await Promise.resolve(e);x(h.share,n,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(t),s.from);return}if(!t.shareConfig?.singleton&&typeof s.version==`string`){let r=a(h.share,i(e,!1,s.version,t.scope));if(r!==void 0){x(h.share,n,r,s.from);return}}if(typeof z==`function`&&z(s)&&(t.shareConfig?.singleton||O(L[e],s)?.version===t.version))return}let c=n.canonical,u=await Oe(c,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)});for(let n of G.options.shared?.[e]||[])n.get===t.get&&(n.eager=!0);let d=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(u),f=d===u?{...u}:d;f.__esModule!==!0&&Object.defineProperty(f,"__esModule",{value:!0,enumerable:!1}),x(h.share,n,f,y)}))};let Q=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?P(h.share,n,y)===void 0&&a(h.share,n)===void 0:a(h.share,n)===void 0},Ae=e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?P(h.share,n,y)??a(h.share,n):a(h.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof A==`function`&&!!A(L[e],e,t,`version-first`):!1},je=e=>{let t=!0;for(;t;){t=!1;for(let n of Z){let r=X.get(n);e.has(r)||(De[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Me=je(new Set(Z.filter(Ae).map(e=>X.get(e)))),Ne=Z.filter(e=>!Me.has(X.get(e)));var Pe=Z.filter(e=>Me.has(X.get(e)));await ke(Ne).catch(p);try{await C(async()=>{await Promise.all(await G.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Fe=async()=>{for(let e of b)await Promise.all(e.map(async e=>{let n=R[e];n&&n.materialize!==!1&&!n.treeShaking&&await Y(e,n,t[e],L[e],void 0)}))};le?S=Fe:await Fe();try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of _){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=J.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!j(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of b)await Promise.all(e.map(async e=>{let n=t[e];n&&await Y(e,R[e],n,L[e],J.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ie=async()=>{},Le=async(e,n)=>{let r=i(e,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?P(h.share,r,y):a(h.share,r);if(n.shareConfig?.import!==!1||o!==void 0||de(e,n,L[e]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=t?.[e],l=k(c,e,n,`version-first`)||n,u=O(c,l);if(!u)return;let d=e=>e===n||e?.shareConfig?.import===!1;if(d(l))return;let{version:f}=u,p=c?.[f],m=await Ce(e,n.shareConfig,c,f,p,l,u.registered),g=m?.selection,_=m?.provider,v=m?.resolved;if(!g||d(_)||v===void 0||(n.treeShaking?P(h.share,r,y):a(h.share,r))!==void 0||g.registered&&c?.[g.version]!==_)return;let b=s(v);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];E(h.share,r,e,b),F(h.share,r,y,b)}else x(h.share,r,b,g.from)},Re=[],ze=new Set;for(let e of Pe){let t=R[e],n=X.get(e);if(Q(e))try{t.treeShaking?await Ie(e,t):t.shareConfig?.import===!1&&await Le(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}Q(e)&&ze.add(n)}je(ze),Re.push(...Pe.filter(e=>!ze.has(X.get(e)))),await ke(Re).catch(p);let $=new Map;return u.loadLazyShares=async e=>{let n=new Set(e);for(let e of b)await Promise.all(e.filter(e=>n.has(e)).map(e=>{let n=R[e];if(!n||!n.lazy||!Q(e))return;let r=$.get(e);return r||(r=Y(e,n,t[e],L[e],void 0).then(()=>Q(e)?Le(e,n):void 0),r.catch(()=>$.delete(e)),$.set(e,r)),r}))},d(G),G}async function I(e){let t=await P();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return S&&await S(),h.pendingShareLoads&&await Promise.all(h.pendingShareLoads),t[e]().then(e=>()=>e)}export{I as get,F as init};
|
|
1
|
+
import{t as e}from"./assets/dist-B4My1YVh.js";import{t}from"./assets/helpers-PTLizuYm.js";import{t as n}from"./assets/vite-preload-helper-DclECHGd.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>{i.delete(t),r.remove(),n(Error(`[Module Federation] Failed to load CSS asset: ${t}`))},document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let e=await o(`./PluginConfigurationPanel`,()=>n(()=>import(`./assets/PluginConfigurationPanel-DhWC94G3.js`),[],import.meta.url)),t=e&&e.__mf_remote_dependency_pending;t&&typeof t.then==`function`&&await t;let r={};return Object.assign(r,e),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let e=await o(`./AppPanel`,()=>n(()=>import(`./assets/AppPanel-D_HLFa10.js`),[],import.meta.url)),t=e&&e.__mf_remote_dependency_pending;t&&typeof t.then==`function`&&await t;let r={};return Object.assign(r,e),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__97224418320974__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,{initReject:f}=u,p=e=>{throw f(e),e},m=`__mf_module_cache__`;globalThis[m]||={share:{},remote:{}},globalThis[m].share||={},globalThis[m].remote||={};var h=globalThis[m];for(let e of Object.keys(h.share))if(e.startsWith(`default:`)){let t=e.slice(8);h.share[t]===void 0&&(h.share[t]=h.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;h.share[t]===void 0&&(h.share[t]=h.share[e])}var g={},_=Array.isArray(`default`)?`default`:[`default`],v=`default`,y=`signalk_questdb`,b=[[`react`]],x,S;async function C(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var w=Symbol(`mf.originalSharedProvider`),T={emit:e=>e},E=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],D=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[w]:r});return n},O=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},k=(e,n,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=E(r),s=D(a,i),c={};for(let e of o)c[e||`default`]={[n]:s};let l=t.getRegisteredShare(c,n,{...r,scope:o,strategy:i},T)?.shared;return l?.[w]||l},A=(e,t,n,r)=>{let i=e=>j(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=k(a,t,n,r);return i(o)?void 0:o},j=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),M=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(j(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?M(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||j(u,s)))return{provider:u,scopeRootProvider:l}};async function N(){return x||=C(()=>n(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js`),[],import.meta.url)).catch(e=>{throw x=void 0,e}),x}async function P(){return c}var F=0,I=Promise.resolve(),L=()=>{};async function R(t={},n=[],r={}){F++===0&&(I=new Promise(e=>L=e));try{let r=function(e,t,n,r){let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},s=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},c=Symbol.for(`module-federation.shared-cache-listeners`),l=Symbol.for(`module-federation.shared-cache-owners`),f=e=>{let t=e[l];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,l,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},m=(e,t)=>e[l]?.[t.canonical],x=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},w=(e,t)=>{if(e===t)return!0;let n=x(e),r=x(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},T=(e,t,n,r)=>{let i=s(e,t);if(i!==void 0&&w(i,n))return n;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[l];r===void 0?o&&delete o[t.canonical]:f(e)[t.canonical]=r;let u=e[c]?.[t.canonical];if(u)for(let e of u)e(n);return n},E=Symbol.for(`module-federation.tree-shaking-shared-cache`),D=e=>{let t=e[E];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,E,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},M=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=D(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},P=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),F=e=>{let t=e[P];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,P,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},I=(e,t,n)=>{let r=s(e,t);return r===void 0?e[P]?.[t.canonical]?.[n]:r},L=(e,t,n,r)=>{let i=F(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},R=globalThis.__FEDERATION__?.__INSTANCES__||[],te=n.find(e=>e?.from)?.from,ne=R.find(e=>e?.options?.name===te&&e?.shareScopeMap?.default===t)||R.find(e=>e?.options?.name!==y&&e?.shareScopeMap?.default===t),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{for(let[n,r]of Object.entries(K.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===B[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(V)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},z=Object.create(null);for(let[e,n]of Object.entries(t)){let t=z[e]=Object.create(null);for(let[e,r]of Object.entries(n))t[e]=Object.assign({},r)}let{usedShared:B,usedRemotes:ce}=await N();function V(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(z).some(e=>Object.values(e||{}).some(V)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},H=(e,n,r,i)=>{if(typeof A!=`function`)return;let a=ue(e),o=!i||a===e?[[e,n]]:[[e,n],[a,B[a]]];for(let[n,i]of o){if(!i)continue;let a=A(r?n===e?r:z[n]:z[n]??t[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=H(e,t,n,!0);return r&&V(r)&&!r.lib&&!r.loaded?r:void 0};var i=g[v];if(i||=g[v]={from:y},n.indexOf(i)>=0)return;n.push(i);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],U=`__mf_vite_runtime_share_load_id__`,he=0,W=new Map,G=new Map,K=e({name:y,remotes:ce,shared:B,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});K.initShareScopeMap(`default`,oe(`default`,t));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[U],n=t===void 0?void 0:G.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=K.sharedHandler.hooks.lifecycle.resolveShare;K.__mfKeepAdoptedProviders||(K.__mfKeepAdoptedProviders=!0,K.sharedHandler?.hooks?.lifecycle?.afterRegisterShare?.on?.(e=>{let{shared:t,previousShared:n,registeredShared:r}=e||{},i=K.shareScopeMap?.[e.scope]?.[e.pkgName];t&&i&&(t.shareConfig?.import===!1?r===t&&n&&n.shareConfig?.import!==!1&&i[t.version]===t&&(i[t.version]=n):r!==t&&r?.shareConfig?.import===!1&&!r.loaded&&i[t.version]===r&&(i[t.version]=t))}));let q=new WeakMap;ve.on(e=>{let t=e.shareInfo?.[U],n=e.resolver;return typeof n==`function`&&(e.resolver=(...r)=>{let i=n(...r);if(i?.shared?.shareConfig?.import===!1&&typeof k==`function`&&B[e.pkgName]){let t=k(e.shareScopeMap?.[e.scope]?.[e.pkgName],e.pkgName,B[e.pkgName],`version-first`);t&&t.shareConfig?.import!==!1&&(i={shared:t,useTreesShaking:i.useTreesShaking})}let a=i?.shared;return a&&(typeof a==`object`||typeof a==`function`)&&!q.has(a)&&q.set(a,{from:a.from}),t!==void 0&&a&&W.set(t,a),i}),e});let ye=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},be=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),xe=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Se=async(e,t,n)=>{let r=++he;G.set(r,{pinned:n});try{let n=await K.loadShare(e,{customShareInfo:{shareConfig:t,[U]:r}});return{factory:n===!1?void 0:n,selectedProvider:W.get(r)}}finally{W.delete(r),G.delete(r)}},Ce=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=ye(n,r,i,a);if(!c)return;let l;try{l=await Se(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=be(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=q.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??xe(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=q.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},J=new Set,Y=new Map,we=async(e,n,i)=>{let a=!!n.shareConfig?.singleton;if(!a&&n.canLiveRebind!==!1)try{let o=A(i,e,n,`version-first`),c=O(i,o);if(!c||n.shareConfig?.import===!1&&j(o,n)||o?.shareConfig?.import===!1)return;let{version:l}=c;if(!a&&l!==n.version||!o.lib&&!o.loading&&!(o.loaded&&typeof o.get==`function`))return;let u=r(e,a,n.version,n.scope);if(s(h.share,u)!==void 0)return;let d=t[e],f=d?.[l];if(c.registered&&!j(f,o))return;let p,m=o.lib;if(!m&&V(o)||(!m&&o.loading&&(m=await o.loading),!m&&o.loaded&&typeof o.get==`function`&&(m=await o.get()),!m))return;let g=typeof m==`function`?m():m,_=await Promise.resolve(g),v=c.registered?f:o;p={provider:v,selection:{provider:v,version:l,from:o.from,registered:c.registered},resolved:_};let y=p?.provider,b=p?.selection;if(!b)return;let x=p?.resolved;if(x===void 0||s(h.share,u)!==void 0||b.registered&&d?.[b.version]!==y)return;T(h.share,u,fe(x),b.from),J.add(y)}catch(t){console.error(`[Module Federation] Failed to bridge materialized shared module "`+e+`"`,t)}},X=async(e,n,i,a,o)=>{try{let c=r(e,n.shareConfig?.singleton,n.version,n.scope),l=s(h.share,c),u=m(h.share,c),d=A(i,e,n,`version-first`),f=d||k(i,e,n,`version-first`)||n,p=O(i,f);if(!p)return;let g=j(f,n),{version:_}=p;if(!n.shareConfig?.singleton&&_!==n.version)return;let v=a?.[_],b=ee(R,ne,t,`default`,e,p,d,v,`version-first`);if(!b&&!g)return;let{provider:x,scopeRootProvider:S}=b||{provider:f,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&j(x,n)||x?.shareConfig?.import===!1||l!==void 0&&u!==y)return;let C=t[e],w=C?.[_];if(p.registered&&!S&&!j(w,x))return;let E=await Ce(e,n.shareConfig,C,_,w,x,p.registered&&!g),D=E?.provider,M=E?.selection;if(!M||o&&(o.version!==M.version||!j({from:M.from},o.provider))||J.has(D))return;let N=E?.resolved;if(N===void 0)return;let P=s(h.share,c),F=m(h.share,c);if(P!==void 0&&F!==y||M.registered&&C?.[M.version]!==D)return;!o&&!j(D,n)&&Y.set(e,{version:M.version,provider:{from:M.from}}),J.add(D);let I=fe(N);T(h.share,c,I,M.from)}catch(t){console.error(`[Module Federation] Failed to bridge external shared module "`+e+`"`,t)}};for(let e of b)await Promise.all(e.map(async e=>{let t=B[e];t&&t.materialize!==!1&&!t.treeShaking&&await we(e,t,z[e])}));for(let[e,t]of Object.entries(B)){if(t.treeShaking)continue;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if(s(h.share,n)!==void 0)continue;let i=r(e,!0,t.version,t.scope),a=s(h.share,i);a!==void 0&&T(h.share,n,a,m(h.share,i))}let Te=[`react`],Ee=new Set([]),De=[[`react`]],Z=new Map(Te.map((e,t)=>[e,t])),Oe={},Q=Te.filter(e=>B[e]&&(B[e].materialize!==!1||B[e].shareConfig?.import===!1&&!B[e].lazy));h.providerInit||=new Map;let ke=(e,t)=>{let n=h.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return h.providerInit.set(e,r),r.catch(()=>h.providerInit.delete(e)),r};var a=async e=>{let t=new Set(e),n=new Set;for(let e of De)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=B[e],i=Z.get(e);if((Oe[i]||[]).some(e=>n.has(e))){n.add(i);return}let a=r(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||s(h.share,a)!==void 0)return;let o=r(e,!0,t.version,t.scope),c=s(h.share,o);if(c!==void 0){T(h.share,a,c,m(h.share,o));return}let l=typeof H==`function`?H(e,t):void 0;if(l){let o=l.lib;if(!o&&l.loading&&(o=await l.loading),!o&&l.loaded&&typeof l.get==`function`&&(o=await l.get()),o){let e=typeof o==`function`?o():o,t=await Promise.resolve(e);T(h.share,a,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(t),l.from);return}if(!t.shareConfig?.singleton&&typeof l.version==`string`){let n=s(h.share,r(e,!1,l.version,t.scope));if(n!==void 0){T(h.share,a,n,l.from);return}}if(typeof V==`function`&&V(l)&&(t.shareConfig?.singleton||O(z[e],l)?.version===t.version)){n.add(i);return}}let u=a.canonical,d=await ke(u,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)});for(let n of K.options.shared?.[e]||[])n.get===t.get&&(n.eager=!0);let f=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(d),p=f===d?{...d}:f;p.__esModule!==!0&&Object.defineProperty(p,"__esModule",{value:!0,enumerable:!1}),s(h.share,a)===void 0&&T(h.share,a,p,y)}))};let $=e=>{let t=B[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=r(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?I(h.share,n,y)===void 0&&s(h.share,n)===void 0:s(h.share,n)===void 0},Ae=e=>{let t=B[e],n=r(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?I(h.share,n,y)??s(h.share,n):s(h.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1||Ee.has(e)&&t.shareConfig?.singleton?!0:typeof A==`function`&&!!A(z[e],e,t,`version-first`):!1},je=e=>{let t=!0;for(;t;){t=!1;for(let n of Q){let r=Z.get(n);e.has(r)||(Oe[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Me=je(new Set(Q.filter(Ae).map(e=>Z.get(e)))),Ne=Q.filter(e=>!Me.has(Z.get(e)));var o=Q.filter(e=>Me.has(Z.get(e)));await a(Ne).catch(p);try{await C(async()=>{await Promise.all(await K.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Pe=async()=>{for(let e of b)await Promise.all(e.map(async e=>{let n=B[e];n&&n.materialize!==!1&&!n.treeShaking&&await X(e,n,t[e],z[e],void 0)}))};le?S=Pe:await Pe();try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of _){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=B?.[e],i=z[e],a=Y.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!j(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of b)await Promise.all(e.map(async e=>{let n=t[e];n&&await X(e,B[e],n,z[e],Y.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Fe=async()=>{},Ie=async(e,n)=>{let i=r(e,n.shareConfig?.singleton,n.version,n.scope),a=n.treeShaking?I(h.share,i,y):s(h.share,i);if(n.shareConfig?.import!==!1||a!==void 0||de(e,n,z[e]))return;let o=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=t?.[e],l=k(c,e,n,`version-first`)||n,u=O(c,l);if(!u)return;let d=e=>e===n||e?.shareConfig?.import===!1;if(d(l))return;let{version:f}=u,p=c?.[f],m=await Ce(e,n.shareConfig,c,f,p,l,u.registered),g=m?.selection,_=m?.provider,v=m?.resolved;if(!g||d(_)||v===void 0||(n.treeShaking?I(h.share,i,y):s(h.share,i))!==void 0||g.registered&&c?.[g.version]!==_)return;let b=o(v);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];M(h.share,i,e,b),L(h.share,i,y,b)}else T(h.share,i,b,g.from)},Le=[],Re=new Set;for(let e of o){let t=B[e],n=Z.get(e);if($(e))try{t.treeShaking?await Fe(e,t):t.shareConfig?.import===!1&&await Ie(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}$(e)&&Re.add(n)}je(Re),Le.push(...o.filter(e=>!Re.has(Z.get(e)))),await a(Le).catch(p);let ze=new Map;return u.loadLazyShares=async e=>{let n=new Set(e);for(let e of b)await Promise.all(e.filter(e=>n.has(e)).map(e=>{let n=B[e];if(!n||!n.lazy||!$(e))return;let r=ze.get(e);return r||(r=X(e,n,t[e],z[e],void 0).then(()=>$(e)?Ie(e,n):void 0),r.catch(()=>ze.delete(e)),ze.set(e,r)),r}))},d(K),K}finally{--F===0&&L()}}async function te(e){F&&await I;let t=await P();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);S&&await S(),h.pendingShareLoads&&await Promise.all(h.pendingShareLoads);let n=await t[e]();return h.pendingShareLoads&&await Promise.all(h.pendingShareLoads),()=>n}export{te as get,R as init};
|
|
2
2
|
if (typeof document !== 'undefined' && document.head) {
|
|
3
3
|
try {
|
|
4
|
-
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-
|
|
4
|
+
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js","assets/dist-B4My1YVh.js","assets/vite-preload-helper-DclECHGd.js","assets/utils-BesU7hIa.js"]) {
|
|
5
5
|
const __mfWarmupLink = document.createElement('link');
|
|
6
6
|
__mfWarmupLink.rel = 'modulepreload';
|
|
7
7
|
__mfWarmupLink.crossOrigin = '';
|