(()=>{return(e,n)=>{const t={less:-1,equal:0,greater:1,incomparable:NaN};class s{constructor(e){this.parts=e.split(".").map(e=>parseInt(e));this.versionString=e}compareTo(e){for(let n=0;ne.parts[n]){return t.greater}return t.less}if(this.parts.length!==e.parts.length){return t.less}return t.equal}greaterThan(e){return this.compareTo(e)===t.greater}lessThan(e){return this.compareTo(e)===t.less}equals(e){return this.compareTo(e)===t.equal}}const r=new s(n.data.latestVersion.text);const i=new s(e.currentVersion);if(r.greaterThan(i)){const n=`新版本${r.versionString}已发布. 安装查看`;const t=Toast.info(n,"检查更新");$("#new-version-link").on("click",()=>t&&t.dismiss());return{widget:{content:`\n \n \n \n 安装更新\n \n \n \n \n 查看更新\n \n `,success:()=>{$("#new-version-update").on("click",()=>document.querySelector("#new-version-update a").click());$("#new-version-info").on("click",()=>document.querySelector("#new-version-info a").click())}}}}}})();