diff --git a/CnGalWebSite/CnGalWebSite.BlazorWeb/Components/App.razor b/CnGalWebSite/CnGalWebSite.BlazorWeb/Components/App.razor
index ff531c337b..68d964bcc0 100644
--- a/CnGalWebSite/CnGalWebSite.BlazorWeb/Components/App.razor
+++ b/CnGalWebSite/CnGalWebSite.BlazorWeb/Components/App.razor
@@ -22,7 +22,7 @@
-
+
@* *@
@@ -96,13 +96,6 @@
-
-
-
-
-
- @* *@
-
diff --git a/CnGalWebSite/CnGalWebSite.Kanban/Services/Core/Live2DService.cs b/CnGalWebSite/CnGalWebSite.Kanban/Services/Core/Live2DService.cs
index 7b233cc2b7..c9e56d4533 100644
--- a/CnGalWebSite/CnGalWebSite.Kanban/Services/Core/Live2DService.cs
+++ b/CnGalWebSite/CnGalWebSite.Kanban/Services/Core/Live2DService.cs
@@ -53,6 +53,15 @@ public async Task InitAsync()
//创建对象引用
objRef = DotNetObjectReference.Create(this);
+ //初始化Live2D核心
+ await InitLive2DAsync();
+ }
+
+ [JSInvokable]
+ public async Task Live2dInitCallback()
+ {
+
+
//获取模型数据
await _clothesRepository.LoadAsync();
await _expressionRepository.LoadAsync();
@@ -66,13 +75,6 @@ public async Task InitAsync()
//加载UI相关设置
await _settingService.LoadAsync();
- //初始化Live2D核心
- await InitLive2DAsync();
- }
-
- [JSInvokable]
- public async Task Live2dInitCallback()
- {
//设置上次的衣服
await SetClothes(_userDataService.UserData.Clothes.ClothesName);
await SetShoes(_userDataService.UserData.Clothes.ShoesName);
diff --git a/CnGalWebSite/CnGalWebSite.Kanban/wwwroot/js/live2d-core.js b/CnGalWebSite/CnGalWebSite.Kanban/wwwroot/js/live2d-core.js
index cb3d8fc22c..149bff1be3 100644
--- a/CnGalWebSite/CnGalWebSite.Kanban/wwwroot/js/live2d-core.js
+++ b/CnGalWebSite/CnGalWebSite.Kanban/wwwroot/js/live2d-core.js
@@ -5,18 +5,48 @@ var canvasId = 'live2d';//画布Id
var live2d_dotNetHelper;
-function initKanbanLive2D(dotNetHelper, modelDir, modelIndex, resourcesPath) {
- var modelDirs = modelDir.split(',');
- live2d_dotNetHelper = dotNetHelper;
+// 动态加载脚本
+function loadScript(url, callback) {
+ let script = document.createElement('script');
+ if (script.readyState) { // IE
+ script.onreadystatechange = function () {
+ if (script.readyState === 'loaded' || script.readyState === 'complete') {
+ script.onreadystatechange = null;
+ callback();
+ }
+ }
+ } else { // 其他浏览器
+ script.onload = function () {
+ callback();
+ }
+ }
+ script.src = url;
+ document.body.appendChild(script);
+}
- setLive2dDefine(resourcesPath, backImageName, modelDirs, canvasId, modelIndex);
- initLive2d();
- initKanbanMoveAction(dotNetHelper);
- initButtonGroupMoveAction(dotNetHelper);
- initDialogBoxMoveAction(dotNetHelper);
- listenLive2dCanvasChange();
+function initKanbanLive2D(dotNetHelper, modelDir, modelIndex, resourcesPath) {
- console.log("初始化Live2D")
+ // 将注释节点插入到 HTML 文档中的 body 元素中
+ var comment = document.createComment("看板娘live2d依赖库");
+ document.body.appendChild(comment);
+ // 加载js
+ loadScript('https://app.cngal.org/live2d/js/live2dcubismcore.min.js', function () {
+ loadScript('https://app.cngal.org/live2d/js/bundle.js', function () {
+ //loadScript('http://localhost:5000/Samples/TypeScript/Demo/dist/bundle.js', function () {
+ // 再初始化l2d
+ var modelDirs = modelDir.split(',');
+ live2d_dotNetHelper = dotNetHelper;
+
+ setLive2dDefine(resourcesPath, backImageName, modelDirs, canvasId, modelIndex);
+ initLive2d();
+ initKanbanMoveAction(dotNetHelper);
+ initButtonGroupMoveAction(dotNetHelper);
+ initDialogBoxMoveAction(dotNetHelper);
+ listenLive2dCanvasChange();
+
+ console.log("初始化Live2D")
+ })
+ })
}
// 初始化完成回调
@@ -198,7 +228,7 @@ function initButtonGroupMoveAction(dotNetHelper) {
//检查对话框是否被按下
if (dialogbox_mousedown) {
return;
- }
+ }
//执行逻辑
deltaLeft = touch.clientX - touch.target.offsetLeft;
@@ -255,7 +285,7 @@ function initButtonGroupMoveAction(dotNetHelper) {
}
// 移动触发事件要放在,区域控制元素上
- window.addEventListener('mousemove', mousemove_fun )
+ window.addEventListener('mousemove', mousemove_fun)
window.addEventListener('touchmove', mousemove_fun, { passive: false })
const mouseup_fun = function () {
@@ -295,7 +325,7 @@ function initDialogBoxMoveAction(dotNetHelper) {
/*
* @des deltaLeft 即移动过程中不变的值
*/
-
+
var touch;
if (event.touches) {
touch = event.touches[0];//多个鼠标|手指事件取第一个
@@ -369,7 +399,7 @@ function initDialogBoxMoveAction(dotNetHelper) {
}
// 移动触发事件要放在,区域控制元素上
- window.addEventListener('mousemove', mousemove_fun )
+ window.addEventListener('mousemove', mousemove_fun)
window.addEventListener('touchmove', mousemove_fun, { passive: false })
const mouseup_fun = function () {
diff --git a/CnGalWebSite/CnGalWebSite.Shared/Components/KanbanCard.razor b/CnGalWebSite/CnGalWebSite.Shared/Components/KanbanCard.razor
index 8517b6a37d..c2ff13fad3 100644
--- a/CnGalWebSite/CnGalWebSite.Shared/Components/KanbanCard.razor
+++ b/CnGalWebSite/CnGalWebSite.Shared/Components/KanbanCard.razor
@@ -38,7 +38,7 @@
[CascadingParameter]
public ErrorHandler ErrorHandler { get; set; }
- protected override void OnInitialized()
+ protected override async Task OnInitializedAsync()
{
_eventService.KanbanChanged -= OnKanbanChanged;
_eventService.KanbanChanged += OnKanbanChanged;
@@ -47,26 +47,19 @@
NavigationManager.LocationChanged += LocationChanged;
LocationChanged(null, null);
- }
+ try
+ {
+ //获取词条信息
+ var mode = await _httpService.GetAsync("api/space/GetKanbanPermissions/");
+ ForceHide = !mode.Permissions;
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- if (firstRender)
+ isReady = true;
+ StateHasChanged();
+ }
+ catch (Exception ex)
{
- try
- {
- //获取词条信息
- var mode = await _httpService.GetAsync("api/space/GetKanbanPermissions/");
- ForceHide = !mode.Permissions;
-
- isReady = true;
- StateHasChanged();
- }
- catch (Exception ex)
- {
- await ErrorHandler.ProcessError(ex, "获取看板娘权限失败");
- }
+ await ErrorHandler.ProcessError(ex, "获取看板娘权限失败");
}
}
diff --git a/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.js b/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.js
index 87be0b4b67..88d6f3ced5 100644
--- a/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.js
+++ b/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.js
@@ -1008,18 +1008,48 @@ var canvasId = 'live2d';//画布Id
var live2d_dotNetHelper;
-function initKanbanLive2D(dotNetHelper, modelDir, modelIndex, resourcesPath) {
- var modelDirs = modelDir.split(',');
- live2d_dotNetHelper = dotNetHelper;
+// 动态加载脚本
+function loadScript(url, callback) {
+ let script = document.createElement('script');
+ if (script.readyState) { // IE
+ script.onreadystatechange = function () {
+ if (script.readyState === 'loaded' || script.readyState === 'complete') {
+ script.onreadystatechange = null;
+ callback();
+ }
+ }
+ } else { // 其他浏览器
+ script.onload = function () {
+ callback();
+ }
+ }
+ script.src = url;
+ document.body.appendChild(script);
+}
- setLive2dDefine(resourcesPath, backImageName, modelDirs, canvasId, modelIndex);
- initLive2d();
- initKanbanMoveAction(dotNetHelper);
- initButtonGroupMoveAction(dotNetHelper);
- initDialogBoxMoveAction(dotNetHelper);
- listenLive2dCanvasChange();
+function initKanbanLive2D(dotNetHelper, modelDir, modelIndex, resourcesPath) {
- console.log("初始化Live2D")
+ // 将注释节点插入到 HTML 文档中的 body 元素中
+ var comment = document.createComment("看板娘live2d依赖库");
+ document.body.appendChild(comment);
+ // 加载js
+ loadScript('https://app.cngal.org/live2d/js/live2dcubismcore.min.js', function () {
+ //loadScript('https://app.cngal.org/live2d/js/bundle.js', function () {
+ loadScript('http://localhost:5000/Samples/TypeScript/Demo/dist/bundle.js', function () {
+ // 再初始化l2d
+ var modelDirs = modelDir.split(',');
+ live2d_dotNetHelper = dotNetHelper;
+
+ setLive2dDefine(resourcesPath, backImageName, modelDirs, canvasId, modelIndex);
+ initLive2d();
+ initKanbanMoveAction(dotNetHelper);
+ initButtonGroupMoveAction(dotNetHelper);
+ initDialogBoxMoveAction(dotNetHelper);
+ listenLive2dCanvasChange();
+
+ console.log("初始化Live2D")
+ })
+ })
}
// 初始化完成回调
@@ -1201,7 +1231,7 @@ function initButtonGroupMoveAction(dotNetHelper) {
//检查对话框是否被按下
if (dialogbox_mousedown) {
return;
- }
+ }
//执行逻辑
deltaLeft = touch.clientX - touch.target.offsetLeft;
@@ -1258,7 +1288,7 @@ function initButtonGroupMoveAction(dotNetHelper) {
}
// 移动触发事件要放在,区域控制元素上
- window.addEventListener('mousemove', mousemove_fun )
+ window.addEventListener('mousemove', mousemove_fun)
window.addEventListener('touchmove', mousemove_fun, { passive: false })
const mouseup_fun = function () {
@@ -1298,7 +1328,7 @@ function initDialogBoxMoveAction(dotNetHelper) {
/*
* @des deltaLeft 即移动过程中不变的值
*/
-
+
var touch;
if (event.touches) {
touch = event.touches[0];//多个鼠标|手指事件取第一个
@@ -1372,7 +1402,7 @@ function initDialogBoxMoveAction(dotNetHelper) {
}
// 移动触发事件要放在,区域控制元素上
- window.addEventListener('mousemove', mousemove_fun )
+ window.addEventListener('mousemove', mousemove_fun)
window.addEventListener('touchmove', mousemove_fun, { passive: false })
const mouseup_fun = function () {
diff --git a/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.min.js b/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.min.js
index ba28b6ce48..df7ac8e746 100644
--- a/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.min.js
+++ b/CnGalWebSite/CnGalWebSite.Shared/wwwroot/js/bundle.min.js
@@ -1 +1 @@
-function slotMachineTrigger(n){let t=document.querySelector("div.slot1 > ul"),i=document.querySelector("div.slot2 > ul"),r=document.querySelector("div.slot3 > ul"),u=document.querySelector("div.slot4 > ul");if(t.querySelectorAll("li").length>1){let n=Array.prototype.slice.call(t.querySelectorAll("li")).slice(0,30),f=Array.prototype.slice.call(i.querySelectorAll("li")).slice(0,30),e=Array.prototype.slice.call(r.querySelectorAll("li")).slice(0,30),o=Array.prototype.slice.call(u.querySelectorAll("li")).slice(0,30);for(let i of n)t.removeChild(i);for(let n of f)i.removeChild(n);for(let n of e)r.removeChild(n);for(let n of o)u.removeChild(n);t.classList.remove("slotAnimation");i.classList.remove("slotAnimation");r.classList.remove("slotAnimation");u.classList.remove("slotAnimation");t.style.transform="translateY(0px)";i.style.transform="translateY(0px)";r.style.transform="translateY(0px)";u.style.transform="translateY(0px)";void document.getElementById("slot1").offsetHeight;void document.getElementById("slot2").offsetHeight;void document.getElementById("slot3").offsetHeight;void document.getElementById("slot4").offsetHeight}for(let n=0;n<29;n++){let s=Math.floor(Math.random()*10),h=Math.floor(Math.random()*10),c=Math.floor(Math.random()*10),l=Math.floor(Math.random()*10),n=document.createElement("li"),f=document.createElement("li"),e=document.createElement("li"),o=document.createElement("li");n.textContent=s;f.textContent=h;e.textContent=c;o.textContent=l;t.appendChild(n);i.appendChild(f);r.appendChild(e);u.appendChild(o)}for(n=n.toString();n.length<4;)n="0"+n;let f=document.createElement("li"),e=document.createElement("li"),o=document.createElement("li"),s=document.createElement("li");f.textContent=n[0];e.textContent=n[1];o.textContent=n[2];s.textContent=n[3];t.appendChild(f);i.appendChild(e);r.appendChild(o);u.appendChild(s);t.classList.add("slotAnimation");i.classList.add("slotAnimation");r.classList.add("slotAnimation");u.classList.add("slotAnimation");let h=function(){t.style.transform="translateY(-4890px)";i.style.transform="translateY(-4890px)";r.style.transform="translateY(-4890px)";u.style.transform="translateY(-4890px)"};setTimeout(h,1e3)}function initInfiniteScroll(n){dotNetHelper=n;onscrolling=!1;window.onscroll=async function(){if(onscrolling!=!0&&dotNetHelper!=null){onscrolling=!0;var n=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,i=window.innerHeight||Math.min(document.documentElement.clientHeight,document.body.clientHeight);i+t+400>=n&&dotNetHelper!=null&&await dotNetHelper.invokeMethodAsync("LoadMore");onscrolling=!1}}}function deinitInfiniteScroll(){dotNetHelper=null;window.onscroll=null}function getElementScrollLeft(n){return document.getElementById(n).scrollLeft}function getElementScrollWidth(n){return document.getElementById(n).scrollWidth}function getBodyClientWidth(){return document.body.clientWidth}function setElementScrollLeft(n,t){document.getElementById(n).scrollLeft=t}function getOffsetSum(n){for(var t=0,i=0;n;)t+=n.offsetTop,i+=n.offsetLeft,n=n.offsetParent;return{top:t,left:i}}function getOffsetRect(n){var r=n.getBoundingClientRect(),t=document.body,i=document.documentElement,u=window.pageYOffset||i.scrollTop||t.scrollTop,f=window.pageXOffset||i.scrollLeft||t.scrollLeft,e=i.clientTop||t.clientTop,o=i.clientLeft||t.clientLeft,s=r.top+u-e,h=r.left+f-o;return{top:Math.round(s),left:Math.round(h)}}function getOffset(n){return n.getBoundingClientRect?getOffsetRect(n):getOffsetSum(n)}function getElementLeftOfLayout(n){var t=document.getElementById(n);return getOffset(t).left}function dragMoveX(n){let t=document.querySelector(n);t.onmousedown=n=>{let i={scrollLeft:t.scrollLeft,scrollTop:t.scrollTop},r={x:n.clientX,y:n.clientY};t.onmousemove=n=>{let u={x:r.x-n.clientX,y:r.y-n.clientY};t.scrollLeft=i.scrollLeft+u.x;t.scrollTop=i.scrollTop+u.y};document.onmouseup=()=>{t.onmousemove=null,document.onmouseup=null}}}function focusOnElement(n){document.getElementById(n).focus()}function openNewPage(n){window.open(n,"_blank")}function navigateTo(n){window.open(n,"_self")}function getResponseFromRecaptcha(n){return grecaptcha.getResponse(n)}function initRecaptcha(){return grecaptcha.render("robot",{sitekey:"6LedTqcbAAAAADER0LFm7wmLcdyc7BtTuD8kFa74",theme:"light",size:"normal"})}function initDebugTool(){eruda.init();console.log("成功启动调试工具")}function initMouseJs(){var n=document.createElement("script");n.setAttribute("type","text/javascript");n.setAttribute("src","js/mouse.js");document.body.appendChild(n)}function highlightAllCode(){hljs.highlightAll()}function trackEvent(n,t,i,r,u,f){umami.track(n,{type:t,objectName:i,objectId:r,userId:u,note:f})}function initVditorContext(n,t){t.Vditor.vditor.options.upload.success=(t,i)=>{n.invokeMethodAsync("HandleUploadSuccessAsync",i)};t.Vditor.vditor.options.upload.linkToImgFormat=t=>{n.invokeMethodAsync("HandleLinkToImgFormatAsync",t)}}function initUploadButton(n,t,i){jQuery(t).change(function(){for(var r,u,t=0;t<\/i> 上传中...')},success:function(t){n.invokeMethodAsync("UpLoaded",t.image.url+"||"+r.size);jQuery(i).html('<\/i> 上传成功,继续上传')},error:function(){jQuery(i).html('<\/i> 上传失败,重新上传')}})})}function initTencentCAPTCHA(n){var t=new TencentCaptcha("2049507573",function(t){t.ret===0?n.invokeMethodAsync("OnChecked",t.ticket,t.randstr):n.invokeMethodAsync("OnCancel")});t.show()}function setCustomVar(n,t){_czc.push(["_setCustomVar",n,t,1])}function addfavorite(){var n=navigator.userAgent.toLowerCase().indexOf("mac")!=-1?"Command/Cmd":"CTRL";try{if(document.all)try{window.external.toString();window.alert("国内开发的360浏览器等不支持主动加入收藏。\n您可以尝试通过浏览器菜单栏 或快捷键 ctrl+D 试试。")}catch(t){try{window.external.addFavorite(window.location,document.title)}catch(t){window.external.addToFavoritesBar(window.location,document.title)}}else window.sidebar?window.sidebar.addPanel(document.title,window.location,""):alert("您可以尝试通过快捷键"+n+" + D 加入到收藏夹~")}catch(t){window.alert("因为IE浏览器存在bug,添加收藏失败!\n解决办法:在注册表中查找\n HKEY_CLASSES_ROOT\\TypeLib\\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\\1.1\\0\\win32 \n将 C:\\WINDOWS\\system32\\shdocvw.dll 改为 C:\\WINDOWS\\system32\\ieframe.dll ")}}function initGeetestCAPTCHA(n,t,i,r){initGeetest({gt:t,challenge:i,offline:!r,new_captcha:!0,width:"100%"},function(t){t.appendTo("#captcha-box");t.onSuccess(function(){var i=t.getValidate();n.invokeMethodAsync("OnSuccessed",i.geetest_challenge,i.geetest_validate,i.geetest_seccode)})})}function goback(){window.location.href="javascript:history.go(-1)"}function initGeetestBindCAPTCHA(n,t,i,r){initGeetest({gt:t,challenge:i,offline:!r,new_captcha:!0,product:"bind"},function(t){t.onReady(function(){t.verify()});t.onSuccess(function(){var i=t.getValidate();n.invokeMethodAsync("OnChecked",i.geetest_challenge,i.geetest_validate,i.geetest_seccode)});t.onError(function(){n.invokeMethodAsync("OnCancel")});t.onClose(function(){n.invokeMethodAsync("OnCancel")})})}function showGeetestBindCAPTCHA(n){capObj==null&&n.invokeMethodAsync("OnCancel")}function isMobile(){var n=navigator.userAgent;return n.indexOf("Android")>-1||n.indexOf("iPhone")>-1||n.indexOf("iPod")>-1||n.indexOf("Symbian")>-1?!0:!1}function setStructuredData(n){structuredData.innerText=n}function playAudio(n){var t=document.getElementById("bgMusic");n!=null&&(t.currentTime==0||t.currentTime==t.duration||t.src!=n)?(t.src=n,t.play()):(t.pause(),t.currentTime=0)}function domToImageUrl(n,t){domtoimage.toBlob(document.getElementById(n)).then(function(n){window.saveAs(n,t)})}function domToImageUrl(n,t){html2canvas(document.getElementById(n),{useCORS:!0}).then(n=>{const i=n.toDataURL("image/jpg");exportPicture(i,t)})}function exportPicture(n,t){const i=document.createElement("a");i.style.display="none";i.href=n;i.download=decodeURI(t);document.body.appendChild(i);i.click();document.body.removeChild(i)}function checkSystemThemeIsDark(){const n=window.matchMedia("(prefers-color-scheme: light)");return n.matches?!1:!0}function getUserAgent(){return navigator.userAgent}function error_check(){var t=window.getComputedStyle(document.getElementById("blazor-error-ui")).display,n;if(t=="none"){counter++;counter>60&&localStorage.setItem("error-counter",0);return}(n=localStorage.getItem("error-counter"),n++,localStorage.setItem("error-counter",n),n>3)||onreload()}function onreload(){location.reload()}function browserVersion(){var n=navigator.userAgent,t=n.indexOf("compatible")>-1&&n.indexOf("MSIE")>-1,i=n.indexOf("Trident")>-1&&n.indexOf("rv:11.0")>-1,r=n.indexOf("Edge")>-1&&!t,u=n.indexOf("Firefox")>-1,f=n.indexOf("Opera")>-1||n.indexOf("OPR")>-1,e=n.indexOf("Chrome")>-1&&n.indexOf("Safari")>-1&&n.indexOf("Edge")==-1&&n.indexOf("OPR")==-1,o=n.indexOf("Safari")>-1&&n.indexOf("Chrome")==-1&&n.indexOf("Edge")==-1&&n.indexOf("OPR")==-1;return t?1:i?1:r?n.split("Edge/")[1].split(".")[0]<91?1:0:u?n.split("Firefox/")[1].split(".")[0]<72?1:0:f?n.split("OPR/")[1].split(".")[0]<70?1:0:e?n.split("Chrome/")[1].split(".")[0]<91?1:0:o?n.split("Safari/")[1].split(".")[0]<15?1:0:-1}function initKanbanLive2D(n,t,i,r){var u=t.split(",");live2d_dotNetHelper=n;setLive2dDefine(r,backImageName,u,canvasId,i);initLive2d();initKanbanMoveAction(n);initButtonGroupMoveAction(n);initDialogBoxMoveAction(n);listenLive2dCanvasChange();console.log("初始化Live2D")}function getWindowSize(){return{Height:window.innerHeight,Width:window.innerWidth}}function getTimeNow(){var n=new Date;return n.getTime()}function initKanbanMoveAction(n){const t=document.getElementById("kanban-live2d");let i=!1,s=0,h=0,u,f,e=0,o=0;var r;const c=function(n){var e;e=n.touches?n.touches[0]:n;timeStart=getTimeNow();kanban_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){if(clearInterval(r),buttongroup_mousedown)return;if(dialogbox_mousedown)return;s=e.clientX-e.target.offsetLeft;h=e.clientY-e.target.offsetTop;var n=t.getBoundingClientRect();u=n.x;f=n.y;i=!0;document.body.classList.add("user-select-none");switchLiv2DExpression("expression1")}},10)};t.addEventListener("mousedown",c);t.addEventListener("touchstart",c,{passive:!1});const l=function(n){var c,l;if(kanban_mousedown=!1,c=n.touches?n.touches[0]:n,i){n.preventDefault();const i=c.clientX,r=c.clientY;e=i-s;o=r-h;l=t.getBoundingClientRect();t.setAttribute("style",`left:${u+e}px; top:${f+o}px; width: ${l.width}px; height: ${l.height}px;`)}else clearInterval(r)};window.addEventListener("mousemove",l);window.addEventListener("touchmove",l,{passive:!1});const a=function(){i?(i=!1,n.invokeMethodAsync("SetKanbanPosition",u+e,f+o),document.body.classList.remove("user-select-none"),switchLiv2DExpression()):clearInterval(r)};window.addEventListener("mouseup",a);window.addEventListener("touchend",a,{passive:!1})}function initButtonGroupMoveAction(n){const u=document.getElementById("kanban-live2d"),t=document.getElementById("kanban-button-group");let i=!1,a=0,v=0,o,s,f=0,e=0;var r;const h=function(n){var f;f=n.touches?n.touches[0]:n;timeStart=getTimeNow();buttongroup_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){if(clearInterval(r),dialogbox_mousedown)return;a=f.clientX-f.target.offsetLeft;v=f.clientY-f.target.offsetTop;var n=u.getBoundingClientRect(),e=t.getBoundingClientRect();o=n.x;s=n.y;i=!0;document.body.classList.add("user-select-none")}},10)};t.addEventListener("mousedown",h);t.addEventListener("touchstart",h,{passive:!1});const c=function(n){var h,c;if(i){h=n.touches?n.touches[0]:n;n.preventDefault();const i=h.clientX,r=h.clientY;f=i-o;e=r-s;c=u.getBoundingClientRect();t.setAttribute("style",`left:${f}px; top:${e}px;`)}else clearInterval(r)};window.addEventListener("mousemove",c);window.addEventListener("touchmove",c,{passive:!1});const l=function(){buttongroup_mousedown=!1;var o=u.getBoundingClientRect(),s=t.getBoundingClientRect();i?(i=!1,console.log("mouseup"),n.invokeMethodAsync("SetButtonGroupPosition",f,o.height-e-s.height),document.body.classList.remove("user-select-none")):clearInterval(r)};window.addEventListener("mouseup",l);window.addEventListener("touchend",l,{passive:!1})}function initDialogBoxMoveAction(n){const u=document.getElementById("kanban-live2d"),t=document.getElementById("kanban-dialogbox");let i=!1,o=0,s=0,h,c,f=0,e=0;var r;const l=function(n){var f;f=n.touches?n.touches[0]:n;timeStart=getTimeNow();dialogbox_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){clearInterval(r);o=f.clientX-f.target.offsetLeft;s=f.clientY-f.target.offsetTop;var n=u.getBoundingClientRect(),e=t.getBoundingClientRect();h=n.x-e.x;c=n.y-e.y;i=!0;document.body.classList.add("user-select-none")}},10)};t.addEventListener("mousedown",l);t.addEventListener("touchstart",l,{passive:!1});const a=function(n){var l,a;if(i){l=n.touches?n.touches[0]:n;n.preventDefault();const i=l.clientX,r=l.clientY;f=i-o-h;e=r-s-c;a=u.getBoundingClientRect();t.setAttribute("style",`left:${f}px; top:${e}px;`)}else clearInterval(r)};window.addEventListener("mousemove",a);window.addEventListener("touchmove",a,{passive:!1});const v=function(){if(dialogbox_mousedown=!1,i){i=!1;console.log("mouseup");var o=u.getBoundingClientRect(),s=t.getBoundingClientRect();n.invokeMethodAsync("SetDialogBoxPosition",f,o.height-e-s.height);document.body.classList.remove("user-select-none")}else clearInterval(r)};window.addEventListener("mouseup",v);window.addEventListener("touchend",v,{passive:!1})}function listenLive2dCanvasChange(){var n=-1,t=-1,i=setInterval(function(){const u=document.getElementById(canvasId);if(u){var r=u.getBoundingClientRect();n>0&&t>0?(n!=r.width||t!=r.height)&&resizeLive2d():(n=r.width,t=r.height)}else clearInterval(i)},500)}function switchLiv2DModel(n){var t=getLive2dManager();t.changeScene(n)}function switchLiv2DExpression(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setExpression(n):t.cleanExpressions()}function switchLiv2DClothes(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setClothes(n):t.cleanClothes()}function switchLiv2DStockings(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setStockings(n):t.cleanStockings()}function switchLiv2DShoes(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setShoes(n):t.cleanShoes()}function switchLiv2DMotion(n,t){var r=getLive2dManager(),i=r.getCurrentModel();t?i.startMotion(n,t,3):i.startRandomMotion(n,3)}function initMouseOverEvent(n,t){l2d_dotNetHelper_event=n;console.log("初始化鼠标悬停事件",t);let i;window.addEventListener("mouseover",n=>{for(let{selector:r,id:u}of t)if(n.target.closest(r)){if(i===r)return;i=r;console.log("触发鼠标悬停",r);l2d_dotNetHelper_event.invokeMethodAsync("TriggerMouseOverEventAsync",u);return}})}function scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}function startKanbanImageGeneration(n){document.getElementById("live2d").toBlob(t=>{let i=URL.createObjectURL(t);console.log(i);n.invokeMethodAsync("OnKanbanImageGenerated",i)})}var onscrolling=!1,dotNetHelper,structuredData,root_s,int,counter,backImageName,canvasId,live2d_dotNetHelper,l2d_dotNetHelper_event;(function(n){"use strict";function r(n){this._obj=n}function e(n){var t=this;new r(n)._each(function(n,i){t[n]=i})}if(typeof n=="undefined")throw new Error("Geetest requires browser environment");var u=n.document,c=n.Math,l=u.getElementsByTagName("head")[0];r.prototype={_each:function(n){var t=this._obj;for(var i in t)t.hasOwnProperty(i)&&n(i,t[i]);return this}};e.prototype={api_server:"api.geetest.com",protocol:"http://",typePath:"/gettype.php",fallback_config:{slide:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"slide",slide:"/static/js/geetest.0.0.0.js"},fullpage:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"fullpage",fullpage:"/static/js/fullpage.0.0.0.js"}},_get_fallback_config:function(){var n=this;return o(n.type)?n.fallback_config[n.type]:n.new_captcha?n.fallback_config.fullpage:n.fallback_config.slide},_extend:function(n){var t=this;new r(n)._each(function(n,i){t[n]=i})}};var a=function(n){return typeof n=="number"},o=function(n){return typeof n=="string"},v=function(n){return typeof n=="boolean"},s=function(n){return typeof n=="object"&&n!==null},y=function(n){return typeof n=="function"},p=/Mobi/i.test(navigator.userAgent),w=p?3:0,t={},i={},b=function(){var n=new Date,e=n.getFullYear(),t=n.getMonth()+1,i=n.getDate(),r=n.getHours(),u=n.getMinutes(),f=n.getSeconds();return t>=1&&t<=9&&(t="0"+t),i>=0&&i<=9&&(i="0"+i),r>=0&&r<=9&&(r="0"+r),u>=0&&u<=9&&(u="0"+u),f>=0&&f<=9&&(f="0"+f),e+"-"+t+"-"+i+" "+r+":"+u+":"+f},k=function(){return parseInt(c.random()*1e4)+(new Date).valueOf()},d=function(n,t){var i=u.createElement("script"),r;i.charset="UTF-8";i.async=!0;/static\.geetest\.com/g.test(n)&&(i.crossOrigin="anonymous");i.onerror=function(){t(!0)};r=!1;i.onload=i.onreadystatechange=function(){r||i.readyState&&"loaded"!==i.readyState&&"complete"!==i.readyState||(r=!0,setTimeout(function(){t(!1)},0))};i.src=n;l.appendChild(i)},g=function(n){return n.replace(/^https?:\/\/|\/$/g,"")},nt=function(n){return n=n.replace(/\/+/g,"/"),n.indexOf("/")!==0&&(n="/"+n),n},tt=function(n){if(!n)return"";var t="?";return new r(n)._each(function(n,i){(o(i)||a(i)||v(i))&&(t=t+encodeURIComponent(n)+"="+encodeURIComponent(i)+"&")}),t==="?"&&(t=""),t.replace(/&$/,"")},it=function(n,t,i,r){t=g(t);var u=nt(i)+tt(r);return t&&(u=n+t+u),u},f=function(n,t,i,r,u,f,e){var o=function(s){var h=it(i,r[s],u,f);d(h,function(f){if(f)if(s>=r.length-1){if(e(!0),t){n.error_code=508;var h=i+r[s]+u;ut(n,h)}}else o(s+1);else e(!1)})};o(0)},rt=function(t,i,r,u){if(s(r.getLib)){r._extend(r.getLib);u(r);return}if(r.offline){u(r._get_fallback_config());return}var e="geetest_"+k();n[e]=function(t){t.status=="success"?u(t.data):t.status?u(r._get_fallback_config()):u(t);n[e]=undefined;try{delete n[e]}catch(i){}};f(r,!0,r.protocol,t,i,{gt:r.gt,callback:e},function(n){n&&u(r._get_fallback_config())})},ut=function(n,t){f(n,!1,n.protocol,["monitor.geetest.com"],"/monitor/send",{time:b(),captcha_id:n.gt,challenge:n.challenge,pt:w,exception_url:t,error_code:n.error_code},function(){})},h=function(n,t){var i={networkError:"网络错误",gtTypeError:"gt字段不是字符串类型"};if(typeof t.onError=="function")t.onError(i[n]);else throw new Error(i[n]);},ft=function(){return n.Geetest||u.getElementById("gt_lib")};ft()&&(i.slide="loaded");n.initGeetest=function(r,u){var o=new e(r);r.https?o.protocol="https://":r.protocol||(o.protocol=n.location.protocol+"//");(r.gt==="050cffef4ae57b5d5e529fea9540b0d1"||r.gt==="3bd38408ae4af923ed36e13819b14d42")&&(o.apiserver="yumchina.geetest.com/",o.api_server="yumchina.geetest.com");r.gt&&(n.GeeGT=r.gt);r.challenge&&(n.GeeChallenge=r.challenge);s(r.getType)&&o._extend(r.getType);rt([o.api_server||o.apiserver],o.typePath,o,function(r){var e=r.type,c=function(){o._extend(r);u(new n.Geetest(o))},s;t[e]=t[e]||[];s=i[e]||"init";s==="init"?(i[e]="loading",t[e].push(c),f(o,!0,o.protocol,r.static_servers||r.domains,r[e]||r.path,null,function(n){var u,r,s,f;if(n)i[e]="fail",h("networkError",o);else{for(i[e]="loaded",u=t[e],r=0,s=u.length;rnew Promise(t=>setTimeout(t,n));structuredData=document.createElement("script");structuredData.type="application/ld+json";root_s=document.head;root_s.parentNode.insertBefore(structuredData,root_s);window.downloadFileFromStream=async(n,t)=>{const u=await t.arrayBuffer(),f=new Blob([u]),r=URL.createObjectURL(f),i=document.createElement("a");i.href=r;i.download=n==null?"":n;i.click();i.remove();URL.revokeObjectURL(r)};int=self.setInterval("error_check()",500);counter=0;browserVersion()==1&&alert("浏览器版本过低,网页可能无法正确展示\n你可以尝试安装 Edge,Chorme,Firefox 的最新版本后重试\n有任何疑问可以加群 761794704 进行反馈"),function(n,t,i,r,u,f,e){window.location.href.includes("cngal")&&(n[i]=n[i]||function(){(n[i].q=n[i].q||[]).push(arguments)},f=t.createElement(r),f.async=1,f.src="https://www.clarity.ms/tag/"+u,e=t.getElementsByTagName(r)[0],e.parentNode.insertBefore(f,e))}(window,document,"clarity","script","buu31hy6os");backImageName="";canvasId="live2d";window.Live2dInitCallback=function(){live2d_dotNetHelper.invokeMethodAsync("Live2dInitCallback")};var kanban_mousedown=!1,buttongroup_mousedown=!1,dialogbox_mousedown=!1;window.Live2dHitHeadEvent=function(){l2d_dotNetHelper_event.invokeMethodAsync("TriggerCustomEventAsync","摸头")};window.Live2dHitBodyEvent=function(){l2d_dotNetHelper_event.invokeMethodAsync("TriggerCustomEventAsync","触碰身体")};
\ No newline at end of file
+function slotMachineTrigger(n){let t=document.querySelector("div.slot1 > ul"),i=document.querySelector("div.slot2 > ul"),r=document.querySelector("div.slot3 > ul"),u=document.querySelector("div.slot4 > ul");if(t.querySelectorAll("li").length>1){let n=Array.prototype.slice.call(t.querySelectorAll("li")).slice(0,30),f=Array.prototype.slice.call(i.querySelectorAll("li")).slice(0,30),e=Array.prototype.slice.call(r.querySelectorAll("li")).slice(0,30),o=Array.prototype.slice.call(u.querySelectorAll("li")).slice(0,30);for(let i of n)t.removeChild(i);for(let n of f)i.removeChild(n);for(let n of e)r.removeChild(n);for(let n of o)u.removeChild(n);t.classList.remove("slotAnimation");i.classList.remove("slotAnimation");r.classList.remove("slotAnimation");u.classList.remove("slotAnimation");t.style.transform="translateY(0px)";i.style.transform="translateY(0px)";r.style.transform="translateY(0px)";u.style.transform="translateY(0px)";void document.getElementById("slot1").offsetHeight;void document.getElementById("slot2").offsetHeight;void document.getElementById("slot3").offsetHeight;void document.getElementById("slot4").offsetHeight}for(let n=0;n<29;n++){let s=Math.floor(Math.random()*10),h=Math.floor(Math.random()*10),c=Math.floor(Math.random()*10),l=Math.floor(Math.random()*10),n=document.createElement("li"),f=document.createElement("li"),e=document.createElement("li"),o=document.createElement("li");n.textContent=s;f.textContent=h;e.textContent=c;o.textContent=l;t.appendChild(n);i.appendChild(f);r.appendChild(e);u.appendChild(o)}for(n=n.toString();n.length<4;)n="0"+n;let f=document.createElement("li"),e=document.createElement("li"),o=document.createElement("li"),s=document.createElement("li");f.textContent=n[0];e.textContent=n[1];o.textContent=n[2];s.textContent=n[3];t.appendChild(f);i.appendChild(e);r.appendChild(o);u.appendChild(s);t.classList.add("slotAnimation");i.classList.add("slotAnimation");r.classList.add("slotAnimation");u.classList.add("slotAnimation");let h=function(){t.style.transform="translateY(-4890px)";i.style.transform="translateY(-4890px)";r.style.transform="translateY(-4890px)";u.style.transform="translateY(-4890px)"};setTimeout(h,1e3)}function initInfiniteScroll(n){dotNetHelper=n;onscrolling=!1;window.onscroll=async function(){if(onscrolling!=!0&&dotNetHelper!=null){onscrolling=!0;var n=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,i=window.innerHeight||Math.min(document.documentElement.clientHeight,document.body.clientHeight);i+t+400>=n&&dotNetHelper!=null&&await dotNetHelper.invokeMethodAsync("LoadMore");onscrolling=!1}}}function deinitInfiniteScroll(){dotNetHelper=null;window.onscroll=null}function getElementScrollLeft(n){return document.getElementById(n).scrollLeft}function getElementScrollWidth(n){return document.getElementById(n).scrollWidth}function getBodyClientWidth(){return document.body.clientWidth}function setElementScrollLeft(n,t){document.getElementById(n).scrollLeft=t}function getOffsetSum(n){for(var t=0,i=0;n;)t+=n.offsetTop,i+=n.offsetLeft,n=n.offsetParent;return{top:t,left:i}}function getOffsetRect(n){var r=n.getBoundingClientRect(),t=document.body,i=document.documentElement,u=window.pageYOffset||i.scrollTop||t.scrollTop,f=window.pageXOffset||i.scrollLeft||t.scrollLeft,e=i.clientTop||t.clientTop,o=i.clientLeft||t.clientLeft,s=r.top+u-e,h=r.left+f-o;return{top:Math.round(s),left:Math.round(h)}}function getOffset(n){return n.getBoundingClientRect?getOffsetRect(n):getOffsetSum(n)}function getElementLeftOfLayout(n){var t=document.getElementById(n);return getOffset(t).left}function dragMoveX(n){let t=document.querySelector(n);t.onmousedown=n=>{let i={scrollLeft:t.scrollLeft,scrollTop:t.scrollTop},r={x:n.clientX,y:n.clientY};t.onmousemove=n=>{let u={x:r.x-n.clientX,y:r.y-n.clientY};t.scrollLeft=i.scrollLeft+u.x;t.scrollTop=i.scrollTop+u.y};document.onmouseup=()=>{t.onmousemove=null,document.onmouseup=null}}}function focusOnElement(n){document.getElementById(n).focus()}function openNewPage(n){window.open(n,"_blank")}function navigateTo(n){window.open(n,"_self")}function getResponseFromRecaptcha(n){return grecaptcha.getResponse(n)}function initRecaptcha(){return grecaptcha.render("robot",{sitekey:"6LedTqcbAAAAADER0LFm7wmLcdyc7BtTuD8kFa74",theme:"light",size:"normal"})}function initDebugTool(){eruda.init();console.log("成功启动调试工具")}function initMouseJs(){var n=document.createElement("script");n.setAttribute("type","text/javascript");n.setAttribute("src","js/mouse.js");document.body.appendChild(n)}function highlightAllCode(){hljs.highlightAll()}function trackEvent(n,t,i,r,u,f){umami.track(n,{type:t,objectName:i,objectId:r,userId:u,note:f})}function initVditorContext(n,t){t.Vditor.vditor.options.upload.success=(t,i)=>{n.invokeMethodAsync("HandleUploadSuccessAsync",i)};t.Vditor.vditor.options.upload.linkToImgFormat=t=>{n.invokeMethodAsync("HandleLinkToImgFormatAsync",t)}}function initUploadButton(n,t,i){jQuery(t).change(function(){for(var r,u,t=0;t<\/i> 上传中...')},success:function(t){n.invokeMethodAsync("UpLoaded",t.image.url+"||"+r.size);jQuery(i).html('<\/i> 上传成功,继续上传')},error:function(){jQuery(i).html('<\/i> 上传失败,重新上传')}})})}function initTencentCAPTCHA(n){var t=new TencentCaptcha("2049507573",function(t){t.ret===0?n.invokeMethodAsync("OnChecked",t.ticket,t.randstr):n.invokeMethodAsync("OnCancel")});t.show()}function setCustomVar(n,t){_czc.push(["_setCustomVar",n,t,1])}function addfavorite(){var n=navigator.userAgent.toLowerCase().indexOf("mac")!=-1?"Command/Cmd":"CTRL";try{if(document.all)try{window.external.toString();window.alert("国内开发的360浏览器等不支持主动加入收藏。\n您可以尝试通过浏览器菜单栏 或快捷键 ctrl+D 试试。")}catch(t){try{window.external.addFavorite(window.location,document.title)}catch(t){window.external.addToFavoritesBar(window.location,document.title)}}else window.sidebar?window.sidebar.addPanel(document.title,window.location,""):alert("您可以尝试通过快捷键"+n+" + D 加入到收藏夹~")}catch(t){window.alert("因为IE浏览器存在bug,添加收藏失败!\n解决办法:在注册表中查找\n HKEY_CLASSES_ROOT\\TypeLib\\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\\1.1\\0\\win32 \n将 C:\\WINDOWS\\system32\\shdocvw.dll 改为 C:\\WINDOWS\\system32\\ieframe.dll ")}}function initGeetestCAPTCHA(n,t,i,r){initGeetest({gt:t,challenge:i,offline:!r,new_captcha:!0,width:"100%"},function(t){t.appendTo("#captcha-box");t.onSuccess(function(){var i=t.getValidate();n.invokeMethodAsync("OnSuccessed",i.geetest_challenge,i.geetest_validate,i.geetest_seccode)})})}function goback(){window.location.href="javascript:history.go(-1)"}function initGeetestBindCAPTCHA(n,t,i,r){initGeetest({gt:t,challenge:i,offline:!r,new_captcha:!0,product:"bind"},function(t){t.onReady(function(){t.verify()});t.onSuccess(function(){var i=t.getValidate();n.invokeMethodAsync("OnChecked",i.geetest_challenge,i.geetest_validate,i.geetest_seccode)});t.onError(function(){n.invokeMethodAsync("OnCancel")});t.onClose(function(){n.invokeMethodAsync("OnCancel")})})}function showGeetestBindCAPTCHA(n){capObj==null&&n.invokeMethodAsync("OnCancel")}function isMobile(){var n=navigator.userAgent;return n.indexOf("Android")>-1||n.indexOf("iPhone")>-1||n.indexOf("iPod")>-1||n.indexOf("Symbian")>-1?!0:!1}function setStructuredData(n){structuredData.innerText=n}function playAudio(n){var t=document.getElementById("bgMusic");n!=null&&(t.currentTime==0||t.currentTime==t.duration||t.src!=n)?(t.src=n,t.play()):(t.pause(),t.currentTime=0)}function domToImageUrl(n,t){domtoimage.toBlob(document.getElementById(n)).then(function(n){window.saveAs(n,t)})}function domToImageUrl(n,t){html2canvas(document.getElementById(n),{useCORS:!0}).then(n=>{const i=n.toDataURL("image/jpg");exportPicture(i,t)})}function exportPicture(n,t){const i=document.createElement("a");i.style.display="none";i.href=n;i.download=decodeURI(t);document.body.appendChild(i);i.click();document.body.removeChild(i)}function checkSystemThemeIsDark(){const n=window.matchMedia("(prefers-color-scheme: light)");return n.matches?!1:!0}function getUserAgent(){return navigator.userAgent}function error_check(){var t=window.getComputedStyle(document.getElementById("blazor-error-ui")).display,n;if(t=="none"){counter++;counter>60&&localStorage.setItem("error-counter",0);return}(n=localStorage.getItem("error-counter"),n++,localStorage.setItem("error-counter",n),n>3)||onreload()}function onreload(){location.reload()}function browserVersion(){var n=navigator.userAgent,t=n.indexOf("compatible")>-1&&n.indexOf("MSIE")>-1,i=n.indexOf("Trident")>-1&&n.indexOf("rv:11.0")>-1,r=n.indexOf("Edge")>-1&&!t,u=n.indexOf("Firefox")>-1,f=n.indexOf("Opera")>-1||n.indexOf("OPR")>-1,e=n.indexOf("Chrome")>-1&&n.indexOf("Safari")>-1&&n.indexOf("Edge")==-1&&n.indexOf("OPR")==-1,o=n.indexOf("Safari")>-1&&n.indexOf("Chrome")==-1&&n.indexOf("Edge")==-1&&n.indexOf("OPR")==-1;return t?1:i?1:r?n.split("Edge/")[1].split(".")[0]<91?1:0:u?n.split("Firefox/")[1].split(".")[0]<72?1:0:f?n.split("OPR/")[1].split(".")[0]<70?1:0:e?n.split("Chrome/")[1].split(".")[0]<91?1:0:o?n.split("Safari/")[1].split(".")[0]<15?1:0:-1}function loadScript(n,t){let i=document.createElement("script");i.readyState?i.onreadystatechange=function(){(i.readyState==="loaded"||i.readyState==="complete")&&(i.onreadystatechange=null,t())}:i.onload=function(){t()};i.src=n;document.body.appendChild(i)}function initKanbanLive2D(n,t,i,r){var u=document.createComment("看板娘live2d依赖库");document.body.appendChild(u);loadScript("https://app.cngal.org/live2d/js/live2dcubismcore.min.js",function(){loadScript("http://localhost:5000/Samples/TypeScript/Demo/dist/bundle.js",function(){var u=t.split(",");live2d_dotNetHelper=n;setLive2dDefine(r,backImageName,u,canvasId,i);initLive2d();initKanbanMoveAction(n);initButtonGroupMoveAction(n);initDialogBoxMoveAction(n);listenLive2dCanvasChange();console.log("初始化Live2D")})})}function getWindowSize(){return{Height:window.innerHeight,Width:window.innerWidth}}function getTimeNow(){var n=new Date;return n.getTime()}function initKanbanMoveAction(n){const t=document.getElementById("kanban-live2d");let i=!1,s=0,h=0,u,f,e=0,o=0;var r;const c=function(n){var e;e=n.touches?n.touches[0]:n;timeStart=getTimeNow();kanban_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){if(clearInterval(r),buttongroup_mousedown)return;if(dialogbox_mousedown)return;s=e.clientX-e.target.offsetLeft;h=e.clientY-e.target.offsetTop;var n=t.getBoundingClientRect();u=n.x;f=n.y;i=!0;document.body.classList.add("user-select-none");switchLiv2DExpression("expression1")}},10)};t.addEventListener("mousedown",c);t.addEventListener("touchstart",c,{passive:!1});const l=function(n){var c,l;if(kanban_mousedown=!1,c=n.touches?n.touches[0]:n,i){n.preventDefault();const i=c.clientX,r=c.clientY;e=i-s;o=r-h;l=t.getBoundingClientRect();t.setAttribute("style",`left:${u+e}px; top:${f+o}px; width: ${l.width}px; height: ${l.height}px;`)}else clearInterval(r)};window.addEventListener("mousemove",l);window.addEventListener("touchmove",l,{passive:!1});const a=function(){i?(i=!1,n.invokeMethodAsync("SetKanbanPosition",u+e,f+o),document.body.classList.remove("user-select-none"),switchLiv2DExpression()):clearInterval(r)};window.addEventListener("mouseup",a);window.addEventListener("touchend",a,{passive:!1})}function initButtonGroupMoveAction(n){const u=document.getElementById("kanban-live2d"),t=document.getElementById("kanban-button-group");let i=!1,a=0,v=0,o,s,f=0,e=0;var r;const h=function(n){var f;f=n.touches?n.touches[0]:n;timeStart=getTimeNow();buttongroup_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){if(clearInterval(r),dialogbox_mousedown)return;a=f.clientX-f.target.offsetLeft;v=f.clientY-f.target.offsetTop;var n=u.getBoundingClientRect(),e=t.getBoundingClientRect();o=n.x;s=n.y;i=!0;document.body.classList.add("user-select-none")}},10)};t.addEventListener("mousedown",h);t.addEventListener("touchstart",h,{passive:!1});const c=function(n){var h,c;if(i){h=n.touches?n.touches[0]:n;n.preventDefault();const i=h.clientX,r=h.clientY;f=i-o;e=r-s;c=u.getBoundingClientRect();t.setAttribute("style",`left:${f}px; top:${e}px;`)}else clearInterval(r)};window.addEventListener("mousemove",c);window.addEventListener("touchmove",c,{passive:!1});const l=function(){buttongroup_mousedown=!1;var o=u.getBoundingClientRect(),s=t.getBoundingClientRect();i?(i=!1,console.log("mouseup"),n.invokeMethodAsync("SetButtonGroupPosition",f,o.height-e-s.height),document.body.classList.remove("user-select-none")):clearInterval(r)};window.addEventListener("mouseup",l);window.addEventListener("touchend",l,{passive:!1})}function initDialogBoxMoveAction(n){const u=document.getElementById("kanban-live2d"),t=document.getElementById("kanban-dialogbox");let i=!1,o=0,s=0,h,c,f=0,e=0;var r;const l=function(n){var f;f=n.touches?n.touches[0]:n;timeStart=getTimeNow();dialogbox_mousedown=!0;r=setInterval(function(){if(timeEnd=getTimeNow(),timeEnd-timeStart>500){clearInterval(r);o=f.clientX-f.target.offsetLeft;s=f.clientY-f.target.offsetTop;var n=u.getBoundingClientRect(),e=t.getBoundingClientRect();h=n.x-e.x;c=n.y-e.y;i=!0;document.body.classList.add("user-select-none")}},10)};t.addEventListener("mousedown",l);t.addEventListener("touchstart",l,{passive:!1});const a=function(n){var l,a;if(i){l=n.touches?n.touches[0]:n;n.preventDefault();const i=l.clientX,r=l.clientY;f=i-o-h;e=r-s-c;a=u.getBoundingClientRect();t.setAttribute("style",`left:${f}px; top:${e}px;`)}else clearInterval(r)};window.addEventListener("mousemove",a);window.addEventListener("touchmove",a,{passive:!1});const v=function(){if(dialogbox_mousedown=!1,i){i=!1;console.log("mouseup");var o=u.getBoundingClientRect(),s=t.getBoundingClientRect();n.invokeMethodAsync("SetDialogBoxPosition",f,o.height-e-s.height);document.body.classList.remove("user-select-none")}else clearInterval(r)};window.addEventListener("mouseup",v);window.addEventListener("touchend",v,{passive:!1})}function listenLive2dCanvasChange(){var n=-1,t=-1,i=setInterval(function(){const u=document.getElementById(canvasId);if(u){var r=u.getBoundingClientRect();n>0&&t>0?(n!=r.width||t!=r.height)&&resizeLive2d():(n=r.width,t=r.height)}else clearInterval(i)},500)}function switchLiv2DModel(n){var t=getLive2dManager();t.changeScene(n)}function switchLiv2DExpression(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setExpression(n):t.cleanExpressions()}function switchLiv2DClothes(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setClothes(n):t.cleanClothes()}function switchLiv2DStockings(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setStockings(n):t.cleanStockings()}function switchLiv2DShoes(n){var i=getLive2dManager(),t=i.getCurrentModel();n?t.setShoes(n):t.cleanShoes()}function switchLiv2DMotion(n,t){var r=getLive2dManager(),i=r.getCurrentModel();t?i.startMotion(n,t,3):i.startRandomMotion(n,3)}function initMouseOverEvent(n,t){l2d_dotNetHelper_event=n;console.log("初始化鼠标悬停事件",t);let i;window.addEventListener("mouseover",n=>{for(let{selector:r,id:u}of t)if(n.target.closest(r)){if(i===r)return;i=r;console.log("触发鼠标悬停",r);l2d_dotNetHelper_event.invokeMethodAsync("TriggerMouseOverEventAsync",u);return}})}function scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}function startKanbanImageGeneration(n){document.getElementById("live2d").toBlob(t=>{let i=URL.createObjectURL(t);console.log(i);n.invokeMethodAsync("OnKanbanImageGenerated",i)})}var onscrolling=!1,dotNetHelper,structuredData,root_s,int,counter,backImageName,canvasId,live2d_dotNetHelper,l2d_dotNetHelper_event;(function(n){"use strict";function r(n){this._obj=n}function e(n){var t=this;new r(n)._each(function(n,i){t[n]=i})}if(typeof n=="undefined")throw new Error("Geetest requires browser environment");var u=n.document,c=n.Math,l=u.getElementsByTagName("head")[0];r.prototype={_each:function(n){var t=this._obj;for(var i in t)t.hasOwnProperty(i)&&n(i,t[i]);return this}};e.prototype={api_server:"api.geetest.com",protocol:"http://",typePath:"/gettype.php",fallback_config:{slide:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"slide",slide:"/static/js/geetest.0.0.0.js"},fullpage:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"fullpage",fullpage:"/static/js/fullpage.0.0.0.js"}},_get_fallback_config:function(){var n=this;return o(n.type)?n.fallback_config[n.type]:n.new_captcha?n.fallback_config.fullpage:n.fallback_config.slide},_extend:function(n){var t=this;new r(n)._each(function(n,i){t[n]=i})}};var a=function(n){return typeof n=="number"},o=function(n){return typeof n=="string"},v=function(n){return typeof n=="boolean"},s=function(n){return typeof n=="object"&&n!==null},y=function(n){return typeof n=="function"},p=/Mobi/i.test(navigator.userAgent),w=p?3:0,t={},i={},b=function(){var n=new Date,e=n.getFullYear(),t=n.getMonth()+1,i=n.getDate(),r=n.getHours(),u=n.getMinutes(),f=n.getSeconds();return t>=1&&t<=9&&(t="0"+t),i>=0&&i<=9&&(i="0"+i),r>=0&&r<=9&&(r="0"+r),u>=0&&u<=9&&(u="0"+u),f>=0&&f<=9&&(f="0"+f),e+"-"+t+"-"+i+" "+r+":"+u+":"+f},k=function(){return parseInt(c.random()*1e4)+(new Date).valueOf()},d=function(n,t){var i=u.createElement("script"),r;i.charset="UTF-8";i.async=!0;/static\.geetest\.com/g.test(n)&&(i.crossOrigin="anonymous");i.onerror=function(){t(!0)};r=!1;i.onload=i.onreadystatechange=function(){r||i.readyState&&"loaded"!==i.readyState&&"complete"!==i.readyState||(r=!0,setTimeout(function(){t(!1)},0))};i.src=n;l.appendChild(i)},g=function(n){return n.replace(/^https?:\/\/|\/$/g,"")},nt=function(n){return n=n.replace(/\/+/g,"/"),n.indexOf("/")!==0&&(n="/"+n),n},tt=function(n){if(!n)return"";var t="?";return new r(n)._each(function(n,i){(o(i)||a(i)||v(i))&&(t=t+encodeURIComponent(n)+"="+encodeURIComponent(i)+"&")}),t==="?"&&(t=""),t.replace(/&$/,"")},it=function(n,t,i,r){t=g(t);var u=nt(i)+tt(r);return t&&(u=n+t+u),u},f=function(n,t,i,r,u,f,e){var o=function(s){var h=it(i,r[s],u,f);d(h,function(f){if(f)if(s>=r.length-1){if(e(!0),t){n.error_code=508;var h=i+r[s]+u;ut(n,h)}}else o(s+1);else e(!1)})};o(0)},rt=function(t,i,r,u){if(s(r.getLib)){r._extend(r.getLib);u(r);return}if(r.offline){u(r._get_fallback_config());return}var e="geetest_"+k();n[e]=function(t){t.status=="success"?u(t.data):t.status?u(r._get_fallback_config()):u(t);n[e]=undefined;try{delete n[e]}catch(i){}};f(r,!0,r.protocol,t,i,{gt:r.gt,callback:e},function(n){n&&u(r._get_fallback_config())})},ut=function(n,t){f(n,!1,n.protocol,["monitor.geetest.com"],"/monitor/send",{time:b(),captcha_id:n.gt,challenge:n.challenge,pt:w,exception_url:t,error_code:n.error_code},function(){})},h=function(n,t){var i={networkError:"网络错误",gtTypeError:"gt字段不是字符串类型"};if(typeof t.onError=="function")t.onError(i[n]);else throw new Error(i[n]);},ft=function(){return n.Geetest||u.getElementById("gt_lib")};ft()&&(i.slide="loaded");n.initGeetest=function(r,u){var o=new e(r);r.https?o.protocol="https://":r.protocol||(o.protocol=n.location.protocol+"//");(r.gt==="050cffef4ae57b5d5e529fea9540b0d1"||r.gt==="3bd38408ae4af923ed36e13819b14d42")&&(o.apiserver="yumchina.geetest.com/",o.api_server="yumchina.geetest.com");r.gt&&(n.GeeGT=r.gt);r.challenge&&(n.GeeChallenge=r.challenge);s(r.getType)&&o._extend(r.getType);rt([o.api_server||o.apiserver],o.typePath,o,function(r){var e=r.type,c=function(){o._extend(r);u(new n.Geetest(o))},s;t[e]=t[e]||[];s=i[e]||"init";s==="init"?(i[e]="loading",t[e].push(c),f(o,!0,o.protocol,r.static_servers||r.domains,r[e]||r.path,null,function(n){var u,r,s,f;if(n)i[e]="fail",h("networkError",o);else{for(i[e]="loaded",u=t[e],r=0,s=u.length;rnew Promise(t=>setTimeout(t,n));structuredData=document.createElement("script");structuredData.type="application/ld+json";root_s=document.head;root_s.parentNode.insertBefore(structuredData,root_s);window.downloadFileFromStream=async(n,t)=>{const u=await t.arrayBuffer(),f=new Blob([u]),r=URL.createObjectURL(f),i=document.createElement("a");i.href=r;i.download=n==null?"":n;i.click();i.remove();URL.revokeObjectURL(r)};int=self.setInterval("error_check()",500);counter=0;browserVersion()==1&&alert("浏览器版本过低,网页可能无法正确展示\n你可以尝试安装 Edge,Chorme,Firefox 的最新版本后重试\n有任何疑问可以加群 761794704 进行反馈"),function(n,t,i,r,u,f,e){window.location.href.includes("cngal")&&(n[i]=n[i]||function(){(n[i].q=n[i].q||[]).push(arguments)},f=t.createElement(r),f.async=1,f.src="https://www.clarity.ms/tag/"+u,e=t.getElementsByTagName(r)[0],e.parentNode.insertBefore(f,e))}(window,document,"clarity","script","buu31hy6os");backImageName="";canvasId="live2d";window.Live2dInitCallback=function(){live2d_dotNetHelper.invokeMethodAsync("Live2dInitCallback")};var kanban_mousedown=!1,buttongroup_mousedown=!1,dialogbox_mousedown=!1;window.Live2dHitHeadEvent=function(){l2d_dotNetHelper_event.invokeMethodAsync("TriggerCustomEventAsync","摸头")};window.Live2dHitBodyEvent=function(){l2d_dotNetHelper_event.invokeMethodAsync("TriggerCustomEventAsync","触碰身体")};
\ No newline at end of file