@rimori/playwright-testing 0.3.21 → 0.3.22-next.0
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/dist/core/RimoriTestEnvironment.d.ts +36 -4
- package/dist/core/RimoriTestEnvironment.js +160 -11
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_client__loadShare__.js.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare___mf_0_rimori_mf_1_react_mf_2_client__loadShare__.js.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.js.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.js_commonjs-proxy.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom__loadShare__.js.js +1 -0
- package/dist/harness/__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy.js +1 -0
- package/dist/harness/hostInit.js +1 -0
- package/dist/harness/html2canvas.esm.js +22 -0
- package/dist/harness/index.html +24 -0
- package/dist/harness/index.js +25 -0
- package/dist/harness/index2.js +8 -0
- package/dist/harness/index3.js +148 -0
- package/dist/harness/index4.js +1 -0
- package/dist/harness/index5.js +9 -0
- package/dist/harness/index6.js +9 -0
- package/dist/harness/index7.js +1 -0
- package/dist/harness/jsx-dev-runtime.js +9 -0
- package/dist/harness/jsx-runtime.js +9 -0
- package/dist/harness/localSharedImportMap.js +1 -0
- package/dist/harness/preload-helper.js +1 -0
- package/dist/harness/remoteEntry.js +1 -0
- package/dist/harness/virtualExposes.js +1 -0
- package/dist/harness/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js +8 -0
- package/package.json +17 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as nt,c as M,d as at,a as W,j as Ct,l as j,f as _,b as J}from"./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.js.js";import{_ as Qt}from"./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js.js";var I=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vt=class extends I{#e;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ot=new Vt,Jt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Zt=class{#e=Jt;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},D=new Zt;function Xt(t){setTimeout(t,0)}var Yt=typeof window>"u"||"Deno"in globalThis;function O(){}function te(t,e){return typeof t=="function"?t(e):t}function Z(t){return typeof t=="number"&&t>=0&&t!==1/0}function Et(t,e){return Math.max(t+(e||0)-Date.now(),0)}function F(t,e){return typeof t=="function"?t(e):t}function S(t,e){return typeof t=="function"?t(e):t}function pt(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:n,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==ut(a,e.options))return!1}else if(!q(e.queryKey,a))return!1}if(s!=="all"){const o=e.isActive();if(s==="active"&&!o||s==="inactive"&&o)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||n&&!n(e))}function yt(t,e){const{exact:s,status:r,predicate:i,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(T(e.options.mutationKey)!==T(n))return!1}else if(!q(e.options.mutationKey,n))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ut(t,e){return(e?.queryKeyHashFn||T)(t)}function T(t){return JSON.stringify(t,(e,s)=>X(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function q(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>q(t[s],e[s])):!1}var ee=Object.prototype.hasOwnProperty;function $(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=vt(t)&&vt(e);if(!r&&!(X(t)&&X(e)))return e;const n=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,o=r?new Array(u):{};let c=0;for(let h=0;h<u;h++){const d=r?h:a[h],l=t[d],y=e[d];if(l===y){o[d]=l,(r?h<n:ee.call(t,d))&&c++;continue}if(l===null||y===null||typeof l!="object"||typeof y!="object"){o[d]=y;continue}const m=$(l,y,s+1);o[d]=m,m===l&&c++}return n===u&&c===n?t:o}function x(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function vt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function X(t){if(!mt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!mt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function mt(t){return Object.prototype.toString.call(t)==="[object Object]"}function se(t){return new Promise(e=>{D.setTimeout(e,t)})}function Y(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?$(t,e):e}function Te(t){return t}function Ft(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function re(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var ht=Symbol();function Mt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===ht?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function ct(t,e){return typeof t=="function"?t(...e):!!t}function Dt(t,e,s){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}var U=(()=>{let t=()=>Yt;return{isServer(){return t()},setIsServer(e){t=e}}})();function tt(){let t,e;const s=new Promise((i,n)=>{t=i,e=n});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},s.reject=i=>{r({status:"rejected",reason:i}),e(i)},s}function ie(t){let e;if(t.then(s=>(e=s,s),O)?.catch(O),e!==void 0)return{data:e}}function Tt(t){return t}function ne(t){return{mutationKey:t.options.mutationKey,state:t.state,...t.options.scope&&{scope:t.options.scope},...t.meta&&{meta:t.meta}}}function ae(t,e,s){const r=()=>{const i=t.promise?.then(e).catch(n=>s(n)?Promise.reject(new Error("redacted")):Promise.reject(n));return i?.catch(O),i};return{dehydratedAt:Date.now(),state:{...t.state,...t.state.data!==void 0&&{data:e(t.state.data)}},queryKey:t.queryKey,queryHash:t.queryHash,...t.state.status==="pending"&&{promise:r()},...t.meta&&{meta:t.meta},...t.queryType&&{queryType:t.queryType}}}function oe(t){return t.state.isPaused}function ue(t){return t.state.status==="success"}function he(t){return!0}function Ie(t,e={}){const s=e.shouldDehydrateMutation??t.getDefaultOptions().dehydrate?.shouldDehydrateMutation??oe,r=t.getMutationCache().getAll().flatMap(o=>s(o)?[ne(o)]:[]),i=e.shouldDehydrateQuery??t.getDefaultOptions().dehydrate?.shouldDehydrateQuery??ue,n=e.shouldRedactErrors??t.getDefaultOptions().dehydrate?.shouldRedactErrors??he,a=e.serializeData??t.getDefaultOptions().dehydrate?.serializeData??Tt,u=t.getQueryCache().getAll().flatMap(o=>i(o)?[ae(o,a,n)]:[]);return{mutations:r,queries:u}}function gt(t,e,s){if(typeof e!="object"||e===null)return;const r=t.getMutationCache(),i=t.getQueryCache(),n=s?.defaultOptions?.deserializeData??t.getDefaultOptions().hydrate?.deserializeData??Tt,a=e.mutations||[],u=e.queries||[];a.forEach(({state:o,...c})=>{r.build(t,{...t.getDefaultOptions().hydrate?.mutations,...s?.defaultOptions?.mutations,...c},o)}),u.forEach(({queryKey:o,state:c,queryHash:h,meta:d,promise:l,dehydratedAt:y,queryType:m})=>{const f=l?ie(l):void 0,p=c.data===void 0?f?.data:c.data,v=p===void 0?p:n(p);let b=i.get(h);const P=b?.state.status==="pending",R=b?.state.fetchStatus==="fetching";if(b){const Q=f&&y!==void 0&&y>b.state.dataUpdatedAt;if(c.dataUpdatedAt>b.state.dataUpdatedAt||Q){const{fetchStatus:K,...C}=c;b.setState({...C,data:v,...c.status==="pending"&&v!==void 0&&{status:"success",...!R&&{fetchStatus:"idle"}}})}}else b=i.build(t,{...t.getDefaultOptions().hydrate?.queries,...s?.defaultOptions?.queries,queryKey:o,queryHash:h,meta:d,_type:m},{...c,data:v,fetchStatus:"idle",status:c.status==="pending"&&v!==void 0?"success":c.status});l&&!f&&!P&&!R&&(y===void 0||y>b.state.dataUpdatedAt)&&b.fetch(void 0,{initialPromise:Promise.resolve(l).then(n)}).catch(O)})}var ce=Xt;function le(){let t=[],e=0,s=u=>{u()},r=u=>{u()},i=ce;const n=u=>{e?t.push(u):i(()=>{s(u)})},a=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(o=>{s(o)})})})};return{batch:u=>{let o;e++;try{o=u()}finally{e--,e||a()}return o},batchCalls:u=>(...o)=>{n(()=>{u(...o)})},schedule:n,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var g=le(),fe=class extends I{#e=!0;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}},z=new fe;function de(t){return Math.min(1e3*2**t,3e4)}function It(t){return(t??"online")==="online"?z.isOnline():!0}var G=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _e(t){return t instanceof G}function _t(t){let e=!1,s=0,r;const i=tt(),n=()=>i.status!=="pending",a=f=>{if(!n()){const p=new G(f);l(p),t.onCancel?.(p)}},u=()=>{e=!0},o=()=>{e=!1},c=()=>ot.isFocused()&&(t.networkMode==="always"||z.isOnline())&&t.canRun(),h=()=>It(t.networkMode)&&t.canRun(),d=f=>{n()||(r?.(),i.resolve(f))},l=f=>{n()||(r?.(),i.reject(f))},y=()=>new Promise(f=>{r=p=>{(n()||c())&&f(p)},t.onPause?.()}).then(()=>{r=void 0,n()||t.onContinue?.()}),m=()=>{if(n())return;let f;const p=s===0?t.initialPromise:void 0;try{f=p??t.fn()}catch(v){f=Promise.reject(v)}Promise.resolve(f).then(d).catch(v=>{if(n())return;const b=t.retry??(U.isServer()?0:3),P=t.retryDelay??de,R=typeof P=="function"?P(s,v):P,Q=b===!0||typeof b=="number"&&s<b||typeof b=="function"&&b(s,v);if(e||!Q){l(v);return}s++,t.onFail?.(s,v),se(R).then(()=>c()?void 0:y()).then(()=>{e?l(v):m()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:u,continueRetry:o,canStart:h,start:()=>(h()?m():y().then(m),i)}}var At=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Z(this.gcTime)&&(this.#e=D.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(U.isServer()?1/0:5*60*1e3))}clearGcTimeout(){this.#e!==void 0&&(D.clearTimeout(this.#e),this.#e=void 0)}};function pe(t){return{onFetch:(e,s)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,n=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},o=0;const c=async()=>{let h=!1;const d=m=>{Dt(m,()=>e.signal,()=>h=!0)},l=Mt(e.options,e.fetchOptions),y=async(m,f,p)=>{if(h)return Promise.reject(e.signal.reason);if(f==null&&m.pages.length)return Promise.resolve(m);const b=(()=>{const K={client:e.client,queryKey:e.queryKey,pageParam:f,direction:p?"backward":"forward",meta:e.options.meta};return d(K),K})(),P=await l(b),{maxPages:R}=e.options,Q=p?re:Ft;return{pages:Q(m.pages,P,R),pageParams:Q(m.pageParams,f,R)}};if(i&&n.length){const m=i==="backward",f=m?qt:et,p={pages:n,pageParams:a},v=f(r,p);u=await y(p,v,m)}else{const m=t??n.length;do{const f=o===0?a[0]??r.initialPageParam:et(r,u);if(o>0&&f==null)break;u=await y(u,f),o++}while(o<m)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=c}}}function et(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function qt(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function ye(t,e){return e?et(t,e)!=null:!1}function ve(t,e){return!e||!t.getPreviousPageParam?!1:qt(t,e)!=null}var me=class extends At{#e;#t;#s;#r;#i;#n;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Ot(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#o,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Ot(this.options);e.data!==void 0&&(this.setState(bt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const s=Y(this.state.data,t,this.options);return this.#u({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#u({type:"setState",state:t})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>S(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ht||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>F(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Et(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#a||this.#c()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const s=new AbortController,r=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},i=()=>{const o=Mt(this.options,e),h=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#a=!1,this.options.persister?this.options.persister(o,h,this):o(h)},a=(()=>{const o={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(o),o})();(this.#e==="infinite"?pe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#u({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=_t({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof G&&o.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(o,c)=>{this.#u({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#n.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#r.config.onSuccess?.(o,this),this.#r.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof G){if(o.silent)return this.#n.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#u({type:"error",error:o}),this.#r.config.onError?.(o,this),this.#r.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#u(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...xt(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...bt(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?r:void 0,r;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),g.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function xt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:It(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function bt(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ot(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var k=class extends I{constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.#o=tt(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#s=void 0;#r=void 0;#i;#n;#o;#a;#c;#u;#d;#l;#p;#h;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),St(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return st(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return st(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),e._defaulted&&!x(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&wt(this.#t,s,this.options,e)&&this.#f(),this.updateResult(),r&&(this.#t!==s||S(this.options.enabled,this.#t)!==S(e.enabled,this.#t)||F(this.options.staleTime,this.#t)!==F(e.staleTime,this.#t))&&this.#v();const i=this.#m();r&&(this.#t!==s||S(this.options.enabled,this.#t)!==S(e.enabled,this.#t)||i!==this.#h)&&this.#g(i)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(e,t);return be(this,s)&&(this.#r=s,this.#n=this.options,this.#i=this.#t.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#y.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#w();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(O)),e}#v(){this.#O();const t=F(this.options.staleTime,this.#t);if(U.isServer()||this.#r.isStale||!Z(t))return;const s=Et(this.#r.dataUpdatedAt,t)+1;this.#l=D.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#m(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(t){this.#S(),this.#h=t,!(U.isServer()||S(this.options.enabled,this.#t)===!1||!Z(this.#h)||this.#h===0)&&(this.#p=D.setInterval(()=>{(this.options.refetchIntervalInBackground||ot.isFocused())&&this.#f()},this.#h))}#b(){this.#v(),this.#g(this.#m())}#O(){this.#l!==void 0&&(D.clearTimeout(this.#l),this.#l=void 0)}#S(){this.#p!==void 0&&(D.clearInterval(this.#p),this.#p=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#r,n=this.#i,a=this.#n,o=t!==s?t.state:this.#s,{state:c}=t;let h={...c},d=!1,l;if(e._optimisticResults){const w=this.hasListeners(),A=!w&&St(t,e),L=w&&wt(t,s,e,r);(A||L)&&(h={...h,...xt(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:f}=h;l=h.data;let p=!1;if(e.placeholderData!==void 0&&l===void 0&&f==="pending"){let w;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(w=i.data,p=!0):w=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,w!==void 0&&(f="success",l=Y(i?.data,w,e),d=!0)}if(e.select&&l!==void 0&&!p)if(i&&l===n?.data&&e.select===this.#c)l=this.#u;else try{this.#c=e.select,l=e.select(l),l=Y(i?.data,l,e),this.#u=l,this.#a=null}catch(w){this.#a=w}this.#a&&(y=this.#a,l=this.#u,m=Date.now(),f="error");const v=h.fetchStatus==="fetching",b=f==="pending",P=f==="error",R=b&&v,Q=l!==void 0,C={status:f,fetchStatus:h.fetchStatus,isPending:b,isSuccess:f==="success",isError:P,isInitialLoading:R,isLoading:R,data:l,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>o.dataUpdateCount||h.errorUpdateCount>o.errorUpdateCount,isFetching:v,isRefetching:v&&!b,isLoadingError:P&&!Q,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:P&&Q,isStale:lt(t,e),refetch:this.refetch,promise:this.#o,isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const w=C.data!==void 0,A=C.status==="error"&&!w,L=H=>{A?H.reject(C.error):w&&H.resolve(C.data)},dt=()=>{const H=this.#o=C.promise=tt();L(H)},N=this.#o;switch(N.status){case"pending":t.queryHash===s.queryHash&&L(N);break;case"fulfilled":(A||C.data!==N.value)&&dt();break;case"rejected":(!A||C.error!==N.reason)&&dt();break}}return C}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#n=this.options,this.#i.data!==void 0&&(this.#d=this.#t),x(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#y.size)return!0;const n=new Set(i??this.#y);return this.options.throwOnError&&n.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&n.has(u)})};this.#P({listeners:s()})}#w(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#P(t){g.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function ge(t,e){return S(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&S(e.retryOnMount,t)===!1)}function St(t,e){return ge(t,e)||t.state.data!==void 0&&st(t,e,e.refetchOnMount)}function st(t,e,s){if(S(e.enabled,t)!==!1&&F(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&<(t,e)}return!1}function wt(t,e,s,r){return(t!==e||S(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&<(t,s)}function lt(t,e){return S(e.enabled,t)!==!1&&t.isStaleByTime(F(e.staleTime,t))}function be(t,e){return!x(t.getCurrentResult(),e)}var Ut=class extends k{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){t._type="infinite",super.setOptions(t)}getOptimisticResult(t){return t._type="infinite",super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:s}=t,r=super.createResult(t,e),{isFetching:i,isRefetching:n,isError:a,isRefetchError:u}=r,o=s.fetchMeta?.fetchMore?.direction,c=a&&o==="forward",h=i&&o==="forward",d=a&&o==="backward",l=i&&o==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ye(e,s.data),hasPreviousPage:ve(e,s.data),isFetchNextPageError:c,isFetchingNextPage:h,isFetchPreviousPageError:d,isFetchingPreviousPage:l,isRefetchError:u&&!c&&!d,isRefetching:n&&!h&&!l}}},Oe=class extends At{#e;#t;#s;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#t=[],this.state=t.state||jt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_t({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(n,a)=>{this.#i({type:"failed",failureCount:n,error:a})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)e();else{this.#i({type:"pending",variables:t,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const a=await this.options.onMutate?.(t,s);a!==this.state.context&&this.#i({type:"pending",context:a,variables:t,isPaused:i})}const n=await this.#r.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#i({type:"success",data:n}),n}catch(n){try{await this.#s.config.onError?.(n,t,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onError?.(n,t,this.state.context,s)}catch(a){Promise.reject(a)}try{await this.#s.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,n,t,this.state.context,s)}catch(a){Promise.reject(a)}throw this.#i({type:"error",error:n}),n}finally{this.#s.runNext(this)}}#i(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),g.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function jt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Se=class extends I{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#s=0}#e;#t;#s;build(t,e,s){const r=new Oe({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(r),r}add(t){this.#e.add(t);const e=B(t);if(typeof e=="string"){const s=this.#t.get(e);s?s.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=B(t);if(typeof e=="string"){const s=this.#t.get(e);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=B(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=B(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){g.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>yt(e,s))}findAll(t={}){return this.getAll().filter(e=>yt(t,e))}notify(t){g.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return g.batch(()=>Promise.all(t.map(e=>e.continue().catch(O))))}};function B(t){return t.options.scope?.id}var we=class extends I{#e;#t=void 0;#s;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#e.defaultMutationOptions(t),x(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&T(e.mutationKey)!==T(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#n()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){const t=this.#s?.state??jt();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){g.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(t.data,null,e,s,r)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(void 0,t.error,e,s,r)}catch(i){Promise.reject(i)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function Pt(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function Pe(t,e,s){const r=t.slice(0);return r[e]=s,r}var Re=class extends I{#e;#t;#s;#r;#i;#n;#o;#a;#c;#u=[];constructor(t,e,s){super(),this.#e=t,this.#r=s,this.#s=[],this.#i=[],this.#t=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(t=>{t.subscribe(e=>{this.#y(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(t=>{t.destroy()})}setQueries(t,e){this.#s=t,this.#r=e,g.batch(()=>{const s=this.#i,r=this.#h(this.#s);r.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const i=r.map(h=>h.observer),n=i.map(h=>h.getCurrentResult()),a=s.length!==i.length,u=i.some((h,d)=>h!==s[d]),o=a||u,c=o?!0:n.some((h,d)=>{const l=this.#t[d];return!l||!x(h,l)});!o&&!c||(o&&(this.#u=r,this.#i=i),this.#t=n,this.hasListeners()&&(o&&(Pt(s,i).forEach(h=>{h.destroy()}),Pt(i,s).forEach(h=>{h.subscribe(d=>{this.#y(h,d)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(t=>t.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(t,e){const s=this.#h(t),r=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[r,n=>this.#l(n??r,e,i),()=>this.#d(r,s)]}#d(t,e){return e.map((s,r)=>{const i=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(a=>{a.observer.trackProp(n)})})})}#l(t,e,s){if(e){const r=this.#c,i=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((n,a)=>n!==r[a]));return(!this.#n||this.#t!==this.#a||i||e!==this.#o)&&(this.#o=e,this.#a=this.#t,s!==void 0&&(this.#c=s),this.#n=$(this.#n,e(t))),this.#n}return t}#p(){return this.#r?.combine!==void 0&&this.#i.some((t,e)=>t.options.suspense&&this.#t[e]?.data===void 0)}#h(t){const e=new Map;this.#i.forEach(r=>{const i=r.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(r):e.set(i,[r])});const s=[];return t.forEach(r=>{const i=this.#e.defaultQueryOptions(r),a=e.get(i.queryHash)?.shift()??new k(this.#e,i);s.push({defaultedQueryOptions:i,observer:a})}),s}#y(t,e){const s=this.#i.indexOf(t);s!==-1&&(this.#t=Pe(this.#t,s,e),this.#f())}#f(){if(this.hasListeners()){const t=this.#d(this.#t,this.#u),e=this.#p(),s=this.#n,r=e?s:this.#l(t,this.#r?.combine);(e||s!==r)&&g.batch(()=>{this.listeners.forEach(i=>{i(this.#t)})})}}},Ce=class extends I{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,s){const r=e.queryKey,i=e.queryHash??ut(r,e);let n=this.get(i);return n||(n=new me({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(n)),n}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){g.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>pt(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>pt(t,s)):e}notify(t){g.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){g.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){g.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ae=class{#e;#t;#s;#r;#i;#n;#o;#a;constructor(t={}){this.#e=t.queryCache||new Ce,this.#t=t.mutationCache||new Se,this.#s=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#o=ot.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=z.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#e.build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(F(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>{const r=s.data;return[e,r]})}setQueryData(t,e,s){const r=this.defaultQueryOptions({queryKey:t}),n=this.#e.get(r.queryHash)?.state.data,a=te(e,n);if(a!==void 0)return this.#e.build(this,r).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return g.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;g.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return g.batch(()=>(s.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},r=g.batch(()=>this.#e.findAll(t).map(i=>i.cancel(s)));return Promise.all(r).then(O).catch(O)}invalidateQueries(t,e={}){return g.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=g.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let n=i.fetch(void 0,s);return s.throwOnError||(n=n.catch(O)),i.state.fetchStatus==="paused"?Promise.resolve():n}));return Promise.all(r).then(O)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(F(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(O).catch(O)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(O).catch(O)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return z.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(T(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(r=>{q(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){this.#i.set(T(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(r=>{q(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ut(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ht&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function qe({streamFn:t,refetchMode:e="reset",reducer:s=(i,n)=>Ft(i,n),initialValue:r=[]}){return async i=>{const n=i.client.getQueryCache().find({queryKey:i.queryKey,exact:!0}),a=!!n&&n.isFetched();a&&e==="reset"&&n.setState({...n.resetState,fetchStatus:"fetching"});let u=r,o=!1;const c=Dt({client:i.client,meta:i.meta,queryKey:i.queryKey,pageParam:i.pageParam,direction:i.direction},()=>i.signal,()=>o=!0),h=await t(c),d=a&&e==="replace";for await(const l of h){if(o)break;d?u=s(u,l):i.client.setQueryData(i.queryKey,y=>s(y===void 0?r:y,l))}return d&&!o&&i.client.setQueryData(i.queryKey,u),i.client.getQueryData(i.queryKey)??r}}var xe=Symbol("dataTagSymbol"),Ue=Symbol("dataTagErrorSymbol"),je=Symbol("unsetMarker"),kt=nt(void 0),E=t=>{const e=at(kt);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ke=({client:t,children:e})=>(M(()=>(t.mount(),()=>{t.unmount()}),[t]),Qt(kt.Provider,{value:t,children:e})),Kt=nt(!1),Lt=()=>at(Kt),Ke=Kt.Provider;function Nt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Ht=nt(Nt()),Bt=()=>at(Ht),Le=({children:t})=>{const[e]=W(()=>Nt());return Qt(Ht.Provider,{value:e,children:typeof t=="function"?t(e):t})},zt=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?ct(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Gt=t=>{M(()=>{t.clearReset()},[t])},Wt=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||ct(s,[t.error,r])),ft=(t,e)=>e.state.data===void 0,$t=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Qe=(t,e)=>t.isLoading&&t.isFetching&&!e,rt=(t,e)=>t?.suspense&&e.isPending,it=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function Ee({queries:t,...e},s){const r=E(s),i=Lt(),n=Bt(),a=Ct(()=>t.map(f=>{const p=r.defaultQueryOptions(f);return p._optimisticResults=i?"isRestoring":"optimistic",p}),[t,r,i]);a.forEach(f=>{$t(f);const p=r.getQueryCache().get(f.queryHash);zt(f,n,p)}),Gt(n);const[u]=W(()=>new Re(r,a,e)),[o,c,h]=u.getOptimisticResult(a,e.combine),d=!i&&e.subscribed!==!1;j(_(f=>d?u.subscribe(g.batchCalls(f)):O,[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),M(()=>{u.setQueries(a,e)},[a,e,u]);const y=o.some((f,p)=>rt(a[p],f))?o.flatMap((f,p)=>{const v=a[p];if(v&&rt(v,f)){const b=new k(r,v);return it(v,b,n)}return[]}):[];if(y.length>0)throw Promise.all(y);const m=o.find((f,p)=>{const v=a[p];return v&&Wt({result:f,errorResetBoundary:n,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(m?.error)throw m.error;return c(h())}function V(t,e,s){const r=Lt(),i=Bt(),n=E(s),a=n.defaultQueryOptions(t);n.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=n.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",$t(a),zt(a,i,u),Gt(i);const o=!n.getQueryCache().get(a.queryHash),[c]=W(()=>new e(n,a)),h=c.getOptimisticResult(a),d=!r&&t.subscribed!==!1;if(j(_(l=>{const y=d?c.subscribe(g.batchCalls(l)):O;return c.updateResult(),y},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),M(()=>{c.setOptions(a)},[a,c]),rt(a,h))throw it(a,c,i);if(Wt({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;return n.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!U.isServer()&&Qe(h,r)&&(o?it(a,c,i):u?.promise)?.catch(O).finally(()=>{c.updateResult()}),a.notifyOnChangeProps?h:c.trackResult(h)}function Ne(t,e){return V(t,k,e)}function He(t,e){return V({...t,enabled:!0,suspense:!0,throwOnError:ft,placeholderData:void 0},k,e)}function Be(t,e){return V({...t,enabled:!0,suspense:!0,throwOnError:ft},Ut,e)}function ze(t,e){return Ee({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:ft,enabled:!0,placeholderData:void 0}))},e)}function Ge(t,e){const s=E(e);s.getQueryState(t.queryKey)||s.prefetchQuery(t)}function We(t,e){const s=E(e);s.getQueryState(t.queryKey)||s.prefetchInfiniteQuery(t)}function $e(t){return t}function Ve(t){return t}var Je=({children:t,options:e={},state:s,queryClient:r})=>{const i=E(r),n=J(e);M(()=>{n.current=e});const a=Ct(()=>{if(s){if(typeof s!="object")return;const u=i.getQueryCache(),o=s.queries||[],c=[],h=[];for(const d of o){const l=u.get(d.queryHash);l?(d.state.dataUpdatedAt>l.state.dataUpdatedAt||d.promise&&l.state.status!=="pending"&&l.state.fetchStatus!=="fetching"&&d.dehydratedAt!==void 0&&d.dehydratedAt>l.state.dataUpdatedAt)&&h.push(d):c.push(d)}if(c.length>0&>(i,{queries:c},n.current),h.length>0)return h}},[i,s]);return M(()=>{a&>(i,{queries:a},n.current)},[i,a]),t};function Ze(t,e){const s=E(e),r=s.getQueryCache();return j(_(i=>r.subscribe(g.batchCalls(i)),[r]),()=>s.isFetching(t),()=>s.isFetching(t))}function Xe(t,e){const s=E(e);return Fe({filters:{...t,status:"pending"}},s).length}function Rt(t,e){return t.findAll(e.filters).map(s=>e.select?e.select(s):s.state)}function Fe(t={},e){const s=E(e).getMutationCache(),r=J(t),i=J(null);return i.current===null&&(i.current=Rt(s,t)),M(()=>{r.current=t}),j(_(n=>s.subscribe(()=>{const a=$(i.current,Rt(s,r.current));i.current!==a&&(i.current=a,g.schedule(n))}),[s]),()=>i.current,()=>i.current)}function Ye(t,e){const s=E(e),[r]=W(()=>new we(s,t));M(()=>{r.setOptions(t)},[r,t]);const i=j(_(a=>r.subscribe(g.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),n=_((a,u)=>{r.mutate(a,u).catch(O)},[r]);if(i.error&&ct(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}function ts(t){return t}function es(t,e){return V(t,Ut,e)}export{G as CancelledError,Je as HydrationBoundary,Ut as InfiniteQueryObserver,Ke as IsRestoringProvider,Oe as Mutation,Se as MutationCache,we as MutationObserver,Re as QueriesObserver,me as Query,Ce as QueryCache,Ae as QueryClient,kt as QueryClientContext,ke as QueryClientProvider,Le as QueryErrorResetBoundary,k as QueryObserver,Ue as dataTagErrorSymbol,xe as dataTagSymbol,ce as defaultScheduler,oe as defaultShouldDehydrateMutation,ue as defaultShouldDehydrateQuery,Ie as dehydrate,U as environmentManager,qe as experimental_streamedQuery,ot as focusManager,T as hashKey,gt as hydrate,Ve as infiniteQueryOptions,_e as isCancelledError,Yt as isServer,Te as keepPreviousData,yt as matchMutation,pt as matchQuery,ts as mutationOptions,O as noop,g as notifyManager,z as onlineManager,q as partialMatchKey,$e as queryOptions,$ as replaceEqualDeep,ct as shouldThrowError,ht as skipToken,D as timeoutManager,je as unsetMarker,es as useInfiniteQuery,Ze as useIsFetching,Xe as useIsMutating,Lt as useIsRestoring,Ye as useMutation,Fe as useMutationState,We as usePrefetchInfiniteQuery,Ge as usePrefetchQuery,Ee as useQueries,Ne as useQuery,E as useQueryClient,Bt as useQueryErrorResetBoundary,Be as useSuspenseInfiniteQuery,ze as useSuspenseQueries,He as useSuspenseQuery};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}},u={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var v=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),D=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),G=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),g=Symbol.iterator;function B(t){return t===null||typeof t!="object"?null:(t=g&&t[g]||t["@@iterator"],typeof t=="function"?t:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,P={};function l(t,e,r){this.props=t,this.context=e,this.refs=P,this.updater=r||h}l.prototype.isReactComponent={};l.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function H(){}H.prototype=l.prototype;function T(t,e,r){this.props=t,this.context=e,this.refs=P,this.updater=r||h}var m=T.prototype=new H;m.constructor=T;j(m,l.prototype);m.isPureReactComponent=!0;var d=Array.isArray;function E(){}var i={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function R(t,e,r){var n=r.ref;return{$$typeof:v,type:t,key:e,ref:n!==void 0?n:null,props:r}}function W(t,e){return R(t.type,e,t.props)}function C(t){return typeof t=="object"&&t!==null&&t.$$typeof===v}function Q(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var A=/\/+/g;function y(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Q(""+t.key):e.toString(36)}function X(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(E,E):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function a(t,e,r,n,o){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var f=!1;if(t===null)f=!0;else switch(s){case"bigint":case"string":case"number":f=!0;break;case"object":switch(t.$$typeof){case v:case I:f=!0;break;case O:return f=t._init,a(f(t._payload),e,r,n,o)}}if(f)return o=o(t),f=n===""?"."+y(t,0):n,d(o)?(r="",f!=null&&(r=f.replace(A,"$&/")+"/"),a(o,e,r,"",function(Y){return Y})):o!=null&&(C(o)&&(o=W(o,r+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+f)),e.push(o)),1;f=0;var p=n===""?".":n+":";if(d(t))for(var c=0;c<t.length;c++)n=t[c],s=p+y(n,c),f+=a(n,e,r,s,o);else if(c=B(t),typeof c=="function")for(t=c.call(t),c=0;!(n=t.next()).done;)n=n.value,s=p+y(n,c++),f+=a(n,e,r,s,o);else if(s==="object"){if(typeof t.then=="function")return a(X(t),e,r,n,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return f}function _(t,e,r){if(t==null)return t;var n=[],o=0;return a(t,n,"","",function(s){return e.call(r,s,o++)}),n}function Z(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var S=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},J={map:_,forEach:function(t,e,r){_(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return _(t,function(){e++}),e},toArray:function(t){return _(t,function(e){return e})||[]},only:function(t){if(!C(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};u.Activity=K;u.Children=J;u.Component=l;u.Fragment=b;u.Profiler=L;u.PureComponent=T;u.StrictMode=k;u.Suspense=z;u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i;u.__COMPILER_RUNTIME={__proto__:null,c:function(t){return i.H.useMemoCache(t)}};u.cache=function(t){return function(){return t.apply(null,arguments)}};u.cacheSignal=function(){return null};u.cloneElement=function(t,e,r){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var n=j({},t.props),o=t.key;if(e!=null)for(s in e.key!==void 0&&(o=""+e.key),e)!$.call(e,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&e.ref===void 0||(n[s]=e[s]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var f=Array(s),p=0;p<s;p++)f[p]=arguments[p+2];n.children=f}return R(t.type,o,n)};u.createContext=function(t){return t={$$typeof:D,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:U,_context:t},t};u.createElement=function(t,e,r){var n,o={},s=null;if(e!=null)for(n in e.key!==void 0&&(s=""+e.key),e)$.call(e,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(o[n]=e[n]);var f=arguments.length-2;if(f===1)o.children=r;else if(1<f){for(var p=Array(f),c=0;c<f;c++)p[c]=arguments[c+2];o.children=p}if(t&&t.defaultProps)for(n in f=t.defaultProps,f)o[n]===void 0&&(o[n]=f[n]);return R(t,s,o)};u.createRef=function(){return{current:null}};u.forwardRef=function(t){return{$$typeof:q,render:t}};u.isValidElement=C;u.lazy=function(t){return{$$typeof:O,_payload:{_status:-1,_result:t},_init:Z}};u.memo=function(t,e){return{$$typeof:G,type:t,compare:e===void 0?null:e}};u.startTransition=function(t){var e=i.T,r={};i.T=r;try{var n=t(),o=i.S;o!==null&&o(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(E,S)}catch(s){S(s)}finally{e!==null&&r.types!==null&&(e.types=r.types),i.T=e}};u.unstable_useCacheRefresh=function(){return i.H.useCacheRefresh()};u.use=function(t){return i.H.use(t)};u.useActionState=function(t,e,r){return i.H.useActionState(t,e,r)};u.useCallback=function(t,e){return i.H.useCallback(t,e)};u.useContext=function(t){return i.H.useContext(t)};u.useDebugValue=function(){};u.useDeferredValue=function(t,e){return i.H.useDeferredValue(t,e)};u.useEffect=function(t,e){return i.H.useEffect(t,e)};u.useEffectEvent=function(t){return i.H.useEffectEvent(t)};u.useId=function(){return i.H.useId()};u.useImperativeHandle=function(t,e,r){return i.H.useImperativeHandle(t,e,r)};u.useInsertionEffect=function(t,e){return i.H.useInsertionEffect(t,e)};u.useLayoutEffect=function(t,e){return i.H.useLayoutEffect(t,e)};u.useMemo=function(t,e){return i.H.useMemo(t,e)};u.useOptimistic=function(t,e){return i.H.useOptimistic(t,e)};u.useReducer=function(t,e,r){return i.H.useReducer(t,e,r)};u.useRef=function(t){return i.H.useRef(t)};u.useState=function(t){return i.H.useState(t)};u.useSyncExternalStore=function(t,e,r){return i.H.useSyncExternalStore(t,e,r)};u.useTransition=function(){return i.H.useTransition()};u.version="19.2.5";w.exports=u;var N=w.exports;const V=x(N),tt=M({__proto__:null,default:V},[N]);export{tt as i};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as _}from"./__mfe_internal__rimori_mf_2_scenario_mf_2_host__loadShare__react__loadShare__.js_commonjs-proxy.js";function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(r,e){for(var t=0;t<e.length;t++){const a=e[t];if(typeof a!="string"&&!Array.isArray(a)){for(const c in a)if(c!=="default"&&!(c in r)){const g=Object.getOwnPropertyDescriptor(a,c);g&&Object.defineProperty(r,c,g.get?g:{enumerable:!0,get:()=>a[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var s={exports:{}},i={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-dom.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var O=_;function d(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var n={d:{f,r:function(){throw Error(d(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},S=Symbol.for("react.portal");function E(r,e,t){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:a==null?null:""+a,children:r,containerInfo:e,implementation:t}}var u=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n;i.createPortal=function(r,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(d(299));return E(r,e,null,t)};i.flushSync=function(r){var e=u.T,t=n.p;try{if(u.T=null,n.p=2,r)return r()}finally{u.T=e,n.p=t,n.d.f()}};i.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,n.d.C(r,e))};i.prefetchDNS=function(r){typeof r=="string"&&n.d.D(r)};i.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var t=e.as,a=y(t,e.crossOrigin),c=typeof e.integrity=="string"?e.integrity:void 0,g=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;t==="style"?n.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:a,integrity:c,fetchPriority:g}):t==="script"&&n.d.X(r,{crossOrigin:a,integrity:c,fetchPriority:g,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};i.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var t=y(e.as,e.crossOrigin);n.d.M(r,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&n.d.M(r)};i.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var t=e.as,a=y(t,e.crossOrigin);n.d.L(r,t,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};i.preloadModule=function(r,e){if(typeof r=="string")if(e){var t=y(e.as,e.crossOrigin);n.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else n.d.m(r)};i.requestFormReset=function(r){n.d.r(r)};i.unstable_batchedUpdates=function(r,e){return r(e)};i.useFormState=function(r,e,t){return u.H.useFormState(r,e,t)};i.useFormStatus=function(){return u.H.useHostTransitionStatus()};i.version="19.2.5";function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}l(),s.exports=i;var o=s.exports;const T=m(o),p=v({__proto__:null,default:T},[o]);export{p as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var _e;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(_e||(_e={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$e=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class w extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;f<i.path.length;){const l=i.path[f];f===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(t(i))):o[l]=o[l]||{_errors:[]},o=o[l],f++}}};return a(this),r}static assert(e){if(!(e instanceof w))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}w.create=s=>new w(s);const W=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let Se=W;function Me(s){Se=s}function ce(){return Se}const de=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(l=>!!l).slice().reverse();for(const l of f)o=l(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}},Ve=[];function d(s,e){const t=ce(),r=de({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===W?void 0:W].filter(a=>!!a)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return p;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return p;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const p=Object.freeze({status:"aborted"}),B=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),ge=s=>s.status==="aborted",ve=s=>s.status==="dirty",z=s=>s.status==="valid",Y=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(h||(h={}));class N{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const we=(s,e)=>{if(z(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new w(s.common.issues);return this._error=t,this._error}}};function y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class _{get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Y(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parseSync({data:e,path:r.path,parent:r});return we(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return z(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>z(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(Y(a)?a:Promise.resolve(a));return we(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:c.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new O({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return A.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return S.create(this)}promise(){return J.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return K.create(this,e,this._def)}transform(e){return new O({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new ke({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return oe.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pe=/^c[^\s-]{8,}$/i,ze=/^[0-9a-z]+$/,Le=/^[0-9A-HJKMNP-TV-Z]{26}$/i,De=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ue=/^[a-z0-9_-]{21}$/i,Be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Fe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,We=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ye;const Je=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ye=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,He=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ge=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Oe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ke=new RegExp(`^${Oe}$`);function Ae(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function et(s){return new RegExp(`^${Ae(s)}$`)}function Ne(s){let e=`${Oe}T${Ae(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function tt(s,e){return!!((e==="v4"||!e)&&Je.test(s)||(e==="v6"||!e)&&He.test(s))}function st(s,e){if(!Be.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function rt(s,e){return!!((e==="v4"||!e)&&Ye.test(s)||(e==="v6"||!e)&&Ge.test(s))}class C extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),p}const r=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.length<n.value;(i||o)&&(a=this._getOrReturnCtx(e,a),i?d(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):o&&d(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")We.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"email",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")ye||(ye=new RegExp(qe,"u")),ye.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"emoji",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")De.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"uuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ue.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cuid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")ze.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Le.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"ulid",code:c.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),d(a,{validation:"url",code:c.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"regex",code:c.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Ne(n).test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Ke.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?et(n).test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{code:c.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?Fe.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"duration",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?tt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"ip",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?st(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"jwt",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?rt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"cidr",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?Qe.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"base64",code:c.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Xe.test(e.data)||(a=this._getOrReturnCtx(e,a),d(a,{validation:"base64url",code:c.invalid_string,message:n.message}),r.dirty()):v.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...h.errToObj(r)})}_addCheck(e){return new C({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...h.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new C({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new C({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}C.create=s=>new C({checks:[],typeName:m.ZodString,coerce:s?.coerce??!1,...y(s)});function at(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class I extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),p}let r;const a=new k;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?at(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new I({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}I.create=s=>new I({checks:[],typeName:m.ZodNumber,coerce:s?.coerce||!1,...y(s)});class $ extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}$.create=s=>new $({checks:[],typeName:m.ZodBigInt,coerce:s?.coerce??!1,...y(s)});class H extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),p}return b(e.data)}}H.create=s=>new H({typeName:m.ZodBoolean,coerce:s?.coerce||!1,...y(s)});class L extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),p}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return d(n,{code:c.invalid_date}),p}const r=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),d(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}L.create=s=>new L({checks:[],coerce:s?.coerce||!1,typeName:m.ZodDate,...y(s)});class ue extends _{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),p}return b(e.data)}}ue.create=s=>new ue({typeName:m.ZodSymbol,...y(s)});class G extends _{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),p}return b(e.data)}}G.create=s=>new G({typeName:m.ZodUndefined,...y(s)});class Q extends _{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),p}return b(e.data)}}Q.create=s=>new Q({typeName:m.ZodNull,...y(s)});class q extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}q.create=s=>new q({typeName:m.ZodAny,...y(s)});class P extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}P.create=s=>new P({typeName:m.ZodUnknown,...y(s)});class E extends _{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),p}}E.create=s=>new E({typeName:m.ZodNever,...y(s)});class le extends _{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),p}return b(e.data)}}le.create=s=>new le({typeName:m.ZodVoid,...y(s)});class S extends _{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),p;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(i||o)&&(d(t,{code:i?c.too_big:c.too_small,minimum:o?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(d(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(d(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new N(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new N(t,i,t.path,o)));return k.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new S({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new S({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new S({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}S.create=(s,e)=>new S({type:s,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function U(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=A.create(U(r))}return new x({...s._def,shape:()=>e})}else return s instanceof S?new S({...s._def,type:U(s.element)}):s instanceof A?A.create(U(s.unwrap())):s instanceof V?V.create(U(s.unwrap())):s instanceof Z?Z.create(s.items.map(e=>U(e))):s}class x extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const l=this._getOrReturnCtx(e);return d(l,{code:c.invalid_type,expected:u.object,received:l.parsedType}),p}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(const l in a.data)i.includes(l)||o.push(l);const f=[];for(const l of i){const g=n[l],T=a.data[l];f.push({key:{status:"valid",value:l},value:g._parse(new N(a,T,a.path,l)),alwaysSet:l in a.data})}if(this._def.catchall instanceof E){const l=this._def.unknownKeys;if(l==="passthrough")for(const g of o)f.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(l==="strict")o.length>0&&(d(a,{code:c.unrecognized_keys,keys:o}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const g of o){const T=a.data[g];f.push({key:{status:"valid",value:g},value:l._parse(new N(a,T,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const l=[];for(const g of f){const T=await g.key,be=await g.value;l.push({key:T,value:be,alwaysSet:g.alwaysSet})}return l}).then(l=>k.mergeObjectSync(r,l)):k.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof A;)n=n._def.innerType;t[r]=n}return new x({...this._def,shape:()=>t})}keyof(){return Ze(v.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,...y(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,...y(e)});class X extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new w(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){const l={...t,common:{...t.common,issues:[]},parent:null},g=f._parseSync({data:t.data,path:t.path,parent:l});if(g.status==="valid")return g;g.status==="dirty"&&!n&&(n={result:g,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new w(f));return d(t,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}X.create=(s,e)=>new X({options:s,typeName:m.ZodUnion,...y(e)});const R=s=>s instanceof te?R(s.schema):s instanceof O?R(s.innerType()):s instanceof se?[s.value]:s instanceof M?s.options:s instanceof re?v.objectValues(s.enum):s instanceof ae?R(s._def.innerType):s instanceof G?[void 0]:s instanceof Q?[null]:s instanceof A?[void 0,...R(s.unwrap())]:s instanceof V?[null,...R(s.unwrap())]:s instanceof ke||s instanceof ie?R(s.unwrap()):s instanceof ne?R(s._def.innerType):[];class pe extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return d(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),p;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(d(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=R(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new pe({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...y(r)})}}function xe(s,e){const t=j(s),r=j(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=xe(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],o=e[n],f=xe(i,o);if(!f.valid)return{valid:!1};a.push(f.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class K extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(ge(n)||ge(i))return p;const o=xe(n.value,i.value);return o.valid?((ve(n)||ve(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}K.create=(s,e,t)=>new K({left:s,right:e,typeName:m.ZodIntersection,...y(t)});class Z extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return d(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new N(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:s,typeName:m.ZodTuple,rest:null,...y(e)})};class ee extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return d(r,{code:c.invalid_type,expected:u.object,received:r.parsedType}),p;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new N(r,o,r.path,o)),value:i._parse(new N(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?k.mergeObjectAsync(t,a):k.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof _?new ee({keyType:e,valueType:t,typeName:m.ZodRecord,...y(r)}):new ee({keyType:C.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class fe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),p;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],l)=>({key:a._parse(new N(r,o,r.path,[l,"key"])),value:n._parse(new N(r,f,r.path,[l,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const l=await f.key,g=await f.value;if(l.status==="aborted"||g.status==="aborted")return p;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const l=f.key,g=f.value;if(l.status==="aborted"||g.status==="aborted")return p;(l.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(l.value,g.value)}return{status:t.value,value:o}}}}fe.create=(s,e,t)=>new fe({valueType:e,keyType:s,typeName:m.ZodMap,...y(t)});class D extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),p;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(d(r,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(d(r,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const l=new Set;for(const g of f){if(g.status==="aborted")return p;g.status==="dirty"&&t.dirty(),l.add(g.value)}return{status:t.value,value:l}}const o=[...r.data.values()].map((f,l)=>n._parse(new N(r,f,r.path,l)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new D({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new D({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}D.create=(s,e)=>new D({valueType:s,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class F extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return d(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),p;function r(o,f){return de({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ce(),W].filter(l=>!!l),issueData:{code:c.invalid_arguments,argumentsError:f}})}function a(o,f){return de({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ce(),W].filter(l=>!!l),issueData:{code:c.invalid_return_type,returnTypeError:f}})}const n={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof J){const o=this;return b(async function(...f){const l=new w([]),g=await o._def.args.parseAsync(f,n).catch(me=>{throw l.addIssue(r(f,me)),l}),T=await Reflect.apply(i,this,g);return await o._def.returns._def.type.parseAsync(T,n).catch(me=>{throw l.addIssue(a(T,me)),l})})}else{const o=this;return b(function(...f){const l=o._def.args.safeParse(f,n);if(!l.success)throw new w([r(f,l.error)]);const g=Reflect.apply(i,this,l.data),T=o._def.returns.safeParse(g,n);if(!T.success)throw new w([a(g,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new F({...this._def,args:Z.create(e).rest(P.create())})}returns(e){return new F({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new F({args:e||Z.create([]).rest(P.create()),returns:t||P.create(),typeName:m.ZodFunction,...y(r)})}}class te extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}te.create=(s,e)=>new te({getter:s,typeName:m.ZodLazy,...y(e)});class se extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}se.create=(s,e)=>new se({value:s,typeName:m.ZodLiteral,...y(e)});function Ze(s,e){return new M({values:s,typeName:m.ZodEnum,...y(e)})}class M extends _{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:v.joinValues(r),received:t.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),p}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return M.create(e,{...this._def,...t})}exclude(e,t=this._def){return M.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}M.create=Ze;class re extends _{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return d(r,{expected:v.joinValues(a),received:r.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:a}),p}return b(e.data)}get enum(){return this._def.values}}re.create=(s,e)=>new re({values:s,typeName:m.ZodNativeEnum,...y(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),p;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(s,e)=>new J({type:s,typeName:m.ZodPromise,...y(e)});class O extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?p:f.status==="dirty"||t.value==="dirty"?B(f.value):f});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?B(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!z(i))return p;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>z(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):p);v.assertNever(a)}}O.create=(s,e,t)=>new O({schema:s,typeName:m.ZodEffects,effect:e,...y(t)});O.createWithPreprocess=(s,e,t)=>new O({schema:e,effect:{type:"preprocess",transform:s},typeName:m.ZodEffects,...y(t)});class A extends _{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}A.create=(s,e)=>new A({innerType:s,typeName:m.ZodOptional,...y(e)});class V extends _{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(s,e)=>new V({innerType:s,typeName:m.ZodNullable,...y(e)});class ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class ne extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Y(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class he extends _{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),p}return{status:"valid",value:e.data}}}he.create=s=>new he({typeName:m.ZodNaN,...y(s)});const nt=Symbol("zod_brand");class ke extends _{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class oe extends _{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),B(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new oe({in:e,out:t,typeName:m.ZodPipeline})}}class ie extends _{_parse(e){const t=this._def.innerType._parse(e),r=a=>(z(a)&&(a.value=Object.freeze(a.value)),a);return Y(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:m.ZodReadonly,...y(e)});function Te(s,e){const t=typeof s=="function"?s(e):typeof s=="string"?{message:s}:s;return typeof t=="string"?{message:t}:t}function Re(s,e={},t){return s?q.create().superRefine((r,a)=>{const n=s(r);if(n instanceof Promise)return n.then(i=>{if(!i){const o=Te(e,r),f=o.fatal??t??!0;a.addIssue({code:"custom",...o,fatal:f})}});if(!n){const i=Te(e,r),o=i.fatal??t??!0;a.addIssue({code:"custom",...i,fatal:o})}}):q.create()}const it={object:x.lazycreate};var m;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(m||(m={}));const ot=(s,e={message:`Input not instance of ${s.name}`})=>Re(t=>t instanceof s,e),je=C.create,Ee=I.create,ct=he.create,dt=$.create,Ie=H.create,ut=L.create,lt=ue.create,ft=G.create,ht=Q.create,pt=q.create,mt=P.create,yt=E.create,_t=le.create,gt=S.create,vt=x.create,xt=x.strictCreate,kt=X.create,bt=pe.create,wt=K.create,Tt=Z.create,Ct=ee.create,St=fe.create,Ot=D.create,At=F.create,Nt=te.create,Zt=se.create,Rt=M.create,jt=re.create,Et=J.create,Ce=O.create,It=A.create,$t=V.create,Mt=O.createWithPreprocess,Vt=oe.create,Pt=()=>je().optional(),zt=()=>Ee().optional(),Lt=()=>Ie().optional(),Dt={string:s=>C.create({...s,coerce:!0}),number:s=>I.create({...s,coerce:!0}),boolean:s=>H.create({...s,coerce:!0}),bigint:s=>$.create({...s,coerce:!0}),date:s=>L.create({...s,coerce:!0})},Ut=p,Bt=Object.freeze(Object.defineProperty({__proto__:null,BRAND:nt,DIRTY:B,EMPTY_PATH:Ve,INVALID:p,NEVER:Ut,OK:b,ParseStatus:k,Schema:_,ZodAny:q,ZodArray:S,ZodBigInt:$,ZodBoolean:H,ZodBranded:ke,ZodCatch:ne,ZodDate:L,ZodDefault:ae,ZodDiscriminatedUnion:pe,ZodEffects:O,ZodEnum:M,ZodError:w,get ZodFirstPartyTypeKind(){return m},ZodFunction:F,ZodIntersection:K,ZodIssueCode:c,ZodLazy:te,ZodLiteral:se,ZodMap:fe,ZodNaN:he,ZodNativeEnum:re,ZodNever:E,ZodNull:Q,ZodNullable:V,ZodNumber:I,ZodObject:x,ZodOptional:A,ZodParsedType:u,ZodPipeline:oe,ZodPromise:J,ZodReadonly:ie,ZodRecord:ee,ZodSchema:_,ZodSet:D,ZodString:C,ZodSymbol:ue,ZodTransformer:O,ZodTuple:Z,ZodType:_,ZodUndefined:G,ZodUnion:X,ZodUnknown:P,ZodVoid:le,addIssueToContext:d,any:pt,array:gt,bigint:dt,boolean:Ie,coerce:Dt,custom:Re,date:ut,datetimeRegex:Ne,defaultErrorMap:W,discriminatedUnion:bt,effect:Ce,enum:Rt,function:At,getErrorMap:ce,getParsedType:j,instanceof:ot,intersection:wt,isAborted:ge,isAsync:Y,isDirty:ve,isValid:z,late:it,lazy:Nt,literal:Zt,makeIssue:de,map:St,nan:ct,nativeEnum:jt,never:yt,null:ht,nullable:$t,number:Ee,object:vt,get objectUtil(){return _e},oboolean:Lt,onumber:zt,optional:It,ostring:Pt,pipeline:Vt,preprocess:Mt,promise:Et,quotelessJson:$e,record:Ct,set:Ot,setErrorMap:Me,strictObject:xt,string:je,symbol:lt,transformer:Ce,tuple:Tt,undefined:ft,union:kt,unknown:mt,get util(){return v},void:_t},Symbol.toStringTag,{value:"Module"}));export{nt as BRAND,B as DIRTY,Ve as EMPTY_PATH,p as INVALID,Ut as NEVER,b as OK,k as ParseStatus,_ as Schema,q as ZodAny,S as ZodArray,$ as ZodBigInt,H as ZodBoolean,ke as ZodBranded,ne as ZodCatch,L as ZodDate,ae as ZodDefault,pe as ZodDiscriminatedUnion,O as ZodEffects,M as ZodEnum,w as ZodError,m as ZodFirstPartyTypeKind,F as ZodFunction,K as ZodIntersection,c as ZodIssueCode,te as ZodLazy,se as ZodLiteral,fe as ZodMap,he as ZodNaN,re as ZodNativeEnum,E as ZodNever,Q as ZodNull,V as ZodNullable,I as ZodNumber,x as ZodObject,A as ZodOptional,u as ZodParsedType,oe as ZodPipeline,J as ZodPromise,ie as ZodReadonly,ee as ZodRecord,_ as ZodSchema,D as ZodSet,C as ZodString,ue as ZodSymbol,O as ZodTransformer,Z as ZodTuple,_ as ZodType,G as ZodUndefined,X as ZodUnion,P as ZodUnknown,le as ZodVoid,d as addIssueToContext,pt as any,gt as array,dt as bigint,Ie as boolean,Dt as coerce,Re as custom,ut as date,Ne as datetimeRegex,Bt as default,W as defaultErrorMap,bt as discriminatedUnion,Ce as effect,Rt as enum,At as function,ce as getErrorMap,j as getParsedType,ot as instanceof,wt as intersection,ge as isAborted,Y as isAsync,ve as isDirty,z as isValid,it as late,Nt as lazy,Zt as literal,de as makeIssue,St as map,ct as nan,jt as nativeEnum,yt as never,ht as null,$t as nullable,Ee as number,vt as object,_e as objectUtil,Lt as oboolean,zt as onumber,It as optional,Pt as ostring,Vt as pipeline,Mt as preprocess,Et as promise,$e as quotelessJson,Ct as record,Ot as set,Me as setErrorMap,xt as strictObject,je as string,lt as symbol,Ce as transformer,Tt as tuple,ft as undefined,kt as union,mt as unknown,v as util,_t as void,Bt as z};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c(r,s){for(var o=0;o<s.length;o++){const e=s[o];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const n=Object.getOwnPropertyDescriptor(e,t);n&&Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var i={exports:{}},a={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-dev-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var p=Symbol.for("react.fragment");a.Fragment=p;a.jsxDEV=void 0;i.exports=a;var f=i.exports;const m=u(f),v=c({__proto__:null,default:m},[f]);export{v as j};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(s,t){for(var e=0;e<t.length;e++){const r=t[e];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in s)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(s,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var a={exports:{}},n={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var x=Symbol.for("react.transitional.element"),j=Symbol.for("react.fragment");function l(s,t,e){var r=null;if(e!==void 0&&(r=""+e),t.key!==void 0&&(r=""+t.key),"key"in t){e={};for(var o in t)o!=="key"&&(e[o]=t[o])}else e=t;return t=e.ref,{$$typeof:x,type:s,key:r,ref:t!==void 0?t:null,props:e}}n.Fragment=j;n.jsx=l;n.jsxs=l;a.exports=n;var i=a.exports;const d=f(i),_=p({__proto__:null,default:d},[i]);export{_ as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"./preload-helper.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js";const o={"@rimori/client":async()=>await n(()=>import("./index2.js"),[]),"@rimori/react-client":async()=>await n(()=>import("./index3.js"),[]),"@tanstack/react-query":async()=>await n(()=>import("./index4.js"),[]),react:async()=>await n(()=>import("./index5.js").then(t=>t.i),[]),"react-dom":async()=>await n(()=>import("./index6.js").then(t=>t.i),[]),"react/jsx-dev-runtime":async()=>await n(()=>import("./jsx-dev-runtime.js").then(t=>t.j),[]),"react/jsx-runtime":async()=>await n(()=>import("./jsx-runtime.js").then(t=>t.j),[]),zod:async()=>await n(()=>import("./index7.js"),[])},a={"@rimori/client":{name:"@rimori/client",version:"2.5.35",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["@rimori/client"].loaded=!0;const{"@rimori/client":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^2.5.35"}},"@rimori/react-client":{name:"@rimori/react-client",version:"0.4.21",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["@rimori/react-client"].loaded=!0;const{"@rimori/react-client":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^0.4.21"}},"@tanstack/react-query":{name:"@tanstack/react-query",version:"5.100.5",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["@tanstack/react-query"].loaded=!0;const{"@tanstack/react-query":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^5.100.5"}},react:{name:"react",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a.react.loaded=!0;const{react:e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react-dom":{name:"react-dom",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["react-dom"].loaded=!0;const{"react-dom":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react/jsx-dev-runtime":{name:"react/jsx-dev-runtime",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["react/jsx-dev-runtime"].loaded=!0;const{"react/jsx-dev-runtime":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},"react/jsx-runtime":{name:"react/jsx-runtime",version:"19.2.5",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a["react/jsx-runtime"].loaded=!0;const{"react/jsx-runtime":e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^19.2.5"}},zod:{name:"zod",version:"3.25.76",scope:["default"],loaded:!1,from:"__mfe_internal__rimori-scenario-host",async get(){a.zod.loaded=!0;const{zod:e}=o,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"^3.25.76"}}},u=[];export{u as usedRemotes,a as usedShared};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const h="modulepreload",p=function(c){return"/__rimori_harness__/"+c},a={},v=function(u,s,E){let i=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),e=r?.nonce||r?.getAttribute("nonce");i=Promise.allSettled(s.map(t=>{if(t=p(t),t in a)return;a[t]=!0;const o=t.endsWith(".css"),d=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${d}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":h,o||(n.as="script"),n.crossOrigin="",n.href=t,e&&n.setAttribute("nonce",e),document.head.appendChild(n),o)return new Promise((m,f)=>{n.addEventListener("load",m),n.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${t}`)))})}))}function l(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return i.then(r=>{for(const e of r||[])e.status==="rejected"&&l(e.reason);return u().catch(l)})};export{v as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./preload-helper.js";import{g as r,i as a}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__rimori-scenario-host__remoteEntry-_hash_.js";export{r as get,a as init};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Promise.resolve();const e={};export{e as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["localSharedImportMap.js","preload-helper.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as or}from"./preload-helper.js";var sr={},ir={},Rt={},I={},L={},N={};const an="federation-manifest.json",ln=".json",cn="FEDERATION_DEBUG",B={AT:"@",HYPHEN:"-",SLASH:"/"},Le={[B.AT]:"scope_",[B.HYPHEN]:"_",[B.SLASH]:"__"},un={[Le[B.AT]]:B.AT,[Le[B.HYPHEN]]:B.HYPHEN,[Le[B.SLASH]]:B.SLASH},fn=":",dn="mf-manifest.json",hn="mf-stats.json",mn={NPM:"npm",APP:"app"},_n="__MF_DEVTOOLS_MODULE_INFO__",pn="ENCODE_NAME_PREFIX",gn=".federation",En={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};let yn=function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e}({});N.BROWSER_LOG_KEY=cn;N.ENCODE_NAME_PREFIX=pn;N.EncodedNameTransformMap=un;N.FederationModuleManifest=an;N.MANIFEST_EXT=ln;N.MFModuleType=mn;N.MFPrefetchCommon=En;N.MODULE_DEVTOOL_IDENTIFIER=_n;N.ManifestFileName=dn;N.NameTransformMap=Le;N.NameTransformSymbol=B;N.SEPARATOR=fn;N.StatsFileName=hn;N.TEMP_DIR=gn;N.TreeShakingStatus=yn;var ar={},te={},Ot=Object.defineProperty,Sn=(e,t)=>{let r={};for(var n in e)Ot(r,n,{get:e[n],enumerable:!0});return t||Ot(r,Symbol.toStringTag,{value:"Module"}),r};te.__exportAll=Sn;(function(e){var r=te.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(ar);var lr={};(function(e){var r=te.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(lr);var cr={};(function(e){var r=te.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(cr);var ur={};(function(e){var r=te.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(ur);var fr={};(function(e){var r=te.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=te.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var z={},Se={};const bn=N,hr=!0;function mr(){return hr}function Rn(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function Tn(){try{if(mr()&&window.localStorage)return!!localStorage.getItem(bn.BROWSER_LOG_KEY)}catch{return!1}return!1}function In(){return typeof process<"u"&&Se&&Se.FEDERATION_DEBUG?!!Se.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:Tn()}const Nn=function(){return typeof process<"u"&&Se?Se:{}};z.getProcessEnv=Nn;z.isBrowserEnv=mr;z.isBrowserEnvValue=hr;z.isDebugMode=In;z.isReactNativeEnv=Rn;var D={};const y=N,ft=z,_r="[ Federation Runtime ]",Mn=(e,t,r=y.SEPARATOR)=>{const n=e.split(r),o=ft.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(y.MANIFEST_EXT);if(n.length>=2){let[a,...c]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return i(l)?{name:a,entry:l}:{name:a,version:l||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},Pn=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${y.SEPARATOR}${r}`:r:t,""):""},Tt=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${y.NameTransformSymbol.AT}`,"g"),y.NameTransformMap[y.NameTransformSymbol.AT]).replace(new RegExp(`${y.NameTransformSymbol.HYPHEN}`,"g"),y.NameTransformMap[y.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${y.NameTransformSymbol.SLASH}`,"g"),y.NameTransformMap[y.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},vn=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.AT]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.AT]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.SLASH]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.SLASH]]).replace(new RegExp(`${y.NameTransformMap[y.NameTransformSymbol.HYPHEN]}`,"g"),y.EncodedNameTransformMap[y.NameTransformMap[y.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},An=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),Tt(r,"__federation_expose_",t)},On=(e,t)=>e?Tt(e,"__federation_shared_",t):"",$n=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!ft.isBrowserEnv()&&!ft.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},kn=(e,t)=>{e||pr(t)},pr=e=>{throw new Error(`${_r}: ${e}`)},Fn=e=>{console.warn(`${_r}: ${e}`)};function wn(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Ln=/^([\d^=v<>~]|[*xX]$)/;function Dn(e){return Ln.test(e)}D.assert=kn;D.composeKeyWithSeparator=Pn;D.decodeName=vn;D.encodeName=Tt;D.error=pr;D.generateExposeFilename=An;D.generateShareFilename=On;D.getResourceUrl=$n;D.isRequiredVersion=Dn;D.parseEntry=Mn;D.safeToString=wn;D.warn=Fn;var ce={};const ge=N,Z=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function gr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Hn(e,t={}){const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?gr(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=e.remotes?.reduce((p,M)=>{let k;const A=M.federationContainerName;return a.includes(A)?k=n[A]:"version"in M?k=M.version:k=M.entry,p[A]={matchedVersion:k},p},{})||{}),Object.keys(r).forEach(p=>c[p]={matchedVersion:a.includes(p)?n[p]:r[p]});const{remoteEntry:{path:l,name:u,type:f},types:d={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:m,ssrRemoteEntry:_}=e.metaData,{exposes:E}=e;let g={version:o||"",buildVersion:h,globalName:m,remoteEntry:Z(l,u),remoteEntryType:f,remoteTypes:Z(d.path,d.name),remoteTypesZip:d.zip||"",remoteTypesAPI:d.api||"",remotesInfo:c,shared:e?.shared.map(p=>({assets:p.assets,sharedName:p.name,version:p.version,usedExports:p.referenceExports||[]})),modules:E?.map(p=>({moduleName:p.name,modulePath:p.path,assets:p.assets}))};if(e.metaData?.prefetchInterface){const p=e.metaData.prefetchInterface;g={...g,prefetchInterface:p}}if(e.metaData?.prefetchEntry){const{path:p,name:M,type:k}=e.metaData.prefetchEntry;g={...g,prefetchEntry:Z(p,M),prefetchEntryType:k}}if("publicPath"in e.metaData?(s={...g,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...g,getPublicPath:i()},_){const p=Z(_.path,_.name);s.ssrRemoteEntry=p,s.ssrRemoteEntryType=_.type||"commonjs-module"}return s}function Cn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ge.MANIFEST_EXT))}function qn(e){if(!e)return{statsFileName:ge.StatsFileName,manifestFileName:ge.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,c)=>a.replace(n,`${c}${n}`),i=r?o(r):ge.ManifestFileName;return{statsFileName:Z(t,r?s(i,"-stats"):ge.StatsFileName),manifestFileName:Z(t,i)}}ce.generateSnapshotFromManifest=Hn;ce.getManifestFileName=qn;ce.inferAutoPublicPath=gr;ce.isManifestProvider=Cn;ce.simpleJoinRemoteEntry=Z;var ue={};const $t=z,Er="[ Module Federation ]",_e=console,Un=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Gn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
|
|
3
|
+
`),r=t.filter(n=>!Un.some(o=>n.includes(o)));return r.length?`Stack trace:
|
|
4
|
+
${r.slice(0,5).join(`
|
|
5
|
+
`)}`:void 0}catch{return}}var yr=class{constructor(e,t=_e){this.prefix=e,this.delegate=t??_e}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_e}emit(e,t){const r=this.delegate,n=$t.isDebugMode()?Gn():void 0,o=n?[...t,n]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=_e[i];if(typeof a=="function"){a.call(_e,this.prefix,...o);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){$t.isDebugMode()&&this.emit("debug",e)}};function Sr(e){return new yr(e)}function br(e){const t=new yr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Wn(e,t,r){if(e.__mf_infrastructure_logger__&&t?.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const Bn=Sr(Er),Vn=br(Er);ue.bindLoggerToCompiler=Wn;ue.createInfrastructureLogger=br;ue.createLogger=Sr;ue.infrastructureLogger=Vn;ue.logger=Bn;var fe={};const jn=D;async function It(e,t){try{return await e()}catch(r){!t&&jn.warn(r);return}}function Ue(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Rr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const u=s[l],f=u.getAttribute("src");if(f&&Ue(f,e.url)){t=u,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=l?.type==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(n=u.timeout))),t.src||(t.src=e.url),l&&!u&&Object.keys(l).forEach(f=>{t&&(f==="async"||f==="defer"?t[f]=l[f]:t.getAttribute(f)||t.setAttribute(f,l[f]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&Ue(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const c=async(l,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const f=()=>{if(u?.type==="error"){const d=new Error(u?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);d.name="ScriptNetworkError",e?.onErrorCallback&&e?.onErrorCallback(d)}else i?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,It(()=>{const{needDeleteScript:d=!0}=e;d&&t?.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const d=l(u);if(d instanceof Promise){const h=await d;return f(),h}return f(),d}f()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,{type:"error",isTimeout:!0})},n),{script:t,needAttach:r}}function xn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const i=n[s],a=i.getAttribute("href"),c=i.getAttribute("rel");if(a&&Ue(a,e.url)&&c===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let s;const i=e.attrs;e.createLinkHook&&(s=e.createLinkHook(e.url,i),s instanceof HTMLLinkElement&&(t=s)),i&&!s&&Object.keys(i).forEach(a=>{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{i?.type==="error"?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,It(()=>{const{needDeleteLink:c=!0}=e;c&&t?.parentNode&&t.parentNode.removeChild(t)}),s)){const c=s(i);return a(),c}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Xn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Rr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}fe.createLink=xn;fe.createScript=Rr;fe.isStaticResourcesEqual=Ue;fe.loadScript=Xn;fe.safeWrapper=It;var Nt={};const Kn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Yn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};Nt.createScriptNode=Kn;Nt.loadScriptNode=Yn;var Tr={};function zn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}Tr.normalizeOptions=zn;var Ir={};const Jn=e=>e;Ir.createModuleFederationConfig=Jn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N,r=ar,n=lr,o=cr,s=ur,i=fr,a=dr,c=z,l=D,u=ce,f=ue,d=fe,h=Nt,m=Tr,_=Ir;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MFPrefetchCommon=t.MFPrefetchCommon,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=l.assert,e.bindLoggerToCompiler=f.bindLoggerToCompiler,e.composeKeyWithSeparator=l.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=f.createInfrastructureLogger,e.createLink=d.createLink,e.createLogger=f.createLogger,e.createModuleFederationConfig=_.createModuleFederationConfig,e.createScript=d.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=l.decodeName,e.encodeName=l.encodeName,e.error=l.error,e.generateExposeFilename=l.generateExposeFilename,e.generateShareFilename=l.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=c.getProcessEnv,e.getResourceUrl=l.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=f.infrastructureLogger,e.isBrowserEnv=c.isBrowserEnv,e.isBrowserEnvValue=c.isBrowserEnvValue,e.isDebugMode=c.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=c.isReactNativeEnv,e.isRequiredVersion=l.isRequiredVersion,e.isStaticResourcesEqual=d.isStaticResourcesEqual,e.loadScript=d.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=f.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=m.normalizeOptions,e.parseEntry=l.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=l.safeToString,e.safeWrapper=d.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=l.warn})(L);var Nr={},Mt={};const Zn=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,Qn=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(Zn(e)),n&&o.push(`Original Error Message:
|
|
6
|
+
${n}`),o.join(`
|
|
7
|
+
`)};Mt.getShortErrorMsg=Qn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mt;function r(n,o,s,i,a,c){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(Nr);let eo=L,to=Nr;const Q="[ Federation Runtime ]",dt=(0,eo.createLogger)(Q);function ro(e,t,r,n,o){e||(r!==void 0?ht(t,r,n,void 0,o):ht(t))}function ht(e,t,r,n,o){if(t!==void 0)return(0,to.logAndReport)(e,t,r??{},i=>{throw new Error(`${Q}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(Q)||(s.message=`${Q}: ${s.message}`),s):new Error(`${Q}: ${s}`)}function no(e){e instanceof Error&&(e.message.startsWith(Q)||(e.message=`${Q}: ${e.message}`)),dt.warn(e)}I.assert=ro;I.error=ht;I.logger=dt;I.warn=no;var R={};const oo=I;let kt=L;function so(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function io(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ao(e){return typeof e.entry<"u"}function lo(e){return!e.entry.includes(".json")}async function co(e,t){try{return await e()}catch(r){!t&&oo.warn(r);return}}function uo(e){return e&&typeof e=="object"}const Mr=Object.prototype.toString;function fo(e){return Mr.call(e)==="[object Object]"}function ho(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function mo(e){return Array.isArray(e)?e:[e]}function _o(e){const t={url:"",type:"global",globalName:""};return kt.isBrowserEnvValue||(0,kt.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const po=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};R.addUniqueItem=so;R.arrayOptions=mo;R.getFMId=io;R.getRemoteEntryInfoFromSnapshot=_o;R.isObject=uo;R.isPlainObject=fo;R.isPureRemoteEntry=lo;R.isRemoteInfoWithEntry=ao;R.isStaticResourcesEqual=ho;R.objectToString=Mr;R.processModuleAlias=po;R.safeWrapper=co;var S={};const Pr=I,mt=R;let go=L;const v=typeof globalThis=="object"?globalThis:window,H=(()=>{try{return document.defaultView}catch{return v}})(),Eo=H;function De(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function He(e,t){return Object.hasOwnProperty.call(e,t)}He(v,"__GLOBAL_LOADING_REMOTE_ENTRY__")||De(v,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const _t=v.__GLOBAL_LOADING_REMOTE_ENTRY__;function vr(e){He(e,"__VMOK__")&&!He(e,"__FEDERATION__")&&De(e,"__FEDERATION__",e.__VMOK__),He(e,"__FEDERATION__")||(De(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),De(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}vr(v);vr(H);function yo(){v.__FEDERATION__.__GLOBAL_PLUGIN__=[],v.__FEDERATION__.__INSTANCES__=[],v.__FEDERATION__.moduleInfo={},v.__FEDERATION__.__SHARE__={},v.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(_t).forEach(e=>{delete _t[e]})}function So(e){v.__FEDERATION__.__INSTANCES__.push(e)}function bo(){return v.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ro(e,t=(0,go.isDebugMode)()){t&&(v.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,v.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.3.3")}function pt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Pr.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const To=()=>H.__FEDERATION__.moduleInfo,Ar=(e,t)=>{const r=pt(t,mt.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=mt.getFMId(o),i=pt(H.__FEDERATION__.moduleInfo,s).value;if(i?.version===n)return i}},Io=e=>Ar(e,H.__FEDERATION__.moduleInfo),No=(e,t)=>{const r=mt.getFMId(e);return H.__FEDERATION__.moduleInfo[r]=t,H.__FEDERATION__.moduleInfo},Mo=e=>(H.__FEDERATION__.moduleInfo={...H.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete H.__FEDERATION__.moduleInfo[r]}),Po=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:v[r]}},vo=e=>{const{__GLOBAL_PLUGIN__:t}=H.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Pr.warn(`The plugin ${r.name} has been registered.`)})},Ao=()=>H.__FEDERATION__.__GLOBAL_PLUGIN__,Oo=e=>v.__FEDERATION__.__PRELOADED_MAP__.get(e),$o=e=>v.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);S.CurrentGlobal=v;S.Global=Eo;S.addGlobalSnapshot=Mo;S.getGlobalFederationConstructor=bo;S.getGlobalHostPlugins=Ao;S.getGlobalSnapshot=To;S.getGlobalSnapshotInfoByModuleInfo=Io;S.getInfoWithoutType=pt;S.getPreloaded=Oo;S.getRemoteEntryExports=Po;S.getTargetSnapshotInfoByModuleInfo=Ar;S.globalLoading=_t;S.nativeGlobal=H;S.registerGlobalPlugins=vo;S.resetFederationGlobalInfo=yo;S.setGlobalFederationConstructor=Ro;S.setGlobalFederationInstance=So;S.setGlobalSnapshotInfoByModuleInfo=No;S.setPreloaded=$o;var Pt={},re={},G={};const Ft="[0-9A-Za-z-]+",vt=`(?:\\+(${Ft}(?:\\.${Ft})*))`,be="0|[1-9]\\d*",Ce="[0-9]+",Or="\\d*[a-zA-Z-][a-zA-Z0-9-]*",wt=`(?:${Ce}|${Or})`,ko=`(?:-?(${wt}(?:\\.${wt})*))`,Lt=`(?:${be}|${Or})`,$r=`(?:-(${Lt}(?:\\.${Lt})*))`,Ye=`${be}|x|X|\\*`,le=`[v=\\s]*(${Ye})(?:\\.(${Ye})(?:\\.(${Ye})(?:${$r})?${vt}?)?)?`,Fo=`^\\s*(${le})\\s+-\\s+(${le})\\s*$`,wo=`[v=\\s]*${`(${Ce})\\.(${Ce})\\.(${Ce})`}${ko}?${vt}?`,At="((?:<|>)?=?)",Lo=`(\\s*)${At}\\s*(${wo}|${le})`,kr="(?:~>?)",Do=`(\\s*)${kr}\\s+`,Fr="(?:\\^)",Ho=`(\\s*)${Fr}\\s+`,Co="(<|>)?=?\\s*\\*",qo=`^${Fr}${le}$`,Uo=`v?${`(${be})\\.(${be})\\.(${be})`}${$r}?${vt}?`,Go=`^${kr}${le}$`,Wo=`^${At}\\s*${le}$`,Bo=`^${At}\\s*(${Uo})$|^$`,Vo="^\\s*>=\\s*0.0.0\\s*$";G.caret=qo;G.caretTrim=Ho;G.comparator=Bo;G.comparatorTrim=Lo;G.gte0=Vo;G.hyphenRange=Fo;G.star=Co;G.tilde=Go;G.tildeTrim=Do;G.xRange=Wo;const jo=G;function wr(e){return new RegExp(e)}function xo(e){return!e||e.toLowerCase()==="x"||e==="*"}function Xo(...e){return t=>e.reduce((r,n)=>n(r),t)}function Ko(e){return e.match(wr(jo.comparator))}function Yo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}re.combineVersion=Yo;re.extractComparator=Ko;re.isXVersion=xo;re.parseRegex=wr;re.pipe=Xo;var V={};const X=G,b=re;function zo(e){return e.replace(b.parseRegex(X.hyphenRange),(t,r,n,o,s,i,a,c,l,u,f,d)=>(b.isXVersion(n)?r="":b.isXVersion(o)?r=`>=${n}.0.0`:b.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,b.isXVersion(l)?c="":b.isXVersion(u)?c=`<${Number(l)+1}.0.0-0`:b.isXVersion(f)?c=`<${l}.${Number(u)+1}.0-0`:d?c=`<=${l}.${u}.${f}-${d}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Jo(e){return e.replace(b.parseRegex(X.comparatorTrim),"$1$2$3")}function Zo(e){return e.replace(b.parseRegex(X.tildeTrim),"$1~")}function Qo(e){return e.replace(b.parseRegex(X.caretTrim),"$1^")}function es(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.caret),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function ts(e){return e.trim().split(/\s+/).map(t=>t.replace(b.parseRegex(X.tilde),(r,n,o,s,i)=>b.isXVersion(n)?"":b.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:b.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function rs(e){return e.split(/\s+/).map(t=>t.trim().replace(b.parseRegex(X.xRange),(r,n,o,s,i,a)=>{const c=b.isXVersion(o),l=c||b.isXVersion(s),u=l||b.isXVersion(i);return n==="="&&u&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function ns(e){return e.trim().replace(b.parseRegex(X.star),"")}function os(e){return e.trim().replace(b.parseRegex(X.gte0),"")}V.parseCaretTrim=Qo;V.parseCarets=es;V.parseComparatorTrim=Jo;V.parseGTE0=os;V.parseHyphen=zo;V.parseStar=ns;V.parseTildeTrim=Zo;V.parseTildes=ts;V.parseXRanges=rs;var Lr={};function qe(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function ss(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?qe(i,a):-1:1}return 0}function $e(e,t){return qe(e.major,t.major)||qe(e.minor,t.minor)||qe(e.patch,t.patch)||ss(e,t)}function ze(e,t){return e.version===t.version}function is(e,t){switch(e.operator){case"":case"=":return ze(e,t);case">":return $e(e,t)<0;case">=":return ze(e,t)||$e(e,t)<0;case"<":return $e(e,t)>0;case"<=":return ze(e,t)||$e(e,t)>0;case void 0:return!0;default:return!1}}Lr.compare=is;const ie=re,x=V,as=Lr;function ls(e){return ie.pipe(x.parseCarets,x.parseTildes,x.parseXRanges,x.parseStar)(e)}function cs(e){return ie.pipe(x.parseHyphen,x.parseComparatorTrim,x.parseTildeTrim,x.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function us(e,t){if(!e)return!1;const r=ie.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:ie.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a?.split(".")},l=t.split("||");for(const u of l){const f=u.trim();if(!f||f==="*"||f==="x")return!0;try{const d=cs(f);if(!d.trim())return!0;const h=d.split(" ").map(E=>ls(E)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(E=>x.parseGTE0(E)).filter(Boolean);if(m.length===0)continue;let _=!0;for(const E of m){const g=ie.extractComparator(E);if(!g){_=!1;break}const[,p,,M,k,A,T]=g;if(!as.compare({operator:p,version:ie.combineVersion(M,k,A,T),major:M,minor:k,patch:A,preRelease:T?.split(".")},c)){_=!1;break}}if(_)return!0}catch(d){console.error(`[semver] Error processing range part "${f}":`,d);continue}}return!1}Pt.satisfy=us;var C={},ne={};const fs="default",ds="global";ne.DEFAULT_REMOTE_TYPE=ds;ne.DEFAULT_SCOPE=fs;const Ge=I,Dr=R,Hr=S,hs=ne,Ee=Pt;let gt=L;function ms(e,t,r,n){let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{Ge.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&Ge.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e?.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??gt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function _s(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=Dr.arrayOptions(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(ms(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Re(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===gt.TreeShakingStatus.NO_USE?!1:r===gt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?gs(e,t):!0:!1}function ee(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Ee.satisfy(r(e),`<=${r(t)}`)}const Te=(e,t)=>{const r=t||function(n,o){return ee(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},We=e=>!!e.loaded||typeof e.lib=="function",ps=e=>!!e.loading,gs=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Es(e,t,r,n){const o=e[t][r];let s="",i=Re(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!We(o[c].treeShaking)&&ee(c,l):!1:!0:!We(o[c])&&ee(c,l)};if(i){if(s=Te(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Te(e[t][r],a),useTreesShaking:i}}const oe=e=>We(e)||ps(e);function ys(e,t,r,n){const o=e[t][r];let s="",i=Re(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(oe(o[l].treeShaking))return oe(o[c].treeShaking)?!!ee(c,l):!0;if(oe(o[c].treeShaking))return!1}return oe(o[l])?oe(o[c])?!!ee(c,l):!0:oe(o[c])?!1:ee(c,l)};if(i){if(s=Te(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Te(e[t][r],a),useTreesShaking:i}}function Ss(e){return e==="loaded-first"?ys:Es}function bs(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=hs.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(const l of c)if(o&&e[l]&&e[l][t]){const{requiredVersion:u}=o,{version:f,useTreesShaking:d}=Ss(i)(e,l,t,a),h=()=>{const _=e[l][t][f];if(o.singleton){if(typeof u=="string"&&!Ee.satisfy(f,u)){const E=`Version ${f} from ${f&&_.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?Ge.error(E):Ge.warn(E)}return{shared:_,useTreesShaking:d}}else{if(u===!1||u==="*")return{shared:_,useTreesShaking:d};if(Ee.satisfy(f,u))return{shared:_,useTreesShaking:d};const E=Re(a);if(E){for(const[g,p]of Object.entries(e[l][t]))if(Re(p.treeShaking,a?.usedExports)&&Ee.satisfy(g,u))return{shared:p,useTreesShaking:E}}for(const[g,p]of Object.entries(e[l][t]))if(Ee.satisfy(g,u))return{shared:p,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:Hr.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(m)||m).resolver()}}function Rs(){return Hr.Global.__FEDERATION__.__SHARE__}function Ts(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(f=>{l[f.version]=f}),l[Te(l,function(f,d){return!We(l[f])&&ee(f,d)})]},s=r?.resolver??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const u of c)if(u)for(const[f,d]of Object.entries(u)){const h=l[f];i(h)&&i(d)?l[f]=a(h,d):d!==void 0&&(l[f]=d)}return l};return a(s(n[t]),r?.customShareInfo)}const Is=(e,t)=>{e.useIn||(e.useIn=[]),Dr.addUniqueItem(e.useIn,t)};function Ns(e,t){return t&&e.treeShaking?e.treeShaking:e}C.addUseIn=Is;C.directShare=Ns;C.formatShareConfigs=_s;C.getGlobalShareScope=Rs;C.getRegisteredShare=bs;C.getTargetSharedOptions=Ts;C.shouldUseTreeShaking=Re;var de={};function Ms(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Ps(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}de.matchRemote=Ps;de.matchRemoteWithNameAndExpose=Ms;var j={},K={},$={};const vs="RUNTIME-001",As="RUNTIME-002",Os="RUNTIME-003",$s="RUNTIME-004",ks="RUNTIME-005",Fs="RUNTIME-006",ws="RUNTIME-007",Ls="RUNTIME-008",Ds="RUNTIME-009",Hs="RUNTIME-010",Cs="RUNTIME-011",qs="RUNTIME-012",Us="TYPE-001",Gs="BUILD-001",Ws="BUILD-002";$.BUILD_001=Gs;$.BUILD_002=Ws;$.RUNTIME_001=vs;$.RUNTIME_002=As;$.RUNTIME_003=Os;$.RUNTIME_004=$s;$.RUNTIME_005=ks;$.RUNTIME_006=Fs;$.RUNTIME_007=ws;$.RUNTIME_008=Ls;$.RUNTIME_009=Ds;$.RUNTIME_010=Hs;$.RUNTIME_011=Cs;$.RUNTIME_012=qs;$.TYPE_001=Us;var Me={};const F=$,Cr={[F.RUNTIME_001]:"Failed to get remoteEntry exports.",[F.RUNTIME_002]:'The remote entry interface does not contain "init"',[F.RUNTIME_003]:"Failed to get manifest.",[F.RUNTIME_004]:"Failed to locate remote.",[F.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[F.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[F.RUNTIME_007]:"Failed to get remote snapshot.",[F.RUNTIME_008]:"Failed to load script resources.",[F.RUNTIME_009]:"Please call createInstance first.",[F.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[F.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot.",[F.RUNTIME_012]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.'},qr={[F.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Ur={[F.BUILD_001]:"Failed to find expose module.",[F.BUILD_002]:"PublicPath is required in prod mode."},Bs={...Cr,...qr,...Ur};Me.buildDescMap=Ur;Me.errorDescMap=Bs;Me.runtimeDescMap=Cr;Me.typeDescMap=qr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$,r=Mt,n=Me;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.RUNTIME_012=t.RUNTIME_012,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(K);const Ve=I,ae=S,Dt=ne;let Gr=L,Ie=K;const Wr=".then(callbacks[0]).catch(callbacks[1])";async function Vs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Wr}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ve.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function js({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Wr}`)([r,n])}catch(o){Ve.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function xs(e,t,r){const{remoteEntryKey:n,entryExports:o}=ae.getRemoteEntryExports(e,t);return o||Ve.error(Ie.RUNTIME_001,Ie.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function Xs({name:e,globalName:t,entry:r,remoteInfo:n,loaderHook:o,getEntryUrl:s}){const{entryExports:i}=ae.getRemoteEntryExports(e,t);if(i)return i;const a=s?s(r):r;return(0,Gr.loadScript)(a,{attrs:{},createScriptHook:(c,l)=>{const u=o.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:n});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>xs(e,t,r),c=>{const l=c instanceof Error?c.message:String(c);Ve.error(Ie.RUNTIME_008,Ie.runtimeDescMap,{remoteName:e,resourceUrl:a},l)})}async function Ks({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return Vs({entry:o,remoteEntryExports:t});case"system":return js({entry:o,remoteEntryExports:t});default:return Xs({entry:o,globalName:s,name:i,remoteInfo:e,loaderHook:r,getEntryUrl:n})}}function Et(e){const{entry:t,name:r}=e;return(0,Gr.composeKeyWithSeparator)(r,t)}async function Br(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=Et(n);if(r)return r;if(!ae.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;ae.globalLoading[i]=a.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||Ks({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o})).catch(async l=>{const u=Et(n),f=l instanceof Error&&l.message.includes("ScriptExecutionError");if(l instanceof Error&&l.message.includes(Ie.RUNTIME_008)&&!f&&!s){const d=m=>Br({...m,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:d,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:ae.globalLoading,uniqueKey:u});if(h)return h}throw l})}return ae.globalLoading[i]}function Ys(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Dt.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Dt.DEFAULT_SCOPE}}j.getRemoteEntry=Br;j.getRemoteEntryUniqueKey=Et;j.getRemoteInfo=Ys;var Vr={};function zs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Vr.getBuilderId=zs;var jr={};const Js=S;function Zs(e,t){const r=Js.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e?.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}jr.registerPlugins=Zs;var Pe={};function Qs(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function ei(e){const t={};for(const[r,n]of Object.entries(e.shared)){const o=n[0];o&&(t[r]={version:o.version,singleton:o.shareConfig?.singleton,requiredVersion:o.shareConfig?.requiredVersion===!1?!1:o.shareConfig?.requiredVersion,eager:o.eager,strictVersion:o.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?"host":"unknown"},mfConfig:{name:e.name,remotes:e.remotes?.map(Qs)??[],shared:t}}}Pe.optionsToMFContext=ei;var xr={},J={};const ti=I,ri=de,Ht=j;let ye=L;function Xr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...e}}function ni(e,t){return t.map(r=>{const n=ri.matchRemote(e,r.nameOrAlias);return ti.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,ye.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Xr(r)}})}function oi(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function si(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:c}=a,l=t.moduleCache.get(e.name);l?Ht.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}):Ht.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=(0,ye.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=(0,ye.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const a={rel:"preload",as:"script"};s.forEach(c=>{const{link:l,needAttach:u}=(0,ye.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(f,d)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};s.forEach(c=>{const{script:l,needAttach:u}=(0,ye.createScript)({url:c,cb:()=>{},attrs:a,createScriptHook:(f,d)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:f,attrs:d,remoteInfo:e});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}J.defaultPreloadArgs=Xr;J.formatPreloadArgs=ni;J.normalizePreloadExposes=oi;J.preloadAssets=si;const O=S,Ct=C,ii=de,ai=j,li=J,ci={getRegisteredShare:Ct.getRegisteredShare,getGlobalShareScope:Ct.getGlobalShareScope},ui={Global:O.Global,nativeGlobal:O.nativeGlobal,resetFederationGlobalInfo:O.resetFederationGlobalInfo,setGlobalFederationInstance:O.setGlobalFederationInstance,getGlobalFederationConstructor:O.getGlobalFederationConstructor,setGlobalFederationConstructor:O.setGlobalFederationConstructor,getInfoWithoutType:O.getInfoWithoutType,getGlobalSnapshot:O.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:O.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:O.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:O.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:O.addGlobalSnapshot,getRemoteEntryExports:O.getRemoteEntryExports,registerGlobalPlugins:O.registerGlobalPlugins,getGlobalHostPlugins:O.getGlobalHostPlugins,getPreloaded:O.getPreloaded,setPreloaded:O.setPreloaded};var fi={global:ui,share:ci,utils:{matchRemoteWithNameAndExpose:ii.matchRemoteWithNameAndExpose,preloadAssets:li.preloadAssets,getRemoteInfo:ai.getRemoteInfo}};xr.default=fi;var je={};const Je=I,qt=R,di=j,hi=Pe;let mi=L,Ut=K;function _i(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var pi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await di.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return Je.assert(e,`remoteEntryExports is undefined
|
|
8
|
+
${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&Je.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Je.assert(i,`${qt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=qt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};je.Module=pi;var Kr={},he={},gi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};he.SyncHook=gi;var ve={};const Ei=he;var yi=class extends Ei.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};ve.AsyncHook=yi;var me={};const Ze=I,Yr=R,Si=he;function zr(e,t){if(!Yr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var bi=class extends Si.SyncHook{constructor(e){super(),this.onerror=Ze.error,this.type=e}emit(e){Yr.isObject(e)||Ze.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(zr(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Ze.warn(r),this.onerror(r)}return e}};me.SyncWaterfallHook=bi;me.checkReturnData=zr;var Ae={};const Qe=I,Ri=R,Ti=he,Ii=me;var Ni=class extends Ti.SyncHook{constructor(e){super(),this.onerror=Qe.error,this.type=e}emit(e){Ri.isObject(e)||Qe.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(Qe.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(o(e))}return Promise.resolve(e)}};Ae.AsyncWaterfallHook=Ni;var Oe={};const ke=I,Mi=R;var Pi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){ke.assert(Mi.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;ke.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(n=>{const o=e[n];o&&this.lifecycle[n].on(o)}))}removePlugin(e){ke.assert(e,"A name is required.");const t=this.registerPlugins[e];ke.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=Pi;var xe={};const vi=I,yt=R,Ai=J;let Gt=L,Wt=K;function Jr(e,t){const r=yt.getRemoteEntryInfoFromSnapshot(t);r.url||vi.error(Wt.RUNTIME_011,Wt.runtimeDescMap,{remoteName:e.name});let n=(0,Gt.getResourceUrl)(t,r.url);!Gt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Oi(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!yt.isRemoteInfoWithEntry(t)||!yt.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Jr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&Ai.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Jr;xe.snapshotPlugin=Oi;var Zr={};const Ne=R,St=S,$i=C,Bt=J,ki=xe;let Be=L;function Fi(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Qr(e,t,r,n,o={},s){const{value:i}=St.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,Be.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=Fi(l),f=a.remotesInfo[l];Qr(e,{name:u.name,version:f.matchedVersion},r,!1,o,void 0)}}}const et=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function wi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(Qr(n,r,(m,_,E)=>{let g;if(E)g=f;else if(Array.isArray(d)){const T=d.find(w=>w.nameOrAlias===_.name||w.nameOrAlias===_.alias);if(!T)return;g=Bt.defaultPreloadArgs(T)}else if(d===!0)g=f;else return;const p=(0,Be.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);p&&a.push({name:_.name,moduleInfo:{name:_.name,entry:p,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:p});let M="modules"in m?m.modules:[];const k=Bt.normalizePreloadExposes(g.exposes);k.length&&"modules"in m&&(M=m?.modules?.reduce((T,w)=>(k?.indexOf(w.moduleName)!==-1&&T.push(w),T),[]));function A(T){const w=T.map(W=>(0,Be.getResourceUrl)(m,W));return g.filter?w.filter(g.filter):w}if(M){const T=M.length;for(let w=0;w<T;w++){const W=M[w],Ke=`${_.name}/${W.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:W.moduleName==="."?_.name:Ke,name:_.name,remoteSnapshot:m,preloadConfig:g,remote:_,origin:e}),!St.getPreloaded(Ke)&&(g.resourceCategory==="all"?(s.push(...A(W.assets.css.async)),s.push(...A(W.assets.css.sync)),i.push(...A(W.assets.js.async)),i.push(...A(W.assets.js.sync))):g.resourceCategory==="sync"&&(s.push(...A(W.assets.css.sync)),i.push(...A(W.assets.js.sync))),St.setPreloaded(Ke))}}},!0,{},o),o.shared&&o.shared.length>0){const m=(_,E)=>{const{shared:g}=$i.getRegisteredShare(e.shareScopeMap,E.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};g&&typeof g.lib=="function"&&(E.assets.js.sync.forEach(p=>{c.add(p)}),E.assets.css.sync.forEach(p=>{l.add(p)}))};o.shared.forEach(_=>{const E=u.shared?.[_.sharedName];if(!E)return;const g=_.version?E.find(p=>p.version===_.version):E;g&&Ne.arrayOptions(g).forEach(p=>{m(p,_)})})}const h=i.filter(m=>!c.has(m)&&!et("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!et("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!et("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return Be.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ki.assignRemoteInfo(n,i),wi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Zr.generatePreloadAssetsPlugin=Li;var Xe={};const tt=I,Di=R,U=S,Hi=j,Vt=Pe,Ci=ve,rt=Ae,qi=Oe;let nt=L,Fe=K;function en(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var Ui=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new qi.PluginSystem({beforeLoadRemoteSnapshot:new Ci.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new rt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new rt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new rt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,f;if(c)if((0,nt.isManifestProvider)(c)){const d=nt.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(d,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:d},h);u=h,f=m}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=d,f=l}else if(Di.isRemoteInfoWithEntry(e)){const d=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,d),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:d,from:"global"});u=m,f=h}else tt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return en(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{},Hi.getRemoteInfo(t));(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],tt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return tt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,nt.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Xe.SnapshotHandler=Ui;Xe.getGlobalRemoteInfo=en;var tn={};const ot=I,Gi=ne,P=C,jt=Pe,Wi=ve,st=me,xt=Ae,Bi=Oe;let pe=K;var Vi=class{constructor(e){this.hooks=new Bi.PluginSystem({beforeRegisterShare:new st.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Wi.AsyncHook,resolveShare:new st.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new st.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=P.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),this.shareScopeMap[i]?.[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=P.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});ot.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=P.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=P.directShare(s,i);if(a.lib)return P.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),P.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return P.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t?.customShareInfo)return!1;const a=P.shouldUseTreeShaking(o.treeShaking),c=P.directShare(o,a),u=(async()=>{const f=await c.get();c.lib=f,c.loaded=!0,P.addUseIn(c,r.options.name);const{shared:d,useTreesShaking:h}=P.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(d){const m=P.directShare(d,h);m.lib=f,m.loaded=!0,d.from=o.from}return f})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t?.from,o=t?.strategy;let s=t?.initScope;const i=[];if(n!=="build"){const{initTokens:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(d,h)=>{const{version:m,eager:_}=h;l[d]=l[d]||{};const E=l[d],g=E[m]&&P.directShare(E[m]),p=!!(g&&("eager"in g&&g.eager||"shareConfig"in g&&g.shareConfig?.eager));(!g||g.strategy!=="loaded-first"&&!g.loaded&&(!_!=!p?_:c>E[m].from))&&(E[m]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m?.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,n=P.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n?.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=P.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return P.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return P.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&ot.error(t?.from==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,jt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}ot.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,jt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,f=Array.isArray(l)?l:[l],d=h=>{const m=(E,g,p)=>{p&&!E[g]&&(E[g]=p)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];d(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=P.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};tn.SharedHandler=Vi;var rn={};const we=I,q=S,Xt=ne,ji=C,xi=de,it=j,Xi=Pe,Kt=J,Ki=je,Yi=he,se=ve,Yt=me,zi=Ae,Ji=Oe,Zi=Xe;let at=L,zt=K;var Qi=class{constructor(e){this.hooks=new Ji.PluginSystem({beforeRegisterRemote:new Yt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new Yt.SyncWaterfallHook("registerRemote"),beforeRequest:new zi.AsyncWaterfallHook("beforeRequest"),onLoad:new se.AsyncHook("onLoad"),handlePreloadModule:new Yi.SyncHook("handlePreloadModule"),errorLoadRemote:new se.AsyncHook("errorLoadRemote"),beforePreloadRemote:new se.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new se.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new se.AsyncHook,loadEntry:new se.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:f}=i,d=await o.get(u,l,t,f),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?d:void 0,exposeModuleFactory:n?void 0:d,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:d}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Kt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=it.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Kt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t?.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=xi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||we.error(zt.RUNTIME_004,zt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=it.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;we.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let f=t.moduleCache.get(l.name);const d={host:t,remoteInfo:a};return f||(f=new Ki.Module(d),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:d,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));we.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&&at.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Xt.DEFAULT_SCOPE),e.type||(e.type=Xt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,at.warn)(i.join(" ")))}}removeRemote(e){try{const{host:t}=this,{name:r}=e,n=t.options.remotes.findIndex(s=>s.name===r);n!==-1&&t.options.remotes.splice(n,1);const o=t.moduleCache.get(e.name);if(o){const s=o.remoteInfo,i=s.entryGlobalName;q.CurrentGlobal[i]&&(Object.getOwnPropertyDescriptor(q.CurrentGlobal,i)?.configurable?delete q.CurrentGlobal[i]:q.CurrentGlobal[i]=void 0);const a=it.getRemoteEntryUniqueKey(o.remoteInfo);q.globalLoading[a]&&delete q.globalLoading[a],t.snapshotHandler.manifestCache.delete(s.entry);let c=s.buildVersion?(0,at.composeKeyWithSeparator)(s.name,s.buildVersion):s.name;const l=q.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>s.buildVersion?f.options.id===c:f.name===c);if(l!==-1){const f=q.CurrentGlobal.__FEDERATION__.__INSTANCES__[l];c=f.options.id||c;const d=ji.getGlobalShareScope();let h=!0;const m=[];Object.keys(d).forEach(_=>{const E=d[_];E&&Object.keys(E).forEach(g=>{const p=E[g];p&&Object.keys(p).forEach(M=>{const k=p[M];k&&Object.keys(k).forEach(A=>{const T=k[A];T&&typeof T=="object"&&T.from===s.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(w=>w!==s.name),T.useIn.length?h=!1:m.push([_,g,M,A])):m.push([_,g,M,A]))})})})}),h&&(f.shareScopeMap={},delete d[c]),m.forEach(([_,E,g,p])=>{delete d[_]?.[E]?.[g]?.[p]}),q.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(l,1)}const{hostGlobalSnapshot:u}=Zi.getGlobalRemoteInfo(e,t);if(u){const f=u&&"remotesInfo"in u&&u.remotesInfo&&q.getInfoWithoutType(u.remotesInfo,e.name).key;f&&(delete u.remotesInfo[f],q.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete q.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}t.moduleCache.delete(e.name)}}catch(t){we.logger.error(`removeRemote failed: ${t instanceof Error?t.message:String(t)}`)}}};rn.RemoteHandler=Qi;const ea=I,ta=ne,ra=C,na=Vr,oa=jr,sa=j,ia=je,Y=he,lt=ve,aa=me,Jt=Ae,ct=Oe,la=xe,ca=Zr,ua=Xe,fa=tn,da=rn;let ha=L,ut=K;const ma=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var _a=class{constructor(e){this.hooks=new ct.PluginSystem({beforeInit:new aa.SyncWaterfallHook("beforeInit"),init:new Y.SyncHook,beforeInitContainer:new Jt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Jt.AsyncWaterfallHook("initContainer")}),this.version="2.3.3",this.moduleCache=new Map,this.loaderHook=new ct.PluginSystem({getModuleInfo:new Y.SyncHook,createScript:new Y.SyncHook,createLink:new Y.SyncHook,fetch:new lt.AsyncHook,loadEntryError:new lt.AsyncHook,getModuleFactory:new lt.AsyncHook}),this.bridgeHook=new ct.PluginSystem({beforeBridgeRender:new Y.SyncHook,afterBridgeRender:new Y.SyncHook,beforeBridgeDestroy:new Y.SyncHook,afterBridgeDestroy:new Y.SyncHook});const t=ma?[la.snapshotPlugin(),ca.generatePreloadAssetsPlugin()]:[],r={id:na.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:ha.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ua.SnapshotHandler(this),this.sharedHandler=new fa.SharedHandler(this),this.remoteHandler=new da.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&ea.error((0,ut.getShortErrorMsg)(ut.RUNTIME_010,ut.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ta.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=sa.getRemoteInfo({name:e,entry:t}),o=new ia.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=ra.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=oa.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Kr.ModuleFederation=_a;var nn={},on={},Zt=Object.defineProperty,pa=(e,t)=>{let r={};for(var n in e)Zt(r,n,{get:e[n],enumerable:!0});return t||Zt(r,Symbol.toStringTag,{value:"Module"}),r};on.__exportAll=pa;(function(e){var r=on.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(nn);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I,r=R,n=S,o=Pt,s=C,i=de,a=j,c=xr,l=je,u=Kr,f=nn;let d=L;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return d.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return d.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return f.type_exports}})})(Rt);let ga=Rt;function Ea(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=Ea();return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ir.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ir;let r=Rt,n=K;function o(_){const E=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(E),E}let s=null;function i(_){const E=t.getGlobalFederationInstance(_.name,_.version);return E?(E.initOptions(_),s||(s=E),E):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=d,e.registerRemotes=f,e.registerShared=m})(sr);typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const sn="__mf_init____mf__virtual/__mfe_internal__rimori_mf_2_scenario_mf_2_host__mf_v__runtimeInit__mf_v__.js__";let bt=globalThis[sn];if(!bt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});bt=globalThis[sn]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Sa=bt.initResolve,Qt={},er="default",tr="__mfe_internal__rimori-scenario-host";let rr,nr;async function ba(){return rr??=or(()=>import("./localSharedImportMap.js"),__vite__mapDeps([0,1])),rr}async function Ra(){return nr??=or(()=>import("./virtualExposes.js"),[]).then(e=>e.default??e),nr}async function Ia(e={},t=[]){const{usedShared:r,usedRemotes:n}=await ba(),o=sr.init({name:tr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=Qt[er];if(s||(s=Qt[er]={from:tr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Sa(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error("[Module Federation]",i)}return o}}async function Na(e){const t=await Ra();if(!(e in t))throw new Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{sr as d,Na as g,Ia as i};
|