From f0b045d77cd2e4bd1913ff1eb3c53663584fd336 Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 27 Aug 2024 16:46:49 +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 6d24510a8b..8f5b590dc5 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,7 +1,7 @@ -var ph=(D,Yt,be)=>{if(!Yt.has(D))throw TypeError("Cannot "+be)};var ye=(D,Yt,be)=>(ph(D,Yt,"read from private field"),be?be.call(D):Yt.get(D)),Te=(D,Yt,be)=>{if(Yt.has(D))throw TypeError("Cannot add the same private member more than once");Yt instanceof WeakSet?Yt.add(D):Yt.set(D,be)},De=(D,Yt,be,na)=>(ph(D,Yt,"write to private field"),na?na.call(D,be):Yt.set(D,be),be);var mh=(D,Yt,be)=>(ph(D,Yt,"access private method"),be);(function(D,Yt){typeof exports=="object"&&typeof module<"u"?Yt(exports):typeof define=="function"&&define.amd?define(["exports"],Yt):(D=typeof globalThis<"u"?globalThis:D||self,Yt(D.zui={}))})(this,function(D){var xo,So,Ai,Ii,Di,Ri,Li,Oi,$o,_p,To,vp,Pn,An;"use strict";const Yt="",be="",na="",b_="",__="",v_="",w_="",C_="",k_="",x_="",S_="",$_="",kp="3.0.0",Xe=document,Ji=window,gh=Xe.documentElement,Hn=Xe.createElement.bind(Xe),yh=Hn("div"),sa=Hn("table"),xp=Hn("tbody"),bh=Hn("tr"),{isArray:tr,prototype:_h}=Array,{concat:Sp,filter:ia,indexOf:vh,map:wh,push:$p,slice:Ch,some:ra,splice:Tp}=_h,Np=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,Ep=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,Mp=/<.+>/,Pp=/^\w+$/;function oa(s,t){const e=Ap(t);return!s||!e&&!Wn(t)&&!Xt(t)?[]:!e&&Ep.test(s)?t.getElementsByClassName(s.slice(1).replace(/\\/g,"")):!e&&Pp.test(s)?t.getElementsByTagName(s):t.querySelectorAll(s)}class er{constructor(t,e){if(!t)return;if(aa(t))return t;let n=t;if(ce(t)){const i=e||Xe;if(n=Np.test(t)&&Wn(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):Mp.test(t)?Nh(t):aa(i)?i.find(t):ce(i)?g(i).find(t):oa(t,i),!n)return}else if(Kn(t))return this.ready(t);(n.nodeType||n===Ji)&&(n=[n]),this.length=n.length;for(let i=0,r=this.length;i{for(;t.firstChild;)t.removeChild(t.firstChild)})};function nr(...s){const t=Dp(s[0])?s.shift():!1,e=s.shift(),n=s.length;if(!e)return{};if(!n)return nr(t,g,e);for(let i=0;i{Xt(r)&&ne(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=sr(s);return this.each((e,n)=>{Xt(n)&&ne(t,(i,r)=>{n.removeAttribute(r)})})};function Lp(s,t){if(s){if(ce(s)){if(arguments.length<2){if(!this[0]||!Xt(this[0]))return;const e=this[0].getAttribute(s);return Qs(e)?void 0:e}return _e(t)?this:Qs(t)?this.removeAttr(s):this.each((e,n)=>{Xt(n)&&n.setAttribute(s,t)})}for(const e in s)this.attr(e,s[e]);return this}}it.attr=Lp,it.removeClass=function(s){return arguments.length?this.toggleClass(s,!1):this.attr("class","")},it.hasClass=function(s){return!!s&&ra.call(this,t=>Xt(t)&&t.classList.contains(s))},it.get=function(s){return _e(s)?Ch.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 Op(s){return _e(s)?this.get().map(t=>Xt(t)||Ip(t)?t.textContent:"").join(""):this.each((t,e)=>{Xt(e)&&(e.textContent=s)})}it.text=Op;function Ze(s,t,e){if(!Xt(s))return;const n=Ji.getComputedStyle(s,null);return e?n.getPropertyValue(t)||void 0:n[t]||s.style[t]}function je(s,t){return parseInt(Ze(s,t),10)||0}function xh(s,t){return je(s,`border${t?"Left":"Top"}Width`)+je(s,`padding${t?"Left":"Top"}`)+je(s,`padding${t?"Right":"Bottom"}`)+je(s,`border${t?"Right":"Bottom"}Width`)}const ca={};function zp(s){if(ca[s])return ca[s];const t=Hn(s);Xe.body.insertBefore(t,null);const e=Ze(t,"display");return Xe.body.removeChild(t),ca[s]=e!=="none"?e:"block"}function Sh(s){return Ze(s,"display")==="none"}function $h(s,t){const e=s&&(s.matches||s.webkitMatchesSelector||s.msMatchesSelector);return!!e&&!!t&&e.call(s,t)}function ir(s){return ce(s)?(t,e)=>$h(e,s):Kn(s)?s:aa(s)?(t,e)=>s.is(e):s?(t,e)=>e===s:()=>!1}it.filter=function(s){const t=ir(s);return g(ia.call(this,(e,n)=>t.call(e,n,e)))};function fn(s,t){return t?s.filter(t):s}it.detach=function(s){return fn(this,s).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const Fp=/^\s*<(\w+)[^>]*>/,jp=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Th={"*":yh,tr:xp,td:bh,th:bh,thead:sa,tbody:sa,tfoot:sa};function Nh(s){if(!ce(s))return[];if(jp.test(s))return[Hn(RegExp.$1)];const t=Fp.test(s)&&RegExp.$1,e=Th[t]||Th["*"];return e.innerHTML=s,g(e.childNodes).detach().get()}g.parseHTML=Nh,it.has=function(s){const t=ce(s)?(e,n)=>oa(s,n).length:(e,n)=>n.contains(s);return this.filter(t)},it.not=function(s){const t=ir(s);return this.filter((e,n)=>(!ce(s)||Xt(n))&&!t.call(n,e,n))};function Je(s,t,e,n){const i=[],r=Kn(t),o=n&&ir(n);for(let a=0,l=s.length;at.selected&&!t.disabled&&!t.parentNode.disabled),"value"):s.value||""}function Bp(s){return arguments.length?this.each((t,e)=>{const n=e.multiple&&e.options;if(n||jh.test(e.type)){const i=tr(s)?wh.call(s,String):Qs(s)?[]:[String(s)];n?ne(e.options,(r,o)=>{o.selected=i.indexOf(o.value)>=0},!0):e.checked=i.indexOf(e.value)>=0}else e.value=_e(s)||Qs(s)?"":s}):this[0]&&Eh(this[0])}it.val=Bp,it.is=function(s){const t=ir(s);return ra.call(this,(e,n)=>t.call(e,n,e))},g.guid=1;function Be(s){return s.length>1?ia.call(s,(t,e,n)=>vh.call(n,t)===e):s}g.unique=Be,it.add=function(s,t){return g(Be(this.get().concat(g(s,t).get())))},it.children=function(s){return fn(g(Be(Je(this,t=>t.children))),s)},it.parent=function(s){return fn(g(Be(Je(this,"parentNode"))),s)},it.index=function(s){const t=s?g(s)[0]:this[0],e=s?this:g(t).parent().children();return vh.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 fn(g(Be(Je(this,t=>g(t).parent().children().not(t)))),s)},it.find=function(s){return g(Be(Je(this,t=>oa(s,t))))};const Hp=/^\s*\s*$/g,Wp=/^$|^module$|\/(java|ecma)script/i,Kp=["type","src","nonce","noModule"];function Vp(s,t){const e=g(s);e.filter("script").add(e.find("script")).each((n,i)=>{if(Wp.test(i.type)&&gh.contains(i)){const r=Hn("script");r.text=i.textContent.replace(Hp,""),ne(Kp,(o,a)=>{i[a]&&(r[a]=i[a])}),t.head.insertBefore(r,null),t.head.removeChild(r)}})}function Up(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&&Vp(t,s.ownerDocument)}function pn(s,t,e,n,i,r,o,a){return ne(s,(l,h)=>{ne(g(h),(f,d)=>{ne(g(t),(m,y)=>{const v=e?d:y,k=e?y:d,x=e?f:m;Up(v,x?k.cloneNode(!0):k,n,i,!x)},a)},o)},r),t}it.after=function(){return pn(arguments,this,!1,!1,!1,!0,!0)},it.append=function(){return pn(arguments,this,!1,!1,!0)};function qp(s){if(!arguments.length)return this[0]&&this[0].innerHTML;if(_e(s))return this;const t=/]/.test(s);return this.each((e,n)=>{Xt(n)&&(t?g(n).empty().append(s):n.innerHTML=s)})}it.html=qp,it.appendTo=function(s){return pn(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 pn(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 pn(arguments,this,!0,!1,!1,!1,!1,!0)},it.insertBefore=function(s){return pn(arguments,this,!0,!0)},it.prepend=function(){return pn(arguments,this,!1,!0,!0,!0,!0)},it.prependTo=function(s){return pn(arguments,this,!0,!0,!0,!1,!1,!0)},it.contents=function(){return g(Be(Je(this,s=>s.tagName==="IFRAME"?[s.contentDocument]:s.tagName==="TEMPLATE"?s.content.childNodes:s.childNodes)))},it.next=function(s,t,e){return fn(g(Be(Je(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 fn(g(Be(Je(this,"parentElement",!0,t))),s)},it.parentsUntil=function(s,t){return this.parents(t,s)},it.prev=function(s,t,e){return fn(g(Be(Je(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(Sp.apply([],wh.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&&Ze(e,"position")==="static";)e=e.offsetParent;return e||gh})},it.slice=function(s,t){return g(Ch.call(this,s,t))};const Gp=/-([a-z])/g;function ha(s){return s.replace(Gp,(t,e)=>e.toUpperCase())}it.ready=function(s){const t=()=>setTimeout(s,0,g);return Xe.readyState!=="loading"?t():Xe.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+Ji.pageYOffset,left:t.left+Ji.pageXOffset}},it.position=function(){const s=this[0];if(!s)return;const t=Ze(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)&&Ze(i,"position")==="static";)i=i.parentNode;if(i!==s&&Xt(i)){const r=g(i).offset();e.top-=r.top+je(i,"borderTopWidth"),e.left-=r.left+je(i,"borderLeftWidth")}}return{top:e.top-je(s,"marginTop"),left:e.left-je(s,"marginLeft")}};const Mh={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(ce(s))return s=Mh[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[Mh[s]||s]})};const Yp=/^--/;function ua(s){return Yp.test(s)}const da={},{style:Qp}=yh,Xp=["webkit","moz","ms"];function Zp(s,t=ua(s)){if(t)return s;if(!da[s]){const e=ha(s),n=`${e[0].toUpperCase()}${e.slice(1)}`,i=`${e} ${Xp.join(`${n} `)}${n}`.split(" ");ne(i,(r,o)=>{if(o in Qp)return da[s]=o,!1})}return da[s]}const Jp={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 Ph(s,t,e=ua(s)){return!e&&!Jp[s]&&kh(t)?`${t}px`:t}function tm(s,t){if(ce(s)){const e=ua(s);return s=Zp(s,e),arguments.length<2?this[0]&&Ze(this[0],s,e):s?(t=Ph(s,t,e),this.each((n,i)=>{Xt(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=tm;function Ah(s,t){try{return s(t)}catch{return t}}const em=/^\s+|\s+$/;function Ih(s,t){const e=s.dataset[t]||s.dataset[ha(t)];return em.test(e)?e:Ah(JSON.parse,e)}function nm(s,t,e){e=Ah(JSON.stringify,e),s.dataset[ha(t)]=e}function sm(s,t){if(!s){if(!this[0])return;const e={};for(const n in this[0].dataset)e[n]=Ih(this[0],n);return e}if(ce(s))return arguments.length<2?this[0]&&Ih(this[0],s):_e(t)?this:this.each((e,n)=>{nm(n,s,t)});for(const e in s)this.data(e,s[e]);return this}it.data=sm;function Dh(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}`])}ne([!0,!1],(s,t)=>{ne(["Width","Height"],(e,n)=>{const i=`${t?"outer":"inner"}${n}`;it[i]=function(r){if(this[0])return gs(this[0])?t?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:Wn(this[0])?Dh(this[0],n):this[0][`${t?"offset":"client"}${n}`]+(r&&t?je(this[0],`margin${e?"Top":"Left"}`)+je(this[0],`margin${e?"Bottom":"Right"}`):0)}})}),ne(["Width","Height"],(s,t)=>{const e=t.toLowerCase();it[e]=function(n){if(!this[0])return _e(n)?void 0:this;if(!arguments.length)return gs(this[0])?this[0].document.documentElement[`client${t}`]:Wn(this[0])?Dh(this[0],t):this[0].getBoundingClientRect()[e]-xh(this[0],!s);const i=parseInt(n,10);return this.each((r,o)=>{if(!Xt(o))return;const a=Ze(o,"boxSizing");o.style[e]=Ph(e,i+(a==="border-box"?xh(o,!s):0))})}});const Rh="___cd";it.toggle=function(s){return this.each((t,e)=>{if(!Xt(e))return;const n=Sh(e);(_e(s)?n:s)?(e.style.display=e[Rh]||"",Sh(e)&&(e.style.display=zp(e.tagName))):n||(e[Rh]=Ze(e,"display"),e.style.display="none")})},it.hide=function(){return this.toggle(!1)},it.show=function(){return this.toggle(!0)};const Lh="___ce",fa=".",pa={focus:"focusin",blur:"focusout"},Oh={mouseenter:"mouseover",mouseleave:"mouseout"},im=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function ma(s){return Oh[s]||pa[s]||s}function ga(s){const t=s.split(fa);return[t[0],t.slice(1).sort()]}it.trigger=function(s,t){if(ce(s)){const[n,i]=ga(s),r=ma(n);if(!r)return this;const o=im.test(r)?"MouseEvents":"HTMLEvents";s=Xe.createEvent(o),s.initEvent(r,!0,!0),s.namespace=i.join(fa),s.___ot=n}s.___td=t;const e=s.___ot in pa;return this.each((n,i)=>{e&&Kn(i[s.___ot])&&(i[`___i${s.type}`]=!0,i[s.___ot](),i[`___i${s.type}`]=!1),i.dispatchEvent(s)})};function zh(s){return s[Lh]=s[Lh]||{}}function rm(s,t,e,n,i){const r=zh(s);r[t]=r[t]||[],r[t].push([e,n,i]),s.addEventListener(t,i)}function Fh(s,t){return!t||!ra.call(t,e=>s.indexOf(e)<0)}function rr(s,t,e,n,i){const r=zh(s);if(t)r[t]&&(r[t]=r[t].filter(([o,a,l])=>{if(i&&l.guid!==i.guid||!Fh(o,e)||n&&n!==a)return!0;s.removeEventListener(t,l)}));else for(t in r)rr(s,t,e,n,i)}it.off=function(s,t,e){if(_e(s))this.each((n,i)=>{!Xt(i)&&!Wn(i)&&!gs(i)||rr(i)});else if(ce(s))Kn(t)&&(e=t,t=""),ne(sr(s),(n,i)=>{const[r,o]=ga(i),a=ma(r);this.each((l,h)=>{!Xt(h)&&!Wn(h)&&!gs(h)||rr(h,a,o,t,e)})});else for(const n in s)this.off(n,s[n]);return this},it.remove=function(s){return fn(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 om(s,t,e,n,i){if(!ce(s)){for(const r in s)this.on(r,t,e,s[r],i);return this}return ce(t)||(_e(t)||Qs(t)?t="":_e(e)?(e=t,t=""):(n=e,e=t,t="")),Kn(n)||(n=e,e=void 0),n?(ne(sr(s),(r,o)=>{const[a,l]=ga(o),h=ma(a),f=a in Oh,d=a in pa;h&&this.each((m,y)=>{if(!Xt(y)&&!Wn(y)&&!gs(y))return;const v=function(k){if(k.target[`___i${k.type}`])return k.stopImmediatePropagation();if(k.namespace&&!Fh(l,k.namespace.split(fa))||!t&&(d&&(k.target!==y||k.___ot===h)||f&&k.relatedTarget&&y.contains(k.relatedTarget)))return;let x=y;if(t){let N=k.target;for(;!$h(N,t);)if(N===y||(N=N.parentNode,!N))return;x=N}Object.defineProperty(k,"currentTarget",{configurable:!0,get(){return x}}),Object.defineProperty(k,"delegateTarget",{configurable:!0,get(){return y}}),Object.defineProperty(k,"data",{configurable:!0,get(){return e}});const S=n.call(x,k,k.___td);i&&rr(y,h,l,t,v),S===!1&&(k.preventDefault(),k.stopPropagation())};v.guid=n.guid=n.guid||g.guid++,rm(y,h,l,t,v)})}),this):this}it.on=om;function am(s,t,e,n){return this.on(s,t,e,n,!0)}it.one=am;const lm=/\r?\n/g;function cm(s,t){return`&${encodeURIComponent(s)}=${encodeURIComponent(t.replace(lm,`\r -`))}`}const hm=/file|reset|submit|button|image/i,jh=/radio|checkbox/i;it.serialize=function(){let s="";return this.each((t,e)=>{ne(e.elements||[e],(n,i)=>{if(i.disabled||!i.name||i.tagName==="FIELDSET"||hm.test(i.type)||jh.test(i.type)&&!i.checked)return;const r=Eh(i);if(!_e(r)){const o=tr(r)?r:[r];ne(o,(a,l)=>{s+=cm(i.name,l)})}})}),s.slice(1)},window.$=g;function Bh(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))(ba||{});function fe(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/ba[e]).toFixed(t)+e)}const ys=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)*ba[n]};let _a=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),tn;function um(){return _a}function dm(s){_a=s.toLowerCase().replace("-","_")}function Hh(s,t){tn||(tn={}),typeof s=="string"&&(s={[s]:t??{}}),g.extend(!0,tn,s)}function Nt(s,t,e,n,i,r){Array.isArray(s)?tn&&s.unshift(tn):s=tn?[tn,s]:[s],typeof e=="string"&&(r=i,i=n,n=e,e=void 0);const o=i||_a;let a;for(const l of s){if(!l)continue;const h=l[o]||l.default;if(!h)continue;const f=r&&l===tn?`${r}.${t}`:t;if(a=ya(h,f),a!==void 0)break}return a===void 0?n:e?Tt(a,...Array.isArray(e)?e:[e]):a}function fm(s,t,e,n){return Nt(void 0,s,t,e,n)}Nt.addLang=Hh,Nt.getLang=fm,Nt.getCode=um,Nt.setCode=dm,Nt.map=tn,Hh({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 Wh(s,t,e){s instanceof Headers?s.set(t,e):Array.isArray(s)?s.push([t,e]):s[t]=e}function bs(s,t,e){e!=null&&(Array.isArray(e)?e.forEach(n=>bs(s,t,n)):!(e instanceof Blob)&&g.isPlainObject(e)?Object.entries(e).forEach(([n,i])=>{bs(s,`${t}[${n}]`,i)}):s.append(t,e instanceof Blob?e:String(e)))}function pm(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 or(s,t){const e=t||new FormData;return s&&(typeof s=="string"&&(s=new URLSearchParams(s)),s instanceof URLSearchParams?s.forEach((n,i)=>{bs(e,i,n)}):Array.isArray(s)?s.forEach(([n,i])=>{bs(e,n,i)}):s instanceof FormData?s.forEach((n,i)=>{bs(e,i,n)}):g.isPlainObject(s)&&Object.entries(s).forEach(([n,i])=>{bs(e,n,i)})),e}class ar{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:y,complete:v,...k}=this.setting;if((d==null?void 0:d(k))===!1)return;e&&(k.method=e);let x=n;x&&(i&&(x=or(x)),k.body=x),o&&(k.mode="cors");const S=k.headers||{};Wh(S,"X-Requested-With","XMLHttpRequest"),r&&Wh(S,"Content-Type",r),k.headers=S,k.signal&&k.signal.addEventListener("abort",()=>{this.abort()}),m&&this.success(m),y&&this.fail(y),v&&this.complete(v),k.signal=this._controller.signal,this.url=t,this.request=k}_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"),y=m?"blob":e||pm(a.headers.get("Content-Type"),n);m||y==="blob"||y==="file"?h=await a.blob():y==="json"?typeof o=="function"?(h=await a.text(),h=o(h)):h=await a.json():h=await a.text(),this.data=h;const v=(i==null?void 0:i(h,y))??h;this._emit("success",v,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 ar(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 Vn(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 ar(n),[r]=await i.send();return r}function va(s){return!!(s&&(typeof s=="string"||typeof s=="object"&&s.url||typeof s=="function"))}g.fetch=Vn;function pe(){return g.guid++}function lr(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;llr(n instanceof Un?n.value:n,e[i])))&&(this._value=this._compute(),this._lastDependencies=t.map(n=>n instanceof Un?n.cache:n)),this._value}}function wa(...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)?wa(...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)=>wa(...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 _s=new WeakMap;function cr(s,t,e){const n=_s.has(s),i=n?_s.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),_s.set(s,i)):_s.delete(s)}function Xs(s,t,e){let n=_s.get(s)||{};return e&&s instanceof Element&&(n=Object.assign({},g(s).dataset(),n)),t===void 0?n:n[t]}function mm(s){_s.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?Xs(this[0],t,!0):void 0:this.each((n,i)=>cr(i,t,e))},g.fn.removeData=function(s=null){return this.each((t,e)=>cr(e,s))};function qn(s,...t){return s.includes("RAWJS")&&(s=s.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` -`)),new Function(`return ${s}`)(...t)}function Ca(s,...t){return s.includes("RAWJS")?qn(s,...t):JSON.parse(s)}function vs(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 y=m;if(d.startsWith(n)){if(d=d.slice(n.length).replace(/-([a-z])/g,v=>v[1].toUpperCase()),i)y=i(d,m);else try{r&&(!l||l.has(d))||r===void 0&&m.includes("RAWJS")?y=qn(m,...a):o&&(y=JSON.parse(m))}catch{}h[d]=y}return h},{})}function ka(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 gm(...s){var e;const t=s.length;if(!t)return vs(this);if(t===1){const[n]=s;return typeof n=="string"?(e=vs(this))==null?void 0:e[n]:(g.isPlainObject(n)&&ka(this,n),this)}return ka(this,{[s[0]]:s[1]}),this}g.fn.z=gm,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 Zs=(s,t)=>new Promise(e=>{const n=window.setTimeout(e,s);t&&t(n)}),Kh={};g.share=Kh;var hr,Ft,Vh;D.isValidElement=void 0;var Gn,Uh,qh,xa,Sa,$a,Ta,Js={},Gh=[],ym=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ur=Array.isArray;function mn(s,t){for(var e in t)s[e]=t[e];return s}function Yh(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?hr.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 dr(s,o,n,i,null)}function dr(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??++Vh,__i:-1,__u:0};return i==null&&Ft.vnode!=null&&Ft.vnode(r),r}function St(){return{current:null}}function gn(s){return s.children}function $t(s,t){this.props=s,this.context=t}function Yn(s,t){if(t==null)return s.__?Yn(s.__,s.__i+1):null;for(var e;tt&&Gn.sort(xa));fr.__r=0}function Zh(s,t,e,n,i,r,o,a,l,h,f){var d,m,y,v,k,x=n&&n.__k||Gh,S=t.length;for(e.__d=l,bm(e,t,x),l=e.__d,d=0;d0?dr(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=s,i.__b=s.__b+1,a=_m(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=[...pr(r),...pr(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 Pa(s){return Object.keys(s).forEach(t=>{s[t]===void 0&&delete s[t]}),s}function su(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)=>{su(e,s)})},g.fn.enableScroll=function(s=!0){return this.disableScroll(!s)};function Aa(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)?ya(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 Cm(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&&Aa(t,s,g.extend({on:o},a?a.startsWith("{")?qn(a):{do:a}:vs(t,{prefix:"data-",evalValue:["call","if","do"]})))}const i=t.attr(`zui-on-${e}`);i&&Aa(t,s,g.extend({on:e},i.startsWith("{")?qn(i):{do:i})),t.attr("data-on")&&Aa(t,s,vs(t,{prefix:"data-",evalValue:["call","if","do"]}))}function iu(s){g(document).off(".zui.global").on(s.map(t=>`${t}.zui.global`).join(" "),`[zui-on],${s.map(t=>`[zui-on-${t}]`)},[data-on]`,Cm)}iu(["click","change","inited"]);function Xn(s,t=[]){if(typeof s=="function")return Xn(s(...t));if(typeof s=="number")return[s];let e=s.match(/(\d+)(%|px)?/);return e?[parseInt(e[1]),e[2]]:(e=s.match(/(\d+)\/(\d+)/),e?[100*parseInt(e[1])/parseInt(e[2]),"%"]:[NaN])}function jt(s,t){if(s==null)return null;const[e,n="px"]=Xn(s,t);return Number.isNaN(e)?typeof s=="string"?s:null:`${e}${n}`}async function gr(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,"")),gr(o,t)}const e=await fetch(s);return gr(e)}class ru{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 He=new ru(document);g.bus=He,g.on=He.on.bind(He),g.one=He.one.bind(He),g.off=He.off.bind(He),g.trigger=He.trigger.bind(He);var km=["Shift","Meta","Alt","Control"],ou=typeof navigator=="object"?navigator.platform:"",au=/Mac|iPod|iPhone|iPad/.test(ou),xm=au?"Meta":"Control",Sm=ou==="Win32"?["Control","Alt"]:au?["Alt"]:[];function Ia(s,t){return typeof s.getModifierState=="function"&&(s.getModifierState(t)||Sm.includes(t)&&s.getModifierState("AltGraph"))}function $m(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"?xm:i}),n]})}function lu(s,t){var e;t===void 0&&(t={});var n=(e=t.timeout)!=null?e:1e3,i=Object.keys(s).map(function(a){return[$m(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,y){return!(y[1].toUpperCase()!==m.key.toUpperCase()&&y[1]!==m.code||y[0].find(function(v){return!Ia(m,v)})||km.find(function(v){return!y[0].includes(v)&&y[1]!==v&&Ia(m,v)}))})(a,d[0])?d.length>1?r.set(h,d.slice(1)):(r.delete(h),f(a)):Ia(a,a.key)||r.delete(h)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function Tm(s,t,e){var n;e===void 0&&(e={});var i=(n=e.event)!=null?n:"keydown",r=lu(t,e);return s.addEventListener(i,r),function(){s.removeEventListener(i,r)}}function Da(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 Ra(s,t,e){const{timeout:n,event:i="keydown",scope:r,when:o}=e||{},a=lu(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 La(s,t){return g(s).off(`.zui.hotkeys${t?`.${t}`:""}`)}const Nm=Tm;g.fn.hotkeys=function(s,t){return Ra(this,s,t)},g.fn.unbindHotkeys=function(s){return La(this,s)},g.hotkeys=function(s,t){Ra(window,s,t)},g.unbindHotkeys=function(s){La(window,s)};function yr(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function cu(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=yr();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 Oa(s){const t=yr();return s===!1&&!!t===s?s:t?(document.exitFullscreen(),!1):(await cu(s),!0)}g.fn.fullscreen=function(s){return Oa({target:this,...s})},g.getFullscreenElement=yr,g.toggleFullscreen=Oa;function Zn(s){return!s||s.parentNode===document?!1:s.parentNode?Zn(s.parentNode):!0}g.isDetached=Zn,g.fn.isDetached=function(){const s=this[0];return!s||Zn(s)};const Jn=class fp{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],y=pe();if(this._gid=y,this._element=m,this._options={...r,...(e==null?void 0:e.$optionsFromDataset)!==!1?d.dataset():{}},this.setOptions(e),this._key=this.options.key??`__${y}`,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,`${y}`),o){const v=`${n}:ALL`;let k=d.data(v);k||(k=new Map,d.data(v,k)),k.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 y=m.values().next().value;l.data(t,y).attr(e,y.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,Zn(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 Nt(i,t,e,n,this.options.lang,this.constructor.NAME)??Nt(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!==fp?(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],y=d;m===void 0&&(y=d.$,m=y[a]),typeof m=="function"?l=m.call(y,...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)}};Jn.DEFAULT={},Jn.MULTI_INSTANCE=!1,Jn.ALL=new Map,Jn.TYPED_ALL=new Map,Jn.map=new Map,Jn.toggleMap=new Map;let Lt=Jn;function ti(s){return Lt.map.get(s.toLowerCase())}function za(s,t,e={}){let n=ti(s);if(n||(n=Fa(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 Em(s,t,e={}){requestAnimationFrame(()=>za(s,t,e))}function hu(s,t){Lt.register(s,t)}function Fa(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)&&(Lt.map.has(e.toLowerCase())||hu(i),n))return i}}}function Mm(s){var t;s?(t=ti(s))==null||t.defineFn():window._zuiDefined||(Fa(),Lt.map.forEach(e=>{e.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function Pm(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(()=>za(a,s,l));return}Em(a,s,l)};if(typeof n=="string"){n=n.trim();const a=n.length?n.split(",").map(f=>f.trim()):[],l=vs(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 Am(){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=Lt.toggleMap.get(e)||ti(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:y=!0,handler:v,onToggle:k,convertHref:x}=i;let S=t.dataset();const N=t.attr(`zui-toggle-${e}`);if(N&&(S=g.extend(S,qn(N))),x&&t.is("a")){const B=t.attr("href");if(B){const K=x===!0?{selector:"target",url:"url"}:x;"#.".includes(B[0])?K.selector&&S[K.selector]===void 0&&(S[K.selector]=B):K.url&&S[K.url]===void 0&&(S[K.url]=B)}}if(m&&(S=m.call(n,this,S,s)),v){v.call(n,this,S,l,s),y&&s.preventDefault();return}let j=h?h.call(n,this):n.get(this);if(j)d&&j.setOptions(S);else{const B=f?f.call(n,this,s,S):new n(this,S);if(!B)return;j=B}if(k){if(k.call(n,j,this,s)===!1)return}else{const{shown:B,show:K,hide:q,toggle:Q}=j;let Z;if(Q?Z=Q:K&&q?B?Z=q:Z=K:K&&(Z=K),Z)Z.call(j);else return}y&&s.preventDefault()})}function Im(s,t){const e=Xs(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 br=0;function uu(s=100){if(br&&clearTimeout(br),s){br=window.setTimeout(()=>uu(0),s);return}br=0,Lt.ALL.forEach(t=>{t.forEach(e=>e.autoDestroy())})}function Dm(){if(!document.body||Xs(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&&uu()});s.observe(document.body,{childList:!0,subtree:!0}),cr(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&&Pm(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 Im(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}),Am(),Dm()});class ja extends Lt{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,y)=>{const k=y.getBoundingClientRect()[e||"top"]===d[e||"top"];y.classList.toggle(i,k)})})};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))}}ja.NAME="Sticky";function ei(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:v,innerWidth:k}=window,{clientHeight:x,clientWidth:S}=document.documentElement;n={left:0,top:0,width:k||S,height:v||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 ei(this,s)};function _r(s,t,e=!1){var i;const n=g(s);if(t!==void 0){if(typeof t=="string"&&t.length){const r=`zui-runjs-${pe()}`;n.append(`