From 59e6714d2495a967ceeb8744b98f48aeb9aba366 Mon Sep 17 00:00:00 2001 From: sunhao Date: Thu, 23 May 2024 14:43:56 +0800 Subject: [PATCH] * zui: update zui3 lib. --- www/js/zui3/zui.zentao.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index 851fe0d8bb..e3b8d759d6 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,5 +1,5 @@ -var qc=(R,Wt,me)=>{if(!Wt.has(R))throw TypeError("Cannot "+me)};var pe=(R,Wt,me)=>(qc(R,Wt,"read from private field"),me?me.call(R):Wt.get(R)),Ce=(R,Wt,me)=>{if(Wt.has(R))throw TypeError("Cannot add the same private member more than once");Wt instanceof WeakSet?Wt.add(R):Wt.set(R,me)},Ee=(R,Wt,me,Oo)=>(qc(R,Wt,"write to private field"),Oo?Oo.call(R,me):Wt.set(R,me),me);var Gc=(R,Wt,me)=>(qc(R,Wt,"access private method"),me);(function(R,Wt){typeof exports=="object"&&typeof module<"u"?Wt(exports):typeof define=="function"&&define.amd?define(["exports"],Wt):(R=typeof globalThis<"u"?globalThis:R||self,Wt(R.zui={}))})(this,function(R){var io,ro,mi,gi,yi,bi,_i,vi,oo,Hf,ao,Kf,Sn,$n;"use strict";const Wt="",me="",Oo="",$b="",Tb="",Eb="",Nb="",Pb="",Mb="",Ib="",Ab="",Db="",Uf="3.0.0-alpha.4",Ve=document,Ri=window,Yc=Ve.documentElement,Dn=Ve.createElement.bind(Ve),Qc=Dn("div"),Fo=Dn("table"),Vf=Dn("tbody"),Xc=Dn("tr"),{isArray:Li,prototype:Zc}=Array,{concat:qf,filter:zo,indexOf:Jc,map:th,push:Gf,slice:eh,some:jo,splice:Yf}=Zc,Qf=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,Xf=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,Zf=/<.+>/,Jf=/^\w+$/;function Bo(s,t){const e=tp(t);return!s||!e&&!Rn(t)&&!qt(t)?[]:!e&&Xf.test(s)?t.getElementsByClassName(s.slice(1).replace(/\\/g,"")):!e&&Jf.test(s)?t.getElementsByTagName(s):t.querySelectorAll(s)}class Oi{constructor(t,e){if(!t)return;if(Wo(t))return t;let n=t;if(re(t)){const i=e||Ve;if(n=Qf.test(t)&&Rn(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):Zf.test(t)?ah(t):Wo(i)?i.find(t):re(i)?g(i).find(t):Bo(t,i),!n)return}else if(Ln(t))return this.ready(t);(n.nodeType||n===Ri)&&(n=[n]),this.length=n.length;for(let i=0,r=this.length;i{for(;t.firstChild;)t.removeChild(t.firstChild)})};function Fi(...s){const t=np(s[0])?s.shift():!1,e=s.shift(),n=s.length;if(!e)return{};if(!n)return Fi(t,g,e);for(let i=0;i{qt(r)&&Jt(e,(o,a)=>{n?t?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},et.addClass=function(s){return this.toggleClass(s,!0)},et.removeAttr=function(s){const t=zi(s);return this.each((e,n)=>{qt(n)&&Jt(t,(i,r)=>{n.removeAttribute(r)})})};function ip(s,t){if(s){if(re(s)){if(arguments.length<2){if(!this[0]||!qt(this[0]))return;const e=this[0].getAttribute(s);return Bs(e)?void 0:e}return ge(t)?this:Bs(t)?this.removeAttr(s):this.each((e,n)=>{qt(n)&&n.setAttribute(s,t)})}for(const e in s)this.attr(e,s[e]);return this}}et.attr=ip,et.removeClass=function(s){return arguments.length?this.toggleClass(s,!1):this.attr("class","")},et.hasClass=function(s){return!!s&&jo.call(this,t=>qt(t)&&t.classList.contains(s))},et.get=function(s){return ge(s)?eh.call(this):(s=Number(s),this[s<0?s+this.length:s])},et.eq=function(s){return g(this.get(s))},et.first=function(){return this.eq(0)},et.last=function(){return this.eq(-1)};function rp(s){return ge(s)?this.get().map(t=>qt(t)||ep(t)?t.textContent:"").join(""):this.each((t,e)=>{qt(e)&&(e.textContent=s)})}et.text=rp;function qe(s,t,e){if(!qt(s))return;const n=Ri.getComputedStyle(s,null);return e?n.getPropertyValue(t)||void 0:n[t]||s.style[t]}function Oe(s,t){return parseInt(qe(s,t),10)||0}function sh(s,t){return Oe(s,`border${t?"Left":"Top"}Width`)+Oe(s,`padding${t?"Left":"Top"}`)+Oe(s,`padding${t?"Right":"Bottom"}`)+Oe(s,`border${t?"Right":"Bottom"}Width`)}const Ko={};function op(s){if(Ko[s])return Ko[s];const t=Dn(s);Ve.body.insertBefore(t,null);const e=qe(t,"display");return Ve.body.removeChild(t),Ko[s]=e!=="none"?e:"block"}function ih(s){return qe(s,"display")==="none"}function rh(s,t){const e=s&&(s.matches||s.webkitMatchesSelector||s.msMatchesSelector);return!!e&&!!t&&e.call(s,t)}function ji(s){return re(s)?(t,e)=>rh(e,s):Ln(s)?s:Wo(s)?(t,e)=>s.is(e):s?(t,e)=>e===s:()=>!1}et.filter=function(s){const t=ji(s);return g(zo.call(this,(e,n)=>t.call(e,n,e)))};function cn(s,t){return t?s.filter(t):s}et.detach=function(s){return cn(this,s).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const ap=/^\s*<(\w+)[^>]*>/,lp=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,oh={"*":Qc,tr:Vf,td:Xc,th:Xc,thead:Fo,tbody:Fo,tfoot:Fo};function ah(s){if(!re(s))return[];if(lp.test(s))return[Dn(RegExp.$1)];const t=ap.test(s)&&RegExp.$1,e=oh[t]||oh["*"];return e.innerHTML=s,g(e.childNodes).detach().get()}g.parseHTML=ah,et.has=function(s){const t=re(s)?(e,n)=>Bo(s,n).length:(e,n)=>n.contains(s);return this.filter(t)},et.not=function(s){const t=ji(s);return this.filter((e,n)=>(!re(s)||qt(n))&&!t.call(n,e,n))};function Ge(s,t,e,n){const i=[],r=Ln(t),o=n&&ji(n);for(let a=0,c=s.length;at.selected&&!t.disabled&&!t.parentNode.disabled),"value"):s.value||""}function cp(s){return arguments.length?this.each((t,e)=>{const n=e.multiple&&e.options;if(n||_h.test(e.type)){const i=Li(s)?th.call(s,String):Bs(s)?[]:[String(s)];n?Jt(e.options,(r,o)=>{o.selected=i.indexOf(o.value)>=0},!0):e.checked=i.indexOf(e.value)>=0}else e.value=ge(s)||Bs(s)?"":s}):this[0]&&lh(this[0])}et.val=cp,et.is=function(s){const t=ji(s);return jo.call(this,(e,n)=>t.call(e,n,e))},g.guid=1;function Fe(s){return s.length>1?zo.call(s,(t,e,n)=>Jc.call(n,t)===e):s}g.unique=Fe,et.add=function(s,t){return g(Fe(this.get().concat(g(s,t).get())))},et.children=function(s){return cn(g(Fe(Ge(this,t=>t.children))),s)},et.parent=function(s){return cn(g(Fe(Ge(this,"parentNode"))),s)},et.index=function(s){const t=s?g(s)[0]:this[0],e=s?this:g(t).parent().children();return Jc.call(e,t)},et.closest=function(s){const t=this.filter(s);if(t.length)return t;const e=this.parent();return e.length?e.closest(s):t},et.siblings=function(s){return cn(g(Fe(Ge(this,t=>g(t).parent().children().not(t)))),s)},et.find=function(s){return g(Fe(Ge(this,t=>Bo(s,t))))};const hp=/^\s*\s*$/g,up=/^$|^module$|\/(java|ecma)script/i,dp=["type","src","nonce","noModule"];function fp(s,t){const e=g(s);e.filter("script").add(e.find("script")).each((n,i)=>{if(up.test(i.type)&&Yc.contains(i)){const r=Dn("script");r.text=i.textContent.replace(hp,""),Jt(dp,(o,a)=>{i[a]&&(r[a]=i[a])}),t.head.insertBefore(r,null),t.head.removeChild(r)}})}function pp(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&&fp(t,s.ownerDocument)}function hn(s,t,e,n,i,r,o,a){return Jt(s,(c,h)=>{Jt(g(h),(f,d)=>{Jt(g(t),(_,y)=>{const w=e?d:y,k=e?y:d,x=e?f:_;pp(w,x?k.cloneNode(!0):k,n,i,!x)},a)},o)},r),t}et.after=function(){return hn(arguments,this,!1,!1,!1,!0,!0)},et.append=function(){return hn(arguments,this,!1,!1,!0)};function mp(s){if(!arguments.length)return this[0]&&this[0].innerHTML;if(ge(s))return this;const t=/]/.test(s);return this.each((e,n)=>{qt(n)&&(t?g(n).empty().append(s):n.innerHTML=s)})}et.html=mp,et.appendTo=function(s){return hn(arguments,this,!0,!1,!0)},et.wrapInner=function(s){return this.each((t,e)=>{const n=g(e),i=n.contents();i.length?i.wrapAll(s):n.append(s)})},et.before=function(){return hn(arguments,this,!1,!0)},et.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)},et.wrap=function(s){return this.each((t,e)=>{const n=g(s)[0];g(e).wrapAll(t?n.cloneNode(!0):n)})},et.insertAfter=function(s){return hn(arguments,this,!0,!1,!1,!1,!1,!0)},et.insertBefore=function(s){return hn(arguments,this,!0,!0)},et.prepend=function(){return hn(arguments,this,!1,!0,!0,!0,!0)},et.prependTo=function(s){return hn(arguments,this,!0,!0,!0,!1,!1,!0)},et.contents=function(){return g(Fe(Ge(this,s=>s.tagName==="IFRAME"?[s.contentDocument]:s.tagName==="TEMPLATE"?s.content.childNodes:s.childNodes)))},et.next=function(s,t,e){return cn(g(Fe(Ge(this,"nextElementSibling",t,e))),s)},et.nextAll=function(s){return this.next(s,!0)},et.nextUntil=function(s,t){return this.next(t,!0,s)},et.parents=function(s,t){return cn(g(Fe(Ge(this,"parentElement",!0,t))),s)},et.parentsUntil=function(s,t){return this.parents(t,s)},et.prev=function(s,t,e){return cn(g(Fe(Ge(this,"previousElementSibling",t,e))),s)},et.prevAll=function(s){return this.prev(s,!0)},et.prevUntil=function(s,t){return this.prev(t,!0,s)},et.map=function(s){return g(qf.apply([],th.call(this,(t,e)=>s.call(t,e,t))))},et.clone=function(){return this.map((s,t)=>t.cloneNode(!0))},et.offsetParent=function(){return this.map((s,t)=>{let e=t.offsetParent;for(;e&&qe(e,"position")==="static";)e=e.offsetParent;return e||Yc})},et.slice=function(s,t){return g(eh.call(this,s,t))};const gp=/-([a-z])/g;function Uo(s){return s.replace(gp,(t,e)=>e.toUpperCase())}et.ready=function(s){const t=()=>setTimeout(s,0,g);return Ve.readyState!=="loading"?t():Ve.addEventListener("DOMContentLoaded",t),this},et.unwrap=function(){return this.parent().each((s,t)=>{if(t.tagName==="BODY")return;const e=g(t);e.replaceWith(e.children())}),this},et.offset=function(){const s=this[0];if(!s)return;const t=s.getBoundingClientRect();return{top:t.top+Ri.pageYOffset,left:t.left+Ri.pageXOffset}},et.position=function(){const s=this[0];if(!s)return;const t=qe(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)&&qe(i,"position")==="static";)i=i.parentNode;if(i!==s&&qt(i)){const r=g(i).offset();e.top-=r.top+Oe(i,"borderTopWidth"),e.left-=r.left+Oe(i,"borderLeftWidth")}}return{top:e.top-Oe(s,"marginTop"),left:e.left-Oe(s,"marginLeft")}};const ch={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};et.prop=function(s,t){if(s){if(re(s))return s=ch[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}},et.removeProp=function(s){return this.each((t,e)=>{delete e[ch[s]||s]})};const yp=/^--/;function Vo(s){return yp.test(s)}const qo={},{style:bp}=Qc,_p=["webkit","moz","ms"];function vp(s,t=Vo(s)){if(t)return s;if(!qo[s]){const e=Uo(s),n=`${e[0].toUpperCase()}${e.slice(1)}`,i=`${e} ${_p.join(`${n} `)}${n}`.split(" ");Jt(i,(r,o)=>{if(o in bp)return qo[s]=o,!1})}return qo[s]}const wp={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=Vo(s)){return!e&&!wp[s]&&nh(t)?`${t}px`:t}function Cp(s,t){if(re(s)){const e=Vo(s);return s=vp(s,e),arguments.length<2?this[0]&&qe(this[0],s,e):s?(t=hh(s,t,e),this.each((n,i)=>{qt(i)&&(e?i.style.setProperty(s,t):i.style[s]=t)})):this}for(const e in s)this.css(e,s[e]);return this}et.css=Cp;function uh(s,t){try{return s(t)}catch{return t}}const kp=/^\s+|\s+$/;function dh(s,t){const e=s.dataset[t]||s.dataset[Uo(t)];return kp.test(e)?e:uh(JSON.parse,e)}function xp(s,t,e){e=uh(JSON.stringify,e),s.dataset[Uo(t)]=e}function Sp(s,t){if(!s){if(!this[0])return;const e={};for(const n in this[0].dataset)e[n]=dh(this[0],n);return e}if(re(s))return arguments.length<2?this[0]&&dh(this[0],s):ge(t)?this:this.each((e,n)=>{xp(n,s,t)});for(const e in s)this.data(e,s[e]);return this}et.data=Sp;function fh(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}`])}Jt([!0,!1],(s,t)=>{Jt(["Width","Height"],(e,n)=>{const i=`${t?"outer":"inner"}${n}`;et[i]=function(r){if(this[0])return as(this[0])?t?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:Rn(this[0])?fh(this[0],n):this[0][`${t?"offset":"client"}${n}`]+(r&&t?Oe(this[0],`margin${e?"Top":"Left"}`)+Oe(this[0],`margin${e?"Bottom":"Right"}`):0)}})}),Jt(["Width","Height"],(s,t)=>{const e=t.toLowerCase();et[e]=function(n){if(!this[0])return ge(n)?void 0:this;if(!arguments.length)return as(this[0])?this[0].document.documentElement[`client${t}`]:Rn(this[0])?fh(this[0],t):this[0].getBoundingClientRect()[e]-sh(this[0],!s);const i=parseInt(n,10);return this.each((r,o)=>{if(!qt(o))return;const a=qe(o,"boxSizing");o.style[e]=hh(e,i+(a==="border-box"?sh(o,!s):0))})}});const ph="___cd";et.toggle=function(s){return this.each((t,e)=>{if(!qt(e))return;const n=ih(e);(ge(s)?n:s)?(e.style.display=e[ph]||"",ih(e)&&(e.style.display=op(e.tagName))):n||(e[ph]=qe(e,"display"),e.style.display="none")})},et.hide=function(){return this.toggle(!1)},et.show=function(){return this.toggle(!0)};const mh="___ce",Go=".",Yo={focus:"focusin",blur:"focusout"},gh={mouseenter:"mouseover",mouseleave:"mouseout"},$p=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Qo(s){return gh[s]||Yo[s]||s}function Xo(s){const t=s.split(Go);return[t[0],t.slice(1).sort()]}et.trigger=function(s,t){if(re(s)){const[n,i]=Xo(s),r=Qo(n);if(!r)return this;const o=$p.test(r)?"MouseEvents":"HTMLEvents";s=Ve.createEvent(o),s.initEvent(r,!0,!0),s.namespace=i.join(Go),s.___ot=n}s.___td=t;const e=s.___ot in Yo;return this.each((n,i)=>{e&&Ln(i[s.___ot])&&(i[`___i${s.type}`]=!0,i[s.___ot](),i[`___i${s.type}`]=!1),i.dispatchEvent(s)})};function yh(s){return s[mh]=s[mh]||{}}function Tp(s,t,e,n,i){const r=yh(s);r[t]=r[t]||[],r[t].push([e,n,i]),s.addEventListener(t,i)}function bh(s,t){return!t||!jo.call(t,e=>s.indexOf(e)<0)}function Bi(s,t,e,n,i){const r=yh(s);if(t)r[t]&&(r[t]=r[t].filter(([o,a,c])=>{if(i&&c.guid!==i.guid||!bh(o,e)||n&&n!==a)return!0;s.removeEventListener(t,c)}));else for(t in r)Bi(s,t,e,n,i)}et.off=function(s,t,e){if(ge(s))this.each((n,i)=>{!qt(i)&&!Rn(i)&&!as(i)||Bi(i)});else if(re(s))Ln(t)&&(e=t,t=""),Jt(zi(s),(n,i)=>{const[r,o]=Xo(i),a=Qo(r);this.each((c,h)=>{!qt(h)&&!Rn(h)&&!as(h)||Bi(h,a,o,t,e)})});else for(const n in s)this.off(n,s[n]);return this},et.remove=function(s){return cn(this,s).detach().off(),this},et.replaceWith=function(s){return this.before(s).remove()},et.replaceAll=function(s){return g(s).replaceWith(this),this};function Ep(s,t,e,n,i){if(!re(s)){for(const r in s)this.on(r,t,e,s[r],i);return this}return re(t)||(ge(t)||Bs(t)?t="":ge(e)?(e=t,t=""):(n=e,e=t,t="")),Ln(n)||(n=e,e=void 0),n?(Jt(zi(s),(r,o)=>{const[a,c]=Xo(o),h=Qo(a),f=a in gh,d=a in Yo;h&&this.each((_,y)=>{if(!qt(y)&&!Rn(y)&&!as(y))return;const w=function(k){if(k.target[`___i${k.type}`])return k.stopImmediatePropagation();if(k.namespace&&!bh(c,k.namespace.split(Go))||!t&&(d&&(k.target!==y||k.___ot===h)||f&&k.relatedTarget&&y.contains(k.relatedTarget)))return;let x=y;if(t){let L=k.target;for(;!rh(L,t);)if(L===y||(L=L.parentNode,!L))return;x=L}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 $=n.call(x,k,k.___td);i&&Bi(y,h,c,t,w),$===!1&&(k.preventDefault(),k.stopPropagation())};w.guid=n.guid=n.guid||g.guid++,Tp(y,h,c,t,w)})}),this):this}et.on=Ep;function Np(s,t,e,n){return this.on(s,t,e,n,!0)}et.one=Np;const Pp=/\r?\n/g;function Mp(s,t){return`&${encodeURIComponent(s)}=${encodeURIComponent(t.replace(Pp,`\r -`))}`}const Ip=/file|reset|submit|button|image/i,_h=/radio|checkbox/i;et.serialize=function(){let s="";return this.each((t,e)=>{Jt(e.elements||[e],(n,i)=>{if(i.disabled||!i.name||i.tagName==="FIELDSET"||Ip.test(i.type)||_h.test(i.type)&&!i.checked)return;const r=lh(i);if(!ge(r)){const o=Li(r)?r:[r];Jt(o,(a,c)=>{s+=Mp(i.name,c)})}})}),s.slice(1)},window.$=g;function vh(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))(Zo||{});function ce(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/Zo[e]).toFixed(t)+e)}const ls=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)*Zo[n]};let Jo=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),Ye;function Ap(){return Jo}function Dp(s){Jo=s.toLowerCase().replace("-","_")}function Ch(s,t){Ye||(Ye={}),typeof s=="string"&&(s={[s]:t??{}}),g.extend(!0,Ye,s)}function Mt(s,t,e,n,i,r){Array.isArray(s)?Ye&&s.unshift(Ye):s=Ye?[Ye,s]:[s],typeof e=="string"&&(r=i,i=n,n=e,e=void 0);const o=i||Jo;let a;for(const c of s){if(!c)continue;const h=c[o]||c.default;if(!h)continue;const f=r&&c===Ye?`${r}.${t}`:t;if(a=wh(h,f),a!==void 0)break}return a===void 0?n:e?kt(a,...Array.isArray(e)?e:[e]):a}function Rp(s,t,e,n){return Mt(void 0,s,t,e,n)}Mt.addLang=Ch,Mt.getLang=Rp,Mt.getCode=Ap,Mt.setCode=Dp,Mt.map=Ye,Ch({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 kh(s,t,e){s instanceof Headers?s.set(t,e):Array.isArray(s)?s.push([t,e]):s[t]=e}function Ws(s,t,e){e!=null&&(Array.isArray(e)?e.forEach(n=>Ws(s,t,n)):s.append(t,e instanceof Blob?e:String(e)))}function Lp(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 Wi(s,t){const e=t||new FormData;return s&&(typeof s=="string"&&(s=new URLSearchParams(s)),s instanceof URLSearchParams?s.forEach((n,i)=>{Ws(e,i,n)}):Array.isArray(s)?s.forEach(([n,i])=>{Ws(e,n,i)}):s instanceof FormData?s.forEach((n,i)=>{Ws(e,i,n)}):g.isPlainObject(s)&&Object.entries(s).forEach(([n,i])=>{Ws(e,n,i)})),e}class Hi{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:c,timeout:h,dataFilter:f,beforeSend:d,success:_,error:y,complete:w,...k}=this.setting;if((d==null?void 0:d(k))===!1)return;e&&(k.method=e);let x=n;x&&(i&&(x=Wi(x)),k.body=x),o&&(k.mode="cors");const $=k.headers||{};kh($,"X-Requested-With","XMLHttpRequest"),r&&kh($,"Content-Type",r),k.headers=$,k.signal&&k.signal.addEventListener("abort",()=>{this.abort()}),_&&this.success(_),y&&this.fail(y),w&&this.complete(w),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,c,h;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:d}=a;if(a.ok){const _=(f=a.headers.get("Content-Disposition"))==null?void 0:f.startsWith("attachment"),y=_?"blob":e||Lp(a.headers.get("Content-Type"),n);_||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 w=(i==null?void 0:i(h,y))??h;this._emit("success",w,d,a)}else throw new Error(d)}catch(d){c=d;let _=!1;c.name==="AbortError"&&(this._abortError?c=this._abortError:_=!0),this.error=c,_||this._emit("error",c,a==null?void 0:a.statusText,c.message)}if(this._timeoutID&&clearTimeout(this._timeoutID),this._emit("complete",a,a==null?void 0:a.statusText),c&&r)throw c;return[h,c,a]}}g.ajax=(s,t)=>{t=t||{},typeof s=="string"?t.url=s:g.extend(t,s);const e=new Hi(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),e==null||e.call(this,r,o,a)},"html"),this};async function On(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 Hi(n),[r]=await i.send();return r}function ta(s){return!!(s&&(typeof s=="string"||typeof s=="object"&&s.url||typeof s=="function"))}g.fetch=On;function he(){return g.guid++}function Ki(s,t){if(s===t)return!1;if(s&&t&&typeof s=="object"&&typeof t=="object"){const e=Array.isArray(s),n=Array.isArray(t);if(e!==n)return!0;if(e&&n){if(s.length!==t.length)return!0;for(let o=0;oKi(n instanceof Fn?n.value:n,e[i])))&&(this._value=this._compute(),this._lastDependencies=t.map(n=>n instanceof Fn?n.cache:n)),this._value}}function ea(...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)?ea(...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 q=(...s)=>ea(...s).reduce((t,[e,n])=>(n&&t.push(e),t),[]).join(" ");g.classes=q,g.fn.setClass=function(s,...t){return this.each((e,n)=>{const i=g(n);s===!0?i.attr("class",q(i.attr("class"),...t)):i.addClass(q(s,...t))})};const Hs=new WeakMap;function na(s,t,e){const n=Hs.has(s),i=n?Hs.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),Hs.set(s,i)):Hs.delete(s)}function sa(s,t,e){let n=Hs.get(s)||{};return!e&&s instanceof Element&&(n=Object.assign({},g(s).dataset(),n)),t===void 0?n:n[t]}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?sa(this[0],t):void 0:this.each((n,i)=>na(i,t,e))},g.fn.removeData=function(s=null){return this.each((t,e)=>na(e,s))};function Ui(s,t="z-"){const e=g(s)[0];if(e)return Array.from(e.attributes).reduce((n,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{}n[r]=o}return n},{})}function ia(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 Op(...s){var e;const t=s.length;if(!t)return Ui(this);if(t===1){const[n]=s;return typeof n=="string"?(e=Ui(this))==null?void 0:e[n]:(g.isPlainObject(n)&&ia(this,n),this)}return ia(this,{[s[0]]:s[1]}),this}g.fn.z=Op,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=(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 Ks=(s,t)=>new Promise(e=>{const n=window.setTimeout(e,s);t&&t(n)}),xh={};g.share=xh;var Vi,Rt,Sh;R.isValidElement=void 0;var zn,$h,Th,ra,oa,aa,la,Us={},Eh=[],Fp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qi=Array.isArray;function un(s,t){for(var e in t)s[e]=t[e];return s}function Nh(s){var t=s.parentNode;t&&t.removeChild(s)}function N(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?Vi.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 Gi(s,o,n,i,null)}function Gi(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??++Sh,__i:-1,__u:0};return i==null&&Rt.vnode!=null&&Rt.vnode(r),r}function Ct(){return{current:null}}function dn(s){return s.children}function xt(s,t){this.props=s,this.context=t}function jn(s,t){if(t==null)return s.__?jn(s.__,s.__i+1):null;for(var e;tt&&zn.sort(ra));Yi.__r=0}function Ih(s,t,e,n,i,r,o,a,c,h,f){var d,_,y,w,k,x=n&&n.__k||Eh,$=t.length;for(e.__d=c,zp(e,t,x),c=e.__d,d=0;d<$;d++)(y=e.__k[d])!=null&&typeof y!="boolean"&&typeof y!="function"&&(_=y.__i===-1?Us:x[y.__i]||Us,y.__i=d,ca(s,y,_,i,r,o,a,c,h,f),w=y.__e,y.ref&&_.ref!=y.ref&&(_.ref&&ha(_.ref,null,y),f.push(y.ref,y.__c||w,y)),k==null&&w!=null&&(k=w),65536&y.__u||_.__k===y.__k?(c&&!c.isConnected&&(c=jn(_)),c=Ah(y,c,s)):typeof y.type=="function"&&y.__d!==void 0?c=y.__d:w&&(c=w.nextSibling),y.__d=void 0,y.__u&=-196609);e.__d=c,e.__e=k}function zp(s,t,e){var n,i,r,o,a,c=t.length,h=e.length,f=h,d=0;for(s.__k=[],n=0;n0?Gi(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=s,i.__b=s.__b+1,a=jp(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?f>c-o?d+=a-o:d--:a(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&r===c.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=[...Qi(r),...Qi(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 da(s){return Object.keys(s).forEach(t=>{s[t]===void 0&&delete s[t]}),s}const cs=new Map;function Vs(s){const{zui:t}=window;return(!cs.size||s&&!cs.has(s.toUpperCase()))&&Object.keys(t).forEach(e=>{const n=t[e];!n.NAME||!n.ZUI||cs.set(e.toLowerCase(),n)}),s?cs.get(s.toLowerCase()):void 0}function Oh(s,t,e){const n=Vs(s);return n?!n.MULTI_INSTANCE&&n.get(t)?(console.error(`[ZUI] cannot create component "${s}" on element which already has a component instance.`,{element:t,options:e}),null):new n(t,e):null}function Hp(s){if(s){const t=Vs(s);t&&t.defineFn()}else Vs(),cs.forEach(t=>{t.defineFn()})}g.fn.zuiInit=function(){return this.find("[zui-create],[data-zui]").each(function(){const s=g(this);let t=Ui(s,"data-");const[e,n]=(t.zui||s.attr("zui-create")).split(":");s.zui(e)||(n?t=g.share[n]:delete t.zui,requestAnimationFrame(()=>Oh(e,this,t)))}),this.find("[zui-init]").each(function(){const s=g(this);s.z("zuiInited")||g.runJS(s.z("zuiInited",!0).attr("zui-init"),["$element",s])}),this.find(".hide-before-init").removeClass("invisible hidden opacity-0"),this.find(".scroll-into-view").scrollIntoView(),this.find('[data-on="inited"]').each((s,t)=>{const e=g(t);e.zui()||e.trigger("inited")}),this},g.fn.zui=function(s,t){const e=this[0];if(!e)return;if(typeof s!="string"){const i=sa(e,void 0,!0),r={};let o;return Object.keys(i).forEach(a=>{if(a.startsWith("zui.")){const c=i[a];r[a]=c,(!o||o.gid{g("body").zuiInit()});function Fh(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)=>{Fh(e,s)})},g.fn.enableScroll=function(s=!0){return this.disableScroll(!s)};function Kp(s){const t=g(this),e=t.dataset();if(!(e.on||"click").split(" ").includes(s.type))return;const n=e.selector?g(s.target).closest(e.selector):t;if(!n.length)return;const i=c=>c===""?!0:c,r=c=>{if(typeof c=="string")try{c=JSON.parse(c)}catch{}return c};if(i(e.once)){if(e.onceCalled)return;t.dataset("once-called",!0)}if(i(e.prevent)&&s.preventDefault(),i(e.stop)&&s.stopPropagation(),i(e.self)&&s.currentTarget!==s.target)return;const o=[["$element",t],["event",s],["options",e],["$target",n]];if(e.if&&!g.runJS(e.if,...o))return;const a=e.call;if(a){let c=window[a];const h=/^[$A-Z_][0-9A-Z_$.]*$/i.test(a);if(c||(c=g.runJS(a,...o)),!h||!g.isFunction(c))return;const f=[],d=e.params;e.params=f,typeof d=="string"&&d.length?d[0]==="["?f.push(...r(d)):f.push(...d.split(", ").map(_=>(_=_.trim(),_==="$element"?t:_==="event"?s:_==="options"?e:_.startsWith("$element.")||_.startsWith("event.")||_.startsWith("options.")?g.runJS(_,...o):r(_)))):f.push(d),c(...f)}e.do&&g.runJS(e.do,...o)}g(document).on("click.zui.global change.zui.global inited.zui.global","[data-on]",Kp);function hs(s){if(typeof s=="function")return hs(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 Gt(s){if(s==null)return null;const[t,e="px"]=hs(s);return Number.isNaN(t)?typeof s=="string"?s:null:`${t}${e}`}async function Zi(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,"")),Zi(o,t)}const e=await fetch(s);return Zi(e)}class zh{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 ze=new zh(document);g.bus=ze,g.on=ze.on.bind(ze),g.one=ze.one.bind(ze),g.off=ze.off.bind(ze),g.trigger=ze.trigger.bind(ze);var Up=["Shift","Meta","Alt","Control"],jh=typeof navigator=="object"?navigator.platform:"",Bh=/Mac|iPod|iPhone|iPad/.test(jh),Vp=Bh?"Meta":"Control",qp=jh==="Win32"?["Control","Alt"]:Bh?["Alt"]:[];function fa(s,t){return typeof s.getModifierState=="function"&&(s.getModifierState(t)||qp.includes(t)&&s.getModifierState("AltGraph"))}function Gp(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"?Vp:i}),n]})}function Wh(s,t){var e;t===void 0&&(t={});var n=(e=t.timeout)!=null?e:1e3,i=Object.keys(s).map(function(a){return[Gp(a),s[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(i.forEach(function(c){var h=c[0],f=c[1],d=r.get(h)||h;(function(_,y){return!(y[1].toUpperCase()!==_.key.toUpperCase()&&y[1]!==_.code||y[0].find(function(w){return!fa(_,w)})||Up.find(function(w){return!y[0].includes(w)&&y[1]!==w&&fa(_,w)}))})(a,d[0])?d.length>1?r.set(h,d.slice(1)):(r.delete(h),f(a)):fa(a,a.key)||r.delete(h)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),n))}}function Yp(s,t,e){var n;e===void 0&&(e={});var i=(n=e.event)!=null?n:"keydown",r=Wh(t,e);return s.addEventListener(i,r),function(){s.removeEventListener(i,r)}}function pa(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 ma(s,t,e){const{timeout:n,event:i="keydown",scope:r,when:o}=e||{},a=Wh(t,{timeout:n}),c=`.zui.hotkeys${r?`.${r}`:""}`,h="zui-hotkeys-composing";return g(s).on(`${i}${c}`,function(f){o&&o(f)===!1||g(f.target).data(h)||a(f)}).on(`compositionstart${c}`,f=>{g(f.target).data(h,!0)}).on(`compositionend${c}`,f=>{g(f.target).removeData(h)})}function ga(s,t){return g(s).off(`.zui.hotkeys${t?`.${t}`:""}`)}const Qp=Yp;g.fn.hotkeys=function(s,t){return ma(this,s,t)},g.fn.unbindHotkeys=function(s){return ga(this,s)},g.hotkeys=function(s,t){ma(window,s,t)},g.unbindHotkeys=function(s){ga(window,s)};function Ji(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function Hh(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 c=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!c){e==null||e.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await c.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=Ji();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 _={event:h,target:d,fullscreenElement:f};g(d).trigger(f?"enterFullscreen":"exitFullscreen",_).trigger("toggleFullscreen",_)}))}async function ya(s){const t=Ji();return s===!1&&!!t===s?s:t?(document.exitFullscreen(),!1):(await Hh(s),!0)}g.fn.fullscreen=function(s){return ya({target:this,...s})},g.getFullscreenElement=Ji,g.toggleFullscreen=ya;function Wn(s){return s.parentNode===document?!1:s.parentNode?Wn(s.parentNode):!0}g.isDetached=Wn,g.fn.isDetached=function(){const s=this[0];return!s||Wn(s)};class Ft{constructor(t,e){this._inited=!1,this._autoDestory=0;const{KEY:n,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 c=g(t);if(c.data(n)&&!o)throw new Error("[ZUI] The component has been initialized on element.");const h=c[0],f=he();this._gid=f,this._element=h;const d=c.parent();if(d.length&&(this._mobs=new MutationObserver(_=>{_.forEach(y=>{y.removedNodes.forEach(w=>{w===h&&(this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,Wn(h)&&this.destroy()},100))})})}),this._mobs.observe(d[0],{childList:!0,subtree:!1})),this._options={...r,...c.dataset()},this.setOptions(e),this._key=this.options.key??`__${f}`,c.data(n,this).attr(i,`${f}`),o){const _=`${n}:ALL`;let y=c.data(_);y||(y=new Map,c.data(_,y)),y.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 g(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:n}=this.constructor,{$element:i}=this;if(this.emit("destroyed"),(r=this._mobs)==null||r.disconnect(),i.off(this.namespace).removeData(t).attr(e,null),n){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&&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 Mt(i,t,e,n,this.options.lang,this.constructor.NAME)??Mt(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){const{MULTI_INSTANCE:e,SELECTOR:n}=this,i=[];return g(t||document).find(n).each((r,o)=>{if(e){const c=g(o).data(`${this.KEY}:ALL`);if(c){i.push(...c.values());return}}const a=g(o).data(this.KEY);a&&i.push(a)}),i.sort((r,o)=>r.gid-o.gid)}static query(t,e,n){if(t===void 0){let i=this.getAll();return n&&(i=i.filter(n)),i.pop()}return 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 c;return this.each((h,f)=>{let d=n.get(f);if(d?o&&d.render(o):d=new n(f,o),a){let _=d[a],y=d;_===void 0&&(y=d.$,_=y[a]),typeof _=="function"?c=_.call(y,...r):c=_}}),c!==void 0?c:this}})}}Ft.DEFAULT={},Ft.MULTI_INSTANCE=!1;class Kh extends Ft{init(){const{offset:t=1,side:e,zIndex:n,pinnedClass:i="is-pinned"}=this.options,{$element:r}=this;r.css({position:"sticky",zIndex:n}),e&&r.css(e,-t),this._ob=new IntersectionObserver(([o])=>o.target.classList.toggle(i,o.intersectionRatio=c&&r>=h&&i+o<=f&&r+a<=d;const _=i<=f&&i+o>=c;return r<=d&&r+a>=h&&_}g.fn.isVisible=function(s){return tr(this,s)};function ba(s,t,e=!1){const n=g(s);if(t!==void 0){if(t.length){const i=`zui-runjs-${he()}`;n.append(`