@lynx-js/lynx-core
Version:
Lynx JS environment initialization section, LynxCore will be pre-loaded before appService loading.
4 lines (3 loc) • 42.1 kB
JavaScript
var _="__Card__",E="app-service.js",ge="LynxGetSourceMapReleaseError",oe={filename:"lynx_core",slot:"df0498fd4b09f634e6135a72ccd7ea940966efe8",release:"unknown_version"};var Ne=function(){return this||(0,eval)("this")}(),d=Ne;function w(r){return nativeConsole}var Oe=function(){return this||(0,eval)("this")}(),Ve=w(`groupId:${Oe.groupId||"-1"}`),ie=nativeConsole;function ye(r){let e=typeof r;return e!=="object"?e:Array.isArray(r)?"array":r==null?"null":r instanceof Date?"date":r instanceof RegExp?"regExp":"object"}function R(r){return typeof r=="string"}function k(r){return ye(r)==="object"}function se(r){return ye(r)==="function"}function F(r){switch(Object.prototype.toString.call(r)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return Ce(r,Error)}}function Ce(r,e){try{return r instanceof e}catch{return!1}}var m=ie;var B=class{constructor(){this.observersFunc=[]}registerObserver(e){if(this.observersFunc.includes(e))return m.log("Subject: Observer has been attached already.");this.observersFunc.push(e)}removeObserver(e){let t=this.observersFunc.indexOf(e);if(t===-1)return m.log("Subject: Nonexistent observer.");this.observersFunc.splice(t,1)}notifyDataChange(e){this.observersFunc.forEach(t=>{if(typeof t=="function")try{t(e)}catch(n){m.log("SharedData change and notifyDataChange error info:"+n)}})}};d.multiApps={};d.currentAppId="";d.globComponentRegistPath="";d.sharedData={};d.globDynamicComponentEntry=_;d.shareDataSubject=new B;d.TaroLynx={};d.bundleSupportLoadScript=!0;var{loadScript:at}=d,l=d;var q=class extends Error{constructor(e,t){super(e),t&&(this.stack=t)}},j=class extends q{constructor(){super(...arguments);this.kind="INTERNAL_ERROR"}},ae=class extends q{constructor(){super(...arguments);this.kind="USER_ERROR"}};var g=class extends ae{constructor(){super(...arguments);this.name="USER_RUNTIME_ERROR"}},y=class extends j{constructor(){super(...arguments);this.name="INTERNAL_RUNTIME_ERROR"}};var G=class extends j{constructor(){super(...arguments);this.name="INVOKE_ERROR"}};var Ie=/\d+/,v=class r{constructor(e){this.major=0;this.minor=0;this.revision=0;this.build=0;e=String(e),[this.major=0,this.minor=0,this.revision=0,this.build=0]=e.split(".").map(t=>{let n=Ie.exec(t);return n&&n.length>0?+n[0]:0})}gt(e){return typeof e=="string"&&(e=new r(e)),this.major>e.major?!0:this.major<e.major?!1:this.minor>e.minor?!0:this.minor<e.minor?!1:this.revision>e.revision?!0:this.revision<e.revision?!1:this.build>e.build?!0:(this.build<e.build,!1)}eq(e){return typeof e=="string"&&(e=new r(e)),this.major===e.major&&this.minor===e.minor&&this.revision===e.revision&&this.build===e.build}lt(e){return this.eq(e)?!1:!this.gt(e)}gte(e){return this.eq(e)||this.gt(e)}lte(e){return this.eq(e)||this.lt(e)}};var _t=new v("2.4"),mt=new v("2.7"),ht=new v("2.9"),ft=new v("2.12"),Et=new v("2.14");function h(r,e,t){let{originError:n,errorCode:o,errorLevel:i,runType:s=oe}=t??{};m.error("The following error occurred in the JSRuntime:"),m.error(`${r?.message}
${r?.stack}`),r.cause=k(r.cause)?JSON.stringify(r.cause):r.cause;try{e.reportException(r,{...s,buildVersion:"unknown_version",versionCode:"unknown_version",errorCode:o,errorLevel:i})}catch(a){m.error(`reportError err:
`,a)}}var I=class{constructor(e,t){this.getApp=e;this.getNativeApp=t;this.setSourceMapRelease=e=>{if(F(e)&&e.name===u.kGetSourceMapReleaseErrorName&&R(e.message)&&R(e.stack)){this.getNativeApp().__SetSourceMapRelease({name:e.name,message:e.message,stack:e.stack});return}`${JSON.stringify(e)}`};this.getSourceMapRelease=e=>{let t=this.getNativeApp().__GetSourceMapRelease(e);return t||(t=this.getNativeApp().__GetSourceMapRelease(u.kDefaultSourceMapURL)),t};this.getApp=e,this.getNativeApp=t}rebind(e){this.getApp=e}};var V=class r{static{this.count=0}constructor(e){this.effect=e,this.id="__lynx-inner-js-animation-"+r.count++}cancel(){this.effect.target.cancelAnimate(this)}pause(){this.effect.target.pauseAnimate(this)}play(){this.effect.target.playAnimate(this)}};var $=class{constructor(e,t,n){this.target=e,this.keyframes=t,this.options=n}},Q=class{constructor(e,t){this.keyframes=e,this.options=t}};var Y=class{constructor(e,t,n){this.id=e,this.effect=new Q(t,n)}};var L=class{constructor(e,t,n){this._root=e,this._idSelector="#"+t,this._lynx=n,this._element=void 0}ensureElement(){this._element||(this._element=this._lynx.createElement(this._root,this._idSelector))}animate(e,t){this.ensureElement();let n=new V(new $(this,e,t));return this._element.animate(0,n.id,e,t),n}playAnimate(e){this._element.animate(1,e.id,void 0,void 0)}pauseAnimate(e){this._element.animate(2,e.id,void 0,void 0)}cancelAnimate(e){this._element.animate(3,e.id,void 0,void 0)}finishAnimate(e){this._element.animate(4,e.id,void 0,void 0)}setProperty(e,t){if(this.ensureElement(),typeof e=="string"&&typeof t=="string")this._element.setProperty({[e]:t});else if(typeof e=="object")this._element.setProperty(e);else throw new Error(`setProperty's param must be string or object. While current type is ${typeof e} and ${typeof t}.`)}};var ve=L;var A=class r{constructor(e,t,n){this._component=e,this._taskQueue=t,this._native_proxy=n,this._fire_immediately=!1,this._root_unique_id=void 0}static fromQuery(e,t){return new r(t??e._component,e._taskQueue.slice(),e._native_proxy)}static newEmptyQuery(e,t){return new r(t??"",[],e)}commitTask(e){let t=r.fromQuery(this,this._component);if(t._taskQueue.push(e),this._fire_immediately){t.exec();return}return t}in(e){return e.createSelectorQuery(this)}select(e){return new S(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectAll(e){return new S(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!1})}selectReactRef(e){if(this._taskQueue.length){let t="selectReactRef() should be called before any other selector query methods";nativeConsole.warn(t);let n=new Error(t);h(new G(t,n.stack),this._native_proxy.nativeApp);return}return this._fire_immediately=!0,new S(this,{type:1,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectRoot(){return this.select("")}selectUniqueID(e){return new S(this,{type:2,identifier:e.toString(),component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}exec(){for(let e=0;e<this._taskQueue.length;++e)this._taskQueue[e](this._native_proxy)}setRoot(e){return this._root_unique_id=Number(e),this}},S=class{static{this.nodePool={}}constructor(e,t){this._nodeSelectToken=t,this._selectorQuery=e}invoke(e){let t,n=o=>{let i=s=>{s.code===0?e.success&&e.success(s.data):e.fail&&e.fail(s)};if(!this._nodeSelectToken.first_only){i({code:5,data:"selectAll not supported for invoke method"});return}o.nativeApp.invokeUIMethod(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,e.method,e.params??{},i,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(n)}path(e){let t=n=>{let o=i=>{e&&e(i.data,i.status)};n.nativeApp.getPathInfo(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,o,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}fields(e,t){let n=o=>{let i=a=>{if(e.query){let p=c=>{c.query=A.newEmptyQuery(o),c.query.setRoot(c.unique_id.toString()),e.unique_id||delete c.unique_id};if(this._nodeSelectToken.first_only){let c=a.data;c&&p(c)}else for(let c of a.data)p(c)}t&&t(a.data,a.status)},s=[];for(let a in e){if(a=="query"&&e[a]==!0&&!e.unique_id){s.push("unique_id");continue}e[a]&&s.push(a)}o.nativeApp.getFields(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,s,i,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(n)}animate(e){let t=[];Array.isArray(e)?t=e:t.push(e);let n=o=>{t.forEach(i=>{o.nativeApp.animate(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,0,i?.id,i?.effect?.keyframes,i?.effect?.options)})};return this._selectorQuery.commitTask(n)}animationOperate(e,t){let n=[];Array.isArray(t)?n=t:n.push(t);let o=i=>{n.forEach(s=>{i.nativeApp.animate(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,e,s,null,null)})};return this._selectorQuery.commitTask(o)}playAnimation(e){return this.animationOperate(1,e)}pauseAnimation(e){return this.animationOperate(2,e)}cancelAnimation(e){return this.animationOperate(3,e)}finishAnimation(e){return this.animationOperate(4,e)}setNativeProps(e){let t=n=>{n.nativeApp.setNativeProps(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,e,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}};var b=class r{constructor(e,t,n,o){this.getNativeApp=e;this.getApp=t;this.Promise=n;this.getNativeLynx=o;this.setTimeout=this.getApp().wrapReport(this.getNativeApp().setTimeout,"setTimeout Error");this.setInterval=this.getApp().wrapReport(this.getNativeApp().setInterval,"setInterval Error");this.clearInterval=this.getNativeApp().clearInterval;this.clearTimeout=this.getNativeApp().clearTimeout;this.resumeExposure=this.getApp()._apiList.resumeExposure;this.requireModule=(e,t,n)=>{if(this.requireModule.cache[e])return this.requireModule.cache[e];let o=this.getApp().requireModule(e,t,n);return this.requireModule.cache[e]=o,o};this.requireModuleAsync=(e,t)=>{if(t??=n=>{n&&this.getApp().handleUserError(n)},this.requireModuleAsync.cache[e]){t(null,this.requireModuleAsync.cache[e]);return}this.getApp().requireModuleAsync(e,(n,o)=>{n||(this.requireModuleAsync.cache[e]=o),t(n,o)})};this.createElement=(e,t)=>this.getNativeLynx().createElement(e,t);this.getElementById=e=>new ve("",e,this);this.reportError=(e,t)=>{let n;if(F(e))n=e;else{let s;typeof e!="string"?s=JSON.stringify(e):s=e,n=new Error(s)}let{level:o="error"}=t||{},i;switch(o){case"error":i=1;break;case"warning":i=2;break;case"fatal":i=0;break;default:i=1}this.getApp().handleUserError(n,void 0,i)};this.registerModule=(e,t)=>this.getApp().registerModule(e,t);this.getJSModule=e=>this.getApp().getJSModule(e);this.getTextInfo=this.getApp()._apiList.getTextInfo;this.addFont=(e,t)=>{if(!k(e))throw new Error("The first argument must be object type");if(!R(e["font-family"])||!R(e.src))throw new Error("The font value must have font-family and src");if(!se(t))throw new Error("The second argument must be function type");this.getNativeLynx().addFont(e,t)};this.stopExposure=this.getApp()._apiList.stopExposure;this.setObserverFrameRate=this.getApp()._apiList.setObserverFrameRate;this.performance=this.getApp().performance;this.beforePublishEvent=this.getApp()._aopManager._beforePublishEvent;this.setSessionStorageItem=(e,t)=>{this.dispatchSessionStorageEvent({type:"__SetSessionStorageItem",data:{key:e,value:t}})};this.getSessionStorageItem=(e,t)=>{this.getNativeApp().getSessionStorageItem(e,t)};this.subscribeSessionStorage=(e,t)=>{let n=r.__registerSharedDataCounter++;return this.getNativeApp().subscribeSessionStorage(e,n,t),n};this.unsubscribeSessionStorage=(e,t)=>{this.dispatchSessionStorageEvent({type:"__UnSubscribeSessionStorage",data:{key:e,listenerId:t}})};this.getDevtool=this.getNativeLynx().getDevtool;this.getCoreContext=this.getNativeLynx().getCoreContext;this.getJSContext=this.getNativeLynx().getJSContext;this.getUIContext=this.getNativeLynx().getUIContext;this.getNative=this.getNativeLynx().getNative;this.getEngine=this.getNativeLynx().getEngine;this.getCustomSectionSync=this.getNativeLynx().getCustomSectionSync;this.accessibilityAnnounce=this.getNativeApp().nativeModuleProxy.LynxAccessibilityModule?.accessibilityAnnounce;this.requestResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.requestResourcePrefetch;this.cancelResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.cancelResourcePrefetch;this.setSharedData=(e,t)=>{l.sharedData[e]=t;let n={};n[e]=t,l.shareDataSubject.notifyDataChange(n)};this.getSharedData=e=>l.sharedData[e];this.registerSharedDataObserver=e=>l.shareDataSubject.registerObserver(e);this.removeSharedDataObserver=e=>l.shareDataSubject.removeObserver(e);this.triggerLepusGlobalEvent=(e,t)=>this.getNativeApp().triggerLepusGlobalEvent(e,t);this.reload=(e,t)=>{this.getNativeLynx().reload(e,t)};this.fetchDynamicComponent=(e,t,n,o)=>this.getNativeLynx().fetchDynamicComponent(e,t,n,o);this.QueryComponent=(e,t)=>{let n=()=>{t({code:0,data:{url:e,sync:!0,error_message:"",mode:"cache"},detail:{schema:e,cache:!1,errMsg:""}})};if(this.getApp().loadedDynamicComponentsSet.has(e)){n();return}let o=i=>{i.__hasReady===!0?(l.loadDynamicComponent(this.getApp(),e),n()):t(i)};this.getNativeLynx().QueryComponent(e,o)};this.loadDynamicComponent=(e,t,n={})=>new this.Promise((o,i)=>{let s=[],a;if(Array.isArray(e)?(s=e,a=t):typeof t=="string"?(s=[e],a=t):(a=e,n=t),this.getApp().loadedDynamicComponentsSet.has(a)){o({code:0,data:{url:a,sync:!1,error_message:"",mode:"normal"},detail:{schema:a,cache:!1,errMsg:""}});return}this.getNativeLynx().fetchDynamicComponent(a,n,p=>{p&&p.code==0?o(p):i(p)},s)});this.fetch=(e,t)=>new this.Promise((n,o)=>{let i=new(this.getApp())._RequestClass(e,t),s=i.signal;if(s.aborted)return o(s.reason);s.addEventListener("abort",c=>{o(s.reason)});let a={method:i.method,url:i.url,origin:this.getNativeApp().__pageUrl,headers:Object.fromEntries(i.headers.entries()),body:i._arrayBuffer,lynxExtension:i.lynxExtension},p=i.lynxExtension.useStreaming;this.getApp().NativeModules.LynxFetchModule.fetch(a,c=>{if(!s.aborted)try{let C=new(this.getApp())._ReadableStreamClass,Ee=new(this.getApp())._ResponseClass(p?C:c.body,c);if(p){let Te=Ee.lynxExtension.streamingId;this.getApp().GlobalEventEmitter.addListener(Te,re=>{let ne=re.event;ne==="onData"?C.onData(re.data):ne==="onEnd"?C.onEnd():ne==="onError"&&C.onError(re.error)})}n(Ee)}catch{o(new TypeError(c.statusText))}},c=>{s.aborted||o(new TypeError(c.message))})});this.createSelectorQuery=e=>A.newEmptyQuery({nativeApp:this.getNativeApp(),lynx:this},e);this.requestAnimationFrame=e=>this.getNativeApp().requestAnimationFrame(e);this.cancelAnimationFrame=e=>this.getNativeApp().cancelAnimationFrame(e);this.loadScript=this.getNativeLynx().loadScript;this.fetchBundle=this.getNativeLynx().fetchBundle;this.__addReporterCustomInfo=e=>{this.getNativeApp().__addReporterCustomInfo(e)};this.getModuleLoader=()=>l["napiRestrictedLoader"+this.getApp().nativeAppId];this.createAnimation=(e,t,n)=>new Y(e,t,n);this.init(void 0)}static{this.__registerSharedDataCounter=0}rebind(e){this.init(e)}init(e){if(e)this.getApp=e,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{};else{let t={};this.requireModule.cache=t,this.requireModuleAsync.cache=t,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{},this._switches={}}}dispatchSessionStorageEvent(e){var t=this.getCoreContext().dispatchEvent(e);t!=0&&this.getJSContext().dispatchEvent(e)}queueMicrotask(e){this.getNativeLynx().queueMicrotask(e)}};var x=class{constructor(e){this._internal_callLynxSetModule=e,this._events=new Map}getEventsSize(e){return this._events.get(e)?.length}setCallLynxSetModule(e){this._internal_callLynxSetModule=e}addListener(e,t,n){let o=this._events.get(e);e=="keyboardstatuschanged"&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!0]),o?o.push({listener:t,context:n}):this._events.set(e,[{listener:t,context:n}])}removeListener(e,t){if(typeof t!="function")throw new Error("removeListener only takes instances of Function");let n=this._events.get(e),o=0;Array.isArray(n)&&n.some(s=>{if(t===s.listener)return!0;o++})&&n.splice(o,1),e=="keyboardstatuschanged"&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!1])}emit(e,t){let n=this._events.get(e);Array.isArray(n)&&n.forEach(o=>{let{listener:i,context:s}=o;typeof i=="function"&&i.apply(s||this,t)})}removeAllListeners(e){if(typeof e=="string"){this._events.delete(e);return}this._events=new Map}trigger(e,t){let n=this._events.get(e);Array.isArray(n)&&(typeof t=="string"&&(t=JSON.parse(t)),n.forEach(o=>{let{listener:i,context:s}=o;typeof i=="function"&&i.call(s||this,t)}))}toggle(e,...t){this.emit(e,t)}};var J=class{constructor(){this._beforePublishEvent=new le}},le=class extends x{add(e,t,n){return super.addListener(e,t,n),this}remove(e,t){return super.removeListener(e,t),this}};var T=x;var K=class{constructor(e){this._textInfoModule=void 0;this.getTextInfo=(e,t)=>(this._textInfoModule===void 0&&(this._textInfoModule=this._nativeModules.LynxTextInfoModule),this._textInfoModule&&this._textInfoModule.getTextInfo?this._textInfoModule.getTextInfo(e,t):{width:e.length});this._nativeModules=e}};var H=class{constructor(e){this.resumeExposure=()=>{this._exposureModule.resumeExposure()};this.stopExposure=e=>{this._exposureModule.stopExposure(e)};this.setObserverFrameRate=e=>{this._exposureModule.setObserverFrameRate(e)};this._nativeModules=e,this._exposureModule=this._nativeModules.LynxExposureModule}};var ce=class{constructor(e,t){this._selector=e,this._callback=t}invokeCallback(e){this._callback(e)}},pe=class{constructor(e,t,n){this._id=e,this._intersectionObserverModule=t,this._manager=n,this._observationTargets=[],this._defaultMargins={left:0,right:0,top:0,bottom:0}}relativeTo(e,t){return this._intersectionObserverModule.relativeTo(this._id,e,t||this._defaultMargins),this}relativeToViewport(e){return this._intersectionObserverModule.relativeToViewport(this._id,e||this._defaultMargins),this}relativeToScreen(e){return this._intersectionObserverModule.relativeToScreen(this._id,e||this._defaultMargins),this}observe(e,t){this._observationTargets.push(new ce(e,t)),this._intersectionObserverModule.observe(this._id,e,this._observationTargets.length-1)}disconnect(){this._intersectionObserverModule.disconnect(this._id),this._manager.removeObserver(this._id)}invokeCallback(e,t){e<this._observationTargets.length&&this._observationTargets[e].invokeCallback(t)}},W=class{constructor(e){this._nativeModules=e,this._observerId=0,this._observers={},this._defaultOptions={thresholds:[0],initialRatio:0,observeAll:!1}}createIntersectionObserver(e,t){let n=this._nativeModules.IntersectionObserverModule,o=new pe(this._observerId,n,this);return this._observers[this._observerId]=o,n.createIntersectionObserver(this._observerId,e,t||this._defaultOptions),this._observerId++,o}getObserver(e){return this._observers[e]}removeObserver(e){this._observers[e]=null}};var xe={onPerformance:"lynx.performance.onPerformanceEvent"},X=class{constructor(e,t){this._emitter=e,this._onPerformance=t,this._observedNames=[]}observe(e){this._observedNames.length>0||(this._observedNames=e,this._emitter.addListener(xe.onPerformance,this.onPerformanceEvent.bind(this)))}disconnect(){this._observedNames=[],this._emitter.removeListener(xe.onPerformance,this.onPerformanceEvent.bind(this))}onPerformanceEvent(e){if(this._observedNames.length===0)return;let t=e.entryType+"."+e.name;(this._observedNames.includes(t)||this._observedNames.includes(e.entryType))&&this._onPerformance(e)}};var N={onSetup:"lynx.performance.timing.onSetup",onUpdate:"lynx.performance.timing.onUpdate"},P=class{constructor(e,t){this._emitter=e,this._generatePipelineOptions=t.generatePipelineOptions,this._onPipelineStart=t.onPipelineStart,this._markTiming=t.markPipelineTiming,this._profileStart=t.profileStart,this._profileEnd=t.profileEnd,this._profileMark=t.profileMark,this._profileFlowId=t.profileFlowId,this._isProfileRecording=t.isProfileRecording,this._bindPipelineIdWithTimingFlag=t.bindPipelineIdWithTimingFlag}profileStart(e,t){this._profileStart(e,t)}profileEnd(){this._profileEnd()}profileMark(e,t){this._profileMark(e,t)}profileFlowId(){return this._profileFlowId()}createObserver(e){return new X(this._emitter,e)}isProfileRecording(){return this._isProfileRecording()}addTimingListener(e){this._emitter.addListener(N.onSetup,e.onSetup,e),this._emitter.addListener(N.onUpdate,e.onUpdate,e)}removeTimingListener(e){this._emitter.removeListener(N.onSetup,e.onSetup),this._emitter.removeListener(N.onUpdate,e.onUpdate)}removeAllTimingListener(){this._emitter.removeAllListeners(N.onSetup),this._emitter.removeAllListeners(N.onUpdate)}_initializeAndStartPipeline(){let e=this._generatePipelineOptions();return e&&this._onPipelineStart(e.pipelineID),e}_checkAndBindTimingFlag(e,t){if(!e)return;let n="__lynx_timing_flag";t[n]&&(this._bindPipelineIdWithTimingFlag(e.pipelineID,t[n]),this._markTiming(e.pipelineID,"update_set_state_trigger"),e.needTimestamps=!0)}};var Re=P;var Se=l.LynxJSBI;var f=class r{constructor(e){this._cachedFunctions={};for(let t in e)Object.defineProperty(this,t,{get(){if(this._cachedFunctions[t])return this._cachedFunctions[t];let n=e[t];return typeof n=="function"&&(this._cachedFunctions[t]=n),n}})}static create(e){return new r(e)}};function Ae(r,e,t,n=void 0,o=!1){let{getPromise:i}=l;return typeof i=="function"?i({nextTick:o?n:a=>r(a,0),setTimeout:r,onUnhandled:e,clearTimeout:t}):l.Promise}var M=class{constructor(){}decode(e){return e.byteLength===0?"":(e instanceof DataView?e=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):ArrayBuffer.isView(e)&&(e=e.buffer),globalThis.TextCodecHelper.decode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}get fatal(){return!1}get ignoreBOM(){return!0}};var z=class{constructor(){}encode(e){return new Uint8Array(globalThis.TextCodecHelper.encode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}};var O=class r{constructor(){this._arrayBuffer=new ArrayBuffer(0),this._bodyStream=null,this._bodyUsed=!1}safeUseBody(e){if(this._bodyUsed)return;let t=e(this._arrayBuffer);return this._bodyUsed=!0,this._arrayBuffer=null,t}cloneArrayBuffer(e){return e.slice(0)}setBody(e){if(e instanceof r){if(e._bodyUsed||e._bodyStream)throw new Error("body used, or try to copy body stream");this._arrayBuffer=this.cloneArrayBuffer(e._arrayBuffer)}else e instanceof ArrayBuffer?this._arrayBuffer=this.cloneArrayBuffer(e):e instanceof DataView?this._arrayBuffer=this.cloneArrayBuffer(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):ArrayBuffer.isView(e)?this._arrayBuffer=this.cloneArrayBuffer(e.buffer):e&&(this._arrayBuffer=new z().encode(e.toString()).buffer),globalThis.ReadableStream&&e instanceof ReadableStream&&(this._bodyStream=e)}arrayBuffer(){return Promise.resolve(this.safeUseBody(e=>e))}get body(){if(this._bodyUsed)throw new Error("body used");return this._bodyUsed=!0,this._bodyStream}text(){return Promise.resolve(this.safeUseBody(e=>new M().decode(e)))}json(){return Promise.resolve(this.safeUseBody(e=>JSON.parse(new M().decode(e))))}get bodyUsed(){return this._bodyUsed}};var Me,D=class r{constructor(e){this._headers_map=new Map;this[Me]="Headers";if(e===null||typeof e=="number")throw new TypeError("Headers init with null/number");if(e instanceof r)for(let[t,n]of e)this.append(t,n);else Array.isArray(e)?e.forEach(([t,n])=>{this.append(t,Array.isArray(n)?n.join(" "):n)}):e&&Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t];this.append(t,Array.isArray(n)?n.join(" "):n)})}[(Me=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[e,t]of this._headers_map)yield e}*values(){for(let[e,t]of this._headers_map)yield t}*entries(){for(let e of this._headers_map)yield e}has(e){return this._headers_map.has(e)}get(e){return this._headers_map.get(e)??null}set(e,t){this._headers_map.set(e,String(t))}append(e,t){let n=this.has(e)?`${this.get(e)}, ${t}`:t;this.set(e,n)}delete(e){this.has(e)&&this._headers_map.delete(e)}forEach(e,t){for(let[n,o]of this.entries())e.call(t,o,n,this)}};var Z=class r extends T{get aborted(){return this._aborted}get reason(){return this._reason}constructor(){super(),this._aborted=!1}get[Symbol.toStringTag](){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this._aborted=!0,this._reason=e.reason,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.emit(e.type,e)}addEventListener(e,t){super.addListener(e,t)}removeEventListener(e,t){super.removeListener(e,t)}static __create(){return new r}};function de(r){return class ue extends O{get url(){return this._url}get headers(){return this._headers}get method(){return this._method}get signal(){return this._signal}get lynxExtension(){return this._lynxExtension}constructor(t,n){if(super(),n=n||{},t instanceof ue){if(t.bodyUsed)throw new TypeError("Already read");this._url=t.url,n.headers||(this._headers=new D(t.headers)),this._method=t.method,this._signal=t.signal,this.setBody(t._arrayBuffer)}else this._url=String(t);if((n.headers||!this.headers)&&(this._headers=new D(n.headers)),this._method=n.method||this.method||"GET",this._method=this._method.toUpperCase(),(this.method==="GET"||this.method==="HEAD")&&n.body)throw new TypeError("Body not allowed for GET or HEAD requests");typeof n.signal<"u"&&(this._signal=n.signal),this._signal=this._signal||Z.__create(),this._lynxExtension=n.lynxExtension||{},this._headers.get("Content-Type")||(typeof n.body=="string"?this._headers.set("Content-Type","text/plain;charset=UTF-8"):globalThis.URLSearchParams&&n.body instanceof URLSearchParams?this._headers.set("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"):n.body instanceof ArrayBuffer||this._headers.set("Content-Type","text/plain;charset=UTF-8")),this.setBody(n.body)}clone(){let t=new ue(this,{method:this.method});return t.setBody(this),t}}}function _e(r){return class be extends O{get url(){return this._url}get status(){return this._status}get statusText(){return this._statusText}get ok(){return this._ok}get headers(){return this._headers}get lynxExtension(){return this._lynxExtension}constructor(t,n){if(super(),n=n||{},this._status=n.status===void 0?200:n.status,this._status<200||this._status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this._ok=this._status>=200&&this._status<300,this._statusText=n.statusText===void 0?"":""+n.statusText,this._headers=new Headers(n.headers),this._url=n.url||"",this._lynxExtension=n.lynxExtension||{},this.setBody(t)}clone(){let t=new be(null,{status:this._status,statusText:this._statusText,headers:new Headers(this._headers),url:this._url});return t.setBody(this),t}}}function he(r){return class{constructor(){this.__dataReceived=[],this.__done=!1,this.__cancelled=!1,this.__locked=!1,this.__eventCenter=new T}onData(t){this.__cancelled||(this.__dataReceived.push(t),this.__eventCenter.emit("waitSignal",null))}onEnd(){this.__done=!0,this.__eventCenter.emit("waitSignal",null)}onError(t){this.__error=new Error(t),this.__eventCenter.emit("waitSignal",null)}processRead(t,n){if(this.__error)return n(this.__error);if(this.__cancelled||this.__done&&this.__dataReceived.length==0)return t({done:!0,value:void 0});if(this.__dataReceived.length>0){let i=this.__dataReceived.shift();return t({done:!1,value:i})}let o=()=>{this.__eventCenter.removeListener("waitSignal",o),this.processRead(t,n)};this.__eventCenter.addListener("waitSignal",o,this)}__read(){return new r((t,n)=>{this.processRead(t,n)})}get locked(){return this.__locked}cancel(t){return this.__cancelled=!0,this.__dataReceived=null,this.__eventCenter.emit("waitSignal",null),r.resolve(t)}getReader(){return this.__locked?null:(this.__locked=!0,new me(this))}}}var me=class{constructor(e){this.__stream=e}cancel(e){return this.__stream.cancel(e)}read(){return this.__stream.__read()}};var ee=class{static{this.EXECUTE_LOADED_SCRIPT="executeLoadedScript"}};var u=class _BaseApp{constructor(r,e){this.dataTypeSet=new Set(["string","number","array","object","boolean","null","function"]);this.removeInternalEventListenersCallbacks=[];this.setSourceMapRelease=r=>{this.Reporter.setSourceMapRelease(r)};this.getSourceMapRelease=r=>this.Reporter.getSourceMapRelease(r);this.setupGetTextInfoApi=()=>{this._apiList.getTextInfo=(r,e)=>this._textInfoManager.getTextInfo(r,e)};this.setupExposureApi=()=>{this._apiList.resumeExposure=()=>{this._exposureManager.resumeExposure()},this._apiList.stopExposure=r=>{this._exposureManager.stopExposure(r||{sendEvent:!0})},this._apiList.setObserverFrameRate=r=>{this._exposureManager.setObserverFrameRate(r||{forPageRect:20,forExposureCheck:20})}};this.requestAnimationFrame=r=>this._nativeApp.requestAnimationFrame(r);this.cancelAnimationFrame=r=>this._nativeApp.cancelAnimationFrame(r);this.__removeInternalEventListeners=()=>{this.removeInternalEventListenersCallbacks.forEach(r=>{r()})};this.initBase(r),e?e.transferSingletonData(this,this.__internal__callLynxSetModule.bind(this)):this.initExtra(r),this.setTimeout=this.nativeApp.setTimeout,this.setInterval=this.nativeApp.setInterval,this.clearInterval=this.nativeApp.clearInterval,this.clearTimeout=this.nativeApp.clearTimeout,this.addInternalEventListeners()}initExtra(r){let{lynx:e}=r;this.modules={},this._lazyCallableModules=new Map,this._nativeApp=f.create(this._nativeApp),this.sharedConsole=w(`runtimeId:${this.nativeAppId}`),this.dynamicComponentExports={},this.loadedDynamicComponentsSet=new Set,this._lazyCallableModules=new Map,this.Reporter=new I(()=>this,()=>this.nativeApp),this.GlobalEventEmitter=new T(this.__internal__callLynxSetModule.bind(this)),this._intersectionObserverManager=new W(this.NativeModules),this._exposureManager=new H(this.NativeModules),this.setupExposureApi(),this._aopManager=new J,this.beforePublishEvent=this._aopManager._beforePublishEvent,this.performance=new Re(this.GlobalEventEmitter,this.nativeApp);let t=this.setupPromise(this.nativeApp.setTimeout,this.nativeApp.clearTimeout,e);this.lynx=this.createLynx(e,t),this.setupJSModule(),this.setupIntersectionApi(),this.setupFetchAPI(t)}initBase(r){let{nativeApp:e,params:t}=r;this.nativeAppId=e.id,this._params=t,this._nativeApp=e,this.NativeModules=e.nativeModuleProxy,this.LynxUIMethodModule=e.nativeModuleProxy.LynxUIMethodModule,this.LynxTestModule=e.nativeModuleProxy.LynxTestModule,this.LynxResourceModule=e.nativeModuleProxy.LynxResourceModule,this.LynxAccessibilityModule=e.nativeModuleProxy.LynxAccessibilityModule,this.LynxSetModule=e.nativeModuleProxy.LynxSetModule,this._apiList={},this._textInfoManager=new K(this.NativeModules),this.setupGetTextInfoApi()}static{this.kDefaultSourceMapURL="default"}static{this.kGetSourceMapReleaseErrorName=ge}set __sourcemap__release__(r){let e=new Error;e.name="LynxGetSourceMapReleaseError",e.message=r,e.stack=`at <anonymous> (${_BaseApp.kDefaultSourceMapURL}:1:1)`,this.setSourceMapRelease(e)}destroy(){this.__removeInternalEventListeners(),this._nativeApp=null,this._params=null,this._lazyCallableModules=null,this.GlobalEventEmitter=null}registerModule(r,e){this._lazyCallableModules[r]=e}getJSModule(r){return this._lazyCallableModules[r]}setupJSModule(){this.registerModule("GlobalEventEmitter",this.GlobalEventEmitter),this.registerModule("Reporter",this.Reporter)}setupFetchAPI(r){this._createResponseClass=_e,this._createRequestClass=de,this._createReadableStreamClass=he,this._RequestClass=l.Request??de(r),this._ResponseClass=l.Response??_e(r),this._ReadableStreamClass=l.ReadableStream??he(r),l.Request||(l.Request=this._RequestClass),l.Response||(l.Response=this._ResponseClass),l.ReadableStream||(l.ReadableStream=this._ReadableStreamClass)}__internal__callLynxSetModule(r,e){let t=this.LynxSetModule[r];t&&Function.prototype.apply.call(t,void 0,e)}get nativeApp(){return this._nativeApp}set nativeApp(r){this._nativeApp=r}get params(){return this._params}set apiList(r){this._apiList={...this._apiList,...r}}setupIntersectionApi(){let r=this;this._apiList.createIntersectionObserver=function(e,t){let{componentId:n=""}=e;return r._intersectionObserverManager.createIntersectionObserver(n,t)},this.lynx.createIntersectionObserver=this._apiList.createIntersectionObserver}onIntersectionObserverEvent(r,e,t){let n=this._intersectionObserverManager.getObserver(r);n&&n.invokeCallback(e,t)}reportError(r){return this.lynx.reportError(r)}handleError(r,e,t){h(r,this.nativeApp,{originError:e,getSourceMapRelease:this.getSourceMapRelease,errorLevel:t})}handleUserError(r,e,t,n){let{message:o,name:i,stack:s}=r||{};o||({message:o,name:i,stack:s}=new Error(JSON.stringify(r)));let a=new g(n?`${n} ${i}: ${o}`:`${i}: ${o}`,s);a.cause=e,this.handleError(a,r,t)}handleInternalError(r,e){let{message:t,name:n,stack:o}=r||{};t||({message:t,name:n,stack:o}=new Error(JSON.stringify(r)));let i=new y(`${n}: ${t}`,o);i.cause=e,this.handleError(i,r)}getBoolEnv(r){return this.nativeApp.getEnv(r)?.toLowerCase()==="true"}static{this._$factoryCache={}}_$executeInit(r,{path:e,entryName:t}){let n;if(r&&r.init)n=r.init.bind(r);else if(l.initBundle)n=l.initBundle.bind(l.initBundle),delete l.initBundle;else throw new g(`load failed. path:${e},entryName:${t}`);try{this.lynx.performance.profileStart(ee.EXECUTE_LOADED_SCRIPT,{args:{path:e}});let o=n({tt:this});return _BaseApp._$factoryCache[e]=n,o}finally{this.lynx.performance.profileEnd()}}_$executeJSON(r,{path:e}){let t=JSON.parse(r),n=()=>t;return _BaseApp._$factoryCache[e]=n,t}requireModule(r,e,t){let n=_BaseApp._$factoryCache[r];if(n)return this._$executeInit({init:n},{path:r,entryName:e});if(r.split("?")[0].endsWith(".json")){let i=this.nativeApp.readScript(r,{dynamicComponentEntry:e??_,...t});return this._$executeJSON(i,{path:r,entryName:e})}let o=this.nativeApp.loadScript(r,e,t);return this._$executeInit(o,{path:r,entryName:e})}requireModuleAsync(r,e){let t=_BaseApp._$factoryCache[r];if(t){e(null,this._$executeInit({init:t},{path:r}));return}if(r.split("?")[0].endsWith(".json")){try{let o=this.nativeApp.readScript(r),i=this._$executeJSON(o,{path:r});e(null,i)}catch(o){e(o)}return}let n=new Error;this.nativeApp.loadScriptAsync(r,(o,i)=>{if(o)return n.message=o,e(n);try{return e(null,this._$executeInit(i,{path:r}))}catch(s){return e(s)}})}require(path,params){let that=this;if(typeof path!="string")throw new Error("require args must be a string");let entryName=params&¶ms.dynamicComponentEntry?params.dynamicComponentEntry:_;that.modules[entryName]||(that.modules[entryName]={});let module=that.modules[entryName][path];if(!module){try{let tt=that,jsContent=that._nativeApp.readScript(path,{dynamicComponentEntry:entryName});eval(jsContent),module=that.modules[entryName][path]}catch(r){this.handleError(new g(`eval user: ${that._nativeApp.id} error: ${r.message}`,r.stack),r)}if(!that.modules[entryName][path])throw new Error(`module ${path} in ${entryName} is not defined in card: ${that._nativeApp.id}`)}if(!module.hasRun){let{factory:r}=module,e={exports:{}},t;if(module.hasRun=!0,module.exports=e.exports,typeof r=="function"){let n=Ue.call(that,path),o=that;t=r(n,e,e.exports,that.Card.bind(o),that.setTimeout,that.setInterval,that.clearInterval,that.clearTimeout,that.NativeModules,that._apiList,that.sharedConsole,that.Component.bind(o),params?.ReactLynx,that.nativeAppId,that.Behavior.bind(o),Se,that.lynx,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,that.lynx.fetch,void 0,void 0,void 0,void 0,void 0,void 0,that.requestAnimationFrame,that.cancelAnimationFrame),module.exports=e.exports||t}}return module.exports}define(r,e,t){t=t||_,this.modules[t]||(this.modules[t]={}),this.modules[t][r]={hasRun:!1,factory:e.bind(this)}}callFunction(r,e,t){try{let n=this.getJSModule(r);typeof n[e]=="function"&&n[e].apply(n,t)}catch(n){this.handleUserError(n,{by:`${r}.${e}`})}}onAppError(r,e){this.handleInternalError(e)}saveDynamicComponentExports(r,e){this.dynamicComponentExports[r]=e}getDynamicComponentExports(r){return this.dynamicComponentExports[r]}Component(...r){}Card(...r){}Behavior(...r){}wrapReport(r,e){let t=this;function n(o){return function(...s){try{return o.apply(this,s)}catch(a){t.handleUserError(a,{by:e})}}}return function(i,...s){return Function.prototype.apply.call(r,void 0,[n(i),...s])}}setupPromise(r,e,t){let n=Ae(r,(o,i)=>{try{i&&(i.stack||(i=new Error(JSON.stringify(i))),i.name="unhandled rejection",this.handleUserError(i))}catch{}},e,t.queueMicrotask,this._params?.pageConfigSubset?.enableMicrotaskPromisePolyfill??!1);return this.resolvedPromise=n.resolve(),n}addInternalEventListener(r,e,t){this.contextProxyTypeToMethod[r]().addEventListener(e,t),this.removeInternalEventListenersCallbacks.push(()=>{this.contextProxyTypeToMethod[r]().removeEventListener(e,t)})}addInternalEventListeners(){this.contextProxyTypeToMethod||(this.contextProxyTypeToMethod={0:()=>this.lynx.getCoreContext(),1:()=>this.lynx.getDevtool(),2:()=>this.lynx.getJSContext(),3:()=>this.lynx.getUIContext(),4:()=>this.lynx.getNative(),5:()=>this.lynx.getEngine()}),this.addInternalEventListener(0,"__OnNativeAppReady",()=>{this.onNativeAppReady()}),this.addInternalEventListener(0,"__NotifyGlobalPropsUpdated",r=>{this.updateGlobalProps(r.data)}),this.addInternalEventListener(0,"__OnLifecycleEvent",r=>{this.OnLifecycleEvent(r.data)}),this.addInternalEventListener(0,"__OnAppFirstScreen",()=>{this.onAppFirstScreen()}),this.addInternalEventListener(0,"__OnDynamicJSSourcePrepared",r=>{l.loadDynamicComponent(this,r.data)}),this.addInternalEventListener(0,"__OnAppEnterForeground",()=>{this.onAppEnterForeground()}),this.addInternalEventListener(0,"__OnAppEnterBackground",()=>{this.onAppEnterBackground()})}updateGlobalProps(r){}OnLifecycleEvent(r){}onNativeAppReady(){}onAppFirstScreen(){}onAppEnterBackground(){}onAppEnterForeground(){}};function De(r){let e=r.match(/(.*)\/([^/]+)?$/);return e?.[1]?e[1]:"./"}function Ue(r){let e=this,t=De(r);return function(n){let o=[],i=`${t}/${n}`.split("/"),s=i.length;if(typeof n!="string")throw new Error("require args must be a string");for(let p=0;p<s;++p){let c=i[p];if(c!==""&&c!==".")if(c===".."){if(o.length===0)throw new Error(`can't find module ${n} in app: ${e._nativeApp.id}`);o.pop()}else p+1<s&&i[p+1]===".."?p++:o.push(c)}let a=o.join("/");return a.endsWith(".js")||(a+=".js"),e.require(a)}}var te=class extends u{createLynx(e,t){let n=f.create(e);return new b(()=>this.nativeApp,()=>this,t,()=>n)}callBeforePublishEvent(e){if(this._aopManager._beforePublishEvent.getEventsSize(e.type)!==0){let t={...e};try{this._aopManager._beforePublishEvent.emit(t.type,[t])}catch(n){this.handleUserError(n,{by:"callBeforePublishEvent",type:t.type})}}}};var fe=class{transferSingletonData(e,t){e.nativeApp=this.nativeApp,e.sharedConsole=this.sharedConsole,e.dynamicComponentExports=this.dynamicComponentExports,e.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,e._intersectionObserverManager=this.intersectionObserverManager,e._exposureManager=this.exposureManager,e._textInfoManager=this.textInfoManager,this.globalEventEmitter.setCallLynxSetModule(t),e.GlobalEventEmitter=this.globalEventEmitter,e._aopManager=this.aopManager,e.performance=this.performance,e.modules=this.modules,e._lazyCallableModules=this.lazyCallableModules,e.lynx=this.lynx,this.lynx.rebind(()=>e),e._apiList=this.apiList,this.Reporter.rebind(()=>e),e.Reporter=this.Reporter,e.resolvedPromise=this.resolvedPromise}},U=class extends u{constructor(e,t){super(e,void 0),this.fillSingletonData();try{t.srcName&&(delete this.lynx.requireModule.cache[t.srcName],delete u._$factoryCache[t.srcName],this.lynx.requireModule(t.srcName,_),this.dataTypeSet.add("undefined"))}catch(n){this.handleUserError(n)}}createLynx(e,t){let n=f.create(e);return new b(()=>this.nativeApp,()=>this,t,()=>n)}fillSingletonData(){this.singletonData=new fe,this.singletonData.nativeApp=this._nativeApp,this.singletonData.sharedConsole=this.sharedConsole,this.singletonData.dynamicComponentExports=this.dynamicComponentExports,this.singletonData.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,this.singletonData.intersectionObserverManager=this._intersectionObserverManager,this.singletonData.exposureManager=this._exposureManager,this.singletonData.textInfoManager=this._textInfoManager,this.singletonData.globalEventEmitter=this.GlobalEventEmitter,this.singletonData.aopManager=this._aopManager,this.singletonData.performance=this.performance,this.singletonData.modules=this.modules,this.singletonData.lazyCallableModules=this._lazyCallableModules,this.singletonData.lynx=this.lynx,this.singletonData.apiList=this._apiList,this.singletonData.Reporter=this.Reporter,this.singletonData.resolvedPromise=this.resolvedPromise}};function we(r,e,t){let{id:n}=r,{cardType:o}=e;`${n}`;let i=!0,s;try{if(o=="standalone"?s=new U({nativeApp:r,params:e,lynx:t},e):s=new te({nativeApp:r,params:e,lynx:t}),l.currentAppId=n,l.multiApps[n]=s,o==="standalone")return r.setCard(s),!0;`${e.bundleSupportLoadScript}`,i=!0;try{delete s.lynx.requireModule.cache[E],delete u._$factoryCache[E],s.lynx.requireModule(E,_),s.lynx._switches.allowUndefinedInNativeDataTypeSet&&s.dataTypeSet.add("undefined")}catch(a){i=!1,s.handleUserError(a,void 0,void 0,"loadCard failed")}r.setCard(s)}catch(a){qe(r,a),i=!1}return i}function ke(r){`${r}`,l.multiApps[r].destroy(),delete l.multiApps[r]}function Fe(r){`${r}`,l.multiApps[r].callDestroyLifetimeFun()}function Be(r,e){if(r.loadedDynamicComponentsSet.has(e))return r.getDynamicComponentExports(e);let t=l.globDynamicComponentEntry;l.globDynamicComponentEntry=e;try{delete r.lynx.requireModule.cache[E],delete u._$factoryCache[E];let n=r.lynx.requireModule(E,e);return r.saveDynamicComponentExports(e,n),r.loadedDynamicComponentsSet.add(e),n}catch(n){r.handleUserError(n)}finally{l.globDynamicComponentEntry=t}}function qe(r,e,t){let{message:n,name:o,stack:i}=e||{};n||({message:n,name:o,stack:i}=new Error(JSON.stringify(e)));let s=new y(`loadCard failed ${o}: ${n}`,i);s.cause=t,h(s,r,{originError:e,getSourceMapRelease:a=>{if(!r.__GetSourceMapRelease(a))return r.__GetSourceMapRelease(u.kDefaultSourceMapURL)}})}export{Fe as callDestroyLifetimeFun,ke as destroyCard,we as loadCard,Be as loadDynamicComponent,l as nativeGlobal};