asai-vue-host 0.2.6 → 0.2.8

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.
@@ -661,7 +661,7 @@ const wt = {
661
661
  cmPageList: [],
662
662
  dbtype: "file"
663
663
  }, o().then((Z) => {
664
- Z && typeof Z == "object" && a[e.opt.channel] ? (Object.assign(a[e.opt.channel], Z), a[e.opt.channel].lang = a[e.opt.channel]?.lang?.[n.config.lang] || a[e.opt.channel]?.lang?.default || n.lang?.[e.opt.channel], a[e.opt.channel].lang?.classtemp && (n.location?.query && !a[e.opt.channel].lang.class.asai && (n.location.query.fl = Object.keys(
664
+ Z && typeof Z == "object" && a[e.opt.channel] ? (Object.assign(a[e.opt.channel], Z), a[e.opt.channel].lang = a[e.opt.channel]?.lang?.[n.config.lang] || a[e.opt.channel]?.lang?.default || n.lang?.[e.opt.channel], a[e.opt.channel].lang?.classtemp && a[e.opt.channel].lang?.class && (n.location?.query && !a[e.opt.channel].lang.class?.asai && (n.location.query.fl = Object.keys(
665
665
  a[e.opt.channel].lang.class
666
666
  )[0]), Object.keys(
667
667
  a[e.opt.channel].lang.class
@@ -675,12 +675,12 @@ const wt = {
675
675
  a[e.opt.channel].lang.class
676
676
  ).map((ee) => [
677
677
  ee,
678
- a[e.opt.channel].lang.class[ee].nm
678
+ a[e.opt.channel].lang.class?.[ee]?.nm
679
679
  ])
680
680
  )), Object.keys(
681
681
  a[e.opt.channel].rfdata.rule
682
682
  ).forEach((ee) => {
683
- a[e.opt.channel].rfdata.rule?.[ee]?.[ee + "data"] && typeof a[e.opt.channel].rfdata.rule?.[ee]?.[ee + "data"] == "string" && (a[e.opt.channel].rfdata.rule[ee][ee + "data"] = a[e.opt.channel].lang[a[e.opt.channel].rfdata.rule[ee][ee + "data"]]);
683
+ a[e.opt.channel].rfdata.rule?.[ee]?.[ee + "data"] && typeof a[e.opt.channel].rfdata.rule?.[ee]?.[ee + "data"] == "string" && (a[e.opt.channel].rfdata.rule[ee][ee + "data"] = a[e.opt.channel].lang[a[e.opt.channel].rfdata.rule[ee]?.[ee + "data"]]);
684
684
  }), a[e.opt.channel]?.cfg?.single || (a[e.opt.channel].rfdata.lang = {
685
685
  ...a[e.opt.channel].rfdata.lang,
686
686
  ...n.lang.asaichannel?.form || {},
@@ -1163,7 +1163,7 @@ const wt = {
1163
1163
  );
1164
1164
  for (let $ = 0; $ < S.length; $++) {
1165
1165
  const w = S[$];
1166
- w[a[e.opt.channel].cfg.imex.keys[7]] && C !== w[a[e.opt.channel].cfg.imex.keys[7]] && (C = w[a[e.opt.channel].cfg.imex.keys[7]], y += `${n.data.asai.rulechanneltobook.bkclass}${a[e.opt.channel].lang.class[C]?.nm || ""}${n.data.asai.rulechanneltobook.bksn}${C}${n.data.asai.rulechanneltobook.bkty}1${n.data.asai.rulechanneltobook.bktm}${n.data.asai.rulechanneltobook.bktg}${n.data.asai.rulechanneltobook.bkds}`), y += `${n.data.asai.rulechanneltobook.bklist}${_(w, 0)}`;
1166
+ w[a[e.opt.channel].cfg.imex.keys[7]] && C !== w[a[e.opt.channel].cfg.imex.keys[7]] && (C = w[a[e.opt.channel].cfg.imex.keys[7]], y += `${n.data.asai.rulechanneltobook.bkclass}${a[e.opt.channel].lang.class?.[C]?.nm || ""}${n.data.asai.rulechanneltobook.bksn}${C}${n.data.asai.rulechanneltobook.bkty}1${n.data.asai.rulechanneltobook.bktm}${n.data.asai.rulechanneltobook.bktg}${n.data.asai.rulechanneltobook.bkds}`), y += `${n.data.asai.rulechanneltobook.bklist}${_(w, 0)}`;
1167
1167
  const x = _(w, 1);
1168
1168
  y += `${n.data.asai.rulechanneltobook.bksn}${x}`, y += `${n.data.asai.rulechanneltobook.bkty}${_(w, 2)}${n.data.asai.rulechanneltobook.bktm}${_(w, 3)}${n.data.asai.rulechanneltobook.bktg}${_(
1169
1169
  w,
@@ -1,4 +1,4 @@
1
- (function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H["asai-vue-host"]={},H.Vue))})(this,(function(H,e){"use strict";const Z=Object.freeze(Object.defineProperty({__proto__:null,get default(){return rr}},Symbol.toStringTag,{value:"Module"})),ke=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){if(typeof o.value=="function"){let n=0;const a=300,s=l=>{const r=performance.now();r-n<a?(o.value(l),n=0):n=r};t.__dbPointerDownHandler=s,t.addEventListener("pointerdown",s)}},unmounted(t){const o=t.__dbPointerDownHandler;o&&(t.removeEventListener("pointerdown",o),delete t.__dbPointerDownHandler)}}},Symbol.toStringTag,{value:"Module"}));function K(t,o){function n(h,C){C?.classList?.contains(h)&&C.classList.remove(h)}function a(h,C){C?.classList?.contains(h)||C.classList.add(h)}function s(h){a("touch-none",h)}function l(h){n("touch-none",h)}function r(h){const C=window.event||h;return C?.preventDefault(),C?.stopPropagation(),!0}function i(h){const C=window.event||h;C.cancelable&&(C?.preventDefault(),C?.stopPropagation())}function d(h){o.timeout||(o.timeout=requestAnimationFrame(()=>{h(),cancelAnimationFrame(o.timeout),o.timeout=null}))}function c(){o.timeout&&(cancelAnimationFrame(o.timeout),o.timeout=null)}function m(){return"ontouchstart"in window||navigator.maxTouchPoints}function f(h){m()&&o.touchstat!==1&&(h.addEventListener("touchstart",g,!0),o.touchstat=1)}function p(h){m()&&o.touchstat!==2&&(h.addEventListener("touchmove",r),s(h),o.touchstat=2)}function y(h){m()&&o.touchstat!==3&&(h.removeEventListener("touchmove",r),l(h),o.touchstat=3)}function g(h){document.body.addEventListener("touchmove",u),document.body.addEventListener("touchend",$),o.dragttm=Date.now()}function u(h){o.dragttm&&Date.now()-o.dragttm<1e3&&(o.dragtstat=2)}function $(h){document.body.removeEventListener("touchmove",u),document.body.removeEventListener("touchend",$),o.dragtstat=0}return{eStop:r,canTouch:m,eStopTouch:i,setTouchNone:s,setTouchAuto:l,fnPThrottle:d,fnPThrottleCancel:c,vtTouchInit:f,vtTouchDown:p,vtTouchUp:y}}const $e=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n={},{fnPThrottle:a,fnPThrottleCancel:s,vtTouchInit:l,vtTouchDown:r,vtTouchUp:i}=K(t,o.value);l(t);let d=!1,c=0,m=0,f=0,p=0;typeof o.value.domarea=="string"?n.dragAreaDom=document.getElementById(o.value.domarea):n.dragAreaDom=t;const y=$=>{console.log("handleDown",n,$),r(t),d=!0;const h=n.dragAreaDom.getBoundingClientRect();n.dragAreaDom.style.position="absolute",n.dragAreaDom.style.transform=`translate(${h.x}px, ${h.y}px)`,c=$.clientX-h.x,m=$.clientY-h.y,t.style.cursor="grabbing",document.addEventListener("pointermove",g),document.addEventListener("pointerup",u)},g=$=>{a(()=>{if(d){f=$.clientX-c,p=$.clientY-m;const h=window.innerWidth-n.dragAreaDom.offsetWidth,C=window.innerHeight-n.dragAreaDom.offsetHeight;f=Math.max(0,Math.min(f,h)),p=Math.max(0,Math.min(p,C)),n.dragAreaDom.style.transform=`translate(${f}px, ${p}px)`}})},u=()=>{s(),d=!1,t.style.cursor="grab",i(t),document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",u)};t.addEventListener("pointerdown",y),t.unmounted=()=>{t.removeEventListener("pointerdown",y)}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Ce=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);let i=!1,d={x:0,y:0},c={x:0,y:0},m=null,f=1,p={};p.dragDom=(o.value?.dom?document.getElementById(o.value.dom):"")||t;const y=()=>p.dragMaskDom&&(o.value?.scale||o.value?.ujt?.$global?.scale)||1,g=b=>{if(p.dragAreaDom=(o.value?.domarea?document.getElementById(o.value.domarea):"")||p.dragDom,p.dragMaskDom=(o.value?.dommask?document.getElementById(o.value.dommask):"")||(o.value?.ujt?.$global?.sys?.zoomid?document.getElementById(o.value.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body,!p.dragMaskDom)return;l(t),b.preventDefault(),f=y(),o.value?.gameevents?.fndown&&typeof o.value.gameevents.fndown=="function"&&o.value.gameevents.fndown(b)?.(),c={...o.value.pos},i=!0,m=p.dragMaskDom.getBoundingClientRect();let k,w;k=b.clientX,w=b.clientY,d={x:(k-m.left)/f-c.x,y:(w-m.top)/f-c.y},p.dragDom.setPointerCapture(b.pointerId),document.addEventListener("pointermove",u),document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h)},u=b=>{if(!i||!m)return;let k,w;k=b.clientX,w=b.clientY,f=y();const _=(k-m.left)/f-d.x,j=(w-m.top)/f-d.y,B=p.dragMaskDom.offsetWidth-p.dragAreaDom.offsetWidth,S=p.dragMaskDom.offsetHeight-p.dragAreaDom.offsetHeight;n(()=>{o.value.pos.x=+Math.max(0,Math.min(_,B)).toFixed(3),o.value.pos.y=+Math.max(0,Math.min(j,S)).toFixed(3)})},$=(b,k,w=null)=>{let _;p.dropDom=document.getElementById("box-"+k);const j=p.dropDom?.getBoundingClientRect();return j&&(_=b.left<j.right&&b.right>j.left&&b.top<j.bottom&&b.bottom>j.top,_&&o.value.gameevents.fnup(w)?.({dropid:k})),_},h=b=>{if(a(),r(t),b instanceof PointerEvent&&p.dragDom.hasPointerCapture(b.pointerId)&&(i=!1,p.dragDom.releasePointerCapture(b.pointerId)),o.value?.gameevents?.fnup&&typeof o.value.gameevents.fnup=="function"){let k;if(o.value?.gameevents?.params?.domev?.length){const w=p.dragDom.getBoundingClientRect();o.value.gameevents.params.domev.forEach(_=>{k||(k=$(w,_,b))})}!k&&o.value?.gameevents?.params?.typedrop==2&&(o.value.pos.x=c.x,o.value.pos.y=c.y)}document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)};p.dragDom.addEventListener("pointerdown",g);const C=()=>m=null;window.addEventListener("resize",C),t.unmounted=()=>{p.dragDom.removeEventListener("pointerdown",g),window.removeEventListener("resize",C),p=null}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),we=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);let i=!1,d={x:0,y:0},c={x:0,y:0},m=null,f=1,p={};p.dragDom=(o.value?.dom?document.getElementById(o.value.dom):"")||t;const y=()=>p.dragMaskDom&&(o.value?.scale||o.value?.ujt?.$global?.scale)||1,g=C=>{if(p.dragAreaDom=(o.value?.domarea?document.getElementById(o.value.domarea):"")||p.dragDom,p.dragMaskDom=(o.value?.dommask?document.getElementById(o.value.dommask):"")||(o.value?.ujt?.$global?.sys?.zoomid?document.getElementById(o.value.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body,!p.dragMaskDom)return;if(l(t),C.preventDefault(),f=y(),o.value?.events?.fndown&&typeof o.value.events.fndown=="function"&&o.value.events.fndown(),o.value?.pos)c={...o.value.pos};else{const _=window.getComputedStyle(p.dragAreaDom).transform?.split(", ");if(_.length>2){const j=_.pop().slice(0,-1)||0,B=_.pop()||0;c={x:parseFloat(B),y:parseFloat(j)}}else c={x:0,y:0}}i=!0,m=p.dragMaskDom.getBoundingClientRect();let b,k;b=C.clientX,k=C.clientY,d={x:(b-m.left)/f-c.x,y:(k-m.top)/f-c.y},p.dragDom.setPointerCapture(C.pointerId),document.addEventListener("pointermove",u),document.addEventListener("pointerup",$),document.addEventListener("pointercancel",$)},u=C=>{if(!i||!m)return;let b,k;b=C.clientX,k=C.clientY,f=y();const w=(b-m.left)/f-d.x,_=(k-m.top)/f-d.y,j=p.dragMaskDom.offsetWidth-p.dragAreaDom.offsetWidth,B=p.dragMaskDom.offsetHeight-p.dragAreaDom.offsetHeight;n(()=>{o.value.pos?(o.value.pos.x=+Math.max(0,Math.min(w,j)).toFixed(3),o.value.pos.y=+Math.max(0,Math.min(_,B)).toFixed(3)):p.dragAreaDom.style.transform=`translate(${+Math.max(0,Math.min(w,j)).toFixed(3)}px,${+Math.max(0,Math.min(_,B)).toFixed(3)}px)`})},$=C=>{a(),r(t),C instanceof PointerEvent&&p.dragDom.hasPointerCapture(C.pointerId)&&(i=!1,p.dragDom.releasePointerCapture(C.pointerId)),document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",$),document.removeEventListener("pointercancel",$)};p.dragDom.addEventListener("pointerdown",g);const h=()=>m=null;window.addEventListener("resize",h),t.unmounted=()=>{p.dragDom.removeEventListener("pointerdown",g),window.removeEventListener("resize",h),p=null}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"}));function je(t){const o=window.event||t;o.preventDefault(),o.stopPropagation()}const Se=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){function n(a){o.value.type===2&&je(a);const s=document.getElementById(o.value.dom);s&&(s.classList.contains("as-fullscreen")?s.classList.remove("as-fullscreen"):s.classList.add("as-fullscreen"))}o.value.type===2?t.addEventListener("dblclick",n):t.addEventListener("click",n)}}},Symbol.toStringTag,{value:"Module"})),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n={},{$global:a,$model:s}=o.value?.ujt||{};if(a?.sys?.onkeyboard){let l=function(){a.keyboard.params||(a.keyboard.params={})},r=function(y){y?.setAttribute("inputmode","none"),y?.style?.setProperty("ime-mode","disabled","important")},i=function(y){y?.removeAttribute("inputmode"),y?.style?.setProperty("ime-mode","normal","important")},d=function(y){r(y),a.keyboard.params.ot&&(a.keyboard.params.ot.fndscb=()=>{i(y),a.keyboard.params.ot.fndscb=null})},c=function(y){n.monacoDom=y.target.closest(".askey-luaeditor"),n.monacoDivDom=n.monacoDom.querySelector(".native-edit-context"),d(n.monacoDivDom),n.monacoHoverDom=n.monacoDom.querySelector(".monaco-hover"),d(n.monacoHoverDom),n.monacoTextareaDom=n.monacoDom.querySelector("textarea"),d(n.monacoTextareaDom)},m=function(y){return s.data.asai.keyboard?.nokeytypes?.some(g=>y.target?.closest(g))},f=function(y){return Object.keys(s.data.asai.keyboard?.askeytypes||{})?.find(g=>y.target?.closest(g))},p=function(y){if(a.keyboard.params?.ot?.fnnumcb?.(),a.keyboard.params?.ot?.fndscb?.(),l(),o.value?.auto&&(a.keyboard.areastyle.x=y.clientX+(o.value?.auto?.x||0),a.keyboard.areastyle.y=y.clientY+(o.value?.auto?.y||0)),a.keyboard.params.ot={},!m(y))if(y.target?.closest(".portaskeyboard"))a.keyboard.params.ot.portaskeyboard=!0;else if(y.target?.closest(".askey-luaeditor"))c(y),o.value?.style&&(a.keyboard.params.ot.style=o.value.style),Object.assign(a.keyboard.params,{type:"monaco",el:n.monacoTextareaDom}),a.keyboard.showkeyboard=".askey-luaeditor";else if(["textarea","text","number","password"].includes(y.target?.type)&&!y.target?.disabled){if(n.monacoDivDom=y.target,d(n.monacoDivDom),n.monacoDivDom.type==="number"){a.keyboard.showkeyboard=".askey-number",a.keyboard.params.ot.isnumber=!0,n.monacoDivDom.type="text";let g=requestAnimationFrame(()=>{n.monacoDivDom.setSelectionRange(n.monacoDivDom?.value?.length||0,n.monacoDivDom?.value?.length||0),n.monacoDivDom.focus(),cancelAnimationFrame(g)});a.keyboard.params.ot.fnnumcb=()=>{n.monacoDivDom.type="number"}}else{const g=f(y);g?a.keyboard.showkeyboard=g:a.keyboard.showkeyboard=".askey-default"}o.value?.style&&(a.keyboard.params.ot.style=o.value.style),Object.assign(a.keyboard.params,{type:n.monacoDivDom.type,el:n.monacoDivDom||t})}else a.keyboard.params={},a.keyboard.showkeyboard=""};l(),t.addEventListener("pointerdown",p),t.unmounted=()=>{t.removeEventListener("pointerdown",p)}}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Be=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){o?.value?.right||t?.classList&&!t.classList?.contains("asailevel")&&t.classList.add("asailevel")}}},Symbol.toStringTag,{value:"Module"})),Ve=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{vtTouchInit:n,vtTouchDown:a,vtTouchUp:s}=K(t,o.value);n(t);const l=o.value.long?+o.value.long:0;let r=null,i=!1,d=0,c=0;const m=10,f=u=>{a(t),o.value.prevent&&u.preventDefault(),i=!0,u?.touches?.[0]?(d=u.touches[0].clientX,c=u.touches[0].clientY):(d=u.clientX,c=u.clientY),o.value.press&&o.value.press(u);function $(){i&&o.value.hold&&o.value.hold(u)}l?r=window.setTimeout($,l):$()},p=u=>{s(t),r!==null&&(clearTimeout(r),r=null),i&&(o.value.release&&o.value.release(u),i=!1)},g={down:f,up:p,move:u=>{if(!i)return;let $=0,h=0;u?.touches?.[0]?($=u.touches[0].clientX,h=u.touches[0].clientY):($=u.clientX,h=u.clientY);const C=Math.abs($-d),b=Math.abs(h-c);(C>m||b>m)&&(r!==null&&(clearTimeout(r),r=null),i=!1)}};t.addEventListener("pointerdown",f),t.addEventListener("pointerup",p),t.addEventListener("pointercancel",p),t.addEventListener("pointerleave",p),t._pressHandlers=g},unmounted(t){const o=t._pressHandlers;o&&(t.removeEventListener("pointerdown",o.down),t.removeEventListener("pointerup",o.up),t.removeEventListener("pointercancel",o.up),t.removeEventListener("pointerleave",o.up),delete t._pressHandlers)}}},Symbol.toStringTag,{value:"Module"})),xe=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n=o.value||{};n?.domresize?n.Ddomresize=document.getElementById(n.domresize):n.Ddomresize=t,n.Ddomarea=(n?.domarea?document.getElementById(n.domarea):"")||(n?.ujt?.$global?.sys?.zoomid?document.getElementById(n.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body;const{width:a,height:s}=n.Ddomarea.getBoundingClientRect(),{fnPThrottle:l,fnPThrottleCancel:r,vtTouchInit:i,vtTouchDown:d,vtTouchUp:c}=K(n.Ddomresize,n);i(n.Ddomresize);const{ujt:m,size:f,scale:p}=n;let y={x:0,y:0},g;const u=()=>p||m?.$global?.scale||1;let $;a&&s?$={width:a/u(),height:s/u()}:$={width:m?.$global?.sys?.zoomwidth||1920,height:m?.$global?.sys?.zoomheight||1200};let h=!1,C,b,k,w,_=f||{w:0,h:0};const j=V=>({clientX:V.clientX,clientY:V.clientY}),B=V=>{d(n.Ddomresize),V.preventDefault(),g=u(),h=!0;const{clientX:x,clientY:N}=j(V);C=x-window.scrollX,b=N-window.scrollY,k=n.Ddomresize.offsetWidth,w=n.Ddomresize.offsetHeight;const M=window.getComputedStyle(n.Ddomresize).transform?.split(", ");if(M&&M.length>2){const U=M.pop().slice(0,-1),I=M.pop();y={x:parseFloat(I),y:parseFloat(U)}}else y={x:0,y:0};if(n.Ddomresize.style.transform=`translate(${y.x}px,${y.y}px)`,V instanceof PointerEvent)try{n.Ddomresize.setPointerCapture(V.pointerId)}catch{}document.addEventListener("pointermove",S),document.addEventListener("pointerup",E),document.addEventListener("pointercancel",E)},S=V=>{h&&l(()=>{const{clientX:x,clientY:N}=j(V),D=(x-window.scrollX-C)/g,M=(N-window.scrollY-b)/g;_.w=+Math.min(Math.max(88,k+D),$.width-y.x).toFixed(3),_.h=+Math.min(Math.max(58,w+M),$.height-y.y).toFixed(3),n.Ddomresize.style.width=_.w+"px",n.Ddomresize.style.height=_.h+"px"})},E=V=>{r(),c(n.Ddomresize),V instanceof PointerEvent&&n.Ddomresize.hasPointerCapture(V.pointerId)&&n.Ddomresize.releasePointerCapture(V.pointerId),h=!1,document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",E),document.removeEventListener("pointercancel",E)};n.domresizex==""||n.domresizex=="asai"?n.DXdomresize=t:(n.domresizex&&(n.DXdomresize=document.getElementById(n.domresizex)),n.DXdomresize||(n.DXdomresize=document.createElement("div"),n.DXdomresize.classList.add("resize-bottom-right"),n.Ddomresize.appendChild(n.DXdomresize))),n.DXdomresize.addEventListener("pointerdown",B),t.unmounted=()=>{n.DXdomresize.removeEventListener("pointerdown",B),n.DXdomresize&&n.DXdomresize.remove()}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Ne=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);const{ujt:i,scale:d,id:c,type:m,cut:f,min:p}=o.value,y=()=>d||i?.$global?.scale||1,g={width:i?.$global?.sys?.zoomwidth||1920,height:i?.$global?.sys?.zoomheight||1200};let u=f||0;m?g.height=g.height-u:g.width=g.width-u;function $(){return typeof p=="function"?p():typeof p?.value=="number"?p?.value:typeof p=="number"?p:100}let h,C=1,b=!1,k=0,w=0,_=0,j=0;const B=x=>{if(h=document.getElementById(c),!h){console.error(`未找到 ID 为 ${c} 的元素`);return}l(t),x.preventDefault(),C=y(),b=!0,m?(_=x.clientY,j=h.offsetHeight):(k=x.clientX,w=h.offsetWidth),document.addEventListener("pointermove",S),document.addEventListener("pointerup",E)},S=x=>{b&&n(()=>{if(m){const N=(_-x.clientY)/C,D=Math.max($(),j+N);h.style.height=Math.min(D,g.height)+"px",h.style.minHeight=Math.min(D,g.height)+"px"}else{const N=(k-x.clientX)/C,D=Math.max($(),w+N);h.style.width=Math.min(D,g.width)+"px",h.style.minWidth=Math.min(D,g.width)+"px"}})},E=()=>{a(),b=!1,r(t),document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",E)};t.addEventListener("pointerdown",B);const V=()=>{t.removeEventListener("pointerdown",B)};t.__unmountResize=V},unmounted(t){t.__unmountResize&&(t.__unmountResize(),delete t.__unmountResize)}}},Symbol.toStringTag,{value:"Module"})),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t){t.scrollTop=t.scrollHeight;const o={autoScrollEnabled:!0,handler:()=>{const n=Math.abs(t.scrollHeight-t.scrollTop-t.clientHeight)<10;o.autoScrollEnabled=n}};t.addEventListener("scroll",o.handler),t.__scrollData__=o,t.__vueScrollUpdate__=()=>{o.autoScrollEnabled&&(t.scrollTop=t.scrollHeight)}},updated(t){const o=t.__vueScrollUpdate__;o&&o()},beforeUnmount(t){const o=t.__scrollData__;o&&o.handler&&t.removeEventListener("scroll",o.handler),delete t.__vueScrollUpdate__,delete t.__scrollData__}}},Symbol.toStringTag,{value:"Module"})),De=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{ujt:n,lv:a}=o?.value||{},{$global:s}=n;a&&s?.user?.info?.lv<a&&t?.classList&&!t.classList?.contains("asailevel")&&t.classList.add("asailevel")}}},Symbol.toStringTag,{value:"Module"})),Pe=Object.freeze(Object.defineProperty({__proto__:null,default:(t,o="web")=>{const{$global:n,$fn:a}=t;return a.api[o]||(a.api[o]=new a.AsaiApi({baseURL:a.As.getUrlByCfg(n.link.api[o],0),Userinfo:n.user.info,ujt:t}),a.api[o].ictReq(async({url:s,opt:l})=>(l?.mm&&(l.headers.Userinfo=`${a.gettoken(1)}`),{url:s,opt:l})),a.api[o].ictRes(s=>([908].includes(s.code)?s.data="":[909,200].includes(s.code),s)),a.api[o]&&n?.sys?.tyrobot==o&&(a.apisys=a.api[o])),a.api[o]}},Symbol.toStringTag,{value:"Module"})),ze=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$global:a,$model:s}=t.ujt,{channelApiInit:l,addItem:r,popConfirm:i,popBox:d,setChannelHash:c,channelApiPost:m,getQueryData:f,getQueryString:p,channelBarShow:y,channelLang:g,checkContent:u}=o.useChannelBase(t),{getBarData:$,getDefaultValue:h,getChannelKeys:C,getCommentsKey:b,getSnKey:k,getLvKey:w,getPwKey:_,getClassKey:j,getTitleKey:B,getImgKey:S,getContentKey:E}=o.useChannelBaseKey(t);function V(){return t.opt.dty=="file"?"/api/asaichannel/file":t.opt.dty=="sqlite"?"/api/asaichannel/sqlite":"/api/asaichannel/json"}function x(z,P="",L={}){return new Promise((O,T)=>{t.opt.dty=="client"?P?.show?o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/class/${P?.fl}.json`).then(F=>{const R=F.list?.[P?.show];o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/file/${P?.show}.txt`).then(q=>{R[k()]=P?.show,R[E()]=q,O([R])}).catch(T)}).catch(T):o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/class/${P?.fl}.json`).then(F=>{const R=Object.entries(F?.list||{})?.map(([q,Q])=>({...Q,[k()]:q}));O(R)}).catch(T):o.apisys.apiGet(V()+z,P,L).then(F=>{O(F?.data)}).catch(T)})}function N(z,P={}){return x("/select/",z,P)}function D(z=0){return new Promise((P,L)=>{if(n[t.opt.channel]?.stat&&!z)P();else try{n[t.opt.channel]={stat:0,fetch:W,setpage:_e,cmPageList:[],dbtype:"file"},l().then(O=>{O&&typeof O=="object"&&n[t.opt.channel]?(Object.assign(n[t.opt.channel],O),n[t.opt.channel].lang=n[t.opt.channel]?.lang?.[a.config.lang]||n[t.opt.channel]?.lang?.default||a.lang?.[t.opt.channel],n[t.opt.channel].lang?.classtemp&&(a.location?.query&&!n[t.opt.channel].lang.class.asai&&(a.location.query.fl=Object.keys(n[t.opt.channel].lang.class)[0]),Object.keys(n[t.opt.channel].lang.class).forEach(T=>{n[t.opt.channel].lang.class[T]={...n[t.opt.channel].lang?.classtemp||{},...n[t.opt.channel].lang.class[T]}})),n[t.opt.channel].rfdata.lang=n[t.opt.channel].lang.form||{},n[t.opt.channel].rfdata.rule?.[j()]?.data==="class"&&(n[t.opt.channel].rfdata.rule[j()][j()+"data"]=Object.fromEntries(Object.keys(n[t.opt.channel].lang.class).map(T=>[T,n[t.opt.channel].lang.class[T].nm]))),Object.keys(n[t.opt.channel].rfdata.rule).forEach(T=>{n[t.opt.channel].rfdata.rule?.[T]?.[T+"data"]&&typeof n[t.opt.channel].rfdata.rule?.[T]?.[T+"data"]=="string"&&(n[t.opt.channel].rfdata.rule[T][T+"data"]=n[t.opt.channel].lang[n[t.opt.channel].rfdata.rule[T][T+"data"]])}),n[t.opt.channel]?.cfg?.single||(n[t.opt.channel].rfdata.lang={...n[t.opt.channel].rfdata.lang,...a.lang.asaichannel?.form||{},...n[t.opt.channel].rfdata.lang},n[t.opt.channel].rfdata.rule={...s.data.asai.asaichannel?.rule||{},...n[t.opt.channel].rfdata.rule||{}}),n[t.opt.channel].stat=1,P()):L("channel data error!")})}catch(O){L(O)}})}function M(){const z=h();n[t.opt.channel].rfdata.data={},Object.keys(n[t.opt.channel]?.rfdata?.lang||{}).forEach(P=>{n[t.opt.channel].rfdata.data[P]=n[t.opt.channel]?.rfdata?.rule?.[P]?.default!=null?n[t.opt.channel]?.rfdata?.rule?.[P]?.default:z[P]?z[P]():typeof n[t.opt.channel]?.rfdata?.rule?.[P]?.type=="number"?0:""})}function U(z){return new Promise((P,L)=>{if(z)try{J(z).then(O=>{n[t.opt.channel]?.rfdata&&(n[t.opt.channel].rfdata.data=O[0]),P(n[t.opt.channel].rfdata.data)})}catch(O){L(O)}else L("sn error!")})}function I(z,P=0){o.setquery({fl:z}),W(0),t.opt.tyhash?c("list",P):M()}function G(z=null){return new Promise((P,L)=>{D().then(()=>{W(1,z).then(P).catch(L)}).catch(L)})}function W(z=1,P=null){return new Promise((L,O)=>{function T(){return t.opt.fd?t.opt.fd:t.opt.lity?.ty=="blog"||n[t.opt.channel]?.cfg?.lity?.ty=="blog"?k()+"-"+B()+"-"+S()+"-"+E():t.opt.lity?.ty=="pic"||n[t.opt.channel]?.cfg?.lity?.ty=="pic"?k()+"-"+B()+"-"+S():k()+"-"+B()}N({fl:"",...f(),fd:T(),ps:n[t.opt.channel].cmPageSize,...a.location?.query,...P||{}},n[t.opt.channel].cfg?.api?.opt||{}).then(F=>{t.opt.dty=="client"?(o.setquery({pc:F?.length||""},1),n[t.opt.channel].contentList=F.slice(n[t.opt.channel].cmPageSize*((a.location?.query?.pg||1)-1),n[t.opt.channel].cmPageSize*(a.location?.query?.pg||1)),L(n[t.opt.channel].contentList)):t.opt.dty=="file"?(o.setquery({pc:F?.count||""},1),n[t.opt.channel].contentList=F.data,L(n[t.opt.channel].contentList)):(n[t.opt.channel].contentList=F,uc(z).then(R=>{L(n[t.opt.channel].contentList)}).catch(O))}).catch(O)})}function uc(z=1){return new Promise((P,L)=>{z?P([]):N({...f(),fd:k(),...a.location?.query,sx:"",sxty:"",pc:0,pg:0,ps:Number(n[t.opt.channel].cfg.config?.pmax)||1e4},n[t.opt.channel].cfg?.api?.opt||{}).then(O=>{o.setquery({pc:O?.length||""},1),P(O)}).catch(L)})}function _e(z){return new Promise((P,L)=>{o.setquery({pg:z||1},1),W(a.location.query?.pc||0).then(O=>{P(O)}).catch(L)})}function hc(z){return new Promise((P,L)=>{x("/delete/"+z+p()).then(O=>{W(0,{svty:1}).then(T=>{P(T)}).catch(L)}).catch(L)})}function gc(z,P=0){return new Promise((L,O)=>{t.opt.pop&&a.pop["popedit"+t.opt.channel]?d({ty:"edit",tit:a.lang.asai.edit}):t.opt.tyhash&&c("edit",P),z?U(z).then(T=>{o.setquery({show:z,showty:"1"},1),L(T)}).catch(O):O("sn error!")})}function yc(z,P=0){return new Promise((L,O)=>{t.opt.pop&&a.pop["popshow"+t.opt.channel]?d({ty:"show",tit:a.lang.asai.show}):t.opt.tyhash&&c("show",P),z[k()]?U(z[k()]).then(T=>{o.setquery({show:z[k()],showty:""},1),L(T)}).catch(O):O("sn error!")})}function bc(){return new Promise((z,P)=>{!a.location.query.ssty&&a.location.query.ss&&(a.location.query.ssty=n[t.opt.channel]?.cfg?.sss?.[1]),o.setquery({pg:1},1),W(0).then(L=>{z(L)}).catch(P)})}function _c(z=null){return new Promise((P,L)=>{z?J(z,{fd:k()}).then(O=>{P(O)}).catch(L):L("sn error!")})}function kc(z=0,P=null,L=null){return new Promise((O,T)=>{if(u()){const F=P||n[t.opt.channel].rfdata.data;_c(F[k()]).then(R=>{if(R?.[0]?.[k()]){const q=o.lg("asai.checkhas",R?.[0]?.[k()]);!L?.nomsg&&a.msg.fn({type:"err",con:q}),T(q)}else m("/insert/"+F[k()]+p(),F,n[t.opt.channel].cfg?.api?.opt||{}).then(q=>{a.msg.fn({type:"ok",con:a.lang.asai.successadd}),W(0,{svty:1}).then(Q=>{t.opt.tyhash?c("list",z):M(),t.opt.pop&&a.pop["popadd"+t.opt.channel]&&(a.pop["popadd"+t.opt.channel].stat=0),O(Q)}).catch(T)}).catch(T)}).catch(T)}else T("checkContent error!")})}function J(z,P=null){return x("/select/"+z+"/",f(P),n[t.opt.channel].cfg?.api?.opt||{})}function $c(z=null,P=null){return new Promise((L,O)=>{if(u()){const T=z||n[t.opt.channel].rfdata.data;m("/update/"+T[k()]+"/"+p(),T,n[t.opt.channel].cfg?.api?.opt||{}).then(F=>{!P?.nomsg&&a.msg.fn({type:"ok",con:a.lang.asai.successedit}),W(1,{svty:1}).then(R=>{t.opt.pop&&a.pop["popedit"+t.opt.channel]?a.pop["popedit"+t.opt.channel].stat=0:t.opt.tyhash&&c("list",P.tty),L(R)}).catch(O)}).catch(O)}else O("checkContent error!")})}return{initChannel:D,initAddChannel:M,setChannelClass:I,setPage:_e,setShow:yc,addItem:r,delItem:hc,editItem:gc,readItem:U,popConfirm:i,popBox:d,channelSelect:N,fetchChannelList:G,fetchContent:W,searchSubmit:bc,readContent:J,addContent:kc,editContent:$c,setChannelHash:c,channelApiGet:x,channelApiPost:m,getDefaultValue:h,getQueryData:f,getQueryString:p,channelBarShow:y,getChannelKeys:C,getCommentsKey:b,getSnKey:k,getLvKey:w,getPwKey:_,getClassKey:j,getTitleKey:B,getImgKey:S,getContentKey:E,getBarData:$,channelLang:g}}},Symbol.toStringTag,{value:"Module"})),Me=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$global:a}=t.ujt;function s(b=""){if(typeof b=="string"&&b){const k=b.split(".");if(k.length>1){let w=n[t.opt.channel]?.lang;return k.forEach(_=>{_&&typeof w=="object"&&(w=w?.[_])}),w||(w=a.lang.asaichannel,k.forEach(_=>{_&&typeof w=="object"&&(w=w?.[_])})),w}else return n[t.opt.channel].lang?.[b]||a.lang.asaichannel?.[b]}return""}function l(){return t.opt.dty=="file"?"/api/asaichannel/file":t.opt.dty=="sqlite"?"/api/asaichannel/sqlite":"/api/asaichannel/json"}function r(b){return["tm","tg"].includes(b[0])&&b[1].length>12?o.As.getTime(6,Number(b[1])):b?.[1]}function i(b,k,w={}){return new Promise((_,j)=>{t.opt.dty=="client"?(a.msg.fn({type:"err",con:o.lg("asai.failrequest")}),j(o.lg("asai.failrequest"))):o.apisys.apiPost(l()+b,k,w).then(B=>{_(B?.data)}).catch(j)})}function d(){return new Promise((b,k)=>{t.opt.dty=="client"?o.initmodel(t.opt.model+"/channel/"+t.opt.channel+"/channel.json").then(w=>{b(w)}).catch(k):o.apisys.apiGet(`/api/asaijson/manage/select/?path=./webdata/webdb/channel${t.opt.dty?t.opt.dty:"json"}/${t.opt.model+"_"+t.opt.channel}/channel.json`).then(w=>{b(w.data)}).catch(k)})}function c(){return Object.keys(n[t.opt.channel]?.rfdata?.lang||{})}function m(){const b=c();return b.includes("sn")&&b.includes("us")&&b.includes("lv")&&b.includes("pw")?b.filter(k=>k!=="sn").join("-"):b.join("-")}function f(b=null){const k={model:t.opt.model,channel:t.opt.channel};return k.field=m(),Object.assign(k,n[t.opt.channel]?.cfg?.map||{},a.location?.query||{},b||{}),t.opt.wlv&&(k.wlv=t.opt.wlv),k}function p(){return"?"+new URLSearchParams(f()).toString()}function y(){t.opt.pop&&a.pop["popadd"+t.opt.channel]?u({ty:"add",tit:a.lang.asai.add}):t.opt.tyhash&&$("add")}function g(b){Object.assign(a.pop["popconfirm"+t.opt.channel],{stat:1,full:2},n[t.opt.channel]?.cfg?.popbox||{},b||{}),a.pop["popconfirm"+t.opt.channel].con=b.con,a.pop["popconfirm"+t.opt.channel].fn=b.fn}function u(b={}){Object.assign(a.pop["pop"+b.ty+t.opt.channel],{noresize:0,stat:1,full:2,width:"68%",height:"auto"},n[t.opt.channel]?.cfg?.popbox||{},b||{}),b.tit?a.pop["pop"+b.ty+t.opt.channel].tit=b.tit:a.pop["pop"+b.ty+t.opt.channel].notit=1,b.fn&&(a.pop["pop"+b.ty+t.opt.channel].fn=b.fn)}function $(b,k=0){k>-1&&o.sethash(a.location.hash.replace("/"+a.location.hasharr[k||t.opt.ty||1],"/"+b))}function h(){return Object.entries(n[t.opt.channel].rfdata.rule).filter(b=>b[1]?.require).map(b=>b[0])}function C(){const b=h();if(b.length){for(let k=0;k<b.length;k++)if(!n[t.opt.channel].rfdata.data[b[k]])return a.msg.fn({type:"err",con:o.lg("asai.checkrequire",n[t.opt.channel].rfdata.lang?.[b[k]]||b[k])}),!1}return!0}return{channelApiInit:d,addItem:y,popConfirm:g,popBox:u,setChannelHash:$,channelApiPost:i,getQueryData:f,getQueryString:p,channelBarShow:r,channelLang:s,checkContent:C}}},Symbol.toStringTag,{value:"Module"})),Oe=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$db:o,$global:n,$fn:a}=t.ujt;function s(u){return Object.entries(u).filter($=>![i(),d(),c(),m(),f(),p(),y(),g()].includes($[0])&&$[1])}function l(){const u={[i()]:()=>a.As.Uuid(t.opt.channel.substring(0,2)),hi:()=>1,xi:()=>1,yi:()=>0,tm:()=>Date.now(),tg:()=>Date.now(),us:()=>n.user.info?.us};return n.location.query.fl&&(u[m()]=()=>n.location.query.fl),u}function r(){return Object.keys(o[t.opt.channel].rfdata.rule)}function i(){return o[t.opt.channel]?.cfg?.map?.sn||"sn"}function d(){return o[t.opt.channel]?.cfg?.map?.lv||"lv"}function c(){return o[t.opt.channel]?.cfg?.map?.pw||"pw"}function m(){return o[t.opt.channel]?.cfg?.map?.class||"class"}function f(){return o[t.opt.channel]?.cfg?.map?.content||"content"}function p(){return o[t.opt.channel]?.cfg?.map?.title||"title"}function y(){return o[t.opt.channel]?.cfg?.map?.img||"img"}function g(){return o[t.opt.channel]?.cfg?.map?.comments||"comments"}return{getBarData:s,getDefaultValue:l,getChannelKeys:r,getCommentsKey:g,getSnKey:i,getLvKey:d,getPwKey:c,getClassKey:m,getTitleKey:p,getImgKey:y,getContentKey:f}}},Symbol.toStringTag,{value:"Module"})),Te=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$model:a}=t.ujt,{getSnKey:s,channelSelect:l,channelApiGet:r,channelApiPost:i,getQueryData:d,getQueryString:c,fetchContent:m}=o.useChannel(t);async function f(){if(n[t.opt.channel].cfg?.imex?.keys?.length===8){let y=function(b,k){return n[t.opt.channel].cfg.imex.keys[k]&&b[n[t.opt.channel].cfg.imex.keys[k]]||""};const g=await l({...d(),fd:n[t.opt.channel].cfg.imex.keys.filter(b=>b).join("-"),sx:"",sxty:"",pc:1,pg:1,ps:2e6}),u=g?.data||g;let $="",h=`${a.data.asai.rulechanneltobook.bkchannel}${n[t.opt.channel].lang.label}${a.data.asai.rulechanneltobook.bksn}${t.opt.channel}${a.data.asai.rulechanneltobook.bkty}1${a.data.asai.rulechanneltobook.bktm}${a.data.asai.rulechanneltobook.bktg}${a.data.asai.rulechanneltobook.bkds}`;const C=u?.sort((b,k)=>b[n[t.opt.channel].cfg.imex.keys[7]]?.localeCompare(k[n[t.opt.channel].cfg.imex.keys[7]]));for(let b=0;b<C.length;b++){const k=C[b];k[n[t.opt.channel].cfg.imex.keys[7]]&&$!==k[n[t.opt.channel].cfg.imex.keys[7]]&&($=k[n[t.opt.channel].cfg.imex.keys[7]],h+=`${a.data.asai.rulechanneltobook.bkclass}${n[t.opt.channel].lang.class[$]?.nm||""}${a.data.asai.rulechanneltobook.bksn}${$}${a.data.asai.rulechanneltobook.bkty}1${a.data.asai.rulechanneltobook.bktm}${a.data.asai.rulechanneltobook.bktg}${a.data.asai.rulechanneltobook.bkds}`),h+=`${a.data.asai.rulechanneltobook.bklist}${y(k,0)}`;const w=y(k,1);h+=`${a.data.asai.rulechanneltobook.bksn}${w}`,h+=`${a.data.asai.rulechanneltobook.bkty}${y(k,2)}${a.data.asai.rulechanneltobook.bktm}${y(k,3)}${a.data.asai.rulechanneltobook.bktg}${y(k,4)}${a.data.asai.rulechanneltobook.bkds}${y(k,5)}${a.data.asai.rulechanneltobook.bkco}`,t.opt.dty=="file"?await r("/select/"+w+"/",d()).then(async _=>{_&&(h+=_?.[0]?.[n[t.opt.channel].cfg.imex.keys[6]]||"")}):h+=`${y(k,6)}`}o.As.downloadTxt(h,`${t.opt.channel}.txt`)}}async function p(y){if(n[t.opt.channel].cfg?.imex?.keys?.length===8){let g=function(k,w,_){n[t.opt.channel].cfg.imex.keys[w]&&(k[n[t.opt.channel].cfg.imex.keys[w]]=_)},u="",$=[],h={},C=[];y=y?.replaceAll(`\r
1
+ (function(H,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(H=typeof globalThis<"u"?globalThis:H||self,e(H["asai-vue-host"]={},H.Vue))})(this,(function(H,e){"use strict";const Z=Object.freeze(Object.defineProperty({__proto__:null,get default(){return rr}},Symbol.toStringTag,{value:"Module"})),ke=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){if(typeof o.value=="function"){let n=0;const a=300,s=l=>{const r=performance.now();r-n<a?(o.value(l),n=0):n=r};t.__dbPointerDownHandler=s,t.addEventListener("pointerdown",s)}},unmounted(t){const o=t.__dbPointerDownHandler;o&&(t.removeEventListener("pointerdown",o),delete t.__dbPointerDownHandler)}}},Symbol.toStringTag,{value:"Module"}));function K(t,o){function n(h,C){C?.classList?.contains(h)&&C.classList.remove(h)}function a(h,C){C?.classList?.contains(h)||C.classList.add(h)}function s(h){a("touch-none",h)}function l(h){n("touch-none",h)}function r(h){const C=window.event||h;return C?.preventDefault(),C?.stopPropagation(),!0}function i(h){const C=window.event||h;C.cancelable&&(C?.preventDefault(),C?.stopPropagation())}function d(h){o.timeout||(o.timeout=requestAnimationFrame(()=>{h(),cancelAnimationFrame(o.timeout),o.timeout=null}))}function c(){o.timeout&&(cancelAnimationFrame(o.timeout),o.timeout=null)}function m(){return"ontouchstart"in window||navigator.maxTouchPoints}function f(h){m()&&o.touchstat!==1&&(h.addEventListener("touchstart",g,!0),o.touchstat=1)}function p(h){m()&&o.touchstat!==2&&(h.addEventListener("touchmove",r),s(h),o.touchstat=2)}function y(h){m()&&o.touchstat!==3&&(h.removeEventListener("touchmove",r),l(h),o.touchstat=3)}function g(h){document.body.addEventListener("touchmove",u),document.body.addEventListener("touchend",$),o.dragttm=Date.now()}function u(h){o.dragttm&&Date.now()-o.dragttm<1e3&&(o.dragtstat=2)}function $(h){document.body.removeEventListener("touchmove",u),document.body.removeEventListener("touchend",$),o.dragtstat=0}return{eStop:r,canTouch:m,eStopTouch:i,setTouchNone:s,setTouchAuto:l,fnPThrottle:d,fnPThrottleCancel:c,vtTouchInit:f,vtTouchDown:p,vtTouchUp:y}}const $e=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n={},{fnPThrottle:a,fnPThrottleCancel:s,vtTouchInit:l,vtTouchDown:r,vtTouchUp:i}=K(t,o.value);l(t);let d=!1,c=0,m=0,f=0,p=0;typeof o.value.domarea=="string"?n.dragAreaDom=document.getElementById(o.value.domarea):n.dragAreaDom=t;const y=$=>{console.log("handleDown",n,$),r(t),d=!0;const h=n.dragAreaDom.getBoundingClientRect();n.dragAreaDom.style.position="absolute",n.dragAreaDom.style.transform=`translate(${h.x}px, ${h.y}px)`,c=$.clientX-h.x,m=$.clientY-h.y,t.style.cursor="grabbing",document.addEventListener("pointermove",g),document.addEventListener("pointerup",u)},g=$=>{a(()=>{if(d){f=$.clientX-c,p=$.clientY-m;const h=window.innerWidth-n.dragAreaDom.offsetWidth,C=window.innerHeight-n.dragAreaDom.offsetHeight;f=Math.max(0,Math.min(f,h)),p=Math.max(0,Math.min(p,C)),n.dragAreaDom.style.transform=`translate(${f}px, ${p}px)`}})},u=()=>{s(),d=!1,t.style.cursor="grab",i(t),document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",u)};t.addEventListener("pointerdown",y),t.unmounted=()=>{t.removeEventListener("pointerdown",y)}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Ce=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);let i=!1,d={x:0,y:0},c={x:0,y:0},m=null,f=1,p={};p.dragDom=(o.value?.dom?document.getElementById(o.value.dom):"")||t;const y=()=>p.dragMaskDom&&(o.value?.scale||o.value?.ujt?.$global?.scale)||1,g=b=>{if(p.dragAreaDom=(o.value?.domarea?document.getElementById(o.value.domarea):"")||p.dragDom,p.dragMaskDom=(o.value?.dommask?document.getElementById(o.value.dommask):"")||(o.value?.ujt?.$global?.sys?.zoomid?document.getElementById(o.value.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body,!p.dragMaskDom)return;l(t),b.preventDefault(),f=y(),o.value?.gameevents?.fndown&&typeof o.value.gameevents.fndown=="function"&&o.value.gameevents.fndown(b)?.(),c={...o.value.pos},i=!0,m=p.dragMaskDom.getBoundingClientRect();let k,w;k=b.clientX,w=b.clientY,d={x:(k-m.left)/f-c.x,y:(w-m.top)/f-c.y},p.dragDom.setPointerCapture(b.pointerId),document.addEventListener("pointermove",u),document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h)},u=b=>{if(!i||!m)return;let k,w;k=b.clientX,w=b.clientY,f=y();const _=(k-m.left)/f-d.x,j=(w-m.top)/f-d.y,B=p.dragMaskDom.offsetWidth-p.dragAreaDom.offsetWidth,S=p.dragMaskDom.offsetHeight-p.dragAreaDom.offsetHeight;n(()=>{o.value.pos.x=+Math.max(0,Math.min(_,B)).toFixed(3),o.value.pos.y=+Math.max(0,Math.min(j,S)).toFixed(3)})},$=(b,k,w=null)=>{let _;p.dropDom=document.getElementById("box-"+k);const j=p.dropDom?.getBoundingClientRect();return j&&(_=b.left<j.right&&b.right>j.left&&b.top<j.bottom&&b.bottom>j.top,_&&o.value.gameevents.fnup(w)?.({dropid:k})),_},h=b=>{if(a(),r(t),b instanceof PointerEvent&&p.dragDom.hasPointerCapture(b.pointerId)&&(i=!1,p.dragDom.releasePointerCapture(b.pointerId)),o.value?.gameevents?.fnup&&typeof o.value.gameevents.fnup=="function"){let k;if(o.value?.gameevents?.params?.domev?.length){const w=p.dragDom.getBoundingClientRect();o.value.gameevents.params.domev.forEach(_=>{k||(k=$(w,_,b))})}!k&&o.value?.gameevents?.params?.typedrop==2&&(o.value.pos.x=c.x,o.value.pos.y=c.y)}document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)};p.dragDom.addEventListener("pointerdown",g);const C=()=>m=null;window.addEventListener("resize",C),t.unmounted=()=>{p.dragDom.removeEventListener("pointerdown",g),window.removeEventListener("resize",C),p=null}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),we=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);let i=!1,d={x:0,y:0},c={x:0,y:0},m=null,f=1,p={};p.dragDom=(o.value?.dom?document.getElementById(o.value.dom):"")||t;const y=()=>p.dragMaskDom&&(o.value?.scale||o.value?.ujt?.$global?.scale)||1,g=C=>{if(p.dragAreaDom=(o.value?.domarea?document.getElementById(o.value.domarea):"")||p.dragDom,p.dragMaskDom=(o.value?.dommask?document.getElementById(o.value.dommask):"")||(o.value?.ujt?.$global?.sys?.zoomid?document.getElementById(o.value.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body,!p.dragMaskDom)return;if(l(t),C.preventDefault(),f=y(),o.value?.events?.fndown&&typeof o.value.events.fndown=="function"&&o.value.events.fndown(),o.value?.pos)c={...o.value.pos};else{const _=window.getComputedStyle(p.dragAreaDom).transform?.split(", ");if(_.length>2){const j=_.pop().slice(0,-1)||0,B=_.pop()||0;c={x:parseFloat(B),y:parseFloat(j)}}else c={x:0,y:0}}i=!0,m=p.dragMaskDom.getBoundingClientRect();let b,k;b=C.clientX,k=C.clientY,d={x:(b-m.left)/f-c.x,y:(k-m.top)/f-c.y},p.dragDom.setPointerCapture(C.pointerId),document.addEventListener("pointermove",u),document.addEventListener("pointerup",$),document.addEventListener("pointercancel",$)},u=C=>{if(!i||!m)return;let b,k;b=C.clientX,k=C.clientY,f=y();const w=(b-m.left)/f-d.x,_=(k-m.top)/f-d.y,j=p.dragMaskDom.offsetWidth-p.dragAreaDom.offsetWidth,B=p.dragMaskDom.offsetHeight-p.dragAreaDom.offsetHeight;n(()=>{o.value.pos?(o.value.pos.x=+Math.max(0,Math.min(w,j)).toFixed(3),o.value.pos.y=+Math.max(0,Math.min(_,B)).toFixed(3)):p.dragAreaDom.style.transform=`translate(${+Math.max(0,Math.min(w,j)).toFixed(3)}px,${+Math.max(0,Math.min(_,B)).toFixed(3)}px)`})},$=C=>{a(),r(t),C instanceof PointerEvent&&p.dragDom.hasPointerCapture(C.pointerId)&&(i=!1,p.dragDom.releasePointerCapture(C.pointerId)),document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",$),document.removeEventListener("pointercancel",$)};p.dragDom.addEventListener("pointerdown",g);const h=()=>m=null;window.addEventListener("resize",h),t.unmounted=()=>{p.dragDom.removeEventListener("pointerdown",g),window.removeEventListener("resize",h),p=null}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"}));function je(t){const o=window.event||t;o.preventDefault(),o.stopPropagation()}const Se=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){function n(a){o.value.type===2&&je(a);const s=document.getElementById(o.value.dom);s&&(s.classList.contains("as-fullscreen")?s.classList.remove("as-fullscreen"):s.classList.add("as-fullscreen"))}o.value.type===2?t.addEventListener("dblclick",n):t.addEventListener("click",n)}}},Symbol.toStringTag,{value:"Module"})),Ee=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n={},{$global:a,$model:s}=o.value?.ujt||{};if(a?.sys?.onkeyboard){let l=function(){a.keyboard.params||(a.keyboard.params={})},r=function(y){y?.setAttribute("inputmode","none"),y?.style?.setProperty("ime-mode","disabled","important")},i=function(y){y?.removeAttribute("inputmode"),y?.style?.setProperty("ime-mode","normal","important")},d=function(y){r(y),a.keyboard.params.ot&&(a.keyboard.params.ot.fndscb=()=>{i(y),a.keyboard.params.ot.fndscb=null})},c=function(y){n.monacoDom=y.target.closest(".askey-luaeditor"),n.monacoDivDom=n.monacoDom.querySelector(".native-edit-context"),d(n.monacoDivDom),n.monacoHoverDom=n.monacoDom.querySelector(".monaco-hover"),d(n.monacoHoverDom),n.monacoTextareaDom=n.monacoDom.querySelector("textarea"),d(n.monacoTextareaDom)},m=function(y){return s.data.asai.keyboard?.nokeytypes?.some(g=>y.target?.closest(g))},f=function(y){return Object.keys(s.data.asai.keyboard?.askeytypes||{})?.find(g=>y.target?.closest(g))},p=function(y){if(a.keyboard.params?.ot?.fnnumcb?.(),a.keyboard.params?.ot?.fndscb?.(),l(),o.value?.auto&&(a.keyboard.areastyle.x=y.clientX+(o.value?.auto?.x||0),a.keyboard.areastyle.y=y.clientY+(o.value?.auto?.y||0)),a.keyboard.params.ot={},!m(y))if(y.target?.closest(".portaskeyboard"))a.keyboard.params.ot.portaskeyboard=!0;else if(y.target?.closest(".askey-luaeditor"))c(y),o.value?.style&&(a.keyboard.params.ot.style=o.value.style),Object.assign(a.keyboard.params,{type:"monaco",el:n.monacoTextareaDom}),a.keyboard.showkeyboard=".askey-luaeditor";else if(["textarea","text","number","password"].includes(y.target?.type)&&!y.target?.disabled){if(n.monacoDivDom=y.target,d(n.monacoDivDom),n.monacoDivDom.type==="number"){a.keyboard.showkeyboard=".askey-number",a.keyboard.params.ot.isnumber=!0,n.monacoDivDom.type="text";let g=requestAnimationFrame(()=>{n.monacoDivDom.setSelectionRange(n.monacoDivDom?.value?.length||0,n.monacoDivDom?.value?.length||0),n.monacoDivDom.focus(),cancelAnimationFrame(g)});a.keyboard.params.ot.fnnumcb=()=>{n.monacoDivDom.type="number"}}else{const g=f(y);g?a.keyboard.showkeyboard=g:a.keyboard.showkeyboard=".askey-default"}o.value?.style&&(a.keyboard.params.ot.style=o.value.style),Object.assign(a.keyboard.params,{type:n.monacoDivDom.type,el:n.monacoDivDom||t})}else a.keyboard.params={},a.keyboard.showkeyboard=""};l(),t.addEventListener("pointerdown",p),t.unmounted=()=>{t.removeEventListener("pointerdown",p)}}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Be=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){o?.value?.right||t?.classList&&!t.classList?.contains("asailevel")&&t.classList.add("asailevel")}}},Symbol.toStringTag,{value:"Module"})),Ve=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{vtTouchInit:n,vtTouchDown:a,vtTouchUp:s}=K(t,o.value);n(t);const l=o.value.long?+o.value.long:0;let r=null,i=!1,d=0,c=0;const m=10,f=u=>{a(t),o.value.prevent&&u.preventDefault(),i=!0,u?.touches?.[0]?(d=u.touches[0].clientX,c=u.touches[0].clientY):(d=u.clientX,c=u.clientY),o.value.press&&o.value.press(u);function $(){i&&o.value.hold&&o.value.hold(u)}l?r=window.setTimeout($,l):$()},p=u=>{s(t),r!==null&&(clearTimeout(r),r=null),i&&(o.value.release&&o.value.release(u),i=!1)},g={down:f,up:p,move:u=>{if(!i)return;let $=0,h=0;u?.touches?.[0]?($=u.touches[0].clientX,h=u.touches[0].clientY):($=u.clientX,h=u.clientY);const C=Math.abs($-d),b=Math.abs(h-c);(C>m||b>m)&&(r!==null&&(clearTimeout(r),r=null),i=!1)}};t.addEventListener("pointerdown",f),t.addEventListener("pointerup",p),t.addEventListener("pointercancel",p),t.addEventListener("pointerleave",p),t._pressHandlers=g},unmounted(t){const o=t._pressHandlers;o&&(t.removeEventListener("pointerdown",o.down),t.removeEventListener("pointerup",o.up),t.removeEventListener("pointercancel",o.up),t.removeEventListener("pointerleave",o.up),delete t._pressHandlers)}}},Symbol.toStringTag,{value:"Module"})),xe=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const n=o.value||{};n?.domresize?n.Ddomresize=document.getElementById(n.domresize):n.Ddomresize=t,n.Ddomarea=(n?.domarea?document.getElementById(n.domarea):"")||(n?.ujt?.$global?.sys?.zoomid?document.getElementById(n.ujt.$global.sys.zoomid):"")||document.getElementById("asaizoomarea")||document.body;const{width:a,height:s}=n.Ddomarea.getBoundingClientRect(),{fnPThrottle:l,fnPThrottleCancel:r,vtTouchInit:i,vtTouchDown:d,vtTouchUp:c}=K(n.Ddomresize,n);i(n.Ddomresize);const{ujt:m,size:f,scale:p}=n;let y={x:0,y:0},g;const u=()=>p||m?.$global?.scale||1;let $;a&&s?$={width:a/u(),height:s/u()}:$={width:m?.$global?.sys?.zoomwidth||1920,height:m?.$global?.sys?.zoomheight||1200};let h=!1,C,b,k,w,_=f||{w:0,h:0};const j=V=>({clientX:V.clientX,clientY:V.clientY}),B=V=>{d(n.Ddomresize),V.preventDefault(),g=u(),h=!0;const{clientX:x,clientY:N}=j(V);C=x-window.scrollX,b=N-window.scrollY,k=n.Ddomresize.offsetWidth,w=n.Ddomresize.offsetHeight;const M=window.getComputedStyle(n.Ddomresize).transform?.split(", ");if(M&&M.length>2){const U=M.pop().slice(0,-1),I=M.pop();y={x:parseFloat(I),y:parseFloat(U)}}else y={x:0,y:0};if(n.Ddomresize.style.transform=`translate(${y.x}px,${y.y}px)`,V instanceof PointerEvent)try{n.Ddomresize.setPointerCapture(V.pointerId)}catch{}document.addEventListener("pointermove",S),document.addEventListener("pointerup",E),document.addEventListener("pointercancel",E)},S=V=>{h&&l(()=>{const{clientX:x,clientY:N}=j(V),D=(x-window.scrollX-C)/g,M=(N-window.scrollY-b)/g;_.w=+Math.min(Math.max(88,k+D),$.width-y.x).toFixed(3),_.h=+Math.min(Math.max(58,w+M),$.height-y.y).toFixed(3),n.Ddomresize.style.width=_.w+"px",n.Ddomresize.style.height=_.h+"px"})},E=V=>{r(),c(n.Ddomresize),V instanceof PointerEvent&&n.Ddomresize.hasPointerCapture(V.pointerId)&&n.Ddomresize.releasePointerCapture(V.pointerId),h=!1,document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",E),document.removeEventListener("pointercancel",E)};n.domresizex==""||n.domresizex=="asai"?n.DXdomresize=t:(n.domresizex&&(n.DXdomresize=document.getElementById(n.domresizex)),n.DXdomresize||(n.DXdomresize=document.createElement("div"),n.DXdomresize.classList.add("resize-bottom-right"),n.Ddomresize.appendChild(n.DXdomresize))),n.DXdomresize.addEventListener("pointerdown",B),t.unmounted=()=>{n.DXdomresize.removeEventListener("pointerdown",B),n.DXdomresize&&n.DXdomresize.remove()}},unmounted(t){t?.unmounted&&(typeof t?.unmounted=="function"&&t.unmounted(),delete t.unmounted)}}},Symbol.toStringTag,{value:"Module"})),Ne=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{fnPThrottle:n,fnPThrottleCancel:a,vtTouchInit:s,vtTouchDown:l,vtTouchUp:r}=K(t,o.value);s(t);const{ujt:i,scale:d,id:c,type:m,cut:f,min:p}=o.value,y=()=>d||i?.$global?.scale||1,g={width:i?.$global?.sys?.zoomwidth||1920,height:i?.$global?.sys?.zoomheight||1200};let u=f||0;m?g.height=g.height-u:g.width=g.width-u;function $(){return typeof p=="function"?p():typeof p?.value=="number"?p?.value:typeof p=="number"?p:100}let h,C=1,b=!1,k=0,w=0,_=0,j=0;const B=x=>{if(h=document.getElementById(c),!h){console.error(`未找到 ID 为 ${c} 的元素`);return}l(t),x.preventDefault(),C=y(),b=!0,m?(_=x.clientY,j=h.offsetHeight):(k=x.clientX,w=h.offsetWidth),document.addEventListener("pointermove",S),document.addEventListener("pointerup",E)},S=x=>{b&&n(()=>{if(m){const N=(_-x.clientY)/C,D=Math.max($(),j+N);h.style.height=Math.min(D,g.height)+"px",h.style.minHeight=Math.min(D,g.height)+"px"}else{const N=(k-x.clientX)/C,D=Math.max($(),w+N);h.style.width=Math.min(D,g.width)+"px",h.style.minWidth=Math.min(D,g.width)+"px"}})},E=()=>{a(),b=!1,r(t),document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",E)};t.addEventListener("pointerdown",B);const V=()=>{t.removeEventListener("pointerdown",B)};t.__unmountResize=V},unmounted(t){t.__unmountResize&&(t.__unmountResize(),delete t.__unmountResize)}}},Symbol.toStringTag,{value:"Module"})),Ae=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t){t.scrollTop=t.scrollHeight;const o={autoScrollEnabled:!0,handler:()=>{const n=Math.abs(t.scrollHeight-t.scrollTop-t.clientHeight)<10;o.autoScrollEnabled=n}};t.addEventListener("scroll",o.handler),t.__scrollData__=o,t.__vueScrollUpdate__=()=>{o.autoScrollEnabled&&(t.scrollTop=t.scrollHeight)}},updated(t){const o=t.__vueScrollUpdate__;o&&o()},beforeUnmount(t){const o=t.__scrollData__;o&&o.handler&&t.removeEventListener("scroll",o.handler),delete t.__vueScrollUpdate__,delete t.__scrollData__}}},Symbol.toStringTag,{value:"Module"})),De=Object.freeze(Object.defineProperty({__proto__:null,default:{mounted(t,o){const{ujt:n,lv:a}=o?.value||{},{$global:s}=n;a&&s?.user?.info?.lv<a&&t?.classList&&!t.classList?.contains("asailevel")&&t.classList.add("asailevel")}}},Symbol.toStringTag,{value:"Module"})),Pe=Object.freeze(Object.defineProperty({__proto__:null,default:(t,o="web")=>{const{$global:n,$fn:a}=t;return a.api[o]||(a.api[o]=new a.AsaiApi({baseURL:a.As.getUrlByCfg(n.link.api[o],0),Userinfo:n.user.info,ujt:t}),a.api[o].ictReq(async({url:s,opt:l})=>(l?.mm&&(l.headers.Userinfo=`${a.gettoken(1)}`),{url:s,opt:l})),a.api[o].ictRes(s=>([908].includes(s.code)?s.data="":[909,200].includes(s.code),s)),a.api[o]&&n?.sys?.tyrobot==o&&(a.apisys=a.api[o])),a.api[o]}},Symbol.toStringTag,{value:"Module"})),ze=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$global:a,$model:s}=t.ujt,{channelApiInit:l,addItem:r,popConfirm:i,popBox:d,setChannelHash:c,channelApiPost:m,getQueryData:f,getQueryString:p,channelBarShow:y,channelLang:g,checkContent:u}=o.useChannelBase(t),{getBarData:$,getDefaultValue:h,getChannelKeys:C,getCommentsKey:b,getSnKey:k,getLvKey:w,getPwKey:_,getClassKey:j,getTitleKey:B,getImgKey:S,getContentKey:E}=o.useChannelBaseKey(t);function V(){return t.opt.dty=="file"?"/api/asaichannel/file":t.opt.dty=="sqlite"?"/api/asaichannel/sqlite":"/api/asaichannel/json"}function x(z,P="",L={}){return new Promise((O,T)=>{t.opt.dty=="client"?P?.show?o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/class/${P?.fl}.json`).then(F=>{const R=F.list?.[P?.show];o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/file/${P?.show}.txt`).then(q=>{R[k()]=P?.show,R[E()]=q,O([R])}).catch(T)}).catch(T):o.initmodel(`${t.opt.model}/channel/${t.opt.channel}/class/${P?.fl}.json`).then(F=>{const R=Object.entries(F?.list||{})?.map(([q,Q])=>({...Q,[k()]:q}));O(R)}).catch(T):o.apisys.apiGet(V()+z,P,L).then(F=>{O(F?.data)}).catch(T)})}function N(z,P={}){return x("/select/",z,P)}function D(z=0){return new Promise((P,L)=>{if(n[t.opt.channel]?.stat&&!z)P();else try{n[t.opt.channel]={stat:0,fetch:W,setpage:_e,cmPageList:[],dbtype:"file"},l().then(O=>{O&&typeof O=="object"&&n[t.opt.channel]?(Object.assign(n[t.opt.channel],O),n[t.opt.channel].lang=n[t.opt.channel]?.lang?.[a.config.lang]||n[t.opt.channel]?.lang?.default||a.lang?.[t.opt.channel],n[t.opt.channel].lang?.classtemp&&n[t.opt.channel].lang?.class&&(a.location?.query&&!n[t.opt.channel].lang.class?.asai&&(a.location.query.fl=Object.keys(n[t.opt.channel].lang.class)[0]),Object.keys(n[t.opt.channel].lang.class).forEach(T=>{n[t.opt.channel].lang.class[T]={...n[t.opt.channel].lang?.classtemp||{},...n[t.opt.channel].lang.class[T]}})),n[t.opt.channel].rfdata.lang=n[t.opt.channel].lang.form||{},n[t.opt.channel].rfdata.rule?.[j()]?.data==="class"&&(n[t.opt.channel].rfdata.rule[j()][j()+"data"]=Object.fromEntries(Object.keys(n[t.opt.channel].lang.class).map(T=>[T,n[t.opt.channel].lang.class?.[T]?.nm]))),Object.keys(n[t.opt.channel].rfdata.rule).forEach(T=>{n[t.opt.channel].rfdata.rule?.[T]?.[T+"data"]&&typeof n[t.opt.channel].rfdata.rule?.[T]?.[T+"data"]=="string"&&(n[t.opt.channel].rfdata.rule[T][T+"data"]=n[t.opt.channel].lang[n[t.opt.channel].rfdata.rule[T]?.[T+"data"]])}),n[t.opt.channel]?.cfg?.single||(n[t.opt.channel].rfdata.lang={...n[t.opt.channel].rfdata.lang,...a.lang.asaichannel?.form||{},...n[t.opt.channel].rfdata.lang},n[t.opt.channel].rfdata.rule={...s.data.asai.asaichannel?.rule||{},...n[t.opt.channel].rfdata.rule||{}}),n[t.opt.channel].stat=1,P()):L("channel data error!")})}catch(O){L(O)}})}function M(){const z=h();n[t.opt.channel].rfdata.data={},Object.keys(n[t.opt.channel]?.rfdata?.lang||{}).forEach(P=>{n[t.opt.channel].rfdata.data[P]=n[t.opt.channel]?.rfdata?.rule?.[P]?.default!=null?n[t.opt.channel]?.rfdata?.rule?.[P]?.default:z[P]?z[P]():typeof n[t.opt.channel]?.rfdata?.rule?.[P]?.type=="number"?0:""})}function U(z){return new Promise((P,L)=>{if(z)try{J(z).then(O=>{n[t.opt.channel]?.rfdata&&(n[t.opt.channel].rfdata.data=O[0]),P(n[t.opt.channel].rfdata.data)})}catch(O){L(O)}else L("sn error!")})}function I(z,P=0){o.setquery({fl:z}),W(0),t.opt.tyhash?c("list",P):M()}function G(z=null){return new Promise((P,L)=>{D().then(()=>{W(1,z).then(P).catch(L)}).catch(L)})}function W(z=1,P=null){return new Promise((L,O)=>{function T(){return t.opt.fd?t.opt.fd:t.opt.lity?.ty=="blog"||n[t.opt.channel]?.cfg?.lity?.ty=="blog"?k()+"-"+B()+"-"+S()+"-"+E():t.opt.lity?.ty=="pic"||n[t.opt.channel]?.cfg?.lity?.ty=="pic"?k()+"-"+B()+"-"+S():k()+"-"+B()}N({fl:"",...f(),fd:T(),ps:n[t.opt.channel].cmPageSize,...a.location?.query,...P||{}},n[t.opt.channel].cfg?.api?.opt||{}).then(F=>{t.opt.dty=="client"?(o.setquery({pc:F?.length||""},1),n[t.opt.channel].contentList=F.slice(n[t.opt.channel].cmPageSize*((a.location?.query?.pg||1)-1),n[t.opt.channel].cmPageSize*(a.location?.query?.pg||1)),L(n[t.opt.channel].contentList)):t.opt.dty=="file"?(o.setquery({pc:F?.count||""},1),n[t.opt.channel].contentList=F.data,L(n[t.opt.channel].contentList)):(n[t.opt.channel].contentList=F,uc(z).then(R=>{L(n[t.opt.channel].contentList)}).catch(O))}).catch(O)})}function uc(z=1){return new Promise((P,L)=>{z?P([]):N({...f(),fd:k(),...a.location?.query,sx:"",sxty:"",pc:0,pg:0,ps:Number(n[t.opt.channel].cfg.config?.pmax)||1e4},n[t.opt.channel].cfg?.api?.opt||{}).then(O=>{o.setquery({pc:O?.length||""},1),P(O)}).catch(L)})}function _e(z){return new Promise((P,L)=>{o.setquery({pg:z||1},1),W(a.location.query?.pc||0).then(O=>{P(O)}).catch(L)})}function hc(z){return new Promise((P,L)=>{x("/delete/"+z+p()).then(O=>{W(0,{svty:1}).then(T=>{P(T)}).catch(L)}).catch(L)})}function gc(z,P=0){return new Promise((L,O)=>{t.opt.pop&&a.pop["popedit"+t.opt.channel]?d({ty:"edit",tit:a.lang.asai.edit}):t.opt.tyhash&&c("edit",P),z?U(z).then(T=>{o.setquery({show:z,showty:"1"},1),L(T)}).catch(O):O("sn error!")})}function yc(z,P=0){return new Promise((L,O)=>{t.opt.pop&&a.pop["popshow"+t.opt.channel]?d({ty:"show",tit:a.lang.asai.show}):t.opt.tyhash&&c("show",P),z[k()]?U(z[k()]).then(T=>{o.setquery({show:z[k()],showty:""},1),L(T)}).catch(O):O("sn error!")})}function bc(){return new Promise((z,P)=>{!a.location.query.ssty&&a.location.query.ss&&(a.location.query.ssty=n[t.opt.channel]?.cfg?.sss?.[1]),o.setquery({pg:1},1),W(0).then(L=>{z(L)}).catch(P)})}function _c(z=null){return new Promise((P,L)=>{z?J(z,{fd:k()}).then(O=>{P(O)}).catch(L):L("sn error!")})}function kc(z=0,P=null,L=null){return new Promise((O,T)=>{if(u()){const F=P||n[t.opt.channel].rfdata.data;_c(F[k()]).then(R=>{if(R?.[0]?.[k()]){const q=o.lg("asai.checkhas",R?.[0]?.[k()]);!L?.nomsg&&a.msg.fn({type:"err",con:q}),T(q)}else m("/insert/"+F[k()]+p(),F,n[t.opt.channel].cfg?.api?.opt||{}).then(q=>{a.msg.fn({type:"ok",con:a.lang.asai.successadd}),W(0,{svty:1}).then(Q=>{t.opt.tyhash?c("list",z):M(),t.opt.pop&&a.pop["popadd"+t.opt.channel]&&(a.pop["popadd"+t.opt.channel].stat=0),O(Q)}).catch(T)}).catch(T)}).catch(T)}else T("checkContent error!")})}function J(z,P=null){return x("/select/"+z+"/",f(P),n[t.opt.channel].cfg?.api?.opt||{})}function $c(z=null,P=null){return new Promise((L,O)=>{if(u()){const T=z||n[t.opt.channel].rfdata.data;m("/update/"+T[k()]+"/"+p(),T,n[t.opt.channel].cfg?.api?.opt||{}).then(F=>{!P?.nomsg&&a.msg.fn({type:"ok",con:a.lang.asai.successedit}),W(1,{svty:1}).then(R=>{t.opt.pop&&a.pop["popedit"+t.opt.channel]?a.pop["popedit"+t.opt.channel].stat=0:t.opt.tyhash&&c("list",P.tty),L(R)}).catch(O)}).catch(O)}else O("checkContent error!")})}return{initChannel:D,initAddChannel:M,setChannelClass:I,setPage:_e,setShow:yc,addItem:r,delItem:hc,editItem:gc,readItem:U,popConfirm:i,popBox:d,channelSelect:N,fetchChannelList:G,fetchContent:W,searchSubmit:bc,readContent:J,addContent:kc,editContent:$c,setChannelHash:c,channelApiGet:x,channelApiPost:m,getDefaultValue:h,getQueryData:f,getQueryString:p,channelBarShow:y,getChannelKeys:C,getCommentsKey:b,getSnKey:k,getLvKey:w,getPwKey:_,getClassKey:j,getTitleKey:B,getImgKey:S,getContentKey:E,getBarData:$,channelLang:g}}},Symbol.toStringTag,{value:"Module"})),Me=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$global:a}=t.ujt;function s(b=""){if(typeof b=="string"&&b){const k=b.split(".");if(k.length>1){let w=n[t.opt.channel]?.lang;return k.forEach(_=>{_&&typeof w=="object"&&(w=w?.[_])}),w||(w=a.lang.asaichannel,k.forEach(_=>{_&&typeof w=="object"&&(w=w?.[_])})),w}else return n[t.opt.channel].lang?.[b]||a.lang.asaichannel?.[b]}return""}function l(){return t.opt.dty=="file"?"/api/asaichannel/file":t.opt.dty=="sqlite"?"/api/asaichannel/sqlite":"/api/asaichannel/json"}function r(b){return["tm","tg"].includes(b[0])&&b[1].length>12?o.As.getTime(6,Number(b[1])):b?.[1]}function i(b,k,w={}){return new Promise((_,j)=>{t.opt.dty=="client"?(a.msg.fn({type:"err",con:o.lg("asai.failrequest")}),j(o.lg("asai.failrequest"))):o.apisys.apiPost(l()+b,k,w).then(B=>{_(B?.data)}).catch(j)})}function d(){return new Promise((b,k)=>{t.opt.dty=="client"?o.initmodel(t.opt.model+"/channel/"+t.opt.channel+"/channel.json").then(w=>{b(w)}).catch(k):o.apisys.apiGet(`/api/asaijson/manage/select/?path=./webdata/webdb/channel${t.opt.dty?t.opt.dty:"json"}/${t.opt.model+"_"+t.opt.channel}/channel.json`).then(w=>{b(w.data)}).catch(k)})}function c(){return Object.keys(n[t.opt.channel]?.rfdata?.lang||{})}function m(){const b=c();return b.includes("sn")&&b.includes("us")&&b.includes("lv")&&b.includes("pw")?b.filter(k=>k!=="sn").join("-"):b.join("-")}function f(b=null){const k={model:t.opt.model,channel:t.opt.channel};return k.field=m(),Object.assign(k,n[t.opt.channel]?.cfg?.map||{},a.location?.query||{},b||{}),t.opt.wlv&&(k.wlv=t.opt.wlv),k}function p(){return"?"+new URLSearchParams(f()).toString()}function y(){t.opt.pop&&a.pop["popadd"+t.opt.channel]?u({ty:"add",tit:a.lang.asai.add}):t.opt.tyhash&&$("add")}function g(b){Object.assign(a.pop["popconfirm"+t.opt.channel],{stat:1,full:2},n[t.opt.channel]?.cfg?.popbox||{},b||{}),a.pop["popconfirm"+t.opt.channel].con=b.con,a.pop["popconfirm"+t.opt.channel].fn=b.fn}function u(b={}){Object.assign(a.pop["pop"+b.ty+t.opt.channel],{noresize:0,stat:1,full:2,width:"68%",height:"auto"},n[t.opt.channel]?.cfg?.popbox||{},b||{}),b.tit?a.pop["pop"+b.ty+t.opt.channel].tit=b.tit:a.pop["pop"+b.ty+t.opt.channel].notit=1,b.fn&&(a.pop["pop"+b.ty+t.opt.channel].fn=b.fn)}function $(b,k=0){k>-1&&o.sethash(a.location.hash.replace("/"+a.location.hasharr[k||t.opt.ty||1],"/"+b))}function h(){return Object.entries(n[t.opt.channel].rfdata.rule).filter(b=>b[1]?.require).map(b=>b[0])}function C(){const b=h();if(b.length){for(let k=0;k<b.length;k++)if(!n[t.opt.channel].rfdata.data[b[k]])return a.msg.fn({type:"err",con:o.lg("asai.checkrequire",n[t.opt.channel].rfdata.lang?.[b[k]]||b[k])}),!1}return!0}return{channelApiInit:d,addItem:y,popConfirm:g,popBox:u,setChannelHash:$,channelApiPost:i,getQueryData:f,getQueryString:p,channelBarShow:r,channelLang:s,checkContent:C}}},Symbol.toStringTag,{value:"Module"})),Oe=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$db:o,$global:n,$fn:a}=t.ujt;function s(u){return Object.entries(u).filter($=>![i(),d(),c(),m(),f(),p(),y(),g()].includes($[0])&&$[1])}function l(){const u={[i()]:()=>a.As.Uuid(t.opt.channel.substring(0,2)),hi:()=>1,xi:()=>1,yi:()=>0,tm:()=>Date.now(),tg:()=>Date.now(),us:()=>n.user.info?.us};return n.location.query.fl&&(u[m()]=()=>n.location.query.fl),u}function r(){return Object.keys(o[t.opt.channel].rfdata.rule)}function i(){return o[t.opt.channel]?.cfg?.map?.sn||"sn"}function d(){return o[t.opt.channel]?.cfg?.map?.lv||"lv"}function c(){return o[t.opt.channel]?.cfg?.map?.pw||"pw"}function m(){return o[t.opt.channel]?.cfg?.map?.class||"class"}function f(){return o[t.opt.channel]?.cfg?.map?.content||"content"}function p(){return o[t.opt.channel]?.cfg?.map?.title||"title"}function y(){return o[t.opt.channel]?.cfg?.map?.img||"img"}function g(){return o[t.opt.channel]?.cfg?.map?.comments||"comments"}return{getBarData:s,getDefaultValue:l,getChannelKeys:r,getCommentsKey:g,getSnKey:i,getLvKey:d,getPwKey:c,getClassKey:m,getTitleKey:p,getImgKey:y,getContentKey:f}}},Symbol.toStringTag,{value:"Module"})),Te=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$model:a}=t.ujt,{getSnKey:s,channelSelect:l,channelApiGet:r,channelApiPost:i,getQueryData:d,getQueryString:c,fetchContent:m}=o.useChannel(t);async function f(){if(n[t.opt.channel].cfg?.imex?.keys?.length===8){let y=function(b,k){return n[t.opt.channel].cfg.imex.keys[k]&&b[n[t.opt.channel].cfg.imex.keys[k]]||""};const g=await l({...d(),fd:n[t.opt.channel].cfg.imex.keys.filter(b=>b).join("-"),sx:"",sxty:"",pc:1,pg:1,ps:2e6}),u=g?.data||g;let $="",h=`${a.data.asai.rulechanneltobook.bkchannel}${n[t.opt.channel].lang.label}${a.data.asai.rulechanneltobook.bksn}${t.opt.channel}${a.data.asai.rulechanneltobook.bkty}1${a.data.asai.rulechanneltobook.bktm}${a.data.asai.rulechanneltobook.bktg}${a.data.asai.rulechanneltobook.bkds}`;const C=u?.sort((b,k)=>b[n[t.opt.channel].cfg.imex.keys[7]]?.localeCompare(k[n[t.opt.channel].cfg.imex.keys[7]]));for(let b=0;b<C.length;b++){const k=C[b];k[n[t.opt.channel].cfg.imex.keys[7]]&&$!==k[n[t.opt.channel].cfg.imex.keys[7]]&&($=k[n[t.opt.channel].cfg.imex.keys[7]],h+=`${a.data.asai.rulechanneltobook.bkclass}${n[t.opt.channel].lang.class?.[$]?.nm||""}${a.data.asai.rulechanneltobook.bksn}${$}${a.data.asai.rulechanneltobook.bkty}1${a.data.asai.rulechanneltobook.bktm}${a.data.asai.rulechanneltobook.bktg}${a.data.asai.rulechanneltobook.bkds}`),h+=`${a.data.asai.rulechanneltobook.bklist}${y(k,0)}`;const w=y(k,1);h+=`${a.data.asai.rulechanneltobook.bksn}${w}`,h+=`${a.data.asai.rulechanneltobook.bkty}${y(k,2)}${a.data.asai.rulechanneltobook.bktm}${y(k,3)}${a.data.asai.rulechanneltobook.bktg}${y(k,4)}${a.data.asai.rulechanneltobook.bkds}${y(k,5)}${a.data.asai.rulechanneltobook.bkco}`,t.opt.dty=="file"?await r("/select/"+w+"/",d()).then(async _=>{_&&(h+=_?.[0]?.[n[t.opt.channel].cfg.imex.keys[6]]||"")}):h+=`${y(k,6)}`}o.As.downloadTxt(h,`${t.opt.channel}.txt`)}}async function p(y){if(n[t.opt.channel].cfg?.imex?.keys?.length===8){let g=function(k,w,_){n[t.opt.channel].cfg.imex.keys[w]&&(k[n[t.opt.channel].cfg.imex.keys[w]]=_)},u="",$=[],h={},C=[];y=y?.replaceAll(`\r
2
2
  `,`
3
3
  `);const b=y.split(a.data.asai.rulechanneltobook.bkclass);for(let k=0;k<b.length;k++){const _=b[k].split(a.data.asai.rulechanneltobook.bklist);for(let j=0;j<_.length;j++){const B=_[j];j===0?(u=B.split(a.data.asai.rulechanneltobook.bksn)[1].split(a.data.asai.rulechanneltobook.bkty)[0],await l({...d(),field:s(),fd:s(),ps:9999999,fl:u}).then(S=>{const E=S?.data||S;if(Array.isArray(E)){const V=E.map(x=>x[s()]);$.push(...V||[])}})):(h={},g(h,7,u),C=B.split(a.data.asai.rulechanneltobook.bksn),g(h,0,C[0]),C=C[1].split(a.data.asai.rulechanneltobook.bkty),g(h,1,C[0]),C=C[1].split(a.data.asai.rulechanneltobook.bktm),g(h,2,C[0]),C=C[1].split(a.data.asai.rulechanneltobook.bktg),g(h,3,C[0]),C=C[1].split(a.data.asai.rulechanneltobook.bkds),g(h,4,C[0]),C=C[1].split(a.data.asai.rulechanneltobook.bkco),g(h,5,C[0]),g(h,6,C[1]),$.includes(h[s()])?n[t.opt.channel].cfg?.imex?.type==1&&await i("/update/"+h[n[t.opt.channel].cfg.imex.keys[1]]+c(),h):await i("/insert/"+h[n[t.opt.channel].cfg.imex.keys[1]]+c(),h))}}await m(1,{svty:1})}}return{channelBookDownload:f,channelBookUpload:p}}},Symbol.toStringTag,{value:"Module"})),Le=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$db:o,$fn:n,$global:a}=t.ujt,{getSnKey:s,getCommentsKey:l,channelApiPost:r,getQueryString:i}=n.useChannel(t);function d(p,y=1){return new Promise((g,u)=>{r("/update/"+p[s()]+"/"+i(),p,o[t.opt.channel].cfg?.api?.opt||{}).then($=>{y&&a.msg.fn({type:"ok",con:a.lang.asai.successedit}),g($)}).catch(u)})}function c(p,y){p.data=y?.[l()];try{p.comments=JSON.parse(p.data)}catch{p.comments=[]}}function m(p,y){p.newcomments.co?(p.newcomments.tm=n.As.getTime(6),p.comments.push({...p.newcomments}),y.data[l()]=JSON.stringify(p.comments),d(y.data,1).then(()=>{a.msg.fn({type:"ok",con:a.lang.asai.successedit}),f(p)})):a.msg.fn({type:"err",con:a.lang.asai.failedit})}function f(p){p.newcomments.co=""}return{initChannelComments:c,saveChannelComments:m,resetChannelComments:f}}},Symbol.toStringTag,{value:"Module"})),Ue=Object.freeze(Object.defineProperty({__proto__:null,default:t=>{const{$fn:o,$db:n,$global:a}=t.ujt,{getSnKey:s,getPwKey:l,getLvKey:r,channelApiGet:i,channelApiPost:d,getQueryData:c,getQueryString:m,readContent:f,editContent:p}=o.useChannel(t);function y(S="web"){return new Promise((E,V)=>{a.user.online=0,o.ws[S]?.wsApi({ty:"user/login",db:a.user.info}).then(x=>{x.db?(a.user.online=1,E(x)):o.exit()}).catch(x=>{a.msg.fn({type:"err",con:o.lg("asai.hostmsg.loginerr",[a.user.info.us])}),V(x)})})}function g(S="web"){return o.ws[S].wsApi({ty:"user/online",db:""}).then(E=>{n[t.opt.channel].onlinelist=E.db})}function u(S="web"){return new Promise((E,V)=>{try{let x=o.As?.localGet("as-user-code");x?(x=o.As.toObj(x),a.code.pri=x[0],a.code.pub=x[1],E()):o.api[S]?.apiGet("/api/init/code/").then(N=>{a.code.pri=N.data[0],a.code.pub=N.data[1],o.As.localSet("as-user-code",o.As.toStr(N.data)),E()}).catch(N=>{V(N)})}catch(x){V(x)}})}function $(){!a.user.info?.us&&a.code.pri&&o.As.localGet("as-user-info")&&(a.user.info=o.As.toObj(o.AsAES.dec(o.As.localGet("as-user-info"))))}function h(){return new Promise((S,E)=>{try{a.code.token?S(a.code.token):u("web").then(()=>{$(),o.inittoken(),a.code.token?S(a.code.token):E("")}).catch(V=>{E(V)})}catch(V){E(V)}})}function C(){return new Promise((S,E)=>{try{h().then(()=>{a.code.token?y("web").then(V=>{S()}).catch(V=>{E(V)}):E()}).catch(V=>{E(V)})}catch(V){E(V)}})}function b(S=null){a.user.info.us&&f(a.user.info.us).then(E=>{const V=E[0];n[t.opt.channel].rfdata.pw=S.pw,n[t.opt.channel].rfdata.data={},Object.keys(n[t.opt.channel]?.rfdata?.lang||{}).forEach(x=>{n[t.opt.channel].rfdata.data[x]=V[x]})})}function k(S=null){return new Promise((E,V)=>{let x="";n[t.opt.channel].rfdata.pw?.pwn&&(n[t.opt.channel].rfdata.pw?.pw!==n[t.opt.channel].rfdata.data?.[l()]?(x=o.lg("asai.failpwpass"),!S?.nomsg&&a.msg.fn({type:"err",con:x})):n[t.opt.channel].rfdata.pw?.pwn!==n[t.opt.channel].rfdata.pw?.pwnn&&(x=o.lg("asai.failpwerr"),!S?.nomsg&&a.msg.fn({type:"err",con:x})),x||(n[t.opt.channel].rfdata.data[l()]=n[t.opt.channel].rfdata.pw.pwn)),x?V(x):p(null,S).then(N=>{!S?.nomsg&&a.msg.fn({type:"ok",con:o.lg("asai.successedit")}),E(n[t.opt.channel].rfdata.data)}).catch(V)})}function w(S){return{us:S[s()],lv:Number(S[r()]||"0")}}function _(S=null,E=null){return new Promise((V,x)=>{const N=S||n[t.opt.channel].rfdata.data;a.user.info=w(N),o.inittoken(),i("/select/"+N[s()]+"/",c(),n[t.opt.channel].cfg?.api?.opt||{}).then(D=>{D?.[0]?.[s()]===N[s()]&&D?.[0]?.[l()]===N[l()]?(a.user.info=w(D[0]),o.As.localSet("as-user-info",o.AsAES.enc(o.As.toStr(a.user.info))),V(D)):(!E?.nomsg&&a.msg.fn({type:"err",con:o.lg("asai.faillogin",N[s()])}),x(o.lg("asai.faillogin",N[s()])))}).catch(x)})}function j(S=null,E=null){return new Promise((V,x)=>{const N=S||n[t.opt.channel].rfdata.data;i("/select/"+N[s()]+"/",{...c(),field:s()},n[t.opt.channel].cfg?.api?.opt||{}).then(D=>{D?.[0]?.[s()]?(!E?.nomsg&&a.msg.fn({type:"err",con:o.lg("asai.checkhas",N[s()])}),x(o.lg("asai.checkhas",N[s()]))):d("/insert/"+N[s()]+m(),N,n[t.opt.channel].cfg?.api?.opt||{}).then(M=>{E?.go&&n[t.opt.channel].cfg?.url?.reg&&o.AsRouter.setHref(n[t.opt.channel].cfg?.url?.reg),V(M)})}).catch(x)})}function B(){o.exit()}return{checkChannelUserWs:y,getChannelOnline:g,initChannelUserCode:u,initChannelUserToken:h,initChannelUserOnline:C,initChannelUserEdit:b,editChannelUserContent:k,getChannelUserInfoByItem:w,channelUserLogin:_,channelUserReg:j,channelUserExit:B}}},Symbol.toStringTag,{value:"Module"})),Ie=Object.freeze(Object.defineProperty({__proto__:null,default:{getUrlByCfg(t=null,o=0){return t?.url?t.url:t?.port?(o?window.location.protocol.includes("s")?"wss:":"ws:":window.location.protocol)+"//"+window.location.hostname+":"+t.port:o?window.location.origin.replace("http","ws"):window.location.origin},arrLenMax(t,o,n=0){return t.length>o&&(n?t.splice(o,t.length-o):t.splice(0,t.length-o)),t},setCookies(t,o,n=0,a="/"){let s="";if(n){const l=new Date;l.setTime(l.getTime()+n),s="; expires="+l.toUTCString()}document.cookie=t+"="+encodeURIComponent(o)+s+"; path="+(a||"/")},cookiesSet(t,o,n=0,a="/"){try{let s="";if(n){const l=new Date;l.setTime(l.getTime()+n),s="; expires="+l.toUTCString()}document.cookie=t+"="+o+s+"; path="+(a||"/")}catch{}},cookiesGet(t){try{const o=document.cookie;let n=o.substring(o.indexOf(t+"=")+(t+"=").length);const a=n.indexOf("; ");return a>-1?n.substring(0,a):n}catch{}return""},cookiesDel(t){this.setCookies(t,"",-1e3)},cookiesClear(){const t=document.cookie.split("; ");for(let o=0;o<t.length;o++){const n=t[o],a=n.indexOf("="),s=a>-1?n.substring(0,a):n;document.cookie=s+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}},readFile(t=null,o=0){return new Promise((n,a)=>{if(t){const s=new FileReader;o?s.readAsText(t):s.readAsDataURL(t),s.onload=()=>{n(s.result)}}else a()})},apiJsonp(t,o){try{let n=document.createElement("script");n.type="text/javascript",n.innerHTML=`
4
4
  window.cbdata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asai-vue-host",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "asai for you",
5
5
  "author": "Asai",
6
6
  "license": "ISC",