diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index 01cc9e322a..84fc51f65a 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,10 +1,10 @@ -var ou=(N,Je,Tt)=>{if(!Je.has(N))throw TypeError("Cannot "+Tt)};var St=(N,Je,Tt)=>(ou(N,Je,"read from private field"),Tt?Tt.call(N):Je.get(N)),Ot=(N,Je,Tt)=>{if(Je.has(N))throw TypeError("Cannot add the same private member more than once");Je instanceof WeakSet?Je.add(N):Je.set(N,Tt)},jt=(N,Je,Tt,Fa)=>(ou(N,Je,"write to private field"),Fa?Fa.call(N,Tt):Je.set(N,Tt),Tt);var au=(N,Je,Tt)=>(ou(N,Je,"access private method"),Tt);(function(N,Je){typeof exports=="object"&&typeof module<"u"?Je(exports):typeof define=="function"&&define.amd?define(["exports"],Je):(N=typeof globalThis<"u"?globalThis:N||self,Je(N.zui={}))})(this,function(N){var la,ca,nr,ir,sr,rr,or,ar,ha,Gm,ua,Ym,Hn,Wn;"use strict";const Je="",Tt="",Fa="",$w="",Dw="",Iw="",Nw="",Ew="",Mw="",Aw="",Pw="",Lw="",eg="3.0.0",tg="production",an=document,kr=window,cu=an.documentElement,Jn=an.createElement.bind(an),hu=Jn("div"),ja=Jn("table"),ng=Jn("tbody"),uu=Jn("tr"),{isArray:Sr,prototype:du}=Array,{concat:ig,filter:Ba,indexOf:fu,map:pu,push:sg,slice:mu,some:Ha,splice:rg}=du,og=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,ag=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,lg=/<.+>/,cg=/^\w+$/;function Wa(i,e){const t=hg(e);return!i||!t&&!ei(e)&&!tt(e)?[]:!t&&ag.test(i)?e.getElementsByClassName(i.slice(1).replace(/\\/g,"")):!t&&cg.test(i)?e.getElementsByTagName(i):e.querySelectorAll(i)}class Tr{constructor(e,t){if(!e)return;if(Ua(e))return e;let n=e;if(vt(e)){const s=t||an;if(n=og.test(e)&&ei(s)?s.getElementById(e.slice(1).replace(/\\/g,"")):lg.test(e)?wu(e):Ua(s)?s.find(e):vt(s)?y(s).find(e):Wa(e,s),!n)return}else if(ti(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=dg(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{tt(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)=>{tt(n)&&ct(e,(s,r)=>{n.removeAttribute(r)})})};function pg(i,e){if(i){if(vt(i)){if(arguments.length<2){if(!this[0]||!tt(this[0]))return;const t=this[0].getAttribute(i);return us(t)?void 0:t}return $t(e)?this:us(e)?this.removeAttr(i):this.each((t,n)=>{tt(n)&&n.setAttribute(i,e)})}for(const t in i)this.attr(t,i[t]);return this}}ie.attr=pg,ie.removeClass=function(i){return arguments.length?this.toggleClass(i,!1):this.attr("class","")},ie.hasClass=function(i){return!!i&&Ha.call(this,e=>tt(e)&&e.classList.contains(i))},ie.get=function(i){return $t(i)?mu.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 mg(i){return $t(i)?this.get().map(e=>tt(e)||ug(e)?e.textContent:"").join(""):this.each((e,t)=>{tt(t)&&(t.textContent=i)})}ie.text=mg;function ln(i,e,t){if(!tt(i))return;const n=kr.getComputedStyle(i,null);return t?n.getPropertyValue(e)||void 0:n[e]||i.style[e]}function qt(i,e){return parseInt(ln(i,e),10)||0}function yu(i,e){return qt(i,`border${e?"Left":"Top"}Width`)+qt(i,`padding${e?"Left":"Top"}`)+qt(i,`padding${e?"Right":"Bottom"}`)+qt(i,`border${e?"Right":"Bottom"}Width`)}const Ka={};function gg(i){if(Ka[i])return Ka[i];const e=Jn(i);an.body.insertBefore(e,null);const t=ln(e,"display");return an.body.removeChild(e),Ka[i]=t!=="none"?t:"block"}function vu(i){return ln(i,"display")==="none"}function _u(i,e){const t=i&&(i.matches||i.webkitMatchesSelector||i.msMatchesSelector);return!!t&&!!e&&t.call(i,e)}function Ir(i){return vt(i)?(e,t)=>_u(t,i):ti(i)?i:Ua(i)?(e,t)=>i.is(t):i?(e,t)=>t===i:()=>!1}ie.filter=function(i){const e=Ir(i);return y(Ba.call(this,(t,n)=>e.call(t,n,t)))};function xn(i,e){return e?i.filter(e):i}ie.detach=function(i){return xn(this,i).each((e,t)=>{t.parentNode&&t.parentNode.removeChild(t)}),this};const yg=/^\s*<(\w+)[^>]*>/,vg=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bu={"*":hu,tr:ng,td:uu,th:uu,thead:ja,tbody:ja,tfoot:ja};function wu(i){if(!vt(i))return[];if(vg.test(i))return[Jn(RegExp.$1)];const e=yg.test(i)&&RegExp.$1,t=bu[e]||bu["*"];return t.innerHTML=i,y(t.childNodes).detach().get()}y.parseHTML=wu,ie.has=function(i){const e=vt(i)?(t,n)=>Wa(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)=>(!vt(i)||tt(n))&&!e.call(n,t,n))};function cn(i,e,t,n){const s=[],r=ti(e),o=n&&Ir(n);for(let a=0,l=i.length;ae.selected&&!e.disabled&&!e.parentNode.disabled),"value"):i.value||""}function _g(i){return arguments.length?this.each((e,t)=>{const n=t.multiple&&t.options;if(n||Au.test(t.type)){const s=Sr(i)?pu.call(i,String):us(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)||us(i)?"":i}):this[0]&&Cu(this[0])}ie.val=_g,ie.is=function(i){const e=Ir(i);return Ha.call(this,(t,n)=>e.call(t,n,t))},y.guid=1;function Gt(i){return i.length>1?Ba.call(i,(e,t,n)=>fu.call(n,e)===t):i}y.unique=Gt,ie.add=function(i,e){return y(Gt(this.get().concat(y(i,e).get())))},ie.children=function(i){return xn(y(Gt(cn(this,e=>e.children))),i)},ie.parent=function(i){return xn(y(Gt(cn(this,"parentNode"))),i)},ie.index=function(i){const e=i?y(i)[0]:this[0],t=i?this:y(e).parent().children();return fu.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 xn(y(Gt(cn(this,e=>y(e).parent().children().not(e)))),i)},ie.find=function(i){return y(Gt(cn(this,e=>Wa(i,e))))};const bg=/^\s*\s*$/g,wg=/^$|^module$|\/(java|ecma)script/i,Cg=["type","src","nonce","noModule"];function xg(i,e){const t=y(i);t.filter("script").add(t.find("script")).each((n,s)=>{if(wg.test(s.type)&&cu.contains(s)){const r=Jn("script");r.text=s.textContent.replace(bg,""),ct(Cg,(o,a)=>{s[a]&&(r[a]=s[a])}),e.head.insertBefore(r,null),e.head.removeChild(r)}})}function kg(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&&xg(e,i.ownerDocument)}function kn(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,k=t?g:u,S=t?d:p;kg(b,S?k.cloneNode(!0):k,n,s,!S)},a)},o)},r),e}ie.after=function(){return kn(arguments,this,!1,!1,!1,!0,!0)},ie.append=function(){return kn(arguments,this,!1,!1,!0)};function Sg(i){if(!arguments.length)return this[0]&&this[0].innerHTML;if($t(i))return this;const e=/]/.test(i);return this.each((t,n)=>{tt(n)&&(e?y(n).empty().append(i):n.innerHTML=i)})}ie.html=Sg,ie.appendTo=function(i){return kn(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 kn(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 kn(arguments,this,!0,!1,!1,!1,!1,!0)},ie.insertBefore=function(i){return kn(arguments,this,!0,!0)},ie.prepend=function(){return kn(arguments,this,!1,!0,!0,!0,!0)},ie.prependTo=function(i){return kn(arguments,this,!0,!0,!0,!1,!1,!0)},ie.contents=function(){return y(Gt(cn(this,i=>i.tagName==="IFRAME"?[i.contentDocument]:i.tagName==="TEMPLATE"?i.content.childNodes:i.childNodes)))},ie.next=function(i,e,t){return xn(y(Gt(cn(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 xn(y(Gt(cn(this,"parentElement",!0,e))),i)},ie.parentsUntil=function(i,e){return this.parents(e,i)},ie.prev=function(i,e,t){return xn(y(Gt(cn(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(ig.apply([],pu.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&&ln(t,"position")==="static";)t=t.offsetParent;return t||cu})},ie.slice=function(i,e){return y(mu.call(this,i,e))};const Tg=/-([a-z])/g;function qa(i){return i.replace(Tg,(e,t)=>t.toUpperCase())}ie.ready=function(i){const e=()=>setTimeout(i,0,y);return an.readyState!=="loading"?e():an.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=ln(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)&&ln(s,"position")==="static";)s=s.parentNode;if(s!==i&&tt(s)){const r=y(s).offset();t.top-=r.top+qt(s,"borderTopWidth"),t.left-=r.left+qt(s,"borderLeftWidth")}}return{top:t.top-qt(i,"marginTop"),left:t.left-qt(i,"marginLeft")}};const xu={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(vt(i))return i=xu[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[xu[i]||i]})};const $g=/^--/;function Ga(i){return $g.test(i)}const Ya={},{style:Dg}=hu,Ig=["webkit","moz","ms"];function Ng(i,e=Ga(i)){if(e)return i;if(!Ya[i]){const t=qa(i),n=`${t[0].toUpperCase()}${t.slice(1)}`,s=`${t} ${Ig.join(`${n} `)}${n}`.split(" ");ct(s,(r,o)=>{if(o in Dg)return Ya[i]=o,!1})}return Ya[i]}const Eg={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 ku(i,e,t=Ga(i)){return!t&&!Eg[i]&&gu(e)?`${e}px`:e}function Mg(i,e){if(vt(i)){const t=Ga(i);return i=Ng(i,t),arguments.length<2?this[0]&&ln(this[0],i,t):i?(e=ku(i,e,t),this.each((n,s)=>{tt(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=Mg;function Su(i,e){try{return i(e)}catch{return e}}const Ag=/^\s+|\s+$/;function Tu(i,e){const t=i.dataset[e]||i.dataset[qa(e)];return Ag.test(t)?t:Su(JSON.parse,t)}function Pg(i,e,t){t=Su(JSON.stringify,t),i.dataset[qa(e)]=t}function Lg(i,e){if(!i){if(!this[0])return;const t={};for(const n in this[0].dataset)t[n]=Tu(this[0],n);return t}if(vt(i))return arguments.length<2?this[0]&&Tu(this[0],i):$t(e)?this:this.each((t,n)=>{Pg(n,i,e)});for(const t in i)this.data(t,i[t]);return this}ie.data=Lg;function $u(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 Ti(this[0])?e?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:ei(this[0])?$u(this[0],n):this[0][`${e?"offset":"client"}${n}`]+(r&&e?qt(this[0],`margin${t?"Top":"Left"}`)+qt(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 Ti(this[0])?this[0].document.documentElement[`client${e}`]:ei(this[0])?$u(this[0],e):this[0].getBoundingClientRect()[t]-yu(this[0],!i);const s=parseInt(n,10);return this.each((r,o)=>{if(!tt(o))return;const a=ln(o,"boxSizing");o.style[t]=ku(t,s+(a==="border-box"?yu(o,!i):0))})}});const Du="___cd";ie.toggle=function(i){return this.each((e,t)=>{if(!tt(t))return;const n=vu(t);($t(i)?n:i)?(t.style.display=t[Du]||"",vu(t)&&(t.style.display=gg(t.tagName))):n||(t[Du]=ln(t,"display"),t.style.display="none")})},ie.hide=function(){return this.toggle(!1)},ie.show=function(){return this.toggle(!0)};const Iu="___ce",Qa=".",Xa={focus:"focusin",blur:"focusout"},Nu={mouseenter:"mouseover",mouseleave:"mouseout"},Rg=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Za(i){return Nu[i]||Xa[i]||i}function Ja(i){const e=i.split(Qa);return[e[0],e.slice(1).sort()]}ie.trigger=function(i,e){if(vt(i)){const[n,s]=Ja(i),r=Za(n);if(!r)return this;const o=Rg.test(r)?"MouseEvents":"HTMLEvents";i=an.createEvent(o),i.initEvent(r,!0,!0),i.namespace=s.join(Qa),i.___ot=n}i.___td=e;const t=i.___ot in Xa;return this.each((n,s)=>{t&&ti(s[i.___ot])&&(s[`___i${i.type}`]=!0,s[i.___ot](),s[`___i${i.type}`]=!1),s.dispatchEvent(i)})};function Eu(i){return i[Iu]=i[Iu]||{}}function Og(i,e,t,n,s){const r=Eu(i);r[e]=r[e]||[],r[e].push([t,n,s]),i.addEventListener(e,s)}function Mu(i,e){return!e||!Ha.call(e,t=>i.indexOf(t)<0)}function Nr(i,e,t,n,s){const r=Eu(i);if(e)r[e]&&(r[e]=r[e].filter(([o,a,l])=>{if(s&&l.guid!==s.guid||!Mu(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)=>{!tt(s)&&!ei(s)&&!Ti(s)||Nr(s)});else if(vt(i))ti(e)&&(t=e,e=""),ct(Dr(i),(n,s)=>{const[r,o]=Ja(s),a=Za(r);this.each((l,c)=>{!tt(c)&&!ei(c)&&!Ti(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 xn(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 zg(i,e,t,n,s){if(!vt(i)){for(const r in i)this.on(r,e,t,i[r],s);return this}return vt(e)||($t(e)||us(e)?e="":$t(t)?(t=e,e=""):(n=t,t=e,e="")),ti(n)||(n=t,t=void 0),n?(ct(Dr(i),(r,o)=>{const[a,l]=Ja(o),c=Za(a),d=a in Nu,u=a in Xa;c&&this.each((p,g)=>{if(!tt(g)&&!ei(g)&&!Ti(g))return;const b=function(k){if(k.target[`___i${k.type}`])return k.stopImmediatePropagation();if(k.namespace&&!Mu(l,k.namespace.split(Qa))||!e&&(u&&(k.target!==g||k.___ot===c)||d&&k.relatedTarget&&g.contains(k.relatedTarget)))return;let S=g;if(e){let D=k.target;for(;!_u(D,e);)if(D===g||(D=D.parentNode,!D))return;S=D}Object.defineProperty(k,"currentTarget",{configurable:!0,get(){return S}}),Object.defineProperty(k,"delegateTarget",{configurable:!0,get(){return g}}),Object.defineProperty(k,"data",{configurable:!0,get(){return t}});const C=n.call(S,k,k.___td);s&&Nr(g,c,l,e,b),C===!1&&(k.preventDefault(),k.stopPropagation())};b.guid=n.guid=n.guid||y.guid++,Og(g,c,l,e,b)})}),this):this}ie.on=zg;function Fg(i,e,t,n){return this.on(i,e,t,n,!0)}ie.one=Fg;const jg=/\r?\n/g;function Bg(i,e){return`&${encodeURIComponent(i)}=${encodeURIComponent(e.replace(jg,`\r -`))}`}const Hg=/file|reset|submit|button|image/i,Au=/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"||Hg.test(s.type)||Au.test(s.type)&&!s.checked)return;const r=Cu(s);if(!$t(r)){const o=Sr(r)?r:[r];ct(o,(a,l)=>{i+=Bg(s.name,l)})}})}),i.slice(1)},window.$=y;function Pu(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))(el||{});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/el[t]).toFixed(e)+t)}const $i=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)*el[n]};let tl=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),hn;function Wg(){return tl}function Ug(i){tl=i.toLowerCase().replace("-","_")}function Lu(i,e){hn||(hn={}),typeof i=="string"&&(i={[i]:e??{}}),y.extend(!0,hn,i)}function Ne(i,e,t,n,s,r){Array.isArray(i)?hn&&i.unshift(hn):i=hn?[hn,i]:[i],typeof t=="string"&&(r=s,s=n,n=t,t=void 0);const o=s||tl;let a;for(const l of i){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const d=r&&l===hn?`${r}.${e}`:e;if(a=ds(c,d),a!==void 0)break}return a===void 0?n:t?xe(a,...Array.isArray(t)?t:[t]):a}function Vg(i,e,t,n){return Ne(void 0,i,e,t,n)}Ne.addLang=Lu,Ne.getLang=Vg,Ne.getCode=Wg,Ne.setCode=Ug,Ne.map=hn,Lu({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 Ru(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 Kg(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 Er(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 fs{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,...k}=this.setting;t&&(k.method=t);let S=n;S&&(s&&(S=Er(S)),k.body=S),o&&(k.mode="cors");const C=k.headers||{};Ru(C,"X-Requested-With","XMLHttpRequest"),r&&Ru(C,"Content-Type",r),k.headers=C,k.signal&&k.signal.addEventListener("abort",()=>{this.abort()});const D=[...this.constructor.globalBeforeSends,u];for(const L of D){if(!L)continue;const B=L.call(this,k);if(B===!1)return;B&&Object.assign(k,B)}p&&this.success(p),g&&this.fail(g),b&&this.complete(b),k.signal=this._controller.signal,this.url=e,this.request=k}_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||Kg(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]}}fs.globalBeforeSends=[],y.ajax=(i,e)=>{e=e||{},typeof i=="string"?e.url=i:y.extend(e,i);const t=new fs(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 Bt(i,e=[],t,n,s){const r={throws:!0,dataType:"json"};if(typeof i=="string")r.url=xe(i,...e);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);const o=new fs(r);s==null||s(o);const[a]=await o.send();return a}function nl(i){return!!(i&&(typeof i=="string"||typeof i=="object"&&i.url||typeof i=="function"))}y.fetch=Bt;function ft(){return y.guid++}function Mr(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 ni?n.value!==t[s]:Mr(n,t[s])))&&(this._value=this._compute(),this._lastDependencies=e.map(n=>n instanceof ni?n.cache:n)),this._value}}function il(...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)?il(...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 K=(...i)=>il(...i).reduce((e,[t,n])=>(n&&e.push(t),e),[]).join(" ");y.classes=K,y.fn.setClass=function(i,...e){return this.each((t,n)=>{const s=y(n);i===!0?s.attr("class",K(s.attr("class"),...e)):s.addClass(K(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 ps(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 qg(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?ps(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 ii(i,...e){return i.includes("RAWJS")&&(i=i.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` -`)),new Function(`return ${i}`)(...e)}function sl(i,...e){return i.includes("RAWJS")?ii(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=ii(p,...a):o&&(g=JSON.parse(p))}catch{}c[u]=g}return c},{})}function rl(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 Gg(...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)&&rl(this,n),this)}return rl(this,{[i[0]]:i[1]}),this}y.fn.z=Gg,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 ms=(i,e)=>new Promise(t=>{const n=window.setTimeout(t,i);e&&e(n)}),Ou={};y.share=Ou;var Pr,Oe,zu;N.isValidElement=void 0;var si,Fu,ju,ol,al,ll,cl,gs={},Bu=[],Yg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lr=Array.isArray;function Tn(i,e){for(var t in e)i[t]=e[t];return i}function Hu(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??++zu,__i:-1,__u:0};return s==null&&Oe.vnode!=null&&Oe.vnode(r),r}function fe(){return{current:null}}function $n(i){return i.children}function pe(i,e){this.props=i,this.context=e}function Ei(i,e){if(e==null)return i.__?Ei(i.__,i.__i+1):null;for(var t;ee&&si.sort(ol));Or.__r=0}function Vu(i,e,t,n,s,r,o,a,l,c,d){var u,p,g,b,k,S=n&&n.__k||Bu,C=e.length;for(t.__d=l,Qg(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=Xg(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 dl(i){return Object.keys(i).forEach(e=>{i[e]===void 0&&delete i[e]}),i}function Xu(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)=>{Xu(t,i)})},y.fn.enableScroll=function(i=!0){return this.disableScroll(!i)};function fl(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)?ds(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 ey(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)&&fl(e,i,y.extend({on:o},a?a.startsWith("{")?ii(a):{do:a}:Ni(e,{prefix:"data-",evalValue:["call","if","do"]})))}const s=e.attr(`zui-on-${t}`);s&&fl(e,i,y.extend({on:t},s.startsWith("{")?ii(s):{do:s}));const r=e.attr("data-on");r&&r.split(" ").includes(t)&&fl(e,i,Ni(e,{prefix:"data-",evalValue:["call","if","do"]}))}function Zu(i){y(document).off(".zui.global").on(i.map(e=>`${e}.zui.global`).join(" "),`[zui-on],${i.map(e=>`[zui-on-${e}]`)},[data-on]`,ey)}y(()=>{Zu(["click","change","inited"])});function oi(i,e){if(typeof i=="function")return oi(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"]=oi(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 Ju{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 Yt=new Ju(document);y.bus=Yt,y.on=Yt.on.bind(Yt),y.one=Yt.one.bind(Yt),y.off=Yt.off.bind(Yt),y.trigger=Yt.trigger.bind(Yt);var ty=["Shift","Meta","Alt","Control"],ed=typeof navigator=="object"?navigator.platform:"",td=/Mac|iPod|iPhone|iPad/.test(ed),ny=td?"Meta":"Control",iy=ed==="Win32"?["Control","Alt"]:td?["Alt"]:[];function pl(i,e){return typeof i.getModifierState=="function"&&(i.getModifierState(e)||iy.includes(e)&&i.getModifierState("AltGraph"))}function sy(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"?ny:s}),n]})}function nd(i,e){var t;e===void 0&&(e={});var n=(t=e.timeout)!=null?t:1e3,s=Object.keys(i).map(function(a){return[sy(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!pl(p,b)})||ty.find(function(b){return!g[0].includes(b)&&g[1]!==b&&pl(p,b)}))})(a,u[0])?u.length>1?r.set(c,u.slice(1)):(r.delete(c),d(a)):pl(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function ry(i,e,t){var n;t===void 0&&(t={});var s=(n=t.event)!=null?n:"keydown",r=nd(e,t);return i.addEventListener(s,r),function(){i.removeEventListener(s,r)}}function ml(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 gl(i,e,t){const{timeout:n,event:s="keydown",scope:r,when:o}=t||{},a=nd(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 yl(i,e){return y(i).off(`.zui.hotkeys${e?`.${e}`:""}`)}const oy=ry;y.fn.hotkeys=function(i,e){return gl(this,i,e)},y.fn.unbindHotkeys=function(i){return yl(this,i)},y.hotkeys=function(i,e){gl(window,i,e)},y.unbindHotkeys=function(i){yl(window,i)};function Br(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function id(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 vl(i){const e=Br();return i===!1&&!!e===i?i:e?(document.exitFullscreen(),!1):(await id(i),!0)}y.fn.fullscreen=function(i){return vl({target:this,...i})},y.getFullscreenElement=Br,y.toggleFullscreen=vl;function Dn(i){return!i||i.parentNode===document?!1:i.parentNode?Dn(i.parentNode):!0}y.isDetached=Dn,y.fn.isDetached=function(){const i=this[0];return!i||Dn(i)};const ai=class Hm{constructor(e,t){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 g=`${n}:ALL`;let b=d.data(g);b||(b=new Map,d.data(g,b)),b.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]+)/,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(){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 p=this.$element.data(`${e}:ALL`);if(p)if(p.delete(this._key),p.size===0)this.$element.removeData(`${e}:ALL`);else{const g=p.values().next().value;l.data(e,g).attr(t,String(g==null?void 0:g.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))}autoDestroy(e=100){this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,Dn(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(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!==Hm?(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)}};ai.DEFAULT={},ai.MULTI_INSTANCE=!1,ai.ALL=new Map,ai.TYPED_ALL=new Map,ai.map=new Map,ai.toggleMap=new Map;let ze=ai;function ys(i){return ze.map.get(i.toLowerCase())}function _l(i,e,t={}){let n=ys(i);if(n||(n=bl(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 ay(i,e,t={}){requestAnimationFrame(()=>_l(i,e,t))}function sd(i,e){ze.register(i,e)}function bl(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())||sd(s),n))return s}}}function ly(i){var e;i?(e=ys(i))==null||e.defineFn():window._zuiDefined||(bl(),ze.map.forEach(t=>{t.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function cy(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(()=>_l(a,i,l));return}ay(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 hy(){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)||ys(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:k,convertHref:S}=s;let C=e.dataset();const D=e.attr(`zui-toggle-${t}`);if(D&&(C=y.extend(C,ii(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&&C[H.selector]===void 0&&(C[H.selector]=B):H.url&&C[H.url]===void 0&&(C[H.url]=B)}}if(p&&(C=p.call(n,this,C,i)),b){b.call(n,this,C,l,i),g&&i.preventDefault();return}let L=c?c.call(n,this):n.get(this);if(L)u&&L.setOptions(C);else{const B=d?d.call(n,this,i,C):new n(this,C);if(!B)return;L=B}if(k){if(k.call(n,L,this,i)===!1)return}else{const{shown:B,show:H,hide:Y,toggle:G}=L;let Z;if(G?Z=G:H&&Y?B?Z=Y:Z=H:H&&(Z=H),Z)Z.call(L);else return}g&&i.preventDefault()})}function uy(i,e){const t=ps(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 rd(i=100){if(Hr&&clearTimeout(Hr),i){Hr=window.setTimeout(()=>rd(0),i);return}Hr=0,ze.ALL.forEach(e=>{e.forEach(t=>t.autoDestroy())})}function dy(){if(!document.body||ps(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&&rd()});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&&cy(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 uy(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}),hy(),dy()});class wl 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 k=g.getBoundingClientRect()[t||"top"]===u[t||"top"];g.classList.toggle(s,k)})})};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))}}wl.NAME="Sticky";const Mi=24*60*60*1e3,He=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),od=(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(He(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},In=(i,e=new Date)=>He(i).toDateString()===He(e).toDateString(),vs=(i,e=new Date)=>He(i).getFullYear()===He(e).getFullYear(),Cl=(i,e=new Date)=>(i=He(i),e=He(e),i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth()),fy=(i,e=new Date)=>{i=He(i),e=He(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)},py=(i,e)=>In(He(e),i),my=(i,e)=>In(He(e).getTime()-Mi,i),gy=(i,e)=>In(He(e).getTime()+Mi,i),xl=i=>i!=null&&!isNaN(He(i).getTime()),nt=(i,e="yyyy-MM-dd hh:mm",t="")=>{if(i=He(i),!xl(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},yy=(i,e,t)=>{const n={full:"yyyy-M-d",month:"M-d",day:"d",str:"{0} ~ {1}",...t},s=nt(i,vs(i)?n.month:n.full);if(In(i,e))return s;const r=nt(e,vs(i,e)?Cl(i,e)?n.day:n.month:n.full);return n.str.replace("{0}",s).replace("{1}",r)};function kl(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=>{try{return o.includes("%")&&(o=decodeURIComponent(o)),JSON.parse(o)}catch{return o}})}}function ad(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 Sl(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 ld(i,e){const{async:t,commands:n}=ad(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 Sl(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 Sl(o,e)}))}const Ai="zui.commands",Pi="z-commands",vy="zui-commands-proxy",cd="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 hd(i,e){let t=i.closest(`[${Pi}]`);if(!t.length){const o=i.closest(`[${vy}]`);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=hd(i.parent(),e),r)}function _y(i){if(!i.currentTarget)return;const e=y(i.currentTarget);if(e.closest(".disabled,[disabled]").length)return;const t=e.attr(cd)||(e.is('a[href^="#!"]')?e.attr("href"):"");if(!t)return;const n=new AbortController,s=()=>n.abort();ld(t,{signal:n.signal,execute:(r,o)=>{const{scope:a,name:l}=r,c={...r,abort:s};let d;const u=hd(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():Sn(i,l,o);return}return a==="window"?Sn(window,l,o):a==="zui"?Sn(window.zui,l,o):a==="target"?Sn(e[0],l,o):a==="$target"?Sn(e,l,o):a==="$"?Sn(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",`[${cd}],a[href^="#!"]`,_y)});function _s(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:k}=window,{clientHeight:S,clientWidth:C}=document.documentElement;n={left:0,top:0,width:k||C,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 _s(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(`