iobroker.javascript 9.0.11 → 9.0.13
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 +3 -5
- package/admin/assets/OpenAiDialog-BmcYPsVa.js +36 -0
- package/admin/assets/{Save--0ldNXLf.js → Save-DXaUpIPM.js} +1 -1
- package/admin/assets/{ScriptEditor-CpRWvDSw.js → ScriptEditor-BoSBgnK-.js} +1 -1
- package/admin/assets/{ScriptEditorVanillaMonaco-BWe9MiKn.js → ScriptEditorVanillaMonaco-Xge2wqgO.js} +1 -1
- package/admin/assets/{createSvgIcon-C_ElRFrf.js → createSvgIcon-DlIk-fDn.js} +3 -3
- package/admin/assets/hostInit-OBG53iVO.js +2 -0
- package/admin/assets/index-BCK6q-N6.css +1 -0
- package/admin/assets/{index-BLZa2V1g.js → index-BMwfsknM.js} +1 -1
- package/admin/assets/{index-Dr_ZFwru.css → index-BTsjunTt.css} +1 -1
- package/admin/assets/{index-CMttI-gM.js → index-BWM5lJbO.js} +4 -4
- package/admin/assets/index-Br_QjNUk.js +942 -0
- package/admin/assets/index-CePzv5-W.js +1294 -0
- package/admin/assets/index-Cjl4b70e.js +5 -0
- package/admin/assets/{index-BompUVvy.js → index-DZ3lKVw8.js} +1 -1
- package/admin/assets/{index-DmpUKunr.js → index-DwcZPzOL.js} +2 -2
- package/admin/assets/index-OIiv3PJA.js +16 -0
- package/admin/assets/{inheritsLoose-CLw44UEv.js → inheritsLoose-DNrhibGS.js} +1 -1
- package/admin/assets/{iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js → iobroker_javascript__loadShare__react__loadShare__-i8pXne9X.js} +1 -1
- package/admin/assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-DZdFIfoQ.js +5 -0
- package/admin/assets/preload-helper-BDBacUwf.js +1 -0
- package/admin/assets/useTheme-DakN8Abq.js +1 -0
- package/admin/custom/assets/{Components-za_0yG9W.js → Components-DjQ_LxKw.js} +1 -1
- package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-BHJt30My.js → ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DaN0pfsw.js} +1 -1
- package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-WrqdT1Hz.js → ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__-BqzgglHd.js} +1 -1
- package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react__loadShare__-B_YWmFeG.js → ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js} +1 -1
- package/admin/custom/assets/{ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-DYzjQQsF.js → ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__-N2_tx_mJ.js} +1 -1
- package/admin/custom/assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js +5 -0
- package/admin/custom/assets/DefaultPropsProvider-B8ZCC-c2.js +1 -0
- package/admin/custom/assets/DefaultPropsProvider-DfdXSIBu.js +1 -0
- package/admin/custom/assets/{FilledInput-BGGUNS4j.js → FilledInput-CSjr0QT8.js} +2 -2
- package/admin/custom/assets/{Tabs-DjdFNknI.js → Tabs-CiTQkBjL.js} +6 -6
- package/admin/custom/assets/{ThemeProvider-Uan4kCQd.js → ThemeProvider-C50pIiW4.js} +2 -2
- package/admin/custom/assets/_commonjsHelpers-CE1G-McA.js +1 -0
- package/admin/custom/assets/{createSvgIcon-BxCMHFh5.js → createSvgIcon-C7qUEvjp.js} +1 -1
- package/admin/custom/assets/createTheme-Bm92JF8u.js +8 -0
- package/admin/custom/assets/defaultTheme-BlO0eCf6.js +1 -0
- package/admin/custom/assets/{hostInit-CrAs5YZS.js → hostInit-BJ6gSofk.js} +2 -2
- package/admin/custom/assets/index-4wMOc304.js +1 -0
- package/admin/custom/assets/{index-UhQfKbTz.js → index-5CTGLw4h.js} +1 -1
- package/admin/custom/assets/index-BHN4DzE4.js +908 -0
- package/admin/custom/assets/{index-yiPj_-Rb.js → index-BkjEWGjf.js} +1 -1
- package/admin/custom/assets/{index-bxilEzdP.js → index-COcxCdeX.js} +2 -18
- package/admin/custom/assets/{index-DXg_kRe6.js → index-CnpybLRW.js} +1 -1
- package/admin/custom/assets/{index-ClFSKKDu.js → index-Db8nkuMR.js} +2 -2
- package/admin/custom/assets/{index-B2rBO0oC.js → index-DcK0RDrH.js} +1 -1
- package/admin/custom/assets/{index-7YkEnLQM.js → index-Df6OaCxx.js} +1 -1
- package/admin/custom/assets/{index-DOnIDI_a.js → index-Dx7rDE4p.js} +1 -1
- package/admin/custom/assets/index-t-NMdeH5.js +31 -0
- package/admin/custom/assets/index-u8R8UVCf.js +1393 -0
- package/admin/custom/assets/jsx-runtime-C1csJtRx.js +1 -0
- package/admin/custom/assets/leaflet-src-DpWQqQWv.js +1 -0
- package/admin/custom/assets/preload-helper-BDBacUwf.js +1 -0
- package/admin/custom/assets/useEnhancedEffect-aUb-5tTL.js +1 -0
- package/admin/custom/assets/{useTheme-DWmRkwMP.js → useTheme-Cgjfsi-1.js} +1 -1
- package/admin/custom/assets/useTheme-DFGylj2o.js +1 -0
- package/admin/custom/assets/virtualExposes-C_DtjFte.js +2 -0
- package/admin/custom/customComponents.js +2 -2
- package/admin/i18n/de.json +1 -1
- package/admin/mf-manifest.json +1 -1
- package/admin/remoteEntry.js +2 -2
- package/admin/tab.html +10 -13
- package/build/lib/crypto.js +32 -0
- package/build/lib/crypto.js.map +1 -0
- package/{build-backend → build}/lib/javascript.d.ts +3 -0
- package/{build-backend → build}/lib/utils.js.map +1 -1
- package/{build-backend → build}/main.js +20 -12
- package/build/main.js.map +1 -0
- package/{build-backend → build}/types.d.ts +1 -0
- package/docs/en/javascript.md +1 -1
- package/io-package.json +14 -14
- package/package.json +21 -20
- package/admin/assets/OpenAiDialog-BYXyaWDU.js +0 -36
- package/admin/assets/hostInit-fzxL8JAx.js +0 -2
- package/admin/assets/index-BUU5hWiL.js +0 -1294
- package/admin/assets/index-DUBaHZ92.css +0 -1
- package/admin/assets/index-DeFm7TiX.js +0 -5
- package/admin/assets/index-T5pCS60x.js +0 -16
- package/admin/assets/index-fhg5Z_KX.js +0 -930
- package/admin/assets/iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js +0 -5
- package/admin/assets/preload-helper-Dp1pzeXC.js +0 -1
- package/admin/assets/useTheme-CpAj0H76.js +0 -1
- package/admin/custom/assets/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-Cib3-eWa.js +0 -5
- package/admin/custom/assets/DefaultPropsProvider-B41fRCEO.js +0 -1
- package/admin/custom/assets/DefaultPropsProvider-CfXkmG16.js +0 -7
- package/admin/custom/assets/_commonjsHelpers-D6-XlEtG.js +0 -1
- package/admin/custom/assets/createTheme-Ajie0adn.js +0 -16
- package/admin/custom/assets/defaultTheme-C_aSR-NR.js +0 -1
- package/admin/custom/assets/index-BkKMt4bp.js +0 -31
- package/admin/custom/assets/index-Bw5ZKbIF.js +0 -1399
- package/admin/custom/assets/index-Co3YA5NW.js +0 -9
- package/admin/custom/assets/index-DsPFm5o5.js +0 -904
- package/admin/custom/assets/jsx-runtime-lE4rOet2.js +0 -9
- package/admin/custom/assets/leaflet-src-A2ZHl6nF.js +0 -4
- package/admin/custom/assets/preload-helper-Dp1pzeXC.js +0 -1
- package/admin/custom/assets/useEnhancedEffect-DSK35Rma.js +0 -8
- package/admin/custom/assets/useTheme-CpiJlUE9.js +0 -1
- package/admin/custom/assets/virtualExposes-4pgHXHfp.js +0 -2
- package/build-backend/main.js.map +0 -1
- /package/{build-backend → build}/lib/consts.js +0 -0
- /package/{build-backend → build}/lib/consts.js.map +0 -0
- /package/{build-backend → build}/lib/convert.js +0 -0
- /package/{build-backend → build}/lib/convert.js.map +0 -0
- /package/{build-backend → build}/lib/debug.js +0 -0
- /package/{build-backend → build}/lib/debug.js.map +0 -0
- /package/{build-backend → build}/lib/debugger.js +0 -0
- /package/{build-backend → build}/lib/debugger.js.map +0 -0
- /package/{build-backend → build}/lib/eventObj.js +0 -0
- /package/{build-backend → build}/lib/eventObj.js.map +0 -0
- /package/{build-backend → build}/lib/inspect.js +0 -0
- /package/{build-backend → build}/lib/inspect.js.map +0 -0
- /package/{build-backend → build}/lib/mirror.js +0 -0
- /package/{build-backend → build}/lib/mirror.js.map +0 -0
- /package/{build-backend → build}/lib/nodeModulesManagement.js +0 -0
- /package/{build-backend → build}/lib/nodeModulesManagement.js.map +0 -0
- /package/{build-backend → build}/lib/patternCompareFunctions.js +0 -0
- /package/{build-backend → build}/lib/patternCompareFunctions.js.map +0 -0
- /package/{build-backend → build}/lib/protectFs.js +0 -0
- /package/{build-backend → build}/lib/protectFs.js.map +0 -0
- /package/{build-backend → build}/lib/request.js +0 -0
- /package/{build-backend → build}/lib/request.js.map +0 -0
- /package/{build-backend → build}/lib/sandbox.js +0 -0
- /package/{build-backend → build}/lib/sandbox.js.map +0 -0
- /package/{build-backend → build}/lib/scheduler.js +0 -0
- /package/{build-backend → build}/lib/scheduler.js.map +0 -0
- /package/{build-backend → build}/lib/tools.js +0 -0
- /package/{build-backend → build}/lib/tools.js.map +0 -0
- /package/{build-backend → build}/lib/typescriptSettings.js +0 -0
- /package/{build-backend → build}/lib/typescriptSettings.js.map +0 -0
- /package/{build-backend → build}/lib/typescriptTools.js +0 -0
- /package/{build-backend → build}/lib/typescriptTools.js.map +0 -0
- /package/{build-backend → build}/lib/utils.js +0 -0
- /package/{build-backend → build}/lib/words.js +0 -0
- /package/{build-backend → build}/lib/words.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as s,a as i}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
import{C as s,a as i}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js";import{g as f}from"./_commonjsHelpers-CE1G-McA.js";function c(e,a){for(var _=0;_<a.length;_++){const t=a[_];if(typeof t!="string"&&!Array.isArray(t)){for(const r in t)if(r!=="default"&&!(r in e)){const o=Object.getOwnPropertyDescriptor(t,r);o&&Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const{loadShare:m}=i,{initPromise:d}=s,l=d.then(e=>m("@mui/x-date-pickers",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),u=await l.then(e=>e());var x=u;const{loadShare:p}=i,{initPromise:g}=s,h=g.then(e=>p("@iobroker/adapter-react-v5",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),S=await h.then(e=>e());var n=S;const v=f(n),y=c({__proto__:null,default:v},[n]);export{y as A,n as C,x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as _,a as e}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-
|
|
1
|
+
import{C as _,a as e}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js";const{loadShare:a}=e,{initPromise:o}=_,r=o.then(t=>a("@mui/material",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),i=await r.then(t=>t());var n=i;export{n as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./_commonjsHelpers-
|
|
1
|
+
import{g as i}from"./_commonjsHelpers-CE1G-McA.js";import{C as c,a as _}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js";function f(e,s){for(var o=0;o<s.length;o++){const t=s[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:"*"}}})),g=await m.then(e=>e());var n=g;const p=i(n),C=f({__proto__:null,default:p},[n]);export{n as C,p as R,C as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o}from"./_commonjsHelpers-
|
|
1
|
+
import{g as o}from"./_commonjsHelpers-CE1G-McA.js";import{C as e,a as r}from"./ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__-jdUmHa_i.js";const{loadShare:a}=r,{initPromise:s}=e,_=s.then(t=>a("react-dom",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),i=await _.then(t=>t());var n=i;const f=o(n);export{n as C,f as R};
|
|
@@ -0,0 +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 o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends$2.apply(this,arguments)}function _object_without_properties_loose(t,e){if(t==null)return{};var r={},o=Object.keys(t),n,i;for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(r[n]=t[n]);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 o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}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 o=t.split(r),n=getProcessEnv().NODE_ENV==="development"&&e,i="*",a=s=>s.startsWith("http")||s.includes(MANIFEST_EXT);if(o.length>=2){let[s,...l]=o;t.startsWith(r)&&(s=o.slice(0,2).join(r),l=[n||o.slice(2).join(r)]);let c=n||l.join(r);return a(c)?{name:s,entry:c}:{name:s,version:c||i}}else if(o.length===1){const[s]=o;return n&&a(n)?{name:s,entry:n}:{name:s,version:n||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 o=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])}${o}`}catch(o){throw o}},decodeName=function(t,e,r){try{let o=t;if(e){if(!o.startsWith(e))return o;o=o.replace(new RegExp(e,"g"),"")}return o=o.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&&(o=o.replace(".js","")),o}catch(o){throw o}},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 o=(n=>{if(n===".")return"";if(n.startsWith("./"))return n.replace("./","");if(n.startsWith("/")){const i=n.slice(1);return i.endsWith("/")?i.slice(0,-1):i}return n})(t);return o?o.endsWith("/")?`${o}${e}`:`${o}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var r,o;const{remotes:n={},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(n).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(n).forEach(E=>u[E]={matchedVersion:c.includes(E)?i[E]:n[E]});const{remoteEntry:{path:h,name:p,type:_},types:y,buildInfo:{buildVersion:m},globalName:g,ssrRemoteEntry:I}=t.metaData,{exposes:S}=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: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((o=t.metaData)!=null&&o.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,o=t.replace(r,"").replace(/\/$/,""),n=e.replace(r,"").replace(/\/$/,"");return o===n}function createScript(t){let e=null,r=!0,o=2e4,n;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&&(o=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(n);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),n=setTimeout(()=>{a(null,new Error(`Remote script "${t.url}" time-outed.`))},o),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const o=document.getElementsByTagName("link");for(let i=0;i<o.length;i++){const a=o[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 n=(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=n.bind(null,e.onerror),e.onload=n.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:o}=e;return new Promise((n,i)=>{const{script:a,needAttach:s}=createScript({url:t,cb:n,onErrorCallback:i,attrs:polyfills$1._({fetchpriority:"high"},r),createScriptHook:o,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(o=>o).catch(o=>{throw console.error(`Error importing module ${t}:`,o),sdkImportCache.delete(t),o});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 n=await((i,a)=>r.lifecycle.fetch.emit(i,a))(t,e||{});return!n||!(n instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):n},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,o)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,o)=>{createScriptNode(t,(n,i)=>{if(n)o(n);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:o}=e,i=await(await r(t)).text(),a=new o.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(o){if(o===!1)return!1;if(typeof o>"u")return t?e:!1;if(o===!0)return e;if(o&&typeof o=="object")return polyfills$1._({},e,o);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof o}`)}}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,o)=>{const n=[`${[e[t]]} #${t}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(getDocsUrl(t)),o&&n.push(`Original Error Message:
|
|
3
|
+
${o}`),n.join(`
|
|
4
|
+
`)};function _extends(){return _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}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,o=t.replace(r,"").replace(/\/$/,""),n=e.replace(r,"").replace(/\/$/,"");return o===n}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,o,n,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=(o=t.__FEDERATION__).moduleInfo)!=null||(o.moduleInfo={});var u;(u=(n=t.__FEDERATION__).__SHARE__)!=null||(n.__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 o=Object.keys(t);for(const n of o){const[i,a]=n.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),o=getInfoWithoutType(e,r).value;if(o&&!o.version&&"version"in t&&t.version&&(o.version=t.version),o)return o;if("version"in t&&t.version){const{version:n}=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)===n)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__`,o=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:o}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(o=>o.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,o)=>o(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,o){const n=`${t}.${e}.${r}`;return o?`${n}-${o}`:n}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,o,n,i,a,s,l,c,u,d,h)=>(isXVersion(o)?r="":isXVersion(n)?r=`>=${o}.0.0`:isXVersion(i)?r=`>=${o}.${n}.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,o,n,i,a)=>isXVersion(o)?"":isXVersion(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:isXVersion(i)?o==="0"?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.0 <${Number(o)+1}.0.0-0`:a?o==="0"?n==="0"?`>=${o}.${n}.${i}-${a} <${o}.${n}.${Number(i)+1}-0`:`>=${o}.${n}.${i}-${a} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${i}-${a} <${Number(o)+1}.0.0-0`:o==="0"?n==="0"?`>=${o}.${n}.${i} <${o}.${n}.${Number(i)+1}-0`:`>=${o}.${n}.${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${i} <${Number(o)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,o,n,i,a)=>isXVersion(o)?"":isXVersion(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:isXVersion(i)?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:a?`>=${o}.${n}.${i}-${a} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${i} <${o}.${Number(n)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,o,n,i,a,s)=>{const l=isXVersion(n),c=l||isXVersion(i),u=c||isXVersion(a);return o==="="&&u&&(o=""),s="",l?o===">"||o==="<"?"<0.0.0-0":"*":o&&u?(c&&(i=0),a=0,o===">"?(o=">=",c?(n=Number(n)+1,i=0,a=0):(i=Number(i)+1,a=0)):o==="<="&&(o="<",c?n=Number(n)+1:i=Number(i)+1),o==="<"&&(s="-0"),`${o+n}.${i}.${a}${s}`):c?`>=${n}.0.0${s} <${Number(n)+1}.0.0-0`:u?`>=${n}.${i}.0${s} <${n}.${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:o}=e;if(r===void 0&&o)return 1;if(r&&o===void 0)return-1;if(r===void 0&&o===void 0)return 0;for(let n=0,i=r.length;n<=i;n++){const a=r[n],s=o[n];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[,o,,n,i,a,s]=r,l={operator:o,version:combineVersion(n,i,a,s),major:n,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,,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,o){let n;"get"in t?n=t.get:"lib"in t?n=()=>Promise.resolve(t.lib):n=()=>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:n,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:o)||"version-first"})}function formatShareConfigs(t,e){const r=e.shared||{},o=e.name,n=Object.keys(r).reduce((a,s)=>{const l=arrayOptions(r[s]);return a[s]=a[s]||[],l.forEach(c=>{a[s].push(formatShare(c,o,s,e.shareStrategy))}),a},{}),i=polyfills._extends({},t.shared);return Object.keys(n).forEach(a=>{i[a]?n[a].forEach(s=>{i[a].find(c=>c.version===s.version)||i[a].push(s)}):i[a]=n[a]}),{shared:i,shareInfos:n}}function versionLt(t,e){const r=o=>{if(!Number.isNaN(Number(o))){const i=o.split(".");let a=o;for(let s=0;s<3-i.length;s++)a+=".0";return a}return o};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(o,n){return versionLt(o,n)};return Object.keys(t).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const o=t[e][r],n=function(i,a){return!isLoaded(o[i])&&versionLt(i,a)};return findVersion(t[e][r],n)}function findSingletonVersionOrderByLoaded(t,e,r){const o=t[e][r],n=function(i,a){const s=l=>isLoaded(l)||isLoading(l);return s(o[a])?s(o[i])?!!versionLt(i,a):!0:s(o[i])?!1:versionLt(i,a)};return findVersion(t[e][r],n)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,o){if(!t)return;const{shareConfig:n,scope:i=DEFAULT_SCOPE,strategy:a}=r,s=Array.isArray(i)?i:[i];for(const l of s)if(n&&t[l]&&t[l][e]){const{requiredVersion:c}=n,d=getFindShareFunction(a)(t,l,e),h=()=>{if(n.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})`;n.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(o.emit(p)||p).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:o}=t,n=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:n;return Object.assign({},a(o[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 o=e.startsWith(r.name);let n=e.replace(r.name,"");if(o){if(n.startsWith("/")){const s=r.name;return n=`.${n}`,{pkgNameOrAlias:s,expose:n,remote:r}}else if(n==="")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(),o=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(n=>{t!=null&&t.find(i=>i.name!==n.name)&&t.push(n)}),t&&t.length>0&&t.forEach(n=>{o.forEach(i=>{i.applyPlugin(n,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,o)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,o]):import(t).then(r).catch(o)}catch(n){o(n)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,o)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(o):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,o])}catch(n){o(n)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:o,entryExports:n}=getRemoteEntryExports(t,e);return assert(n,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:o})),n}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:o,getEntryUrl:n}){const{entryExports:i}=getRemoteEntryExports(t,e);if(i)return i;const a=n?n(r):r;return sdk.loadScript(a,{attrs:{},createScriptHook:(s,l)=>{const c=o.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:o}){const{entry:n,entryGlobalName:i,name:a,type:s}=t;switch(s){case"esm":case"module":return loadEsmEntry({entry:n,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:n,remoteEntryExports:e});default:return loadEntryScript({entry:n,globalName:i,name:a,loaderHook:r,getEntryUrl:o})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:o,name:n,type:i}=t,{entryExports:a}=getRemoteEntryExports(n,o);return a||sdk.loadScriptNode(r,{attrs:{name:n,globalName:o,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(n,o,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:o,getEntryUrl:n}=t,i=getRemoteEntryUniqueKey(o);if(r)return r;if(!globalLoading[i]){const a=e.remoteHandler.hooks.lifecycle.loadEntry,s=e.loaderHook;globalLoading[i]=a.emit({loaderHook:s,remoteInfo:o,remoteEntryExports:r}).then(l=>l||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:o,remoteEntryExports:r,loaderHook:s,getEntryUrl:n}):loadEntryNode({remoteInfo:o,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 o=matchRemote(t,r.nameOrAlias);return assert(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&sdk.safeToString({remoteInfo:o,remotes:t})}`),{remote:o,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,o=!0){const{cssAssets:n,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})}),o){const s={rel:"preload",as:"style"};n.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"};n.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(o){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 o=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:o});else throw r}return assert(e,`remoteEntryExports is undefined
|
|
5
|
+
${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,o,n){const{loadFactory:i=!0}=o||{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:n,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 o(n,i){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:i,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return o(n,r),n}:()=>{const n=e();return o(n,r),n}}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 o(...n){return r.remove(o),e.apply(null,n)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(o=>{r=o(...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 o=Array.from(this.listeners);if(o.length>0){let n=0;const i=a=>a===!1?!1:n<o.length?Promise.resolve(o[n++].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 o=r(e);if(checkReturnData(e,o))e=o;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(o){warn(o),this.onerror(o)}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 o=0;const n=a=>(warn(a),this.onerror(a),e),i=a=>{if(checkReturnData(e,a)){if(e=a,o<r.length)try{return Promise.resolve(r[o++](e)).then(i,n)}catch(s){return n(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 o=e.name;assert(o,"A name must be provided by the plugin."),this.registerPlugins[o]||(this.registerPlugins[o]=e,e.apply==null||e.apply.call(e,r),Object.keys(this.lifecycle).forEach(n=>{const i=e[n];i&&this.lifecycle[n].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(o=>{o!=="name"&&this.lifecycle[o].remove(r[o])})}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 o=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!o.startsWith("http")&&(o=`https:${o}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=o,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:i,id:a}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:s,globalSnapshot:l}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:a});assignRemoteInfo(i,s);const c={remote:e,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:c,remoteInfo:i,remote:e,remoteSnapshot:s,globalSnapshot:l});return u&&preloadAssets(i,n,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,o,n={},i){const a=getFMId(e),{value:s}=getInfoWithoutType(t,a),l=i||s;if(l&&!sdk.isManifestProvider(l)&&(r(l,e,o),l.remotesInfo)){const c=Object.keys(l.remotesInfo);for(const u of c){if(n[u])continue;n[u]=!0;const d=splitId(u),h=l.remotesInfo[u];traverseModuleInfo(t,{name:d.name,version:h.matchedVersion},r,!1,n,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,o,n){const i=[],a=[],s=[],l=new Set,c=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:h}=d;if(traverseModuleInfo(o,r,(m,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(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 b=normalizePreloadExposes(S.exposes);if(b.length&&"modules"in m){var T;E=m==null||(T=m.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(m,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:m,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,{},n),n.shared&&n.shared.length>0){const m=(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)}))};n.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=>{m(b,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:o,remote:n,globalSnapshot:i,remoteSnapshot:a}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(n)&&isPureRemoteEntry(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(o,a),generatePreloadAssets(e,r,o,i,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:o.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:o}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,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:n,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:n,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,o){const n=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 n(),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:o,shared:n}=formatShareConfigs(e,r);return Object.keys(o).forEach(a=>{o[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:o,shared:n}}async loadShare(e,r){const{host:o}=this,n=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:o.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:n.strategy}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:o.options.shared,origin:o}),{shareInfo:a}=i;assert(a,`Cannot find ${e} Share in the ${o.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,o.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:o.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:o.options.name,lib:null,loading:u}),u}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:o}=this,n=r==null?void 0:r.from,i=r==null?void 0:r.strategy;let a=r==null?void 0:r.initScope;const s=[];if(n!=="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=o.options.name;l[e]||(l[e]={});const u=l[e],d=(_,y)=>{var m;const{version:g,eager:I}=y;u[_]=u[_]||{};const S=u[_],R=S[g],E=!!(R&&(R.eager||(m=R.shareConfig)!=null&&m.eager));(!R||R.strategy!=="loaded-first"&&!R.loaded&&(!I!=!E?I:c>R.from))&&(S[g]=y)},h=_=>_&&_.init&&_.init(l[e],a),p=async _=>{const{module:y}=await o.remoteHandler.getRemoteModuleAndOptions({id:_});if(y.getEntry){let m;try{m=await y.getEntry()}catch(g){m=await o.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:g,from:"runtime",lifecycle:"beforeLoadShare",origin:o})}y.inited||(await h(m),y.inited=!0)}};return Object.keys(o.options.shared).forEach(_=>{o.options.shared[_].forEach(m=>{m.scope.includes(e)&&d(_,m)})}),(o.options.shareStrategy==="version-first"||i==="version-first")&&o.options.remotes.forEach(_=>{_.shareScope===e&&s.push(p(_.name))}),s}loadShareSync(e,r){const{host:o}=this,n=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:o.options.shared});n!=null&&n.scope&&n.scope.forEach(s=>{this.initializeSharing(s,{strategy:n.strategy})});const i=getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),a=s=>{s.useIn||(s.useIn=[]),addUniqueItem(s.useIn,o.options.name)};if(i){if(typeof i.lib=="function")return a(i),i.loaded||(i.loaded=!0,i.from===o.options.name&&(n.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:o.options.name,lib:s,shared:i}),s}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const s=n.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:o.options.name,sharedPkgName:e}))}return n.lib=s,this.setShared({pkgName:e,loaded:!0,from:o.options.name,lib:n.lib,shared:n}),n.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:o.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,o={}){const{host:n}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:n.options,origin:n,scopeName:e,hostShareScopeMap:o.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:o,lib:n,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:n,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),o&&p.from!==o&&(p.from=o)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),o=e.id||e.name;o&&!r[o]&&(r[o]=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((n,i)=>(this.registerRemote(i,n,{force:!1}),n),e.remotes)}setIdToRemoteMap(e,r){const{remote:o,expose:n}=r,{name:i,alias:a}=o;if(this.idToRemoteMap[e]={name:o.name,expose:n},a&&e.startsWith(i)){const s=e.replace(i,a);this.idToRemoteMap[s]={name:o.name,expose:n};return}if(a&&e.startsWith(a)){const s=e.replace(a,i);this.idToRemoteMap[s]={name:o.name,expose:n}}}async loadRemote(e,r){const{host:o}=this;try{const{loadFactory:n=!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:n?p:void 0,exposeModuleFactory:n?void 0:p,remote:c,options:a,moduleInstance:i,origin:o});return this.setIdToRemoteMap(e,s),typeof _=="function"?_:p}catch(n){const{from:i="runtime"}=r||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:i,lifecycle:"onLoad",origin:o});if(!a)throw n;return a}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const o=formatPreloadArgs(r.options.remotes,e);await Promise.all(o.map(async n=>{const{remote:i}=n,a=getRemoteInfo(i),{globalSnapshot:s,remoteSnapshot:l}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:i}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:n,remote:i,remoteInfo:a,globalSnapshot:s,remoteSnapshot:l});c&&preloadAssets(a,r,c)}))}registerRemotes(e,r){const{host:o}=this;e.forEach(n=>{this.registerRemote(n,o.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:o}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:o,options:r.options,origin:r})}catch(_){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:o,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!n)throw _}const{id:i}=n,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,o){const{host:n}=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:n});const a=r.find(s=>s.name===e.name);if(!a)i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];o!=null&&o.force&&(this.removeRemote(a),i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),sdk.warn(s.join(" ")))}}removeRemote(e){try{const{host:o}=this,{name:n}=e,i=o.options.remotes.findIndex(s=>s.name===n);i!==-1&&o.options.remotes.splice(i,1);const a=o.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],o.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(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:m.push([g,S,E,T])):m.push([g,S,E,T]))})})})}),y&&(p.shareScopeMap={},delete _[u]),m.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,o);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])}o.moduleCache.delete(e.name)}}catch(o){logger.log("removeRemote fail: ",o)}}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,o){const n=getRemoteInfo({name:e,entry:r}),i=new Module({host:this,remoteInfo:n});return i.remoteEntryExports=o,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,o={}){this.sharedHandler.initShareScopeMap(e,r,o)}formatOptions(e,r){const{shared:o}=formatShareConfigs(e,r),{userOptions:n,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:o}),a=this.remoteHandler.formatAndRegisterRemote(i,n),{shared:s}=this.sharedHandler.registerShared(i,n),l=[...i.plugins];n.plugins&&n.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((o,n)=>(n&&o&&!o.find(i=>i.name===n.name)&&o.push(n),o),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()]:[],o={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=o,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...o.plugins,...e.plugins||[]]),this.options=this.formatOptions(o,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(o=>!!(r&&o.options.id===r||o.options.name===t&&!o.options.version&&!e||o.options.name===t&&e&&o.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,loadRemote_1=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;var registerRemotes_1=index_cjs$3.registerRemotes=registerRemotes;index_cjs$3.registerShared=registerShared;let initResolve,initReject;const initPromise=new Promise((t,e)=>{initResolve=t,initReject=e});var ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__={initPromise,initResolve,initReject};export{ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__ as C,index_cjs$3 as a,init_1 as i,loadRemote_1 as l,registerRemotes_1 as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as K}from"./defaultTheme-BlO0eCf6.js";import{f as Z,s as $,Z as J,T as Q}from"./createTheme-Bm92JF8u.js";import{i as w,a as X,s as Y,u as z}from"./DefaultPropsProvider-DfdXSIBu.js";import"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js";import"./jsx-runtime-C1csJtRx.js";function E(e){var r,n,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(n=E(e[r]))&&(t&&(t+=" "),t+=n)}else for(n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function we(){for(var e,r,n=0,t="",s=arguments.length;n<s;n++)(e=arguments[n])&&(r=E(e))&&(t&&(t+=" "),t+=r);return t}const M=e=>e,N=()=>{let e=M;return{configure(r){e=r},generate(r){return e(r)},reset(){e=M}}},ee=N(),te={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ne(e,r,n="Mui"){const t=te[r];return t?`${n}-${t}`:`${ee.generate(e)}-${r}`}function ge(e,r,n="Mui"){const t={};return r.forEach(s=>{t[s]=ne(e,s,n)}),t}function D(e){const{variants:r,...n}=e,t={variants:r,style:w(n),isProcessed:!0};return t.style===n||r&&r.forEach(s=>{typeof s.style!="function"&&(s.style=w(s.style))}),t}const re=Z();function O(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function p(e,r){return r&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${r}{${String(e.styles)}}`),e}function se(e){return e?(r,n)=>n[e]:null}function oe(e,r,n){e.theme=ue(e.theme)?n:e.theme[r]||e.theme}function P(e,r,n){const t=typeof r=="function"?r(e):r;if(Array.isArray(t))return t.flatMap(s=>P(e,s,n));if(Array.isArray(t==null?void 0:t.variants)){let s;if(t.isProcessed)s=n?p(t.style,n):t.style;else{const{variants:i,...l}=t;s=n?p(w(l),n):l}return G(e,t.variants,[s],n)}return t!=null&&t.isProcessed?n?p(w(t.style),n):t.style:n?p(w(t),n):t}function G(e,r,n=[],t=void 0){var i;let s;e:for(let l=0;l<r.length;l+=1){const o=r[l];if(typeof o.props=="function"){if(s??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(s))continue}else for(const d in o.props)if(e[d]!==o.props[d]&&((i=e.ownerState)==null?void 0:i[d])!==o.props[d])continue e;typeof o.style=="function"?(s??={...e,...e.ownerState,ownerState:e.ownerState},n.push(t?p(w(o.style(s)),t):o.style(s))):n.push(t?p(w(o.style),t):o.style)}return n}function ie(e={}){const{themeId:r,defaultTheme:n=re,rootShouldForwardProp:t=O,slotShouldForwardProp:s=O}=e;function i(o){oe(o,r,n)}return(o,d={})=>{X(o,a=>a.filter(u=>u!==$));const{name:c,slot:y,skipVariantsResolver:F,skipSx:H,overridesResolver:k=se(ce(y)),...I}=d,x=c&&c.startsWith("Mui")||y?"components":"custom",q=F!==void 0?F:y&&y!=="Root"&&y!=="root"||!1,U=H||!1;let C=O;y==="Root"||y==="root"?C=t:y?C=s:le(o)&&(C=void 0);const A=Y(o,{shouldForwardProp:C,label:ae(),...I}),W=a=>{if(a.__emotion_real===a)return a;if(typeof a=="function")return function(S){return P(S,a,S.theme.modularCssLayers?x:void 0)};if(J(a)){const u=D(a);return function(h){return u.variants?P(h,u,h.theme.modularCssLayers?x:void 0):h.theme.modularCssLayers?p(u.style,x):u.style}}return a},L=(...a)=>{const u=[],S=a.map(W),h=[];if(u.push(i),c&&k&&h.push(function(f){var b,V;const m=(V=(b=f.theme.components)==null?void 0:b[c])==null?void 0:V.styleOverrides;if(!m)return null;const g={};for(const _ in m)g[_]=P(f,m[_],f.theme.modularCssLayers?"theme":void 0);return k(f,g)}),c&&!q&&h.push(function(f){var g,b;const v=f.theme,m=(b=(g=v==null?void 0:v.components)==null?void 0:g[c])==null?void 0:b.variants;return m?G(f,m,[],f.theme.modularCssLayers?"theme":void 0):null}),U||h.push($),Array.isArray(S[0])){const T=S.shift(),f=new Array(u.length).fill(""),v=new Array(h.length).fill("");let m;m=[...f,...T,...v],m.raw=[...f,...T.raw,...v],u.unshift(m)}const B=[...u,...S,...h],R=A(...B);return o.muiName&&(R.muiName=o.muiName),R};return A.withConfig&&(L.withConfig=A.withConfig),L}}function ae(e,r){return void 0}function ue(e){for(const r in e)return!1;return!0}function le(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ce(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function be(e,r,n=void 0){const t={};for(const s in e){const i=e[s];let l="",o=!0;for(let d=0;d<i.length;d+=1){const c=i[d];c&&(l+=(o===!0?"":" ")+r(c),o=!1,n&&n[c]&&(l+=" "+n[c]))}t[s]=l}return t}const j={theme:void 0};function fe(e){let r,n;return function(s){let i=r;return(i===void 0||s.theme!==n)&&(j.theme=s.theme,i=D(e(j)),r=i,n=s.theme),i}}function de(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const me=e=>de(e)&&e!=="classes",Ce=ie({themeId:Q,defaultTheme:K,rootShouldForwardProp:me}),Te=fe;function Pe(e){return z(e)}export{ee as C,ie as a,be as b,we as c,ge as d,de as e,ne as g,Te as m,me as r,Ce as s,Pe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a6 as D,a0 as N,X as j,a7 as H,$ as E,a8 as U,a9 as q,a2 as X}from"./createTheme-Bm92JF8u.js";import{C as u}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js";import{j as B}from"./jsx-runtime-C1csJtRx.js";function S(){return S=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)({}).hasOwnProperty.call(a,n)&&(r[n]=a[n])}return r},S.apply(null,arguments)}var V=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,W=D(function(r){return V.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),Y=W,G=function(e){return e!=="theme"},R=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?Y:G},F=function(e,a,n){var t;if(a){var o=a.shouldForwardProp;t=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof t!="function"&&n&&(t=e.__emotion_forwardProp),t},K=function(e){var a=e.cache,n=e.serialized,t=e.isStringTag;return U(a,n,t),q(function(){return X(a,n,t)}),null},$=function r(e,a){var n=e.__emotion_real===e,t=n&&e.__emotion_base||e,o,s;a!==void 0&&(o=a.label,s=a.target);var p=F(e,a,n),m=p||R(t),P=!m("as");return function(){var f=arguments,c=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&c.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)c.push.apply(c,f);else{var C=f[0];c.push(C[0]);for(var L=f.length,g=1;g<L;g++)c.push(f[g],C[g])}var l=N(function(i,d,y){var x=P&&i.as||t,h="",T=[],v=i;if(i.theme==null){v={};for(var O in i)v[O]=i[O];v.theme=u.useContext(j)}typeof i.className=="string"?h=H(d.registered,T,i.className):i.className!=null&&(h=i.className+" ");var A=E(c.concat(T),d.registered,v);h+=d.key+"-"+A.name,s!==void 0&&(h+=" "+s);var M=P&&p===void 0?R(x):m,b={};for(var k in i)P&&k==="as"||M(k)&&(b[k]=i[k]);return b.className=h,y&&(b.ref=y),u.createElement(u.Fragment,null,u.createElement(K,{cache:d,serialized:A,isStringTag:typeof x=="string"}),u.createElement(x,b))});return l.displayName=o!==void 0?o:"Styled("+(typeof t=="string"?t:t.displayName||t.name||"Component")+")",l.defaultProps=e.defaultProps,l.__emotion_real=l,l.__emotion_base=t,l.__emotion_styles=c,l.__emotion_forwardProp=p,Object.defineProperty(l,"toString",{value:function(){return"."+s}}),l.withComponent=function(i,d){var y=r(i,S({},a,d,{shouldForwardProp:F(l,d,!0)}));return y.apply(void 0,c)},l}},J=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_=$.bind(null);J.forEach(function(r){_[r]=_(r)});function re(r,e){return _(r,e)}function ae(r,e){Array.isArray(r.__emotion_styles)&&(r.__emotion_styles=e(r.__emotion_styles))}const z=[];function ne(r){return z[0]=r,E(z)}function w(r,e){const a={...e};for(const n in r)if(Object.prototype.hasOwnProperty.call(r,n)){const t=n;if(t==="components"||t==="slots")a[t]={...r[t],...a[t]};else if(t==="componentsProps"||t==="slotProps"){const o=r[t],s=e[t];if(!s)a[t]=o||{};else if(!o)a[t]=s;else{a[t]={...s};for(const p in o)if(Object.prototype.hasOwnProperty.call(o,p)){const m=p;a[t][m]=w(o[m],s[m])}}}else a[t]===void 0&&(a[t]=r[t])}return a}const I=u.createContext(void 0);function oe({value:r,children:e}){return B.jsx(I.Provider,{value:r,children:e})}function Z(r){const{theme:e,name:a,props:n}=r;if(!e||!e.components||!e.components[a])return n;const t=e.components[a];return t.defaultProps?w(t.defaultProps,n):!t.styleOverrides&&!t.variants?w(t,n):n}function ie({props:r,name:e}){const a=u.useContext(I);return Z({props:r,name:e,theme:{components:a}})}export{oe as D,S as _,ae as a,ne as i,w as r,re as s,ie as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-
|
|
2
|
-
`&&(l.value+=" ");const V=m.boxSizing,W=_(m.paddingBottom)+_(m.paddingTop),q=_(m.borderBottomWidth)+_(m.borderTopWidth),F=l.scrollHeight;l.value="x";const A=l.scrollHeight;let y=F;r&&(y=Math.max(Number(r)*A,y)),a&&(y=Math.min(Number(a)*A,y)),y=Math.max(y,A);const H=y+(V==="border-box"?W+q:0),X=Math.abs(y-F)<=1;return{outerHeightStyle:H,overflowing:X}},[a,r,t.placeholder]),k=Ye(()=>{const s=f.current,l=h();if(!s||!l||be(l))return!1;const C=l.outerHeightStyle;return b.current!=null&&b.current!==C}),w=d.useCallback(()=>{const s=f.current,l=h();if(!s||!l||be(l))return;const C=l.outerHeightStyle;b.current!==C&&(b.current=C,s.style.height=`${C}px`),s.style.overflow=l.overflowing?"hidden":""},[h]),B=d.useRef(-1);U(()=>{const s=Je(w),l=f==null?void 0:f.current;if(!l)return;const C=me(l);C.addEventListener("resize",s);let m;return typeof ResizeObserver<"u"&&(m=new ResizeObserver(()=>{k()&&(m.unobserve(l),cancelAnimationFrame(B.current),w(),B.current=requestAnimationFrame(()=>{m.observe(l)}))}),m.observe(l)),()=>{s.clear(),cancelAnimationFrame(B.current),C.removeEventListener("resize",s),m&&m.disconnect()}},[h,w,k]),U(()=>{w()});const E=s=>{g||w(),o&&o(s)};return x.jsxs(d.Fragment,{children:[x.jsx("textarea",{value:u,onChange:E,ref:R,rows:r,style:i,...T}),x.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:S,tabIndex:-1,style:{...it.shadow,...i,paddingTop:0,paddingBottom:0}})]})});function ge(e){return typeof e=="string"}function lt({props:e,states:t,muiFormControl:n}){return t.reduce((o,a)=>(o[a]=e[a],n&&typeof e[a]>"u"&&(o[a]=n[a]),o),{})}const Ie=d.createContext(void 0);function dt(){return d.useContext(Ie)}function he(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ut(e,t=!1){return e&&(he(e.value)&&e.value!==""||t&&he(e.defaultValue)&&e.defaultValue!=="")}function Bt(e){return e.startAdornment}function ct(e){return Se("MuiInputBase",e)}const j=xe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ye;const ke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${N(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Be=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},pt=e=>{const{classes:t,color:n,disabled:o,error:a,endAdornment:r,focused:i,formControl:u,fullWidth:T,hiddenLabel:g,multiline:f,readOnly:R,size:b,startAdornment:S,type:h}=e,k={root:["root",`color${N(n)}`,o&&"disabled",a&&"error",T&&"fullWidth",i&&"focused",u&&"formControl",b&&b!=="medium"&&`size${N(b)}`,f&&"multiline",S&&"adornedStart",r&&"adornedEnd",g&&"hiddenLabel",R&&"readOnly"],input:["input",o&&"disabled",h==="search"&&"inputTypeSearch",f&&"inputMultiline",b==="small"&&"inputSizeSmall",g&&"inputHiddenLabel",S&&"inputAdornedStart",r&&"inputAdornedEnd",R&&"readOnly"]};return Re(k,ct,t)},Fe=D("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ke})(G(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${j.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Te=D("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Be})(G(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${j.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${j.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:r})=>!r.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:r})=>r.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),ve=tt({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ft=d.forwardRef(function(t,n){const o=Ce({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:r,autoFocus:i,className:u,color:T,components:g={},componentsProps:f={},defaultValue:R,disabled:b,disableInjectingGlobalStyles:S,endAdornment:h,error:k,fullWidth:w=!1,id:B,inputComponent:E="input",inputProps:s={},inputRef:l,margin:C,maxRows:m,minRows:V,multiline:W=!1,name:q,onBlur:F,onChange:A,onClick:y,onFocus:H,onKeyDown:X,onKeyUp:ze,placeholder:Ae,readOnly:K,renderSuffix:re,rows:$,size:vt,slotProps:ie={},slots:ae={},startAdornment:L,type:se="text",value:Pe,...Ee}=o,O=s.value!=null?s.value:Pe,{current:Z}=d.useRef(O!=null),P=d.useRef(),Le=d.useCallback(c=>{},[]),Me=we(P,l,s.ref,Le),[J,Q]=d.useState(!1),p=dt(),v=lt({props:o,muiFormControl:p,states:["color","disabled","error","hiddenLabel","size","required","filled"]});v.focused=p?p.focused:J,d.useEffect(()=>{!p&&b&&J&&(Q(!1),F&&F())},[p,b,J,F]);const Y=p&&p.onFilled,ee=p&&p.onEmpty,M=d.useCallback(c=>{ut(c)?Y&&Y():ee&&ee()},[Y,ee]);U(()=>{Z&&M({value:O})},[O,M,Z]);const We=c=>{H&&H(c),s.onFocus&&s.onFocus(c),p&&p.onFocus?p.onFocus(c):Q(!0)},He=c=>{F&&F(c),s.onBlur&&s.onBlur(c),p&&p.onBlur?p.onBlur(c):Q(!1)},$e=(c,...ce)=>{if(!Z){const pe=c.target||P.current;if(pe==null)throw new Error(Ve(1));M({value:pe.value})}s.onChange&&s.onChange(c,...ce),A&&A(c,...ce)};d.useEffect(()=>{M(P.current)},[]);const Oe=c=>{P.current&&c.currentTarget===c.target&&P.current.focus(),y&&y(c)};let te=E,I=s;W&&te==="input"&&($?I={type:void 0,minRows:$,maxRows:$,...I}:I={type:void 0,maxRows:m,minRows:V,...I},te=st);const _e=c=>{M(c.animationName==="mui-auto-fill-cancel"?P.current:{value:"x"})};d.useEffect(()=>{p&&p.setAdornedStart(!!L)},[p,L]);const ne={...o,color:v.color||"primary",disabled:v.disabled,endAdornment:h,error:v.error,focused:v.focused,formControl:p,fullWidth:w,hiddenLabel:v.hiddenLabel,multiline:W,size:v.size,startAdornment:L,type:se},le=pt(ne),de=ae.root||g.Root||Fe,oe=ie.root||f.root||{},ue=ae.input||g.Input||Te;return I={...I,...ie.input??f.input},x.jsxs(d.Fragment,{children:[!S&&typeof ve=="function"&&(ye||(ye=x.jsx(ve,{}))),x.jsxs(de,{...oe,ref:n,onClick:Oe,...Ee,...!ge(de)&&{ownerState:{...ne,...oe.ownerState}},className:fe(le.root,oe.className,u,K&&"MuiInputBase-readOnly"),children:[L,x.jsx(Ie.Provider,{value:null,children:x.jsx(ue,{"aria-invalid":v.error,"aria-describedby":a,autoComplete:r,autoFocus:i,defaultValue:R,disabled:v.disabled,id:B,onAnimationStart:_e,name:q,placeholder:Ae,readOnly:K,required:v.required,rows:$,value:O,onKeyDown:X,onKeyUp:ze,type:se,...I,...!ge(ue)&&{as:te,ownerState:{...ne,...I.ownerState}},ref:Me,className:fe(le.input,I.className,K&&"MuiInputBase-readOnly"),onBlur:He,onChange:$e,onFocus:We})}),h,re?re({...v,startAdornment:L}):null]})]})});function mt(e){return Se("MuiFilledInput",e)}const z={...j,...xe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},bt=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:a,size:r,hiddenLabel:i,multiline:u}=e,T={root:["root",!n&&"underline",o&&"adornedStart",a&&"adornedEnd",r==="small"&&`size${N(r)}`,i&&"hiddenLabel",u&&"multiline"],input:["input"]},g=Re(T,mt,t);return{...t,...g}},gt=D(Fe,{shouldForwardProp:e=>Ne(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ke(e,t),!n.disableUnderline&&t.underline]}})(G(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",r=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${z.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${z.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:r},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${z.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${z.disabled}, .${z.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(rt()).map(([i])=>{var u;return{props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(u=(e.vars||e).palette[i])==null?void 0:u.main}`}}}}),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:u})=>i.multiline&&u==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),ht=D(Te,{name:"MuiFilledInput",slot:"Input",overridesResolver:Be})(G(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),yt=d.forwardRef(function(t,n){const o=Ce({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:r={},componentsProps:i,fullWidth:u=!1,hiddenLabel:T,inputComponent:g="input",multiline:f=!1,slotProps:R,slots:b={},type:S="text",...h}=o,k={...o,disableUnderline:a,fullWidth:u,inputComponent:g,multiline:f,type:S},w=bt(o),B={root:{ownerState:k},input:{ownerState:k}},E=R??i?qe(B,R??i):B,s=b.root??r.Root??gt,l=b.input??r.Input??ht;return x.jsx(ft,{slots:{root:s,input:l},slotProps:E,fullWidth:u,inputComponent:g,multiline:f,ref:n,type:S,...h,classes:w})});yt.muiName="Input";export{yt as F,et as G,ft as I,st as T,we as a,dt as b,rt as c,Je as d,Ze as e,z as f,tt as g,me as h,j as i,lt as j,ge as k,mt as l,ct as m,kt as n,Qe as o,Fe as p,Te as q,ke as r,Be as s,Bt as t,Ye as u,ut as v,Ie as w};
|
|
1
|
+
import{C as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__-BNbscXK6.js";import{d as xe,g as Se,u as Ce,s as D,c as fe,b as Re,m as G,r as je}from"./DefaultPropsProvider-B8ZCC-c2.js";import{j as x}from"./jsx-runtime-C1csJtRx.js";import{d as Ne}from"./defaultTheme-BlO0eCf6.js";import{Z as Ue,_ as De,T as Ge,e as j,p as Ve,j as qe}from"./createTheme-Bm92JF8u.js";import{u as N,G as Xe}from"./useEnhancedEffect-aUb-5tTL.js";const Ke=e=>{var o;const t={systemProps:{},otherProps:{}},n=((o=e==null?void 0:e.theme)==null?void 0:o.unstable_sxConfig)??De;return Object.keys(e).forEach(a=>{n[a]?t.systemProps[a]=e[a]:t.otherProps[a]=e[a]}),t};function Ze(e){const{sx:t,...n}=e,{systemProps:o,otherProps:a}=Ke(n);let r;return Array.isArray(t)?r=[o,...t]:typeof t=="function"?r=(...i)=>{const u=t(...i);return Ue(u)?{...o,...u}:o}:r={...o,...t},{...a,sx:r}}function Je(e,t=166){let n;function o(...a){const r=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(r,t)}return o.clear=()=>{clearTimeout(n)},o}function Qe(e){return e&&e.ownerDocument||document}function me(e){return Qe(e).defaultView||window}function Ye(e){const t=d.useRef(e);return N(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function we(...e){const t=d.useRef(void 0),n=d.useCallback(o=>{const a=e.map(r=>{if(r==null)return null;if(typeof r=="function"){const i=r,u=i(o);return typeof u=="function"?u:()=>{i(null)}}return r.current=o,()=>{r.current=null}});return()=>{a.forEach(r=>r==null?void 0:r())}},e);return d.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}function et(e){return x.jsx(Xe,{...e,defaultTheme:Ne,themeId:Ge})}function tt(e){return function(n){return x.jsx(et,{styles:typeof e=="function"?o=>e({theme:o,...n}):e})}}function kt(){return Ze}function nt(e){return typeof e.main=="string"}function ot(e,t=[]){if(!nt(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function rt(e=[]){return([,t])=>t&&ot(t,e)}function _(e){return parseInt(e,10)||0}const it={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function at(e){for(const t in e)return!1;return!0}function be(e){return at(e)||e.outerHeightStyle===0&&!e.overflowing}const st=d.forwardRef(function(t,n){const{onChange:o,maxRows:a,minRows:r=1,style:i,value:u,...T}=t,{current:g}=d.useRef(u!=null),f=d.useRef(null),R=we(n,f),b=d.useRef(null),S=d.useRef(null),h=d.useCallback(()=>{const s=f.current,l=S.current;if(!s||!l)return;const m=me(s).getComputedStyle(s);if(m.width==="0px")return{outerHeightStyle:0,overflowing:!1};l.style.width=m.width,l.value=s.value||t.placeholder||"x",l.value.slice(-1)===`
|
|
2
|
+
`&&(l.value+=" ");const V=m.boxSizing,W=_(m.paddingBottom)+_(m.paddingTop),q=_(m.borderBottomWidth)+_(m.borderTopWidth),F=l.scrollHeight;l.value="x";const A=l.scrollHeight;let y=F;r&&(y=Math.max(Number(r)*A,y)),a&&(y=Math.min(Number(a)*A,y)),y=Math.max(y,A);const H=y+(V==="border-box"?W+q:0),X=Math.abs(y-F)<=1;return{outerHeightStyle:H,overflowing:X}},[a,r,t.placeholder]),k=Ye(()=>{const s=f.current,l=h();if(!s||!l||be(l))return!1;const C=l.outerHeightStyle;return b.current!=null&&b.current!==C}),w=d.useCallback(()=>{const s=f.current,l=h();if(!s||!l||be(l))return;const C=l.outerHeightStyle;b.current!==C&&(b.current=C,s.style.height=`${C}px`),s.style.overflow=l.overflowing?"hidden":""},[h]),B=d.useRef(-1);N(()=>{const s=Je(w),l=f==null?void 0:f.current;if(!l)return;const C=me(l);C.addEventListener("resize",s);let m;return typeof ResizeObserver<"u"&&(m=new ResizeObserver(()=>{k()&&(m.unobserve(l),cancelAnimationFrame(B.current),w(),B.current=requestAnimationFrame(()=>{m.observe(l)}))}),m.observe(l)),()=>{s.clear(),cancelAnimationFrame(B.current),C.removeEventListener("resize",s),m&&m.disconnect()}},[h,w,k]),N(()=>{w()});const E=s=>{g||w(),o&&o(s)};return x.jsxs(d.Fragment,{children:[x.jsx("textarea",{value:u,onChange:E,ref:R,rows:r,style:i,...T}),x.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:S,tabIndex:-1,style:{...it.shadow,...i,paddingTop:0,paddingBottom:0}})]})});function ge(e){return typeof e=="string"}function lt({props:e,states:t,muiFormControl:n}){return t.reduce((o,a)=>(o[a]=e[a],n&&typeof e[a]>"u"&&(o[a]=n[a]),o),{})}const Ie=d.createContext(void 0);function dt(){return d.useContext(Ie)}function he(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function ut(e,t=!1){return e&&(he(e.value)&&e.value!==""||t&&he(e.defaultValue)&&e.defaultValue!=="")}function Bt(e){return e.startAdornment}function ct(e){return Se("MuiInputBase",e)}const U=xe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ye;const ke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${j(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Be=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},pt=e=>{const{classes:t,color:n,disabled:o,error:a,endAdornment:r,focused:i,formControl:u,fullWidth:T,hiddenLabel:g,multiline:f,readOnly:R,size:b,startAdornment:S,type:h}=e,k={root:["root",`color${j(n)}`,o&&"disabled",a&&"error",T&&"fullWidth",i&&"focused",u&&"formControl",b&&b!=="medium"&&`size${j(b)}`,f&&"multiline",S&&"adornedStart",r&&"adornedEnd",g&&"hiddenLabel",R&&"readOnly"],input:["input",o&&"disabled",h==="search"&&"inputTypeSearch",f&&"inputMultiline",b==="small"&&"inputSizeSmall",g&&"inputHiddenLabel",S&&"inputAdornedStart",r&&"inputAdornedEnd",R&&"readOnly"]};return Re(k,ct,t)},Fe=D("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ke})(G(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${U.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Te=D("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Be})(G(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${U.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${U.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:r})=>!r.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:r})=>r.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),ve=tt({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ft=d.forwardRef(function(t,n){const o=Ce({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:r,autoFocus:i,className:u,color:T,components:g={},componentsProps:f={},defaultValue:R,disabled:b,disableInjectingGlobalStyles:S,endAdornment:h,error:k,fullWidth:w=!1,id:B,inputComponent:E="input",inputProps:s={},inputRef:l,margin:C,maxRows:m,minRows:V,multiline:W=!1,name:q,onBlur:F,onChange:A,onClick:y,onFocus:H,onKeyDown:X,onKeyUp:ze,placeholder:Ae,readOnly:K,renderSuffix:re,rows:$,size:vt,slotProps:ie={},slots:ae={},startAdornment:L,type:se="text",value:Pe,...Ee}=o,O=s.value!=null?s.value:Pe,{current:Z}=d.useRef(O!=null),P=d.useRef(),Le=d.useCallback(c=>{},[]),Me=we(P,l,s.ref,Le),[J,Q]=d.useState(!1),p=dt(),v=lt({props:o,muiFormControl:p,states:["color","disabled","error","hiddenLabel","size","required","filled"]});v.focused=p?p.focused:J,d.useEffect(()=>{!p&&b&&J&&(Q(!1),F&&F())},[p,b,J,F]);const Y=p&&p.onFilled,ee=p&&p.onEmpty,M=d.useCallback(c=>{ut(c)?Y&&Y():ee&&ee()},[Y,ee]);N(()=>{Z&&M({value:O})},[O,M,Z]);const We=c=>{H&&H(c),s.onFocus&&s.onFocus(c),p&&p.onFocus?p.onFocus(c):Q(!0)},He=c=>{F&&F(c),s.onBlur&&s.onBlur(c),p&&p.onBlur?p.onBlur(c):Q(!1)},$e=(c,...ce)=>{if(!Z){const pe=c.target||P.current;if(pe==null)throw new Error(Ve(1));M({value:pe.value})}s.onChange&&s.onChange(c,...ce),A&&A(c,...ce)};d.useEffect(()=>{M(P.current)},[]);const Oe=c=>{P.current&&c.currentTarget===c.target&&P.current.focus(),y&&y(c)};let te=E,I=s;W&&te==="input"&&($?I={type:void 0,minRows:$,maxRows:$,...I}:I={type:void 0,maxRows:m,minRows:V,...I},te=st);const _e=c=>{M(c.animationName==="mui-auto-fill-cancel"?P.current:{value:"x"})};d.useEffect(()=>{p&&p.setAdornedStart(!!L)},[p,L]);const ne={...o,color:v.color||"primary",disabled:v.disabled,endAdornment:h,error:v.error,focused:v.focused,formControl:p,fullWidth:w,hiddenLabel:v.hiddenLabel,multiline:W,size:v.size,startAdornment:L,type:se},le=pt(ne),de=ae.root||g.Root||Fe,oe=ie.root||f.root||{},ue=ae.input||g.Input||Te;return I={...I,...ie.input??f.input},x.jsxs(d.Fragment,{children:[!S&&typeof ve=="function"&&(ye||(ye=x.jsx(ve,{}))),x.jsxs(de,{...oe,ref:n,onClick:Oe,...Ee,...!ge(de)&&{ownerState:{...ne,...oe.ownerState}},className:fe(le.root,oe.className,u,K&&"MuiInputBase-readOnly"),children:[L,x.jsx(Ie.Provider,{value:null,children:x.jsx(ue,{"aria-invalid":v.error,"aria-describedby":a,autoComplete:r,autoFocus:i,defaultValue:R,disabled:v.disabled,id:B,onAnimationStart:_e,name:q,placeholder:Ae,readOnly:K,required:v.required,rows:$,value:O,onKeyDown:X,onKeyUp:ze,type:se,...I,...!ge(ue)&&{as:te,ownerState:{...ne,...I.ownerState}},ref:Me,className:fe(le.input,I.className,K&&"MuiInputBase-readOnly"),onBlur:He,onChange:$e,onFocus:We})}),h,re?re({...v,startAdornment:L}):null]})]})});function mt(e){return Se("MuiFilledInput",e)}const z={...U,...xe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},bt=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:a,size:r,hiddenLabel:i,multiline:u}=e,T={root:["root",!n&&"underline",o&&"adornedStart",a&&"adornedEnd",r==="small"&&`size${j(r)}`,i&&"hiddenLabel",u&&"multiline"],input:["input"]},g=Re(T,mt,t);return{...t,...g}},gt=D(Fe,{shouldForwardProp:e=>je(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ke(e,t),!n.disableUnderline&&t.underline]}})(G(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",r=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${z.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${z.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:r},variants:[{props:({ownerState:i})=>!i.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${z.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${z.disabled}, .${z.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(rt()).map(([i])=>{var u;return{props:{disableUnderline:!1,color:i},style:{"&::after":{borderBottom:`2px solid ${(u=(e.vars||e).palette[i])==null?void 0:u.main}`}}}}),{props:({ownerState:i})=>i.startAdornment,style:{paddingLeft:12}},{props:({ownerState:i})=>i.endAdornment,style:{paddingRight:12}},{props:({ownerState:i})=>i.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:i,size:u})=>i.multiline&&u==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:i})=>i.multiline&&i.hiddenLabel&&i.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),ht=D(Te,{name:"MuiFilledInput",slot:"Input",overridesResolver:Be})(G(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),yt=d.forwardRef(function(t,n){const o=Ce({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:r={},componentsProps:i,fullWidth:u=!1,hiddenLabel:T,inputComponent:g="input",multiline:f=!1,slotProps:R,slots:b={},type:S="text",...h}=o,k={...o,disableUnderline:a,fullWidth:u,inputComponent:g,multiline:f,type:S},w=bt(o),B={root:{ownerState:k},input:{ownerState:k}},E=R??i?qe(B,R??i):B,s=b.root??r.Root??gt,l=b.input??r.Input??ht;return x.jsx(ft,{slots:{root:s,input:l},slotProps:E,fullWidth:u,inputComponent:g,multiline:f,ref:n,type:S,...h,classes:w})});yt.muiName="Input";export{yt as F,et as G,ft as I,st as T,Ye as a,dt as b,rt as c,Je as d,Ze as e,z as f,tt as g,me as h,U as i,lt as j,ge as k,mt as l,ct as m,kt as n,Qe as o,Fe as p,Te as q,ke as r,Be as s,Bt as t,we as u,ut as v,Ie as w};
|