var hu=(N,et,Tt)=>{if(!et.has(N))throw TypeError("Cannot "+Tt)};var St=(N,et,Tt)=>(hu(N,et,"read from private field"),Tt?Tt.call(N):et.get(N)),Ot=(N,et,Tt)=>{if(et.has(N))throw TypeError("Cannot add the same private member more than once");et instanceof WeakSet?et.add(N):et.set(N,Tt)},Bt=(N,et,Tt,Wa)=>(hu(N,et,"write to private field"),Wa?Wa.call(N,Tt):et.set(N,Tt),Tt);var uu=(N,et,Tt)=>(hu(N,et,"access private method"),Tt);(function(N,et){typeof exports=="object"&&typeof module<"u"?et(exports):typeof define=="function"&&define.amd?define(["exports"],et):(N=typeof globalThis<"u"?globalThis:N||self,et(N.zui={}))})(this,function(N){var da,fa,nr,ir,sr,rr,or,ar,pa,tg,ma,ng,Wn,Un;"use strict";const et="",Tt="",Wa="",Lw="",Rw="",Ow="",zw="",Fw="",jw="",Bw="",Hw="",Ww="",ag="3.0.0",lg="production",ln=document,kr=window,pu=ln.documentElement,ei=ln.createElement.bind(ln),mu=ei("div"),Ua=ei("table"),cg=ei("tbody"),gu=ei("tr"),{isArray:Sr,prototype:yu}=Array,{concat:hg,filter:Va,indexOf:_u,map:vu,push:ug,slice:bu,some:Ka,splice:dg}=yu,fg=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,pg=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,mg=/<.+>/,gg=/^\w+$/;function qa(i,e){const t=yg(e);return!i||!t&&!ti(e)&&!nt(e)?[]:!t&&pg.test(i)?e.getElementsByClassName(i.slice(1).replace(/\\/g,"")):!t&&gg.test(i)?e.getElementsByTagName(i):e.querySelectorAll(i)}class Tr{constructor(e,t){if(!e)return;if(Ga(e))return e;let n=e;if(_t(e)){const s=t||ln;if(n=fg.test(e)&&ti(s)?s.getElementById(e.slice(1).replace(/\\/g,"")):mg.test(e)?Tu(e):Ga(s)?s.find(e):_t(s)?y(s).find(e):qa(e,s),!n)return}else if(ni(e))return this.ready(e);(n.nodeType||n===kr)&&(n=[n]),this.length=n.length;for(let s=0,r=this.length;s{for(;e.firstChild;)e.removeChild(e.firstChild)})};function $r(...i){const e=vg(i[0])?i.shift():!1,t=i.shift(),n=i.length;if(!t)return{};if(!n)return $r(e,y,t);for(let s=0;s{nt(r)&&ct(t,(o,a)=>{n?e?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},ie.addClass=function(i){return this.toggleClass(i,!0)},ie.removeAttr=function(i){const e=Dr(i);return this.each((t,n)=>{nt(n)&&ct(e,(s,r)=>{n.removeAttribute(r)})})};function wg(i,e){if(i){if(_t(i)){if(arguments.length<2){if(!this[0]||!nt(this[0]))return;const t=this[0].getAttribute(i);return ds(t)?void 0:t}return $t(e)?this:ds(e)?this.removeAttr(i):this.each((t,n)=>{nt(n)&&n.setAttribute(i,e)})}for(const t in i)this.attr(t,i[t]);return this}}ie.attr=wg,ie.removeClass=function(i){return arguments.length?this.toggleClass(i,!1):this.attr("class","")},ie.hasClass=function(i){return!!i&&Ka.call(this,e=>nt(e)&&e.classList.contains(i))},ie.get=function(i){return $t(i)?bu.call(this):(i=Number(i),this[i<0?i+this.length:i])},ie.eq=function(i){return y(this.get(i))},ie.first=function(){return this.eq(0)},ie.last=function(){return this.eq(-1)};function Cg(i){return $t(i)?this.get().map(e=>nt(e)||_g(e)?e.textContent:"").join(""):this.each((e,t)=>{nt(t)&&(t.textContent=i)})}ie.text=Cg;function cn(i,e,t){if(!nt(i))return;const n=kr.getComputedStyle(i,null);return t?n.getPropertyValue(e)||void 0:n[e]||i.style[e]}function Yt(i,e){return parseInt(cn(i,e),10)||0}function Cu(i,e){return Yt(i,`border${e?"Left":"Top"}Width`)+Yt(i,`padding${e?"Left":"Top"}`)+Yt(i,`padding${e?"Right":"Bottom"}`)+Yt(i,`border${e?"Right":"Bottom"}Width`)}const Qa={};function xg(i){if(Qa[i])return Qa[i];const e=ei(i);ln.body.insertBefore(e,null);const t=cn(e,"display");return ln.body.removeChild(e),Qa[i]=t!=="none"?t:"block"}function xu(i){return cn(i,"display")==="none"}function ku(i,e){const t=i&&(i.matches||i.webkitMatchesSelector||i.msMatchesSelector);return!!t&&!!e&&t.call(i,e)}function Ir(i){return _t(i)?(e,t)=>ku(t,i):ni(i)?i:Ga(i)?(e,t)=>i.is(t):i?(e,t)=>t===i:()=>!1}ie.filter=function(i){const e=Ir(i);return y(Va.call(this,(t,n)=>e.call(t,n,t)))};function kn(i,e){return e?i.filter(e):i}ie.detach=function(i){return kn(this,i).each((e,t)=>{t.parentNode&&t.parentNode.removeChild(t)}),this};const kg=/^\s*<(\w+)[^>]*>/,Sg=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Su={"*":mu,tr:cg,td:gu,th:gu,thead:Ua,tbody:Ua,tfoot:Ua};function Tu(i){if(!_t(i))return[];if(Sg.test(i))return[ei(RegExp.$1)];const e=kg.test(i)&&RegExp.$1,t=Su[e]||Su["*"];return t.innerHTML=i,y(t.childNodes).detach().get()}y.parseHTML=Tu,ie.has=function(i){const e=_t(i)?(t,n)=>qa(i,n).length:(t,n)=>n.contains(i);return this.filter(e)},ie.not=function(i){const e=Ir(i);return this.filter((t,n)=>(!_t(i)||nt(n))&&!e.call(n,t,n))};function hn(i,e,t,n){const s=[],r=ni(e),o=n&&Ir(n);for(let a=0,l=i.length;ae.selected&&!e.disabled&&!e.parentNode.disabled),"value"):i.value||""}function Tg(i){return arguments.length?this.each((e,t)=>{const n=t.multiple&&t.options;if(n||zu.test(t.type)){const s=Sr(i)?vu.call(i,String):ds(i)?[]:[String(i)];n?ct(t.options,(r,o)=>{o.selected=s.indexOf(o.value)>=0},!0):t.checked=s.indexOf(t.value)>=0}else t.value=$t(i)||ds(i)?"":i}):this[0]&&$u(this[0])}ie.val=Tg,ie.is=function(i){const e=Ir(i);return Ka.call(this,(t,n)=>e.call(t,n,t))},y.guid=1;function Qt(i){return i.length>1?Va.call(i,(e,t,n)=>_u.call(n,e)===t):i}y.unique=Qt,ie.add=function(i,e){return y(Qt(this.get().concat(y(i,e).get())))},ie.children=function(i){return kn(y(Qt(hn(this,e=>e.children))),i)},ie.parent=function(i){return kn(y(Qt(hn(this,"parentNode"))),i)},ie.index=function(i){const e=i?y(i)[0]:this[0],t=i?this:y(e).parent().children();return _u.call(t,e)},ie.closest=function(i){const e=this.filter(i);if(e.length)return e;const t=this.parent();return t.length?t.closest(i):e},ie.siblings=function(i){return kn(y(Qt(hn(this,e=>y(e).parent().children().not(e)))),i)},ie.find=function(i){return y(Qt(hn(this,e=>qa(i,e))))};const $g=/^\s*\s*$/g,Dg=/^$|^module$|\/(java|ecma)script/i,Ig=["type","src","nonce","noModule"];function Ng(i,e){const t=y(i);t.filter("script").add(t.find("script")).each((n,s)=>{if(Dg.test(s.type)&&pu.contains(s)){const r=ei("script");r.text=s.textContent.replace($g,""),ct(Ig,(o,a)=>{s[a]&&(r[a]=s[a])}),e.head.insertBefore(r,null),e.head.removeChild(r)}})}function Mg(i,e,t,n,s){n?i.insertBefore(e,t?i.firstChild:null):i.nodeName==="HTML"?i.parentNode.replaceChild(e,i):i.parentNode.insertBefore(e,t?i:i.nextSibling),s&&Ng(e,i.ownerDocument)}function Sn(i,e,t,n,s,r,o,a){return ct(i,(l,c)=>{ct(y(c),(d,u)=>{ct(y(e),(p,g)=>{const b=t?u:g,C=t?g:u,S=t?d:p;Mg(b,S?C.cloneNode(!0):C,n,s,!S)},a)},o)},r),e}ie.after=function(){return Sn(arguments,this,!1,!1,!1,!0,!0)},ie.append=function(){return Sn(arguments,this,!1,!1,!0)};function Eg(i){if(!arguments.length)return this[0]&&this[0].innerHTML;if($t(i))return this;const e=/]/.test(i);return this.each((t,n)=>{nt(n)&&(e?y(n).empty().append(i):n.innerHTML=i)})}ie.html=Eg,ie.appendTo=function(i){return Sn(arguments,this,!0,!1,!0)},ie.wrapInner=function(i){return this.each((e,t)=>{const n=y(t),s=n.contents();s.length?s.wrapAll(i):n.append(i)})},ie.before=function(){return Sn(arguments,this,!1,!0)},ie.wrapAll=function(i){let e=y(i),t=e[0];for(;t.children.length;)t=t.firstElementChild;return this.first().before(e),this.appendTo(t)},ie.wrap=function(i){return this.each((e,t)=>{const n=y(i)[0];y(t).wrapAll(e?n.cloneNode(!0):n)})},ie.insertAfter=function(i){return Sn(arguments,this,!0,!1,!1,!1,!1,!0)},ie.insertBefore=function(i){return Sn(arguments,this,!0,!0)},ie.prepend=function(){return Sn(arguments,this,!1,!0,!0,!0,!0)},ie.prependTo=function(i){return Sn(arguments,this,!0,!0,!0,!1,!1,!0)},ie.contents=function(){return y(Qt(hn(this,i=>i.tagName==="IFRAME"?[i.contentDocument]:i.tagName==="TEMPLATE"?i.content.childNodes:i.childNodes)))},ie.next=function(i,e,t){return kn(y(Qt(hn(this,"nextElementSibling",e,t))),i)},ie.nextAll=function(i){return this.next(i,!0)},ie.nextUntil=function(i,e){return this.next(e,!0,i)},ie.parents=function(i,e){return kn(y(Qt(hn(this,"parentElement",!0,e))),i)},ie.parentsUntil=function(i,e){return this.parents(e,i)},ie.prev=function(i,e,t){return kn(y(Qt(hn(this,"previousElementSibling",e,t))),i)},ie.prevAll=function(i){return this.prev(i,!0)},ie.prevUntil=function(i,e){return this.prev(e,!0,i)},ie.map=function(i){return y(hg.apply([],vu.call(this,(e,t)=>i.call(e,t,e))))},ie.clone=function(){return this.map((i,e)=>e.cloneNode(!0))},ie.offsetParent=function(){return this.map((i,e)=>{let t=e.offsetParent;for(;t&&cn(t,"position")==="static";)t=t.offsetParent;return t||pu})},ie.slice=function(i,e){return y(bu.call(this,i,e))};const Ag=/-([a-z])/g;function Xa(i){return i.replace(Ag,(e,t)=>t.toUpperCase())}ie.ready=function(i){const e=()=>setTimeout(i,0,y);return ln.readyState!=="loading"?e():ln.addEventListener("DOMContentLoaded",e),this},ie.unwrap=function(){return this.parent().each((i,e)=>{if(e.tagName==="BODY")return;const t=y(e);t.replaceWith(t.children())}),this},ie.offset=function(){const i=this[0];if(!i)return;const e=i.getBoundingClientRect();return{top:e.top+kr.pageYOffset,left:e.left+kr.pageXOffset}},ie.position=function(){const i=this[0];if(!i)return;const e=cn(i,"position")==="fixed",t=e?i.getBoundingClientRect():this.offset();if(!e){const n=i.ownerDocument;let s=i.offsetParent||n.documentElement;for(;(s===n.body||s===n.documentElement)&&cn(s,"position")==="static";)s=s.parentNode;if(s!==i&&nt(s)){const r=y(s).offset();t.top-=r.top+Yt(s,"borderTopWidth"),t.left-=r.left+Yt(s,"borderLeftWidth")}}return{top:t.top-Yt(i,"marginTop"),left:t.left-Yt(i,"marginLeft")}};const Du={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};ie.prop=function(i,e){if(i){if(_t(i))return i=Du[i]||i,arguments.length<2?this[0]&&this[0][i]:this.each((t,n)=>{n[i]=e});for(const t in i)this.prop(t,i[t]);return this}},ie.removeProp=function(i){return this.each((e,t)=>{delete t[Du[i]||i]})};const Pg=/^--/;function Za(i){return Pg.test(i)}const Ja={},{style:Lg}=mu,Rg=["webkit","moz","ms"];function Og(i,e=Za(i)){if(e)return i;if(!Ja[i]){const t=Xa(i),n=`${t[0].toUpperCase()}${t.slice(1)}`,s=`${t} ${Rg.join(`${n} `)}${n}`.split(" ");ct(s,(r,o)=>{if(o in Lg)return Ja[i]=o,!1})}return Ja[i]}const zg={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 Iu(i,e,t=Za(i)){return!t&&!zg[i]&&wu(e)?`${e}px`:e}function Fg(i,e){if(_t(i)){const t=Za(i);return i=Og(i,t),arguments.length<2?this[0]&&cn(this[0],i,t):i?(e=Iu(i,e,t),this.each((n,s)=>{nt(s)&&(t?s.style.setProperty(i,e):s.style[i]=e)})):this}for(const t in i)this.css(t,i[t]);return this}ie.css=Fg;function Nu(i,e){try{return i(e)}catch{return e}}const jg=/^\s+|\s+$/;function Mu(i,e){const t=i.dataset[e]||i.dataset[Xa(e)];return jg.test(t)?t:Nu(JSON.parse,t)}function Bg(i,e,t){t=Nu(JSON.stringify,t),i.dataset[Xa(e)]=t}function Hg(i,e){if(!i){if(!this[0])return;const t={};for(const n in this[0].dataset)t[n]=Mu(this[0],n);return t}if(_t(i))return arguments.length<2?this[0]&&Mu(this[0],i):$t(e)?this:this.each((t,n)=>{Bg(n,i,e)});for(const t in i)this.data(t,i[t]);return this}ie.data=Hg;function Eu(i,e){const t=i.documentElement;return Math.max(i.body[`scroll${e}`],t[`scroll${e}`],i.body[`offset${e}`],t[`offset${e}`],t[`client${e}`])}ct([!0,!1],(i,e)=>{ct(["Width","Height"],(t,n)=>{const s=`${e?"outer":"inner"}${n}`;ie[s]=function(r){if(this[0])return $i(this[0])?e?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:ti(this[0])?Eu(this[0],n):this[0][`${e?"offset":"client"}${n}`]+(r&&e?Yt(this[0],`margin${t?"Top":"Left"}`)+Yt(this[0],`margin${t?"Bottom":"Right"}`):0)}})}),ct(["Width","Height"],(i,e)=>{const t=e.toLowerCase();ie[t]=function(n){if(!this[0])return $t(n)?void 0:this;if(!arguments.length)return $i(this[0])?this[0].document.documentElement[`client${e}`]:ti(this[0])?Eu(this[0],e):this[0].getBoundingClientRect()[t]-Cu(this[0],!i);const s=parseInt(n,10);return this.each((r,o)=>{if(!nt(o))return;const a=cn(o,"boxSizing");o.style[t]=Iu(t,s+(a==="border-box"?Cu(o,!i):0))})}});const Au="___cd";ie.toggle=function(i){return this.each((e,t)=>{if(!nt(t))return;const n=xu(t);($t(i)?n:i)?(t.style.display=t[Au]||"",xu(t)&&(t.style.display=xg(t.tagName))):n||(t[Au]=cn(t,"display"),t.style.display="none")})},ie.hide=function(){return this.toggle(!1)},ie.show=function(){return this.toggle(!0)};const Pu="___ce",el=".",tl={focus:"focusin",blur:"focusout"},Lu={mouseenter:"mouseover",mouseleave:"mouseout"},Wg=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function nl(i){return Lu[i]||tl[i]||i}function il(i){const e=i.split(el);return[e[0],e.slice(1).sort()]}ie.trigger=function(i,e){if(_t(i)){const[n,s]=il(i),r=nl(n);if(!r)return this;const o=Wg.test(r)?"MouseEvents":"HTMLEvents";i=ln.createEvent(o),i.initEvent(r,!0,!0),i.namespace=s.join(el),i.___ot=n}i.___td=e;const t=i.___ot in tl;return this.each((n,s)=>{t&&ni(s[i.___ot])&&(s[`___i${i.type}`]=!0,s[i.___ot](),s[`___i${i.type}`]=!1),s.dispatchEvent(i)})};function Ru(i){return i[Pu]=i[Pu]||{}}function Ug(i,e,t,n,s){const r=Ru(i);r[e]=r[e]||[],r[e].push([t,n,s]),i.addEventListener(e,s)}function Ou(i,e){return!e||!Ka.call(e,t=>i.indexOf(t)<0)}function Nr(i,e,t,n,s){const r=Ru(i);if(e)r[e]&&(r[e]=r[e].filter(([o,a,l])=>{if(s&&l.guid!==s.guid||!Ou(o,t)||n&&n!==a)return!0;i.removeEventListener(e,l)}));else for(e in r)Nr(i,e,t,n,s)}ie.off=function(i,e,t){if($t(i))this.each((n,s)=>{!nt(s)&&!ti(s)&&!$i(s)||Nr(s)});else if(_t(i))ni(e)&&(t=e,e=""),ct(Dr(i),(n,s)=>{const[r,o]=il(s),a=nl(r);this.each((l,c)=>{!nt(c)&&!ti(c)&&!$i(c)||Nr(c,a,o,e,t)})});else for(const n in i)this.off(n,i[n]);return this},ie.remove=function(i){return kn(this,i).detach().off(),this},ie.replaceWith=function(i){return this.before(i).remove()},ie.replaceAll=function(i){return y(i).replaceWith(this),this};function Vg(i,e,t,n,s){if(!_t(i)){for(const r in i)this.on(r,e,t,i[r],s);return this}return _t(e)||($t(e)||ds(e)?e="":$t(t)?(t=e,e=""):(n=t,t=e,e="")),ni(n)||(n=t,t=void 0),n?(ct(Dr(i),(r,o)=>{const[a,l]=il(o),c=nl(a),d=a in Lu,u=a in tl;c&&this.each((p,g)=>{if(!nt(g)&&!ti(g)&&!$i(g))return;const b=function(C){if(C.target[`___i${C.type}`])return C.stopImmediatePropagation();if(C.namespace&&!Ou(l,C.namespace.split(el))||!e&&(u&&(C.target!==g||C.___ot===c)||d&&C.relatedTarget&&g.contains(C.relatedTarget)))return;let S=g;if(e){let D=C.target;for(;!ku(D,e);)if(D===g||(D=D.parentNode,!D))return;S=D}Object.defineProperty(C,"currentTarget",{configurable:!0,get(){return S}}),Object.defineProperty(C,"delegateTarget",{configurable:!0,get(){return g}}),Object.defineProperty(C,"data",{configurable:!0,get(){return t}});const x=n.call(S,C,C.___td);s&&Nr(g,c,l,e,b),x===!1&&(C.preventDefault(),C.stopPropagation())};b.guid=n.guid=n.guid||y.guid++,Ug(g,c,l,e,b)})}),this):this}ie.on=Vg;function Kg(i,e,t,n){return this.on(i,e,t,n,!0)}ie.one=Kg;const qg=/\r?\n/g;function Gg(i,e){return`&${encodeURIComponent(i)}=${encodeURIComponent(e.replace(qg,`\r `))}`}const Yg=/file|reset|submit|button|image/i,zu=/radio|checkbox/i;ie.serialize=function(){let i="";return this.each((e,t)=>{ct(t.elements||[t],(n,s)=>{if(s.disabled||!s.name||s.tagName==="FIELDSET"||Yg.test(s.type)||zu.test(s.type)&&!s.checked)return;const r=$u(s);if(!$t(r)){const o=Sr(r)?r:[r];ct(o,(a,l)=>{i+=Gg(s.name,l)})}})}),i.slice(1)},window.$=y;function Fu(i,e){if(i==null)return[i,void 0];typeof e=="string"&&(e=e.split("."));const t=e.join(".");let n=i;const s=[n];for(;typeof n=="object"&&n!==null&&e.length;){let r=e.shift(),o;const a=r.indexOf("[");if(a>0&&a{const s=t[n]??"";i=i.replace(new RegExp(`\\{${n}\\}`,"g"),`${s}`)}),i}for(let t=0;t(i[i.B=1]="B",i[i.KB=1024]="KB",i[i.MB=1048576]="MB",i[i.GB=1073741824]="GB",i[i.TB=1099511627776]="TB",i))(sl||{});function dt(i,e=2,t){return Number.isNaN(i)?"?KB":(t||(i<1024?t="B":i<1048576?t="KB":i<1073741824?t="MB":i<1099511627776?t="GB":t="TB"),(i/sl[t]).toFixed(e)+t)}const $n=i=>{const e=/^[0-9]*(B|KB|MB|GB|TB)$/;i=i.toUpperCase();const t=i.match(e);if(!t)return 0;const n=t[1];return i=i.replace(n,""),Number.parseInt(i,10)*sl[n]};let rl=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),un;function Qg(){return rl}function Xg(i){rl=i.toLowerCase().replace("-","_")}function ju(i,e){un||(un={}),typeof i=="string"&&(i={[i]:e??{}}),y.extend(!0,un,i)}function Ne(i,e,t,n,s,r){Array.isArray(i)?un&&i.unshift(un):i=un?[un,i]:[i],typeof t=="string"&&(r=s,s=n,n=t,t=void 0);const o=s||rl;let a;for(const l of i){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const d=r&&l===un?`${r}.${e}`:e;if(a=fs(c,d),a!==void 0)break}return a===void 0?n:t?Ce(a,...Array.isArray(t)?t:[t]):a}function Zg(i,e,t,n){return Ne(void 0,i,e,t,n)}Ne.addLang=ju,Ne.getLang=Zg,Ne.getCode=Qg,Ne.setCode=Xg,Ne.map=un,ju({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 Bu(i,e,t){i instanceof Headers?i.set(e,t):Array.isArray(i)?i.push([e,t]):i[e]=t}function Di(i,e,t){t!=null&&(Array.isArray(t)?t.forEach(n=>Di(i,e,n)):!(t instanceof Blob)&&y.isPlainObject(t)?Object.entries(t).forEach(([n,s])=>{Di(i,`${e}[${n}]`,s)}):i.append(e,t instanceof Blob?t:String(t)))}function Jg(i,e){if(i){const t={text:"text/plain",html:"text/html",json:"application/json",...e};for(const[n,s]of Object.entries(t))if(s.split(",").map(r=>r.trim()).includes(i))return n}return"text"}function Mr(i,e){const t=e||new FormData;return i&&(typeof i=="string"&&(i=new URLSearchParams(i)),i instanceof URLSearchParams?i.forEach((n,s)=>{Di(t,s,n)}):Array.isArray(i)?i.forEach(([n,s])=>{Di(t,n,s)}):i instanceof FormData?i.forEach((n,s)=>{Di(t,s,n)}):y.isPlainObject(i)&&Object.entries(i).forEach(([n,s])=>{Di(t,n,s)})),t}class ps{get completed(){return this.data!==void 0||this.error!==void 0}get[Symbol.toStringTag](){return"Ajax"}constructor(e){this.setting=e,this._controller=new AbortController,this._callbacks={success:[],error:[],complete:[]}}on(e,t){return this._callbacks[e].push(t),this}success(e){return this.on("success",e)}done(e){return this.success(e)}fail(e){return this.on("error",e)}complete(e){return this.on("complete",e)}always(e){return this.complete(e)}then(e,t){return this.completed?t&&this.error?t(this.error):e(this.data):(this.success(n=>e(n)),t&&this.fail(t)),this}catch(e){return this.error?(e(this.error),this):this.on("error",t=>e(t))}finally(e){return this.completed?(e(),this):this.complete(()=>e())}abort(e){return this.completed?!1:(this._abortError=e,this._controller.abort(),!0)}getResponseHeader(e){var t;return(t=this.response)==null?void 0:t.headers.get(e)}_init(){if(this.completed)return;const{url:e,type:t,data:n,processData:s=!0,contentType:r,crossDomain:o,accepts:a,dataType:l,timeout:c,dataFilter:d,beforeSend:u,success:p,error:g,complete:b,...C}=this.setting;t&&(C.method=t);let S=n;S&&(s&&(S=Mr(S)),C.body=S),o&&(C.mode="cors");const x=C.headers||{};Bu(x,"X-Requested-With","XMLHttpRequest"),r&&Bu(x,"Content-Type",r),C.headers=x,C.signal&&C.signal.addEventListener("abort",()=>{this.abort()});const D=[...this.constructor.globalBeforeSends,u];for(const A of D){if(!A)continue;const B=A.call(this,C);if(B===!1)return;B&&Object.assign(C,B)}p&&this.success(p),g&&this.fail(g),b&&this.complete(b),C.signal=this._controller.signal,this.url=e,this.request=C}_emit(e,...t){this._callbacks[e].forEach(n=>{n.call(this,...t)})}async send(){var d;if(this.completed)return[];this._init();const{timeout:e,dataType:t,accepts:n,dataFilter:s,throws:r,jsonParser:o}=this.setting;e&&(this._timeoutID=window.setTimeout(()=>{this.abort(new Error("timeout"))},e));let a,l,c;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:u}=a;if(a.ok){const p=(d=a.headers.get("Content-Disposition"))==null?void 0:d.startsWith("attachment"),g=p?"blob":t||Jg(a.headers.get("Content-Type"),n);p||g==="blob"||g==="file"?c=await a.blob():g==="json"?typeof o=="function"?(c=await a.text(),c=o(c)):c=await a.json():c=await a.text(),this.data=c;const b=(s==null?void 0:s(c,g))??c;this._emit("success",b,u,a)}else throw this.data=await a.text(),new Error(u)}catch(u){this.data===void 0&&c!==void 0&&(this.data=c),l=u;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]}}ps.globalBeforeSends=[],y.ajax=(i,e)=>{e=e||{},typeof i=="string"?e.url=i:y.extend(e,i);const t=new ps(e);return t.send(),t},y.getJSON=(i,e,t)=>(typeof e=="function"&&(t=e,e=void 0),y.ajax({url:i,data:e,success:t,dataType:"json"})),y.get=(i,e,t,n,s="GET")=>{let r,o;return typeof e=="function"?(r=e,o=void 0):o=e,typeof t=="function"?(r=t,n=void 0):n=t,y.ajax({method:s,url:i,data:o,success:r,dataType:n})},y.post=(i,e,t,n)=>y.get(i,e,t,n,"POST"),y.fn.load=function(i,e,t){typeof e=="function"&&(t=e,e=void 0);const[n,s]=i.split(" ");return y.get(n,e,(r,o,a)=>{s&&(r=y(r).find(s).html()),y(this).html(r).zuiInit(),t==null||t.call(this,r,o,a)},"html"),this};async function zt(i,e=[],t,n,s){const r={throws:!0,dataType:"json"};if(typeof i=="string")r.url=i;else if(typeof i=="object")y.extend(r,i);else if(typeof i=="function"){const l=i.call(n,...e);return l instanceof Promise?await l:l}t&&y.extend(r,typeof t=="function"?t(r):t),r.url&&(r.url=Ce(r.url,...e));const o=new ps(r);s==null||s(o);const[a]=await o.send();return a}function ol(i){return!!(i&&(typeof i=="string"||typeof i=="object"&&i.url||typeof i=="function"))}y.fetch=zt;function ft(){return y.guid++}function Er(i,e){if(i===e)return!1;if(i&&e){const t=typeof i,n=typeof e;if(t!==n)return!0;if(t==="object"&&n==="object"){const s=Array.isArray(i),r=Array.isArray(e);if(s!==r)return!0;if(s&&r){if(i.length!==e.length)return!0;for(let l=0;ln instanceof ii?n.value!==t[s]:Er(n,t[s])))&&(this._value=this._compute(),this._lastDependencies=e.map(n=>n instanceof ii?n.cache:n)),this._value}}function al(...i){const e=[],t=new Map,n=(s,r)=>{if(Array.isArray(s)&&(r=s[1],s=s[0]),!s.length)return;const o=t.get(s);typeof o=="number"?e[o][1]=!!r:(t.set(s,e.length),e.push([s,!!r]))};return i.forEach(s=>{typeof s=="function"&&(s=s()),Array.isArray(s)?al(...s).forEach(n):s&&typeof s=="object"?Object.entries(s).forEach(n):typeof s=="string"&&s.split(" ").forEach(r=>n(r,!0))}),e.sort((s,r)=>(t.get(s[0])||0)-(t.get(r[0])||0))}const V=(...i)=>al(...i).reduce((e,[t,n])=>(n&&e.push(t),e),[]).join(" ");y.classes=V,y.fn.setClass=function(i,...e){return this.each((t,n)=>{const s=y(n);i===!0?s.attr("class",V(s.attr("class"),...e)):s.addClass(V(i,...e))})};const Ii=new WeakMap;function Ar(i,e,t){const n=Ii.has(i),s=n?Ii.get(i):{};typeof e=="string"?s[e]=t:e===null?Object.keys(s).forEach(r=>{delete s[r]}):Object.assign(s,e),Object.keys(s).forEach(r=>{s[r]===void 0&&delete s[r]}),Object.keys(s).length?(!n&&i instanceof Element&&Object.assign(s,y(i).dataset(),s),Ii.set(i,s)):Ii.delete(i)}function ms(i,e,t){let n=Ii.get(i)||{};return t&&i instanceof Element&&(n=Object.assign({},y(i).dataset(),n)),e===void 0?n:n[e]}function ey(i){Ii.delete(i)}y.fn.dataset=y.fn.data,y.fn.data=function(...i){const[e,t]=i;return!i.length||i.length===1&&typeof e=="string"?this.length?ms(this[0],e,!0):void 0:this.each((n,s)=>Ar(s,e,t))},y.fn.removeData=function(i=null){return this.each((e,t)=>Ar(t,i))};function si(i,...e){return i.includes("RAWJS")&&(i=i.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` `)),new Function(`return ${i}`)(...e)}function ll(i,...e){return i.includes("RAWJS")?si(i,...e):JSON.parse(i)}function Ni(i,e){const t=y(i)[0];if(!t)return;const{prefix:n,getter:s,evalValue:r,json:o=!0,evalArgs:a=[]}={prefix:"z-",...typeof e=="string"?{prefix:e}:e},l=Array.isArray(r)?new Set(r):void 0;return Array.from(t.attributes).reduce((c,d)=>{let{name:u}=d;const{value:p}=d;let g=p;if(u.startsWith(n)){if(u=u.slice(n.length).replace(/-([a-z])/g,b=>b[1].toUpperCase()),s)g=s(u,p);else try{r&&(!l||l.has(u))||r===void 0&&p.includes("RAWJS")?g=si(p,...a):o&&(g=JSON.parse(p))}catch{}c[u]=g}return c},{})}function cl(i,e,t="z-"){const n=y(i);Object.keys(e).forEach(s=>{let r=e[s];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),s=s.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),n.attr(`${t}${s}`,r)})}function ty(...i){var t;const e=i.length;if(!e)return Ni(this);if(e===1){const[n]=i;return typeof n=="string"?(t=Ni(this))==null?void 0:t[n]:(y.isPlainObject(n)&&cl(this,n),this)}return cl(this,{[i[0]]:i[1]}),this}y.fn.z=ty,y.fn._attr=y.fn.attr,y.fn.extend({attr(...i){const[e,t]=i;return!i.length||i.length===1&&typeof e=="string"?this._attr.apply(this,i):typeof e=="object"?(e&&Object.keys(e).forEach(n=>{const s=e[n];s===null?this.removeAttr(n):this._attr(n,s)}),this):t===null?this.removeAttr(e):this._attr(e,t)}}),y.Event||(y.Event=(i,e)=>{const[t,...n]=i.split("."),s=new Event(t,{bubbles:!0,cancelable:!0});return s.namespace=n.join("."),s.___ot=t,s.___td=e,s});const gs=(i,e)=>new Promise(t=>{const n=window.setTimeout(t,i);e&&e(n)}),Hu={};y.share=Hu;var Pr,Oe,Wu;N.isValidElement=void 0;var ri,Uu,Vu,hl,ul,dl,fl,ys={},Ku=[],ny=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lr=Array.isArray;function Dn(i,e){for(var t in e)i[t]=e[t];return i}function qu(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function w(i,e,t){var n,s,r,o={};for(r in e)r=="key"?n=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?Pr.call(arguments,2):t),typeof i=="function"&&i.defaultProps!=null)for(r in i.defaultProps)o[r]===void 0&&(o[r]=i.defaultProps[r]);return Rr(i,o,n,s,null)}function Rr(i,e,t,n,s){var r={type:i,props:e,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Wu,__i:-1,__u:0};return s==null&&Oe.vnode!=null&&Oe.vnode(r),r}function fe(){return{current:null}}function In(i){return i.children}function pe(i,e){this.props=i,this.context=e}function Mi(i,e){if(e==null)return i.__?Mi(i.__,i.__i+1):null;for(var t;ee&&ri.sort(hl));Or.__r=0}function Qu(i,e,t,n,s,r,o,a,l,c,d){var u,p,g,b,C,S=n&&n.__k||Ku,x=e.length;for(t.__d=l,iy(t,e,S),l=t.__d,u=0;u0?Rr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=i,s.__b=i.__b+1,r=null,(a=s.__i=sy(s,t,o,d))!==-1&&(d--,(r=t[a])&&(r.__u|=131072)),r==null||r.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a==o-1?u--:a==o+1?u++:(a>o?u--:u++,s.__u|=65536))):s=i.__k[n]=null;if(d)for(n=0;n(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a=0){if((l=e[o])&&!(131072&l.__u)&&s==l.key&&r===l.type)return o;o--}if(a{!t||typeof t!="object"||Object.keys(t).forEach(n=>{let s=t[n];const r=i[n];s!==r&&(r!==void 0&&(n==="className"||n.endsWith("Class")?s=[r,s]:n==="children"?s=[...zr(r),...zr(s)]:typeof r=="object"&&(n==="style"||n.endsWith("Style")||n==="attrs"||n.endsWith("Attrs")||n==="props")&&(s=y.extend(r,s))),i[n]=s)})}),i}function gl(i){return Object.keys(i).forEach(e=>{i[e]===void 0&&delete i[e]}),i}function nd(i,e=!0){const t=y(i),n=t[0],s="zui-disable-scroll";if(e){if(t.data(s))return;if((t.css("scrollbar-gutter")||"").includes("stable")){t.data(s,{overflow:t.css("overflow")}).css("overflow","hidden");return}const r=n===document.body||t.is("html")?window.innerWidth-document.body.clientWidth:n.offsetWidth-n.clientWidth;if(!r)return;const o=t.css("paddingRight")||"0";t.data(s,{paddingRight:o,overflow:t.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=t.data(s);if(!r)return;t.css(r).removeData(s)}}y.fn.disableScroll=function(i=!0){return this.each((e,t)=>{nd(t,i)})},y.fn.enableScroll=function(i=!0){return this.disableScroll(!i)};function yl(i,e,t){if(!(t.on||"click").split(" ").includes(e.type))return;const n=t.selector?y(e.target).closest(t.selector):i;if(!n.length)return;const s=c=>c===""?!0:c,r=c=>{if(typeof c=="string")try{c=JSON.parse(c)}catch{}return c};if(s(t.once)){if(t.onceCalled)return;i.dataset("once-called",!0)}if(s(t.prevent)&&e.preventDefault(),s(t.stop)&&e.stopPropagation(),s(t.self)&&e.currentTarget!==e.target)return;const o=[["$element",i],["event",e],["options",t],["$target",n]],a=c=>typeof c=="function"?c(...o):y.runJS(c,...o);if(t.if!==void 0&&!a(t.if))return;const l=t.call;if(l){let c;if(typeof l=="string"?c=/^[$A-Z_][0-9A-Z_$.]*$/i.test(l)?fs(window,l):a(l):c=l,typeof c=="function"){const d=[],u=t.params;t.params=d,typeof u=="string"&&u.length?u[0]==="["?d.push(...r(u)):d.push(...u.split(", ").map(p=>(p=p.trim(),p==="$element"?i:p==="event"?e:p==="options"?t:p.startsWith("$element.")||p.startsWith("event.")||p.startsWith("options.")?a(p):r(p)))):Array.isArray(u)?d.push(...u):d.push(u),c(...d)}}t.do&&a(t.do)}function ay(i){const e=y(this),t=i.type,n=e.attr("zui-on");if(n){const[o,a]=n.split("~").map(l=>l.trim());o&&o.split(" ").includes(t)&&yl(e,i,y.extend({on:o},a?a.startsWith("{")?si(a):{do:a}:Ni(e,{prefix:"data-",evalValue:["call","if","do"]})))}const s=e.attr(`zui-on-${t}`);s&&yl(e,i,y.extend({on:t},s.startsWith("{")?si(s):{do:s}));const r=e.attr("data-on");r&&r.split(" ").includes(t)&&yl(e,i,Ni(e,{prefix:"data-",evalValue:["call","if","do"]}))}function id(i){y(document).off(".zui.global").on(i.map(e=>`${e}.zui.global`).join(" "),`[zui-on],${i.map(e=>`[zui-on-${e}]`)},[data-on]`,ay)}y(()=>{id(["click","change","inited"])});function ai(i,e){if(typeof i=="function")return ai(i(...e||[]));if(typeof i=="number")return[i];let t=i.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=i.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function Be(i,e){if(i==null)return null;const[t,n="px"]=ai(i,e);return Number.isNaN(t)?typeof i=="string"?i:null:`${t}${n}`}async function jr(i,e){var n,s,r;if(i instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(i),e&&(o.download=decodeURIComponent(e)),o.click(),o.remove(),i}if(i instanceof Response){const o=await i.blob();return e=e||((r=(s=(n=i.headers.get("Content-Disposition"))==null?void 0:n.split(";")[1])==null?void 0:s.split("=")[1])==null?void 0:r.replace(/"/g,"")),jr(o,e)}const t=await fetch(i);return jr(t)}class sd{constructor(e){this._$target=y(e)}on(...e){return this._$target.on(...e),this}one(...e){return this._$target.one(...e),this}off(...e){return this._$target.off(...e),this}trigger(...e){return this._$target.trigger(...e),this}}const Xt=new sd(document);y.bus=Xt,y.on=Xt.on.bind(Xt),y.one=Xt.one.bind(Xt),y.off=Xt.off.bind(Xt),y.trigger=Xt.trigger.bind(Xt);var ly=["Shift","Meta","Alt","Control"],rd=typeof navigator=="object"?navigator.platform:"",od=/Mac|iPod|iPhone|iPad/.test(rd),cy=od?"Meta":"Control",hy=rd==="Win32"?["Control","Alt"]:od?["Alt"]:[];function _l(i,e){return typeof i.getModifierState=="function"&&(i.getModifierState(e)||hy.includes(e)&&i.getModifierState("AltGraph"))}function uy(i){return i.trim().split(" ").map(function(e){var t=e.split(/\b\+/),n=t.pop();return[t=t.map(function(s){return s==="$mod"?cy:s}),n]})}function ad(i,e){var t;e===void 0&&(e={});var n=(t=e.timeout)!=null?t:1e3,s=Object.keys(i).map(function(a){return[uy(a),i[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(s.forEach(function(l){var c=l[0],d=l[1],u=r.get(c)||c;(function(p,g){return!(g[1].toUpperCase()!==p.key.toUpperCase()&&g[1]!==p.code||g[0].find(function(b){return!_l(p,b)})||ly.find(function(b){return!g[0].includes(b)&&g[1]!==b&&_l(p,b)}))})(a,u[0])?u.length>1?r.set(c,u.slice(1)):(r.delete(c),d(a)):_l(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function dy(i,e,t){var n;t===void 0&&(t={});var s=(n=t.event)!=null?n:"keydown",r=ad(e,t);return i.addEventListener(s,r),function(){i.removeEventListener(s,r)}}function vl(i,e={}){if(!i)return;const t=Object.keys(e).reduce((n,s)=>(e[s].optional||(n[s]={...e[s]}),n),{});return Object.keys(i).forEach(n=>{const s=i[n];s?s===!0?e[n]&&(t[n]={...e[n]}):t[n]=s:delete t[n]}),Object.keys(t).reduce((n,s)=>{const{keys:r,handler:o}=t[s];return typeof r=="string"?n[r]=o:r.forEach(a=>{n[a]=o}),n},{})}function bl(i,e,t){const{timeout:n,event:s="keydown",scope:r,when:o}=t||{},a=ad(e,{timeout:n}),l=`.zui.hotkeys${r?`.${r}`:""}`,c="zui-hotkeys-composing";return y(i).on(`${s}${l}`,function(d){o&&o(d)===!1||y(d.target).data(c)||a(d)}).on(`compositionstart${l}`,d=>{y(d.target).data(c,!0)}).on(`compositionend${l}`,d=>{y(d.target).removeData(c)})}function wl(i,e){return y(i).off(`.zui.hotkeys${e?`.${e}`:""}`)}const fy=dy;y.fn.hotkeys=function(i,e){return bl(this,i,e)},y.fn.unbindHotkeys=function(i){return wl(this,i)},y.hotkeys=function(i,e){bl(window,i,e)},y.unbindHotkeys=function(i){wl(window,i)};function Br(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function ld(i){(typeof i=="string"||i instanceof Element||i instanceof y)&&(i={target:i});const{target:e,onError:t,onSuccess:n,afterExit:s,afterEnter:r}=i,o=y(e),a=o[0];if(!a)return;const l=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!l){t==null||t.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await l.call(a),n==null||n.call(a),y(a).off(".zui.fullscreen"),s&&o.on("exitFullscreen.zui.fullscreen",s),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(c){t==null||t.call(a,c)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,y(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",c=>{const d=Br();let u=d;d?y(d).addClass("is-in-fullscreen"):(u=y(document).find(".is-in-fullscreen")[0]||document,y(u).removeClass("is-in-fullscreen")),y("body").toggleClass("has-in-fullscreen",!!d);const p={event:c,target:u,fullscreenElement:d};y(u).trigger(d?"enterFullscreen":"exitFullscreen",p).trigger("toggleFullscreen",p)}))}async function Cl(i){const e=Br();return i===!1&&!!e===i?i:e?(document.exitFullscreen(),!1):(await ld(i),!0)}y.fn.fullscreen=function(i){return Cl({target:this,...i})},y.getFullscreenElement=Br,y.toggleFullscreen=Cl;function Nn(i){return!i||i.parentNode===document?!1:i.parentNode?Nn(i.parentNode):!0}y.isDetached=Nn,y.fn.isDetached=function(){const i=this[0];return!i||Nn(i)};const li=class Ym{constructor(e,t){var g;this._inited=!1,this._autoDestory=0,this._destroyed=!1;const{KEY:n,DATA_KEY:s,MULTI_INSTANCE:r,NAME:o,ATTR_KEY:a,ALL:l,TYPED_ALL:c}=this.constructor;if(!o)throw new Error('[ZUI] The component must have a "NAME" static property.');const d=y(e);if(d.data(n)&&!r)throw new Error(`[ZUI] The component "${o}" has been initialized on element.`);const u=d[0],p=ft();if(this._gid=p,this._element=u,this.resetOptions(t),this._key=this.options.key??`__${p}`,l.has(u)?l.get(u).add(this):l.set(u,new Set([this])),c.has(o)?c.get(o).add(this):c.set(o,new Set([this])),d.data(n,this).attr(a,"").attr(s,`${p}`),r){const b=`${n}:ALL`;let C=d.data(b);C||(C=new Map,d.data(b,C)),C.set(this._key,this)}this.init(),(g=this.options.$onCreate)==null||g.call(this),requestAnimationFrame(async()=>{var b;this._inited=!0,await this.afterInit(),this.emit("inited",this.options),(b=this.options.$onInited)==null||b.call(this)})}static get ZUI(){return this.NAME.replace(/(^[A-Z]+)/,e=>e.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 y(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(e,t){this.setOptions(e,t)}destroy(){var p;const{KEY:e,DATA_KEY:t,ALL:n,TYPED_ALL:s,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(e).removeAttr(a).removeAttr(t),o){const g=this.$element.data(`${e}:ALL`);if(g)if(g.delete(this._key),g.size===0)this.$element.removeData(`${e}:ALL`);else{const b=g.values().next().value;l.data(e,b).attr(t,String(b==null?void 0:b.gid))}}const d=n.get(c);d&&(d.delete(this),d.size===0&&n.delete(c));const u=s.get(r);u&&(u.delete(this),u.size===0&&s.delete(r)),(p=this.options.$onDestroy)==null||p.call(this)}autoDestroy(e=100){this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,Nn(this.element)&&this.destroy()},e)}setOptions(e,t){if(t){const n={...this.constructor.DEFAULT,...(e==null?void 0:e.$optionsFromDataset)!==!1?this.$element.dataset():{},...e},{$options:s}=n;if(s){const r=typeof s=="function"?s.call(this,this.element,n):s;r&&y.extend(n,r),delete n.$options}this._options=n}else e&&y.extend(this._options,e);return this._options}resetOptions(e){return this.setOptions(e,!0)}emit(e,...t){const n=y.Event(e);return n.__src=this,this.$emitter.trigger(n,[this,...t]),n}on(e,t,n){const s=this;this.$element[n!=null&&n.once?"one":"on"](this._wrapEvent(e),function(r,o){(!r.__src||r.__src===s)&&t.call(this,r,o)})}one(e,t){this.on(e,t,{once:!0})}off(e){this.$element.off(this._wrapEvent(e))}i18n(e,t,n){const{i18nData:s}=this;return Ne(s,e,t,n,this.options.lang,this.constructor.NAME)??Ne(s,e,t,n,this.options.lang)??`{i18n:${e}}`}get namespace(){return`${this.constructor.NAMESPACE}.${this._key}`}_wrapEvent(e){return e.split(" ").map(t=>t.includes(".")?t:`${t}${this.namespace}`).join(" ")}static get(e,t){const n=y(e);if(this.MULTI_INSTANCE&&t!==void 0){const s=n.data(`${this.KEY}:ALL`);return s?s.get(t):void 0}return n.data(this.KEY)}static isValid(e){return!0}static ensure(e,t){const n=this.get(e,t==null?void 0:t.key);if(n){if(this.isValid(n))return t&&n.setOptions(t),n;n.destroy()}return new this(e,t)}static getAll(e,t){var l;const{SELECTOR:n,ALL:s,TYPED_ALL:r}=this,o=[],a=c=>{c instanceof this&&(!t||t(c)!==!1)&&o.push(c)};return e?y(e).find(n).each((c,d)=>{var u;(u=s.get(d))==null||u.forEach(a)}):this!==Ym?(l=r.get(this.NAME))==null||l.forEach(a):s.forEach(c=>{c.forEach(a)}),o.sort((c,d)=>c.gid-d.gid)}static query(e,t,n){return e===void 0?this.getAll(void 0,n).pop():this.get(y(e).closest(this.SELECTOR),t)}static defineFn(e){let t=e||this.ZUI;y.fn[t]&&(t=`zui${this.NAME}`);const n=this;y.fn.extend({[t](s,...r){const o=typeof s=="object"?s:void 0,a=typeof s=="string"?s:void 0;let l;return this.each((c,d)=>{let u=n.get(d);if(u)o&&u.render(o);else{if(a)return;u=new n(d,o)}if(a){let p=u[a],g=u;p===void 0&&(g=u.$,p=g[a]),typeof p=="function"?l=p.call(g,...r):l=p}}),l!==void 0?l:this}})}static register(e,t){var s,r;e=e||this,t=(t??e.NAME).toLowerCase(),this.map.set(t,e);const n=(r=(s=e.toggle)==null?void 0:s.name)==null?void 0:r.toLowerCase();n&&n!==t&&this.toggleMap.set(n,e)}};li.DEFAULT={},li.MULTI_INSTANCE=!1,li.ALL=new Map,li.TYPED_ALL=new Map,li.map=new Map,li.toggleMap=new Map;let ze=li;function _s(i){return ze.map.get(i.toLowerCase())}function xl(i,e,t={}){let n=_s(i);if(n||(n=kl(i)),!n)return null;const{$update:s,...r}=t;if(!n.MULTI_INSTANCE){const o=n.get(e);if(o)return s&&o.render(r,s==="reset"),o}return new n(e,r)}function py(i,e,t={}){requestAnimationFrame(()=>xl(i,e,t))}function cd(i,e){ze.register(i,e)}function kl(i){const{zui:e}=window;if(e){i=i==null?void 0:i.toLowerCase();for(const t in e){const n=t.toLowerCase()===i;if(i&&!n)continue;const s=e[t];if(!(typeof s!="function"||!s.NAME||!s.ZUI)&&(ze.map.has(t.toLowerCase())||cd(s),n))return s}}}function my(i){var e;i?(e=_s(i))==null||e.defineFn():window._zuiDefined||(kl(),ze.map.forEach(t=>{t.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function gy(i,e={}){const t=y(i);let n=t.attr("zui-create");const{update:s,onCreate:r}=e,o=(a,l)=>{if(l={$update:s,$optionsFromDataset:!1,...l},r){const d=r(a,l);if(d===!1)return;d&&(l=d)}const c=l.$lib;if(c){delete l.$lib,y.getLib(c).then(()=>xl(a,i,l));return}py(a,i,l)};if(typeof n=="string"){n=n.trim();const a=n.length?n.split(",").map(d=>d.trim()):[],l=Ni(i,{prefix:"zui-create-",evalValue:!0}),c=Object.keys(l);if(!c.length&&a.length===1)o(a[0],t.dataset());else{const d=new Set;[...a,...c].forEach(u=>{if(d.has(u))return;const p=l[u];o(u,p),delete l[u],d.add(u)})}}else{const a=t.dataset(),l=a==null?void 0:a.zui;if(!l)return;console.warn("[ZUI] create component instance with [data-zui] is deprecated, use [zui-create] instead.",{element:i,options:e}),delete a.zui,o(l,a)}}function yy(){y(document).on("click.zui.toggle mouseenter.zui.toggle","[data-toggle],[zui-toggle]",function(i){const e=y(this),t=e.dataset("toggle")||e.attr("zui-toggle");if(!t)return;const n=ze.toggleMap.get(t)||_s(t),s=n==null?void 0:n.toggle;if(!s)return;const{trigger:r="click",skip:o="[disabled],.disabled",check:a}=s,l=i.type==="mouseover"?"hover":"click";if(!r.includes(l)||a&&!a.call(n,this,l,i)||o&&e.is(o))return;const{onGet:c,onCreate:d,setOptions:u=!0,getOptions:p,prevent:g=!0,handler:b,onToggle:C,convertHref:S}=s;let x=e.dataset();const D=e.attr(`zui-toggle-${t}`);if(D&&(x=y.extend(x,si(D))),S&&e.is("a")){const B=e.attr("href");if(B){const H=S===!0?{selector:"target",url:"url"}:S;"#.".includes(B[0])?H.selector&&x[H.selector]===void 0&&(x[H.selector]=B):H.url&&x[H.url]===void 0&&(x[H.url]=B)}}if(p&&(x=p.call(n,this,x,i)),b){b.call(n,this,x,l,i),g&&i.preventDefault();return}let A=c?c.call(n,this):n.get(this);if(A)u&&A.setOptions(x);else{const B=d?d.call(n,this,i,x):new n(this,x);if(!B)return;A=B}if(C){if(C.call(n,A,this,i)===!1)return}else{const{shown:B,show:H,hide:G,toggle:Y}=A;let Z;if(Y?Z=Y:H&&G?B?Z=G:Z=H:H&&(Z=H),Z)Z.call(A);else return}g&&i.preventDefault()})}function _y(i,e){const t=ms(i),n=[];return Object.keys(t).forEach(s=>{if(!s.startsWith("zui."))return;const r=t[s];(e==null?void 0:e(r,s))!==!1&&n.push(t[s])}),n}let Hr=0;function hd(i=100){if(Hr&&clearTimeout(Hr),i){Hr=window.setTimeout(()=>hd(0),i);return}Hr=0,ze.ALL.forEach(e=>{e.forEach(t=>t.autoDestroy())})}function vy(){if(!document.body||ms(document.body,"_autoDestoryMob"))return;const i=new MutationObserver(e=>{let t=!1;for(const n of e)if(n.removedNodes.length){t=!0;break}t&&hd()});i.observe(document.body,{childList:!0,subtree:!0}),Ar(document.body,"_autoDestoryMob",i)}y.fn.zuiInit=function(i){return this.find("[zui-create],[data-zui]").each(function(){var e;((e=i==null?void 0:i.beforeCreate)==null?void 0:e.call(i,this))!==!1&&gy(this,i)}),this.find("[zui-init]").each(function(){this.hasAttribute("z-zui-inited")||(this.setAttribute("z-zui-inited",""),y.runJS(this.getAttribute("zui-init"),["$element",y(this)]))}),this.find(".hide-before-init").removeClass("invisible hidden opacity-0"),this.find(".scroll-into-view").scrollIntoView(),this.find('[data-on="inited"],[zui-on-inited]').each((e,t)=>{const n=y(t);n.zui()||n.trigger("inited")}),this},y.fn.zui=function(i,e){const t=this[0];if(!t)return;if(typeof i!="string"){const s={};let r;return _y(t,(o,a)=>{s[a]=o,(!r||r.gid1?t[0]:void 0,s=t[t.length>1?1:0],r=y(this).zui(n),o=r==null?void 0:r[s];typeof o=="function"&&o.apply(r,e)}),this},y(()=>{y("body").zuiInit({update:!0}),yy(),vy()});class Sl extends ze{init(){const{offset:e=1,side:t,zIndex:n,pinnedClass:s="is-pinned",targets:r,scrollContainer:o}=this.options,{$element:a}=this,l=r?a.find(r):a;if(l.css({position:"sticky",zIndex:n}),t&&l.css(t,-e),o){const c=a.closest(o)[0];if(c){const d=()=>{this._raf&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{if(this._raf=0,c.scrollTop===0&&(!t||t==="top")){l.toggleClass(s,!1);return}const u=c.getBoundingClientRect();l.each((p,g)=>{const C=g.getBoundingClientRect()[t||"top"]===u[t||"top"];g.classList.toggle(s,C)})})};this._scrollListener=d,c.addEventListener("scroll",d)}this._container=c}else this._ob=new IntersectionObserver(c=>{c.forEach(d=>{d.target.classList.toggle(s,d.intersectionRatiothis._ob.observe(d))}destroy(){var e;(e=this._ob)==null||e.disconnect(),this._container&&(this._container.removeEventListener("scroll",this._scrollListener),this._raf&&cancelAnimationFrame(this._raf))}}Sl.NAME="Sticky";const Ei=24*60*60*1e3,We=i=>i===void 0?new Date:(i instanceof Date||(typeof i=="string"&&(i=i.trim(),/^\d+$/.test(i)&&(i=Number.parseInt(i,10))),typeof i=="number"&&i<1e10&&(i*=1e3),i=new Date(i)),i),ud=(i,e,t="day")=>{if(typeof e=="string"){const n=Number.parseInt(e,10);t=e.replace(n.toString(),""),e=n}return i=new Date(We(i).getTime()),t==="month"?i.setMonth(i.getMonth()+e):t==="year"?i.setFullYear(i.getFullYear()+e):t==="week"?i.setDate(i.getDate()+e*7):t==="hour"?i.setHours(i.getHours()+e):t==="minute"?i.setMinutes(i.getMinutes()+e):t==="second"?i.setSeconds(i.getSeconds()+e):i.setDate(i.getDate()+e),i},Mn=(i,e=new Date)=>We(i).toDateString()===We(e).toDateString(),vs=(i,e=new Date)=>We(i).getFullYear()===We(e).getFullYear(),Tl=(i,e=new Date)=>(i=We(i),e=We(e),i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth()),by=(i,e=new Date)=>{i=We(i),e=We(e);const t=1e3*60*60*24,n=Math.floor(i.getTime()/t),s=Math.floor(e.getTime()/t);return Math.floor((n+4)/7)===Math.floor((s+4)/7)},wy=(i,e)=>Mn(We(e),i),Cy=(i,e)=>Mn(We(e).getTime()-Ei,i),xy=(i,e)=>Mn(We(e).getTime()+Ei,i),$l=i=>i!=null&&!isNaN(We(i).getTime()),ht=(i,e="yyyy-MM-dd hh:mm",t="")=>{if(i=We(i),!$l(i))return t;if(typeof e=="function")return e(i);const n={"M+":i.getMonth()+1,"d+":i.getDate(),"h+":i.getHours(),"H+":i.getHours()%12,"m+":i.getMinutes(),"s+":i.getSeconds(),"S+":i.getMilliseconds()};return/(y+)/i.test(e)&&(e.includes("[yyyy-]")&&(e=e.replace("[yyyy-]",vs(i)?"":"yyyy-")),e=e.replace(RegExp.$1,`${i.getFullYear()}`.substring(4-RegExp.$1.length))),Object.keys(n).forEach(s=>{if(new RegExp(`(${s})`).test(e)){const r=`${n[s]}`;e=e.replace(RegExp.$1,RegExp.$1.length===1?r:`00${r}`.substring(r.length))}}),e},ky=(i,e,t)=>{const n={full:"yyyy-M-d",month:"M-d",day:"d",str:"{0} ~ {1}",...t},s=ht(i,vs(i)?n.month:n.full);if(Mn(i,e))return s;const r=ht(e,vs(i,e)?Tl(i,e)?n.day:n.month:n.full);return n.str.replace("{0}",s).replace("{1}",r)};function Dl(i){let e=0;if(typeof i!="string"&&(i=String(i)),i&&i.length)for(let t=0;t{try{a.includes("%")&&(a=decodeURIComponent(a)),a=JSON.parse(a)}catch{}return[o,a]})),params:n.map(o=>{if(o!=="undefined"){if(o==="null")return null;try{return o.includes("%")&&(o=decodeURIComponent(o)),JSON.parse(o)}catch{return o}}})}}function dd(i){if(Array.isArray(i))return{commands:i.map(Wr).filter(Boolean)};if(typeof i=="object")return i;i=i.replace(/^#!?/,"");const e=i.includes(">"),t=i.split(e?">":"|").map(Wr);return{async:e,commands:t.filter(Boolean)}}function Il(i,e,t){if(typeof i=="string"&&(i=Wr(i)),!i)return;const{execute:n,event:s,scope:r}=e;if(!(r&&i.scope&&i.scope!==r))return n({name:i.name,options:{...e.options,...i.options},event:s,scope:i.scope,prevResult:t},i.params)}async function fd(i,e){const{async:t,commands:n}=dd(i);if(!n.length)return[];const{signal:s}=e;if(t){const o=[];let a;for(const l of n){if(!(s!=null&&s.aborted))break;a=await Il(l,e,a),s!=null&&s.aborted&&(a=void 0),o.push(a)}return o}return await Promise.all(n.map(o=>{if(!(s!=null&&s.aborted))return Il(o,e)}))}const Ai="zui.commands",Pi="z-commands",Sy="zui-commands-proxy",pd="zui-command";function Ur(i,e){typeof e=="string"?e={scope:e}:typeof e=="function"&&(e={onCommand:e});const{scope:t="",events:n="click"}=e??{},s=y(i),r=(s.attr(Pi)||"").split(",");t&&!r.includes(t)&&r.push(t),s.attr(Pi,r.join(",")).data(Ai,{[t]:{...e,scope:t,events:n,gid:ft()},...s.data(Ai)})}function Vr(i,e=!0){const t=y(i);if(e===!0)t.removeAttr(Pi),t.removeData(Ai);else if(e.length){const n=t.data(Ai)||{};e.split(",").forEach(r=>{delete n[r]});const s=Object.keys(n);s.length?t.attr(Pi,s.join(",")).data(Ai,Ur):Vr(t,!0)}}function md(i,e){let t=i.closest(`[${Pi}]`);if(!t.length){const o=i.closest(`[${Sy}]`);o.length&&(t=y(o.data("zui.commandProxy")||o.attr("COMMAND_PROXY_ATTR")).closest(`[${Pi}]`))}if(!t.length)return;const n=t.data(Ai)||{},s=Object.values(n).sort((o,a)=>a.gid-o.gid);let r;return e!=null&&e.length?(r=s.find(o=>o.scope===e),r||(r=s.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped})),r):(r=s.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped}),r||(r=s.find(o=>!o.scoped)),r?r.element=t[0]:r=md(i.parent(),e),r)}function Ty(i){if(!i.currentTarget)return;const e=y(i.currentTarget);if(e.closest(".disabled,[disabled]").length)return;const t=e.attr(pd)||(e.is('a[href^="#!"]')?e.attr("href"):"");if(!t)return;const n=new AbortController,s=()=>n.abort();fd(t,{signal:n.signal,execute:(r,o)=>{const{scope:a,name:l}=r,c={...r,abort:s};let d;const u=md(e,a);if(u){c.element=u.element;const g=(u.commands?u.commands[`${a}~${l}`]||u.commands[l]:null)||u.onCommand;if(g&&(d=g(c,o),i.commandHandled))return d}const p=[c,o];if(e.trigger("command",p).trigger(`command:${a?`${l}.${a}`:l}`,p),a&&e.trigger(`command:.${a}`,p),i.commandHandled)return d;if(a==="event"){l==="stop"?i.stopPropagation():l==="prevent"?i.preventDefault():Tn(i,l,o);return}return a==="window"?Tn(window,l,o):a==="zui"?Tn(window.zui,l,o):a==="target"?Tn(e[0],l,o):a==="$target"?Tn(e,l,o):a==="$"?Tn(y,l,o):d},event:i})}y.fn.command=function(i,e){return this.on(`command:${i}`,e)},y.fn.offCommand=function(i,e){return this.off(`command:${i}`,e)},y.fn.commands=function(i){return this.each((e,t)=>Ur(t,i)),this},y.fn.unbindCommands=function(i){return this.each((e,t)=>Vr(t,i)),this},y(()=>{y(document).on("click.zui.command",`[${pd}],a[href^="#!"]`,Ty)});function bs(i,e={}){const t=y(i)[0];if(!t)return!1;let{viewport:n}=e;const{left:s,top:r,width:o,height:a}=t.getBoundingClientRect();if(e.checkZeroSize&&!(o*a))return!1;if(!n)if(e.container)n=y(t).closest(e.container)[0].getBoundingClientRect();else{const{innerHeight:b,innerWidth:C}=window,{clientHeight:S,clientWidth:x}=document.documentElement;n={left:0,top:0,width:C||x,height:b||S}}const{left:l,top:c,width:d,height:u}=n;if(e.fullyCheck)return s>=l&&r>=c&&s+o<=d+l&&r+a<=u+c;const p=s<=l+d&&s+o>=l;return r<=c+u&&r+a>=c&&p}y.fn.isVisible=function(i){return bs(this,i)};function Kr(i,e,t=!1){var s;const n=y(i);if(e!==void 0){if(typeof e=="string"&&e.length){const r=`zui-runjs-${ft()}`;n.append(`