diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index 06fe569f8d3..b29a1418b09 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,3 +1,3 @@ var Lo=(w,tt,vt)=>{if(!tt.has(w))throw TypeError("Cannot "+vt)};var bt=(w,tt,vt)=>(Lo(w,tt,"read from private field"),vt?vt.call(w):tt.get(w)),$t=(w,tt,vt)=>{if(tt.has(w))throw TypeError("Cannot add the same private member more than once");tt instanceof WeakSet?tt.add(w):tt.set(w,vt)},It=(w,tt,vt,mi)=>(Lo(w,tt,"write to private field"),mi?mi.call(w,vt):tt.set(w,vt),vt);var Ro=(w,tt,vt)=>(Lo(w,tt,"access private method"),vt);(function(w,tt){typeof exports=="object"&&typeof module<"u"?tt(exports):typeof define=="function"&&define.amd?define(["exports"],tt):(w=typeof globalThis<"u"?globalThis:w||self,tt(w.zui={}))})(this,function(w){var di,ui,Ls,Rs,Fs,zs,Os,Ws,fi,Kc,pi,Gc,ye,_e;"use strict";const tt="",vt="",mi="",Bf="",jf="",Uf="",Vf="",Kf="",Gf="",qf="",Yf="",Qf="",qc="3.0.0-alpha.4",jt=document,Hs=window,Fo=jt.documentElement,be=jt.createElement.bind(jt),zo=be("div"),gi=be("table"),Yc=be("tbody"),Oo=be("tr"),{isArray:Bs,prototype:Wo}=Array,{concat:Qc,filter:yi,indexOf:Ho,map:Bo,push:Zc,slice:jo,some:_i,splice:Xc}=Wo,Jc=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,th=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,eh=/<.+>/,sh=/^\w+$/;function bi(n,t){const e=nh(t);return!n||!e&&!ve(t)&&!it(t)?[]:!e&&th.test(n)?t.getElementsByClassName(n.slice(1).replace(/\\/g,"")):!e&&sh.test(n)?t.getElementsByTagName(n):t.querySelectorAll(n)}class js{constructor(t,e){if(!t)return;if(vi(t))return t;let s=t;if(dt(t)){const i=e||jt;if(s=Jc.test(t)&&ve(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):eh.test(t)?Yo(t):vi(i)?i.find(t):dt(i)?u(i).find(t):bi(t,i),!s)return}else if(we(t))return this.ready(t);(s.nodeType||s===Hs)&&(s=[s]),this.length=s.length;for(let i=0,r=this.length;i{for(;t.firstChild;)t.removeChild(t.firstChild)})};function Us(...n){const t=rh(n[0])?n.shift():!1,e=n.shift(),s=n.length;if(!e)return{};if(!s)return Us(t,u,e);for(let i=0;i{it(r)&<(e,(o,a)=>{s?t?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},M.addClass=function(n){return this.toggleClass(n,!0)},M.removeAttr=function(n){const t=Vs(n);return this.each((e,s)=>{it(s)&<(t,(i,r)=>{s.removeAttribute(r)})})};function ah(n,t){if(n){if(dt(n)){if(arguments.length<2){if(!this[0]||!it(this[0]))return;const e=this[0].getAttribute(n);return os(e)?void 0:e}return wt(t)?this:os(t)?this.removeAttr(n):this.each((e,s)=>{it(s)&&s.setAttribute(n,t)})}for(const e in n)this.attr(e,n[e]);return this}}M.attr=ah,M.removeClass=function(n){return arguments.length?this.toggleClass(n,!1):this.attr("class","")},M.hasClass=function(n){return!!n&&_i.call(this,t=>it(t)&&t.classList.contains(n))},M.get=function(n){return wt(n)?jo.call(this):(n=Number(n),this[n<0?n+this.length:n])},M.eq=function(n){return u(this.get(n))},M.first=function(){return this.eq(0)},M.last=function(){return this.eq(-1)};function lh(n){return wt(n)?this.get().map(t=>it(t)||ih(t)?t.textContent:"").join(""):this.each((t,e)=>{it(e)&&(e.textContent=n)})}M.text=lh;function Ut(n,t,e){if(!it(n))return;const s=Hs.getComputedStyle(n,null);return e?s.getPropertyValue(t)||void 0:s[t]||n.style[t]}function zt(n,t){return parseInt(Ut(n,t),10)||0}function Vo(n,t){return zt(n,`border${t?"Left":"Top"}Width`)+zt(n,`padding${t?"Left":"Top"}`)+zt(n,`padding${t?"Right":"Bottom"}`)+zt(n,`border${t?"Right":"Bottom"}Width`)}const Ci={};function ch(n){if(Ci[n])return Ci[n];const t=be(n);jt.body.insertBefore(t,null);const e=Ut(t,"display");return jt.body.removeChild(t),Ci[n]=e!=="none"?e:"block"}function Ko(n){return Ut(n,"display")==="none"}function Go(n,t){const e=n&&(n.matches||n.webkitMatchesSelector||n.msMatchesSelector);return!!e&&!!t&&e.call(n,t)}function Ks(n){return dt(n)?(t,e)=>Go(e,n):we(n)?n:vi(n)?(t,e)=>n.is(e):n?(t,e)=>e===n:()=>!1}M.filter=function(n){const t=Ks(n);return u(yi.call(this,(e,s)=>t.call(e,s,e)))};function se(n,t){return t?n.filter(t):n}M.detach=function(n){return se(this,n).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const hh=/^\s*<(\w+)[^>]*>/,dh=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,qo={"*":zo,tr:Yc,td:Oo,th:Oo,thead:gi,tbody:gi,tfoot:gi};function Yo(n){if(!dt(n))return[];if(dh.test(n))return[be(RegExp.$1)];const t=hh.test(n)&&RegExp.$1,e=qo[t]||qo["*"];return e.innerHTML=n,u(e.childNodes).detach().get()}u.parseHTML=Yo,M.has=function(n){const t=dt(n)?(e,s)=>bi(n,s).length:(e,s)=>s.contains(n);return this.filter(t)},M.not=function(n){const t=Ks(n);return this.filter((e,s)=>(!dt(n)||it(s))&&!t.call(s,e,s))};function Vt(n,t,e,s){const i=[],r=we(t),o=s&&Ks(s);for(let a=0,l=n.length;at.selected&&!t.disabled&&!t.parentNode.disabled),"value"):n.value||""}function uh(n){return arguments.length?this.each((t,e)=>{const s=e.multiple&&e.options;if(s||aa.test(e.type)){const i=Bs(n)?Bo.call(n,String):os(n)?[]:[String(n)];s?lt(e.options,(r,o)=>{o.selected=i.indexOf(o.value)>=0},!0):e.checked=i.indexOf(e.value)>=0}else e.value=wt(n)||os(n)?"":n}):this[0]&&Qo(this[0])}M.val=uh,M.is=function(n){const t=Ks(n);return _i.call(this,(e,s)=>t.call(e,s,e))},u.guid=1;function Ot(n){return n.length>1?yi.call(n,(t,e,s)=>Ho.call(s,t)===e):n}u.unique=Ot,M.add=function(n,t){return u(Ot(this.get().concat(u(n,t).get())))},M.children=function(n){return se(u(Ot(Vt(this,t=>t.children))),n)},M.parent=function(n){return se(u(Ot(Vt(this,"parentNode"))),n)},M.index=function(n){const t=n?u(n)[0]:this[0],e=n?this:u(t).parent().children();return Ho.call(e,t)},M.closest=function(n){const t=this.filter(n);if(t.length)return t;const e=this.parent();return e.length?e.closest(n):t},M.siblings=function(n){return se(u(Ot(Vt(this,t=>u(t).parent().children().not(t)))),n)},M.find=function(n){return u(Ot(Vt(this,t=>bi(n,t))))};const fh=/^\s*\s*$/g,ph=/^$|^module$|\/(java|ecma)script/i,mh=["type","src","nonce","noModule"];function gh(n,t){const e=u(n);e.filter("script").add(e.find("script")).each((s,i)=>{if(ph.test(i.type)&&Fo.contains(i)){const r=be("script");r.text=i.textContent.replace(fh,""),lt(mh,(o,a)=>{i[a]&&(r[a]=i[a])}),t.head.insertBefore(r,null),t.head.removeChild(r)}})}function yh(n,t,e,s,i){s?n.insertBefore(t,e?n.firstChild:null):n.nodeName==="HTML"?n.parentNode.replaceChild(t,n):n.parentNode.insertBefore(t,e?n:n.nextSibling),i&&gh(t,n.ownerDocument)}function ne(n,t,e,s,i,r,o,a){return lt(n,(l,c)=>{lt(u(c),(h,d)=>{lt(u(t),(p,f)=>{const g=e?d:f,y=e?f:d,_=e?h:p;yh(g,_?y.cloneNode(!0):y,s,i,!_)},a)},o)},r),t}M.after=function(){return ne(arguments,this,!1,!1,!1,!0,!0)},M.append=function(){return ne(arguments,this,!1,!1,!0)};function _h(n){if(!arguments.length)return this[0]&&this[0].innerHTML;if(wt(n))return this;const t=/]/.test(n);return this.each((e,s)=>{it(s)&&(t?u(s).empty().append(n):s.innerHTML=n)})}M.html=_h,M.appendTo=function(n){return ne(arguments,this,!0,!1,!0)},M.wrapInner=function(n){return this.each((t,e)=>{const s=u(e),i=s.contents();i.length?i.wrapAll(n):s.append(n)})},M.before=function(){return ne(arguments,this,!1,!0)},M.wrapAll=function(n){let t=u(n),e=t[0];for(;e.children.length;)e=e.firstElementChild;return this.first().before(t),this.appendTo(e)},M.wrap=function(n){return this.each((t,e)=>{const s=u(n)[0];u(e).wrapAll(t?s.cloneNode(!0):s)})},M.insertAfter=function(n){return ne(arguments,this,!0,!1,!1,!1,!1,!0)},M.insertBefore=function(n){return ne(arguments,this,!0,!0)},M.prepend=function(){return ne(arguments,this,!1,!0,!0,!0,!0)},M.prependTo=function(n){return ne(arguments,this,!0,!0,!0,!1,!1,!0)},M.contents=function(){return u(Ot(Vt(this,n=>n.tagName==="IFRAME"?[n.contentDocument]:n.tagName==="TEMPLATE"?n.content.childNodes:n.childNodes)))},M.next=function(n,t,e){return se(u(Ot(Vt(this,"nextElementSibling",t,e))),n)},M.nextAll=function(n){return this.next(n,!0)},M.nextUntil=function(n,t){return this.next(t,!0,n)},M.parents=function(n,t){return se(u(Ot(Vt(this,"parentElement",!0,t))),n)},M.parentsUntil=function(n,t){return this.parents(t,n)},M.prev=function(n,t,e){return se(u(Ot(Vt(this,"previousElementSibling",t,e))),n)},M.prevAll=function(n){return this.prev(n,!0)},M.prevUntil=function(n,t){return this.prev(t,!0,n)},M.map=function(n){return u(Qc.apply([],Bo.call(this,(t,e)=>n.call(t,e,t))))},M.clone=function(){return this.map((n,t)=>t.cloneNode(!0))},M.offsetParent=function(){return this.map((n,t)=>{let e=t.offsetParent;for(;e&&Ut(e,"position")==="static";)e=e.offsetParent;return e||Fo})},M.slice=function(n,t){return u(jo.call(this,n,t))};const bh=/-([a-z])/g;function ki(n){return n.replace(bh,(t,e)=>e.toUpperCase())}M.ready=function(n){const t=()=>setTimeout(n,0,u);return jt.readyState!=="loading"?t():jt.addEventListener("DOMContentLoaded",t),this},M.unwrap=function(){return this.parent().each((n,t)=>{if(t.tagName==="BODY")return;const e=u(t);e.replaceWith(e.children())}),this},M.offset=function(){const n=this[0];if(!n)return;const t=n.getBoundingClientRect();return{top:t.top+Hs.pageYOffset,left:t.left+Hs.pageXOffset}},M.position=function(){const n=this[0];if(!n)return;const t=Ut(n,"position")==="fixed",e=t?n.getBoundingClientRect():this.offset();if(!t){const s=n.ownerDocument;let i=n.offsetParent||s.documentElement;for(;(i===s.body||i===s.documentElement)&&Ut(i,"position")==="static";)i=i.parentNode;if(i!==n&&it(i)){const r=u(i).offset();e.top-=r.top+zt(i,"borderTopWidth"),e.left-=r.left+zt(i,"borderLeftWidth")}}return{top:e.top-zt(n,"marginTop"),left:e.left-zt(n,"marginLeft")}};const Zo={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};M.prop=function(n,t){if(n){if(dt(n))return n=Zo[n]||n,arguments.length<2?this[0]&&this[0][n]:this.each((e,s)=>{s[n]=t});for(const e in n)this.prop(e,n[e]);return this}},M.removeProp=function(n){return this.each((t,e)=>{delete e[Zo[n]||n]})};const vh=/^--/;function xi(n){return vh.test(n)}const Si={},{style:wh}=zo,Ch=["webkit","moz","ms"];function kh(n,t=xi(n)){if(t)return n;if(!Si[n]){const e=ki(n),s=`${e[0].toUpperCase()}${e.slice(1)}`,i=`${e} ${Ch.join(`${s} `)}${s}`.split(" ");lt(i,(r,o)=>{if(o in wh)return Si[n]=o,!1})}return Si[n]}const xh={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 Xo(n,t,e=xi(n)){return!e&&!xh[n]&&Uo(t)?`${t}px`:t}function Sh(n,t){if(dt(n)){const e=xi(n);return n=kh(n,e),arguments.length<2?this[0]&&Ut(this[0],n,e):n?(t=Xo(n,t,e),this.each((s,i)=>{it(i)&&(e?i.style.setProperty(n,t):i.style[n]=t)})):this}for(const e in n)this.css(e,n[e]);return this}M.css=Sh;function Jo(n,t){try{return n(t)}catch{return t}}const $h=/^\s+|\s+$/;function ta(n,t){const e=n.dataset[t]||n.dataset[ki(t)];return $h.test(e)?e:Jo(JSON.parse,e)}function Th(n,t,e){e=Jo(JSON.stringify,e),n.dataset[ki(t)]=e}function Nh(n,t){if(!n){if(!this[0])return;const e={};for(const s in this[0].dataset)e[s]=ta(this[0],s);return e}if(dt(n))return arguments.length<2?this[0]&&ta(this[0],n):wt(t)?this:this.each((e,s)=>{Th(s,n,t)});for(const e in n)this.data(e,n[e]);return this}M.data=Nh;function ea(n,t){const e=n.documentElement;return Math.max(n.body[`scroll${t}`],e[`scroll${t}`],n.body[`offset${t}`],e[`offset${t}`],e[`client${t}`])}lt([!0,!1],(n,t)=>{lt(["Width","Height"],(e,s)=>{const i=`${t?"outer":"inner"}${s}`;M[i]=function(r){if(this[0])return Le(this[0])?t?this[0][`inner${s}`]:this[0].document.documentElement[`client${s}`]:ve(this[0])?ea(this[0],s):this[0][`${t?"offset":"client"}${s}`]+(r&&t?zt(this[0],`margin${e?"Top":"Left"}`)+zt(this[0],`margin${e?"Bottom":"Right"}`):0)}})}),lt(["Width","Height"],(n,t)=>{const e=t.toLowerCase();M[e]=function(s){if(!this[0])return wt(s)?void 0:this;if(!arguments.length)return Le(this[0])?this[0].document.documentElement[`client${t}`]:ve(this[0])?ea(this[0],t):this[0].getBoundingClientRect()[e]-Vo(this[0],!n);const i=parseInt(s,10);return this.each((r,o)=>{if(!it(o))return;const a=Ut(o,"boxSizing");o.style[e]=Xo(e,i+(a==="border-box"?Vo(o,!n):0))})}});const sa="___cd";M.toggle=function(n){return this.each((t,e)=>{if(!it(e))return;const s=Ko(e);(wt(n)?s:n)?(e.style.display=e[sa]||"",Ko(e)&&(e.style.display=ch(e.tagName))):s||(e[sa]=Ut(e,"display"),e.style.display="none")})},M.hide=function(){return this.toggle(!1)},M.show=function(){return this.toggle(!0)};const na="___ce",$i=".",Ti={focus:"focusin",blur:"focusout"},ia={mouseenter:"mouseover",mouseleave:"mouseout"},Mh=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ni(n){return ia[n]||Ti[n]||n}function Mi(n){const t=n.split($i);return[t[0],t.slice(1).sort()]}M.trigger=function(n,t){if(dt(n)){const[s,i]=Mi(n),r=Ni(s);if(!r)return this;const o=Mh.test(r)?"MouseEvents":"HTMLEvents";n=jt.createEvent(o),n.initEvent(r,!0,!0),n.namespace=i.join($i),n.___ot=s}n.___td=t;const e=n.___ot in Ti;return this.each((s,i)=>{e&&we(i[n.___ot])&&(i[`___i${n.type}`]=!0,i[n.___ot](),i[`___i${n.type}`]=!1),i.dispatchEvent(n)})};function ra(n){return n[na]=n[na]||{}}function Eh(n,t,e,s,i){const r=ra(n);r[t]=r[t]||[],r[t].push([e,s,i]),n.addEventListener(t,i)}function oa(n,t){return!t||!_i.call(t,e=>n.indexOf(e)<0)}function Gs(n,t,e,s,i){const r=ra(n);if(t)r[t]&&(r[t]=r[t].filter(([o,a,l])=>{if(i&&l.guid!==i.guid||!oa(o,e)||s&&s!==a)return!0;n.removeEventListener(t,l)}));else for(t in r)Gs(n,t,e,s,i)}M.off=function(n,t,e){if(wt(n))this.each((s,i)=>{!it(i)&&!ve(i)&&!Le(i)||Gs(i)});else if(dt(n))we(t)&&(e=t,t=""),lt(Vs(n),(s,i)=>{const[r,o]=Mi(i),a=Ni(r);this.each((l,c)=>{!it(c)&&!ve(c)&&!Le(c)||Gs(c,a,o,t,e)})});else for(const s in n)this.off(s,n[s]);return this},M.remove=function(n){return se(this,n).detach().off(),this},M.replaceWith=function(n){return this.before(n).remove()},M.replaceAll=function(n){return u(n).replaceWith(this),this};function Ih(n,t,e,s,i){if(!dt(n)){for(const r in n)this.on(r,t,e,n[r],i);return this}return dt(t)||(wt(t)||os(t)?t="":wt(e)?(e=t,t=""):(s=e,e=t,t="")),we(s)||(s=e,e=void 0),s?(lt(Vs(n),(r,o)=>{const[a,l]=Mi(o),c=Ni(a),h=a in ia,d=a in Ti;c&&this.each((p,f)=>{if(!it(f)&&!ve(f)&&!Le(f))return;const g=function(y){if(y.target[`___i${y.type}`])return y.stopImmediatePropagation();if(y.namespace&&!oa(l,y.namespace.split($i))||!t&&(d&&(y.target!==f||y.___ot===c)||h&&y.relatedTarget&&f.contains(y.relatedTarget)))return;let _=f;if(t){let C=y.target;for(;!Go(C,t);)if(C===f||(C=C.parentNode,!C))return;_=C}Object.defineProperty(y,"currentTarget",{configurable:!0,get(){return _}}),Object.defineProperty(y,"delegateTarget",{configurable:!0,get(){return f}}),Object.defineProperty(y,"data",{configurable:!0,get(){return e}});const b=s.call(_,y,y.___td);i&&Gs(f,c,l,t,g),b===!1&&(y.preventDefault(),y.stopPropagation())};g.guid=s.guid=s.guid||u.guid++,Eh(f,c,l,t,g)})}),this):this}M.on=Ih;function Ph(n,t,e,s){return this.on(n,t,e,s,!0)}M.one=Ph;const Ah=/\r?\n/g;function Dh(n,t){return`&${encodeURIComponent(n)}=${encodeURIComponent(t.replace(Ah,`\r `))}`}const Lh=/file|reset|submit|button|image/i,aa=/radio|checkbox/i;M.serialize=function(){let n="";return this.each((t,e)=>{lt(e.elements||[e],(s,i)=>{if(i.disabled||!i.name||i.tagName==="FIELDSET"||Lh.test(i.type)||aa.test(i.type)&&!i.checked)return;const r=Qo(i);if(!wt(r)){const o=Bs(r)?r:[r];lt(o,(a,l)=>{n+=Dh(i.name,l)})}})}),n.slice(1)},window.$=u;function la(n,t){if(n==null)return[n,void 0];typeof t=="string"&&(t=t.split("."));const e=t.join(".");let s=n;const i=[s];for(;typeof s=="object"&&s!==null&&t.length;){let r=t.shift(),o;const a=r.indexOf("[");if(a>0&&a{const i=e[s]??"";n=n.replace(new RegExp(`\\{${s}\\}`,"g"),`${i}`)}),n}for(let e=0;e(n[n.B=1]="B",n[n.KB=1024]="KB",n[n.MB=1048576]="MB",n[n.GB=1073741824]="GB",n[n.TB=1099511627776]="TB",n))(Ei||{});function pt(n,t=2,e){return Number.isNaN(n)?"?KB":(e||(n<1024?e="B":n<1048576?e="KB":n<1073741824?e="MB":n<1099511627776?e="GB":e="TB"),(n/Ei[e]).toFixed(t)+e)}const Re=n=>{const t=/^[0-9]*(B|KB|MB|GB|TB)$/;n=n.toUpperCase();const e=n.match(t);if(!e)return 0;const s=e[1];return n=n.replace(s,""),Number.parseInt(n,10)*Ei[s]};let Ii=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),Kt;function Rh(){return Ii}function Fh(n){Ii=n.toLowerCase().replace("-","_")}function ha(n,t){Kt||(Kt={}),typeof n=="string"&&(n={[n]:t??{}}),u.extend(!0,Kt,n)}function K(n,t,e,s,i,r){Array.isArray(n)?Kt&&n.unshift(Kt):n=Kt?[Kt,n]:[n],typeof e=="string"&&(r=i,i=s,s=e,e=void 0);const o=i||Ii;let a;for(const l of n){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const h=r&&l===Kt?`${r}.${t}`:t;if(a=ca(c,h),a!==void 0)break}return a===void 0?s:e?U(a,...Array.isArray(e)?e:[e]):a}function zh(n,t,e,s){return K(void 0,n,t,e,s)}K.addLang=ha,K.getLang=zh,K.getCode=Rh,K.setCode=Fh,K.map=Kt,ha({zh_cn:{confirm:"确定",save:"保存",cancel:"取消",delete:"删除",reset:"重置",add:"添加"},zh_tw:{confirm:"確定",save:"儲存",cancel:"取消",delete:"刪除",reset:"重置",add:"添加"},en:{confirm:"Confirm",save:"Save",cancel:"Cancel",delete:"Delete",reset:"Reset",add:"Add"}});function da(n,t,e){n instanceof Headers?n.set(t,e):Array.isArray(n)?n.push([t,e]):n[t]=e}function as(n,t,e){e!=null&&(Array.isArray(e)?e.forEach(s=>as(n,t,s)):n.append(t,e instanceof Blob?e:String(e)))}function Oh(n,t){if(n){const e={text:"text/plain",html:"text/html",json:"application/json",...t};for(const[s,i]of Object.entries(e))if(i.split(",").map(r=>r.trim()).includes(n))return s}return"text"}function qs(n,t){const e=t||new FormData;return n&&(typeof n=="string"&&(n=new URLSearchParams(n)),n instanceof URLSearchParams?n.forEach((s,i)=>{as(e,i,s)}):Array.isArray(n)?n.forEach(([s,i])=>{as(e,s,i)}):n instanceof FormData?n.forEach((s,i)=>{as(e,i,s)}):u.isPlainObject(n)&&Object.entries(n).forEach(([s,i])=>{as(e,s,i)})),e}class Ys{get completed(){return this.data!==void 0||this.error!==void 0}get[Symbol.toStringTag](){return"Ajax"}constructor(t){this.setting=t,this._controller=new AbortController,this._callbacks={success:[],error:[],complete:[]}}on(t,e){return this._callbacks[t].push(e),this}success(t){return this.on("success",t)}done(t){return this.success(t)}fail(t){return this.on("error",t)}complete(t){return this.on("complete",t)}always(t){return this.complete(t)}then(t,e){return this.completed?e&&this.error?e(this.error):t(this.data):(this.success(s=>t(s)),e&&this.fail(e)),this}catch(t){return this.error?(t(this.error),this):this.on("error",e=>t(e))}finally(t){return this.completed?(t(),this):this.complete(()=>t())}abort(t){return this.completed?!1:(this._abortError=t,this._controller.abort(),!0)}getResponseHeader(t){var e;return(e=this.response)==null?void 0:e.headers.get(t)}_init(){if(this.completed)return;const{url:t,type:e,data:s,processData:i=!0,contentType:r,crossDomain:o,accepts:a,dataType:l,timeout:c,dataFilter:h,beforeSend:d,success:p,error:f,complete:g,...y}=this.setting;if((d==null?void 0:d(y))===!1)return;e&&(y.method=e);let _=s;_&&(i&&(_=qs(_)),y.body=_),o&&(y.mode="cors");const b=y.headers||{};da(b,"X-Requested-With","XMLHttpRequest"),r&&da(b,"Content-Type",r),y.headers=b,y.signal&&y.signal.addEventListener("abort",()=>{this.abort()}),p&&this.success(p),f&&this.fail(f),g&&this.complete(g),y.signal=this._controller.signal,this.url=t,this.request=y}_emit(t,...e){this._callbacks[t].forEach(s=>{s.call(this,...e)})}async send(){var h;if(this.completed)return[];this._init();const{timeout:t,dataType:e,accepts:s,dataFilter:i,throws:r,jsonParser:o}=this.setting;t&&(this._timeoutID=window.setTimeout(()=>{this.abort(new Error("timeout"))},t));let a,l,c;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:d}=a;if(a.ok){const p=(h=a.headers.get("Content-Disposition"))==null?void 0:h.startsWith("attachment"),f=p?"blob":e||Oh(a.headers.get("Content-Type"),s);p||f==="blob"||f==="file"?c=await a.blob():f==="json"?typeof o=="function"?(c=await a.text(),c=o(c)):c=await a.json():c=await a.text(),this.data=c;const g=(i==null?void 0:i(c,f))??c;this._emit("success",g,d,a)}else throw new Error(d)}catch(d){l=d;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]}}u.ajax=(n,t)=>{t=t||{},typeof n=="string"?t.url=n:u.extend(t,n);const e=new Ys(t);return e.send(),e},u.getJSON=(n,t,e)=>(typeof t=="function"&&(e=t,t=void 0),u.ajax({url:n,data:t,success:e,dataType:"json"})),u.get=(n,t,e,s,i="GET")=>{let r,o;return typeof t=="function"?(r=t,o=void 0):o=t,typeof e=="function"?(r=e,s=void 0):s=e,u.ajax({method:i,url:n,data:o,success:r,dataType:s})},u.post=(n,t,e,s)=>u.get(n,t,e,s,"POST"),u.fn.load=function(n,t,e){typeof t=="function"&&(e=t,t=void 0);const[s,i]=n.split(" ");return u.get(s,t,(r,o,a)=>{i&&(r=u(r).find(i).html()),u(this).html(r),e==null||e.call(this,r,o,a)},"html"),this};async function Ce(n,t=[],e){const s={throws:!0,dataType:"json"};if(typeof n=="string")s.url=n;else if(typeof n=="object")u.extend(s,n);else if(typeof n=="function"){const o=n(...t);return o instanceof Promise?await o:o}e&&u.extend(s,typeof e=="function"?e(s):e);const i=new Ys(s),[r]=await i.send();return r}function Pi(n){return!!(n&&(typeof n=="string"||typeof n=="object"&&n.url||typeof n=="function"))}u.fetch=Ce;function mt(){return u.guid++}function Qs(n,t){if(n===t)return!1;if(n&&t&&typeof n=="object"&&typeof t=="object"){const e=Array.isArray(n),s=Array.isArray(t);if(e!==s)return!0;if(e&&s){if(n.length!==t.length)return!0;for(let o=0;oQs(s instanceof ke?s.value:s,e[i])))&&(this._value=this._compute(),this._lastDependencies=t.map(s=>s instanceof ke?s.cache:s)),this._value}}function Ai(...n){const t=[],e=new Map,s=(i,r)=>{if(Array.isArray(i)&&(r=i[1],i=i[0]),!i.length)return;const o=e.get(i);typeof o=="number"?t[o][1]=!!r:(e.set(i,t.length),t.push([i,!!r]))};return n.forEach(i=>{typeof i=="function"&&(i=i()),Array.isArray(i)?Ai(...i).forEach(s):i&&typeof i=="object"?Object.entries(i).forEach(s):typeof i=="string"&&i.split(" ").forEach(r=>s(r,!0))}),t.sort((i,r)=>(e.get(i[0])||0)-(e.get(r[0])||0))}const S=(...n)=>Ai(...n).reduce((t,[e,s])=>(s&&t.push(e),t),[]).join(" ");u.classes=S,u.fn.setClass=function(n,...t){return this.each((e,s)=>{const i=u(s);n===!0?i.attr("class",S(i.attr("class"),...t)):i.addClass(S(n,...t))})};const ls=new WeakMap;function Di(n,t,e){const s=ls.has(n),i=s?ls.get(n):{};typeof t=="string"?i[t]=e:t===null?Object.keys(i).forEach(r=>{delete i[r]}):Object.assign(i,t),Object.keys(i).forEach(r=>{i[r]===void 0&&delete i[r]}),Object.keys(i).length?(!s&&n instanceof Element&&Object.assign(i,u(n).dataset(),i),ls.set(n,i)):ls.delete(n)}function Li(n,t,e){let s=ls.get(n)||{};return!e&&n instanceof Element&&(s=Object.assign({},u(n).dataset(),s)),t===void 0?s:s[t]}u.fn.dataset=u.fn.data,u.fn.data=function(...n){const[t,e]=n;return!n.length||n.length===1&&typeof t=="string"?this.length?Li(this[0],t):void 0:this.each((s,i)=>Di(i,t,e))},u.fn.removeData=function(n=null){return this.each((t,e)=>Di(e,n))};function Zs(n,t="z-"){const e=u(n)[0];if(e)return Array.from(e.attributes).reduce((s,i)=>{let{name:r,value:o}=i;if(r.startsWith(t)){r=r.slice(t.length).replace(/-([a-z])/g,a=>a[1].toUpperCase());try{o.startsWith("RAWJS<")&&o.endsWith(">RAWJS")?o=new Function(`return ${o.substring(6,o.length-6)}`)():o=JSON.parse(o)}catch{}s[r]=o}return s},{})}function Ri(n,t,e="z-"){const s=u(n);Object.keys(t).forEach(i=>{let r=t[i];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),i=i.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),s.attr(`${e}${i}`,r)})}function Wh(...n){var e;const t=n.length;if(!t)return Zs(this);if(t===1){const[s]=n;return typeof s=="string"?(e=Zs(this))==null?void 0:e[s]:(u.isPlainObject(s)&&Ri(this,s),this)}return Ri(this,{[n[0]]:n[1]}),this}u.fn.z=Wh,u.fn._attr=u.fn.attr,u.fn.extend({attr(...n){const[t,e]=n;return!n.length||n.length===1&&typeof t=="string"?this._attr.apply(this,n):typeof t=="object"?(t&&Object.keys(t).forEach(s=>{const i=t[s];i===null?this.removeAttr(s):this._attr(s,i)}),this):e===null?this.removeAttr(t):this._attr(t,e)}}),u.Event=(n,t)=>{const[e,...s]=n.split("."),i=new Event(e,{bubbles:!0,cancelable:!0});return i.namespace=s.join("."),i.___ot=e,i.___td=t,i};const cs=(n,t)=>new Promise(e=>{const s=window.setTimeout(e,n);t&&t(s)}),ua={};u.share=ua;var Xs,q,fa;w.isValidElement=void 0;var xe,pa,ma,Fi,hs={},ga=[],Hh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Js=Array.isArray;function ie(n,t){for(var e in t)n[e]=t[e];return n}function ya(n){var t=n.parentNode;t&&t.removeChild(n)}function v(n,t,e){var s,i,r,o={};for(r in t)r=="key"?s=t[r]:r=="ref"?i=t[r]:o[r]=t[r];if(arguments.length>2&&(o.children=arguments.length>3?Xs.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(r in n.defaultProps)o[r]===void 0&&(o[r]=n.defaultProps[r]);return tn(n,o,s,i,null)}function tn(n,t,e,s,i){var r={type:n,props:t,key:e,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++fa,__i:-1,__u:0};return i==null&&q.vnode!=null&&q.vnode(r),r}function H(){return{current:null}}function re(n){return n.children}function B(n,t){this.props=n,this.context=t}function Fe(n,t){if(t==null)return n.__?Fe(n.__,n.__i+1):null;for(var e;tt&&xe.sort(Fi));en.__r=0}function va(n,t,e,s,i,r,o,a,l,c,h){var d,p,f,g,y,_=s&&s.__k||ga,b=t.length;for(e.__d=l,Bh(e,t,_),l=e.__d,d=0;d0?tn(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=n,i.__b=n.__b+1,a=jh(i,e,o=s+d,h),i.__i=a,r=null,a!==-1&&(h--,(r=e[a])&&(r.__u|=131072)),r==null||r.__v===null?(a==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):a!==o&&(a===o+1?d++:a>o?h>l-o?d+=a-o:d--:d=a(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a=0){if((l=t[o])&&!(131072&l.__u)&&i==l.key&&r===l.type)return o;o--}if(a{!e||typeof e!="object"||Object.keys(e).forEach(s=>{let i=e[s];const r=n[s];i!==r&&(r!==void 0&&(s==="className"||s.endsWith("Class")?i=[r,i]:s==="children"?i=[...sn(r),...sn(i)]:typeof r=="object"&&(s==="style"||s.endsWith("Style")||s==="attrs"||s.endsWith("Attrs")||s==="props")&&(i=u.extend(r,i))),n[s]=i)})}),n}function Hi(n){return Object.keys(n).forEach(t=>{n[t]===void 0&&delete n[t]}),n}const Oe=new Map;function ds(n){const{zui:t}=window;return(!Oe.size||n&&!Oe.has(n.toUpperCase()))&&Object.keys(t).forEach(e=>{const s=t[e];!s.NAME||!s.ZUI||Oe.set(e.toLowerCase(),s)}),n?Oe.get(n.toLowerCase()):void 0}function $a(n,t,e){const s=ds(n);return s?!s.MULTI_INSTANCE&&s.get(t)?(console.error(`[ZUI] cannot create component "${n}" on element which already has a component instance.`,{element:t,options:e}),null):new s(t,e):null}function Kh(n){if(n){const t=ds(n);t&&t.defineFn()}else ds(),Oe.forEach(t=>{t.defineFn()})}u.fn.zuiInit=function(){return this.find("[zui-create],[data-zui]").each(function(){const n=u(this);let t=Zs(n,"data-");const[e,s]=(t.zui||n.attr("zui-create")).split(":");n.zui(e)||(s?t=u.share[s]:delete t.zui,requestAnimationFrame(()=>$a(e,this,t)))}),this.find("[zui-init]").each(function(){const n=u(this);n.z("zuiInited")||u.runJS(n.z("zuiInited",!0).attr("zui-init"),["$element",n])}),this.find(".hide-before-init").removeClass("invisible hidden opacity-0"),this.find(".scroll-into-view").scrollIntoView(),this.find('[data-on="inited"]').each((n,t)=>{const e=u(t);e.zui()||e.trigger("inited")}),this},u.fn.zui=function(n,t){const e=this[0];if(!e)return;if(typeof n!="string"){const i=Li(e,void 0,!0),r={};let o;return Object.keys(i).forEach(a=>{if(a.startsWith("zui.")){const l=i[a];r[a]=l,(!o||o.gid{u("body").zuiInit()});function Ta(n,t=!0){const e=u(n),s=e[0],i="zui-disable-scroll";if(t){if(e.data(i))return;if((e.css("scrollbar-gutter")||"").includes("stable")){e.data(i,{overflow:e.css("overflow")}).css("overflow","hidden");return}const r=s===document.body||e.is("html")?window.innerWidth-document.body.clientWidth:s.offsetWidth-s.clientWidth;if(!r)return;const o=e.css("paddingRight")||"0";e.data(i,{paddingRight:o,overflow:e.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=e.data(i);if(!r)return;e.css(r).removeData(i)}}u.fn.disableScroll=function(n=!0){return this.each((t,e)=>{Ta(e,n)})},u.fn.enableScroll=function(n=!0){return this.disableScroll(!n)};function Gh(n){const t=u(this),e=t.dataset();if(!(e.on||"click").split(" ").includes(n.type))return;const s=e.selector?u(n.target).closest(e.selector):t;if(!s.length)return;const i=l=>l===""?!0:l,r=l=>{if(typeof l=="string")try{l=JSON.parse(l)}catch{}return l};if(i(e.once)){if(e.onceCalled)return;t.dataset("once-called",!0)}if(i(e.prevent)&&n.preventDefault(),i(e.stop)&&n.stopPropagation(),i(e.self)&&n.currentTarget!==n.target)return;const o=[["$element",t],["event",n],["options",e],["$target",s]];if(e.if&&!u.runJS(e.if,...o))return;const a=e.call;if(a){let l=window[a];const c=/^[$A-Z_][0-9A-Z_$.]*$/i.test(a);if(l||(l=u.runJS(a,...o)),!c||!u.isFunction(l))return;const h=[],d=e.params;e.params=h,typeof d=="string"&&d.length?d[0]==="["?h.push(...r(d)):h.push(...d.split(", ").map(p=>(p=p.trim(),p==="$element"?t:p==="event"?n:p==="options"?e:p.startsWith("$element.")||p.startsWith("event.")||p.startsWith("options.")?u.runJS(p,...o):r(p)))):h.push(d),l(...h)}e.do&&u.runJS(e.do,...o)}u(document).on("click.zui.global change.zui.global inited.zui.global","[data-on]",Gh);function We(n){if(typeof n=="function")return We(n());if(typeof n=="number")return[n];let t=n.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=n.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function rt(n){if(n==null)return null;const[t,e="px"]=We(n);return Number.isNaN(t)?typeof n=="string"?n:null:`${t}${e}`}async function rn(n,t){var s,i,r;if(n instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(n),t&&(o.download=decodeURIComponent(t)),o.click(),o.remove(),n}if(n instanceof Response){const o=await n.blob();return t=t||((r=(i=(s=n.headers.get("Content-Disposition"))==null?void 0:s.split(";")[1])==null?void 0:i.split("=")[1])==null?void 0:r.replace(/"/g,"")),rn(o,t)}const e=await fetch(n);return rn(e)}class Na{constructor(t){this._$target=u(t)}on(...t){return this._$target.on(...t),this}one(...t){return this._$target.one(...t),this}off(...t){return this._$target.off(...t),this}trigger(...t){return this._$target.trigger(...t),this}}const Wt=new Na(document);u.bus=Wt,u.on=Wt.on.bind(Wt),u.one=Wt.one.bind(Wt),u.off=Wt.off.bind(Wt),u.trigger=Wt.trigger.bind(Wt);var qh=["Shift","Meta","Alt","Control"],Ma=typeof navigator=="object"?navigator.platform:"",Ea=/Mac|iPod|iPhone|iPad/.test(Ma),Yh=Ea?"Meta":"Control",Qh=Ma==="Win32"?["Control","Alt"]:Ea?["Alt"]:[];function Bi(n,t){return typeof n.getModifierState=="function"&&(n.getModifierState(t)||Qh.includes(t)&&n.getModifierState("AltGraph"))}function Zh(n){return n.trim().split(" ").map(function(t){var e=t.split(/\b\+/),s=e.pop();return[e=e.map(function(i){return i==="$mod"?Yh:i}),s]})}function Ia(n,t){var e;t===void 0&&(t={});var s=(e=t.timeout)!=null?e:1e3,i=Object.keys(n).map(function(a){return[Zh(a),n[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(i.forEach(function(l){var c=l[0],h=l[1],d=r.get(c)||c;(function(p,f){return!(f[1].toUpperCase()!==p.key.toUpperCase()&&f[1]!==p.code||f[0].find(function(g){return!Bi(p,g)})||qh.find(function(g){return!f[0].includes(g)&&f[1]!==g&&Bi(p,g)}))})(a,d[0])?d.length>1?r.set(c,d.slice(1)):(r.delete(c),h(a)):Bi(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),s))}}function Xh(n,t,e){var s;e===void 0&&(e={});var i=(s=e.event)!=null?s:"keydown",r=Ia(t,e);return n.addEventListener(i,r),function(){n.removeEventListener(i,r)}}function ji(n,t={}){if(!n)return;const e=Object.keys(t).reduce((s,i)=>(t[i].optional||(s[i]={...t[i]}),s),{});return Object.keys(n).forEach(s=>{const i=n[s];i?i===!0?t[s]&&(e[s]={...t[s]}):e[s]=i:delete e[s]}),Object.keys(e).reduce((s,i)=>{const{keys:r,handler:o}=e[i];return typeof r=="string"?s[r]=o:r.forEach(a=>{s[a]=o}),s},{})}function Ui(n,t,e){const{timeout:s,event:i="keydown",scope:r,when:o}=e||{},a=Ia(t,{timeout:s}),l=`.zui.hotkeys${r?`.${r}`:""}`,c="zui-hotkeys-composing";return u(n).on(`${i}${l}`,function(h){o&&o(h)===!1||u(h.target).data(c)||a(h)}).on(`compositionstart${l}`,h=>{u(h.target).data(c,!0)}).on(`compositionend${l}`,h=>{u(h.target).removeData(c)})}function Vi(n,t){return u(n).off(`.zui.hotkeys${t?`.${t}`:""}`)}const Jh=Xh;u.fn.hotkeys=function(n,t){return Ui(this,n,t)},u.fn.unbindHotkeys=function(n){return Vi(this,n)},u.hotkeys=function(n,t){Ui(window,n,t)},u.unbindHotkeys=function(n){Vi(window,n)};function on(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function Pa(n){(typeof n=="string"||n instanceof Element||n instanceof u)&&(n={target:n});const{target:t,onError:e,onSuccess:s,afterExit:i,afterEnter:r}=n,o=u(t),a=o[0];if(!a)return;const l=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!l){e==null||e.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await l.call(a),s==null||s.call(a),u(a).off(".zui.fullscreen"),i&&o.on("exitFullscreen.zui.fullscreen",i),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(c){e==null||e.call(a,c)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,u(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",c=>{const h=on();let d=h;h?u(h).addClass("is-in-fullscreen"):(d=u(document).find(".is-in-fullscreen")[0]||document,u(d).removeClass("is-in-fullscreen")),u("body").toggleClass("has-in-fullscreen",!!h);const p={event:c,target:d,fullscreenElement:h};u(d).trigger(h?"enterFullscreen":"exitFullscreen",p).trigger("toggleFullscreen",p)}))}async function Ki(n){const t=on();return n===!1&&!!t===n?n:t?(document.exitFullscreen(),!1):(await Pa(n),!0)}u.fn.fullscreen=function(n){return Ki({target:this,...n})},u.getFullscreenElement=on,u.toggleFullscreen=Ki;function Se(n){return n.parentNode===document?!1:n.parentNode?Se(n.parentNode):!0}u.isDetached=Se,u.fn.isDetached=function(){const n=this[0];return!n||Se(n)};class X{constructor(t,e){this._inited=!1,this._autoDestory=0;const{KEY:s,DATA_KEY:i,DEFAULT:r,MULTI_INSTANCE:o,NAME:a}=this.constructor;if(!a)throw new Error('[ZUI] The component must have a "NAME" static property.');const l=u(t);if(l.data(s)&&!o)throw new Error("[ZUI] The component has been initialized on element.");const c=l[0],h=mt();this._gid=h,this._element=c;const d=l.parent();if(d.length&&(this._mobs=new MutationObserver(p=>{p.forEach(f=>{f.removedNodes.forEach(g=>{g===c&&(this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,Se(c)&&this.destroy()},100))})})}),this._mobs.observe(d[0],{childList:!0,subtree:!1})),this._options={...r,...l.dataset()},this.setOptions(e),this._key=this.options.key??`__${h}`,l.data(s,this).attr(i,`${h}`),o){const p=`${s}:ALL`;let f=l.data(p);f||(f=new Map,l.data(p,f)),f.set(this._key,this)}this.init(),requestAnimationFrame(async()=>{this._inited=!0,await this.afterInit(),this.emit("inited",this.options)})}static get ZUI(){return this.NAME.replace(/(^[A-Z]+)/,t=>t.toLowerCase())}static get KEY(){return`zui.${this.NAME}`}static get NAMESPACE(){return`.zui.${this.ZUI}`}static get DATA_KEY(){return`data-zui-${this.NAME}`}static get SELECTOR(){return`[${this.DATA_KEY}]`}get inited(){return this._inited}get element(){return this._element}get key(){return this._key}get options(){return this._options}get gid(){return this._gid}get $element(){return u(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(t){this.setOptions(t)}destroy(){var r;const{KEY:t,DATA_KEY:e,MULTI_INSTANCE:s}=this.constructor,{$element:i}=this;if(this.emit("destroyed"),(r=this._mobs)==null||r.disconnect(),i.off(this.namespace).removeData(t).attr(e,null),s){const o=this.$element.data(`${t}:ALL`);if(o)if(o.delete(this._key),o.size===0)this.$element.removeData(`${t}:ALL`);else{const a=o.values().next().value;i.data(t,a).attr(e,a.gid)}}}setOptions(t){return t&&u.extend(this._options,t),this._options}emit(t,...e){const s=u.Event(t);return s.__src=this,this.$emitter.trigger(s,[this,...e]),s}on(t,e,s){const i=this;this.$element[s!=null&&s.once?"one":"on"](this._wrapEvent(t),function(r,o){(!r.__src||r.__src===i)&&e.call(this,r,o)})}one(t,e){this.on(t,e,{once:!0})}off(t){this.$element.off(this._wrapEvent(t))}i18n(t,e,s){const{i18nData:i}=this;return K(i,t,e,s,this.options.lang,this.constructor.NAME)??K(i,t,e,s,this.options.lang)??`{i18n:${t}}`}get namespace(){return`${this.constructor.NAMESPACE}.${this._key}`}_wrapEvent(t){return t.split(" ").map(e=>e.includes(".")?e:`${e}${this.namespace}`).join(" ")}static get(t,e){const s=u(t);if(this.MULTI_INSTANCE&&e!==void 0){const i=s.data(`${this.KEY}:ALL`);return i?i.get(e):void 0}return s.data(this.KEY)}static ensure(t,e){const s=this.get(t,e==null?void 0:e.key);return s?(e&&s.setOptions(e),s):new this(t,e)}static getAll(t){const{MULTI_INSTANCE:e,SELECTOR:s}=this,i=[];return u(t||document).find(s).each((r,o)=>{if(e){const l=u(o).data(`${this.KEY}:ALL`);if(l){i.push(...l.values());return}}const a=u(o).data(this.KEY);a&&i.push(a)}),i.sort((r,o)=>r.gid-o.gid)}static query(t,e,s){if(t===void 0){let i=this.getAll();return s&&(i=i.filter(s)),i.pop()}return this.get(u(t).closest(this.SELECTOR),e)}static defineFn(t){let e=t||this.ZUI;u.fn[e]&&(e=`zui${this.NAME}`);const s=this;u.fn.extend({[e](i,...r){const o=typeof i=="object"?i:void 0,a=typeof i=="string"?i:void 0;let l;return this.each((c,h)=>{let d=s.get(h);if(d?o&&d.render(o):d=new s(h,o),a){let p=d[a],f=d;p===void 0&&(f=d.$,p=f[a]),typeof p=="function"?l=p.call(f,...r):l=p}}),l!==void 0?l:this}})}}X.DEFAULT={},X.MULTI_INSTANCE=!1;class Aa extends X{init(){const{offset:t=1,side:e,zIndex:s,pinnedClass:i="is-pinned"}=this.options,{$element:r}=this;r.css({position:"sticky",zIndex:s}),e&&r.css(e,-t),this._ob=new IntersectionObserver(([o])=>o.target.classList.toggle(i,o.intersectionRatio=l&&r>=c&&i+o<=h&&r+a<=d;const p=i<=h&&i+o>=l;return r<=d&&r+a>=c&&p}u.fn.isVisible=function(n){return an(this,n)};function Gi(n,t,e=!1){const s=u(n);if(t!==void 0){if(t.length){const i=`zui-runjs-${mt()}`;s.append(`