Greasy Fork is available in English.

三国杀打小抄-皮肤体验版

三国杀打小抄,可自动严教,记牌堆,记控顶控底,一键算13点,支持网页版和微端,微端文件请加群917826431

// ==UserScript==
// @name         三国杀打小抄-皮肤体验版
// @namespace    https://greasyfork.org/users/30284
// @version      2.9.16
// @author       小麦
// @license MIT
// @description  三国杀打小抄,可自动严教,记牌堆,记控顶控底,一键算13点,支持网页版和微端,微端文件请加群917826431
// @icon         https://i0.hdslb.com/bfs/new_dyn/17ec41a0ca79633b77399065ab80da3f2138912.png
// @match        *://game.4399iw2.com/yxsgs/*
// @match        *://my.4399.com/yxsgs/*
// @match        *://*.sanguosha.com/*
// @match        *://web.kuaiwan.com/kwsgsn/*
// @match        *://wan.baidu.com/microend?gameId=19793595/*
// @match        *://www.7k7k.com/special/sgs/?*
// @grant        none
// @run-at       document-start

// ==/UserScript==

(function () {
	'use strict';

	var e,t,n,i,a,s=Object.defineProperty,l=(e,t,n)=>(((e,t,n)=>{t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;})(e,"symbol"!=typeof t?t+"":t,n),n),o=void 0!==(null==(e=window.electron)?void 0:e.ipcRenderer);function r(e,t=null,n=!0){let i;return o&&!n&&(i=window.electron.ipcRenderer.sendSync("localGet",e)),i||"undefined"==typeof localStorage||(i=localStorage.getItem(e)),i?JSON.parse(i):t}async function d(e,t,n=!0){o&&!n?window.electron.ipcRenderer.send("localSet",e,JSON.stringify(t)):"undefined"!=typeof localStorage&&localStorage.setItem(e,JSON.stringify(t));}async function c(e,t=!0){o&&!t?window.electron.ipcRenderer.send("localDel",e):"undefined"!=typeof localStorage&&localStorage.removeItem(e);}function u(e,t=0){let n="";const i="  ".repeat(t);if(Array.isArray(e))e.every((e=>"object"!=typeof e||!e))?n+=`${i}${e.join("\t")}\n`:(n+=`${i}<ol>\n`,e.forEach((e=>{n+=`${i}  <li>\n`,n+=u(e,t+2),n+=`${i}  </li>\n`;})),n+=`${i}</ol>\n`);else if("object"==typeof e&&null!==e)if(Object.values(e).every((e=>"object"!=typeof e||!e)))n+=`${i}${Object.entries(e).map((([e,t])=>`<strong>${e}:</strong> ${t}`)).join(", ")}\n`;else {n+=`${i}<ul>\n`;for(const a in e)n+=`${i}  <li>\n`,n+=`${i}    <strong>${a}:</strong>\n`,n+=u(e[a],t+2),n+=`${i}  </li>\n`;n+=`${i}</ul>\n`;}else n+=`${i}  ${e}\n`;return n}const h=[];let p=!1;function m(e,t="acTooltip",n=1e4,i,a){h.push({text:e,id:t,duration:n,className:i,clickCallback:a}),p||g();}function f(e){(null==ChannelUtils?void 0:ChannelUtils.openQQBuy)&&e.split("<br>").forEach(((e,t)=>{""!==e.trim()&&setTimeout((()=>{ChannelUtils.openQQBuy({ret:!0,msg:e});}),1e3*t);}));}function g(){if(0===h.length)return void(p=!1);p=!0;const{text:e,id:t,duration:n,className:i,clickCallback:a}=h.shift();let s=document.getElementById(t);s&&s.remove();let l=t+"-"+(new Date).getTime(),o=document.createElement("div");o.id=l,o.className="ac-tooltip "+i,o.innerHTML=e,document.body.appendChild(o),a&&"function"==typeof a&&o.addEventListener("click",a),setTimeout((()=>{o.classList.remove("hide"),o.classList.add("show"),o.style.top="20px";}),50),n?setTimeout((()=>{!function(e){let t=document.getElementById(e);t&&(t.classList.remove("show"),t.classList.add("hide"),setTimeout((()=>{t&&t.remove();}),300));}(l),g();}),n):p=!1;}const y=["TableGameScene","HeroBattle1v1GameScene","ShenWuZaiShiGameScene","RogueLikeGameScene","RogueLike1v1GameScene","PointRace2V2GameScene","ZhuGongShaGameScene","GuanDuZhiZhanGameScene","ShiDianYanLuoGameScene","HuLaoGuanGameScene","ChallengeMatchFigureGameScene","ChallengeMatch2v2GameScene","GuideFiveFigureGameScene","GuideHappyGameScene","NewBieForceTrainGameScene","NewBieForceGameScene","QMBZGameScene","LZHZGameScene","ShenZhiShiLianGameScene","QianLiDJGameScene","DouDiZhuGameScene","GuideGameScene","New1v1GameScene","TSGameScene","XzcbpGameScene","PaiWeiGameScene","GuoGameScene","ChallengeMatchDouDiZhuGameScene","ChallengeMatchCountryGameScene","OfflineMatch2V2GameScene","DouDiZhu2023GameScene","ObDDZGameScene","ObGamePractice2v2Scene","ObGameScene"];async function v(e,t=20,n=500,i=(()=>{})){const a=await Promise.resolve(e());a?i(a):t>0?setTimeout((()=>v(e,t-1,n,i)),n):i(null);}function b(e,t=20,n=500){return new Promise((i=>{v(e,t,n,i);}))}function w(e,t){return new Promise(((n,i)=>{setTimeout((()=>n(t)),e);}))}const x={instance:{},scene:"",gamescene:null,flag:null,limit:300,card:()=>null,seat:()=>null,btn:()=>null,deal:()=>null,chat:()=>null,get(e,t,n){var i,a;return !t&&this.instance[e]||("ActivityManager"==e?this.instance[e]=null==(i=Laya.ClassUtils.getInstance("TaskDailyView"))?void 0:i.manager:(this.del(e),this.instance[e]=Laya.ClassUtils.getInstance(e),this.instance[e].Init())),(null==(a=this.instance[e])?void 0:a.timeoutID)&&clearTimeout(this.instance[e].timeoutID),n&&n(this.instance[e]),this.instance[e]},del:(()=>{function e(e){this.instance[e]&&(e.endsWith("Window")?this.instance[e].Close():this.instance[e].destroy(),delete this.instance[e]);}return function(t,n=0){this.instance[t]&&(n?this.instance[t].timeoutID=setTimeout((()=>{e.call(this,t);}),n):e.call(this,t));}})(),find:(()=>{const e=e=>Array.isArray(e)&&1==e.length?e[0]:e,t=e=>"[object Object]"===Object.prototype.toString.call(e);function n(t,n){var i;if(n in t)return t[n];{let a=Boolean(n)?null==(i=null==t?void 0:t._children)?void 0:i.filter((e=>{var t;return e.name==n||(null==(t=e.constructor)?void 0:t.name)==n})):null==t?void 0:t._children;return (null==a?void 0:a.length)?e(a):[]}}return function(...i){let a=t(i[0])?i.shift():Laya.stage,s=i.reduce(((i,a)=>i instanceof Object?Array.isArray(i)?i.length?Array.isArray(a)?e(i.flatMap((e=>a.flatMap((t=>n(e,t)))))):e(i.flatMap((e=>n(e,a)))):[]:t(i)?Array.isArray(a)?e(a.flatMap((e=>n(i,e)))):e(n(i,a)):[]:[]),a);return 0==(null==s?void 0:s.length)?null:s}})(),clickBuilder(e,t,n,i=((e,t)=>(e.onClick(),t))){if(!n)return null;function a(t,n=!0){return t?!(n&&!t[e])&&i(t,n):null}return function(...i){let s="boolean"==typeof i[0]?i.shift():null;if(0==i.length&&(i=t||Object.keys(n)),"boolean"==typeof s)return i.map((e=>a(n[e],s)));for(let t of i){let i=n[t];if(null==i?void 0:i[e])return a(i)}return null}},reset(){this.auto(null),this.gamescene=null,this.limit=0,this.chat=this.card=this.seat=this.btn=this.deal=()=>null;},init(){var e,t,n,i;if(null==(n=null==(t=null==(e=this.gamescene)?void 0:e.seatContainer)?void 0:t.seatUIs)?void 0:n.length)return !0;let a=this.find("SceneLayer",y);if(!a)return !1;let s=null==(i=a.seatContainer)?void 0:i.seatUIs,l=a.chatViewUI;return !(!(null==s?void 0:s.length)||!l||(this.gamescene=a,R.v&&k(),H.setMyID(s[0].seat.index),H.update(!0,s.map((e=>e.seat.index))),this.chat=(e,t=!1)=>{var n;return (null==l?void 0:l.chatInput)?(l.chatInput.text=e,t&&(null==(n=l.sendBtn)||n.onClick()),!0):null},this.limit=290,b((()=>void 0!==H.firstID),300).then((()=>this.auto(R.autoBotSwitch))),0))},wugu:(()=>{let e=null;return function(t=1e3){return new Promise((n=>{U.loop("wugu",(()=>{var t,i;let a=this.find("WindowLayer","WuGuFengDengWindow");if(!a)return U.clear("wugu"),n(e),void(e=null);let s=null==(t=a.showCardUIs)?void 0:t.find((e=>0==e.maskAlpha));s&&(null==(i=a.OnSelectNormalCardUi)||i.call(a,s),e=s.Card.cardId);}),t);}))}})(),yanJiao(e,t=1){var n;const i=this.find("WindowLayer","YanJiaoWindow");if(!i)return;if((null==(n=i.seat)?void 0:n.index)!=H.mySeats[0])return !1;if(t%2!=0){let e=i.cardQueues.flatMap((e=>e));return i.cardQueues[0].splice(0,1/0,...e),i.cardQueues[1].splice(0,1/0),i.cardQueues[2].splice(0,1/0),void i.layoutCardUIs()}let a=i.cardQueues.flatMap((e=>e)).reduce(((e,t)=>(e[t.Card.CardNumber].push(t),e)),Array.from({length:14},(()=>[])));i.cardQueues[0].splice(0,1/0,...e[2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.cardQueues[1].splice(0,1/0,...e[t/2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.cardQueues[2].splice(0,1/0,...e[1-t/2].flatMap(((e,t)=>e&&t?a[t].splice(0,e):[]))),i.layoutCardUIs();},async newRoom(){var e,t,n,i,a,s,l;const o=this.find("SceneLayer","HallScene","roomListView");if(![74,84].includes(null==o?void 0:o.modeId))return f("请进入身份/欢乐演武房间列表后再开启挂机!"),!1;o.sendCreateTable();const r=await b((()=>this.find("WindowLayer","CreateTableWindow")));if(!r)return null;null==(e=r.showMoreHandler)||e.call(r),Object.assign((null==(t=r.generalExList)?void 0:t.find((e=>"神话再临"==e._text)))||{},{selected:!1}),(null==(i=null==(n=r.modeBox)?void 0:n._labels)?void 0:i.length)&&(r.modeBox.selectedIndex=r.modeBox._labels.length-1),r.timeBox&&(r.timeBox.selectedIndex=1),r.banItemBox&&(r.banItemBox.selected=!0),r.passwordInput&&(r.passwordInput.text="GuDuZun"),await w(1e3),null==(a=r.sureHandler)||a.call(r);const d=await b((()=>this.find("SceneLayer","TableScene")));if(!(null==(l=null==(s=null==d?void 0:d.seatListView)?void 0:s.seatList)?void 0:l.length))return null;let c=d.seatListView.seatList.filter((e=>!e.WaitInfo)).slice(-1)[0];return d.seatListView.showBtns(c),d.seatListView.sitHandler(),!0},async readyStart(){var e,t,n,i,a,s,l,o,r,d,c;const u=await b((()=>this.find("SceneLayer","TableScene")));let h=null==(t=null==(e=null==u?void 0:u.seatListView)?void 0:e.seatList)?void 0:t.length;if(!h||!(null==u?void 0:u.startUI))return null;for(let p of u.seatListView.seatList.filter((e=>!e.WaitInfo&&e.seatId>=h/2)))u.seatListView.showBtns(p),u.seatListView.addAiMHandler(p),await w(200);if(null==(n=u.confirmNormalAi)||n.call(u),await w(1e3),null==(a=null==(i=u.dianjiangView)?void 0:i.onOpenDJClick)||a.call(i),null==(o=null==(l=null==(s=u.banGeneralBtn)?void 0:s.skins)?void 0:l[0])?void 0:o.startsWith("open")){u.banGeneralHandler();const e=await b((()=>this.find("WindowLayer","BanGeneralWindow")));if(!(null==(r=null==e?void 0:e.showItemui)?void 0:r.length))return;for(let t of e.showItemui.slice(0,7))t.onClick(),await w(200);e.onSureBtnClick();}return await w(5e3),null==(c=null==(d=this.find("SceneLayer","TableScene"))?void 0:d.startUI)||c.confirmStart(),!0},auto(e){var t,n,i,a,s,l,o,r,d,c,u,h,p,m;if(e!=this.flag&&(this.flag=e,U.clear("auto"),null!==e&&(null==(i=null==(n=null==(t=this.gamescene)?void 0:t.seatContainer)?void 0:n.seatUIs)?void 0:i.length))){if(this.deal.toString().endsWith("null")){let e=null==(a=this.gamescene.seatContainer)?void 0:a.seatUIs,t=null==(o=null==(l=null==(s=this.gamescene.seatContainer)?void 0:s.selfSeatUi)?void 0:l.cardContainer)?void 0:o.activatedCardtems,n=null==(c=null==(d=null==(r=this.gamescene.seatContainer)?void 0:r.selfSeatUi)?void 0:d.buttonBar)?void 0:c.btns;if(!e||!t||!n)return !1;let i=e.map((e=>e.seat.index)),u=(p=Object.keys(i).map(Number),m=i.indexOf(H.firstID),p.slice(m).concat(p.slice(0,m))),h=e.map(((e,t)=>e.seat.figure||(t?0:-1))),g=e.map((e=>e.seat.playerInfo.clientId<4e9?0:e.seat.playerInfo.showName.includes("金")?2:1));g.some(Boolean)&&f("小杀AI参战!"),u=u.filter((e=>1==g[e]&&h[e]!=h[0])).concat(u.filter((e=>2==g[e]&&h[e]!=h[0]))).concat(u.filter((e=>0!=g[e]&&h[e]==h[0]))).concat(u.filter((e=>0==g[e]))),console.warn("优先级",u.map((e=>["玩家-","小杀-","玫瑰金-"][g[e]]+(H.name(i[e])||e)+"-身份"+h[e]))),this.card=this.clickBuilder("activated",null,t,((e,t)=>{var n;return e.setSelected(t),null==(n=e.Card)?void 0:n.cardId})),this.seat=this.clickBuilder("activated",u,e,((e,t)=>{e.seat.SetSelected(t),e.seat;})),this.btn=this.clickBuilder("_enabled",null,n,((e,t)=>(e.onClick(),t)));let y=e=>Array.isArray(e)?e[0]:e;this.deal=(t=[],n=[],i=[])=>{var a,s,l,o;let r=y(this.card(...t));(null==(a=P.name["闪电"])?void 0:a.has(r))?r=y(this.card(!0)):(null==(s=P.name["铁索"])?void 0:s.has(r))?n=[!1]:(null==(l=P.name["无懈"])?void 0:l.has(r))?i=[3,1,0,2]:(null==(o=P.name["桃"])?void 0:o.has(r))&&e.some(((e,t)=>{var n,i;return 1==g[t]&&h[t]!=h[0]&&!(null==(n=null==e?void 0:e.seat)?void 0:n.isDead)&&(null==(i=null==e?void 0:e.seat)?void 0:i.currentHp)<=0}))&&(i=[1,2,3,0]),y(this.seat(...n)),this.btn(...i);};}if(3==e){let e=this.gamescene.seatContainer.selfSeatUi;Laya.stage.off(Laya.Event.MOUSE_MOVE,e,e.stageMoveHandler),U.loop("auto",(()=>{3!=e.seat.OnlineState&&e.onTrusteeshipClick(),this.limit--<=0&&this.auto(R.autoBotSwitch);}),1e3),f("切换到AI托管挂机...");}else if(e){let e=null==(h=null==(u=this.gamescene)?void 0:u.seatContainer)?void 0:h.selfSeatUi;U.loop("auto",(()=>{var t;(null==(t=null==e?void 0:e.seat)?void 0:t.OnlineState)>=3&&(null==e||e.stageMoveHandler()),this.deal();}),1e3),f("切换到脚本接管挂机...");}else console.warn("酒馆挂机已关闭!");}}},S=(()=>{function e(e=!0,t,n,i){var a,s,l,o,r;const d="SelectCardWindow"==(null==(a=null==this?void 0:this.constructor)?void 0:a.name)?this:x.find("WindowLayer","SelectCardWindow");if(!d)return null;if((null==(s=d.seat)?void 0:s.index)!=(n>=0?n:H.mySeats[0]))return !1;if(t>0&&(null==(l=d.Skill)?void 0:l.SkillId)!=t)return !1;i=i>0?i:(null==(o=d.Skill)?void 0:o.SelectCardCountWhenResponse)||1;let c=(u=x.find(d,"SkillSelectCardUi"),Array.isArray(u)?u:[u]).filter((e=>null==e?void 0:e.activated)).slice(0,i).map((e=>{var t;return d.onTouchCard({target:e}),null==(t=e.Card)?void 0:t.CardId}));var u;return !0===e&&(null==(r=d.confirmClick)||r.call(d)),c}return async function(t,...n){var i,a;const s=await b((()=>x.find("WindowLayer","SelectCardWindow")));if(t)return e.apply(s,n);const l=null==s?void 0:s.confirm_btn,o=(null==(i=s.Skill)?void 0:i.SelectCardCountWhenResponse)||1;if(!((null==l?void 0:l.textField)&&o>1&&(null==(a=s.seat)?void 0:a.index)==H.mySeats[0]))return !1;let{x:r,y:d,width:c,textField:{bold:u,font:h,fontSize:p}}=l,m=s.myFuncBtn||new Laya.Button;return Object.assign(m,{label:"一键全选",skin:"",borderWidth:1,align:"center",valign:"middle",border:"rgb(110 107 91)",labelColors:"#E4D5A0,#E4D5A0,#E4D5A0,#d0cece",width:c,height:28,bold:u,fontSize:p,font:h}),m.graphics.clear(),m.graphics.drawPath(0,0,[["moveTo",5,0],["lineTo",c-5,0],["arcTo",c,0,c,5,5],["lineTo",c,23],["arcTo",c,28,c-5,28,5],["lineTo",5,28],["arcTo",0,28,0,23,5],["lineTo",0,5],["arcTo",0,0,5,0,5]],{fillStyle:"rgb(76,41,32)"}),m.pos(r-1.2*c,d),s.myFuncBtn||(s.addChild(s.myFuncBtn=m),s.myFuncBtn.on(Laya.Event.CLICK,s,e)),!0}})(),k=(()=>{function e(e){var t,n;const i="CardUIContainer"==(null==(t=null==this?void 0:this.constructor)?void 0:t.name)?this:x.find("SceneLayer",y,"SelfSeatUi","cardContainer");if(!(null==(n=null==i?void 0:i.cardUis)?void 0:n.length))return null;i.cardUis.filter((e=>null==e?void 0:e.activated)).filter((t=>void 0===e||t.selected!=e)).forEach((e=>e.CardUI_Click()));}const t=[function(){e.call(this,!0);},function(){e.call(this,void 0);},function(){e.call(this,!1);}];return async function(){var e,n,i,a;const s=await b((()=>{var e;return (null==(e=x.gamescene)?void 0:e.SelfSeatUi)||x.find("SceneLayer",y,"SelfSeatUi")})),l=[null==s?void 0:s.seatAvatar,null==(e=null==s?void 0:s.otherTopManager)?void 0:e.seatIndex,null==(n=null==s?void 0:s.countryUI)?void 0:n.cardNumBg,null==(i=null==s?void 0:s.countryUI)?void 0:i.cardNumTxt];if(!l.every(Boolean)||!(null==(a=null==s?void 0:s.cardContainer)?void 0:a.cardUis))return !1;let[{x:o},{x:r},{y:d,width:c,height:u},{bold:h,color:p,font:m,fontSize:f}]=l;return t.forEach(((e,t)=>{let n=s["myFuncBtn"+t]||new Laya.Button;Object.assign(n,{label:["全选","反选","取消"][t],skin:"",borderWidth:1,align:"center",valign:"middle",border:"rgb(110 107 91)",labelColors:"#E4D5A0,#E4D5A0,#E4D5A0,#d0cece",width:c,height:u,bold:h,fontSize:f,font:m}),n.graphics.clear(),n.graphics.drawPath(0,0,[["moveTo",5,0],["lineTo",c-5,0],["arcTo",c,0,c,5,5],["lineTo",c,u-5],["arcTo",c,u,c-5,u,5],["lineTo",5,u],["arcTo",0,u,0,u-5,5],["lineTo",0,5],["arcTo",0,0,5,0,5]],{fillStyle:"rgb(76,41,32)"}),n.pos(r+o-s.x,d-s.y-1.1*(3-t)*u),s["myFuncBtn"+t]||(s.addChild(s["myFuncBtn"+t]=n),s["myFuncBtn"+t].on(Laya.Event.CLICK,s.cardContainer,e));})),!0}})();async function I(){var e,t;await w(1e3);const n=x.get("KanShuWindow",!0);0==(null==(e=n.jbpUserData)?void 0:e.Status)&&(n.onKanShuClick(),await w(2e3),n.onUpdateAwardStatus(),await w(1e3)),1==(null==(t=n.jbpUserData)?void 0:t.Status)&&(n.autoClickAllPeach(),await w(1e3),n.onShowEvent(),await w(500),n.onShowEvent(),x.del("KanShuWindow",3e3));}async function C(){var e;const t=x.get("ZhiGouMonthCardView");if(t.updateAllInfo(),null==(e=t.cardData)?void 0:e.bActive){t.getBtnClick();for(let e=0;e<4;e++)t.addItemClick(e);}x.del("ZhiGouMonthCardView",1e3);const n=x.get("NewWeekCardView");n.updateAllInfo(),"领取"==n.getBtn._text&&n.getBtnClick(),x.del("NewWeekCardView",1e3);}async function E(){var e,t,n,i,a;const s=x.get("GeneralOpenWindow");let l=(([e,t,n])=>1e3*(60*(60*e+t)+n))(null==(a=null==(i=null==(n=null==(t=null==(e=s.newView)?void 0:e.freeTimeTxt)?void 0:t._text)?void 0:n.split)?void 0:i.call(n,":"))?void 0:a.map(Number));l?setTimeout(E,l):s.onNewOpenBag(8100101,3),x.del("GeneralOpenWindow",5e3);}async function D(){var e;const t=x.get("GuildDrumWindow",!1,(e=>null==e?void 0:e.initDrums()));t.updateItems(),await w(1e3);let n=null==(e=null==t?void 0:t.itemList)?void 0:e.find((e=>e.leftTime));U.loop("drum",(()=>null==n?void 0:n.btnClick()),300,(null==n?void 0:n.leftTime)||0,(()=>x.del("GuildDrumWindow",500)));}async function T(){console.time("get");const e=x.get("TaskDailyView");console.timeEnd("get"),e.Reset(),console.time("click"),e.taskPanel.contentSp.drawContaniers.filter((e=>{var t;return null==(t=null==e?void 0:e.taskvo)?void 0:t.CanAward})).forEach((e=>e.onOpClick())),console.timeEnd("click"),setTimeout((()=>{Array.from({length:3},((t,n)=>{var i;return null==(i=e.topDayTask)?void 0:i.onClickItem(n)})),e.manager.HasJDRewardRed&&e.onceRewardClick(),x.del("TaskDailyView",3e3);}),3e3),console.time("get ActivityWindow");const t=x.get("ActivityWindow");function n(e){return e.tabGroup.btnList.filter((e=>e.redPointIsShow)).map((t=>{let n=e.viewStack.childInitDataList.findIndex((e=>e==t.value));return n<1&&(n=t.value),e.viewStack.selectedIndex=n,e.viewStack._childUIList[n]}))}console.timeEnd("get ActivityWindow"),console.time("click ActivityWindow"),t.enterFunc(),n(t).flatMap((e=>{try{return n(e)}catch{return []}})).flatMap((e=>{try{return e.itemArr.map((e=>e.getAwardBtn))}catch{return []}})).filter((e=>e.visible)).forEach((e=>e.onClick())),console.timeEnd("click ActivityWindow"),x.del("ActivityWindow",3e3);}const A=(()=>{async function e(){var e;const t="TreasureView"==(null==(e=null==this?void 0:this.constructor)?void 0:e.name)?this:x.find("WindowLayer","ActivityWindow","contentSprite","TreasureView")||x.get("TreasureView");U.loop("duobao",(()=>null==t?void 0:t.onSigleClick()),100,10,(()=>x.del("TreasureView",1e4)));}return async function(){const t=await b((()=>x.find("WindowLayer","ActivityWindow","contentSprite","TreasureView"))),n=null==t?void 0:t.tenBtn;if(!(null==n?void 0:n.textField))return !1;let{x:i,y:a,width:s,height:l,textField:{bold:o,color:r,font:d,fontSize:c}}=n,u=t.myFuncBtn||new Laya.Text;return Object.assign(u,{text:"单抽十次",bgColor:"rgb(76,41,32)",borderColor:"rgb(110 107 91)",borderWidth:1,align:"center",valign:"middle",width:.6*s,height:l,color:r,bold:o,fontSize:c,font:d}),u.pos(i+1.16*s,a),t.myFuncBtn||(t.addChild(t.myFuncBtn=u),t.myFuncBtn.on(Laya.Event.CLICK,t,e)),!0}})();function B(e=""){const t=x.get("GiftExchangeWindow");t.giftInput.text=e,t.getClicked(),x.del("GiftExchangeWindow",1e4);}async function _(){var e,t,n,i,a,s;const l=x.get("MailWindow");null==(t=null==(e=x.get("ActivityManager"))?void 0:e.AskRechargeInfoAgain)||t.call(e),await w(1e3);for(const o of ((null==(n=l.manager)?void 0:n.systemMailList)||[]).filter((({mid:e})=>e)))if("道具过期提醒"==o.title)null==(i=l.manager)||i.DeleteMail(o.mid);else if(o.hasAttachMent){null==(a=l.manager)||a.ReadMail(o.mid);let e=o.attachment.getStringKey("key"),t=e&&e.length?e[0]:"",n=o.fromUserName&&"系统未知好友"!=o.fromUserName?o.fromUserName:"";null==(s=l.manager)||s.SendClientDbsGetgmawardReq(t,o.mid,n),await w(500),setTimeout((()=>{var e;o.read&&o.Geted&&(null==(e=l.manager)||e.DeleteMail(o.mid));}),1e3);}x.del("MailWindow",1e4);}const L=(()=>{let e,t,n=null,i=0,a="";const s=e=>{var t,n,i,a;return 0==(null==(t=null==e?void 0:e.selloutTex)?void 0:t.visible)&&(null==(a=null==(i=null==(n=null==e?void 0:e.limitCount)?void 0:n._innerHTML)?void 0:i.includes)?void 0:a.call(i,"0/"))};function l(){n=null,Je.querySelectorAll('.left input[type="checkbox"]').forEach((e=>{e.checked=!1;}));}function o(s=900,l=50){U.loop("seckill",(()=>{var s;return e=x.find("WindowLayer","ActivityWindow","","WelfareSeckillView")||x.get("WelfareSeckillView"),(null==(s=null==e?void 0:e.itemList)?void 0:s.length)?(t=e.itemList.find(((e,t)=>{var i;return t==n||(null==(i=e.data)?void 0:i.goods_id)==n})),"function"==typeof(null==t?void 0:t.buyHpItemHandler)&&(U.set("seckill",r,i+50),void f(`秒杀连点器启动!\n${a}`))):null}),l,s/l>>0,(()=>f("未找到秒杀面板!\n连点器秒杀失败!")));}function r(e=300){null==t||t.buyHpItemHandler(),U.loop("seckill",(()=>{null==t||t.buyHpItemHandler(),s(t)||(l(),U.clear("seckill"));}),e);}return (e,t,s="",r=1e3)=>{var d;if(!1===e)l(),U.clear("seckill"),f("秒杀连点器已取消!");else if(void 0!==e&&e!==n){i=t||Date.now();let l=i-r,c=l-Date.now();n=e,a=s||(null==(d=N.goodsID(e))?void 0:d.name)||"",c>1?(f(`${(c/6e4).toFixed(1)}分钟后启动秒杀连点器!\n${a}`),U.set("seckill",o,l)):o();}return n}})();function j(e="浩铭er",t=!1){var n;const i=x.get("SzxyHelpWin");return i.enterWindow(e),(null==(n=null==i?void 0:i.btnHelp)?void 0:n.enabled)?(i.onClickHelp(),x.del("SzxyHelpWin"),!0):(t&&f("助力已完成,非常感谢!"),x.del("SzxyHelpWin"),!1)}const R={userID:0,account:"",nickname:"",inviteName:"",curOfficerLv:1,v:!1,UsedGeneralSkinID:{UsedGeneralSkinID:{}},isFrameAdd:!1,goods:{},lotteries:[],closeIframe:!1,trialTime:0,autoBotStatus:30};let G=[["skinSwitch","SKIN_SWITCH",!1],["generalSwitch","GENERAL_SWITCH",!1],["skinStateSwitch","SKIN_STATE_SWITCH",!0],["skinStateBlockSwitch","SKIN_STATE_BLOCK_SWITCH",!0],["cardBackSwitch","CARD_BACK_SWITCH",!1],["seatUISwitch","SEAT_UI_SWITCH",!0],["autoSignSwitch","AUTO_SIGN_SWITCH",!0],["autoSignSkipSwitch","AUTO_SIGN_SKIP_SWITCH",!0],["padding","PADDING",0],["autoInviteSwitch","AUTO_INVITE_SWITCH",!1],["autoDrumSwitch","AUTO_DRUM_SWITCH",!0],["autoWuJiangSwitch","AUTO_WUJIANG_SWITCH",!0],["autoKanShuSwitch","AUTO_KANSHU_SWITCH",!0],["autoYueKaSwitch","AUTO_YUEKA_SWITCH",!0]];const M=new Proxy(Object.fromEntries(G.map((([e,t,n])=>[e,r(t,n)]))),{set:function(e,t,n){return d(Object.fromEntries(G)[t]??t,n),e[t]=n,"padding"==t&&(window.padding=n),!0}}),W={seatWidthPercent:.3,firstUpdateSeatUI:!1,scoreFrameTotal:10,scoreFrameIndex:0,paddingLeft:10,paddingRight:15,paddingTop:30,paddingBottom:0,paddingLeftTopExtra:0,selectStarted:!1,leftRightTop:20,stackCardAreaHeight:0,stackCardAreaY:0,MAX_SEAT_WIDTH:149,inPopFirstTarget:!1,unscaledWidth:146,unscaledHeight:172,MAX_HEIGHT:180,MAX_WIDTH:150,scale:1,selfSeatUiUnscaledHeight:178,rightBarWidth:221,seatUIs:[],cities:[]},N={},O={},U={tasks:{},async now(){try{const e=await fetch("https://worldtimeapi.org/api/timezone/Etc/UTC"),t=await e.json();return new Date(t.utc_datetime).getTime()}catch(e){return console.error("无法获取互联网时间:",e),Date.now()}},loop(e,t,n,i=1/0,a){return this.clear(e),this.tasks[e]=setInterval((()=>{t(),--i<=0&&(this.clear(e),"function"==typeof a&&a());}),n),this.tasks[e]},delay(e,t,n){return this.clear(e),this.tasks[e]=setTimeout((()=>{this.clear(e),t();}),n),this.tasks[e]},set(e,t,n=this.now(),i=18e5){(async function a(){this.clear(e);const s=await this.now(),l=n-s;l>1?this.tasks[e]=setTimeout(a.bind(this),l<i?l:i):t();}).call(this);},clear(e){Array.isArray(e)||(e=[e]),e.filter((e=>this.tasks[e])).map((e=>(clearTimeout(this.tasks[e]),clearInterval(this.tasks[e]),this.tasks[e]=void 0,e)));}},z=new Proxy({turn:0,round:0,phase:0,currentID:void 0,isGameStart:!0,isPassed:!1,spellSpace:{},domContainer:["temp","phase","round","turn","game","long"].reduce(((e,t,n)=>(e[t]=e[n]=[],e)),{}),end(e){(this.isGameStart&&!this.isPassed||!1===e)&&(this.isGameStart=!1,this.isPassed=!0,W.seatUIs=[],W.friendGeneral=0,nt(null),x.reset(),document.getElementById("createSkinIframe").style.display="none",Je.querySelectorAll(".mizhu").forEach((e=>e.style.display="none")),console.warn("游戏已结束!")),e&&this.isPassed&&(this.isPassed=!1,this.turn=0,this.round=0,this.phase=0,this.currentID=void 0,this.spellSpace={},H.reset(),console.warn("游戏已重置!游戏即将开始!"),v((()=>x.init())));},ready(e){this.end(!0),H.cardList=e;let t=N.cardIDsOrder.filter((t=>e.includes(t))),n=t.concat(e.filter((e=>!t.includes(e)))).filter(Boolean);P.init(n),J.init(n,"2-255"),H.isGuoZhan=e.includes(1150),H.isDouDiZhu=e.includes(13005),H.isShanHeTu=e.includes(20100),function(){for(let e=0;e<2;e++)it(0,e);for(let e=1;e<=3;e++)Je.getElementById("type"+e).innerHTML="";for(let e of Je.getElementsByClassName("order-body"))e.innerHTML="",e.title="一二三四五六七八"[e.id.slice(-1)]??e.title;for(let e in P.name){let t=Je.getElementById("type"+Q[[...P.name[e]][0]].type),n=document.createElement("button");n.id=e,n.className="cardType",n.innerText=e,n.onclick=()=>{P.queryone("name",e);},t.appendChild(n);}W.seatUIs=[],te(),le();}(),console.warn("牌堆初始化完成");},start(){!this.isGameStart&&H.size&&(this.isGameStart=!0,this.isPassed=!1,console.warn("游戏开始!["+H.seatIDs+"] > "+H.mySeats),function(){for(let e=0;e<=7;e++){let t="or"+(e+1);Je.getElementById(t).style.display="inline-block";}}(),function(e){for(let t=7;t>=e;t--){let e="or"+(t+1);Je.getElementById(e).style.display="none";}}(H.size),nt(),J.draw());},enter(e,t,n){var i,a,s,l,o,r,d,c,u,h,p;if(e>0)this.turn=e,this.round=0,this.clear("turn"),Je.getElementById("jinzhi").innerHTML="下一次锦织所需牌:1",1==e&&(this.clear("game"),this.start());else {0==t?(this.currentID=n,this.round++,this.phase=0,[7011,3090,2143,3271].forEach((e=>delete this.spellSpace[e])),z[3090]=new Set,Je.getElementById("suit").innerText="",Je.getElementById("boTu").innerText="",Je.getElementById("result").innerHTML="",this.clear("round"),x.flag&&x.limit>0&&(null==(l=null==(s=null==(a=null==(i=x.gamescene)?void 0:i.topMenu)?void 0:a.areaServerLabel)?void 0:s.text)?void 0:l.includes("身份"))&&(this.currentID==(null==(h=null==(u=null==(c=null==(d=null==(r=null==(o=x.gamescene)?void 0:o.seatContainer)?void 0:r.seatUIs)?void 0:d.filter((e=>e.seat.currentHp>0)))?void 0:c.map((e=>e.seat.index)))?void 0:u.slice(-1))?void 0:h[0])?x.auto(3):this.currentID!=H.mySeats[0]&&x.auto(!0))):this.phase++,this.clear("phase");let e=Je.getElementById("phrase"),m=parseInt(null==(p=e.innerText.match(/\(([0-9])\)$/))?void 0:p[1]);this.phase==m?e.innerText=e.innerText.replace(/(回合)?(.{2,3})(阶段)? ?\(([0-9])\)$/,`$2>${["开始时","准备","判定","摸牌","出牌","弃牌","结束","结束时","结束后"][t]}($4)`):e.innerText=`${["回合开始时","准备阶段","判定阶段","摸牌阶段","出牌阶段","弃牌阶段","结束阶段","回合结束时","回合结束后"][t]} (${this.phase})`;}},clear(e,t,n){let i=this.domContainer[e];for(let a=i.length-1;a>=0;a--)void 0===n&&t!==i[a].SpellID&&i[a].count--,i[a].count>0&&(t!==i[a].SpellID||n!==i[a].SeatID)||(i[a].element.remove(),i.splice(a,1));}},{ownKeys:e=>Reflect.ownKeys(e.spellSpace),getOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e.spellSpace,t),deleteProperty:(e,t)=>Reflect.deleteProperty(e.spellSpace,t),get:(e,t,n)=>t in e?e[t]:Reflect.get(e.spellSpace,t,n),set:(e,t,n,i)=>(t in e?e[t]=n:Reflect.set(e.spellSpace,t,n,i),!0)}),H={cardList:[],seatIDs:[],orderIDs:[],mySeats:[],generals:{},shift:0,isShanHeTu:!1,isGuoZhan:!1,isDouDiZhu:!1,size:void 0,firstID:void 0,seatPos:()=>[0,1,2,3,4,5,6,7],reset(){this.cardList=[],this.seatIDs=[],this.orderIDs=[],this.mySeats=[],this.generals={},this.shift=0,this.isShanHeTu=!1,this.isGuoZhan=!1,this.isDouDiZhu=!1,this.size=void 0,this.firstID=void 0,this.dealCard=(e,t)=>{e=parseInt(e),this.orderIDs.includes(e)||(void 0===this.firstID&&(this.firstID=e,console.warn("[PubGsCMoveCard]先手位置:"+e)),this.orderIDs.push(e),t>0&&!this.mySeats.includes(e)&&(this.mySeats.length?this.mySeats.push(e):this.setMyID(e)),this.update(!1,this.orderIDs)),this.orderIDs.length==this.length&&(this.dealCard=()=>null);};},getOrder(e){let t=this.seatIDs.indexOf(this.firstID??this.seatIDs[0])%this.size,n=this.seatIDs.indexOf(parseInt(e));if(-1!==n)return (n-t+this.size)%this.size},getIndex(e){let t=(this.seatIDs.indexOf(this.mySeats[0])+this.shift)%this.size,n=this.seatIDs.indexOf(parseInt(e));if(n<0)return;let i=(n-t+this.size)%this.size;return this.seatPos()[i]},getID(e){let t=(this.seatIDs.indexOf(this.mySeats[0])+this.shift)%this.size,n=this.seatPos().indexOf(parseInt(e));if(n<0)return;let i=(n+t+this.size)%this.size;return this.seatIDs[i]},sequence(e){let t=this.seatIDs.indexOf(e);return -1===t?[]:this.seatIDs.slice(t).concat(this.seatIDs.slice(0,t))},update(e,t=this.orderIDs){if((t=t.slice()).length>this.seatIDs.length||t.length==this.seatIDs.length&&!1!==e)this.seatIDs=t,this.size=t.length;else if(e){for(let e=t.length;e<this.size;e++)t.push(((t[e-1]??-1)+1)%this.size);this.seatIDs=t,this.size=t.length;}this.seatIDs.forEach((e=>{let t=this.getOrder(e),n=Je.getElementById(t+1);if(!n)return;let i=H.name(e);n.style.setProperty("--No-content",`"${i}"`);}));},setMyID(e){var t;if(void 0!==e&&this.mySeats[0]!==e){let n=this.mySeats.indexOf(e);n>-1&&this.mySeats.splice(n,1),this.mySeats.unshift(e),(null==(t=this.generals[e])?void 0:t.length)&&this.generals[e].forEach(((e,t)=>it(e,t)));}},setGeneral(e,t,n=0,i=!1){if(!N.generalDict[t])return;this.generals[e]||(this.generals[e]=Array(this.isGuoZhan?2:1).fill(0)),this.generals[e][n]=t;let a=this.getOrder(e),s=Je.getElementById(a+1);s&&(s.style.setProperty("--No-content",`"${H.name(e)}"`),this.mySeats[0]!=e||i||it(t,n));},find(e,t,n=!1){var i;return Array.isArray(t)||(t=[t]),null==(i=this.generals[e])?void 0:i.find((e=>t.find((t=>{var i;return n?null==(i=N.skinMap[e])?void 0:i.has(t):e==t}))))},name(e,t){var n;let i=this.getOrder(e),a=null==(n=this.generals[e])?void 0:n.map((e=>N.generalDict[e]));return ((null==a?void 0:a.some(Boolean))?a.map((e=>e||"暗")).join("丨"):"一二三四五六七八"[i]+"号位")+(t?"":"丨"+"一二三四五六七八"[i])}},P=new Proxy({name:{},color:Array.from({length:7},(()=>new Set)),number:Array.from({length:14},(()=>new Set)),query:new Set,select:{name:new Set,color:new Set,number:new Set},cards:[],QCARD:class{constructor(e,t,n,i,a){this.id=e,this.name=t,this.color=n,this.number=i,this.type=a,this.key=-1;}plot(e){let t=this._button;if(!t){if(t=this._button=document.createElement("button"),t.className=this.color<=2?"shoupai R":"shoupai",!this.id)return t;t.id="Qcard"+this.id,t.innerHTML=`<span>${V(this.color)+Z(this.number)}</span><br>${this.name.substring(0,2)}`;}return this.key===e&&1!=e||(this.key=e,t.style.backgroundColor=0===e?"":1===e?"cyan":"#887",t.title=0===e?"牌堆":2===e?"弃牌堆":$.findKZ(this.id).zones.map((e=>{let[t,n,i]=e.split("-").map((e=>parseInt(e)));return J.name(n,t,null,i,i)})).join("/")),t}},[Symbol.iterator]:function*(){for(let e of this.cards)void 0!==e&&(yield e);},init(e){this.name={},this.color=Array.from({length:7},(()=>new Set)),this.number=Array.from({length:14},(()=>new Set)),this.type=Array.from({length:4},(()=>new Set)),this.query=new Set,this.select={name:new Set,color:new Set,number:new Set},this.cards=[],e.forEach((e=>{let{name:t,color:n,number:i,type:a}=Q[e];t in this.name||(this.name[t]=new Set),this.name[t].add(e),this.color[n].add(e),this.number[i].add(e),this.type[a].add(e),3==n&&i>=2&&i<=9&&this.number[0].add(e),t.match(/^(冰|火|雷)?杀$/)&&this.color[Math.ceil(n/2)+4].add(e),this.cards[e]=new this.QCARD(e,t,n,i,a);}));},onquery(e,t){if(this.select[e].delete(t)){if(this.select[e].size)return Array.from(this[e][t]).forEach((e=>this.query.delete(e))),void this.draw()}else this.select[e].add(t);this.query=["name","number","color"].filter((e=>this.select[e].size)).reduce(((e,t)=>new Set(Array.from(this.select[t]).flatMap((e=>Array.from(this[t][e]))).filter((t=>!e.size||e.has(t))))),new Set),this.draw();},queryone(e,t){this.query=new Set(Array.from(this[e][t])),this.draw();},draw(){const e=Je.getElementById("cardTypeDetail");if(e.innerHTML="",0==this.query.size)return;let t=new Set(J.unknown),n=new Set(J.qipai),i=N.cardIDsOrder.filter((e=>this.query.has(e))).reduce(((e,i)=>(t.has(i)?e[0].push(i):n.has(i)?e[2].push(i):e[1].push(i),e)),[[],[],[]]);[0,1,2].forEach((t=>i[t].forEach((n=>e.appendChild(this.cards[n].plot(t))))));}},{get(e,t,n){return "number"==typeof t||"string"==typeof t&&!isNaN(t)?e.cards[t]:Reflect.get(...arguments)}}),q=class e{static label(t){if(e.groups.has(t))return e.groups.get(t);const n=e.LABELs.shift();return e.groups.set(t,n),n}constructor(t,n=null,i="12-255",a=null,s=null){var l;this._key=t,this.zone=i,this.id=n??(null==(l=this.next)?void 0:l.id)??this.key,this.next=a,this.prev=s,e.nodes.has(t)||e.nodes.set(t,new Set),e.nodes.get(t).add(this);}get head(){let e=this;for(;e.prev;)e=e.prev;return e}get end(){let e=this;for(;e.next;)e=e.next;return e}get key(){return this._key}set key(t){this._key!=t&&(e.nodes.get(this._key).delete(this),this._key=t,e.nodes.has(t)||e.nodes.set(t,new Set),e.nodes.get(t).add(this));}static get(t){return e.nodes.has(t)?Array.from(e.nodes.get(t)):[]}static init(t,n){return e.key=0,e.nodes=new Map,e.groups=new Map([[0,"?"]]),e.LABELs=Array.from({length:62},((e,t)=>String.fromCharCode(t+65))),t.map((t=>new e(0,t,n)))}toString(){return this.next?this.prev?this.key+"<"+this.next.toString():this.zone+":"+this.key+"<"+this.next.toString():"["+this.id+"]"+(this.key>0?Q[this.id].ncn:"?")}plot(t){var n;if(this.key<0&&this.key%2==0&&this.next)return this.next.plot(t);let i=this._button;return i||(i=this._button=document.createElement("button"),i.className="shoupai"),i.disabled=this.key<=0&&this.key%2==0,(t||this.key!=(null==(n=null==i?void 0:i.dataset)?void 0:n.key)||this.key<=0&&e.label(this.key)!=i.innerHTML)&&(i.className="shoupai",i.id="card"+this.id,i.dataset.key=this.key,this.key>0?(i.classList.remove("G"),Q[this.id].color>2?i.classList.remove("R"):Q[this.id].color>0&&i.classList.add("R"),i.style.color="",i.style.fontSize="",i.title=new J("unknown").cards.has(this)?e.findKZ(this.id).zones.map((e=>{let[t,n,i]=e.split("-").map((e=>parseInt(e)));return J.name(n,t,null,i,i)})).join("/"):Q[this.id].ncn,i.innerHTML=`<span>${Q[this.id].cn}</span><br>${Q[this.id].name.substring(0,2)}`):(i.classList.add("G"),i.innerHTML="?")),i}swap(e){if(!e||e==this)return this;for([this.key,e.key]=[e.key,this.key],[this.id,e.id]=[e.id,this.id],[this.next,e.next]=[e.next,this.next],this.next&&(this.next.prev=this),e.next&&(e.next.prev=e);e.prev&&e.prev.id!==e.id;)e.prev.id=e.id,e=e.prev;for(e.plot(!0),J.draw(e.zone),e=this;e.prev&&e.prev.id!==e.id;)e.prev.id=e.id,e=e.prev;return e.plot(!0),J.draw(e.zone),this}create(t){const n=new e(this.key,this.id,this.zone,this.next,this);return this.key=t,this.next&&(this.next.prev=n),this.next=n,this}delete(){let t=!1;if(this.next){let n=this.next;return this.key=n.key,this.id=n.id,this.next=n.next,n.next?n.next.prev=this:new J("unknown").cards.delete(n)&&(t=!0,this.prev&&new J("unknown").cards.add(this)),e.nodes.get(n.key).delete(n),t}return 0===this.key?(this.key=this.id,st(this.id,this.key),!0):null}destroy(t){let n=!1,i=this.key;for(;i<0;)this.delete()&&(n=!0),e.unpack(i)&&(n=!0),i=this.key;return this.key!=t&&(this.key=t??this.id,st(this.id,this.key)),this.prev?e.unpack(this.prev.key):(this.plot(!0),J.draw(this.zone)),n&&J.draw("unknown"),this}identify(t,n=null){if(null!==n&&console.count("REidentify"+n+">"+this),this.id==t)return this.key>0||(n&&(this.end.id=n),this.destroy()),this;let i,a=new Set([this.key]),s=[[this.key,[]]];for(;s.length>0;){let[n,l]=s.shift();if(i=e.find(n,t),i){l.concat(i).reduce(((e,t)=>e.swap(t).next),this);break}for(let t of e.get(n).filter((e=>e.next)))a.has(t.next.key)||(a.add(t.next.key),s.push([t.next.key,l.concat(t)]));}if(i){if(n){let e=this;for(e.id=n;e.next;)e=e.next,e.id=n;}return this.destroy(),this}return t>0?this.identify(0,t):(console.error("identify error: "+(t>0?t:n)+">"+this),null)}static move(t,n){return Array.isArray(t)||(t=[t]),null==t||t.forEach((e=>e.zone=n)),Array.from(new Set(null==t?void 0:t.map((e=>e.key)))).filter((e=>e<=0)).map((t=>e.unpack(t))).length?J.draw("unknown"):Array.from(new Set(null==t?void 0:t.map((e=>e.key)))).filter((e=>e>0&&P.query.has(e))).forEach((e=>{P[e].plot("2-255"==n?2:1);})),t}static pack(t,n,i){if(!((null==t?void 0:t.length)>1&&(null==t?void 0:t.every((e=>e)))))return;let a,s=new Set(t.map((e=>e.key)));if(1===s.size)return [...s][0];if(e.key=e.key-1,i){if(1===new Set(t.map((e=>e.head.zone))).size)return null;let n=Array.from(e.nodes.keys()).filter((e=>e<0));for(let t=0;t>=e.key;t--)if(!n.includes(2*t-1)&&!n.includes(2*t-2)){a=2*t-i;break}n.filter((e=>e>a)).sort(((e,t)=>e-t)).forEach((t=>{e.get(t).forEach((e=>{e.key=e.key-2,e.head.plot(!0);}));})),a=-i;}else a=2*e.key-(n?2:1);return t.forEach((e=>{e.create(a),new J("unknown").cards.delete(e),n||new J("unknown").cards.add(e.end);})),J.draw("unknown"),a}static unpack(t){if(t>0)return !0;const n=e.get(t);let i=new Set(n.map((e=>{var t;return null==(t=e.next)?void 0:t.key}))),a=new Set(n.map((e=>e.head.zone)));if(1===n.length||!a.has("1-255")&&(1===a.size||1===i.size&&0!==t)){e.groups.has(t)&&(e.LABELs.unshift(e.groups.get(t)),e.groups.delete(t));let i=n.map((e=>e.delete())).some(Boolean);return Array.from(new Set(n.filter((e=>e.prev)).map((e=>e.prev.key)))).forEach((t=>e.unpack(t))),n.filter((e=>!e.prev)).forEach((e=>e.plot(!0))),Array.from(a).forEach((e=>J.draw(e))),i}return !1}static find(t,n){let i=e.get(t).find((e=>e.id==n));if(void 0===i&&0!=t){let a=e.get(0).find((e=>e.id==n));a&&(i=e.get(t).find((e=>0==e.end.key)),void 0!==i&&a.swap(i.end));}return i}static findIDs(t,n=!1,i=new Set,a=new Set){return a.add(t),t>0||!n&&0==t?i.add(t):(n||t%2!=0)&&e.get(t).forEach((t=>{if(t.next){let s=t.next.key;a.has(s)||e.findIDs(s,n,i,a);}else n&&i.add(t.id);})),Array.from(i)}static findKZ(t,n=!1,i=new Set,a=new Set){let s=t;return !(s instanceof e)&&t>0&&(s=e.get(t)[0]),s instanceof e||(s=e.get(0).find((e=>e.id==t))),s instanceof e&&(n||0!=s.key?(a.add(s.head.zone),i.has(s.key)||(i.add(s.key),(s.key<0||n&&0==s.key)&&e.get(s.key).forEach((t=>{t!=s&&e.findKZ(t,n,i,a);}))),s.prev&&e.findKZ(s.prev,n,i,a)):(a.add(""),i.add(0))),{keys:Array.from(i),zones:Array.from(a)}}};l(q,"key",NaN),l(q,"nodes",new Map),l(q,"groups",new Map([[0,"?"]])),l(q,"LABELs",Array.from({length:50},((e,t)=>String.fromCodePoint(t<20?9312+t:t<35?12861+t:12942+t))));let $=q;const K=class e{static get paidui(){return Array.from(new Set(Array.from($.get(0),(({id:e})=>e)).concat((e.obj["1-255"]??[]).map((({id:e})=>e)))))}static get qipai(){return (e.obj["2-255"]??[]).filter((({key:e})=>e>0)).map((({id:e})=>e))}static get unknown(){return Array.from($.get(0),(({id:e})=>e))}static shoupai(t){return (e.obj["5-"+t]??[]).filter((({key:e})=>e>0)).map((({id:e})=>e))}constructor(t,n=5,i=null,a=null,s=null,l=null){var o;"number"==typeof t?(this.id=t,this.zone=n,0==this.id&&[0,1,2,3,9,12].includes(this.zone)&&(this.id=255),9==this.zone&&(this.zone=1),4==this.zone&&(this.id=this.id+"-"+(l||s||0)),8==this.zone&&(this.id="-"+(s||l||0)),this.zoneID=this.zone+"-"+this.id):"string"==typeof t?[this.zoneID,this.zone,this.id]=t.match(/(.*?)-(.*)/)??[t,t,""]:null==(o=null==t?void 0:t.every)||o.call(t,(e=>e instanceof $)),this.zoneID in e.obj||(e.obj[this.zoneID]=[]),this.pos=(65280===i||1===i?1:0===i||-1===i?-1:0)*(1==this.zone?-1:1),1!=n&&(this.pos=0),this.count=a;}show(t=[]){if(isNaN($.key))return [];if(Array.isArray(t)||(t=[t]),0==t.filter((e=>e>0)).length)return [];let n=[],i=t.slice();if(-1==this.pos)n=this.cards.slice(0,t.length).map((e=>e.identify(i.shift())));else if(1==this.pos)n=this.cards.slice(-t.length).map((e=>e.identify(i.shift())));else if(1!=this.zone){let e=i.map((e=>$.findKZ(e,!0).keys));this.cards.slice().sort(((e,t)=>t.key-e.key)).some((t=>{if(0==i.filter((e=>e>0)).length)return !0;e.some(((e,a)=>{if(e.includes(t.key))return n[a]=t.identify(i[a]),e.length=0,i[a]=null,!0}));})),i.forEach(((e,t)=>{var i,a,s,l;if(e&&(n[t]=null==(i=this.cards.find((e=>0==e.id)))?void 0:i.identify(e),void 0===n[t]&&(n[t]=null==(a=this.cards.find((e=>0==e.key)))?void 0:a.identify(e)),void 0===n[t])){let i=$.get(e)[0];i?(n[t]=null==(l=null==(s=this.cards.find((e=>!n.includes(e))))?void 0:s.swap(i))?void 0:l.identify(e),console.error(this.zoneID+"SWAP Card ["+e+"] Shown")):(n[t]=new $(e,e,this.zoneID),12!=this.zone&&console.error(this.zoneID+" No Card ["+e+"] Shown"));}}));}return console.warn("cards",n),console.warn("zone",this.cards),e.draw(this.zoneID),n}remove(t=[],n,i){if(isNaN($.key))return [];Array.isArray(t)||(t=[t]),i&&(this.count=i);let a=[],s=t.slice();if(-1==this.pos)a=this.cards.splice(0,this.count);else if(1==this.pos)a=this.cards.splice(-this.count);else if(t.filter((e=>e>0)).length>0){let e=s.map((e=>$.findKZ(e,!0).keys));this.cards.slice().reverse().sort(((e,t)=>t.key-e.key)).some((t=>{if(0==s.filter((e=>e>0)).length)return !0;e.some(((e,n)=>{if(e.includes(t.key))return a[n]=this.cards.splice(this.cards.indexOf(t),1)[0],e.length=0,s[n]=null,!0}));})),s.forEach(((e,t)=>{var n;if(!e)return;let i=this.cards.findIndex((e=>0==e.id));if(-1===i&&(i=this.cards.findIndex((e=>0==e.key))),i>-1)a[t]=this.cards.splice(i,1)[0];else {let i=$.get(e)[0],s=this.cards.findIndex((e=>!a.includes(e)));i&&s>=0?(a[t]=null==(n=this.cards.splice(s,1)[0])?void 0:n.swap(i),console.error(this.zoneID+"SWAP Card ["+e+"] Moved")):(a[t]=new $(e,e,this.zoneID),12!=this.zone&&console.error(this.zoneID+" No Card ["+e+"] Moved"));}}));}else if(this.count==this.length||1==this.size)a=this.cards.splice(0,this.count);else if(1==this.zone||2==this.zone){var l=[...this.cards.filter((e=>e.key<=0)).sort(((e,t)=>t.key-e.key)),...this.cards.filter((e=>e.key>0))];if([11104,3488,862].includes(n)){var o=new Set(l.map((e=>e.key)));11104==n?o=new Set(Array.from(o).filter((e=>$.get(e).some((e=>{var t;return null==(t=P.type[3])?void 0:t.has(e.id)}))))):3488==n?o=new Set(Array.from(o).filter((e=>$.get(e).some((e=>{var t,n,i;return (null==(t=P.name["雷杀"])?void 0:t.has(e.id))||(null==(n=P.name["火杀"])?void 0:n.has(e.id))||(null==(i=P.name["冰杀"])?void 0:i.has(e.id))}))))):862==n&&(o=new Set(Array.from(o).filter((e=>$.get(e).some((e=>P.number[6].has(e.id))))))),l=l.filter((e=>o.has(e.key)));}a=l.slice(0,this.count),a.some((e=>e.key>0||e.key%2))&&$.pack(l,!0),a.forEach((e=>this.cards.splice(this.cards.indexOf(e),1)));}else $.pack(this.cards),a=this.cards.splice(0,this.count);return a.length!=this.count&&Array.from({length:this.count-a.length},(()=>(console.error(this.zoneID+" New Card Moved"),a.push(new $(0,0,this.zoneID))))),t.filter((e=>e>0)).length==this.count?t.forEach(((e,t)=>{var n;return null==(n=a[t])?void 0:n.identify(e)})):a.filter((e=>e.key>0)).length==this.count&&a.forEach((({id:e},n)=>{t[n]=e;})),e.draw(this.zoneID),a}add(t){if(!isNaN($.key))return -1==this.pos?e.obj[this.zoneID]=$.move(t,this.zoneID).reverse().concat(this.cards):e.obj[this.zoneID]=this.cards.concat($.move(t,this.zoneID)),e.draw(this.zoneID),t}set(t){isNaN($.key)||(e.obj[this.zoneID]=$.move(t,this.zoneID),e.draw(this.zoneID));}get cards(){return e.obj[this.zoneID]??[]}get length(){var e;return (null==(e=this.cards)?void 0:e.length)??0}get size(){var e;return new Set((null==(e=this.cards)?void 0:e.map((e=>e.key)))??[]).size}static init(t,n){e.obj={unknown:new Set},e.obj[n]=$.init(t,n);}static draw(t){var n,i;if(isNaN($.key))return;if(void 0===t)return void Object.keys(e.obj).filter((e=>"5"==e.split("-")[0])).forEach((t=>e.draw(t)));let a=null,s=null,[l,o,r]=(null==(n=t.split("-"))?void 0:n.map(Number))??[];if("unknown"==t)a="knownCards";else if(1==l)a="paiduiCards";else if(5==l)a=String(H.getOrder(o)+1);else {if(4!=l||!(r in N.markSpell))return;a="mark"+t;}s=Je.getElementById(a);let d=Array.from(e.obj[t]??[]);if("unknown"==t&&(Array.from(new Set(d.map((e=>e.head.zone)))).forEach((t=>e.draw(t))),P.draw()),d&&0!=d.filter((e=>e.key>0||e.key%2!=0)).length){if(s)s.querySelectorAll(":scope>.shoupai").forEach((e=>e.remove()));else {if(4!=l)return;null==(i=Je.getElementById(String(H.getOrder(o)+1)))||i.insertAdjacentHTML("beforeend",`<div id="${a}" class="markedCard"><span class = 'mark'>${N.markSpell[r]}</span></div>`),s=Je.getElementById(a);}"1-255"!=t&&d.sort(((e,t)=>e.key>0&&t.key>0?0:t.key-e.key)),4==l&&(s=s.firstElementChild||s);var c=1;d.map((e=>e.plot("unknown"==t))).reverse().forEach(((e,n,i)=>{var a,o;if(e.dataset.key==(null==(o=null==(a=i[n+1])?void 0:a.dataset)?void 0:o.key))c++;else {c>1&&(e.style.fontSize="",e.innerHTML=`<span>${e.innerHTML}×</span><br>${c}`);let n=parseInt(e.dataset.key);if(n<0){let i=$.findIDs(n).sort(((e,t)=>e>0&&t>0?0:t-e));e.title=c+"张:"+i.map((e=>Q[e].ncn)).join("/"),"1-255"!==t&&i.length<5&&(e.style.fontSize="",e.innerHTML=i.map((e=>{var t,n;return (null==(n=null==(t=$.get(e)[0])?void 0:t.plot())?void 0:n.outerHTML)||""})).join(""));}4==l?s.insertAdjacentElement("afterend",e):s.insertAdjacentElement("afterbegin",e),c=1;}}));}else s&&(s.classList.contains("markedCard")?s.remove():s.querySelectorAll(":scope>.shoupai").forEach((e=>e.remove())));}static name(e,t,n,i,a){var s;let l;if(isNaN(t))return "?";if(1==t&&0==e)return "牌堆(游戏开始前) ";if(1==t&&255==e)l="牌堆";else if(2==t)l="弃牌堆";else if(3==t)l="处理区";else if(4==t)l="标记";else if(5==t)l="手牌";else if(6==t)l="装备";else if(7==t)l="判定区";else if(8==t)l="弹窗";else {if(9==t)return "洗牌";10==t?l="交换临时区":11==t?l="弃牌临时区":12==t?l="回收区":0==t&&(l="游戏外");}return ([0,1,2,3,8,11,12].includes(t)?"":H.name(e,!0))+([4,8].includes(t)?"["+(null==(s=N.spellDict[8==t?a:i||a||0])?void 0:s.name)+"]":"")+(l??"zone"+t)+({0:"底",65280:"顶",65282:"*"}[n]??(n?":"+n:""))}};l(K,"obj",{unknown:new Set});let J=K;const F={"乐不思蜀":"乐","兵粮寸断":"兵","八卦阵":"八卦","爪黄飞电":"爪黄+1","的卢":"的卢+1","绝影":"绝影+1","骅骝":"骅骝+1","赤兔":"赤兔-1","大宛":"大宛-1","紫骍":"紫骍-1","紫騂":"紫骍-1","诸葛连弩":"连弩","木牛流马":"木马","顺手牵羊":"顺手","万箭齐发":"万箭","五谷丰登":"五谷","无中生有":"无中","过河拆桥":"过拆","桃园结义":"桃园","无懈可击":"无懈","南蛮入侵":"南蛮","借刀杀人":"借刀","铁索连环":"铁索","随机应变":"随机","远交近攻":"远交","以逸待劳":"逸劳","知己知彼":"知己","逐近弃远":"逐近","洞烛先机":"洞烛","出其不意":"出其","水淹七军":"水淹","无懈可击·国":"国无","挟天子以令诸侯":"挟令","方天画戟":"方天戟","雌雄双股剑":"雌雄剑","青龙偃月刀":"青龙刀","丈八蛇矛":"丈八矛","朱雀羽扇":"朱雀扇","白银狮子":"白银狮","三尖两刃刀":"三尖刀","乌铁锁链":"乌铁链","五行鹤翎扇":"五行扇","太公阴符":"太公符","无双方天戟":"无双戟","束发紫金冠":"紫金冠","玲珑狮蛮带":"玲珑带","红棉百花袍":"百花袍","红锦百花袍":"百花袍","四乘粮舆":"四乘舆","铁蒺玄舆":"铁蒺舆","飞轮战舆":"飞轮舆","鬼龙斩月刀":"鬼龙刀","国风玉袍":"国风袍","赤炎镇魂琴":"赤炎琴","奇门八阵":"奇门阵","绝尘金戈":"绝尘+1","修罗炼狱戟":"修罗戟","虚妄之冕":"虚妄冕","赤血青峰":"赤青锋","赤血青锋":"赤青锋","鸾凤和鸣剑":"鸾凤剑","七彩神鹿":"神鹿-1","金乌落日弓":"金乌弓","刑天破军斧":"刑天斧","长安大舰":"长安-2","禅让诏书":"诏书","镔铁双戟":"镔铁戟","继往开来":"继往","攻守兼备":"攻守","进退自如":"进退","洪荒之力":"洪荒","同舟共济":"同舟","力争上游":"力争","逆水行舟":"逆水","撒豆成兵":"撒豆","移花接木":"移花","联军盛宴":"联军","调虎离山":"调虎","火烧连营":"火烧","勠力同心":"勠力","调剂盐梅":"调剂","声东击西":"声东","增兵减灶":"增兵","草木皆兵":"草木","唯我独尊":"独尊","弃甲曳兵":"弃甲","金蝉脱壳":"金蝉","故步自封":"自封","金鼓笙旗":"金鼓","党同伐异":"伐异","燎原之火":"燎原","八卦阵(复制)":"八卦","仁王盾(复制)":"仁王盾","藤甲(复制)":"藤甲","白银狮子(复制)":"白银狮","商鞅变法":"变法","真龙长剑":"真龙剑","传国玉玺":"玉玺","厚积形":"厚积","桎梏形":"桎梏","盈冲形":"盈冲","背水形":"背水","整肃形":"整肃","寸兵形":"寸兵","雄黄酒":"酒"},Q=new Proxy({cards:{0:{name:"",type:0,color:0,number:0,ncn:"?",cn:"0",c:"",n:0}},[Symbol.iterator]:function*(){for(let e in this.cards)yield this.cards[e];}},{get:function(e,t){var n;if(t in e)return e[t];if(!e.cards[t])if(null==(n=N.cardDict)?void 0:n[t]){let{name:n,type:i,color:a,number:s,subType:l}=N.cardDict[t],o=V(a),r=Z(s);e.cards[t]={name:{6:"火杀",7:"雷杀",11:"冰杀",12:"闪闪"}[l]||F[n]||n,type:parseInt(i),color:parseInt(a),number:parseInt(s),ncn:n+o+r,cn:o+r,c:o,n:r};}else e.cards[t]=e.cards[0];return e.cards[t]}});function V(e){return ["","♥","♦","♠","♣"][e]??""}function Z(e,t=!0){return t&&1==parseInt(e)?"A":{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"J",12:"Q",13:"K"}[e]??""}async function Y(e,t){f("复制成功!");var n={1:"⒈",2:"⒉",3:"⒊",4:"⒋",5:"⒌",6:"⒍",7:"⒎",8:"⒏",9:"⒐",J:"Ⓙ",Q:"Ⓠ",K:"Ⓚ","+":" ",10:"⒑"};if(t&&Object.keys(n).forEach((t=>{e=e.replaceAll(t,n[t]);})),x.chat(e),window.clipboardData&&window.clipboardData.setData)return window.clipboardData.setData("Text",e);if(document.queryCommandSupported&&document.queryCommandSupported("copy")){var i=document.createElement("textarea");i.textContent=e,i.style.position="fixed",document.body.appendChild(i),i.select();try{return document.execCommand("copy")}catch(a){return console.warn("Copy to clipboard failed.",a),prompt("Copy to clipboard: Ctrl+C, Enter",e)}finally{document.body.removeChild(i);}}}function X(e,t,n,i){var a;if(null==Je.getElementById("sec"+e)){let t=Je.getElementById("lottery");const n=document.createElement("div"),a=document.createElement("div");a.innerHTML=N.secId[e].Name+" 次数:"+i+"<br>",a.id="sec"+e+"+times",n.id="sec"+e,n.append(a),t.append(n),t.append(document.createElement("hr"));}if(void 0!==Je.getElementById("sec"+e)&&null==Je.getElementById(e+"+"+t)){Je.getElementById("sec"+e+"+times").innerHTML=N.secId[e].Name+" 次数:"+i+"<br>";let s=Je.getElementById("sec"+e);const l=document.createElement("div");l.className="suit";const o=document.createElement("span"),r=document.createElement("span");o.innerText=(null==(a=N.goodsID(t))?void 0:a.name)+" * ",r.innerText=n,o.id=e+"+"+t,r.id=e+"+"+t+"+number",l.append(o),l.append(r),s.appendChild(l);}else if(void 0!==Je.getElementById(e)&&null!=Je.getElementById(e+"+"+t)){Je.getElementById("sec"+e+"+times").innerHTML=N.secId[e].Name+" 次数:"+i+"<br>";let a=Je.getElementById(e+"+"+t+"+number"),s=parseInt(a.innerText);s+=n,a.innerText=s;}}function ee(e){let t=Je.getElementById("lastUseCard");const n=document.createElement("div");for(const a of e){if("0"==a)continue;var i=document.createElement("button");i.className=Q[a].color<=2?"shoupai R":"shoupai";let e=document.createElement("span");e.innerText=Q[a].cn,i.appendChild(e),i.appendChild(document.createElement("br")),i.innerHTML+=Q[a].name.substring(0,2),n.append(i);}t.innerHTML=n.innerHTML;}function te(){for(let e of W.seatUIs)if(e.posY&&e.posX&&void 0!==e.actualSeatID)if(null==document.getElementById("or"+e.actualSeatID)){const t=document.createElement("div");t.className="orderContainer",t.id="or"+e.actualSeatID,t.style.top=e.posY+"px",t.style.left=e.posX+"px",t.style.width=(W.unscaledWidth+W.paddingRight)*W.scale+"px";const n=document.createElement("div");n.className="order-body",n.classList.add("No"+e.actualSeatID),n.id=e.actualSeatID,t.appendChild(n);const i=Je.getElementById(e.actualSeatID);if(i){const e={attributes:!0,childList:!0,subtree:!0};new MutationObserver((function(e){for(let t of e)if("childList"===t.type||"attributes"===t.type){n.innerHTML="";const e=i.cloneNode(!0);n.appendChild(e);}})).observe(i,e),document.getElementById("seatUI").appendChild(t);}}else {const t=document.getElementById("or"+e.actualSeatID);t.style.top=e.posY+"px",t.style.left=e.posX+"px",t.style.width=(W.unscaledWidth+W.paddingRight)*W.scale+"px";}if(0==W.seatUIs.length)for(let e=1;e<=8;e++){const t=document.getElementById("or"+e);t&&t.remove();}}async function ne(e,t){for(let i of e){const{x:e,y:t}=N.Rcity[i.id],n=W.centerX+e*SystemContext.gameScale/window.devicePixelRatio+"px",a=W.centerY+t*SystemContext.gameScale/window.devicePixelRatio+"px";if(null==document.getElementById("city"+i.id)){const e=document.createElement("div");if(e.id="city"+i.id,e.className="city",e.style.position="absolute",e.style.fontSize="15px",e.style.left=n,e.style.top=a,void 0!==N.Rfight[i.event]){let t=[];for(let e of N.Rfight[i.event].generals){let[n,i]=ce(e,O.difficulty);i?t.push('<span style="color: rgb(240, 65, 85); font-weight: bolder">'+e.generalname+" "+n.join(" ")+"</span>"):t.push(e.generalname);}e.innerHTML=t.join("<br>").replace(/\n/g," ")+"<hr>"+N.Rfight[i.event].get.replace(/\n/g,"<br>");}else {let t=[];for(let e=1;e<4;e++){let n=i.event+e.toString(),a=[];if(N.Rchoose[n])if(N.Rchoose[n].generals)for(let e of N.Rchoose[n].generals){let[t,n]=ce(e,O.difficulty);n?a.push('<span style="color: rgb(240, 65, 85); font-weight: bolder">'+e.generalname+" "+t.join(" ")+"</span>"):a.push(e.generalname);}else a.push(N.Rchoose[n].lost)&&a.push("");t.push(a);}e.innerHTML=(N.Rchoose[i.event+"1"]?(""==N.Rchoose[i.event+"1"].lost?"":t[0].join("<br>").replace(/\n/g," ")+"<hr>")+N.Rchoose[i.event+"1"].get.replace(/\n/g,"<br>"):"")+(N.Rchoose[i.event+"2"]?"<hr>"+(""==N.Rchoose[i.event+"2"].lost?"":t[1].join("<br>").replace(/\n/g," ")+"<hr>")+N.Rchoose[i.event+"2"].get.replace(/\n/g,"<br>"):"")+(N.Rchoose[i.event+"3"]?"<hr>"+(""==N.Rchoose[i.event+"3"].lost?"":t[2].join("<br>").replace(/\n/g," ")+"<hr>")+N.Rchoose[i.event+"3"].get.replace(/\n/g,"<br>"):"");}document.getElementById("rogueUI").appendChild(e);}else {const e=document.getElementById("city"+i.id);e.style.left=n,e.style.top=a;}}const n=e.map((e=>"city"+e.id));document.querySelectorAll("div.city").forEach((e=>{n.includes(e.id)||e.remove();}));}function ie(e,t="点击复制",n=!0,i=!1,a=null){let s=document.createElement("button");return s.className="calRes",s.title=t,s.disabled=i,s.innerText=e,s.onclick=()=>{Y(e,n),s.innerText="复制成功",setTimeout((()=>{s.textContent=e;}),500);},s}async function ae(e){let t=e.slice().sort(((e,t)=>e-t)),n=[];!function e(i,a,s){if(13!==s){if(!(s>13))for(let n=a;n<t.length;n++)n>a&&t[n]===t[n-1]||(i.push(t[n]),e(i,n+1,s+t[n]),i.pop());}else n.push(i.slice());}([],0,0);let i=Je.getElementById("result");i.innerHTML="";for(let a of n.sort(((e,t)=>t.length-e.length)))if(i.appendChild(ie(a.map((e=>Z(e,!1))).join("+"))),i.children.length>=15)break;""===i.innerHTML&&(i.innerHTML='<span class="textRes">【资援】无解!</span>');}async function se(e,t){function n(e,t,i,a,s){if(i.length!==s+1){for(let l=a;l<e.length;l++)l>a&&e[l]===e[l-1]||(i.push(e[l]),i[0]+=e[l],n(e,t,i,l+1,s),i[0]-=i.pop());return t}t.push([...i,...i.reduce(((e,t)=>(e.splice(e.indexOf(t),1),e)),e.slice())]);}let i=Je.getElementById("result");if(i.innerHTML="",!(null==e?void 0:e.length)||!(null==t?void 0:t.length))return;let a=Math.max(e.length,t.length);e.sort(((e,t)=>e-t)),t.sort(((e,t)=>e-t));for(let o=2;o<=a;o++){let s=n(e,[],[0],0,o);n(t,[],[0],0,o).forEach((e=>s.forEach((t=>{e[0]>t[0]&&e.slice(1,o+1).every((e=>!t.slice(1,o+1).includes(e)))&&(a<3||Array.from({length:o}).some(((n,i)=>e[i+1]<t[i+1])))&&i.appendChild(ie(e.slice(1,o+1).map((e=>Z(e)))+"→"+t.slice(1,o+1).map((e=>Z(e))),"点击复制",!1));}))));}let s=Array.from(new Set(t)),l=Array.from(new Set(e));s.forEach((e=>{let t=l.filter((t=>t<e));t.length&&i.appendChild(ie(Z(e)+"→"+t.map((e=>Z(e))).join("/"),"点击复制",!1));})),""===i.innerHTML&&(i.innerHTML='<span class="textRes">【易城】无法交换!</span>');}async function le(e){var t,n,i;if(!(null==e?void 0:e.allData))return W.cities=[],ne(W.cities),document.getElementById("centerUI").classList.remove("show"),void document.getElementById("centerUI").classList.add("hide");const a=document.getElementById("centerUI");a.classList.remove("hide"),a.classList.add("show");let s=e.allData,l=s.shopData,o=s.chapterData,r=s.generalpool;if(l){l.bShow=!0;let e=[];if(l.itemId&&N.Rplot)for(let t of l.itemId)N.Rplot[t]&&e.push(N.Rplot[t].name);!function(e){var t=Je.getElementById("storeDetail");t.innerText="",0==e.length&&(e=["暂无集市数据"]);for(let n of e){let e=document.createElement("button");e.className="storeDetail",e.innerText=n,t.append(e);}}(e);}r&&r.general_change&&r.general_change.length>0&&m(`小抄提示:可换将为${r.general_change.map((e=>N.generalDict[e]||`Unknown (${e})`)).reverse().join(", ")}`,"acTooltip",3e3,"green");let d=s.seasonData,c=d&&d.difficulty;c&&(O.difficulty=c),O.general=(null==(n=null==(t=s.gameData)?void 0:t.myGeneral)?void 0:n.uGeneralId)??0,O.itemId=(null==(i=s.gameData)?void 0:i.itemId)??[],o&&o.locations&&(W.cities=o.locations.map((e=>({id:e.location,event:e.event}))),N.Rcity&&ne(W.cities));}const oe=(()=>{class e{constructor(){this.id=0,this.goods_id=0,this.goods_cnt=0,this.price_type=0,this.price_num=0,this.stock=0,this.buy_limit=0,this.ori_price=0,this.all_bought_cnt=0,this.self_bought_cnt=0;}Read(e){this.id=e.readUnsignedByte(),this.goods_id=e.readUnsignedInt(),this.goods_cnt=e.readUnsignedInt(),this.price_type=e.readUnsignedByte(),this.price_num=e.readUnsignedInt(),this.stock=e.readUnsignedInt(),this.buy_limit=e.readUnsignedByte(),this.ori_price=e.readUnsignedInt();}UpdateDate(e){this.goods_id=e.goods_id,this.goods_cnt=e.goods_cnt,this.price_type=e.price_type,this.price_num=e.price_num,this.stock=e.stock,this.buy_limit=e.buy_limit,this.ori_price=e.ori_price,this.all_bought_cnt=e.all_bought_cnt,this.self_bought_cnt=e.self_bought_cnt;}}let t=!1;return async n=>{if(t)return null;const i=Je.querySelectorAll('.left input[type="checkbox"]');let a=function(t){t.position=0;let n=[],i=t.readBoolean();if(t.Data.length<=1)return null;let a=t.readUnsignedInt(),s=t.readUnsignedInt(),l=new Date(1e3*a).toISOString().slice(5,16).replace("T"," "),o=new Date(1e3*s).toISOString().slice(5,16).replace("T"," "),r=t.readUnsignedInt();for(let d=0;d<r;d++){let i=new e;i.Read(t);let a=n.find((e=>e.id==i.id));a?a.UpdateDate(i):n.push(i);}r=t.readUnsignedInt();for(let e=0;e<r;e++){let e=t.readUnsignedInt(),i=t.readUnsignedInt(),a=n.find((t=>t.id==e));a&&(a.all_bought_cnt=i);}r=t.readUnsignedInt();for(let e=0;e<r;e++){let e=t.readUnsignedInt(),i=t.readUnsignedInt(),a=n.find((t=>t.id==e));a&&(a.self_bought_cnt=i);}return {commonVo:n,start_time:a,end_time:s,start:l,end:o,next:i}}(n);if(!a)return null;let{commonVo:s,start_time:l,end_time:o,start:r,end:d,next:c}=a;if(c)return;l=1e3*(l-28800);let u=s.map((({goods_id:e,goods_cnt:t,price_type:n,price_num:a,stock:s,buy_limit:o,ori_price:c,all_bought_cnt:u,self_bought_cnt:h},p)=>{var m;let f=a+["","通用元宝","元宝","银两"][n]+": "+(null==(m=N.goodsID(e))?void 0:m.name)+(t>1?"*"+t:""),g=`${r} ~ ${d} 共${s}个`,y=u>=s||h>=o;return Object.assign(i[p].dataset??{},{goods_id:e,start_time:l,goods:f}),{goods_id:e,goods:f,title:g,disabled:y}})),h=Je.getElementsByClassName("right")[0];h&&(h.innerHTML=u.map((({goods:e,title:t,disabled:n})=>`<span class="secKillDetailText${n?" gray":""}" title="${t}">${e}</span>`)).join(""));let p=h.start-6e4;return p>Date.now()&&U.set("miaosha",(()=>{f(`${r}\n秒杀即将开始!\n`+u.map((({goods:e})=>e)).join("\n")),t=!0,setTimeout((()=>{t=!1;}),66666);}),p),n.Size==n.position}})();let re=["巳蛇","灵动","八门","盾弓","智迟","持盈","卫主","不死","刚烈","觉醒","悲鸣","断肠","节命","先机","悲鸣","忘魂","雅士","挥泪","不屈","封冻","灵躯","武魂"];const de={getspell:0,getspell_ZD:1,getspell_KN:2,getspell_EM:3,getspell_LY:4};function ce(e,t){let n=[],i=!1,a=function(e){switch(Math.floor((e-1)/5)){case 0:default:return "getspell";case 1:return "getspell_ZD";case 2:return "getspell_KN";case 3:return "getspell_EM";case 4:return "getspell_LY"}}(t);const s=de[a];let l=Object.keys(de).filter((e=>de[e]<=s)).map((t=>e[t])).filter(Boolean).join(";");l=null==l?void 0:l.split(";").map((e=>{var t;return (null==(t=N.spellDict[e])?void 0:t.name)||"无收录技能"}));for(let o of l)re.includes(o)&&(n.push(o),i=!0);return [n,i]}var ue=[],he=[],pe={290:"推锋",766:"匡弼"},me=[],fe={},ge={},ye={},ve=new Map,be=()=>({name:"加载中"}),we=[],xe={},Se={},ke={},Ie={},Ce={},Ee={};async function De(e){return new Promise((t=>JSZipUtils.getBinaryContent("test.sanguosha.com"===window.location.host?"https://test.sanguosha.com/h5/res/config//Config_w.sgs":"https://web.sanguosha.com/220/h5_2/res/config/Config_w.sgs?v="+window.resourceVersion,((n,i)=>JSZip.loadAsync(i).then((async n=>{var i,a,s,l=(s=new Date).getFullYear().toString()+(s.getMonth()+1).toString().padStart(2,"0")+s.getDate().toString().padStart(2,"0");let o=["sys_playcard","cha_spell","character","hd_roguelike","hd_1v1_rogue","sys_h5_shop","sys_gs_dbs_fs_goodsbaseinfo","sys_server_item_drops_templete_config","sys_h5_dbs_clientserverpub","cha_gs_dbs_fs_skininfo","gn_dbs_quest","sys_h5_quest","sys_h5_task","ff_dbs_lottery_new","ff_exchange_new","sys_treasure_chest","gn_dbs_giftbag","ff_tiangong","ff_chess"];var u=await Promise.all(o.map((e=>n.file(e+".sgs").async("arraybuffer").then((e=>JSON.parse((new TextDecoder).decode(new Zlib.Gunzip(CtrUtil.Ctr.Ofb_Dec(e)).decompress()))))))).then((e=>o.reduce(((t,n,i)=>(t[n+".sgs"]=e[i],t)),{})));function h(e,t){if("object"!=typeof e)return e;let n={};for(let i in e)n[t.get(i)||i]=e[i];return n}var p,f=new Map([["id","编号"],["name","名称"],["time","时间"],["desc","说明"],["reward","奖励"],["price","价格"],["max","限购"],["effect","效果"],["info","信息"]]),g=u["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.reduce(((e,t)=>(e.set(t.a,t),e)),new Map),y=u["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.abbreviation.field.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map),v=u["sys_server_item_drops_templete_config.sgs"].AllDrop.DropTemplete.DropGroup.DropItem.reduce(((e,t)=>(e.has(t.a)||e.set(t.a,[]),e.get(t.a).push(t.d),e)),new Map);p={},be=function(e){if(e=parseInt(e),p[e])return p[e];let t=h(g.get(e),y),n=u["sys_h5_shop.sgs"].root.itemtips.find((({a:t})=>t==e)),i=t.usedeffect&&k(t.usedeffect);return p[e]={...t,...n&&{info:n.e},...i&&{effect:i}}};var b={};function x(e){var t;let n=null==e?void 0:e.replace(/([^0-9,\.])/g,"").split(",").map((e=>parseInt(e)));return (null==n?void 0:n.length)<2?e:(b[n[0]]??(b[n[0]]=null==(t=g.get(n[0]))?void 0:t.b)??n[0])+(parseInt(n[1])>1?"*"+n[1]:"")}var S={};function k(e){let t=parseInt(e);if(1e3!=t&&Math.abs(t)>0)return S[t]??(S[t]=(v.get(Math.abs(t))??[]).map((e=>{var t;return (null==(t=g.get(e))?void 0:t.b)??k(e)})).join(t>0?"/":"&"))}me=u["cha_spell.sgs"].GameSpells.spell.reduce(((e,{a:t,c:n,o:i})=>{var a,s;let l={name:n,spellid:t,desc:(null==(s=null==(a=null==i?void 0:i.replace(/<[^\<\>]*>/g,""))?void 0:a.replace(/#.*/g,""))?void 0:s.replace(/[;\n]+$/g,""))||""};return (l.desc.includes("暗置")||l.desc.includes("扣置")||l.desc.includes("移出"))&&(pe[t]=F[l.name]??l.name),e[t]=l,e}),[]);let I=u["sys_playcard.sgs"].abbreviation.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map);if(ue=u["sys_playcard.sgs"].GamePlayCards.card.map((e=>h(e,I))).reduce(((e,t)=>{var n,i;return e[t.id]={...t,name:t.name??(null==(n=me[t.spellId])?void 0:n.name),desc:null==(i=me[t.spellId])?void 0:i.desc},e}),[]),he=u["sys_playcard.sgs"].GamePlayCards.card.sort(((e,t)=>e.c-t.c||e.d-t.d||e.h-t.h||e.m-t.m||e.g-t.g||e.f-t.f||e.a-t.a)).map((({a:e})=>e)),ve=new Map(u["cha_gs_dbs_fs_skininfo.sgs"].generalskin.items.item.map((e=>[String(e.a),[e.a,e.c,e.v||e.q,e.r]])).reverse()),ge=u["cha_gs_dbs_fs_skininfo.sgs"].root.manu.item.reduce(((e,{skinID:t,name:n,skinlevel:i,dongPoint:a})=>{let s=parseInt(t/100);return e[s]||(e[s]={}),e[s][t]={level:{"0,0":"普通","0,1":"稀有","0,2":"史诗","0,3":"传说","0,4":"限定"}[i]||"未知",name:n,state:void 0!==a},e}),{}),Object.entries(u["cha_gs_dbs_fs_skininfo.sgs"].generalskin.speciaSkin.filter((e=>String(e.skinID).includes("_"))).reduce(((e,t)=>{let[n,i]=t.skinID.split("_");return e[n]?e[n].push(i):e[n]=[i],e}),{})).forEach((([e,t])=>{var n,i;null==(n=ve.get(e))||n.push(t);let a=parseInt(e/100),s=null==(i=ge[a])?void 0:i[e];s&&(delete ge[a][e],t.forEach((t=>{ge[a][e+"_"+t]={...s,name:s.name+t};})));})),fe=u["character.sgs"].GameCharacters.character.reduce(((e,{a:t,ai:n,b:i})=>(e[t]=(n||"")+(null==i?void 0:i.replaceAll("&","")),e)),{}),u["character.sgs"].GameCharacters.character.forEach((({a:e,v:t})=>{if("string"!=typeof t)return void(ye[e]=new Set([e]));let n=[e,...t.split(";").map((e=>parseInt(e)))],i=n.find((e=>e in ye));if(i){let e=ye[i];n.filter((t=>!e.has(t))).forEach((t=>(ye[t]=e).add(t)));}else {let e=new Set(n);n.forEach((t=>ye[t]=e));}})),Ee=u["character.sgs"].WuJiangs.Spgroup.reduce(((e,t)=>{const n=t.spgenerals?t.spgenerals.split(",").map(Number):[];return n.forEach((t=>{e[t]=new Set(n);})),e}),{}),Ce=u["ff_tiangong.sgs"].root.Common.reduce(((e,t)=>(e[t.Id]=t,e)),{}),"string"!=typeof e&&async function(e,t){let n=r("CDK");n||(n=[]);let i=e.filter((e=>!n.includes(e)));await w(1e4);for(let l of i)m(`找到兑换码!<br>${l}<br>点击该通知即可兑换`,"ac-tooltip",1e4,"green",(function(){!n.includes(l)&&n.push(l),d("CDK",n),B(l);}));var a=Je.getElementById("CDK");a.innerText="",0==e.length&&(e=["所有兑换码已经兑换","迟点再看看吧"],c("CDK"));for(let l of e){let e=document.createElement("button");e.className="calRes",e.innerText=l,e.onmousedown=function(){B(l),e.innerText="已兑换",setTimeout((()=>{e.textContent=l;}),"500");},a.append(e);var s=document.createElement("br");a.append(s);}}(u["gn_dbs_giftbag.sgs"].giftsys.gifts.giftsItem.Item.filter((e=>e.allServerWord&&!e.platform&&(!e.level||"[min-0][max-201]"==e.level)&&e.endtime>=l&&e.begintime<=l)).sort(((e,t)=>e.endtime-t.endtime)).map((({c_allServerWord:e,allServerWord:t})=>e||t)).filter(Boolean)),Object.assign(N,{cardDict:ue,cardIDsOrder:he,markSpell:pe,spellDict:me,generalDict:fe,skinDict:ge,skinMap:ye,bigSkin:ve,goodsID:be,secId:Ce}),"string"==typeof e&&"roge"!=e||async function(n,i){xe=n.Root.Level.reduce(((e,{cityID:t,cityname:n,citypic:i,citycoordinate:a,startshow:s})=>{let[l,o]=a.split(",").map(Number);return e[t]={x:l,y:-o,boss:s,name:n??(null==i?void 0:i.replace(/^city_([0-9])_(.+)*\.png$/,((e,t,n)=>({"1jjy":"将军营","1jl":"箭楼","1wl":"望楼","1fht1":"烽火台(左)","1ck":"仓库","1yf":"营房","1fht2":"烽火台(右)","1sjc":"神君祠","2xsj":"西市集","2wl":"望楼","2dsj":"东市集","2wk":"武库","2hgl":"挥公陵","2sdg":"舜帝宫","2gcm":"干城门","2ywt":"演武台","3ds":"东市","3gg":"桂宫","3bg":"北宫","3wyg":"未央宫","3wk":"武库","3mgg":"明光宫","3clg":"长乐宫","4js":"金市","4lyt":"凌云台","4hly":"华林园","4tc":"太仓","4tx":"碳墟","4smm":"司马门","4wk":"武库","4sz":"石址","5my":"梅园","5fhl":"凤凰林","5lt":"龙亭","5wk":"武库","5wl":"望楼","5cm":"城门","5ql":"谯楼","5clg":"陈留宫","6jkg":"建康宫","6ql":"戚里","6wl":"望楼","6ycq":"邺城桥","6ywt":"演武台","6sg":"书馆","6wfl":"万福楼","6wk":"武库","6tqt":"铜雀台"}[t+n]??e))))},e}),{}),n.Root.Tactics.forEach((({plot:e,plotname:t,plotdesc:n,school:i,money:a,level:s})=>{we[e]={name:t.replaceAll("·",""),desc:n.replaceAll(" ",""),school:i,money:a,level:s,type:2};})),n.Root.Spell.forEach((({id:e,spellid:t,money:n,level:i})=>{var a,s;we[e]={name:null==(a=me[t])?void 0:a.name,desc:null==(s=me[t])?void 0:s.desc,spellid:t,money:n,level:i,type:3};})),n.Root.Card.forEach((({id:e,cardid:t,isequip:n,money:i,level:a})=>{var s=ue[t];we[e]={name:{6:"火杀",7:"雷杀",11:"冰杀",12:"闪闪"}[s.subType]??s.name,desc:s.desc,color:s.color,number:s.number,money:i,level:a,type:4+n,rType:100*(10*s.type+s.subType)+n};}));var a,s=n.Root.Roundid.reduce(((e,{useSeason:t})=>t)),l=new Map,o=n.Root.Text.reduce(((e,{ID:t,text:n})=>(e[t]=n,e)),[]);n.Root.General=(a=n.root.abbreviation.reduce(((e,{Short:t,Long:n})=>(e.set(t,n),e)),new Map),n.Root.General.map((e=>h(e,a)))),n.Root.Adventure.forEach((e=>{e.chapname=o[e.chapname]??e.chapname;}));let r=n.Root.RewardGroup.reduce(((e,{reward:t,rewarddesc:n,allreward:i,abandonmoney:a})=>{var s,l;return e[t]=(a?a+"铜币/":"")+(null==(l=null==(s=null==i?void 0:i.split(";"))?void 0:s.flatMap((e=>null==e?void 0:e.split(","))))?void 0:l.map((e=>["随机","普通","稀有","史诗","传说"][e])).join("/"))+n.replace("多选一","自选"),e}),n.Root.Other.reduce(((e,{reward:t,rewardname:n})=>(e[t]=n,e)),{}));var d=n.Root.Chapter.reduce(((e,{seasonID:t,chapter:n,cityName:i,bosslocation:a,location:s})=>(s.split(";").forEach((a=>{e[a]=`${t}-${n}${i}`;})),e[a]=`${t}-${n}${i}BOSS`,e)),{}),c=n.Root.General.reduce(((e,t)=>(e[t.generalgroup]||(e[t.generalgroup]=[]),e[t.generalgroup].push(t),t.generalname=t.generalname.replace("&",""),e)),{});n.Root.General.forEach((e=>{e.GeneralRank||(e.GeneralRank=0),e.JumpStage&&(e.next=(([e,t])=>c[e][t-1]??c[e][0])(e.JumpStage.split(";"))),e.info={general:e.generalname,hp:e.hp,maxhp:e.maxhp,card:e.cardnum,draw:e.draw,sha:1+e.exshatimes,armor:e.armor,getarmor:e.getarmor,...e.next?{next:e.next.generalname}:{}},e.spells=["","_ZD","_KN","_EM","_LY"].flatMap(((t,n)=>{var i;return ((null==(i=e["getspell"+t])?void 0:i.split(";"))??[]).map((e=>me[e])).filter(Boolean).map((e=>({...e,level:n})))})),e.spell=e.spells.map((({name:e})=>e)).join(","),e.cards=["","_ZD","_KN","_EM","_LY"].flatMap(((t,n)=>{var i,a;return [...(null==(i=e["carddesc"+t])?void 0:i.split(";"))??[],...(null==(a=e["equip"+t])?void 0:a.split(";"))??[]].map((e=>ue[e])).filter(Boolean).map((({id:e})=>({id:e,ncn:Q[e].ncn,level:n})))})),e.card=e.cards.map((({ncn:e})=>e)).join(",");})),ke=n.Root.Fight.reduce(((e,t)=>{function n(e,i,a=!1){e&&(t.fight+=g(e.info),t.lost+=(e.start?"[先手]":"")+e.generalname,e.next?(t.lost+=">",e.next.stage=i,e.next.info.pre=e.generalname,t.generals.push(e.next),n(e.next,i+1,a)):a||(t.fight+="+",t.lost+=" "));}if(t.generals=[...c[t.Ggroup]??[]],t.fight="",t.lost="",t.generals.forEach(((e,t,i)=>n(e,1,t==i.length-1))),t.startnum){let e=t.generals.find((e=>e.generalID==t.startnum));e&&(e.start=!0);}return t.get=t.itemgroup+"铜币\n"+(t.rewarditem?String(t.rewarditem).split(";"):[]).concat(String(t.reward).split(";")).map((e=>r[e])).join("\n"),t.text=o[t.text]??t.text,t.name=o[t.name]??t.name,e[t.fightID]=t,e}),[]);for(let e in c)e in ke||(ke[e]={generals:c[e]});if(Se=n.Root.Choose.reduce(((e,t)=>{var i,a,s;return 7==t.type?(e[t.effectID]=ke[t.event1],l.set(t.event1,null==(i=n.Root.Adventure.find((e=>e.ID===parseInt(t.effectID/10))))?void 0:i.chapname)):3==t.type&&"2"==t.event1?e[t.effectID]={get:"营地"}:e[t.effectID]={lost:(s=f(t.lostitem,t.lostnum,t.effectID),s?"失去 "+s:s),get:(a=f(t.getitem,t.getnum,t.effectID),a&&t.showitem?a.replace("随机","特定"):a)},e}),[]),Object.assign(N,{Rfight:ke,Rchoose:Se,Rcity:xe,vskinMap:Ee,Rplot:we}),!e||"roge"==e){var u=Object.entries(c).reduce(((e,[t,n])=>{var i,a,s,o,r;let d=t.length<6?t.slice(-3):"99"!==t.slice(0,2)?t.slice(-5,-2)+">":"*"+t.slice(-2),c=t.length<6?t.slice(0,-3)-2:"99"!==t.slice(0,2)?t.slice(0,-5)-2:t.slice(-3,-2)-t.slice(-4,-3)+9;if(["新年大吉"].includes((null==(i=ke[t])?void 0:i.name)??(null==(a=ke[parseInt(d)+4e3])?void 0:a.name)))return e;e[d]||(e[d]={fight:(null==(s=ke[t])?void 0:s.name)??(null==(o=ke[parseInt(d)+4e3])?void 0:o.name)??"",generals:{}}),l.has(t)&&(e[d].event=l.get(t));let u=e[d].generals;return ((null==(r=ke[t])?void 0:r.generals)??n).forEach((e=>{let t=(d.startsWith("*")?c:"")+(e.stage||"")+"#"+e.generalID;for(;;){if(u[t]){if(u[t].levels.includes(c)){t+="@";continue}}else u[t]={general:(e.info.pre?">":"")+e.generalname+(e.info.next?">":""),info:g(e.info),levels:[],start:[],infos:{},spell:{},card:{},ad:{}};break}let n=u[t];c%10<6&&c<20&&(n.levels.push(c),e.start&&n.start.push(c)),n.infos[c]=e.info,e.otherad&&(n.ad[c]=e.otherad),e.spells&&e.spells.forEach((e=>{n.spell[e.spellid]||(n.spell[e.spellid]={...e,levels:[],level:void 0}),c%10<6&&c<20&&n.spell[e.spellid].levels.push(c+(e.level??0));})),e.cards&&e.cards.forEach((e=>{n.card[e.id]||(n.card[e.id]={name:e.ncn,levels:[],level:void 0}),c%10<6&&c<20&&n.card[e.id].levels.push(c+(e.level??0));}));})),e}),{});Object.entries(u).forEach((([e,t])=>{u[e].shift=e.startsWith("*")&&1==Math.min(...Object.values(t.generals).flatMap((e=>e.levels)))?1:0,t.generals=Object.values(t.generals).map((t=>(t.level=Math.min(...t.levels.sort(((e,t)=>t-e)))-u[e].shift,t.level=t.level,t.spell=Object.values(t.spell).map((n=>{let i=Math.min(...n.levels.sort(((e,t)=>t-e)));var a;return n.levels.some(((e,n,i)=>e<10&&!i.includes(e+10)&&(t.levels.includes(e+10)||2==t.levels.length&&t.levels.includes(10))))&&(n.level=[i]),n.levels.some((e=>e<10))&&(a=n.levels.filter(((e,t,n)=>e>=10&&!n.includes(e-10)))).length&&(n.level=[i,a[a.length-1]]),n.level=(n.level??i)-u[e].shift,delete n.levels,delete n.spellid,n})).sort(((e,t)=>{let n=e=>e[1]>=10?e[1]:e[0]??e;return n(e.level)%10-n(t.level)%10||n(e.level)-n(t.level)})),t.card=Object.values(t.card).map((n=>{let i=Math.min(...n.levels.sort(((e,t)=>t-e)));var a;return n.levels.some(((e,n,i)=>e<10&&!i.includes(e+10)&&(t.levels.includes(e+10)||2==t.levels.length&&t.levels.includes(10))))&&(n.level=[i]),n.levels.some((e=>e<10))&&(a=n.levels.filter(((e,t,n)=>e>=10&&!n.includes(e-10)))).length&&(n.level=[i,a[a.length-1]]),n.level=(n.level??i)-u[e].shift,delete n.levels,n})).sort(((e,t)=>{let n=e=>e[1]>=10?e[1]:e[0]??e;return n(e.level)%10-n(t.level)%10||n(e.level)-n(t.level)})),t.card.length||delete t.card,t.info=Object.values(t.infos).reduce(((e,t)=>(Object.keys(e).forEach((n=>{t[n]>e[n]&&(e[n]=t[n]);})),e)),{hp:0,card:0,draw:0,sha:0}),Object.keys(t.ad).length?Object.keys(t.ad).sort(((e,t)=>t-e)).forEach(((e,n,i)=>{(e>=10&&t.ad[e]==t.ad[e%10]||t.ad[e]==t.ad[i[n+1]])&&delete t.ad[e];})):delete t.ad,t.start.length?t.start=Math.min(...t.start):delete t.start,delete t.infos,delete t.levels,t))).sort(((e,t)=>e.level-t.level));}));var p=n.Root.UniversalGroup.filter((e=>void 0!==e.fightgroup)).reduce(((e,t)=>{e[t.fightID]||(e[t.fightID]={});let n=String(t.fightgroup).slice(-3);return e[t.fightID][n]||(e[t.fightID][n]=[]),e[t.fightID][n].push(t),e}),{}),m=Array.from(Array.from(n.Root.Level.reduce(((e,{cityID:t,eventfight:n,universalfight:i,startshow:a})=>{var s,l;function o(n){if(!n||0==n.length)return;let i=e.get(n);i?i.includes(d[t])||i.push(d[t]):e.set(n,[d[t]]);}return o(i),o(null==(l=null==(s=null==n?void 0:n.split(";"))?void 0:s.map((e=>e.slice(-3))))?void 0:l.filter(((e,t,n)=>!n.slice(t+1).includes(e)))),e}),new Map).entries()).reduce(((e,[t,n])=>{let i=n.length>1&&new Set(n.map((e=>e.slice(0,3)))).size<2?n.map(((e,t)=>e.slice(t?3:0))).join("/"):String(n);return e.get(i)||e.set(i,new Set),(p[t]?Object.keys(p[t]):t).forEach((t=>e.get(i).add(t))),e}),new Map).entries()).reduce(((e,[t,n])=>(e[t]=Array.from(n,(e=>u[e])),e)),{});Ie.jsbs=JSON.stringify(Object.entries(m).filter((e=>e[0].includes(s+"-"))).reduce(((e,[t,n])=>{let i=t.slice(2);return e[i]||(e[i]=[]),n.forEach((t=>{"新年大吉"!=t.fight&&e[i].push(t);})),e}),{})),Ie.jsft=JSON.stringify(Object.values(u).filter((e=>["天涯故交","招兵买马","万众敬仰"].includes(e.event)&&e.shift||["突来危机","擂台比武","战事推演","为民除害","赛前演习","宵小叫嚣"].includes(e.event))).reduce(((e,{event:t,generals:n,fight:i})=>(e[t]||(e[t]=[]),e[t].push({...i?{fight:i}:{},generals:n}),e)),{})),Ie.wscd=JSON.stringify(Object.values(i.Card.map((({CitationID:e,money:t})=>({...we[e],money:t}))).reduce(((e,{level:t,money:n,name:i,color:a,number:s,desc:l,rType:o})=>{let r=t+i+s;return e[r]||(e[r]={cl:[],level:n,name:i,number:s,type:o,desc:l}),e[r].cl.push(a),e}),{})).sort(Te("type","level"))),Ie.wssp=JSON.stringify(i.Spell.map((({CitationID:e,money:t})=>({...we[e],money:t}))).sort(Te("money","level","spellid")).map((({level:e,money:t,name:n,desc:i})=>({level:t,name:n,desc:i})))),Ie.wszf=JSON.stringify(i.Tactics.map((({CitationID:e,money:t})=>({...we[e],money:t}))).filter((e=>{var t;return (e.name=null==(t=e.name)?void 0:t.replace("·新",""))&&!e.name.includes("废弃")&&!e.desc.includes("备用")&&!/(游戏|战斗)开始/.test(e.desc)})).sort(((e,t)=>!e.money^!t.money?e.money?1:-1:0!=e.name.slice(0,2).localeCompare(t.name.slice(0,2))?e.name.slice(0,2).localeCompare(t.name.slice(0,2)):Te("money","level","name.length")(e,t))).map((({level:e,money:t,name:n,desc:i})=>({level:t,name:n,desc:i}))).filter(((e,t,n)=>JSON.stringify(e)!=JSON.stringify(n[t+1])))),Ie.jssp=JSON.stringify(we.filter((e=>3==(null==e?void 0:e.type))).sort(Te("level","money","spellid")).map((({level:e,money:t,name:n,desc:i})=>({name:n,level:e,desc:i})))),Ie.jscd=JSON.stringify(Object.values(we.filter((e=>(null==e?void 0:e.type)>=4)).reduce(((e,{level:t,money:n,name:i,color:a,number:s,type:l,desc:o,rType:r})=>{let d=t+i+s,c=[33,34].includes(Math.floor(r/100))||"诸葛连弩"==i&&4==t;return e[d]||(e[d]={cl:[],level:c?0:t,money:n,name:i,number:s,type:r+(c?6:0),desc:o}),e[d].cl.push(a),e}),{})).sort(Te("type","level","money")).sort(((e,t)=>e.level>0&&0==t.level?-1:0))),Ie.jssd=JSON.stringify(n.Root.seed.sort(Te("level","seed")).map((({name:e,desc:t,level:n,huchijineng:i})=>{var a,s,l;let o=null==(a=null==t?void 0:t.match(/.*获得【([^【】]*)】.*/))?void 0:a[1];return o&&(t+=(null==(s=me[i])?void 0:s.desc)??(null==(l=me.find((e=>(null==e?void 0:e.name)==o)))?void 0:l.desc)),{name:e,level:n,desc:t}}))),Ie.jssc=JSON.stringify(n.Root.school.map((({school:e,name:t,effect:n,needputong:i,needxiyou:a,needshishi:s,needchuanshuo:l})=>({school:e,name:t,need:[i,a,s,l],desc:we[n].desc.replaceAll(" ","")})))).replace("(","(").replace(")",")").replace(")",")"),Ie.jszf=JSON.stringify(we.filter((e=>2==(null==e?void 0:e.type))).filter((e=>(e.school=parseInt(e.school||100),e.name=e.name.replace("·新",""),!e.name.includes("废弃")&&!e.desc.includes("备用")&&!e.name.includes("套装")))).sort(((e,t)=>0!=e.name.slice(0,2).localeCompare(t.name.slice(0,2))?e.name.slice(0,2).localeCompare(t.name.slice(0,2)):Te("level","money","name.length")(e,t))).map((({level:e,money:t,name:n,desc:i,school:a})=>({...a<100?{school:a}:{},name:n,level:e,desc:i}))).filter(((e,t,n)=>JSON.stringify(e)!=JSON.stringify(n[t+1])))),Ie.jstf=JSON.stringify(n.Root.saijitianfu.filter((e=>e.seasonID==s)).reduce(((e,{tfid:t,ceng:n,type:i,cost:a,plot:s,preposition:l})=>(e[t]={id:t,x:i,y:n,cost:a,pre:(null==l?void 0:l.split(/,|;/))??[],...we[s]},e)),[{id:0,x:0,y:0,cost:0,pre:[],name:"",level:0,type:0}])),t(Ie);}function f(e,t,i){var a,s,o;return e?e.includes(",")?(([e,t])=>["随机","普通","稀有","史诗","传说"][t]+{2:"战法",3:"技能",4:"手牌",5:"装备"}[e])(e.split(",")):r[e]?(t>1?t:"")+r[e]:we[e]?null==(a=we[e])?void 0:a.name:c[e]?(l.set(e,null==(s=n.Root.Adventure.find((e=>e.ID===parseInt(i/10))))?void 0:s.chapname),c[e].map((e=>e.generalname)).join("\n")):null==(o=n.Root.Card.find((t=>t.id==e)))?void 0:o.name:""}function g({general:e,hp:t,maxhp:n,armor:i,getarmor:a,card:s,draw:l,sha:o,next:r,pre:d}){return (d?">":"")+e+t+(n!==t?"/"+n:"")+"血"+s+"牌摸"+l+"杀"+o+(r?">":"")}}(u["hd_roguelike.sgs"],u["hd_1v1_rogue.sgs"]),"string"!=typeof e||"guanxing"==e){let n=function(e,t,i="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/big/bigSkin/"){let a=i+e+".png";return fetch(a).then((s=>s.ok?{name:t,desc:`<a target="_blank" href="${a}"><img src="${a.replace("bigSkin","static").replace("big/s","seat/s")}"></a>`}:i.includes("seat")?void 0:n(e,t,i.replace("big/s","seat/s").replace("bigSkin","static"))))};N.gxjson={"结果为推演和预测,请以最终公告为准!更新时间":(new Date).toLocaleString(),"【充值消费】":[]};let s=u["gn_dbs_quest.sgs"].TaskAll.Task.filter((({_attributes:e})=>e.clientTimeStart>=String(l))).map((({_attributes:e,Reward:t})=>{let n=",";return t.SelectReward&&(t=t.SelectReward,n="/"),t.RewardItem.length||(t.RewardItem=[t.RewardItem]),{id:e.id,time:e.timeStart.slice(0,8)+"—"+e.timeEnd.slice(0,8),desc:"【"+e.name+"】"+e.desc,reward:t.RewardItem.map((({_attributes:e})=>x(e.itemId+","+e.count))).join(n)}})).concat(u["sys_h5_quest.sgs"].root.Task.filter((e=>e.ClientTimeStart>=String(l))).map((({Id:e,Name:t,Desc:n,Rewards:i,Count:a,ClientTimeStart:s,ExtraRewards:l,ClientTimeEnd:o,SelectRewards:r})=>{let d=r?"/":",";return {id:e,time:s.slice(0,8)+"—"+o.slice(0,8),desc:"【"+t+"】"+n,reward:[i+","+a,...(null==l?void 0:l.split(";"))??[]].map(x).join(d)}}))),o=u["sys_h5_task.sgs"].TaskAll.TaskNode.filter((({duration:e,quest_id:t})=>t&&(!e||(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6})?.*"),"$1"))>=String(l)))).reduce(((e,{duration:t,quest_id:n,name:i})=>{var a,l;let o=n.split(";").map((e=>parseInt(e))).filter((e=>e>0)),r=((null==(l=t||(null==(a=s.find((({id:e,time:t})=>o.includes(e)&&t)))?void 0:a.time))?void 0:l.slice(0,8))+"·【"+(null==i?void 0:i.replace(/.*盲盒.*/,"盲盒福利"))+"】").replace(/.*(充值|消费).*/,"【充值消费】");return o.forEach((t=>{""!=t&&(e[t]=r);})),e}),{});s.forEach((({id:e,...t})=>{let n=o[e]??String(l)+"·【其它任务】";N.gxjson[n]||(N.gxjson[n]=[]),N.gxjson[n].push(t);})),(T=u["ff_dbs_lottery_new.sgs"].root.ShopGoods.filter((({timeRange:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(l))).map((({Id:e,counts:t,exchangecount:n,timeRange:i})=>({time:null==i?void 0:i.replace(/.*?([0-9]+)T[0-9]+,([0-9]+)T[0-9]+/,((e,t,n)=>t+"-"+n)),desc:"消耗·星石币*"+n,reward:x(e+","+t)})))).length>1&&(N.gxjson[(null==(i=T[0].time)?void 0:i.slice(0,8))+"·兑换【占星秘宝】"]=T),u["ff_exchange_new.sgs"].root.Common.filter((({duration:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(l))).forEach((({itemid:e,goods:t,rewardstype:n,duration:i})=>N.gxjson[i.slice(0,8)+"·【"+be(e).name+"】兑换"]=t.sort(((e,t)=>t.exchangecount1-e.exchangecount1)).map((({exchangecount1:t,Id2:n,counts:a,limitcounts:s,itemid2:l,exchangecount2:o})=>{let r=String(a).split(";");return {time:i.slice(0,8)+"—"+i.slice(16,24),desc:"消耗·"+x((l??e)+","+(o??t))+(s?",限"+s+"次":""),reward:String(n).split(";").map(((e,t)=>x(e+","+r[t]))).join("/")}})))),u["sys_treasure_chest.sgs"].root.Common.filter((({duration:e})=>(null==e?void 0:e.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(l))).forEach((({itemid:e,rewards:t,duration:n})=>N.gxjson[n.slice(0,8)+"·开启【"+be(e).name+"】"]=t.map((t=>({time:n.slice(0,8)+"—"+n.slice(16,24),desc:"开启·"+x(e+","+t.counts),reward:JSON.stringify(t).split(/,"goodsid[0-9]+":" *([0-9,;]+) *"/).filter((e=>(null==e?void 0:e.search(/([0-9]+,[0-9]+);?([0-9]+,[0-9]+)?/))>=0)).map((e=>e.replace(/([0-9]+,[0-9]+);?([0-9]+,[0-9]+)?/,((e,t,n)=>x(t)+(n?"["+x(n)+"]":""))))).join(2==t.rewardstype?"/":",")})))));let r=[],d=[],c=[],p=u["sys_h5_dbs_clientserverpub.sgs"].client.DuoBao[0].item.filter((({BeginTime:e})=>e>String(l))).flatMap((({DropId:e,ExchangeId:t,BeginTime:n,EndTime:i})=>{let a=n.slice(0,8)+"-"+i.slice(0,8),s=(v.get(Math.abs(e))??[]).map(be).filter((({name:e})=>!["夺宝碎片","夺宝重置券","绑定元宝","桃花","功勋","武将包","皮肤包","稀有皮肤包","豪华皮肤包","普通将印宝箱","稀有将印宝箱","史诗将印宝箱","大将军印"].includes(e))),l=s.map((({ID:e})=>e)),o=(v.get(Math.abs(t))??[]).map(be).filter((({ID:e,name:t,TypeID:n})=>l.includes(e)||!(43==n&&(null==t?void 0:t.endsWith("动态套装"))||36==n&&(null==t?void 0:t.startsWith("文和乱武*"))||25==n&&["赵襄","沙摩柯(SP)","孙尚香(界限突破)"].includes(t)||["枭雄金印","水晶碎片","圣魂玄晶","史诗皮肤锦囊","传说皮肤锦囊","至臻皮肤礼盒","谋定水晶自选礼盒"].includes(t)))).map((({ID:e,name:t})=>{let n=s.findIndex((({name:e})=>e==t));return n>=0&&l.splice(n,1,e),e}));return Array.from(new Set([...l,...o])).map(be).map((({ID:e,TypeID:t,PicID:n,name:i,returngoods:s,usedeffect:r,info:d,fragment:u})=>{var h;let p={time:a,name:i,price:[...l.includes(e)?["四角"]:[],...o.includes(e)&&u?[u+"夺宝碎片"]:[]].join("/"),...(m=["祈福灯","圣魂玄晶","枭雄金印"].includes(i)?"":s&&"0"!=s&&s.split(";").filter((e=>(null==e?void 0:e.search(/[0-9]+,[0-9]+/))>=0)).map(x).join(";")||(null==r?void 0:r.search(/^([0-9]+,[0-9]+;?)+$/))>=0&&r.replace(/([0-9]+),[0-9,]+/g,x)||r&&k(r)||d,m&&{desc:m})};var m;return (36==t||(null==(h=p.name)?void 0:h.search(/\*[^0-9]/))>=0)&&c.push({name:i,res:n}),p}))}));p.length&&(N.gxjson["夺宝行动"]=p,p=p.map((({name:e})=>e)));let m=u["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.filter((e=>{var t;return (null==(t=e.x)?void 0:t.replace(new RegExp(".*?(?<![0-9])([0-9]{8}T[0-9]{6}).*"),"$1"))>=String(l)&&834901!=e.a})).map((({a:e,ah:t,l:n})=>{if(n&&n.replace(/([0-9]+),[0-9,]+/g,((e,n)=>(t||[100301,200101,1325201].includes(parseInt(n))||r.push(parseInt(n)),e))),!t)return e;d.push(e);})).filter(Boolean).concat(r).sort(((e,t)=>e-t)).filter(((e,t,n)=>0==t||e!=n[t-1]));Array.from(new Set(u["cha_gs_dbs_fs_skininfo.sgs"].root.manu.item.filter((e=>e.SellTime>String(l))).map((e=>e.baseID)).concat(m.concat(m.filter(((e,t,n)=>e-n[t-1]>1e3&&n[t+1]-e<1e3)).map((e=>u["sys_gs_dbs_fs_goodsbaseinfo.sgs"].root.goodslist.goods.filter((t=>t.a-e>0&&t.a-e<1e4)).map((e=>e.a)))).reduce(((e,t)=>[...e,...t]),[])).sort(((e,t)=>e-t))))).map((e=>be(e))).filter((e=>e&&![...p,"夺宝碎片","夺宝重置券","绑定元宝","桃花","功勋","武将包","皮肤包","稀有皮肤包","豪华皮肤包","普通将印宝箱","稀有将印宝箱","史诗将印宝箱","大将军印"].includes(e.name))).forEach((({ID:e,TypeID:t,PicID:n,name:i,maxBuyCount:a,yuanbao:s,returngoods:l,SellTime:o,usedeffect:r,info:d,yuanbaoonly:u,fragment:h,exchange:p,shopvisual:m})=>{var f;let g={...o&&{time:o.replace(/.*?([0-9]+)T[0-9]+;([0-9]+)T[0-9]+/,((e,t,n)=>t+"-"+n))},name:i,...(null==p?void 0:p.includes(","))?{price:x(p)}:m&&999999!=s&&{price:u?s+"通用元宝":s+"元宝",...a&&((e,t)=>parseInt(e)>0?{max:t+"个/"+(1==e?"":e)+"天"}:{})(...a.split(";"))},...(y=["祈福灯","圣魂玄晶","枭雄金印"].includes(i)?"":l&&"0"!=l&&l.split(";").filter((e=>(null==e?void 0:e.search(/[0-9]+,[0-9]+/))>=0)).map(x).join(";")||(null==r?void 0:r.search(/^([0-9]+,[0-9]+;?)+$/))>=0&&r.replace(/([0-9]+),[0-9,]+/g,x)||r&&k(r)||d,y&&{desc:y})};var y;(36==t||(null==(f=g.name)?void 0:f.search(/\*[^0-9]/))>=0)&&c.push({name:i,res:n}),String(g.price).includes("夺宝")||String(g.price).includes("灵宝")?(N.gxjson["夺宝行动"]||(N.gxjson["夺宝行动"]=[]),N.gxjson["夺宝行动"].push(g)):g.max?(N.gxjson["限购礼包"]||(N.gxjson["限购礼包"]=[]),N.gxjson["限购礼包"].push(g)):(N.gxjson["其它道具"]||(N.gxjson["其它道具"]=[]),N.gxjson["其它道具"].push(g));})),null==(a=N.gxjson["其它道具"])||a.sort(((e,t)=>e.price&&!t.price?-1:1)),d.length&&(N.gxjson["祈福武将"]=Object.entries(d.map((e=>be(e))).filter((({returngoods:e})=>{var t;return 25==(null==(t=be(e.split(";")[1].split(",")[0]))?void 0:t.TypeID)})).reduce(((e,{name:t,lotteryPrice:n})=>(e[n]||(e[n]=[]),e[n].push(t.replace("武将","").replace(/\(.*?\)/g,"")),e)),{})).sort(((e,t)=>t[0]-e[0])).map((([e,t])=>({price:e+"同心结",reward:t.join("/")})))),(D=u["ff_tiangong.sgs"].root.Drop.reduce(((e,{Id:t,ItemId:n,MaxCount:i})=>{var a;return e[t]||(e[t]=[]),a=x(n+","+i),["欢乐豆","手气卡","点将卡","灵宝经","换将卡","诏令天","校尉将","朱砂*","灵宝经","桃花*","功勋*","传世玉","大将军","夺宝券","水晶碎","圣魂玄"].includes(a.slice(0,3))||e[t].push(a),e}),[]).reduce(((e,t)=>{if(t){let n=e.find((({reward:e})=>t.includes(e)));n&&(n.reward=t.join(","));}return e}),u["ff_tiangong.sgs"].root.Common.slice().reverse().reduce(((e,{Id:t,Name:n,bigrewards:i,Duration2:a})=>{let s=parseInt(a.slice(0,8))+1;if(s<parseInt(l))return e;let o=e.find((({name:e})=>e==n));return o?o.time+=";"+s:e.push({name:n,reward:fe[i],time:String(s)}),e}),[]).reverse())).length&&(N.gxjson["祈愿台"]=D);const g=(E={},function(e){return E[e]?E[e]:E[e]=u["ff_chess.sgs"].root.NewChess.filter((({PlanId2:t})=>t==e)).reduce(((e,{MaxFloors:t})=>e+parseInt(t)),0)});(C=u["ff_chess.sgs"].root.Common.reduce(((e,{GrandPrize:t,PlanID2:n,duration2:i})=>{var a;let s=parseInt(i.slice(0,8))+1;return s<parseInt(l)||e.push({reward:null==(a=be(t))?void 0:a.name,"预估价格":g(n)/2>>0,time:s+"-"+i.slice(16,24)}),e}),[])).length&&(N.gxjson["绘卷"]=C),N.gxjson["新品皮肤"]=c.map((({name:e})=>({name:e}))),Object.entries(N.gxjson).forEach((([e,t])=>N.gxjson[e]=Array.isArray(t)?t.map((e=>h(e,f))):h(t,f))),e&&"guanxing"!=e||t(Promise.all(c.map((({name:e,res:t})=>n(t,e)))).then((e=>N.gxjson["新品皮肤"]=e.filter(Boolean))).then((()=>(Object.entries(N.gxjson).forEach((([e,t])=>N.gxjson[e]=Array.isArray(t)?t.map((e=>h(e,f))):h(t,f))),N.gxjson))));}var C,E,D,T;t(u),console.warn("[initMap] Config_w 解析完成");}))))))}function Te(...e){return new Function("_a","_b","return "+e.map((e=>"((_a."+e+")-(_b."+e+"))")).join("||"))}Object.assign(N,{cardDict:ue,cardIDsOrder:he,spellDict:me,generalDict:fe,skinDict:ge,skinMap:ye,bigSkin:ve,goodsID:be,rogejson:Ie,gxjson:{},Rfight:ke,Rchoose:Se,Rcity:xe,secId:Ce,vskinMap:Ee,Rplot:we});var Ae='<head><title>三国杀打小抄</title><meta charset="UTF-8"><style>::-webkit-scrollbar{width:5px;height:12px}::-webkit-scrollbar-track{border:1px solid #050505}::-webkit-scrollbar-thumb{background:#5f563f}::-webkit-scrollbar-thumb:hover{background:#2c2c2c}*{width:100%;margin:0;padding:0;font-size:13px}body{width:100%;background:#23201d;background-size:cover;color:#f2de9c;display:flex;flex-direction:column;margin:0;user-select:none;max-width:100vw;overflow-x:hidden}.nav{width:100%;background:#23201d;text-align:center}.nav1{font-weight:bolder;height:20px;width:100%;color:#f2de9c;background:#23201d;margin-right:15px;display:block}#nav1:empty{display:none}.nav2{height:20px;width:49%;float:right;text-align:center;color:#f2de9c;background:#23201d;margin-left:3px;border:1px solid #f2de9c;display:block;border-radius:5px}.nav2:hover{color:#f2de9c;background:#372820;border:1px solid #f2de9c}.nav2:focus{background:#372820;box-shadow:1px 1px 3px #f2de9c}.content{width:100%;float:right}.orderAndShouPai{width:100%;overflow:hidden;display:inline-block}.order{width:100%;overflow:hidden}.ACContainer{width:100%;overflow:hidden}.AC-head{padding:5px;font-weight:bolder;height:60px;width:11%;float:right;text-align:center;color:#f2de9c;background:#23201d;margin:5px;display:block;border-radius:5px;border:1px #23201d solid;box-shadow:1px 0 3px;overflow:hidden}.AC-head:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.AC-body{padding:5px;height:60px;width:80%;float:left;display:block;box-shadow:1px 0 3px;border:1px #23201d solid;color:#f2de9c;margin:5px;overflow:hidden;border-radius:5px;background:#23201d;resize:none}.invite-body{padding:5px;height:40px;width:90%;float:left;display:block;box-shadow:1px 0 3px;border:1px #23201d solid;color:#f2de9c;margin:5px;overflow:hidden;border-radius:5px;background:#23201d;resize:none}.orderContainer{width:100%;overflow:hidden;margin:1px}.order-head{font-weight:bolder;width:10%;height:25px;float:left;text-align:center;color:#f2de9c;margin-left:3px}.order-body:empty{height:35px}.order-body{position:relative;padding:5px;height:auto;width:94%;display:block;box-shadow:1px 1px 3px;z-index:1;margin:1px;overflow:hidden;border-radius:5px}.order-body:after{text-align:center;content:var(--No-content, \'座位号丨武将\');position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.chain{background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAXCAMAAAA1KD/rAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD9QTFRF/wAA/1UA/2Yz/2IU/14c/14b/2Mc/2IaljkEYzALw1AI/2EeKiEaNzMrhk8UWllOcW5iFhIRRkM5/2Ih/1Uc5tOI4QAAABV0Uk5TAQMFDRsTJDyB2l1M/fvx/f//+S8J97xe+gAAAIlJREFUeJxlkEkOwzAMA0kv6QIfWiD/f2VOFWzVS+KminTymJQEEqZIC5wF3oJABbX2ARaruFlwP61RV60P/yOadWGi43w3SwLiDoQahS+o/zQkw3tSyNjyFiJKayDsijm0wbp2CLol16HHYT73ywqfKPMwl9PGMAMpcPWPEf/F1YJLhJhhac/uC2w8KNCgjCwwAAAAAElFTkSuQmCC);background-repeat:repeat-x}.knownShouPai{border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.knownCardsInHand{text-align:center;position:relative;overflow:hidden;display:none;height:auto}.knownCards:empty{text-align:center;position:relative;overflow:hidden;display:none}.knownCards{width:94%;text-align:center;position:relative;overflow:hidden;height:auto}@keyframes blink{50%{border-color:#f2de9c}}.paiduiCards:after{text-align:center;content:\'牌堆\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.knownCards{padding:5px;height:auto;width:94%;float:right;display:block;box-shadow:1px 1px 3px;margin:1px;overflow:hidden;border-radius:5px}.knownCards:after{text-align:center;content:\'场上手牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}#quanBian:after{text-align:center;content:\'权变牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}#yanXi:after{text-align:center;content:\'宴戏牌\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.cardTypeDetail:after{text-align:center;content:\'牌堆类型详情\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.ding{text-align:center;width:100%;position:relative;height:auto;display:none}.dingCards{text-align:center;position:relative;height:auto;min-height:60px;display:none}.dingCards:after{content:\'第一张为牌堆顶\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.di{text-align:center;width:100%;position:relative;height:auto;display:none}.diCards{text-align:center;position:relative;height:auto;min-height:60px;display:none}.diCards:after{content:\'第一张为牌堆底\';position:absolute;bottom:0;right:5px;z-index:-1;font:800 20px \'Arial Black\';-webkit-text-fill-color:transparent;-webkit-text-stroke-width:1px}.cardDetail{width:100%;overflow:hidden;display:inline-block}.type{width:100%;float:left}.cardTypeContainer{width:100%;overflow:hidden;display:block}.type-head{width:10%;float:left;text-align:center;color:#f2de9c;margin-left:3px;display:block;overflow:hidden;cursor:pointer}.type-body{padding:5px;width:94%;float:center;display:block;box-shadow:1px 1px 3px;margin:1px;overflow:hidden;border-radius:5px}.cardType{font-size:12px;width:25%;height:22px;float:left;text-align:center;border:1px;margin:0;background:#d2c8a0;box-shadow:inset 1px 1px 1px #000}.cardType:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.storeDetail{font-size:12px;width:50%;height:22px;float:left;text-align:center;border:1px;margin:0;background:#d2c8a0;box-shadow:inset 1px 1px 1px #000}.detail{width:100%;float:left;overflow:hidden}.detail-head{width:10%;height:25px;float:left;text-align:center;color:#f2de9c;margin-left:3px}.detail-body{min-height:40px;padding:5px;width:94%;float:left;display:block;box-shadow:1px 1px 3px;margin:1px;border-radius:5px;overflow:hidden}.panel-header{background:#23201d;color:#f2de9c;padding:3px;text-align:left;border:none;width:100%;cursor:pointer;display:flex;align-items:center;border-radius:5px;border:1px transparent solid}.triangle{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #f2de9c;margin-right:10px;transition:transform .3s ease}.panel-content{max-height:0;width:100%;float:left;display:block;color:#f2de9c;margin:1px;overflow:hidden;border-radius:5px;background:#23201d;transition:max-height .3s ease-out}.panel-header.active .triangle{transform:rotate(90deg)}.panel-header.active{color:#f2de9c;background:#372820}.panel-header:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.r{color:#f04155}.suitRec{width:50%;float:right;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Emoji",Tahoma,Arial,sans-serif;text-shadow:1px 0 0 rgba(255,255,255,.7),0 1px 0 rgba(255,255,255,.7),-1px 0 0 rgba(255,255,255,.7),0 -1px 0 rgba(255,255,255,.7)}.suit{width:50%;float:left}.phrase{float:left}.face{width:12.5%;display:block;float:left}.face:hover{width:12.5%;display:block;float:left;background:#f2de9c}#shandian{width:100%;float:left}.function{width:50%;float:left}.jizhan{width:100%;float:left}.yanjiao{width:50%;float:left}.yanjiaospan{border:1px solid #0000;box-sizing:border-box}.yanjiaospan:hover{border:1px solid #f2de9c;cursor:pointer}.calRes{width:98%;height:20px;float:left;text-align:center;color:#f2de9c;background:#23201d;border:1px solid #f2de9c;display:block;border-radius:5px;font-size:13px;margin:1px}.secKillDetailText{width:100%;height:26px;float:left;text-align:center;color:#f2de9c;background:#23201d;display:block;border-radius:5px;line-height:26px;margin-top:17px}.calRes:not(:disabled):hover{font-size:12px;color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.mizhuBtn{width:45%;height:20px;float:left;text-align:center;color:#f2de9c;background:#23201d;border:1px solid #f2de9c;display:block;border-radius:5px}.mizhuBtn:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.mizhu{width:100%;height:20px;float:left;text-align:center;color:#f2de9c;background:#23201d;margin-left:3px;border:1px solid #f2de9c;display:block;border-radius:5px}.mizhu:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}#mySeatID1{width:46%;display:none;float:left}#mySeatID2{width:46%;display:none;float:left}.res{width:100%;float:left}a:link,a:visited{color:inherit;text-decoration:none;display:inline-flex;text-decoration:underline;border-radius:5px;cursor:pointer;align-items:center;justify-content:center}a:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}#donate{position:relative;color:#f2de9c;display:inline-block;text-align:center}.uuid{position:relative;color:#f2de9c;display:inline-block;text-align:center;cursor:pointer}.uuid:hover{color:#f2de9c;background:#372820;border:1px #23201d solid;animation:blink 2s;animation-iteration-count:infinite}.uuid:active{background:#372820}.width{width:100%;height:5px;clear:both}.switch-container{display:flex}.switch{position:relative;display:inline-block;margin-left:10px;width:56px;height:26px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#23201d;-webkit-transition:.4s;transition:.4s;border-radius:34px;border:1px solid #f2de9c}.slider:before{position:absolute;content:"";height:20px;width:20px;left:2px;bottom:2px;background-color:#f2de9c;-webkit-transition:.4s;transition:.4s;border-radius:50%}input:checked+.slider{background-color:#372820}input:focus+.slider{box-shadow:0 0 1px #372820}input:checked+.slider:before{-webkit-transform:translateX(32px);-ms-transform:translateX(32px);transform:translateX(32px)}.status{position:absolute;top:50%;transform:translateY(-50%);left:5px;color:#555}.explanation{margin:0 10px;display:inline-block}input:checked+.slider+.status:before{content:\'开\'}input:checked+.slider+#autoBotStatus:before{content:var(--bot-status, \'30\');color:#f2de9c}input+.slider+#autoBotStatus:before{content:var(--bot-status, \'关\')}input+.slider+.status:before{content:"关"}.calRes:disabled{background-color:#ccc;color:#666;cursor:not-allowed}.shoupai{--shoupaiR-width:32px;font-weight:bolder;margin-right:calc(29px - var(--shoupaiR-width));float:left;width:var(--shoupaiR-width);min-width:var(--shoupaiR-width);min-height:38px;border:1px solid #000;text-align:center;color:#000;background:#d2c8a0;border-radius:5px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Emoji",Tahoma,Arial,sans-serif}.markedCard{display:inline-flex;align-items:center;border-radius:5px;border:1px solid #000;width:auto;background-color:#372820}.mark{writing-mode:vertical-rl;margin-right:0}.markedCard>.mark:only-child{display:none}.shoupai.R{color:red}.shoupai.G{background:grey}.shoupai.G .shoupai{background:#888;pointer-events:none}.order-body:not(#paiduiCards) .shoupai:disabled{display:none}.order-body:not(#paiduiCards) .shoupai.G{width:auto}.left{width:30%;float:left}.right{width:70%;float:right}input[type=checkbox]:disabled+.slider{background-color:gray;cursor:not-allowed}.question-mark{display:inline-block;position:relative;width:15px;height:15px;line-height:15px;text-align:center;border:1px solid #f2de9c;border-radius:50%;margin-left:2px;transition:background-color .3s}.question-mark:hover{background-color:#372820;cursor:pointer}.tooltip{position:absolute;background-color:#333;text-align:center;padding:5px;border-radius:5px;max-width:200px;white-space:pre-line;z-index:1000;opacity:0;pointer-events:none;transition:opacity .1s ease-in-out}.tooltip.visible{opacity:1;pointer-events:auto}.tooltip.top{margin-left:50px}</style><script async src="https://www.googletagmanager.com/gtag/js?id=G-5C3C11THB3"><\/script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5C3C11THB3")<\/script></head><body><div class="nav"><div id="nav1"></div><div class="nav1" id="phrase">当前阶段提示</div></div><div class="content" id="content"><div class="orderAndShouPai" id="orderAndShouPai"><button class="panel-header"><span class="triangle"></span> <b>武将手牌</b></button><div class="panel-content order" id="button"><div class="orderContainer" id="or1"><div class="order-body No1" id="1" style="--No-content:\'神诸葛亮丨一\'"><button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button><div class="markedCard"><span class="mark">木马</span> <button class="shoupai G">♥10<br>测试</button> <button class="shoupai R">♦K<br>测试</button></div><button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button> <button class="shoupai">♣Q<br>测试</button></div></div><div class="orderContainer" id="or2"><div class="order-body No2" id="2" style="--No-content:\'卧龙诸葛丨二\'"><button class="shoupai G">♥10<br>暗牌</button> <button class="shoupai G">♥10<br>样式</button></div></div><div class="orderContainer" id="or3" style="--No-content:\'天候孔明丨三\'"><div class="order-body No3" id="3"></div></div><div class="orderContainer" id="or4" style="--No-content:\'诸葛亮丨四\'"><div class="order-body No4" id="4"></div></div><div class="orderContainer" id="or5" style="--No-content:\'武诸葛亮丨五\'"><div class="order-body No5" id="5"></div></div><div class="orderContainer" id="or6" style="--No-content:\'卧龙凤雏丨六\'"><div class="order-body No6" id="6"></div></div><div class="orderContainer" id="or7" style="--No-content:\'界卧龙诸葛丨七\'"><div class="order-body No7" id="7"></div></div><div class="orderContainer" id="or8" style="--No-content:\'界诸葛亮丨八\'"><div class="order-body No8" id="8"></div></div></div><div><div class="orderContainer"><div class="knownCards" id="knownCards"></div></div><div class="orderContainer"><div class="order-body paiduiCards" id="paiduiCards"></div></div><div class="orderContainer"><div class="knownCards quanBianYanXi" id="quanBian"></div><div class="knownCards quanBianYanXi" id="yanXi"></div></div></div></div><div class="width"></div><div class="cardDetail" id="cardDetail"><div class="space"></div><div class="detail"><div class="detail-body"><div class="suit r" id="heart">♥红桃 × 0</div><div class="suit" id="spade">♠黑桃 × 0</div><div class="suit" id="club">♣梅花 × 0</div><div class="suit r" id="diamond">♦方片 × 0</div><div class="suit r" id="hongsha">红杀 × 0</div><div class="suit" id="heisha" n>黑杀 × 0</div><div class="sha" id="sha">剩余出杀次数:指记入次数的杀</div><span>乱击/权变</span><div class="suitRec" id="suit"></div><br><span>博图</span><div class="suitRec" id="boTu"></div><br><span>上一张使用的牌</span><br><button class="shoupai R" id="lastUseCard">^^<br>•ω•</button><br><br><br><div id="guhuo" style="display:none">蛊惑牌</div><div class="function jizhan" id="jizhan">吉占点数</div><div class="function jizhan" id="jinzhi"></div><div class="function yanjiao" id="yanjiao">严教小抄</div><button class="function mizhuBTN" id="mizhu">糜竺小抄</button> <button class="function mizhu mySeatID" id="mySeatID1">座位:1</button> <button class="function mizhu mySeatID" id="mySeatID2">座位:2</button><div class="function res" id="result">结果样式:1 1 1 1 = 4</div></div></div><div class="width"></div><div class="type"><div class="cardTypeContainer"><div class="type-body type1" id="type1"><button class="cardType" id="test1">小抄</button> <button class="cardType">开发</button> <button class="cardType">小伙伴</button></div></div><div class="cardTypeContainer"><div class="type-body type2" id="type2"><button class="cardType">霜迟</button> <button class="cardType">孤独尊</button> <button class="cardType">无所谓</button> <button class="cardType">埃城</button> <button class="cardType">辉弥</button> <button class="cardType">天野</button> <button class="cardType">人富</button></div></div><div class="cardTypeContainer"><div class="type-body type3" id="type3"></div></div><div class="orderContainer"><div class="knownCards cardTypeDetail" id="cardTypeDetail"></div></div></div></div><div class="width"></div><div class="width"></div><div class="laya" id="laya"><div class="space"></div><button class="panel-header laya-header"><span class="triangle"></span> <b>快捷操作</b></button><div class="panel-content" id="layaDiv"><div class="switch-container"><div><span class="explanation">酒馆挂机<span class="question-mark" data-tooltip="AI接管挂机刷酒馆30亲密度&#10;自动创建演武房间开始对战&#10;建议点将张辽禁将只留标风&#10;禁用其它SP武将可提高胜率&#10;到身份演武房间列表后开启&#10;打开开关即可助力脚本作者&#10;领取限时至十月九日的体验&#10;界小抄用户可以无限制使用&#10;开关数字表示酒馆剩余时间">?</span></span><br><label class="switch"><input id="autoBotSwitch" type="checkbox"> <span class="slider"></span> <span class="status" id="autoBotStatus"></span></label></div><div><span class="explanation" id="autoExplanation"></span></div></div><div class="switch-container"><div><span class="explanation">加入互助<span class="question-mark" data-tooltip="点击加入小抄互相助力小组&#10;每天自动助力三位小抄玩家&#10;同时收到三位小抄玩家助力&#10;默认为小抄给当前玩家助力&#10;右侧可输入想要助力的玩家&#10;“再”打开《加入互助》开关&#10;该玩家可收到三个小抄助力&#10;">?</span></span><br><label class="switch"><input id="autoInviteSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><textarea class="invite-body" type="text" id="inviteName" required maxlength="10" size="10" placeholder="大西瓜"></textarea></div></div><button class="calRes" id="guanxing">自助观星</button> <button class="calRes" id="mail" disabled="disabled">一键领取邮箱物品</button> <button class="calRes" id="task" disabled="disabled">一键领取所有任务奖励</button></div></div><div class="store" id="store"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>集市</b></button><div class="panel-content" id="storeDetail"><button class="storeDetail">集市霸王·壹300</button> <button class="storeDetail">集市霸王·贰200</button> <button class="storeDetail">集市霸王·叁100</button> <button class="storeDetail">会员商店·肆1100</button> <button class="storeDetail">稳定承载1100</button> <button class="storeDetail">极奢1100</button></div></div><div class="secKill" id="secKill"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>秒杀(悬浮查看详情)</b></button><div class="panel-content" id="secKillDetail"><div class="left"><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem1Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem2Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br><div><label class="switch" title="秒杀连点器,界小抄可用,不保证成功率"><input id="secKillItem3Switch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><br></div><div class="right"><span class="secKillDetailText">暂无数据</span> <span class="secKillDetailText">暂无数据</span> <span class="secKillDetailText">暂无数据</span></div></div></div><div class="chat" id="chat"><div class="space"></div><button class="panel-header"><span class="triangle"></span> <b>聊天(点击自动输入)</b></button><div class="panel-content chat-body"></div></div><div class="CDK"><button class="panel-header"><span class="triangle"></span> <b>兑换码(点击即兑换)</b></button><div class="panel-content"><div class="function res" id="CDK"><button class="calRes">小麦好帅</button></div></div></div><div class="lottery"><button class="panel-header"><span class="triangle"></span> <b>祈愿台</b></button><div class="panel-content"><div id="lottery"><a href="https://goka.top:8080/choujiang?username=" target="_blank" id="choujiang">点击查看祈愿台数据</a></div></div></div><div class="tianguo"><button class="panel-header"><span class="triangle"></span> <b>乐天过统计</b></button><div class="panel-content" id="PlayerTianGuo">你的天过次数/总次数</div></div><button class="panel-header"><span class="triangle"></span> <b>设置</b></button><div class="setting panel-content"><div class="switch-container"><div><span class="explanation">皮肤体验<span class="question-mark" data-tooltip="该功能仅限于体验皮肤&#10;喜欢还请购买支持画师&#10;此功能随时失效!!!">?</span></span><br><label class="switch"><input id="skinSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div id="skinStateButton" style="display:none"><span class="explanation">动态皮肤</span><br><label class="switch"><input id="skinStateSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">屏蔽动态<span class="question-mark" data-tooltip="屏蔽其他人的动态皮肤&#10;电脑卡顿的话可以打开">?</span></span><br><label class="switch"><input id="skinStateBlockSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div style="display:none"><span class="explanation">金色卡背</span><br><label class="switch"><input id="cardBackSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">明牌框框</span><br><label class="switch"><input id="seatUISwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">五阶特效</span><br><label class="switch"><input id="generalSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">自动签到</span><br><label class="switch"><input id="autoSignSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">跳体验卡<span class="question-mark" data-tooltip="签到会有体验武将&#10;如领取会污染将池&#10;开启按钮跳过领取&#10;月底记得手动领取">?</span></span><br><label class="switch"><input id="autoSignSkipSwitch" type="checkbox"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">领武将包<span class="question-mark" data-tooltip="每天登录,自动领取免费的武将包">?</span></span><br><label class="switch"><input id="autoWuJiangSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">工会三敲<span class="question-mark" data-tooltip="每天自动工会三敲&#10;无惧工会长的诫厉">?</span></span><br><label class="switch"><input id="autoDrumSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div></div><div class="switch-container"><div><span class="explanation">月卡奖励<span class="question-mark" data-tooltip="自动领取月卡奖励">?</span></span><br><label class="switch"><input id="autoYueKaSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div><div><span class="explanation">自动砍树<span class="question-mark" data-tooltip="每天登录自动砍树">?</span></span><br><label class="switch"><input id="autoKanShuSwitch" type="checkbox" disabled="disabled"> <span class="slider"></span> <span class="status"></span></label></div></div></div><div class="width"></div><div class="ACContainer"><textarea class="AC-body" type="text" id="AC" name="AC" required maxlength="10" size="10" placeholder="点击添加界小抄激活码&#13;&#10;当前激活码未激活"></textarea> <button class="AC-head" type="submit" id="ACSubmit">激活</button></div><a href="https://afdian.com/@yimadaO_o" target="_blank">开发不易 如您喜欢 不妨支持我</a><div class="width"></div><a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=cKPpLOOYkYcmay553CQWorRDL_8k1k9I&authKey=HrTX0FsXhf4f1H5BCJqTqAUJ7YzgVwhi2TEvvVqMpv1Hhsfrm9AtKlJ7Znfnr%2FK5&noverify=0&group_code=830137048" target="_blank">加群一起玩</a><div class="width"></div><a href="https://support.qq.com/products/664780/" target="_blank">提需求</a><div class="width"></div><a href="https://greasyfork.org/zh-CN/scripts/448004-%E4%B8%89%E5%9B%BD%E6%9D%80%E6%89%93%E5%B0%8F%E6%8A%84/versions" target="_blank">查看历史更新</a><div class="width"></div><div class="uuid id" id="uuid">id:</div><div class="uuid nickName" id="nickName">昵称:</div><div class="width"></div><div class="width"></div></div><script>document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".panel-header").forEach(e=>{e.addEventListener("click",function(){var e=this.nextElementSibling;this.classList.toggle("active"),e.style.maxHeight?e.style.maxHeight=null:e.style.maxHeight=e.scrollHeight+"px"})}),document.querySelectorAll(".laya-header")[0].click(),document.querySelectorAll(".question-mark").forEach(function(n){n.addEventListener("mouseenter",function(e){let t=document.createElement("div");t.classList.add("tooltip","top"),t.textContent=n.getAttribute("data-tooltip"),document.body.appendChild(t);var l=n.getBoundingClientRect();t.style.left="-30px",t.style.top=l.top+window.scrollY-t.offsetHeight-8+"px",t.classList.add("visible"),n.addEventListener("mouseleave",function(){t.classList.remove("visible"),setTimeout(()=>{t.remove()},100)})})})})<\/script></body>';const Be='<head>    <meta charset="UTF-8">    <style type="text/css">        ::-webkit-scrollbar {            width: 5px;            height: 12px;        }        ::-webkit-scrollbar-track {            border: 1px solid rgb(5, 5, 5);        }        ::-webkit-scrollbar-thumb {            background: rgb(95, 86, 63);        }        ::-webkit-scrollbar-thumb:hover {            background: rgb(44, 44, 44);        }        .container {            display: flex; /* Enables flexbox layout */            flex-wrap: wrap; /* Allows items to wrap to the next line */            /*gap: 20px; !* Optional: space between items *!*/            padding: 0;        }        .skinList {            /*width: 110px; !* Set a fixed width for images *!*/            height: auto; /* Maintain aspect ratio */            user-select: none;        }        .skinContainer {            /*width: 100px; !* Set a fixed width for images *!*/            padding: 10px;            position: relative;            display: inline-block;            height: auto; /* Maintain aspect ratio */            border: 2px solid transparent; /* Default: no border */            transition: border-color 0.3s ease; /* Smooth transition */        }        .overlay-text {            position: relative;            display: block;            text-align: center; /* Center the text horizontally */            /*background: rgba(0, 0, 0, 0.5); !* Optional: background color for better readability *!*/            color: #f2de9c; /* Text color */            /*padding: 5px; !* Padding around the text *!*/            font-size: 13px;            /*border-radius: 4px; !* Optional: rounded corners *!*/        }        .skinContainer:hover {            border-color: #f2de9c; /* Change the border color on hover */        }    </style></head><body><div class="container" id="container0">    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="102" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="103" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="104" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    \x3c!-- Add more divs with images as needed --\x3e</div><br><br><div class="container" id="container1">    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="102" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="103" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    <div class="skinContainer">        <span class="overlay-text">史诗</span>        <img class="skinList" id="104" src="https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/11211.png">    </div>    \x3c!-- Add more divs with images as needed --\x3e</div></body></html>';async function _e(e=!1){let t=await U.now(),n=Je.getElementById("autoBotSwitch"),i=R.trialTime-5184e5,a=new Date(R.trialTime+288e5).toISOString().slice(0,10);const s={25242:new Date(t+5184e5).getTime(),32805:new Date("2077-1-1").getTime()};n.disabled=!1,R.v?(e&&f("酒馆挂机可用"),Je.getElementById("autoExplanation").innerHTML="界小抄会员<br>无限制使用"):t<=s[R.guildID]?(e&&f(R.guildName+"公会酒馆挂机包月"),Je.getElementById("autoExplanation").innerHTML=`公会包月至<br>${new Date(s[R.guildID]).toLocaleDateString()}`):t<=17284896e5?(e&&f("酒馆挂机可限时体验"),n.addEventListener("change",(()=>{j();}),{once:!0}),Je.getElementById("autoExplanation").innerHTML="10月9日前<br>限时免费用"):t<=i?(e&&f("酒馆挂机今日可用"),Je.getElementById("autoExplanation").innerHTML="本周已体验<br>今日可使用"):t>=R.trialTime?(e&&f("酒馆挂机可体验"),Je.getElementById("autoExplanation").innerHTML="本周可体验一天<br>",n.addEventListener("change",Pe)):(n.disabled=!0,n.onclick="",n.checked&&n.click(),R.autoBotSwitch=!1,Je.getElementById("autoExplanation").innerHTML=`${a}<br>后可再次体验`),n.disabled||(n.onclick=function(){_e(),R.autoBotSwitch=this.checked,x.auto(this.checked),this.checked?x.newRoom():f("酒馆挂机已关闭");});}var Le="jsjiami.com.v7";const je=Ne;var Re,Ge,Me,We;function Ne(e,t){const n=ze();return Ne=function(t,i){let a=n[t-=300];if(void 0===Ne.QHqyaU){const t=function(e,t){let n,i,a=[],s=0,l="";for(e=function(e){let t="",n="";for(let i,a,s=0,l=0;a=e.charAt(l++);~a&&(i=s%4?64*i+a:a,s++%4)?t+=String.fromCharCode(255&i>>(-2*s&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let i=0,a=t.length;i<a;i++)n+="%"+("00"+t.charCodeAt(i).toString(16)).slice(-2);return decodeURIComponent(n)}(e),i=0;i<256;i++)a[i]=i;for(i=0;i<256;i++)s=(s+a[i]+t.charCodeAt(i%t.length))%256,n=a[i],a[i]=a[s],a[s]=n;i=0,s=0;for(let o=0;o<e.length;o++)i=(i+1)%256,s=(s+a[i])%256,n=a[i],a[i]=a[s],a[s]=n,l+=String.fromCharCode(e.charCodeAt(o)^a[(a[i]+a[s])%256]);return l};Ne.MivbMQ=t,e=arguments,Ne.QHqyaU=!0;}const s=t+n[0],l=e[s];return l?a=l:(void 0===Ne.ysQIdX&&(Ne.ysQIdX=!0),a=Ne.MivbMQ(a,i),e[s]=a),a},Ne(e,t)}function Oe(e){const t=je,n={RWVbm:function(e,t){return e<t}};let i="";const a=new Uint8Array(e),s=a.byteLength;for(let l=0;n[t(314,"C9f5")](l,s);l++)i+=String[t(305,"@7k9")](a[l]);return window[t(310,"QFyA")](i)}function Ue(e){return (new TextEncoder).encode(e)}function ze(){const e=[Le,"XuJjOJsbjMWidamugidP.wHcERobmx.unbvge7Cw==","WRpdISokAgfytLJdKmo6W6ddLfi","taymWP/cJHzeabxcNSkFW7m7","W7pcRCkIbsq","WRejWQ7cQSo+","aCkBhMVcGCoT","kW18W69cWQnJ","tGCoWP/cJbrmhrtcNSkZW5GD","Emk4e8kiW4m5jN/cGCkpeZy","WOddLSoUjgyXW4W","bCkVW6pdOsZcLa","au1W"].concat(["W7JdV8k0cf5Wna","uSkdde8","dZLoFCohW7j4hgn0WQDHiG","WQeoW682wL19","aSofwHFdKSoEcCoxtmkJW4T1fW","W6ZdJ8oWjX4","f0LKWR3cVCo6","W5hcGNhdOSo0qxO","dSkKWRxcKW","W7GZW4j4ja","WRBcLwJdI8o6oa","WRdcQrX0ggVdJtqoW6/cQfqg","W5ldU3SbWO3dG8kZa8oxWQThbG"].concat(["WQ8CWQJcUConWPryW4y5lCoUzmkCWQ8","y8kgy8osnG","W6vFWR5uWOLZlCojWQTsBcJcHq","WPvlB8olW4tdVmo2","A3dcKfVcTSk1","xfhcSqZdUW","yCkkqb8S","W7BcUGLLoSol","f0LKWQdcOmoVbW","W7BdHSoVzgK5W7i","yCkGW6isiqJcJ8kRWPKxW6WhoCk/"]));return (ze=function(){return e})()}async function He(e,t,n,i,a){const s={username:R.userID,itemId:t,secId:e,times:n,level:i,itemNum:a};fetch("https://goka.top:8080/recLottery",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).catch((e=>console.error("Error:",e)));}async function Pe(e){if(!this.checked)return;this.removeEventListener("change",Pe);const t={username:R.userID};try{const e=await fetch("https://goka.top:8080/trial",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),n=await e.json();return R.trialTime=parseInt(n.message),console.warn(R.trialTime),_e(!0),n}catch(n){return console.error("Error:",n),[]}}async function qe(e=R.nickname){try{const t=await fetch(`https://goka.top:8080/support?username=${e}&userid=${R.userID}`,{method:"POST",headers:{"Content-Type":"application/json"}});if(204===t.status||"0"===t.headers.get("Content-Length"))return void console.warn("今日已3助力");if(t.ok){const e=await t.json();for(let t of e){let e=0;for(;;){let n=j(t);if(await w(1e3),!n)break;if(e++,e>3)break}}}}catch(t){console.error("Error:",t);}}Re=207,Me="hs",We="hs",function(e,t,n,i,a){const s=Ne;We+=a="up",Me=n(Me=(i="tfi")+Me),We=n(We),n=0;const l=e();for(;--Re+t;)try{i=parseInt(s(304,"[Ri2"))/1+-parseInt(s(334,"[Ri2"))/2+-parseInt(s(321,"3C3j"))/3+-parseInt(s(311,"BqL2"))/4*(parseInt(s(312,"Mmz1"))/5)+-parseInt(s(324,"yjj5"))/6+-parseInt(s(331,"*0ql"))/7*(-parseInt(s(332,"0*P5"))/8)+parseInt(s(320,"weZw"))/9;}catch(o){i=n;}finally{if(a=l[Me](),205<=Re)n?Ge?i=a:Ge=a:n=a;else if(n==Ge.replace(/[bXMuEPxJWdgOHRnwCe=]/g,"")){if(i===t){l["un"+Me](a);break}l[We](a);}}}(ze,970621,(function(e,t,n,i,a,s,l){return (e=(e=(e=arguments[0])[t="split"](""))[n="reverse"]("v"))[i="join"]("")})),ze&&(Le=je(322,"n%]Y"));let $e=null;const Ke=" 2.9.16";var Je=null==(n=null==(t=document.getElementById("iframe-source"))?void 0:t.contentWindow)?void 0:n.document,Fe=null==(a=null==(i=document.getElementById("createSkinIframeSource"))?void 0:i.contentWindow)?void 0:a.document;function Qe(){window.innerWidth=document.documentElement.clientWidth-window.padding;}function Ve(){window.dispatchEvent(new Event("resize"));}let Ze;function Ye(){Ze&&clearTimeout(Ze),Ze=setTimeout((()=>{et(),Ze=null;}),500);}async function Xe(e=!1){var t,n,i,a,s,l,o;if(e&&(null==(t=document.getElementById("injectCSS"))||t.remove(),null==(n=document.getElementById("seatUI"))||n.remove(),null==(i=document.getElementById("rogueUI"))||i.remove(),null==(a=document.getElementById("cusBGDiv"))||a.remove(),null==(s=document.getElementById("createIframe"))||s.remove(),null==(l=document.getElementById("createSkinIframe"))||l.remove(),R.isFrameAdd=!1),!R.isFrameAdd){window.addEventListener("resize",Ye),SystemContext._gameScreenType=SystemContext.gameScreenType,SystemContext._gameScale=SystemContext.gameScale,Object.defineProperty(SystemContext,"gameScreenType",{get:function(){return this._gameScreenType},set:function(e){this._gameScreenType!==e&&(this._gameScreenType=e,window.dispatchEvent(new Event("SGSresize")));}}),Object.defineProperty(SystemContext,"gameScale",{get:function(){return this._gameScale},set:function(e){this._gameScale!==e&&(this._gameScale=e,window.dispatchEvent(new Event("SGSresize")));}}),window.addEventListener("SGSresize",Ve);try{document.getElementById("bgDiv").firstElementChild.draggable=!1,null==(o=document.querySelector("link[rel=stylesheet]"))||o.remove();}catch{}return function(){const e=new Image;let t="https://web.sanguosha.com/220/h5_2/res/assets/bigPng/propGet.png";e.src=t,e.onload=function(){const e=document.createElement("style");e.id="injectCSS",e.textContent=`\n    :root {\n          --my-background-image: url('${t}');\n    }\n    .orderContainer {\n        font-size: 13px; /* 默认字体大小,可以根据需要调整 */\n        width: 100%;\n        display: flex; /* 使用Flexbox布局 */\n        align-items: center; /* 垂直居中对齐子元素 */\n        width: 146px;\n        z-index: 10000000000;\n        // color: #f2de9c;\n      user-select: none;\n      text-align: left;\n      transition: height 200ms;\n      position: fixed;\n      transformOrigin = 0 0\n    }\n  \n    .order-head {\n        display: flex; /* 使用Flexbox */\n        align-items: center; /* 垂直居中 */\n        justify-content: center; /* 水平居中 */\n        font-weight: bolder;\n        width: 10%;\n        height: 25px;\n        text-align: center;\n        color: #f2de9c;\n        margin-left: 3px;\n    }\n  \n    .order-body:empty {\n        // display: none; \n    }\n  \n    .order-body {\n        height: auto;\n        width: 100%;\n        float: right;\n        display: block;\n        flex: 1; /* Adjust to fill available space */\n    }\n  \n    .markedCard {\n      display: inline-flex;\n      align-items: center;\n      border-radius: 5px;\n      border: 1px solid black;\n      width: auto;\n      background-color: rgb(55, 40, 32);\n    }\n    .mark {\n      color: white;\n      writing-mode: vertical-rl;\n      /*transform: rotate(180deg); !* 让文字正常方向显示 *!*/\n      margin-right: 0px; /* 按需调整间距 */\n    }\n    .markedCard>.mark:only-child {\n      display: none;\n    }\n    .shoupai {\n      color: black;\n      --shoupai-width: 32px;\n      padding: 0;\n      font-weight: bolder;\n      margin-right: calc(32px - var(--shoupai-width));\n      float: left;\n      width: var(--shoupai-width);\n      min-width: var(--shoupai-width);\n      min-height: 38px;\n      border: 1px solid black;\n      text-align: center;\n      background: rgba(210, 200, 160, 0.6);\n      border-radius: 5px;\n      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", Tahoma, Arial, sans-serif;\n      white-space: nowrap; /* 防止文本换行 */\n      text-shadow:\n          1px 0 0 rgba(255, 255, 255, 0.7),\n          0 1px 0 rgba(255, 255, 255, 0.7),\n          -1px 0 0 rgba(255, 255, 255, 0.7),\n          0 -1px 0 rgba(255, 255, 255, 0.7);\n      font-size: 13px;\n      }\n      .shoupai.R {\n          color: red;\n      }\n      .shoupai.G {\n          background: grey;\n          border: 0px solid black;\n      }\n      .shoupai.G .shoupai {\n          background: #888;\n          pointer-events:none;\n      } \n      .order-body:not(#paiduiCards) .shoupai:disabled { \n          display: none;\n      } \n      .order-body:not(#paiduiCards) .shoupai.G {\n          width: auto;\n      } \n      \n      @keyframes fadeInLeftToRight {\n        0% {\n          clip-path: inset(0 100% 0 0);\n          opacity: 0;\n        }\n        100% {\n          clip-path: inset(0 0 0 0);\n          opacity: 1;\n        }\n      }\n      \n      @keyframes fadeOutRightToLeft {\n        0% {\n          clip-path: inset(0 0 0 0);\n          opacity: 1;\n        }\n        100% {\n          clip-path: inset(0 100% 0 0);\n          opacity: 0;\n        }\n      }\n  \n      .ac-tooltip {\n        position: fixed;\n        top: 100px;\n        left: 50%;\n        background-color: transparent;\n        background-image: var(--my-background-image);\n        cursor: pointer;\n        background-size: 100% 100%;\n        color: #F44336;\n        font-size: 16px;\n        border-radius: 4px;\n        z-index: 9999;\n        overflow: hidden;\n        white-space: nowrap;\n        padding: 16px 32px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        opacity: 0;\n        visibility: hidden;\n        transform: translateX(0);\n        transition: opacity 1s ease-in-out, visibility 1s ease-in-out; \n      }\n      .ac-tooltip.green {\n        background-color: transparent;\n        color: #f2de9c;\n      }\n      .city{\n        visibility: hidden;\n        transition: opacity 1s ease-in-out, visibility 1s ease-in-out; \n        background-color: rgba(55, 52, 39, 0.7);\n        color: #f2de9c;\n        align-items: center;\n        justify-content: center;\n        border-radius: 5px;\n        text-align: center;\n        flex-direction: column; /* 使flex布局垂直排列 */\n        padding: 5px\n      }\n      hr {\n        width: 100%;\n        margin: 0\n      }\n  \n      @keyframes blink {\n          50% {\n              border-color: #f2de9c;\n          }\n      }\n      .centerUI {\n        width: 18px;\n        height: 18px;\n        background-color: #4e251f;\n        border-radius: 4px;\n        display: flex;\n        border: 1px solid rgb(110 107 91);\n        justify-content: center;\n        align-items: center;\n        cursor: pointer;\n        box-shadow: 0 2px 4px rgba(0,0,0,0.3);\n        visibility: hidden;\n    }\n    \n    .centerUI::after {\n      content: "!";\n      font-family: Arial, sans-serif;\n      font-size: 15px;\n      color: #ffffff;\n      font-weight: bold;\n    }\n    .centerUI:hover {\n        background-color: rgb(134 74 58);\n    }\n    .show {\n        animation: fadeInLeftToRight 1s forwards, blink 2s infinite;\n        visibility: visible;\n      }\n  .hide {\n    animation: fadeOutRightToLeft 1s forwards;\n    visibility: hidden;\n  }\n .window {\n    width: 600px;\n    height: 400px;\n    border: 2px solid #333;\n    border-radius: 8px;\n    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);\n    position: relative;\n    background-color: #f5f5f5;\n    overflow: hidden;\n  }\n\n  .window-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    background-color: #23201d;\n    color: white;\n    padding: 5px;\n    cursor: move;\n  }\n\n  .window-header .title {\n    font-weight: bold;\n    padding-left: 10px;\n  }\n\n  .window-header .controls {\n    display: flex;\n    gap: 5px;\n  }\n\n  .window-header .controls button {\n    background: transparent;\n    border: none;\n    color: white;\n    cursor: pointer;\n    padding: 5px;\n  }\n\n  .window-header .controls button:hover {\n    background-color: rgba(255, 255, 255, 0.2);\n  }\n\n  .window-content {\n    width: 100%;\n    height: calc(100% - 40px);\n    border: none;\n  }\n\n  .fullscreen {\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 100vw;\n    height: 100vh;\n    z-index: 1000;\n  }\n  \n  `,document.head.appendChild(e);};}(),function(){var e=document.createElement("div");e.id="seatUI",e.style.position="absolute",e.style.top="50%",e.style.left="50%",e.style.transform="translate(-50%, -50%)",e.style.pointerEvents="none",e.style.display="";var t=document.createElement("div");t.id="rogueUI",t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.pointerEvents="none",t.style.display="",M.seatUISwitch?e.style.display="inline-block":(e.style.display="none",document.querySelectorAll("#seatUI > *:not(.city)").forEach((e=>e.style.display="none")));var n=document.createElement("div");n.id="centerUI",n.className="centerUI",n.style.position="absolute",n.style.pointerEvents="auto",n.onmouseover=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("hide"),e.classList.add("show");}));},n.onmouseout=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("show"),e.classList.add("hide");}));},t.appendChild(n),document.body.appendChild(e),document.body.appendChild(t);}(),function(){var e=document.getElementById("bgDiv");if(e){var t=document.createElement("div");t.id="cusBGDiv",t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",t.style.zIndex="0",t.style.pointerEvents="none";var n=document.createElement("video");n.className="bg-ani",n.id="sgsBgVideo",n.autoplay=!0,n.loop=!0,n.muted=!0,n.preload="auto",n.style.setProperty("object-fit","fill","important");var i=document.createElement("img");i.className="bg-ani",i.id="sgsBgIMG",i.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",i.style.zIndex="1",i.style.position="absolute",i.style.top="0",i.style.left="0",t.appendChild(n),t.appendChild(i),e.appendChild(t),window.dispatchEvent(new Event("resize"));}}(),function(){let e=document.getElementById("createIframe");if(!e){e=document.createElement("div"),e.id="createIframe",e.className="createIframe",e.style="position: fixed;overflow: hidden;resize: vertical;  top: 31px; right: 155px;width: 230px;height: 500px;z-index: 10000000000;display: flex;flex-direction: column;color: #f2de9c;background: rgb(35, 32, 29);user-select: none;text-align: left;transition: height 200ms;border-radius: 8px;",e.style.transformOrigin="top left";var t=document.createElement("p");t.id="header",t.className="header",t.style="display: inline-block;margin: 1px;user-select: none;cursor: move;display: flex;font-size: 20px;border-radius: 5px;";var n=document.createElement("span");n.id="title",n.innerText="三国杀打小抄"+Ke,e.appendChild(t),e.onmouseover=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("hide"),e.classList.add("show");}));},e.onmouseout=function(){document.querySelectorAll("div.city").forEach((e=>{e.classList.remove("show"),e.classList.add("hide");}));};var i=document.createElement("btn");i.innerText="-",i.id="toggle-me",i.style="text-align: center;color: #f2de9c;background: rgb(35, 32, 29);border-radius: 5px;width: 26px;height: 26px;border: 1px solid rgb(212, 212, 162);cursor: pointer;user-select: none;background: rgb(107, 30, 30);display: flex;align-items: center;justify-content: center;margin: 0;",i.addEventListener("mouseover",(function(){i.style.backgroundColor="rgb(130, 30, 30)";})),i.addEventListener("mouseout",(function(){i.style.backgroundColor="rgb(107, 30, 30)";}));var a=document.createElement("button");a.id="toTab",a.style="display: none;",t.appendChild(i),t.appendChild(n),localStorage.getItem("DXCVersion")!=Ke&&(m(`小抄已经更新到${Ke}<br>\n                        夺宝界面增加单抽10次选项<br>\n                        调整全选UI`,"acTooltip",1e4,"green"),localStorage.setItem("DXCVersion",Ke)),document.body.appendChild(e),$e=document.createElement("iframe"),$e.style="border: none;width: 230px;height: 100%;margin: 0px;cursor: move;",$e.id="iframe-source",$e.title="iframe",e.append($e),(Je=$e.contentWindow.document).open(),Je.write(Ae),Je.close();}((function(){function e(e,t,n){var i=e.target,a=i.checked;n=i.id,M[n]=a,"skinSwitch"==n&&1==a?Je.getElementById("skinStateButton").style.display="inline-block":"skinSwitch"==n&&0==a&&(Je.getElementById("skinStateButton").style.display="none"),"seatUISwitch"==n&&1==a?document.getElementById("seatUI").style.display="inline-block":"seatUISwitch"==n&&0==a&&(document.getElementById("seatUI").style.display="none");}if((t=document.getElementById("toggle-me")).onclick=function(){R.closeIframe=!R.closeIframe,R.closeIframe?(document.getElementById("iframe-source").style.display="none",t.innerText="+",document.getElementById("createIframe").style.height="30px",document.getElementById("createIframe").style.opacity="0.6",document.getElementById("createIframe").style.width="75px",document.getElementById("title").innerText="小抄",document.getElementById("createIframe").style.resize="none"):(document.getElementById("iframe-source").style.display="block",t.innerText="-",document.getElementById("createIframe").style.height="500px",document.getElementById("createIframe").style.opacity="1",document.getElementById("createIframe").style.width="230px",document.getElementById("title").innerText="三国杀打小抄"+Ke,document.getElementById("createIframe").style.resize="vertical");},Je.getElementById("autoInviteSwitch").addEventListener("change",(e=>{var t;if(e.target.checked){var n=null==(t=Je.getElementById("inviteName"))?void 0:t.value;"string"==typeof n&&0!==n.length&&(R.inviteName=n,d("INVITE_NAME",R.inviteName),f(`为目前机器所有账号绑定助力${R.inviteName},如需更改/删除,更改/删除昵称重新打开开关`)),qe(R.inviteName.trim()||R.nickname);}else c("INVITE_NAME");})),Je.getElementById("guanxing").onmousedown=function(){let e=document.getElementById("myWindow");if(e)return void(e.style.display="block");const t=document.createElement("div");t.classList.add("window"),t.id="myWindow";const n=document.createElement("div");n.classList.add("window-header");const i=document.createElement("div");i.classList.add("title"),i.innerText="天星之变 窥探一二";const a=document.createElement("div");a.classList.add("controls");const s=document.createElement("button");s.innerText="⬜";const l=document.createElement("button");l.innerText="❌",a.appendChild(s),a.appendChild(l),n.appendChild(i),n.appendChild(a);const o=document.createElement("iframe");o.classList.add("window-content"),o.srcdoc=`\n    <html>\n      <head><meta charset="utf-8" /><title>观星</title></head>\n      <body>${u(N.gxjson)}</body>\n    </html>\n  `,t.appendChild(n),t.appendChild(o),document.body.appendChild(t);let r=!1;s.addEventListener("click",(()=>{r?t.classList.remove("fullscreen"):t.classList.add("fullscreen"),r=!r;})),l.addEventListener("click",(()=>{t.style.display="none";}));},Je.getElementById("mizhu").onmousedown=function(){let e=Je.querySelectorAll(".mizhu");H.mySeats.length<=1?(e.forEach((e=>e.style.display="none")),ae(Array.from(J.shoupai(H.mySeats[0]),(e=>Q[e].number)))):H.mySeats.forEach(((t,n)=>{e[n].style.display="block",e[n].innerText=H.name(t),e[n].onclick=()=>{ae(Array.from(J.shoupai(t),(e=>Q[e].number)));},0==n&&e[n].click();}));},0==window.padding){console.warn("closesidebar");var t=document.getElementById("toggle-me");console.warn("toggle"),t.click();}window.dispatchEvent(new Event("resize")),Je.querySelectorAll(".switch").forEach((t=>t.addEventListener("change",e)));}))(),function(){for(var e=0,t=0,n=0,i=0,a=document.getElementsByClassName("createIframe"),s=null,l=100,o=0;o<a.length;o++){var r=a[o],d=(c=void 0,1===(c=r.getElementsByClassName("header")).length?c[0]:null);r.onmousedown=function(){this.style.zIndex=""+ ++l;},d&&(d.parentPopup=r,d.onmousedown=u);}var c;function u(e){(s=this.parentPopup).style.zIndex=""+ ++l,e=e||window.event,n=e.clientX,i=e.clientY,document.onmouseup=p,document.onmousemove=h;}function h(a){s&&(a=a||window.event,e=n-a.clientX,t=i-a.clientY,n=a.clientX,i=a.clientY,window.innerWidth-a.clientX<50&&"createIframe"==s.id?M.padding||(R.closeIframe&&document.getElementById("toggle-me").click(),M.padding=232,window.dispatchEvent(new Event("resize")),s.style.top="0px",s.style.right="`0px",s.style.left="",document.onmouseup()):(et(),M.padding&&(M.padding=0),s.style.top=s.offsetTop-t+"px",s.style.left=s.offsetLeft-e+"px",R.closeIframe||(s.style.height="500px"),window.dispatchEvent(new Event("resize"))));}function p(){document.onmouseup=null,document.onmousemove=null;}}(),function(){for(let e=11;e<=60;e++){const t=`https://web.sanguosha.com/220/h5_2/res/runtime/pc/Face/${e}.png`,n=document.createElement("img");n.src=t,n.classList.add("face"),n.onmousedown=()=>Y(`#${e}`,!1),Je.getElementsByClassName("chat-body")[0].appendChild(n);}}(),Je.getElementById("inviteName").value=R.inviteName=r("INVITE_NAME","");}(),function(){let e=document.getElementById("createSkinIframe");if(!e){e=document.createElement("div"),e.id="createSkinIframe",e.className="createSkinIframe",e.style="    display: inline-block;    z-index: 10000000000;    display: none;    width: 710px;    height:500px;    position: fixed;    top: 0;    bottom: 0;    left: 0;    right: 17%;    background: rgb(35,32,29);    margin: auto;";var t=document.createElement("p");t.id="header",t.className="header",t.innerText="请选择要替换的皮肤",t.style="style:display:inline-block;margin:1px;user-select:none;text-align:center;color: #f2de9c; cursor: pointer",(n=document.createElement("btn")).innerText="×",n.id="btnSkin",n.style="text-align:center;color: #f2de9c;background: rgb(40,40,40);border-radius:5px;margin-left:3px;border: 1px solid rgb(212,212,162);cursor: pointer;user-select:none;background: rgb(107,30,30);",t.append(n),e.appendChild(t),document.body.appendChild(e),$e=document.createElement("iframe"),$e.style="border: none;    width: 710px;    height:475px;margin: 0px;cursor: move;",$e.id="createSkinIframeSource",$e.title="iframe",e.append($e),(Fe=$e.contentWindow.document).open(),Fe.write(Be),Fe.close();}var n;(n=document.getElementById("btnSkin")).onmousedown=function(){document.getElementById("createSkinIframe").style.display="none";};}(),R.isFrameAdd=!0,Je.getElementById("skinSwitch").checked=M.skinSwitch,Je.getElementById("generalSwitch").checked=M.generalSwitch,Je.getElementById("skinStateSwitch").checked=M.skinStateSwitch,Je.getElementById("skinStateBlockSwitch").checked=M.skinStateBlockSwitch,Je.getElementById("cardBackSwitch").checked=M.cardBackSwitch,Je.getElementById("seatUISwitch").checked=M.seatUISwitch,Je.getElementById("autoSignSwitch").checked=M.autoSignSwitch,Je.getElementById("autoSignSkipSwitch").checked=M.autoSignSkipSwitch,Je.getElementById("autoInviteSwitch").checked=M.autoInviteSwitch,Je.getElementById("autoDrumSwitch").checked=M.autoDrumSwitch,Je.getElementById("autoWuJiangSwitch").checked=M.autoWuJiangSwitch,Je.getElementById("autoKanShuSwitch").checked=M.autoKanShuSwitch,Je.getElementById("autoYueKaSwitch").checked=M.autoYueKaSwitch,De(!0)}}function et(){if(!SystemContext)return;W.width=SystemContext.gameWidth*SystemContext.gameScale>>0,W.height=SystemContext.gameHeight*SystemContext.gameScale>>0,W.scale=SystemContext.gameScale,W.seatUIs&&W.seatUIs.length>0&&(tt(),te());let e={width:(SystemContext.gameWidth*SystemContext.gameScale>>0)/window.devicePixelRatio,height:(SystemContext.gameHeight*SystemContext.gameScale>>0)/window.devicePixelRatio};M.padding&&document.getElementById("createIframe")?(document.getElementById("bgDiv").style.width=document.documentElement.clientWidth+"px",document.getElementById("createIframe").style.height="100%",document.getElementById("createIframe").style.right="0px",document.getElementById("createIframe").style.top="0px"):document.getElementById("bgDiv").style.width=document.documentElement.clientWidth+"px";let t=document.getElementById("cusBGDiv"),n=document.getElementById("sgsBgVideo"),i=document.getElementById("sgsBgIMG"),a=document.getElementById("seatUI"),s=document.getElementById("rogueUI"),l=document.getElementById("centerUI"),o=((window.innerHeight*window.devicePixelRatio-SystemContext.gameScale*SystemContext.gameHeight)/(2*window.devicePixelRatio)+SystemContext.gameScale*SystemContext.gameHeight/2)/window.devicePixelRatio;t&&(t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=window.innerWidth/2+"px",t.style.top=o+"px"),n.width=e.width,n.height=e.height,n.style.left=window.innerWidth/2+"px",n.style.top=o+"px",i.width=e.width,i.height=e.height,a.style.width=`${e.width}px`,a.style.height=`${e.height}px`,a.style.left=window.innerWidth/2+"px",a.style.top=o+"px",s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.left=window.innerWidth/2+"px",s.style.top=o+"px",W.centerX=window.innerWidth>e.width?e.width/2:window.innerWidth/2,W.centerY=e.height/2,l.style.left=210*SystemContext.gameScale/window.devicePixelRatio+"px",l.style.top=52*SystemContext.gameScale/window.devicePixelRatio+"px",W.cities.length>0&&ne(W.cities);}function tt(){const e={ScaledHeight:W.selfSeatUiUnscaledHeight*W.scale};let t=W.unscaledWidth*W.scale,n=W.unscaledHeight*W.scale;W.ScaleWidth=t,W.ScaleHeight=n;let i=W.height,a=W.width;var s,l,o=e.ScaledHeight,r=W.seatUIs.length;if(1!=r){s=t,l=n;var d,c,u=(d=W.seatUIs).length-1,h=0,p=0;u<3?h=u:3==u?h=1:4==u||6==u?h=2:5!=u&&7!=u||(h=3),p=u-(c=u-h>>1)-h,H.isShanHeTu&&3==r&&1==W.friendGeneral&&(h=1,p=1);var m,f,g=1,y=0,v=0,b=0,w=0,x=W.rightBarWidth*W.scale;if(c>0){var S=s,k=l*c;for(b=.25*(i-o-k)>>0,W.verticalGap=b,k+=(c-1)*b,m=g+c,y=a-S-W.paddingRight*W.scale-x-0,v=(i-o-k-W.paddingTop*W.scale-W.paddingBottom>>1)+(W.paddingTop+10)*W.scale+k+W.leftRightTop;g<m;g+=1)v-=n,(f=d[g]).posX=(y-5>>0)/window.devicePixelRatio,f.posY=(v+n>>0)/window.devicePixelRatio,f.DisplayLocation="Right",v-=b;}if(h>0){var I=s*h;for(w=.07*(a-x-I)>>0,W.horizontalGap=w,m=g+h,y=(a-(I+=(h-1)*w)-x)/2+I+(a<=1600?W.paddingLeftTopExtra:0),v=(W.paddingTop+10)*W.scale;g<m;g+=1)y-=t,(f=d[g]).posX=(y>>0)/window.devicePixelRatio,f.posY=(v+n>>0)/window.devicePixelRatio,f.DisplayLocation="Top",y-=w;}if(p>0){var C=l*p;for(C+=(p-1)*(b=.25*(i-o-C)>>0),m=g+p,y=W.paddingLeft*W.scale,v=(i-o-C-W.paddingTop*W.scale-W.paddingBottom>>1)+(W.paddingTop+10)*W.scale+W.leftRightTop;g<m;g+=1)(f=d[g])&&(f.DisplayLocation="Left",f.posX=(y+0>>0)/window.devicePixelRatio,f.posY=(v+n>>0)/window.devicePixelRatio),v+=l+b;}}}function nt(e){if(W.seatUIs=[],te(),null===e)return;let t=H.sequence(H.mySeats[0]);W.seatUIs=t.map((e=>({actualSeatID:H.getOrder(e)+1}))),tt(),te();}function it(e,t=0){let n=Fe.getElementById("container"+t);n&&n.name!=e&&(n.name=e,n.innerHTML="",e&&(n.append(at(0,e)),Array.from(N.skinMap[e]??[e]).forEach((t=>{if(N.skinDict[t])if(1876941565==R.userID||1145364533==R.userID)for(let i=1;i<=15;i++){const a=t+i.toString().padStart(2,"0"),{name:s="",level:l="",state:o=!1}=N.skinDict[t][a]||{};n.append(at(a,e,`${s}<br>${l} ${o?"动态":"静态"}`));}else Object.entries(N.skinDict[t]).forEach((([t,{name:i,level:a,state:s}])=>{n.append(at(t,e,`${i}<br>${a} ${s?"动态":"静态"}`));}));}))));}function at(e,t,n="原画<br>静态"){var i=document.createElement("div"),a=document.createElement("img"),s=document.createElement("span");return s.className="overlay-text",s.innerHTML=n,i.className="skinContainer",a.id=e,a.className="skinList",a.src=0===e?"https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/generalface_"+t+".png":"https://web.sanguosha.com/220/h5_2/res/runtime/pc/general/seat/static/"+e+".png",a.onerror=function(){this.style.display="none",this.parentNode.style.display="none";},a.onclick=function(e){var n;e.stopPropagation(),R.UsedGeneralSkinID.UsedGeneralSkinID[t]!=this.id&&(R.UsedGeneralSkinID.UsedGeneralSkinID[t]=this.id,d(R.account+"::UsedGeneralSkinID",R.UsedGeneralSkinID)),document.getElementById("createSkinIframe").style.display="none",null==(n=x.find("WindowLayer","ChangeSkinWindow"))||n.Close();},i.appendChild(s),i.appendChild(a),i}function st(e,t){let{name:n,number:i,color:a}=Q[e??0];if(!(void 0===e||e&&n&&void 0!==P.name[n]))return;let s=J.unknown;(e?[n]:Object.keys(P.name)).forEach((e=>{let t=s.filter((t=>P.name[e].has(t))).length,n=Je.getElementById(e);n.textContent=t>1?t+e:e,n.disabled=t<=0;})),(e?[5,6].filter((t=>P.color[t].has(e))).concat(a):[1,2,3,4,5,6]).forEach((e=>{var t;let n=s.filter((t=>P.color[e].has(t))).length,i=Je.getElementById(["","heart","club","spade","diamond","hongsha","heisha"][e]);i.innerHTML=null==(t=i.innerHTML)?void 0:t.replace(/-?[0-9]+/,String(n));})),e?P.query.has(e)&&P[e].plot(0==t?0:1):P.draw();}var lt=[1562902854,1678425373],ot={};function rt(e){var t,n,i,a,s,l,o,d,c,u,h,p,g,k,B,j,G,q,K,F,V,te,ne,ae,re,de;if(!e)return;if(null==(t=e.startsWith)?void 0:t.call(e,"SwitchScene")){let t=x.scene=e.slice(e.lastIndexOf("-")+1);z.end(y.includes(t)),Je.getElementById("task").click(),"TableScene"==t?R.autoBotSwitch&&U.delay("auto",(()=>v((()=>x.readyStart()),20)),8e3):"HallScene"==t?R.autoBotSwitch&&(f("5秒后开始酒馆自动挂机"),U.delay("auto",(()=>v((()=>x.newRoom()),10,1e3)),5e3)):["NewPaiWeiScene","DouDiZhu2023Scene","RogueLike1v1Scene","RogueLikeBigMapScene"].some((t=>e.endsWith(t)))&&R.autoBotSwitch&&(null==(n=document.getElementById("autoBotSwitch"))||n.click());}else if(null==(i=e.endsWith)?void 0:i.call(e,"View"))"TreasureView"==e&&A();else if(null==(a=e.endsWith)?void 0:a.call(e,"Window"))"ChangeSkinWindow"==e?M.skinSwitch&&Fe.getElementsByClassName("skinList").length>0&&(document.getElementById("createSkinIframe").style.display="inline-block"):"SelectSkinWindow"==e?b((()=>x.find("WindowLayer",e))).then((e=>null==e?void 0:e.Close())):"SelectCardWindow"==e?x.flag?S(!0,!0===x.flag):R.v&&S():"WuGuFengDengWindow"==e&&1==x.flag?x.wugu():["SelectGeneralWindow","SelectGeneralHappyWindow"].includes(e)&&1==x.flag&&setTimeout((()=>{b((()=>x.find("WindowLayer",e))).then((e=>{var t;if(!(null==(t=null==e?void 0:e.generalUis)?void 0:t.length))return;let n=-1,i=null;e.generalUis.some((e=>{var t;if(null==e?void 0:e.dianJiangSk)return i=e;let a=(null==(t=null==e?void 0:e.generalInfo)?void 0:t.quality)||0;a>n&&(n=a,i=e);})),null==i||i.sureBtnClick(),setTimeout((()=>null==i?void 0:i.sureBtnClick()),500);}));}),3e3);else if(void 0===e.className)return;let{ProtoObj:ce,className:ue,SeatID:he,SrcSeatID:pe,targetSeatID:me,SpellID:fe,Param:ge,Params:ye,Datas:ve,DataCount:be,CardCount:we,CardIDs:xe,FromID:Se,FromZone:ke,FromPosition:Ie,FromZoneParam:Ce,ToID:Ee,ToZone:De,ToPosition:Te,ToZoneParam:Ae,MoveType:Be,Type:Le}=e;if(!R.userID&&e.userID&&["ClientLoginRep","ClientUserDataCounterNtf","ClinetNetSpeedNtf","SmsgUpdateTaskListToClient","ClientGuildMemberChangeNtf"].includes(ue)&&(Object.assign(R,{userID:e.userID,nickname:e.Nickname||R.nickname||"",account:e.Account||localStorage.LastUserName||localStorage.SGS_LASTLOGIN_ACCOUNT||localStorage.SGS_LASTLOGIN_ACCOUNT1||R.account||""}),R.UsedGeneralSkinID=r(R.account+"::UsedGeneralSkinID",R.UsedGeneralSkinID),lt.includes(R.userID)&&(window.SGSMODULE=[]),M.autoSignSwitch&&async function(e=!1){await w(1e4);const t=x.get("DailySignNewView",!1);if(2==(null==t?void 0:t.signState))for(let n=0;n<t.itemList.length;n++){let i=t.itemList[n].baseData.ID;9020101!=i&&i.toString().startsWith("90")&&e||1==t.itemList[n].type&&(t.itemList[n].OnSignClick(),f("自动签到已完成<br>如需关闭,可在小抄设置中关闭"),await w(500));}for(let n=0;n<t.totalItemList.length;n++)3==t.totalItemList[n].type&&t.totalItemList[n].OnSignClick()&&await w(500);x.del("DailySignNewView",1e4);}(M.autoSignSkipSwitch),Promise.all([Xe(),b((()=>{var e;const t=x.get("QldjChooseRuleWindow");let{clientId:n,nickname:i,guildID:a,guildName:s,Level:l,vipLevel:o}=(null==(e=null==t?void 0:t.seat)?void 0:e.playerInfo)||{};return x.del("QldjChooseRuleWindow"),n!=R.userID||!i||!s&&a?null:(Object.assign(R,{nickname:i,guildID:a,guildName:s,Level:l,vipLevel:o}),i)}),30,1e3)]).then((()=>{let e=Je.getElementById("uuid");e.innerText="id:"+R.userID,e.onclick=function(){Y(R.userID,!1),e.innerText="复制成功",setTimeout((()=>{e.textContent="id:"+R.userID;}),"500");};let t=Je.getElementById("nickName");t.innerText="昵称:"+R.nickname,t.onclick=function(){Y(R.nickname,!1),t.innerText="复制成功",setTimeout((()=>{t.textContent="昵称:"+R.nickname;}),"500");},Je.getElementById("inviteName").setAttribute("placeholder",R.nickname||""),async function(t){var n=Je.getElementById("ACSubmit");n.onclick=function(){var e=Je.getElementById("AC").value;const n={username:t,playername:R.nickname,password:e};fetch("https://goka.top:8080/signup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>e.json())).then((e=>{if(""==e.message){let t;t=1==e.activated?"已激活":"未激活",Je.getElementById("AC").setAttribute("placeholder","点击添加界小抄激活码\n当前激活码有效期至\n"+e.expirationTime+t);}else Je.getElementById("AC").setAttribute("placeholder","点击添加界小抄激活码\n"+e.message);1==e.activated?(R.v=!0,document.getElementById("createIframe").style.border="2px solid rgb(242, 222, 156)",Object.entries(N.vskinMap).forEach((([e,t])=>{N.skinMap[e]?N.skinMap[e]=new Set([...N.skinMap[e],...t]):N.skinMap[e]=new Set(t);})),setTimeout((()=>{f("感谢你对界小抄的支持<br>皮肤体验中sp/族/界/标已全部互通<br>快捷操作已经全部可用<br>自动秒杀可用");}),5e3),R.trialTime=0):R.trialTime=parseInt(e.trialTime),Je.getElementById("AC").value="",async function(e){const t=[{id:"autoDrumSwitch",action:D},{id:"mail",action:_},{id:"autoWuJiangSwitch",action:E}];if(e){t.push({id:"task",action:T},{id:"autoKanShuSwitch",action:I},{id:"autoYueKaSwitch",action:C});const e=Je.querySelectorAll('.left input[type="checkbox"]');let n=[];e.forEach((e=>{e.disabled=!1,e.onchange=function(){const e=parseInt(this.dataset.goods_id),t=parseInt(this.dataset.start_time),i=this.dataset.goods;this.checked?n.find((t=>t.goods_id===e))||n.push({goods_id:e,start_time:t,goodsString:i}):n=n.filter((t=>t.goods_id!==e)),n.forEach((e=>{L(e.goods_id,e.start_time,e.goodsString);})),0===n.length&&L(!1);};}));}const n=document.getElementById("iframe-source").contentWindow.document;e||[{id:"task",action:T},{id:"autoKanShuSwitch",action:I},{id:"autoYueKaSwitch",action:C}].forEach((({id:e,action:t})=>{const i=n.getElementById(e);i&&(i.checked=!1);})),t.forEach((({id:e,action:t})=>{const i=n.getElementById(e);i&&("task"===e||"mail"===e?(i.disabled=!1,i.onmousedown=()=>t(i)):(i.disabled=!1,i.checked&&t(i)));}));}(e.activated),_e(!0);})).catch((e=>console.error("Error:",e)));},n.click(),async function(){const e={tianGuo:!1,username:R.userID,officerLv:R.curOfficerLv,getData:!0};fetch("https://goka.top:8080/le",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json())).then((e=>{Je.getElementById("PlayerTianGuo").innerHTML="你的天过次数/总次数 <br>"+e.PlayerTianGuo+"/"+e.PlayerCount+" = "+(e.PlayerTianGuo/e.PlayerCount).toFixed(2);})).catch((e=>console.error("Error:",e)));}(),async function(){try{Je.getElementById("choujiang").href="https://goka.top:8080/choujiang?username="+R.userID,(await async function(e,t){return fetch(`https://goka.top:8080/getLottery?username=${e}&secId=0`,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>(R.lotteries=e,console.table(e),e))).catch((e=>(console.error("Error:",e),[])))}(R.userID)).forEach((e=>{X(e.secId,e.itemId,e.itemNum,e.times);}));}catch(e){console.error("Error during fetching:",e);}}();}(R.userID),setTimeout((()=>M.autoInviteSwitch&&qe(R.inviteName.trim()||R.nickname)),5e3);}))),"ClientGeneralSkinRep"==ue){void 0===H.mySeats[0]&&5==Le&&e.ClientID<10&&(H.setMyID(e.ClientID),console.warn("mySeats"+H.mySeats),nt());let t=e.GeneralSkinList[0],n=H.find(H.mySeats[0],t.GeneralID,!0);if(t.GeneralID!=n&&M.skinStateBlockSwitch&&(t.state=0),M.skinSwitch&&n){if([46,479].includes(t.GeneralID)&&(document.getElementById("sgsBgIMG").src="https://web.sanguosha.com/10/pc/res/assets/runtime/general/maxBig/604701.png",setTimeout((function(){document.getElementById("sgsBgIMG").src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";}),2e4)),R.UsedGeneralSkinID.UsedGeneralSkinID[n]){let[e,i]=String(R.UsedGeneralSkinID.UsedGeneralSkinID[n]).split("_").map((e=>parseInt(e)));t.SkinID=e,t.skin_type=i||0;}t.state=M.skinStateSwitch?1:0;}}else if("MsgReconnectGame"==ue);else if("ClientOfficerInfoRep"==ue)R.curOfficerLv=e.curOfficerLv;else if("decodeSSCChatmsgNtf"==ue)11==ce.scene&&(ce.scene=2);else if("ClientRoleGeneralStarRep"==ue)M.generalSwitch&&(e.Star>=0&&(e.Star=4),ce.star>=0&&(ce.star=4));else if("ClientGameRecordInfoRep"==ue)(null==ce?void 0:ce.query_uid)==R.userID&&[26,35,44,5,7].includes(null==ce?void 0:ce.id)&&(null==(s=null==ot?void 0:ot.req)||s.delete(ce.id),0==(null==(l=ot.req)?void 0:l.size)&&delete ot.req,(null==(o=null==ce?void 0:ce.all_record)?void 0:o.length)&&(ce.id,ce.all_record));else if("DbsCcUserGoodshintNtf"==ue)2010==Le&&"object"==typeof e.GoodsList&&(R.goods=e.GoodsList);else if("decodeClientSecretInfoRep"==ue){if(Object.keys(R.goods).length>0){N.currentSec=ce.secId;for(let e of R.goods)X(N.currentSec,e.GoodsBaseID,e.ChangeCount,ce.openTime),He(ce.secId,e.GoodsBaseID,ce.openTime,ce.levelId,e.ChangeCount);}}else if("decodeClientTavernInfoRep"==ue){let e=(null==(d=null==ce?void 0:ce.tavern_info)?void 0:d.day_quest_finished_cnt)??0;if(R.autoBotStatus=30-e,Je.querySelector(".status").style.setProperty("--bot-status",`"${R.autoBotStatus.toString().padStart(2,"0")}"`),e>=30){let t=Je.getElementById("autoBotSwitch");(null==t?void 0:t.checked)&&t.click(),f(`今日已获得亲密度:${e},恭喜你完成任务~`);}else e>0&&f(`今日已获得亲密度:${e},还差 ${30-e} 亲密度,继续努力吧~`);}else if("ClientSecKillInfoRep"==ue)oe(e.Data);else if("decodeRogueLikeDataSync"==ue)le(ce);else if("ClientActivitysetDataRep"==ue)le();else if("decodeRogueLikeGameOverRep"==ue)!async function(e){let{totalTime:t,bWin:n,passDiff:i}=e;if(!(n&&i>=21))return;O.details=[],O.details.push(N.generalDict[O.general]);for(let d of O.itemId)N.Rplot[d]&&O.details.push(N.Rplot[d].name);O.details=O.details.join(" ");let a=R.userID.toString();console.warn(O.details);let s={time:t,username:a,diff:i,playername:R.nickname,details:O.details};const l=await async function(e){const t=je,n={YdEdx:"banana",sTYTr:function(e,t){return e+t},xPLlr:function(e,t){return e(t)},wuZtB:"deriveKey",eJGYl:t(326,"0[sn"),sUODo:t(309,"&m7I"),tflzR:t(306,"*0ql"),GcLLT:t(330,"R&u&")},i=n.YdEdx,a=n[t(300,"kpMk")](e,i),s=await crypto[t(329,"hv3*")].importKey(t(308,"R&u&"),n[t(323,"qGRQ")](Ue,a),{name:t(319,"c6o4")},!1,[n[t(328,"48GA")]]);return crypto[t(302,"5gDF")].deriveKey({name:n[t(318,"&DEY")],salt:Ue(i),iterations:1e5,hash:n.sUODo},s,{name:n[t(301,"n%]Y")],length:256},!1,["encrypt",n.GcLLT])}(a),o=await async function(e,t){const n=je,i=crypto.getRandomValues(new Uint8Array(12)),a=await crypto[n(307,"UoAS")].encrypt({name:n(303,"wSJY"),iv:i},e,{GNeso:function(e,t){return e(t)}}[n(327,"uW@U")](Ue,t));return {iv:Array[n(317,"he)0")](i),encrypted:Array.from(new Uint8Array(a))}}(l,JSON.stringify(s)),r={uid:a,iv:Oe(new Uint8Array(o.iv).buffer),data:Oe(new Uint8Array(o.encrypted).buffer)};fetch("https://goka.top:8080/rogueSpeedRun",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then((e=>e.json())).then((e=>{let t=parseInt(e.time),n=Math.floor(t%3600/60);t%=60,m("恭喜过关!"+e.playername+", 你的最快通关时间"+n+"分钟"+t+"秒<br>目前小抄排行榜上排名第"+e.rank+"<br>炼狱结束后,前6名可获得丰厚奖励噢<br>活动详情可留意QQ群");})).catch((e=>console.error("Error:",e)));}(ce);else if("SmsgGamePlayerDead"==ue)x.flag&&he==H.mySeats[0]&&((null==(h=null==(u=null==(c=x.gamescene)?void 0:c.seatContainer)?void 0:u.seatUIs)?void 0:h.reduce(((e,t,n,i)=>{var a,s,l,o,r;return e+((null==(a=null==t?void 0:t.seat)?void 0:a.figure)==i[0].seat.figure||(null==(o=null==(l=null==(s=null==t?void 0:t.seat)?void 0:s.playerInfo)?void 0:l.showName)?void 0:o.includes("金"))?1:-1)*(null==(r=null==t?void 0:t.seat)?void 0:r.currentHp)}),0))>0||setTimeout((()=>{var e,t;null==(t=null==(e=x.gamescene)?void 0:e.topMenu)||t.onClickBack(),b((()=>x.find("PromptLayer","ConfirmWindow"))).then((e=>{var t;if("退出游戏"!=(null==(t=null==e?void 0:e.confirmData)?void 0:t.title))return;e.checkBox.selected=!0;let n=e.confirmData.buttonArr.find((e=>"确定"==e.label));n.callBack&&n.thisObject&&n.callBack.apply(n.thisObject,n.callBackParams),e.confirmData.clickClose&&e.RemoveFromParent();}));}),5e3));else if("MsgGameDealCharacter"==ue){if(1099193522==R.userID&&"undefined"!=typeof Allows&&void 0!==Le&&1==Le){var Re=Math.floor(Math.random()*Allows.length+1);document.getElementById("title").innerText="选"+Re;}}else if("GsCModifyUserseatNtf"==ue)e.IsGameStart&&(H.update(!1,e.Infos.map((e=>parseInt(e.SeatID)||0))),console.warn(ue,"游戏人数:"+H.size+", 我的座位:"+H.mySeats,e.Infos));else if("decodeGsClientUserSeatFlagNtf"==ue)H.update(!1,ce.seatinfo.map((e=>parseInt(e.seat_id)||0))),console.warn(ue,"游戏人数:"+H.size+", 我的座位:"+H.mySeats,ce.seatinfo);else if("GsCUpdateRoleDataNtf"==ue)void 0===H.mySeats[0]&&58===e.StateID&&(H.setMyID(he),console.warn(ue,"游戏人数:"+H.size+", 我的座位:"+H.mySeats,H.seatIDs));else if("GsCFirstPhaseRole"==ue)void 0!==he&&(H.firstID=he,console.warn("先手位置:"+H.firstID));else if("MsgGameRoundNtf"==ue)e.isPassed?z.isPassed=e.isPassed:H.size||(H.size=8,H.update(!0));else if("MsgGameOver"==ue||"ClientRecommendShopItemRep"==ue||"ClientLeavetableRep"==ue);else if("decodeRougeBaseInfoRep"==ue)W.friendGeneral=(null==(p=null==ce?void 0:ce.friendGeneral)?void 0:p.length)??W.friendGeneral;else if("MsgGamePlayCardNtf"==ue)z.ready(e.CardList);else if("SmsgGameSetCharacter"==ue)void 0===H.mySeats[0]&&H.isDouDiZhu&&1==e.Infos.length&&H.setMyID(e.Infos[0].SeatID),e.Infos.forEach((({SeatID:e,CharacterID:t})=>{H.setGeneral(e,t);}));else if("GsCGuoZhanSetCharacter"==ue)null==(g=e.GeneralData)||g.forEach((({index:e,cardID:t})=>{H.setGeneral(he,t,e);}));else if("MsgGameTurnNtf"==ue)z.enter(e.TurnCnt);else if("GsCGamephaseNtf"==ue)z.enter(null,e.Round,he);else if("GsCUpdateRoleDataExNtf"==ue)z.currentID==he&&1==e.DataID&&Array.isArray(e.Datas)&&(Je.getElementById("sha").innerText="剩余出杀次数:"+Math.max(0,ve[2]-ve[1]));else if("ClientHappyGetFriendHandcardRep"==ue)H.find(e.seatId,[7004,2087,3048])&&new J(e.seatId).show(e.Cards);else if("PubGsCUseCard"==ue)H.mySeats[0]==he&&ee([e.CardID]),z.currentID==he&&H.find(z.currentID,[7003,2086,3047])&&1==e.useType&&1!=e.fromZone&&!e.isSend?(z[7011]||(z[7011]={count:0,color:new Set}),3!=Q[e.CardID].type&&z[7011].count++,z[7011].color.add(Q[e.CardID].c),Je.getElementById("suit").innerHTML="["+z[7011].count+"]"+Array.from(z[7011].color).join("")):z.currentID==he&&H.find(z.currentID,[330,1068])&&1==e.useType&&!e.isSend&&(Je.getElementById("suit").innerHTML=Q[e.CardID].cn);else if("PubGsCUseSpell"==ue)H.mySeats[0]==he&&1==xe.length&&ee(xe),2143==fe?(z[fe]||(z[fe]=new Set),xe.forEach((e=>z[fe].add(Q[e].c))),Je.getElementById("suit").innerHTML=Array.from(z[fe]).join("")):[3157,3511].includes(fe)&&0!=xe.filter((e=>e>0)).length&&(pe==H.mySeats[0]||R.v)?z[fe]=xe:([3193,3185,3138].includes(fe)||3161==fe)&&z.phase--;else if("GsCRoleOptTargetNtf"==ue)if(945==fe&&0==ge&&(null==ye?void 0:ye.length)>0)!async function(e,t=!1){function n(e,...t){let n=e.slice();for(let i=0;i<n.length;i++){for(let e=0;e<t.length;e++)if(n[i]-=t[e][i],n[i]<0)return !1;if(i>0&&n[i]>=2)return 0}return n}let i=e.reduce(((e,t)=>(e[0]++,e[t]++,e)),Array(14).fill(0)),a=Math.floor(i[14]/2),s=new Map([[0,[Array(14).fill(0)]]]);for(let r=1;r<=13;r++){let e=i[r];if(0!=e)for(let t of Array.from(s.keys()).sort(((e,t)=>t-e))){let n=s.get(t);for(let i=1;i<=e;i++){let e=t+r*i;if(e>a)break;s.has(e)||s.set(e,[]);for(let t=0;t<n.length;t++){let a=n[t].slice();a[0]+=i,a[r]+=i,s.get(e).push(a);}}}}s.delete(0);let l=new Map;for(let r of Array.from(s.keys()).sort(((e,t)=>t-e))){let e=s.get(r);for(let t=0;t<e.length;t++)for(let a=t;a<e.length;a++){let s=n(i,e[t],e[a]);s&&(l.has(s[0])||l.set(s[0],[]),e[t][0]<=e[a][0]?l.get(s[0]).push([e[t],e[a],s]):l.get(s[0]).push([e[a],e[t],s]));}}let o=Je.getElementById("result");o.innerHTML="",Array.from(l.keys()).sort(((e,t)=>e-t)).some((e=>{if(l.get(e).sort(((e,t)=>e[0][0]-t[0][0])).forEach((([e,n,i])=>{let a=document.createElement("button");a.className="calRes";let s=document.createElement("span"),l=document.createElement("span");s.innerText=e.flatMap(((e,t)=>t>0?Array(e).fill(Z(t,!1)):[])).join("+"),l.innerText=n.flatMap(((e,t)=>t>0?Array(e).fill(Z(t,!1)):[])).join("+"),a.appendChild(s),a.insertAdjacentHTML("beforeend","<span>=</span>"),a.appendChild(l),a.title="点击复制",a.onclick=function(){Y(this.innerText,!0);},t&&(a.title="点击“=”左侧或右侧的数字,将被点击一侧的数字分配给自己,另一侧的分配给张昌蒲",s.className="yanjiaospan",l.className="yanjiaospan",s.onclick=function(t){t.stopPropagation(),x.yanJiao([e,n,i],2);},l.onclick=function(t){t.stopPropagation(),x.yanJiao([e,n,i],0);}),o.appendChild(a);})),o.children.length>=5)return !0})),""===o.innerHTML?(o.innerHTML='<span class="textRes">【严教】无解!</span>',f("【严教】无解!")):t&&o.insertAdjacentHTML("afterbegin","界小抄:点下方数字可以自动分配牌<br>点击想要分配给自己的一组数字即可");}(ye.map((e=>Q[e].number)),R.v&&he==H.mySeats[0]);else if(3440==fe&&H.mySeats.includes(he)&&0==ge&&(null==ye?void 0:ye.length)>0)28==Le?se(ye.map((e=>Q[e].number)),new J(he).cards.map((e=>Q[e.id].number))):se();else if(11003==fe&&0==ge&&(null==ye?void 0:ye.length)>0&&pe!=H.mySeats[0]&&M.v)Je.getElementById("result").innerHTML='<span class="textRes"> 【锻造】<br>'+ye.map((e=>Q[e].ncn)).join("<br>")+"</span>";else if(976==fe&&ge)Je.getElementById("jinzhi").innerHTML="下一次锦织所需牌:"+(ge+1);else if([7016,7017].includes(fe)&&(null==ye?void 0:ye.length)>0&&(pe==H.mySeats[0]||R.v)){z[fe]=ye.slice();let e=Array.from(new Set(new J(ge).cards.map((({key:e})=>e)))).sort(((e,t)=>t-e)),t=Array.from(new Set(new J(255,1).cards.slice(0,H.isGuoZhan?void 0:2).map((({key:e})=>e)))).sort(((e,t)=>t-e)),{yes:n,no:i}=ye.reduce(((n,i)=>{let{keys:a}=$.findKZ(i);return void 0!==e.find((e=>a.includes(e)))&&n.yes.push(i),void 0!==t.find((e=>a.includes(e)))&&n.no.push(i),n}),{yes:[],no:[]}),a=Je.getElementById("result");2==i.length?n=ye.filter((e=>!i.includes(e))):1==n.length&&(i=ye.filter((e=>!n.includes(e)))),1==n.length||2==n.length?(a.innerHTML='<span class="textRes">【宴戏】'+n.map((e=>Q[e].ncn)).join("/")+"</span>",z[fe]=n.concat(ye.filter((e=>!n.includes(e))))):a.innerHTML='<span class="textRes">【宴戏】未知</span>';let s=new J(ge).show(z[fe][0]).concat(new J(255,1,H.isGuoZhan?null:1).show(z[fe].slice(-2)));3==n.length?$.pack(s):1==n.length?$.pack(s.slice(1,3)):2==n.length&&($.pack(s.slice(0,2)),$.pack(s.slice(1,3))),ye.forEach((e=>{a.innerHTML+='<span class="textRes'+(n.length<3&&n.includes(e)?" textRes":"")+'">'+Q[e].ncn+":"+[[n,"手牌"],[i,"牌堆"]].filter((([t,n])=>t.includes(e))).map((([e,t])=>t)).join("/")+"</span><br>";}));}else [4,5,921,372,811,357,3119,501,3437].includes(fe)&&(null==ye?void 0:ye.length)>0||[851,361,774,3310].includes(fe)&&0==ge&&(null==ye?void 0:ye.length)>0?void 0!==me&&255!==me&&new J(me).show(ye):943==fe&&0==ge&&1==(null==ye?void 0:ye.length)?new J(255,1,1).show(ye):898==fe&&0==ge&&(null==ye?void 0:ye.length)>2?void 0!==pe&&255!==pe&&new J(pe).show(ye.slice(1,ye[0]+1)):(987==fe||988==fe)&&1==ge&&(null==ye?void 0:ye.length)>2?void 0===me||255===me||pe!=H.mySeats[0]&&!R.v||new J(me).show(ye.slice(-ye[1])):3266==fe&&0==ge&&(null==ye?void 0:ye.length)>0?void 0===me||pe!=H.mySeats[0]&&!R.v||new J(me,255==me?1:5,1).show(ye.filter(((e,t)=>t%3==1))):3483==fe&&1==ge?(null==ye?void 0:ye.length)>2&&void 0!==me&&255!==me?new J(me).show(ye.slice(-ye[1])):ye[0]>0&&(z[fe]=ye[0]):(7010==fe||7011==fe)&&(null==ye?void 0:ye.length)>0&&255==me?(z[7009]=ye.slice(),(pe==H.mySeats[0]||R.v)&&$.pack(new J(255,1,1).show(ye))):2900==fe&&28==Le&&H.setGeneral(me,ye[2],ye[1],!0);else if("CGsRoleSpellOptRep"==ue)2022==fe?H.setGeneral(he,ve[0],ve[1],!0):7009==fe?(null==(k=z[7009])||k.pop(),(null==(B=z[7009])?void 0:B.length)||new J(255,1,1).show(ve)):3336==fe?new J(255,1,-1).show(null==(j=null==ve?void 0:ve.slice())?void 0:j.reverse()):ve.length>0&&15==fe&&10==Le&&async function(e){let t={tianGuo:e,username:R.userID,officerLv:R.curOfficerLv,getData:!1};fetch("https://goka.top:8080/le",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>e.json())).then((e=>{Je.getElementById("PlayerTianGuo").innerHTML="你的天过次数/总次数 <br>"+e.PlayerTianGuo+"/"+e.PlayerCount+" = "+(e.PlayerTianGuo/e.PlayerCount).toFixed(2);})).catch((e=>console.error("Error:",e)));}(1==Q[ve[0]].color);else if("PubGsCMoveCard"==ue){if(xe=xe.slice(),0===we||0===Be||11===De||e.isSend)return;if(713==fe&&21==Be&&we==xe.length-2){let e=xe.splice(0,1)[0];xe.splice(e,1);}xe.filter((e=>e>0)).length!=we&&0!=xe.filter((e=>e>0)).length&&(console.error("PubGsCMoveCard error: 明暗牌混合:["+xe+"]"),console.error(e),xe=[]),1==ke&&65282==Ie&&[3208,7011].includes(fe)&&(Ie=65280,xe.reverse()),1==ke&&65282==Ie&&13==Be&&1==we&&(Ie=65280),1==ke&&65282==Ie&&4==De&&8==Be&&795==fe&&1==we&&(Ie=65280),1==ke&&65282==Ie&&5==De&&3101==fe&&1==we&&(Ie=0),1==ke&&65282==Ie&&5==De&&!H.isGuoZhan&&[7016,7017].includes(fe)&&1==we&&(Ie=65280);var Ge=new J(Se,ke,Ie,we,fe,Ce),Me=new J(Ee,De,Te,we,fe,Ae);if(12==De||12==ke)12!=De?Me.add(xe.concat(Array(we-xe.length).fill(0)).map((e=>new $(e,e,Me.zoneID)))):12!=ke&&0!=ke&&Ge.remove(xe,fe);else if(5==ke&&1==De&&0==Ee)Me.add(Ge.remove(xe.filter((e=>e>0))).map((e=>e.destroy(0))));else if(2==ke&&9==De&&0==Se&&0==Ee)z.isGameStart&&!z.isPassed&&$.pack($.get(0).map((e=>e.destroy())),!1,1),Me.set(Me.cards.concat(Ge.cards.map((e=>e.destroy(0))))),Ge.set([]),st(),z.isPassed=!1;else if(255!==Be){if(1==ke&&5==De&&H.dealCard(Ee,xe[0]),2==De&&(z[3090]||(z[3090]=new Set),xe.forEach((e=>z[3090].add(Q[e].c))),Je.getElementById("boTu").innerHTML=Array.from(z[3090]).join("")),[441,3492].includes(fe)&&8==De&&6==Be&&async function(e,t){if(!(null==e?void 0:e.length))return;let n=e.slice().sort(((e,t)=>e-t)),i=[];!function e(a,s,l){if(!(l>13)){i.unshift(a.slice()),t&&(i[0].K=13===l?a.length:0);for(let t=s;t<n.length;t++)t>s&&n[t]===n[t-1]||(a.push(n[t]),e(a,t+1,l+n[t]),a.pop());}}([],0,0);let a=Je.getElementById("result");a.innerHTML="";for(let s of i.filter(((e,t,n)=>!n.some((t=>e.length<t.length&&e.every((e=>t.includes(e))))))).sort(((e,t)=>t.K-e.K||t.length-e.length)))a.appendChild(ie(s.map((e=>Z(e,!1))).join("+"))),t&&s.K&&a.lastChild.classList.add("textRes");}(xe.map((e=>Q[e].number)),3492==fe&&R.v),3033==fe&&1==ke&&8==De&&1==xe.filter((e=>e>0)).length){let e=Q[xe[0]].number,t=0,n=0,i=0;J.paidui.forEach((a=>{let s=Q[a].number;s===e?i++:s>e?t++:n++;})),Je.getElementById("result").innerHTML='<span class="textRes">【吉占】猜'+(t>n?"大":"小")+'</span><br><span class="textRes">跟'+e+"比,"+t+"张大\t\t"+n+"张小\t\t"+i+"平</span>";}if(3329==fe&&Se==z.currentID){let e=Q[xe[0]].number,t=J.paidui,n=["无中","洞烛","顺手","过拆","逐近","决斗","南蛮","万箭","出其","水淹","随机","洪荒","同舟","力争","移花"].flatMap((e=>t.filter((t=>{var n;return null==(n=P.name[e])?void 0:n.has(t)})))).reduce(((t,n)=>{let i=Q[n].number;return i>e?t.g++:i<e?t.l++:t.e++,t}),{g:0,l:0,e:0}),i=["五谷","桃园","火攻","借刀","撒豆"].flatMap((e=>t.filter((t=>{var n;return null==(n=P.name[e])?void 0:n.has(t)})))).reduce(((t,n)=>{let i=Q[n].number;return i>e?t.g++:i<e?t.l++:t.e++,t}),{g:0,l:0,e:0});Je.getElementById("result").innerHTML='<span class="textRes">【和衷】'+(n.g>n.l?"大":n.g<n.l?"小":i.g>i.l?"大":i.g<i.l?"小":"平")+'</span><br><span class="textRes">'+n.g+"."+i.g+"大\t\t"+n.l+"."+i.l+"小</span>";}else 3488==fe&&5==ke&&5==De&&21==Be&&1==xe.filter((e=>e>0)).length?(z[fe]||(z[fe]={}),z[fe][Se]=xe.find((e=>e>0))):3488==fe&&5==ke&&10==De&&11==Be&&0==xe.filter((e=>e>0)).length?(xe[0]=(null==(G=z[fe])?void 0:G[Se])||0,z[fe].stack=xe[0]):3488!=fe||10!=ke||1!=De&&2!=De||11!=Be||0!=xe.filter((e=>e>0)).length||(xe[0]=(null==(q=z[fe])?void 0:q.stack)||0,null==(K=z[fe])||delete K.stack);if([3157,3511].includes(fe)&&2==ke&&5==De&&we==(null==(F=z[fe])?void 0:F.length)&&0==xe.filter((e=>e>0)).length&&z[fe].forEach(((e,t)=>xe[t]=e)),[7016,7017].includes(fe)&&5==De&&1==we&&(pe==H.mySeats[0]||R.v)&&(xe[0]&&(null==(V=z[fe])?void 0:V.includes(xe[0]))?z[fe].splice(z[fe].indexOf(xe[0]),1):5==ke||2==(null==(te=z[fe])?void 0:te.length)||1==(null==(ne=z[fe])?void 0:ne.length)?xe[0]=(null==(ae=z[fe])?void 0:ae.shift())||0:H.isGuoZhan),Se!=Ee||ke!=De||Ie!=Te&&1==De||Ce!=Ae&&4==De)if(3208==fe&&10==ke&&5==De&&0===xe.filter((e=>e>0)).length)Ge.pos=-1,$.pack(Ge.cards.slice(0,Ge.length-1)),Me.add(Ge.remove(xe));else if(3483==fe)if(10==ke&&10==De)0===xe.filter((e=>e>0)).length&&(Ge.pos=-1,Me.pos=1),Me.add(Ge.remove(xe));else if(1==ke&&10==De&&65282==Ie)z[fe]&&$.pack(Ge.cards.slice(0,z[fe])),0==xe.filter((e=>e>0)).length&&(Ge.pos=-1),Me.add(Ge.remove(xe));else if(5==ke&&10==De)z[fe]=Me.add(Ge.remove(xe));else if(10==ke&&1==De&&65282==Ie){if(0==xe.filter((e=>e>0)).length&&(null==(re=z[fe])?void 0:re.length)==we&&z[fe].every((e=>Ge.cards.includes(e)))){let e=z[fe].flatMap((e=>Ge.cards.splice(Ge.cards.indexOf(e),1)));$.pack(Me.add(e));let t=e.map((e=>e.key));t.every((e=>e>0))&&xe.splice(0,we,...t);}else Me.add(Ge.remove(xe));delete z[fe];}else Me.add(Ge.remove(xe));else if(780==fe&&5==ke&&65282==Ie&&1==we)if(5==De&&Se==z.currentID)z[fe]=Me.add(Ge.remove(xe))[0];else if(1==De&&Se!=z.currentID&&Ge.cards.includes(z[fe])){let e=null==(de=Me.add(Ge.cards.splice(Ge.cards.indexOf(z[fe]),1))[0])?void 0:de.key;e>0&&0==xe.filter((e=>e>0)).length&&(xe[0]=e),delete z[fe];}else Me.add(Ge.remove(xe));else Me.add(Ge.remove(xe,fe));else Ge.show(xe);}}}function dt(){var e,t,n,i,a,s;let l=Array.prototype.slice.call(arguments);try{return "INIT"===l[0]?(window.WDVerSion="1.0.0",window.padding=M.padding||0,window.addEventListener("resize",Qe),new Promise(((e,t)=>{!function t(){var n;"undefined"!=typeof JSZipUtils&&"undefined"!=typeof CtrUtil&&void 0!==(null==(n=null==CtrUtil?void 0:CtrUtil.Ctr)?void 0:n.Ofb_Dec)&&"undefined"!=typeof SystemContext&&document.getElementById("bgDiv")?Xe(!0).then(e):setTimeout(t,1e3);}();}))):"EXIT"===l[0]?(window.removeEventListener("resize",Qe),window.removeEventListener("resize",Ye),window.removeEventListener("SGSresize",Ve),null==(e=document.getElementById("injectCSS"))||e.remove(),null==(t=document.getElementById("seatUI"))||t.remove(),null==(n=document.getElementById("rogueUI"))||n.remove(),null==(i=document.getElementById("cusBGDiv"))||i.remove(),null==(a=document.getElementById("createIframe"))||a.remove(),null==(s=document.getElementById("createSkinIframe"))||s.remove(),R.isFrameAdd=!1,!0):rt(l[l.length-1])}catch(o){console.error(o.message),console.error(o.stack);const[,e,t]=o.stack.match(/(\d+):(\d+)/);console.error("Line:",e),console.error("Column:",t),f("小抄GG了,联系作者解决");}}"undefined"!=typeof SGSMODULE&&(Object.defineProperty(window.console,"log",{get:()=>console.info,set(){}}),window.SGSMODULE.forEach((e=>e("EXIT"))),delete window.SGSMODULE),console.info("%cBASE","font-weight: bold; color: white; background-color: #525288; padding: 1px 4px; border-radius: 4px;"),window.SGSMODULE=[],Object.defineProperty(window.console,"log",{get:()=>function(...e){(window._debug||window.isLogAllClass)&&console.debug(...e),window.SGSMODULE.forEach((t=>null==t?void 0:t(...e)));},set(){}}),dt("INIT").then((e=>{e&&window.SGSMODULE.push(dt);}));

})();

const bug = '小抄';