arisu.js 2.0.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -198
- package/dist/arisu.commonjs.js +1 -1
- package/dist/arisu.esm.js +1 -1
- package/dist/arisu.umd.js +1 -1
- package/dist/types/index.d.ts +7 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/js/auth.d.ts +12 -0
- package/dist/types/js/auth.d.ts.map +1 -0
- package/dist/types/js/base.d.ts +3 -62
- package/dist/types/js/base.d.ts.map +1 -1
- package/dist/types/js/helpers.d.ts +243 -0
- package/dist/types/js/helpers.d.ts.map +1 -0
- package/dist/types/js/kit.d.ts +13 -0
- package/dist/types/js/kit.d.ts.map +1 -0
- package/dist/types/js/statics.d.ts +65 -0
- package/dist/types/js/statics.d.ts.map +1 -0
- package/dist/types/js/utils/AeLoader.d.ts.map +1 -1
- package/dist/types/js/utils/BtnEf.d.ts.map +1 -1
- package/dist/types/js/utils/Flash.d.ts.map +1 -1
- package/dist/types/js/utils/GoTop.d.ts.map +1 -1
- package/dist/types/js/utils/HoverDir.d.ts.map +1 -1
- package/dist/types/js/utils/IAccordion.d.ts.map +1 -1
- package/dist/types/js/utils/IList.d.ts.map +1 -1
- package/dist/types/js/utils/ILoader.d.ts.map +1 -1
- package/dist/types/js/utils/IPagination.d.ts.map +1 -1
- package/dist/types/js/utils/ItemCount.d.ts.map +1 -1
- package/dist/types/js/utils/LineEffect.d.ts.map +1 -1
- package/dist/types/js/utils/NiceSelect.d.ts.map +1 -1
- package/dist/types/js/utils/PopoverSearch.d.ts.map +1 -1
- package/dist/types/js/utils/SubmitFlag.d.ts.map +1 -1
- package/package.json +24 -7
- package/dist/types/js/main.d.ts +0 -5
- package/dist/types/js/main.d.ts.map +0 -1
package/dist/arisu.commonjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{AeLoader:()=>u,Base:()=>s,BtnEf:()=>m,Flash:()=>v,GoTop:()=>c,HoverDir:()=>P,IAccordion:()=>g,IList:()=>f,ILoader:()=>S,IPagination:()=>p,ItemCount:()=>d,LineEffect:()=>w,NiceSelect:()=>h,PopoverSearch:()=>b,SubmitFlag:()=>l,default:()=>A});class s{constructor(e,t){if(this.elements=[],this.length=0,t=t instanceof s?t.elements[0]:t||document,"string"==typeof e)if(t&&"string"==typeof t&&(t=document.querySelector(t)),s.isEqSelector(e)){const i=e.split(":")[0],n=e.match(/:eq\((\d+)\)/);if(n){const e=parseInt(n[1]),o=s.contextQuerySelector(">"+i,t);o.length>0?this.elements=[o[e]]:this.elements=[]}else this.elements=[]}else this.elements=s.contextQuerySelector(e,t);else e instanceof NodeList||e instanceof HTMLElement?this.elements=e instanceof NodeList?Array.from(e):[e]:e instanceof Window?this.elements=[window]:null!==e&&"object"==typeof e&&"documentElement"in e?this.elements=[t]:Array.isArray(e)?this.elements=e:this.elements=[];this.length=this.elements.length}each(e){return this.elements.forEach((t,s)=>{e(t,s)}),this}hasClass(e){let t=!1;return this.each(s=>{t=s.classList.contains(e)}),t}addClass(e){return this.each(t=>{if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.add(s[e])}else e&&t.classList.add(e)})}removeClass(e){return this.each(t=>{if(void 0===e)t.className="";else if(e||0!==e.length)if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.remove(s[e].trim())}else t.classList.remove(e.trim())})}toggleClass(e){return this.each(t=>{if(t.classList)t.classList.toggle(e);else{let s=t.className.split(/\s+/),i=s.indexOf(e);i>=0?s.splice(i,1):s.push(e),t.className=s.join(" ")}})}not(e){let t=e instanceof s?e.elements:Array.from(document.querySelectorAll(e));return this.elements=Array.from(this.elements).filter(e=>!t.includes(e)),this}is(e){var t;let s=this.elements[0];if(":visible"===e){if("none"===s.style.display||"hidden"===s.style.visibility||"0"===getComputedStyle(s).opacity)return!1}else{if(":first-child"===e)return(null===(t=s.parentNode)||void 0===t?void 0:t.firstChild)===s;if(":last-child"!==e)return s.matches(e);{const e=s.parentNode;if(e){const t=e.children;return t[t.length-1]===s}}}return!1}closest(e){let t=this.elements[0];if(!t)return s.build([]);const i=t.matches||t.webkitMatchesSelector;if(i.call(t,e))return this.constructor===s?s.build(this.elements):this;let n=t.parentElement;for(;n;){if(i.call(n,e))return s.build(n);n=n.parentElement}return s.build([])}next(){if(1===this.elements.length){const e=this.elements[0].nextElementSibling;return e instanceof Element?s.build(e):s.build([])}if(this.elements.length>1){const e=[],t=this.elements[0].nextElementSibling;t instanceof Element&&e.push(t);for(let t=1;t<this.elements.length-1;t++)this.elements[t]instanceof Element&&e.push(this.elements[t]);const i=this.elements[this.elements.length-1].nextElementSibling;return i instanceof Element&&e.push(i),s.build(e)}return null}nextAll(e){const t=[];let s=this.elements[0],i=s.nextSibling,n=s.parentElement;for(;i&&(1===i.nodeType&&(e&&!i.matches(e)||t.unshift(i)),i=i.nextSibling,null!==i||0!==t.length||(null==n?void 0:n.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}prev(){if(1===this.elements.length)return s.build(this.elements[0].previousElementSibling);if(this.elements.length>1){let e=s.build(this.elements[0].previousElementSibling);return this.each((t,s)=>{s>1&&(e.elements.push(t),s===this.elements.length-1&&e.elements.push(t.previousElementSibling))}),e}return null}prevAll(e){const t=[];let s=this.elements[this.elements.length-1],i=s.previousSibling,n=s.parentElement;for(;i&&(1===i.nodeType&&(e&&!i.matches(e)||t.unshift(i)),i=i.previousSibling,null!==i||0!==t.length||(null==n?void 0:n.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}first(){return new s([this.elements[0]])}find(e){if(e&&"option:selected"===e.trim()){const e=[];return this.each(t=>{("select-one"===t.type||"select-multiple"===t.type)&&t.selectedIndex>=0&&e.push(t.options[t.selectedIndex])}),new s(e)}{const t=[];return this.elements.forEach(s=>{s instanceof HTMLElement&&s.querySelectorAll(e).forEach(e=>t.push(e))}),new s(t)}}parent(){let e=this.elements[0];return e?new s(e.parentNode):new s}parents(e){const t=[];let i=this.elements[0].parentElement;for(;i&&i!==document.documentElement;)e&&!i.matches(e)||t.push(i),i=i.parentElement;return new s(t)}siblings(){let e=this.elements[0];if(e&&1===e.nodeType){let t=e.parentNode;if(t){let i=[];for(let s=0;s<t.childNodes.length;s++){let n=t.childNodes[s];1===n.nodeType&&n!==e&&i.push(n)}return new s(i)}return new s}return new s}children(){let e=[];return this.each(t=>{e.push(...Array.from(t.children))}),new s(e)}index(){var e;const t=this.elements[0],s=null===(e=t.parentNode)||void 0===e?void 0:e.children;if(s)for(let e=0;e<s.length;e++)if(s[e]===t)return e;return-1}size(){return this.elements?this.elements.length:0}on(e,t){return this.each(function(s){s.addEventListener(e,t)})}off(e,t){return this.each(function(s){s.removeEventListener&&t&&s.removeEventListener(e,t)})}click(e){return"function"==typeof e?this.on("click",e):this.each(e=>{const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}),this}focus(e){return"function"==typeof e&&this.on("focus",e),this}change(e){return e&&this.each(t=>{t.addEventListener("change",e,!1)}),this}trigger(e,t){return this.each(function(s){let i;try{i=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(s){i=document.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,t)}s.dispatchEvent(i)}),this}remove(){return this.each(e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})}data(e,t){if(void 0===e)throw new Error("读取的或设置的键值不能为空");let i=this.elements[0];if(void 0!==t){let n=s.elementData.get(i);return n||(n=new Map,s.elementData.set(i,n)),n.set(s.camelCase(e),t),this}{const t=s.elementData.get(i);return t?t.get(s.camelCase(e)):s.dataAttr(i,e)}}removeData(e){let t=this.elements[0],i=s.elementData.get(t);i&&i.set(s.camelCase(e),void 0)}attr(e,t){if(0===this.elements.length)return void 0===t?"":this;const s=this.elements[0];return void 0===t?(null==s?void 0:s.getAttribute(e))||"":this.each(s=>s.setAttribute(e,t))}removeAttr(e){return this.each(t=>{"function"==typeof t.removeAttribute&&t.removeAttribute(e)})}offset(){let e=this.elements[0].getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft;return{top:e.top+t,left:e.left+s}}scrollTop(){return this.elements[0]instanceof Window?void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop:document.documentElement.scrollTop}height(){const e=this.elements[0];return e?e===window?window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight:e.offsetHeight:(console.warn("目标元素不存在或未正确绑定!"),0)}width(){const e=this.elements[0];return e?e===window?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:e.offsetWidth:(console.warn("目标元素不存在或未正确绑定!"),0)}val(e){let t=this.elements[0];if("select-multiple"===t.type){if(void 0!==e){for(let s=t.options.length-1;s>=0;s--)t.options[s].selected=t.options[s].value===e;return this}{let e=[];for(let s=0;s<t.options.length;s++)t.options[s].selected&&e.push(t.options[s].value);return e}}return void 0!==e?(t.value=e,this):t.value}css(e,t){if(0===this.elements.length)return this;if(void 0===t){if("object"==typeof e){const t=e;for(const e in t)if(t.hasOwnProperty(e)){const s=t[e];this.each(t=>{t.style[e]=s})}return this}return this.elements[0].style[e]||""}return this.each(s=>{s.style[e]=t})}text(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t.textContent||"":this.each(t=>{t.textContent=e})}html(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t&&1===t.nodeType?t.innerHTML:"":this.each(t=>{t&&1===t.nodeType&&(t.innerHTML=e)})}after(e){return this.each(t=>{t.insertAdjacentHTML("afterend",e)})}append(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.appendChild(s.firstChild);return t})}prepend(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.insertBefore(s.firstChild,t.firstChild);return t})}hide(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="none",t&&"function"==typeof t&&t(s)},e):(s.style.display="none",t&&"function"==typeof t&&t(s))})}show(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="block",t&&"function"==typeof t&&t(s)},e):(s.style.display="block",t&&"function"==typeof t&&t(s))})}slideUp(e,t){const i=s.extend({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{e.style.height=e.scrollHeight+"px",e.style.overflow="hidden",e.style.transition=`height ${i.duration}ms ease-in-out`,setTimeout(()=>{e.style.height="0px"},i.duration/100),setTimeout(()=>{e.style.display="none",e.style.overflow="",e.style.transition="",e.style.height="",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration-i.duration/100)})}slideDown(e,t){const i=s.extend({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{let t=e.offsetHeight;"none"===e.style.display&&(e.style.display="",t=0),e.style.height=t+"px",e.style.transition=`height ${i.duration}ms ease-in-out`,e.offsetHeight,e.style.height=e.scrollHeight+"px",e.style.display="block",setTimeout(()=>{e.style.overflow="",e.style.transition="",e.style.display="",e.style.height="",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration)})}slideToggle(e,t){const i=s.extend({duration:e,callback:t},{duration:500,callback:null});let n=!0;return this.each(e=>{"none"===e.style.display&&(n=!1)}),n?this.slideUp(i.duration,i.callback):this.slideDown(i.duration,i.callback),this}fadeOut(e,t){const i=s.extend({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{e.style.transition=`opacity ${i.duration}ms ease-in-out`,e.style.opacity="0",setTimeout(()=>{e.style.display="none",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration)})}checkAll(e){const t=s.extend({checkboxes:e},{checkboxes:".be-check"});return this.each(e=>{let s=document.querySelectorAll(t.checkboxes);e.addEventListener("change",function(){s.forEach(function(t){t.checked=e.checked})})})}checkReverse(e){const t=s.extend({checkboxes:e},{checkboxes:".be-check"});return this.each(e=>{let s=document.querySelectorAll(t.checkboxes);e.addEventListener("click",function(){s.forEach(function(e){e.checked=!e.checked})})})}numStep(e){return e=s.extend(e,{start:0,end:100,duration:1500,callback:!1}),this.each(t=>{let i=null;requestAnimationFrame(function n(o){null===i&&(i=o);const a=Math.min((o-i)/e.duration,1),r=Math.floor(a*(e.end-e.start)+e.start);s.build(t).text(r.toString()),a<1?requestAnimationFrame(n):"function"==typeof e.callback&&e.callback()})})}scrollBG(e){return e=s.extend(e,{speed:0}),this.each(t=>{s.build(t).css("background-position","50% 0px"),s.build(window).on("scroll",()=>{const i=s.build(t),n=i.offset().top,o=i.height(),a=i.scrollTop(),r=i.height();if(r+a>n&&r+a<n+r+o){const t=(n+o-a)/e.speed;i.css("background-position","50% -"+t+"px")}})})}setActive(e){const{className:t="active"}=e||{};s.build(this.elements).click(e=>{const i=s.build(e.currentTarget);i.hasClass(t)?i.removeClass(t):(s.build(this.elements).removeClass(t),i.addClass(t))})}loading(e){let t=!1;return void 0!==e&&"object"!=typeof e&&(t=!0,e={}),e=s.extend(e,{isFull:!0,loadingTarget:"#do-preloader",template:'<div id="do-preloader" class="do-preloader"><span class="do-pr-loader"><span class="do-pr-lr"></span></span></div>'}),this.each(i=>{const n=e,o=n.loadingTarget,a=n.template;if(t)s.build("> *",i).removeClass("be-blur-2"),s.build(o).addClass("oy-0"),setTimeout(()=>{s.build("> *",i).removeClass("be-ts"),s.build(o).remove()},300);else{s.build("> *",i).addClass("be-ts").addClass("be-blur-2"),s.build(i).prepend(a);const e=s.build(o);e.length&&e.css("position","fixed").css("height","100vh").css("width","100vw")}})}static extend(e,t){if(!e)return t;{let s;for(s in t)if(null==t?void 0:t.hasOwnProperty(s)){const i=t[s];null==e[s]&&(e[s]=i)}}return e}static camelCase(e){let t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t=t.replace(/\./g,""),t}static l(...e){window.console&&e&&console.log(...e)}static toRound(e,t){let s=parseFloat(String(e));return s=s?Math.round(e*Math.pow(10,t))/Math.pow(10,t):0,s}static isNull(e){let t=!0;return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(t=!1),t}static setDefault(e,t){return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(e=t),e}static isObject(e){return!!e&&e&&"object"==typeof e&&!Array.isArray(e)&&!0}static same(e,t){return e.filter(function(e){return-1!==t.indexOf(e)})}static different(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)||-1===t.indexOf(s)})}static contrast(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)&&-1!==t.indexOf(s)})}static isHtmlTag(e){return/^<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>$|^<([a-z][a-z0-9]*)\b[^>]*\/>$/i.test(e)}static plugin(e,t){s.fn[e]=function(){t()}}static createElement(e){let t=document.createElement("div");t.innerHTML=e.trim();let s=t.firstChild;if((null==s?void 0:s.nodeType)===Node.TEXT_NODE){s=s.nextSibling;let e=document.createDocumentFragment();for(;s;)e.appendChild(s),s=s.nextSibling;return e}return s}static ajax(e){var t;if("get"===(null===(t=null==(e=s.extend(e,{url:"",method:"GET",async:!0,headerMap:{},cache:"default",dataType:"json",data:null,success:function(){},error:function(){}}))?void 0:e.method)||void 0===t?void 0:t.toLowerCase())){if(!e.url.includes("?")){let t=new URLSearchParams;for(let s in e.data)e.data.hasOwnProperty(s)&&t.append(s,e.data[s]);e.url=e.url+"?"+t.toString()}e.data=null}if(fetch)fetch(e.url,{method:e.method,headers:new Headers(e.headerMap),cache:e.cache,body:e.data?JSON.stringify(e.data):null}).then(function(t){return t.ok?"json"===e.dataType?t.json():t.text():Promise.reject(new Error("Failed to fetch resource"))}).then(function(t){e.success&&e.success(t)}).catch(function(t){e.error&&e.error(t)});else{let t=new XMLHttpRequest;t.onload=function(){if(t.status>=200&&t.status<300){let s;switch(e.dataType){case"json":try{s=JSON.parse(t.responseText)}catch(t){return void(e.error&&e.error(t))}break;case"text":s=t.responseText;break;default:s=t.responseText||t.response}e.success&&e.success(s,t.status,t)}else{let s=new Error("Request failed. Status: "+t.status);e.error&&e.error(s)}},t.onerror=function(){e.error&&e.error(new Error("Network Error"))},t.open((null==e?void 0:e.method)||"get",e.url,e.async||!1);for(let s in e.headerMap)e.headerMap.hasOwnProperty(s)&&t.setRequestHeader(s,e.headerMap[s]);e.data?t.send(e.data):t.send()}}static getParam(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),s=window.location.search.substr(1).match(t);return null!=s?unescape(s[2]):null}static move(e){const t=document.querySelector(e);if(t){let e=new s(t).offset();window.scrollTo(e.left,e.top)}}static strValidation(e,t,s){let i=0;return e.length<=t||e.length>=s?i=1:/^[0-9]{0,32}$/.test(e)?i=2:/^[a-zA-z]{0,32}$/.test(e)?i=3:/^[0-9a-zA-z]{0,32}$/.test(e)?i=4:/^[^\u4e00-\u9fa5a-zA-Z\d,.,。]{0,32}$/.test(e)?i=5:/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]*$/.test(e)&&(i=8),i}static hotkey(e,t){document.addEventListener("keydown",function(s){e===s.key&&t()})}static setCookie(e,t,s={}){let i="",n=s.path||"/",o=s.domain,a=s.secure?"; Secure":"";if(s.expires){let e;"number"==typeof s.expires?(e=new Date,e.setTime(e.getTime()+24*s.expires*60*60*1e3)):e=s.expires,i=`; expires=${e.toUTCString()}`}document.cookie=`${e}=${encodeURIComponent(t)}${i}; path=${n}; domain=${o||""}${a}`}static getCookie(e){let t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let i=s[e];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null}static removeCookie(e,t={}){this.setCookie(e,"",Object.assign(Object.assign({},t),{expires:-1}))}static menu(e,t){const s=function(e,i,n){let o="";++i;for(let a=0;a<e.length;a++){const r=e[a];let l="#";if(r.link&&(l=r.link),r.pId||0!==i){if(r.pId===n){let t="";r.isParent&&(t=s(e,i,r.id),t&&(t="<ul class='sub'>"+t+"</ul>"));let n="";1===i&&(n=`<i class='${r.icon}'></i>`);let a=r.hash?` data-hash='${r.hash}' `:" ",c=r.actionId?` id='${r.actionId}' `:" ";o+=`<li class='sub-menu'><a${r.isParent?" class='mu-js-a' ":" "}${a}${r.tid?` data-tid='${r.tid}' `:" "}${c}href='${l}'>`+n+`<span>${r.name}</span></a>`+t+"</li>"}}else if(t)o=s(e,i,r.id);else{let t=s(e,i,r.id);t&&(t="<ul class='sub'>"+t+"</ul>"),o+=`<li class='sub-menu'><a${r.hash?` data-hash='${r.hash}' `:" "}${r.actionId?` id='${r.actionId}' `:" "}href='${l}'><span>${r.name}</span></a>`+t+"</li>"}}return o};let i="";return e&&(i=s(e,-1,0)),""+i}static menu2Tree(e,t,i){let n=[];return e.forEach(function(o){o.pId===t&&(o.isactive=`a${o.id}`===i,n.push(o),o.isParent&&(o.children=s.menu2Tree(e,o.id)))}),n}static search(e){var t;const i=s.build(".fm-search"),n=s.build("input",i),o=s.build("span:eq(0)",i),a=s.build("span:eq(1)",i);n.on("change",e=>{var t,i;const n=s.build(e.currentTarget);""!==n.val()?null===(t=n.next())||void 0===t||t.css("opacity","1").css("visibility","visible"):null===(i=n.next())||void 0===i||i.css("opacity","0").css("visibility","hidden")}),""!==n.val()&&(null===(t=n.next())||void 0===t||t.css("opacity","1").css("visibility","visible")),a.on("click",e=>{var t;const i=s.build(e.currentTarget);i.css("opacity","0").css("visibility","hidden"),null===(t=i.prev())||void 0===t||t.val("")}),o.on("click",t=>{var i;const n=s.build(t.currentTarget);e&&e(null===(i=n.next())||void 0===i?void 0:i.val())})}static shuffleArray(e){if(!Array.isArray(e))return e;const t=[...e];for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}return t}static defaultConstructor(e,t,i,n){"string"==typeof t?e.elements=document.querySelectorAll(t):t instanceof NodeList?e.elements=t:t instanceof HTMLElement?e.elements=Array.of(t):e.elements=[],e.options=s.extend(i,e.options),n(e)}static contextQuerySelector(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}static isEqSelector(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}static build(e,t){return new(this||s)(e,t)}}s.keys={esc:"Escape",backspace:"Backspace",space:" ",enter:"Enter",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"},s.dataAttr=function(e,t){var s;let i="data-"+t;return null!==(s=e.getAttribute(i))&&void 0!==s?s:void 0},s.expando="base"+(""+Math.random()).replace(/\D/g,""),s.elementData=new Map,s.cache={},s.build.extend=s.extend,s.build.camelCase=s.camelCase,s.build.l=s.l,s.build.getParam=s.getParam,s.build.toRound=s.toRound,s.build.isNull=s.isNull,s.build.setDefault=s.setDefault,s.build.same=s.same,s.build.different=s.different,s.build.contrast=s.contrast,s.build.strValidation=s.strValidation,s.build.move=s.move,s.build.keys=s.keys,s.build.hotkey=s.hotkey,s.build.isHtmlTag=s.isHtmlTag,s.build.isObject=s.isObject,s.build.plugin=s.plugin,s.build.ajax=s.ajax,s.build.setCookie=s.setCookie,s.build.getCookie=s.getCookie,s.build.removeCookie=s.removeCookie,s.build.menu=s.menu,s.build.menu2Tree=s.menu2Tree,s.build.search=s.search,s.build.shuffleArray=s.shuffleArray,s.build.defaultConstructor=s.defaultConstructor;const i=s.build;Date.prototype.format=function(e){let t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in t)new RegExp("("+s+")").test(e)&&(e=e.replace(RegExp.$1,1===RegExp.$1.length?t[s]:("00"+t[s]).substr((""+t[s]).length)));return e},Array.prototype.remove=function(e,t){let s=this.slice((t||e)+1||this.length);return this.length=e<0?this.length+e:e,this.push.apply(this,s)},Array.prototype.unique=function(){let e=[];this.sort();for(let t=0;t<this.length;t++)this[t]!==this[t+1]&&(e[e.length]=this[t]);return e};const n=i;function o(e="info",t=3,s="ice"){let i;if("number"==typeof s)switch(s){case 1:i="flat";break;case 2:i="future";break;case 3:i="block";break;case 4:i="air";break;default:i="ice"}else i=s;const o=n.extend({type:e,classes:t,theme:i},{type:"info",classes:3,theme:"ice"});let a;switch(o.classes){case 1:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-left`;break;case 2:default:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top`;break;case 3:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-right`;break;case 4:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-right`;break;case 5:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom`;break;case 6:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-left`}window.Messenger.options={extraClasses:a,theme:o.theme}}n.handlebars=function(e){void 0!==e&&(e.registerHelper("if",function(e,t,s){return e===t?s.fn(this):s.inverse(this)}),e.registerHelper("lt",function(e,t,s){return e<t?s.fn(this):s.inverse(this)}),e.registerHelper("rt",function(e,t,s){return e>t?s.fn(this):s.inverse(this)}),e.registerHelper("lte",function(e,t,s){return e<=t?s.fn(this):s.inverse(this)}),e.registerHelper("rte",function(e,t,s){return e>=t?s.fn(this):s.inverse(this)}))},n.tip=function(e,t,s){t.forEach((e,t)=>{n(e).attr("data-bs-title",s[t]).attr("data-bs-toggle","tooltip").attr("data-bs-custom-class","be-tooltip")}),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new e(t))},n.al=function(e,t="info",s=3,i="ice"){o(t,s,i),window.Messenger().post({message:e,type:t,hideAfter:5,showCloseButton:!0})},n.cf=function(e,t,s,i=3,n="ice"){window.Messenger().hideAll(),o("info",i,n),window.Messenger().post({message:e,actions:{retry:{label:t,phrase:"",auto:!1,delay:10,action:function(){window.Messenger().hideAll(),s()}},cancel:{label:"取消",action:function(){return window.Messenger().hideAll(),!1}}}})},n.datepicker=function(e,t,s){const i={target:"#airDatepicker",classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:!0,buttons:["today","clear"],locale:t,dateFormat:e=>e.format("yyyy年MM月dd日 hh:mm:ss")};return new e((s=n.extend(s||{},i)).target,s)},n.validationEngine=function(e,t){t=n.extend(t||{},{focusFirstField:!1,validationEventTrigger:"click",promptPosition:"topRight"}),e.validationEngine(t)},n.validate=function(e,t="validate",s){const i=n.extend({command:t,options:s},{command:"validate",options:s});return e.validationEngine(i.command,i.options)};const a=new class{login(e){const t={id:e.id,name:e.name,menus:e.menu};localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("token",e.token)}logout(){return new Promise(e=>{localStorage.removeItem("user"),localStorage.removeItem("token"),e()})}getUser(){const e=localStorage.getItem("user");return e?JSON.parse(e):null}getToken(){return localStorage.getItem("token")}setToken(e){localStorage.setItem("token",e)}};n.getUser=a.getUser.bind(a),n.getToken=a.getToken.bind(a),n.setToken=a.setToken.bind(a),n.login=a.login.bind(a),n.logout=a.logout.bind(a);const r=n;class l{constructor(e,t){this.options={text:"处理中..",useText:!0},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.submitflag")||i.data("be.submitflag",e),e.init(s,t)})})}init(e,t){const s=this;t&&(s.options=n.extend(t,s.options)),n(e).click(e=>{s.request(e.currentTarget)})}request(e){const t=n(e);e.setAttribute("data-original-text",t.text()),t.addClass("submit-flag-request").attr("disabled","disabled"),this.options.useText&&t.text(this.options.text)}complete(e){let t;t=n(e||this.selector),t.removeClass("submit-flag-request").removeAttr("disabled"),this.options.useText&&t.each(e=>{const t=e.getAttribute("data-original-text");null!==t&&""!==t&&(n(e).text(t),e.removeAttribute("data-original-text"))})}destroy(){n(this.selector).removeData("be.submitflag"),n(this.selector).each(e=>{e.removeAttribute("data-original-text")})}}class c{constructor(e,t){this.options={position:{bottom:"15px",right:"15px"},showEffect:" animate__zoomIn ",hideEffect:" animate__zoomOut ",type:"fixed",offsetTop:400},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.gotop")||i.data("be.gotop",e),e.init(s,t)})})}init(e,t){const s=n(e),i=(t=n.extend(t,this.options)).type||"fixed",o=t.showEffect||" animate__zoomIn ",a=t.position,r=void 0!==t.offsetTop?Number(t.offsetTop):400,l=t.hideEffect||" animate__zoomOut ";s.addClass("animate__animated").css({display:"inline-block",position:i,opacity:0}),"fixed"!==i&&"absolute"!==i||s.css(a),s.on("click",e=>{e.preventDefault(),window.scrollTo(0,0)}),r&&!s.hasClass("animated-running")&&s.offset().top<=n(window).height()&&s.addClass("animated-running "+o).css({opacity:""}),n(window).on("scroll",()=>{if(r)n(window).scrollTop()>=r&&!s.hasClass("animated-running")?(s.addClass("animated-running "+o).css({opacity:""}),s.removeClass(l)):n(window).scrollTop()<=r&&s.hasClass("animated-running")&&(s.removeClass("animated-running "+o).css({opacity:0}),s.addClass(l));else{let e=s.offset().top;s.hasClass("animated-running")||n(window).scrollTop()>=e-n(window).height()&&(s.addClass("animated-running "+o).css({opacity:""}),s.removeClass(l))}}),n(window).trigger("scroll")}}class d{constructor(e,t){this.options={num:1},this.value=0,this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.itemcount")||i.data("be.itemcount",e),e.init(s,t)})})}init(e,t){const s=this;t&&(s.options=n.extend(t,s.options));const i=n(e),o=i.find(".fm-plus"),a=i.find(".fm-minus"),r=i.find(".fm-result");let l=parseInt(String(r.val()));s.value=isNaN(l)?0:l,o.on("click",function(e){e.preventDefault(),l+=s.options.num,r.val(String(l)),s.value=l}),a.on("click",function(e){if(e.preventDefault(),!(l-s.options.num>=0))return!1;l-=s.options.num,r.val(String(l)),s.value=l})}getValue(){return this.value}}class h{constructor(e,t){this.options={width:"auto"},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.niceselect")||i.data("be.niceselect",e),e.init(s,t)})})}create(e,t){var s,i;const o=this,a=n(e),r=a.after("<div></div>").next().addClass("ce-nice-select").addClass(a.attr("class")||"").addClass(a.attr("disabled")?"disabled":"").attr("tabindex",a.attr("disabled")?"":"0").css("width",null!==(s=o.options.width)&&void 0!==s?s:"auto").html('<span class="current"></span><ul class="list"></ul>'),l=a.find("option"),c=e,d=n(c.options[c.selectedIndex]);o.text=d.data("display")||d.text(),r.find(".current").html(null!==(i=o.text)&&void 0!==i?i:""),l.each(function(e){const t=n(e),s=t.data("display"),i=null!=s?String(s):"",o=d.text()===t.text()?"selected":"";r.find("ul").append(`<li data-value="${t.val()}" data-display="${i}" class="option ${o}">${t.text()}</li>`)})}init(e,t){const s=this,i=n(s.selector),o=n(e);t&&(s.options=n.extend(t,s.options)),o.hide(),s.create(e,s.options);const a=i.next();return a.on("click",function(){const e=o.next();e.toggleClass("open"),e.hasClass("open")?(e.find(".option"),e.find(".focus").removeClass("focus"),e.find(".selected").addClass("focus")):e.focus()}),n(".option",a).on("click",function(e){const t=n(e.currentTarget),i=a;i.find(".selected").removeClass("selected"),t.addClass("selected"),s.text=t.data("display")||t.text(),i.find(".current").text(String(s.text)),s.value=t.data("value"),i.prev().trigger("change").val(String(s.value))}),this}getText(){return this.text}getValue(){return this.value}}class u{constructor(e,t){this.options={time:1e3},this.selector=e||"",n.isObject(e)?(this.options=n.extend(e,this.options),this.selector=""):(e&&(this.selector=e),this.options=n.extend(t,this.options)),n("[data-ae-load]").addClass("ae-load")}start(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";n(s).addClass("ae-load").removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-complete"),setTimeout(()=>{n(s).removeClass("ae-load ae-tt-complete")},this.options.time)}loading(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";n("[data-ae-load]").addClass("ae-load"),n(s).each(e=>{const t=n(e),s=t.data("al-mw"),i=t.data("al-mh");s&&t.css("min-width",s),i&&t.css("min-height",i),t.removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-loading")})}done(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";n(s).removeClass("ae-tt-done").addClass("ae-tt-done"),setTimeout(()=>{n(s).removeClass("ae-load ae-tt-loading ae-tt-done")},this.options.time)}}class m{constructor(e,t){this.options={},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.btnef")||i.data("be.btnef",e),e.init(s,t)})})}init(e,t){const s=n(e);s.append("<b></b>"),s.on("mouseenter",e=>{const t=n(e.currentTarget),s=t.offset(),i=e.pageX-s.left,o=e.pageY-s.top;t.find("b").css({top:o+"px",left:i+"px"})}).on("mouseout",e=>{const t=n(e.currentTarget),s=t.offset(),i=e.pageX-s.left,o=e.pageY-s.top;t.find("b").css({top:o+"px",left:i+"px"})})}}class p{constructor(e,t){this.options={targetWarp:"#be-pw",totalItems:0,itemsPerPage:0,visiblePages:5,prev:"上一页",next:"下一页",first:"首页",last:"尾页",onButtonClick:()=>{}},this.currentPage=1,this.totalPages=0,this.selector=e,s.defaultConstructor(this,e,t,e=>{let s=this;e.elements.forEach(i=>{let o=n(i);o.data("be.ipagination")||o.data("be.ipagination",e),s.currentPage=1,s.totalPages=Math.ceil(s.options.totalItems/s.options.itemsPerPage),e.init(t)})})}init(e){const t=this;let s=t.options;e&&(s=n.extend(e,t.options)),n(this.selector).html(""),this.addPageButton(s.first,1,()=>this.goToPage(1)),this.addPageButton(s.prev,this.currentPage-1,()=>this.goToPrevPage());let i=Math.max(1,this.currentPage-Math.floor(s.visiblePages/2)),o=Math.min(this.totalPages,i+s.visiblePages-1);o-i<s.visiblePages-1&&(i=Math.max(1,o-s.visiblePages+1));for(let e=i;e<=o;e++)this.addPageButton(e,e,()=>this.goToPage(e));this.addPageButton(s.next,this.currentPage+1,()=>this.goToNextPage()),this.addPageButton(s.last,this.totalPages,()=>this.goToPage(this.totalPages));const a=s.itemsPerPage*(t.currentPage-1)+1,r=Math.min(a+s.itemsPerPage-1,s.totalItems);n("p",s.targetWarp).html(`显示 ${a} 至 ${r} 条,共有 ${s.totalItems} 条`)}addPageButton(e,t,s){const i=document.createElement("li");i.classList.add("page-item"),"number"==typeof e&&Number.isFinite(e)||!isNaN(Number(e))&&Number.isFinite(Number(e))?i.classList.add("pi-t2"):i.classList.add("pi-t1");const o=document.createElement("button");i.append(o),o.innerHTML=String(e),o.onclick=s,t!==this.currentPage&&0!==t&&t!==this.totalPages+1||(i.classList.add("active"),i.classList.add("disabled")),n(this.selector).append(i)}goToPrevPage(){this.currentPage>1&&(this.currentPage--,this.init(),this.options.onButtonClick(this.currentPage))}goToNextPage(){this.currentPage<this.totalPages&&(this.currentPage++,this.init(),this.options.onButtonClick(this.currentPage))}goToPage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.init(),this.options.onButtonClick(this.currentPage))}}class f{constructor(e,t){this.options={rp:"10",visiblePages:7,sortname:"id",sortorder:"desc",method:"post",dataType:"json",param:{},handlebars:null,url:"",loadColor:"#0a0a0a",lang:"cn",template:"#tp-list",headerMap:{},cache:"default",ipWarp:"#ilist-ip-warp",prev:"上一页",next:"下一页",first:"首页",last:"尾页",onSuccess:!1,onError:!1},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.ilist")||i.data("be.ilist",e),void 0!==window.Handlebars&&null===(null==t?void 0:t.handlebars)&&(t.handlebars=window.Handlebars),e.init(s,t||e.options)})})}init(e,t){let s=n(e),i=s.data("be.ilist.html");if(s.data("be.ilist.flag",!0),i)n(".be-list-data-body",e).html("");else{const e=n(t.template);if(!t.handlebars)return void console.error("Handlebars is required for IList but not provided.");const i=t.handlebars.compile(e.html())({});s.html(i),s.data("be.ilist.html",i)}let o=n.extend({page:1,rp:t.rp,sortname:t.sortname,sortorder:t.sortorder},t.param);t.isInit=!0,n(e).data("be.ilist.event",!0),this.getData(e,t,o)}getData(e,t,s){let i=this,o=n(e);n(".be-list-data-body",e).html(""),n(".be-list-loading",e).addClass("opacity-100"),n(".be-list-nofound",e).removeClass("opacity-100"),n(".be-list-page",e).removeClass("opacity-100"),n.ajax({method:t.method,url:t.url,headerMap:t.headerMap,data:s,cache:t.cache,dataType:t.dataType,success:a=>{n(".be-list-loading",e).removeClass("opacity-100").addClass("opacity-0"),n(".be-list-data",e).removeClass("opacity-0"),n(".be-list-data-body",e).css("display","table-row-group"),a.isInit=t.isInit,t.onSuccess&&t.onSuccess(a),a.total?(i.page(e,t,s,a.total),n(".ilist-check-all").checkAll(".ilist-check"),n("table > tbody tr",e).click(e=>{let t=n(e.target);t.is("input")||t.is("i")||t.is("a")||n(".ilist-check",e.currentTarget).click()}),o.data("be.ilist.event")&&(o.data("be.ilist.event",!1),n(".ilist-check",e).change(e=>{n(e.currentTarget).is(":checked")?n(e.currentTarget).parents("tr").addClass("active"):n(e.currentTarget).parents("tr").removeClass("active")})),n("table > thead tr td",e).click(a=>{const r=n(a.currentTarget).data("sortname");if(r){const l=o.data("be.ilist.param");if(l&&(s=n.extend(l,s)),s.sortname=r,!n(a.currentTarget).hasClass("is-check")&&s.sortname){let r=n(a.currentTarget).attr("data-sort-order");n("table > thead tr td",e).removeAttr("data-sort-order"),r?(n(a.currentTarget).attr("data-sort-order","desc"===r?"asc":"desc"),s.sortorder="desc"===r?"asc":"desc"):(n(a.currentTarget).attr("data-sort-order","desc"),s.sortorder="desc"),o.data("be.ilist.flag",!0),s.page="1",t.isInit=!1,i.getData(e,t,s)}}}),n(".be-list-page",e).addClass("opacity-100")):(n(".be-list-nofound",e).addClass("opacity-100"),n(".be-list-page",e).removeClass("opacity-100"))},error:e=>{try{t.onError&&t.onError(e)}catch(e){}}})}page(e,t,s,i){let o=this,a=n(e);a.data("be.ilist.flag")&&new p("#ipagination",{targetWarp:t.ipWarp,totalItems:i,itemsPerPage:Number(t.rp),visiblePages:t.visiblePages,prev:t.prev,next:t.next,first:t.first,last:t.last,onButtonClick:i=>{const n=document.querySelector(".ilist-check-all");n&&(n.checked=!1),s.page=i,t.isInit=!1,o.getData(e,t,s)}}),a.data("be.ilist.flag",!1)}reload(e){let t=n(this.selector);const s=t.data("be.ilist"),i=n.extend(e,{page:1,rp:s.options.rp,sortname:s.options.sortname,sortorder:s.options.sortorder});s.options.isInit=!1,t.data("be.ilist.flag",!0),t.data("be.ilist.param",i),n("table > thead tr td",t).attr("data-sort-order",""),s.getData(s.selector,s.options,i)}}class g{constructor(e,t){this.options={classParent:"ia-parent",classActive:"active",classArrow:"ia-icon",classCount:"ia-count",autoExpand:!1,classExpand:"ia-current-parent",autoClose:!0,speed:300,saveState:!0,disableLink:!0,showCount:!1,cookie:"ia-cookie",smallClass:"ce-accordion-small"},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.iaccordion")||i.data("be.iaccordion",e),e.init(s,t)})})}init(e,t){const s=this,i=n("li > a",e),o=n("li > ul",e),a=(t=n.extend(t,s.options)).classActive;this.setUpAccordion(e,i,o,t),!0===t.saveState&&s.checkCookie(t.cookie,e,a),!0===t.autoExpand&&n("li."+t.classExpand+" > a").addClass(a),i.click(i=>{const o=n(i.currentTarget),r=o.parent(),l=s.isSmall(i,e,t.smallClass);!0===t.disableLink&&o.siblings().length>0&&i.preventDefault(),!0===t.autoClose&&s.autoCloseAccordion(e,o,l,t),0===n("> ul",r).length?n("> a",r).addClass(a):"none"!==n("> ul",r).css("display")?(s.slideUp(n("ul",r),l,t),n("a",r).removeClass(a)):("none"===n(i.currentTarget).siblings().css("display")?s.slideDown(n(i.currentTarget).siblings().css("overflow","hidden"),l,t):s.slideUp(n(i.currentTarget).siblings(),l,t),n("> a",r).addClass(a)),!0===t.saveState&&s.createCookie(t.cookie,e,a)})}setUpAccordion(e,t,s,i){const o='<span class="'+i.classArrow+'"></span>',a=i.classParent+"-li";s.show(),n("li",e).each(e=>{n("> ul",e).length>0&&(n(e).addClass(a),n("> a",e).addClass(i.classParent).append(o))}),s.hide(),!0===i.showCount&&n("ul",e).each(e=>{n("> a",n(e).parent()).append(' <span class="'+i.classCount+'">('+e.children.length+")</span>")})}autoCloseAccordion(e,t,s,i){const o=this;n("ul",e).each(e=>{let a=!1;t.parents("ul").each(t=>{t===e&&(a=!0)}),a||t.siblings().elements[0]===e||"none"===e.style.display||o.slideUp(n(e),s,i)}),n("a",e).removeClass(i.classActive),t.parents("li").each(e=>{n("> a",e).addClass(i.classActive)})}checkCookie(e,t,s){const i=this,o=n.getCookie(e);if(null!==o&&""!==o){const e=o.split(",");i.setActiveMenu(t,e,0,s)}}setActiveMenu(e,t,s,i){const o=n("li:eq("+t[s]+")",e),a=n("> a",o),r=a.siblings();a.addClass(i),r.css("display",""),t.length>s+1&&this.setActiveMenu(r,t,++s,i)}createCookie(e,t,s){let i=[];n("li a."+s,t).each(e=>{const t=n(e).parent().index();i.push(t.toString())}),n.setCookie(e,i.join(","))}isSmall(e,t,s){return!(!n(t).hasClass(s)||0===n(e.currentTarget).siblings().length||(e.preventDefault(),0))}slideDown(e,t,s){t||e.slideDown(s.speed)}slideUp(e,t,s){t||e.slideUp(s.speed)}}class b{constructor(e,t){this.options={handlebars:null,bootstrap:null,airDatepicker:null,localeZh:null,template:"#tp-popover",templateItems:"#tp-popover-items",html:!0,title:"详细搜索",trigger:"click",toggle:"popover",placement:"auto",onSerach:!1,items:[],timepicker:!0,format:"yyyy-MM-dd hh:mm:ss"},this.itemsHtml="",this.itemsValue=[],this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.popoversearch")||i.data("be.popoversearch",e),void 0===window.Handlebars||(null==t?void 0:t.handlebars)||(t.handlebars=window.Handlebars),void 0===window.bootstrap||(null==t?void 0:t.bootstrap)||(t.bootstrap=window.bootstrap),void 0===window.AirDatepicker||(null==t?void 0:t.airDatepicker)||(t.airDatepicker=window.AirDatepicker),void 0===window.localeZh||(null==t?void 0:t.localeZh)||(t.localeZh=window.localeZh),e.init(s,t||e.options)})})}init(e,t){const s=this;this.itemsHtml="",this.itemsValue=[];const i=t.handlebars.compile(n(t.template).html())({}),o=new t.bootstrap.Popover(e,{html:t.html,title:t.title,trigger:t.trigger,toggle:t.toggle,placement:t.placement,template:i,animation:!0,content:""});e.addEventListener("inserted.bs.popover",()=>{s.addItem(t)}),e.addEventListener("shown.bs.popover",()=>{s.search(s,t),s.close(o),s.clear()}),e.addEventListener("hide.bs.popover",()=>{s.itemsHtml=n(".popover-content-items").html()||"",s.itemsValue=[],n(".popover-form-item").each(e=>{s.itemsValue.push(String(n(e).val()))})})}addItem(e){const t=this,s=n(".ce-popover > .popover-content .popover-content-items");if(t.itemsHtml)s.html(t.itemsHtml);else{const t=e.handlebars.compile(n(e.templateItems).html())({items:e.items});s.html(t)}n(".popover-form-item").each((s,i)=>{const o=n(s);if(void 0!==t.itemsValue[i]&&o.val(String(t.itemsValue[i])),o.hasClass("popover-form-date"))try{new e.airDatepicker(`.ce-popover input[name='${o.attr("name")}']`,{classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:e.timepicker,buttons:["today","clear"],locale:e.localeZh,dateFormat:t=>t.format(e.format)})}catch(e){n(`.ce-popover input[name='${o.attr("name")}']`).attr("type","date")}})}close(e){n(".ce-popover-cancel",".ce-popover").off("click").on("click",()=>{e.hide()})}clear(){n(".ce-popover-clear",".ce-popover").off("click").on("click",()=>{n(".popover-form-item",".ce-popover").each(e=>{n(e).val("")})})}getParam(){const e={};return n(".popover-form-item").each(function(t){const s=n(t),i=s.attr("name"),o=s.val();i&&o&&(e[i]=o)}),e}search(e,t){n(".ce-popover-ok",".ce-popover").off("click").on("click",()=>{t.onSerach&&t.onSerach({param:e.getParam()})})}}class v{constructor(e,t){this.options={animationDelay:5e3,lettersDelay:50,type:void 0},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.flash")||i.data("be.flash",e),e.init(s,t||e.options)})})}init(e,t){1===t.type&&n(e).addClass("letters"),this.singleLetters(e),this.animateHeadline(e,t)}singleLetters(e){const t=this;n(e).find("b").each(function(e){const s=n(e),i=s.text().split(""),o=s.hasClass("is-visible");for(const e in i)i.hasOwnProperty(e)&&(s.parents(t.selector).length>0&&(i[e]=`<em>${i[e]}</em>`),i[e]=o?`<i class='in'>${i[e]}</i>`:`<i>${i[e]}</i>`);const a=i.join("");s.html(a).css("opacity","1")})}animateHeadline(e,t){const s=this,i=t.animationDelay;n(e).each(function(e){const t=n(e);setTimeout(()=>{s.hideWord(t.find(".is-visible").first())},i)})}hideWord(e){const t=this,s=t.takeNext(e),i=e.children().length>=s.children().length;t.hideLetter(e.find("i").first(),e,i,t.options.lettersDelay),t.showLetter(s.find("i").first(),s,i,t.options.lettersDelay)}takeNext(e){return 0===e.length||e.is(":last-child")?e.parent().children().first():e.next()}hideLetter(e,t,s,i){const n=this;e.removeClass("in").addClass("out"),0===e.length||e.is(":last-child")?s&&setTimeout(()=>{n.hideWord(n.takeNext(t))},n.options.animationDelay):setTimeout(()=>{n.hideLetter(e.next(),t,s,i)},i)}showLetter(e,t,s,i){const n=this;e.addClass("in").removeClass("out"),0===e.length||e.is(":last-child")?s||setTimeout(()=>{n.hideWord(t)},n.options.animationDelay):setTimeout(()=>{n.showLetter(e.next(),t,s,i)},i)}}class y{constructor(e,t,s){this.active=!0,this.pos=t,this.radius=s,this.options=e}draw(e){this.active&&(e.beginPath(),e.arc(this.pos.x,this.pos.y,this.radius,0,2*Math.PI,!1),e.fillStyle=`rgba(${this.options.pointColor},${this.active?.6:0})`,e.fill())}}class w{constructor(e,t){this.options={gsap:null,canvasId:"targetCanvas",animateHeader:!0,width:window.innerWidth,height:window.innerHeight,isWindowWidth:!1,isWindowHeight:!1,num:20,pointColor:"156,217,249",lineColor:"156,217,249"},this.animationFrameId=0,this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.lineeffect")||i.data("be.lineeffect",e),e.init(s,t||e.options)})})}init(e,t){if(!t.gsap||"function"!=typeof t.gsap.to)return void console.error('[LineEffect] Missing or invalid "gsap" dependency in options.');let s,i;s="number"==typeof t.width?t.width:"string"==typeof t.width?this.resolveDimension(t.width,"width"):window.innerWidth,i="number"==typeof t.height?t.height:"string"==typeof t.height?this.resolveDimension(t.height,"height"):window.innerHeight;const n={x:s/2,y:i/2},o=document.getElementById(t.canvasId);if(!o)return void console.error(`[LineEffect] Canvas with id "${t.canvasId}" not found.`);o.width=s,o.height=i;const a=o.getContext("2d"),r=[];for(let e=0;e<s;e+=s/t.num)for(let n=0;n<i;n+=i/t.num){let o=e+Math.random()*s/t.num,a=n+Math.random()*i/t.num,l={x:o,originX:o,y:a,originY:a,active:0,closest:[],circle:null};r.push(l)}for(let e=0;e<r.length;e++){const t=[],s=r[e];for(let e=0;e<r.length;e++){let i=r[e];if(s!==i){let e=!1;for(let s=0;s<5;s++)e||void 0===t[s]&&(t[s]=i,e=!0);for(let n=0;n<5;n++)e||this.getDistance(s,i)<this.getDistance(s,t[n])&&(t[n]=i,e=!0)}}s.closest=t}for(let e in r)r.hasOwnProperty(e)&&(r[e].circle=new y(t,r[e],2+2*Math.random()));t.points=r,this.initAnimation(t,a,n,s,i),this.addListeners(t,n,o)}resolveDimension(e,t){if(e.endsWith("%")){const s=parseFloat(e);return"width"===t?s/100*window.innerWidth:s/100*window.innerHeight}if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("vw"))return parseFloat(e)/100*window.innerWidth;if(e.endsWith("vh"))return parseFloat(e)/100*window.innerHeight;if(e.endsWith("rem")||e.endsWith("em")){const t=document.createElement("div");t.style.position="absolute",t.style.visibility="hidden",t.style.fontSize=e,document.body.appendChild(t);const s=parseFloat(getComputedStyle(document.documentElement).fontSize);if(document.body.removeChild(t),e.endsWith("rem"))return parseFloat(e)*s;if(e.endsWith("em"))return parseFloat(e)*s}return parseFloat(e)||0}getDistance(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}initAnimation(e,t,s,i,n){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.animate(e,t,s,i,n);for(let t in e.points)e.points.hasOwnProperty(t)&&this.shiftPoint(e.points[t])}animate(e,t,s,i,n){if(e.animateHeader){const o=e.points;t.clearRect(0,0,i,n);for(let i in o)if(o.hasOwnProperty(i)){const n=Math.abs(this.getDistance(s,o[i]));n<4e3?(o[i].active=.3,o[i].circle.active=!0):n<2e4?(o[i].active=.1,o[i].circle.active=!0):n<4e4?(o[i].active=.02,o[i].circle.active=!0):(o[i].active=0,o[i].circle.active=!1),this.drawLines(e,o[i],t),o[i].circle.draw(t)}}this.animationFrameId=requestAnimationFrame(()=>this.animate(e,t,s,i,n))}shiftPoint(e){this.options.gsap.to(e,{duration:1+Math.random(),x:e.originX-50+100*Math.random(),y:e.originY-50+100*Math.random(),ease:"circ.inOut",onComplete:()=>this.shiftPoint(e)})}drawLines(e,t,s){var i;if(t.active)for(let n in t.closest)(null===(i=t.closest)||void 0===i?void 0:i.hasOwnProperty(n))&&(s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(t.closest[n].x,t.closest[n].y),s.strokeStyle=`rgba(${e.lineColor},${t.active})`,s.stroke())}addListeners(e,t,s){this.removeListeners(),this.boundMouseMove=e=>this.mouseMove(e,t),this.boundScroll=()=>this.scrollCheck(e),this.boundResize=()=>this.resize(e,s),document.getElementById(this.options.canvasId)?("ontouchstart"in window||window.addEventListener("mousemove",this.boundMouseMove),window.addEventListener("scroll",this.boundScroll),window.addEventListener("resize",this.boundResize)):("ontouchstart"in window||window.removeEventListener("mousemove",this.boundMouseMove),window.removeEventListener("scroll",this.boundScroll),window.removeEventListener("resize",this.boundResize))}removeListeners(){this.boundMouseMove&&window.removeEventListener("mousemove",this.boundMouseMove),this.boundScroll&&window.removeEventListener("scroll",this.boundScroll),this.boundResize&&window.removeEventListener("resize",this.boundResize)}mouseMove(e,t){const s=document.getElementById(this.options.canvasId);if(s){const i=s.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,a=i.top+n,r=i.left+o;let l=0,c=0;e.pageX||e.pageY?(l=e.pageX,c=e.pageY):(e.clientX||e.clientY)&&(l=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t.x=l-r,t.y=c-a}}scrollCheck(e){e.animateHeader=document.body.scrollTop<=("number"==typeof e.height?e.height:window.innerHeight)}resize(e,t){var s,i;if(e.isWindowWidth)if("string"==typeof e.width){const s=this.resolveDimension(e.width,"width");t.width=s}else t.width=null!==(s=e.width)&&void 0!==s?s:window.innerWidth;if(e.isWindowHeight)if("string"==typeof e.height){const s=this.resolveDimension(e.height,"height");t.height=s}else t.height=null!==(i=e.height)&&void 0!==i?i:window.innerHeight}destroy(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.removeListeners()}}const C="ce-slideFromTop",x="ce-slideFromRight",k="ce-slideFromBottom",E="ce-slideFromLeft",T="ce-slideTop",L="ce-slideLeft";class P{constructor(e,t){this.options={reverse:!1},this.selector=e,s.defaultConstructor(this,e,t,e=>{e.elements.forEach(s=>{let i=n(s);i.data("be.hoverdir")||i.data("be.hoverdir",e),e.init(s,t||e.options)})})}init(e,t){const s=n(e);s.on("mouseenter",e=>this.mouseEvent(e,t)),s.on("mouseleave",e=>this.mouseEvent(e,t))}mouseEvent(e,t){const s=n(e.currentTarget),i=e.type,o=s.find("div"),a=this.getDir(s,{x:e.pageX,y:e.pageY}),r=this.getClasses(a,t);o.removeClass(),"mouseenter"===i?setTimeout(()=>{o.css("display","none").addClass(r.from),o.show(15,e=>{n(e).addClass(r.to)})},15):o.addClass(r.from)}getDir(e,t){const s=e.width(),i=e.height(),n=(t.x-e.offset().left-s/2)*(s>i?i/s:1),o=(t.y-e.offset().top-i/2)*(i>s?s/i:1);return Math.round((Math.atan2(o,n)*(180/Math.PI)+180)/90+3)%4}getClasses(e,t){let s,i;switch(e){case 0:s=t.reverse?k:C,i=T;break;case 1:s=t.reverse?E:x,i=L;break;case 2:s=t.reverse?C:k,i=T;break;case 3:s=t.reverse?x:E,i=L;break;default:s="",i=""}return{from:s,to:i}}}class S{constructor(e){this.options={times:20,time:1e3},this.jsLoaded=[],this.cssLoaded=[],this.options=Object.assign(Object.assign({},this.options),e)}loadScript(e){const t=this;return new Promise((s,i)=>{if(t.jsLoaded.find(t=>t.url===e)){let i,n=0;const o=setInterval(()=>{i=t.jsLoaded.find(t=>t.url===e);try{if(!(null==i?void 0:i.isLoaded)&&n>t.options.times)return t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),i&&i.script.parentNode===document.body&&document.body.removeChild(i.script),void clearInterval(o);if(null==i?void 0:i.isLoaded)return clearInterval(o),void s(i.script);n++}catch(e){console.error(e)}},t.options.time)}else{const n=document.createElement("script");let o=!1,a=0;t.jsLoaded=[...t.jsLoaded,{script:n,url:e,isLoaded:!1,count:0}],n.src=e,n.onload=()=>{t.jsLoaded=t.jsLoaded.map(t=>t.url===e?Object.assign(Object.assign({},t),{isLoaded:!0}):t),o=!0,s(n)},n.onerror=()=>{t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),i(new Error("Script load error for "+e))},document.body.appendChild(n);const r=setInterval(()=>{if(!o)return a>t.options.times?(n.parentNode===document.body&&document.body.removeChild(n),void clearInterval(r)):void a++;clearInterval(r)},100)}})}loadStyle(e){const t=this;return new Promise((s,i)=>{const n=document.getElementsByTagName("link");for(let t=0;t<n.length;t++)if(n[t].getAttribute("href")===e)return void s(n[t]);const o=document.createElement("link");o.href=e,o.rel="stylesheet",o.type="text/css",o.onload=()=>s(o),o.onerror=()=>i(new Error("Style load error for "+e)),document.head.appendChild(o),t.cssLoaded.push(o)})}destroy(){this.jsLoaded.forEach(e=>{e.script&&e.script.parentNode===document.body&&document.body.removeChild(e.script)}),this.cssLoaded.forEach(e=>{e.parentNode===document.head&&document.head.removeChild(e)}),this.jsLoaded=[],this.cssLoaded=[]}}const A=r;module.exports.arisu=t})();
|
|
1
|
+
(()=>{"use strict";var e={d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e,t){if(!e)return t;{let s;for(s in t)if(null==t?void 0:t.hasOwnProperty(s)){const n=t[s];null==e[s]&&(e[s]=n)}}return e}function n(e){let t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t=t.replace(/\./g,""),t}function i(...e){window.console&&e&&console.log(...e)}function o(e,t){let s=parseFloat(String(e));return s=s?Math.round(e*Math.pow(10,t))/Math.pow(10,t):0,s}function a(e){let t=!0;return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(t=!1),t}function r(e,t){return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(e=t),e}function l(e){return!!e&&e&&"object"==typeof e&&!Array.isArray(e)&&!0}function c(e,t){return e.filter(function(e){return-1!==t.indexOf(e)})}function d(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)||-1===t.indexOf(s)})}function h(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)&&-1!==t.indexOf(s)})}function u(e){return/^<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>$|^<([a-z][a-z0-9]*)\b[^>]*\/>$/i.test(e)}function m(e){let t=document.createElement("div");t.innerHTML=e.trim();let s=t.firstChild;if((null==s?void 0:s.nodeType)===Node.TEXT_NODE){s=s.nextSibling;let e=document.createDocumentFragment();for(;s;)e.appendChild(s),s=s.nextSibling;return e}return s}function p(e){var t;if("get"===(null===(t=null==(e=s(e,{url:"",method:"GET",async:!0,headerMap:{},cache:"default",dataType:"json",data:null,success:function(){},error:function(){}}))?void 0:e.method)||void 0===t?void 0:t.toLowerCase())){if(!e.url.includes("?")){let t=new URLSearchParams;for(let s in e.data)e.data.hasOwnProperty(s)&&t.append(s,e.data[s]);e.url=e.url+"?"+t.toString()}e.data=null}if(fetch)fetch(e.url,{method:e.method,headers:new Headers(e.headerMap),cache:e.cache,body:e.data?JSON.stringify(e.data):null}).then(function(t){return t.ok?"json"===e.dataType?t.json():t.text():Promise.reject(new Error("Failed to fetch resource"))}).then(function(t){e.success&&e.success(t)}).catch(function(t){e.error&&e.error(t)});else{let t=new XMLHttpRequest;t.onload=function(){if(t.status>=200&&t.status<300){let s;switch(e.dataType){case"json":try{s=JSON.parse(t.responseText)}catch(t){return void(e.error&&e.error(t))}break;case"text":s=t.responseText;break;default:s=t.responseText||t.response}e.success&&e.success(s,t.status,t)}else{let s=new Error("Request failed. Status: "+t.status);e.error&&e.error(s)}},t.onerror=function(){e.error&&e.error(new Error("Network Error"))},t.open((null==e?void 0:e.method)||"get",e.url,e.async||!1);for(let s in e.headerMap)e.headerMap.hasOwnProperty(s)&&t.setRequestHeader(s,e.headerMap[s]);e.data?t.send(e.data):t.send()}}function f(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),s=window.location.search.substr(1).match(t);return null!=s?unescape(s[2]):null}function g(e){const t=document.querySelector(e);if(t){const e=t.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft,i=e.top+s,o=e.left+n;window.scrollTo(o,i)}}function v(e,t,s){let n=0;return e.length<=t||e.length>=s?n=1:/^[0-9]{0,32}$/.test(e)?n=2:/^[a-zA-z]{0,32}$/.test(e)?n=3:/^[0-9a-zA-z]{0,32}$/.test(e)?n=4:/^[^\u4e00-\u9fa5a-zA-Z\d,.,。]{0,32}$/.test(e)?n=5:/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]*$/.test(e)&&(n=8),n}e.r(t),e.d(t,{AeLoader:()=>W,Base:()=>H,BtnEf:()=>z,Flash:()=>X,GoTop:()=>j,HoverDir:()=>te,IAccordion:()=>U,IList:()=>B,ILoader:()=>se,IPagination:()=>R,ItemCount:()=>q,LineEffect:()=>V,NiceSelect:()=>F,PopoverSearch:()=>Y,SubmitFlag:()=>O,ajax:()=>p,al:()=>ce,arrayRemove:()=>ie,arrayUnique:()=>oe,cache:()=>D,calculateKellyFraction:()=>pe,camelCase:()=>n,cf:()=>de,contextQuerySelector:()=>A,contrast:()=>h,createElement:()=>m,dataAttr:()=>P,datepicker:()=>he,default:()=>we,defaultConstructor:()=>L,different:()=>d,elementData:()=>I,expando:()=>$,extend:()=>s,formatDate:()=>ne,getCookie:()=>C,getParam:()=>f,getToken:()=>be,getUser:()=>ve,handlebars:()=>ae,hotkey:()=>y,isEqSelector:()=>M,isHtmlTag:()=>u,isNull:()=>a,isObject:()=>l,keys:()=>b,l:()=>i,login:()=>fe,logout:()=>ge,menu:()=>x,menu2Tree:()=>E,messageInit:()=>le,move:()=>g,removeCookie:()=>k,same:()=>c,search:()=>T,setCookie:()=>w,setDefault:()=>r,setToken:()=>ye,shuffleArray:()=>S,strValidation:()=>v,tip:()=>re,toRound:()=>o,validate:()=>me,validationEngine:()=>ue});const b={esc:"Escape",backspace:"Backspace",space:" ",enter:"Enter",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"};function y(e,t){document.addEventListener("keydown",function(s){e===s.key&&t()})}function w(e,t,s={}){let n="",i=s.path||"/",o=s.domain,a=s.secure?"; Secure":"";if(s.expires){let e;"number"==typeof s.expires?(e=new Date,e.setTime(e.getTime()+24*s.expires*60*60*1e3)):e=s.expires,n=`; expires=${e.toUTCString()}`}document.cookie=`${e}=${encodeURIComponent(t)}${n}; path=${i}; domain=${o||""}${a}`}function C(e){let t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let n=s[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return null}function k(e,t={}){w(e,"",Object.assign(Object.assign({},t),{expires:-1}))}function x(e,t){const s=function(e,n,i){let o="";++n;for(let a=0;a<e.length;a++){const r=e[a];let l="#";if(r.link&&(l=r.link),r.pId||0!==n){if(r.pId===i){let t="";r.isParent&&(t=s(e,n,r.id),t&&(t="<ul class='sub'>"+t+"</ul>"));let i="";1===n&&(i=`<i class='${r.icon}'></i>`);let a=r.hash?` data-hash='${r.hash}' `:" ",c=r.actionId?` id='${r.actionId}' `:" ";o+=`<li class='sub-menu'><a${r.isParent?" class='mu-js-a' ":" "}${a}${r.tid?` data-tid='${r.tid}' `:" "}${c}href='${l}'>`+i+`<span>${r.name}</span></a>`+t+"</li>"}}else if(t)o=s(e,n,r.id);else{let t=s(e,n,r.id);t&&(t="<ul class='sub'>"+t+"</ul>"),o+=`<li class='sub-menu'><a${r.hash?` data-hash='${r.hash}' `:" "}${r.actionId?` id='${r.actionId}' `:" "}href='${l}'><span>${r.name}</span></a>`+t+"</li>"}}return o};let n="";return e&&(n=s(e,-1,0)),""+n}function E(e,t,s){let n=[];return e.forEach(function(i){i.pId===t&&(i.isactive=`a${i.id}`===s,n.push(i),i.isParent&&(i.children=E(e,i.id)))}),n}function T(e){const t=document.querySelector(".fm-search");if(!t)return;const s=t.querySelector("input"),n=t.querySelectorAll("span"),i=n[0],o=n[1];if(!s||!i||!o)return;const a=e=>{o.style.opacity=e?"1":"0",o.style.visibility=e?"visible":"hidden"};s.addEventListener("change",()=>{a(""!==s.value)}),a(""!==s.value),o.addEventListener("click",()=>{s.value="",a(!1)}),i.addEventListener("click",()=>{e(s.value)})}function S(e){if(!Array.isArray(e))return e;const t=[...e];for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}return t}function L(e,t,n,i){"string"==typeof t?e.elements=document.querySelectorAll(t):t instanceof NodeList?e.elements=t:t instanceof HTMLElement?e.elements=Array.of(t):e.elements=[],e.options=s(n,e.options),i(e)}function P(e,t){var s;let n="data-"+t;return null!==(s=e.getAttribute(n))&&void 0!==s?s:void 0}function A(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}function M(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}const $="base"+(""+Math.random()).replace(/\D/g,""),I=new Map,D={};class H{constructor(e,t){if(this.elements=[],this.length=0,t=t instanceof H?t.elements[0]:t||document,"string"==typeof e)if(t&&"string"==typeof t&&(t=document.querySelector(t)),H.isEqSelector(e)){const s=e.split(":")[0],n=e.match(/:eq\((\d+)\)/);if(n){const e=parseInt(n[1]),i=H.contextQuerySelector(">"+s,t);i.length>0?this.elements=[i[e]]:this.elements=[]}else this.elements=[]}else this.elements=H.contextQuerySelector(e,t);else e instanceof NodeList||e instanceof HTMLElement?this.elements=e instanceof NodeList?Array.from(e):[e]:e instanceof Window?this.elements=[window]:null!==e&&"object"==typeof e&&"documentElement"in e?this.elements=[t]:Array.isArray(e)?this.elements=e:this.elements=[];this.length=this.elements.length}each(e){return this.elements.forEach((t,s)=>{e(t,s)}),this}hasClass(e){let t=!1;return this.each(s=>{t=s.classList.contains(e)}),t}addClass(e){return this.each(t=>{if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.add(s[e])}else e&&t.classList.add(e)})}removeClass(e){return this.each(t=>{if(void 0===e)t.className="";else if(e||0!==e.length)if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.remove(s[e].trim())}else t.classList.remove(e.trim())})}toggleClass(e){return this.each(t=>{if(t.classList)t.classList.toggle(e);else{let s=t.className.split(/\s+/),n=s.indexOf(e);n>=0?s.splice(n,1):s.push(e),t.className=s.join(" ")}})}not(e){let t=e instanceof H?e.elements:Array.from(document.querySelectorAll(e));return this.elements=Array.from(this.elements).filter(e=>!t.includes(e)),this}is(e){var t;let s=this.elements[0];if(":visible"===e){if("none"===s.style.display||"hidden"===s.style.visibility||"0"===getComputedStyle(s).opacity)return!1}else{if(":first-child"===e)return(null===(t=s.parentNode)||void 0===t?void 0:t.firstChild)===s;if(":last-child"!==e)return s.matches(e);{const e=s.parentNode;if(e){const t=e.children;return t[t.length-1]===s}}}return!1}closest(e){let t=this.elements[0];if(!t)return H.build([]);const s=t.matches||t.webkitMatchesSelector;if(s.call(t,e))return this.constructor===H?H.build(this.elements):this;let n=t.parentElement;for(;n;){if(s.call(n,e))return H.build(n);n=n.parentElement}return H.build([])}next(){if(1===this.elements.length){const e=this.elements[0].nextElementSibling;return e instanceof Element?H.build(e):H.build([])}if(this.elements.length>1){const e=[],t=this.elements[0].nextElementSibling;t instanceof Element&&e.push(t);for(let t=1;t<this.elements.length-1;t++)this.elements[t]instanceof Element&&e.push(this.elements[t]);const s=this.elements[this.elements.length-1].nextElementSibling;return s instanceof Element&&e.push(s),H.build(e)}return null}nextAll(e){const t=[];let s=this.elements[0],n=s.nextSibling,i=s.parentElement;for(;n&&(1===n.nodeType&&(e&&!n.matches(e)||t.unshift(n)),n=n.nextSibling,null!==n||0!==t.length||(null==i?void 0:i.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}prev(){if(1===this.elements.length)return H.build(this.elements[0].previousElementSibling);if(this.elements.length>1){let e=H.build(this.elements[0].previousElementSibling);return this.each((t,s)=>{s>1&&(e.elements.push(t),s===this.elements.length-1&&e.elements.push(t.previousElementSibling))}),e}return null}prevAll(e){const t=[];let s=this.elements[this.elements.length-1],n=s.previousSibling,i=s.parentElement;for(;n&&(1===n.nodeType&&(e&&!n.matches(e)||t.unshift(n)),n=n.previousSibling,null!==n||0!==t.length||(null==i?void 0:i.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}first(){return new H([this.elements[0]])}find(e){if(e&&"option:selected"===e.trim()){const e=[];return this.each(t=>{("select-one"===t.type||"select-multiple"===t.type)&&t.selectedIndex>=0&&e.push(t.options[t.selectedIndex])}),new H(e)}{const t=[];return this.elements.forEach(s=>{s instanceof HTMLElement&&s.querySelectorAll(e).forEach(e=>t.push(e))}),new H(t)}}parent(){let e=this.elements[0];return e?new H(e.parentNode):new H}parents(e){const t=[];let s=this.elements[0].parentElement;for(;s&&s!==document.documentElement;)e&&!s.matches(e)||t.push(s),s=s.parentElement;return new H(t)}siblings(){let e=this.elements[0];if(e&&1===e.nodeType){let t=e.parentNode;if(t){let s=[];for(let n=0;n<t.childNodes.length;n++){let i=t.childNodes[n];1===i.nodeType&&i!==e&&s.push(i)}return new H(s)}return new H}return new H}children(){let e=[];return this.each(t=>{e.push(...Array.from(t.children))}),new H(e)}index(){var e;const t=this.elements[0],s=null===(e=t.parentNode)||void 0===e?void 0:e.children;if(s)for(let e=0;e<s.length;e++)if(s[e]===t)return e;return-1}size(){return this.elements?this.elements.length:0}on(e,t){return this.each(function(s){s.addEventListener(e,t)})}off(e,t){return this.each(function(s){s.removeEventListener&&t&&s.removeEventListener(e,t)})}click(e){return"function"==typeof e?this.on("click",e):this.each(e=>{const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}),this}focus(e){return"function"==typeof e&&this.on("focus",e),this}change(e){return e&&this.each(t=>{t.addEventListener("change",e,!1)}),this}trigger(e,t){return this.each(function(s){let n;try{n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(s){n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!0,!0,t)}s.dispatchEvent(n)}),this}remove(){return this.each(e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})}data(e,t){if(void 0===e)throw new Error("读取的或设置的键值不能为空");let s=this.elements[0];if(void 0!==t){let i=H.elementData.get(s);return i||(i=new Map,H.elementData.set(s,i)),i.set(n(e),t),this}{const t=H.elementData.get(s);return t?t.get(n(e)):P(s,e)}}removeData(e){let t=this.elements[0],s=H.elementData.get(t);s&&s.set(n(e),void 0)}attr(e,t){if(0===this.elements.length)return void 0===t?"":this;const s=this.elements[0];return void 0===t?(null==s?void 0:s.getAttribute(e))||"":this.each(s=>s.setAttribute(e,t))}removeAttr(e){return this.each(t=>{"function"==typeof t.removeAttribute&&t.removeAttribute(e)})}offset(){let e=this.elements[0].getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft;return{top:e.top+t,left:e.left+s}}scrollTop(){return this.elements[0]instanceof Window?void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop:document.documentElement.scrollTop}height(){const e=this.elements[0];return e?e===window?window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight:e.offsetHeight:(console.warn("目标元素不存在或未正确绑定!"),0)}width(){const e=this.elements[0];return e?e===window?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:e.offsetWidth:(console.warn("目标元素不存在或未正确绑定!"),0)}val(e){let t=this.elements[0];if("select-multiple"===t.type){if(void 0!==e){for(let s=t.options.length-1;s>=0;s--)t.options[s].selected=t.options[s].value===e;return this}{let e=[];for(let s=0;s<t.options.length;s++)t.options[s].selected&&e.push(t.options[s].value);return e}}return void 0!==e?(t.value=e,this):t.value}css(e,t){if(0===this.elements.length)return this;if(void 0===t){if("object"==typeof e){const t=e;for(const e in t)if(t.hasOwnProperty(e)){const s=t[e];this.each(t=>{t.style[e]=s})}return this}return this.elements[0].style[e]||""}return this.each(s=>{s.style[e]=t})}text(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t.textContent||"":this.each(t=>{t.textContent=e})}html(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t&&1===t.nodeType?t.innerHTML:"":this.each(t=>{t&&1===t.nodeType&&(t.innerHTML=e)})}after(e){return this.each(t=>{t.insertAdjacentHTML("afterend",e)})}append(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.appendChild(s.firstChild);return t})}prepend(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.insertBefore(s.firstChild,t.firstChild);return t})}hide(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="none",t&&"function"==typeof t&&t(s)},e):(s.style.display="none",t&&"function"==typeof t&&t(s))})}show(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="block",t&&"function"==typeof t&&t(s)},e):(s.style.display="block",t&&"function"==typeof t&&t(s))})}slideUp(e,t){const n=s({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{e.style.height=e.scrollHeight+"px",e.style.overflow="hidden",e.style.transition=`height ${n.duration}ms ease-in-out`,setTimeout(()=>{e.style.height="0px"},n.duration/100),setTimeout(()=>{e.style.display="none",e.style.overflow="",e.style.transition="",e.style.height="",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration-n.duration/100)})}slideDown(e,t){const n=s({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{let t=e.offsetHeight;"none"===e.style.display&&(e.style.display="",t=0),e.style.height=t+"px",e.style.transition=`height ${n.duration}ms ease-in-out`,e.offsetHeight,e.style.height=e.scrollHeight+"px",e.style.display="block",setTimeout(()=>{e.style.overflow="",e.style.transition="",e.style.display="",e.style.height="",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration)})}slideToggle(e,t){const n=s({duration:e,callback:t},{duration:500,callback:null});let i=!0;return this.each(e=>{"none"===e.style.display&&(i=!1)}),i?this.slideUp(n.duration,n.callback):this.slideDown(n.duration,n.callback),this}fadeOut(e,t){const n=s({duration:e,callback:t},{duration:300,callback:null});return this.each(e=>{e.style.transition=`opacity ${n.duration}ms ease-in-out`,e.style.opacity="0",setTimeout(()=>{e.style.display="none",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration)})}checkAll(e){const t=s({checkboxes:e},{checkboxes:".be-check"});return this.each(e=>{let s=document.querySelectorAll(t.checkboxes);e.addEventListener("change",function(){s.forEach(function(t){t.checked=e.checked})})})}checkReverse(e){const t=s({checkboxes:e},{checkboxes:".be-check"});return this.each(e=>{let s=document.querySelectorAll(t.checkboxes);e.addEventListener("click",function(){s.forEach(function(e){e.checked=!e.checked})})})}numStep(e){return e=s(e,{start:0,end:100,duration:1500,callback:!1}),this.each(t=>{let s=null;requestAnimationFrame(function n(i){null===s&&(s=i);const o=Math.min((i-s)/e.duration,1),a=Math.floor(o*(e.end-e.start)+e.start);H.build(t).text(a.toString()),o<1?requestAnimationFrame(n):"function"==typeof e.callback&&e.callback()})})}scrollBG(e){return e=s(e,{speed:0}),this.each(t=>{H.build(t).css("background-position","50% 0px"),H.build(window).on("scroll",()=>{const s=H.build(t),n=s.offset().top,i=s.height(),o=s.scrollTop(),a=s.height();if(a+o>n&&a+o<n+a+i){const t=(n+i-o)/e.speed;s.css("background-position","50% -"+t+"px")}})})}setActive(e){const{className:t="active"}=e||{};H.build(this.elements).click(e=>{const s=H.build(e.currentTarget);s.hasClass(t)?s.removeClass(t):(H.build(this.elements).removeClass(t),s.addClass(t))})}loading(e){let t=!1;return void 0!==e&&"object"!=typeof e&&(t=!0,e={}),e=s(e,{isFull:!0,loadingTarget:"#do-preloader",template:'<div id="do-preloader" class="do-preloader"><span class="do-pr-loader"><span class="do-pr-lr"></span></span></div>'}),this.each(s=>{const n=e,i=n.loadingTarget,o=n.template;if(t)H.build("> *",s).removeClass("be-blur-2"),H.build(i).addClass("oy-0"),setTimeout(()=>{H.build("> *",s).removeClass("be-ts"),H.build(i).remove()},300);else{H.build("> *",s).addClass("be-ts").addClass("be-blur-2"),H.build(s).prepend(o);const e=H.build(i);e.length&&e.css("position","fixed").css("height","100vh").css("width","100vw")}})}static contextQuerySelector(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}static isEqSelector(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}static build(e,t){return new(this||H)(e,t)}}H.expando="base"+(""+Math.random()).replace(/\D/g,""),H.elementData=new Map,H.cache={};const N=H.build;class O{constructor(e,t){this.options={text:"处理中..",useText:!0},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.submitflag")||n.data("be.submitflag",e),e.init(s,t)})})}init(e,t){const n=this;t&&(n.options=s(t,n.options)),N(e).click(e=>{n.request(e.currentTarget)})}request(e){const t=N(e);e.setAttribute("data-original-text",t.text()),t.addClass("submit-flag-request").attr("disabled","disabled"),this.options.useText&&t.text(this.options.text)}complete(e){let t;t=N(e||this.selector),t.removeClass("submit-flag-request").removeAttr("disabled"),this.options.useText&&t.each(e=>{const t=e.getAttribute("data-original-text");null!==t&&""!==t&&(N(e).text(t),e.removeAttribute("data-original-text"))})}destroy(){N(this.selector).removeData("be.submitflag"),N(this.selector).each(e=>{e.removeAttribute("data-original-text")})}}class j{constructor(e,t){this.options={position:{bottom:"15px",right:"15px"},showEffect:" animate__zoomIn ",hideEffect:" animate__zoomOut ",type:"fixed",offsetTop:400},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.gotop")||n.data("be.gotop",e),e.init(s,t)})})}init(e,t){const n=N(e),i=(t=s(t,this.options)).type||"fixed",o=t.showEffect||" animate__zoomIn ",a=t.position,r=void 0!==t.offsetTop?Number(t.offsetTop):400,l=t.hideEffect||" animate__zoomOut ";n.addClass("animate__animated").css({display:"inline-block",position:i,opacity:0}),"fixed"!==i&&"absolute"!==i||n.css(a),n.on("click",e=>{e.preventDefault(),window.scrollTo(0,0)}),r&&!n.hasClass("animated-running")&&n.offset().top<=N(window).height()&&n.addClass("animated-running "+o).css({opacity:""}),N(window).on("scroll",()=>{if(r)N(window).scrollTop()>=r&&!n.hasClass("animated-running")?(n.addClass("animated-running "+o).css({opacity:""}),n.removeClass(l)):N(window).scrollTop()<=r&&n.hasClass("animated-running")&&(n.removeClass("animated-running "+o).css({opacity:0}),n.addClass(l));else{let e=n.offset().top;n.hasClass("animated-running")||N(window).scrollTop()>=e-N(window).height()&&(n.addClass("animated-running "+o).css({opacity:""}),n.removeClass(l))}}),N(window).trigger("scroll")}}class q{constructor(e,t){this.options={num:1},this.value=0,this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.itemcount")||n.data("be.itemcount",e),e.init(s,t)})})}init(e,t){const n=this;t&&(n.options=s(t,n.options));const i=N(e),o=i.find(".fm-plus"),a=i.find(".fm-minus"),r=i.find(".fm-result");let l=parseInt(String(r.val()));n.value=isNaN(l)?0:l,o.on("click",function(e){e.preventDefault(),l+=n.options.num,r.val(String(l)),n.value=l}),a.on("click",function(e){if(e.preventDefault(),!(l-n.options.num>=0))return!1;l-=n.options.num,r.val(String(l)),n.value=l})}getValue(){return this.value}}class F{constructor(e,t){this.options={width:"auto"},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.niceselect")||n.data("be.niceselect",e),e.init(s,t)})})}create(e,t){var s,n;const i=this,o=N(e),a=o.after("<div></div>").next().addClass("ce-nice-select").addClass(o.attr("class")||"").addClass(o.attr("disabled")?"disabled":"").attr("tabindex",o.attr("disabled")?"":"0").css("width",null!==(s=i.options.width)&&void 0!==s?s:"auto").html('<span class="current"></span><ul class="list"></ul>'),r=o.find("option"),l=e,c=N(l.options[l.selectedIndex]);i.text=c.data("display")||c.text(),a.find(".current").html(null!==(n=i.text)&&void 0!==n?n:""),r.each(function(e){const t=N(e),s=t.data("display"),n=null!=s?String(s):"",i=c.text()===t.text()?"selected":"";a.find("ul").append(`<li data-value="${t.val()}" data-display="${n}" class="option ${i}">${t.text()}</li>`)})}init(e,t){const n=this,i=N(n.selector),o=N(e);t&&(n.options=s(t,n.options)),o.hide(),n.create(e,n.options);const a=i.next();return a.on("click",function(){const e=o.next();e.toggleClass("open"),e.hasClass("open")?(e.find(".option"),e.find(".focus").removeClass("focus"),e.find(".selected").addClass("focus")):e.focus()}),N(".option",a).on("click",function(e){const t=N(e.currentTarget),s=a;s.find(".selected").removeClass("selected"),t.addClass("selected"),n.text=t.data("display")||t.text(),s.find(".current").text(String(n.text)),n.value=t.data("value"),s.prev().trigger("change").val(String(n.value))}),this}getText(){return this.text}getValue(){return this.value}}class W{constructor(e,t){this.options={time:1e3},this.selector=e||"",l(e)?(this.options=s(e,this.options),this.selector=""):(e&&(this.selector=e),this.options=s(t,this.options)),N("[data-ae-load]").addClass("ae-load")}start(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";N(s).addClass("ae-load").removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-complete"),setTimeout(()=>{N(s).removeClass("ae-load ae-tt-complete")},this.options.time)}loading(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";N("[data-ae-load]").addClass("ae-load"),N(s).each(e=>{const t=N(e),s=t.data("al-mw"),n=t.data("al-mh");s&&t.css("min-width",s),n&&t.css("min-height",n),t.removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-loading")})}done(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";N(s).removeClass("ae-tt-done").addClass("ae-tt-done"),setTimeout(()=>{N(s).removeClass("ae-load ae-tt-loading ae-tt-done")},this.options.time)}}class z{constructor(e,t){this.options={},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.btnef")||n.data("be.btnef",e),e.init(s,t)})})}init(e,t){const s=N(e);s.append("<b></b>"),s.on("mouseenter",e=>{const t=N(e.currentTarget),s=t.offset(),n=e.pageX-s.left,i=e.pageY-s.top;t.find("b").css({top:i+"px",left:n+"px"})}).on("mouseout",e=>{const t=N(e.currentTarget),s=t.offset(),n=e.pageX-s.left,i=e.pageY-s.top;t.find("b").css({top:i+"px",left:n+"px"})})}}class R{constructor(e,t){this.options={targetWarp:"#be-pw",totalItems:0,itemsPerPage:0,visiblePages:5,prev:"上一页",next:"下一页",first:"首页",last:"尾页",onButtonClick:()=>{}},this.currentPage=1,this.totalPages=0,this.selector=e,L(this,e,t,e=>{let s=this;e.elements.forEach(n=>{let i=N(n);i.data("be.ipagination")||i.data("be.ipagination",e),s.currentPage=1,s.totalPages=Math.ceil(s.options.totalItems/s.options.itemsPerPage),e.init(t)})})}init(e){const t=this;let n=t.options;e&&(n=s(e,t.options)),N(this.selector).html(""),this.addPageButton(n.first,1,()=>this.goToPage(1)),this.addPageButton(n.prev,this.currentPage-1,()=>this.goToPrevPage());let i=Math.max(1,this.currentPage-Math.floor(n.visiblePages/2)),o=Math.min(this.totalPages,i+n.visiblePages-1);o-i<n.visiblePages-1&&(i=Math.max(1,o-n.visiblePages+1));for(let e=i;e<=o;e++)this.addPageButton(e,e,()=>this.goToPage(e));this.addPageButton(n.next,this.currentPage+1,()=>this.goToNextPage()),this.addPageButton(n.last,this.totalPages,()=>this.goToPage(this.totalPages));const a=n.itemsPerPage*(t.currentPage-1)+1,r=Math.min(a+n.itemsPerPage-1,n.totalItems);N("p",n.targetWarp).html(`显示 ${a} 至 ${r} 条,共有 ${n.totalItems} 条`)}addPageButton(e,t,s){const n=document.createElement("li");n.classList.add("page-item"),"number"==typeof e&&Number.isFinite(e)||!isNaN(Number(e))&&Number.isFinite(Number(e))?n.classList.add("pi-t2"):n.classList.add("pi-t1");const i=document.createElement("button");n.append(i),i.innerHTML=String(e),i.onclick=s,t!==this.currentPage&&0!==t&&t!==this.totalPages+1||(n.classList.add("active"),n.classList.add("disabled")),N(this.selector).append(n)}goToPrevPage(){this.currentPage>1&&(this.currentPage--,this.init(),this.options.onButtonClick(this.currentPage))}goToNextPage(){this.currentPage<this.totalPages&&(this.currentPage++,this.init(),this.options.onButtonClick(this.currentPage))}goToPage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.init(),this.options.onButtonClick(this.currentPage))}}class B{constructor(e,t){this.options={rp:"10",visiblePages:7,sortname:"id",sortorder:"desc",method:"post",dataType:"json",param:{},handlebars:null,url:"",loadColor:"#0a0a0a",lang:"cn",template:"#tp-list",headerMap:{},cache:"default",ipWarp:"#ilist-ip-warp",prev:"上一页",next:"下一页",first:"首页",last:"尾页",onSuccess:!1,onError:!1},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.ilist")||n.data("be.ilist",e),void 0!==window.Handlebars&&null===(null==t?void 0:t.handlebars)&&(t.handlebars=window.Handlebars),e.init(s,t||e.options)})})}init(e,t){let n=N(e),i=n.data("be.ilist.html");if(n.data("be.ilist.flag",!0),i)N(".be-list-data-body",e).html("");else{const e=N(t.template);if(!t.handlebars)return void console.error("Handlebars is required for IList but not provided.");const s=t.handlebars.compile(e.html())({});n.html(s),n.data("be.ilist.html",s)}let o=s({page:1,rp:t.rp,sortname:t.sortname,sortorder:t.sortorder},t.param);t.isInit=!0,N(e).data("be.ilist.event",!0),this.getData(e,t,o)}getData(e,t,n){let i=this,o=N(e);N(".be-list-data-body",e).html(""),N(".be-list-loading",e).addClass("opacity-100"),N(".be-list-nofound",e).removeClass("opacity-100"),N(".be-list-page",e).removeClass("opacity-100"),p({method:t.method,url:t.url,headerMap:t.headerMap,data:n,cache:t.cache,dataType:t.dataType,success:a=>{N(".be-list-loading",e).removeClass("opacity-100").addClass("opacity-0"),N(".be-list-data",e).removeClass("opacity-0"),N(".be-list-data-body",e).css("display","table-row-group"),a.isInit=t.isInit,t.onSuccess&&t.onSuccess(a),a.total?(i.page(e,t,n,a.total),N(".ilist-check-all").checkAll(".ilist-check"),N("table > tbody tr",e).click(e=>{let t=N(e.target);t.is("input")||t.is("i")||t.is("a")||N(".ilist-check",e.currentTarget).click()}),o.data("be.ilist.event")&&(o.data("be.ilist.event",!1),N(".ilist-check",e).change(e=>{N(e.currentTarget).is(":checked")?N(e.currentTarget).parents("tr").addClass("active"):N(e.currentTarget).parents("tr").removeClass("active")})),N("table > thead tr td",e).click(a=>{const r=N(a.currentTarget).data("sortname");if(r){const l=o.data("be.ilist.param");if(l&&(n=s(l,n)),n.sortname=r,!N(a.currentTarget).hasClass("is-check")&&n.sortname){let s=N(a.currentTarget).attr("data-sort-order");N("table > thead tr td",e).removeAttr("data-sort-order"),s?(N(a.currentTarget).attr("data-sort-order","desc"===s?"asc":"desc"),n.sortorder="desc"===s?"asc":"desc"):(N(a.currentTarget).attr("data-sort-order","desc"),n.sortorder="desc"),o.data("be.ilist.flag",!0),n.page="1",t.isInit=!1,i.getData(e,t,n)}}}),N(".be-list-page",e).addClass("opacity-100")):(N(".be-list-nofound",e).addClass("opacity-100"),N(".be-list-page",e).removeClass("opacity-100"))},error:e=>{try{t.onError&&t.onError(e)}catch(e){}}})}page(e,t,s,n){let i=this,o=N(e);o.data("be.ilist.flag")&&new R("#ipagination",{targetWarp:t.ipWarp,totalItems:n,itemsPerPage:Number(t.rp),visiblePages:t.visiblePages,prev:t.prev,next:t.next,first:t.first,last:t.last,onButtonClick:n=>{const o=document.querySelector(".ilist-check-all");o&&(o.checked=!1),s.page=n,t.isInit=!1,i.getData(e,t,s)}}),o.data("be.ilist.flag",!1)}reload(e){let t=N(this.selector);const n=t.data("be.ilist"),i=s(e,{page:1,rp:n.options.rp,sortname:n.options.sortname,sortorder:n.options.sortorder});n.options.isInit=!1,t.data("be.ilist.flag",!0),t.data("be.ilist.param",i),N("table > thead tr td",t).attr("data-sort-order",""),n.getData(n.selector,n.options,i)}}class U{constructor(e,t){this.options={classParent:"ia-parent",classActive:"active",classArrow:"ia-icon",classCount:"ia-count",autoExpand:!1,classExpand:"ia-current-parent",autoClose:!0,speed:300,saveState:!0,disableLink:!0,showCount:!1,cookie:"ia-cookie",smallClass:"ce-accordion-small"},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.iaccordion")||n.data("be.iaccordion",e),e.init(s,t)})})}init(e,t){const n=this,i=N("li > a",e),o=N("li > ul",e),a=(t=s(t,n.options)).classActive;this.setUpAccordion(e,i,o,t),!0===t.saveState&&n.checkCookie(t.cookie,e,a),!0===t.autoExpand&&N("li."+t.classExpand+" > a").addClass(a),i.click(s=>{const i=N(s.currentTarget),o=i.parent(),r=n.isSmall(s,e,t.smallClass);!0===t.disableLink&&i.siblings().length>0&&s.preventDefault(),!0===t.autoClose&&n.autoCloseAccordion(e,i,r,t),0===N("> ul",o).length?N("> a",o).addClass(a):"none"!==N("> ul",o).css("display")?(n.slideUp(N("ul",o),r,t),N("a",o).removeClass(a)):("none"===N(s.currentTarget).siblings().css("display")?n.slideDown(N(s.currentTarget).siblings().css("overflow","hidden"),r,t):n.slideUp(N(s.currentTarget).siblings(),r,t),N("> a",o).addClass(a)),!0===t.saveState&&n.createCookie(t.cookie,e,a)})}setUpAccordion(e,t,s,n){const i='<span class="'+n.classArrow+'"></span>',o=n.classParent+"-li";s.show(),N("li",e).each(e=>{N("> ul",e).length>0&&(N(e).addClass(o),N("> a",e).addClass(n.classParent).append(i))}),s.hide(),!0===n.showCount&&N("ul",e).each(e=>{N("> a",N(e).parent()).append(' <span class="'+n.classCount+'">('+e.children.length+")</span>")})}autoCloseAccordion(e,t,s,n){const i=this;N("ul",e).each(e=>{let o=!1;t.parents("ul").each(t=>{t===e&&(o=!0)}),o||t.siblings().elements[0]===e||"none"===e.style.display||i.slideUp(N(e),s,n)}),N("a",e).removeClass(n.classActive),t.parents("li").each(e=>{N("> a",e).addClass(n.classActive)})}checkCookie(e,t,s){const n=this,i=C(e);if(null!==i&&""!==i){const e=i.split(",");n.setActiveMenu(t,e,0,s)}}setActiveMenu(e,t,s,n){const i=N("li:eq("+t[s]+")",e),o=N("> a",i),a=o.siblings();o.addClass(n),a.css("display",""),t.length>s+1&&this.setActiveMenu(a,t,++s,n)}createCookie(e,t,s){let n=[];N("li a."+s,t).each(e=>{const t=N(e).parent().index();n.push(t.toString())}),w(e,n.join(","))}isSmall(e,t,s){return!(!N(t).hasClass(s)||0===N(e.currentTarget).siblings().length||(e.preventDefault(),0))}slideDown(e,t,s){t||e.slideDown(s.speed)}slideUp(e,t,s){t||e.slideUp(s.speed)}}class Y{constructor(e,t){this.options={handlebars:null,bootstrap:null,airDatepicker:null,localeZh:null,template:"#tp-popover",templateItems:"#tp-popover-items",html:!0,title:"详细搜索",trigger:"click",toggle:"popover",placement:"auto",onSerach:!1,items:[],timepicker:!0,format:"yyyy-MM-dd hh:mm:ss"},this.itemsHtml="",this.itemsValue=[],this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.popoversearch")||n.data("be.popoversearch",e),void 0===window.Handlebars||(null==t?void 0:t.handlebars)||(t.handlebars=window.Handlebars),void 0===window.bootstrap||(null==t?void 0:t.bootstrap)||(t.bootstrap=window.bootstrap),void 0===window.AirDatepicker||(null==t?void 0:t.airDatepicker)||(t.airDatepicker=window.AirDatepicker),void 0===window.localeZh||(null==t?void 0:t.localeZh)||(t.localeZh=window.localeZh),e.init(s,t||e.options)})})}init(e,t){const s=this;this.itemsHtml="",this.itemsValue=[];const n=t.handlebars.compile(N(t.template).html())({}),i=new t.bootstrap.Popover(e,{html:t.html,title:t.title,trigger:t.trigger,toggle:t.toggle,placement:t.placement,template:n,animation:!0,content:""});e.addEventListener("inserted.bs.popover",()=>{s.addItem(t)}),e.addEventListener("shown.bs.popover",()=>{s.search(s,t),s.close(i),s.clear()}),e.addEventListener("hide.bs.popover",()=>{s.itemsHtml=N(".popover-content-items").html()||"",s.itemsValue=[],N(".popover-form-item").each(e=>{s.itemsValue.push(String(N(e).val()))})})}addItem(e){const t=this,s=N(".ce-popover > .popover-content .popover-content-items");if(t.itemsHtml)s.html(t.itemsHtml);else{const t=e.handlebars.compile(N(e.templateItems).html())({items:e.items});s.html(t)}N(".popover-form-item").each((s,n)=>{const i=N(s);if(void 0!==t.itemsValue[n]&&i.val(String(t.itemsValue[n])),i.hasClass("popover-form-date"))try{new e.airDatepicker(`.ce-popover input[name='${i.attr("name")}']`,{classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:e.timepicker,buttons:["today","clear"],locale:e.localeZh,dateFormat:t=>t.format(e.format)})}catch(e){N(`.ce-popover input[name='${i.attr("name")}']`).attr("type","date")}})}close(e){N(".ce-popover-cancel",".ce-popover").off("click").on("click",()=>{e.hide()})}clear(){N(".ce-popover-clear",".ce-popover").off("click").on("click",()=>{N(".popover-form-item",".ce-popover").each(e=>{N(e).val("")})})}getParam(){const e={};return N(".popover-form-item").each(function(t){const s=N(t),n=s.attr("name"),i=s.val();n&&i&&(e[n]=i)}),e}search(e,t){N(".ce-popover-ok",".ce-popover").off("click").on("click",()=>{t.onSerach&&t.onSerach({param:e.getParam()})})}}class X{constructor(e,t){this.options={animationDelay:5e3,lettersDelay:50,type:void 0},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.flash")||n.data("be.flash",e),e.init(s,t||e.options)})})}init(e,t){1===t.type&&N(e).addClass("letters"),this.singleLetters(e),this.animateHeadline(e,t)}singleLetters(e){const t=this;N(e).find("b").each(function(e){const s=N(e),n=s.text().split(""),i=s.hasClass("is-visible");for(const e in n)n.hasOwnProperty(e)&&(s.parents(t.selector).length>0&&(n[e]=`<em>${n[e]}</em>`),n[e]=i?`<i class='in'>${n[e]}</i>`:`<i>${n[e]}</i>`);const o=n.join("");s.html(o).css("opacity","1")})}animateHeadline(e,t){const s=this,n=t.animationDelay;N(e).each(function(e){const t=N(e);setTimeout(()=>{s.hideWord(t.find(".is-visible").first())},n)})}hideWord(e){const t=this,s=t.takeNext(e),n=e.children().length>=s.children().length;t.hideLetter(e.find("i").first(),e,n,t.options.lettersDelay),t.showLetter(s.find("i").first(),s,n,t.options.lettersDelay)}takeNext(e){return 0===e.length||e.is(":last-child")?e.parent().children().first():e.next()}hideLetter(e,t,s,n){const i=this;e.removeClass("in").addClass("out"),0===e.length||e.is(":last-child")?s&&setTimeout(()=>{i.hideWord(i.takeNext(t))},i.options.animationDelay):setTimeout(()=>{i.hideLetter(e.next(),t,s,n)},n)}showLetter(e,t,s,n){const i=this;e.addClass("in").removeClass("out"),0===e.length||e.is(":last-child")?s||setTimeout(()=>{i.hideWord(t)},i.options.animationDelay):setTimeout(()=>{i.showLetter(e.next(),t,s,n)},n)}}class _{constructor(e,t,s){this.active=!0,this.pos=t,this.radius=s,this.options=e}draw(e){this.active&&(e.beginPath(),e.arc(this.pos.x,this.pos.y,this.radius,0,2*Math.PI,!1),e.fillStyle=`rgba(${this.options.pointColor},${this.active?.6:0})`,e.fill())}}class V{constructor(e,t){this.options={gsap:null,canvasId:"targetCanvas",animateHeader:!0,width:window.innerWidth,height:window.innerHeight,isWindowWidth:!1,isWindowHeight:!1,num:20,pointColor:"156,217,249",lineColor:"156,217,249"},this.animationFrameId=0,this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.lineeffect")||n.data("be.lineeffect",e),e.init(s,t||e.options)})})}init(e,t){if(!t.gsap||"function"!=typeof t.gsap.to)return void console.error('[LineEffect] Missing or invalid "gsap" dependency in options.');let s,n;s="number"==typeof t.width?t.width:"string"==typeof t.width?this.resolveDimension(t.width,"width"):window.innerWidth,n="number"==typeof t.height?t.height:"string"==typeof t.height?this.resolveDimension(t.height,"height"):window.innerHeight;const i={x:s/2,y:n/2},o=document.getElementById(t.canvasId);if(!o)return void console.error(`[LineEffect] Canvas with id "${t.canvasId}" not found.`);o.width=s,o.height=n;const a=o.getContext("2d"),r=[];for(let e=0;e<s;e+=s/t.num)for(let i=0;i<n;i+=n/t.num){let o=e+Math.random()*s/t.num,a=i+Math.random()*n/t.num,l={x:o,originX:o,y:a,originY:a,active:0,closest:[],circle:null};r.push(l)}for(let e=0;e<r.length;e++){const t=[],s=r[e];for(let e=0;e<r.length;e++){let n=r[e];if(s!==n){let e=!1;for(let s=0;s<5;s++)e||void 0===t[s]&&(t[s]=n,e=!0);for(let i=0;i<5;i++)e||this.getDistance(s,n)<this.getDistance(s,t[i])&&(t[i]=n,e=!0)}}s.closest=t}for(let e in r)r.hasOwnProperty(e)&&(r[e].circle=new _(t,r[e],2+2*Math.random()));t.points=r,this.initAnimation(t,a,i,s,n),this.addListeners(t,i,o)}resolveDimension(e,t){if(e.endsWith("%")){const s=parseFloat(e);return"width"===t?s/100*window.innerWidth:s/100*window.innerHeight}if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("vw"))return parseFloat(e)/100*window.innerWidth;if(e.endsWith("vh"))return parseFloat(e)/100*window.innerHeight;if(e.endsWith("rem")||e.endsWith("em")){const t=document.createElement("div");t.style.position="absolute",t.style.visibility="hidden",t.style.fontSize=e,document.body.appendChild(t);const s=parseFloat(getComputedStyle(document.documentElement).fontSize);if(document.body.removeChild(t),e.endsWith("rem"))return parseFloat(e)*s;if(e.endsWith("em"))return parseFloat(e)*s}return parseFloat(e)||0}getDistance(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}initAnimation(e,t,s,n,i){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.animate(e,t,s,n,i);for(let t in e.points)e.points.hasOwnProperty(t)&&this.shiftPoint(e.points[t])}animate(e,t,s,n,i){if(e.animateHeader){const o=e.points;t.clearRect(0,0,n,i);for(let n in o)if(o.hasOwnProperty(n)){const i=Math.abs(this.getDistance(s,o[n]));i<4e3?(o[n].active=.3,o[n].circle.active=!0):i<2e4?(o[n].active=.1,o[n].circle.active=!0):i<4e4?(o[n].active=.02,o[n].circle.active=!0):(o[n].active=0,o[n].circle.active=!1),this.drawLines(e,o[n],t),o[n].circle.draw(t)}}this.animationFrameId=requestAnimationFrame(()=>this.animate(e,t,s,n,i))}shiftPoint(e){this.options.gsap.to(e,{duration:1+Math.random(),x:e.originX-50+100*Math.random(),y:e.originY-50+100*Math.random(),ease:"circ.inOut",onComplete:()=>this.shiftPoint(e)})}drawLines(e,t,s){var n;if(t.active)for(let i in t.closest)(null===(n=t.closest)||void 0===n?void 0:n.hasOwnProperty(i))&&(s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(t.closest[i].x,t.closest[i].y),s.strokeStyle=`rgba(${e.lineColor},${t.active})`,s.stroke())}addListeners(e,t,s){this.removeListeners(),this.boundMouseMove=e=>this.mouseMove(e,t),this.boundScroll=()=>this.scrollCheck(e),this.boundResize=()=>this.resize(e,s),document.getElementById(this.options.canvasId)?("ontouchstart"in window||window.addEventListener("mousemove",this.boundMouseMove),window.addEventListener("scroll",this.boundScroll),window.addEventListener("resize",this.boundResize)):("ontouchstart"in window||window.removeEventListener("mousemove",this.boundMouseMove),window.removeEventListener("scroll",this.boundScroll),window.removeEventListener("resize",this.boundResize))}removeListeners(){this.boundMouseMove&&window.removeEventListener("mousemove",this.boundMouseMove),this.boundScroll&&window.removeEventListener("scroll",this.boundScroll),this.boundResize&&window.removeEventListener("resize",this.boundResize)}mouseMove(e,t){const s=document.getElementById(this.options.canvasId);if(s){const n=s.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,a=n.top+i,r=n.left+o;let l=0,c=0;e.pageX||e.pageY?(l=e.pageX,c=e.pageY):(e.clientX||e.clientY)&&(l=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t.x=l-r,t.y=c-a}}scrollCheck(e){e.animateHeader=document.body.scrollTop<=("number"==typeof e.height?e.height:window.innerHeight)}resize(e,t){var s,n;if(e.isWindowWidth)if("string"==typeof e.width){const s=this.resolveDimension(e.width,"width");t.width=s}else t.width=null!==(s=e.width)&&void 0!==s?s:window.innerWidth;if(e.isWindowHeight)if("string"==typeof e.height){const s=this.resolveDimension(e.height,"height");t.height=s}else t.height=null!==(n=e.height)&&void 0!==n?n:window.innerHeight}destroy(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.removeListeners()}}const Z="ce-slideFromTop",Q="ce-slideFromRight",J="ce-slideFromBottom",G="ce-slideFromLeft",K="ce-slideTop",ee="ce-slideLeft";class te{constructor(e,t){this.options={reverse:!1},this.selector=e,L(this,e,t,e=>{e.elements.forEach(s=>{let n=N(s);n.data("be.hoverdir")||n.data("be.hoverdir",e),e.init(s,t||e.options)})})}init(e,t){const s=N(e);s.on("mouseenter",e=>this.mouseEvent(e,t)),s.on("mouseleave",e=>this.mouseEvent(e,t))}mouseEvent(e,t){const s=N(e.currentTarget),n=e.type,i=s.find("div"),o=this.getDir(s,{x:e.pageX,y:e.pageY}),a=this.getClasses(o,t);i.removeClass(),"mouseenter"===n?setTimeout(()=>{i.css("display","none").addClass(a.from),i.show(15,e=>{N(e).addClass(a.to)})},15):i.addClass(a.from)}getDir(e,t){const s=e.width(),n=e.height(),i=(t.x-e.offset().left-s/2)*(s>n?n/s:1),o=(t.y-e.offset().top-n/2)*(n>s?s/n:1);return Math.round((Math.atan2(o,i)*(180/Math.PI)+180)/90+3)%4}getClasses(e,t){let s,n;switch(e){case 0:s=t.reverse?J:Z,n=K;break;case 1:s=t.reverse?G:Q,n=ee;break;case 2:s=t.reverse?Z:J,n=K;break;case 3:s=t.reverse?Q:G,n=ee;break;default:s="",n=""}return{from:s,to:n}}}class se{constructor(e){this.options={times:20,time:1e3},this.jsLoaded=[],this.cssLoaded=[],this.options=Object.assign(Object.assign({},this.options),e)}loadScript(e){const t=this;return new Promise((s,n)=>{if(t.jsLoaded.find(t=>t.url===e)){let n,i=0;const o=setInterval(()=>{n=t.jsLoaded.find(t=>t.url===e);try{if(!(null==n?void 0:n.isLoaded)&&i>t.options.times)return t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),n&&n.script.parentNode===document.body&&document.body.removeChild(n.script),void clearInterval(o);if(null==n?void 0:n.isLoaded)return clearInterval(o),void s(n.script);i++}catch(e){console.error(e)}},t.options.time)}else{const i=document.createElement("script");let o=!1,a=0;t.jsLoaded=[...t.jsLoaded,{script:i,url:e,isLoaded:!1,count:0}],i.src=e,i.onload=()=>{t.jsLoaded=t.jsLoaded.map(t=>t.url===e?Object.assign(Object.assign({},t),{isLoaded:!0}):t),o=!0,s(i)},i.onerror=()=>{t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),n(new Error("Script load error for "+e))},document.body.appendChild(i);const r=setInterval(()=>{if(!o)return a>t.options.times?(i.parentNode===document.body&&document.body.removeChild(i),void clearInterval(r)):void a++;clearInterval(r)},100)}})}loadStyle(e){const t=this;return new Promise((s,n)=>{const i=document.getElementsByTagName("link");for(let t=0;t<i.length;t++)if(i[t].getAttribute("href")===e)return void s(i[t]);const o=document.createElement("link");o.href=e,o.rel="stylesheet",o.type="text/css",o.onload=()=>s(o),o.onerror=()=>n(new Error("Style load error for "+e)),document.head.appendChild(o),t.cssLoaded.push(o)})}destroy(){this.jsLoaded.forEach(e=>{e.script&&e.script.parentNode===document.body&&document.body.removeChild(e.script)}),this.cssLoaded.forEach(e=>{e.parentNode===document.head&&document.head.removeChild(e)}),this.jsLoaded=[],this.cssLoaded=[]}}function ne(e,t){let s={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}function ie(e,t,s){let n=e.slice((s||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n)}function oe(e){let t=[],s=[...e];s.sort();for(let e=0;e<s.length;e++)s[e]!==s[e+1]&&(t[t.length]=s[e]);return t}function ae(e){void 0!==e&&(e.registerHelper("if",function(e,t,s){return e===t?s.fn(this):s.inverse(this)}),e.registerHelper("lt",function(e,t,s){return e<t?s.fn(this):s.inverse(this)}),e.registerHelper("rt",function(e,t,s){return e>t?s.fn(this):s.inverse(this)}),e.registerHelper("lte",function(e,t,s){return e<=t?s.fn(this):s.inverse(this)}),e.registerHelper("rte",function(e,t,s){return e>=t?s.fn(this):s.inverse(this)}))}function re(e,t,s){t.forEach((t,n)=>{const i=s[n];document.querySelectorAll(t).forEach(t=>{const s=t._bsTooltip;s&&s.dispose(),t.setAttribute("data-bs-title",i),t.setAttribute("data-bs-toggle","tooltip"),t.setAttribute("data-bs-custom-class","be-tooltip"),new e(t)})})}function le(e="info",t=3,n="ice"){let i;if("number"==typeof n)switch(n){case 1:i="flat";break;case 2:i="future";break;case 3:i="block";break;case 4:i="air";break;default:i="ice"}else i=n;const o=s({type:e,classes:t,theme:i},{type:"info",classes:3,theme:"ice"});let a;switch(o.classes){case 1:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-left`;break;case 2:default:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top`;break;case 3:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-right`;break;case 4:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-right`;break;case 5:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom`;break;case 6:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-left`}window.Messenger.options={extraClasses:a,theme:o.theme}}function ce(e,t="info",s=3,n="ice"){le(t,s,n),window.Messenger().post({message:e,type:t,hideAfter:5,showCloseButton:!0})}function de(e,t,s,n=3,i="ice"){window.Messenger().hideAll(),le("info",n,i),window.Messenger().post({message:e,actions:{retry:{label:t,phrase:"",auto:!1,delay:10,action:function(){window.Messenger().hideAll(),s()}},cancel:{label:"取消",action:function(){return window.Messenger().hideAll(),!1}}}})}function he(e,t,n){return new e((n=s(n||{},{target:"#airDatepicker",classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:!0,buttons:["today","clear"],locale:t,dateFormat:e=>ne(e,"yyyy年MM月dd日 hh:mm:ss")})).target,n)}function ue(e,t){t=s(t||{},{focusFirstField:!1,validationEventTrigger:"click",promptPosition:"topRight"}),e.validationEngine(t)}function me(e,t="validate",n){const i=s({command:t,options:n},{command:"validate",options:n});return e.validationEngine(i.command,i.options)}function pe(e){const{winRate:t,odds:s,fraction:n=1}=e;if(t<0||t>1||s<=0)throw new Error("参数错误:胜率必须在 0-1 之间,且赔率必须大于 0");const i=(s*t-(1-t))/s;return Math.max(0,i*n)}function fe(e){const t={id:e.id,name:e.name,menus:e.menu};localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("token",e.token)}function ge(){return new Promise(e=>{localStorage.removeItem("user"),localStorage.removeItem("token"),e()})}function ve(){const e=localStorage.getItem("user");if(!e)return null;try{return JSON.parse(e)}catch(e){return localStorage.removeItem("user"),null}}function be(){return localStorage.getItem("token")}function ye(e){localStorage.setItem("token",e)}const we=N;module.exports.arisu=t})();
|
package/dist/arisu.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class e{constructor(t,s){if(this.elements=[],this.length=0,s=s instanceof e?s.elements[0]:s||document,"string"==typeof t)if(s&&"string"==typeof s&&(s=document.querySelector(s)),e.isEqSelector(t)){const i=t.split(":")[0],n=t.match(/:eq\((\d+)\)/);if(n){const t=parseInt(n[1]),o=e.contextQuerySelector(">"+i,s);o.length>0?this.elements=[o[t]]:this.elements=[]}else this.elements=[]}else this.elements=e.contextQuerySelector(t,s);else t instanceof NodeList||t instanceof HTMLElement?this.elements=t instanceof NodeList?Array.from(t):[t]:t instanceof Window?this.elements=[window]:null!==t&&"object"==typeof t&&"documentElement"in t?this.elements=[s]:Array.isArray(t)?this.elements=t:this.elements=[];this.length=this.elements.length}each(e){return this.elements.forEach((t,s)=>{e(t,s)}),this}hasClass(e){let t=!1;return this.each(s=>{t=s.classList.contains(e)}),t}addClass(e){return this.each(t=>{if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.add(s[e])}else e&&t.classList.add(e)})}removeClass(e){return this.each(t=>{if(void 0===e)t.className="";else if(e||0!==e.length)if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.remove(s[e].trim())}else t.classList.remove(e.trim())})}toggleClass(e){return this.each(t=>{if(t.classList)t.classList.toggle(e);else{let s=t.className.split(/\s+/),i=s.indexOf(e);i>=0?s.splice(i,1):s.push(e),t.className=s.join(" ")}})}not(t){let s=t instanceof e?t.elements:Array.from(document.querySelectorAll(t));return this.elements=Array.from(this.elements).filter(e=>!s.includes(e)),this}is(e){var t;let s=this.elements[0];if(":visible"===e){if("none"===s.style.display||"hidden"===s.style.visibility||"0"===getComputedStyle(s).opacity)return!1}else{if(":first-child"===e)return(null===(t=s.parentNode)||void 0===t?void 0:t.firstChild)===s;if(":last-child"!==e)return s.matches(e);{const e=s.parentNode;if(e){const t=e.children;return t[t.length-1]===s}}}return!1}closest(t){let s=this.elements[0];if(!s)return e.build([]);const i=s.matches||s.webkitMatchesSelector;if(i.call(s,t))return this.constructor===e?e.build(this.elements):this;let n=s.parentElement;for(;n;){if(i.call(n,t))return e.build(n);n=n.parentElement}return e.build([])}next(){if(1===this.elements.length){const t=this.elements[0].nextElementSibling;return t instanceof Element?e.build(t):e.build([])}if(this.elements.length>1){const t=[],s=this.elements[0].nextElementSibling;s instanceof Element&&t.push(s);for(let e=1;e<this.elements.length-1;e++)this.elements[e]instanceof Element&&t.push(this.elements[e]);const i=this.elements[this.elements.length-1].nextElementSibling;return i instanceof Element&&t.push(i),e.build(t)}return null}nextAll(e){const t=[];let s=this.elements[0],i=s.nextSibling,n=s.parentElement;for(;i&&(1===i.nodeType&&(e&&!i.matches(e)||t.unshift(i)),i=i.nextSibling,null!==i||0!==t.length||(null==n?void 0:n.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}prev(){if(1===this.elements.length)return e.build(this.elements[0].previousElementSibling);if(this.elements.length>1){let t=e.build(this.elements[0].previousElementSibling);return this.each((e,s)=>{s>1&&(t.elements.push(e),s===this.elements.length-1&&t.elements.push(e.previousElementSibling))}),t}return null}prevAll(e){const t=[];let s=this.elements[this.elements.length-1],i=s.previousSibling,n=s.parentElement;for(;i&&(1===i.nodeType&&(e&&!i.matches(e)||t.unshift(i)),i=i.previousSibling,null!==i||0!==t.length||(null==n?void 0:n.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}first(){return new e([this.elements[0]])}find(t){if(t&&"option:selected"===t.trim()){const t=[];return this.each(e=>{("select-one"===e.type||"select-multiple"===e.type)&&e.selectedIndex>=0&&t.push(e.options[e.selectedIndex])}),new e(t)}{const s=[];return this.elements.forEach(e=>{e instanceof HTMLElement&&e.querySelectorAll(t).forEach(e=>s.push(e))}),new e(s)}}parent(){let t=this.elements[0];return t?new e(t.parentNode):new e}parents(t){const s=[];let i=this.elements[0].parentElement;for(;i&&i!==document.documentElement;)t&&!i.matches(t)||s.push(i),i=i.parentElement;return new e(s)}siblings(){let t=this.elements[0];if(t&&1===t.nodeType){let s=t.parentNode;if(s){let i=[];for(let e=0;e<s.childNodes.length;e++){let n=s.childNodes[e];1===n.nodeType&&n!==t&&i.push(n)}return new e(i)}return new e}return new e}children(){let t=[];return this.each(e=>{t.push(...Array.from(e.children))}),new e(t)}index(){var e;const t=this.elements[0],s=null===(e=t.parentNode)||void 0===e?void 0:e.children;if(s)for(let e=0;e<s.length;e++)if(s[e]===t)return e;return-1}size(){return this.elements?this.elements.length:0}on(e,t){return this.each(function(s){s.addEventListener(e,t)})}off(e,t){return this.each(function(s){s.removeEventListener&&t&&s.removeEventListener(e,t)})}click(e){return"function"==typeof e?this.on("click",e):this.each(e=>{const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}),this}focus(e){return"function"==typeof e&&this.on("focus",e),this}change(e){return e&&this.each(t=>{t.addEventListener("change",e,!1)}),this}trigger(e,t){return this.each(function(s){let i;try{i=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(s){i=document.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,t)}s.dispatchEvent(i)}),this}remove(){return this.each(e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})}data(t,s){if(void 0===t)throw new Error("读取的或设置的键值不能为空");let i=this.elements[0];if(void 0!==s){let n=e.elementData.get(i);return n||(n=new Map,e.elementData.set(i,n)),n.set(e.camelCase(t),s),this}{const s=e.elementData.get(i);return s?s.get(e.camelCase(t)):e.dataAttr(i,t)}}removeData(t){let s=this.elements[0],i=e.elementData.get(s);i&&i.set(e.camelCase(t),void 0)}attr(e,t){if(0===this.elements.length)return void 0===t?"":this;const s=this.elements[0];return void 0===t?(null==s?void 0:s.getAttribute(e))||"":this.each(s=>s.setAttribute(e,t))}removeAttr(e){return this.each(t=>{"function"==typeof t.removeAttribute&&t.removeAttribute(e)})}offset(){let e=this.elements[0].getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft;return{top:e.top+t,left:e.left+s}}scrollTop(){return this.elements[0]instanceof Window?void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop:document.documentElement.scrollTop}height(){const e=this.elements[0];return e?e===window?window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight:e.offsetHeight:(console.warn("目标元素不存在或未正确绑定!"),0)}width(){const e=this.elements[0];return e?e===window?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:e.offsetWidth:(console.warn("目标元素不存在或未正确绑定!"),0)}val(e){let t=this.elements[0];if("select-multiple"===t.type){if(void 0!==e){for(let s=t.options.length-1;s>=0;s--)t.options[s].selected=t.options[s].value===e;return this}{let e=[];for(let s=0;s<t.options.length;s++)t.options[s].selected&&e.push(t.options[s].value);return e}}return void 0!==e?(t.value=e,this):t.value}css(e,t){if(0===this.elements.length)return this;if(void 0===t){if("object"==typeof e){const t=e;for(const e in t)if(t.hasOwnProperty(e)){const s=t[e];this.each(t=>{t.style[e]=s})}return this}return this.elements[0].style[e]||""}return this.each(s=>{s.style[e]=t})}text(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t.textContent||"":this.each(t=>{t.textContent=e})}html(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t&&1===t.nodeType?t.innerHTML:"":this.each(t=>{t&&1===t.nodeType&&(t.innerHTML=e)})}after(e){return this.each(t=>{t.insertAdjacentHTML("afterend",e)})}append(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.appendChild(s.firstChild);return t})}prepend(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.insertBefore(s.firstChild,t.firstChild);return t})}hide(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="none",t&&"function"==typeof t&&t(s)},e):(s.style.display="none",t&&"function"==typeof t&&t(s))})}show(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="block",t&&"function"==typeof t&&t(s)},e):(s.style.display="block",t&&"function"==typeof t&&t(s))})}slideUp(t,s){const i=e.extend({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{e.style.height=e.scrollHeight+"px",e.style.overflow="hidden",e.style.transition=`height ${i.duration}ms ease-in-out`,setTimeout(()=>{e.style.height="0px"},i.duration/100),setTimeout(()=>{e.style.display="none",e.style.overflow="",e.style.transition="",e.style.height="",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration-i.duration/100)})}slideDown(t,s){const i=e.extend({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{let t=e.offsetHeight;"none"===e.style.display&&(e.style.display="",t=0),e.style.height=t+"px",e.style.transition=`height ${i.duration}ms ease-in-out`,e.offsetHeight,e.style.height=e.scrollHeight+"px",e.style.display="block",setTimeout(()=>{e.style.overflow="",e.style.transition="",e.style.display="",e.style.height="",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration)})}slideToggle(t,s){const i=e.extend({duration:t,callback:s},{duration:500,callback:null});let n=!0;return this.each(e=>{"none"===e.style.display&&(n=!1)}),n?this.slideUp(i.duration,i.callback):this.slideDown(i.duration,i.callback),this}fadeOut(t,s){const i=e.extend({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{e.style.transition=`opacity ${i.duration}ms ease-in-out`,e.style.opacity="0",setTimeout(()=>{e.style.display="none",i.callback&&"function"==typeof i.callback&&i.callback(e)},i.duration)})}checkAll(t){const s=e.extend({checkboxes:t},{checkboxes:".be-check"});return this.each(e=>{let t=document.querySelectorAll(s.checkboxes);e.addEventListener("change",function(){t.forEach(function(t){t.checked=e.checked})})})}checkReverse(t){const s=e.extend({checkboxes:t},{checkboxes:".be-check"});return this.each(e=>{let t=document.querySelectorAll(s.checkboxes);e.addEventListener("click",function(){t.forEach(function(e){e.checked=!e.checked})})})}numStep(t){return t=e.extend(t,{start:0,end:100,duration:1500,callback:!1}),this.each(s=>{let i=null;requestAnimationFrame(function n(o){null===i&&(i=o);const a=Math.min((o-i)/t.duration,1),r=Math.floor(a*(t.end-t.start)+t.start);e.build(s).text(r.toString()),a<1?requestAnimationFrame(n):"function"==typeof t.callback&&t.callback()})})}scrollBG(t){return t=e.extend(t,{speed:0}),this.each(s=>{e.build(s).css("background-position","50% 0px"),e.build(window).on("scroll",()=>{const i=e.build(s),n=i.offset().top,o=i.height(),a=i.scrollTop(),r=i.height();if(r+a>n&&r+a<n+r+o){const e=(n+o-a)/t.speed;i.css("background-position","50% -"+e+"px")}})})}setActive(t){const{className:s="active"}=t||{};e.build(this.elements).click(t=>{const i=e.build(t.currentTarget);i.hasClass(s)?i.removeClass(s):(e.build(this.elements).removeClass(s),i.addClass(s))})}loading(t){let s=!1;return void 0!==t&&"object"!=typeof t&&(s=!0,t={}),t=e.extend(t,{isFull:!0,loadingTarget:"#do-preloader",template:'<div id="do-preloader" class="do-preloader"><span class="do-pr-loader"><span class="do-pr-lr"></span></span></div>'}),this.each(i=>{const n=t,o=n.loadingTarget,a=n.template;if(s)e.build("> *",i).removeClass("be-blur-2"),e.build(o).addClass("oy-0"),setTimeout(()=>{e.build("> *",i).removeClass("be-ts"),e.build(o).remove()},300);else{e.build("> *",i).addClass("be-ts").addClass("be-blur-2"),e.build(i).prepend(a);const t=e.build(o);t.length&&t.css("position","fixed").css("height","100vh").css("width","100vw")}})}static extend(e,t){if(!e)return t;{let s;for(s in t)if(null==t?void 0:t.hasOwnProperty(s)){const i=t[s];null==e[s]&&(e[s]=i)}}return e}static camelCase(e){let t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t=t.replace(/\./g,""),t}static l(...e){window.console&&e&&console.log(...e)}static toRound(e,t){let s=parseFloat(String(e));return s=s?Math.round(e*Math.pow(10,t))/Math.pow(10,t):0,s}static isNull(e){let t=!0;return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(t=!1),t}static setDefault(e,t){return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(e=t),e}static isObject(e){return!!e&&e&&"object"==typeof e&&!Array.isArray(e)&&!0}static same(e,t){return e.filter(function(e){return-1!==t.indexOf(e)})}static different(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)||-1===t.indexOf(s)})}static contrast(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)&&-1!==t.indexOf(s)})}static isHtmlTag(e){return/^<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>$|^<([a-z][a-z0-9]*)\b[^>]*\/>$/i.test(e)}static plugin(t,s){e.fn[t]=function(){s()}}static createElement(e){let t=document.createElement("div");t.innerHTML=e.trim();let s=t.firstChild;if((null==s?void 0:s.nodeType)===Node.TEXT_NODE){s=s.nextSibling;let e=document.createDocumentFragment();for(;s;)e.appendChild(s),s=s.nextSibling;return e}return s}static ajax(t){var s;if("get"===(null===(s=null==(t=e.extend(t,{url:"",method:"GET",async:!0,headerMap:{},cache:"default",dataType:"json",data:null,success:function(){},error:function(){}}))?void 0:t.method)||void 0===s?void 0:s.toLowerCase())){if(!t.url.includes("?")){let e=new URLSearchParams;for(let s in t.data)t.data.hasOwnProperty(s)&&e.append(s,t.data[s]);t.url=t.url+"?"+e.toString()}t.data=null}if(fetch)fetch(t.url,{method:t.method,headers:new Headers(t.headerMap),cache:t.cache,body:t.data?JSON.stringify(t.data):null}).then(function(e){return e.ok?"json"===t.dataType?e.json():e.text():Promise.reject(new Error("Failed to fetch resource"))}).then(function(e){t.success&&t.success(e)}).catch(function(e){t.error&&t.error(e)});else{let e=new XMLHttpRequest;e.onload=function(){if(e.status>=200&&e.status<300){let s;switch(t.dataType){case"json":try{s=JSON.parse(e.responseText)}catch(e){return void(t.error&&t.error(e))}break;case"text":s=e.responseText;break;default:s=e.responseText||e.response}t.success&&t.success(s,e.status,e)}else{let s=new Error("Request failed. Status: "+e.status);t.error&&t.error(s)}},e.onerror=function(){t.error&&t.error(new Error("Network Error"))},e.open((null==t?void 0:t.method)||"get",t.url,t.async||!1);for(let s in t.headerMap)t.headerMap.hasOwnProperty(s)&&e.setRequestHeader(s,t.headerMap[s]);t.data?e.send(t.data):e.send()}}static getParam(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),s=window.location.search.substr(1).match(t);return null!=s?unescape(s[2]):null}static move(t){const s=document.querySelector(t);if(s){let t=new e(s).offset();window.scrollTo(t.left,t.top)}}static strValidation(e,t,s){let i=0;return e.length<=t||e.length>=s?i=1:/^[0-9]{0,32}$/.test(e)?i=2:/^[a-zA-z]{0,32}$/.test(e)?i=3:/^[0-9a-zA-z]{0,32}$/.test(e)?i=4:/^[^\u4e00-\u9fa5a-zA-Z\d,.,。]{0,32}$/.test(e)?i=5:/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]*$/.test(e)&&(i=8),i}static hotkey(e,t){document.addEventListener("keydown",function(s){e===s.key&&t()})}static setCookie(e,t,s={}){let i="",n=s.path||"/",o=s.domain,a=s.secure?"; Secure":"";if(s.expires){let e;"number"==typeof s.expires?(e=new Date,e.setTime(e.getTime()+24*s.expires*60*60*1e3)):e=s.expires,i=`; expires=${e.toUTCString()}`}document.cookie=`${e}=${encodeURIComponent(t)}${i}; path=${n}; domain=${o||""}${a}`}static getCookie(e){let t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let i=s[e];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null}static removeCookie(e,t={}){this.setCookie(e,"",Object.assign(Object.assign({},t),{expires:-1}))}static menu(e,t){const s=function(e,i,n){let o="";++i;for(let a=0;a<e.length;a++){const r=e[a];let l="#";if(r.link&&(l=r.link),r.pId||0!==i){if(r.pId===n){let t="";r.isParent&&(t=s(e,i,r.id),t&&(t="<ul class='sub'>"+t+"</ul>"));let n="";1===i&&(n=`<i class='${r.icon}'></i>`);let a=r.hash?` data-hash='${r.hash}' `:" ",c=r.actionId?` id='${r.actionId}' `:" ";o+=`<li class='sub-menu'><a${r.isParent?" class='mu-js-a' ":" "}${a}${r.tid?` data-tid='${r.tid}' `:" "}${c}href='${l}'>`+n+`<span>${r.name}</span></a>`+t+"</li>"}}else if(t)o=s(e,i,r.id);else{let t=s(e,i,r.id);t&&(t="<ul class='sub'>"+t+"</ul>"),o+=`<li class='sub-menu'><a${r.hash?` data-hash='${r.hash}' `:" "}${r.actionId?` id='${r.actionId}' `:" "}href='${l}'><span>${r.name}</span></a>`+t+"</li>"}}return o};let i="";return e&&(i=s(e,-1,0)),""+i}static menu2Tree(t,s,i){let n=[];return t.forEach(function(o){o.pId===s&&(o.isactive=`a${o.id}`===i,n.push(o),o.isParent&&(o.children=e.menu2Tree(t,o.id)))}),n}static search(t){var s;const i=e.build(".fm-search"),n=e.build("input",i),o=e.build("span:eq(0)",i),a=e.build("span:eq(1)",i);n.on("change",t=>{var s,i;const n=e.build(t.currentTarget);""!==n.val()?null===(s=n.next())||void 0===s||s.css("opacity","1").css("visibility","visible"):null===(i=n.next())||void 0===i||i.css("opacity","0").css("visibility","hidden")}),""!==n.val()&&(null===(s=n.next())||void 0===s||s.css("opacity","1").css("visibility","visible")),a.on("click",t=>{var s;const i=e.build(t.currentTarget);i.css("opacity","0").css("visibility","hidden"),null===(s=i.prev())||void 0===s||s.val("")}),o.on("click",s=>{var i;const n=e.build(s.currentTarget);t&&t(null===(i=n.next())||void 0===i?void 0:i.val())})}static shuffleArray(e){if(!Array.isArray(e))return e;const t=[...e];for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}return t}static defaultConstructor(t,s,i,n){"string"==typeof s?t.elements=document.querySelectorAll(s):s instanceof NodeList?t.elements=s:s instanceof HTMLElement?t.elements=Array.of(s):t.elements=[],t.options=e.extend(i,t.options),n(t)}static contextQuerySelector(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}static isEqSelector(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}static build(t,s){return new(this||e)(t,s)}}e.keys={esc:"Escape",backspace:"Backspace",space:" ",enter:"Enter",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"},e.dataAttr=function(e,t){var s;let i="data-"+t;return null!==(s=e.getAttribute(i))&&void 0!==s?s:void 0},e.expando="base"+(""+Math.random()).replace(/\D/g,""),e.elementData=new Map,e.cache={},e.build.extend=e.extend,e.build.camelCase=e.camelCase,e.build.l=e.l,e.build.getParam=e.getParam,e.build.toRound=e.toRound,e.build.isNull=e.isNull,e.build.setDefault=e.setDefault,e.build.same=e.same,e.build.different=e.different,e.build.contrast=e.contrast,e.build.strValidation=e.strValidation,e.build.move=e.move,e.build.keys=e.keys,e.build.hotkey=e.hotkey,e.build.isHtmlTag=e.isHtmlTag,e.build.isObject=e.isObject,e.build.plugin=e.plugin,e.build.ajax=e.ajax,e.build.setCookie=e.setCookie,e.build.getCookie=e.getCookie,e.build.removeCookie=e.removeCookie,e.build.menu=e.menu,e.build.menu2Tree=e.menu2Tree,e.build.search=e.search,e.build.shuffleArray=e.shuffleArray,e.build.defaultConstructor=e.defaultConstructor;const t=e.build;Date.prototype.format=function(e){let t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in t)new RegExp("("+s+")").test(e)&&(e=e.replace(RegExp.$1,1===RegExp.$1.length?t[s]:("00"+t[s]).substr((""+t[s]).length)));return e},Array.prototype.remove=function(e,t){let s=this.slice((t||e)+1||this.length);return this.length=e<0?this.length+e:e,this.push.apply(this,s)},Array.prototype.unique=function(){let e=[];this.sort();for(let t=0;t<this.length;t++)this[t]!==this[t+1]&&(e[e.length]=this[t]);return e};const s=t;function i(e="info",t=3,i="ice"){let n;if("number"==typeof i)switch(i){case 1:n="flat";break;case 2:n="future";break;case 3:n="block";break;case 4:n="air";break;default:n="ice"}else n=i;const o=s.extend({type:e,classes:t,theme:n},{type:"info",classes:3,theme:"ice"});let a;switch(o.classes){case 1:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-left`;break;case 2:default:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top`;break;case 3:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-right`;break;case 4:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-right`;break;case 5:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom`;break;case 6:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-left`}window.Messenger.options={extraClasses:a,theme:o.theme}}s.handlebars=function(e){void 0!==e&&(e.registerHelper("if",function(e,t,s){return e===t?s.fn(this):s.inverse(this)}),e.registerHelper("lt",function(e,t,s){return e<t?s.fn(this):s.inverse(this)}),e.registerHelper("rt",function(e,t,s){return e>t?s.fn(this):s.inverse(this)}),e.registerHelper("lte",function(e,t,s){return e<=t?s.fn(this):s.inverse(this)}),e.registerHelper("rte",function(e,t,s){return e>=t?s.fn(this):s.inverse(this)}))},s.tip=function(e,t,i){t.forEach((e,t)=>{s(e).attr("data-bs-title",i[t]).attr("data-bs-toggle","tooltip").attr("data-bs-custom-class","be-tooltip")}),[...document.querySelectorAll('[data-bs-toggle="tooltip"]')].map(t=>new e(t))},s.al=function(e,t="info",s=3,n="ice"){i(t,s,n),window.Messenger().post({message:e,type:t,hideAfter:5,showCloseButton:!0})},s.cf=function(e,t,s,n=3,o="ice"){window.Messenger().hideAll(),i("info",n,o),window.Messenger().post({message:e,actions:{retry:{label:t,phrase:"",auto:!1,delay:10,action:function(){window.Messenger().hideAll(),s()}},cancel:{label:"取消",action:function(){return window.Messenger().hideAll(),!1}}}})},s.datepicker=function(e,t,i){const n={target:"#airDatepicker",classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:!0,buttons:["today","clear"],locale:t,dateFormat:e=>e.format("yyyy年MM月dd日 hh:mm:ss")};return new e((i=s.extend(i||{},n)).target,i)},s.validationEngine=function(e,t){t=s.extend(t||{},{focusFirstField:!1,validationEventTrigger:"click",promptPosition:"topRight"}),e.validationEngine(t)},s.validate=function(e,t="validate",i){const n=s.extend({command:t,options:i},{command:"validate",options:i});return e.validationEngine(n.command,n.options)};const n=new class{login(e){const t={id:e.id,name:e.name,menus:e.menu};localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("token",e.token)}logout(){return new Promise(e=>{localStorage.removeItem("user"),localStorage.removeItem("token"),e()})}getUser(){const e=localStorage.getItem("user");return e?JSON.parse(e):null}getToken(){return localStorage.getItem("token")}setToken(e){localStorage.setItem("token",e)}};s.getUser=n.getUser.bind(n),s.getToken=n.getToken.bind(n),s.setToken=n.setToken.bind(n),s.login=n.login.bind(n),s.logout=n.logout.bind(n);const o=s;class a{constructor(t,i){this.options={text:"处理中..",useText:!0},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.submitflag")||n.data("be.submitflag",e),e.init(t,i)})})}init(e,t){const i=this;t&&(i.options=s.extend(t,i.options)),s(e).click(e=>{i.request(e.currentTarget)})}request(e){const t=s(e);e.setAttribute("data-original-text",t.text()),t.addClass("submit-flag-request").attr("disabled","disabled"),this.options.useText&&t.text(this.options.text)}complete(e){let t;t=s(e||this.selector),t.removeClass("submit-flag-request").removeAttr("disabled"),this.options.useText&&t.each(e=>{const t=e.getAttribute("data-original-text");null!==t&&""!==t&&(s(e).text(t),e.removeAttribute("data-original-text"))})}destroy(){s(this.selector).removeData("be.submitflag"),s(this.selector).each(e=>{e.removeAttribute("data-original-text")})}}class r{constructor(t,i){this.options={position:{bottom:"15px",right:"15px"},showEffect:" animate__zoomIn ",hideEffect:" animate__zoomOut ",type:"fixed",offsetTop:400},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.gotop")||n.data("be.gotop",e),e.init(t,i)})})}init(e,t){const i=s(e),n=(t=s.extend(t,this.options)).type||"fixed",o=t.showEffect||" animate__zoomIn ",a=t.position,r=void 0!==t.offsetTop?Number(t.offsetTop):400,l=t.hideEffect||" animate__zoomOut ";i.addClass("animate__animated").css({display:"inline-block",position:n,opacity:0}),"fixed"!==n&&"absolute"!==n||i.css(a),i.on("click",e=>{e.preventDefault(),window.scrollTo(0,0)}),r&&!i.hasClass("animated-running")&&i.offset().top<=s(window).height()&&i.addClass("animated-running "+o).css({opacity:""}),s(window).on("scroll",()=>{if(r)s(window).scrollTop()>=r&&!i.hasClass("animated-running")?(i.addClass("animated-running "+o).css({opacity:""}),i.removeClass(l)):s(window).scrollTop()<=r&&i.hasClass("animated-running")&&(i.removeClass("animated-running "+o).css({opacity:0}),i.addClass(l));else{let e=i.offset().top;i.hasClass("animated-running")||s(window).scrollTop()>=e-s(window).height()&&(i.addClass("animated-running "+o).css({opacity:""}),i.removeClass(l))}}),s(window).trigger("scroll")}}class l{constructor(t,i){this.options={num:1},this.value=0,this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.itemcount")||n.data("be.itemcount",e),e.init(t,i)})})}init(e,t){const i=this;t&&(i.options=s.extend(t,i.options));const n=s(e),o=n.find(".fm-plus"),a=n.find(".fm-minus"),r=n.find(".fm-result");let l=parseInt(String(r.val()));i.value=isNaN(l)?0:l,o.on("click",function(e){e.preventDefault(),l+=i.options.num,r.val(String(l)),i.value=l}),a.on("click",function(e){if(e.preventDefault(),!(l-i.options.num>=0))return!1;l-=i.options.num,r.val(String(l)),i.value=l})}getValue(){return this.value}}class c{constructor(t,i){this.options={width:"auto"},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.niceselect")||n.data("be.niceselect",e),e.init(t,i)})})}create(e,t){var i,n;const o=this,a=s(e),r=a.after("<div></div>").next().addClass("ce-nice-select").addClass(a.attr("class")||"").addClass(a.attr("disabled")?"disabled":"").attr("tabindex",a.attr("disabled")?"":"0").css("width",null!==(i=o.options.width)&&void 0!==i?i:"auto").html('<span class="current"></span><ul class="list"></ul>'),l=a.find("option"),c=e,d=s(c.options[c.selectedIndex]);o.text=d.data("display")||d.text(),r.find(".current").html(null!==(n=o.text)&&void 0!==n?n:""),l.each(function(e){const t=s(e),i=t.data("display"),n=null!=i?String(i):"",o=d.text()===t.text()?"selected":"";r.find("ul").append(`<li data-value="${t.val()}" data-display="${n}" class="option ${o}">${t.text()}</li>`)})}init(e,t){const i=this,n=s(i.selector),o=s(e);t&&(i.options=s.extend(t,i.options)),o.hide(),i.create(e,i.options);const a=n.next();return a.on("click",function(){const e=o.next();e.toggleClass("open"),e.hasClass("open")?(e.find(".option"),e.find(".focus").removeClass("focus"),e.find(".selected").addClass("focus")):e.focus()}),s(".option",a).on("click",function(e){const t=s(e.currentTarget),n=a;n.find(".selected").removeClass("selected"),t.addClass("selected"),i.text=t.data("display")||t.text(),n.find(".current").text(String(i.text)),i.value=t.data("value"),n.prev().trigger("change").val(String(i.value))}),this}getText(){return this.text}getValue(){return this.value}}class d{constructor(e,t){this.options={time:1e3},this.selector=e||"",s.isObject(e)?(this.options=s.extend(e,this.options),this.selector=""):(e&&(this.selector=e),this.options=s.extend(t,this.options)),s("[data-ae-load]").addClass("ae-load")}start(e){const t=e||this.selector,i=t?`${t}[data-ae-load]`:"[data-ae-load]";s(i).addClass("ae-load").removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-complete"),setTimeout(()=>{s(i).removeClass("ae-load ae-tt-complete")},this.options.time)}loading(e){const t=e||this.selector,i=t?`${t}[data-ae-load]`:"[data-ae-load]";s("[data-ae-load]").addClass("ae-load"),s(i).each(e=>{const t=s(e),i=t.data("al-mw"),n=t.data("al-mh");i&&t.css("min-width",i),n&&t.css("min-height",n),t.removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-loading")})}done(e){const t=e||this.selector,i=t?`${t}[data-ae-load]`:"[data-ae-load]";s(i).removeClass("ae-tt-done").addClass("ae-tt-done"),setTimeout(()=>{s(i).removeClass("ae-load ae-tt-loading ae-tt-done")},this.options.time)}}class h{constructor(t,i){this.options={},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.btnef")||n.data("be.btnef",e),e.init(t,i)})})}init(e,t){const i=s(e);i.append("<b></b>"),i.on("mouseenter",e=>{const t=s(e.currentTarget),i=t.offset(),n=e.pageX-i.left,o=e.pageY-i.top;t.find("b").css({top:o+"px",left:n+"px"})}).on("mouseout",e=>{const t=s(e.currentTarget),i=t.offset(),n=e.pageX-i.left,o=e.pageY-i.top;t.find("b").css({top:o+"px",left:n+"px"})})}}class u{constructor(t,i){this.options={targetWarp:"#be-pw",totalItems:0,itemsPerPage:0,visiblePages:5,prev:"上一页",next:"下一页",first:"首页",last:"尾页",onButtonClick:()=>{}},this.currentPage=1,this.totalPages=0,this.selector=t,e.defaultConstructor(this,t,i,e=>{let t=this;e.elements.forEach(n=>{let o=s(n);o.data("be.ipagination")||o.data("be.ipagination",e),t.currentPage=1,t.totalPages=Math.ceil(t.options.totalItems/t.options.itemsPerPage),e.init(i)})})}init(e){const t=this;let i=t.options;e&&(i=s.extend(e,t.options)),s(this.selector).html(""),this.addPageButton(i.first,1,()=>this.goToPage(1)),this.addPageButton(i.prev,this.currentPage-1,()=>this.goToPrevPage());let n=Math.max(1,this.currentPage-Math.floor(i.visiblePages/2)),o=Math.min(this.totalPages,n+i.visiblePages-1);o-n<i.visiblePages-1&&(n=Math.max(1,o-i.visiblePages+1));for(let e=n;e<=o;e++)this.addPageButton(e,e,()=>this.goToPage(e));this.addPageButton(i.next,this.currentPage+1,()=>this.goToNextPage()),this.addPageButton(i.last,this.totalPages,()=>this.goToPage(this.totalPages));const a=i.itemsPerPage*(t.currentPage-1)+1,r=Math.min(a+i.itemsPerPage-1,i.totalItems);s("p",i.targetWarp).html(`显示 ${a} 至 ${r} 条,共有 ${i.totalItems} 条`)}addPageButton(e,t,i){const n=document.createElement("li");n.classList.add("page-item"),"number"==typeof e&&Number.isFinite(e)||!isNaN(Number(e))&&Number.isFinite(Number(e))?n.classList.add("pi-t2"):n.classList.add("pi-t1");const o=document.createElement("button");n.append(o),o.innerHTML=String(e),o.onclick=i,t!==this.currentPage&&0!==t&&t!==this.totalPages+1||(n.classList.add("active"),n.classList.add("disabled")),s(this.selector).append(n)}goToPrevPage(){this.currentPage>1&&(this.currentPage--,this.init(),this.options.onButtonClick(this.currentPage))}goToNextPage(){this.currentPage<this.totalPages&&(this.currentPage++,this.init(),this.options.onButtonClick(this.currentPage))}goToPage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.init(),this.options.onButtonClick(this.currentPage))}}class m{constructor(t,i){this.options={rp:"10",visiblePages:7,sortname:"id",sortorder:"desc",method:"post",dataType:"json",param:{},handlebars:null,url:"",loadColor:"#0a0a0a",lang:"cn",template:"#tp-list",headerMap:{},cache:"default",ipWarp:"#ilist-ip-warp",prev:"上一页",next:"下一页",first:"首页",last:"尾页",onSuccess:!1,onError:!1},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.ilist")||n.data("be.ilist",e),void 0!==window.Handlebars&&null===(null==i?void 0:i.handlebars)&&(i.handlebars=window.Handlebars),e.init(t,i||e.options)})})}init(e,t){let i=s(e),n=i.data("be.ilist.html");if(i.data("be.ilist.flag",!0),n)s(".be-list-data-body",e).html("");else{const e=s(t.template);if(!t.handlebars)return void console.error("Handlebars is required for IList but not provided.");const n=t.handlebars.compile(e.html())({});i.html(n),i.data("be.ilist.html",n)}let o=s.extend({page:1,rp:t.rp,sortname:t.sortname,sortorder:t.sortorder},t.param);t.isInit=!0,s(e).data("be.ilist.event",!0),this.getData(e,t,o)}getData(e,t,i){let n=this,o=s(e);s(".be-list-data-body",e).html(""),s(".be-list-loading",e).addClass("opacity-100"),s(".be-list-nofound",e).removeClass("opacity-100"),s(".be-list-page",e).removeClass("opacity-100"),s.ajax({method:t.method,url:t.url,headerMap:t.headerMap,data:i,cache:t.cache,dataType:t.dataType,success:a=>{s(".be-list-loading",e).removeClass("opacity-100").addClass("opacity-0"),s(".be-list-data",e).removeClass("opacity-0"),s(".be-list-data-body",e).css("display","table-row-group"),a.isInit=t.isInit,t.onSuccess&&t.onSuccess(a),a.total?(n.page(e,t,i,a.total),s(".ilist-check-all").checkAll(".ilist-check"),s("table > tbody tr",e).click(e=>{let t=s(e.target);t.is("input")||t.is("i")||t.is("a")||s(".ilist-check",e.currentTarget).click()}),o.data("be.ilist.event")&&(o.data("be.ilist.event",!1),s(".ilist-check",e).change(e=>{s(e.currentTarget).is(":checked")?s(e.currentTarget).parents("tr").addClass("active"):s(e.currentTarget).parents("tr").removeClass("active")})),s("table > thead tr td",e).click(a=>{const r=s(a.currentTarget).data("sortname");if(r){const l=o.data("be.ilist.param");if(l&&(i=s.extend(l,i)),i.sortname=r,!s(a.currentTarget).hasClass("is-check")&&i.sortname){let r=s(a.currentTarget).attr("data-sort-order");s("table > thead tr td",e).removeAttr("data-sort-order"),r?(s(a.currentTarget).attr("data-sort-order","desc"===r?"asc":"desc"),i.sortorder="desc"===r?"asc":"desc"):(s(a.currentTarget).attr("data-sort-order","desc"),i.sortorder="desc"),o.data("be.ilist.flag",!0),i.page="1",t.isInit=!1,n.getData(e,t,i)}}}),s(".be-list-page",e).addClass("opacity-100")):(s(".be-list-nofound",e).addClass("opacity-100"),s(".be-list-page",e).removeClass("opacity-100"))},error:e=>{try{t.onError&&t.onError(e)}catch(e){}}})}page(e,t,i,n){let o=this,a=s(e);a.data("be.ilist.flag")&&new u("#ipagination",{targetWarp:t.ipWarp,totalItems:n,itemsPerPage:Number(t.rp),visiblePages:t.visiblePages,prev:t.prev,next:t.next,first:t.first,last:t.last,onButtonClick:s=>{const n=document.querySelector(".ilist-check-all");n&&(n.checked=!1),i.page=s,t.isInit=!1,o.getData(e,t,i)}}),a.data("be.ilist.flag",!1)}reload(e){let t=s(this.selector);const i=t.data("be.ilist"),n=s.extend(e,{page:1,rp:i.options.rp,sortname:i.options.sortname,sortorder:i.options.sortorder});i.options.isInit=!1,t.data("be.ilist.flag",!0),t.data("be.ilist.param",n),s("table > thead tr td",t).attr("data-sort-order",""),i.getData(i.selector,i.options,n)}}class p{constructor(t,i){this.options={classParent:"ia-parent",classActive:"active",classArrow:"ia-icon",classCount:"ia-count",autoExpand:!1,classExpand:"ia-current-parent",autoClose:!0,speed:300,saveState:!0,disableLink:!0,showCount:!1,cookie:"ia-cookie",smallClass:"ce-accordion-small"},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.iaccordion")||n.data("be.iaccordion",e),e.init(t,i)})})}init(e,t){const i=this,n=s("li > a",e),o=s("li > ul",e),a=(t=s.extend(t,i.options)).classActive;this.setUpAccordion(e,n,o,t),!0===t.saveState&&i.checkCookie(t.cookie,e,a),!0===t.autoExpand&&s("li."+t.classExpand+" > a").addClass(a),n.click(n=>{const o=s(n.currentTarget),r=o.parent(),l=i.isSmall(n,e,t.smallClass);!0===t.disableLink&&o.siblings().length>0&&n.preventDefault(),!0===t.autoClose&&i.autoCloseAccordion(e,o,l,t),0===s("> ul",r).length?s("> a",r).addClass(a):"none"!==s("> ul",r).css("display")?(i.slideUp(s("ul",r),l,t),s("a",r).removeClass(a)):("none"===s(n.currentTarget).siblings().css("display")?i.slideDown(s(n.currentTarget).siblings().css("overflow","hidden"),l,t):i.slideUp(s(n.currentTarget).siblings(),l,t),s("> a",r).addClass(a)),!0===t.saveState&&i.createCookie(t.cookie,e,a)})}setUpAccordion(e,t,i,n){const o='<span class="'+n.classArrow+'"></span>',a=n.classParent+"-li";i.show(),s("li",e).each(e=>{s("> ul",e).length>0&&(s(e).addClass(a),s("> a",e).addClass(n.classParent).append(o))}),i.hide(),!0===n.showCount&&s("ul",e).each(e=>{s("> a",s(e).parent()).append(' <span class="'+n.classCount+'">('+e.children.length+")</span>")})}autoCloseAccordion(e,t,i,n){const o=this;s("ul",e).each(e=>{let a=!1;t.parents("ul").each(t=>{t===e&&(a=!0)}),a||t.siblings().elements[0]===e||"none"===e.style.display||o.slideUp(s(e),i,n)}),s("a",e).removeClass(n.classActive),t.parents("li").each(e=>{s("> a",e).addClass(n.classActive)})}checkCookie(e,t,i){const n=this,o=s.getCookie(e);if(null!==o&&""!==o){const e=o.split(",");n.setActiveMenu(t,e,0,i)}}setActiveMenu(e,t,i,n){const o=s("li:eq("+t[i]+")",e),a=s("> a",o),r=a.siblings();a.addClass(n),r.css("display",""),t.length>i+1&&this.setActiveMenu(r,t,++i,n)}createCookie(e,t,i){let n=[];s("li a."+i,t).each(e=>{const t=s(e).parent().index();n.push(t.toString())}),s.setCookie(e,n.join(","))}isSmall(e,t,i){return!(!s(t).hasClass(i)||0===s(e.currentTarget).siblings().length||(e.preventDefault(),0))}slideDown(e,t,s){t||e.slideDown(s.speed)}slideUp(e,t,s){t||e.slideUp(s.speed)}}class f{constructor(t,i){this.options={handlebars:null,bootstrap:null,airDatepicker:null,localeZh:null,template:"#tp-popover",templateItems:"#tp-popover-items",html:!0,title:"详细搜索",trigger:"click",toggle:"popover",placement:"auto",onSerach:!1,items:[],timepicker:!0,format:"yyyy-MM-dd hh:mm:ss"},this.itemsHtml="",this.itemsValue=[],this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.popoversearch")||n.data("be.popoversearch",e),void 0===window.Handlebars||(null==i?void 0:i.handlebars)||(i.handlebars=window.Handlebars),void 0===window.bootstrap||(null==i?void 0:i.bootstrap)||(i.bootstrap=window.bootstrap),void 0===window.AirDatepicker||(null==i?void 0:i.airDatepicker)||(i.airDatepicker=window.AirDatepicker),void 0===window.localeZh||(null==i?void 0:i.localeZh)||(i.localeZh=window.localeZh),e.init(t,i||e.options)})})}init(e,t){const i=this;this.itemsHtml="",this.itemsValue=[];const n=t.handlebars.compile(s(t.template).html())({}),o=new t.bootstrap.Popover(e,{html:t.html,title:t.title,trigger:t.trigger,toggle:t.toggle,placement:t.placement,template:n,animation:!0,content:""});e.addEventListener("inserted.bs.popover",()=>{i.addItem(t)}),e.addEventListener("shown.bs.popover",()=>{i.search(i,t),i.close(o),i.clear()}),e.addEventListener("hide.bs.popover",()=>{i.itemsHtml=s(".popover-content-items").html()||"",i.itemsValue=[],s(".popover-form-item").each(e=>{i.itemsValue.push(String(s(e).val()))})})}addItem(e){const t=this,i=s(".ce-popover > .popover-content .popover-content-items");if(t.itemsHtml)i.html(t.itemsHtml);else{const t=e.handlebars.compile(s(e.templateItems).html())({items:e.items});i.html(t)}s(".popover-form-item").each((i,n)=>{const o=s(i);if(void 0!==t.itemsValue[n]&&o.val(String(t.itemsValue[n])),o.hasClass("popover-form-date"))try{new e.airDatepicker(`.ce-popover input[name='${o.attr("name")}']`,{classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:e.timepicker,buttons:["today","clear"],locale:e.localeZh,dateFormat:t=>t.format(e.format)})}catch(e){s(`.ce-popover input[name='${o.attr("name")}']`).attr("type","date")}})}close(e){s(".ce-popover-cancel",".ce-popover").off("click").on("click",()=>{e.hide()})}clear(){s(".ce-popover-clear",".ce-popover").off("click").on("click",()=>{s(".popover-form-item",".ce-popover").each(e=>{s(e).val("")})})}getParam(){const e={};return s(".popover-form-item").each(function(t){const i=s(t),n=i.attr("name"),o=i.val();n&&o&&(e[n]=o)}),e}search(e,t){s(".ce-popover-ok",".ce-popover").off("click").on("click",()=>{t.onSerach&&t.onSerach({param:e.getParam()})})}}class g{constructor(t,i){this.options={animationDelay:5e3,lettersDelay:50,type:void 0},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.flash")||n.data("be.flash",e),e.init(t,i||e.options)})})}init(e,t){1===t.type&&s(e).addClass("letters"),this.singleLetters(e),this.animateHeadline(e,t)}singleLetters(e){const t=this;s(e).find("b").each(function(e){const i=s(e),n=i.text().split(""),o=i.hasClass("is-visible");for(const e in n)n.hasOwnProperty(e)&&(i.parents(t.selector).length>0&&(n[e]=`<em>${n[e]}</em>`),n[e]=o?`<i class='in'>${n[e]}</i>`:`<i>${n[e]}</i>`);const a=n.join("");i.html(a).css("opacity","1")})}animateHeadline(e,t){const i=this,n=t.animationDelay;s(e).each(function(e){const t=s(e);setTimeout(()=>{i.hideWord(t.find(".is-visible").first())},n)})}hideWord(e){const t=this,s=t.takeNext(e),i=e.children().length>=s.children().length;t.hideLetter(e.find("i").first(),e,i,t.options.lettersDelay),t.showLetter(s.find("i").first(),s,i,t.options.lettersDelay)}takeNext(e){return 0===e.length||e.is(":last-child")?e.parent().children().first():e.next()}hideLetter(e,t,s,i){const n=this;e.removeClass("in").addClass("out"),0===e.length||e.is(":last-child")?s&&setTimeout(()=>{n.hideWord(n.takeNext(t))},n.options.animationDelay):setTimeout(()=>{n.hideLetter(e.next(),t,s,i)},i)}showLetter(e,t,s,i){const n=this;e.addClass("in").removeClass("out"),0===e.length||e.is(":last-child")?s||setTimeout(()=>{n.hideWord(t)},n.options.animationDelay):setTimeout(()=>{n.showLetter(e.next(),t,s,i)},i)}}class b{constructor(e,t,s){this.active=!0,this.pos=t,this.radius=s,this.options=e}draw(e){this.active&&(e.beginPath(),e.arc(this.pos.x,this.pos.y,this.radius,0,2*Math.PI,!1),e.fillStyle=`rgba(${this.options.pointColor},${this.active?.6:0})`,e.fill())}}class v{constructor(t,i){this.options={gsap:null,canvasId:"targetCanvas",animateHeader:!0,width:window.innerWidth,height:window.innerHeight,isWindowWidth:!1,isWindowHeight:!1,num:20,pointColor:"156,217,249",lineColor:"156,217,249"},this.animationFrameId=0,this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.lineeffect")||n.data("be.lineeffect",e),e.init(t,i||e.options)})})}init(e,t){if(!t.gsap||"function"!=typeof t.gsap.to)return void console.error('[LineEffect] Missing or invalid "gsap" dependency in options.');let s,i;s="number"==typeof t.width?t.width:"string"==typeof t.width?this.resolveDimension(t.width,"width"):window.innerWidth,i="number"==typeof t.height?t.height:"string"==typeof t.height?this.resolveDimension(t.height,"height"):window.innerHeight;const n={x:s/2,y:i/2},o=document.getElementById(t.canvasId);if(!o)return void console.error(`[LineEffect] Canvas with id "${t.canvasId}" not found.`);o.width=s,o.height=i;const a=o.getContext("2d"),r=[];for(let e=0;e<s;e+=s/t.num)for(let n=0;n<i;n+=i/t.num){let o=e+Math.random()*s/t.num,a=n+Math.random()*i/t.num,l={x:o,originX:o,y:a,originY:a,active:0,closest:[],circle:null};r.push(l)}for(let e=0;e<r.length;e++){const t=[],s=r[e];for(let e=0;e<r.length;e++){let i=r[e];if(s!==i){let e=!1;for(let s=0;s<5;s++)e||void 0===t[s]&&(t[s]=i,e=!0);for(let n=0;n<5;n++)e||this.getDistance(s,i)<this.getDistance(s,t[n])&&(t[n]=i,e=!0)}}s.closest=t}for(let e in r)r.hasOwnProperty(e)&&(r[e].circle=new b(t,r[e],2+2*Math.random()));t.points=r,this.initAnimation(t,a,n,s,i),this.addListeners(t,n,o)}resolveDimension(e,t){if(e.endsWith("%")){const s=parseFloat(e);return"width"===t?s/100*window.innerWidth:s/100*window.innerHeight}if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("vw"))return parseFloat(e)/100*window.innerWidth;if(e.endsWith("vh"))return parseFloat(e)/100*window.innerHeight;if(e.endsWith("rem")||e.endsWith("em")){const t=document.createElement("div");t.style.position="absolute",t.style.visibility="hidden",t.style.fontSize=e,document.body.appendChild(t);const s=parseFloat(getComputedStyle(document.documentElement).fontSize);if(document.body.removeChild(t),e.endsWith("rem"))return parseFloat(e)*s;if(e.endsWith("em"))return parseFloat(e)*s}return parseFloat(e)||0}getDistance(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}initAnimation(e,t,s,i,n){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.animate(e,t,s,i,n);for(let t in e.points)e.points.hasOwnProperty(t)&&this.shiftPoint(e.points[t])}animate(e,t,s,i,n){if(e.animateHeader){const o=e.points;t.clearRect(0,0,i,n);for(let i in o)if(o.hasOwnProperty(i)){const n=Math.abs(this.getDistance(s,o[i]));n<4e3?(o[i].active=.3,o[i].circle.active=!0):n<2e4?(o[i].active=.1,o[i].circle.active=!0):n<4e4?(o[i].active=.02,o[i].circle.active=!0):(o[i].active=0,o[i].circle.active=!1),this.drawLines(e,o[i],t),o[i].circle.draw(t)}}this.animationFrameId=requestAnimationFrame(()=>this.animate(e,t,s,i,n))}shiftPoint(e){this.options.gsap.to(e,{duration:1+Math.random(),x:e.originX-50+100*Math.random(),y:e.originY-50+100*Math.random(),ease:"circ.inOut",onComplete:()=>this.shiftPoint(e)})}drawLines(e,t,s){var i;if(t.active)for(let n in t.closest)(null===(i=t.closest)||void 0===i?void 0:i.hasOwnProperty(n))&&(s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(t.closest[n].x,t.closest[n].y),s.strokeStyle=`rgba(${e.lineColor},${t.active})`,s.stroke())}addListeners(e,t,s){this.removeListeners(),this.boundMouseMove=e=>this.mouseMove(e,t),this.boundScroll=()=>this.scrollCheck(e),this.boundResize=()=>this.resize(e,s),document.getElementById(this.options.canvasId)?("ontouchstart"in window||window.addEventListener("mousemove",this.boundMouseMove),window.addEventListener("scroll",this.boundScroll),window.addEventListener("resize",this.boundResize)):("ontouchstart"in window||window.removeEventListener("mousemove",this.boundMouseMove),window.removeEventListener("scroll",this.boundScroll),window.removeEventListener("resize",this.boundResize))}removeListeners(){this.boundMouseMove&&window.removeEventListener("mousemove",this.boundMouseMove),this.boundScroll&&window.removeEventListener("scroll",this.boundScroll),this.boundResize&&window.removeEventListener("resize",this.boundResize)}mouseMove(e,t){const s=document.getElementById(this.options.canvasId);if(s){const i=s.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,a=i.top+n,r=i.left+o;let l=0,c=0;e.pageX||e.pageY?(l=e.pageX,c=e.pageY):(e.clientX||e.clientY)&&(l=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t.x=l-r,t.y=c-a}}scrollCheck(e){e.animateHeader=document.body.scrollTop<=("number"==typeof e.height?e.height:window.innerHeight)}resize(e,t){var s,i;if(e.isWindowWidth)if("string"==typeof e.width){const s=this.resolveDimension(e.width,"width");t.width=s}else t.width=null!==(s=e.width)&&void 0!==s?s:window.innerWidth;if(e.isWindowHeight)if("string"==typeof e.height){const s=this.resolveDimension(e.height,"height");t.height=s}else t.height=null!==(i=e.height)&&void 0!==i?i:window.innerHeight}destroy(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.removeListeners()}}const y="ce-slideFromTop",w="ce-slideFromRight",C="ce-slideFromBottom",x="ce-slideFromLeft",k="ce-slideTop",E="ce-slideLeft";class T{constructor(t,i){this.options={reverse:!1},this.selector=t,e.defaultConstructor(this,t,i,e=>{e.elements.forEach(t=>{let n=s(t);n.data("be.hoverdir")||n.data("be.hoverdir",e),e.init(t,i||e.options)})})}init(e,t){const i=s(e);i.on("mouseenter",e=>this.mouseEvent(e,t)),i.on("mouseleave",e=>this.mouseEvent(e,t))}mouseEvent(e,t){const i=s(e.currentTarget),n=e.type,o=i.find("div"),a=this.getDir(i,{x:e.pageX,y:e.pageY}),r=this.getClasses(a,t);o.removeClass(),"mouseenter"===n?setTimeout(()=>{o.css("display","none").addClass(r.from),o.show(15,e=>{s(e).addClass(r.to)})},15):o.addClass(r.from)}getDir(e,t){const s=e.width(),i=e.height(),n=(t.x-e.offset().left-s/2)*(s>i?i/s:1),o=(t.y-e.offset().top-i/2)*(i>s?s/i:1);return Math.round((Math.atan2(o,n)*(180/Math.PI)+180)/90+3)%4}getClasses(e,t){let s,i;switch(e){case 0:s=t.reverse?C:y,i=k;break;case 1:s=t.reverse?x:w,i=E;break;case 2:s=t.reverse?y:C,i=k;break;case 3:s=t.reverse?w:x,i=E;break;default:s="",i=""}return{from:s,to:i}}}class L{constructor(e){this.options={times:20,time:1e3},this.jsLoaded=[],this.cssLoaded=[],this.options=Object.assign(Object.assign({},this.options),e)}loadScript(e){const t=this;return new Promise((s,i)=>{if(t.jsLoaded.find(t=>t.url===e)){let i,n=0;const o=setInterval(()=>{i=t.jsLoaded.find(t=>t.url===e);try{if(!(null==i?void 0:i.isLoaded)&&n>t.options.times)return t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),i&&i.script.parentNode===document.body&&document.body.removeChild(i.script),void clearInterval(o);if(null==i?void 0:i.isLoaded)return clearInterval(o),void s(i.script);n++}catch(e){console.error(e)}},t.options.time)}else{const n=document.createElement("script");let o=!1,a=0;t.jsLoaded=[...t.jsLoaded,{script:n,url:e,isLoaded:!1,count:0}],n.src=e,n.onload=()=>{t.jsLoaded=t.jsLoaded.map(t=>t.url===e?Object.assign(Object.assign({},t),{isLoaded:!0}):t),o=!0,s(n)},n.onerror=()=>{t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),i(new Error("Script load error for "+e))},document.body.appendChild(n);const r=setInterval(()=>{if(!o)return a>t.options.times?(n.parentNode===document.body&&document.body.removeChild(n),void clearInterval(r)):void a++;clearInterval(r)},100)}})}loadStyle(e){const t=this;return new Promise((s,i)=>{const n=document.getElementsByTagName("link");for(let t=0;t<n.length;t++)if(n[t].getAttribute("href")===e)return void s(n[t]);const o=document.createElement("link");o.href=e,o.rel="stylesheet",o.type="text/css",o.onload=()=>s(o),o.onerror=()=>i(new Error("Style load error for "+e)),document.head.appendChild(o),t.cssLoaded.push(o)})}destroy(){this.jsLoaded.forEach(e=>{e.script&&e.script.parentNode===document.body&&document.body.removeChild(e.script)}),this.cssLoaded.forEach(e=>{e.parentNode===document.head&&document.head.removeChild(e)}),this.jsLoaded=[],this.cssLoaded=[]}}const P=o;export{d as AeLoader,e as Base,h as BtnEf,g as Flash,r as GoTop,T as HoverDir,p as IAccordion,m as IList,L as ILoader,u as IPagination,l as ItemCount,v as LineEffect,c as NiceSelect,f as PopoverSearch,a as SubmitFlag,P as default};
|
|
1
|
+
function e(e,t){if(!e)return t;{let s;for(s in t)if(null==t?void 0:t.hasOwnProperty(s)){const n=t[s];null==e[s]&&(e[s]=n)}}return e}function t(e){let t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t=t.replace(/\./g,""),t}function s(...e){window.console&&e&&console.log(...e)}function n(e,t){let s=parseFloat(String(e));return s=s?Math.round(e*Math.pow(10,t))/Math.pow(10,t):0,s}function i(e){let t=!0;return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(t=!1),t}function o(e,t){return null!=e&&""!==e&&"undefined"!==e&&"null"!==e||(e=t),e}function a(e){return!!e&&e&&"object"==typeof e&&!Array.isArray(e)&&!0}function r(e,t){return e.filter(function(e){return-1!==t.indexOf(e)})}function l(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)||-1===t.indexOf(s)})}function c(e,t){return e.concat(t).filter(function(s){return-1===e.indexOf(s)&&-1!==t.indexOf(s)})}function d(e){return/^<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>$|^<([a-z][a-z0-9]*)\b[^>]*\/>$/i.test(e)}function h(e){let t=document.createElement("div");t.innerHTML=e.trim();let s=t.firstChild;if((null==s?void 0:s.nodeType)===Node.TEXT_NODE){s=s.nextSibling;let e=document.createDocumentFragment();for(;s;)e.appendChild(s),s=s.nextSibling;return e}return s}function u(t){var s;if("get"===(null===(s=null==(t=e(t,{url:"",method:"GET",async:!0,headerMap:{},cache:"default",dataType:"json",data:null,success:function(){},error:function(){}}))?void 0:t.method)||void 0===s?void 0:s.toLowerCase())){if(!t.url.includes("?")){let e=new URLSearchParams;for(let s in t.data)t.data.hasOwnProperty(s)&&e.append(s,t.data[s]);t.url=t.url+"?"+e.toString()}t.data=null}if(fetch)fetch(t.url,{method:t.method,headers:new Headers(t.headerMap),cache:t.cache,body:t.data?JSON.stringify(t.data):null}).then(function(e){return e.ok?"json"===t.dataType?e.json():e.text():Promise.reject(new Error("Failed to fetch resource"))}).then(function(e){t.success&&t.success(e)}).catch(function(e){t.error&&t.error(e)});else{let e=new XMLHttpRequest;e.onload=function(){if(e.status>=200&&e.status<300){let s;switch(t.dataType){case"json":try{s=JSON.parse(e.responseText)}catch(e){return void(t.error&&t.error(e))}break;case"text":s=e.responseText;break;default:s=e.responseText||e.response}t.success&&t.success(s,e.status,e)}else{let s=new Error("Request failed. Status: "+e.status);t.error&&t.error(s)}},e.onerror=function(){t.error&&t.error(new Error("Network Error"))},e.open((null==t?void 0:t.method)||"get",t.url,t.async||!1);for(let s in t.headerMap)t.headerMap.hasOwnProperty(s)&&e.setRequestHeader(s,t.headerMap[s]);t.data?e.send(t.data):e.send()}}function m(e){let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)","i"),s=window.location.search.substr(1).match(t);return null!=s?unescape(s[2]):null}function p(e){const t=document.querySelector(e);if(t){const e=t.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft,i=e.top+s,o=e.left+n;window.scrollTo(o,i)}}function f(e,t,s){let n=0;return e.length<=t||e.length>=s?n=1:/^[0-9]{0,32}$/.test(e)?n=2:/^[a-zA-z]{0,32}$/.test(e)?n=3:/^[0-9a-zA-z]{0,32}$/.test(e)?n=4:/^[^\u4e00-\u9fa5a-zA-Z\d,.,。]{0,32}$/.test(e)?n=5:/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]*$/.test(e)&&(n=8),n}const g={esc:"Escape",backspace:"Backspace",space:" ",enter:"Enter",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight"};function v(e,t){document.addEventListener("keydown",function(s){e===s.key&&t()})}function b(e,t,s={}){let n="",i=s.path||"/",o=s.domain,a=s.secure?"; Secure":"";if(s.expires){let e;"number"==typeof s.expires?(e=new Date,e.setTime(e.getTime()+24*s.expires*60*60*1e3)):e=s.expires,n=`; expires=${e.toUTCString()}`}document.cookie=`${e}=${encodeURIComponent(t)}${n}; path=${i}; domain=${o||""}${a}`}function y(e){let t=`${e}=`,s=document.cookie.split(";");for(let e=0;e<s.length;e++){let n=s[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}return null}function w(e,t={}){b(e,"",Object.assign(Object.assign({},t),{expires:-1}))}function C(e,t){const s=function(e,n,i){let o="";++n;for(let a=0;a<e.length;a++){const r=e[a];let l="#";if(r.link&&(l=r.link),r.pId||0!==n){if(r.pId===i){let t="";r.isParent&&(t=s(e,n,r.id),t&&(t="<ul class='sub'>"+t+"</ul>"));let i="";1===n&&(i=`<i class='${r.icon}'></i>`);let a=r.hash?` data-hash='${r.hash}' `:" ",c=r.actionId?` id='${r.actionId}' `:" ";o+=`<li class='sub-menu'><a${r.isParent?" class='mu-js-a' ":" "}${a}${r.tid?` data-tid='${r.tid}' `:" "}${c}href='${l}'>`+i+`<span>${r.name}</span></a>`+t+"</li>"}}else if(t)o=s(e,n,r.id);else{let t=s(e,n,r.id);t&&(t="<ul class='sub'>"+t+"</ul>"),o+=`<li class='sub-menu'><a${r.hash?` data-hash='${r.hash}' `:" "}${r.actionId?` id='${r.actionId}' `:" "}href='${l}'><span>${r.name}</span></a>`+t+"</li>"}}return o};let n="";return e&&(n=s(e,-1,0)),""+n}function k(e,t,s){let n=[];return e.forEach(function(i){i.pId===t&&(i.isactive=`a${i.id}`===s,n.push(i),i.isParent&&(i.children=k(e,i.id)))}),n}function x(e){const t=document.querySelector(".fm-search");if(!t)return;const s=t.querySelector("input"),n=t.querySelectorAll("span"),i=n[0],o=n[1];if(!s||!i||!o)return;const a=e=>{o.style.opacity=e?"1":"0",o.style.visibility=e?"visible":"hidden"};s.addEventListener("change",()=>{a(""!==s.value)}),a(""!==s.value),o.addEventListener("click",()=>{s.value="",a(!1)}),i.addEventListener("click",()=>{e(s.value)})}function E(e){if(!Array.isArray(e))return e;const t=[...e];for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}return t}function T(t,s,n,i){"string"==typeof s?t.elements=document.querySelectorAll(s):s instanceof NodeList?t.elements=s:s instanceof HTMLElement?t.elements=Array.of(s):t.elements=[],t.options=e(n,t.options),i(t)}function L(e,t){var s;let n="data-"+t;return null!==(s=e.getAttribute(n))&&void 0!==s?s:void 0}function S(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}function A(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}const P="base"+(""+Math.random()).replace(/\D/g,""),M=new Map,$={};class I{constructor(e,t){if(this.elements=[],this.length=0,t=t instanceof I?t.elements[0]:t||document,"string"==typeof e)if(t&&"string"==typeof t&&(t=document.querySelector(t)),I.isEqSelector(e)){const s=e.split(":")[0],n=e.match(/:eq\((\d+)\)/);if(n){const e=parseInt(n[1]),i=I.contextQuerySelector(">"+s,t);i.length>0?this.elements=[i[e]]:this.elements=[]}else this.elements=[]}else this.elements=I.contextQuerySelector(e,t);else e instanceof NodeList||e instanceof HTMLElement?this.elements=e instanceof NodeList?Array.from(e):[e]:e instanceof Window?this.elements=[window]:null!==e&&"object"==typeof e&&"documentElement"in e?this.elements=[t]:Array.isArray(e)?this.elements=e:this.elements=[];this.length=this.elements.length}each(e){return this.elements.forEach((t,s)=>{e(t,s)}),this}hasClass(e){let t=!1;return this.each(s=>{t=s.classList.contains(e)}),t}addClass(e){return this.each(t=>{if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.add(s[e])}else e&&t.classList.add(e)})}removeClass(e){return this.each(t=>{if(void 0===e)t.className="";else if(e||0!==e.length)if(/\s/.test(e)){const s=e.split(" ");for(let e=0;e<s.length;e++)s[e]&&t.classList.remove(s[e].trim())}else t.classList.remove(e.trim())})}toggleClass(e){return this.each(t=>{if(t.classList)t.classList.toggle(e);else{let s=t.className.split(/\s+/),n=s.indexOf(e);n>=0?s.splice(n,1):s.push(e),t.className=s.join(" ")}})}not(e){let t=e instanceof I?e.elements:Array.from(document.querySelectorAll(e));return this.elements=Array.from(this.elements).filter(e=>!t.includes(e)),this}is(e){var t;let s=this.elements[0];if(":visible"===e){if("none"===s.style.display||"hidden"===s.style.visibility||"0"===getComputedStyle(s).opacity)return!1}else{if(":first-child"===e)return(null===(t=s.parentNode)||void 0===t?void 0:t.firstChild)===s;if(":last-child"!==e)return s.matches(e);{const e=s.parentNode;if(e){const t=e.children;return t[t.length-1]===s}}}return!1}closest(e){let t=this.elements[0];if(!t)return I.build([]);const s=t.matches||t.webkitMatchesSelector;if(s.call(t,e))return this.constructor===I?I.build(this.elements):this;let n=t.parentElement;for(;n;){if(s.call(n,e))return I.build(n);n=n.parentElement}return I.build([])}next(){if(1===this.elements.length){const e=this.elements[0].nextElementSibling;return e instanceof Element?I.build(e):I.build([])}if(this.elements.length>1){const e=[],t=this.elements[0].nextElementSibling;t instanceof Element&&e.push(t);for(let t=1;t<this.elements.length-1;t++)this.elements[t]instanceof Element&&e.push(this.elements[t]);const s=this.elements[this.elements.length-1].nextElementSibling;return s instanceof Element&&e.push(s),I.build(e)}return null}nextAll(e){const t=[];let s=this.elements[0],n=s.nextSibling,i=s.parentElement;for(;n&&(1===n.nodeType&&(e&&!n.matches(e)||t.unshift(n)),n=n.nextSibling,null!==n||0!==t.length||(null==i?void 0:i.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}prev(){if(1===this.elements.length)return I.build(this.elements[0].previousElementSibling);if(this.elements.length>1){let e=I.build(this.elements[0].previousElementSibling);return this.each((t,s)=>{s>1&&(e.elements.push(t),s===this.elements.length-1&&e.elements.push(t.previousElementSibling))}),e}return null}prevAll(e){const t=[];let s=this.elements[this.elements.length-1],n=s.previousSibling,i=s.parentElement;for(;n&&(1===n.nodeType&&(e&&!n.matches(e)||t.unshift(n)),n=n.previousSibling,null!==n||0!==t.length||(null==i?void 0:i.firstChild)!==s););return this.elements=t,this.length=this.elements.length,this}first(){return new I([this.elements[0]])}find(e){if(e&&"option:selected"===e.trim()){const e=[];return this.each(t=>{("select-one"===t.type||"select-multiple"===t.type)&&t.selectedIndex>=0&&e.push(t.options[t.selectedIndex])}),new I(e)}{const t=[];return this.elements.forEach(s=>{s instanceof HTMLElement&&s.querySelectorAll(e).forEach(e=>t.push(e))}),new I(t)}}parent(){let e=this.elements[0];return e?new I(e.parentNode):new I}parents(e){const t=[];let s=this.elements[0].parentElement;for(;s&&s!==document.documentElement;)e&&!s.matches(e)||t.push(s),s=s.parentElement;return new I(t)}siblings(){let e=this.elements[0];if(e&&1===e.nodeType){let t=e.parentNode;if(t){let s=[];for(let n=0;n<t.childNodes.length;n++){let i=t.childNodes[n];1===i.nodeType&&i!==e&&s.push(i)}return new I(s)}return new I}return new I}children(){let e=[];return this.each(t=>{e.push(...Array.from(t.children))}),new I(e)}index(){var e;const t=this.elements[0],s=null===(e=t.parentNode)||void 0===e?void 0:e.children;if(s)for(let e=0;e<s.length;e++)if(s[e]===t)return e;return-1}size(){return this.elements?this.elements.length:0}on(e,t){return this.each(function(s){s.addEventListener(e,t)})}off(e,t){return this.each(function(s){s.removeEventListener&&t&&s.removeEventListener(e,t)})}click(e){return"function"==typeof e?this.on("click",e):this.each(e=>{const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}),this}focus(e){return"function"==typeof e&&this.on("focus",e),this}change(e){return e&&this.each(t=>{t.addEventListener("change",e,!1)}),this}trigger(e,t){return this.each(function(s){let n;try{n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0})}catch(s){n=document.createEvent("CustomEvent"),n.initCustomEvent(e,!0,!0,t)}s.dispatchEvent(n)}),this}remove(){return this.each(e=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})}data(e,s){if(void 0===e)throw new Error("读取的或设置的键值不能为空");let n=this.elements[0];if(void 0!==s){let i=I.elementData.get(n);return i||(i=new Map,I.elementData.set(n,i)),i.set(t(e),s),this}{const s=I.elementData.get(n);return s?s.get(t(e)):L(n,e)}}removeData(e){let s=this.elements[0],n=I.elementData.get(s);n&&n.set(t(e),void 0)}attr(e,t){if(0===this.elements.length)return void 0===t?"":this;const s=this.elements[0];return void 0===t?(null==s?void 0:s.getAttribute(e))||"":this.each(s=>s.setAttribute(e,t))}removeAttr(e){return this.each(t=>{"function"==typeof t.removeAttribute&&t.removeAttribute(e)})}offset(){let e=this.elements[0].getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,s=window.pageXOffset||document.documentElement.scrollLeft;return{top:e.top+t,left:e.left+s}}scrollTop(){return this.elements[0]instanceof Window?void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop:document.documentElement.scrollTop}height(){const e=this.elements[0];return e?e===window?window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight:e.offsetHeight:(console.warn("目标元素不存在或未正确绑定!"),0)}width(){const e=this.elements[0];return e?e===window?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:e.offsetWidth:(console.warn("目标元素不存在或未正确绑定!"),0)}val(e){let t=this.elements[0];if("select-multiple"===t.type){if(void 0!==e){for(let s=t.options.length-1;s>=0;s--)t.options[s].selected=t.options[s].value===e;return this}{let e=[];for(let s=0;s<t.options.length;s++)t.options[s].selected&&e.push(t.options[s].value);return e}}return void 0!==e?(t.value=e,this):t.value}css(e,t){if(0===this.elements.length)return this;if(void 0===t){if("object"==typeof e){const t=e;for(const e in t)if(t.hasOwnProperty(e)){const s=t[e];this.each(t=>{t.style[e]=s})}return this}return this.elements[0].style[e]||""}return this.each(s=>{s.style[e]=t})}text(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t.textContent||"":this.each(t=>{t.textContent=e})}html(e){if(0===this.elements.length)return void 0===e?"":this;const t=this.elements[0];return void 0===e?t&&1===t.nodeType?t.innerHTML:"":this.each(t=>{t&&1===t.nodeType&&(t.innerHTML=e)})}after(e){return this.each(t=>{t.insertAdjacentHTML("afterend",e)})}append(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.appendChild(s.firstChild);return t})}prepend(e){return this.each(t=>{let s=document.createElement("div");if("string"==typeof e)s.innerHTML=e;else if(e instanceof Node)s.appendChild(e);else if(e instanceof NodeList)for(let t=0;t<e.length;t++)s.appendChild(e[t]);for(;s.firstChild;)t.insertBefore(s.firstChild,t.firstChild);return t})}hide(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="none",t&&"function"==typeof t&&t(s)},e):(s.style.display="none",t&&"function"==typeof t&&t(s))})}show(e,t){return this.each(s=>{s.style.display="block",e?setTimeout(()=>{s.style.display="block",t&&"function"==typeof t&&t(s)},e):(s.style.display="block",t&&"function"==typeof t&&t(s))})}slideUp(t,s){const n=e({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{e.style.height=e.scrollHeight+"px",e.style.overflow="hidden",e.style.transition=`height ${n.duration}ms ease-in-out`,setTimeout(()=>{e.style.height="0px"},n.duration/100),setTimeout(()=>{e.style.display="none",e.style.overflow="",e.style.transition="",e.style.height="",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration-n.duration/100)})}slideDown(t,s){const n=e({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{let t=e.offsetHeight;"none"===e.style.display&&(e.style.display="",t=0),e.style.height=t+"px",e.style.transition=`height ${n.duration}ms ease-in-out`,e.offsetHeight,e.style.height=e.scrollHeight+"px",e.style.display="block",setTimeout(()=>{e.style.overflow="",e.style.transition="",e.style.display="",e.style.height="",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration)})}slideToggle(t,s){const n=e({duration:t,callback:s},{duration:500,callback:null});let i=!0;return this.each(e=>{"none"===e.style.display&&(i=!1)}),i?this.slideUp(n.duration,n.callback):this.slideDown(n.duration,n.callback),this}fadeOut(t,s){const n=e({duration:t,callback:s},{duration:300,callback:null});return this.each(e=>{e.style.transition=`opacity ${n.duration}ms ease-in-out`,e.style.opacity="0",setTimeout(()=>{e.style.display="none",n.callback&&"function"==typeof n.callback&&n.callback(e)},n.duration)})}checkAll(t){const s=e({checkboxes:t},{checkboxes:".be-check"});return this.each(e=>{let t=document.querySelectorAll(s.checkboxes);e.addEventListener("change",function(){t.forEach(function(t){t.checked=e.checked})})})}checkReverse(t){const s=e({checkboxes:t},{checkboxes:".be-check"});return this.each(e=>{let t=document.querySelectorAll(s.checkboxes);e.addEventListener("click",function(){t.forEach(function(e){e.checked=!e.checked})})})}numStep(t){return t=e(t,{start:0,end:100,duration:1500,callback:!1}),this.each(e=>{let s=null;requestAnimationFrame(function n(i){null===s&&(s=i);const o=Math.min((i-s)/t.duration,1),a=Math.floor(o*(t.end-t.start)+t.start);I.build(e).text(a.toString()),o<1?requestAnimationFrame(n):"function"==typeof t.callback&&t.callback()})})}scrollBG(t){return t=e(t,{speed:0}),this.each(e=>{I.build(e).css("background-position","50% 0px"),I.build(window).on("scroll",()=>{const s=I.build(e),n=s.offset().top,i=s.height(),o=s.scrollTop(),a=s.height();if(a+o>n&&a+o<n+a+i){const e=(n+i-o)/t.speed;s.css("background-position","50% -"+e+"px")}})})}setActive(e){const{className:t="active"}=e||{};I.build(this.elements).click(e=>{const s=I.build(e.currentTarget);s.hasClass(t)?s.removeClass(t):(I.build(this.elements).removeClass(t),s.addClass(t))})}loading(t){let s=!1;return void 0!==t&&"object"!=typeof t&&(s=!0,t={}),t=e(t,{isFull:!0,loadingTarget:"#do-preloader",template:'<div id="do-preloader" class="do-preloader"><span class="do-pr-loader"><span class="do-pr-lr"></span></span></div>'}),this.each(e=>{const n=t,i=n.loadingTarget,o=n.template;if(s)I.build("> *",e).removeClass("be-blur-2"),I.build(i).addClass("oy-0"),setTimeout(()=>{I.build("> *",e).removeClass("be-ts"),I.build(i).remove()},300);else{I.build("> *",e).addClass("be-ts").addClass("be-blur-2"),I.build(e).prepend(o);const t=I.build(i);t.length&&t.css("position","fixed").css("height","100vh").css("width","100vw")}})}static contextQuerySelector(e,t){if(!t||"function"!=typeof t.querySelectorAll)return console.warn("contextQuerySelector: 无效的上下文环境 (context is null/undefined or invalid)",e),[];if(e.startsWith(">"))return Array.from(t.querySelectorAll(e.substring(1))).filter(function(e){return e.parentNode===t});{const s=t.querySelectorAll(e);return 0===s.length?Array.from(document.querySelectorAll(e)):Array.from(s)}}static isEqSelector(e){const t=e.match(/^[\w-]+:eq\((\d+)\)$/);return null!==t&&void 0!==t[1]}static build(e,t){return new(this||I)(e,t)}}I.expando="base"+(""+Math.random()).replace(/\D/g,""),I.elementData=new Map,I.cache={};const D=I.build;class H{constructor(e,t){this.options={text:"处理中..",useText:!0},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.submitflag")||n.data("be.submitflag",e),e.init(s,t)})})}init(t,s){const n=this;s&&(n.options=e(s,n.options)),D(t).click(e=>{n.request(e.currentTarget)})}request(e){const t=D(e);e.setAttribute("data-original-text",t.text()),t.addClass("submit-flag-request").attr("disabled","disabled"),this.options.useText&&t.text(this.options.text)}complete(e){let t;t=D(e||this.selector),t.removeClass("submit-flag-request").removeAttr("disabled"),this.options.useText&&t.each(e=>{const t=e.getAttribute("data-original-text");null!==t&&""!==t&&(D(e).text(t),e.removeAttribute("data-original-text"))})}destroy(){D(this.selector).removeData("be.submitflag"),D(this.selector).each(e=>{e.removeAttribute("data-original-text")})}}class N{constructor(e,t){this.options={position:{bottom:"15px",right:"15px"},showEffect:" animate__zoomIn ",hideEffect:" animate__zoomOut ",type:"fixed",offsetTop:400},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.gotop")||n.data("be.gotop",e),e.init(s,t)})})}init(t,s){const n=D(t),i=(s=e(s,this.options)).type||"fixed",o=s.showEffect||" animate__zoomIn ",a=s.position,r=void 0!==s.offsetTop?Number(s.offsetTop):400,l=s.hideEffect||" animate__zoomOut ";n.addClass("animate__animated").css({display:"inline-block",position:i,opacity:0}),"fixed"!==i&&"absolute"!==i||n.css(a),n.on("click",e=>{e.preventDefault(),window.scrollTo(0,0)}),r&&!n.hasClass("animated-running")&&n.offset().top<=D(window).height()&&n.addClass("animated-running "+o).css({opacity:""}),D(window).on("scroll",()=>{if(r)D(window).scrollTop()>=r&&!n.hasClass("animated-running")?(n.addClass("animated-running "+o).css({opacity:""}),n.removeClass(l)):D(window).scrollTop()<=r&&n.hasClass("animated-running")&&(n.removeClass("animated-running "+o).css({opacity:0}),n.addClass(l));else{let e=n.offset().top;n.hasClass("animated-running")||D(window).scrollTop()>=e-D(window).height()&&(n.addClass("animated-running "+o).css({opacity:""}),n.removeClass(l))}}),D(window).trigger("scroll")}}class O{constructor(e,t){this.options={num:1},this.value=0,this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.itemcount")||n.data("be.itemcount",e),e.init(s,t)})})}init(t,s){const n=this;s&&(n.options=e(s,n.options));const i=D(t),o=i.find(".fm-plus"),a=i.find(".fm-minus"),r=i.find(".fm-result");let l=parseInt(String(r.val()));n.value=isNaN(l)?0:l,o.on("click",function(e){e.preventDefault(),l+=n.options.num,r.val(String(l)),n.value=l}),a.on("click",function(e){if(e.preventDefault(),!(l-n.options.num>=0))return!1;l-=n.options.num,r.val(String(l)),n.value=l})}getValue(){return this.value}}class q{constructor(e,t){this.options={width:"auto"},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.niceselect")||n.data("be.niceselect",e),e.init(s,t)})})}create(e,t){var s,n;const i=this,o=D(e),a=o.after("<div></div>").next().addClass("ce-nice-select").addClass(o.attr("class")||"").addClass(o.attr("disabled")?"disabled":"").attr("tabindex",o.attr("disabled")?"":"0").css("width",null!==(s=i.options.width)&&void 0!==s?s:"auto").html('<span class="current"></span><ul class="list"></ul>'),r=o.find("option"),l=e,c=D(l.options[l.selectedIndex]);i.text=c.data("display")||c.text(),a.find(".current").html(null!==(n=i.text)&&void 0!==n?n:""),r.each(function(e){const t=D(e),s=t.data("display"),n=null!=s?String(s):"",i=c.text()===t.text()?"selected":"";a.find("ul").append(`<li data-value="${t.val()}" data-display="${n}" class="option ${i}">${t.text()}</li>`)})}init(t,s){const n=this,i=D(n.selector),o=D(t);s&&(n.options=e(s,n.options)),o.hide(),n.create(t,n.options);const a=i.next();return a.on("click",function(){const e=o.next();e.toggleClass("open"),e.hasClass("open")?(e.find(".option"),e.find(".focus").removeClass("focus"),e.find(".selected").addClass("focus")):e.focus()}),D(".option",a).on("click",function(e){const t=D(e.currentTarget),s=a;s.find(".selected").removeClass("selected"),t.addClass("selected"),n.text=t.data("display")||t.text(),s.find(".current").text(String(n.text)),n.value=t.data("value"),s.prev().trigger("change").val(String(n.value))}),this}getText(){return this.text}getValue(){return this.value}}class W{constructor(t,s){this.options={time:1e3},this.selector=t||"",a(t)?(this.options=e(t,this.options),this.selector=""):(t&&(this.selector=t),this.options=e(s,this.options)),D("[data-ae-load]").addClass("ae-load")}start(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";D(s).addClass("ae-load").removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-complete"),setTimeout(()=>{D(s).removeClass("ae-load ae-tt-complete")},this.options.time)}loading(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";D("[data-ae-load]").addClass("ae-load"),D(s).each(e=>{const t=D(e),s=t.data("al-mw"),n=t.data("al-mh");s&&t.css("min-width",s),n&&t.css("min-height",n),t.removeClass("ae-tt-complete ae-tt-done ae-tt-loading").addClass("ae-tt-loading")})}done(e){const t=e||this.selector,s=t?`${t}[data-ae-load]`:"[data-ae-load]";D(s).removeClass("ae-tt-done").addClass("ae-tt-done"),setTimeout(()=>{D(s).removeClass("ae-load ae-tt-loading ae-tt-done")},this.options.time)}}class j{constructor(e,t){this.options={},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.btnef")||n.data("be.btnef",e),e.init(s,t)})})}init(e,t){const s=D(e);s.append("<b></b>"),s.on("mouseenter",e=>{const t=D(e.currentTarget),s=t.offset(),n=e.pageX-s.left,i=e.pageY-s.top;t.find("b").css({top:i+"px",left:n+"px"})}).on("mouseout",e=>{const t=D(e.currentTarget),s=t.offset(),n=e.pageX-s.left,i=e.pageY-s.top;t.find("b").css({top:i+"px",left:n+"px"})})}}class F{constructor(e,t){this.options={targetWarp:"#be-pw",totalItems:0,itemsPerPage:0,visiblePages:5,prev:"上一页",next:"下一页",first:"首页",last:"尾页",onButtonClick:()=>{}},this.currentPage=1,this.totalPages=0,this.selector=e,T(this,e,t,e=>{let s=this;e.elements.forEach(n=>{let i=D(n);i.data("be.ipagination")||i.data("be.ipagination",e),s.currentPage=1,s.totalPages=Math.ceil(s.options.totalItems/s.options.itemsPerPage),e.init(t)})})}init(t){const s=this;let n=s.options;t&&(n=e(t,s.options)),D(this.selector).html(""),this.addPageButton(n.first,1,()=>this.goToPage(1)),this.addPageButton(n.prev,this.currentPage-1,()=>this.goToPrevPage());let i=Math.max(1,this.currentPage-Math.floor(n.visiblePages/2)),o=Math.min(this.totalPages,i+n.visiblePages-1);o-i<n.visiblePages-1&&(i=Math.max(1,o-n.visiblePages+1));for(let e=i;e<=o;e++)this.addPageButton(e,e,()=>this.goToPage(e));this.addPageButton(n.next,this.currentPage+1,()=>this.goToNextPage()),this.addPageButton(n.last,this.totalPages,()=>this.goToPage(this.totalPages));const a=n.itemsPerPage*(s.currentPage-1)+1,r=Math.min(a+n.itemsPerPage-1,n.totalItems);D("p",n.targetWarp).html(`显示 ${a} 至 ${r} 条,共有 ${n.totalItems} 条`)}addPageButton(e,t,s){const n=document.createElement("li");n.classList.add("page-item"),"number"==typeof e&&Number.isFinite(e)||!isNaN(Number(e))&&Number.isFinite(Number(e))?n.classList.add("pi-t2"):n.classList.add("pi-t1");const i=document.createElement("button");n.append(i),i.innerHTML=String(e),i.onclick=s,t!==this.currentPage&&0!==t&&t!==this.totalPages+1||(n.classList.add("active"),n.classList.add("disabled")),D(this.selector).append(n)}goToPrevPage(){this.currentPage>1&&(this.currentPage--,this.init(),this.options.onButtonClick(this.currentPage))}goToNextPage(){this.currentPage<this.totalPages&&(this.currentPage++,this.init(),this.options.onButtonClick(this.currentPage))}goToPage(e){e>=1&&e<=this.totalPages&&(this.currentPage=e,this.init(),this.options.onButtonClick(this.currentPage))}}class z{constructor(e,t){this.options={rp:"10",visiblePages:7,sortname:"id",sortorder:"desc",method:"post",dataType:"json",param:{},handlebars:null,url:"",loadColor:"#0a0a0a",lang:"cn",template:"#tp-list",headerMap:{},cache:"default",ipWarp:"#ilist-ip-warp",prev:"上一页",next:"下一页",first:"首页",last:"尾页",onSuccess:!1,onError:!1},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.ilist")||n.data("be.ilist",e),void 0!==window.Handlebars&&null===(null==t?void 0:t.handlebars)&&(t.handlebars=window.Handlebars),e.init(s,t||e.options)})})}init(t,s){let n=D(t),i=n.data("be.ilist.html");if(n.data("be.ilist.flag",!0),i)D(".be-list-data-body",t).html("");else{const e=D(s.template);if(!s.handlebars)return void console.error("Handlebars is required for IList but not provided.");const t=s.handlebars.compile(e.html())({});n.html(t),n.data("be.ilist.html",t)}let o=e({page:1,rp:s.rp,sortname:s.sortname,sortorder:s.sortorder},s.param);s.isInit=!0,D(t).data("be.ilist.event",!0),this.getData(t,s,o)}getData(t,s,n){let i=this,o=D(t);D(".be-list-data-body",t).html(""),D(".be-list-loading",t).addClass("opacity-100"),D(".be-list-nofound",t).removeClass("opacity-100"),D(".be-list-page",t).removeClass("opacity-100"),u({method:s.method,url:s.url,headerMap:s.headerMap,data:n,cache:s.cache,dataType:s.dataType,success:a=>{D(".be-list-loading",t).removeClass("opacity-100").addClass("opacity-0"),D(".be-list-data",t).removeClass("opacity-0"),D(".be-list-data-body",t).css("display","table-row-group"),a.isInit=s.isInit,s.onSuccess&&s.onSuccess(a),a.total?(i.page(t,s,n,a.total),D(".ilist-check-all").checkAll(".ilist-check"),D("table > tbody tr",t).click(e=>{let t=D(e.target);t.is("input")||t.is("i")||t.is("a")||D(".ilist-check",e.currentTarget).click()}),o.data("be.ilist.event")&&(o.data("be.ilist.event",!1),D(".ilist-check",t).change(e=>{D(e.currentTarget).is(":checked")?D(e.currentTarget).parents("tr").addClass("active"):D(e.currentTarget).parents("tr").removeClass("active")})),D("table > thead tr td",t).click(a=>{const r=D(a.currentTarget).data("sortname");if(r){const l=o.data("be.ilist.param");if(l&&(n=e(l,n)),n.sortname=r,!D(a.currentTarget).hasClass("is-check")&&n.sortname){let e=D(a.currentTarget).attr("data-sort-order");D("table > thead tr td",t).removeAttr("data-sort-order"),e?(D(a.currentTarget).attr("data-sort-order","desc"===e?"asc":"desc"),n.sortorder="desc"===e?"asc":"desc"):(D(a.currentTarget).attr("data-sort-order","desc"),n.sortorder="desc"),o.data("be.ilist.flag",!0),n.page="1",s.isInit=!1,i.getData(t,s,n)}}}),D(".be-list-page",t).addClass("opacity-100")):(D(".be-list-nofound",t).addClass("opacity-100"),D(".be-list-page",t).removeClass("opacity-100"))},error:e=>{try{s.onError&&s.onError(e)}catch(e){}}})}page(e,t,s,n){let i=this,o=D(e);o.data("be.ilist.flag")&&new F("#ipagination",{targetWarp:t.ipWarp,totalItems:n,itemsPerPage:Number(t.rp),visiblePages:t.visiblePages,prev:t.prev,next:t.next,first:t.first,last:t.last,onButtonClick:n=>{const o=document.querySelector(".ilist-check-all");o&&(o.checked=!1),s.page=n,t.isInit=!1,i.getData(e,t,s)}}),o.data("be.ilist.flag",!1)}reload(t){let s=D(this.selector);const n=s.data("be.ilist"),i=e(t,{page:1,rp:n.options.rp,sortname:n.options.sortname,sortorder:n.options.sortorder});n.options.isInit=!1,s.data("be.ilist.flag",!0),s.data("be.ilist.param",i),D("table > thead tr td",s).attr("data-sort-order",""),n.getData(n.selector,n.options,i)}}class R{constructor(e,t){this.options={classParent:"ia-parent",classActive:"active",classArrow:"ia-icon",classCount:"ia-count",autoExpand:!1,classExpand:"ia-current-parent",autoClose:!0,speed:300,saveState:!0,disableLink:!0,showCount:!1,cookie:"ia-cookie",smallClass:"ce-accordion-small"},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.iaccordion")||n.data("be.iaccordion",e),e.init(s,t)})})}init(t,s){const n=this,i=D("li > a",t),o=D("li > ul",t),a=(s=e(s,n.options)).classActive;this.setUpAccordion(t,i,o,s),!0===s.saveState&&n.checkCookie(s.cookie,t,a),!0===s.autoExpand&&D("li."+s.classExpand+" > a").addClass(a),i.click(e=>{const i=D(e.currentTarget),o=i.parent(),r=n.isSmall(e,t,s.smallClass);!0===s.disableLink&&i.siblings().length>0&&e.preventDefault(),!0===s.autoClose&&n.autoCloseAccordion(t,i,r,s),0===D("> ul",o).length?D("> a",o).addClass(a):"none"!==D("> ul",o).css("display")?(n.slideUp(D("ul",o),r,s),D("a",o).removeClass(a)):("none"===D(e.currentTarget).siblings().css("display")?n.slideDown(D(e.currentTarget).siblings().css("overflow","hidden"),r,s):n.slideUp(D(e.currentTarget).siblings(),r,s),D("> a",o).addClass(a)),!0===s.saveState&&n.createCookie(s.cookie,t,a)})}setUpAccordion(e,t,s,n){const i='<span class="'+n.classArrow+'"></span>',o=n.classParent+"-li";s.show(),D("li",e).each(e=>{D("> ul",e).length>0&&(D(e).addClass(o),D("> a",e).addClass(n.classParent).append(i))}),s.hide(),!0===n.showCount&&D("ul",e).each(e=>{D("> a",D(e).parent()).append(' <span class="'+n.classCount+'">('+e.children.length+")</span>")})}autoCloseAccordion(e,t,s,n){const i=this;D("ul",e).each(e=>{let o=!1;t.parents("ul").each(t=>{t===e&&(o=!0)}),o||t.siblings().elements[0]===e||"none"===e.style.display||i.slideUp(D(e),s,n)}),D("a",e).removeClass(n.classActive),t.parents("li").each(e=>{D("> a",e).addClass(n.classActive)})}checkCookie(e,t,s){const n=this,i=y(e);if(null!==i&&""!==i){const e=i.split(",");n.setActiveMenu(t,e,0,s)}}setActiveMenu(e,t,s,n){const i=D("li:eq("+t[s]+")",e),o=D("> a",i),a=o.siblings();o.addClass(n),a.css("display",""),t.length>s+1&&this.setActiveMenu(a,t,++s,n)}createCookie(e,t,s){let n=[];D("li a."+s,t).each(e=>{const t=D(e).parent().index();n.push(t.toString())}),b(e,n.join(","))}isSmall(e,t,s){return!(!D(t).hasClass(s)||0===D(e.currentTarget).siblings().length||(e.preventDefault(),0))}slideDown(e,t,s){t||e.slideDown(s.speed)}slideUp(e,t,s){t||e.slideUp(s.speed)}}class B{constructor(e,t){this.options={handlebars:null,bootstrap:null,airDatepicker:null,localeZh:null,template:"#tp-popover",templateItems:"#tp-popover-items",html:!0,title:"详细搜索",trigger:"click",toggle:"popover",placement:"auto",onSerach:!1,items:[],timepicker:!0,format:"yyyy-MM-dd hh:mm:ss"},this.itemsHtml="",this.itemsValue=[],this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.popoversearch")||n.data("be.popoversearch",e),void 0===window.Handlebars||(null==t?void 0:t.handlebars)||(t.handlebars=window.Handlebars),void 0===window.bootstrap||(null==t?void 0:t.bootstrap)||(t.bootstrap=window.bootstrap),void 0===window.AirDatepicker||(null==t?void 0:t.airDatepicker)||(t.airDatepicker=window.AirDatepicker),void 0===window.localeZh||(null==t?void 0:t.localeZh)||(t.localeZh=window.localeZh),e.init(s,t||e.options)})})}init(e,t){const s=this;this.itemsHtml="",this.itemsValue=[];const n=t.handlebars.compile(D(t.template).html())({}),i=new t.bootstrap.Popover(e,{html:t.html,title:t.title,trigger:t.trigger,toggle:t.toggle,placement:t.placement,template:n,animation:!0,content:""});e.addEventListener("inserted.bs.popover",()=>{s.addItem(t)}),e.addEventListener("shown.bs.popover",()=>{s.search(s,t),s.close(i),s.clear()}),e.addEventListener("hide.bs.popover",()=>{s.itemsHtml=D(".popover-content-items").html()||"",s.itemsValue=[],D(".popover-form-item").each(e=>{s.itemsValue.push(String(D(e).val()))})})}addItem(e){const t=this,s=D(".ce-popover > .popover-content .popover-content-items");if(t.itemsHtml)s.html(t.itemsHtml);else{const t=e.handlebars.compile(D(e.templateItems).html())({items:e.items});s.html(t)}D(".popover-form-item").each((s,n)=>{const i=D(s);if(void 0!==t.itemsValue[n]&&i.val(String(t.itemsValue[n])),i.hasClass("popover-form-date"))try{new e.airDatepicker(`.ce-popover input[name='${i.attr("name")}']`,{classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:e.timepicker,buttons:["today","clear"],locale:e.localeZh,dateFormat:t=>t.format(e.format)})}catch(e){D(`.ce-popover input[name='${i.attr("name")}']`).attr("type","date")}})}close(e){D(".ce-popover-cancel",".ce-popover").off("click").on("click",()=>{e.hide()})}clear(){D(".ce-popover-clear",".ce-popover").off("click").on("click",()=>{D(".popover-form-item",".ce-popover").each(e=>{D(e).val("")})})}getParam(){const e={};return D(".popover-form-item").each(function(t){const s=D(t),n=s.attr("name"),i=s.val();n&&i&&(e[n]=i)}),e}search(e,t){D(".ce-popover-ok",".ce-popover").off("click").on("click",()=>{t.onSerach&&t.onSerach({param:e.getParam()})})}}class U{constructor(e,t){this.options={animationDelay:5e3,lettersDelay:50,type:void 0},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.flash")||n.data("be.flash",e),e.init(s,t||e.options)})})}init(e,t){1===t.type&&D(e).addClass("letters"),this.singleLetters(e),this.animateHeadline(e,t)}singleLetters(e){const t=this;D(e).find("b").each(function(e){const s=D(e),n=s.text().split(""),i=s.hasClass("is-visible");for(const e in n)n.hasOwnProperty(e)&&(s.parents(t.selector).length>0&&(n[e]=`<em>${n[e]}</em>`),n[e]=i?`<i class='in'>${n[e]}</i>`:`<i>${n[e]}</i>`);const o=n.join("");s.html(o).css("opacity","1")})}animateHeadline(e,t){const s=this,n=t.animationDelay;D(e).each(function(e){const t=D(e);setTimeout(()=>{s.hideWord(t.find(".is-visible").first())},n)})}hideWord(e){const t=this,s=t.takeNext(e),n=e.children().length>=s.children().length;t.hideLetter(e.find("i").first(),e,n,t.options.lettersDelay),t.showLetter(s.find("i").first(),s,n,t.options.lettersDelay)}takeNext(e){return 0===e.length||e.is(":last-child")?e.parent().children().first():e.next()}hideLetter(e,t,s,n){const i=this;e.removeClass("in").addClass("out"),0===e.length||e.is(":last-child")?s&&setTimeout(()=>{i.hideWord(i.takeNext(t))},i.options.animationDelay):setTimeout(()=>{i.hideLetter(e.next(),t,s,n)},n)}showLetter(e,t,s,n){const i=this;e.addClass("in").removeClass("out"),0===e.length||e.is(":last-child")?s||setTimeout(()=>{i.hideWord(t)},i.options.animationDelay):setTimeout(()=>{i.showLetter(e.next(),t,s,n)},n)}}class Y{constructor(e,t,s){this.active=!0,this.pos=t,this.radius=s,this.options=e}draw(e){this.active&&(e.beginPath(),e.arc(this.pos.x,this.pos.y,this.radius,0,2*Math.PI,!1),e.fillStyle=`rgba(${this.options.pointColor},${this.active?.6:0})`,e.fill())}}class X{constructor(e,t){this.options={gsap:null,canvasId:"targetCanvas",animateHeader:!0,width:window.innerWidth,height:window.innerHeight,isWindowWidth:!1,isWindowHeight:!1,num:20,pointColor:"156,217,249",lineColor:"156,217,249"},this.animationFrameId=0,this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.lineeffect")||n.data("be.lineeffect",e),e.init(s,t||e.options)})})}init(e,t){if(!t.gsap||"function"!=typeof t.gsap.to)return void console.error('[LineEffect] Missing or invalid "gsap" dependency in options.');let s,n;s="number"==typeof t.width?t.width:"string"==typeof t.width?this.resolveDimension(t.width,"width"):window.innerWidth,n="number"==typeof t.height?t.height:"string"==typeof t.height?this.resolveDimension(t.height,"height"):window.innerHeight;const i={x:s/2,y:n/2},o=document.getElementById(t.canvasId);if(!o)return void console.error(`[LineEffect] Canvas with id "${t.canvasId}" not found.`);o.width=s,o.height=n;const a=o.getContext("2d"),r=[];for(let e=0;e<s;e+=s/t.num)for(let i=0;i<n;i+=n/t.num){let o=e+Math.random()*s/t.num,a=i+Math.random()*n/t.num,l={x:o,originX:o,y:a,originY:a,active:0,closest:[],circle:null};r.push(l)}for(let e=0;e<r.length;e++){const t=[],s=r[e];for(let e=0;e<r.length;e++){let n=r[e];if(s!==n){let e=!1;for(let s=0;s<5;s++)e||void 0===t[s]&&(t[s]=n,e=!0);for(let i=0;i<5;i++)e||this.getDistance(s,n)<this.getDistance(s,t[i])&&(t[i]=n,e=!0)}}s.closest=t}for(let e in r)r.hasOwnProperty(e)&&(r[e].circle=new Y(t,r[e],2+2*Math.random()));t.points=r,this.initAnimation(t,a,i,s,n),this.addListeners(t,i,o)}resolveDimension(e,t){if(e.endsWith("%")){const s=parseFloat(e);return"width"===t?s/100*window.innerWidth:s/100*window.innerHeight}if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("vw"))return parseFloat(e)/100*window.innerWidth;if(e.endsWith("vh"))return parseFloat(e)/100*window.innerHeight;if(e.endsWith("rem")||e.endsWith("em")){const t=document.createElement("div");t.style.position="absolute",t.style.visibility="hidden",t.style.fontSize=e,document.body.appendChild(t);const s=parseFloat(getComputedStyle(document.documentElement).fontSize);if(document.body.removeChild(t),e.endsWith("rem"))return parseFloat(e)*s;if(e.endsWith("em"))return parseFloat(e)*s}return parseFloat(e)||0}getDistance(e,t){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)}initAnimation(e,t,s,n,i){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.animate(e,t,s,n,i);for(let t in e.points)e.points.hasOwnProperty(t)&&this.shiftPoint(e.points[t])}animate(e,t,s,n,i){if(e.animateHeader){const o=e.points;t.clearRect(0,0,n,i);for(let n in o)if(o.hasOwnProperty(n)){const i=Math.abs(this.getDistance(s,o[n]));i<4e3?(o[n].active=.3,o[n].circle.active=!0):i<2e4?(o[n].active=.1,o[n].circle.active=!0):i<4e4?(o[n].active=.02,o[n].circle.active=!0):(o[n].active=0,o[n].circle.active=!1),this.drawLines(e,o[n],t),o[n].circle.draw(t)}}this.animationFrameId=requestAnimationFrame(()=>this.animate(e,t,s,n,i))}shiftPoint(e){this.options.gsap.to(e,{duration:1+Math.random(),x:e.originX-50+100*Math.random(),y:e.originY-50+100*Math.random(),ease:"circ.inOut",onComplete:()=>this.shiftPoint(e)})}drawLines(e,t,s){var n;if(t.active)for(let i in t.closest)(null===(n=t.closest)||void 0===n?void 0:n.hasOwnProperty(i))&&(s.beginPath(),s.moveTo(t.x,t.y),s.lineTo(t.closest[i].x,t.closest[i].y),s.strokeStyle=`rgba(${e.lineColor},${t.active})`,s.stroke())}addListeners(e,t,s){this.removeListeners(),this.boundMouseMove=e=>this.mouseMove(e,t),this.boundScroll=()=>this.scrollCheck(e),this.boundResize=()=>this.resize(e,s),document.getElementById(this.options.canvasId)?("ontouchstart"in window||window.addEventListener("mousemove",this.boundMouseMove),window.addEventListener("scroll",this.boundScroll),window.addEventListener("resize",this.boundResize)):("ontouchstart"in window||window.removeEventListener("mousemove",this.boundMouseMove),window.removeEventListener("scroll",this.boundScroll),window.removeEventListener("resize",this.boundResize))}removeListeners(){this.boundMouseMove&&window.removeEventListener("mousemove",this.boundMouseMove),this.boundScroll&&window.removeEventListener("scroll",this.boundScroll),this.boundResize&&window.removeEventListener("resize",this.boundResize)}mouseMove(e,t){const s=document.getElementById(this.options.canvasId);if(s){const n=s.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft,a=n.top+i,r=n.left+o;let l=0,c=0;e.pageX||e.pageY?(l=e.pageX,c=e.pageY):(e.clientX||e.clientY)&&(l=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t.x=l-r,t.y=c-a}}scrollCheck(e){e.animateHeader=document.body.scrollTop<=("number"==typeof e.height?e.height:window.innerHeight)}resize(e,t){var s,n;if(e.isWindowWidth)if("string"==typeof e.width){const s=this.resolveDimension(e.width,"width");t.width=s}else t.width=null!==(s=e.width)&&void 0!==s?s:window.innerWidth;if(e.isWindowHeight)if("string"==typeof e.height){const s=this.resolveDimension(e.height,"height");t.height=s}else t.height=null!==(n=e.height)&&void 0!==n?n:window.innerHeight}destroy(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.removeListeners()}}const _="ce-slideFromTop",Z="ce-slideFromRight",V="ce-slideFromBottom",Q="ce-slideFromLeft",J="ce-slideTop",G="ce-slideLeft";class K{constructor(e,t){this.options={reverse:!1},this.selector=e,T(this,e,t,e=>{e.elements.forEach(s=>{let n=D(s);n.data("be.hoverdir")||n.data("be.hoverdir",e),e.init(s,t||e.options)})})}init(e,t){const s=D(e);s.on("mouseenter",e=>this.mouseEvent(e,t)),s.on("mouseleave",e=>this.mouseEvent(e,t))}mouseEvent(e,t){const s=D(e.currentTarget),n=e.type,i=s.find("div"),o=this.getDir(s,{x:e.pageX,y:e.pageY}),a=this.getClasses(o,t);i.removeClass(),"mouseenter"===n?setTimeout(()=>{i.css("display","none").addClass(a.from),i.show(15,e=>{D(e).addClass(a.to)})},15):i.addClass(a.from)}getDir(e,t){const s=e.width(),n=e.height(),i=(t.x-e.offset().left-s/2)*(s>n?n/s:1),o=(t.y-e.offset().top-n/2)*(n>s?s/n:1);return Math.round((Math.atan2(o,i)*(180/Math.PI)+180)/90+3)%4}getClasses(e,t){let s,n;switch(e){case 0:s=t.reverse?V:_,n=J;break;case 1:s=t.reverse?Q:Z,n=G;break;case 2:s=t.reverse?_:V,n=J;break;case 3:s=t.reverse?Z:Q,n=G;break;default:s="",n=""}return{from:s,to:n}}}class ee{constructor(e){this.options={times:20,time:1e3},this.jsLoaded=[],this.cssLoaded=[],this.options=Object.assign(Object.assign({},this.options),e)}loadScript(e){const t=this;return new Promise((s,n)=>{if(t.jsLoaded.find(t=>t.url===e)){let n,i=0;const o=setInterval(()=>{n=t.jsLoaded.find(t=>t.url===e);try{if(!(null==n?void 0:n.isLoaded)&&i>t.options.times)return t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),n&&n.script.parentNode===document.body&&document.body.removeChild(n.script),void clearInterval(o);if(null==n?void 0:n.isLoaded)return clearInterval(o),void s(n.script);i++}catch(e){console.error(e)}},t.options.time)}else{const i=document.createElement("script");let o=!1,a=0;t.jsLoaded=[...t.jsLoaded,{script:i,url:e,isLoaded:!1,count:0}],i.src=e,i.onload=()=>{t.jsLoaded=t.jsLoaded.map(t=>t.url===e?Object.assign(Object.assign({},t),{isLoaded:!0}):t),o=!0,s(i)},i.onerror=()=>{t.jsLoaded=t.jsLoaded.filter(t=>t.url!==e),n(new Error("Script load error for "+e))},document.body.appendChild(i);const r=setInterval(()=>{if(!o)return a>t.options.times?(i.parentNode===document.body&&document.body.removeChild(i),void clearInterval(r)):void a++;clearInterval(r)},100)}})}loadStyle(e){const t=this;return new Promise((s,n)=>{const i=document.getElementsByTagName("link");for(let t=0;t<i.length;t++)if(i[t].getAttribute("href")===e)return void s(i[t]);const o=document.createElement("link");o.href=e,o.rel="stylesheet",o.type="text/css",o.onload=()=>s(o),o.onerror=()=>n(new Error("Style load error for "+e)),document.head.appendChild(o),t.cssLoaded.push(o)})}destroy(){this.jsLoaded.forEach(e=>{e.script&&e.script.parentNode===document.body&&document.body.removeChild(e.script)}),this.cssLoaded.forEach(e=>{e.parentNode===document.head&&document.head.removeChild(e)}),this.jsLoaded=[],this.cssLoaded=[]}}function te(e,t){let s={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}function se(e,t,s){let n=e.slice((s||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n)}function ne(e){let t=[],s=[...e];s.sort();for(let e=0;e<s.length;e++)s[e]!==s[e+1]&&(t[t.length]=s[e]);return t}function ie(e){void 0!==e&&(e.registerHelper("if",function(e,t,s){return e===t?s.fn(this):s.inverse(this)}),e.registerHelper("lt",function(e,t,s){return e<t?s.fn(this):s.inverse(this)}),e.registerHelper("rt",function(e,t,s){return e>t?s.fn(this):s.inverse(this)}),e.registerHelper("lte",function(e,t,s){return e<=t?s.fn(this):s.inverse(this)}),e.registerHelper("rte",function(e,t,s){return e>=t?s.fn(this):s.inverse(this)}))}function oe(e,t,s){t.forEach((t,n)=>{const i=s[n];document.querySelectorAll(t).forEach(t=>{const s=t._bsTooltip;s&&s.dispose(),t.setAttribute("data-bs-title",i),t.setAttribute("data-bs-toggle","tooltip"),t.setAttribute("data-bs-custom-class","be-tooltip"),new e(t)})})}function ae(t="info",s=3,n="ice"){let i;if("number"==typeof n)switch(n){case 1:i="flat";break;case 2:i="future";break;case 3:i="block";break;case 4:i="air";break;default:i="ice"}else i=n;const o=e({type:t,classes:s,theme:i},{type:"info",classes:3,theme:"ice"});let a;switch(o.classes){case 1:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-left`;break;case 2:default:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top`;break;case 3:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-top messenger-on-right`;break;case 4:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-right`;break;case 5:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom`;break;case 6:a=`messenger-fixed messenger-theme-${o.theme} messenger-on-bottom messenger-on-left`}window.Messenger.options={extraClasses:a,theme:o.theme}}function re(e,t="info",s=3,n="ice"){ae(t,s,n),window.Messenger().post({message:e,type:t,hideAfter:5,showCloseButton:!0})}function le(e,t,s,n=3,i="ice"){window.Messenger().hideAll(),ae("info",n,i),window.Messenger().post({message:e,actions:{retry:{label:t,phrase:"",auto:!1,delay:10,action:function(){window.Messenger().hideAll(),s()}},cancel:{label:"取消",action:function(){return window.Messenger().hideAll(),!1}}}})}function ce(t,s,n){return new t((n=e(n||{},{target:"#airDatepicker",classes:"fm-datepicker",autoClose:!0,inline:!1,timepicker:!0,buttons:["today","clear"],locale:s,dateFormat:e=>te(e,"yyyy年MM月dd日 hh:mm:ss")})).target,n)}function de(t,s){s=e(s||{},{focusFirstField:!1,validationEventTrigger:"click",promptPosition:"topRight"}),t.validationEngine(s)}function he(t,s="validate",n){const i=e({command:s,options:n},{command:"validate",options:n});return t.validationEngine(i.command,i.options)}function ue(e){const{winRate:t,odds:s,fraction:n=1}=e;if(t<0||t>1||s<=0)throw new Error("参数错误:胜率必须在 0-1 之间,且赔率必须大于 0");const i=(s*t-(1-t))/s;return Math.max(0,i*n)}function me(e){const t={id:e.id,name:e.name,menus:e.menu};localStorage.setItem("user",JSON.stringify(t)),localStorage.setItem("token",e.token)}function pe(){return new Promise(e=>{localStorage.removeItem("user"),localStorage.removeItem("token"),e()})}function fe(){const e=localStorage.getItem("user");if(!e)return null;try{return JSON.parse(e)}catch(e){return localStorage.removeItem("user"),null}}function ge(){return localStorage.getItem("token")}function ve(e){localStorage.setItem("token",e)}const be=D;export{W as AeLoader,I as Base,j as BtnEf,U as Flash,N as GoTop,K as HoverDir,R as IAccordion,z as IList,ee as ILoader,F as IPagination,O as ItemCount,X as LineEffect,q as NiceSelect,B as PopoverSearch,H as SubmitFlag,u as ajax,re as al,se as arrayRemove,ne as arrayUnique,$ as cache,ue as calculateKellyFraction,t as camelCase,le as cf,S as contextQuerySelector,c as contrast,h as createElement,L as dataAttr,ce as datepicker,be as default,T as defaultConstructor,l as different,M as elementData,P as expando,e as extend,te as formatDate,y as getCookie,m as getParam,ge as getToken,fe as getUser,ie as handlebars,v as hotkey,A as isEqSelector,d as isHtmlTag,i as isNull,a as isObject,g as keys,s as l,me as login,pe as logout,C as menu,k as menu2Tree,ae as messageInit,p as move,w as removeCookie,r as same,x as search,b as setCookie,o as setDefault,ve as setToken,E as shuffleArray,f as strValidation,oe as tip,n as toRound,he as validate,de as validationEngine};
|