var X=Object.defineProperty;var K=(I,p,y)=>p in I?X(I,p,{enumerable:!0,configurable:!0,writable:!0,value:y}):I[p]=y;var $=(I,p,y)=>(K(I,typeof p!="symbol"?p+"":p,y),y),Y=(I,p,y)=>{if(!p.has(I))throw TypeError("Cannot "+y)};var S=(I,p,y)=>(Y(I,p,"read from private field"),y?y.call(I):p.get(I)),R=(I,p,y)=>{if(p.has(I))throw TypeError("Cannot add the same private member more than once");p instanceof WeakSet?p.add(I):p.set(I,y)},k=(I,p,y,w)=>(Y(I,p,"write to private field"),w?w.call(I,y):p.set(I,y),y);var B=(I,p,y)=>(Y(I,p,"access private method"),y);(function(I,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(I=typeof globalThis<"u"?globalThis:I||self,p(I.core={}))})(this,function(exports){var I,p,y,w,x,G,V,C,Q;"use strict";const generateUID=()=>`${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`,shuffle=t=>{for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t};function pipe$1(...t){return e=>t.reduce((n,r)=>n.then(r),Promise.resolve(e))}const ssrSafeWindow=typeof window<"u"?window:null,wallets=[{id:"argentX",name:"Argent X",icon:"data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjQwIiBoZWlnaHQ9IjM2IiB2aWV3Qm94PSIwIDAgNDAgMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yNC43NTgyIC0zLjk3MzY0ZS0wN0gxNC42MjM4QzE0LjI4NTEgLTMuOTczNjRlLTA3IDE0LjAxMzggMC4yODExNzggMTQuMDA2NCAwLjYzMDY4M0MxMy44MDE3IDEwLjQ1NDkgOC44MjIzNCAxOS43NzkyIDAuMjUxODkzIDI2LjM4MzdDLTAuMDIwMjA0NiAyNi41OTMzIC0wLjA4MjE5NDYgMjYuOTg3MiAwLjExNjczNCAyNy4yNzA5TDYuMDQ2MjMgMzUuNzM0QzYuMjQ3OTYgMzYuMDIyIDYuNjQwOTkgMzYuMDg3IDYuOTE3NjYgMzUuODc1NEMxMi4yNzY1IDMxLjc3MjggMTYuNTg2OSAyNi44MjM2IDE5LjY5MSAyMS4zMzhDMjIuNzk1MSAyNi44MjM2IDI3LjEwNTcgMzEuNzcyOCAzMi40NjQ2IDM1Ljg3NTRDMzIuNzQxIDM2LjA4NyAzMy4xMzQxIDM2LjAyMiAzMy4zMzYxIDM1LjczNEwzOS4yNjU2IDI3LjI3MDlDMzkuNDY0MiAyNi45ODcyIDM5LjQwMjIgMjYuNTkzMyAzOS4xMzA0IDI2LjM4MzdDMzAuNTU5NyAxOS43NzkyIDI1LjU4MDQgMTAuNDU0OSAyNS4zNzU5IDAuNjMwNjgzQzI1LjM2ODUgMC4yODExNzggMjUuMDk2OSAtMy45NzM2NGUtMDcgMjQuNzU4MiAtMy45NzM2NGUtMDdaIiBmaWxsPSIjRkY4NzVCIi8+Cjwvc3ZnPgo=",downloads:{chrome:"https://chrome.google.com/webstore/detail/argent-x-starknet-wallet/dlcobpjiigpikoobohmabehhmhfoodbb",firefox:"https://addons.mozilla.org/en-US/firefox/addon/argent-x",edge:"https://microsoftedge.microsoft.com/addons/detail/argent-x/ajcicjlkibolbeaaagejfhnofogocgcj"}},{id:"braavos",name:"Braavos",icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cGF0aAogICAgICAgIGQ9Ik02Mi43MDUgMTMuOTExNkM2Mi44MzU5IDE0LjEzMzMgNjIuNjYyMSAxNC40MDcgNjIuNDAzOSAxNC40MDdDNTcuMTgwNyAxNC40MDcgNTIuOTM0OCAxOC41NDI3IDUy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yIKICAgICAgICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRjVENDVFIiAvPgogICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiIC8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KPC9zdmc+",downloads:{chrome:"https://chrome.google.com/webstore/detail/braavos-wallet/jnlgamecbpmbajjfhmmmlhejkemejdma",firefox:"https://addons.mozilla.org/en-US/firefox/addon/braavos-wallet",edge:"https://microsoftedge.microsoft.com/addons/detail/braavos-wallet/hkkpjehhcnhgefhbdcgfkeegglpjchdc",ios:`https://link.braavos.app/dapp/${(I=ssrSafeWindow==null?void 0:ssrSafeWindow.location)==null?void 0:I.host}`,android:`https://link.braavos.app/dapp/${(p=ssrSafeWindow==null?void 0:ssrSafeWindow.location)==null?void 0:p.host}`}},{id:"okxwallet",name:"OKX Wallet",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJDSURBVHgB7Zq9jtpAEMfHlhEgQLiioXEkoAGECwoKxMcTRHmC5E3IoyRPkPAEkI7unJYmTgEFTYwA8a3NTKScLnCHN6c9r1e3P2llWQy7M/s1Gv1twCP0ej37dDq9x+Zut1t3t9vZjDEHIiSRSPg4ZpDL5fxkMvn1cDh8m0wmfugfO53OoFQq/crn8wxfY9EymQyrVCqMfHvScZx1p9ls3pFxXBy/bKlUipGPrVbLuQqAfsCliq3zl0H84zwtjQrOw4Mt1W63P5LvBm2d+Xz+YzqdgkqUy+WgWCy+Mc/nc282m4FqLBYL+3g8fjDxenq72WxANZbLJeA13zDX67UDioL5ybXwafMYu64Ltn3bdDweQ5R97fd7GyhBQMipx4POeEDHIu2LfDdBIGGz+hJ9CQ1ABjoA2egAZPM6AgiCAEQhsi/C4jHyPA/6/f5NG3Ks2+3CYDC4aTccDrn6ojG54MnEvG00GoVmWLIRNZ7wTCwDHYBsdACy0QHIhiuRETxlICWpMMhGZHmqS8qH6JLyGegAZKMDkI0uKf8X4SWlaZo+Pp1bRrwlJU8ZKLIvUjKh0WiQ3sRUbNVq9c5Ebew7KEo2m/1p4jJ4qAmDaqDQBzj5XyiAT4VCQezJigAU+IDU+z8vJFnGWeC+bKQV/5VZ71FV6L7PA3gg3tXrdQ+DgLhC+75Wq3no69P3MC0NFQpx2lL04Ql9gHK1bRDjsSBIvScBnDTk1WrlGIZBorIDEYJj+rhdgnQ67VmWRe0zlplXl81vcyEt0rSoYDUAAAAASUVORK5CYII=",downloads:{chrome:"https://chrome.google.com/webstore/detail/mcohilncbfahbmgdjkbpemcciiolgcge",firefox:"https://addons.mozilla.org/en-US/firefox/addon/okexwallet",edge:"https://microsoftedge.microsoft.com/addons/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/pbpjkcldjiffchgbbndmhojiacbgflha",safari:"https://apps.apple.com/us/app/okx-wallet/id6463797825"}},{id:"metamask",name:"MetaMask",icon:"data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMTIiIGhlaWdodD0iMTg5IiB2aWV3Qm94PSIwIDAgMjEyIDE4OSI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cG9seWdvbiBmaWxsPSIjQ0RCREIyIiBwb2ludHM9IjYwLjc1IDE3My4yNSA4OC4zMTMgMTgwLjU2MyA4OC4zMTMgMTcxIDkwLjU2MyAxNjguNzUgMTA2LjMxMyAxNjguNzUgMTA2LjMxMyAxODAgMTA2LjMxMyAxODcuODc1IDg5LjQzOCAxODcuODc1IDY4LjYyNSAxNzguODc1Ii8+PHBvbHlnb24gZmlsbD0iI0NEQkRC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UuMDYyNTAwMDgsNzYuNTAwMDAxMSBMMTEuMjUsODIuMTI1MDAxMiBMNy4zMTI1MDAxMSw4NS41MDAwMDEzIEwxNi4zMTI1MDAyLDk2Ljc1MDAwMTQgTDU4LjUwMDAwMDksODMuODEyNTAxMiBDNzkuMTI1MDAxMiw2Ny4zMTI1MDA0IDg5LjI1MDAwMTMsNTguODc1MDAwMyA4OC44NzUwMDEzLDU4LjUwMDAwMDkgQzg4LjUwMDAwMTMsNTguMTI1MDAwOSA2My4wMDAwMDA5LDM4LjgxMjUwMDYgMTIuMzc1MDAwMiwwLjU2MjUwMDAwOCBaIi8+PC9nPjwvZz48L3N2Zz4=",downloads:{chrome:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",firefox:"https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/",edge:"https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm?hl=en-US"}},{id:"keplr",name:"Keplr",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACPfSURBVHgBzV0L0B9VdT9nvy/vB6nVOg4GEx/VER3A1iqo9aMzFgWtoOhgsYaHYNV2lNEqxAdfmKHTakuDTge1FJK2tqOtGqoWFWti8TFSxGDriFSbIK+qgB95h+Tb09397+49r3t3/99/LT0zm//e9917fud3zr27SRB+EbKd1gAcOhFg/kSYmjoBiJ4JhMsB6LHFJetS+wfoAowOQOKnumGVUfSX+23Ba0uRfFaGsh6pNKDqP2PzQN5TbNxqjAeqi2CuWLuvAuU74eT1O+AXIAhDSaX0g+fBFL6ymHShfFhT5RvdknNLzsTIb+cChmzb2OJqJY8aQG9gaAUXaXLbOH0gL4mXmXHC/HYUv1thEWyDk9bPwQAyOQC2H1wHGb29uNtQdLcmFJBv2AsFAPVQJDQPlFBYFACp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ym5DPSIAAAAASUVORK5CYII=",downloads:{chrome:"https://chrome.google.com/webstore/detail/keplr/dmkamcknogkgcdfhhbddcghachkejeap",firefox:"https://addons.mozilla.org/en-US/firefox/addon/keplr",edge:"https://microsoftedge.microsoft.com/addons/detail/keplr/ocodgmmffbkkeecmadcijjhkmeohinei"}}];class LocalStorageWrapper{constructor(e){R(this,G);R(this,C);R(this,y,!1);R(this,w,void 0);R(this,x,void 0);$(this,"value");k(this,x,e),B(this,C,Q).call(this)}set(e){return!S(this,y)&&!B(this,C,Q).call(this)?!1:(this.delete(),this.value=e,e&&(k(this,w,`${S(this,x)}-${generateUID()}`),localStorage.setItem(S(this,w),e)),!0)}get(){return B(this,G,V).call(this),this.value}delete(){return!S(this,y)&&!B(this,C,Q).call(this)?!1:(this.value=null,S(this,w)&&localStorage.removeItem(S(this,w)),!0)}}y=new WeakMap,w=new WeakMap,x=new WeakMap,G=new WeakSet,V=function(){this.value&&this.set(this.value)},C=new WeakSet,Q=function(){try{!S(this,y)&&typeof window<"u"&&(k(this,w,Object.keys(localStorage).find(e=>e.startsWith(S(this,x)))),k(this,y,!0),S(this,w)&&this.set(localStorage.getItem(S(this,w))))}catch(e){console.warn(e)}return S(this,y)};function filterBy(t,e){var n,r;if((n=e==null?void 0:e.include)!=null&&n.length){const o=new Set(e.include);return t.filter(s=>o.has(s.id))}if((r=e==null?void 0:e.exclude)!=null&&r.length){const o=new Set(e.exclude);return t.filter(s=>!o.has(s.id))}return t}const filterByPreAuthorized=async t=>{const e=await Promise.all(t.map(n=>n.isPreauthorized().catch(()=>!1)));return t.filter((n,r)=>e[r])},isWalletObj=t=>{try{return t&&["request","isConnected","provider","enable","isPreauthorized","on","off","version","id","name","icon"].every(e=>e in t)}catch{}return!1};function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function isDebugMode$1(){return Boolean("")}function isBrowserEnv$1(){return typeof window<"u"}const LOG_CATEGORY$1="[ Federation Runtime ]";function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message=`${LOG_CATEGORY$1}: ${t.message}`,t):new Error(`${LOG_CATEGORY$1}: ${t}`)}function warn$1(t){t instanceof Error?(t.message=`${LOG_CATEGORY$1}: ${t.message}`,console.warn(t)):console.warn(`${LOG_CATEGORY$1}: ${t}`)}function addUniqueItem(t,e){return t.findIndex(n=>n===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")&&t.entry.includes(".js")}function safeToString$1(t){try{return JSON.stringify(t,null,2)}catch{return""}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function _extends$1$1(){return _extends$1$1=Object.assign||function(t){for(var e=1;e=0)&&(n[o]=t[o]);return n}const nativeGlobal=(()=>{try{return new Function("return this")()}catch{return globalThis}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,n){Object.defineProperty(t,e,{value:n,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(globalThis,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(globalThis,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=globalThis.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){var e,n,r,o,s,i;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 a;(a=(e=t.__FEDERATION__).__GLOBAL_PLUGIN__)!=null||(e.__GLOBAL_PLUGIN__=[]);var l;(l=(n=t.__FEDERATION__).__INSTANCES__)!=null||(n.__INSTANCES__=[]);var c;(c=(r=t.__FEDERATION__).moduleInfo)!=null||(r.moduleInfo={});var u;(u=(o=t.__FEDERATION__).__SHARE__)!=null||(o.__SHARE__={});var d;(d=(s=t.__FEDERATION__).__MANIFEST_LOADING__)!=null||(s.__MANIFEST_LOADING__={});var g;(g=(i=t.__FEDERATION__).__PRELOADED_MAP__)!=null||(i.__PRELOADED_MAP__=new Map)}setGlobalDefaultVal(globalThis),setGlobalDefaultVal(nativeGlobal);function getGlobalFederationInstance(t,e){const n=getBuilderId();return globalThis.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===getBuilderId()||r.options.name===t&&!r.options.version&&!e||r.options.name===t&&e&&r.options.version===e))}function setGlobalFederationInstance(t){globalThis.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=isDebugMode$1()){e&&(globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,globalThis.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.1.2")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const r=Object.keys(t);for(const o of r){const[s,i]=o.split(":"),a=`${s}:${e}`,l=t[a];if(l)return{value:l,key:a}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const n=getFMId(t),r=getInfoWithoutType(e,n).value;if(r&&!r.version&&"version"in t&&t.version&&(r.version=t.version),r)return r;if("version"in t&&t.version){const{version:o}=t,s=_object_without_properties_loose$1(t,["version"]),i=getFMId(s),a=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,i).value;if((a==null?void 0:a.version)===o)return a}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const n=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[n]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo=_extends$1$1({},nativeGlobal.__FEDERATION__.moduleInfo,t),()=>{const e=Object.keys(t);for(const n of e)delete nativeGlobal.__FEDERATION__.moduleInfo[n]}),getRemoteEntryExports=(t,e)=>{const n=e||`__FEDERATION_${t}:custom__`,r=globalThis[n];return{remoteEntryKey:n,entryExports:r}},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>globalThis.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>globalThis.__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((n,r)=>r(n),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,n,r){const o=`${t}.${e}.${n}`;return r?`${o}-${r}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,n,r,o,s,i,a,l,c,u,d,g)=>(isXVersion(r)?n="":isXVersion(o)?n=`>=${r}.0.0`:isXVersion(s)?n=`>=${r}.${o}.0`:n=`>=${n}`,isXVersion(c)?l="":isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:isXVersion(d)?l=`<${c}.${Number(u)+1}.0-0`:g?l=`<=${c}.${u}.${d}-${g}`:l=`<=${l}`,`${n} ${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),(n,r,o,s,i)=>isXVersion(r)?"":isXVersion(o)?`>=${r}.0.0 <${Number(r)+1}.0.0-0`:isXVersion(s)?r==="0"?`>=${r}.${o}.0 <${r}.${Number(o)+1}.0-0`:`>=${r}.${o}.0 <${Number(r)+1}.0.0-0`:i?r==="0"?o==="0"?`>=${r}.${o}.${s}-${i} <${r}.${o}.${Number(s)+1}-0`:`>=${r}.${o}.${s}-${i} <${r}.${Number(o)+1}.0-0`:`>=${r}.${o}.${s}-${i} <${Number(r)+1}.0.0-0`:r==="0"?o==="0"?`>=${r}.${o}.${s} <${r}.${o}.${Number(s)+1}-0`:`>=${r}.${o}.${s} <${r}.${Number(o)+1}.0-0`:`>=${r}.${o}.${s} <${Number(r)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(n,r,o,s,i)=>isXVersion(r)?"":isXVersion(o)?`>=${r}.0.0 <${Number(r)+1}.0.0-0`:isXVersion(s)?`>=${r}.${o}.0 <${r}.${Number(o)+1}.0-0`:i?`>=${r}.${o}.${s}-${i} <${r}.${Number(o)+1}.0-0`:`>=${r}.${o}.${s} <${r}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(n,r,o,s,i,a)=>{const l=isXVersion(o),c=l||isXVersion(s),u=c||isXVersion(i);return r==="="&&u&&(r=""),a="",l?r===">"||r==="<"?"<0.0.0-0":"*":r&&u?(c&&(s=0),i=0,r===">"?(r=">=",c?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):r==="<="&&(r="<",c?o=Number(o)+1:s=Number(s)+1),r==="<"&&(a="-0"),`${r+o}.${s}.${i}${a}`):c?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:n})).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:n}=t,{preRelease:r}=e;if(n===void 0&&Boolean(r))return 1;if(Boolean(n)&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let o=0,s=n.length;o<=s;o++){const i=n[o],a=r[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?compareAtom(i,a):-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 o=parseRange(e).split(" ").map(g=>parseComparatorString(g)).join(" ").split(/\s+/).map(g=>parseGTE0(g)),s=extractComparator(t);if(!s)return!1;const[,i,,a,l,c,u]=s,d={operator:i,version:combineVersion(a,l,c,u),major:a,minor:l,patch:c,preRelease:u==null?void 0:u.split(".")};for(const g of o){const M=extractComparator(g);if(!M)return!1;const[,b,,D,h,A,_]=M,m={operator:b,version:combineVersion(D,h,A,_),major:D,minor:h,patch:A,preRelease:_==null?void 0:_.split(".")};if(!compare(m,d))return!1}return!0}function _extends$6(){return _extends$6=Object.assign||function(t){for(var e=1;ePromise.resolve(t.lib),_extends$6({deps:[],useIn:[],from:e,loading:null},t,{shareConfig:_extends$6({requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1},t.shareConfig),get:n,loaded:"lib"in t?!0:void 0,scope:Array.isArray(t.scope)?t.scope:["default"],strategy:t.strategy||"version-first"})}function formatShareConfigs(t,e){return t?Object.keys(t).reduce((n,r)=>(n[r]=formatShare(t[r],e),n),{}):{}}function versionLt(t,e){const n=r=>{if(!Number.isNaN(Number(r))){const s=r.split(".");let i=r;for(let a=0;a<3-s.length;a++)i+=".0";return i}return r};return!!satisfy(n(t),`<=${n(e)}`)}const findVersion=(t,e,n,r)=>{const o=t[e][n],s=r||function(i,a){return versionLt(i,a)};return Object.keys(o).reduce((i,a)=>!i||s(i,a)||i==="0"?a:i,0)},isLoaded=t=>Boolean(t.loaded)||typeof t.lib=="function";function findSingletonVersionOrderByVersion(t,e,n){const r=t[e][n];return findVersion(t,e,n,function(s,i){return!isLoaded(r[s])&&versionLt(s,i)})}function findSingletonVersionOrderByLoaded(t,e,n){const r=t[e][n];return findVersion(t,e,n,function(s,i){return isLoaded(r[i])?isLoaded(r[s])?Boolean(versionLt(s,i)):!0:isLoaded(r[s])?!1:versionLt(s,i)})}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,n,r){if(!t)return;const{shareConfig:o,scope:s=DEFAULT_SCOPE,strategy:i}=n,a=Array.isArray(s)?s:[s];for(const l of a)if(o&&t[l]&&t[l][e]){const{requiredVersion:c}=o,d=getFindShareFunction(i)(t,l,e),g=()=>{if(o.singleton){if(typeof c=="string"&&!satisfy(d,c)){const D=`Version ${d} from ${d&&t[l][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${n.from} which needs ${c})`;o.strictVersion?error(D):warn$1(D)}return t[l][e][d]}else{if(c===!1||c==="*"||satisfy(d,c))return t[l][e][d];for(const[D,h]of Object.entries(t[l][e]))if(satisfy(D,c))return h}},M={shareScopeMap:t,scope:l,pkgName:e,version:d,GlobalFederation:Global.__FEDERATION__,resolver:g};return(r.emit(M)||M).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function _define_property$3(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",BROWSER_LOG_VALUE="1",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},_obj,NameTransformMap=(_obj={},_define_property$3(_obj,NameTransformSymbol.AT,"scope_"),_define_property$3(_obj,NameTransformSymbol.HYPHEN,"_"),_define_property$3(_obj,NameTransformSymbol.SLASH,"__"),_obj),_obj1;_obj1={},_define_property$3(_obj1,NameTransformMap[NameTransformSymbol.AT],NameTransformSymbol.AT),_define_property$3(_obj1,NameTransformMap[NameTransformSymbol.HYPHEN],NameTransformSymbol.HYPHEN),_define_property$3(_obj1,NameTransformMap[NameTransformSymbol.SLASH],NameTransformSymbol.SLASH);var SEPARATOR=":";function isBrowserEnv(){return typeof window<"u"}function isDebugMode(){return typeof process<"u"&&process.env&&process.env.FEDERATION_DEBUG?Boolean(process.env.FEDERATION_DEBUG):typeof FEDERATION_DEBUG<"u"&&Boolean(FEDERATION_DEBUG)}function _array_like_to_array$2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:{},n,r,o=e.remotes,s=o===void 0?{}:o,i=e.overrides,a=i===void 0?{}:i,l=e.version,c,u=function(){return"publicPath"in t.metaData?t.metaData.publicPath:t.metaData.getPublicPath},d=Object.keys(a),g={};if(!Object.keys(s).length){var M;g=((M=t.remotes)===null||M===void 0?void 0:M.reduce(function(N,H){var F,W=H.federationContainerName;return d.includes(W)?F=a[W]:"version"in H?F=H.version:F=H.entry,N[W]={matchedVersion:F},N},{}))||{}}Object.keys(s).forEach(function(N){return g[N]={matchedVersion:d.includes(N)?a[N]:s[N]}});var b=t.metaData,D=b.remoteEntry,h=D.path,A=D.name,_=D.type,m=b.types,v=b.buildInfo.buildVersion,P=b.globalName,z=t.exposes,T={version:l||"",buildVersion:v,globalName:P,remoteEntry:simpleJoinRemoteEntry(h,A),remoteEntryType:_,remoteTypes:simpleJoinRemoteEntry(m.path,m.name),remoteTypesZip:m.zip||"",remoteTypesAPI:m.api||"",remotesInfo:g,shared:t==null?void 0:t.shared.map(function(N){return{assets:N.assets,sharedName:N.name}}),modules:z==null?void 0:z.map(function(N){return{moduleName:N.name,modulePath:N.path,assets:N.assets}})};if(!((n=t.metaData)===null||n===void 0)&&n.prefetchInterface){var L=t.metaData.prefetchInterface;T=_object_spread_props(_object_spread$1({},T),{prefetchInterface:L})}if(!((r=t.metaData)===null||r===void 0)&&r.prefetchEntry){var j=t.metaData.prefetchEntry,E=j.path,O=j.name,U=j.type;T=_object_spread_props(_object_spread$1({},T),{prefetchEntry:simpleJoinRemoteEntry(E,O),prefetchEntryType:U})}return"publicPath"in t.metaData?c=_object_spread_props(_object_spread$1({},T),{publicPath:u()}):c=_object_spread_props(_object_spread$1({},T),{getPublicPath:u()}),c}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}function asyncGeneratorStep$1(t,e,n,r,o,s,i){try{var a=t[s](i),l=a.value}catch(c){n(c);return}a.done?e(l):Promise.resolve(l).then(r,o)}function _async_to_generator$1(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var s=t.apply(e,n);function i(l){asyncGeneratorStep$1(s,r,o,i,a,"next",l)}function a(l){asyncGeneratorStep$1(s,r,o,i,a,"throw",l)}i(void 0)})}}function _instanceof(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function _ts_generator$1(t,e){var n,r,o,s,i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(o=i.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,o=null,s=!0,i=document.getElementsByTagName("link"),a=0;at.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]"u"?[4,importNodeModule("node-fetch")]:[3,2];case 1:return e=n.sent(),[2,(e==null?void 0:e.default)||e];case 2:return[2,fetch];case 3:return[2]}})});return function(){return t.apply(this,arguments)}}();console.log("fetching",urlObj.href),getFetch().then(function(f){f(urlObj.href).then(function(t){return t.text()}).then(function(){var _ref=_async_to_generator(function(data){var _ref,path,vm,scriptContext,urlDirname,filename,script,exportedInterface,container;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,Promise.all([importNodeModule("path"),importNodeModule("vm")])];case 1:_ref=_sliced_to_array.apply(void 0,[_state.sent(),2]),path=_ref[0],vm=_ref[1],scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname);try{if(script=new vm.Script("(function(exports, module, require, __dirname, __filename) {".concat(data,` })`),filename),script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename),exportedInterface=scriptContext.module.exports||scriptContext.exports,attrs&&exportedInterface&&attrs.globalName)return container=exportedInterface[attrs.globalName]||exportedInterface,cb(void 0,container),[2];cb(void 0,exportedInterface)}catch(t){cb(new Error("Script execution error: ".concat(t)))}return[2]}})});return function(t){return _ref.apply(this,arguments)}}()).catch(function(t){cb(t)})})}function loadScriptNode(t,e){return new Promise(function(n,r){createScriptNode(t,function(o,s){if(o)r(o);else{var i,a,l=(e==null||(i=e.attrs)===null||i===void 0?void 0:i.globalName)||"__FEDERATION_".concat(e==null||(a=e.attrs)===null||a===void 0?void 0:a.name,":custom__"),c=globalThis[l]=s;n(c)}},e.attrs,e.createScriptHook)})}function matchRemoteWithNameAndExpose(t,e){for(const n of t){const r=e.startsWith(n.name);let o=e.replace(n.name,"");if(r){if(o.startsWith("/")){const a=n.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:n}}else if(o==="")return{pkgNameOrAlias:n.name,expose:".",remote:n}}const s=n.alias&&e.startsWith(n.alias);let i=n.alias&&e.replace(n.alias,"");if(n.alias&&s){if(i&&i.startsWith("/")){const a=n.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:n}}else if(i==="")return{pkgNameOrAlias:n.alias,expose:".",remote:n}}}}function matchRemote(t,e){for(const n of t)if(e===n.name||n.alias&&e===n.alias)return n}function registerPlugins(t,e){const n=getGlobalHostPlugins();n.length>0&&n.forEach(r=>{t!=null&&t.find(o=>o.name!==r.name)&&t.push(r)}),t&&t.length>0&&t.forEach(r=>{e.forEach(o=>{o.applyPlugin(r)})})}function _extends$5(){return _extends$5=Object.assign||function(t){for(var e=1;e{try{e?n(e):new Function("callbacks",`import("${t}").then(callbacks[0]).catch(callbacks[1])`)([n,r])}catch(o){r(o)}})}async function loadEntryScript({name:t,globalName:e,entry:n,createScriptHook:r}){const{entryExports:o}=getRemoteEntryExports(t,e);return o||(typeof document>"u"?loadScriptNode(n,{attrs:{name:t,globalName:e},createScriptHook:r}).then(()=>{const{remoteEntryKey:s,entryExports:i}=getRemoteEntryExports(t,e);return assert(i,` Unable to use the ${t}'s '${n}' URL with ${s}'s globalName to get remoteEntry exports. Possible reasons could be: 1. '${n}' is not the correct URL, or the remoteEntry resource or name is incorrect. 2. ${s} cannot be used to get remoteEntry exports in the window object. `),i}).catch(s=>s):loadScript(n,{attrs:{},createScriptHook:r}).then(()=>{const{remoteEntryKey:s,entryExports:i}=getRemoteEntryExports(t,e);return assert(i,` Unable to use the ${t}'s '${n}' URL with ${s}'s globalName to get remoteEntry exports. Possible reasons could be: 1. '${n}' is not the correct URL, or the remoteEntry resource or name is incorrect. 2. ${s} cannot be used to get remoteEntry exports in the window object. `),i}).catch(s=>s))}function getRemoteEntryUniqueKey(t){const{entry:e,name:n}=t;return composeKeyWithSeparator(n,e)}async function getRemoteEntry({remoteEntryExports:t,remoteInfo:e,createScriptHook:n}){const{entry:r,name:o,type:s,entryGlobalName:i}=e,a=getRemoteEntryUniqueKey(e);return t||(globalLoading[a]||(s==="esm"?globalLoading[a]=loadEsmEntry({entry:r,remoteEntryExports:t}):globalLoading[a]=loadEntryScript({name:o,globalName:i,entry:r,createScriptHook:n})),globalLoading[a])}function getRemoteInfo(t){return _extends$5({},t,{entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE})}function _extends$4(){return _extends$4=Object.assign||function(t){for(var e=1;e{const r=this.host.loaderHook.lifecycle.createScript.emit({url:n});if(typeof document>"u"||r instanceof HTMLScriptElement)return r}});return assert(e,`remoteEntryExports is undefined ${safeToString$1(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,n){const{loadFactory:r=!0}=n||{loadFactory:!0},o=await this.getEntry();if(!this.inited){const a=this.host.shareScopeMap,l=this.remoteInfo.shareScope||"default";a[l]||(a[l]={});const c=a[l],u=[],d={version:this.remoteInfo.version||""};Object.defineProperty(d,"hostId",{value:this.host.options.id||this.host.name,enumerable:!1});const g=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:c,remoteEntryInitOptions:d,initScope:u,remoteInfo:this.remoteInfo,origin:this.host});await o.init(g.shareScope,g.initScope,g.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(_extends$4({},g,{remoteEntryExports:o}))}this.lib=o,this.inited=!0;const s=await o.get(e);return assert(s,`${getFMId(this.remoteInfo)} remote don't export ${e}.`),r?await s():s}constructor({remoteInfo:e,host:n}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=n}};class SyncHook{on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const n=this;this.on(function r(...o){return n.remove(r),e.apply(null,o)})}emit(...e){let n;return this.listeners.size>0&&this.listeners.forEach(r=>{n=r(...e)}),n}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 n;const r=Array.from(this.listeners);if(r.length>0){let o=0;const s=i=>i===!1?!1:o0){let r=0;const o=i=>(warn$1(i),this.onerror(i),e),s=i=>{if(checkReturnData(e,i)){if(e=i,r{const o=e[r];o&&this.lifecycle[r].on(o)}))}removePlugin(e){assert(e,"A name is required.");const n=this.registerPlugins[e];assert(n,`The plugin "${e}" is not registered.`),Object.keys(n).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(n[r])})}inherit({lifecycle:e,registerPlugins:n}){Object.keys(e).forEach(r=>{assert(!this.lifecycle[r],`The hook "${r}" has a conflict and cannot be inherited.`),this.lifecycle[r]=e[r]}),Object.keys(n).forEach(r=>{assert(!this.registerPlugins[r],`The plugin "${r}" has a conflict and cannot be inherited.`),this.applyPlugin(n[r])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function _extends$3(){return _extends$3=Object.assign||function(t){for(var e=1;e{const r=matchRemote(t,n.nameOrAlias);return assert(r,`Unable to preload ${n.nameOrAlias} as it is not included in ${!r&&safeToString$1({remoteInfo:r,remotes:t})}`),{remote:r,preloadConfig:defaultPreloadArgs(n)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,n){const{cssAssets:r,jsAssetsWithoutEntry:o,entryAssets:s}=n;if(e.options.inBrowser){s.forEach(a=>{const{moduleInfo:l}=a,c=e.moduleCache.get(t.name);getRemoteEntry(c?{remoteInfo:l,remoteEntryExports:c.remoteEntryExports,createScriptHook:u=>{const d=e.loaderHook.lifecycle.createScript.emit({url:u});if(d instanceof HTMLScriptElement)return d}}:{remoteInfo:l,remoteEntryExports:void 0,createScriptHook:u=>{const d=e.loaderHook.lifecycle.createScript.emit({url:u});if(d instanceof HTMLScriptElement)return d}})});const i=document.createDocumentFragment();r.forEach(a=>{const{link:l,needAttach:c}=createLink(a,()=>{},{rel:"preload",as:"style"},u=>{const d=e.loaderHook.lifecycle.createLink.emit({url:u});if(d instanceof HTMLLinkElement)return d});c&&i.appendChild(l)}),o.forEach(a=>{const{link:l,needAttach:c}=createLink(a,()=>{},{rel:"preload",as:"script"},u=>{const d=e.loaderHook.lifecycle.createLink.emit({url:u});if(d instanceof HTMLLinkElement)return d});c&&document.head.appendChild(l)}),document.head.appendChild(i)}}function _extends$2(){return _extends$2=Object.assign||function(t){for(var e=1;e{let m;if(_)m=d;else if(Array.isArray(g)){const j=g.find(E=>E.nameOrAlias===A.name||E.nameOrAlias===A.alias);if(!j)return;m=defaultPreloadArgs(j)}else if(g===!0)m=d;else return;const v=getResourceUrl(h,"remoteEntry"in h?h.remoteEntry:"");v&&a.push({name:A.name,moduleInfo:{name:A.name,entry:v,type:"remoteEntryType"in h?h.remoteEntryType:"global",entryGlobalName:"globalName"in h?h.globalName:A.name,shareScope:"",version:"version"in h?h.version:void 0},url:v});let P="modules"in h?h.modules:[];const z=normalizePreloadExposes(m.exposes);if(z.length&&"modules"in h){var T;P=h==null||(T=h.modules)==null?void 0:T.reduce((j,E)=>((z==null?void 0:z.indexOf(E.moduleName))!==-1&&j.push(E),j),[])}function L(j){const E=j.map(O=>getResourceUrl(h,O));return m.filter?E.filter(m.filter):E}if(P){const j=P.length;for(let E=0;E{var A;const _=(A=u.shared)==null?void 0:A[h.sharedName];if(!_)return;const m=getRegisteredShare(t.shareScopeMap,h.sharedName,_,t.hooks.lifecycle.resolveShare);m&&typeof m.lib=="function"&&(h.assets.js.sync.forEach(v=>{l.add(v)}),h.assets.css.sync.forEach(v=>{c.add(v)}))});const b=i.filter(h=>!l.has(h));return{cssAssets:s.filter(h=>!c.has(h)),jsAssetsWithoutEntry:b,entryAssets:a}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:n,remoteInfo:r,remote:o,globalSnapshot:s,remoteSnapshot:i}=t;return isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:r.name,entry:o.entry,type:"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(r,i),generatePreloadAssets(e,n,r,s,i))}}};function _extends$1(){return _extends$1=Object.assign||function(t){for(var e=1;e{let i=this.manifestCache.get(e);if(i)return i;try{let a=await this.loaderHook.lifecycle.fetch.emit(e,{});return(!a||!(a instanceof Response))&&(a=await fetch(e,{})),i=await a.json(),assert(i.metaData&&i.exposes&&i.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,i),i}catch(a){error(`Failed to get manifestJson for ${n.name}. The manifest URL is ${e}. Please ensure that the manifestUrl is accessible. Error message: ${a}`)}},s=async()=>{const i=await o(),a=generateSnapshotFromManifest(i,{version:e}),{remoteSnapshot:l}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:n,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:"manifest"});return l};return this.manifestLoading[e]||(this.manifestLoading[e]=s().then(i=>i)),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")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}function _extends(){return _extends=Object.assign||function(t){for(var e=1;e=0)&&(n[o]=t[o]);return n}class FederationHost{_setGlobalShareScopeMap(){const e=getGlobalShareScope(),n=this.options.id||this.options.name;n&&!e[n]&&(e[n]=this.shareScopeMap)}initOptions(e){this.registerPlugins(e.plugins);const n=this.formatOptions(this.options,e);return this.options=n,n}async loadShare(e,n){var r;const o=Object.assign({},(r=this.options.shared)==null?void 0:r[e],n);o!=null&&o.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,o.strategy))}));const s=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:this.options.shared,origin:this}),{shareInfo:i}=s;assert(i,`Cannot find ${e} Share in the ${this.options.name}. Please ensure that the ${e} Share parameters have been injected`);const a=getRegisteredShare(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),l=c=>{c.useIn||(c.useIn=[]),addUniqueItem(c.useIn,this.options.name)};if(a&&a.lib)return l(a),a.lib;if(a&&a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),l(a),c}else if(a){const u=(async()=>{const d=await a.get();i.lib=d,i.loaded=!0,l(i);const g=getRegisteredShare(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return g&&(g.lib=d,g.loaded=!0),d})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:this.options.name,lib:null,loading:u}),u}else{if(n)return!1;const u=(async()=>{const d=await i.get();i.lib=d,i.loaded=!0,l(i);const g=getRegisteredShare(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return g&&(g.lib=d,g.loaded=!0),d})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:this.options.name,lib:null,loading:u}),u}}loadShareSync(e,n){var r;const o=Object.assign({},(r=this.options.shared)==null?void 0:r[e],n);o!=null&&o.scope&&o.scope.forEach(a=>{this.initializeSharing(a,o.strategy)});const s=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),i=a=>{a.useIn||(a.useIn=[]),addUniqueItem(a.useIn,this.options.name)};if(s){if(typeof s.lib=="function")return i(s),s.loaded||(s.loaded=!0,s.from===this.options.name&&(o.loaded=!0)),s.lib;if(typeof s.get=="function"){const a=s.get();if(!(a instanceof Promise))return i(s),this.setShared({pkgName:e,loaded:!0,from:this.options.name,lib:a,shared:s}),a}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const a=o.get();if(a instanceof Promise)throw new Error(` The loadShareSync function was unable to load ${e}. The ${e} could not be found in ${this.options.name}. Possible reasons for failure: 1. The ${e} share was registered with the 'get' attribute, but loadShare was not used beforehand. 2. The ${e} share was not registered with the 'lib' attribute. `);return o.lib=a,this.setShared({pkgName:e,loaded:!0,from:this.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(` The loadShareSync function was unable to load ${e}. The ${e} could not be found in ${this.options.name}. Possible reasons for failure: 1. The ${e} share was registered with the 'get' attribute, but loadShare was not used beforehand. 2. The ${e} share was not registered with the 'lib' attribute. `)}initRawContainer(e,n,r){const o=getRemoteInfo({name:e,entry:n}),s=new Module({host:this,remoteInfo:o});return s.remoteEntryExports=r,this.moduleCache.set(e,s),s}async _getRemoteModuleAndOptions(e){const n=await this.hooks.lifecycle.beforeRequest.emit({id:e,options:this.options,origin:this}),{id:r}=n,o=matchRemoteWithNameAndExpose(this.options.remotes,r);assert(o,` Unable to locate ${r} in ${this.options.name}. Potential reasons for failure include: 1. ${r} was not included in the 'remotes' parameter of ${this.options.name||"the host"}. 2. ${r} could not be found in the 'remotes' of ${this.options.name} with either 'name' or 'alias' attributes. 3. ${r} is not online, injected, or loaded. 4. ${r} cannot be accessed on the expected. 5. The 'beforeRequest' hook was provided but did not return the correct 'remoteInfo' when attempting to load ${r}. `);const{remote:s}=o,i=getRemoteInfo(s),a=await this.hooks.lifecycle.afterResolve.emit(_extends({id:r},o,{options:this.options,origin:this,remoteInfo:i})),{remote:l,expose:c}=a;assert(l&&c,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${r}.`);let u=this.moduleCache.get(l.name);const d={host:this,remoteInfo:i};return u||(u=new Module(d),this.moduleCache.set(l.name,u)),{module:u,moduleOptions:d,remoteMatchInfo:a}}async loadRemote(e,n){try{const{loadFactory:r=!0}=n||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this._getRemoteModuleAndOptions(e),{pkgNameOrAlias:a,remote:l,expose:c,id:u}=i,d=await o.get(c,n),g=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:c,exposeModule:r?d:void 0,exposeModuleFactory:r?void 0:d,remote:l,options:s,moduleInstance:o,origin:this});return typeof g=="function"?g:d}catch(r){const{from:o="runtime"}=n||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:o,origin:this});if(!s)throw r;return s}}async preloadRemote(e){await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOptions:e,options:this.options,origin:this});const n=formatPreloadArgs(this.options.remotes,e);await Promise.all(n.map(async r=>{const{remote:o}=r,s=getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await this.snapshotHandler.loadRemoteSnapshotInfo(o),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:this,preloadOptions:r,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});!l||preloadAssets(s,this,l)}))}initializeSharing(e=DEFAULT_SCOPE,n){const r=this.shareScopeMap,o=this.options.name;r[e]||(r[e]={});const s=r[e],i=(u,d)=>{var g;const{version:M,eager:b}=d;s[u]=s[u]||{};const D=s[u],h=D[M],A=Boolean(h&&(h.eager||((g=h.shareConfig)==null?void 0:g.eager)));(!h||h.strategy!=="loaded-first"&&!h.loaded&&(Boolean(!b)!==!A?b:o>h.from))&&(D[M]=d)},a=[],l=u=>u&&u.init&&u.init(r[e]),c=async u=>{const{module:d}=await this._getRemoteModuleAndOptions(u);if(d.getEntry){const g=await d.getEntry();d.inited||(l(g),d.inited=!0)}};return Object.keys(this.options.shared).forEach(u=>{const d=this.options.shared[u];d.scope.includes(e)&&i(u,d)}),n==="version-first"&&this.options.remotes.forEach(u=>{u.shareScope===e&&a.push(c(u.name))}),a}initShareScopeMap(e,n){this.shareScopeMap[e]=n,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:n,options:this.options,origin:this})}formatOptions(e,n){const r=formatShareConfigs(n.shared||{},n.name),o=_extends({},e.shared,r),{userOptions:s,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:n,options:e,shareInfo:o}),l=(s.remotes||[]).reduce((g,M)=>(this.registerRemote(M,g,{force:!1}),g),i.remotes);Object.keys(r).forEach(g=>{const M=r[g];!getRegisteredShare(this.shareScopeMap,g,M,this.hooks.lifecycle.resolveShare)&&M&&M.lib&&this.setShared({pkgName:g,lib:M.lib,get:M.get,loaded:!0,shared:M,from:n.name})});const u=[...i.plugins];s.plugins&&s.plugins.forEach(g=>{u.includes(g)||u.push(g)});const d=_extends({},e,n,{plugins:u,remotes:l,shared:o});return this.hooks.lifecycle.init.emit({origin:this,options:d}),d}registerPlugins(e){registerPlugins(e,[this.hooks,this.snapshotHandler.hooks,this.loaderHook])}setShared({pkgName:e,shared:n,from:r,lib:o,loading:s,loaded:i,get:a}){const{version:l,scope:c="default"}=n,u=_object_without_properties_loose(n,["version","scope"]);(Array.isArray(c)?c:[c]).forEach(g=>{this.shareScopeMap[g]||(this.shareScopeMap[g]={}),this.shareScopeMap[g][e]||(this.shareScopeMap[g][e]={}),!this.shareScopeMap[g][e][l]&&(this.shareScopeMap[g][e][l]=_extends({version:l,scope:["default"]},u,{lib:o,loaded:i,loading:s}),a&&(this.shareScopeMap[g][e][l].get=a))})}removeRemote(e){const{name:n}=e,r=this.options.remotes.findIndex(s=>s.name===n);r!==-1&&this.options.remotes.splice(r,1);const o=this.moduleCache.get(e.name);if(o){const s=o.remoteInfo.entryGlobalName;globalThis[s]&&delete globalThis[s];const i=getRemoteEntryUniqueKey(o.remoteInfo);globalLoading[i]&&delete globalLoading[i],this.moduleCache.delete(e.name)}}registerRemote(e,n,r){const o=()=>{if(e.alias){const i=n.find(a=>{var l;return e.alias&&(a.name.startsWith(e.alias)||((l=a.alias)==null?void 0:l.startsWith(e.alias)))});assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&isBrowserEnv$1()&&!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)},s=n.find(i=>i.name===e.name);if(!s)o(),n.push(e);else{const i=[`The remote "${e.name}" is already registered.`,r!=null&&r.force?"Hope you have known that OVERRIDE it may have some unexpected errors":'If you want to merge the remote, you can set "force: true".'];r!=null&&r.force&&(this.removeRemote(s),o(),n.push(e)),warn$1(i.join(" "))}}registerRemotes(e,n){e.forEach(r=>{this.registerRemote(r,this.options.remotes,{force:n==null?void 0:n.force})})}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeRequest:new AsyncWaterfallHook("beforeRequest"),afterResolve:new AsyncWaterfallHook("afterResolve"),beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainerShareScopeMap:new AsyncWaterfallHook("initContainer"),initContainer:new AsyncWaterfallHook("initContainer"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),beforePreloadRemote:new AsyncHook,generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook}),this.version="0.1.2",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook("fetch")});const n={id:getBuilderId(),name:e.name,plugins:[snapshotPlugin(),generatePreloadAssetsPlugin()],remotes:[],shared:{},inBrowser:isBrowserEnv$1()};this.name=e.name,this.options=n,this.shareScopeMap={},this._setGlobalShareScopeMap(),this.snapshotHandler=new SnapshotHandler(this),this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}let FederationInstance=null;function init(t){const e=getGlobalFederationInstance(t.name,t.version);if(e)return e.initOptions(t),FederationInstance||(FederationInstance=e),e;{const n=getGlobalFederationConstructor()||FederationHost;return FederationInstance=new n(t),setGlobalFederationInstance(FederationInstance),FederationInstance}}function loadRemote(...t){return assert(FederationInstance,"Please call init first"),FederationInstance.loadRemote.apply(FederationInstance,t)}setGlobalFederationConstructor(FederationHost);function isMetaMaskProvider(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("isMetaMask")&&t.hasOwnProperty("request")}function detectMetaMaskProvider(t,{timeout:e=3e3}={}){let n=!1;return new Promise(r=>{const o=s=>{const{info:i,provider:a}=s.detail;["io.metamask","io.metamask.flask"].includes(i.rdns)&&isMetaMaskProvider(a)&&(r(a),n=!0)};typeof t.addEventListener=="function"&&t.addEventListener("eip6963:announceProvider",o),setTimeout(()=>{n||r(null)},e),typeof t.dispatchEvent=="function"&&t.dispatchEvent(new Event("eip6963:requestProvider"))})}async function waitForMetaMaskProvider(t,{timeout:e=3e3,retries:n=0}={}){return detectMetaMaskProvider(t,{timeout:e}).catch(function(){return null}).then(function(r){return r||n===0?r:waitForMetaMaskProvider(t,{timeout:e,retries:n-1})})}async function detectMetamaskSupport(t){return await waitForMetaMaskProvider(t,{retries:3})}async function fetchMetaMaskSnapWallet(t){await init({name:"MetaMaskStarknetSnapWallet",remotes:[{name:"MetaMaskStarknetSnapWallet",alias:"MetaMaskStarknetSnapWallet",entry:"https://snaps.consensys.io/starknet/get-starknet/v1/remoteEntry.js"}]});const e=await loadRemote("MetaMaskStarknetSnapWallet/index"),{MetaMaskSnapWallet:n}=e;return new n(t,"*")}function createMetaMaskProviderWrapper(t,e){let n,r;return{id:t.id,name:t.name,icon:t.icon,get version(){var s;return(s=n==null?void 0:n.version)!=null?s:"0.0.0"},get isConnected(){var s;return(s=n==null?void 0:n.isConnected)!=null?s:!1},get provider(){return n==null?void 0:n.provider},get account(){return n==null?void 0:n.account},get selectedAddress(){return n==null?void 0:n.selectedAddress},get chainId(){return n==null?void 0:n.chainId},request(s){if(!n)throw new Error("Wallet not enabled");return n.request(s)},async enable(){return n||(r=r||fetchMetaMaskSnapWallet(e),n=await r),await n.enable()},isPreauthorized(){var s;return(s=n==null?void 0:n.isPreauthorized())!=null?s:Promise.resolve(!1)},on(s,i){if(!n)throw new Error("Wallet not enabled");return n.on(s,i)},off(s,i){if(!n)throw new Error("Wallet not enabled");return n.off(s,i)}}}async function injectMetamaskBridge(t){if(t.hasOwnProperty("starknet_metamask"))return;const e=wallets.find(r=>r.id==="metamask");if(!e)return;const n=await detectMetamaskSupport(t);!n||(t.starknet_metamask=createMetaMaskProviderWrapper(e,n))}function scanObjectForWallets(t,e){return Object.values(Object.getOwnPropertyNames(t).reduce((n,r)=>{if(r.startsWith("starknet")){const o=t[r];e(o)&&!n[o.id]&&(n[o.id]=o)}return n},{}))}const sortBy=(t,e)=>{if(e&&Array.isArray(e)){t.sort((r,o)=>e.indexOf(r.id)-e.indexOf(o.id));const n=t.length-e.length;return[...t.slice(n),...shuffle(t.slice(0,n))]}else return shuffle(t)},defaultOptions={windowObject:ssrSafeWindow!=null?ssrSafeWindow:{},isWalletObject:isWalletObj,storageFactoryImplementation:t=>new LocalStorageWrapper(t)};function getStarknet(t={}){const{storageFactoryImplementation:e,windowObject:n,isWalletObject:r}={...defaultOptions,...t},o=e("gsw-last");return injectMetamaskBridge(n),{getAvailableWallets:async(s={})=>{const i=scanObjectForWallets(n,r);return pipe$1(a=>filterBy(a,s),a=>sortBy(a,s.sort))(i)},getPreAuthorizedWallets:async(s={})=>{const i=scanObjectForWallets(n,r);return pipe$1(a=>filterByPreAuthorized(a),a=>filterBy(a,s),a=>sortBy(a,s.sort))(i)},getDiscoveryWallets:async(s={})=>pipe$1(i=>filterBy(i,s),i=>sortBy(i,s.sort))(wallets),getLastConnectedWallet:async()=>{const s=o.get(),a=scanObjectForWallets(n,r).find(c=>c.id===s),[l]=await filterByPreAuthorized(a?[a]:[]);return l||(o.delete(),null)},enable:async(s,i)=>{if(await s.enable(i!=null?i:{starknetVersion:"v5"}),!s.isConnected)throw new Error("Failed to connect to wallet");return o.set(s.id),s},disconnect:async({clearLastWallet:s}={})=>{s&&o.delete()}}}const main=getStarknet();exports.default=main,exports.getStarknet=getStarknet,exports.ssrSafeWindow=ssrSafeWindow,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});