From b665b44aed84ae8f023ecaef555acb2ffd81f5d0 Mon Sep 17 00:00:00 2001 From: sunhao Date: Fri, 9 Aug 2024 08:35:57 +0800 Subject: [PATCH] * [misc] update zui3 lib. --- www/js/zui3/zui.zentao.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index ecf08c9874..9f8491ae70 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,7 +1,7 @@ -var $h=(D,Xt,ve)=>{if(!Xt.has(D))throw TypeError("Cannot "+ve)};var _e=(D,Xt,ve)=>($h(D,Xt,"read from private field"),ve?ve.call(D):Xt.get(D)),Ee=(D,Xt,ve)=>{if(Xt.has(D))throw TypeError("Cannot add the same private member more than once");Xt instanceof WeakSet?Xt.add(D):Xt.set(D,ve)},Le=(D,Xt,ve,pa)=>($h(D,Xt,"write to private field"),pa?pa.call(D,ve):Xt.set(D,ve),ve);var Th=(D,Xt,ve)=>($h(D,Xt,"access private method"),ve);(function(D,Xt){typeof exports=="object"&&typeof module<"u"?Xt(exports):typeof define=="function"&&define.amd?define(["exports"],Xt):(D=typeof globalThis<"u"?globalThis:D||self,Xt(D.zui={}))})(this,function(D){var Oo,zo,Hi,Ki,Vi,Ui,qi,Gi,Fo,Ep,jo,Mp,Ln,On;"use strict";const Xt="",ve="",pa="",N_="",E_="",M_="",A_="",P_="",I_="",D_="",R_="",L_="",Ip="3.0.0",en=document,hr=window,Nh=en.documentElement,qn=en.createElement.bind(en),Eh=qn("div"),ma=qn("table"),Dp=qn("tbody"),Mh=qn("tr"),{isArray:ur,prototype:Ah}=Array,{concat:Rp,filter:ga,indexOf:Ph,map:Ih,push:Lp,slice:Dh,some:ya,splice:Op}=Ah,zp=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,Fp=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,jp=/<.+>/,Bp=/^\w+$/;function ba(s,t){const e=Wp(t);return!s||!e&&!Gn(t)&&!Jt(t)?[]:!e&&Fp.test(s)?t.getElementsByClassName(s.slice(1).replace(/\\/g,"")):!e&&Bp.test(s)?t.getElementsByTagName(s):t.querySelectorAll(s)}class dr{constructor(t,e){if(!t)return;if(_a(t))return t;let n=t;if(he(t)){const i=e||en;if(n=zp.test(t)&&Gn(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):jp.test(t)?jh(t):_a(i)?i.find(t):he(i)?g(i).find(t):ba(t,i),!n)return}else if(Yn(t))return this.ready(t);(n.nodeType||n===hr)&&(n=[n]),this.length=n.length;for(let i=0,r=this.length;i{for(;t.firstChild;)t.removeChild(t.firstChild)})};function fr(...s){const t=Kp(s[0])?s.shift():!1,e=s.shift(),n=s.length;if(!e)return{};if(!n)return fr(t,g,e);for(let i=0;i{Jt(r)&&se(e,(o,a)=>{n?t?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},it.addClass=function(s){return this.toggleClass(s,!0)},it.removeAttr=function(s){const t=pr(s);return this.each((e,n)=>{Jt(n)&&se(t,(i,r)=>{n.removeAttribute(r)})})};function Up(s,t){if(s){if(he(s)){if(arguments.length<2){if(!this[0]||!Jt(this[0]))return;const e=this[0].getAttribute(s);return ii(e)?void 0:e}return we(t)?this:ii(t)?this.removeAttr(s):this.each((e,n)=>{Jt(n)&&n.setAttribute(s,t)})}for(const e in s)this.attr(e,s[e]);return this}}it.attr=Up,it.removeClass=function(s){return arguments.length?this.toggleClass(s,!1):this.attr("class","")},it.hasClass=function(s){return!!s&&ya.call(this,t=>Jt(t)&&t.classList.contains(s))},it.get=function(s){return we(s)?Dh.call(this):(s=Number(s),this[s<0?s+this.length:s])},it.eq=function(s){return g(this.get(s))},it.first=function(){return this.eq(0)},it.last=function(){return this.eq(-1)};function qp(s){return we(s)?this.get().map(t=>Jt(t)||Hp(t)?t.textContent:"").join(""):this.each((t,e)=>{Jt(e)&&(e.textContent=s)})}it.text=qp;function nn(s,t,e){if(!Jt(s))return;const n=hr.getComputedStyle(s,null);return e?n.getPropertyValue(t)||void 0:n[t]||s.style[t]}function We(s,t){return parseInt(nn(s,t),10)||0}function Lh(s,t){return We(s,`border${t?"Left":"Top"}Width`)+We(s,`padding${t?"Left":"Top"}`)+We(s,`padding${t?"Right":"Bottom"}`)+We(s,`border${t?"Right":"Bottom"}Width`)}const wa={};function Gp(s){if(wa[s])return wa[s];const t=qn(s);en.body.insertBefore(t,null);const e=nn(t,"display");return en.body.removeChild(t),wa[s]=e!=="none"?e:"block"}function Oh(s){return nn(s,"display")==="none"}function zh(s,t){const e=s&&(s.matches||s.webkitMatchesSelector||s.msMatchesSelector);return!!e&&!!t&&e.call(s,t)}function mr(s){return he(s)?(t,e)=>zh(e,s):Yn(s)?s:_a(s)?(t,e)=>s.is(e):s?(t,e)=>e===s:()=>!1}it.filter=function(s){const t=mr(s);return g(ga.call(this,(e,n)=>t.call(e,n,e)))};function bn(s,t){return t?s.filter(t):s}it.detach=function(s){return bn(this,s).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const Yp=/^\s*<(\w+)[^>]*>/,Qp=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Fh={"*":Eh,tr:Dp,td:Mh,th:Mh,thead:ma,tbody:ma,tfoot:ma};function jh(s){if(!he(s))return[];if(Qp.test(s))return[qn(RegExp.$1)];const t=Yp.test(s)&&RegExp.$1,e=Fh[t]||Fh["*"];return e.innerHTML=s,g(e.childNodes).detach().get()}g.parseHTML=jh,it.has=function(s){const t=he(s)?(e,n)=>ba(s,n).length:(e,n)=>n.contains(s);return this.filter(t)},it.not=function(s){const t=mr(s);return this.filter((e,n)=>(!he(s)||Jt(n))&&!t.call(n,e,n))};function sn(s,t,e,n){const i=[],r=Yn(t),o=n&&mr(n);for(let a=0,l=s.length;at.selected&&!t.disabled&&!t.parentNode.disabled),"value"):s.value||""}function Xp(s){return arguments.length?this.each((t,e)=>{const n=e.multiple&&e.options;if(n||Zh.test(e.type)){const i=ur(s)?Ih.call(s,String):ii(s)?[]:[String(s)];n?se(e.options,(r,o)=>{o.selected=i.indexOf(o.value)>=0},!0):e.checked=i.indexOf(e.value)>=0}else e.value=we(s)||ii(s)?"":s}):this[0]&&Bh(this[0])}it.val=Xp,it.is=function(s){const t=mr(s);return ya.call(this,(e,n)=>t.call(e,n,e))},g.guid=1;function He(s){return s.length>1?ga.call(s,(t,e,n)=>Ph.call(n,t)===e):s}g.unique=He,it.add=function(s,t){return g(He(this.get().concat(g(s,t).get())))},it.children=function(s){return bn(g(He(sn(this,t=>t.children))),s)},it.parent=function(s){return bn(g(He(sn(this,"parentNode"))),s)},it.index=function(s){const t=s?g(s)[0]:this[0],e=s?this:g(t).parent().children();return Ph.call(e,t)},it.closest=function(s){const t=this.filter(s);if(t.length)return t;const e=this.parent();return e.length?e.closest(s):t},it.siblings=function(s){return bn(g(He(sn(this,t=>g(t).parent().children().not(t)))),s)},it.find=function(s){return g(He(sn(this,t=>ba(s,t))))};const Zp=/^\s*\s*$/g,Jp=/^$|^module$|\/(java|ecma)script/i,tm=["type","src","nonce","noModule"];function em(s,t){const e=g(s);e.filter("script").add(e.find("script")).each((n,i)=>{if(Jp.test(i.type)&&Nh.contains(i)){const r=qn("script");r.text=i.textContent.replace(Zp,""),se(tm,(o,a)=>{i[a]&&(r[a]=i[a])}),t.head.insertBefore(r,null),t.head.removeChild(r)}})}function nm(s,t,e,n,i){n?s.insertBefore(t,e?s.firstChild:null):s.nodeName==="HTML"?s.parentNode.replaceChild(t,s):s.parentNode.insertBefore(t,e?s:s.nextSibling),i&&em(t,s.ownerDocument)}function _n(s,t,e,n,i,r,o,a){return se(s,(l,h)=>{se(g(h),(f,d)=>{se(g(t),(m,b)=>{const w=e?d:b,S=e?b:d,x=e?f:m;nm(w,x?S.cloneNode(!0):S,n,i,!x)},a)},o)},r),t}it.after=function(){return _n(arguments,this,!1,!1,!1,!0,!0)},it.append=function(){return _n(arguments,this,!1,!1,!0)};function sm(s){if(!arguments.length)return this[0]&&this[0].innerHTML;if(we(s))return this;const t=/]/.test(s);return this.each((e,n)=>{Jt(n)&&(t?g(n).empty().append(s):n.innerHTML=s)})}it.html=sm,it.appendTo=function(s){return _n(arguments,this,!0,!1,!0)},it.wrapInner=function(s){return this.each((t,e)=>{const n=g(e),i=n.contents();i.length?i.wrapAll(s):n.append(s)})},it.before=function(){return _n(arguments,this,!1,!0)},it.wrapAll=function(s){let t=g(s),e=t[0];for(;e.children.length;)e=e.firstElementChild;return this.first().before(t),this.appendTo(e)},it.wrap=function(s){return this.each((t,e)=>{const n=g(s)[0];g(e).wrapAll(t?n.cloneNode(!0):n)})},it.insertAfter=function(s){return _n(arguments,this,!0,!1,!1,!1,!1,!0)},it.insertBefore=function(s){return _n(arguments,this,!0,!0)},it.prepend=function(){return _n(arguments,this,!1,!0,!0,!0,!0)},it.prependTo=function(s){return _n(arguments,this,!0,!0,!0,!1,!1,!0)},it.contents=function(){return g(He(sn(this,s=>s.tagName==="IFRAME"?[s.contentDocument]:s.tagName==="TEMPLATE"?s.content.childNodes:s.childNodes)))},it.next=function(s,t,e){return bn(g(He(sn(this,"nextElementSibling",t,e))),s)},it.nextAll=function(s){return this.next(s,!0)},it.nextUntil=function(s,t){return this.next(t,!0,s)},it.parents=function(s,t){return bn(g(He(sn(this,"parentElement",!0,t))),s)},it.parentsUntil=function(s,t){return this.parents(t,s)},it.prev=function(s,t,e){return bn(g(He(sn(this,"previousElementSibling",t,e))),s)},it.prevAll=function(s){return this.prev(s,!0)},it.prevUntil=function(s,t){return this.prev(t,!0,s)},it.map=function(s){return g(Rp.apply([],Ih.call(this,(t,e)=>s.call(t,e,t))))},it.clone=function(){return this.map((s,t)=>t.cloneNode(!0))},it.offsetParent=function(){return this.map((s,t)=>{let e=t.offsetParent;for(;e&&nn(e,"position")==="static";)e=e.offsetParent;return e||Nh})},it.slice=function(s,t){return g(Dh.call(this,s,t))};const im=/-([a-z])/g;function Ca(s){return s.replace(im,(t,e)=>e.toUpperCase())}it.ready=function(s){const t=()=>setTimeout(s,0,g);return en.readyState!=="loading"?t():en.addEventListener("DOMContentLoaded",t),this},it.unwrap=function(){return this.parent().each((s,t)=>{if(t.tagName==="BODY")return;const e=g(t);e.replaceWith(e.children())}),this},it.offset=function(){const s=this[0];if(!s)return;const t=s.getBoundingClientRect();return{top:t.top+hr.pageYOffset,left:t.left+hr.pageXOffset}},it.position=function(){const s=this[0];if(!s)return;const t=nn(s,"position")==="fixed",e=t?s.getBoundingClientRect():this.offset();if(!t){const n=s.ownerDocument;let i=s.offsetParent||n.documentElement;for(;(i===n.body||i===n.documentElement)&&nn(i,"position")==="static";)i=i.parentNode;if(i!==s&&Jt(i)){const r=g(i).offset();e.top-=r.top+We(i,"borderTopWidth"),e.left-=r.left+We(i,"borderLeftWidth")}}return{top:e.top-We(s,"marginTop"),left:e.left-We(s,"marginLeft")}};const Wh={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};it.prop=function(s,t){if(s){if(he(s))return s=Wh[s]||s,arguments.length<2?this[0]&&this[0][s]:this.each((e,n)=>{n[s]=t});for(const e in s)this.prop(e,s[e]);return this}},it.removeProp=function(s){return this.each((t,e)=>{delete e[Wh[s]||s]})};const rm=/^--/;function ka(s){return rm.test(s)}const xa={},{style:om}=Eh,am=["webkit","moz","ms"];function lm(s,t=ka(s)){if(t)return s;if(!xa[s]){const e=Ca(s),n=`${e[0].toUpperCase()}${e.slice(1)}`,i=`${e} ${am.join(`${n} `)}${n}`.split(" ");se(i,(r,o)=>{if(o in om)return xa[s]=o,!1})}return xa[s]}const cm={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 Hh(s,t,e=ka(s)){return!e&&!cm[s]&&Rh(t)?`${t}px`:t}function hm(s,t){if(he(s)){const e=ka(s);return s=lm(s,e),arguments.length<2?this[0]&&nn(this[0],s,e):s?(t=Hh(s,t,e),this.each((n,i)=>{Jt(i)&&(e?i.style.setProperty(s,t):i.style[s]=t)})):this}for(const e in s)this.css(e,s[e]);return this}it.css=hm;function Kh(s,t){try{return s(t)}catch{return t}}const um=/^\s+|\s+$/;function Vh(s,t){const e=s.dataset[t]||s.dataset[Ca(t)];return um.test(e)?e:Kh(JSON.parse,e)}function dm(s,t,e){e=Kh(JSON.stringify,e),s.dataset[Ca(t)]=e}function fm(s,t){if(!s){if(!this[0])return;const e={};for(const n in this[0].dataset)e[n]=Vh(this[0],n);return e}if(he(s))return arguments.length<2?this[0]&&Vh(this[0],s):we(t)?this:this.each((e,n)=>{dm(n,s,t)});for(const e in s)this.data(e,s[e]);return this}it.data=fm;function Uh(s,t){const e=s.documentElement;return Math.max(s.body[`scroll${t}`],e[`scroll${t}`],s.body[`offset${t}`],e[`offset${t}`],e[`client${t}`])}se([!0,!1],(s,t)=>{se(["Width","Height"],(e,n)=>{const i=`${t?"outer":"inner"}${n}`;it[i]=function(r){if(this[0])return Cs(this[0])?t?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:Gn(this[0])?Uh(this[0],n):this[0][`${t?"offset":"client"}${n}`]+(r&&t?We(this[0],`margin${e?"Top":"Left"}`)+We(this[0],`margin${e?"Bottom":"Right"}`):0)}})}),se(["Width","Height"],(s,t)=>{const e=t.toLowerCase();it[e]=function(n){if(!this[0])return we(n)?void 0:this;if(!arguments.length)return Cs(this[0])?this[0].document.documentElement[`client${t}`]:Gn(this[0])?Uh(this[0],t):this[0].getBoundingClientRect()[e]-Lh(this[0],!s);const i=parseInt(n,10);return this.each((r,o)=>{if(!Jt(o))return;const a=nn(o,"boxSizing");o.style[e]=Hh(e,i+(a==="border-box"?Lh(o,!s):0))})}});const qh="___cd";it.toggle=function(s){return this.each((t,e)=>{if(!Jt(e))return;const n=Oh(e);(we(s)?n:s)?(e.style.display=e[qh]||"",Oh(e)&&(e.style.display=Gp(e.tagName))):n||(e[qh]=nn(e,"display"),e.style.display="none")})},it.hide=function(){return this.toggle(!1)},it.show=function(){return this.toggle(!0)};const Gh="___ce",Sa=".",$a={focus:"focusin",blur:"focusout"},Yh={mouseenter:"mouseover",mouseleave:"mouseout"},pm=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ta(s){return Yh[s]||$a[s]||s}function Na(s){const t=s.split(Sa);return[t[0],t.slice(1).sort()]}it.trigger=function(s,t){if(he(s)){const[n,i]=Na(s),r=Ta(n);if(!r)return this;const o=pm.test(r)?"MouseEvents":"HTMLEvents";s=en.createEvent(o),s.initEvent(r,!0,!0),s.namespace=i.join(Sa),s.___ot=n}s.___td=t;const e=s.___ot in $a;return this.each((n,i)=>{e&&Yn(i[s.___ot])&&(i[`___i${s.type}`]=!0,i[s.___ot](),i[`___i${s.type}`]=!1),i.dispatchEvent(s)})};function Qh(s){return s[Gh]=s[Gh]||{}}function mm(s,t,e,n,i){const r=Qh(s);r[t]=r[t]||[],r[t].push([e,n,i]),s.addEventListener(t,i)}function Xh(s,t){return!t||!ya.call(t,e=>s.indexOf(e)<0)}function gr(s,t,e,n,i){const r=Qh(s);if(t)r[t]&&(r[t]=r[t].filter(([o,a,l])=>{if(i&&l.guid!==i.guid||!Xh(o,e)||n&&n!==a)return!0;s.removeEventListener(t,l)}));else for(t in r)gr(s,t,e,n,i)}it.off=function(s,t,e){if(we(s))this.each((n,i)=>{!Jt(i)&&!Gn(i)&&!Cs(i)||gr(i)});else if(he(s))Yn(t)&&(e=t,t=""),se(pr(s),(n,i)=>{const[r,o]=Na(i),a=Ta(r);this.each((l,h)=>{!Jt(h)&&!Gn(h)&&!Cs(h)||gr(h,a,o,t,e)})});else for(const n in s)this.off(n,s[n]);return this},it.remove=function(s){return bn(this,s).detach().off(),this},it.replaceWith=function(s){return this.before(s).remove()},it.replaceAll=function(s){return g(s).replaceWith(this),this};function gm(s,t,e,n,i){if(!he(s)){for(const r in s)this.on(r,t,e,s[r],i);return this}return he(t)||(we(t)||ii(t)?t="":we(e)?(e=t,t=""):(n=e,e=t,t="")),Yn(n)||(n=e,e=void 0),n?(se(pr(s),(r,o)=>{const[a,l]=Na(o),h=Ta(a),f=a in Yh,d=a in $a;h&&this.each((m,b)=>{if(!Jt(b)&&!Gn(b)&&!Cs(b))return;const w=function(S){if(S.target[`___i${S.type}`])return S.stopImmediatePropagation();if(S.namespace&&!Xh(l,S.namespace.split(Sa))||!t&&(d&&(S.target!==b||S.___ot===h)||f&&S.relatedTarget&&b.contains(S.relatedTarget)))return;let x=b;if(t){let N=S.target;for(;!zh(N,t);)if(N===b||(N=N.parentNode,!N))return;x=N}Object.defineProperty(S,"currentTarget",{configurable:!0,get(){return x}}),Object.defineProperty(S,"delegateTarget",{configurable:!0,get(){return b}}),Object.defineProperty(S,"data",{configurable:!0,get(){return e}});const k=n.call(x,S,S.___td);i&&gr(b,h,l,t,w),k===!1&&(S.preventDefault(),S.stopPropagation())};w.guid=n.guid=n.guid||g.guid++,mm(b,h,l,t,w)})}),this):this}it.on=gm;function ym(s,t,e,n){return this.on(s,t,e,n,!0)}it.one=ym;const bm=/\r?\n/g;function _m(s,t){return`&${encodeURIComponent(s)}=${encodeURIComponent(t.replace(bm,`\r -`))}`}const vm=/file|reset|submit|button|image/i,Zh=/radio|checkbox/i;it.serialize=function(){let s="";return this.each((t,e)=>{se(e.elements||[e],(n,i)=>{if(i.disabled||!i.name||i.tagName==="FIELDSET"||vm.test(i.type)||Zh.test(i.type)&&!i.checked)return;const r=Bh(i);if(!we(r)){const o=ur(r)?r:[r];se(o,(a,l)=>{s+=_m(i.name,l)})}})}),s.slice(1)},window.$=g;function Jh(s,t){if(s==null)return[s,void 0];typeof t=="string"&&(t=t.split("."));const e=t.join(".");let n=s;const i=[n];for(;typeof n=="object"&&n!==null&&t.length;){let r=t.shift(),o;const a=r.indexOf("[");if(a>0&&a{const i=e[n]??"";s=s.replace(new RegExp(`\\{${n}\\}`,"g"),`${i}`)}),s}for(let e=0;e(s[s.B=1]="B",s[s.KB=1024]="KB",s[s.MB=1048576]="MB",s[s.GB=1073741824]="GB",s[s.TB=1099511627776]="TB",s))(Ma||{});function me(s,t=2,e){return Number.isNaN(s)?"?KB":(e||(s<1024?e="B":s<1048576?e="KB":s<1073741824?e="MB":s<1099511627776?e="GB":e="TB"),(s/Ma[e]).toFixed(t)+e)}const ks=s=>{const t=/^[0-9]*(B|KB|MB|GB|TB)$/;s=s.toUpperCase();const e=s.match(t);if(!e)return 0;const n=e[1];return s=s.replace(n,""),Number.parseInt(s,10)*Ma[n]};let Aa=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),rn;function wm(){return Aa}function Cm(s){Aa=s.toLowerCase().replace("-","_")}function tu(s,t){rn||(rn={}),typeof s=="string"&&(s={[s]:t??{}}),g.extend(!0,rn,s)}function Et(s,t,e,n,i,r){Array.isArray(s)?rn&&s.unshift(rn):s=rn?[rn,s]:[s],typeof e=="string"&&(r=i,i=n,n=e,e=void 0);const o=i||Aa;let a;for(const l of s){if(!l)continue;const h=l[o]||l.default;if(!h)continue;const f=r&&l===rn?`${r}.${t}`:t;if(a=Ea(h,f),a!==void 0)break}return a===void 0?n:e?Nt(a,...Array.isArray(e)?e:[e]):a}function km(s,t,e,n){return Et(void 0,s,t,e,n)}Et.addLang=tu,Et.getLang=km,Et.getCode=wm,Et.setCode=Cm,Et.map=rn,tu({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 eu(s,t,e){s instanceof Headers?s.set(t,e):Array.isArray(s)?s.push([t,e]):s[t]=e}function xs(s,t,e){e!=null&&(Array.isArray(e)?e.forEach(n=>xs(s,t,n)):!(e instanceof Blob)&&g.isPlainObject(e)?Object.entries(e).forEach(([n,i])=>{xs(s,`${t}[${n}]`,i)}):s.append(t,e instanceof Blob?e:String(e)))}function xm(s,t){if(s){const e={text:"text/plain",html:"text/html",json:"application/json",...t};for(const[n,i]of Object.entries(e))if(i.split(",").map(r=>r.trim()).includes(s))return n}return"text"}function yr(s,t){const e=t||new FormData;return s&&(typeof s=="string"&&(s=new URLSearchParams(s)),s instanceof URLSearchParams?s.forEach((n,i)=>{xs(e,i,n)}):Array.isArray(s)?s.forEach(([n,i])=>{xs(e,n,i)}):s instanceof FormData?s.forEach((n,i)=>{xs(e,i,n)}):g.isPlainObject(s)&&Object.entries(s).forEach(([n,i])=>{xs(e,n,i)})),e}class br{get completed(){return this.data!==void 0||this.error!==void 0}get[Symbol.toStringTag](){return"Ajax"}constructor(t){this.setting=t,this._controller=new AbortController,this._callbacks={success:[],error:[],complete:[]}}on(t,e){return this._callbacks[t].push(e),this}success(t){return this.on("success",t)}done(t){return this.success(t)}fail(t){return this.on("error",t)}complete(t){return this.on("complete",t)}always(t){return this.complete(t)}then(t,e){return this.completed?e&&this.error?e(this.error):t(this.data):(this.success(n=>t(n)),e&&this.fail(e)),this}catch(t){return this.error?(t(this.error),this):this.on("error",e=>t(e))}finally(t){return this.completed?(t(),this):this.complete(()=>t())}abort(t){return this.completed?!1:(this._abortError=t,this._controller.abort(),!0)}getResponseHeader(t){var e;return(e=this.response)==null?void 0:e.headers.get(t)}_init(){if(this.completed)return;const{url:t,type:e,data:n,processData:i=!0,contentType:r,crossDomain:o,accepts:a,dataType:l,timeout:h,dataFilter:f,beforeSend:d,success:m,error:b,complete:w,...S}=this.setting;if((d==null?void 0:d(S))===!1)return;e&&(S.method=e);let x=n;x&&(i&&(x=yr(x)),S.body=x),o&&(S.mode="cors");const k=S.headers||{};eu(k,"X-Requested-With","XMLHttpRequest"),r&&eu(k,"Content-Type",r),S.headers=k,S.signal&&S.signal.addEventListener("abort",()=>{this.abort()}),m&&this.success(m),b&&this.fail(b),w&&this.complete(w),S.signal=this._controller.signal,this.url=t,this.request=S}_emit(t,...e){this._callbacks[t].forEach(n=>{n.call(this,...e)})}async send(){var f;if(this.completed)return[];this._init();const{timeout:t,dataType:e,accepts:n,dataFilter:i,throws:r,jsonParser:o}=this.setting;t&&(this._timeoutID=window.setTimeout(()=>{this.abort(new Error("timeout"))},t));let a,l,h;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:d}=a;if(a.ok){const m=(f=a.headers.get("Content-Disposition"))==null?void 0:f.startsWith("attachment"),b=m?"blob":e||xm(a.headers.get("Content-Type"),n);m||b==="blob"||b==="file"?h=await a.blob():b==="json"?typeof o=="function"?(h=await a.text(),h=o(h)):h=await a.json():h=await a.text(),this.data=h;const w=(i==null?void 0:i(h,b))??h;this._emit("success",w,d,a)}else throw this.data=await a.text(),new Error(d)}catch(d){this.data===void 0&&h!==void 0&&(this.data=h),l=d;let m=!1;l.name==="AbortError"&&(this._abortError?l=this._abortError:m=!0),this.error=l,m||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[h,l,a]}}g.ajax=(s,t)=>{t=t||{},typeof s=="string"?t.url=s:g.extend(t,s);const e=new br(t);return e.send(),e},g.getJSON=(s,t,e)=>(typeof t=="function"&&(e=t,t=void 0),g.ajax({url:s,data:t,success:e,dataType:"json"})),g.get=(s,t,e,n,i="GET")=>{let r,o;return typeof t=="function"?(r=t,o=void 0):o=t,typeof e=="function"?(r=e,n=void 0):n=e,g.ajax({method:i,url:s,data:o,success:r,dataType:n})},g.post=(s,t,e,n)=>g.get(s,t,e,n,"POST"),g.fn.load=function(s,t,e){typeof t=="function"&&(e=t,t=void 0);const[n,i]=s.split(" ");return g.get(n,t,(r,o,a)=>{i&&(r=g(r).find(i).html()),g(this).html(r).zuiInit(),e==null||e.call(this,r,o,a)},"html"),this};async function Qn(s,t=[],e){const n={throws:!0,dataType:"json"};if(typeof s=="string")n.url=s;else if(typeof s=="object")g.extend(n,s);else if(typeof s=="function"){const o=s(...t);return o instanceof Promise?await o:o}e&&g.extend(n,typeof e=="function"?e(n):e);const i=new br(n),[r]=await i.send();return r}function Pa(s){return!!(s&&(typeof s=="string"||typeof s=="object"&&s.url||typeof s=="function"))}g.fetch=Qn;function ge(){return g.guid++}function _r(s,t){if(s===t)return!1;if(s&&t){const e=typeof s,n=typeof t;if(e!==n)return!0;if(e==="object"&&n==="object"){const i=Array.isArray(s),r=Array.isArray(t);if(i!==r)return!0;if(i&&r){if(s.length!==t.length)return!0;for(let l=0;l_r(n instanceof Xn?n.value:n,e[i])))&&(this._value=this._compute(),this._lastDependencies=t.map(n=>n instanceof Xn?n.cache:n)),this._value}}function Ia(...s){const t=[],e=new Map,n=(i,r)=>{if(Array.isArray(i)&&(r=i[1],i=i[0]),!i.length)return;const o=e.get(i);typeof o=="number"?t[o][1]=!!r:(e.set(i,t.length),t.push([i,!!r]))};return s.forEach(i=>{typeof i=="function"&&(i=i()),Array.isArray(i)?Ia(...i).forEach(n):i&&typeof i=="object"?Object.entries(i).forEach(n):typeof i=="string"&&i.split(" ").forEach(r=>n(r,!0))}),t.sort((i,r)=>(e.get(i[0])||0)-(e.get(r[0])||0))}const Y=(...s)=>Ia(...s).reduce((t,[e,n])=>(n&&t.push(e),t),[]).join(" ");g.classes=Y,g.fn.setClass=function(s,...t){return this.each((e,n)=>{const i=g(n);s===!0?i.attr("class",Y(i.attr("class"),...t)):i.addClass(Y(s,...t))})};const Ss=new WeakMap;function vr(s,t,e){const n=Ss.has(s),i=n?Ss.get(s):{};typeof t=="string"?i[t]=e:t===null?Object.keys(i).forEach(r=>{delete i[r]}):Object.assign(i,t),Object.keys(i).forEach(r=>{i[r]===void 0&&delete i[r]}),Object.keys(i).length?(!n&&s instanceof Element&&Object.assign(i,g(s).dataset(),i),Ss.set(s,i)):Ss.delete(s)}function ri(s,t,e){let n=Ss.get(s)||{};return e&&s instanceof Element&&(n=Object.assign({},g(s).dataset(),n)),t===void 0?n:n[t]}function Sm(s){Ss.delete(s)}g.fn.dataset=g.fn.data,g.fn.data=function(...s){const[t,e]=s;return!s.length||s.length===1&&typeof t=="string"?this.length?ri(this[0],t,!0):void 0:this.each((n,i)=>vr(i,t,e))},g.fn.removeData=function(s=null){return this.each((t,e)=>vr(e,s))};function Zn(s,...t){return s.includes("RAWJS")&&(s=s.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` -`)),new Function(`return ${s}`)(...t)}function Da(s,...t){return s.includes("RAWJS")?Zn(s,...t):JSON.parse(s)}function $s(s,t){const e=g(s)[0];if(!e)return;const{prefix:n,getter:i,evalValue:r,json:o=!0,evalArgs:a=[]}={prefix:"z-",...typeof t=="string"?{prefix:t}:t},l=Array.isArray(r)?new Set(r):void 0;return Array.from(e.attributes).reduce((h,f)=>{let{name:d}=f;const{value:m}=f;let b=m;if(d.startsWith(n)){if(d=d.slice(n.length).replace(/-([a-z])/g,w=>w[1].toUpperCase()),i)b=i(d,m);else try{r&&(!l||l.has(d))||r===void 0&&m.includes("RAWJS")?b=Zn(m,...a):o&&(b=JSON.parse(m))}catch{}h[d]=b}return h},{})}function Ra(s,t,e="z-"){const n=g(s);Object.keys(t).forEach(i=>{let r=t[i];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),i=i.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),n.attr(`${e}${i}`,r)})}function $m(...s){var e;const t=s.length;if(!t)return $s(this);if(t===1){const[n]=s;return typeof n=="string"?(e=$s(this))==null?void 0:e[n]:(g.isPlainObject(n)&&Ra(this,n),this)}return Ra(this,{[s[0]]:s[1]}),this}g.fn.z=$m,g.fn._attr=g.fn.attr,g.fn.extend({attr(...s){const[t,e]=s;return!s.length||s.length===1&&typeof t=="string"?this._attr.apply(this,s):typeof t=="object"?(t&&Object.keys(t).forEach(n=>{const i=t[n];i===null?this.removeAttr(n):this._attr(n,i)}),this):e===null?this.removeAttr(t):this._attr(t,e)}}),g.Event||(g.Event=(s,t)=>{const[e,...n]=s.split("."),i=new Event(e,{bubbles:!0,cancelable:!0});return i.namespace=n.join("."),i.___ot=e,i.___td=t,i});const oi=(s,t)=>new Promise(e=>{const n=window.setTimeout(e,s);t&&t(n)}),nu={};g.share=nu;var wr,Bt,su;D.isValidElement=void 0;var Jn,iu,ru,La,Oa,za,Fa,ai={},ou=[],Tm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cr=Array.isArray;function vn(s,t){for(var e in t)s[e]=t[e];return s}function au(s){var t=s.parentNode;t&&t.removeChild(s)}function M(s,t,e){var n,i,r,o={};for(r in t)r=="key"?n=t[r]:r=="ref"?i=t[r]:o[r]=t[r];if(arguments.length>2&&(o.children=arguments.length>3?wr.call(arguments,2):e),typeof s=="function"&&s.defaultProps!=null)for(r in s.defaultProps)o[r]===void 0&&(o[r]=s.defaultProps[r]);return kr(s,o,n,i,null)}function kr(s,t,e,n,i){var r={type:s,props:t,key:e,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++su,__i:-1,__u:0};return i==null&&Bt.vnode!=null&&Bt.vnode(r),r}function $t(){return{current:null}}function wn(s){return s.children}function Tt(s,t){this.props=s,this.context=t}function ts(s,t){if(t==null)return s.__?ts(s.__,s.__i+1):null;for(var e;tt&&Jn.sort(La));xr.__r=0}function hu(s,t,e,n,i,r,o,a,l,h,f){var d,m,b,w,S,x=n&&n.__k||ou,k=t.length;for(e.__d=l,Nm(e,t,x),l=e.__d,d=0;d0?kr(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=s,i.__b=s.__b+1,a=Em(i,e,o,f),i.__i=a,r=null,a!==-1&&(f--,(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:a==o+1?d++:a>o?f>l-o?d+=a-o: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(n=>{let i=e[n];const r=s[n];i!==r&&(r!==void 0&&(n==="className"||n.endsWith("Class")?i=[r,i]:n==="children"?i=[...Sr(r),...Sr(i)]:typeof r=="object"&&(n==="style"||n.endsWith("Style")||n==="attrs"||n.endsWith("Attrs")||n==="props")&&(i=g.extend(r,i))),s[n]=i)})}),s}function Ha(s){return Object.keys(s).forEach(t=>{s[t]===void 0&&delete s[t]}),s}function mu(s,t=!0){const e=g(s),n=e[0],i="zui-disable-scroll";if(t){if(e.data(i))return;if((e.css("scrollbar-gutter")||"").includes("stable")){e.data(i,{overflow:e.css("overflow")}).css("overflow","hidden");return}const r=n===document.body||e.is("html")?window.innerWidth-document.body.clientWidth:n.offsetWidth-n.clientWidth;if(!r)return;const o=e.css("paddingRight")||"0";e.data(i,{paddingRight:o,overflow:e.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=e.data(i);if(!r)return;e.css(r).removeData(i)}}g.fn.disableScroll=function(s=!0){return this.each((t,e)=>{mu(e,s)})},g.fn.enableScroll=function(s=!0){return this.disableScroll(!s)};function Ka(s,t,e){if(!(e.on||"click").split(" ").includes(t.type))return;const n=e.selector?g(t.target).closest(e.selector):s;if(!n.length)return;const i=h=>h===""?!0:h,r=h=>{if(typeof h=="string")try{h=JSON.parse(h)}catch{}return h};if(i(e.once)){if(e.onceCalled)return;s.dataset("once-called",!0)}if(i(e.prevent)&&t.preventDefault(),i(e.stop)&&t.stopPropagation(),i(e.self)&&t.currentTarget!==t.target)return;const o=[["$element",s],["event",t],["options",e],["$target",n]],a=h=>typeof h=="function"?h(...o):g.runJS(h,...o);if(e.if!==void 0&&!a(e.if))return;const l=e.call;if(l){let h;if(typeof l=="string"?h=/^[$A-Z_][0-9A-Z_$.]*$/i.test(l)?Ea(window,l):a(l):h=l,typeof h=="function"){const f=[],d=e.params;e.params=f,typeof d=="string"&&d.length?d[0]==="["?f.push(...r(d)):f.push(...d.split(", ").map(m=>(m=m.trim(),m==="$element"?s:m==="event"?t:m==="options"?e:m.startsWith("$element.")||m.startsWith("event.")||m.startsWith("options.")?a(m):r(m)))):Array.isArray(d)?f.push(...d):f.push(d),h(...f)}}e.do&&a(e.do)}function Pm(s){const t=g(this),e=s.type,n=t.attr("zui-on");if(n){const[o,a]=n.split("~").map(l=>l.trim());o&&Ka(t,s,g.extend({on:o},a?a.startsWith("{")?Zn(a):{do:a}:$s(t,{prefix:"data-",evalValue:["call","if","do"]})))}const i=t.attr(`zui-on-${e}`);i&&Ka(t,s,g.extend({on:e},i.startsWith("{")?Zn(i):{do:i})),t.attr("data-on")&&Ka(t,s,$s(t,{prefix:"data-",evalValue:["call","if","do"]}))}function gu(s){g(document).off(".zui.global").on(s.map(t=>`${t}.zui.global`).join(" "),`[zui-on],${s.map(t=>`[zui-on-${t}]`)},[data-on]`,Pm)}gu(["click","change","inited"]);function ns(s){if(typeof s=="function")return ns(s());if(typeof s=="number")return[s];let t=s.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=s.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function Yt(s){if(s==null)return null;const[t,e="px"]=ns(s);return Number.isNaN(t)?typeof s=="string"?s:null:`${t}${e}`}async function Tr(s,t){var n,i,r;if(s instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(s),t&&(o.download=decodeURIComponent(t)),o.click(),o.remove(),s}if(s instanceof Response){const o=await s.blob();return t=t||((r=(i=(n=s.headers.get("Content-Disposition"))==null?void 0:n.split(";")[1])==null?void 0:i.split("=")[1])==null?void 0:r.replace(/"/g,"")),Tr(o,t)}const e=await fetch(s);return Tr(e)}class yu{constructor(t){this._$target=g(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 Ke=new yu(document);g.bus=Ke,g.on=Ke.on.bind(Ke),g.one=Ke.one.bind(Ke),g.off=Ke.off.bind(Ke),g.trigger=Ke.trigger.bind(Ke);var Im=["Shift","Meta","Alt","Control"],bu=typeof navigator=="object"?navigator.platform:"",_u=/Mac|iPod|iPhone|iPad/.test(bu),Dm=_u?"Meta":"Control",Rm=bu==="Win32"?["Control","Alt"]:_u?["Alt"]:[];function Va(s,t){return typeof s.getModifierState=="function"&&(s.getModifierState(t)||Rm.includes(t)&&s.getModifierState("AltGraph"))}function Lm(s){return s.trim().split(" ").map(function(t){var e=t.split(/\b\+/),n=e.pop();return[e=e.map(function(i){return i==="$mod"?Dm:i}),n]})}function vu(s,t){var e;t===void 0&&(t={});var n=(e=t.timeout)!=null?e:1e3,i=Object.keys(s).map(function(a){return[Lm(a),s[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(i.forEach(function(l){var h=l[0],f=l[1],d=r.get(h)||h;(function(m,b){return!(b[1].toUpperCase()!==m.key.toUpperCase()&&b[1]!==m.code||b[0].find(function(w){return!Va(m,w)})||Im.find(function(w){return!b[0].includes(w)&&b[1]!==w&&Va(m,w)}))})(a,d[0])?d.length>1?r.set(h,d.slice(1)):(r.delete(h),f(a)):Va(a,a.key)||r.delete(h)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function Om(s,t,e){var n;e===void 0&&(e={});var i=(n=e.event)!=null?n:"keydown",r=vu(t,e);return s.addEventListener(i,r),function(){s.removeEventListener(i,r)}}function Ua(s,t={}){if(!s)return;const e=Object.keys(t).reduce((n,i)=>(t[i].optional||(n[i]={...t[i]}),n),{});return Object.keys(s).forEach(n=>{const i=s[n];i?i===!0?t[n]&&(e[n]={...t[n]}):e[n]=i:delete e[n]}),Object.keys(e).reduce((n,i)=>{const{keys:r,handler:o}=e[i];return typeof r=="string"?n[r]=o:r.forEach(a=>{n[a]=o}),n},{})}function qa(s,t,e){const{timeout:n,event:i="keydown",scope:r,when:o}=e||{},a=vu(t,{timeout:n}),l=`.zui.hotkeys${r?`.${r}`:""}`,h="zui-hotkeys-composing";return g(s).on(`${i}${l}`,function(f){o&&o(f)===!1||g(f.target).data(h)||a(f)}).on(`compositionstart${l}`,f=>{g(f.target).data(h,!0)}).on(`compositionend${l}`,f=>{g(f.target).removeData(h)})}function Ga(s,t){return g(s).off(`.zui.hotkeys${t?`.${t}`:""}`)}const zm=Om;g.fn.hotkeys=function(s,t){return qa(this,s,t)},g.fn.unbindHotkeys=function(s){return Ga(this,s)},g.hotkeys=function(s,t){qa(window,s,t)},g.unbindHotkeys=function(s){Ga(window,s)};function Nr(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function wu(s){(typeof s=="string"||s instanceof Element||s instanceof g)&&(s={target:s});const{target:t,onError:e,onSuccess:n,afterExit:i,afterEnter:r}=s,o=g(t),a=o[0];if(!a)return;const l=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!l){e==null||e.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await l.call(a),n==null||n.call(a),g(a).off(".zui.fullscreen"),i&&o.on("exitFullscreen.zui.fullscreen",i),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(h){e==null||e.call(a,h)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,g(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",h=>{const f=Nr();let d=f;f?g(f).addClass("is-in-fullscreen"):(d=g(document).find(".is-in-fullscreen")[0]||document,g(d).removeClass("is-in-fullscreen")),g("body").toggleClass("has-in-fullscreen",!!f);const m={event:h,target:d,fullscreenElement:f};g(d).trigger(f?"enterFullscreen":"exitFullscreen",m).trigger("toggleFullscreen",m)}))}async function Ya(s){const t=Nr();return s===!1&&!!t===s?s:t?(document.exitFullscreen(),!1):(await wu(s),!0)}g.fn.fullscreen=function(s){return Ya({target:this,...s})},g.getFullscreenElement=Nr,g.toggleFullscreen=Ya;function ss(s){return s.parentNode===document?!1:s.parentNode?ss(s.parentNode):!0}g.isDetached=ss,g.fn.isDetached=function(){const s=this[0];return!s||ss(s)};const is=class kp{constructor(t,e){this._inited=!1,this._autoDestory=0,this._destroyed=!1;const{KEY:n,DATA_KEY:i,DEFAULT:r,MULTI_INSTANCE:o,NAME:a,ATTR_KEY:l,ALL:h,TYPED_ALL:f}=this.constructor;if(!a)throw new Error('[ZUI] The component must have a "NAME" static property.');const d=g(t);if(d.data(n)&&!o)throw new Error(`[ZUI] The component "${a}" has been initialized on element.`);const m=d[0],b=ge();if(this._gid=b,this._element=m,this._options={...r,...(e==null?void 0:e.$optionsFromDataset)!==!1?d.dataset():{}},this.setOptions(e),this._key=this.options.key??`__${b}`,h.has(m)?h.get(m).add(this):h.set(m,new Set([this])),f.has(a)?f.get(a).add(this):f.set(a,new Set([this])),d.data(n,this).attr(l,"").attr(i,`${b}`),o){const w=`${n}:ALL`;let S=d.data(w);S||(S=new Map,d.data(w,S)),S.set(this._key,this)}this.init(),requestAnimationFrame(async()=>{this._inited=!0,await this.afterInit(),this.emit("inited",this.options)})}static get ZUI(){return this.NAME.replace(/(^[A-Z]+)/,t=>t.toLowerCase())}static get KEY(){return`zui.${this.NAME}`}static get NAMESPACE(){return`.zui.${this.ZUI}`}static get DATA_KEY(){return`data-zui-${this.NAME}`}static get ATTR_KEY(){return`z-use-${this.NAME}`}static get SELECTOR(){return`[${this.DATA_KEY}]`}get inited(){return this._inited}get destroyed(){return this._destroyed}get element(){return this._element}get key(){return this._key}get options(){return this._options}get gid(){return this._gid}get $element(){return g(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(t,e){this.setOptions(t,e)}destroy(){const{KEY:t,DATA_KEY:e,ALL:n,TYPED_ALL:i,NAME:r,MULTI_INSTANCE:o,ATTR_KEY:a}=this.constructor,{$element:l,element:h}=this;if(this.emit("destroyed"),this._destroyed=!0,l.off(this.namespace).removeData(t).removeAttr(a).removeAttr(e),o){const m=this.$element.data(`${t}:ALL`);if(m)if(m.delete(this._key),m.size===0)this.$element.removeData(`${t}:ALL`);else{const b=m.values().next().value;l.data(t,b).attr(e,b.gid)}}const f=n.get(h);f&&(f.delete(this),f.size===0&&n.delete(h));const d=i.get(r);d&&(d.delete(this),d.size===0&&i.delete(r))}autoDestroy(t=100){this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,ss(this.element)&&this.destroy()},t)}setOptions(t,e){return e?this._options={...this.constructor.DEFAULT,...(t==null?void 0:t.$optionsFromDataset)!==!1?this.$element.dataset():{},...t}:t&&g.extend(this._options,t),this._options}emit(t,...e){const n=g.Event(t);return n.__src=this,this.$emitter.trigger(n,[this,...e]),n}on(t,e,n){const i=this;this.$element[n!=null&&n.once?"one":"on"](this._wrapEvent(t),function(r,o){(!r.__src||r.__src===i)&&e.call(this,r,o)})}one(t,e){this.on(t,e,{once:!0})}off(t){this.$element.off(this._wrapEvent(t))}i18n(t,e,n){const{i18nData:i}=this;return Et(i,t,e,n,this.options.lang,this.constructor.NAME)??Et(i,t,e,n,this.options.lang)??`{i18n:${t}}`}get namespace(){return`${this.constructor.NAMESPACE}.${this._key}`}_wrapEvent(t){return t.split(" ").map(e=>e.includes(".")?e:`${e}${this.namespace}`).join(" ")}static get(t,e){const n=g(t);if(this.MULTI_INSTANCE&&e!==void 0){const i=n.data(`${this.KEY}:ALL`);return i?i.get(e):void 0}return n.data(this.KEY)}static isValid(t){return!0}static ensure(t,e){const n=this.get(t,e==null?void 0:e.key);if(n){if(this.isValid(n))return e&&n.setOptions(e),n;n.destroy()}return new this(t,e)}static getAll(t,e){var l;const{SELECTOR:n,ALL:i,TYPED_ALL:r}=this,o=[],a=h=>{h instanceof this&&(!e||e(h)!==!1)&&o.push(h)};return t?g(t).find(n).each((h,f)=>{var d;(d=i.get(f))==null||d.forEach(a)}):this!==kp?(l=r.get(this.NAME))==null||l.forEach(a):i.forEach(h=>{h.forEach(a)}),o.sort((h,f)=>h.gid-f.gid)}static query(t,e,n){return t===void 0?this.getAll(void 0,n).pop():this.get(g(t).closest(this.SELECTOR),e)}static defineFn(t){let e=t||this.ZUI;g.fn[e]&&(e=`zui${this.NAME}`);const n=this;g.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((h,f)=>{let d=n.get(f);if(d?o&&d.render(o):d=new n(f,o),a){let m=d[a],b=d;m===void 0&&(b=d.$,m=b[a]),typeof m=="function"?l=m.call(b,...r):l=m}}),l!==void 0?l:this}})}static register(t,e){var i,r;t=t||this,e=(e??t.NAME).toLowerCase(),this.map.set(e,t);const n=(r=(i=t.toggle)==null?void 0:i.name)==null?void 0:r.toLowerCase();n&&n!==e&&this.toggleMap.set(n,t)}};is.DEFAULT={},is.MULTI_INSTANCE=!1,is.ALL=new Map,is.TYPED_ALL=new Map,is.map=new Map,is.toggleMap=new Map;let zt=is;function li(s){return zt.map.get(s.toLowerCase())}function Qa(s,t,e={}){let n=li(s);if(n||(n=Xa(s)),!n)return null;const{$update:i,...r}=e;if(!n.MULTI_INSTANCE){const o=n.get(t);if(o)return i&&o.render(r,i==="reset"),o}return new n(t,r)}function Fm(s,t,e={}){requestAnimationFrame(()=>Qa(s,t,e))}function Cu(s,t){zt.register(s,t)}function Xa(s){const{zui:t}=window;if(t){s=s==null?void 0:s.toLowerCase();for(const e in t){const n=e.toLowerCase()===s;if(s&&!n)continue;const i=t[e];if(!(typeof i!="function"||!i.NAME||!i.ZUI)&&(zt.map.has(e.toLowerCase())||Cu(i),n))return i}}}function jm(s){var t;s?(t=li(s))==null||t.defineFn():window._zuiDefined||(Xa(),zt.map.forEach(e=>{e.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function Bm(s,t={}){const e=g(s);let n=e.attr("zui-create");const{update:i,onCreate:r}=t,o=(a,l)=>{if(l={$update:i,$optionsFromDataset:!1,...l},r){const f=r(a,l);if(f===!1)return;f&&(l=f)}const h=l.$lib;if(h){delete l.$lib,g.getLib(h).then(()=>Qa(a,s,l));return}Fm(a,s,l)};if(typeof n=="string"){n=n.trim();const a=n.length?n.split(",").map(f=>f.trim()):[],l=$s(s,{prefix:"zui-create-",evalValue:!0}),h=Object.keys(l);if(!h.length&&a.length===1)o(a[0],e.dataset());else{const f=new Set;[...a,...h].forEach(d=>{if(f.has(d))return;const m=l[d];o(d,m),delete l[d],f.add(d)})}}else{const a=e.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:s,options:t}),delete a.zui,o(l,a)}}function Wm(){g(document).on("click.zui.toggle mouseenter.zui.toggle","[data-toggle],[zui-toggle]",function(s){const t=g(this),e=t.dataset("toggle")||t.attr("zui-toggle");if(!e)return;const n=zt.toggleMap.get(e)||li(e),i=n==null?void 0:n.toggle;if(!i)return;const{trigger:r="click",skip:o="[disabled],.disabled",check:a}=i,l=s.type==="mouseover"?"hover":"click";if(!r.includes(l)||a&&!a.call(n,this,l,s)||o&&t.is(o))return;const{onGet:h,onCreate:f,setOptions:d=!0,getOptions:m,prevent:b=!0,handler:w,onToggle:S,convertHref:x}=i;let k=t.dataset();const N=t.attr(`zui-toggle-${e}`);if(N&&(k=g.extend(k,Zn(N))),x&&t.is("a")){const j=t.attr("href");if(j){const K=x===!0?{selector:"target",url:"url"}:x;"#.".includes(j[0])?K.selector&&k[K.selector]===void 0&&(k[K.selector]=j):K.url&&k[K.url]===void 0&&(k[K.url]=j)}}if(m&&(k=m.call(n,this,k,s)),w){w.call(n,this,k,l,s),b&&s.preventDefault();return}let B=h?h.call(n,this):n.get(this);if(B)d&&B.setOptions(k);else{const j=f?f.call(n,this,s,k):new n(this,k);if(!j)return;B=j}if(S){if(S.call(n,B,this,s)===!1)return}else{const{shown:j,show:K,hide:G,toggle:Q}=B;let Z;if(Q?Z=Q:K&&G?j?Z=G:Z=K:K&&(Z=K),Z)Z.call(B);else return}b&&s.preventDefault()})}function Hm(s,t){const e=ri(s),n=[];return Object.keys(e).forEach(i=>{if(!i.startsWith("zui."))return;const r=e[i];(t==null?void 0:t(r,i))!==!1&&n.push(e[i])}),n}let Er=0;function ku(s=100){if(Er&&clearTimeout(Er),s){Er=window.setTimeout(()=>ku(0),s);return}Er=0,zt.ALL.forEach(t=>{t.forEach(e=>e.autoDestroy())})}function Km(){if(!document.body||ri(document.body,"_autoDestoryMob"))return;const s=new MutationObserver(t=>{let e=!1;for(const n of t)if(n.removedNodes.length){e=!0;break}e&&ku()});s.observe(document.body,{childList:!0,subtree:!0}),vr(document.body,"_autoDestoryMob",s)}g.fn.zuiInit=function(s){return this.find("[zui-create],[data-zui]").each(function(){var t;((t=s==null?void 0:s.beforeCreate)==null?void 0:t.call(s,this))!==!1&&Bm(this,s)}),this.find("[zui-init]").each(function(){this.hasAttribute("z-zui-inited")||(this.setAttribute("z-zui-inited",""),g.runJS(this.getAttribute("zui-init"),["$element",g(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((t,e)=>{const n=g(e);n.zui()||n.trigger("inited")}),this},g.fn.zui=function(s,t){const e=this[0];if(!e)return;if(typeof s!="string"){const i={};let r;return Hm(e,(o,a)=>{i[a]=o,(!r||r.gid1?e[0]:void 0,i=e[e.length>1?1:0],r=g(this).zui(n),o=r==null?void 0:r[i];typeof o=="function"&&o.apply(r,t)}),this},g(()=>{g("body").zuiInit({update:!0}),Wm(),Km()});class Za extends zt{init(){const{offset:t=1,side:e,zIndex:n,pinnedClass:i="is-pinned",targets:r,scrollContainer:o}=this.options,{$element:a}=this,l=r?a.find(r):a;if(l.css({position:"sticky",zIndex:n}),e&&l.css(e,-t),o){const h=a.closest(o)[0];if(h){const f=()=>{this._raf&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{if(this._raf=0,h.scrollTop===0&&(!e||e==="top")){l.toggleClass(i,!1);return}const d=h.getBoundingClientRect();l.each((m,b)=>{const S=b.getBoundingClientRect()[e||"top"]===d[e||"top"];b.classList.toggle(i,S)})})};this._scrollListener=f,h.addEventListener("scroll",f)}this._container=h}else this._ob=new IntersectionObserver(h=>{h.forEach(f=>{f.target.classList.toggle(i,f.intersectionRatiothis._ob.observe(f))}destroy(){var t;(t=this._ob)==null||t.disconnect(),this._container&&(this._container.removeEventListener("scroll",this._scrollListener),this._raf&&cancelAnimationFrame(this._raf))}}Za.NAME="Sticky";function ci(s,t={}){const e=g(s)[0];if(!e)return!1;let{viewport:n}=t;const{left:i,top:r,width:o,height:a}=e.getBoundingClientRect();if(t.checkZeroSize&&!(o*a))return!1;if(!n)if(t.container)n=g(e).closest(t.container)[0].getBoundingClientRect();else{const{innerHeight:w,innerWidth:S}=window,{clientHeight:x,clientWidth:k}=document.documentElement;n={left:0,top:0,width:S||k,height:w||x}}const{left:l,top:h,width:f,height:d}=n;if(t.fullyCheck)return i>=l&&r>=h&&i+o<=f+l&&r+a<=d+h;const m=i<=l+f&&i+o>=l;return r<=h+d&&r+a>=h&&m}g.fn.isVisible=function(s){return ci(this,s)};function Mr(s,t,e=!1){var i;const n=g(s);if(t!==void 0){if(typeof t=="string"&&t.length){const r=`zui-runjs-${ge()}`;n.append(`