UNPKG

zui

Version:

ZUI 3 是一个全新的开源 UI 组件库,提供了丰富的实用组件,并提供自由的定制使用方式,不依赖任何 JavaScript 框架,可以在任何 Web 应用中通过原生的方式使用。

3 lines 264 kB
var Ar=(b,Z,dt)=>{if(!Z.has(b))throw TypeError("Cannot "+dt)};var ut=(b,Z,dt)=>(Ar(b,Z,"read from private field"),dt?dt.call(b):Z.get(b)),bt=(b,Z,dt)=>{if(Z.has(b))throw TypeError("Cannot add the same private member more than once");Z instanceof WeakSet?Z.add(b):Z.set(b,dt)},kt=(b,Z,dt,Os)=>(Ar(b,Z,"write to private field"),Os?Os.call(b,dt):Z.set(b,dt),dt);var Pr=(b,Z,dt)=>(Ar(b,Z,"access private method"),dt);(function(b,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(b=typeof globalThis<"u"?globalThis:b||self,Z(b.zui={}))})(this,function(b){var Rs,Ls,vn,bn,wn,Cn,Sn,kn,zs,rl,Fs,ol,se,ie;"use strict";const Z="",dt="",Os="",Tu="",xu="",Nu="",Eu="",$u="",Mu="",Au="",Pu="",Iu="",ll="3.0.0",Ot=document,Tn=window,Ir=Ot.documentElement,re=Ot.createElement.bind(Ot),Dr=re("div"),Hs=re("table"),cl=re("tbody"),Rr=re("tr"),{isArray:xn,prototype:Lr}=Array,{concat:hl,filter:Ws,indexOf:zr,map:Fr,push:ul,slice:Or,some:js,splice:dl}=Lr,fl=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,pl=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,gl=/<.+>/,ml=/^\w+$/;function Bs(s,t){const e=_l(t);return!s||!e&&!oe(t)&&!tt(t)?[]:!e&&pl.test(s)?t.getElementsByClassName(s.slice(1).replace(/\\/g,"")):!e&&ml.test(s)?t.getElementsByTagName(s):t.querySelectorAll(s)}class Nn{constructor(t,e){if(!t)return;if(Vs(t))return t;let n=t;if(rt(t)){const i=e||Ot;if(n=fl.test(t)&&oe(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):gl.test(t)?Ur(t):Vs(i)?i.find(t):rt(i)?d(i).find(t):Bs(t,i),!n)return}else if(ae(t))return this.ready(t);(n.nodeType||n===Tn)&&(n=[n]),this.length=n.length;for(let i=0,r=this.length;i<r;i++)this[i]=n[i]}init(t,e){return new Nn(t,e)}}const T=Nn.prototype,d=T.init;d.fn=d.prototype=T,T.length=0,T.splice=dl,typeof Symbol=="function"&&(T[Symbol.iterator]=Lr[Symbol.iterator]);function Vs(s){return s instanceof Nn}function ve(s){return!!s&&s===s.window}function oe(s){return!!s&&s.nodeType===9}function _l(s){return!!s&&s.nodeType===11}function tt(s){return!!s&&s.nodeType===1}function yl(s){return!!s&&s.nodeType===3}function vl(s){return typeof s=="boolean"}function ae(s){return typeof s=="function"}function rt(s){return typeof s=="string"}function ft(s){return s===void 0}function je(s){return s===null}function Hr(s){return!isNaN(parseFloat(s))&&isFinite(s)}function Us(s){if(typeof s!="object"||s===null)return!1;const t=Object.getPrototypeOf(s);return t===null||t===Object.prototype}d.isWindow=ve,d.isFunction=ae,d.isArray=xn,d.isNumeric=Hr,d.isPlainObject=Us;function nt(s,t,e){if(e){let n=s.length;for(;n--;)if(t.call(s[n],n,s[n])===!1)return s}else if(Us(s)){const n=Object.keys(s);for(let i=0,r=n.length;i<r;i++){const o=n[i];if(t.call(s[o],o,s[o])===!1)return s}}else for(let n=0,i=s.length;n<i;n++)if(t.call(s[n],n,s[n])===!1)return s;return s}d.each=nt,T.each=function(s){return nt(this,s)},T.empty=function(){return this.each((s,t)=>{for(;t.firstChild;)t.removeChild(t.firstChild)})};function En(...s){const t=vl(s[0])?s.shift():!1,e=s.shift(),n=s.length;if(!e)return{};if(!n)return En(t,d,e);for(let i=0;i<n;i++){const r=s[i];for(const o in r)t&&(xn(r[o])||Us(r[o]))?((!e[o]||e[o].constructor!==r[o].constructor)&&(e[o]=new r[o].constructor),En(t,e[o],r[o])):e[o]=r[o]}return e}d.extend=En,T.extend=function(s){return En(T,s)};const bl=/\S+/g;function $n(s){return rt(s)?s.match(bl)||[]:[]}T.toggleClass=function(s,t){const e=$n(s),n=!ft(t);return this.each((i,r)=>{tt(r)&&nt(e,(o,a)=>{n?t?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},T.addClass=function(s){return this.toggleClass(s,!0)},T.removeAttr=function(s){const t=$n(s);return this.each((e,n)=>{tt(n)&&nt(t,(i,r)=>{n.removeAttribute(r)})})};function wl(s,t){if(s){if(rt(s)){if(arguments.length<2){if(!this[0]||!tt(this[0]))return;const e=this[0].getAttribute(s);return je(e)?void 0:e}return ft(t)?this:je(t)?this.removeAttr(s):this.each((e,n)=>{tt(n)&&n.setAttribute(s,t)})}for(const e in s)this.attr(e,s[e]);return this}}T.attr=wl,T.removeClass=function(s){return arguments.length?this.toggleClass(s,!1):this.attr("class","")},T.hasClass=function(s){return!!s&&js.call(this,t=>tt(t)&&t.classList.contains(s))},T.get=function(s){return ft(s)?Or.call(this):(s=Number(s),this[s<0?s+this.length:s])},T.eq=function(s){return d(this.get(s))},T.first=function(){return this.eq(0)},T.last=function(){return this.eq(-1)};function Cl(s){return ft(s)?this.get().map(t=>tt(t)||yl(t)?t.textContent:"").join(""):this.each((t,e)=>{tt(e)&&(e.textContent=s)})}T.text=Cl;function Ht(s,t,e){if(!tt(s))return;const n=Tn.getComputedStyle(s,null);return e?n.getPropertyValue(t)||void 0:n[t]||s.style[t]}function Mt(s,t){return parseInt(Ht(s,t),10)||0}function Wr(s,t){return Mt(s,`border${t?"Left":"Top"}Width`)+Mt(s,`padding${t?"Left":"Top"}`)+Mt(s,`padding${t?"Right":"Bottom"}`)+Mt(s,`border${t?"Right":"Bottom"}Width`)}const Ks={};function Sl(s){if(Ks[s])return Ks[s];const t=re(s);Ot.body.insertBefore(t,null);const e=Ht(t,"display");return Ot.body.removeChild(t),Ks[s]=e!=="none"?e:"block"}function jr(s){return Ht(s,"display")==="none"}function Br(s,t){const e=s&&(s.matches||s.webkitMatchesSelector||s.msMatchesSelector);return!!e&&!!t&&e.call(s,t)}function Mn(s){return rt(s)?(t,e)=>Br(e,s):ae(s)?s:Vs(s)?(t,e)=>s.is(e):s?(t,e)=>e===s:()=>!1}T.filter=function(s){const t=Mn(s);return d(Ws.call(this,(e,n)=>t.call(e,n,e)))};function qt(s,t){return t?s.filter(t):s}T.detach=function(s){return qt(this,s).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const kl=/^\s*<(\w+)[^>]*>/,Tl=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Vr={"*":Dr,tr:cl,td:Rr,th:Rr,thead:Hs,tbody:Hs,tfoot:Hs};function Ur(s){if(!rt(s))return[];if(Tl.test(s))return[re(RegExp.$1)];const t=kl.test(s)&&RegExp.$1,e=Vr[t]||Vr["*"];return e.innerHTML=s,d(e.childNodes).detach().get()}d.parseHTML=Ur,T.has=function(s){const t=rt(s)?(e,n)=>Bs(s,n).length:(e,n)=>n.contains(s);return this.filter(t)},T.not=function(s){const t=Mn(s);return this.filter((e,n)=>(!rt(s)||tt(n))&&!t.call(n,e,n))};function Wt(s,t,e,n){const i=[],r=ae(t),o=n&&Mn(n);for(let a=0,l=s.length;a<l;a++)if(r){const c=t(s[a]);c.length&&ul.apply(i,c)}else{let c=s[a][t];for(;c!=null&&!(n&&o(-1,c));)i.push(c),c=e?c[t]:null}return i}function Kr(s){return s.multiple&&s.options?Wt(Ws.call(s.options,t=>t.selected&&!t.disabled&&!t.parentNode.disabled),"value"):s.value||""}function xl(s){return arguments.length?this.each((t,e)=>{const n=e.multiple&&e.options;if(n||so.test(e.type)){const i=xn(s)?Fr.call(s,String):je(s)?[]:[String(s)];n?nt(e.options,(r,o)=>{o.selected=i.indexOf(o.value)>=0},!0):e.checked=i.indexOf(e.value)>=0}else e.value=ft(s)||je(s)?"":s}):this[0]&&Kr(this[0])}T.val=xl,T.is=function(s){const t=Mn(s);return js.call(this,(e,n)=>t.call(e,n,e))},d.guid=1;function At(s){return s.length>1?Ws.call(s,(t,e,n)=>zr.call(n,t)===e):s}d.unique=At,T.add=function(s,t){return d(At(this.get().concat(d(s,t).get())))},T.children=function(s){return qt(d(At(Wt(this,t=>t.children))),s)},T.parent=function(s){return qt(d(At(Wt(this,"parentNode"))),s)},T.index=function(s){const t=s?d(s)[0]:this[0],e=s?this:d(t).parent().children();return zr.call(e,t)},T.closest=function(s){const t=this.filter(s);if(t.length)return t;const e=this.parent();return e.length?e.closest(s):t},T.siblings=function(s){return qt(d(At(Wt(this,t=>d(t).parent().children().not(t)))),s)},T.find=function(s){return d(At(Wt(this,t=>Bs(s,t))))};const Nl=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,El=/^$|^module$|\/(java|ecma)script/i,$l=["type","src","nonce","noModule"];function Ml(s,t){const e=d(s);e.filter("script").add(e.find("script")).each((n,i)=>{if(El.test(i.type)&&Ir.contains(i)){const r=re("script");r.text=i.textContent.replace(Nl,""),nt($l,(o,a)=>{i[a]&&(r[a]=i[a])}),t.head.insertBefore(r,null),t.head.removeChild(r)}})}function Al(s,t,e,n,i){n?s.insertBefore(t,e?s.firstChild:null):s.nodeName==="HTML"?s.parentNode.replaceChild(t,s):s.parentNode.insertBefore(t,e?s:s.nextSibling),i&&Ml(t,s.ownerDocument)}function Gt(s,t,e,n,i,r,o,a){return nt(s,(l,c)=>{nt(d(c),(u,h)=>{nt(d(t),(p,f)=>{const m=e?h:f,_=e?f:h,y=e?u:p;Al(m,y?_.cloneNode(!0):_,n,i,!y)},a)},o)},r),t}T.after=function(){return Gt(arguments,this,!1,!1,!1,!0,!0)},T.append=function(){return Gt(arguments,this,!1,!1,!0)};function Pl(s){if(!arguments.length)return this[0]&&this[0].innerHTML;if(ft(s))return this;const t=/<script[\s>]/.test(s);return this.each((e,n)=>{tt(n)&&(t?d(n).empty().append(s):n.innerHTML=s)})}T.html=Pl,T.appendTo=function(s){return Gt(arguments,this,!0,!1,!0)},T.wrapInner=function(s){return this.each((t,e)=>{const n=d(e),i=n.contents();i.length?i.wrapAll(s):n.append(s)})},T.before=function(){return Gt(arguments,this,!1,!0)},T.wrapAll=function(s){let t=d(s),e=t[0];for(;e.children.length;)e=e.firstElementChild;return this.first().before(t),this.appendTo(e)},T.wrap=function(s){return this.each((t,e)=>{const n=d(s)[0];d(e).wrapAll(t?n.cloneNode(!0):n)})},T.insertAfter=function(s){return Gt(arguments,this,!0,!1,!1,!1,!1,!0)},T.insertBefore=function(s){return Gt(arguments,this,!0,!0)},T.prepend=function(){return Gt(arguments,this,!1,!0,!0,!0,!0)},T.prependTo=function(s){return Gt(arguments,this,!0,!0,!0,!1,!1,!0)},T.contents=function(){return d(At(Wt(this,s=>s.tagName==="IFRAME"?[s.contentDocument]:s.tagName==="TEMPLATE"?s.content.childNodes:s.childNodes)))},T.next=function(s,t,e){return qt(d(At(Wt(this,"nextElementSibling",t,e))),s)},T.nextAll=function(s){return this.next(s,!0)},T.nextUntil=function(s,t){return this.next(t,!0,s)},T.parents=function(s,t){return qt(d(At(Wt(this,"parentElement",!0,t))),s)},T.parentsUntil=function(s,t){return this.parents(t,s)},T.prev=function(s,t,e){return qt(d(At(Wt(this,"previousElementSibling",t,e))),s)},T.prevAll=function(s){return this.prev(s,!0)},T.prevUntil=function(s,t){return this.prev(t,!0,s)},T.map=function(s){return d(hl.apply([],Fr.call(this,(t,e)=>s.call(t,e,t))))},T.clone=function(){return this.map((s,t)=>t.cloneNode(!0))},T.offsetParent=function(){return this.map((s,t)=>{let e=t.offsetParent;for(;e&&Ht(e,"position")==="static";)e=e.offsetParent;return e||Ir})},T.slice=function(s,t){return d(Or.call(this,s,t))};const Il=/-([a-z])/g;function qs(s){return s.replace(Il,(t,e)=>e.toUpperCase())}T.ready=function(s){const t=()=>setTimeout(s,0,d);return Ot.readyState!=="loading"?t():Ot.addEventListener("DOMContentLoaded",t),this},T.unwrap=function(){return this.parent().each((s,t)=>{if(t.tagName==="BODY")return;const e=d(t);e.replaceWith(e.children())}),this},T.offset=function(){const s=this[0];if(!s)return;const t=s.getBoundingClientRect();return{top:t.top+Tn.pageYOffset,left:t.left+Tn.pageXOffset}},T.position=function(){const s=this[0];if(!s)return;const t=Ht(s,"position")==="fixed",e=t?s.getBoundingClientRect():this.offset();if(!t){const n=s.ownerDocument;let i=s.offsetParent||n.documentElement;for(;(i===n.body||i===n.documentElement)&&Ht(i,"position")==="static";)i=i.parentNode;if(i!==s&&tt(i)){const r=d(i).offset();e.top-=r.top+Mt(i,"borderTopWidth"),e.left-=r.left+Mt(i,"borderLeftWidth")}}return{top:e.top-Mt(s,"marginTop"),left:e.left-Mt(s,"marginLeft")}};const qr={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};T.prop=function(s,t){if(s){if(rt(s))return s=qr[s]||s,arguments.length<2?this[0]&&this[0][s]:this.each((e,n)=>{n[s]=t});for(const e in s)this.prop(e,s[e]);return this}},T.removeProp=function(s){return this.each((t,e)=>{delete e[qr[s]||s]})};const Dl=/^--/;function Gs(s){return Dl.test(s)}const Ys={},{style:Rl}=Dr,Ll=["webkit","moz","ms"];function zl(s,t=Gs(s)){if(t)return s;if(!Ys[s]){const e=qs(s),n=`${e[0].toUpperCase()}${e.slice(1)}`,i=`${e} ${Ll.join(`${n} `)}${n}`.split(" ");nt(i,(r,o)=>{if(o in Rl)return Ys[s]=o,!1})}return Ys[s]}const Fl={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function Gr(s,t,e=Gs(s)){return!e&&!Fl[s]&&Hr(t)?`${t}px`:t}function Ol(s,t){if(rt(s)){const e=Gs(s);return s=zl(s,e),arguments.length<2?this[0]&&Ht(this[0],s,e):s?(t=Gr(s,t,e),this.each((n,i)=>{tt(i)&&(e?i.style.setProperty(s,t):i.style[s]=t)})):this}for(const e in s)this.css(e,s[e]);return this}T.css=Ol;function Yr(s,t){try{return s(t)}catch{return t}}const Hl=/^\s+|\s+$/;function Jr(s,t){const e=s.dataset[t]||s.dataset[qs(t)];return Hl.test(e)?e:Yr(JSON.parse,e)}function Wl(s,t,e){e=Yr(JSON.stringify,e),s.dataset[qs(t)]=e}function jl(s,t){if(!s){if(!this[0])return;const e={};for(const n in this[0].dataset)e[n]=Jr(this[0],n);return e}if(rt(s))return arguments.length<2?this[0]&&Jr(this[0],s):ft(t)?this:this.each((e,n)=>{Wl(n,s,t)});for(const e in s)this.data(e,s[e]);return this}T.data=jl;function Zr(s,t){const e=s.documentElement;return Math.max(s.body[`scroll${t}`],e[`scroll${t}`],s.body[`offset${t}`],e[`offset${t}`],e[`client${t}`])}nt([!0,!1],(s,t)=>{nt(["Width","Height"],(e,n)=>{const i=`${t?"outer":"inner"}${n}`;T[i]=function(r){if(this[0])return ve(this[0])?t?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:oe(this[0])?Zr(this[0],n):this[0][`${t?"offset":"client"}${n}`]+(r&&t?Mt(this[0],`margin${e?"Top":"Left"}`)+Mt(this[0],`margin${e?"Bottom":"Right"}`):0)}})}),nt(["Width","Height"],(s,t)=>{const e=t.toLowerCase();T[e]=function(n){if(!this[0])return ft(n)?void 0:this;if(!arguments.length)return ve(this[0])?this[0].document.documentElement[`client${t}`]:oe(this[0])?Zr(this[0],t):this[0].getBoundingClientRect()[e]-Wr(this[0],!s);const i=parseInt(n,10);return this.each((r,o)=>{if(!tt(o))return;const a=Ht(o,"boxSizing");o.style[e]=Gr(e,i+(a==="border-box"?Wr(o,!s):0))})}});const Xr="___cd";T.toggle=function(s){return this.each((t,e)=>{if(!tt(e))return;const n=jr(e);(ft(s)?n:s)?(e.style.display=e[Xr]||"",jr(e)&&(e.style.display=Sl(e.tagName))):n||(e[Xr]=Ht(e,"display"),e.style.display="none")})},T.hide=function(){return this.toggle(!1)},T.show=function(){return this.toggle(!0)};const Qr="___ce",Js=".",Zs={focus:"focusin",blur:"focusout"},to={mouseenter:"mouseover",mouseleave:"mouseout"},Bl=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Xs(s){return to[s]||Zs[s]||s}function Qs(s){const t=s.split(Js);return[t[0],t.slice(1).sort()]}T.trigger=function(s,t){if(rt(s)){const[n,i]=Qs(s),r=Xs(n);if(!r)return this;const o=Bl.test(r)?"MouseEvents":"HTMLEvents";s=Ot.createEvent(o),s.initEvent(r,!0,!0),s.namespace=i.join(Js),s.___ot=n}s.___td=t;const e=s.___ot in Zs;return this.each((n,i)=>{e&&ae(i[s.___ot])&&(i[`___i${s.type}`]=!0,i[s.___ot](),i[`___i${s.type}`]=!1),i.dispatchEvent(s)})};function eo(s){return s[Qr]=s[Qr]||{}}function Vl(s,t,e,n,i){const r=eo(s);r[t]=r[t]||[],r[t].push([e,n,i]),s.addEventListener(t,i)}function no(s,t){return!t||!js.call(t,e=>s.indexOf(e)<0)}function An(s,t,e,n,i){const r=eo(s);if(t)r[t]&&(r[t]=r[t].filter(([o,a,l])=>{if(i&&l.guid!==i.guid||!no(o,e)||n&&n!==a)return!0;s.removeEventListener(t,l)}));else for(t in r)An(s,t,e,n,i)}T.off=function(s,t,e){if(ft(s))this.each((n,i)=>{!tt(i)&&!oe(i)&&!ve(i)||An(i)});else if(rt(s))ae(t)&&(e=t,t=""),nt($n(s),(n,i)=>{const[r,o]=Qs(i),a=Xs(r);this.each((l,c)=>{!tt(c)&&!oe(c)&&!ve(c)||An(c,a,o,t,e)})});else for(const n in s)this.off(n,s[n]);return this},T.remove=function(s){return qt(this,s).detach().off(),this},T.replaceWith=function(s){return this.before(s).remove()},T.replaceAll=function(s){return d(s).replaceWith(this),this};function Ul(s,t,e,n,i){if(!rt(s)){for(const r in s)this.on(r,t,e,s[r],i);return this}return rt(t)||(ft(t)||je(t)?t="":ft(e)?(e=t,t=""):(n=e,e=t,t="")),ae(n)||(n=e,e=void 0),n?(nt($n(s),(r,o)=>{const[a,l]=Qs(o),c=Xs(a),u=a in to,h=a in Zs;c&&this.each((p,f)=>{if(!tt(f)&&!oe(f)&&!ve(f))return;const m=function(_){if(_.target[`___i${_.type}`])return _.stopImmediatePropagation();if(_.namespace&&!no(l,_.namespace.split(Js))||!t&&(h&&(_.target!==f||_.___ot===c)||u&&_.relatedTarget&&f.contains(_.relatedTarget)))return;let y=f;if(t){let w=_.target;for(;!Br(w,t);)if(w===f||(w=w.parentNode,!w))return;y=w}Object.defineProperty(_,"currentTarget",{configurable:!0,get(){return y}}),Object.defineProperty(_,"delegateTarget",{configurable:!0,get(){return f}}),Object.defineProperty(_,"data",{configurable:!0,get(){return e}});const v=n.call(y,_,_.___td);i&&An(f,c,l,t,m),v===!1&&(_.preventDefault(),_.stopPropagation())};m.guid=n.guid=n.guid||d.guid++,Vl(f,c,l,t,m)})}),this):this}T.on=Ul;function Kl(s,t,e,n){return this.on(s,t,e,n,!0)}T.one=Kl;const ql=/\r?\n/g;function Gl(s,t){return`&${encodeURIComponent(s)}=${encodeURIComponent(t.replace(ql,`\r `))}`}const Yl=/file|reset|submit|button|image/i,so=/radio|checkbox/i;T.serialize=function(){let s="";return this.each((t,e)=>{nt(e.elements||[e],(n,i)=>{if(i.disabled||!i.name||i.tagName==="FIELDSET"||Yl.test(i.type)||so.test(i.type)&&!i.checked)return;const r=Kr(i);if(!ft(r)){const o=xn(r)?r:[r];nt(o,(a,l)=>{s+=Gl(i.name,l)})}})}),s.slice(1)},window.$=d;function io(s,t){if(s==null)return[s,void 0];typeof t=="string"&&(t=t.split("."));const e=t.join(".");let n=s;const i=[n];for(;typeof n=="object"&&n!==null&&t.length;){let r=t.shift(),o;const a=r.indexOf("[");if(a>0&&a<r.length-1&&r.endsWith("]")&&(o=r.substring(a+1,r.length-1),r=r.substring(0,a)),n=n[r],i.push(n),o!==void 0)if(typeof n=="object"&&n!==null)n instanceof Map?n=n.get(o):n=n[o],i.push(n);else throw new Error(`Cannot access property "${r}[${o}]", the full path is "${e}".`)}if(t.length)throw new Error(`Cannot access property with rest path "${t.join(".")}", the full path is "${e}".`);return i}function ti(s,t,e){try{const n=io(s,t),i=n[n.length-1];return i===void 0?e:i}catch{return e}}function K(s,...t){if(t.length===0)return s;if(t.length===1&&typeof t[0]=="object"&&t[0]){const e=t[0];return Object.keys(e).forEach(n=>{const i=e[n]??"";s=s.replace(new RegExp(`\\{${n}\\}`,"g"),`${i}`)}),s}for(let e=0;e<t.length;e++){const n=t[e]??"";s=s.replace(new RegExp(`\\{${e}\\}`,"g"),`${n}`)}return s}var ei=(s=>(s[s.B=1]="B",s[s.KB=1024]="KB",s[s.MB=1048576]="MB",s[s.GB=1073741824]="GB",s[s.TB=1099511627776]="TB",s))(ei||{});function Pt(s,t=2,e){return Number.isNaN(s)?"?KB":(e||(s<1024?e="B":s<1048576?e="KB":s<1073741824?e="MB":s<1099511627776?e="GB":e="TB"),(s/ei[e]).toFixed(t)+e)}const Be=s=>{const t=/^[0-9]*(B|KB|MB|GB|TB)$/;s=s.toUpperCase();const e=s.match(t);if(!e)return 0;const n=e[1];return s=s.replace(n,""),Number.parseInt(s,10)*ei[n]};let ni=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),jt;function Jl(){return ni}function Zl(s){ni=s.toLowerCase().replace("-","_")}function ro(s,t){jt||(jt={}),typeof s=="string"&&(s={[s]:t??{}}),d.extend(!0,jt,s)}function W(s,t,e,n,i,r){Array.isArray(s)?jt&&s.unshift(jt):s=jt?[jt,s]:[s],typeof e=="string"&&(r=i,i=n,n=e,e=void 0);const o=i||ni;let a;for(const l of s){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const u=r&&l===jt?`${r}.${t}`:t;if(a=ti(c,u),a!==void 0)break}return a===void 0?n:e?K(a,...Array.isArray(e)?e:[e]):a}function Xl(s,t,e,n){return W(void 0,s,t,e,n)}W.addLang=ro,W.getLang=Xl,W.getCode=Jl,W.setCode=Zl,W.map=jt,ro({zh_cn:{confirm:"确定",save:"保存",cancel:"取消",delete:"删除",reset:"重置",add:"添加",copy:"复制",close:"关闭"},zh_tw:{confirm:"確定",save:"儲存",cancel:"取消",delete:"刪除",reset:"重置",add:"添加",Copy:"複製",close:"關閉"},en:{confirm:"Confirm",save:"Save",cancel:"Cancel",delete:"Delete",reset:"Reset",add:"Add",copy:"Copy",close:"Close"}});function oo(s,t,e){s instanceof Headers?s.set(t,e):Array.isArray(s)?s.push([t,e]):s[t]=e}function be(s,t,e){e!=null&&(Array.isArray(e)?e.forEach(n=>be(s,t,n)):!(e instanceof Blob)&&d.isPlainObject(e)?Object.entries(e).forEach(([n,i])=>{be(s,`${t}[${n}]`,i)}):s.append(t,e instanceof Blob?e:String(e)))}function Ql(s,t){if(s){const e={text:"text/plain",html:"text/html",json:"application/json",...t};for(const[n,i]of Object.entries(e))if(i.split(",").map(r=>r.trim()).includes(s))return n}return"text"}function ao(s,t){const e=t||new FormData;return s&&(typeof s=="string"&&(s=new URLSearchParams(s)),s instanceof URLSearchParams?s.forEach((n,i)=>{be(e,i,n)}):Array.isArray(s)?s.forEach(([n,i])=>{be(e,n,i)}):s instanceof FormData?s.forEach((n,i)=>{be(e,i,n)}):d.isPlainObject(s)&&Object.entries(s).forEach(([n,i])=>{be(e,n,i)})),e}class si{get completed(){return this.data!==void 0||this.error!==void 0}get[Symbol.toStringTag](){return"Ajax"}constructor(t){this.setting=t,this._controller=new AbortController,this._callbacks={success:[],error:[],complete:[]}}on(t,e){return this._callbacks[t].push(e),this}success(t){return this.on("success",t)}done(t){return this.success(t)}fail(t){return this.on("error",t)}complete(t){return this.on("complete",t)}always(t){return this.complete(t)}then(t,e){return this.completed?e&&this.error?e(this.error):t(this.data):(this.success(n=>t(n)),e&&this.fail(e)),this}catch(t){return this.error?(t(this.error),this):this.on("error",e=>t(e))}finally(t){return this.completed?(t(),this):this.complete(()=>t())}abort(t){return this.completed?!1:(this._abortError=t,this._controller.abort(),!0)}getResponseHeader(t){var e;return(e=this.response)==null?void 0:e.headers.get(t)}_init(){if(this.completed)return;const{url:t,type:e,data:n,processData:i=!0,contentType:r,crossDomain:o,accepts:a,dataType:l,timeout:c,dataFilter:u,beforeSend:h,success:p,error:f,complete:m,..._}=this.setting;if((h==null?void 0:h(_))===!1)return;e&&(_.method=e);let y=n;y&&(i&&(y=ao(y)),_.body=y),o&&(_.mode="cors");const v=_.headers||{};oo(v,"X-Requested-With","XMLHttpRequest"),r&&oo(v,"Content-Type",r),_.headers=v,_.signal&&_.signal.addEventListener("abort",()=>{this.abort()}),p&&this.success(p),f&&this.fail(f),m&&this.complete(m),_.signal=this._controller.signal,this.url=t,this.request=_}_emit(t,...e){this._callbacks[t].forEach(n=>{n.call(this,...e)})}async send(){var u;if(this.completed)return[];this._init();const{timeout:t,dataType:e,accepts:n,dataFilter:i,throws:r,jsonParser:o}=this.setting;t&&(this._timeoutID=window.setTimeout(()=>{this.abort(new Error("timeout"))},t));let a,l,c;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:h}=a;if(a.ok){const p=(u=a.headers.get("Content-Disposition"))==null?void 0:u.startsWith("attachment"),f=p?"blob":e||Ql(a.headers.get("Content-Type"),n);p||f==="blob"||f==="file"?c=await a.blob():f==="json"?typeof o=="function"?(c=await a.text(),c=o(c)):c=await a.json():c=await a.text(),this.data=c;const m=(i==null?void 0:i(c,f))??c;this._emit("success",m,h,a)}else throw this.data=await a.text(),new Error(h)}catch(h){l=h;let p=!1;l.name==="AbortError"&&(this._abortError?l=this._abortError:p=!0),this.error=l,p||this._emit("error",l,a==null?void 0:a.statusText,l.message)}if(this._timeoutID&&clearTimeout(this._timeoutID),this._emit("complete",a,a==null?void 0:a.statusText),l&&r)throw l;return[c,l,a]}}d.ajax=(s,t)=>{t=t||{},typeof s=="string"?t.url=s:d.extend(t,s);const e=new si(t);return e.send(),e},d.getJSON=(s,t,e)=>(typeof t=="function"&&(e=t,t=void 0),d.ajax({url:s,data:t,success:e,dataType:"json"})),d.get=(s,t,e,n,i="GET")=>{let r,o;return typeof t=="function"?(r=t,o=void 0):o=t,typeof e=="function"?(r=e,n=void 0):n=e,d.ajax({method:i,url:s,data:o,success:r,dataType:n})},d.post=(s,t,e,n)=>d.get(s,t,e,n,"POST"),d.fn.load=function(s,t,e){typeof t=="function"&&(e=t,t=void 0);const[n,i]=s.split(" ");return d.get(n,t,(r,o,a)=>{i&&(r=d(r).find(i).html()),d(this).html(r).zuiInit(),e==null||e.call(this,r,o,a)},"html"),this};async function Pn(s,t=[],e){const n={throws:!0,dataType:"json"};if(typeof s=="string")n.url=s;else if(typeof s=="object")d.extend(n,s);else if(typeof s=="function"){const o=s(...t);return o instanceof Promise?await o:o}e&&d.extend(n,typeof e=="function"?e(n):e);const i=new si(n),[r]=await i.send();return r}function tc(s){return!!(s&&(typeof s=="string"||typeof s=="object"&&s.url||typeof s=="function"))}d.fetch=Pn;function ht(){return d.guid++}function In(s,t){if(s===t)return!1;if(s&&t){const e=typeof s,n=typeof t;if(e!==n)return!0;if(e==="object"&&n==="object"){const i=Array.isArray(s),r=Array.isArray(t);if(i!==r)return!0;if(i&&r){if(s.length!==t.length)return!0;for(let l=0;l<s.length;l++)if(In(s[l],t[l]))return!0;return!0}const o=Object.keys(s),a=Object.keys(t);if(o.length!==a.length)return!0;for(const l of o)if(In(s[l],t[l]))return!0;return!0}if(e==="function"&&n==="function")return s.toString()!==t.toString()}return!0}class Ve{constructor(t,e){this._compute=t,this._dependencies=e}get value(){return this.compute()}get cache(){return this._lastDependencies?this._value:this.compute()}forceCompute(t){return this._lastDependencies=void 0,this.compute(t)}compute(t){t!==void 0&&(this._dependencies=t),t=this._dependencies,typeof t=="function"&&(t=t());const e=this._lastDependencies;return(!e||t.some((n,i)=>In(n instanceof Ve?n.value:n,e[i])))&&(this._value=this._compute(),this._lastDependencies=t.map(n=>n instanceof Ve?n.cache:n)),this._value}}function ii(...s){const t=[],e=new Map,n=(i,r)=>{if(Array.isArray(i)&&(r=i[1],i=i[0]),!i.length)return;const o=e.get(i);typeof o=="number"?t[o][1]=!!r:(e.set(i,t.length),t.push([i,!!r]))};return s.forEach(i=>{typeof i=="function"&&(i=i()),Array.isArray(i)?ii(...i).forEach(n):i&&typeof i=="object"?Object.entries(i).forEach(n):typeof i=="string"&&i.split(" ").forEach(r=>n(r,!0))}),t.sort((i,r)=>(e.get(i[0])||0)-(e.get(r[0])||0))}const N=(...s)=>ii(...s).reduce((t,[e,n])=>(n&&t.push(e),t),[]).join(" ");d.classes=N,d.fn.setClass=function(s,...t){return this.each((e,n)=>{const i=d(n);s===!0?i.attr("class",N(i.attr("class"),...t)):i.addClass(N(s,...t))})};const we=new WeakMap;function Dn(s,t,e){const n=we.has(s),i=n?we.get(s):{};typeof t=="string"?i[t]=e:t===null?Object.keys(i).forEach(r=>{delete i[r]}):Object.assign(i,t),Object.keys(i).forEach(r=>{i[r]===void 0&&delete i[r]}),Object.keys(i).length?(!n&&s instanceof Element&&Object.assign(i,d(s).dataset(),i),we.set(s,i)):we.delete(s)}function Rn(s,t,e){let n=we.get(s)||{};return e&&s instanceof Element&&(n=Object.assign({},d(s).dataset(),n)),t===void 0?n:n[t]}function ec(s){we.delete(s)}d.fn.dataset=d.fn.data,d.fn.data=function(...s){const[t,e]=s;return!s.length||s.length===1&&typeof t=="string"?this.length?Rn(this[0],t,!0):void 0:this.each((n,i)=>Dn(i,t,e))},d.fn.removeData=function(s=null){return this.each((t,e)=>Dn(e,s))};function Ce(s,...t){return s.includes("RAWJS")&&(s=s.split('"RAWJS<').join("").split('>RAWJS"').join("").split("<RAWJS_QUOTE>").join('"').split("<RAWJS_LINE>").join(` `)),new Function(`return ${s}`)(...t)}function nc(s,...t){return s.includes("RAWJS")?Ce(s,...t):JSON.parse(s)}function Se(s,t){const e=d(s)[0];if(!e)return;const{prefix:n,getter:i,evalValue:r,json:o=!0,evalArgs:a=[]}={prefix:"z-",...typeof t=="string"?{prefix:t}:t},l=Array.isArray(r)?new Set(r):void 0;return Array.from(e.attributes).reduce((c,u)=>{let{name:h}=u;const{value:p}=u;let f=p;if(h.startsWith(n)){if(h=h.slice(n.length).replace(/-([a-z])/g,m=>m[1].toUpperCase()),i)f=i(h,p);else try{r&&(!l||l.has(h))||r===void 0&&p.includes("RAWJS")?f=Ce(p,...a):o&&(f=JSON.parse(p))}catch{}c[h]=f}return c},{})}function ri(s,t,e="z-"){const n=d(s);Object.keys(t).forEach(i=>{let r=t[i];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),i=i.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),n.attr(`${e}${i}`,r)})}function sc(...s){var e;const t=s.length;if(!t)return Se(this);if(t===1){const[n]=s;return typeof n=="string"?(e=Se(this))==null?void 0:e[n]:(d.isPlainObject(n)&&ri(this,n),this)}return ri(this,{[s[0]]:s[1]}),this}d.fn.z=sc,d.fn._attr=d.fn.attr,d.fn.extend({attr(...s){const[t,e]=s;return!s.length||s.length===1&&typeof t=="string"?this._attr.apply(this,s):typeof t=="object"?(t&&Object.keys(t).forEach(n=>{const i=t[n];i===null?this.removeAttr(n):this._attr(n,i)}),this):e===null?this.removeAttr(t):this._attr(t,e)}}),d.Event||(d.Event=(s,t)=>{const[e,...n]=s.split("."),i=new Event(e,{bubbles:!0,cancelable:!0});return i.namespace=n.join("."),i.___ot=e,i.___td=t,i});const Ue=(s,t)=>new Promise(e=>{const n=window.setTimeout(e,s);t&&t(n)}),lo={};d.share=lo;var Ln,j,co;b.isValidElement=void 0;var le,ho,uo,oi,ai,li,ci,Ke={},fo=[],ic=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zn=Array.isArray;function Yt(s,t){for(var e in t)s[e]=t[e];return s}function po(s){var t=s.parentNode;t&&t.removeChild(s)}function pt(s,t,e){var n,i,r,o={};for(r in t)r=="key"?n=t[r]:r=="ref"?i=t[r]:o[r]=t[r];if(arguments.length>2&&(o.children=arguments.length>3?Ln.call(arguments,2):e),typeof s=="function"&&s.defaultProps!=null)for(r in s.defaultProps)o[r]===void 0&&(o[r]=s.defaultProps[r]);return Fn(s,o,n,i,null)}function Fn(s,t,e,n,i){var r={type:s,props:t,key:e,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++co,__i:-1,__u:0};return i==null&&j.vnode!=null&&j.vnode(r),r}function G(){return{current:null}}function ke(s){return s.children}function B(s,t){this.props=s,this.context=t}function ce(s,t){if(t==null)return s.__?ce(s.__,s.__i+1):null;for(var e;t<s.__k.length;t++)if((e=s.__k[t])!=null&&e.__e!=null)return e.__e;return typeof s.type=="function"?ce(s):null}function go(s){var t,e;if((s=s.__)!=null&&s.__c!=null){for(s.__e=s.__c.base=null,t=0;t<s.__k.length;t++)if((e=s.__k[t])!=null&&e.__e!=null){s.__e=s.__c.base=e.__e;break}return go(s)}}function mo(s){(!s.__d&&(s.__d=!0)&&le.push(s)&&!On.__r++||ho!==j.debounceRendering)&&((ho=j.debounceRendering)||uo)(On)}function On(){var s,t,e,n,i,r,o,a;for(le.sort(oi);s=le.shift();)s.__d&&(t=le.length,n=void 0,r=(i=(e=s).__v).__e,o=[],a=[],e.__P&&((n=Yt({},i)).__v=i.__v+1,j.vnode&&j.vnode(n),hi(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[r]:null,o,r??ce(i),!!(32&i.__u),a),n.__v=i.__v,n.__.__k[n.__i]=n,wo(o,n,a),n.__e!=r&&go(n)),le.length>t&&le.sort(oi));On.__r=0}function _o(s,t,e,n,i,r,o,a,l,c,u){var h,p,f,m,_,y=n&&n.__k||fo,v=t.length;for(e.__d=l,rc(e,t,y),l=e.__d,h=0;h<v;h++)(f=e.__k[h])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?Ke:y[f.__i]||Ke,f.__i=h,hi(s,f,p,i,r,o,a,l,c,u),m=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&ui(p.ref,null,f),u.push(f.ref,f.__c||m,f)),_==null&&m!=null&&(_=m),65536&f.__u||p.__k===f.__k?(l&&typeof f.type=="string"&&!s.contains(l)&&(l=ce(p)),l=yo(f,l,s)):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:m&&(l=m.nextSibling),f.__d=void 0,f.__u&=-196609);e.__d=l,e.__e=_}function rc(s,t,e){var n,i,r,o,a,l=t.length,c=e.length,u=c,h=0;for(s.__k=[],n=0;n<l;n++)o=n+h,(i=s.__k[n]=(i=t[n])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Fn(null,i,null,null,null):zn(i)?Fn(ke,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Fn(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=s,i.__b=s.__b+1,a=oc(i,e,o,u),i.__i=a,r=null,a!==-1&&(u--,(r=e[a])&&(r.__u|=131072)),r==null||r.__v===null?(a==-1&&h--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a==o-1?h=a-o:a==o+1?h++:a>o?u>l-o?h+=a-o:h--:a<o&&h++,a!==n+h&&(i.__u|=65536))):(r=e[o])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==s.__d&&(s.__d=ce(r)),di(r,r,!1),e[o]=null,u--);if(u)for(n=0;n<c;n++)(r=e[n])!=null&&!(131072&r.__u)&&(r.__e==s.__d&&(s.__d=ce(r)),di(r,r))}function yo(s,t,e){var n,i;if(typeof s.type=="function"){for(n=s.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=s,t=yo(n[i],t,e));return t}s.__e!=t&&(e.insertBefore(s.__e,t||null),t=s.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Hn(s,t){return t=t||[],s==null||typeof s=="boolean"||(zn(s)?s.some(function(e){Hn(e,t)}):t.push(s)),t}function oc(s,t,e,n){var i=s.key,r=s.type,o=e-1,a=e+1,l=t[e];if(l===null||l&&i==l.key&&r===l.type&&!(131072&l.__u))return e;if(n>(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a<t.length;){if(o>=0){if((l=t[o])&&!(131072&l.__u)&&i==l.key&&r===l.type)return o;o--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&r===l.type)return a;a++}}return-1}function vo(s,t,e){t[0]==="-"?s.setProperty(t,e??""):s[t]=e==null?"":typeof e!="number"||ic.test(t)?e:e+"px"}function Wn(s,t,e,n,i){var r;t:if(t==="style")if(typeof e=="string")s.style.cssText=e;else{if(typeof n=="string"&&(s.style.cssText=n=""),n)for(t in n)e&&t in e||vo(s.style,t,"");if(e)for(t in e)n&&e[t]===n[t]||vo(s.style,t,e[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in s||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),s.l||(s.l={}),s.l[t+r]=e,e?n?e.u=n.u:(e.u=ai,s.addEventListener(t,r?ci:li,r)):s.removeEventListener(t,r?ci:li,r);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in s)try{s[t]=e??"";break t}catch{}typeof e=="function"||(e==null||e===!1&&t[4]!=="-"?s.removeAttribute(t):s.setAttribute(t,t=="popover"&&e==1?"":e))}}function bo(s){return function(t){if(this.l){var e=this.l[t.type+s];if(t.t==null)t.t=ai++;else if(t.t<e.u)return;return e(j.event?j.event(t):t)}}}function hi(s,t,e,n,i,r,o,a,l,c){var u,h,p,f,m,_,y,v,w,C,S,k,M,A,$,D,x=t.type;if(t.constructor!==void 0)return null;128&e.__u&&(l=!!(32&e.__u),r=[a=t.__e=e.__e]),(u=j.__b)&&u(t);t:if(typeof x=="function")try{if(v=t.props,w="prototype"in x&&x.prototype.render,C=(u=x.contextType)&&n[u.__c],S=u?C?C.props.value:u.__:n,e.__c?y=(h=t.__c=e.__c).__=h.__E:(w?t.__c=h=new x(v,S):(t.__c=h=new B(v,S),h.constructor=x,h.render=lc),C&&C.sub(h),h.props=v,h.state||(h.state={}),h.context=S,h.__n=n,p=h.__d=!0,h.__h=[],h._sb=[]),w&&h.__s==null&&(h.__s=h.state),w&&x.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Yt({},h.__s)),Yt(h.__s,x.getDerivedStateFromProps(v,h.__s))),f=h.props,m=h.state,h.__v=t,p)w&&x.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),w&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(w&&x.getDerivedStateFromProps==null&&v!==f&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(v,S),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(v,h.__s,S)===!1||t.__v===e.__v)){for(t.__v!==e.__v&&(h.props=v,h.state=h.__s,h.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.forEach(function(P){P&&(P.__=t)}),k=0;k<h._sb.length;k++)h.__h.push(h._sb[k]);h._sb=[],h.__h.length&&o.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(v,h.__s,S),w&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(f,m,_)})}if(h.context=S,h.props=v,h.__P=s,h.__e=!1,M=j.__r,A=0,w){for(h.state=h.__s,h.__d=!1,M&&M(t),u=h.render(h.props,h.state,h.context),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[]}else do h.__d=!1,M&&M(t),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++A<25);h.state=h.__s,h.getChildContext!=null&&(n=Yt(Yt({},n),h.getChildContext())),w&&!p&&h.getSnapshotBeforeUpdate!=null&&(_=h.getSnapshotBeforeUpdate(f,m)),_o(s,zn(D=u!=null&&u.type===ke&&u.key==null?u.props.children:u)?D:[D],t,e,n,i,r,o,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&o.push(h),y&&(h.__E=h.__=null)}catch(P){t.__v=null,l||r!=null?(t.__e=a,t.__u|=l?160:32,r[r.indexOf(a)]=null):(t.__e=e.__e,t.__k=e.__k),j.__e(P,t,e)}else r==null&&t.__v===e.__v?(t.__k=e.__k,t.__e=e.__e):t.__e=ac(e.__e,t,e,n,i,r,o,l,c);(u=j.diffed)&&u(t)}function wo(s,t,e){t.__d=void 0;for(var n=0;n<e.length;n++)ui(e[n],e[++n],e[++n]);j.__c&&j.__c(t,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(r){r.call(i)})}catch(r){j.__e(r,i.__v)}})}function ac(s,t,e,n,i,r,o,a,l){var c,u,h,p,f,m,_,y=e.props,v=t.props,w=t.type;if(w==="svg"?i="http://www.w3.org/2000/svg":w==="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c<r.length;c++)if((f=r[c])&&"setAttribute"in f==!!w&&(w?f.localName===w:f.nodeType===3)){s=f,r[c]=null;break}}if(s==null){if(w===null)return document.createTextNode(v);s=document.createElementNS(i,w,v.is&&v),r=null,a=!1}if(w===null)y===v||a&&s.data===v||(s.data=v);else{if(r=r&&Ln.call(s.childNodes),y=e.props||Ke,!a&&r!=null)for(y={},c=0;c<s.attributes.length;c++)y[(f=s.attributes[c]).name]=f.value;for(c in y)if(f=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")h=f;else if(c!=="key"&&!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;Wn(s,c,null,f,i)}}for(c in v)f=v[c],c=="children"?p=f:c=="dangerouslySetInnerHTML"?u=f:c=="value"?m=f:c=="checked"?_=f:c==="key"||a&&typeof f!="function"||y[c]===f||Wn(s,c,f,y[c],i);if(u)a||h&&(u.__html===h.__html||u.__html===s.innerHTML)||(s.innerHTML=u.__html),t.__k=[];else if(h&&(s.innerHTML=""),_o(s,zn(p)?p:[p],t,e,n,w==="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,o,r?r[0]:e.__k&&ce(e,0),a,l),r!=null)for(c=r.length;c--;)r[c]!=null&&po(r[c]);a||(c="value",m!==void 0&&(m!==s[c]||w==="progress"&&!m||w==="option"&&m!==y[c])&&Wn(s,c,m,y[c],i),c="checked",_!==void 0&&_!==s[c]&&Wn(s,c,_,y[c],i))}return s}function ui(s,t,e){try{typeof s=="function"?s(t):s.current=t}catch(n){j.__e(n,e)}}function di(s,t,e){var n,i;if(j.unmount&&j.unmount(s),(n=s.ref)&&(n.current&&n.current!==s.__e||ui(n,null,t)),(n=s.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){j.__e(r,t)}n.base=n.__P=null}if(n=s.__k)for(i=0;i<n.length;i++)n[i]&&di(n[i],t,e||typeof s.type!="function");e||s.__e==null||po(s.__e),s.__c=s.__=s.__e=s.__d=void 0}function lc(s,t,e){return this.constructor(s,e)}function he(s,t,e){var n,i,r,o;j.__&&j.__(s,t),i=(n=typeof e=="function")?null:e&&e.__k||t.__k,r=[],o=[],hi(t,s=(!n&&e||t).__k=pt(ke,null,[s]),i||Ke,Ke,t.namespaceURI,!n&&e?[e]:i?null:t.firstChild?Ln.call(t.childNodes):null,r,!n&&e?e:i?i.__e:t.firstChild,n,o),wo(r,s,o)}Ln=fo.slice,j={__e:function(s,t,e,n){for(var i,r,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,n||{}),o=i.__d),o)return i.__E=i}catch(a){s=a}throw s}},co=0,b.isValidElement=function(s){return s!=null&&s.constructor==null},B.prototype.setState=function(s,t){var e;e=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Yt({},this.state),typeof s=="function"&&(s=s(Yt({},e),this.props)),s&&Yt(e,s),s!=null&&this.__v&&(t&&this._sb.push(t),mo(this))},B.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),mo(this))},B.prototype.render=ke,le=[],uo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,oi=function(s,t){return s.__v.__b-t.__v.__b},On.__r=0,ai=0,li=bo(!1),ci=bo(!0);function H(s,...t){return t.forEach(e=>{!e||typeof e!="object"||Object.keys(e).forEach(n=>{let i=e[n];const r=s[n];i!==r&&(r!==void 0&&(n==="className"||n.endsWith("Class")?i=[r,i]:n==="children"?i=[...Hn(r),...Hn(i)]:typeof r=="object"&&(n==="style"||n.endsWith("Style")||n==="attrs"||n.endsWith("Attrs")||n==="props")&&(i=d.extend(r,i))),s[n]=i)})}),s}function fi(s){return Object.keys(s).forEach(t=>{s[t]===void 0&&delete s[t]}),s}function Co(s,t=!0){const e=d(s),n=e[0],i="zui-disable-scroll";if(t){if(e.data(i))return;if((e.css("scrollbar-gutter")||"").includes("stable")){e.data(i,{overflow:e.css("overflow")}).css("overflow","hidden");return}const r=n===document.body||e.is("html")?window.innerWidth-document.body.clientWidth:n.offsetWidth-n.clientWidth;if(!r)return;const o=e.css("paddingRight")||"0";e.data(i,{paddingRight:o,overflow:e.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=e.data(i);if(!r)return;e.css(r).removeData(i)}}d.fn.disableScroll=function(s=!0){return this.each((t,e)=>{Co(e,s)})},d.fn.enableScroll=function(s=!0){return this.disableScroll(!s)};function pi(s,t,e){if(!(e.on||"click").split(" ").includes(t.type))return;const n=e.selector?d(t.target).closest(e.selector):s;if(!n.length)return;const i=c=>c===""?!0:c,r=c=>{if(typeof c=="string")try{c=JSON.parse(c)}catch{}return c};if(i(e.once)){if(e.onceCalled)return;s.dataset("once-called",!0)}if(i(e.prevent)&&t.preventDefault(),i(e.stop)&&t.stopPropagation(),i(e.self)&&t.currentTarget!==t.target)return;const o=[["$element",s],["event",t],["options",e],["$target",n]],a=c=>typeof c=="function"?c(...o):d.runJS(c,...o);if(e.if!==void 0&&!a(e.if))return;const l=e.call;if(l){let c;if(typeof l=="string"?c=/^[$A-Z_][0-9A-Z_$.]*$/i.test(l)?ti(window,l):a(l):c=l,typeof c=="function"){const u=[],h=e.params;e.params=u,typeof h=="string"&&h.length?h[0]==="["?u.push(...r(h)):u.push(...h.split(", ").map(p=>(p=p.trim(),p==="$element"?s:p==="event"?t:p==="options"?e:p.startsWith("$element.")||p.startsWith("event.")||p.startsWith("options.")?a(p):r(p)))):Array.isArray(h)?u.push(...h):u.push(h),c(...u)}}e.do&&a(e.do)}function cc(s){const t=d(this),e=s.type,n=t.attr("zui-on");if(n){const[o,a]=n.split("~").map(l=>l.trim());o&&pi(t,s,d.extend({on:o},a?a.startsWith("{")?Ce(a):{do:a}:Se(t,{prefix:"data-",evalValue:["call","if","do"]})))}const i=t.attr(`zui-on-${e}`);i&&pi(t,s,d.extend({on:e},i.startsWith("{")?Ce(i):{do:i})),t.attr("data-on")&&pi(t,s,Se(t,{prefix:"data-",evalValue:["call","if","do"]}))}function So(s){d(document).off(".zui.global").on(s.map(t=>`${t}.zui.global`).join(" "),`[zui-on],${s.map(t=>`[zui-on-${t}]`)},[data-on]`,cc)}So(["click","change","inited"]);function gi(s){if(typeof s=="function")return gi(s());if(typeof s=="number")return[s];let t=s.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=s.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function qe(s){if(s==null)return null;const[t,e="px"]=gi(s);return Number.isNaN(t)?typeof s=="string"?s:null:`${t}${e}`}async function mi(s,t){var n,i,r;if(s instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(s),t&&(o.download=decodeURIComponent(t)),o.click(),o.remove(),s}if(s instanceof Response){const o=await s.blob();return t=t||((r=(i=(n=s.headers.get("Content-Disposition"))==null?void 0:n.split(";")[1])==null?void 0:i.split("=")[1])==null?void 0:r.replace(/"/g,"")),mi(o,t)}const e=await fetch(s);return mi(e)}class ko{constructor(t){this._$target=d(t)}on(...t){return this._$target.on(...t),this}one(...t){return this._$target.one(...t),this}off(...t){return this._$target.off(...t),this}trigger(...t){return this._$target.trigger(...t),this}}const It=new ko(document);d.bus=It,d.on=It.on.bind(It),d.one=It.one.bind(It),d.off=It.off.bind(It),d.trigger=It.trigger.bind(It);var hc=["Shift","Meta","Alt","Control"],To=typeof navigator=="object"?navigator.platform:"",xo=/Mac|iPod|iPhone|iPad/.test(To),uc=xo?"Meta":"Control",dc=To==="Win32"?["Control","Alt"]:xo?["Alt"]:[];function _i(s,t){return typeof s.getModifierState=="function"&&(s.getModifierState(t)||dc.includes(t)&&s.getModifierState("AltGraph"))}function fc(s){return s.trim().split(" ").map(function(t){var e=t.split(/\b\+/),n=e.pop();return[e=e.map(function(i){return i==="$mod"?uc:i}),n]})}function No(s,t){var e;t===void 0&&(t={});var n=(e=t.timeout)!=null?e:1e3,i=Object.keys(s).map(function(a){return[fc(a),s[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(i.forEach(function(l){var c=l[0],u=l[1],h=r.get(c)||c;(function(p,f){return!(f[1].toUpperCase()!==p.key.toUpperCase()&&f[1]!==p.code||f[0].find(function(m){return!_i(p,m)})||hc.find(function(m){return!f[0].includes(m)&&f[1]!==m&&_i(p,m)}))})(a,h[0])?h.length>1?r.set(c,h.slice(1)):(r.delete(c),u(a)):_i(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function pc(s,t,e){var n;e===void 0&&(e={});var i=(n=e.event)!=null?n:"keydown",r=No(t,e);return s.addEventListener(i,r),function(){s.removeEventListener(i,r)}}function yi(s,t={}){if(!s)return;const e=Object.keys(t).reduce((n,i)=>(t[i].optional||(n[i]={...t[i]}),n),{});return Object.keys(s).forEach(n=>{const i=s[n];i?i===!0?t[n]&&(e[n]={...t[n]}):e[n]=i:delete e[n]}),Object.keys(e).reduce((n,i)=>{const{keys:r,handler:o}=e[i];return typeof r=="string"?n[r]=o:r.forEach(a=>{n[a]=o}),n},{})}function vi(s,t,e){const{timeout:n,event:i="keydown",scope:r,when:o}=e||{},a=No(t,{timeout:n}),l=`.zui.hotkeys${r?`.${r}`:""}`,c="zui-hotkeys-composing";return d(s).on(`${i}${l}`,function(u){o&&o(u)===!1||d(u.target).data(c)||a(u)}).on(`compositionstart${l}`,u=>{d(u.target).data(c,!0)}).on(`compositionend${l}`,u=>{d(u.target).removeData(c)})}function bi(s,t){return d(s).off(`.zui.hotkeys${t?`.${t}`:""}`)}const gc=pc;d.fn.hotkeys=function(s,t){return vi(this,s,t)},d.fn.unbindHotkeys=function(s){return bi(this,s)},d.hotkeys=function(s,t){vi(window,s,t)},d.unbindHotkeys=function(s){bi(window,s)};function jn(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function Eo(s){(typeof s=="string"||s instanceof Element||s instanceof d)&&(s={target:s});const{target:t,onError:e,onSuccess:n,afterExit:i,afterEnter:r}=s,o=d(t),a=o[0];if(!a)return;const l=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!l){e==null||e.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await l.call(a),n==null||n.call(a),d(a).off(".zui.fullscreen"),i&&o.on("exitFullscreen.zui.fullscreen",i),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(c){e==null||e.call(a,c)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,d(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",c=>{const u=jn();let h=u;u?d(u).addClass("is-in-fullscreen"):(h=d(document).find(".is-in-fullscreen")[0]||document,d(h).removeClass("is-in-fullscreen")),d("body").toggleClass("has-in-fullscreen",!!u);const p={event:c,target:h,fullscreenElement:u};d(h).trigger(u?"enterFullscreen":"exitFullscreen",p).trigger("toggleFullscreen",p)}))}async function wi(s){const t=jn();return s===!1&&!!t===s?s:t?(document.exitFullscreen(),!1):(await Eo(s),!0)}d.fn.fullscreen=function(s){return wi({target:this,...s})},d.getFullscreenElement=jn,d.toggleFullscreen=wi;function ue(s){return s.parentNode===document?!1:s.parentNode?ue(s.parentNode):!0}d.isDetached=ue,d.fn.isDetached=function(){const s=this[0];return!s||ue(s)};class Y{constructor(t,e){this._inited=!1,this._autoDestory=0,this._destroyed=!1;const{KEY:n,DATA_KEY:i,DEFAULT:r,MULTI_INSTANCE:o,NAME:a,ATTR_KEY:l,ALL:c,TYPED_ALL:u}=this.constructor;if(!a)throw new Error('[ZUI] The component must have a "NAME" static property.');const h=d(t);if(h.data(n)&&!o)throw new Error(`[ZUI] The component "${a}" has been initialized on element.`);const p=h[0],f=ht();if(this._gid=f,this._element=p,this._options={...r,...(e==null?void 0:e.$optionsFromDataset)!==!1?h.dataset():{}},this.setOptions(e),this._key=this.options.key??`__${f}`,c.has(p)?c.get(p).add(this):c.set(p,new Set([this])),u.has(a)?u.get(a).add(this):u.set(a,new Set([this])),h.data(n,this).attr(l,"").attr(i,`${f}`),o){const m=`${n}:ALL`;let _=h.data(m);_||(_=new Map,h.data(m,_)),_.set(this._key,this)}this.init(),requestAnimationFrame(async()=>{this._inited=!0,await this.afterInit(),this.emit("inited",this.options)})}static get ZUI(){return this.NAME.replace(/(^[A-Z]+)/,t=>t.toLowerCase())}static get KEY(){return`zui.${this.NAME}`}static get NAMESPACE(){return`.zui.${this.ZUI}`}static get DATA_KEY(){return`data-zui-${this.NAME}`}static get ATTR_KEY(){return`z-use-${this.NAME}`}static get SELECTOR(){return`[${this.DATA_KEY}]`}get inited(){return this._inited}get destroyed(){return this._destroyed}get element(){return this._element}get key(){return this._key}get options(){return this._options}get gid(){return this._gid}get $element(){return d(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(t,e){this.setOptions(t,e)}destroy(){const{KEY:t,DATA_KEY:e,ALL:n,TYPED_ALL:i,NAME:r,MULTI_INSTANCE:o,ATTR_KEY:a}=this.constructor,{$element:l,element:c}=this;if(this.emit("destroyed"),this._destroyed=!0,l.off(this.namespace).removeData(t).removeAttr(a).removeAttr(e),o){const p=this.$element.data(`${t}:ALL`);if(p)if(p.delete(this._key),p.size===0)this.$element.removeData(`${t}:ALL`);else{const f=p.values().next().value;l.data(t,f).attr(e,f.gid)}}const u=n.get(c);u&&(u.delete(this),u.size===0&&n.delete(c));const h=i.get(r);h&&(h.delete(this),h.size===0&&i.delete(r))}autoDestroy(t=100){this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,ue(this.element)&&this.destroy()},t)}setOptions(t,e){return e?this._options={...this.constructor.DEFAULT,...(t==null?void 0:t.$optionsFromDataset)!==!1?this.$element.dataset():{},...t}:t&&d.extend(this._options,t),this._options}emit(t,...e){const n=d.Event(t);return n.__src=this,this.$emitter.trigger(n,[this,...e]),n}on(t,e,n){const i=this;this.$element[n!=null&&n.once?"one":"on"](this._wrapEvent(t),function(r,o){(!r.__src||r.__src===i)&&e.call(this,r,o)})}one(t,e){this.on(t,e,{once:!0})}off(t){this.$element.off(this._wrapEvent(t))}i18n(t,e,n){const{i18nData:i}=this;return W(i,t,e,n,this.options.lang,this.constructor.NAME)??W(i,t,e,n,this.options.lang)??`{i18n:${t}}`}get namespace(){return`${this.constructor.NAMESPACE}.${this._key}`}_wrapEvent(t){return t.split(" ").map(e=>e.includes(".")?e:`${e}${this.namespace}`).join(" ")}static get(t,e){const n=d(t);if(this.MULTI_INSTANCE&&e!==void 0){const i=n.data(`${this.KEY}:ALL`);return i?i.get(e):void 0}return n.data(this.KEY)}static isValid(t){return!0}static ensure(t,e){const n=this.get(t,e==null?void 0:e.key);if(n){if(this.isValid(n))return e&&n.setOptions(e),n;n.destroy()}return new this(t,e)}static getAll(t,e){var l;const{SELECTOR:n,ALL:i,TYPED_ALL:r}=this,o=[],a=c=>{c instanceof this&&(!e||e(c)!==!1)&&o.push(c)};return t?d(t).find(n).each((c,u)=>{var h;(h=i.get(u))==null||h.forEach(a)}):(l=r.get(this.NAME))==null||l.forEach(a),o.sort((c,u)=>c.gid-u.gid)}static query(t,e,n){return t===void 0?this.getAll(void 0,n).pop():this.get(d(t).clo