iobroker.iot 4.2.9 → 4.2.11
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/README.md +5 -3
- package/admin/assets/{index-CzY6OS2n.js → index-B9lVoPrg.js} +184 -62
- package/admin/index_m.html +1 -1
- package/admin/rules/assets/{ActionVisu-DE8dgNVF.js → ActionVisu-CRxreF9A.js} +1 -1
- package/admin/rules/assets/{ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js → ActionVisu__loadShare__react__loadShare__-DD24U9rt.js} +1 -1
- package/admin/rules/assets/{ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js → ActionVisu__loadShare__react_mf_2_dom__loadShare__-DByPam44.js} +1 -1
- package/admin/rules/assets/{ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js → ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js} +4 -4
- package/admin/rules/assets/bootstrap-B41OwrCv.js +1 -0
- package/admin/rules/assets/hostInit-Dxp6BaAc.js +1 -1
- package/admin/rules/assets/{index-HFkgiWl7.js → index-B9FmXZMM.js} +1 -1
- package/admin/rules/assets/{index-Bvn52imU.js → index-CWRtmMP6.js} +2 -2
- package/admin/rules/assets/{index-DjPMvPni.js → index-CxRjh2hi.js} +1 -1
- package/admin/rules/assets/{virtualExposes-O8-92o9I.js → virtualExposes-fQM_6VMq.js} +2 -2
- package/admin/rules/customRuleBlocks.js +2 -2
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +2 -0
- package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Ct.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Controls/Ct.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Hue.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Controls/Hue.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/Rgb.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Controls/Rgb.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/RgbSingle.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Controls/RgbSingle.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Controls/RgbwSingle.js +9 -0
- package/build/lib/AlexaSmartHomeV3/Controls/RgbwSingle.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/DeviceManager.js +21 -7
- package/build/lib/AlexaSmartHomeV3/DeviceManager.js.map +1 -1
- package/build/lib/AlexaSmartHomeV3/Helpers/Utils.js +2 -0
- package/build/lib/AlexaSmartHomeV3/Helpers/Utils.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
- package/admin/rules/assets/bootstrap-Ba57tu25.js +0 -1
package/admin/index_m.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
/>
|
|
22
22
|
<script type="text/javascript" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./lib/js/socket.io.js"></script>
|
|
23
23
|
<title>IoT Settings</title>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index-
|
|
24
|
+
<script type="module" crossorigin src="./assets/index-B9lVoPrg.js"></script>
|
|
25
25
|
<link rel="stylesheet" crossorigin href="./assets/index-Bd3GtHgn.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as u,a as d}from"./ActionVisu__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
import{A as u,a as d}from"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";const{loadShare:_}=d,{initPromise:p}=u,f=p.then(t=>_("@iobroker/adapter-react-v5",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),m=await f.then(t=>t());var g=m,n={},s={};Object.defineProperty(s,"__esModule",{value:!0});let k=class{};s.default=k;var c={};Object.defineProperty(c,"__esModule",{value:!0});(function(t){var e=n&&n.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0}),t.IGenericBlock=t.GenericBlock=void 0;var i=s;Object.defineProperty(t,"GenericBlock",{enumerable:!0,get:function(){return e(i).default}});var r=c;Object.defineProperty(t,"IGenericBlock",{enumerable:!0,get:function(){return r.IGenericBlock}})})(n);const l=window.GenericBlock||n.GenericBlock;class o extends l{constructor(e){super(e,o.getStaticData())}static compile(e,i){let r=(e.message||"").replace(/"/g,'\\"');return r?`// ioBroker.visu ${(r||"").replace(/\n/g," ").replace(/\r/g," ")}
|
|
2
2
|
const subActionVar${e._id} = "${(r||"").replace(/"/g,'\\"')}"${l.getReplacesInText(i)};
|
|
3
3
|
_sendToFrontEnd(${e._id}, {message: subActionVar${e._id}});
|
|
4
4
|
setState("${e.instance}.app.message", JSON.stringify({message: subActionVar${e._id}, title: "${(e.title||"").replace(/"/g,'\\"')}", priority: ${e.priority?'"high"':'"normal"'}, expire: ${parseInt((e.expire||"").toString().replace(/"/g,'\\"'),10)||3600}}));`:`// no text defined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as c,a as _}from"./ActionVisu__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
import{g as i}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as c,a as _}from"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";function f(e,n){for(var o=0;o<n.length;o++){const t=n[o];if(typeof t!="string"&&!Array.isArray(t)){for(const r in t)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(t,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const{loadShare:u}=_,{initPromise:l}=c,m=l.then(e=>u("react",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),d=await m.then(e=>e());var s=d;const g=i(s),y=f({__proto__:null,default:g},[s]);export{s as A,y as R,g as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as u}from"./ActionVisu__loadShare__react__loadShare__-
|
|
1
|
+
import{A as u}from"./ActionVisu__loadShare__react__loadShare__-DD24U9rt.js";import{g as m}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as c,a as l}from"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";var i={exports:{}},_={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var index_cjs$3={},index_cjs$2={},polyfills_cjs$1={};function _extends$2(){return _extends$2=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$2.apply(this,arguments)}function _object_without_properties_loose(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}polyfills_cjs$1._extends=_extends$2;polyfills_cjs$1._object_without_properties_loose=_object_without_properties_loose;var index_cjs$1={},polyfills_cjs={};function _extends$1(){return _extends$1=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$1.apply(this,arguments)}polyfills_cjs._=_extends$1;var define_process_env_default={},polyfills$1=polyfills_cjs;const FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return typeof window<"u"&&typeof window.document<"u"}function isReactNativeEnv(){var t;return typeof navigator<"u"&&((t=navigator)==null?void 0:t.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return!!localStorage.getItem(BROWSER_LOG_KEY)}catch{return!1}return!1}function isDebugMode(){return typeof process<"u"&&define_process_env_default&&define_process_env_default.FEDERATION_DEBUG?!!define_process_env_default.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:isBrowserDebug()}const getProcessEnv=function(){return typeof process<"u"&&define_process_env_default?define_process_env_default:{}},LOG_CATEGORY$1="[ Federation Runtime ]",parseEntry=(t,e,r=SEPARATOR)=>{const n=t.split(r),o=getProcessEnv().NODE_ENV==="development"&&e,i="*",a=s=>s.startsWith("http")||s.includes(MANIFEST_EXT);if(n.length>=2){let[s,...l]=n;t.startsWith(r)&&(s=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return a(c)?{name:s,entry:c}:{name:s,version:c||i}}else if(n.length===1){const[s]=n;return o&&a(o)?{name:s,entry:o}:{name:s,version:o||i}}else throw`Invalid entry value: ${t}`},composeKeyWithSeparator=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${SEPARATOR}${r}`:r:e,""):""},encodeName=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},decodeName=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},generateExposeFilename=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",e)},generateShareFilename=(t,e)=>t?encodeName(t,"__federation_shared_",e):"",getResourceUrl=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!isBrowserEnv()&&!isReactNativeEnv()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},assert$1=(t,e)=>{t||error$1(e)},error$1=t=>{throw new Error(`${LOG_CATEGORY$1}: ${t}`)},warn$1=t=>{console.warn(`${LOG_CATEGORY$1}: ${t}`)};function safeToString(t){try{return JSON.stringify(t,null,2)}catch{return""}}const VERSION_PATTERN_REGEXP=/^([\d^=v<>~]|[*xX]$)/;function isRequiredVersion(t){return VERSION_PATTERN_REGEXP.test(t)}const simpleJoinRemoteEntry=(t,e)=>{if(!t)return e;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const i=o.slice(1);return i.endsWith("/")?i.slice(0,-1):i}return o})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var r,n;const{remotes:o={},overrides:i={},version:a}=e;let s;const l=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&a?inferAutoPublicPath(a):t.metaData.publicPath:t.metaData.getPublicPath,c=Object.keys(i);let u={};if(!Object.keys(o).length){var d;u=((d=t.remotes)==null?void 0:d.reduce((E,b)=>{let T;const $=b.federationContainerName;return c.includes($)?T=i[$]:"version"in b?T=b.version:T=b.entry,E[$]={matchedVersion:T},E},{}))||{}}Object.keys(o).forEach(E=>u[E]={matchedVersion:c.includes(E)?i[E]:o[E]});const{remoteEntry:{path:h,name:m,type:_},types:y,buildInfo:{buildVersion:p},globalName:g,ssrRemoteEntry:I}=t.metaData,{exposes:S}=t;let R={version:a||"",buildVersion:p,globalName:g,remoteEntry:simpleJoinRemoteEntry(h,m),remoteEntryType:_,remoteTypes:simpleJoinRemoteEntry(y.path,y.name),remoteTypesZip:y.zip||"",remoteTypesAPI:y.api||"",remotesInfo:u,shared:t==null?void 0:t.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version})),modules:S==null?void 0:S.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if((r=t.metaData)!=null&&r.prefetchInterface){const E=t.metaData.prefetchInterface;R=polyfills$1._({},R,{prefetchInterface:E})}if((n=t.metaData)!=null&&n.prefetchEntry){const{path:E,name:b,type:T}=t.metaData.prefetchEntry;R=polyfills$1._({},R,{prefetchEntry:simpleJoinRemoteEntry(E,b),prefetchEntryType:T})}if("publicPath"in t.metaData?s=polyfills$1._({},R,{publicPath:l(),ssrPublicPath:t.metaData.ssrPublicPath}):s=polyfills$1._({},R,{getPublicPath:l()}),I){const E=simpleJoinRemoteEntry(I.path,I.name);s.ssrRemoteEntry=E,s.ssrRemoteEntryType=I.type||"commonjs-module"}return s}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}const PREFIX="[ Module Federation ]";let Logger=class{setPrefix(e){this.prefix=e}log(...e){console.log(this.prefix,...e)}warn(...e){console.log(this.prefix,...e)}error(...e){console.log(this.prefix,...e)}success(...e){console.log(this.prefix,...e)}info(...e){console.log(this.prefix,...e)}ready(...e){console.log(this.prefix,...e)}debug(...e){isDebugMode()&&console.log(this.prefix,...e)}constructor(e){this.prefix=e}};function createLogger(t){return new Logger(t)}const logger$1=createLogger(PREFIX);async function safeWrapper$1(t,e){try{return await t()}catch(r){!e&&warn$1(r);return}}function isStaticResourcesEqual$1(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function createScript(t){let e=null,r=!0,n=2e4,o;const i=document.getElementsByTagName("script");for(let s=0;s<i.length;s++){const l=i[s],c=l.getAttribute("src");if(c&&isStaticResourcesEqual$1(c,t.url)){e=l,r=!1;break}}if(!e){const s=t.attrs;e=document.createElement("script"),e.type=(s==null?void 0:s.type)==="module"?"module":"text/javascript";let l;t.createScriptHook&&(l=t.createScriptHook(t.url,t.attrs),l instanceof HTMLScriptElement?e=l:typeof l=="object"&&("script"in l&&l.script&&(e=l.script),"timeout"in l&&l.timeout&&(n=l.timeout))),e.src||(e.src=t.url),s&&!l&&Object.keys(s).forEach(c=>{e&&(c==="async"||c==="defer"?e[c]=s[c]:e.getAttribute(c)||e.setAttribute(c,s[c]))})}const a=async(s,l)=>{clearTimeout(o);const c=()=>{(l==null?void 0:l.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(l)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:u=!0}=t;u&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),s&&typeof s=="function")){const u=s(l);if(u instanceof Promise){const d=await u;return c(),d}return c(),u}c()};return e.onerror=a.bind(null,e.onerror),e.onload=a.bind(null,e.onload),o=setTimeout(()=>{a(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let i=0;i<n.length;i++){const a=n[i],s=a.getAttribute("href"),l=a.getAttribute("rel");if(s&&isStaticResourcesEqual$1(s,t.url)&&l===t.attrs.rel){e=a,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let i;const a=t.attrs;t.createLinkHook&&(i=t.createLinkHook(t.url,a),i instanceof HTMLLinkElement&&(e=i)),a&&!i&&Object.keys(a).forEach(s=>{e&&!e.getAttribute(s)&&e.setAttribute(s,a[s])})}const o=(i,a)=>{const s=()=>{(a==null?void 0:a.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(a)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:l=!0}=t;l&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),i)){const l=i(a);return s(),l}s()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,i)=>{const{script:a,needAttach:s}=createScript({url:t,cb:o,onErrorCallback:i,attrs:polyfills$1._({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(a)})}function importNodeModule(t){if(!t)throw new Error("import specifier is required");return new Function("name","return import(name)")(t).then(r=>r).catch(r=>{throw console.error(`Error importing module ${t}:`,r),r})}const loadNodeFetch=async()=>{const t=await importNodeModule("node-fetch");return t.default||t},lazyLoaderHookFetch=async(t,e,r)=>{const o=await((i,a)=>r.lifecycle.fetch.emit(i,a))(t,e||{});return!o||!(o instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):o},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook!=null&&loaderHook.createScriptHook){const t=loaderHook.createScriptHook(url);t&&typeof t=="object"&&"url"in t&&(url=t.url)}let urlObj;try{urlObj=new URL(url)}catch(t){console.error("Error constructing URL:",t),cb(new Error(`Invalid URL: ${t}`));return}const getFetch=async()=>loaderHook!=null&&loaderHook.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{try{var _vm_constants;const res=await f(urlObj.href),data=await res.text(),[path,vm]=await Promise.all([importNodeModule("path"),importNodeModule("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname);var _vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER;const script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}
|
|
2
|
-
})`,{filename,importModuleDynamically:(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=(_vm_constants=vm.constants)==null?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)!=null?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:importNodeModule});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);const exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){const t=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,t);return}cb(void 0,exportedInterface)}catch(t){cb(t instanceof Error?t:new Error(`Script execution error: ${t}`))}};getFetch().then(async t=>{if((attrs==null?void 0:attrs.type)==="esm"||(attrs==null?void 0:attrs.type)==="module")return loadModule(urlObj.href,{fetch:t,vm:await importNodeModule("vm")}).then(async e=>{await e.evaluate(),cb(void 0,e.namespace)}).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(t,urlObj)}).catch(t=>{cb(t)})}:(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,n)=>{createScriptNode(t,(o,i)=>{if(o)n(o);else{var a,s;const l=(e==null||(a=e.attrs)==null?void 0:a.globalName)||`__FEDERATION_${e==null||(s=e.attrs)==null?void 0:s.name}:custom__`,c=globalThis[l]=i;r(c)}},e.attrs,e.loaderHook)}):(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};async function loadModule(t,e){const{fetch:r,vm:n}=e,i=await(await r(t)).text(),a=new n.SourceTextModule(i,{importModuleDynamically:async(s,l)=>{const c=new URL(s,t).href;return loadModule(c,e)}});return await a.link(async s=>{const l=new URL(s,t).href;return await loadModule(l,e)}),a}function normalizeOptions(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return polyfills$1._({},e,n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const createModuleFederationConfig=t=>t;index_cjs$1.BROWSER_LOG_KEY=BROWSER_LOG_KEY;index_cjs$1.ENCODE_NAME_PREFIX=ENCODE_NAME_PREFIX;index_cjs$1.EncodedNameTransformMap=EncodedNameTransformMap;index_cjs$1.FederationModuleManifest=FederationModuleManifest;index_cjs$1.MANIFEST_EXT=MANIFEST_EXT;index_cjs$1.MFModuleType=MFModuleType;index_cjs$1.MFPrefetchCommon=MFPrefetchCommon;index_cjs$1.MODULE_DEVTOOL_IDENTIFIER=MODULE_DEVTOOL_IDENTIFIER;index_cjs$1.ManifestFileName=ManifestFileName;index_cjs$1.NameTransformMap=NameTransformMap;index_cjs$1.NameTransformSymbol=NameTransformSymbol;index_cjs$1.SEPARATOR=SEPARATOR;index_cjs$1.StatsFileName=StatsFileName;index_cjs$1.TEMP_DIR=TEMP_DIR;index_cjs$1.assert=assert$1;index_cjs$1.composeKeyWithSeparator=composeKeyWithSeparator;index_cjs$1.containerPlugin=ContainerPlugin;index_cjs$1.containerReferencePlugin=ContainerReferencePlugin;index_cjs$1.createLink=createLink;index_cjs$1.createLogger=createLogger;index_cjs$1.createModuleFederationConfig=createModuleFederationConfig;index_cjs$1.createScript=createScript;index_cjs$1.createScriptNode=createScriptNode;index_cjs$1.decodeName=decodeName;index_cjs$1.encodeName=encodeName;index_cjs$1.error=error$1;index_cjs$1.generateExposeFilename=generateExposeFilename;index_cjs$1.generateShareFilename=generateShareFilename;index_cjs$1.generateSnapshotFromManifest=generateSnapshotFromManifest;index_cjs$1.getProcessEnv=getProcessEnv;index_cjs$1.getResourceUrl=getResourceUrl;index_cjs$1.inferAutoPublicPath=inferAutoPublicPath;index_cjs$1.isBrowserEnv=isBrowserEnv;index_cjs$1.isDebugMode=isDebugMode;index_cjs$1.isManifestProvider=isManifestProvider;index_cjs$1.isReactNativeEnv=isReactNativeEnv;index_cjs$1.isRequiredVersion=isRequiredVersion;index_cjs$1.isStaticResourcesEqual=isStaticResourcesEqual$1;index_cjs$1.loadScript=loadScript;index_cjs$1.loadScriptNode=loadScriptNode;index_cjs$1.logger=logger$1;index_cjs$1.moduleFederationPlugin=ModuleFederationPlugin;index_cjs$1.normalizeOptions=normalizeOptions;index_cjs$1.parseEntry=parseEntry;index_cjs$1.safeToString=safeToString;index_cjs$1.safeWrapper=safeWrapper$1;index_cjs$1.sharePlugin=SharePlugin;index_cjs$1.simpleJoinRemoteEntry=simpleJoinRemoteEntry;index_cjs$1.warn=warn$1;var index_cjs={};const RUNTIME_001="RUNTIME-001",RUNTIME_002="RUNTIME-002",RUNTIME_003="RUNTIME-003",RUNTIME_004="RUNTIME-004",RUNTIME_005="RUNTIME-005",RUNTIME_006="RUNTIME-006",RUNTIME_007="RUNTIME-007",RUNTIME_008="RUNTIME-008",RUNTIME_009="RUNTIME-009",TYPE_001="TYPE-001",BUILD_001="BUILD-001",BUILD_002="BUILD-002",getDocsUrl=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,getShortErrorMsg=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(getDocsUrl(t)),n&&o.push(`Original Error Message:
|
|
1
|
+
var index_cjs$3={},index_cjs$2={},polyfills_cjs$1={};function _extends$2(){return _extends$2=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$2.apply(this,arguments)}function _object_without_properties_loose(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}polyfills_cjs$1._extends=_extends$2;polyfills_cjs$1._object_without_properties_loose=_object_without_properties_loose;var index_cjs$1={},polyfills_cjs={};function _extends$1(){return _extends$1=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$1.apply(this,arguments)}polyfills_cjs._=_extends$1;var define_process_env_default={},polyfills$1=polyfills_cjs;const FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return typeof window<"u"&&typeof window.document<"u"}function isReactNativeEnv(){var t;return typeof navigator<"u"&&((t=navigator)==null?void 0:t.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return!!localStorage.getItem(BROWSER_LOG_KEY)}catch{return!1}return!1}function isDebugMode(){return typeof process<"u"&&define_process_env_default&&define_process_env_default.FEDERATION_DEBUG?!!define_process_env_default.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:isBrowserDebug()}const getProcessEnv=function(){return typeof process<"u"&&define_process_env_default?define_process_env_default:{}},LOG_CATEGORY$1="[ Federation Runtime ]",parseEntry=(t,e,r=SEPARATOR)=>{const n=t.split(r),o=getProcessEnv().NODE_ENV==="development"&&e,i="*",a=s=>s.startsWith("http")||s.includes(MANIFEST_EXT);if(n.length>=2){let[s,...l]=n;t.startsWith(r)&&(s=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return a(c)?{name:s,entry:c}:{name:s,version:c||i}}else if(n.length===1){const[s]=n;return o&&a(o)?{name:s,entry:o}:{name:s,version:o||i}}else throw`Invalid entry value: ${t}`},composeKeyWithSeparator=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${SEPARATOR}${r}`:r:e,""):""},encodeName=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},decodeName=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},generateExposeFilename=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",e)},generateShareFilename=(t,e)=>t?encodeName(t,"__federation_shared_",e):"",getResourceUrl=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!isBrowserEnv()&&!isReactNativeEnv()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},assert$1=(t,e)=>{t||error$1(e)},error$1=t=>{throw new Error(`${LOG_CATEGORY$1}: ${t}`)},warn$1=t=>{console.warn(`${LOG_CATEGORY$1}: ${t}`)};function safeToString(t){try{return JSON.stringify(t,null,2)}catch{return""}}const VERSION_PATTERN_REGEXP=/^([\d^=v<>~]|[*xX]$)/;function isRequiredVersion(t){return VERSION_PATTERN_REGEXP.test(t)}const simpleJoinRemoteEntry=(t,e)=>{if(!t)return e;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const i=o.slice(1);return i.endsWith("/")?i.slice(0,-1):i}return o})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var r,n;const{remotes:o={},overrides:i={},version:a}=e;let s;const l=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&a?inferAutoPublicPath(a):t.metaData.publicPath:t.metaData.getPublicPath,c=Object.keys(i);let u={};if(!Object.keys(o).length){var d;u=((d=t.remotes)==null?void 0:d.reduce((E,S)=>{let T;const $=S.federationContainerName;return c.includes($)?T=i[$]:"version"in S?T=S.version:T=S.entry,E[$]={matchedVersion:T},E},{}))||{}}Object.keys(o).forEach(E=>u[E]={matchedVersion:c.includes(E)?i[E]:o[E]});const{remoteEntry:{path:h,name:p,type:_},types:y,buildInfo:{buildVersion:m},globalName:g,ssrRemoteEntry:I}=t.metaData,{exposes:b}=t;let R={version:a||"",buildVersion:m,globalName:g,remoteEntry:simpleJoinRemoteEntry(h,p),remoteEntryType:_,remoteTypes:simpleJoinRemoteEntry(y.path,y.name),remoteTypesZip:y.zip||"",remoteTypesAPI:y.api||"",remotesInfo:u,shared:t==null?void 0:t.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version})),modules:b==null?void 0:b.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if((r=t.metaData)!=null&&r.prefetchInterface){const E=t.metaData.prefetchInterface;R=polyfills$1._({},R,{prefetchInterface:E})}if((n=t.metaData)!=null&&n.prefetchEntry){const{path:E,name:S,type:T}=t.metaData.prefetchEntry;R=polyfills$1._({},R,{prefetchEntry:simpleJoinRemoteEntry(E,S),prefetchEntryType:T})}if("publicPath"in t.metaData?s=polyfills$1._({},R,{publicPath:l(),ssrPublicPath:t.metaData.ssrPublicPath}):s=polyfills$1._({},R,{getPublicPath:l()}),I){const E=simpleJoinRemoteEntry(I.path,I.name);s.ssrRemoteEntry=E,s.ssrRemoteEntryType=I.type||"commonjs-module"}return s}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}const PREFIX="[ Module Federation ]";let Logger=class{setPrefix(e){this.prefix=e}log(...e){console.log(this.prefix,...e)}warn(...e){console.log(this.prefix,...e)}error(...e){console.log(this.prefix,...e)}success(...e){console.log(this.prefix,...e)}info(...e){console.log(this.prefix,...e)}ready(...e){console.log(this.prefix,...e)}debug(...e){isDebugMode()&&console.log(this.prefix,...e)}constructor(e){this.prefix=e}};function createLogger(t){return new Logger(t)}const logger$1=createLogger(PREFIX);async function safeWrapper$1(t,e){try{return await t()}catch(r){!e&&warn$1(r);return}}function isStaticResourcesEqual$1(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function createScript(t){let e=null,r=!0,n=2e4,o;const i=document.getElementsByTagName("script");for(let s=0;s<i.length;s++){const l=i[s],c=l.getAttribute("src");if(c&&isStaticResourcesEqual$1(c,t.url)){e=l,r=!1;break}}if(!e){const s=t.attrs;e=document.createElement("script"),e.type=(s==null?void 0:s.type)==="module"?"module":"text/javascript";let l;t.createScriptHook&&(l=t.createScriptHook(t.url,t.attrs),l instanceof HTMLScriptElement?e=l:typeof l=="object"&&("script"in l&&l.script&&(e=l.script),"timeout"in l&&l.timeout&&(n=l.timeout))),e.src||(e.src=t.url),s&&!l&&Object.keys(s).forEach(c=>{e&&(c==="async"||c==="defer"?e[c]=s[c]:e.getAttribute(c)||e.setAttribute(c,s[c]))})}const a=async(s,l)=>{clearTimeout(o);const c=()=>{(l==null?void 0:l.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(l)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:u=!0}=t;u&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),s&&typeof s=="function")){const u=s(l);if(u instanceof Promise){const d=await u;return c(),d}return c(),u}c()};return e.onerror=a.bind(null,e.onerror),e.onload=a.bind(null,e.onload),o=setTimeout(()=>{a(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let i=0;i<n.length;i++){const a=n[i],s=a.getAttribute("href"),l=a.getAttribute("rel");if(s&&isStaticResourcesEqual$1(s,t.url)&&l===t.attrs.rel){e=a,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let i;const a=t.attrs;t.createLinkHook&&(i=t.createLinkHook(t.url,a),i instanceof HTMLLinkElement&&(e=i)),a&&!i&&Object.keys(a).forEach(s=>{e&&!e.getAttribute(s)&&e.setAttribute(s,a[s])})}const o=(i,a)=>{const s=()=>{(a==null?void 0:a.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(a)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:l=!0}=t;l&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),i)){const l=i(a);return s(),l}s()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,i)=>{const{script:a,needAttach:s}=createScript({url:t,cb:o,onErrorCallback:i,attrs:polyfills$1._({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(a)})}const sdkImportCache=new Map;function importNodeModule(t){if(!t)throw new Error("import specifier is required");if(sdkImportCache.has(t))return sdkImportCache.get(t);const r=new Function("name","return import(name)")(t).then(n=>n).catch(n=>{throw console.error(`Error importing module ${t}:`,n),sdkImportCache.delete(t),n});return sdkImportCache.set(t,r),r}const loadNodeFetch=async()=>{const t=await importNodeModule("node-fetch");return t.default||t},lazyLoaderHookFetch=async(t,e,r)=>{const o=await((i,a)=>r.lifecycle.fetch.emit(i,a))(t,e||{});return!o||!(o instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):o},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook!=null&&loaderHook.createScriptHook){const t=loaderHook.createScriptHook(url);t&&typeof t=="object"&&"url"in t&&(url=t.url)}let urlObj;try{urlObj=new URL(url)}catch(t){console.error("Error constructing URL:",t),cb(new Error(`Invalid URL: ${t}`));return}const getFetch=async()=>loaderHook!=null&&loaderHook.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{try{var _vm_constants;const res=await f(urlObj.href),data=await res.text(),[path,vm]=await Promise.all([importNodeModule("path"),importNodeModule("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname);var _vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER;const script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}
|
|
2
|
+
})`,{filename,importModuleDynamically:(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=(_vm_constants=vm.constants)==null?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)!=null?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:importNodeModule});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);const exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){const t=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,t);return}cb(void 0,exportedInterface)}catch(t){cb(t instanceof Error?t:new Error(`Script execution error: ${t}`))}};getFetch().then(async t=>{if((attrs==null?void 0:attrs.type)==="esm"||(attrs==null?void 0:attrs.type)==="module")return loadModule(urlObj.href,{fetch:t,vm:await importNodeModule("vm")}).then(async e=>{await e.evaluate(),cb(void 0,e.namespace)}).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(t,urlObj)}).catch(t=>{cb(t)})}:(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,n)=>{createScriptNode(t,(o,i)=>{if(o)n(o);else{var a,s;const l=(e==null||(a=e.attrs)==null?void 0:a.globalName)||`__FEDERATION_${e==null||(s=e.attrs)==null?void 0:s.name}:custom__`,c=globalThis[l]=i;r(c)}},e.attrs,e.loaderHook)}):(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},esmModuleCache=new Map;async function loadModule(t,e){if(esmModuleCache.has(t))return esmModuleCache.get(t);const{fetch:r,vm:n}=e,i=await(await r(t)).text(),a=new n.SourceTextModule(i,{importModuleDynamically:async(s,l)=>{const c=new URL(s,t).href;return loadModule(c,e)}});return esmModuleCache.set(t,a),await a.link(async s=>{const l=new URL(s,t).href;return await loadModule(l,e)}),a}function normalizeOptions(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return polyfills$1._({},e,n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const createModuleFederationConfig=t=>t;index_cjs$1.BROWSER_LOG_KEY=BROWSER_LOG_KEY;index_cjs$1.ENCODE_NAME_PREFIX=ENCODE_NAME_PREFIX;index_cjs$1.EncodedNameTransformMap=EncodedNameTransformMap;index_cjs$1.FederationModuleManifest=FederationModuleManifest;index_cjs$1.MANIFEST_EXT=MANIFEST_EXT;index_cjs$1.MFModuleType=MFModuleType;index_cjs$1.MFPrefetchCommon=MFPrefetchCommon;index_cjs$1.MODULE_DEVTOOL_IDENTIFIER=MODULE_DEVTOOL_IDENTIFIER;index_cjs$1.ManifestFileName=ManifestFileName;index_cjs$1.NameTransformMap=NameTransformMap;index_cjs$1.NameTransformSymbol=NameTransformSymbol;index_cjs$1.SEPARATOR=SEPARATOR;index_cjs$1.StatsFileName=StatsFileName;index_cjs$1.TEMP_DIR=TEMP_DIR;index_cjs$1.assert=assert$1;index_cjs$1.composeKeyWithSeparator=composeKeyWithSeparator;index_cjs$1.containerPlugin=ContainerPlugin;index_cjs$1.containerReferencePlugin=ContainerReferencePlugin;index_cjs$1.createLink=createLink;index_cjs$1.createLogger=createLogger;index_cjs$1.createModuleFederationConfig=createModuleFederationConfig;index_cjs$1.createScript=createScript;index_cjs$1.createScriptNode=createScriptNode;index_cjs$1.decodeName=decodeName;index_cjs$1.encodeName=encodeName;index_cjs$1.error=error$1;index_cjs$1.generateExposeFilename=generateExposeFilename;index_cjs$1.generateShareFilename=generateShareFilename;index_cjs$1.generateSnapshotFromManifest=generateSnapshotFromManifest;index_cjs$1.getProcessEnv=getProcessEnv;index_cjs$1.getResourceUrl=getResourceUrl;index_cjs$1.inferAutoPublicPath=inferAutoPublicPath;index_cjs$1.isBrowserEnv=isBrowserEnv;index_cjs$1.isDebugMode=isDebugMode;index_cjs$1.isManifestProvider=isManifestProvider;index_cjs$1.isReactNativeEnv=isReactNativeEnv;index_cjs$1.isRequiredVersion=isRequiredVersion;index_cjs$1.isStaticResourcesEqual=isStaticResourcesEqual$1;index_cjs$1.loadScript=loadScript;index_cjs$1.loadScriptNode=loadScriptNode;index_cjs$1.logger=logger$1;index_cjs$1.moduleFederationPlugin=ModuleFederationPlugin;index_cjs$1.normalizeOptions=normalizeOptions;index_cjs$1.parseEntry=parseEntry;index_cjs$1.safeToString=safeToString;index_cjs$1.safeWrapper=safeWrapper$1;index_cjs$1.sharePlugin=SharePlugin;index_cjs$1.simpleJoinRemoteEntry=simpleJoinRemoteEntry;index_cjs$1.warn=warn$1;var index_cjs={};const RUNTIME_001="RUNTIME-001",RUNTIME_002="RUNTIME-002",RUNTIME_003="RUNTIME-003",RUNTIME_004="RUNTIME-004",RUNTIME_005="RUNTIME-005",RUNTIME_006="RUNTIME-006",RUNTIME_007="RUNTIME-007",RUNTIME_008="RUNTIME-008",RUNTIME_009="RUNTIME-009",TYPE_001="TYPE-001",BUILD_001="BUILD-001",BUILD_002="BUILD-002",getDocsUrl=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,getShortErrorMsg=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(getDocsUrl(t)),n&&o.push(`Original Error Message:
|
|
3
3
|
${n}`),o.join(`
|
|
4
|
-
`)};function _extends(){return _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}const runtimeDescMap={[RUNTIME_001]:"Failed to get remoteEntry exports.",[RUNTIME_002]:'The remote entry interface does not contain "init"',[RUNTIME_003]:"Failed to get manifest.",[RUNTIME_004]:"Failed to locate remote.",[RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[RUNTIME_006]:"Invalid loadShareSync function call from runtime",[RUNTIME_007]:"Failed to get remote snapshot.",[RUNTIME_008]:"Failed to load script resources.",[RUNTIME_009]:"Please call createInstance first."},typeDescMap={[TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},buildDescMap={[BUILD_001]:"Failed to find expose module.",[BUILD_002]:"PublicPath is required in prod mode."},errorDescMap=_extends({},runtimeDescMap,typeDescMap,buildDescMap);index_cjs.BUILD_001=BUILD_001;index_cjs.BUILD_002=BUILD_002;index_cjs.RUNTIME_001=RUNTIME_001;index_cjs.RUNTIME_002=RUNTIME_002;index_cjs.RUNTIME_003=RUNTIME_003;index_cjs.RUNTIME_004=RUNTIME_004;index_cjs.RUNTIME_005=RUNTIME_005;index_cjs.RUNTIME_006=RUNTIME_006;index_cjs.RUNTIME_007=RUNTIME_007;index_cjs.RUNTIME_008=RUNTIME_008;index_cjs.RUNTIME_009=RUNTIME_009;index_cjs.TYPE_001=TYPE_001;index_cjs.buildDescMap=buildDescMap;index_cjs.errorDescMap=errorDescMap;index_cjs.getShortErrorMsg=getShortErrorMsg;index_cjs.runtimeDescMap=runtimeDescMap;index_cjs.typeDescMap=typeDescMap;var polyfills=polyfills_cjs$1,sdk=index_cjs$1,errorCodes$1=index_cjs;const LOG_CATEGORY="[ Federation Runtime ]",logger=sdk.createLogger(LOG_CATEGORY);function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`),t):new Error(`${LOG_CATEGORY}: ${t}`)}function warn(t){t instanceof Error&&(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`)),logger.warn(t)}function addUniqueItem(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function getFMId(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function isRemoteInfoWithEntry(t){return typeof t.entry<"u"}function isPureRemoteEntry(t){return!t.entry.includes(".json")}async function safeWrapper(t,e){try{return await t()}catch(r){!e&&warn(r);return}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function isStaticResourcesEqual(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function arrayOptions(t){return Array.isArray(t)?t:[t]}function getRemoteEntryInfoFromSnapshot(t){const e={url:"",type:"global",globalName:""};return sdk.isBrowserEnv()||sdk.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const processModuleAlias=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},CurrentGlobal=typeof globalThis=="object"?globalThis:window,nativeGlobal=(()=>{try{return document.defaultView}catch{return CurrentGlobal}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){var e,r,n,o,i,a;includeOwnProperty(t,"__VMOK__")&&!includeOwnProperty(t,"__FEDERATION__")&&definePropertyGlobalVal(t,"__FEDERATION__",t.__VMOK__),includeOwnProperty(t,"__FEDERATION__")||(definePropertyGlobalVal(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),definePropertyGlobalVal(t,"__VMOK__",t.__FEDERATION__));var s;(s=(e=t.__FEDERATION__).__GLOBAL_PLUGIN__)!=null||(e.__GLOBAL_PLUGIN__=[]);var l;(l=(r=t.__FEDERATION__).__INSTANCES__)!=null||(r.__INSTANCES__=[]);var c;(c=(n=t.__FEDERATION__).moduleInfo)!=null||(n.moduleInfo={});var u;(u=(o=t.__FEDERATION__).__SHARE__)!=null||(o.__SHARE__={});var d;(d=(i=t.__FEDERATION__).__MANIFEST_LOADING__)!=null||(i.__MANIFEST_LOADING__={});var h;(h=(a=t.__FEDERATION__).__PRELOADED_MAP__)!=null||(a.__PRELOADED_MAP__=new Map)}setGlobalDefaultVal(CurrentGlobal);setGlobalDefaultVal(nativeGlobal);function resetFederationGlobalInfo(){CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__=[],CurrentGlobal.__FEDERATION__.__INSTANCES__=[],CurrentGlobal.__FEDERATION__.moduleInfo={},CurrentGlobal.__FEDERATION__.__SHARE__={},CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(globalLoading).forEach(t=>{delete globalLoading[t]})}function setGlobalFederationInstance(t){CurrentGlobal.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=sdk.isDebugMode()){e&&(CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.17.1")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[i,a]=o.split(":"),s=`${i}:${e}`,l=t[s];if(l)return{value:l,key:s}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t),n=getInfoWithoutType(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o}=t,i=polyfills._object_without_properties_loose(t,["version"]),a=getFMId(i),s=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,a).value;if((s==null?void 0:s.version)===o)return s}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[r]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo=polyfills._extends({},nativeGlobal.__FEDERATION__.moduleInfo,t),()=>{const e=Object.keys(t);for(const r of e)delete nativeGlobal.__FEDERATION__.moduleInfo[r]}),getRemoteEntryExports=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:n}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):warn(`The plugin ${r.name} has been registered.`)})},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),DEFAULT_SCOPE="default",DEFAULT_REMOTE_TYPE="global",buildIdentifier="[0-9A-Za-z-]+",build=`(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`,numericIdentifier="0|[1-9]\\d*",numericIdentifierLoose="[0-9]+",nonNumericIdentifier="\\d*[a-zA-Z-][a-zA-Z0-9-]*",preReleaseIdentifierLoose=`(?:${numericIdentifierLoose}|${nonNumericIdentifier})`,preReleaseLoose=`(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`,preReleaseIdentifier=`(?:${numericIdentifier}|${nonNumericIdentifier})`,preRelease=`(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`,xRangeIdentifier=`${numericIdentifier}|x|X|\\*`,xRangePlain=`[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`,hyphenRange=`^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`,mainVersionLoose=`(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`,loosePlain=`[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`,gtlt="((?:<|>)?=?)",comparatorTrim=`(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`,loneTilde="(?:~>?)",tildeTrim=`(\\s*)${loneTilde}\\s+`,loneCaret="(?:\\^)",caretTrim=`(\\s*)${loneCaret}\\s+`,star="(<|>)?=?\\s*\\*",caret=`^${loneCaret}${xRangePlain}$`,mainVersion=`(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`,fullPlain=`v?${mainVersion}${preRelease}?${build}?`,tilde=`^${loneTilde}${xRangePlain}$`,xRange=`^${gtlt}\\s*${xRangePlain}$`,comparator=`^${gtlt}\\s*(${fullPlain})$|^$`,gte0="^\\s*>=\\s*0.0.0\\s*$";function parseRegex(t){return new RegExp(t)}function isXVersion(t){return!t||t.toLowerCase()==="x"||t==="*"}function pipe(...t){return e=>t.reduce((r,n)=>n(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,n,o,i,a,s,l,c,u,d,h)=>(isXVersion(n)?r="":isXVersion(o)?r=`>=${n}.0.0`:isXVersion(i)?r=`>=${n}.${o}.0`:r=`>=${r}`,isXVersion(c)?l="":isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:isXVersion(d)?l=`<${c}.${Number(u)+1}.0-0`:h?l=`<=${c}.${u}.${d}-${h}`:l=`<=${l}`,`${r} ${l}`.trim()))}function parseComparatorTrim(t){return t.replace(parseRegex(comparatorTrim),"$1$2$3")}function parseTildeTrim(t){return t.replace(parseRegex(tildeTrim),"$1~")}function parseCaretTrim(t){return t.replace(parseRegex(caretTrim),"$1^")}function parseCarets(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(caret),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:a?n==="0"?o==="0"?`>=${n}.${o}.${i}-${a} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i}-${a} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${i} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${Number(n)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:a?`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,n,o,i,a,s)=>{const l=isXVersion(o),c=l||isXVersion(i),u=c||isXVersion(a);return n==="="&&u&&(n=""),s="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(c&&(i=0),a=0,n===">"?(n=">=",c?(o=Number(o)+1,i=0,a=0):(i=Number(i)+1,a=0)):n==="<="&&(n="<",c?o=Number(o)+1:i=Number(i)+1),n==="<"&&(s="-0"),`${n+o}.${i}.${a}${s}`):c?`>=${o}.0.0${s} <${Number(o)+1}.0.0-0`:u?`>=${o}.${i}.0${s} <${o}.${Number(i)+1}.0-0`:r})).join(" ")}function parseStar(t){return t.trim().replace(parseRegex(star),"")}function parseGTE0(t){return t.trim().replace(parseRegex(gte0),"")}function compareAtom(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function comparePreRelease(t,e){const{preRelease:r}=t,{preRelease:n}=e;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,i=r.length;o<=i;o++){const a=r[o],s=n[o];if(a!==s)return a===void 0&&s===void 0?0:a?s?compareAtom(a,s):-1:1}return 0}function compareVersion(t,e){return compareAtom(t.major,e.major)||compareAtom(t.minor,e.minor)||compareAtom(t.patch,e.patch)||comparePreRelease(t,e)}function eq(t,e){return t.version===e.version}function compare(t,e){switch(t.operator){case"":case"=":return eq(t,e);case">":return compareVersion(t,e)<0;case">=":return eq(t,e)||compareVersion(t,e)<0;case"<":return compareVersion(t,e)>0;case"<=":return eq(t,e)||compareVersion(t,e)>0;case void 0:return!0;default:return!1}}function parseComparatorString(t){return pipe(parseCarets,parseTildes,parseXRanges,parseStar)(t)}function parseRange(t){return pipe(parseHyphen,parseComparatorTrim,parseTildeTrim,parseCaretTrim)(t.trim()).split(/\s+/).join(" ")}function satisfy(t,e){if(!t)return!1;const r=extractComparator(t);if(!r)return!1;const[,n,,o,i,a,s]=r,l={operator:n,version:combineVersion(o,i,a,s),major:o,minor:i,patch:a,preRelease:s==null?void 0:s.split(".")},c=e.split("||");for(const u of c){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const h=parseRange(d);if(!h.trim())return!0;const m=h.split(" ").map(p=>parseComparatorString(p)).join(" ");if(!m.trim())return!0;const _=m.split(/\s+/).map(p=>parseGTE0(p)).filter(Boolean);if(_.length===0)continue;let y=!0;for(const p of _){const g=extractComparator(p);if(!g){y=!1;break}const[,I,,S,R,E,b]=g,T={operator:I,version:combineVersion(S,R,E,b),major:S,minor:R,patch:E,preRelease:b==null?void 0:b.split(".")};if(!compare(T,l)){y=!1;break}}if(y)return!0}catch(h){console.error(`[semver] Error processing range part "${d}":`,h);continue}}return!1}function formatShare(t,e,r,n){let o;"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)});var i,a,s;return polyfills._extends({deps:[],useIn:[],from:e,loading:null},t,{shareConfig:polyfills._extends({requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1},t.shareConfig),get:o,loaded:t!=null&&t.loaded||"lib"in t?!0:void 0,version:(i=t.version)!=null?i:"0",scope:Array.isArray(t.scope)?t.scope:[(a=t.scope)!=null?a:"default"],strategy:((s=t.strategy)!=null?s:n)||"version-first"})}function formatShareConfigs(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((a,s)=>{const l=arrayOptions(r[s]);return a[s]=a[s]||[],l.forEach(c=>{a[s].push(formatShare(c,n,s,e.shareStrategy))}),a},{}),i=polyfills._extends({},t.shared);return Object.keys(o).forEach(a=>{i[a]?o[a].forEach(s=>{i[a].find(c=>c.version===s.version)||i[a].push(s)}):i[a]=o[a]}),{shared:i,shareInfos:o}}function versionLt(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const i=n.split(".");let a=n;for(let s=0;s<3-i.length;s++)a+=".0";return a}return n};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(n,o){return versionLt(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const n=t[e][r],o=function(i,a){return!isLoaded(n[i])&&versionLt(i,a)};return findVersion(t[e][r],o)}function findSingletonVersionOrderByLoaded(t,e,r){const n=t[e][r],o=function(i,a){const s=l=>isLoaded(l)||isLoading(l);return s(n[a])?s(n[i])?!!versionLt(i,a):!0:s(n[i])?!1:versionLt(i,a)};return findVersion(t[e][r],o)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,n){if(!t)return;const{shareConfig:o,scope:i=DEFAULT_SCOPE,strategy:a}=r,s=Array.isArray(i)?i:[i];for(const l of s)if(o&&t[l]&&t[l][e]){const{requiredVersion:c}=o,d=getFindShareFunction(a)(t,l,e),h=()=>{if(o.singleton){if(typeof c=="string"&&!satisfy(d,c)){const y=`Version ${d} from ${d&&t[l][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${c})`;o.strictVersion?error(y):warn(y)}return t[l][e][d]}else{if(c===!1||c==="*"||satisfy(d,c))return t[l][e][d];for(const[y,p]of Object.entries(t[l][e]))if(satisfy(y,c))return p}},m={shareScopeMap:t,scope:l,pkgName:e,version:d,GlobalFederation:Global.__FEDERATION__,resolver:h};return(n.emit(m)||m).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=s=>{if(!s)return;const l={};s.forEach(d=>{l[d.version]=d});const u=findVersion(l,function(d,h){return!isLoaded(l[d])&&versionLt(d,h)});return l[u]};var i;const a=(i=r==null?void 0:r.resolver)!=null?i:o;return Object.assign({},a(n[e]),r==null?void 0:r.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const s=r.name;return o=`.${o}`,{pkgNameOrAlias:s,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const i=r.alias&&e.startsWith(r.alias);let a=r.alias&&e.replace(r.alias,"");if(r.alias&&i){if(a&&a.startsWith("/")){const s=r.alias;return a=`.${a}`,{pkgNameOrAlias:s,expose:a,remote:r}}else if(a==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function matchRemote(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function registerPlugins$1(t,e){const r=getGlobalHostPlugins(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t!=null&&t.find(i=>i.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(i=>{i.applyPlugin(o,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,n])}catch(o){n(o)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:n,entryExports:o}=getRemoteEntryExports(t,e);return assert(o,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:n}){const{entryExports:o}=getRemoteEntryExports(t,e);return o||sdk.loadScript(r,{attrs:{},createScriptHook:(i,a)=>{const s=n.lifecycle.createScript.emit({url:i,attrs:a});if(s&&(s instanceof HTMLScriptElement||"script"in s||"timeout"in s))return s}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(i=>{throw assert(void 0,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_008,errorCodes$1.runtimeDescMap,{remoteName:t,resourceUrl:r})),i})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r}){const{entry:n,entryGlobalName:o,name:i,type:a}=t;switch(a){case"esm":case"module":return loadEsmEntry({entry:n,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:n,remoteEntryExports:e});default:return loadEntryScript({entry:n,globalName:o,name:i,loaderHook:r})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:i}=t,{entryExports:a}=getRemoteEntryExports(o,n);return a||sdk.loadScriptNode(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(s,l={})=>{const c=e.lifecycle.createScript.emit({url:s,attrs:l});if(c&&"url"in c)return c}}}).then(()=>handleRemoteEntryLoaded(o,n,r)).catch(s=>{throw s})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry({origin:t,remoteEntryExports:e,remoteInfo:r}){const n=getRemoteEntryUniqueKey(r);if(e)return e;if(!globalLoading[n]){const o=t.remoteHandler.hooks.lifecycle.loadEntry,i=t.loaderHook;globalLoading[n]=o.emit({loaderHook:i,remoteInfo:r,remoteEntryExports:e}).then(a=>a||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:r,remoteEntryExports:e,loaderHook:i}):loadEntryNode({remoteInfo:r,loaderHook:i})))}return globalLoading[n]}function getRemoteInfo(t){return polyfills._extends({},t,{entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE})}function defaultPreloadArgs(t){return polyfills._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},t)}function formatPreloadArgs(t,e){return e.map(r=>{const n=matchRemote(t,r.nameOrAlias);return assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&sdk.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:a}=r;if(e.options.inBrowser){if(a.forEach(s=>{const{moduleInfo:l}=s,c=e.moduleCache.get(t.name);getRemoteEntry(c?{origin:e,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}:{origin:e,remoteInfo:l,remoteEntryExports:void 0})}),n){const s={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const s={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m},needDeleteLink:!1});u&&document.head.appendChild(c)})}if(n){const s={rel:"preload",as:"script"};i.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const s={fetchpriority:"high",type:(t==null?void 0:t.type)==="module"?"module":"text/javascript"};i.forEach(l=>{const{script:c,needAttach:u}=sdk.createScript({url:l,cb:()=>{},attrs:s,createScriptHook:(d,h)=>{const m=e.loaderHook.lifecycle.createScript.emit({url:d,attrs:h});if(m instanceof HTMLScriptElement)return m},needDeleteScript:!0});u&&document.head.appendChild(c)})}}}const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded};var helpers={global:GlobalUtils,share:ShareUtils,utils:{matchRemoteWithNameAndExpose,preloadAssets,getRemoteInfo}};let Module=class{async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;try{e=await getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch{const n=getRemoteEntryUniqueKey(this.remoteInfo);e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading,uniqueKey:n})}return assert(e,`remoteEntryExports is undefined
|
|
5
|
-
${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.getEntry();if(!this.inited){const d=this.host.shareScopeMap,h=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];h.length||h.push("default"),h.forEach(g=>{d[g]||(d[g]={})});const m=d[h[0]],_=[],y={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?h:this.remoteInfo.shareScope||"default"};Object.defineProperty(y,"shareScopeMap",{value:d,enumerable:!1});const p=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:m,remoteEntryInitOptions:y,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof(a==null?void 0:a.init)>"u"&&error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_002,errorCodes$1.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await a.init(p.shareScope,p.initScope,p.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(polyfills._extends({},p,{id:e,remoteSnapshot:o,remoteEntryExports:a}))}this.lib=a,this.inited=!0;let s;s=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:r,moduleInfo:this.remoteInfo}),s||(s=await a.get(r)),assert(s,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const l=processModuleAlias(this.remoteInfo.name,r),c=this.wraperFactory(s,l);return i?await c():c}wraperFactory(e,r){function n(o,i){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:i,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}};class SyncHook{on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class AsyncHook extends SyncHook{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const i=a=>a===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(i):a;r=i()}return Promise.resolve(r)}}function checkReturnData(t,e){if(!isObject(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class SyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(checkReturnData(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){warn(n),this.onerror(n)}return e}constructor(e){super(),this.onerror=error,this.type=e}}class AsyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=a=>(warn(a),this.onerror(a),e),i=a=>{if(checkReturnData(e,a)){if(e=a,n<r.length)try{return Promise.resolve(r[n++](e)).then(i,o)}catch(s){return o(s)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(i(e))}return Promise.resolve(e)}constructor(e){super(),this.onerror=error,this.type=e}}class PluginSystem{applyPlugin(e,r){assert(isPlainObject(e),"Plugin configuration is invalid.");const n=e.name;assert(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply==null||e.apply.call(e,r),Object.keys(this.lifecycle).forEach(o=>{const i=e[o];i&&this.lifecycle[o].on(i)}))}removePlugin(e){assert(e,"A name is required.");const r=this.registerPlugins[e];assert(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:a}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:s,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:a});assignRemoteInfo(i,s);const c={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:i,remote:e,remoteSnapshot:s,globalSnapshot:l});return u&&preloadAssets(i,o,u,!1),polyfills._extends({},t,{remoteSnapshot:s})}return t}}}function splitId(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function traverseModuleInfo(t,e,r,n,o={},i){const a=getFMId(e),{value:s}=getInfoWithoutType(t,a),l=i||s;if(l&&!sdk.isManifestProvider(l)&&(r(l,e,n),l.remotesInfo)){const c=Object.keys(l.remotesInfo);for(const u of c){if(o[u])continue;o[u]=!0;const d=splitId(u),h=l.remotesInfo[u];traverseModuleInfo(t,{name:d.name,version:h.matchedVersion},r,!1,o,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,n,o){const i=[],a=[],s=[],l=new Set,c=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:h}=d;if(traverseModuleInfo(n,r,(p,g,I)=>{let S;if(I)S=d;else if(Array.isArray(h)){const M=h.find(N=>N.nameOrAlias===g.name||N.nameOrAlias===g.alias);if(!M)return;S=defaultPreloadArgs(M)}else if(h===!0)S=d;else return;const R=sdk.getResourceUrl(p,getRemoteEntryInfoFromSnapshot(p).url);R&&s.push({name:g.name,moduleInfo:{name:g.name,entry:R,type:"remoteEntryType"in p?p.remoteEntryType:"global",entryGlobalName:"globalName"in p?p.globalName:g.name,shareScope:"",version:"version"in p?p.version:void 0},url:R});let E="modules"in p?p.modules:[];const b=normalizePreloadExposes(S.exposes);if(b.length&&"modules"in p){var T;E=p==null||(T=p.modules)==null?void 0:T.reduce((M,N)=>((b==null?void 0:b.indexOf(N.moduleName))!==-1&&M.push(N),M),[])}function $(M){const N=M.map(v=>sdk.getResourceUrl(p,v));return S.filter?N.filter(S.filter):N}if(E){const M=E.length;for(let N=0;N<M;N++){const v=E[N],A=`${g.name}/${v.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:v.moduleName==="."?g.name:A,name:g.name,remoteSnapshot:p,preloadConfig:S,remote:g,origin:t}),!getPreloaded(A)&&(S.resourceCategory==="all"?(i.push(...$(v.assets.css.async)),i.push(...$(v.assets.css.sync)),a.push(...$(v.assets.js.async)),a.push(...$(v.assets.js.sync))):(S.resourceCategory="sync")&&(i.push(...$(v.assets.css.sync)),a.push(...$(v.assets.js.sync))),setPreloaded(A))}}},!0,{},o),o.shared&&o.shared.length>0){const p=(g,I)=>{const S=getRegisteredShare(t.shareScopeMap,I.sharedName,g,t.sharedHandler.hooks.lifecycle.resolveShare);S&&typeof S.lib=="function"&&(I.assets.js.sync.forEach(R=>{l.add(R)}),I.assets.css.sync.forEach(R=>{c.add(R)}))};o.shared.forEach(g=>{var I;const S=(I=u.shared)==null?void 0:I[g.sharedName];if(!S)return;const R=g.version?S.find(b=>b.version===g.version):S;if(!R)return;arrayOptions(R).forEach(b=>{p(b,g)})})}const _=a.filter(p=>!l.has(p)&&!isExisted("script",p));return{cssAssets:i.filter(p=>!c.has(p)&&!isExisted("link",p)),jsAssetsWithoutEntry:_,entryAssets:s.filter(p=>!isExisted("script",p.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:a}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(n,a),generatePreloadAssets(e,r,n,i,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:"version"in t?t.version:void 0})}}class SnapshotHandler{async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let i=getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},addGlobalSnapshot({[this.HostInstance.options.name]:i})),i&&"remotesInfo"in i&&!getInfoWithoutType(i.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(i.remotesInfo=polyfills._extends({},i==null?void 0:i.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));const{hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l});let d,h;if(c)if(sdk.isManifestProvider(c)){const m=sdk.isBrowserEnv()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",_=await this.getManifestJson(m,e,{}),y=setGlobalSnapshotInfoByModuleInfo(polyfills._extends({},e,{entry:m}),_);d=_,h=y}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});d=m,h=u}else if(isRemoteInfoWithEntry(e)){const m=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,m),{remoteSnapshot:y}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:m,from:"global"});d=y,h=_}else error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_007,errorCodes$1.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(u)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let a=this.manifestCache.get(e);if(a)return a;try{let s=await this.loaderHook.lifecycle.fetch.emit(e,{});(!s||!(s instanceof Response))&&(s=await fetch(e,{})),a=await s.json()}catch(s){a=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:s,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),a||(delete this.manifestLoading[e],error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_003,errorCodes$1.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${s}`)))}return assert(a.metaData&&a.exposes&&a.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,a),a},i=async()=>{const a=await o(),s=sdk.generateSnapshotFromManifest(a,{version:e}),{remoteSnapshot:l}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:a,remoteSnapshot:s,manifestUrl:e,from:"manifest"});return l};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(a=>a)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new PluginSystem({beforeLoadRemoteSnapshot:new AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class SharedHandler{registerShared(e,r){const{shareInfos:n,shared:o}=formatShareConfigs(e,r);return Object.keys(n).forEach(a=>{n[a].forEach(l=>{!getRegisteredShare(this.shareScopeMap,a,l,this.hooks.lifecycle.resolveShare)&&l&&l.lib&&this.setShared({pkgName:a,lib:l.lib,get:l.get,loaded:!0,shared:l,from:r.name})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:o.strategy}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:a}=i;assert(a,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const s=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare),l=c=>{c.useIn||(c.useIn=[]),addUniqueItem(c.useIn,n.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){const c=await s.loading;return s.loaded=!0,s.lib||(s.lib=c),l(s),c}else if(s){const u=(async()=>{const d=await s.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0,l(h)),d})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:u}),u}else{if(r!=null&&r.customShareInfo)return!1;const u=(async()=>{const d=await a.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0),d})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:u}),u}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:n}=this,o=r==null?void 0:r.from,i=r==null?void 0:r.strategy;let a=r==null?void 0:r.initScope;const s=[];if(o!=="build"){const{initTokens:_}=this;a||(a=[]);let y=_[e];if(y||(y=_[e]={from:this.host.name}),a.indexOf(y)>=0)return s;a.push(y)}const l=this.shareScopeMap,c=n.options.name;l[e]||(l[e]={});const u=l[e],d=(_,y)=>{var p;const{version:g,eager:I}=y;u[_]=u[_]||{};const S=u[_],R=S[g],E=!!(R&&(R.eager||(p=R.shareConfig)!=null&&p.eager));(!R||R.strategy!=="loaded-first"&&!R.loaded&&(!I!=!E?I:c>R.from))&&(S[g]=y)},h=_=>_&&_.init&&_.init(l[e],a),m=async _=>{const{module:y}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(y.getEntry){let p;try{p=await y.getEntry()}catch(g){p=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:g,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}y.inited||(await h(p),y.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(p=>{p.scope.includes(e)&&d(_,p)})}),(n.options.shareStrategy==="version-first"||i==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&s.push(m(_.name))}),s}loadShareSync(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});const i=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),a=s=>{s.useIn||(s.useIn=[]),addUniqueItem(s.useIn,n.options.name)};if(i){if(typeof i.lib=="function")return a(i),i.loaded||(i.loaded=!0,i.from===n.options.name&&(o.loaded=!0)),i.lib;if(typeof i.get=="function"){const s=i.get();if(!(s instanceof Promise))return a(i),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:s,shared:i}),s}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const s=o.get();if(s instanceof Promise){const l=(r==null?void 0:r.from)==="build"?errorCodes$1.RUNTIME_005:errorCodes$1.RUNTIME_006;throw new Error(errorCodes$1.getShortErrorMsg(l,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=s,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:i,loaded:a,get:s}){const{version:l,scope:c="default"}=r,u=polyfills._object_without_properties_loose(r,["version","scope"]);(Array.isArray(c)?c:[c]).forEach(h=>{if(this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),!this.shareScopeMap[h][e][l]){this.shareScopeMap[h][e][l]=polyfills._extends({version:l,scope:["default"]},u,{lib:o,loaded:a,loading:i}),s&&(this.shareScopeMap[h][e][l].get=s);return}const m=this.shareScopeMap[h][e][l];i&&!m.loading&&(m.loading=i)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}constructor(e){this.hooks=new PluginSystem({afterResolve:new AsyncWaterfallHook("afterResolve"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class RemoteHandler{formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,i)=>(this.registerRemote(i,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},a&&e.startsWith(i)){const s=e.replace(i,a);this.idToRemoteMap[s]={name:n.name,expose:o};return}if(a&&e.startsWith(a)){const s=e.replace(a,i);this.idToRemoteMap[s]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:i,moduleOptions:a,remoteMatchInfo:s}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:c,expose:u,id:d,remoteSnapshot:h}=s,m=await i.get(d,u,r,h),_=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:l,expose:u,exposeModule:o?m:void 0,exposeModuleFactory:o?void 0:m,remote:c,options:a,moduleInstance:i,origin:n});return this.setIdToRemoteMap(e,s),typeof _=="function"?_:m}catch(o){const{from:i="runtime"}=r||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:i,lifecycle:"onLoad",origin:n});if(!a)throw o;return a}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=formatPreloadArgs(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:i}=o,a=getRemoteInfo(i),{globalSnapshot:s,remoteSnapshot:l}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:i}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:i,remoteInfo:a,globalSnapshot:s,remoteSnapshot:l});c&&preloadAssets(a,r,c)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:i}=o,a=matchRemoteWithNameAndExpose(r.options.remotes,i);assert(a,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_004,errorCodes$1.runtimeDescMap,{hostName:r.options.name,requestId:i}));const{remote:s}=a,l=getRemoteInfo(s),c=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(polyfills._extends({id:i},a,{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:d}=c;assert(u&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let h=r.moduleCache.get(u.name);const m={host:r,remoteInfo:l};return h||(h=new Module(m),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:m,remoteMatchInfo:c}}registerRemote(e,r,n){const{host:o}=this,i=()=>{if(e.alias){const s=r.find(l=>{var c;return e.alias&&(l.name.startsWith(e.alias)||((c=l.alias)==null?void 0:c.startsWith(e.alias)))});assert(!s,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${s&&s.name} name or alias`)}"entry"in e&&sdk.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const a=r.find(s=>s.name===e.name);if(!a)i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];n!=null&&n.force&&(this.removeRemote(a),i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),sdk.warn(s.join(" ")))}}removeRemote(e){try{const{host:n}=this,{name:o}=e,i=n.options.remotes.findIndex(s=>s.name===o);i!==-1&&n.options.remotes.splice(i,1);const a=n.moduleCache.get(e.name);if(a){const s=a.remoteInfo,l=s.entryGlobalName;if(CurrentGlobal[l]){var r;(r=Object.getOwnPropertyDescriptor(CurrentGlobal,l))!=null&&r.configurable?delete CurrentGlobal[l]:CurrentGlobal[l]=void 0}const c=getRemoteEntryUniqueKey(a.remoteInfo);globalLoading[c]&&delete globalLoading[c],n.snapshotHandler.manifestCache.delete(s.entry);let u=s.buildVersion?sdk.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const d=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(m=>s.buildVersion?m.options.id===u:m.name===u);if(d!==-1){const m=CurrentGlobal.__FEDERATION__.__INSTANCES__[d];u=m.options.id||u;const _=getGlobalShareScope();let y=!0;const p=[];Object.keys(_).forEach(g=>{const I=_[g];I&&Object.keys(I).forEach(S=>{const R=I[S];R&&Object.keys(R).forEach(E=>{const b=R[E];b&&Object.keys(b).forEach(T=>{const $=b[T];$&&typeof $=="object"&&$.from===s.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(M=>M!==s.name),$.useIn.length?y=!1:p.push([g,S,E,T])):p.push([g,S,E,T]))})})})}),y&&(m.shareScopeMap={},delete _[u]),p.forEach(([g,I,S,R])=>{var E,b,T;(T=_[g])==null||(b=T[I])==null||(E=b[S])==null||delete E[R]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,n);if(h){const m=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;m&&(delete h.remotesInfo[m],Global.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[m])}n.moduleCache.delete(e.name)}}catch(n){logger.log("removeRemote fail: ",n)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}const USE_SNAPSHOT=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class ModuleFederation{initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=DEFAULT_SCOPE,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=getRemoteInfo({name:e,entry:r}),i=new Module({host:this,remoteInfo:o});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=formatShareConfigs(e,r),{userOptions:o,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,o),{shared:s}=this.sharedHandler.registerShared(i,o),l=[...i.plugins];o.plugins&&o.plugins.forEach(u=>{l.includes(u)||l.push(u)});const c=polyfills._extends({},e,r,{plugins:l,remotes:a,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const r=registerPlugins$1(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(i=>i.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,polyfills._extends({},this.options,{shared:e}))}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.17.1",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook,loadEntryError:new AsyncHook,getModuleFactory:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const r=USE_SNAPSHOT?[snapshotPlugin(),generatePreloadAssetsPlugin()]:[],n={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}var index=Object.freeze({__proto__:null});index_cjs$2.loadScript=sdk.loadScript;index_cjs$2.loadScriptNode=sdk.loadScriptNode;index_cjs$2.CurrentGlobal=CurrentGlobal;index_cjs$2.Global=Global;index_cjs$2.Module=Module;index_cjs$2.ModuleFederation=ModuleFederation;index_cjs$2.addGlobalSnapshot=addGlobalSnapshot;index_cjs$2.assert=assert;index_cjs$2.getGlobalFederationConstructor=getGlobalFederationConstructor;index_cjs$2.getGlobalSnapshot=getGlobalSnapshot;index_cjs$2.getInfoWithoutType=getInfoWithoutType;index_cjs$2.getRegisteredShare=getRegisteredShare;index_cjs$2.getRemoteEntry=getRemoteEntry;index_cjs$2.getRemoteInfo=getRemoteInfo;index_cjs$2.helpers=helpers;index_cjs$2.isStaticResourcesEqual=isStaticResourcesEqual;index_cjs$2.matchRemoteWithNameAndExpose=matchRemoteWithNameAndExpose;index_cjs$2.registerGlobalPlugins=registerGlobalPlugins;index_cjs$2.resetFederationGlobalInfo=resetFederationGlobalInfo;index_cjs$2.safeWrapper=safeWrapper;index_cjs$2.satisfy=satisfy;index_cjs$2.setGlobalFederationConstructor=setGlobalFederationConstructor;index_cjs$2.setGlobalFederationInstance=setGlobalFederationInstance;index_cjs$2.types=index;var utils_cjs={},runtimeCore$1=index_cjs$2;function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function getGlobalFederationInstance(t,e){const r=getBuilderId();return runtimeCore$1.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,errorCodes=index_cjs,utils=utils_cjs;function createInstance(t){const e=runtimeCore.getGlobalFederationConstructor()||runtimeCore.ModuleFederation;return new e(t)}let FederationInstance=null;function init(t){const e=utils.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),FederationInstance||(FederationInstance=e),e):(FederationInstance=createInstance(t),runtimeCore.setGlobalFederationInstance(FederationInstance),FederationInstance)}function loadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadRemote.apply(FederationInstance,t)}function loadShare(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShare.apply(FederationInstance,t)}function loadShareSync(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShareSync.apply(FederationInstance,t)}function preloadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.preloadRemote.apply(FederationInstance,t)}function registerRemotes(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerRemotes.apply(FederationInstance,t)}function registerPlugins(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerPlugins.apply(FederationInstance,t)}function getInstance(){return FederationInstance}function registerShared(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerShared.apply(FederationInstance,t)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);index_cjs$3.Module=runtimeCore.Module;index_cjs$3.ModuleFederation=runtimeCore.ModuleFederation;index_cjs$3.getRemoteEntry=runtimeCore.getRemoteEntry;index_cjs$3.getRemoteInfo=runtimeCore.getRemoteInfo;index_cjs$3.loadScript=runtimeCore.loadScript;index_cjs$3.loadScriptNode=runtimeCore.loadScriptNode;index_cjs$3.registerGlobalPlugins=runtimeCore.registerGlobalPlugins;index_cjs$3.createInstance=createInstance;index_cjs$3.getInstance=getInstance;var init_1=index_cjs$3.init=init;index_cjs$3.loadRemote=loadRemote;index_cjs$3.loadShare=loadShare;index_cjs$3.loadShareSync=loadShareSync;index_cjs$3.preloadRemote=preloadRemote;index_cjs$3.registerPlugins=registerPlugins;index_cjs$3.registerRemotes=registerRemotes;index_cjs$3.registerShared=registerShared;let initResolve,initReject;const initPromise=new Promise((t,e)=>{initResolve=t,initReject=e});var ActionVisu__mf_v__runtimeInit__mf_v__={initPromise,initResolve,initReject};export{ActionVisu__mf_v__runtimeInit__mf_v__ as A,index_cjs$3 as a,init_1 as i};
|
|
4
|
+
`)};function _extends(){return _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}const runtimeDescMap={[RUNTIME_001]:"Failed to get remoteEntry exports.",[RUNTIME_002]:'The remote entry interface does not contain "init"',[RUNTIME_003]:"Failed to get manifest.",[RUNTIME_004]:"Failed to locate remote.",[RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[RUNTIME_006]:"Invalid loadShareSync function call from runtime",[RUNTIME_007]:"Failed to get remote snapshot.",[RUNTIME_008]:"Failed to load script resources.",[RUNTIME_009]:"Please call createInstance first."},typeDescMap={[TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},buildDescMap={[BUILD_001]:"Failed to find expose module.",[BUILD_002]:"PublicPath is required in prod mode."},errorDescMap=_extends({},runtimeDescMap,typeDescMap,buildDescMap);index_cjs.BUILD_001=BUILD_001;index_cjs.BUILD_002=BUILD_002;index_cjs.RUNTIME_001=RUNTIME_001;index_cjs.RUNTIME_002=RUNTIME_002;index_cjs.RUNTIME_003=RUNTIME_003;index_cjs.RUNTIME_004=RUNTIME_004;index_cjs.RUNTIME_005=RUNTIME_005;index_cjs.RUNTIME_006=RUNTIME_006;index_cjs.RUNTIME_007=RUNTIME_007;index_cjs.RUNTIME_008=RUNTIME_008;index_cjs.RUNTIME_009=RUNTIME_009;index_cjs.TYPE_001=TYPE_001;index_cjs.buildDescMap=buildDescMap;index_cjs.errorDescMap=errorDescMap;index_cjs.getShortErrorMsg=getShortErrorMsg;index_cjs.runtimeDescMap=runtimeDescMap;index_cjs.typeDescMap=typeDescMap;var polyfills=polyfills_cjs$1,sdk=index_cjs$1,errorCodes$1=index_cjs;const LOG_CATEGORY="[ Federation Runtime ]",logger=sdk.createLogger(LOG_CATEGORY);function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`),t):new Error(`${LOG_CATEGORY}: ${t}`)}function warn(t){t instanceof Error&&(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`)),logger.warn(t)}function addUniqueItem(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function getFMId(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function isRemoteInfoWithEntry(t){return typeof t.entry<"u"}function isPureRemoteEntry(t){return!t.entry.includes(".json")}async function safeWrapper(t,e){try{return await t()}catch(r){!e&&warn(r);return}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function isStaticResourcesEqual(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function arrayOptions(t){return Array.isArray(t)?t:[t]}function getRemoteEntryInfoFromSnapshot(t){const e={url:"",type:"global",globalName:""};return sdk.isBrowserEnv()||sdk.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const processModuleAlias=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},CurrentGlobal=typeof globalThis=="object"?globalThis:window,nativeGlobal=(()=>{try{return document.defaultView}catch{return CurrentGlobal}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){var e,r,n,o,i,a;includeOwnProperty(t,"__VMOK__")&&!includeOwnProperty(t,"__FEDERATION__")&&definePropertyGlobalVal(t,"__FEDERATION__",t.__VMOK__),includeOwnProperty(t,"__FEDERATION__")||(definePropertyGlobalVal(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),definePropertyGlobalVal(t,"__VMOK__",t.__FEDERATION__));var s;(s=(e=t.__FEDERATION__).__GLOBAL_PLUGIN__)!=null||(e.__GLOBAL_PLUGIN__=[]);var l;(l=(r=t.__FEDERATION__).__INSTANCES__)!=null||(r.__INSTANCES__=[]);var c;(c=(n=t.__FEDERATION__).moduleInfo)!=null||(n.moduleInfo={});var u;(u=(o=t.__FEDERATION__).__SHARE__)!=null||(o.__SHARE__={});var d;(d=(i=t.__FEDERATION__).__MANIFEST_LOADING__)!=null||(i.__MANIFEST_LOADING__={});var h;(h=(a=t.__FEDERATION__).__PRELOADED_MAP__)!=null||(a.__PRELOADED_MAP__=new Map)}setGlobalDefaultVal(CurrentGlobal);setGlobalDefaultVal(nativeGlobal);function resetFederationGlobalInfo(){CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__=[],CurrentGlobal.__FEDERATION__.__INSTANCES__=[],CurrentGlobal.__FEDERATION__.moduleInfo={},CurrentGlobal.__FEDERATION__.__SHARE__={},CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(globalLoading).forEach(t=>{delete globalLoading[t]})}function setGlobalFederationInstance(t){CurrentGlobal.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=sdk.isDebugMode()){e&&(CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.18.4")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[i,a]=o.split(":"),s=`${i}:${e}`,l=t[s];if(l)return{value:l,key:s}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t),n=getInfoWithoutType(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o}=t,i=polyfills._object_without_properties_loose(t,["version"]),a=getFMId(i),s=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,a).value;if((s==null?void 0:s.version)===o)return s}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[r]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo=polyfills._extends({},nativeGlobal.__FEDERATION__.moduleInfo,t),()=>{const e=Object.keys(t);for(const r of e)delete nativeGlobal.__FEDERATION__.moduleInfo[r]}),getRemoteEntryExports=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:n}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):warn(`The plugin ${r.name} has been registered.`)})},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),DEFAULT_SCOPE="default",DEFAULT_REMOTE_TYPE="global",buildIdentifier="[0-9A-Za-z-]+",build=`(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`,numericIdentifier="0|[1-9]\\d*",numericIdentifierLoose="[0-9]+",nonNumericIdentifier="\\d*[a-zA-Z-][a-zA-Z0-9-]*",preReleaseIdentifierLoose=`(?:${numericIdentifierLoose}|${nonNumericIdentifier})`,preReleaseLoose=`(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`,preReleaseIdentifier=`(?:${numericIdentifier}|${nonNumericIdentifier})`,preRelease=`(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`,xRangeIdentifier=`${numericIdentifier}|x|X|\\*`,xRangePlain=`[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`,hyphenRange=`^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`,mainVersionLoose=`(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`,loosePlain=`[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`,gtlt="((?:<|>)?=?)",comparatorTrim=`(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`,loneTilde="(?:~>?)",tildeTrim=`(\\s*)${loneTilde}\\s+`,loneCaret="(?:\\^)",caretTrim=`(\\s*)${loneCaret}\\s+`,star="(<|>)?=?\\s*\\*",caret=`^${loneCaret}${xRangePlain}$`,mainVersion=`(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`,fullPlain=`v?${mainVersion}${preRelease}?${build}?`,tilde=`^${loneTilde}${xRangePlain}$`,xRange=`^${gtlt}\\s*${xRangePlain}$`,comparator=`^${gtlt}\\s*(${fullPlain})$|^$`,gte0="^\\s*>=\\s*0.0.0\\s*$";function parseRegex(t){return new RegExp(t)}function isXVersion(t){return!t||t.toLowerCase()==="x"||t==="*"}function pipe(...t){return e=>t.reduce((r,n)=>n(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,n,o,i,a,s,l,c,u,d,h)=>(isXVersion(n)?r="":isXVersion(o)?r=`>=${n}.0.0`:isXVersion(i)?r=`>=${n}.${o}.0`:r=`>=${r}`,isXVersion(c)?l="":isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:isXVersion(d)?l=`<${c}.${Number(u)+1}.0-0`:h?l=`<=${c}.${u}.${d}-${h}`:l=`<=${l}`,`${r} ${l}`.trim()))}function parseComparatorTrim(t){return t.replace(parseRegex(comparatorTrim),"$1$2$3")}function parseTildeTrim(t){return t.replace(parseRegex(tildeTrim),"$1~")}function parseCaretTrim(t){return t.replace(parseRegex(caretTrim),"$1^")}function parseCarets(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(caret),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:a?n==="0"?o==="0"?`>=${n}.${o}.${i}-${a} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i}-${a} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${i} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${Number(n)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:a?`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,n,o,i,a,s)=>{const l=isXVersion(o),c=l||isXVersion(i),u=c||isXVersion(a);return n==="="&&u&&(n=""),s="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(c&&(i=0),a=0,n===">"?(n=">=",c?(o=Number(o)+1,i=0,a=0):(i=Number(i)+1,a=0)):n==="<="&&(n="<",c?o=Number(o)+1:i=Number(i)+1),n==="<"&&(s="-0"),`${n+o}.${i}.${a}${s}`):c?`>=${o}.0.0${s} <${Number(o)+1}.0.0-0`:u?`>=${o}.${i}.0${s} <${o}.${Number(i)+1}.0-0`:r})).join(" ")}function parseStar(t){return t.trim().replace(parseRegex(star),"")}function parseGTE0(t){return t.trim().replace(parseRegex(gte0),"")}function compareAtom(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function comparePreRelease(t,e){const{preRelease:r}=t,{preRelease:n}=e;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,i=r.length;o<=i;o++){const a=r[o],s=n[o];if(a!==s)return a===void 0&&s===void 0?0:a?s?compareAtom(a,s):-1:1}return 0}function compareVersion(t,e){return compareAtom(t.major,e.major)||compareAtom(t.minor,e.minor)||compareAtom(t.patch,e.patch)||comparePreRelease(t,e)}function eq(t,e){return t.version===e.version}function compare(t,e){switch(t.operator){case"":case"=":return eq(t,e);case">":return compareVersion(t,e)<0;case">=":return eq(t,e)||compareVersion(t,e)<0;case"<":return compareVersion(t,e)>0;case"<=":return eq(t,e)||compareVersion(t,e)>0;case void 0:return!0;default:return!1}}function parseComparatorString(t){return pipe(parseCarets,parseTildes,parseXRanges,parseStar)(t)}function parseRange(t){return pipe(parseHyphen,parseComparatorTrim,parseTildeTrim,parseCaretTrim)(t.trim()).split(/\s+/).join(" ")}function satisfy(t,e){if(!t)return!1;const r=extractComparator(t);if(!r)return!1;const[,n,,o,i,a,s]=r,l={operator:n,version:combineVersion(o,i,a,s),major:o,minor:i,patch:a,preRelease:s==null?void 0:s.split(".")},c=e.split("||");for(const u of c){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const h=parseRange(d);if(!h.trim())return!0;const p=h.split(" ").map(m=>parseComparatorString(m)).join(" ");if(!p.trim())return!0;const _=p.split(/\s+/).map(m=>parseGTE0(m)).filter(Boolean);if(_.length===0)continue;let y=!0;for(const m of _){const g=extractComparator(m);if(!g){y=!1;break}const[,I,,b,R,E,S]=g,T={operator:I,version:combineVersion(b,R,E,S),major:b,minor:R,patch:E,preRelease:S==null?void 0:S.split(".")};if(!compare(T,l)){y=!1;break}}if(y)return!0}catch(h){console.error(`[semver] Error processing range part "${d}":`,h);continue}}return!1}function formatShare(t,e,r,n){let o;"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)});var i,a,s;return polyfills._extends({deps:[],useIn:[],from:e,loading:null},t,{shareConfig:polyfills._extends({requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1},t.shareConfig),get:o,loaded:t!=null&&t.loaded||"lib"in t?!0:void 0,version:(i=t.version)!=null?i:"0",scope:Array.isArray(t.scope)?t.scope:[(a=t.scope)!=null?a:"default"],strategy:((s=t.strategy)!=null?s:n)||"version-first"})}function formatShareConfigs(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((a,s)=>{const l=arrayOptions(r[s]);return a[s]=a[s]||[],l.forEach(c=>{a[s].push(formatShare(c,n,s,e.shareStrategy))}),a},{}),i=polyfills._extends({},t.shared);return Object.keys(o).forEach(a=>{i[a]?o[a].forEach(s=>{i[a].find(c=>c.version===s.version)||i[a].push(s)}):i[a]=o[a]}),{shared:i,shareInfos:o}}function versionLt(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const i=n.split(".");let a=n;for(let s=0;s<3-i.length;s++)a+=".0";return a}return n};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(n,o){return versionLt(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const n=t[e][r],o=function(i,a){return!isLoaded(n[i])&&versionLt(i,a)};return findVersion(t[e][r],o)}function findSingletonVersionOrderByLoaded(t,e,r){const n=t[e][r],o=function(i,a){const s=l=>isLoaded(l)||isLoading(l);return s(n[a])?s(n[i])?!!versionLt(i,a):!0:s(n[i])?!1:versionLt(i,a)};return findVersion(t[e][r],o)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,n){if(!t)return;const{shareConfig:o,scope:i=DEFAULT_SCOPE,strategy:a}=r,s=Array.isArray(i)?i:[i];for(const l of s)if(o&&t[l]&&t[l][e]){const{requiredVersion:c}=o,d=getFindShareFunction(a)(t,l,e),h=()=>{if(o.singleton){if(typeof c=="string"&&!satisfy(d,c)){const y=`Version ${d} from ${d&&t[l][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${c})`;o.strictVersion?error(y):warn(y)}return t[l][e][d]}else{if(c===!1||c==="*"||satisfy(d,c))return t[l][e][d];for(const[y,m]of Object.entries(t[l][e]))if(satisfy(y,c))return m}},p={shareScopeMap:t,scope:l,pkgName:e,version:d,GlobalFederation:Global.__FEDERATION__,resolver:h};return(n.emit(p)||p).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=s=>{if(!s)return;const l={};s.forEach(d=>{l[d.version]=d});const u=findVersion(l,function(d,h){return!isLoaded(l[d])&&versionLt(d,h)});return l[u]};var i;const a=(i=r==null?void 0:r.resolver)!=null?i:o;return Object.assign({},a(n[e]),r==null?void 0:r.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const s=r.name;return o=`.${o}`,{pkgNameOrAlias:s,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const i=r.alias&&e.startsWith(r.alias);let a=r.alias&&e.replace(r.alias,"");if(r.alias&&i){if(a&&a.startsWith("/")){const s=r.alias;return a=`.${a}`,{pkgNameOrAlias:s,expose:a,remote:r}}else if(a==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function matchRemote(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function registerPlugins$1(t,e){const r=getGlobalHostPlugins(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t!=null&&t.find(i=>i.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(i=>{i.applyPlugin(o,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,n])}catch(o){n(o)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:n,entryExports:o}=getRemoteEntryExports(t,e);return assert(o,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:i}=getRemoteEntryExports(t,e);if(i)return i;const a=o?o(r):r;return sdk.loadScript(a,{attrs:{},createScriptHook:(s,l)=>{const c=n.lifecycle.createScript.emit({url:s,attrs:l});if(c&&(c instanceof HTMLScriptElement||"script"in c||"timeout"in c))return c}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(s=>{throw assert(void 0,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_008,errorCodes$1.runtimeDescMap,{remoteName:t,resourceUrl:r})),s})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:i,name:a,type:s}=t;switch(s){case"esm":case"module":return loadEsmEntry({entry:o,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:o,remoteEntryExports:e});default:return loadEntryScript({entry:o,globalName:i,name:a,loaderHook:r,getEntryUrl:n})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:i}=t,{entryExports:a}=getRemoteEntryExports(o,n);return a||sdk.loadScriptNode(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(s,l={})=>{const c=e.lifecycle.createScript.emit({url:s,attrs:l});if(c&&"url"in c)return c}}}).then(()=>handleRemoteEntryLoaded(o,n,r)).catch(s=>{throw s})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry(t){const{origin:e,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o}=t,i=getRemoteEntryUniqueKey(n);if(r)return r;if(!globalLoading[i]){const a=e.remoteHandler.hooks.lifecycle.loadEntry,s=e.loaderHook;globalLoading[i]=a.emit({loaderHook:s,remoteInfo:n,remoteEntryExports:r}).then(l=>l||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:n,remoteEntryExports:r,loaderHook:s,getEntryUrl:o}):loadEntryNode({remoteInfo:n,loaderHook:s})))}return globalLoading[i]}function getRemoteInfo(t){return polyfills._extends({},t,{entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE})}function defaultPreloadArgs(t){return polyfills._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},t)}function formatPreloadArgs(t,e){return e.map(r=>{const n=matchRemote(t,r.nameOrAlias);return assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&sdk.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:a}=r;if(e.options.inBrowser){if(a.forEach(s=>{const{moduleInfo:l}=s,c=e.moduleCache.get(t.name);getRemoteEntry(c?{origin:e,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}:{origin:e,remoteInfo:l,remoteEntryExports:void 0})}),n){const s={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(p instanceof HTMLLinkElement)return p}});u&&document.head.appendChild(c)})}else{const s={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(p instanceof HTMLLinkElement)return p},needDeleteLink:!1});u&&document.head.appendChild(c)})}if(n){const s={rel:"preload",as:"script"};i.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(p instanceof HTMLLinkElement)return p}});u&&document.head.appendChild(c)})}else{const s={fetchpriority:"high",type:(t==null?void 0:t.type)==="module"?"module":"text/javascript"};i.forEach(l=>{const{script:c,needAttach:u}=sdk.createScript({url:l,cb:()=>{},attrs:s,createScriptHook:(d,h)=>{const p=e.loaderHook.lifecycle.createScript.emit({url:d,attrs:h});if(p instanceof HTMLScriptElement)return p},needDeleteScript:!0});u&&document.head.appendChild(c)})}}}const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded};var helpers={global:GlobalUtils,share:ShareUtils,utils:{matchRemoteWithNameAndExpose,preloadAssets,getRemoteInfo}};let Module=class{async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;try{e=await getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch(r){const n=getRemoteEntryUniqueKey(this.remoteInfo);if(r instanceof Error&&r.message.includes(errorCodes$1.RUNTIME_008))e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading,uniqueKey:n});else throw r}return assert(e,`remoteEntryExports is undefined
|
|
5
|
+
${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.getEntry();if(!this.inited){const d=this.host.shareScopeMap,h=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];h.length||h.push("default"),h.forEach(g=>{d[g]||(d[g]={})});const p=d[h[0]],_=[],y={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?h:this.remoteInfo.shareScope||"default"};Object.defineProperty(y,"shareScopeMap",{value:d,enumerable:!1});const m=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:p,remoteEntryInitOptions:y,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof(a==null?void 0:a.init)>"u"&&error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_002,errorCodes$1.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await a.init(m.shareScope,m.initScope,m.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(polyfills._extends({},m,{id:e,remoteSnapshot:o,remoteEntryExports:a}))}this.lib=a,this.inited=!0;let s;s=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:r,moduleInfo:this.remoteInfo}),s||(s=await a.get(r)),assert(s,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const l=processModuleAlias(this.remoteInfo.name,r),c=this.wraperFactory(s,l);return i?await c():c}wraperFactory(e,r){function n(o,i){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:i,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}};class SyncHook{on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class AsyncHook extends SyncHook{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const i=a=>a===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(i):a;r=i()}return Promise.resolve(r)}}function checkReturnData(t,e){if(!isObject(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class SyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(checkReturnData(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){warn(n),this.onerror(n)}return e}constructor(e){super(),this.onerror=error,this.type=e}}class AsyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=a=>(warn(a),this.onerror(a),e),i=a=>{if(checkReturnData(e,a)){if(e=a,n<r.length)try{return Promise.resolve(r[n++](e)).then(i,o)}catch(s){return o(s)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(i(e))}return Promise.resolve(e)}constructor(e){super(),this.onerror=error,this.type=e}}class PluginSystem{applyPlugin(e,r){assert(isPlainObject(e),"Plugin configuration is invalid.");const n=e.name;assert(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply==null||e.apply.call(e,r),Object.keys(this.lifecycle).forEach(o=>{const i=e[o];i&&this.lifecycle[o].on(i)}))}removePlugin(e){assert(e,"A name is required.");const r=this.registerPlugins[e];assert(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:a}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:s,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:a});assignRemoteInfo(i,s);const c={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:i,remote:e,remoteSnapshot:s,globalSnapshot:l});return u&&preloadAssets(i,o,u,!1),polyfills._extends({},t,{remoteSnapshot:s})}return t}}}function splitId(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function traverseModuleInfo(t,e,r,n,o={},i){const a=getFMId(e),{value:s}=getInfoWithoutType(t,a),l=i||s;if(l&&!sdk.isManifestProvider(l)&&(r(l,e,n),l.remotesInfo)){const c=Object.keys(l.remotesInfo);for(const u of c){if(o[u])continue;o[u]=!0;const d=splitId(u),h=l.remotesInfo[u];traverseModuleInfo(t,{name:d.name,version:h.matchedVersion},r,!1,o,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,n,o){const i=[],a=[],s=[],l=new Set,c=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:h}=d;if(traverseModuleInfo(n,r,(m,g,I)=>{let b;if(I)b=d;else if(Array.isArray(h)){const M=h.find(N=>N.nameOrAlias===g.name||N.nameOrAlias===g.alias);if(!M)return;b=defaultPreloadArgs(M)}else if(h===!0)b=d;else return;const R=sdk.getResourceUrl(m,getRemoteEntryInfoFromSnapshot(m).url);R&&s.push({name:g.name,moduleInfo:{name:g.name,entry:R,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:g.name,shareScope:"",version:"version"in m?m.version:void 0},url:R});let E="modules"in m?m.modules:[];const S=normalizePreloadExposes(b.exposes);if(S.length&&"modules"in m){var T;E=m==null||(T=m.modules)==null?void 0:T.reduce((M,N)=>((S==null?void 0:S.indexOf(N.moduleName))!==-1&&M.push(N),M),[])}function $(M){const N=M.map(v=>sdk.getResourceUrl(m,v));return b.filter?N.filter(b.filter):N}if(E){const M=E.length;for(let N=0;N<M;N++){const v=E[N],A=`${g.name}/${v.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:v.moduleName==="."?g.name:A,name:g.name,remoteSnapshot:m,preloadConfig:b,remote:g,origin:t}),!getPreloaded(A)&&(b.resourceCategory==="all"?(i.push(...$(v.assets.css.async)),i.push(...$(v.assets.css.sync)),a.push(...$(v.assets.js.async)),a.push(...$(v.assets.js.sync))):(b.resourceCategory="sync")&&(i.push(...$(v.assets.css.sync)),a.push(...$(v.assets.js.sync))),setPreloaded(A))}}},!0,{},o),o.shared&&o.shared.length>0){const m=(g,I)=>{const b=getRegisteredShare(t.shareScopeMap,I.sharedName,g,t.sharedHandler.hooks.lifecycle.resolveShare);b&&typeof b.lib=="function"&&(I.assets.js.sync.forEach(R=>{l.add(R)}),I.assets.css.sync.forEach(R=>{c.add(R)}))};o.shared.forEach(g=>{var I;const b=(I=u.shared)==null?void 0:I[g.sharedName];if(!b)return;const R=g.version?b.find(S=>S.version===g.version):b;if(!R)return;arrayOptions(R).forEach(S=>{m(S,g)})})}const _=a.filter(m=>!l.has(m)&&!isExisted("script",m));return{cssAssets:i.filter(m=>!c.has(m)&&!isExisted("link",m)),jsAssetsWithoutEntry:_,entryAssets:s.filter(m=>!isExisted("script",m.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:a}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(n,a),generatePreloadAssets(e,r,n,i,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:"version"in t?t.version:void 0})}}class SnapshotHandler{async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let i=getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},addGlobalSnapshot({[this.HostInstance.options.name]:i})),i&&"remotesInfo"in i&&!getInfoWithoutType(i.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(i.remotesInfo=polyfills._extends({},i==null?void 0:i.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));const{hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l});let d,h;if(c)if(sdk.isManifestProvider(c)){const p=sdk.isBrowserEnv()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",_=await this.getManifestJson(p,e,{}),y=setGlobalSnapshotInfoByModuleInfo(polyfills._extends({},e,{entry:p}),_);d=_,h=y}else{const{remoteSnapshot:p}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});d=p,h=u}else if(isRemoteInfoWithEntry(e)){const p=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,p),{remoteSnapshot:y}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:p,from:"global"});d=y,h=_}else error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_007,errorCodes$1.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(u)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let a=this.manifestCache.get(e);if(a)return a;try{let s=await this.loaderHook.lifecycle.fetch.emit(e,{});(!s||!(s instanceof Response))&&(s=await fetch(e,{})),a=await s.json()}catch(s){a=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:s,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),a||(delete this.manifestLoading[e],error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_003,errorCodes$1.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${s}`)))}return assert(a.metaData&&a.exposes&&a.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,a),a},i=async()=>{const a=await o(),s=sdk.generateSnapshotFromManifest(a,{version:e}),{remoteSnapshot:l}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:a,remoteSnapshot:s,manifestUrl:e,from:"manifest"});return l};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(a=>a)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new PluginSystem({beforeLoadRemoteSnapshot:new AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class SharedHandler{registerShared(e,r){const{shareInfos:n,shared:o}=formatShareConfigs(e,r);return Object.keys(n).forEach(a=>{n[a].forEach(l=>{!getRegisteredShare(this.shareScopeMap,a,l,this.hooks.lifecycle.resolveShare)&&l&&l.lib&&this.setShared({pkgName:a,lib:l.lib,get:l.get,loaded:!0,shared:l,from:r.name})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:o.strategy}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:a}=i;assert(a,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const s=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare),l=c=>{c.useIn||(c.useIn=[]),addUniqueItem(c.useIn,n.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){const c=await s.loading;return s.loaded=!0,s.lib||(s.lib=c),l(s),c}else if(s){const u=(async()=>{const d=await s.get();return l(s),s.loaded=!0,s.lib=d,d})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:u}),u}else{if(r!=null&&r.customShareInfo)return!1;const u=(async()=>{const d=await a.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0,h.from=a.from),d})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:u}),u}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:n}=this,o=r==null?void 0:r.from,i=r==null?void 0:r.strategy;let a=r==null?void 0:r.initScope;const s=[];if(o!=="build"){const{initTokens:_}=this;a||(a=[]);let y=_[e];if(y||(y=_[e]={from:this.host.name}),a.indexOf(y)>=0)return s;a.push(y)}const l=this.shareScopeMap,c=n.options.name;l[e]||(l[e]={});const u=l[e],d=(_,y)=>{var m;const{version:g,eager:I}=y;u[_]=u[_]||{};const b=u[_],R=b[g],E=!!(R&&(R.eager||(m=R.shareConfig)!=null&&m.eager));(!R||R.strategy!=="loaded-first"&&!R.loaded&&(!I!=!E?I:c>R.from))&&(b[g]=y)},h=_=>_&&_.init&&_.init(l[e],a),p=async _=>{const{module:y}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(y.getEntry){let m;try{m=await y.getEntry()}catch(g){m=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:g,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}y.inited||(await h(m),y.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(m=>{m.scope.includes(e)&&d(_,m)})}),(n.options.shareStrategy==="version-first"||i==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&s.push(p(_.name))}),s}loadShareSync(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});const i=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),a=s=>{s.useIn||(s.useIn=[]),addUniqueItem(s.useIn,n.options.name)};if(i){if(typeof i.lib=="function")return a(i),i.loaded||(i.loaded=!0,i.from===n.options.name&&(o.loaded=!0)),i.lib;if(typeof i.get=="function"){const s=i.get();if(!(s instanceof Promise))return a(i),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:s,shared:i}),s}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const s=o.get();if(s instanceof Promise){const l=(r==null?void 0:r.from)==="build"?errorCodes$1.RUNTIME_005:errorCodes$1.RUNTIME_006;throw new Error(errorCodes$1.getShortErrorMsg(l,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=s,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:i,loaded:a,get:s}){const{version:l,scope:c="default"}=r,u=polyfills._object_without_properties_loose(r,["version","scope"]);(Array.isArray(c)?c:[c]).forEach(h=>{if(this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),!this.shareScopeMap[h][e][l]){this.shareScopeMap[h][e][l]=polyfills._extends({version:l,scope:["default"]},u,{lib:o,loaded:a,loading:i}),s&&(this.shareScopeMap[h][e][l].get=s);return}const p=this.shareScopeMap[h][e][l];i&&!p.loading&&(p.loading=i),a&&!p.loaded&&(p.loaded=a),n&&p.from!==n&&(p.from=n)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}constructor(e){this.hooks=new PluginSystem({afterResolve:new AsyncWaterfallHook("afterResolve"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class RemoteHandler{formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,i)=>(this.registerRemote(i,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},a&&e.startsWith(i)){const s=e.replace(i,a);this.idToRemoteMap[s]={name:n.name,expose:o};return}if(a&&e.startsWith(a)){const s=e.replace(a,i);this.idToRemoteMap[s]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:i,moduleOptions:a,remoteMatchInfo:s}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:c,expose:u,id:d,remoteSnapshot:h}=s,p=await i.get(d,u,r,h),_=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:l,expose:u,exposeModule:o?p:void 0,exposeModuleFactory:o?void 0:p,remote:c,options:a,moduleInstance:i,origin:n});return this.setIdToRemoteMap(e,s),typeof _=="function"?_:p}catch(o){const{from:i="runtime"}=r||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:i,lifecycle:"onLoad",origin:n});if(!a)throw o;return a}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=formatPreloadArgs(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:i}=o,a=getRemoteInfo(i),{globalSnapshot:s,remoteSnapshot:l}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:i}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:i,remoteInfo:a,globalSnapshot:s,remoteSnapshot:l});c&&preloadAssets(a,r,c)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:i}=o,a=matchRemoteWithNameAndExpose(r.options.remotes,i);assert(a,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_004,errorCodes$1.runtimeDescMap,{hostName:r.options.name,requestId:i}));const{remote:s}=a,l=getRemoteInfo(s),c=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(polyfills._extends({id:i},a,{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:d}=c;assert(u&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let h=r.moduleCache.get(u.name);const p={host:r,remoteInfo:l};return h||(h=new Module(p),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:p,remoteMatchInfo:c}}registerRemote(e,r,n){const{host:o}=this,i=()=>{if(e.alias){const s=r.find(l=>{var c;return e.alias&&(l.name.startsWith(e.alias)||((c=l.alias)==null?void 0:c.startsWith(e.alias)))});assert(!s,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${s&&s.name} name or alias`)}"entry"in e&&sdk.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const a=r.find(s=>s.name===e.name);if(!a)i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];n!=null&&n.force&&(this.removeRemote(a),i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),sdk.warn(s.join(" ")))}}removeRemote(e){try{const{host:n}=this,{name:o}=e,i=n.options.remotes.findIndex(s=>s.name===o);i!==-1&&n.options.remotes.splice(i,1);const a=n.moduleCache.get(e.name);if(a){const s=a.remoteInfo,l=s.entryGlobalName;if(CurrentGlobal[l]){var r;(r=Object.getOwnPropertyDescriptor(CurrentGlobal,l))!=null&&r.configurable?delete CurrentGlobal[l]:CurrentGlobal[l]=void 0}const c=getRemoteEntryUniqueKey(a.remoteInfo);globalLoading[c]&&delete globalLoading[c],n.snapshotHandler.manifestCache.delete(s.entry);let u=s.buildVersion?sdk.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const d=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(p=>s.buildVersion?p.options.id===u:p.name===u);if(d!==-1){const p=CurrentGlobal.__FEDERATION__.__INSTANCES__[d];u=p.options.id||u;const _=getGlobalShareScope();let y=!0;const m=[];Object.keys(_).forEach(g=>{const I=_[g];I&&Object.keys(I).forEach(b=>{const R=I[b];R&&Object.keys(R).forEach(E=>{const S=R[E];S&&Object.keys(S).forEach(T=>{const $=S[T];$&&typeof $=="object"&&$.from===s.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(M=>M!==s.name),$.useIn.length?y=!1:m.push([g,b,E,T])):m.push([g,b,E,T]))})})})}),y&&(p.shareScopeMap={},delete _[u]),m.forEach(([g,I,b,R])=>{var E,S,T;(T=_[g])==null||(S=T[I])==null||(E=S[b])==null||delete E[R]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,n);if(h){const p=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;p&&(delete h.remotesInfo[p],Global.__FEDERATION__.__MANIFEST_LOADING__[p]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[p])}n.moduleCache.delete(e.name)}}catch(n){logger.log("removeRemote fail: ",n)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}const USE_SNAPSHOT=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class ModuleFederation{initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=DEFAULT_SCOPE,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=getRemoteInfo({name:e,entry:r}),i=new Module({host:this,remoteInfo:o});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=formatShareConfigs(e,r),{userOptions:o,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,o),{shared:s}=this.sharedHandler.registerShared(i,o),l=[...i.plugins];o.plugins&&o.plugins.forEach(u=>{l.includes(u)||l.push(u)});const c=polyfills._extends({},e,r,{plugins:l,remotes:a,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const r=registerPlugins$1(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(i=>i.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,polyfills._extends({},this.options,{shared:e}))}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.18.4",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook,loadEntryError:new AsyncHook,getModuleFactory:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const r=USE_SNAPSHOT?[snapshotPlugin(),generatePreloadAssetsPlugin()]:[],n={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}var index=Object.freeze({__proto__:null});index_cjs$2.loadScript=sdk.loadScript;index_cjs$2.loadScriptNode=sdk.loadScriptNode;index_cjs$2.CurrentGlobal=CurrentGlobal;index_cjs$2.Global=Global;index_cjs$2.Module=Module;index_cjs$2.ModuleFederation=ModuleFederation;index_cjs$2.addGlobalSnapshot=addGlobalSnapshot;index_cjs$2.assert=assert;index_cjs$2.getGlobalFederationConstructor=getGlobalFederationConstructor;index_cjs$2.getGlobalSnapshot=getGlobalSnapshot;index_cjs$2.getInfoWithoutType=getInfoWithoutType;index_cjs$2.getRegisteredShare=getRegisteredShare;index_cjs$2.getRemoteEntry=getRemoteEntry;index_cjs$2.getRemoteInfo=getRemoteInfo;index_cjs$2.helpers=helpers;index_cjs$2.isStaticResourcesEqual=isStaticResourcesEqual;index_cjs$2.matchRemoteWithNameAndExpose=matchRemoteWithNameAndExpose;index_cjs$2.registerGlobalPlugins=registerGlobalPlugins;index_cjs$2.resetFederationGlobalInfo=resetFederationGlobalInfo;index_cjs$2.safeWrapper=safeWrapper;index_cjs$2.satisfy=satisfy;index_cjs$2.setGlobalFederationConstructor=setGlobalFederationConstructor;index_cjs$2.setGlobalFederationInstance=setGlobalFederationInstance;index_cjs$2.types=index;var utils_cjs={},runtimeCore$1=index_cjs$2;function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function getGlobalFederationInstance(t,e){const r=getBuilderId();return runtimeCore$1.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,errorCodes=index_cjs,utils=utils_cjs;function createInstance(t){const e=runtimeCore.getGlobalFederationConstructor()||runtimeCore.ModuleFederation,r=new e(t);return runtimeCore.setGlobalFederationInstance(r),r}let FederationInstance=null;function init(t){const e=utils.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),FederationInstance||(FederationInstance=e),e):(FederationInstance=createInstance(t),FederationInstance)}function loadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadRemote.apply(FederationInstance,t)}function loadShare(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShare.apply(FederationInstance,t)}function loadShareSync(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShareSync.apply(FederationInstance,t)}function preloadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.preloadRemote.apply(FederationInstance,t)}function registerRemotes(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerRemotes.apply(FederationInstance,t)}function registerPlugins(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerPlugins.apply(FederationInstance,t)}function getInstance(){return FederationInstance}function registerShared(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerShared.apply(FederationInstance,t)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);index_cjs$3.Module=runtimeCore.Module;index_cjs$3.ModuleFederation=runtimeCore.ModuleFederation;index_cjs$3.getRemoteEntry=runtimeCore.getRemoteEntry;index_cjs$3.getRemoteInfo=runtimeCore.getRemoteInfo;index_cjs$3.loadScript=runtimeCore.loadScript;index_cjs$3.loadScriptNode=runtimeCore.loadScriptNode;index_cjs$3.registerGlobalPlugins=runtimeCore.registerGlobalPlugins;index_cjs$3.createInstance=createInstance;index_cjs$3.getInstance=getInstance;var init_1=index_cjs$3.init=init;index_cjs$3.loadRemote=loadRemote;index_cjs$3.loadShare=loadShare;index_cjs$3.loadShareSync=loadShareSync;index_cjs$3.preloadRemote=preloadRemote;index_cjs$3.registerPlugins=registerPlugins;index_cjs$3.registerRemotes=registerRemotes;index_cjs$3.registerShared=registerShared;let initResolve,initReject;const initPromise=new Promise((t,e)=>{initResolve=t,initReject=e});var ActionVisu__mf_v__runtimeInit__mf_v__={initPromise,initResolve,initReject};export{ActionVisu__mf_v__runtimeInit__mf_v__ as A,index_cjs$3 as a,init_1 as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,j as r}from"./ActionVisu__loadShare__react_mf_2_dom__loadShare__-DByPam44.js";import{a}from"./ActionVisu__loadShare__react__loadShare__-DD24U9rt.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";var t={},o=e;t.createRoot=o.createRoot,t.hydrateRoot=o.hydrateRoot;t.createRoot(document.getElementById("root")).render(r.jsx(a.StrictMode,{}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../customRuleBlocks.js","./ActionVisu__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../customRuleBlocks.js","./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js","./virtualExposes-fQM_6VMq.js","./preload-helper-BDBacUwf.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{_ as i}from"./preload-helper-BDBacUwf.js";const r=i(()=>import("../customRuleBlocks.js"),__vite__mapDeps([0,1,2,3]),import.meta.url);Promise.resolve(r).then(e=>Promise.resolve(e.__tla).then(e.init).catch(e.init));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as TM,A as h,a as l}from"./ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js";import{j as A,R as Cc,A as Im}from"./ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js";import{g as xT,c as Ic}from"./_commonjsHelpers-Cpj98o6Y.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js";function qi(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>r.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${r} for the full message.`}const tc="$$material";function hM(){return hM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},hM.apply(null,arguments)}function Am(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function xm(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Em=(function(){function t(r){var i=this;this._insertTag=function(o){var n;i.tags.length===0?i.insertionPoint?n=i.insertionPoint.nextSibling:i.prepend?n=i.container.firstChild:n=i.before:n=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(o,n),i.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(xm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Am(o);try{n.insertRule(i,n.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var o;return(o=i.parentNode)==null?void 0:o.removeChild(i)}),this.tags=[],this.ctr=0},t})(),nr="-ms-",DM="-moz-",it="-webkit-",ET="comm",o0="rule",n0="decl",Om="@import",OT="@keyframes",Sm="@layer",_m=Math.abs,ol=String.fromCharCode,vm=Object.assign;function bm(t,e){return er(t,0)^45?(((e<<2^er(t,0))<<2^er(t,1))<<2^er(t,2))<<2^er(t,3):0}function ST(t){return t.trim()}function km(t,e){return(t=e.exec(t))?t[0]:t}function ot(t,e,r){return t.replace(e,r)}function Cd(t,e){return t.indexOf(e)}function er(t,e){return t.charCodeAt(e)|0}function ba(t,e,r){return t.slice(e,r)}function ji(t){return t.length}function s0(t){return t.length}function Ac(t,e){return e.push(t),t}function Ym(t,e){return t.map(e).join("")}var nl=1,ys=1,_T=0,Ir=0,Pt=0,Cs="";function sl(t,e,r,i,o,n,s){return{value:t,root:e,parent:r,type:i,props:o,children:n,line:nl,column:ys,length:s,return:""}}function Zs(t,e){return vm(sl("",null,null,"",null,null,0),t,{length:-t.length},e)}function Um(){return Pt}function Qm(){return Pt=Ir>0?er(Cs,--Ir):0,ys--,Pt===10&&(ys=1,nl--),Pt}function br(){return Pt=Ir<_T?er(Cs,Ir++):0,ys++,Pt===10&&(ys=1,nl++),Pt}function zi(){return er(Cs,Ir)}function sM(){return Ir}function rc(t,e){return ba(Cs,t,e)}function ka(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vT(t){return nl=ys=1,_T=ji(Cs=t),Ir=0,[]}function bT(t){return Cs="",t}function aM(t){return ST(rc(Ir-1,Id(t===91?t+2:t===40?t+1:t)))}function $m(t){for(;(Pt=zi())&&Pt<33;)br();return ka(t)>2||ka(Pt)>3?"":" "}function Pm(t,e){for(;--e&&br()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return rc(t,sM()+(e<6&&zi()==32&&br()==32))}function Id(t){for(;br();)switch(Pt){case t:return Ir;case 34:case 39:t!==34&&t!==39&&Id(Pt);break;case 40:t===41&&Id(t);break;case 92:br();break}return Ir}function Rm(t,e){for(;br()&&t+Pt!==57;)if(t+Pt===84&&zi()===47)break;return"/*"+rc(e,Ir-1)+"*"+ol(t===47?t:br())}function Bm(t){for(;!ka(zi());)br();return rc(t,Ir)}function Wm(t){return bT(cM("",null,null,null,[""],t=vT(t),0,[0],t))}function cM(t,e,r,i,o,n,s,a,c){for(var M=0,d=0,u=s,N=0,g=0,y=0,L=1,p=1,j=1,w=0,T="",D=o,z=n,m=i,C=T;p;)switch(y=w,w=br()){case 40:if(y!=108&&er(C,u-1)==58){Cd(C+=ot(aM(w),"&","&\f"),"&\f")!=-1&&(j=-1);break}case 34:case 39:case 91:C+=aM(w);break;case 9:case 10:case 13:case 32:C+=$m(y);break;case 92:C+=Pm(sM()-1,7);continue;case 47:switch(zi()){case 42:case 47:Ac(Fm(Rm(br(),sM()),e,r),c);break;default:C+="/"}break;case 123*L:a[M++]=ji(C)*j;case 125*L:case 59:case 0:switch(w){case 0:case 125:p=0;case 59+d:j==-1&&(C=ot(C,/\f/g,"")),g>0&&ji(C)-u&&Ac(g>32?c4(C+";",i,r,u-1):c4(ot(C," ","")+";",i,r,u-2),c);break;case 59:C+=";";default:if(Ac(m=a4(C,e,r,M,d,o,a,T,D=[],z=[],u),n),w===123)if(d===0)cM(C,e,m,m,D,n,u,a,z);else switch(N===99&&er(C,3)===110?100:N){case 100:case 108:case 109:case 115:cM(t,m,m,i&&Ac(a4(t,m,m,0,0,o,a,T,o,D=[],u),z),o,z,u,a,i?D:z);break;default:cM(C,m,m,m,[""],z,0,a,z)}}M=d=g=0,L=j=1,T=C="",u=s;break;case 58:u=1+ji(C),g=y;default:if(L<1){if(w==123)--L;else if(w==125&&L++==0&&Qm()==125)continue}switch(C+=ol(w),w*L){case 38:j=d>0?1:(C+="\f",-1);break;case 44:a[M++]=(ji(C)-1)*j,j=1;break;case 64:zi()===45&&(C+=aM(br())),N=zi(),d=u=ji(T=C+=Bm(sM())),w++;break;case 45:y===45&&ji(C)==2&&(L=0)}}return n}function a4(t,e,r,i,o,n,s,a,c,M,d){for(var u=o-1,N=o===0?n:[""],g=s0(N),y=0,L=0,p=0;y<i;++y)for(var j=0,w=ba(t,u+1,u=_m(L=s[y])),T=t;j<g;++j)(T=ST(L>0?N[j]+" "+w:ot(w,/&\f/g,N[j])))&&(c[p++]=T);return sl(t,e,r,o===0?o0:a,c,M,d)}function Fm(t,e,r){return sl(t,e,r,ET,ol(Um()),ba(t,2,-2),0)}function c4(t,e,r,i){return sl(t,e,r,n0,ba(t,0,i),ba(t,i+1,-1),i)}function Ms(t,e){for(var r="",i=s0(t),o=0;o<i;o++)r+=e(t[o],o,t,e)||"";return r}function Jm(t,e,r,i){switch(t.type){case Sm:if(t.children.length)break;case Om:case n0:return t.return=t.return||t.value;case ET:return"";case OT:return t.return=t.value+"{"+Ms(t.children,i)+"}";case o0:t.value=t.props.join(",")}return ji(r=Ms(t.children,i))?t.return=t.value+"{"+r+"}":""}function Hm(t){var e=s0(t);return function(r,i,o,n){for(var s="",a=0;a<e;a++)s+=t[a](r,i,o,n)||"";return s}}function Gm(t){return function(e){e.root||(e=e.return)&&t(e)}}function kT(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Vm=function(e,r,i){for(var o=0,n=0;o=n,n=zi(),o===38&&n===12&&(r[i]=1),!ka(n);)br();return rc(e,Ir)},Zm=function(e,r){var i=-1,o=44;do switch(ka(o)){case 0:o===38&&zi()===12&&(r[i]=1),e[i]+=Vm(Ir-1,r,i);break;case 2:e[i]+=aM(o);break;case 4:if(o===44){e[++i]=zi()===58?"&\f":"",r[i]=e[i].length;break}default:e[i]+=ol(o)}while(o=br());return e},Xm=function(e,r){return bT(Zm(vT(e),r))},M4=new WeakMap,Km=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,i=e.parent,o=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!M4.get(i))&&!o){M4.set(e,!0);for(var n=[],s=Xm(r,n),a=i.props,c=0,M=0;c<s.length;c++)for(var d=0;d<a.length;d++,M++)e.props[M]=n[c]?s[c].replace(/&\f/g,a[d]):a[d]+" "+s[c]}}},qm=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function YT(t,e){switch(bm(t,e)){case 5103:return it+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return it+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return it+t+DM+t+nr+t+t;case 6828:case 4268:return it+t+nr+t+t;case 6165:return it+t+nr+"flex-"+t+t;case 5187:return it+t+ot(t,/(\w+).+(:[^]+)/,it+"box-$1$2"+nr+"flex-$1$2")+t;case 5443:return it+t+nr+"flex-item-"+ot(t,/flex-|-self/,"")+t;case 4675:return it+t+nr+"flex-line-pack"+ot(t,/align-content|flex-|-self/,"")+t;case 5548:return it+t+nr+ot(t,"shrink","negative")+t;case 5292:return it+t+nr+ot(t,"basis","preferred-size")+t;case 6060:return it+"box-"+ot(t,"-grow","")+it+t+nr+ot(t,"grow","positive")+t;case 4554:return it+ot(t,/([^-])(transform)/g,"$1"+it+"$2")+t;case 6187:return ot(ot(ot(t,/(zoom-|grab)/,it+"$1"),/(image-set)/,it+"$1"),t,"")+t;case 5495:case 3959:return ot(t,/(image-set\([^]*)/,it+"$1$`$1");case 4968:return ot(ot(t,/(.+:)(flex-)?(.*)/,it+"box-pack:$3"+nr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+it+t+t;case 4095:case 3583:case 4068:case 2532:return ot(t,/(.+)-inline(.+)/,it+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ji(t)-1-e>6)switch(er(t,e+1)){case 109:if(er(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+it+"$2-$3$1"+DM+(er(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Cd(t,"stretch")?YT(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(er(t,e+1)!==115)break;case 6444:switch(er(t,ji(t)-3-(~Cd(t,"!important")&&10))){case 107:return ot(t,":",":"+it)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+it+(er(t,14)===45?"inline-":"")+"box$3$1"+it+"$2$3$1"+nr+"$2box$3")+t}break;case 5936:switch(er(t,e+11)){case 114:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return it+t+nr+t+t}return t}var ew=function(e,r,i,o){if(e.length>-1&&!e.return)switch(e.type){case n0:e.return=YT(e.value,e.length);break;case OT:return Ms([Zs(e,{value:ot(e.value,"@","@"+it)})],o);case o0:if(e.length)return Ym(e.props,function(n){switch(km(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ms([Zs(e,{props:[ot(n,/:(read-\w+)/,":"+DM+"$1")]})],o);case"::placeholder":return Ms([Zs(e,{props:[ot(n,/:(plac\w+)/,":"+it+"input-$1")]}),Zs(e,{props:[ot(n,/:(plac\w+)/,":"+DM+"$1")]}),Zs(e,{props:[ot(n,/:(plac\w+)/,nr+"input-$1")]})],o)}return""})}},tw=[ew],rw=function(e){var r=e.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(L){var p=L.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(L),L.setAttribute("data-s",""))})}var o=e.stylisPlugins||tw,n={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(L){for(var p=L.getAttribute("data-emotion").split(" "),j=1;j<p.length;j++)n[p[j]]=!0;a.push(L)});var c,M=[Km,qm];{var d,u=[Jm,Gm(function(L){d.insert(L)})],N=Hm(M.concat(o,u)),g=function(p){return Ms(Wm(p),N)};c=function(p,j,w,T){d=w,g(p?p+"{"+j.styles+"}":j.styles),T&&(y.inserted[j.name]=!0)}}var y={key:r,sheet:new Em({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:c};return y.sheet.hydrate(a),y},UT={exports:{}},Mt={};/** @license React v16.13.1
|
|
1
|
+
import{R as TM,A as h,a as l}from"./ActionVisu__loadShare__react__loadShare__-DD24U9rt.js";import{j as A,R as Cc,A as Im}from"./ActionVisu__loadShare__react_mf_2_dom__loadShare__-DByPam44.js";import{g as xT,c as Ic}from"./_commonjsHelpers-Cpj98o6Y.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";function qi(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>r.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${r} for the full message.`}const tc="$$material";function hM(){return hM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},hM.apply(null,arguments)}function Am(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function xm(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Em=(function(){function t(r){var i=this;this._insertTag=function(o){var n;i.tags.length===0?i.insertionPoint?n=i.insertionPoint.nextSibling:i.prepend?n=i.container.firstChild:n=i.before:n=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(o,n),i.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(xm(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Am(o);try{n.insertRule(i,n.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var o;return(o=i.parentNode)==null?void 0:o.removeChild(i)}),this.tags=[],this.ctr=0},t})(),nr="-ms-",DM="-moz-",it="-webkit-",ET="comm",o0="rule",n0="decl",Om="@import",OT="@keyframes",Sm="@layer",_m=Math.abs,ol=String.fromCharCode,vm=Object.assign;function bm(t,e){return er(t,0)^45?(((e<<2^er(t,0))<<2^er(t,1))<<2^er(t,2))<<2^er(t,3):0}function ST(t){return t.trim()}function km(t,e){return(t=e.exec(t))?t[0]:t}function ot(t,e,r){return t.replace(e,r)}function Cd(t,e){return t.indexOf(e)}function er(t,e){return t.charCodeAt(e)|0}function ba(t,e,r){return t.slice(e,r)}function ji(t){return t.length}function s0(t){return t.length}function Ac(t,e){return e.push(t),t}function Ym(t,e){return t.map(e).join("")}var nl=1,ys=1,_T=0,Ir=0,Pt=0,Cs="";function sl(t,e,r,i,o,n,s){return{value:t,root:e,parent:r,type:i,props:o,children:n,line:nl,column:ys,length:s,return:""}}function Zs(t,e){return vm(sl("",null,null,"",null,null,0),t,{length:-t.length},e)}function Um(){return Pt}function Qm(){return Pt=Ir>0?er(Cs,--Ir):0,ys--,Pt===10&&(ys=1,nl--),Pt}function br(){return Pt=Ir<_T?er(Cs,Ir++):0,ys++,Pt===10&&(ys=1,nl++),Pt}function zi(){return er(Cs,Ir)}function sM(){return Ir}function rc(t,e){return ba(Cs,t,e)}function ka(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vT(t){return nl=ys=1,_T=ji(Cs=t),Ir=0,[]}function bT(t){return Cs="",t}function aM(t){return ST(rc(Ir-1,Id(t===91?t+2:t===40?t+1:t)))}function $m(t){for(;(Pt=zi())&&Pt<33;)br();return ka(t)>2||ka(Pt)>3?"":" "}function Pm(t,e){for(;--e&&br()&&!(Pt<48||Pt>102||Pt>57&&Pt<65||Pt>70&&Pt<97););return rc(t,sM()+(e<6&&zi()==32&&br()==32))}function Id(t){for(;br();)switch(Pt){case t:return Ir;case 34:case 39:t!==34&&t!==39&&Id(Pt);break;case 40:t===41&&Id(t);break;case 92:br();break}return Ir}function Rm(t,e){for(;br()&&t+Pt!==57;)if(t+Pt===84&&zi()===47)break;return"/*"+rc(e,Ir-1)+"*"+ol(t===47?t:br())}function Bm(t){for(;!ka(zi());)br();return rc(t,Ir)}function Wm(t){return bT(cM("",null,null,null,[""],t=vT(t),0,[0],t))}function cM(t,e,r,i,o,n,s,a,c){for(var M=0,d=0,u=s,N=0,g=0,y=0,L=1,p=1,j=1,w=0,T="",D=o,z=n,m=i,C=T;p;)switch(y=w,w=br()){case 40:if(y!=108&&er(C,u-1)==58){Cd(C+=ot(aM(w),"&","&\f"),"&\f")!=-1&&(j=-1);break}case 34:case 39:case 91:C+=aM(w);break;case 9:case 10:case 13:case 32:C+=$m(y);break;case 92:C+=Pm(sM()-1,7);continue;case 47:switch(zi()){case 42:case 47:Ac(Fm(Rm(br(),sM()),e,r),c);break;default:C+="/"}break;case 123*L:a[M++]=ji(C)*j;case 125*L:case 59:case 0:switch(w){case 0:case 125:p=0;case 59+d:j==-1&&(C=ot(C,/\f/g,"")),g>0&&ji(C)-u&&Ac(g>32?c4(C+";",i,r,u-1):c4(ot(C," ","")+";",i,r,u-2),c);break;case 59:C+=";";default:if(Ac(m=a4(C,e,r,M,d,o,a,T,D=[],z=[],u),n),w===123)if(d===0)cM(C,e,m,m,D,n,u,a,z);else switch(N===99&&er(C,3)===110?100:N){case 100:case 108:case 109:case 115:cM(t,m,m,i&&Ac(a4(t,m,m,0,0,o,a,T,o,D=[],u),z),o,z,u,a,i?D:z);break;default:cM(C,m,m,m,[""],z,0,a,z)}}M=d=g=0,L=j=1,T=C="",u=s;break;case 58:u=1+ji(C),g=y;default:if(L<1){if(w==123)--L;else if(w==125&&L++==0&&Qm()==125)continue}switch(C+=ol(w),w*L){case 38:j=d>0?1:(C+="\f",-1);break;case 44:a[M++]=(ji(C)-1)*j,j=1;break;case 64:zi()===45&&(C+=aM(br())),N=zi(),d=u=ji(T=C+=Bm(sM())),w++;break;case 45:y===45&&ji(C)==2&&(L=0)}}return n}function a4(t,e,r,i,o,n,s,a,c,M,d){for(var u=o-1,N=o===0?n:[""],g=s0(N),y=0,L=0,p=0;y<i;++y)for(var j=0,w=ba(t,u+1,u=_m(L=s[y])),T=t;j<g;++j)(T=ST(L>0?N[j]+" "+w:ot(w,/&\f/g,N[j])))&&(c[p++]=T);return sl(t,e,r,o===0?o0:a,c,M,d)}function Fm(t,e,r){return sl(t,e,r,ET,ol(Um()),ba(t,2,-2),0)}function c4(t,e,r,i){return sl(t,e,r,n0,ba(t,0,i),ba(t,i+1,-1),i)}function Ms(t,e){for(var r="",i=s0(t),o=0;o<i;o++)r+=e(t[o],o,t,e)||"";return r}function Jm(t,e,r,i){switch(t.type){case Sm:if(t.children.length)break;case Om:case n0:return t.return=t.return||t.value;case ET:return"";case OT:return t.return=t.value+"{"+Ms(t.children,i)+"}";case o0:t.value=t.props.join(",")}return ji(r=Ms(t.children,i))?t.return=t.value+"{"+r+"}":""}function Hm(t){var e=s0(t);return function(r,i,o,n){for(var s="",a=0;a<e;a++)s+=t[a](r,i,o,n)||"";return s}}function Gm(t){return function(e){e.root||(e=e.return)&&t(e)}}function kT(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Vm=function(e,r,i){for(var o=0,n=0;o=n,n=zi(),o===38&&n===12&&(r[i]=1),!ka(n);)br();return rc(e,Ir)},Zm=function(e,r){var i=-1,o=44;do switch(ka(o)){case 0:o===38&&zi()===12&&(r[i]=1),e[i]+=Vm(Ir-1,r,i);break;case 2:e[i]+=aM(o);break;case 4:if(o===44){e[++i]=zi()===58?"&\f":"",r[i]=e[i].length;break}default:e[i]+=ol(o)}while(o=br());return e},Xm=function(e,r){return bT(Zm(vT(e),r))},M4=new WeakMap,Km=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,i=e.parent,o=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!M4.get(i))&&!o){M4.set(e,!0);for(var n=[],s=Xm(r,n),a=i.props,c=0,M=0;c<s.length;c++)for(var d=0;d<a.length;d++,M++)e.props[M]=n[c]?s[c].replace(/&\f/g,a[d]):a[d]+" "+s[c]}}},qm=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function YT(t,e){switch(bm(t,e)){case 5103:return it+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return it+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return it+t+DM+t+nr+t+t;case 6828:case 4268:return it+t+nr+t+t;case 6165:return it+t+nr+"flex-"+t+t;case 5187:return it+t+ot(t,/(\w+).+(:[^]+)/,it+"box-$1$2"+nr+"flex-$1$2")+t;case 5443:return it+t+nr+"flex-item-"+ot(t,/flex-|-self/,"")+t;case 4675:return it+t+nr+"flex-line-pack"+ot(t,/align-content|flex-|-self/,"")+t;case 5548:return it+t+nr+ot(t,"shrink","negative")+t;case 5292:return it+t+nr+ot(t,"basis","preferred-size")+t;case 6060:return it+"box-"+ot(t,"-grow","")+it+t+nr+ot(t,"grow","positive")+t;case 4554:return it+ot(t,/([^-])(transform)/g,"$1"+it+"$2")+t;case 6187:return ot(ot(ot(t,/(zoom-|grab)/,it+"$1"),/(image-set)/,it+"$1"),t,"")+t;case 5495:case 3959:return ot(t,/(image-set\([^]*)/,it+"$1$`$1");case 4968:return ot(ot(t,/(.+:)(flex-)?(.*)/,it+"box-pack:$3"+nr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+it+t+t;case 4095:case 3583:case 4068:case 2532:return ot(t,/(.+)-inline(.+)/,it+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ji(t)-1-e>6)switch(er(t,e+1)){case 109:if(er(t,e+4)!==45)break;case 102:return ot(t,/(.+:)(.+)-([^]+)/,"$1"+it+"$2-$3$1"+DM+(er(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Cd(t,"stretch")?YT(ot(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(er(t,e+1)!==115)break;case 6444:switch(er(t,ji(t)-3-(~Cd(t,"!important")&&10))){case 107:return ot(t,":",":"+it)+t;case 101:return ot(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+it+(er(t,14)===45?"inline-":"")+"box$3$1"+it+"$2$3$1"+nr+"$2box$3")+t}break;case 5936:switch(er(t,e+11)){case 114:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return it+t+nr+ot(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return it+t+nr+t+t}return t}var ew=function(e,r,i,o){if(e.length>-1&&!e.return)switch(e.type){case n0:e.return=YT(e.value,e.length);break;case OT:return Ms([Zs(e,{value:ot(e.value,"@","@"+it)})],o);case o0:if(e.length)return Ym(e.props,function(n){switch(km(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ms([Zs(e,{props:[ot(n,/:(read-\w+)/,":"+DM+"$1")]})],o);case"::placeholder":return Ms([Zs(e,{props:[ot(n,/:(plac\w+)/,":"+it+"input-$1")]}),Zs(e,{props:[ot(n,/:(plac\w+)/,":"+DM+"$1")]}),Zs(e,{props:[ot(n,/:(plac\w+)/,nr+"input-$1")]})],o)}return""})}},tw=[ew],rw=function(e){var r=e.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(L){var p=L.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(L),L.setAttribute("data-s",""))})}var o=e.stylisPlugins||tw,n={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(L){for(var p=L.getAttribute("data-emotion").split(" "),j=1;j<p.length;j++)n[p[j]]=!0;a.push(L)});var c,M=[Km,qm];{var d,u=[Jm,Gm(function(L){d.insert(L)})],N=Hm(M.concat(o,u)),g=function(p){return Ms(Wm(p),N)};c=function(p,j,w,T){d=w,g(p?p+"{"+j.styles+"}":j.styles),T&&(y.inserted[j.name]=!0)}}var y={key:r,sheet:new Em({key:r,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:c};return y.sheet.hydrate(a),y},UT={exports:{}},Mt={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bootstrap-
|
|
2
|
-
import{_ as n}from"./preload-helper-BDBacUwf.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bootstrap-B41OwrCv.js","./ActionVisu__loadShare__react_mf_2_dom__loadShare__-DByPam44.js","./ActionVisu__loadShare__react__loadShare__-DD24U9rt.js","./_commonjsHelpers-Cpj98o6Y.js","./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n}from"./preload-helper-BDBacUwf.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();n(()=>import("./bootstrap-B41OwrCv.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Na}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as Pa}from"./ActionVisu__loadShare__react__loadShare__-
|
|
1
|
+
import{g as Na}from"./_commonjsHelpers-Cpj98o6Y.js";import{A as Pa}from"./ActionVisu__loadShare__react__loadShare__-DD24U9rt.js";function za(e,n){for(var t=0;t<n.length;t++){const r=n[t];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(r,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Co={exports:{}},ve={},xo={exports:{}},_o={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* scheduler.production.min.js
|
|
4
4
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActionVisu-
|
|
2
|
-
import{_ as o}from"./preload-helper-BDBacUwf.js";const a={"./ActionVisu":async()=>{const t=await o(()=>import("./ActionVisu-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActionVisu-CRxreF9A.js","./ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as o}from"./preload-helper-BDBacUwf.js";const a={"./ActionVisu":async()=>{const t=await o(()=>import("./ActionVisu-CRxreF9A.js"),__vite__mapDeps([0,1]),import.meta.url),e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-
|
|
2
|
-
import{i as m,A as p}from"./assets/ActionVisu__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-B9FmXZMM.js","./assets/ActionVisu__loadShare__react__loadShare__-DD24U9rt.js","./assets/_commonjsHelpers-Cpj98o6Y.js","./assets/ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js","./assets/ActionVisu__loadShare__react_mf_2_dom__loadShare__-DByPam44.js","./assets/index-Do-nCdWy.js","./assets/index-CxRjh2hi.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as m,A as p}from"./assets/ActionVisu__mf_v__runtimeInit__mf_v__-C2JRFvAF.js";import s from"./assets/virtualExposes-fQM_6VMq.js";import{_ as n}from"./assets/preload-helper-BDBacUwf.js";const i={"@iobroker/adapter-react-v5":async()=>await n(()=>import("./assets/index-B9FmXZMM.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),react:async()=>await n(()=>import("./assets/index-Do-nCdWy.js").then(t=>t.i),__vite__mapDeps([5,2]),import.meta.url),"react-dom":async()=>await n(()=>import("./assets/index-CxRjh2hi.js").then(t=>t.i),__vite__mapDeps([6,2,1,3]),import.meta.url)},a={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.7.5",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a.react.loaded=!0;const{react:e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["react-dom"].loaded=!0;const{"react-dom":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",d="ActionVisu";async function k(e={},t=[]){const r=m({name:d,remotes:f,shared:a,plugins:[],shareStrategy:"version-first"});var o=u[c];if(o||(o=u[c]={from:d}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(l){console.error(l)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init};
|
|
@@ -81,11 +81,13 @@ class Base {
|
|
|
81
81
|
set currentValue(value) {
|
|
82
82
|
this.#currentValue = value;
|
|
83
83
|
}
|
|
84
|
+
/** Converts an Alexa value to an ioBroker value */
|
|
84
85
|
value(alexaValue) {
|
|
85
86
|
return this._alexaSetter && typeof alexaValue === 'number'
|
|
86
87
|
? this._alexaSetter(alexaValue)
|
|
87
88
|
: alexaValue;
|
|
88
89
|
}
|
|
90
|
+
/** Converts an ioBroker value to an Alexa value */
|
|
89
91
|
alexaValue(value) {
|
|
90
92
|
return this._alexaGetter && typeof value === 'number'
|
|
91
93
|
? this._alexaGetter(value)
|