(function(b){typeof define=="function"&&define.amd?define(b):b()})(function(){"use strict";var Ae=Object.defineProperty;var L=Object.getOwnPropertySymbols;var Ie=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var T=(b,w,v)=>w in b?Ae(b,w,{enumerable:!0,configurable:!0,writable:!0,value:v}):b[w]=v,O=(b,w)=>{for(var v in w||(w={}))Ie.call(w,v)&&T(b,v,w[v]);if(L)for(var v of L(w))We.call(w,v)&&T(b,v,w[v]);return b};const w=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{const{type:t,message:o}=e;a2w.dispatchNativeEvent("applyForPermission",JSON.stringify({type:t,message:o}))}}},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{e&&typeof e.confirmText=="string"?a2w.logout(e.confirmText):a2w.logout("")}}},Symbol.toStringTag,{value:"Module"})),J=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:({key:e})=>{const t=e.startsWith("SINAH5_")?e:"SINAH5_"+e;a2w.deleteAPPStorage(t)}}},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{if(typeof a2w!="undefined")if(typeof e=="object"){const{url:t}=e;typeof t=="string"?a2w.onBackPressedByJs(t):a2w.onBackPressedByJs()}else a2w.onBackPressedByJs()}}},Symbol.toStringTag,{value:"Module"})),N=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.hiddenTitleBar(!0)}}},Symbol.toStringTag,{value:"Module"})),D=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.setNativeShareButtonState(0)}}},Symbol.toStringTag,{value:"Module"})),k={exec:e=>{!e||typeof e.eventKey!="string"?console.warn("sima日志上报失败,原因:logSima参数有误,请查阅文档"):typeof e.eventAttribute!="object"&&(e.eventAttribute={});const t={source:"all",ref:"all",data:U({title:document.title,url:location.href,url_key:location.href.replace(/\?.+/gi,"").replace(/\#.+/gi,"")},e.eventAttribute)};typeof a2w!="undefined"?typeof a2w.sendFinanceAppEvent!="undefined"?a2w.sendFinanceAppEvent("sima",e.eventKey,JSON.stringify(t)):typeof a2w.exec!="undefined"&&a2w.exec("reported",'["sima","'+e.eventKey+'",'+JSON.stringify(t)+"]",""):console.warn("sima日志上报失败,原因:a2w暂不存在")}};function U(e,t){for(const o in t)e[o]=t[o];return JSON.parse(JSON.stringify(e))}const F=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"})),G=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.loginByWeibo()}}},Symbol.toStringTag,{value:"Module"})),m=(()=>{const e=(l,a)=>{var r={source:"all",ref:"all",data:a};typeof a2w!="undefined"&&(typeof a2w.sendFinanceAppEvent!="undefined"?a2w.sendFinanceAppEvent("sima",l,JSON.stringify(r)):typeof a2w.exec!="undefined"&&window.a2w.exec("reported","["+JSON.stringify(r)+"]",""))},t=()=>{try{const a=navigator.userAgent.toLowerCase().match(/(sinafinance|sinafinancepro|sinafinancelite)\w*__([^_]*)/);if(a){const r=a[1],p=a[2];return{appType:r,version:p}}return null}catch(l){return console.warn(l),null}};return{sendSima:e,getVersion:t,isSupportAutoLogin:()=>{var l=!0,a=t().replace(/\./g,"");return a&&(a=a.replace(/\./g,"").slice(0,4)),a<481&&(l=!1),l},getImgBase64Async:(l,a)=>{const r=document.createElement("img");r.setAttribute("crossOrigin","anonymous"),r.onload=function(){const p=document.createElement("canvas");p.width=r.width,p.height=r.height,p.getContext("2d").drawImage(r,0,0,r.width,r.height);const S=p.toDataURL("image/png");a(S)},r.src=l},convertURL:l=>{let a=l.trim().replace("vt=4&wm=6121&","");a=a.startsWith("//")?location.protocol+a:a;const r=new URL(a);if(a.startsWith("sinafinance://"))return a;if(/^(finance|tech|client)\.sina(\.com|)\.cn$/gi.test(r.hostname)&&r.pathname.startsWith("/zt_d/"))return"sinafinance://type=42&weexType=1&url="+encodeURIComponent(a);if(/^rl\.cj\.sina(\.com|)\.cn$/gi.test(r.hostname)&&r.pathname.startsWith("/imeeting/")){const p=r.pathname.match(/\/detail\/([\d]{4,})/i);return Array.isArray(p)&&p[1]?"sinafinance://type=42&weexType=2&roadshow_id="+p[1]:a}else if(/^(t\.|)cj\.sina(\.com|)\.cn$/gi.test(r.hostname)&&(r.pathname.startsWith("/article/")||r.pathname.startsWith("/articles/"))){const p=r.searchParams.get("url");return p?"sinafinance://type=17&url="+encodeURIComponent(p):"sinafinance://type=17&url="+encodeURIComponent(a)}else return/^(finance|tech|client|video|news)\.sina(\.com|)\.cn$/gi.test(r.hostname)&&(r.pathname.includes("/doc-")||r.pathname.includes("/detail-"))||/^k.sina(\.com|)\.cn$/gi.test(r.hostname)&&r.pathname.startsWith("/article_")?"sinafinance://type=17&url="+encodeURIComponent(a):"sinafinance://type=20&url="+encodeURIComponent(a)},b64Encode:l=>window.btoa(encodeURIComponent(l)),b64Decode:l=>decodeURIComponent(window.atob(l)),creatGuid:()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,l=>(l^crypto.getRandomValues(new Uint8Array(1))[0]&15>>l/4).toString(16)),isAppVersionSince:l=>{var p;const a=(p=/sinafinance__([\d\.]+)__/g.exec(navigator.userAgent))!=null?p:/sinafinancepro__([\d\.]+)__/g.exec(navigator.userAgent),r=/sinafinancelite__([\d\.]+)__/g.exec(navigator.userAgent);if(Array.isArray(a)){const u=a[1].split("."),S=(l+"").split(".");for(let f=0;fh)return!0;if(yh)return!0;if(y{const n=m.creatGuid();a2w.dispatchNativeEvent("openAPP",JSON.stringify({scheme:encodeURIComponent(e),openGuid:n})),a2wWebSide.onEvent("openAppResponse",i=>{i.openGuid===n&&(i.status+""=="1"?t&&t():o&&o())})}}},Symbol.toStringTag,{value:"Module"})),V=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:({type:e,onConfirm:t,onCancel:o})=>{if(isNaN(e))throw new Error(`openPrivacyModal 参数 type 错误(当前传入${e})`);{const n=m.creatGuid();a2w.openPrivacyModal(JSON.stringify({type:e,id:n})),a2wWebSide.onEvent("privacyModalResponse",i=>{i.id===n&&(i.result===!0?t&&t():o&&o())})}}}},Symbol.toStringTag,{value:"Module"})),$=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{e.isPrevent===!1?delete window.a2wWebSide.webViewWillGoback:window.a2wWebSide.webViewWillGoback=()=>{e.onPrevented&&e.onPrevented()}}}},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{if(typeof a2w!="undefined")if(typeof e=="object"){const{isPrevent:t}=e;t?a2w.disableSystemPanGesture("1"):a2w.disableSystemPanGesture("0")}else a2w.disableSystemPanGesture(e+"")}}},Symbol.toStringTag,{value:"Module"})),Y=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{const{type:t}=e;if(!isNaN(t))a2w.dispatchNativeEvent("privacyConfirmed",JSON.stringify({type:t}));else throw new Error(`privacyConfirmed 参数 type 错误(当前传入${t})`)}}},Symbol.toStringTag,{value:"Module"})),X=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{a2w.webViewUpdateHomeFunctions(JSON.stringify(e))}}},Symbol.toStringTag,{value:"Module"})),q=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{let{event:t,condition:o}=e;t=t.toLowerCase(),t.startsWith("web_")||(t="web_"+t),o=parseInt(o,10),o||(o=1);const n=t.replace(/^web_/gi,"");a2w.appScoreReview(t,JSON.stringify({condition:o,sima:n}))}}},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:({key:e,value:t})=>{const o=e.startsWith("SINAH5_")?e:"SINAH5_"+e;a2w.setAPPStorage(o,m.b64Encode(String.raw`${t}`))}}},Symbol.toStringTag,{value:"Module"})),Z=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{const[t,o,n,i]=[e.title||document.title||"",e.cont||document.description||"",e.url||window.location.href||"",e.icon||null];a2w.setShareConfig(t,o,n),window.a2wWebSide.getShareConf=function(){return{title:t,cont:o,url:n,icon:i}}}}},Symbol.toStringTag,{value:"Module"})),ee=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{const t={};e.title&&(t.title=e.title),e.cont&&(t.cont=e.cont),e.url&&(t.url=e.url),e.icon&&(t.icon=e.icon),a2w.share(JSON.stringify(t))}}},Symbol.toStringTag,{value:"Module"})),te=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{if(typeof e.img!="string"||e.img.split(",").length!==2)if(typeof e.img=="string"&&(e.img.startsWith("http")||e.img.startsWith("//"))){m.getImgBase64Async(e.img,o=>{const n={title:e.cont||"",cont:e.cont||"",imgData:o.split(",")[1],imgDataPrefix:o.split(",")[0]};a2w.shareIMG(JSON.stringify(n))});return}else e.img.split(",").length!==2&&console.warn("shareImg失败,原因:shareImg必须指定合法的img参数内容");const t={title:e.cont||"",cont:e.cont||"",imgData:e.img.split(",")[1],imgDataPrefix:e.img.split(",")[0]};a2w.shareIMG(JSON.stringify(t))}}},Symbol.toStringTag,{value:"Module"})),ne=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.hiddenTitleBar(!1)}}},Symbol.toStringTag,{value:"Module"})),oe=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.showLogin()}}},Symbol.toStringTag,{value:"Module"})),ie=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{a2w.setNativeShareButtonState(1)}}},Symbol.toStringTag,{value:"Module"})),re=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:()=>{a2w.logout("disable")}}},Symbol.toStringTag,{value:"Module"})),ae=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{const t=e.panel;if(typeof t!="string")throw new Error("toExtPanel 参数错误,panel必须为字符串类型");a2w.dispatchNativeEvent("toExtPanel",JSON.stringify({panel:t}))}}},Symbol.toStringTag,{value:"Module"})),se=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>{if(typeof a2w!="undefined"){if(!e||!e.to){console.warn("toPanel 失败,原因:必须指定所前往的目的面板");return}e.to==="settings_notification"&&a2w.openNotification()}}}},Symbol.toStringTag,{value:"Module"})),de=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("darkModeInfoUpdate",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("darkModeInfoUpdate",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("darkModeInfoUpdate",e):window.a2wWebSide.offEvent("darkModeInfoUpdate")}}},Symbol.toStringTag,{value:"Module"})),ce=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("viewDidAppear",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("viewDidAppear",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("viewDidAppear",e):window.a2wWebSide.offEvent("viewDidAppear")}}},Symbol.toStringTag,{value:"Module"})),le=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("viewDidDisappear",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("viewDidDisappear",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("viewDidDisappear",e):window.a2wWebSide.offEvent("viewDidDisappear")}}},Symbol.toStringTag,{value:"Module"})),pe=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("didEnterBackground",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("didEnterBackground",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("didEnterBackground",e):window.a2wWebSide.offEvent("didEnterBackground")}}},Symbol.toStringTag,{value:"Module"})),fe=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("didEnterForeground",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("didEnterForeground",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("didEnterForeground",e):window.a2wWebSide.offEvent("didEnterForeground")}}},Symbol.toStringTag,{value:"Module"})),ue=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("login",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("login",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("login",e):window.a2wWebSide.offEvent("login")}}},Symbol.toStringTag,{value:"Module"})),_e=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("logout",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("logout",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("logout",e):window.a2wWebSide.offEvent("logout")}}},Symbol.toStringTag,{value:"Module"})),we=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{a2w.registerEvent("motion"),window.a2wWebSide.onEvent("motionEnded",e),window.a2wWebSide.onEvent("motionCancelled",e)},bindEventOnce:e=>{a2w.registerEvent("motion"),window.a2wWebSide.onEventOnce("motionEnded",e),window.a2wWebSide.onEventOnce("motionCancelled",e)},unbindEvent:e=>{typeof e=="function"?(window.a2wWebSide.offEvent("motionEnded",e),window.a2wWebSide.offEvent("motionCancelled",e)):(window.a2wWebSide.offEvent("motionEnded"),window.a2wWebSide.offEvent("motionCancelled"))}}},Symbol.toStringTag,{value:"Module"})),ge=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("payComplete",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("payComplete",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("payComplete",e):window.a2wWebSide.offEvent("payComplete")}}},Symbol.toStringTag,{value:"Module"})),be=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("permissionChange",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("permissionChange",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("permissionChange",e):window.a2wWebSide.offEvent("permissionChange")}}},Symbol.toStringTag,{value:"Module"})),ve=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("privacyModalResponse",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("privacyModalResponse",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("privacyModalResponse",e):window.a2wWebSide.offEvent("privacyModalResponse")}}},Symbol.toStringTag,{value:"Module"})),Se=Object.freeze(Object.defineProperty({__proto__:null,default:{bindEvent:e=>{window.a2wWebSide.onEvent("shareComplete",e)},bindEventOnce:e=>{window.a2wWebSide.onEventOnce("shareComplete",e)},unbindEvent:e=>{typeof e=="function"?window.a2wWebSide.offEvent("shareComplete",e):window.a2wWebSide.offEvent("shareComplete")}}},Symbol.toStringTag,{value:"Module"})),ye=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:({key:e,isH5Storage:t=!0})=>{if(typeof e=="string"&&e.trim()!==""){const o=t?"SINAH5_"+e:e,n=a2w.getAPPStorage(o);return n==="NONE_EXIST_KEY"?null:n}else throw new Error("appStorage key必须为有效字符串")},addCallBack:e=>{window.a2wWebSide.onEventOnce("appStorageGot",t=>{const o=t.value==="NONE_EXIST_KEY"?null:m.b64Decode(t.value);e(o)})}}},Symbol.toStringTag,{value:"Module"})),me=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>a2w.webViewGetHomeFunctions(),addCallBack:e=>{window.a2wWebSide.onEventOnce("homeShortcutsInfoGot",e)}}},Symbol.toStringTag,{value:"Module"})),he=Object.freeze(Object.defineProperty({__proto__:null,default:{exec:e=>a2w.webViewGetUserInfo(),addCallBack:e=>{window.a2wWebSide.onEventOnce("userInfoGot",e)}}},Symbol.toStringTag,{value:"Module"})),Ee=()=>{const e={motionBegan:[],motionEnded:[],motionCancelled:[],userInfoGot:[],homeShortcutsInfoGot:[],payComplete:[],login:[],logout:[],viewDidAppear:[],viewDidDisappear:[],shareComplete:[],didEnterBackground:[],didEnterForeground:[],darkModeInfoUpdate:[],permissionChange:[],appStorageGot:[],openAppResponse:[],privacyModalResponse:[],jsbridgeReady:[]},t={onEvent:(n,i)=>{n in e&&e[n].push(i)},onEventOnce:(n,i)=>{if(n in e){const d=(...c)=>{i(...c),window.a2wWebSide.offEvent(n,d)};e[n].push(d)}},offEvent:(n,i=void 0)=>{if(n in e){const d=[];typeof i=="function"?(e[n].forEach(c=>{c!==i&&d.push(c)}),e[n]=d):e[n]=[]}},dispatchEvent:(n,i)=>{const d=typeof i=="string"?JSON.parse(i):i;n in e&&e[n].forEach(c=>{c(d)})}},o=window.w2a||{onShared:n=>{t.dispatchEvent("shareComplete",JSON.parse(n))}};window.a2wWebSide=typeof window.a2wWebSide=="object"?O(O({},window.a2wWebSide),t):t,window.w2a=typeof window.w2a=="object"?O(O({},window.w2a),o):o,window.onUserInfo=function(n){t.dispatchEvent("userInfoGot",n)},window.onLoginSuc=function(n){t.dispatchEvent("login",JSON.parse(n))},typeof window.loadNightStyle=="function"?console.warn("检测到window.loadNightStyle已被赋值,组件内置的夜间模式body自定义类名、darkModeInfoUpdate自定义事件等机制已失效"):window.loadNightStyle=(n,i)=>{C(n),t.dispatchEvent("darkModeInfoUpdate",{isNightMode:n,isRedUp:i})},window.addEventListener("DOMContentLoaded",()=>{const i=new URL(location.href).searchParams.get("isBlackTheme")==="1";C(i)}),window.webViewGetNewsHomeFunctions=function(n){t.dispatchEvent("homeShortcutsInfoGot",JSON.parse(n))}};function C(e){const t="sf-app-dark",o="sf-app-dark-html",n="sf-app-light",i="sf-app-light-html";if(e){document.body.classList.remove(n),document.body.classList.add(t);try{document.documentElement.classList.remove(i),document.documentElement.classList.add(o)}catch(d){}}else{document.body.classList.remove(t),document.body.classList.add(n);try{document.documentElement.classList.remove(o),document.documentElement.classList.add(i)}catch(d){}}}const Oe=()=>{const e={maxInterval:500,targetCount:10,erudaUrl:"https://n.sinaimg.cn/finance/c30320b4/20250617/eruda.js",whitelist:["2219574291","1697064601","1649086444"]};let t=0,o=0,n="";const i=()=>{if(typeof window.eruda!="undefined"){console.log("[SFJSBridge] Eruda exists, initializing..."),window.eruda.init();return}console.log("[SFJSBridge] Loading Eruda...");const d=document.createElement("script");d.src=e.erudaUrl,d.async=!0,d.onload=()=>{typeof window.eruda!="undefined"&&(console.log("[SFJSBridge] Eruda loaded, initializing..."),window.eruda.init())},d.onerror=()=>{console.warn("[SFJSBridge] Eruda load failed")},document.head.appendChild(d)};setTimeout(()=>{window.SFJSBridge&&window.SFJSBridge.getInfoAsync&&window.SFJSBridge.getInfoAsync("userData",d=>{if(d&&d.uid){const c=String(d.uid);e.whitelist.includes(c)&&(console.log(`[SFJSBridge] UID ${c} matches whitelist, enabling Eruda...`),i())}})},200),window.addEventListener("click",d=>{const c=Date.now();c-o>e.maxInterval&&(t=0,n="");const E=window.innerWidth,l=d.clientX=e.targetCount&&(i(),t=0)})},P=e=>{const t={};for(const o in e){const n=e[o],i=o.split("/").pop().replace(/\.\w+$/,"");t[i]=n.default||n}return t},j=(()=>{const e=Object.assign({"./action/applyForPermission.js":w,"./action/confirmLogout.js":R,"./action/deleteAppStorage.js":J,"./action/goBack.js":z,"./action/hideAppBar.js":N,"./action/hideShareBtn.js":D,"./action/logSIMA.js":F,"./action/loginByWeibo.js":G,"./action/openApp.js":H,"./action/openPrivacyModal.js":V,"./action/preventGoBack.js":$,"./action/preventIOSPanRight.js":K,"./action/privacyConfirmed.js":Y,"./action/replaceHomeShortcut.js":X,"./action/scoreReview.js":q,"./action/setAppStorage.js":Q,"./action/setShareConfig.js":Z,"./action/share.js":ee,"./action/shareImg.js":te,"./action/showAppBar.js":ne,"./action/showLogin.js":oe,"./action/showShareBtn.js":ie,"./action/silentLogout.js":re,"./action/toExtPanel.js":ae,"./action/toPanel.js":se}),t=Object.assign({"./event/darkModeInfoUpdate.js":de,"./event/didAppear.js":ce,"./event/didDisappear.js":le,"./event/didEnterBackground.js":pe,"./event/didEnterForeground.js":fe,"./event/login.js":ue,"./event/logout.js":_e,"./event/motion.js":we,"./event/payComplete.js":ge,"./event/permissionChange.js":be,"./event/privacyModalResponse.js":ve,"./event/shareComplete.js":Se}),o=Object.assign({"./info/appStorage.js":ye,"./info/homeShortcuts.js":me,"./info/userData.js":he}),n=P(e),i=P(t),d=P(o),c=navigator.userAgent.toLocaleLowerCase(),E=c.indexOf("sinafinancedesktop")>-1,A=E&&/mac os/.test(c),l=E&&/windows/.test(c),a=c.indexOf("sinafinance")>-1&&c.indexOf("sinafinancedesktop")===-1,r=/android/.test(c)||/xiaomi/.test(c),p=/(ipad|iphone|ipod|itouch)/.test(c)&&!r,u=/(iphone|ipod|itouch)/.test(c)&&!r,S=/(harmony)/.test(c)||/(hms)/.test(c),f=S&&/(pc|windows|win64|x64|x86|desktop)/.test(c),y=S&&!f&&/(mobile|tablet)/.test(c),h=u||r||y,g={isInDeskAPP:E,isInDeskAPPMacOS:A,isInDeskAPPWindows:l,isInAPP:a,isReady:!!(window.a2w&&window.a2w.getLoginStatus),isIOS:p,isAndroid:r,isIphone:u,isHarmony:S,isHarmonyPC:f,isHarmonyMobile:y,isMobile:h,version:"1.2.13",appVersion:m.getVersion(),actionList:Object.keys(n),eventList:Object.keys(i),asyncInfoList:Object.keys(d)},Pe=()=>JSON.parse(JSON.stringify(g));let I=!0;const W=s=>{g.isIOS?I?(s(),I=!1,setTimeout(()=>I=!0,20)):setTimeout(()=>{W(s)},20):s()},x=[],M=s=>{typeof s!="function"&&console.warn("onJSBridgeReady 参数 必须是 Funtion 类型"),g.isReady?W(s):x.push(s)};if(!g.isReady){const s=setInterval(()=>{window.a2w&&window.a2w.getLoginStatus&&(g.isReady=!0,x.forEach(_=>{W(_)}),clearInterval(s))},50)}return{getState:Pe,utils:m,onJSBridgeReady:M,onEvent:(s,_)=>{g.isInAPP?s in i?i[s].bindEvent(_):console.warn("该事件不存在"):console.warn("执行失败,请在APP内置webview使用APP JSBridge")},onEventOnce:(s,_)=>{g.isInAPP?s in i?i[s].bindEventOnce(_):console.warn("该事件不存在"):console.warn("执行失败,请在APP内置webview使用APP JSBridge")},offEvent:(s,_)=>{g.isInAPP?s in i?i[s].unbindEvent(_):console.warn("该事件不存在"):console.warn("执行失败,请在APP内置webview使用APP JSBridge")},invokeAction:(s,_,...B)=>{g.isInAPP?M(()=>{if(s in n)try{n[s].exec(_,...B)}catch(je){console.warn(`执行${s}失败,错误信息:`,je)}else console.warn(`${s} 不在支持的actions清单内`)}):console.warn("执行失败,请在APP内置webview使用APP JSBridge")},getInfo:(s,_)=>{if(g.isInAPP)if(g.isReady){if(s in _Infos)return d[s].exec(_);throw new Error("该info并未支持")}else throw new Error("执行getInfo失败,JSBridge尚未初始化完成");else console.warn("执行失败,请在APP内置webview使用APP JSBridge")},getInfoAsync:(s,_,B)=>{g.isInAPP?M(()=>{s in d?(d[s].addCallBack(_),d[s].exec(B)):console.warn(`infoName:${s}不存在`)}):console.warn("执行失败,请在APP内置webview使用APP JSBridge")}}})();window.SFJSBridge||(Ee(),window.SFJSBridge=j,Oe(),j.getState().isInAPP&&j.invokeAction("logSIMA",{eventKey:"h5_app_open"}))});