@vtj/pro 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
  2. package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
  3. package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
  4. package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
  5. package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
  6. package/dist/@vtj/materials/deps/@vtj/ui/style.css +1 -1
  7. package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
  8. package/dist/@vtj/materials/deps/vue/vue.global.prod.js +6 -6
  9. package/dist/assets/{@element-plus-0iGvOhcs.js → @element-plus-9DijRNGr.js} +1 -1
  10. package/dist/assets/@vue-kvWFMVda.js +25 -0
  11. package/dist/assets/{@vueuse-1-Jun0o2.js → @vueuse-ubLr9Alr.js} +1 -1
  12. package/dist/assets/{Editor-ctkAn2cu-J9BpKj5_.js → Editor-ctkAn2cu-Zm0zOJf-.js} +1 -1
  13. package/dist/assets/{element-plus-5Wi4i1TZ.js → element-plus-amW94--q.js} +1 -1
  14. package/dist/assets/index-1s8TnXJX.css +1 -0
  15. package/dist/assets/{index-MnFtNpiI.js → index-MNLQCTXr.js} +2 -2
  16. package/dist/assets/index-ixbkhwxg.js +1 -0
  17. package/dist/assets/index-mQanRcJ_.css +1 -0
  18. package/dist/assets/index-uqn_xLqB.js +154 -0
  19. package/dist/assets/preview-5rw87tX_.js +7 -0
  20. package/dist/assets/{vue-Xy_G9hDD.js → vue-rKb_ndj8.js} +3 -3
  21. package/dist/assets/{vue-router-EE3hBg2_.js → vue-router-2HQetVTL.js} +1 -1
  22. package/dist/index.html +6 -6
  23. package/dist/link.js +2 -3
  24. package/package.json +12 -12
  25. package/dist/assets/@vue-3K-Vdqr2.js +0 -25
  26. package/dist/assets/index-5bASjMSy.js +0 -1
  27. package/dist/assets/index-Lxhk7rJd.css +0 -1
  28. package/dist/assets/index-XhAT5uBa.css +0 -1
  29. package/dist/assets/index-mCpGBrjx.js +0 -154
  30. package/dist/assets/preview-7lJVcnC8.js +0 -7
@@ -1,154 +0,0 @@
1
- import{_ as hf}from"./monaco-editor-ginzV8u1.js";import{an as Xt,d as J,Z as T,R as df,t as hi,j as L,J as Ye,o as k,c as te,S as F,V as rt,O as ke,a4 as as,U as A,M as le,P as Gt,G as hr,r as q,f as _e,ab as Fn,u as m,Q as je,X as ie,W as Z,Y as pe,a as fe,F as re,am as Qt,ad as At,a9 as ae,ae as An,h as kr,ao as Fu,w as ls,n as Jt,$ as Bn,T as pf,a1 as gn,L as la,aa as dr,a5 as Cn,D as ff,i as us,I as cs,m as go,at as zu,av as mf,bD as Nt,_ as di,bB as yo,aU as vf,s as Zr,aD as Pu}from"./@vue-3K-Vdqr2.js";import{f as gf,a as _i,b as Lu,c as yf,d as bf,e as wf,g as ze,h as Hu,i as hs,j as pi,k as ds,l as vr,m as pr,n as mt,o as Uu,p as ua,q as _f,r as ps,s as xf,t as Sf,u as $f,v as qu,w as Wu,x as jf,y as Ef,A as kf,B as Gr,C as Tf,D as Ju,F as yn,G as Yu,H as Vf,I as fs,J as bo,K as wo,L as Re,M as Df,N as Of,O as Af,P as Bf,Q as Cf,R as ca,S as ha,T as If,U as Rf,z as Mf,E as Nf,V as ms,W as Ff,X as zf,Y as vs,Z as Pf,_ as Lf}from"./element-plus-5Wi4i1TZ.js";import{Q as Hf,w as Uf,n as Ku,D as qf,P as Wf,k as Jf,M as Zu,E as gs}from"./@element-plus-0iGvOhcs.js";import{n as Yf,p as da,q as ys,s as Kf,v as Zf,w as Gf}from"./@vueuse-1-Jun0o2.js";import{O as xi}from"./vue-Xy_G9hDD.js";import{useRoute as Xf}from"./vue-router-EE3hBg2_.js";var Qf={ENV_TYPE:"live",NODE_ENV:"production"},e1=typeof global=="object"&&global&&global.Object===Object&&global;const Gu=e1;var t1=typeof self=="object"&&self&&self.Object===Object&&self,n1=Gu||t1||Function("return this")();const jt=n1;var r1=jt.Symbol;const _t=r1;var Xu=Object.prototype,i1=Xu.hasOwnProperty,o1=Xu.toString,nr=_t?_t.toStringTag:void 0;function s1(n){var e=i1.call(n,nr),t=n[nr];try{n[nr]=void 0;var r=!0}catch{}var i=o1.call(n);return r&&(e?n[nr]=t:delete n[nr]),i}var a1=Object.prototype,l1=a1.toString;function u1(n){return l1.call(n)}var c1="[object Null]",h1="[object Undefined]",pa=_t?_t.toStringTag:void 0;function nn(n){return n==null?n===void 0?h1:c1:pa&&pa in Object(n)?s1(n):u1(n)}function Ct(n){return n!=null&&typeof n=="object"}var d1="[object Symbol]";function p1(n){return typeof n=="symbol"||Ct(n)&&nn(n)==d1}function f1(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var m1=Array.isArray;const zn=m1;var v1=1/0,fa=_t?_t.prototype:void 0,ma=fa?fa.toString:void 0;function Qu(n){if(typeof n=="string")return n;if(zn(n))return f1(n,Qu)+"";if(p1(n))return ma?ma.call(n):"";var e=n+"";return e=="0"&&1/n==-v1?"-0":e}function rn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function ec(n){return n}var g1="[object AsyncFunction]",y1="[object Function]",b1="[object GeneratorFunction]",w1="[object Proxy]";function bs(n){if(!rn(n))return!1;var e=nn(n);return e==y1||e==b1||e==g1||e==w1}var _1=jt["__core-js_shared__"];const Ui=_1;var va=function(){var n=/[^.]+$/.exec(Ui&&Ui.keys&&Ui.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function x1(n){return!!va&&va in n}var S1=Function.prototype,$1=S1.toString;function bn(n){if(n!=null){try{return $1.call(n)}catch{}try{return n+""}catch{}}return""}var j1=/[\\^$.*+?()[\]{}|]/g,E1=/^\[object .+?Constructor\]$/,k1=Function.prototype,T1=Object.prototype,V1=k1.toString,D1=T1.hasOwnProperty,O1=RegExp("^"+V1.call(D1).replace(j1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A1(n){if(!rn(n)||x1(n))return!1;var e=bs(n)?O1:E1;return e.test(bn(n))}function B1(n,e){return n?.[e]}function wn(n,e){var t=B1(n,e);return A1(t)?t:void 0}var C1=wn(jt,"WeakMap");const _o=C1;var ga=Object.create,I1=function(){function n(){}return function(e){if(!rn(e))return{};if(ga)return ga(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const R1=I1;function tc(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function nc(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var M1=800,N1=16,F1=Date.now;function z1(n){var e=0,t=0;return function(){var r=F1(),i=N1-(r-t);if(t=r,i>0){if(++e>=M1)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function P1(n){return function(){return n}}var L1=function(){try{var n=wn(Object,"defineProperty");return n({},"",{}),n}catch{}}();const fi=L1;var H1=fi?function(n,e){return fi(n,"toString",{configurable:!0,enumerable:!1,value:P1(e),writable:!0})}:ec;const U1=H1;var q1=z1(U1);const W1=q1;function J1(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var Y1=9007199254740991,K1=/^(?:0|[1-9]\d*)$/;function rc(n,e){var t=typeof n;return e=e??Y1,!!e&&(t=="number"||t!="symbol"&&K1.test(n))&&n>-1&&n%1==0&&n<e}function ws(n,e,t){e=="__proto__"&&fi?fi(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Si(n,e){return n===e||n!==n&&e!==e}var Z1=Object.prototype,G1=Z1.hasOwnProperty;function ic(n,e,t){var r=n[e];(!(G1.call(n,e)&&Si(r,t))||t===void 0&&!(e in n))&&ws(n,e,t)}function qn(n,e,t,r){var i=!t;t||(t={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(t[a],n[a],a,t,n):void 0;u===void 0&&(u=n[a]),i?ws(t,a,u):ic(t,a,u)}return t}var ya=Math.max;function X1(n,e,t){return e=ya(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=ya(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(s),tc(n,this,a)}}function oc(n,e){return W1(X1(n,e,ec),n+"")}var Q1=9007199254740991;function sc(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Q1}function $i(n){return n!=null&&sc(n.length)&&!bs(n)}function em(n,e,t){if(!rn(t))return!1;var r=typeof e;return(r=="number"?$i(t)&&rc(e,t.length):r=="string"&&e in t)?Si(t[e],n):!1}function ac(n){return oc(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,s&&em(t[0],t[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,o)}return e})}var tm=Object.prototype;function _s(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||tm;return n===t}function nm(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var rm="[object Arguments]";function ba(n){return Ct(n)&&nn(n)==rm}var lc=Object.prototype,im=lc.hasOwnProperty,om=lc.propertyIsEnumerable,sm=ba(function(){return arguments}())?ba:function(n){return Ct(n)&&im.call(n,"callee")&&!om.call(n,"callee")};const xo=sm;function am(){return!1}var uc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wa=uc&&typeof module=="object"&&module&&!module.nodeType&&module,lm=wa&&wa.exports===uc,_a=lm?jt.Buffer:void 0,um=_a?_a.isBuffer:void 0,cm=um||am;const xs=cm;var hm="[object Arguments]",dm="[object Array]",pm="[object Boolean]",fm="[object Date]",mm="[object Error]",vm="[object Function]",gm="[object Map]",ym="[object Number]",bm="[object Object]",wm="[object RegExp]",_m="[object Set]",xm="[object String]",Sm="[object WeakMap]",$m="[object ArrayBuffer]",jm="[object DataView]",Em="[object Float32Array]",km="[object Float64Array]",Tm="[object Int8Array]",Vm="[object Int16Array]",Dm="[object Int32Array]",Om="[object Uint8Array]",Am="[object Uint8ClampedArray]",Bm="[object Uint16Array]",Cm="[object Uint32Array]",Se={};Se[Em]=Se[km]=Se[Tm]=Se[Vm]=Se[Dm]=Se[Om]=Se[Am]=Se[Bm]=Se[Cm]=!0,Se[hm]=Se[dm]=Se[$m]=Se[pm]=Se[jm]=Se[fm]=Se[mm]=Se[vm]=Se[gm]=Se[ym]=Se[bm]=Se[wm]=Se[_m]=Se[xm]=Se[Sm]=!1;function Im(n){return Ct(n)&&sc(n.length)&&!!Se[nn(n)]}function Ss(n){return function(e){return n(e)}}var cc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=cc&&typeof module=="object"&&module&&!module.nodeType&&module,Rm=fr&&fr.exports===cc,qi=Rm&&Gu.process,Mm=function(){try{var n=fr&&fr.require&&fr.require("util").types;return n||qi&&qi.binding&&qi.binding("util")}catch{}}();const xt=Mm;var xa=xt&&xt.isTypedArray,Nm=xa?Ss(xa):Im;const hc=Nm;var Fm=Object.prototype,zm=Fm.hasOwnProperty;function dc(n,e){var t=zn(n),r=!t&&xo(n),i=!t&&!r&&xs(n),o=!t&&!r&&!i&&hc(n),s=t||r||i||o,a=s?nm(n.length,String):[],u=a.length;for(var l in n)(e||zm.call(n,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||rc(l,u)))&&a.push(l);return a}function pc(n,e){return function(t){return n(e(t))}}var Pm=pc(Object.keys,Object);const Lm=Pm;var Hm=Object.prototype,Um=Hm.hasOwnProperty;function qm(n){if(!_s(n))return Lm(n);var e=[];for(var t in Object(n))Um.call(n,t)&&t!="constructor"&&e.push(t);return e}function $s(n){return $i(n)?dc(n):qm(n)}function Wm(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var Jm=Object.prototype,Ym=Jm.hasOwnProperty;function Km(n){if(!rn(n))return Wm(n);var e=_s(n),t=[];for(var r in n)r=="constructor"&&(e||!Ym.call(n,r))||t.push(r);return t}function Wn(n){return $i(n)?dc(n,!0):Km(n)}ac(function(n,e,t,r){qn(e,Wn(e),n,r)});var Zm=wn(Object,"create");const gr=Zm;function Gm(){this.__data__=gr?gr(null):{},this.size=0}function Xm(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var Qm="__lodash_hash_undefined__",e0=Object.prototype,t0=e0.hasOwnProperty;function n0(n){var e=this.__data__;if(gr){var t=e[n];return t===Qm?void 0:t}return t0.call(e,n)?e[n]:void 0}var r0=Object.prototype,i0=r0.hasOwnProperty;function o0(n){var e=this.__data__;return gr?e[n]!==void 0:i0.call(e,n)}var s0="__lodash_hash_undefined__";function a0(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=gr&&e===void 0?s0:e,this}function fn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}fn.prototype.clear=Gm,fn.prototype.delete=Xm,fn.prototype.get=n0,fn.prototype.has=o0,fn.prototype.set=a0;function l0(){this.__data__=[],this.size=0}function ji(n,e){for(var t=n.length;t--;)if(Si(n[t][0],e))return t;return-1}var u0=Array.prototype,c0=u0.splice;function h0(n){var e=this.__data__,t=ji(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():c0.call(e,t,1),--this.size,!0}function d0(n){var e=this.__data__,t=ji(e,n);return t<0?void 0:e[t][1]}function p0(n){return ji(this.__data__,n)>-1}function f0(n,e){var t=this.__data__,r=ji(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Vt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Vt.prototype.clear=l0,Vt.prototype.delete=h0,Vt.prototype.get=d0,Vt.prototype.has=p0,Vt.prototype.set=f0;var m0=wn(jt,"Map");const yr=m0;function v0(){this.size=0,this.__data__={hash:new fn,map:new(yr||Vt),string:new fn}}function g0(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Ei(n,e){var t=n.__data__;return g0(e)?t[typeof e=="string"?"string":"hash"]:t.map}function y0(n){var e=Ei(this,n).delete(n);return this.size-=e?1:0,e}function b0(n){return Ei(this,n).get(n)}function w0(n){return Ei(this,n).has(n)}function _0(n,e){var t=Ei(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Wt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Wt.prototype.clear=v0,Wt.prototype.delete=y0,Wt.prototype.get=b0,Wt.prototype.has=w0,Wt.prototype.set=_0;var x0="Expected a function";function js(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(x0);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var s=n.apply(this,r);return t.cache=o.set(i,s)||o,s};return t.cache=new(js.Cache||Wt),t}js.Cache=Wt;var S0=500;function $0(n){var e=js(n,function(r){return t.size===S0&&t.clear(),r}),t=e.cache;return e}var j0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,E0=/\\(\\)?/g;$0(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(j0,function(t,r,i,o){e.push(i?o.replace(E0,"$1"):r||t)}),e});function ki(n){return n==null?"":Qu(n)}function fc(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var k0=pc(Object.getPrototypeOf,Object);const Es=k0;var T0="[object Object]",V0=Function.prototype,D0=Object.prototype,mc=V0.toString,O0=D0.hasOwnProperty,A0=mc.call(Object);function vc(n){if(!Ct(n)||nn(n)!=T0)return!1;var e=Es(n);if(e===null)return!0;var t=O0.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&mc.call(t)==A0}var B0="[object DOMException]",C0="[object Error]";function I0(n){if(!Ct(n))return!1;var e=nn(n);return e==C0||e==B0||typeof n.message=="string"&&typeof n.name=="string"&&!vc(n)}oc(function(n,e){try{return tc(n,void 0,e)}catch(t){return I0(t)?t:new Error(t)}});function R0(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function M0(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:R0(n,e,t)}var N0="\\ud800-\\udfff",F0="\\u0300-\\u036f",z0="\\ufe20-\\ufe2f",P0="\\u20d0-\\u20ff",L0=F0+z0+P0,H0="\\ufe0e\\ufe0f",U0="\\u200d",q0=RegExp("["+U0+N0+L0+H0+"]");function gc(n){return q0.test(n)}function W0(n){return n.split("")}var yc="\\ud800-\\udfff",J0="\\u0300-\\u036f",Y0="\\ufe20-\\ufe2f",K0="\\u20d0-\\u20ff",Z0=J0+Y0+K0,G0="\\ufe0e\\ufe0f",X0="["+yc+"]",So="["+Z0+"]",$o="\\ud83c[\\udffb-\\udfff]",Q0="(?:"+So+"|"+$o+")",bc="[^"+yc+"]",wc="(?:\\ud83c[\\udde6-\\uddff]){2}",_c="[\\ud800-\\udbff][\\udc00-\\udfff]",ev="\\u200d",xc=Q0+"?",Sc="["+G0+"]?",tv="(?:"+ev+"(?:"+[bc,wc,_c].join("|")+")"+Sc+xc+")*",nv=Sc+xc+tv,rv="(?:"+[bc+So+"?",So,wc,_c,X0].join("|")+")",iv=RegExp($o+"(?="+$o+")|"+rv+nv,"g");function ov(n){return n.match(iv)||[]}function sv(n){return gc(n)?ov(n):W0(n)}function av(n){return function(e){e=ki(e);var t=gc(e)?sv(e):void 0,r=t?t[0]:e.charAt(0),i=t?M0(t,1).join(""):e.slice(1);return r[n]()+i}}var lv=av("toUpperCase");const $c=lv;function uv(n){return $c(ki(n).toLowerCase())}function cv(n,e,t,r){var i=-1,o=n==null?0:n.length;for(r&&o&&(t=n[++i]);++i<o;)t=e(t,n[i],i,n);return t}function hv(n){return function(e){return n?.[e]}}var dv={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},pv=hv(dv);const fv=pv;var mv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vv="\\u0300-\\u036f",gv="\\ufe20-\\ufe2f",yv="\\u20d0-\\u20ff",bv=vv+gv+yv,wv="["+bv+"]",_v=RegExp(wv,"g");function xv(n){return n=ki(n),n&&n.replace(mv,fv).replace(_v,"")}var Sv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function $v(n){return n.match(Sv)||[]}var jv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ev(n){return jv.test(n)}var jc="\\ud800-\\udfff",kv="\\u0300-\\u036f",Tv="\\ufe20-\\ufe2f",Vv="\\u20d0-\\u20ff",Dv=kv+Tv+Vv,Ec="\\u2700-\\u27bf",kc="a-z\\xdf-\\xf6\\xf8-\\xff",Ov="\\xac\\xb1\\xd7\\xf7",Av="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bv="\\u2000-\\u206f",Cv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tc="A-Z\\xc0-\\xd6\\xd8-\\xde",Iv="\\ufe0e\\ufe0f",Vc=Ov+Av+Bv+Cv,Dc="['’]",Sa="["+Vc+"]",Rv="["+Dv+"]",Oc="\\d+",Mv="["+Ec+"]",Ac="["+kc+"]",Bc="[^"+jc+Vc+Oc+Ec+kc+Tc+"]",Nv="\\ud83c[\\udffb-\\udfff]",Fv="(?:"+Rv+"|"+Nv+")",zv="[^"+jc+"]",Cc="(?:\\ud83c[\\udde6-\\uddff]){2}",Ic="[\\ud800-\\udbff][\\udc00-\\udfff]",Vn="["+Tc+"]",Pv="\\u200d",$a="(?:"+Ac+"|"+Bc+")",Lv="(?:"+Vn+"|"+Bc+")",ja="(?:"+Dc+"(?:d|ll|m|re|s|t|ve))?",Ea="(?:"+Dc+"(?:D|LL|M|RE|S|T|VE))?",Rc=Fv+"?",Mc="["+Iv+"]?",Hv="(?:"+Pv+"(?:"+[zv,Cc,Ic].join("|")+")"+Mc+Rc+")*",Uv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wv=Mc+Rc+Hv,Jv="(?:"+[Mv,Cc,Ic].join("|")+")"+Wv,Yv=RegExp([Vn+"?"+Ac+"+"+ja+"(?="+[Sa,Vn,"$"].join("|")+")",Lv+"+"+Ea+"(?="+[Sa,Vn+$a,"$"].join("|")+")",Vn+"?"+$a+"+"+ja,Vn+"+"+Ea,qv,Uv,Oc,Jv].join("|"),"g");function Kv(n){return n.match(Yv)||[]}function Zv(n,e,t){return n=ki(n),e=t?void 0:e,e===void 0?Ev(n)?Kv(n):$v(n):n.match(e)||[]}var Gv="['’]",Xv=RegExp(Gv,"g");function Qv(n){return function(e){return cv(Zv(xv(e).replace(Xv,"")),n,"")}}var eg=Qv(function(n,e,t){return e=e.toLowerCase(),n+(t?uv(e):e)});const tg=eg;function ng(){this.__data__=new Vt,this.size=0}function rg(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function ig(n){return this.__data__.get(n)}function og(n){return this.__data__.has(n)}var sg=200;function ag(n,e){var t=this.__data__;if(t instanceof Vt){var r=t.__data__;if(!yr||r.length<sg-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Wt(r)}return t.set(n,e),this.size=t.size,this}function mn(n){var e=this.__data__=new Vt(n);this.size=e.size}mn.prototype.clear=ng,mn.prototype.delete=rg,mn.prototype.get=ig,mn.prototype.has=og,mn.prototype.set=ag;function lg(n,e){return n&&qn(e,$s(e),n)}function ug(n,e){return n&&qn(e,Wn(e),n)}var Nc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ka=Nc&&typeof module=="object"&&module&&!module.nodeType&&module,cg=ka&&ka.exports===Nc,Ta=cg?jt.Buffer:void 0,Va=Ta?Ta.allocUnsafe:void 0;function Fc(n,e){if(e)return n.slice();var t=n.length,r=Va?Va(t):new n.constructor(t);return n.copy(r),r}function hg(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var s=n[t];e(s,t,n)&&(o[i++]=s)}return o}function zc(){return[]}var dg=Object.prototype,pg=dg.propertyIsEnumerable,Da=Object.getOwnPropertySymbols,fg=Da?function(n){return n==null?[]:(n=Object(n),hg(Da(n),function(e){return pg.call(n,e)}))}:zc;const ks=fg;function mg(n,e){return qn(n,ks(n),e)}var vg=Object.getOwnPropertySymbols,gg=vg?function(n){for(var e=[];n;)fc(e,ks(n)),n=Es(n);return e}:zc;const Pc=gg;function yg(n,e){return qn(n,Pc(n),e)}function Lc(n,e,t){var r=e(n);return zn(n)?r:fc(r,t(n))}function bg(n){return Lc(n,$s,ks)}function wg(n){return Lc(n,Wn,Pc)}var _g=wn(jt,"DataView");const jo=_g;var xg=wn(jt,"Promise");const Eo=xg;var Sg=wn(jt,"Set");const ko=Sg;var Oa="[object Map]",$g="[object Object]",Aa="[object Promise]",Ba="[object Set]",Ca="[object WeakMap]",Ia="[object DataView]",jg=bn(jo),Eg=bn(yr),kg=bn(Eo),Tg=bn(ko),Vg=bn(_o),hn=nn;(jo&&hn(new jo(new ArrayBuffer(1)))!=Ia||yr&&hn(new yr)!=Oa||Eo&&hn(Eo.resolve())!=Aa||ko&&hn(new ko)!=Ba||_o&&hn(new _o)!=Ca)&&(hn=function(n){var e=nn(n),t=e==$g?n.constructor:void 0,r=t?bn(t):"";if(r)switch(r){case jg:return Ia;case Eg:return Oa;case kg:return Aa;case Tg:return Ba;case Vg:return Ca}return e});const Ts=hn;var Dg=Object.prototype,Og=Dg.hasOwnProperty;function Ag(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&Og.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var Bg=jt.Uint8Array;const Ra=Bg;function Vs(n){var e=new n.constructor(n.byteLength);return new Ra(e).set(new Ra(n)),e}function Cg(n,e){var t=e?Vs(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var Ig=/\w*$/;function Rg(n){var e=new n.constructor(n.source,Ig.exec(n));return e.lastIndex=n.lastIndex,e}var Ma=_t?_t.prototype:void 0,Na=Ma?Ma.valueOf:void 0;function Mg(n){return Na?Object(Na.call(n)):{}}function Hc(n,e){var t=e?Vs(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var Ng="[object Boolean]",Fg="[object Date]",zg="[object Map]",Pg="[object Number]",Lg="[object RegExp]",Hg="[object Set]",Ug="[object String]",qg="[object Symbol]",Wg="[object ArrayBuffer]",Jg="[object DataView]",Yg="[object Float32Array]",Kg="[object Float64Array]",Zg="[object Int8Array]",Gg="[object Int16Array]",Xg="[object Int32Array]",Qg="[object Uint8Array]",ey="[object Uint8ClampedArray]",ty="[object Uint16Array]",ny="[object Uint32Array]";function ry(n,e,t){var r=n.constructor;switch(e){case Wg:return Vs(n);case Ng:case Fg:return new r(+n);case Jg:return Cg(n,t);case Yg:case Kg:case Zg:case Gg:case Xg:case Qg:case ey:case ty:case ny:return Hc(n,t);case zg:return new r;case Pg:case Ug:return new r(n);case Lg:return Rg(n);case Hg:return new r;case qg:return Mg(n)}}function Uc(n){return typeof n.constructor=="function"&&!_s(n)?R1(Es(n)):{}}var iy="[object Map]";function oy(n){return Ct(n)&&Ts(n)==iy}var Fa=xt&&xt.isMap,sy=Fa?Ss(Fa):oy;const ay=sy;var ly="[object Set]";function uy(n){return Ct(n)&&Ts(n)==ly}var za=xt&&xt.isSet,cy=za?Ss(za):uy;const hy=cy;var dy=1,py=2,fy=4,qc="[object Arguments]",my="[object Array]",vy="[object Boolean]",gy="[object Date]",yy="[object Error]",Wc="[object Function]",by="[object GeneratorFunction]",wy="[object Map]",_y="[object Number]",Jc="[object Object]",xy="[object RegExp]",Sy="[object Set]",$y="[object String]",jy="[object Symbol]",Ey="[object WeakMap]",ky="[object ArrayBuffer]",Ty="[object DataView]",Vy="[object Float32Array]",Dy="[object Float64Array]",Oy="[object Int8Array]",Ay="[object Int16Array]",By="[object Int32Array]",Cy="[object Uint8Array]",Iy="[object Uint8ClampedArray]",Ry="[object Uint16Array]",My="[object Uint32Array]",be={};be[qc]=be[my]=be[ky]=be[Ty]=be[vy]=be[gy]=be[Vy]=be[Dy]=be[Oy]=be[Ay]=be[By]=be[wy]=be[_y]=be[Jc]=be[xy]=be[Sy]=be[$y]=be[jy]=be[Cy]=be[Iy]=be[Ry]=be[My]=!0,be[yy]=be[Wc]=be[Ey]=!1;function Xr(n,e,t,r,i,o){var s,a=e&dy,u=e&py,l=e&fy;if(t&&(s=i?t(n,r,i,o):t(n)),s!==void 0)return s;if(!rn(n))return n;var c=zn(n);if(c){if(s=Ag(n),!a)return nc(n,s)}else{var h=Ts(n),d=h==Wc||h==by;if(xs(n))return Fc(n,a);if(h==Jc||h==qc||d&&!i){if(s=u||d?{}:Uc(n),!a)return u?yg(n,ug(s,n)):mg(n,lg(s,n))}else{if(!be[h])return i?n:{};s=ry(n,h,a)}}o||(o=new mn);var p=o.get(n);if(p)return p;o.set(n,s),hy(n)?n.forEach(function(y){s.add(Xr(y,e,t,y,n,o))}):ay(n)&&n.forEach(function(y,$){s.set($,Xr(y,e,t,$,n,o))});var f=l?u?wg:bg:u?Wn:$s,v=c?void 0:f(n);return J1(v||n,function(y,$){v&&($=y,y=n[$]),ic(s,$,Xr(y,e,t,$,n,o))}),s}var Ny=1,Fy=4;function zy(n){return Xr(n,Ny|Fy)}var Pa=_t?_t.prototype:void 0;Pa&&Pa.valueOf;function Py(n){return function(e,t,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var u=s[n?a:++i];if(t(o[u],u,o)===!1)break}return e}}var Ly=Py();const Hy=Ly;function To(n,e,t){(t!==void 0&&!Si(n[e],t)||t===void 0&&!(e in n))&&ws(n,e,t)}function Uy(n){return Ct(n)&&$i(n)}function Vo(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function qy(n){return qn(n,Wn(n))}function Wy(n,e,t,r,i,o,s){var a=Vo(n,t),u=Vo(e,t),l=s.get(u);if(l){To(n,t,l);return}var c=o?o(a,u,t+"",n,e,s):void 0,h=c===void 0;if(h){var d=zn(u),p=!d&&xs(u),f=!d&&!p&&hc(u);c=u,d||p||f?zn(a)?c=a:Uy(a)?c=nc(a):p?(h=!1,c=Fc(u,!0)):f?(h=!1,c=Hc(u,!0)):c=[]:vc(u)||xo(u)?(c=a,xo(a)?c=qy(a):(!rn(a)||bs(a))&&(c=Uc(u))):h=!1}h&&(s.set(u,c),i(c,u,r,o,s),s.delete(u)),To(n,t,c)}function Yc(n,e,t,r,i){n!==e&&Hy(e,function(o,s){if(i||(i=new mn),rn(o))Wy(n,e,s,t,Yc,r,i);else{var a=r?r(Vo(n,s),o,s+"",n,e,i):void 0;a===void 0&&(a=o),To(n,s,a)}},Wn)}xt&&xt.isArrayBuffer;xt&&xt.isDate;var Jy=ac(function(n,e,t){Yc(n,e,t)});const Yy=Jy;function La(n){return $c(tg(n))}var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Kc={exports:{}};function Ky(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ha={exports:{}},Ua;function on(){return Ua||(Ua=1,function(n,e){(function(t,r){n.exports=r()})(Ke,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Ke<"u"&&Ke.crypto&&(o=Ke.crypto),!o&&typeof Ky=="function")try{o=require("crypto")}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function g(){}return function(w){var _;return g.prototype=w,_=new g,g.prototype=null,_}}(),u={},l=u.lib={},c=l.Base=function(){return{extend:function(g){var w=a(this);return g&&w.mixIn(g),(!w.hasOwnProperty("init")||this.init===w.init)&&(w.init=function(){w.$super.init.apply(this,arguments)}),w.init.prototype=w,w.$super=this,w},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var w in g)g.hasOwnProperty(w)&&(this[w]=g[w]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=l.WordArray=c.extend({init:function(g,w){g=this.words=g||[],w!=i?this.sigBytes=w:this.sigBytes=g.length*4},toString:function(g){return(g||p).stringify(this)},concat:function(g){var w=this.words,_=g.words,x=this.sigBytes,b=g.sigBytes;if(this.clamp(),x%4)for(var E=0;E<b;E++){var O=_[E>>>2]>>>24-E%4*8&255;w[x+E>>>2]|=O<<24-(x+E)%4*8}else for(var H=0;H<b;H+=4)w[x+H>>>2]=_[H>>>2];return this.sigBytes+=b,this},clamp:function(){var g=this.words,w=this.sigBytes;g[w>>>2]&=4294967295<<32-w%4*8,g.length=r.ceil(w/4)},clone:function(){var g=c.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var w=[],_=0;_<g;_+=4)w.push(s());return new h.init(w,g)}}),d=u.enc={},p=d.Hex={stringify:function(g){for(var w=g.words,_=g.sigBytes,x=[],b=0;b<_;b++){var E=w[b>>>2]>>>24-b%4*8&255;x.push((E>>>4).toString(16)),x.push((E&15).toString(16))}return x.join("")},parse:function(g){for(var w=g.length,_=[],x=0;x<w;x+=2)_[x>>>3]|=parseInt(g.substr(x,2),16)<<24-x%8*4;return new h.init(_,w/2)}},f=d.Latin1={stringify:function(g){for(var w=g.words,_=g.sigBytes,x=[],b=0;b<_;b++){var E=w[b>>>2]>>>24-b%4*8&255;x.push(String.fromCharCode(E))}return x.join("")},parse:function(g){for(var w=g.length,_=[],x=0;x<w;x++)_[x>>>2]|=(g.charCodeAt(x)&255)<<24-x%4*8;return new h.init(_,w)}},v=d.Utf8={stringify:function(g){try{return decodeURIComponent(escape(f.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return f.parse(unescape(encodeURIComponent(g)))}},y=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=v.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var w,_=this._data,x=_.words,b=_.sigBytes,E=this.blockSize,O=E*4,H=b/O;g?H=r.ceil(H):H=r.max((H|0)-this._minBufferSize,0);var S=H*E,j=r.min(S*4,b);if(S){for(var N=0;N<S;N+=E)this._doProcessBlock(x,N);w=x.splice(0,S),_.sigBytes-=j}return new h.init(w,j)},clone:function(){var g=c.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0});l.Hasher=y.extend({cfg:c.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var w=this._doFinalize();return w},blockSize:16,_createHelper:function(g){return function(w,_){return new g.init(_).finalize(w)}},_createHmacHelper:function(g){return function(w,_){return new $.HMAC.init(g,_).finalize(w)}}});var $=u.algo={};return u}(Math);return t})}(Ha)),Ha.exports}(function(n,e){(function(t,r){n.exports=r(on())})(Ke,function(t){return function(r){var i=t,o=i.lib,s=o.WordArray,a=o.Hasher,u=i.algo,l=[];(function(){for(var v=0;v<64;v++)l[v]=r.abs(r.sin(v+1))*4294967296|0})();var c=u.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,y){for(var $=0;$<16;$++){var g=y+$,w=v[g];v[g]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var _=this._hash.words,x=v[y+0],b=v[y+1],E=v[y+2],O=v[y+3],H=v[y+4],S=v[y+5],j=v[y+6],N=v[y+7],V=v[y+8],z=v[y+9],B=v[y+10],R=v[y+11],U=v[y+12],P=v[y+13],G=v[y+14],X=v[y+15],D=_[0],C=_[1],I=_[2],M=_[3];D=h(D,C,I,M,x,7,l[0]),M=h(M,D,C,I,b,12,l[1]),I=h(I,M,D,C,E,17,l[2]),C=h(C,I,M,D,O,22,l[3]),D=h(D,C,I,M,H,7,l[4]),M=h(M,D,C,I,S,12,l[5]),I=h(I,M,D,C,j,17,l[6]),C=h(C,I,M,D,N,22,l[7]),D=h(D,C,I,M,V,7,l[8]),M=h(M,D,C,I,z,12,l[9]),I=h(I,M,D,C,B,17,l[10]),C=h(C,I,M,D,R,22,l[11]),D=h(D,C,I,M,U,7,l[12]),M=h(M,D,C,I,P,12,l[13]),I=h(I,M,D,C,G,17,l[14]),C=h(C,I,M,D,X,22,l[15]),D=d(D,C,I,M,b,5,l[16]),M=d(M,D,C,I,j,9,l[17]),I=d(I,M,D,C,R,14,l[18]),C=d(C,I,M,D,x,20,l[19]),D=d(D,C,I,M,S,5,l[20]),M=d(M,D,C,I,B,9,l[21]),I=d(I,M,D,C,X,14,l[22]),C=d(C,I,M,D,H,20,l[23]),D=d(D,C,I,M,z,5,l[24]),M=d(M,D,C,I,G,9,l[25]),I=d(I,M,D,C,O,14,l[26]),C=d(C,I,M,D,V,20,l[27]),D=d(D,C,I,M,P,5,l[28]),M=d(M,D,C,I,E,9,l[29]),I=d(I,M,D,C,N,14,l[30]),C=d(C,I,M,D,U,20,l[31]),D=p(D,C,I,M,S,4,l[32]),M=p(M,D,C,I,V,11,l[33]),I=p(I,M,D,C,R,16,l[34]),C=p(C,I,M,D,G,23,l[35]),D=p(D,C,I,M,b,4,l[36]),M=p(M,D,C,I,H,11,l[37]),I=p(I,M,D,C,N,16,l[38]),C=p(C,I,M,D,B,23,l[39]),D=p(D,C,I,M,P,4,l[40]),M=p(M,D,C,I,x,11,l[41]),I=p(I,M,D,C,O,16,l[42]),C=p(C,I,M,D,j,23,l[43]),D=p(D,C,I,M,z,4,l[44]),M=p(M,D,C,I,U,11,l[45]),I=p(I,M,D,C,X,16,l[46]),C=p(C,I,M,D,E,23,l[47]),D=f(D,C,I,M,x,6,l[48]),M=f(M,D,C,I,N,10,l[49]),I=f(I,M,D,C,G,15,l[50]),C=f(C,I,M,D,S,21,l[51]),D=f(D,C,I,M,U,6,l[52]),M=f(M,D,C,I,O,10,l[53]),I=f(I,M,D,C,B,15,l[54]),C=f(C,I,M,D,b,21,l[55]),D=f(D,C,I,M,V,6,l[56]),M=f(M,D,C,I,X,10,l[57]),I=f(I,M,D,C,j,15,l[58]),C=f(C,I,M,D,P,21,l[59]),D=f(D,C,I,M,H,6,l[60]),M=f(M,D,C,I,R,10,l[61]),I=f(I,M,D,C,E,15,l[62]),C=f(C,I,M,D,z,21,l[63]),_[0]=_[0]+D|0,_[1]=_[1]+C|0,_[2]=_[2]+I|0,_[3]=_[3]+M|0},_doFinalize:function(){var v=this._data,y=v.words,$=this._nDataBytes*8,g=v.sigBytes*8;y[g>>>5]|=128<<24-g%32;var w=r.floor($/4294967296),_=$;y[(g+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,y[(g+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,v.sigBytes=(y.length+1)*4,this._process();for(var x=this._hash,b=x.words,E=0;E<4;E++){var O=b[E];b[E]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return x},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});function h(v,y,$,g,w,_,x){var b=v+(y&$|~y&g)+w+x;return(b<<_|b>>>32-_)+y}function d(v,y,$,g,w,_,x){var b=v+(y&g|$&~g)+w+x;return(b<<_|b>>>32-_)+y}function p(v,y,$,g,w,_,x){var b=v+(y^$^g)+w+x;return(b<<_|b>>>32-_)+y}function f(v,y,$,g,w,_,x){var b=v+($^(y|~g))+w+x;return(b<<_|b>>>32-_)+y}i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),t.MD5})})(Kc);var Zc=Kc.exports;Jn(Zc);var Gc={exports:{}};(function(n,e){(function(t,r){n.exports=r(on())})(Ke,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(u){var l=u.words,c=u.sigBytes,h=this._map;u.clamp();for(var d=[],p=0;p<c;p+=3)for(var f=l[p>>>2]>>>24-p%4*8&255,v=l[p+1>>>2]>>>24-(p+1)%4*8&255,y=l[p+2>>>2]>>>24-(p+2)%4*8&255,$=f<<16|v<<8|y,g=0;g<4&&p+g*.75<c;g++)d.push(h.charAt($>>>6*(3-g)&63));var w=h.charAt(64);if(w)for(;d.length%4;)d.push(w);return d.join("")},parse:function(u){var l=u.length,c=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var d=0;d<c.length;d++)h[c.charCodeAt(d)]=d}var p=c.charAt(64);if(p){var f=u.indexOf(p);f!==-1&&(l=f)}return a(u,l,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,l,c){for(var h=[],d=0,p=0;p<l;p++)if(p%4){var f=c[u.charCodeAt(p-1)]<<p%4*2,v=c[u.charCodeAt(p)]>>>6-p%4*2,y=f|v;h[d>>>2]|=y<<24-d%4*8,d++}return o.create(h,d)}}(),t.enc.Base64})})(Gc);var Xc=Gc.exports;Jn(Xc);var Qc={exports:{}};(function(n,e){(function(t,r){n.exports=r(on())})(Ke,function(t){return t.enc.Utf8})})(Qc);var Zy=Qc.exports;Jn(Zy);var eh={exports:{}},qa={exports:{}},Wa={exports:{}},Ja;function Gy(){return Ja||(Ja=1,function(n,e){(function(t,r){n.exports=r(on())})(Ke,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,s=i.Hasher,a=r.algo,u=[],l=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,h){for(var d=this._hash.words,p=d[0],f=d[1],v=d[2],y=d[3],$=d[4],g=0;g<80;g++){if(g<16)u[g]=c[h+g]|0;else{var w=u[g-3]^u[g-8]^u[g-14]^u[g-16];u[g]=w<<1|w>>>31}var _=(p<<5|p>>>27)+$+u[g];g<20?_+=(f&v|~f&y)+1518500249:g<40?_+=(f^v^y)+1859775393:g<60?_+=(f&v|f&y|v&y)-1894007588:_+=(f^v^y)-899497514,$=y,y=v,v=f<<30|f>>>2,f=p,p=_}d[0]=d[0]+p|0,d[1]=d[1]+f|0,d[2]=d[2]+v|0,d[3]=d[3]+y|0,d[4]=d[4]+$|0},_doFinalize:function(){var c=this._data,h=c.words,d=this._nDataBytes*8,p=c.sigBytes*8;return h[p>>>5]|=128<<24-p%32,h[(p+64>>>9<<4)+14]=Math.floor(d/4294967296),h[(p+64>>>9<<4)+15]=d,c.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var c=s.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l)}(),t.SHA1})}(Wa)),Wa.exports}var Ya={exports:{}},Ka;function Xy(){return Ka||(Ka=1,function(n,e){(function(t,r){n.exports=r(on())})(Ke,function(t){(function(){var r=t,i=r.lib,o=i.Base,s=r.enc,a=s.Utf8,u=r.algo;u.HMAC=o.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=a.parse(c));var h=l.blockSize,d=h*4;c.sigBytes>d&&(c=l.finalize(c)),c.clamp();for(var p=this._oKey=c.clone(),f=this._iKey=c.clone(),v=p.words,y=f.words,$=0;$<h;$++)v[$]^=1549556828,y[$]^=909522486;p.sigBytes=f.sigBytes=d,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var c=this._hasher,h=c.finalize(l);c.reset();var d=c.finalize(this._oKey.clone().concat(h));return d}})})()})}(Ya)),Ya.exports}var Za;function th(){return Za||(Za=1,function(n,e){(function(t,r,i){n.exports=r(on(),Gy(),Xy())})(Ke,function(t){return function(){var r=t,i=r.lib,o=i.Base,s=i.WordArray,a=r.algo,u=a.MD5,l=a.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:u,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,h){for(var d,p=this.cfg,f=p.hasher.create(),v=s.create(),y=v.words,$=p.keySize,g=p.iterations;y.length<$;){d&&f.update(d),d=f.update(c).finalize(h),f.reset();for(var w=1;w<g;w++)d=f.finalize(d),f.reset();v.concat(d)}return v.sigBytes=$*4,v}});r.EvpKDF=function(c,h,d){return l.create(d).compute(c,h)}}(),t.EvpKDF})}(qa)),qa.exports}var Ga={exports:{}},Xa;function Qy(){return Xa||(Xa=1,function(n,e){(function(t,r,i){n.exports=r(on(),th())})(Ke,function(t){t.lib.Cipher||function(r){var i=t,o=i.lib,s=o.Base,a=o.WordArray,u=o.BufferedBlockAlgorithm,l=i.enc;l.Utf8;var c=l.Base64,h=i.algo,d=h.EvpKDF,p=o.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(S,j){return this.create(this._ENC_XFORM_MODE,S,j)},createDecryptor:function(S,j){return this.create(this._DEC_XFORM_MODE,S,j)},init:function(S,j,N){this.cfg=this.cfg.extend(N),this._xformMode=S,this._key=j,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var j=this._doFinalize();return j},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function S(j){return typeof j=="string"?H:b}return function(j){return{encrypt:function(N,V,z){return S(V).encrypt(j,N,V,z)},decrypt:function(N,V,z){return S(V).decrypt(j,N,V,z)}}}}()});o.StreamCipher=p.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1});var f=i.mode={},v=o.BlockCipherMode=s.extend({createEncryptor:function(S,j){return this.Encryptor.create(S,j)},createDecryptor:function(S,j){return this.Decryptor.create(S,j)},init:function(S,j){this._cipher=S,this._iv=j}}),y=f.CBC=function(){var S=v.extend();S.Encryptor=S.extend({processBlock:function(N,V){var z=this._cipher,B=z.blockSize;j.call(this,N,V,B),z.encryptBlock(N,V),this._prevBlock=N.slice(V,V+B)}}),S.Decryptor=S.extend({processBlock:function(N,V){var z=this._cipher,B=z.blockSize,R=N.slice(V,V+B);z.decryptBlock(N,V),j.call(this,N,V,B),this._prevBlock=R}});function j(N,V,z){var B,R=this._iv;R?(B=R,this._iv=r):B=this._prevBlock;for(var U=0;U<z;U++)N[V+U]^=B[U]}return S}(),$=i.pad={},g=$.Pkcs7={pad:function(S,j){for(var N=j*4,V=N-S.sigBytes%N,z=V<<24|V<<16|V<<8|V,B=[],R=0;R<V;R+=4)B.push(z);var U=a.create(B,V);S.concat(U)},unpad:function(S){var j=S.words[S.sigBytes-1>>>2]&255;S.sigBytes-=j}};o.BlockCipher=p.extend({cfg:p.cfg.extend({mode:y,padding:g}),reset:function(){var S;p.reset.call(this);var j=this.cfg,N=j.iv,V=j.mode;this._xformMode==this._ENC_XFORM_MODE?S=V.createEncryptor:(S=V.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,N&&N.words):(this._mode=S.call(V,this,N&&N.words),this._mode.__creator=S)},_doProcessBlock:function(S,j){this._mode.processBlock(S,j)},_doFinalize:function(){var S,j=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(j.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),j.unpad(S)),S},blockSize:128/32});var w=o.CipherParams=s.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),_=i.format={},x=_.OpenSSL={stringify:function(S){var j,N=S.ciphertext,V=S.salt;return V?j=a.create([1398893684,1701076831]).concat(V).concat(N):j=N,j.toString(c)},parse:function(S){var j,N=c.parse(S),V=N.words;return V[0]==1398893684&&V[1]==1701076831&&(j=a.create(V.slice(2,4)),V.splice(0,4),N.sigBytes-=16),w.create({ciphertext:N,salt:j})}},b=o.SerializableCipher=s.extend({cfg:s.extend({format:x}),encrypt:function(S,j,N,V){V=this.cfg.extend(V);var z=S.createEncryptor(N,V),B=z.finalize(j),R=z.cfg;return w.create({ciphertext:B,key:N,iv:R.iv,algorithm:S,mode:R.mode,padding:R.padding,blockSize:S.blockSize,formatter:V.format})},decrypt:function(S,j,N,V){V=this.cfg.extend(V),j=this._parse(j,V.format);var z=S.createDecryptor(N,V).finalize(j.ciphertext);return z},_parse:function(S,j){return typeof S=="string"?j.parse(S,this):S}}),E=i.kdf={},O=E.OpenSSL={execute:function(S,j,N,V,z){if(V||(V=a.random(64/8)),z)var B=d.create({keySize:j+N,hasher:z}).compute(S,V);else var B=d.create({keySize:j+N}).compute(S,V);var R=a.create(B.words.slice(j),N*4);return B.sigBytes=j*4,w.create({key:B,iv:R,salt:V})}},H=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:O}),encrypt:function(S,j,N,V){V=this.cfg.extend(V);var z=V.kdf.execute(N,S.keySize,S.ivSize,V.salt,V.hasher);V.iv=z.iv;var B=b.encrypt.call(this,S,j,z.key,V);return B.mixIn(z),B},decrypt:function(S,j,N,V){V=this.cfg.extend(V),j=this._parse(j,V.format);var z=V.kdf.execute(N,S.keySize,S.ivSize,j.salt,V.hasher);V.iv=z.iv;var B=b.decrypt.call(this,S,j,z.key,V);return B}})}()})}(Ga)),Ga.exports}(function(n,e){(function(t,r,i){n.exports=r(on(),Xc,Zc,th(),Qy())})(Ke,function(t){return function(){var r=t,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],u=[],l=[],c=[],h=[],d=[],p=[],f=[],v=[],y=[];(function(){for(var w=[],_=0;_<256;_++)_<128?w[_]=_<<1:w[_]=_<<1^283;for(var x=0,b=0,_=0;_<256;_++){var E=b^b<<1^b<<2^b<<3^b<<4;E=E>>>8^E&255^99,a[x]=E,u[E]=x;var O=w[x],H=w[O],S=w[H],j=w[E]*257^E*16843008;l[x]=j<<24|j>>>8,c[x]=j<<16|j>>>16,h[x]=j<<8|j>>>24,d[x]=j;var j=S*16843009^H*65537^O*257^x*16843008;p[E]=j<<24|j>>>8,f[E]=j<<16|j>>>16,v[E]=j<<8|j>>>24,y[E]=j,x?(x=O^w[w[w[S^O]]],b^=w[w[b]]):x=b=1}})();var $=[0,1,2,4,8,16,32,64,128,27,54],g=s.AES=o.extend({_doReset:function(){var w;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,x=_.words,b=_.sigBytes/4,E=this._nRounds=b+6,O=(E+1)*4,H=this._keySchedule=[],S=0;S<O;S++)S<b?H[S]=x[S]:(w=H[S-1],S%b?b>6&&S%b==4&&(w=a[w>>>24]<<24|a[w>>>16&255]<<16|a[w>>>8&255]<<8|a[w&255]):(w=w<<8|w>>>24,w=a[w>>>24]<<24|a[w>>>16&255]<<16|a[w>>>8&255]<<8|a[w&255],w^=$[S/b|0]<<24),H[S]=H[S-b]^w);for(var j=this._invKeySchedule=[],N=0;N<O;N++){var S=O-N;if(N%4)var w=H[S];else var w=H[S-4];N<4||S<=4?j[N]=w:j[N]=p[a[w>>>24]]^f[a[w>>>16&255]]^v[a[w>>>8&255]]^y[a[w&255]]}}},encryptBlock:function(w,_){this._doCryptBlock(w,_,this._keySchedule,l,c,h,d,a)},decryptBlock:function(w,_){var x=w[_+1];w[_+1]=w[_+3],w[_+3]=x,this._doCryptBlock(w,_,this._invKeySchedule,p,f,v,y,u);var x=w[_+1];w[_+1]=w[_+3],w[_+3]=x},_doCryptBlock:function(w,_,x,b,E,O,H,S){for(var j=this._nRounds,N=w[_]^x[0],V=w[_+1]^x[1],z=w[_+2]^x[2],B=w[_+3]^x[3],R=4,U=1;U<j;U++){var P=b[N>>>24]^E[V>>>16&255]^O[z>>>8&255]^H[B&255]^x[R++],G=b[V>>>24]^E[z>>>16&255]^O[B>>>8&255]^H[N&255]^x[R++],X=b[z>>>24]^E[B>>>16&255]^O[N>>>8&255]^H[V&255]^x[R++],D=b[B>>>24]^E[N>>>16&255]^O[V>>>8&255]^H[z&255]^x[R++];N=P,V=G,z=X,B=D}var P=(S[N>>>24]<<24|S[V>>>16&255]<<16|S[z>>>8&255]<<8|S[B&255])^x[R++],G=(S[V>>>24]<<24|S[z>>>16&255]<<16|S[B>>>8&255]<<8|S[N&255])^x[R++],X=(S[z>>>24]<<24|S[B>>>16&255]<<16|S[N>>>8&255]<<8|S[V&255])^x[R++],D=(S[B>>>24]<<24|S[N>>>16&255]<<16|S[V>>>8&255]<<8|S[z&255])^x[R++];w[_]=P,w[_+1]=G,w[_+2]=X,w[_+3]=D},keySize:256/32});r.AES=o._createHelper(g)}(),t.AES})})(eh);var e2=eh.exports;Jn(e2);var t2="0123456789abcdefghijklmnopqrstuvwxyz";function Qa(n){return t2.charAt(n)}function n2(n,e){return n&e}function Br(n,e){return n|e}function el(n,e){return n^e}function tl(n,e){return n&~e}function r2(n){if(n==0)return-1;var e=0;return n&65535||(n>>=16,e+=16),n&255||(n>>=8,e+=8),n&15||(n>>=4,e+=4),n&3||(n>>=2,e+=2),n&1||++e,e}function i2(n){for(var e=0;n!=0;)n&=n-1,++e;return e}var rr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o2="=";function nl(n){var e,t,r="";for(e=0;e+3<=n.length;e+=3)t=parseInt(n.substring(e,e+3),16),r+=rr.charAt(t>>6)+rr.charAt(t&63);for(e+1==n.length?(t=parseInt(n.substring(e,e+1),16),r+=rr.charAt(t<<2)):e+2==n.length&&(t=parseInt(n.substring(e,e+2),16),r+=rr.charAt(t>>2)+rr.charAt((t&3)<<4));(r.length&3)>0;)r+=o2;return r}var $n,s2={decode:function(n){var e;if($n===void 0){var t="0123456789ABCDEF",r=` \f
2
- \r  \u2028\u2029`;for($n={},e=0;e<16;++e)$n[t.charAt(e)]=e;for(t=t.toLowerCase(),e=10;e<16;++e)$n[t.charAt(e)]=e;for(e=0;e<r.length;++e)$n[r.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<n.length;++e){var a=n.charAt(e);if(a=="=")break;if(a=$n[a],a!=-1){if(a===void 0)throw new Error("Illegal character at offset "+e);o|=a,++s>=2?(i[i.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},un,Do={decode:function(n){var e;if(un===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
3
- \r  \u2028\u2029`;for(un=Object.create(null),e=0;e<64;++e)un[t.charAt(e)]=e;for(un["-"]=62,un._=63,e=0;e<r.length;++e)un[r.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<n.length;++e){var a=n.charAt(e);if(a=="=")break;if(a=un[a],a!=-1){if(a===void 0)throw new Error("Illegal character at offset "+e);o|=a,++s>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=o&255,o=0,s=0):o<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255;break}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(n){var e=Do.re.exec(n);if(e)if(e[1])n=e[1];else if(e[2])n=e[2];else throw new Error("RegExp out of sync");return Do.decode(n)}},jn=1e13,ar=function(){function n(e){this.buf=[+e||0]}return n.prototype.mulAdd=function(e,t){var r=this.buf,i=r.length,o,s;for(o=0;o<i;++o)s=r[o]*e+t,s<jn?t=0:(t=0|s/jn,s-=t*jn),r[o]=s;t>0&&(r[o]=t)},n.prototype.sub=function(e){var t=this.buf,r=t.length,i,o;for(i=0;i<r;++i)o=t[i]-e,o<0?(o+=jn,e=1):e=0,t[i]=o;for(;t[t.length-1]===0;)t.pop()},n.prototype.toString=function(e){if((e||10)!=10)throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),i=t.length-2;i>=0;--i)r+=(jn+t[i]).toString().substring(1);return r},n.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*jn+e[r];return t},n.prototype.simplify=function(){var e=this.buf;return e.length==1?e[0]:this},n}(),nh="…",a2=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,l2=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function In(n,e){return n.length>e&&(n=n.substring(0,e)+nh),n}var Wi=function(){function n(e,t){this.hexDigits="0123456789ABCDEF",e instanceof n?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=t)}return n.prototype.get=function(e){if(e===void 0&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(e):this.enc[e]},n.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(e&15)},n.prototype.hexDump=function(e,t,r){for(var i="",o=e;o<t;++o)if(i+=this.hexByte(this.get(o)),r!==!0)switch(o&15){case 7:i+=" ";break;case 15:i+=`
4
- `;break;default:i+=" "}return i},n.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},n.prototype.parseStringISO=function(e,t){for(var r="",i=e;i<t;++i)r+=String.fromCharCode(this.get(i));return r},n.prototype.parseStringUTF=function(e,t){for(var r="",i=e;i<t;){var o=this.get(i++);o<128?r+=String.fromCharCode(o):o>191&&o<224?r+=String.fromCharCode((o&31)<<6|this.get(i++)&63):r+=String.fromCharCode((o&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return r},n.prototype.parseStringBMP=function(e,t){for(var r="",i,o,s=e;s<t;)i=this.get(s++),o=this.get(s++),r+=String.fromCharCode(i<<8|o);return r},n.prototype.parseTime=function(e,t,r){var i=this.parseStringISO(e,t),o=(r?a2:l2).exec(i);return o?(r&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),i=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(i+=":"+o[5],o[6]&&(i+=":"+o[6],o[7]&&(i+="."+o[7]))),o[8]&&(i+=" UTC",o[8]!="Z"&&(i+=o[8],o[9]&&(i+=":"+o[9]))),i):"Unrecognized time: "+i},n.prototype.parseInteger=function(e,t){for(var r=this.get(e),i=r>127,o=i?255:0,s,a="";r==o&&++e<t;)r=this.get(e);if(s=t-e,s===0)return i?-1:0;if(s>4){for(a=r,s<<=3;!((+a^o)&128);)a=+a<<1,--s;a="("+s+` bit)
5
- `}i&&(r=r-256);for(var u=new ar(r),l=e+1;l<t;++l)u.mulAdd(256,this.get(l));return a+u.toString()},n.prototype.parseBitString=function(e,t,r){for(var i=this.get(e),o=(t-e-1<<3)-i,s="("+o+` bit)
6
- `,a="",u=e+1;u<t;++u){for(var l=this.get(u),c=u==t-1?i:0,h=7;h>=c;--h)a+=l>>h&1?"1":"0";if(a.length>r)return s+In(a,r)}return s+a},n.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return In(this.parseStringISO(e,t),r);var i=t-e,o="("+i+` byte)
7
- `;r/=2,i>r&&(t=e+r);for(var s=e;s<t;++s)o+=this.hexByte(this.get(s));return i>r&&(o+=nh),o},n.prototype.parseOID=function(e,t,r){for(var i="",o=new ar,s=0,a=e;a<t;++a){var u=this.get(a);if(o.mulAdd(128,u&127),s+=7,!(u&128)){if(i==="")if(o=o.simplify(),o instanceof ar)o.sub(80),i="2."+o.toString();else{var l=o<80?o<40?0:1:2;i=l+"."+(o-l*40)}else i+="."+o.toString();if(i.length>r)return In(i,r);o=new ar,s=0}}return s>0&&(i+=".incomplete"),i},n}(),u2=function(){function n(e,t,r,i,o){if(!(i instanceof rl))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=i,this.sub=o}return n.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},n.prototype.content=function(e){if(this.tag===void 0)return null;e===void 0&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return this.stream.get(t)===0?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return In(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return In(this.stream.parseStringISO(t,t+r),e);case 30:return In(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,this.tag.tagNumber==23)}return null},n.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},n.prototype.toPrettyString=function(e){e===void 0&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(t+=" (encapsulates)"),t+=`
8
- `,this.sub!==null){e+=" ";for(var r=0,i=this.sub.length;r<i;++r)t+=this.sub[r].toPrettyString(e)}return t},n.prototype.posStart=function(){return this.stream.pos},n.prototype.posContent=function(){return this.stream.pos+this.header},n.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},n.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},n.decodeLength=function(e){var t=e.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(r===0)return null;t=0;for(var i=0;i<r;++i)t=t*256+e.get();return t},n.prototype.getHexStringValue=function(){var e=this.toHexString(),t=this.header*2,r=this.length*2;return e.substr(t,r)},n.decode=function(e){var t;e instanceof Wi?t=e:t=new Wi(e,0);var r=new Wi(t),i=new rl(t),o=n.decodeLength(t),s=t.pos,a=s-r.pos,u=null,l=function(){var h=[];if(o!==null){for(var d=s+o;t.pos<d;)h[h.length]=n.decode(t);if(t.pos!=d)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var p=n.decode(t);if(p.tag.isEOC())break;h[h.length]=p}o=s-t.pos}catch(f){throw new Error("Exception while decoding undefined length content: "+f)}return h};if(i.tagConstructed)u=l();else if(i.isUniversal()&&(i.tagNumber==3||i.tagNumber==4))try{if(i.tagNumber==3&&t.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=l();for(var c=0;c<u.length;++c)if(u[c].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{u=null}if(u===null){if(o===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);t.pos=s+Math.abs(o)}return new n(r,a,o,i,u)},n}(),rl=function(){function n(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=(t&32)!==0,this.tagNumber=t&31,this.tagNumber==31){var r=new ar;do t=e.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return n.prototype.isUniversal=function(){return this.tagClass===0},n.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},n}(),Lt,c2=0xdeadbeefcafe,il=(c2&16777215)==15715070,We=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],h2=(1<<26)/We[We.length-1],oe=function(){function n(e,t,r){e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}return n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,o=!1,s="",a=this.t,u=this.DB-a*this.DB%t;if(a-- >0)for(u<this.DB&&(i=this[a]>>u)>0&&(o=!0,s=Qa(i));a>=0;)u<t?(i=(this[a]&(1<<u)-1)<<t-u,i|=this[--a]>>(u+=this.DB-t)):(i=this[a]>>(u-=t)&r,u<=0&&(u+=this.DB,--a)),i>0&&(o=!0),o&&(s+=Qa(i));return o?s:"0"},n.prototype.negate=function(){var e=ue();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Cr(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=ue();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var r;return e<256||t.isEven()?r=new ol(t):r=new sl(t),this.exp(e,r)},n.prototype.clone=function(){var e=ue();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r=this.DB-e*this.DB%8,i,o=0;if(e-- >0)for(r<this.DB&&(i=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=i|this.s<<this.DB-r);e>=0;)r<8?(i=(this[e]&(1<<r)-1)<<8-r,i|=this[--e]>>(r+=this.DB-8)):(i=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),i&128&&(i|=-256),o==0&&(this.s&128)!=(i&128)&&++o,(o>0||i!=this.s)&&(t[o++]=i);return t},n.prototype.equals=function(e){return this.compareTo(e)==0},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=ue();return this.bitwiseTo(e,n2,t),t},n.prototype.or=function(e){var t=ue();return this.bitwiseTo(e,Br,t),t},n.prototype.xor=function(e){var t=ue();return this.bitwiseTo(e,el,t),t},n.prototype.andNot=function(e){var t=ue();return this.bitwiseTo(e,tl,t),t},n.prototype.not=function(){for(var e=ue(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=ue();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=ue();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+r2(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=i2(this[r]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0},n.prototype.setBit=function(e){return this.changeBit(e,Br)},n.prototype.clearBit=function(e){return this.changeBit(e,tl)},n.prototype.flipBit=function(e){return this.changeBit(e,el)},n.prototype.add=function(e){var t=ue();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=ue();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=ue();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=ue();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=ue();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=ue(),r=ue();return this.divRemTo(e,t,r),[t,r]},n.prototype.modPow=function(e,t){var r=e.bitLength(),i,o=Ht(1),s;if(r<=0)return o;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?s=new ol(t):t.isEven()?s=new p2(t):s=new sl(t);var a=[],u=3,l=i-1,c=(1<<i)-1;if(a[1]=s.convert(this),i>1){var h=ue();for(s.sqrTo(a[1],h);u<=c;)a[u]=ue(),s.mulTo(h,a[u-2],a[u]),u+=2}var d=e.t-1,p,f=!0,v=ue(),y;for(r=Cr(e[d])-1;d>=0;){for(r>=l?p=e[d]>>r-l&c:(p=(e[d]&(1<<r+1)-1)<<l-r,d>0&&(p|=e[d-1]>>this.DB+r-l)),u=i;!(p&1);)p>>=1,--u;if((r-=u)<0&&(r+=this.DB,--d),f)a[p].copyTo(o),f=!1;else{for(;u>1;)s.sqrTo(o,v),s.sqrTo(v,o),u-=2;u>0?s.sqrTo(o,v):(y=o,o=v,v=y),s.mulTo(v,a[p],o)}for(;d>=0&&!(e[d]&1<<r);)s.sqrTo(o,v),y=o,o=v,v=y,--r<0&&(r=this.DB-1,--d)}return s.revert(o)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return n.ZERO;for(var r=e.clone(),i=this.clone(),o=Ht(1),s=Ht(0),a=Ht(0),u=Ht(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(e,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),t&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),t&&a.subTo(o,a),u.subTo(s,u))}if(i.compareTo(n.ONE)!=0)return n.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;return u.signum()<0?u.add(e):u},n.prototype.pow=function(e){return this.exp(e,new d2)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var o=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;for(o<s&&(s=o),s>0&&(t.rShiftTo(s,t),r.rShiftTo(s,r));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},n.prototype.isProbablePrime=function(e){var t,r=this.abs();if(r.t==1&&r[0]<=We[We.length-1]){for(t=0;t<We.length;++t)if(r[0]==We[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<We.length;){for(var i=We[t],o=t+1;o<We.length&&i<h2;)i*=We[o++];for(i=r.modInt(i);t<o;)if(i%We[t++]==0)return!1}return r.millerRabin(e)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=r==8?+e[i]&255:ll(e,i);if(a<0){e.charAt(i)=="-"&&(o=!0);continue}o=!1,s==0?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,s+=r,s>=this.DB&&(s-=this.DB)}r==8&&+e[0]&128&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM,u=this.t-1;u>=0;--u)t[u+s+1]=this[u]>>i|a,a=(this[u]&o)<<r;for(var u=s-1;u>=0;--u)t[u]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB,o=this.DB-i,s=(1<<i)-1;t[0]=this[r]>>i;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&s)<<o,t[a-r]=this[a]>>i;i>0&&(t[this.t-r-1]|=(this.s&s)<<o),t.t=this.t-r,t.clamp()},n.prototype.subTo=function(e,t){for(var r=0,i=0,o=Math.min(e.t,this.t);r<o;)i+=this[r]-e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i-=e[r],t[r++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+r.t]=r.am(0,i[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ue());var s=ue(),a=this.s,u=e.s,l=this.DB-Cr(i[i.t-1]);l>0?(i.lShiftTo(l,s),o.lShiftTo(l,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,h=s[c-1];if(h!=0){var d=h*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),p=this.FV/d,f=(1<<this.F1)/d,v=1<<this.F2,y=r.t,$=y-c,g=t??ue();for(s.dlShiftTo($,g),r.compareTo(g)>=0&&(r[r.t++]=1,r.subTo(g,r)),n.ONE.dlShiftTo(c,g),g.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--$>=0;){var w=r[--y]==h?this.DM:Math.floor(r[y]*p+(r[y-1]+v)*f);if((r[y]+=s.am(0,w,r,$,0,c))<w)for(s.dlShiftTo($,g),r.subTo(g,r);r[y]<--w;)r.subTo(g,r)}t!=null&&(r.drShiftTo(c,t),a!=u&&n.ZERO.subTo(t,t)),r.t=c,r.clamp(),l>0&&r.rShiftTo(l,r),a<0&&n.ZERO.subTo(r,r)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t},n.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var r=ue(),i=ue(),o=t.convert(this),s=Cr(e)-1;for(o.copyTo(r);--s>=0;)if(t.sqrTo(r,i),(e&1<<s)>0)t.mulTo(i,o,r);else{var a=r;r=i,i=a}return t.revert(r)},n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=Ht(r),o=ue(),s=ue(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},n.prototype.fromRadix=function(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,s=0,a=0,u=0;u<e.length;++u){var l=ll(e,u);if(l<0){e.charAt(u)=="-"&&this.signum()==0&&(o=!0);continue}a=t*a+l,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0)}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),Br,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var i=[],o=e&7;i.length=(e>>3)+1,t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(e,t,r){var i,o,s=Math.min(e.t,this.t);for(i=0;i<s;++i)r[i]=t(this[i],e[i]);if(e.t<this.t){for(o=e.s&this.DM,i=s;i<this.t;++i)r[i]=t(this[i],o);r.t=this.t}else{for(o=this.s&this.DM,i=s;i<e.t;++i)r[i]=t(o,e[i]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var r=0,i=0,o=Math.min(e.t,this.t);r<o;)i+=this[r]+e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i+=e[r],t[r++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var o=r.t-this.t;i<o;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(var o=Math.min(e.t,t);i<o;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()},n.prototype.multiplyUpperTo=function(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>We.length&&(e=We.length);for(var o=ue(),s=0;s<e;++s){o.fromInt(We[Math.floor(Math.random()*We.length)]);var a=o.modPow(i,this);if(a.compareTo(n.ONE)!=0&&a.compareTo(t)!=0){for(var u=1;u++<r&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(n.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0},n.prototype.square=function(){var e=ue();return this.squareTo(e),e},n.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(r.compareTo(i)<0){var o=r;r=i,i=o}var s=r.getLowestSetBit(),a=i.getLowestSetBit();if(a<0){t(r);return}s<a&&(a=s),a>0&&(r.rShiftTo(a,r),i.rShiftTo(a,i));var u=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(u,0):(a>0&&i.lShiftTo(a,i),setTimeout(function(){t(i)},0))};setTimeout(u,10)},n.prototype.fromNumberAsync=function(e,t,r,i){if(typeof t=="number")if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),Br,this),this.isEven()&&this.dAddOffset(1,0);var o=this,s=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(n.ONE.shiftLeft(e-1),o),o.isProbablePrime(t)?setTimeout(function(){i()},0):setTimeout(s,0)};setTimeout(s,0)}else{var a=[],u=e&7;a.length=(e>>3)+1,t.nextBytes(a),u>0?a[0]&=(1<<u)-1:a[0]=0,this.fromString(a,256)}},n}(),d2=function(){function n(){}return n.prototype.convert=function(e){return e},n.prototype.revert=function(e){return e},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},n.prototype.sqrTo=function(e,t){e.squareTo(t)},n}(),ol=function(){function n(e){this.m=e}return n.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}(),sl=function(){function n(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return n.prototype.convert=function(e){var t=ue();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(oe.ZERO)>0&&this.m.subTo(t,t),t},n.prototype.revert=function(e){var t=ue();return e.copyTo(t),this.reduce(t),t},n.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}(),p2=function(){function n(e){this.m=e,this.r2=ue(),this.q3=ue(),oe.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return n.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ue();return e.copyTo(t),this.reduce(t),t},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}();function ue(){return new oe(null)}function Te(n,e){return new oe(n,e)}var al=typeof navigator<"u";al&&il&&navigator.appName=="Microsoft Internet Explorer"?(oe.prototype.am=function(n,e,t,r,i,o){for(var s=e&32767,a=e>>15;--o>=0;){var u=this[n]&32767,l=this[n++]>>15,c=a*u+l*s;u=s*u+((c&32767)<<15)+t[r]+(i&1073741823),i=(u>>>30)+(c>>>15)+a*l+(i>>>30),t[r++]=u&1073741823}return i},Lt=30):al&&il&&navigator.appName!="Netscape"?(oe.prototype.am=function(n,e,t,r,i,o){for(;--o>=0;){var s=e*this[n++]+t[r]+i;i=Math.floor(s/67108864),t[r++]=s&67108863}return i},Lt=26):(oe.prototype.am=function(n,e,t,r,i,o){for(var s=e&16383,a=e>>14;--o>=0;){var u=this[n]&16383,l=this[n++]>>14,c=a*u+l*s;u=s*u+((c&16383)<<14)+t[r]+i,i=(u>>28)+(c>>14)+a*l,t[r++]=u&268435455}return i},Lt=28),oe.prototype.DB=Lt,oe.prototype.DM=(1<<Lt)-1,oe.prototype.DV=1<<Lt;var Ji=52;oe.prototype.FV=Math.pow(2,Ji),oe.prototype.F1=Ji-Lt,oe.prototype.F2=2*Lt-Ji;var Ti=[],Pn,st;for(Pn=48,st=0;st<=9;++st)Ti[Pn++]=st;for(Pn=97,st=10;st<36;++st)Ti[Pn++]=st;for(Pn=65,st=10;st<36;++st)Ti[Pn++]=st;function ll(n,e){var t=Ti[n.charCodeAt(e)];return t??-1}function Ht(n){var e=ue();return e.fromInt(n),e}function Cr(n){var e=1,t;return(t=n>>>16)!=0&&(n=t,e+=16),(t=n>>8)!=0&&(n=t,e+=8),(t=n>>4)!=0&&(n=t,e+=4),(t=n>>2)!=0&&(n=t,e+=2),(t=n>>1)!=0&&(n=t,e+=1),e}oe.ZERO=Ht(0),oe.ONE=Ht(1);var f2=function(){function n(){this.i=0,this.j=0,this.S=[]}return n.prototype.init=function(e){var t,r,i;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[r],this.S[r]=i;this.i=0,this.j=0},n.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},n}();function m2(){return new f2}var rh=256,Ir,Yt=null,pt;if(Yt==null){Yt=[],pt=0;var Rr=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Yi=new Uint32Array(256);for(window.crypto.getRandomValues(Yi),Rr=0;Rr<Yi.length;++Rr)Yt[pt++]=Yi[Rr]&255}var Mr=0,Nr=function(n){if(Mr=Mr||0,Mr>=256||pt>=rh){window.removeEventListener?window.removeEventListener("mousemove",Nr,!1):window.detachEvent&&window.detachEvent("onmousemove",Nr);return}try{var e=n.x+n.y;Yt[pt++]=e&255,Mr+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Nr,!1):window.attachEvent&&window.attachEvent("onmousemove",Nr))}function v2(){if(Ir==null){for(Ir=m2();pt<rh;){var n=Math.floor(65536*Math.random());Yt[pt++]=n&255}for(Ir.init(Yt),pt=0;pt<Yt.length;++pt)Yt[pt]=0;pt=0}return Ir.next()}var Oo=function(){function n(){}return n.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=v2()},n}();function g2(n,e){if(e<n.length+22)return console.error("Message too long for RSA"),null;for(var t=e-n.length-6,r="",i=0;i<t;i+=2)r+="ff";var o="0001"+r+"00"+n;return Te(o,16)}function y2(n,e){if(e<n.length+11)return console.error("Message too long for RSA"),null;for(var t=[],r=n.length-1;r>=0&&e>0;){var i=n.charCodeAt(r--);i<128?t[--e]=i:i>127&&i<2048?(t[--e]=i&63|128,t[--e]=i>>6|192):(t[--e]=i&63|128,t[--e]=i>>6&63|128,t[--e]=i>>12|224)}t[--e]=0;for(var o=new Oo,s=[];e>2;){for(s[0]=0;s[0]==0;)o.nextBytes(s);t[--e]=s[0]}return t[--e]=2,t[--e]=0,new oe(t)}var b2=function(){function n(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return n.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},n.prototype.doPrivate=function(e){if(this.p==null||this.q==null)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},n.prototype.setPublic=function(e,t){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Te(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},n.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,r=y2(e,t);if(r==null)return null;var i=this.doPublic(r);if(i==null)return null;for(var o=i.toString(16),s=o.length,a=0;a<t*2-s;a++)o="0"+o;return o},n.prototype.setPrivate=function(e,t,r){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Te(e,16),this.e=parseInt(t,16),this.d=Te(r,16)):console.error("Invalid RSA private key")},n.prototype.setPrivateEx=function(e,t,r,i,o,s,a,u){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Te(e,16),this.e=parseInt(t,16),this.d=Te(r,16),this.p=Te(i,16),this.q=Te(o,16),this.dmp1=Te(s,16),this.dmq1=Te(a,16),this.coeff=Te(u,16)):console.error("Invalid RSA private key")},n.prototype.generate=function(e,t){var r=new Oo,i=e>>1;this.e=parseInt(t,16);for(var o=new oe(t,16);;){for(;this.p=new oe(e-i,1,r),!(this.p.subtract(oe.ONE).gcd(o).compareTo(oe.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new oe(i,1,r),!(this.q.subtract(oe.ONE).gcd(o).compareTo(oe.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(oe.ONE),u=this.q.subtract(oe.ONE),l=a.multiply(u);if(l.gcd(o).compareTo(oe.ONE)==0){this.n=this.p.multiply(this.q),this.d=o.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},n.prototype.decrypt=function(e){var t=Te(e,16),r=this.doPrivate(t);return r==null?null:w2(r,this.n.bitLength()+7>>3)},n.prototype.generateAsync=function(e,t,r){var i=new Oo,o=e>>1;this.e=parseInt(t,16);var s=new oe(t,16),a=this,u=function(){var l=function(){if(a.p.compareTo(a.q)<=0){var d=a.p;a.p=a.q,a.q=d}var p=a.p.subtract(oe.ONE),f=a.q.subtract(oe.ONE),v=p.multiply(f);v.gcd(s).compareTo(oe.ONE)==0?(a.n=a.p.multiply(a.q),a.d=s.modInverse(v),a.dmp1=a.d.mod(p),a.dmq1=a.d.mod(f),a.coeff=a.q.modInverse(a.p),setTimeout(function(){r()},0)):setTimeout(u,0)},c=function(){a.q=ue(),a.q.fromNumberAsync(o,1,i,function(){a.q.subtract(oe.ONE).gcda(s,function(d){d.compareTo(oe.ONE)==0&&a.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)})})},h=function(){a.p=ue(),a.p.fromNumberAsync(e-o,1,i,function(){a.p.subtract(oe.ONE).gcda(s,function(d){d.compareTo(oe.ONE)==0&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(h,0)})})};setTimeout(h,0)};setTimeout(u,0)},n.prototype.sign=function(e,t,r){var i=_2(r),o=i+t(e).toString(),s=g2(o,this.n.bitLength()/4);if(s==null)return null;var a=this.doPrivate(s);if(a==null)return null;var u=a.toString(16);return u.length&1?"0"+u:u},n.prototype.verify=function(e,t,r){var i=Te(t,16),o=this.doPublic(i);if(o==null)return null;var s=o.toString(16).replace(/^1f+00/,""),a=x2(s);return a==r(e).toString()},n}();function w2(n,e){for(var t=n.toByteArray(),r=0;r<t.length&&t[r]==0;)++r;if(t.length-r!=e-1||t[r]!=2)return null;for(++r;t[r]!=0;)if(++r>=t.length)return null;for(var i="";++r<t.length;){var o=t[r]&255;o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((o&31)<<6|t[r+1]&63),++r):(i+=String.fromCharCode((o&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return i}var Qr={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function _2(n){return Qr[n]||""}function x2(n){for(var e in Qr)if(Qr.hasOwnProperty(e)){var t=Qr[e],r=t.length;if(n.substr(0,r)==t)return n.substr(r)}return n}/*!
9
- Copyright (c) 2011, Yahoo! Inc. All rights reserved.
10
- Code licensed under the BSD License:
11
- http://developer.yahoo.com/yui/license.html
12
- version: 2.9.0
13
- */var De={};De.lang={extend:function(n,e,t){if(!e||!n)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,n.prototype=new r,n.prototype.constructor=n,n.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),t){var i;for(i in t)n.prototype[i]=t[i];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(a,u){for(i=0;i<s.length;i=i+1){var l=s[i],c=u[l];typeof c=="function"&&c!=Object.prototype[l]&&(a[l]=c)}})}catch{}o(n.prototype,t)}}};/**
14
- * @fileOverview
15
- * @name asn1-1.0.js
16
- * @author Kenji Urushima kenji.urushima@gmail.com
17
- * @version asn1 1.0.13 (2017-Jun-02)
18
- * @since jsrsasign 2.1
19
- * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
20
- */var Y={};(typeof Y.asn1>"u"||!Y.asn1)&&(Y.asn1={}),Y.asn1.ASN1Util=new function(){this.integerToByteHex=function(n){var e=n.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(n){var e=n.toString(16);if(e.substr(0,1)!="-")e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var t=e.substr(1),r=t.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;o<r;o++)i+="f";var s=new oe(i,16),a=s.xor(n).add(oe.ONE);e=a.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(n,e){return hextopem(n,e)},this.newObject=function(n){var e=Y,t=e.asn1,r=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,s=t.DEROctetString,a=t.DERNull,u=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,h=t.DERNumericString,d=t.DERPrintableString,p=t.DERTeletexString,f=t.DERIA5String,v=t.DERUTCTime,y=t.DERGeneralizedTime,$=t.DERSequence,g=t.DERSet,w=t.DERTaggedObject,_=t.ASN1Util.newObject,x=Object.keys(n);if(x.length!=1)throw"key of param shall be only one.";var b=x[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+b+":")==-1)throw"undefined key: "+b;if(b=="bool")return new r(n[b]);if(b=="int")return new i(n[b]);if(b=="bitstr")return new o(n[b]);if(b=="octstr")return new s(n[b]);if(b=="null")return new a(n[b]);if(b=="oid")return new u(n[b]);if(b=="enum")return new l(n[b]);if(b=="utf8str")return new c(n[b]);if(b=="numstr")return new h(n[b]);if(b=="prnstr")return new d(n[b]);if(b=="telstr")return new p(n[b]);if(b=="ia5str")return new f(n[b]);if(b=="utctime")return new v(n[b]);if(b=="gentime")return new y(n[b]);if(b=="seq"){for(var E=n[b],O=[],H=0;H<E.length;H++){var S=_(E[H]);O.push(S)}return new $({array:O})}if(b=="set"){for(var E=n[b],O=[],H=0;H<E.length;H++){var S=_(E[H]);O.push(S)}return new g({array:O})}if(b=="tag"){var j=n[b];if(Object.prototype.toString.call(j)==="[object Array]"&&j.length==3){var N=_(j[2]);return new w({tag:j[0],explicit:j[1],obj:N})}else{var V={};if(j.explicit!==void 0&&(V.explicit=j.explicit),j.tag!==void 0&&(V.tag=j.tag),j.obj===void 0)throw"obj shall be specified for 'tag'.";return V.obj=_(j.obj),new w(V)}}},this.jsonToASN1HEX=function(n){var e=this.newObject(n);return e.getEncodedHex()}},Y.asn1.ASN1Util.oidHexToInt=function(n){for(var i="",e=parseInt(n.substr(0,2),16),t=Math.floor(e/40),r=e%40,i=t+"."+r,o="",s=2;s<n.length;s+=2){var a=parseInt(n.substr(s,2),16),u=("00000000"+a.toString(2)).slice(-8);if(o=o+u.substr(1,7),u.substr(0,1)=="0"){var l=new oe(o,2);i=i+"."+l.toString(10),o=""}}return i},Y.asn1.ASN1Util.oidIntToHex=function(n){var e=function(a){var u=a.toString(16);return u.length==1&&(u="0"+u),u},t=function(a){var u="",l=new oe(a,10),c=l.toString(2),h=7-c.length%7;h==7&&(h=0);for(var d="",p=0;p<h;p++)d+="0";c=d+c;for(var p=0;p<c.length-1;p+=7){var f=c.substr(p,7);p!=c.length-7&&(f="1"+f),u+=e(parseInt(f,2))}return u};if(!n.match(/^[0-9.]+$/))throw"malformed oid string: "+n;var r="",i=n.split("."),o=parseInt(i[0])*40+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=t(i[s]);return r},Y.asn1.ASN1Object=function(){var n="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+n.length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var i=128+r;return i.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},Y.asn1.DERAbstractString=function(n){Y.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"?this.setString(n):typeof n.str<"u"?this.setString(n.str):typeof n.hex<"u"&&this.setStringHex(n.hex))},De.lang.extend(Y.asn1.DERAbstractString,Y.asn1.ASN1Object),Y.asn1.DERAbstractTime=function(n){Y.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){utc=e.getTime()+e.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(e,t,r){var i=this.zeroPadding,o=this.localDateToUTC(e),s=String(o.getFullYear());t=="utc"&&(s=s.substr(2,2));var a=i(String(o.getMonth()+1),2),u=i(String(o.getDate()),2),l=i(String(o.getHours()),2),c=i(String(o.getMinutes()),2),h=i(String(o.getSeconds()),2),d=s+a+u+l+c+h;if(r===!0){var p=o.getMilliseconds();if(p!=0){var f=i(String(p),3);f=f.replace(/[0]+$/,""),d=d+"."+f}}return d+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,i,o,s){var a=new Date(Date.UTC(e,t-1,r,i,o,s,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},De.lang.extend(Y.asn1.DERAbstractTime,Y.asn1.ASN1Object),Y.asn1.DERAbstractStructured=function(n){Y.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,typeof n<"u"&&typeof n.array<"u"&&(this.asn1Array=n.array)},De.lang.extend(Y.asn1.DERAbstractStructured,Y.asn1.ASN1Object),Y.asn1.DERBoolean=function(){Y.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},De.lang.extend(Y.asn1.DERBoolean,Y.asn1.ASN1Object),Y.asn1.DERInteger=function(n){Y.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Y.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new oe(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.bigint<"u"?this.setByBigInteger(n.bigint):typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))},De.lang.extend(Y.asn1.DERInteger,Y.asn1.ASN1Object),Y.asn1.DERBitString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=Y.asn1.ASN1Util.newObject(n.obj);n.hex="00"+e.getEncodedHex()}Y.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var i=0;i<=r;i++)t+="0";for(var o="",i=0;i<t.length-1;i+=8){var s=t.substr(i,8),a=parseInt(s,2).toString(16);a.length==1&&(a="0"+a),o+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+r+o},this.setByBooleanArray=function(t){for(var r="",i=0;i<t.length;i++)t[i]==!0?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(t){for(var r=new Array(t),i=0;i<t;i++)r[i]=!1;return r},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"&&n.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(n):typeof n.hex<"u"?this.setHexValueIncludingUnusedBits(n.hex):typeof n.bin<"u"?this.setByBinaryString(n.bin):typeof n.array<"u"&&this.setByBooleanArray(n.array))},De.lang.extend(Y.asn1.DERBitString,Y.asn1.ASN1Object),Y.asn1.DEROctetString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=Y.asn1.ASN1Util.newObject(n.obj);n.hex=e.getEncodedHex()}Y.asn1.DEROctetString.superclass.constructor.call(this,n),this.hT="04"},De.lang.extend(Y.asn1.DEROctetString,Y.asn1.DERAbstractString),Y.asn1.DERNull=function(){Y.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},De.lang.extend(Y.asn1.DERNull,Y.asn1.ASN1Object),Y.asn1.DERObjectIdentifier=function(n){var e=function(r){var i=r.toString(16);return i.length==1&&(i="0"+i),i},t=function(r){var i="",o=new oe(r,10),s=o.toString(2),a=7-s.length%7;a==7&&(a=0);for(var u="",l=0;l<a;l++)u+="0";s=u+s;for(var l=0;l<s.length-1;l+=7){var c=s.substr(l,7);l!=s.length-7&&(c="1"+c),i+=e(parseInt(c,2))}return i};Y.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",o=r.split("."),s=parseInt(o[0])*40+parseInt(o[1]);i+=e(s),o.splice(0,2);for(var a=0;a<o.length;a++)i+=t(o[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(r){var i=Y.asn1.x509.OID.name2oid(r);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},n!==void 0&&(typeof n=="string"?n.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(n):this.setValueName(n):n.oid!==void 0?this.setValueOidString(n.oid):n.hex!==void 0?this.setValueHex(n.hex):n.name!==void 0&&this.setValueName(n.name))},De.lang.extend(Y.asn1.DERObjectIdentifier,Y.asn1.ASN1Object),Y.asn1.DEREnumerated=function(n){Y.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Y.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new oe(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))},De.lang.extend(Y.asn1.DEREnumerated,Y.asn1.ASN1Object),Y.asn1.DERUTF8String=function(n){Y.asn1.DERUTF8String.superclass.constructor.call(this,n),this.hT="0c"},De.lang.extend(Y.asn1.DERUTF8String,Y.asn1.DERAbstractString),Y.asn1.DERNumericString=function(n){Y.asn1.DERNumericString.superclass.constructor.call(this,n),this.hT="12"},De.lang.extend(Y.asn1.DERNumericString,Y.asn1.DERAbstractString),Y.asn1.DERPrintableString=function(n){Y.asn1.DERPrintableString.superclass.constructor.call(this,n),this.hT="13"},De.lang.extend(Y.asn1.DERPrintableString,Y.asn1.DERAbstractString),Y.asn1.DERTeletexString=function(n){Y.asn1.DERTeletexString.superclass.constructor.call(this,n),this.hT="14"},De.lang.extend(Y.asn1.DERTeletexString,Y.asn1.DERAbstractString),Y.asn1.DERIA5String=function(n){Y.asn1.DERIA5String.superclass.constructor.call(this,n),this.hT="16"},De.lang.extend(Y.asn1.DERIA5String,Y.asn1.DERAbstractString),Y.asn1.DERUTCTime=function(n){Y.asn1.DERUTCTime.superclass.constructor.call(this,n),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{12}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date))},De.lang.extend(Y.asn1.DERUTCTime,Y.asn1.DERAbstractTime),Y.asn1.DERGeneralizedTime=function(n){Y.asn1.DERGeneralizedTime.superclass.constructor.call(this,n),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{14}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date),n.millis===!0&&(this.withMillis=!0))},De.lang.extend(Y.asn1.DERGeneralizedTime,Y.asn1.DERAbstractTime),Y.asn1.DERSequence=function(n){Y.asn1.DERSequence.superclass.constructor.call(this,n),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e+=r.getEncodedHex()}return this.hV=e,this.hV}},De.lang.extend(Y.asn1.DERSequence,Y.asn1.DERAbstractStructured),Y.asn1.DERSet=function(n){Y.asn1.DERSet.superclass.constructor.call(this,n),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return this.sortFlag==!0&&e.sort(),this.hV=e.join(""),this.hV},typeof n<"u"&&typeof n.sortflag<"u"&&n.sortflag==!1&&(this.sortFlag=!1)},De.lang.extend(Y.asn1.DERSet,Y.asn1.DERAbstractStructured),Y.asn1.DERTaggedObject=function(n){Y.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.tag<"u"&&(this.hT=n.tag),typeof n.explicit<"u"&&(this.isExplicit=n.explicit),typeof n.obj<"u"&&(this.asn1Object=n.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},De.lang.extend(Y.asn1.DERTaggedObject,Y.asn1.ASN1Object);var S2=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();(function(n){S2(e,n);function e(t){var r=n.call(this)||this;return t&&(typeof t=="string"?r.parseKey(t):(e.hasPrivateKeyProperty(t)||e.hasPublicKeyProperty(t))&&r.parsePropertiesFrom(t)),r}return e.prototype.parseKey=function(t){try{var r=0,i=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,s=o.test(t)?s2.decode(t):Do.unarmor(t),a=u2.decode(s);if(a.sub.length===3&&(a=a.sub[2].sub[0]),a.sub.length===9){r=a.sub[1].getHexStringValue(),this.n=Te(r,16),i=a.sub[2].getHexStringValue(),this.e=parseInt(i,16);var u=a.sub[3].getHexStringValue();this.d=Te(u,16);var l=a.sub[4].getHexStringValue();this.p=Te(l,16);var c=a.sub[5].getHexStringValue();this.q=Te(c,16);var h=a.sub[6].getHexStringValue();this.dmp1=Te(h,16);var d=a.sub[7].getHexStringValue();this.dmq1=Te(d,16);var p=a.sub[8].getHexStringValue();this.coeff=Te(p,16)}else if(a.sub.length===2)if(a.sub[0].sub){var f=a.sub[1],v=f.sub[0];r=v.sub[0].getHexStringValue(),this.n=Te(r,16),i=v.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=a.sub[0].getHexStringValue(),this.n=Te(r,16),i=a.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new Y.asn1.DERInteger({int:0}),new Y.asn1.DERInteger({bigint:this.n}),new Y.asn1.DERInteger({int:this.e}),new Y.asn1.DERInteger({bigint:this.d}),new Y.asn1.DERInteger({bigint:this.p}),new Y.asn1.DERInteger({bigint:this.q}),new Y.asn1.DERInteger({bigint:this.dmp1}),new Y.asn1.DERInteger({bigint:this.dmq1}),new Y.asn1.DERInteger({bigint:this.coeff})]},r=new Y.asn1.DERSequence(t);return r.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return nl(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new Y.asn1.DERSequence({array:[new Y.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Y.asn1.DERNull]}),r=new Y.asn1.DERSequence({array:[new Y.asn1.DERInteger({bigint:this.n}),new Y.asn1.DERInteger({int:this.e})]}),i=new Y.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new Y.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return nl(this.getPublicBaseKey())},e.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
21
- ?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
22
- `)},e.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
23
- `;return t+=e.wordwrap(this.getPrivateBaseKeyB64())+`
24
- `,t+="-----END RSA PRIVATE KEY-----",t},e.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
25
- `;return t+=e.wordwrap(this.getPublicBaseKeyB64())+`
26
- `,t+="-----END PUBLIC KEY-----",t},e.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e})(b2);var Ki;typeof process<"u"&&((Ki=Qf)===null||Ki===void 0||Ki.npm_package_version);var ih={exports:{}};/*! @preserve
27
- * numeral.js
28
- * version : 2.0.6
29
- * author : Adam Draper
30
- * license : MIT
31
- * http://adamwdraper.github.com/Numeral-js/
32
- */(function(n){(function(e,t){n.exports?n.exports=t():e.numeral=t()})(Ke,function(){var e,t,r="2.0.6",i={},o={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},a={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(l,c){this._input=l,this._value=c}return e=function(l){var c,h,d,p;if(e.isNumeral(l))c=l.value();else if(l===0||typeof l>"u")c=0;else if(l===null||t.isNaN(l))c=null;else if(typeof l=="string")if(a.zeroFormat&&l===a.zeroFormat)c=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)c=null;else{for(h in i)if(p=typeof i[h].regexps.unformat=="function"?i[h].regexps.unformat():i[h].regexps.unformat,p&&l.match(p)){d=i[h].unformat;break}d=d||e._.stringToNumber,c=d(l)}else c=Number(l)||null;return new u(l,c)},e.version=r,e.isNumeral=function(l){return l instanceof u},e._=t={numberToFormat:function(l,c,h){var d=o[e.options.currentLocale],p=!1,f=!1,v=0,y="",$=1e12,g=1e9,w=1e6,_=1e3,x="",b=!1,E,O,H,S,j,N,V;if(l=l||0,O=Math.abs(l),e._.includes(c,"(")?(p=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(j=e._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(E=c.match(/a(k|m|b|t)?/),E=E?E[1]:!1,e._.includes(c," a")&&(y=" "),c=c.replace(new RegExp(y+"a[kmbt]?"),""),O>=$&&!E||E==="t"?(y+=d.abbreviations.trillion,l=l/$):O<$&&O>=g&&!E||E==="b"?(y+=d.abbreviations.billion,l=l/g):O<g&&O>=w&&!E||E==="m"?(y+=d.abbreviations.million,l=l/w):(O<w&&O>=_&&!E||E==="k")&&(y+=d.abbreviations.thousand,l=l/_)),e._.includes(c,"[.]")&&(f=!0,c=c.replace("[.]",".")),H=l.toString().split(".")[0],S=c.split(".")[1],N=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,S?(e._.includes(S,"[")?(S=S.replace("]",""),S=S.split("["),x=e._.toFixed(l,S[0].length+S[1].length,h,S[1].length)):x=e._.toFixed(l,S.length,h),H=x.split(".")[0],e._.includes(x,".")?x=d.delimiters.decimal+x.split(".")[1]:x="",f&&Number(x.slice(1))===0&&(x="")):H=e._.toFixed(l,0,h),y&&!E&&Number(H)>=1e3&&y!==d.abbreviations.trillion)switch(H=String(Number(H)/1e3),y){case d.abbreviations.thousand:y=d.abbreviations.million;break;case d.abbreviations.million:y=d.abbreviations.billion;break;case d.abbreviations.billion:y=d.abbreviations.trillion;break}if(e._.includes(H,"-")&&(H=H.slice(1),b=!0),H.length<v)for(var z=v-H.length;z>0;z--)H="0"+H;return N>-1&&(H=H.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),c.indexOf(".")===0&&(H=""),V=H+x+(y||""),p?V=(p&&b?"(":"")+V+(p&&b?")":""):j>=0?V=j===0?(b?"-":"+")+V:V+(b?"-":"+"):b&&(V="-"+V),V},stringToNumber:function(l){var c=o[a.currentLocale],h=l,d={thousand:3,million:6,billion:9,trillion:12},p,f,v;if(a.zeroFormat&&l===a.zeroFormat)f=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)f=null;else{f=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(p in d)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[p]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),h.match(v)){f*=Math.pow(10,d[p]);break}f*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),f*=Number(l)}return f},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,h){return l.slice(0,h)+c+l.slice(h)},reduce:function(l,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var h=Object(l),d=h.length>>>0,p=0,f;if(arguments.length===3)f=arguments[2];else{for(;p<d&&!(p in h);)p++;if(p>=d)throw new TypeError("Reduce of empty array with no initial value");f=h[p++]}for(;p<d;p++)p in h&&(f=c(f,h[p],p,h));return f},multiplier:function(l){var c=l.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var l=Array.prototype.slice.call(arguments);return l.reduce(function(c,h){var d=t.multiplier(h);return c>d?c:d},1)},toFixed:function(l,c,h,d){var p=l.toString().split("."),f=c-(d||0),v,y,$,g;return p.length===2?v=Math.min(Math.max(p[1].length,f),c):v=f,$=Math.pow(10,v),g=(h(l+"e+"+v)/$).toFixed(v),d>c-v&&(y=new RegExp("\\.?0{1,"+(d-(c-v))+"}$"),g=g.replace(y,"")),g}},e.options=a,e.formats=i,e.locales=o,e.locale=function(l){return l&&(a.currentLocale=l.toLowerCase()),a.currentLocale},e.localeData=function(l){if(!l)return o[a.currentLocale];if(l=l.toLowerCase(),!o[l])throw new Error("Unknown locale : "+l);return o[l]},e.reset=function(){for(var l in s)a[l]=s[l]},e.zeroFormat=function(l){a.zeroFormat=typeof l=="string"?l:null},e.nullFormat=function(l){a.nullFormat=typeof l=="string"?l:null},e.defaultFormat=function(l){a.defaultFormat=typeof l=="string"?l:"0.0"},e.register=function(l,c,h){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=h,h},e.validate=function(l,c){var h,d,p,f,v,y,$,g;if(typeof l!="string"&&(l+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",l)),l=l.trim(),l.match(/^\d+$/))return!0;if(l==="")return!1;try{$=e.localeData(c)}catch{$=e.localeData(e.locale())}return p=$.currency.symbol,v=$.abbreviations,h=$.delimiters.decimal,$.delimiters.thousands==="."?d="\\.":d=$.delimiters.thousands,g=l.match(/^[^\d]+/),g!==null&&(l=l.substr(1),g[0]!==p)||(g=l.match(/[^\d]+$/),g!==null&&(l=l.slice(0,-1),g[0]!==v.thousand&&g[0]!==v.million&&g[0]!==v.billion&&g[0]!==v.trillion))?!1:(y=new RegExp(d+"{2}"),l.match(/[^\d.,]/g)?!1:(f=l.split(h),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(y):f[0].length===1?!!f[0].match(/^\d+$/)&&!f[0].match(y)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(y)&&!!f[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(l,c){var h=this._value,d=l||a.defaultFormat,p,f,v;if(c=c||Math.round,h===0&&a.zeroFormat!==null)f=a.zeroFormat;else if(h===null&&a.nullFormat!==null)f=a.nullFormat;else{for(p in i)if(d.match(i[p].regexps.format)){v=i[p].format;break}v=v||e._.numberToFormat,f=v(h,d,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(l){return this._value=Number(l),this},add:function(l){var c=t.correctionFactor.call(null,this._value,l);function h(d,p,f,v){return d+Math.round(c*p)}return this._value=t.reduce([this._value,l],h,0)/c,this},subtract:function(l){var c=t.correctionFactor.call(null,this._value,l);function h(d,p,f,v){return d-Math.round(c*p)}return this._value=t.reduce([l],h,Math.round(this._value*c))/c,this},multiply:function(l){function c(h,d,p,f){var v=t.correctionFactor(h,d);return Math.round(h*v)*Math.round(d*v)/Math.round(v*v)}return this._value=t.reduce([this._value,l],c,1),this},divide:function(l){function c(h,d,p,f){var v=t.correctionFactor(h,d);return Math.round(h*v)/Math.round(d*v)}return this._value=t.reduce([this._value,l],c),this},difference:function(l){return Math.abs(e(this._value).subtract(l).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(l){var c=l%10;return~~(l%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(l,c,h){var d=e._.includes(c," BPS")?" ":"",p;return l=l*1e4,c=c.replace(/\s?BPS/,""),p=e._.numberToFormat(l,c,h),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,d+"BPS"),p=p.join("")):p=p+d+"BPS",p},unformat:function(l){return+(e._.stringToNumber(l)*1e-4).toFixed(15)}})}(),function(){var l={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=l.suffixes.concat(c.suffixes.filter(function(p){return l.suffixes.indexOf(p)<0})),d=h.join("|");d="("+d.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(d)},format:function(p,f,v){var y,$=e._.includes(f,"ib")?c:l,g=e._.includes(f," b")||e._.includes(f," ib")?" ":"",w,_,x;for(f=f.replace(/\s?i?b/,""),w=0;w<=$.suffixes.length;w++)if(_=Math.pow($.base,w),x=Math.pow($.base,w+1),p===null||p===0||p>=_&&p<x){g+=$.suffixes[w],_>0&&(p=p/_);break}return y=e._.numberToFormat(p,f,v),y+g},unformat:function(p){var f=e._.stringToNumber(p),v,y;if(f){for(v=l.suffixes.length-1;v>=0;v--){if(e._.includes(p,l.suffixes[v])){y=Math.pow(l.base,v);break}if(e._.includes(p,c.suffixes[v])){y=Math.pow(c.base,v);break}}f*=y||1}return f}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,h){var d=e.locales[e.options.currentLocale],p={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},f,v,y;for(c=c.replace(/\s?\$\s?/,""),f=e._.numberToFormat(l,c,h),l>=0?(p.before=p.before.replace(/[\-\(]/,""),p.after=p.after.replace(/[\-\)]/,"")):l<0&&!e._.includes(p.before,"-")&&!e._.includes(p.before,"(")&&(p.before="-"+p.before),y=0;y<p.before.length;y++)switch(v=p.before[y],v){case"$":f=e._.insert(f,d.currency.symbol,y);break;case" ":f=e._.insert(f," ",y+d.currency.symbol.length-1);break}for(y=p.after.length-1;y>=0;y--)switch(v=p.after[y],v){case"$":f=y===p.after.length-1?f+d.currency.symbol:e._.insert(f,d.currency.symbol,-(p.after.length-(1+y)));break;case" ":f=y===p.after.length-1?f+" ":e._.insert(f," ",-(p.after.length-(1+y)+d.currency.symbol.length-1));break}return f}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,h){var d,p=typeof l=="number"&&!e._.isNaN(l)?l.toExponential():"0e+0",f=p.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),d=e._.numberToFormat(Number(f[0]),c,h),d+"e"+f[1]},unformat:function(l){var c=e._.includes(l,"e+")?l.split("e+"):l.split("e-"),h=Number(c[0]),d=Number(c[1]);d=e._.includes(l,"e-")?d*=-1:d;function p(f,v,y,$){var g=e._.correctionFactor(f,v),w=f*g*(v*g)/(g*g);return w}return e._.reduce([h,Math.pow(10,d)],p,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,h){var d=e.locales[e.options.currentLocale],p,f=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),f+=d.ordinal(l),p=e._.numberToFormat(l,c,h),p+f}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,h){var d=e._.includes(c," %")?" ":"",p;return e.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),p=e._.numberToFormat(l,c,h),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,d+"%"),p=p.join("")):p=p+d+"%",p},unformat:function(l){var c=e._.stringToNumber(l);return e.options.scalePercentBy100?c*.01:c}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(l,c,h){var d=Math.floor(l/60/60),p=Math.floor((l-d*60*60)/60),f=Math.round(l-d*60*60-p*60);return d+":"+(p<10?"0"+p:p)+":"+(f<10?"0"+f:f)},unformat:function(l){var c=l.split(":"),h=0;return c.length===3?(h=h+Number(c[0])*60*60,h=h+Number(c[1])*60,h=h+Number(c[2])):c.length===2&&(h=h+Number(c[0])*60,h=h+Number(c[1])),Number(h)}})}(),e})})(ih);var $2=ih.exports;Jn($2);var oh={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Ke,function(){var t=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",u="hour",l="day",c="week",h="month",d="quarter",p="year",f="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var B=["th","st","nd","rd"],R=z%100;return"["+z+(B[(R-20)%10]||B[R]||B[0])+"]"}},w=function(z,B,R){var U=String(z);return!U||U.length>=B?z:""+Array(B+1-U.length).join(R)+z},_={s:w,z:function(z){var B=-z.utcOffset(),R=Math.abs(B),U=Math.floor(R/60),P=R%60;return(B<=0?"+":"-")+w(U,2,"0")+":"+w(P,2,"0")},m:function z(B,R){if(B.date()<R.date())return-z(R,B);var U=12*(R.year()-B.year())+(R.month()-B.month()),P=B.clone().add(U,h),G=R-P<0,X=B.clone().add(U+(G?-1:1),h);return+(-(U+(R-P)/(G?P-X:X-P))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:h,y:p,w:c,d:l,D:f,h:u,m:a,s,ms:o,Q:d}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},x="en",b={};b[x]=g;var E="$isDayjsObject",O=function(z){return z instanceof N||!(!z||!z[E])},H=function z(B,R,U){var P;if(!B)return x;if(typeof B=="string"){var G=B.toLowerCase();b[G]&&(P=G),R&&(b[G]=R,P=G);var X=B.split("-");if(!P&&X.length>1)return z(X[0])}else{var D=B.name;b[D]=B,P=D}return!U&&P&&(x=P),P||!U&&x},S=function(z,B){if(O(z))return z.clone();var R=typeof B=="object"?B:{};return R.date=z,R.args=arguments,new N(R)},j=_;j.l=H,j.i=O,j.w=function(z,B){return S(z,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var N=function(){function z(R){this.$L=H(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[E]=!0}var B=z.prototype;return B.parse=function(R){this.$d=function(U){var P=U.date,G=U.utc;if(P===null)return new Date(NaN);if(j.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var X=P.match(y);if(X){var D=X[2]-1||0,C=(X[7]||"0").substring(0,3);return G?new Date(Date.UTC(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,C)):new Date(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,C)}}return new Date(P)}(R),this.init()},B.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},B.$utils=function(){return j},B.isValid=function(){return this.$d.toString()!==v},B.isSame=function(R,U){var P=S(R);return this.startOf(U)<=P&&P<=this.endOf(U)},B.isAfter=function(R,U){return S(R)<this.startOf(U)},B.isBefore=function(R,U){return this.endOf(U)<S(R)},B.$g=function(R,U,P){return j.u(R)?this[U]:this.set(P,R)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(R,U){var P=this,G=!!j.u(U)||U,X=j.p(R),D=function(qe,me){var Ie=j.w(P.$u?Date.UTC(P.$y,me,qe):new Date(P.$y,me,qe),P);return G?Ie:Ie.endOf(l)},C=function(qe,me){return j.w(P.toDate()[qe].apply(P.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(me)),P)},I=this.$W,M=this.$M,xe=this.$D,et="set"+(this.$u?"UTC":"");switch(X){case p:return G?D(1,0):D(31,11);case h:return G?D(1,M):D(0,M+1);case c:var Ue=this.$locale().weekStart||0,ct=(I<Ue?I+7:I)-Ue;return D(G?xe-ct:xe+(6-ct),M);case l:case f:return C(et+"Hours",0);case u:return C(et+"Minutes",1);case a:return C(et+"Seconds",2);case s:return C(et+"Milliseconds",3);default:return this.clone()}},B.endOf=function(R){return this.startOf(R,!1)},B.$set=function(R,U){var P,G=j.p(R),X="set"+(this.$u?"UTC":""),D=(P={},P[l]=X+"Date",P[f]=X+"Date",P[h]=X+"Month",P[p]=X+"FullYear",P[u]=X+"Hours",P[a]=X+"Minutes",P[s]=X+"Seconds",P[o]=X+"Milliseconds",P)[G],C=G===l?this.$D+(U-this.$W):U;if(G===h||G===p){var I=this.clone().set(f,1);I.$d[D](C),I.init(),this.$d=I.set(f,Math.min(this.$D,I.daysInMonth())).$d}else D&&this.$d[D](C);return this.init(),this},B.set=function(R,U){return this.clone().$set(R,U)},B.get=function(R){return this[j.p(R)]()},B.add=function(R,U){var P,G=this;R=Number(R);var X=j.p(U),D=function(M){var xe=S(G);return j.w(xe.date(xe.date()+Math.round(M*R)),G)};if(X===h)return this.set(h,this.$M+R);if(X===p)return this.set(p,this.$y+R);if(X===l)return D(1);if(X===c)return D(7);var C=(P={},P[a]=r,P[u]=i,P[s]=t,P)[X]||1,I=this.$d.getTime()+R*C;return j.w(I,this)},B.subtract=function(R,U){return this.add(-1*R,U)},B.format=function(R){var U=this,P=this.$locale();if(!this.isValid())return P.invalidDate||v;var G=R||"YYYY-MM-DDTHH:mm:ssZ",X=j.z(this),D=this.$H,C=this.$m,I=this.$M,M=P.weekdays,xe=P.months,et=P.meridiem,Ue=function(me,Ie,ht,Tt){return me&&(me[Ie]||me(U,G))||ht[Ie].slice(0,Tt)},ct=function(me){return j.s(D%12||12,me,"0")},qe=et||function(me,Ie,ht){var Tt=me<12?"AM":"PM";return ht?Tt.toLowerCase():Tt};return G.replace($,function(me,Ie){return Ie||function(ht){switch(ht){case"YY":return String(U.$y).slice(-2);case"YYYY":return j.s(U.$y,4,"0");case"M":return I+1;case"MM":return j.s(I+1,2,"0");case"MMM":return Ue(P.monthsShort,I,xe,3);case"MMMM":return Ue(xe,I);case"D":return U.$D;case"DD":return j.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Ue(P.weekdaysMin,U.$W,M,2);case"ddd":return Ue(P.weekdaysShort,U.$W,M,3);case"dddd":return M[U.$W];case"H":return String(D);case"HH":return j.s(D,2,"0");case"h":return ct(1);case"hh":return ct(2);case"a":return qe(D,C,!0);case"A":return qe(D,C,!1);case"m":return String(C);case"mm":return j.s(C,2,"0");case"s":return String(U.$s);case"ss":return j.s(U.$s,2,"0");case"SSS":return j.s(U.$ms,3,"0");case"Z":return X}return null}(me)||X.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(R,U,P){var G,X=this,D=j.p(U),C=S(R),I=(C.utcOffset()-this.utcOffset())*r,M=this-C,xe=function(){return j.m(X,C)};switch(D){case p:G=xe()/12;break;case h:G=xe();break;case d:G=xe()/3;break;case c:G=(M-I)/6048e5;break;case l:G=(M-I)/864e5;break;case u:G=M/i;break;case a:G=M/r;break;case s:G=M/t;break;default:G=M}return P?G:j.a(G)},B.daysInMonth=function(){return this.endOf(h).$D},B.$locale=function(){return b[this.$L]},B.locale=function(R,U){if(!R)return this.$L;var P=this.clone(),G=H(R,U,!0);return G&&(P.$L=G),P},B.clone=function(){return j.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},z}(),V=N.prototype;return S.prototype=V,[["$ms",o],["$s",s],["$m",a],["$H",u],["$W",l],["$M",h],["$y",p],["$D",f]].forEach(function(z){V[z[1]]=function(B){return this.$g(B,z[0],z[1])}}),S.extend=function(z,B){return z.$i||(z(B,N,S),z.$i=!0),S},S.locale=H,S.isDayjs=O,S.unix=function(z){return S(1e3*z)},S.en=b[x],S.Ls=b,S.p={},S})})(oh);var sh=oh.exports;const j2=Jn(sh);var E2={exports:{}};(function(n,e){(function(t,r){n.exports=r(sh)})(Ke,function(t){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,a){return a==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,a){var u=100*s+a;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(E2),j2.locale("zh-cn");const ah=()=>+Date.now();function yt(){return Number(Math.random().toString().substring(2,5)+Date.now()).toString(36)}var Ao={exports:{}};Ao.exports,function(n){var e=function(){var t=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(u,l){if(!o[u]){o[u]={};for(var c=0;c<u.length;c++)o[u][u.charAt(c)]=c}return o[u][l]}var a={compressToBase64:function(u){if(u==null)return"";var l=a._compress(u,6,function(c){return r.charAt(c)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(u){return u==null?"":u==""?null:a._decompress(u.length,32,function(l){return s(r,u.charAt(l))})},compressToUTF16:function(u){return u==null?"":a._compress(u,15,function(l){return t(l+32)})+" "},decompressFromUTF16:function(u){return u==null?"":u==""?null:a._decompress(u.length,16384,function(l){return u.charCodeAt(l)-32})},compressToUint8Array:function(u){for(var l=a.compress(u),c=new Uint8Array(l.length*2),h=0,d=l.length;h<d;h++){var p=l.charCodeAt(h);c[h*2]=p>>>8,c[h*2+1]=p%256}return c},decompressFromUint8Array:function(u){if(u==null)return a.decompress(u);for(var l=new Array(u.length/2),c=0,h=l.length;c<h;c++)l[c]=u[c*2]*256+u[c*2+1];var d=[];return l.forEach(function(p){d.push(t(p))}),a.decompress(d.join(""))},compressToEncodedURIComponent:function(u){return u==null?"":a._compress(u,6,function(l){return i.charAt(l)})},decompressFromEncodedURIComponent:function(u){return u==null?"":u==""?null:(u=u.replace(/ /g,"+"),a._decompress(u.length,32,function(l){return s(i,u.charAt(l))}))},compress:function(u){return a._compress(u,16,function(l){return t(l)})},_compress:function(u,l,c){if(u==null)return"";var h,d,p={},f={},v="",y="",$="",g=2,w=3,_=2,x=[],b=0,E=0,O;for(O=0;O<u.length;O+=1)if(v=u.charAt(O),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=w++,f[v]=!0),y=$+v,Object.prototype.hasOwnProperty.call(p,y))$=y;else{if(Object.prototype.hasOwnProperty.call(f,$)){if($.charCodeAt(0)<256){for(h=0;h<_;h++)b=b<<1,E==l-1?(E=0,x.push(c(b)),b=0):E++;for(d=$.charCodeAt(0),h=0;h<8;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}else{for(d=1,h=0;h<_;h++)b=b<<1|d,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=0;for(d=$.charCodeAt(0),h=0;h<16;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}g--,g==0&&(g=Math.pow(2,_),_++),delete f[$]}else for(d=p[$],h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;g--,g==0&&(g=Math.pow(2,_),_++),p[y]=w++,$=String(v)}if($!==""){if(Object.prototype.hasOwnProperty.call(f,$)){if($.charCodeAt(0)<256){for(h=0;h<_;h++)b=b<<1,E==l-1?(E=0,x.push(c(b)),b=0):E++;for(d=$.charCodeAt(0),h=0;h<8;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}else{for(d=1,h=0;h<_;h++)b=b<<1|d,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=0;for(d=$.charCodeAt(0),h=0;h<16;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}g--,g==0&&(g=Math.pow(2,_),_++),delete f[$]}else for(d=p[$],h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;g--,g==0&&(g=Math.pow(2,_),_++)}for(d=2,h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;for(;;)if(b=b<<1,E==l-1){x.push(c(b));break}else E++;return x.join("")},decompress:function(u){return u==null?"":u==""?null:a._decompress(u.length,32768,function(l){return u.charCodeAt(l)})},_decompress:function(u,l,c){var h=[],d=4,p=4,f=3,v="",y=[],$,g,w,_,x,b,E,O={val:c(0),position:l,index:1};for($=0;$<3;$+=1)h[$]=$;for(w=0,x=Math.pow(2,2),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;switch(w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;E=t(w);break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;E=t(w);break;case 2:return""}for(h[3]=E,g=E,y.push(E);;){if(O.index>u)return"";for(w=0,x=Math.pow(2,f),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;switch(E=w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;h[p++]=t(w),E=p-1,d--;break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;h[p++]=t(w),E=p-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,f),f++),h[E])v=h[E];else if(E===p)v=g+g.charAt(0);else return null;y.push(v),h[p++]=g+v.charAt(0),d--,g=v,d==0&&(d=Math.pow(2,f),f++)}}};return a}();n!=null?n.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})}(Ao);var lh=Ao.exports;lh.compress;lh.decompress;function k2(n){return{all:n=n||new Map,on:function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},off:function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var r=n.get(e);r&&r.slice().map(function(i){i(t)}),(r=n.get("*"))&&r.slice().map(function(i){i(e,t)})}}}let Ds=class{listeners=[];isReady=!1;triggerReady(){this.isReady=!0;for(const e of this.listeners)e();this.listeners=[]}ready(e){this.isReady?e():this.listeners.push(e)}resetReady(){this.isReady=!1}},Zi=class uh{constructor(e,t,r){this.name=e,this.value=t,this.defaultValue=r,this.setValue(t)}isUnset=!1;setValue(e){this.value=e,this.isUnset=this.value===this.defaultValue}getValue(){return this.value??this.defaultValue}static toDsl(e={}){return Object.entries(e).reduce((t,[r,i])=>(i.isUnset||(t[r]=i.getValue()),t),{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new uh(r,i),t),{})}},Gi=class ch{constructor(e){this.schema=e;const{name:t,handler:r}=this.schema;this.name=t,this.handler=r,this.update(e)}name;handler;modifiers={};update(e){Object.assign(this.schema,e);const{handler:t,modifiers:r={}}=this.schema;this.handler=t,this.modifiers=r}static toDsl(e){return Object.entries(e).reduce((t,[r,i])=>{const{handler:o,modifiers:s}=i;return t[r]={name:r,handler:o,modifiers:s},t},{})}static parse(e={}){return Object.entries(e).reduce((t,[r,i])=>(t[r]=new ch(i),t),{})}},On=class hh{constructor(e){this.schema=e,this.id=e.id||yt(),this.update(e)}id;name="";arg;modifiers;value;iterator;update(e){Object.assign(this.schema,e);const{name:t,arg:r,modifiers:i,value:o,iterator:s}=this.schema;this.name=t,this.arg=r,this.modifiers=i,this.value=o,this.iterator=s}static parse(e=[]){return e.map(t=>new hh(t))}static toDsl(e=[]){return e.map(t=>{const{name:r,arg:i,modifiers:o,value:s,iterator:a,id:u}=t;return{id:u,name:r,arg:i,modifiers:o,value:s,iterator:a}})}};const Ee="EVENT_NODE_CHANGE";let mi=class ei{constructor(e,t=null){this.parent=t;const{id:r=yt(),name:i,from:o=""}=e;this.id=r,this.name=i,this.from=o,this.update(e,!0),ei.nodes[this.id]=this}__VTJ_NODE__=!0;locked=!1;static nodes={};id;name;from;invisible=!1;children="";slot;props={};events={};directives=[];disposed=!1;update(e,t=!1){const{invisible:r=!1,locked:i=!1,children:o=[],slot:s,props:a={},events:u={},directives:l=[]}=e;this.invisible=r,this.locked=i,this.setChildren(o,!0),this.setSlot(s,!0),this.props=Zi.parse(a),this.events=Gi.parse(u),this.directives=On.parse(l),t||Q.emit(Ee,this)}setChildren(e="",t=!1){Array.isArray(e)?this.children=e.map(r=>new ei(r,this)):this.children=e,t||Q.emit(Ee,this)}setSlot(e,t=!1){this.slot=typeof e=="string"?{name:e,params:[]}:e,t||Q.emit(Ee,this)}setProp(e,t,r,i=!1){const o=this.props[e];o?o.setValue(t):this.props[e]=new Zi(e,t,r),i||Q.emit(Ee,this)}removeProp(e,t=!1){delete this.props[e],t||Q.emit(Ee,this)}getPropValue(e){const t=this.props[e];if(t)return t.getValue()}setEvent(e,t=!1){const r=this.events[e.name];r?r.update(e):this.events[e.name]=new Gi(e),t||Q.emit(Ee,this)}removeEvent(e,t=!1){delete this.events[e],t||Q.emit(Ee,this)}setDirective(e,t=!1){const r=this.directives.findIndex(i=>i.id===e.id);r>=0?this.directives.splice(r,1,new On(e)):this.directives.push(new On(e)),t||Q.emit(Ee,this)}removeDirective(e,t=!1){const r=this.directives.findIndex(i=>i===e||i.id===e.id);r>=0&&this.directives.splice(r,1),t||Q.emit(Ee,this)}removeChild(e,t=!1){const{children:r,disposed:i}=this;if(i||!Array.isArray(r))return;const o=r.findIndex(s=>s===e);e.parent=null,r.splice(o,1),t||Q.emit(Ee,this)}appendChild(e,t=!1){const{children:r,disposed:i}=this;i||(e.parent=this,Array.isArray(r)?r.push(e):this.children=[e],t||Q.emit(Ee,this))}insertAfter(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i+1,0,e),t||Q.emit(Ee,this.parent)}}insertBefore(e,t=!1){if(!this.parent)return;const r=this.parent.children;if(Array.isArray(r)){e.parent=this.parent;const i=r.indexOf(this);r.splice(i,0,e),t||Q.emit(Ee,this.parent)}}movePrev(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>0&&(r.splice(i,1),r.splice(i-1,0,this),e||Q.emit(Ee,t))}}moveNext(e=!1){const t=this.parent;if(!t)return;const r=t.children;if(Array.isArray(r)){const i=r.indexOf(this);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,this),e||Q.emit(Ee,t))}}toDsl(){const{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:a,props:u,directives:l,events:c}=this,h=Array.isArray(a)?a.map(d=>d.toDsl()):a;return{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:h,props:Zi.toDsl(u),directives:On.toDsl(l),events:Gi.toDsl(c)}}dispose(e=!1){const{children:t,disposed:r}=this;r||(Array.isArray(t)&&t.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,e):e||Q.emit(Ee,this),this.parent=null,this.disposed=!0,delete ei.nodes[this.id])}lock(e=!1){if(this.locked=!0,Array.isArray(this.children))for(const t of this.children)t.lock(!0);e||Q.emit(Ee,this)}unlock(e=!1){if(this.locked=!1,Array.isArray(this.children))for(const t of this.children)t.unlock(!0);e||Q.emit(Ee,this)}setVisible(e,t=!1){if(this.invisible=!e,Array.isArray(this.children))for(const r of this.children)r.setVisible(e,!0);t||Q.emit(Ee,this)}isChild(e){let t=!1;if(Array.isArray(this.children)){for(const r of this.children)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break}return t}};const ve="EVENT_BLOCK_CHANGE";let Rn=class Bo{__VTJ_BLOCK__=!0;id;name="";inject=[];state={};lifeCycles={};methods={};computed={};watch=[];css="";props=[];emits=[];slots=[];dataSources={};nodes=[];locked=!1;disposed=!1;static normalAttrs=["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources"];constructor(e){const{id:t}=e;this.id=t||yt(),this.update(e,!0)}update(e,t=!1){for(const i of Bo.normalAttrs){const o=e[i];o&&(this[i]=o)}const{nodes:r=[]}=e;r.length&&(this.nodes=r.map(i=>new mi(i))),t||Q.emit(ve,this)}toDsl(){const{__VTJ_BLOCK__:e,id:t,nodes:r}=this;return{...Bo.normalAttrs.reduce((i,o)=>(i[o]=this[o],i),{}),__VTJ_BLOCK__:e,__VERSION__:ah().toString(),id:t,nodes:r.map(i=>i.toDsl())}}dispose(){this.nodes.map(e=>e.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(e,t,r,i=!1){this[e][t]=r,i||Q.emit(ve,this)}removeFunction(e,t,r=!1){delete this[e][t],r||Q.emit(ve,this)}setState(e,t,r=!1){this.state[e]=t,r||Q.emit(ve,this)}removeState(e,t=!1){delete this.state[e],t||Q.emit(ve,this)}setCss(e,t=!1){this.css=e,t||Q.emit(ve,this)}setWatch(e,t=!1){e.id=e.id||yt();const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1?this.watch.splice(r,1,e):this.watch.push(e),t||Q.emit(ve,this)}removeWatch(e,t=!1){const r=this.watch.findIndex(i=>i.id&&i.id===e.id||i===e);r>-1&&(this.watch.splice(r,1),t||Q.emit(ve,this))}setProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1?this.props.splice(r,1,e):this.props.push(e),t||Q.emit(ve,this)}removeProp(e,t=!1){const r=this.props.findIndex(i=>typeof i=="string"?i===e.name:i.name===e.name);r>-1&&(this.props.splice(r,1),t||Q.emit(ve,this))}setEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1?this.emits.splice(r,1,e):this.emits.push(e),t||Q.emit(ve,this)}removeEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1&&(this.emits.splice(r,1),t||Q.emit(ve,this))}setSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1?this.slots.splice(r,1,e):this.slots.push(e),t||Q.emit(ve,this)}removeSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1&&(this.slots.splice(r,1),t||Q.emit(ve,this))}setInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1?this.inject.splice(r,1,e):this.inject.push(e),t||Q.emit(ve,this)}removeInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1&&(this.inject.splice(r,1),t||Q.emit(ve,this))}setDataSource(e,t=!1){this.dataSources[e.name]=e,t||Q.emit(ve,this)}removeDataSource(e,t=!1){delete this.dataSources[e],t||Q.emit(ve,this)}insertAfter(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i+1,0,e),r||Q.emit(ve,this)}insertBefore(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i,0,e),r||Q.emit(ve,this)}appendNode(e,t=!1){e.parent=null,this.nodes.push(e),t||Q.emit(ve,this)}addNode(e,t,r="inner",i=!1){t?["left","top"].includes(r)?t.parent?t.insertAfter(e,i):this.insertBefore(e,t,i):["right","bottom"].includes(r)?t.parent?t.insertAfter(e,i):this.insertAfter(e,t,i):t.appendChild(e,i):this.appendNode(e,i)}__removeNode(e,t=!1){const r=this.nodes.findIndex(i=>i.id===e.id);r>-1&&(this.nodes.splice(r,1),t||Q.emit(ve,this))}removeNode(e,t=!1){e.parent?e.dispose(t):(e.dispose(!0),this.__removeNode(e,t))}move(e,t,r="inner",i=!1){e.parent?e.parent.removeChild(e,!0):this.__removeNode(e,!0),this.addNode(e,t,r,i)}movePrev(e,t=!1){if(e.parent)e.movePrev(t);else{const r=this.nodes,i=r.indexOf(e);i>0&&(r.splice(i,1),r.splice(i-1,0,e),t||Q.emit(ve,this))}}moveNext(e,t=!1){if(e.parent)e.moveNext(t);else{const r=this.nodes,i=r.indexOf(e);i>-1&&i<r.length-1&&(r.splice(i,1),r.splice(i+1,0,e),t||Q.emit(ve,this))}}cloneNode(e,t=!1){const r=fh(e.toDsl()),i=new mi(r);return this.addNode(i,e,"bottom",t),i}lock(e=!1){this.locked=!0;for(const t of this.nodes)t.lock(!0);e||Q.emit(ve,this)}unlock(e=!1){this.locked=!1;for(const t of this.nodes)t.unlock(!0);e||Q.emit(ve,this)}isChild(e){let t=!1;for(const r of this.nodes)if(e===r||e.id===r.id){t=!0;break}else if(t=r.isChild(e),t)break;return t}};const Xe="EVENT_PROJECT_CHANGE",br="EVENT_PROJECT_ACTIVED",Co="EVENT_PROJECT_DEPS_CHANGE",lr="EVENT_PROJECT_PAGES_CHANGE",ti="EVENT_PROJECT_BLOCKS_CHANGE",ul="EVENT_PROJECT_APIS_CHANGE",dh="EVENT_PROJECT_PUBLISH",ph="EVENT_PROJECT_FILE_PUBLISH";let T2=class Io{id="";name="";description="";homepage="";dependencies=[];pages=[];blocks=[];apis=[];currentFile=null;static attrs=["name","homepage","description","dependencies","pages","blocks","apis"];constructor(e){const{id:t}=e;this.id=t||yt(),this.update(e,!0)}update(e,t=!1){for(const r of Io.attrs){const i=e[r];i&&(this[r]=i)}t||Q.emit(Xe,{model:this,type:"update",data:e})}isPageFile(e){return e.type==="page"}toDsl(){const{id:e}=this,t=Io.attrs.reduce((r,i)=>(r[i]=this[i],r),{});return t.pages&&(t.pages=t.pages.map(r=>(delete r.dsl,r))),t.blocks&&(t.blocks=t.blocks.map(r=>(delete r.dsl,r))),{__VTJ_PROJECT__:!0,__VERSION__:ah().toString(),id:e,...t}}active(e,t=!1){this.currentFile=e,t||Q.emit(br,{model:this,type:"update",data:e})}deactivate(e=!1){this.currentFile=null,e||Q.emit(br,{model:this,type:"update",data:null})}setDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(s=>s.package===e.package);let o;if(i>-1?(o="update",r.splice(i,1,{...r[i],...e})):(o="create",r.push(e)),!t){const s={model:this,type:o,data:e};Q.emit(Co,s),Q.emit(Xe,s)}}removeDeps(e,t=!1){const r=this.dependencies,i=r.findIndex(o=>o.package===e.package);if(i>-1&&r.splice(i,1),!t){const o={model:this,type:"delete",data:e};Q.emit(Co,o),Q.emit(Xe,o)}}getPage(e){const t=(r,i=[])=>{for(const o of i){if(o.id===r)return o;if(o.children&&o.children.length){const s=t(r,o.children);if(s)return s}}};return t(e,this.pages)}getPages(){const e=(t=[])=>{let r=[];for(const i of t)i.dir?i.children&&i.children.length&&(r=r.concat(e(i.children))):r.push(i);return r};return e(this.pages)}createPage(e,t,r=!1){if(e.id=e.id||yt(),e.type="page",e.dir?e.children=[]:e.dsl=e.dsl||new Rn({id:e.id,name:La(e.name)}).toDsl(),t){const i=this.getPage(t);i?i.children?i.children.push(e):i.children=[e]:console.warn(`not found PageFile for id: ${t} `)}else this.pages.push(e);if(this.currentFile||this.active(e,r),!r){const i={model:this,type:"create",data:e};Q.emit(lr,i),Q.emit(Xe,i)}}updatePage(e,t=!1){const r=this.getPage(e.id);if(r?Object.assign(r,e):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};Q.emit(lr,i),Q.emit(Xe,i)}}clonePage(e,t,r=!1){const i=yt(),o=`${e.name}Copy`,s=`${e.title}_副本`,a=new Rn({id:i,name:o}).toDsl(),u=Yy({},e,{id:i,name:o,title:s,dsl:a}),l=t?this.getPage(t)?.children||[]:this.pages,c=l.findIndex(h=>h.id===e.id);if(l.splice(c+1,0,u),!r){const h={model:this,type:"clone",data:{page:e,newPage:u}};Q.emit(lr,h),Q.emit(Xe,h)}}removePage(e,t=!1){const r=(i,o)=>{const s=o.findIndex(a=>a.id===i);if(s>=0){o.splice(s,1);return}for(const a of o)if(a.children&&a.children.length)return r(i,a.children)};if(r(e,this.pages),e===this.homepage&&(this.homepage=""),this.currentFile?.id===e&&this.deactivate(t),!t){const i={model:this,type:"delete",data:e};Q.emit(lr,i),Q.emit(Xe,i)}}getBlock(e){return this.blocks.find(t=>t.id===e)}createBlock(e,t=!1){const r=e.id||yt(),i=La(e.name);if(e.id=r,e.type="block",e.dsl=new Rn({id:r,name:i}).toDsl(),this.blocks.push(e),this.currentFile||this.active(e,t),!t){const o={model:this,type:"create",data:e};Q.emit(ti,o),Q.emit(Xe,o)}}updateBlock(e,t=!1){const r=this.getBlock(e.id);if(r?(Object.assign(r,e),r.dsl&&(r.dsl.name=e.name)):console.warn(`not found PageFile for id: ${e.id} `),!t){const i={model:this,type:"update",data:e};Q.emit(ti,i),Q.emit(Xe,i)}}removeBlock(e,t=!1){const r=this.blocks,i=r.findIndex(o=>o.id===e);if(i>-1?(r.splice(i,1),this.currentFile?.id===e&&this.deactivate(t)):console.warn(`not found PageFile for id: ${e} `),!t){const o={model:this,type:"delete",data:e};Q.emit(ti,o),Q.emit(Xe,o)}}existBlockName(e,t=[]){return this.blocks.some(r=>r.name===e&&!t.includes(r.id))}existPageName(e,t=[]){return this.getPages().some(r=>r.name===e&&!t.includes(r.id))}setApi(e,t=!1){const r=this.apis.find(o=>o.name===e.name||o.id===e.id);let i;if(r?(i="update",Object.assign(r,e)):(i="create",e.id=yt(),this.apis.push(e)),!t){const o={model:this,type:i,data:e};Q.emit(ul,o),Q.emit(Xe,o)}}removeApi(e,t=!1){const r=this.apis.findIndex(i=>i.name===e||i.id===e);if(r>-1?this.apis.splice(r,1):console.warn(`not found Api for name: ${e} `),!t){const i={model:this,type:"delete",data:e};Q.emit(ul,i),Q.emit(Xe,i)}}existApiName(e,t=[]){return this.apis.some(r=>r.name===e&&!t.includes(r.id))}setHomepage(e,t=!1){if(this.homepage=e,!t){const r={model:this,type:"update",data:e};Q.emit(Xe,r)}}publish(e){const t={model:this,type:"publish",data:e||this};e?Q.emit(ph,t):Q.emit(dh,t)}};const ur="EVENT_HISTORY_CHANGE",ni="EVENT_HISTORY_LOAD";let V2=class{options={max:50};index=-1;id;items;constructor(e,t={}){Object.assign(this.options,t);const{id:r,items:i=[]}=e;this.id=r,this.items=i}toDsl(){const{id:e,items:t}=this;return{id:e,items:t.map(r=>({id:r.id,label:r.label}))}}get(e){return this.items.find(t=>t.id===e)}add(e,t=!1){const{max:r}=this.options,i={id:yt(),label:new Date().toLocaleString(),dsl:zy(e)};if(this.items.unshift(i),this.items.length>r){const o=this.items.splice(r);t||Q.emit(ur,{model:this,type:"delete",data:o.map(s=>s.id)})}this.index=-1,t||Q.emit(ur,{model:this,type:"create",data:i})}remove(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>-1?(this.items.splice(r,1),r===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${e} `),t||Q.emit(ur,{model:this,type:"delete",data:[e]})}forward(e=!1){const{index:t,items:r}=this;if(t<0)return;--this.index;const i=r[this.index];i&&!e&&Q.emit(ni,{model:this,type:"load",data:i})}backward(e=!1){const{index:t,items:r}=this;if(t>=r.length-1)return;t<0&&(this.index=0),++this.index;const i=r[this.index];i&&!e&&Q.emit(ni,{model:this,type:"load",data:i})}load(e,t=!1){const r=this.items.findIndex(i=>i.id===e);r>=0&&(this.index=r,t||Q.emit(ni,{model:this,type:"load",data:this.items[r]}))}clear(e=!1){this.index=-1;const t=this.items.map(r=>r.id);this.items=[],e||Q.emit(ur,{model:this,type:"clear",data:t})}};const Q=k2();function Ae(n){return n instanceof Rn}function fh(n){return delete n.id,Array.isArray(n.children)&&(n.children=n.children.map(e=>fh(e))),n}/**!
33
- * Copyright (c) 2024, VTJ.PRO All rights reserved.
34
- * @name @vtj/icons
35
- * @author CHC chenhuachun1549@dingtalk.com
36
- * @version 0.7.0
37
- * @license <a href="https://vtj.pro/license.html">MIT License</a>
38
- */const D2=J({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M298.666667 298.666667V85.333333h85.333333v298.666667H85.333333V298.666667h213.333334z m426.666666-213.333334v213.333334h213.333334v85.333333h-298.666667V85.333333h85.333333zM298.666667 938.666667v-213.333334H85.333333v-85.333333h298.666667v298.666667H298.666667z m426.666666 0h-85.333333v-298.666667h298.666667v85.333333h-213.333334v213.333334z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),O2=J({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M374.442667 486.229333l-81.237334 101.034667c-2.218667 4.352-2.218667 6.570667 0 8.789333 0 2.218667 2.218667 4.352 6.570667 4.352H719.36c4.352 0 6.570667-2.133333 6.570667-4.352 0-2.218667 2.218667-4.437333 0-8.789333l-81.237334-101.034667H374.442667z m362.922666 179.2H281.770667a66.56 66.56 0 0 1-57.173334-35.754666 67.242667 67.242667 0 0 1 7.082667-66.730667l104.96-128.853333h345.856l104.96 128.853333c14.250667 19.029333 19.029333 45.226667 7.168 66.730667a66.56 66.56 0 0 1-57.258667 35.84zM380.16 178.773333H639.146667L680.362667 76.544c2.218667-4.266667 0-6.485333 0-6.485333 0-2.218667-2.133333-4.352-6.485334-4.352H347.562667c-4.352 0-6.570667 2.133333-6.570667 4.266666 0 2.218667-2.133333 4.437333 0 6.570667l39.253333 102.229333z m307.114667 62.122667H331.861333l-57.173333-145.493333a61.269333 61.269333 0 0 1 7.082667-57.173334 63.317333 63.317333 0 0 1 52.48-26.282666h355.413333c21.418667 0 40.533333 9.557333 52.48 26.197333 11.946667 16.725333 14.250667 38.229333 7.082667 57.258667l-61.952 145.493333z",color:"#FFFFFF"},{path:"M386.901333 426.922667h245.248V245.76H386.901333v181.162667z m309.930667 59.733333H322.304V186.026667h372.053333v300.544h2.474667zM510.72 992.256c-19.029333-16.725333-28.586667-40.618667-30.976-66.816L458.24 636.842667h107.349333l-21.418666 288.597333a127.146667 127.146667 0 0 1-33.450667 66.816",color:"#FFFFFF"},{path:"M19.2 905.557333m52.48 0l878.08 0q52.48 0 52.48 52.48l0 0.085334q0 52.48-52.48 52.48l-878.08 0q-52.48 0-52.48-52.48l0-0.085334q0-52.48 52.48-52.48Z",color:"#FFFFFF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),A2=J({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M170.666667 170.666667v213.333333H85.333333V85.333333h298.666667v85.333334H170.666667z m682.666666 213.333333V170.666667h-213.333333V85.333333h298.666667v298.666667h-85.333334zM170.666667 640v213.333333h213.333333v85.333334H85.333333v-298.666667h85.333334z m682.666666 0h85.333334v298.666667h-298.666667v-85.333334h213.333333v-213.333333z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),B2=J({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M891.0336 113.7664a32 32 0 0 1 0 45.2352l-104.6016 104.6016a380.1088 380.1088 0 0 1 81.408 65.024l4.5312 4.7104c2.6112 2.6368 5.4272 5.3504 8.704 8.3968l11.6224 10.4192 30.6176 26.624 12.9792 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 47.488-26.7776 79.744-100.3776 142.848l-17.8432 15.4368a471.04 471.04 0 0 0-15.5392 14.1312l-4.7104 4.6592-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-86.784 0-169.5744-18.9696-239.1808-53.3504l-135.5264 135.5008a32 32 0 1 1-45.2352-45.2352l123.8784-123.904a364.9536 364.9536 0 0 1-63.4368-56.192l-1.8176-2.048a249.0112 249.0112 0 0 0-21.4016-20.1728l-12.6976-10.7776-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-38.7072 19.3792-66.5088 70.8096-111.7952l12.4416-10.7776 27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936c-6.656 7.4752-13.2352 14.0032-22.9888 22.6816l-9.216 8.0384-42.8544 36.1728c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 17.4336 14.5152c17.8176 14.8224 28.416 24.0128 36.9664 32.5376l4.9664 5.0944 11.3408 12.3648a315.8272 315.8272 0 0 0 55.168 45.568l89.7536-89.8304a30.0544 30.0544 0 0 1 10.1632-10.1632l217.4976-217.472a146.4064 146.4064 0 0 0-200.1152 70.7328 146.4832 146.4832 0 0 0-12.288 69.632 30.0544 30.0544 0 0 1-60.0064 4.224 206.7712 206.7712 0 0 1 17.408-98.304c46.2592-103.936 168.448-150.8608 272.4096-104.576 9.3696 4.1728 18.2528 8.96 26.6496 14.2592l56.5248-56.5504c-50.5088-17.7408-106.88-27.3664-165.2736-27.3664-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664 75.3152 0 148.0704 14.4896 211.712 41.0368l119.552-119.5008a32 32 0 0 1 45.2352 0z m-148.5568 193.792l-71.0656 71.0912a206.592 206.592 0 0 1 29.824 215.808c-46.2848 103.9616-168.4992 150.8608-272.4608 104.576a205.7216 205.7216 0 0 1-48-29.7472l-60.1088 60.0832 10.112 4.2496c51.968 20.9664 110.7968 32.7168 170.88 34.2016l12.8768 0.1536c124.928 0 240.7168-44.1088 309.504-117.4272l6.656-6.8864c3.1744-3.1744 6.5536-6.4 10.4704-9.984l8.6528-7.7824 44.6976-38.8352c17.5872-15.6928 29.568-27.776 38.8864-39.68 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936c-11.1104-9.728-18.4832-16.4608-25.0112-22.9376l-13.312-13.7472a332.9792 332.9792 0 0 0-75.3408-55.808z m-113.8432 113.8688l-205.056 205.0816a146.4064 146.4064 0 0 0 222.72-56.5248 146.3552 146.3552 0 0 0-17.664-148.5568z",color:"#CCCCCC"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),C2=J({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M648 160H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V168c0-4.4-3.6-8-8-8z m272.8 546H856V318h64.8c6 0 9.4-7 5.7-11.7L825.7 178.7c-2.9-3.7-8.5-3.7-11.3 0L713.6 306.3c-3.7 4.7-0.4 11.7 5.7 11.7H784v388h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.8-4.7 0.4-11.7-5.6-11.7z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),mh=J({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M926.45937303 97.54062697v828.2973677H97.54062697V97.54062697h828.91874606m4.97102697-77.6722963h-838.8608c-39.7682157 0-72.07989097 32.31167525-72.07989097 72.07989096v839.48217837c0 39.7682157 32.31167525 72.07989097 72.07989097 72.07989097h839.48217837c39.7682157 0 72.07989097-32.31167525 72.07989096-72.07989097v-838.8608c0-40.38959408-32.31167525-72.70126933-72.70126933-72.70126933 0.62137837 0 0 0 0 0z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),vh=J({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M65.23884 456.152041 958.760137 456.152041l0 111.695918L65.23884 567.847959 65.23884 456.152041z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),gh=J({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M959.72 0H294.216a63.96 63.96 0 0 0-63.96 63.96v127.92H64.28A63.96 63.96 0 0 0 0.32 255.84V959.4a63.96 63.96 0 0 0 63.96 63.96h703.56a63.96 63.96 0 0 0 63.96-63.96V792.465h127.92a63.96 63.96 0 0 0 63.96-63.96V63.96A63.96 63.96 0 0 0 959.72 0zM767.84 728.505V959.4H64.28V255.84h703.56z m189.322 0H831.8V255.84a63.96 63.96 0 0 0-63.96-63.96H294.216V63.96H959.72z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),I2=J({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M1024 866.459826V1024h-78.781217v-157.540174H1024z m-157.540174 0V1024H801.391304l-13.712695-13.712696v-143.827478h78.781217z m-78.758956-315.080348v157.540174h157.517913V551.401739H1024v236.321391H708.919652v-78.781217h-78.758956l-0.022261 143.805217-78.758957-78.758956v-222.586435h236.321392z m-315.080348 0l-0.022261 143.805218-143.782957-143.805218h143.805218zM1024 0v472.598261H551.379478V0H1024zM472.598261 0v472.598261h-222.564174l-78.758957-78.758957h222.564174V78.758957H78.758957v222.541913L0 222.564174V0h472.598261z m472.620522 78.758957H630.160696v315.080347H945.196522V78.758957zM315.080348 157.540174v157.540174H157.540174V157.540174h157.540174z m551.379478 0v157.540174h-157.540174V157.540174h157.540174z",color:"#26B8CF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),yh=J({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M512 432.46249999L865.92499999 78.49999973a56.13749998 56.13749998 0 0 1 79.53750003-5e-8 56.17500029 56.17500029 0 0 1 0 79.53750002L591.49999971 512l353.925 353.92499999c21.97500029 21.97500029 22.12499972 57.4125003 0 79.53750003a56.17500029 56.17500029 0 0 1-79.53750004 0L512 591.49999971 158.07500001 945.50000027a56.13749998 56.13749998 0 0 1-79.53750003 5e-8 56.17500029 56.17500029 0 0 1 0-79.53750002L432.50000029 512 78.49999973 158.07500001a56.13749998 56.13749998 0 0 1-5e-8-79.53750003 56.17500029 56.17500029 0 0 1 79.53750002 0L512 432.50000029z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),R2=J({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M800.421 436.525h-63.661v-148.673c0-124.507-100.762-225.757-224.732-225.757-123.98 0-224.857 101.25-224.857 225.766v148.662h-63.593c-30.667 0-55.532 24.952-55.532 55.752v407.048c0 30.848 24.865 55.82 55.532 55.82h576.9c30.667 0 55.465-24.97 55.465-55.82v-407.048c0-30.802-24.855-55.752-55.532-55.752zM543.203 706.409v88.88c-0.016 4.026-3.264 7.287-7.282 7.325h-47.733c-4.039-0.022-7.307-3.287-7.334-7.322v-88.882c-22.423-11.518-37.953-34.602-37.953-61.659 0-38.288 30.945-69.425 69.070-69.425 38.183 0 69.138 31.136 69.138 69.415 0.057 27.067-15.473 50.152-37.905 61.659zM650.514 436.525h-276.989v-144.986c0-76.691 62.196-139.146 138.552-139.146 76.366 0 138.447 62.454 138.447 139.146v144.986z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),M2=J({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M796.444 446.009H343.61V320.853c0-86.47 70.542-157.013 157.013-157.013s157.014 70.542 157.014 157.013c0 25.031 20.48 45.511 45.51 45.511s45.512-20.48 45.512-45.51c0-136.534-111.502-248.036-248.036-248.036S252.587 184.32 252.587 320.853V446.01H204.8c-25.031 0-45.511 20.48-45.511 45.511v420.978c0 25.03 20.48 45.51 45.511 45.51h591.644c25.032 0 45.512-20.48 45.512-45.51V491.52c0-25.031-20.48-45.511-45.512-45.511zM537.031 737.28c-2.275 0-4.551 2.276-4.551 4.551v43.236c0 43.235-13.653 50.062-31.858 50.062s-31.858-4.551-31.858-50.062V739.556c0-2.276-2.275-4.552-4.55-4.552-13.654-9.102-22.756-25.03-22.756-45.51 0-31.858 27.306-59.165 59.164-59.165s59.165 25.031 59.165 59.164c2.275 20.48-9.103 36.41-22.756 47.787z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),N2=J({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M915.692308 275.692308h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538462v-59.076923C78.769231 171.323077 92.553846 157.538462 108.307692 157.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538462z m0 293.415384h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-13.784615 13.784615-27.569231 29.538461-27.569231h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538461v59.076924c0 13.784615-13.784615 27.569231-29.538461 27.56923z m0 297.353846h-807.384616c-15.753846 0-29.538462-13.784615-29.538461-29.538461v-59.076923c0-15.753846 13.784615-29.538462 29.538461-29.538462h807.384616c15.753846 0 29.538462 13.784615 29.538461 29.538462v59.076923c0 15.753846-13.784615 29.538462-29.538461 29.538461z"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),F2=J({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M910.74 338.74L756.8 195.33c-11.5-10.71-27.32-16.15-43.59-14.99-1.53-0.12-3.03-0.18-4.48-0.18h-82.01l-5.75 2.98c-30.39 15.75-69.15 24.42-109.16 24.42s-78.78-8.67-109.16-24.42l-5.75-2.98h-82.02c-20.91 0-39.71 10.63-49.43 27.51L113.29 349.43C102.78 359.21 97 372.22 97 386.06c0 13.84 5.78 26.84 16.29 36.63l111.17 103.58c9.31 8.66 21.33 13.87 34.27 14.95v250.3c0 28.84 25.19 52.31 56.14 52.31h393.85c30.96 0 56.14-23.47 56.14-52.31V530.57c13.1-1 25.28-6.23 34.68-14.98l111.18-103.58c21.7-20.19 21.7-53.07 0.02-73.27z m0 0"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),z2=J({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M301.824 455.509333l-168.021333 18.261334c-5.973333 2.048-8.021333 4.010667-8.021334 8.106666-2.048 1.962667-2.048 5.973333 1.962667 10.069334l386.730667 386.730666c4.010667 4.010667 8.021333 4.010667 10.069333 1.962667 2.048-1.962667 6.058667-1.962667 8.106667-8.021333l18.261333-168.106667-249.088-249.002667z m168.106667 467.626667L83.2 536.661333C62.976 516.266667 56.917333 485.802667 65.024 457.472a80.725333 80.725333 0 0 1 62.72-50.602667l198.4-20.224 293.546667 293.546667-20.224 198.4c-4.010667 28.330667-22.272 54.613333-50.602667 62.72-28.330667 8.106667-58.709333 2.048-78.933333-18.176z m93.098666-720.64l240.896 240.896 133.632-56.661333c6.058667-2.048 6.058667-6.058667 6.058667-6.058667 2.048-2.048 2.048-6.144-2.048-10.24L637.952 66.901333C633.856 62.805333 629.76 62.805333 627.797333 64.853333c-2.048 2.048-6.058667 2.048-6.058666 6.144l-58.709334 131.584z m224.682667 317.866667L486.058667 218.709333 560.981333 46.592a73.557333 73.557333 0 0 1 54.613334-42.496 76.032 76.032 0 0 1 66.901333 22.186667l301.653333 301.738666a75.946667 75.946667 0 0 1 22.186667 66.816 73.557333 73.557333 0 0 1-42.496 54.613334l-176.128 70.826666z",color:"#FFFFFF"},{path:"M360.618667 421.12l224.682666 224.682667 165.973334-165.973334L526.592 255.146667 360.618667 421.12z m226.730666 315.818667L269.482667 419.072l255.146666-255.061333 315.733334 315.818666-255.146667 255.146667 2.133333 1.962667z",color:"#FFFFFF"},{path:"M0.256 1008.213333c-2.048-30.378667 10.069333-58.709333 30.293333-83.029333L257.365333 662.016l91.050667 91.136L85.333333 979.882667a152.576 152.576 0 0 1-84.992 28.330666",color:"#FFFFFF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),P2=J({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M943.081739 44.877913a79.09287 79.09287 0 0 1 79.805218 75.620174l0.111304 4.296348v511.510261a79.09287 79.09287 0 0 1-75.620174 79.805217l-4.296348 0.111304H685.612522v100.930783h178.799304v145.229913l-124.660869-0.022261-54.227479-54.227478h124.66087v-36.730435l-161.413565-0.022261-54.227479-54.227478h36.841739v-100.930783h-137.772521l-54.249739-54.249739h481.458087c26.000696 0 46.124522-18.988522 47.838608-44.432695l0.111305-3.494957V147.055304c0-27.158261-20.769391-47.949913-47.949913-47.949913H102.177391c-25.978435 0-46.124522 19.010783-47.838608 44.432696l-0.111305 3.517217v129.78087L0 222.608696V124.416l0.111304-3.917913A79.026087 79.026087 0 0 1 75.620174 44.966957l4.296348-0.111305h863.165217z m-38.244174 118.160696v435.021913l-529.408-0.022261L118.160696 340.769391V163.038609h786.676869z",color:"#26B8CF"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),L2=J({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>T("svg",{viewBox:"0 0 1024 1024",width:"1em",height:"1em"},[[{path:"M514.5344 192.2304c137.216 0 265.856 48.0768 346.7008 129.536l8.576 8.9344c5.888 6.144 12.288 12.16 22.8864 21.4528l30.592 26.624 13.0048 11.6224c53.76 48.8448 73.984 78.7456 73.984 120.064 0 45.952-25.088 77.6448-93.4144 136.832l-24.832 21.4528c-9.0112 7.936-14.976 13.4656-20.224 18.7904l-10.5984 11.008c-80.8192 81.4336-209.4848 129.536-346.7008 129.536-141.7216 0-272.896-50.6112-353.2544-136.3456l-8.064-8.8576-4.2496-4.4544c-6.7072-6.784-15.3088-14.336-29.8496-26.5216l-17.6896-14.72-12.4672-10.496C36.6592 581.7856 12.8 549.9392 12.8 510.464c0-41.6768 22.4768-70.7328 83.2512-122.5728l27.4688-23.1168c13.568-11.4688 21.4016-18.56 27.8016-25.3184l3.712-4.0448a30.0544 30.0544 0 1 1 44.9792 39.936l-5.76 6.2464c-6.8608 7.168-14.592 14.336-26.4448 24.4736L124.928 442.24c-12.288 10.6752-21.4528 19.328-29.2608 27.8016-15.1808 16.4352-22.784 30.0032-22.784 40.448 0 10.1376 7.2448 23.2448 21.7344 39.0912 7.8592 8.6016 17.152 17.408 29.696 28.2624l11.5968 9.856 27.2896 22.784c15.1296 12.7488 24.064 20.8896 32.0768 29.3632l11.3408 12.3648c31.7696 33.28 74.496 61.3888 124.16 81.408 55.6544 22.4512 119.2192 34.3552 183.7312 34.3552 121.2672 0 233.9072-41.5488 303.3088-111.0272l12.8512-13.2864 6.7328-6.5024c3.584-3.4048 7.6032-7.04 12.3904-11.264l44.6976-38.8352 10.9312-9.984c11.8528-11.0848 20.7104-20.4288 27.9552-29.696 11.2384-14.336 16.8192-26.624 16.8192-36.864 0-10.6752-5.9904-23.552-18.0224-38.6048-9.1648-11.4688-20.7104-23.1424-37.376-38.144l-11.904-10.496-26.7776-23.1936-12.4416-11.0592c-4.8384-4.3776-8.832-8.192-12.544-11.8784l-13.312-13.7472c-69.4272-69.4784-182.016-111.0272-303.3088-111.0272-95.1808 0-185.7024 25.472-254.7968 71.552A30.08 30.08 0 0 1 226.3808 273.92c79.0272-52.736 181.3248-81.664 288.1536-81.664z m-1.8176 111.9488c31.8976 0 62.5664 7.1168 91.008 21.12a30.08 30.08 0 0 1-26.5472 53.9392 146.4064 146.4064 0 0 0-210.688 131.3024 146.4064 146.4064 0 0 0 146.2272 146.2016 146.4064 146.4064 0 0 0 146.2272-146.2016c0-23.936-5.888-47.6672-17.0496-68.608a30.0544 30.0544 0 0 1 53.0688-28.2624 206.7712 206.7712 0 0 1 24.0896 96.8704c0 113.792-92.544 206.336-206.336 206.336s-206.336-92.544-206.336-206.336c0-113.8176 92.544-206.3616 206.336-206.3616z m97.2544 152.0128l3.2256 0.4864c16.2304 3.4048 26.6496 19.2512 23.296 35.4304-3.5072 17.4592-12.7488 42.9312-29.3888 67.4816-28.5184 42.0352-69.248 64.4352-117.504 64.4352-3.9936 0-7.9616-0.1536-12.0064-0.4608a30.0544 30.0544 0 1 1 4.4544-59.9552c29.5424 2.176 53.1456-8.448 71.424-32.384l3.3792-4.6336 2.6624-4.0704c5.888-9.3184 10.5984-19.3792 14.1568-29.4656l2.1504-6.4512a115.712 115.712 0 0 0 0.768-2.6368l1.8944-7.2192c4.352-13.3632 17.4848-21.9392 31.488-20.5568z",color:"#CCCCCC"}].map((e,t)=>T("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),H2=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:D2,Fixed:O2,Fullscreen:A2,Invisible:B2,LineHeight:C2,Maximize:mh,Minimize:vh,Popup:gh,QrCodeLogin:I2,RawClose:yh,RawLock:R2,RawUnLock:M2,Rows:N2,Skin:F2,UnFixed:z2,UserLogin:P2,Visible:L2},Symbol.toStringTag,{value:"Module"}));function ee(n,e){return Xt(J({name:n,render(){return T("i",{class:e})}}))}const U2=ee("VtjIconWindowMax","vtj-icon-window-max"),q2=ee("VtjIconWindowMin","vtj-icon-window-min"),W2=ee("VtjIconWindowClose","vtj-icon-window-close"),J2=ee("VtjIconWindowNormal","vtj-icon-window-normal"),Y2=ee("VtjIconWindowDown","vtj-icon-window-down"),K2=ee("VtjIconWindowUp","vtj-icon-window-up"),Z2=ee("VtjIconNpSave","vtj-icon-np-save"),G2=ee("VtjIconNpFile","vtj-icon-np-file"),X2=ee("VtjIconNpEdit","vtj-icon-np-edit"),Q2=ee("VtjIconNpShare","vtj-icon-np-share"),eb=ee("VtjIconNpSearch","vtj-icon-np-search"),tb=ee("VtjIconNpExport","vtj-icon-np-export"),nb=ee("VtjIconNpImport","vtj-icon-np-import"),rb=ee("VtjIconNpList","vtj-icon-np-list"),ib=ee("VtjIconNpPrint","vtj-icon-np-print"),ob=ee("VtjIconNpCancel","vtj-icon-np-cancel"),sb=ee("VtjIconNpConfirm","vtj-icon-np-confirm"),ab=ee("VtjIconNpReset","vtj-icon-np-reset"),lb=ee("VtjIconNpReturnAll","vtj-icon-np-return-all"),ub=ee("VtjIconNpReturn","vtj-icon-np-return"),cb=ee("VtjIconNpRemove","vtj-icon-np-remove"),hb=ee("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),db=ee("VtjIconNpDelete","vtj-icon-np-delete"),pb=ee("VtjIconNpExit","vtj-icon-np-exit"),fb=ee("VtjIconNpRefresh","vtj-icon-np-refresh"),mb=ee("VtjIconNpAdd","vtj-icon-np-add"),vb=ee("VtjIconNpSelect","vtj-icon-np-select"),gb=ee("VtjIconNpAddRow","vtj-icon-np-add-row"),yb=ee("VtjIconNpExtend","vtj-icon-np-extend"),bb=ee("VtjIconNpClose","vtj-icon-np-close"),wb=ee("VtjIconNpSubmit","vtj-icon-np-submit"),_b=ee("VtjIconDeps","vtj-icon-deps"),bh=ee("VtjIconBack","vtj-icon-back"),wh=ee("VtjIconHome","vtj-icon-home"),_h=ee("VtjIconApi","vtj-icon-api"),xb=ee("VtjIconExport","vtj-icon-export"),Sb=ee("VtjIconImport","vtj-icon-import"),$b=ee("VtjIconGreater","vtj-icon-greater"),jb=ee("VtjIconSmaller","vtj-icon-smaller"),Os=ee("VtjIconCheck","vtj-icon-check"),xh=ee("VtjIconSwitch","vtj-icon-switch"),As=ee("VtjIconCopy","vtj-icon-copy"),Bs=ee("VtjIconLock","vtj-icon-lock"),Sh=ee("VtjIconUnlock","vtj-icon-unlock"),Cs=ee("VtjIconLayers","vtj-icon-layers"),Eb=ee("VtjIconConsole","vtj-icon-console"),kb=ee("VtjIconTeam","vtj-icon-team"),Tb=ee("VtjIconPublish","vtj-icon-publish"),$h=ee("VtjIconPreview","vtj-icon-preview"),jh=ee("VtjIconSave","vtj-icon-save"),Eh=ee("VtjIconPc","vtj-icon-pc"),kh=ee("VtjIconPhone","vtj-icon-phone"),Th=ee("VtjIconPad","vtj-icon-pad"),Vh=ee("VtjIconRedo","vtj-icon-redo"),Dh=ee("VtjIconRefresh","vtj-icon-refresh"),Oh=ee("VtjIconUndo","vtj-icon-undo"),Ah=ee("VtjIconCategory","vtj-icon-category"),Vb=ee("VtjIconProject","vtj-icon-project"),Db=ee("VtjIconNotice","vtj-icon-notice"),Ob=ee("VtjIconFav","vtj-icon-fav"),Bh=ee("VtjIconBug","vtj-icon-bug"),Ab=ee("VtjIconFile","vtj-icon-file"),Bb=ee("VtjIconFolder","vtj-icon-folder"),Cb=ee("VtjIconUpload","vtj-icon-upload"),Ib=ee("VtjIconDownload","vtj-icon-download"),Rb=ee("VtjIconUser","vtj-icon-user"),Ch=ee("VtjIconSetting","vtj-icon-setting"),Mb=ee("VtjIconArrowRight","vtj-icon-arrow-right"),Nb=ee("VtjIconArrowLeft","vtj-icon-arrow-left"),Ih=ee("VtjIconArrowDown","vtj-icon-arrow-down"),Rh=ee("VtjIconArrowUp","vtj-icon-arrow-up"),Fb=ee("VtjIconShare","vtj-icon-share"),zb=ee("VtjIconData","vtj-icon-data"),Pb=ee("VtjIconTemplate","vtj-icon-template"),Lb=ee("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),Hb=ee("VtjIconFullscreen","vtj-icon-fullscreen"),Is=ee("VtjIconEdit","vtj-icon-edit"),Tr=ee("VtjIconRemove","vtj-icon-remove"),Ub=ee("VtjIconJs","vtj-icon-js"),qb=ee("VtjIconDatabase","vtj-icon-database"),Mh=ee("VtjIconInfo","vtj-icon-info"),Rs=ee("VtjIconPlus","vtj-icon-plus"),Wb=ee("VtjIconMinus","vtj-icon-minus"),Nh=ee("VtjIconHelp","vtj-icon-help"),Fh=ee("VtjIconVars","vtj-icon-vars"),zh=ee("VtjIconOutline","vtj-icon-outline"),Ph=ee("VtjIconVisible","vtj-icon-visible"),Ms=ee("VtjIconInvisible","vtj-icon-invisible"),Lh=ee("VtjIconDocument","vtj-icon-document"),Hh=ee("VtjIconHistory","vtj-icon-history"),Jb=ee("VtjIconFixed","vtj-icon-fixed"),Yb=ee("VtjIconUnfixed","vtj-icon-unfixed"),Uh=ee("VtjIconSearch","vtj-icon-search"),Kb=ee("VtjIconMore","vtj-icon-more"),Zb=ee("VtjIconClose","vtj-icon-close"),qh=ee("VtjIconComponents","vtj-icon-components"),Wh=ee("VtjIconBlock","vtj-icon-block"),Gb=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:_h,VtjIconArrowDown:Ih,VtjIconArrowLeft:Nb,VtjIconArrowRight:Mb,VtjIconArrowUp:Rh,VtjIconBack:bh,VtjIconBlock:Wh,VtjIconBug:Bh,VtjIconCategory:Ah,VtjIconCheck:Os,VtjIconClose:Zb,VtjIconComponents:qh,VtjIconConsole:Eb,VtjIconCopy:As,VtjIconData:zb,VtjIconDatabase:qb,VtjIconDeps:_b,VtjIconDocument:Lh,VtjIconDownload:Ib,VtjIconEdit:Is,VtjIconExitFullscreen:Lb,VtjIconExport:xb,VtjIconFav:Ob,VtjIconFile:Ab,VtjIconFixed:Jb,VtjIconFolder:Bb,VtjIconFullscreen:Hb,VtjIconGreater:$b,VtjIconHelp:Nh,VtjIconHistory:Hh,VtjIconHome:wh,VtjIconImport:Sb,VtjIconInfo:Mh,VtjIconInvisible:Ms,VtjIconJs:Ub,VtjIconLayers:Cs,VtjIconLock:Bs,VtjIconMinus:Wb,VtjIconMore:Kb,VtjIconNotice:Db,VtjIconNpAdd:mb,VtjIconNpAddRow:gb,VtjIconNpCancel:ob,VtjIconNpClose:bb,VtjIconNpConfirm:sb,VtjIconNpDelete:db,VtjIconNpEdit:X2,VtjIconNpExit:pb,VtjIconNpExport:tb,VtjIconNpExtend:yb,VtjIconNpFile:G2,VtjIconNpImport:nb,VtjIconNpList:rb,VtjIconNpPrint:ib,VtjIconNpRefresh:fb,VtjIconNpRemove:cb,VtjIconNpRemoveRow:hb,VtjIconNpReset:ab,VtjIconNpReturn:ub,VtjIconNpReturnAll:lb,VtjIconNpSave:Z2,VtjIconNpSearch:eb,VtjIconNpSelect:vb,VtjIconNpShare:Q2,VtjIconNpSubmit:wb,VtjIconOutline:zh,VtjIconPad:Th,VtjIconPc:Eh,VtjIconPhone:kh,VtjIconPlus:Rs,VtjIconPreview:$h,VtjIconProject:Vb,VtjIconPublish:Tb,VtjIconRedo:Vh,VtjIconRefresh:Dh,VtjIconRemove:Tr,VtjIconSave:jh,VtjIconSearch:Uh,VtjIconSetting:Ch,VtjIconShare:Fb,VtjIconSmaller:jb,VtjIconSwitch:xh,VtjIconTeam:kb,VtjIconTemplate:Pb,VtjIconUndo:Oh,VtjIconUnfixed:Yb,VtjIconUnlock:Sh,VtjIconUpload:Cb,VtjIconUser:Rb,VtjIconVars:Fh,VtjIconVisible:Ph,VtjIconWindowClose:W2,VtjIconWindowDown:Y2,VtjIconWindowMax:U2,VtjIconWindowMin:q2,VtjIconWindowNormal:J2,VtjIconWindowUp:K2},Symbol.toStringTag,{value:"Module"})),Ro={...Hf,...H2,...Gb};/**!
39
- * Copyright (c) 2024, VTJ.PRO All rights reserved.
40
- * @name @vtj/utils
41
- * @author CHC chenhuachun1549@dingtalk.com
42
- * @version 0.7.0
43
- * @license <a href="https://vtj.pro/license.html">MIT License</a>
44
- */var Xb={ENV_TYPE:"local",NODE_ENV:"production"},Qb=typeof global=="object"&&global&&global.Object===Object&&global;const Jh=Qb;var e6=typeof self=="object"&&self&&self.Object===Object&&self,t6=Jh||e6||Function("return this")();const gt=t6;var n6=gt.Symbol;const St=n6;var Yh=Object.prototype,r6=Yh.hasOwnProperty,i6=Yh.toString,ir=St?St.toStringTag:void 0;function o6(n){var e=r6.call(n,ir),t=n[ir];try{n[ir]=void 0;var r=!0}catch{}var i=i6.call(n);return r&&(e?n[ir]=t:delete n[ir]),i}var s6=Object.prototype,a6=s6.toString;function l6(n){return a6.call(n)}var u6="[object Null]",c6="[object Undefined]",cl=St?St.toStringTag:void 0;function It(n){return n==null?n===void 0?c6:u6:cl&&cl in Object(n)?o6(n):l6(n)}function ut(n){return n!=null&&typeof n=="object"}var h6="[object Symbol]";function Vi(n){return typeof n=="symbol"||ut(n)&&It(n)==h6}function Kh(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var d6=Array.isArray;const vt=d6;var p6=1/0,hl=St?St.prototype:void 0,dl=hl?hl.toString:void 0;function Zh(n){if(typeof n=="string")return n;if(vt(n))return Kh(n,Zh)+"";if(Vi(n))return dl?dl.call(n):"";var e=n+"";return e=="0"&&1/n==-p6?"-0":e}var f6=/\s/;function m6(n){for(var e=n.length;e--&&f6.test(n.charAt(e)););return e}var v6=/^\s+/;function g6(n){return n&&n.slice(0,m6(n)+1).replace(v6,"")}function Ne(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var pl=NaN,y6=/^[-+]0x[0-9a-f]+$/i,b6=/^0b[01]+$/i,w6=/^0o[0-7]+$/i,_6=parseInt;function fl(n){if(typeof n=="number")return n;if(Vi(n))return pl;if(Ne(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ne(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=g6(n);var t=b6.test(n);return t||w6.test(n)?_6(n.slice(2),t?2:8):y6.test(n)?pl:+n}function Gh(n){return n}var x6="[object AsyncFunction]",S6="[object Function]",$6="[object GeneratorFunction]",j6="[object Proxy]";function wr(n){if(!Ne(n))return!1;var e=It(n);return e==S6||e==$6||e==x6||e==j6}var E6=gt["__core-js_shared__"];const Xi=E6;var ml=function(){var n=/[^.]+$/.exec(Xi&&Xi.keys&&Xi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function k6(n){return!!ml&&ml in n}var T6=Function.prototype,V6=T6.toString;function _n(n){if(n!=null){try{return V6.call(n)}catch{}try{return n+""}catch{}}return""}var D6=/[\\^$.*+?()[\]{}|]/g,O6=/^\[object .+?Constructor\]$/,A6=Function.prototype,B6=Object.prototype,C6=A6.toString,I6=B6.hasOwnProperty,R6=RegExp("^"+C6.call(I6).replace(D6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function M6(n){if(!Ne(n)||k6(n))return!1;var e=wr(n)?R6:O6;return e.test(_n(n))}function N6(n,e){return n?.[e]}function xn(n,e){var t=N6(n,e);return M6(t)?t:void 0}var F6=xn(gt,"WeakMap");const Mo=F6;var vl=Object.create,z6=function(){function n(){}return function(e){if(!Ne(e))return{};if(vl)return vl(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const P6=z6;function Xh(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function Qh(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var L6=800,H6=16,U6=Date.now;function q6(n){var e=0,t=0;return function(){var r=U6(),i=H6-(r-t);if(t=r,i>0){if(++e>=L6)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function W6(n){return function(){return n}}var J6=function(){try{var n=xn(Object,"defineProperty");return n({},"",{}),n}catch{}}();const vi=J6;var Y6=vi?function(n,e){return vi(n,"toString",{configurable:!0,enumerable:!1,value:W6(e),writable:!0})}:Gh;const K6=Y6;var Z6=q6(K6);const G6=Z6;function X6(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var Q6=9007199254740991,e3=/^(?:0|[1-9]\d*)$/;function Ns(n,e){var t=typeof n;return e=e??Q6,!!e&&(t=="number"||t!="symbol"&&e3.test(n))&&n>-1&&n%1==0&&n<e}function Fs(n,e,t){e=="__proto__"&&vi?vi(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Yn(n,e){return n===e||n!==n&&e!==e}var t3=Object.prototype,n3=t3.hasOwnProperty;function zs(n,e,t){var r=n[e];(!(n3.call(n,e)&&Yn(r,t))||t===void 0&&!(e in n))&&Fs(n,e,t)}function Kn(n,e,t,r){var i=!t;t||(t={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(t[a],n[a],a,t,n):void 0;u===void 0&&(u=n[a]),i?Fs(t,a,u):zs(t,a,u)}return t}var gl=Math.max;function r3(n,e,t){return e=gl(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=gl(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(s),Xh(n,this,a)}}function ed(n,e){return G6(r3(n,e,Gh),n+"")}var i3=9007199254740991;function td(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=i3}function Di(n){return n!=null&&td(n.length)&&!wr(n)}function nd(n,e,t){if(!Ne(t))return!1;var r=typeof e;return(r=="number"?Di(t)&&Ns(e,t.length):r=="string"&&e in t)?Yn(t[e],n):!1}function rd(n){return ed(function(e,t){var r=-1,i=t.length,o=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,s&&nd(t[0],t[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,o)}return e})}var o3=Object.prototype;function Ps(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||o3;return n===t}function s3(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var a3="[object Arguments]";function yl(n){return ut(n)&&It(n)==a3}var id=Object.prototype,l3=id.hasOwnProperty,u3=id.propertyIsEnumerable,c3=yl(function(){return arguments}())?yl:function(n){return ut(n)&&l3.call(n,"callee")&&!u3.call(n,"callee")};const No=c3;function h3(){return!1}var od=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bl=od&&typeof module=="object"&&module&&!module.nodeType&&module,d3=bl&&bl.exports===od,wl=d3?gt.Buffer:void 0,p3=wl?wl.isBuffer:void 0,f3=p3||h3;const _r=f3;var m3="[object Arguments]",v3="[object Array]",g3="[object Boolean]",y3="[object Date]",b3="[object Error]",w3="[object Function]",_3="[object Map]",x3="[object Number]",S3="[object Object]",$3="[object RegExp]",j3="[object Set]",E3="[object String]",k3="[object WeakMap]",T3="[object ArrayBuffer]",V3="[object DataView]",D3="[object Float32Array]",O3="[object Float64Array]",A3="[object Int8Array]",B3="[object Int16Array]",C3="[object Int32Array]",I3="[object Uint8Array]",R3="[object Uint8ClampedArray]",M3="[object Uint16Array]",N3="[object Uint32Array]",$e={};$e[D3]=$e[O3]=$e[A3]=$e[B3]=$e[C3]=$e[I3]=$e[R3]=$e[M3]=$e[N3]=!0,$e[m3]=$e[v3]=$e[T3]=$e[g3]=$e[V3]=$e[y3]=$e[b3]=$e[w3]=$e[_3]=$e[x3]=$e[S3]=$e[$3]=$e[j3]=$e[E3]=$e[k3]=!1;function F3(n){return ut(n)&&td(n.length)&&!!$e[It(n)]}function Ls(n){return function(e){return n(e)}}var sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mr=sd&&typeof module=="object"&&module&&!module.nodeType&&module,z3=mr&&mr.exports===sd,Qi=z3&&Jh.process,P3=function(){try{var n=mr&&mr.require&&mr.require("util").types;return n||Qi&&Qi.binding&&Qi.binding("util")}catch{}}();const $t=P3;var _l=$t&&$t.isTypedArray,L3=_l?Ls(_l):F3;const Hs=L3;var H3=Object.prototype,U3=H3.hasOwnProperty;function ad(n,e){var t=vt(n),r=!t&&No(n),i=!t&&!r&&_r(n),o=!t&&!r&&!i&&Hs(n),s=t||r||i||o,a=s?s3(n.length,String):[],u=a.length;for(var l in n)(e||U3.call(n,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ns(l,u)))&&a.push(l);return a}function ld(n,e){return function(t){return n(e(t))}}var q3=ld(Object.keys,Object);const W3=q3;var J3=Object.prototype,Y3=J3.hasOwnProperty;function K3(n){if(!Ps(n))return W3(n);var e=[];for(var t in Object(n))Y3.call(n,t)&&t!="constructor"&&e.push(t);return e}function Oi(n){return Di(n)?ad(n):K3(n)}function Z3(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var G3=Object.prototype,X3=G3.hasOwnProperty;function Q3(n){if(!Ne(n))return Z3(n);var e=Ps(n),t=[];for(var r in n)r=="constructor"&&(e||!X3.call(n,r))||t.push(r);return t}function Zn(n){return Di(n)?ad(n,!0):Q3(n)}var ew=rd(function(n,e,t,r){Kn(e,Zn(e),n,r)});const xl=ew;var tw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nw=/^\w*$/;function rw(n,e){if(vt(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Vi(n)?!0:nw.test(n)||!tw.test(n)||e!=null&&n in Object(e)}var iw=xn(Object,"create");const xr=iw;function ow(){this.__data__=xr?xr(null):{},this.size=0}function sw(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var aw="__lodash_hash_undefined__",lw=Object.prototype,uw=lw.hasOwnProperty;function cw(n){var e=this.__data__;if(xr){var t=e[n];return t===aw?void 0:t}return uw.call(e,n)?e[n]:void 0}var hw=Object.prototype,dw=hw.hasOwnProperty;function pw(n){var e=this.__data__;return xr?e[n]!==void 0:dw.call(e,n)}var fw="__lodash_hash_undefined__";function mw(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=xr&&e===void 0?fw:e,this}function vn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}vn.prototype.clear=ow,vn.prototype.delete=sw,vn.prototype.get=cw,vn.prototype.has=pw,vn.prototype.set=mw;function vw(){this.__data__=[],this.size=0}function Ai(n,e){for(var t=n.length;t--;)if(Yn(n[t][0],e))return t;return-1}var gw=Array.prototype,yw=gw.splice;function bw(n){var e=this.__data__,t=Ai(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():yw.call(e,t,1),--this.size,!0}function ww(n){var e=this.__data__,t=Ai(e,n);return t<0?void 0:e[t][1]}function _w(n){return Ai(this.__data__,n)>-1}function xw(n,e){var t=this.__data__,r=Ai(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Dt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Dt.prototype.clear=vw,Dt.prototype.delete=bw,Dt.prototype.get=ww,Dt.prototype.has=_w,Dt.prototype.set=xw;var Sw=xn(gt,"Map");const Sr=Sw;function $w(){this.size=0,this.__data__={hash:new vn,map:new(Sr||Dt),string:new vn}}function jw(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Bi(n,e){var t=n.__data__;return jw(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Ew(n){var e=Bi(this,n).delete(n);return this.size-=e?1:0,e}function kw(n){return Bi(this,n).get(n)}function Tw(n){return Bi(this,n).has(n)}function Vw(n,e){var t=Bi(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Ot(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Ot.prototype.clear=$w,Ot.prototype.delete=Ew,Ot.prototype.get=kw,Ot.prototype.has=Tw,Ot.prototype.set=Vw;var Dw="Expected a function";function Us(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Dw);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var s=n.apply(this,r);return t.cache=o.set(i,s)||o,s};return t.cache=new(Us.Cache||Ot),t}Us.Cache=Ot;var Ow=500;function Aw(n){var e=Us(n,function(r){return t.size===Ow&&t.clear(),r}),t=e.cache;return e}var Bw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cw=/\\(\\)?/g,Iw=Aw(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Bw,function(t,r,i,o){e.push(i?o.replace(Cw,"$1"):r||t)}),e});const Rw=Iw;function Sn(n){return n==null?"":Zh(n)}function ud(n,e){return vt(n)?n:rw(n,e)?[n]:Rw(Sn(n))}var Mw=1/0;function cd(n){if(typeof n=="string"||Vi(n))return n;var e=n+"";return e=="0"&&1/n==-Mw?"-0":e}function Nw(n,e){e=ud(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[cd(e[t++])];return t&&t==r?n:void 0}function ri(n,e,t){var r=n==null?void 0:Nw(n,e);return r===void 0?t:r}function hd(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var Fw=ld(Object.getPrototypeOf,Object);const qs=Fw;var zw="[object Object]",Pw=Function.prototype,Lw=Object.prototype,dd=Pw.toString,Hw=Lw.hasOwnProperty,Uw=dd.call(Object);function Ws(n){if(!ut(n)||It(n)!=zw)return!1;var e=qs(n);if(e===null)return!0;var t=Hw.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&dd.call(t)==Uw}var qw="[object DOMException]",Ww="[object Error]";function pd(n){if(!ut(n))return!1;var e=It(n);return e==Ww||e==qw||typeof n.message=="string"&&typeof n.name=="string"&&!Ws(n)}var Jw=ed(function(n,e){try{return Xh(n,void 0,e)}catch(t){return pd(t)?t:new Error(t)}});const Yw=Jw;function Kw(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=n[r+e];return o}function Zw(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:Kw(n,e,t)}var Gw="\\ud800-\\udfff",Xw="\\u0300-\\u036f",Qw="\\ufe20-\\ufe2f",e4="\\u20d0-\\u20ff",t4=Xw+Qw+e4,n4="\\ufe0e\\ufe0f",r4="\\u200d",i4=RegExp("["+r4+Gw+t4+n4+"]");function fd(n){return i4.test(n)}function o4(n){return n.split("")}var md="\\ud800-\\udfff",s4="\\u0300-\\u036f",a4="\\ufe20-\\ufe2f",l4="\\u20d0-\\u20ff",u4=s4+a4+l4,c4="\\ufe0e\\ufe0f",h4="["+md+"]",Fo="["+u4+"]",zo="\\ud83c[\\udffb-\\udfff]",d4="(?:"+Fo+"|"+zo+")",vd="[^"+md+"]",gd="(?:\\ud83c[\\udde6-\\uddff]){2}",yd="[\\ud800-\\udbff][\\udc00-\\udfff]",p4="\\u200d",bd=d4+"?",wd="["+c4+"]?",f4="(?:"+p4+"(?:"+[vd,gd,yd].join("|")+")"+wd+bd+")*",m4=wd+bd+f4,v4="(?:"+[vd+Fo+"?",Fo,gd,yd,h4].join("|")+")",g4=RegExp(zo+"(?="+zo+")|"+v4+m4,"g");function y4(n){return n.match(g4)||[]}function b4(n){return fd(n)?y4(n):o4(n)}function w4(n){return function(e){e=Sn(e);var t=fd(e)?b4(e):void 0,r=t?t[0]:e.charAt(0),i=t?Zw(t,1).join(""):e.slice(1);return r[n]()+i}}var _4=w4("toUpperCase");const Js=_4;function x4(n){return Js(Sn(n).toLowerCase())}function S4(n,e,t,r){var i=-1,o=n==null?0:n.length;for(r&&o&&(t=n[++i]);++i<o;)t=e(t,n[i],i,n);return t}function _d(n){return function(e){return n?.[e]}}var $4={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},j4=_d($4);const E4=j4;var k4=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,T4="\\u0300-\\u036f",V4="\\ufe20-\\ufe2f",D4="\\u20d0-\\u20ff",O4=T4+V4+D4,A4="["+O4+"]",B4=RegExp(A4,"g");function C4(n){return n=Sn(n),n&&n.replace(k4,E4).replace(B4,"")}var I4=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function R4(n){return n.match(I4)||[]}var M4=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function N4(n){return M4.test(n)}var xd="\\ud800-\\udfff",F4="\\u0300-\\u036f",z4="\\ufe20-\\ufe2f",P4="\\u20d0-\\u20ff",L4=F4+z4+P4,Sd="\\u2700-\\u27bf",$d="a-z\\xdf-\\xf6\\xf8-\\xff",H4="\\xac\\xb1\\xd7\\xf7",U4="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",q4="\\u2000-\\u206f",W4=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jd="A-Z\\xc0-\\xd6\\xd8-\\xde",J4="\\ufe0e\\ufe0f",Ed=H4+U4+q4+W4,kd="['’]",Sl="["+Ed+"]",Y4="["+L4+"]",Td="\\d+",K4="["+Sd+"]",Vd="["+$d+"]",Dd="[^"+xd+Ed+Td+Sd+$d+jd+"]",Z4="\\ud83c[\\udffb-\\udfff]",G4="(?:"+Y4+"|"+Z4+")",X4="[^"+xd+"]",Od="(?:\\ud83c[\\udde6-\\uddff]){2}",Ad="[\\ud800-\\udbff][\\udc00-\\udfff]",Dn="["+jd+"]",Q4="\\u200d",$l="(?:"+Vd+"|"+Dd+")",e8="(?:"+Dn+"|"+Dd+")",jl="(?:"+kd+"(?:d|ll|m|re|s|t|ve))?",El="(?:"+kd+"(?:D|LL|M|RE|S|T|VE))?",Bd=G4+"?",Cd="["+J4+"]?",t8="(?:"+Q4+"(?:"+[X4,Od,Ad].join("|")+")"+Cd+Bd+")*",n8="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",r8="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",i8=Cd+Bd+t8,o8="(?:"+[K4,Od,Ad].join("|")+")"+i8,s8=RegExp([Dn+"?"+Vd+"+"+jl+"(?="+[Sl,Dn,"$"].join("|")+")",e8+"+"+El+"(?="+[Sl,Dn+$l,"$"].join("|")+")",Dn+"?"+$l+"+"+jl,Dn+"+"+El,r8,n8,Td,o8].join("|"),"g");function a8(n){return n.match(s8)||[]}function l8(n,e,t){return n=Sn(n),e=t?void 0:e,e===void 0?N4(n)?a8(n):R4(n):n.match(e)||[]}var u8="['’]",c8=RegExp(u8,"g");function h8(n){return function(e){return S4(l8(C4(e).replace(c8,"")),n,"")}}var d8=h8(function(n,e,t){return e=e.toLowerCase(),n+(t?x4(e):e)});const dn=d8;function p8(){this.__data__=new Dt,this.size=0}function f8(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function m8(n){return this.__data__.get(n)}function v8(n){return this.__data__.has(n)}var g8=200;function y8(n,e){var t=this.__data__;if(t instanceof Dt){var r=t.__data__;if(!Sr||r.length<g8-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Ot(r)}return t.set(n,e),this.size=t.size,this}function bt(n){var e=this.__data__=new Dt(n);this.size=e.size}bt.prototype.clear=p8,bt.prototype.delete=f8,bt.prototype.get=m8,bt.prototype.has=v8,bt.prototype.set=y8;function b8(n,e){return n&&Kn(e,Oi(e),n)}function w8(n,e){return n&&Kn(e,Zn(e),n)}var Id=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kl=Id&&typeof module=="object"&&module&&!module.nodeType&&module,_8=kl&&kl.exports===Id,Tl=_8?gt.Buffer:void 0,Vl=Tl?Tl.allocUnsafe:void 0;function Rd(n,e){if(e)return n.slice();var t=n.length,r=Vl?Vl(t):new n.constructor(t);return n.copy(r),r}function x8(n,e){for(var t=-1,r=n==null?0:n.length,i=0,o=[];++t<r;){var s=n[t];e(s,t,n)&&(o[i++]=s)}return o}function Md(){return[]}var S8=Object.prototype,$8=S8.propertyIsEnumerable,Dl=Object.getOwnPropertySymbols,j8=Dl?function(n){return n==null?[]:(n=Object(n),x8(Dl(n),function(e){return $8.call(n,e)}))}:Md;const Ys=j8;function E8(n,e){return Kn(n,Ys(n),e)}var k8=Object.getOwnPropertySymbols,T8=k8?function(n){for(var e=[];n;)hd(e,Ys(n)),n=qs(n);return e}:Md;const Nd=T8;function V8(n,e){return Kn(n,Nd(n),e)}function Fd(n,e,t){var r=e(n);return vt(n)?r:hd(r,t(n))}function Po(n){return Fd(n,Oi,Ys)}function D8(n){return Fd(n,Zn,Nd)}var O8=xn(gt,"DataView");const Lo=O8;var A8=xn(gt,"Promise");const Ho=A8;var B8=xn(gt,"Set");const Uo=B8;var Ol="[object Map]",C8="[object Object]",Al="[object Promise]",Bl="[object Set]",Cl="[object WeakMap]",Il="[object DataView]",I8=_n(Lo),R8=_n(Sr),M8=_n(Ho),N8=_n(Uo),F8=_n(Mo),pn=It;(Lo&&pn(new Lo(new ArrayBuffer(1)))!=Il||Sr&&pn(new Sr)!=Ol||Ho&&pn(Ho.resolve())!=Al||Uo&&pn(new Uo)!=Bl||Mo&&pn(new Mo)!=Cl)&&(pn=function(n){var e=It(n),t=e==C8?n.constructor:void 0,r=t?_n(t):"";if(r)switch(r){case I8:return Il;case R8:return Ol;case M8:return Al;case N8:return Bl;case F8:return Cl}return e});const $r=pn;var z8=Object.prototype,P8=z8.hasOwnProperty;function L8(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&P8.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var H8=gt.Uint8Array;const gi=H8;function Ks(n){var e=new n.constructor(n.byteLength);return new gi(e).set(new gi(n)),e}function U8(n,e){var t=e?Ks(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var q8=/\w*$/;function W8(n){var e=new n.constructor(n.source,q8.exec(n));return e.lastIndex=n.lastIndex,e}var Rl=St?St.prototype:void 0,Ml=Rl?Rl.valueOf:void 0;function J8(n){return Ml?Object(Ml.call(n)):{}}function zd(n,e){var t=e?Ks(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var Y8="[object Boolean]",K8="[object Date]",Z8="[object Map]",G8="[object Number]",X8="[object RegExp]",Q8="[object Set]",e5="[object String]",t5="[object Symbol]",n5="[object ArrayBuffer]",r5="[object DataView]",i5="[object Float32Array]",o5="[object Float64Array]",s5="[object Int8Array]",a5="[object Int16Array]",l5="[object Int32Array]",u5="[object Uint8Array]",c5="[object Uint8ClampedArray]",h5="[object Uint16Array]",d5="[object Uint32Array]";function p5(n,e,t){var r=n.constructor;switch(e){case n5:return Ks(n);case Y8:case K8:return new r(+n);case r5:return U8(n,t);case i5:case o5:case s5:case a5:case l5:case u5:case c5:case h5:case d5:return zd(n,t);case Z8:return new r;case G8:case e5:return new r(n);case X8:return W8(n);case Q8:return new r;case t5:return J8(n)}}function Pd(n){return typeof n.constructor=="function"&&!Ps(n)?P6(qs(n)):{}}var f5="[object Map]";function m5(n){return ut(n)&&$r(n)==f5}var Nl=$t&&$t.isMap,v5=Nl?Ls(Nl):m5;const g5=v5;var y5="[object Set]";function b5(n){return ut(n)&&$r(n)==y5}var Fl=$t&&$t.isSet,w5=Fl?Ls(Fl):b5;const _5=w5;var x5=1,S5=2,$5=4,Ld="[object Arguments]",j5="[object Array]",E5="[object Boolean]",k5="[object Date]",T5="[object Error]",Hd="[object Function]",V5="[object GeneratorFunction]",D5="[object Map]",O5="[object Number]",Ud="[object Object]",A5="[object RegExp]",B5="[object Set]",C5="[object String]",I5="[object Symbol]",R5="[object WeakMap]",M5="[object ArrayBuffer]",N5="[object DataView]",F5="[object Float32Array]",z5="[object Float64Array]",P5="[object Int8Array]",L5="[object Int16Array]",H5="[object Int32Array]",U5="[object Uint8Array]",q5="[object Uint8ClampedArray]",W5="[object Uint16Array]",J5="[object Uint32Array]",we={};we[Ld]=we[j5]=we[M5]=we[N5]=we[E5]=we[k5]=we[F5]=we[z5]=we[P5]=we[L5]=we[H5]=we[D5]=we[O5]=we[Ud]=we[A5]=we[B5]=we[C5]=we[I5]=we[U5]=we[q5]=we[W5]=we[J5]=!0,we[T5]=we[Hd]=we[R5]=!1;function ii(n,e,t,r,i,o){var s,a=e&x5,u=e&S5,l=e&$5;if(t&&(s=i?t(n,r,i,o):t(n)),s!==void 0)return s;if(!Ne(n))return n;var c=vt(n);if(c){if(s=L8(n),!a)return Qh(n,s)}else{var h=$r(n),d=h==Hd||h==V5;if(_r(n))return Rd(n,a);if(h==Ud||h==Ld||d&&!i){if(s=u||d?{}:Pd(n),!a)return u?V8(n,w8(s,n)):E8(n,b8(s,n))}else{if(!we[h])return i?n:{};s=p5(n,h,a)}}o||(o=new bt);var p=o.get(n);if(p)return p;o.set(n,s),_5(n)?n.forEach(function(y){s.add(ii(y,e,t,y,n,o))}):g5(n)&&n.forEach(function(y,$){s.set($,ii(y,e,t,$,n,o))});var f=l?u?D8:Po:u?Zn:Oi,v=c?void 0:f(n);return X6(v||n,function(y,$){v&&($=y,y=n[$]),zs(s,$,ii(y,e,t,$,n,o))}),s}var Y5=1,K5=4;function Ci(n){return ii(n,Y5|K5)}var Z5="__lodash_hash_undefined__";function G5(n){return this.__data__.set(n,Z5),this}function X5(n){return this.__data__.has(n)}function oi(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Ot;++e<t;)this.add(n[e])}oi.prototype.add=oi.prototype.push=G5,oi.prototype.has=X5;function Q5(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function e_(n,e){return n.has(e)}var t_=1,n_=2;function qd(n,e,t,r,i,o){var s=t&t_,a=n.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var l=o.get(n),c=o.get(e);if(l&&c)return l==e&&c==n;var h=-1,d=!0,p=t&n_?new oi:void 0;for(o.set(n,e),o.set(e,n);++h<a;){var f=n[h],v=e[h];if(r)var y=s?r(v,f,h,e,n,o):r(f,v,h,n,e,o);if(y!==void 0){if(y)continue;d=!1;break}if(p){if(!Q5(e,function($,g){if(!e_(p,g)&&(f===$||i(f,$,t,r,o)))return p.push(g)})){d=!1;break}}else if(!(f===v||i(f,v,t,r,o))){d=!1;break}}return o.delete(n),o.delete(e),d}function r_(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function i_(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var o_=1,s_=2,a_="[object Boolean]",l_="[object Date]",u_="[object Error]",c_="[object Map]",h_="[object Number]",d_="[object RegExp]",p_="[object Set]",f_="[object String]",m_="[object Symbol]",v_="[object ArrayBuffer]",g_="[object DataView]",zl=St?St.prototype:void 0,eo=zl?zl.valueOf:void 0;function y_(n,e,t,r,i,o,s){switch(t){case g_:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case v_:return!(n.byteLength!=e.byteLength||!o(new gi(n),new gi(e)));case a_:case l_:case h_:return Yn(+n,+e);case u_:return n.name==e.name&&n.message==e.message;case d_:case f_:return n==e+"";case c_:var a=r_;case p_:var u=r&o_;if(a||(a=i_),n.size!=e.size&&!u)return!1;var l=s.get(n);if(l)return l==e;r|=s_,s.set(n,e);var c=qd(a(n),a(e),r,i,o,s);return s.delete(n),c;case m_:if(eo)return eo.call(n)==eo.call(e)}return!1}var b_=1,w_=Object.prototype,__=w_.hasOwnProperty;function x_(n,e,t,r,i,o){var s=t&b_,a=Po(n),u=a.length,l=Po(e),c=l.length;if(u!=c&&!s)return!1;for(var h=u;h--;){var d=a[h];if(!(s?d in e:__.call(e,d)))return!1}var p=o.get(n),f=o.get(e);if(p&&f)return p==e&&f==n;var v=!0;o.set(n,e),o.set(e,n);for(var y=s;++h<u;){d=a[h];var $=n[d],g=e[d];if(r)var w=s?r(g,$,d,e,n,o):r($,g,d,n,e,o);if(!(w===void 0?$===g||i($,g,t,r,o):w)){v=!1;break}y||(y=d=="constructor")}if(v&&!y){var _=n.constructor,x=e.constructor;_!=x&&"constructor"in n&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof x=="function"&&x instanceof x)&&(v=!1)}return o.delete(n),o.delete(e),v}var S_=1,Pl="[object Arguments]",Ll="[object Array]",Fr="[object Object]",$_=Object.prototype,Hl=$_.hasOwnProperty;function j_(n,e,t,r,i,o){var s=vt(n),a=vt(e),u=s?Ll:$r(n),l=a?Ll:$r(e);u=u==Pl?Fr:u,l=l==Pl?Fr:l;var c=u==Fr,h=l==Fr,d=u==l;if(d&&_r(n)){if(!_r(e))return!1;s=!0,c=!1}if(d&&!c)return o||(o=new bt),s||Hs(n)?qd(n,e,t,r,i,o):y_(n,e,u,t,r,i,o);if(!(t&S_)){var p=c&&Hl.call(n,"__wrapped__"),f=h&&Hl.call(e,"__wrapped__");if(p||f){var v=p?n.value():n,y=f?e.value():e;return o||(o=new bt),i(v,y,t,r,o)}}return d?(o||(o=new bt),x_(n,e,t,r,i,o)):!1}function Wd(n,e,t,r,i){return n===e?!0:n==null||e==null||!ut(n)&&!ut(e)?n!==n&&e!==e:j_(n,e,t,r,Wd,i)}function E_(n){return function(e,t,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var u=s[n?a:++i];if(t(o[u],u,o)===!1)break}return e}}var k_=E_();const T_=k_;var V_=function(){return gt.Date.now()};const to=V_;var D_="Expected a function",O_=Math.max,A_=Math.min;function Jd(n,e,t){var r,i,o,s,a,u,l=0,c=!1,h=!1,d=!0;if(typeof n!="function")throw new TypeError(D_);e=fl(e)||0,Ne(t)&&(c=!!t.leading,h="maxWait"in t,o=h?O_(fl(t.maxWait)||0,e):o,d="trailing"in t?!!t.trailing:d);function p(b){var E=r,O=i;return r=i=void 0,l=b,s=n.apply(O,E),s}function f(b){return l=b,a=setTimeout($,e),c?p(b):s}function v(b){var E=b-u,O=b-l,H=e-E;return h?A_(H,o-O):H}function y(b){var E=b-u,O=b-l;return u===void 0||E>=e||E<0||h&&O>=o}function $(){var b=to();if(y(b))return g(b);a=setTimeout($,v(b))}function g(b){return a=void 0,d&&r?p(b):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function _(){return a===void 0?s:g(to())}function x(){var b=to(),E=y(b);if(r=arguments,i=this,u=b,E){if(a===void 0)return f(u);if(h)return clearTimeout(a),a=setTimeout($,e),p(u)}return a===void 0&&(a=setTimeout($,e)),s}return x.cancel=w,x.flush=_,x}function qo(n,e,t){(t!==void 0&&!Yn(n[e],t)||t===void 0&&!(e in n))&&Fs(n,e,t)}function B_(n){return ut(n)&&Di(n)}function Wo(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function C_(n){return Kn(n,Zn(n))}function I_(n,e,t,r,i,o,s){var a=Wo(n,t),u=Wo(e,t),l=s.get(u);if(l){qo(n,t,l);return}var c=o?o(a,u,t+"",n,e,s):void 0,h=c===void 0;if(h){var d=vt(u),p=!d&&_r(u),f=!d&&!p&&Hs(u);c=u,d||p||f?vt(a)?c=a:B_(a)?c=Qh(a):p?(h=!1,c=Rd(u,!0)):f?(h=!1,c=zd(u,!0)):c=[]:Ws(u)||No(u)?(c=a,No(a)?c=C_(a):(!Ne(a)||wr(a))&&(c=Pd(u))):h=!1}h&&(s.set(u,c),i(c,u,r,o,s),s.delete(u)),qo(n,t,c)}function Yd(n,e,t,r,i){n!==e&&T_(e,function(o,s){if(i||(i=new bt),Ne(o))I_(n,e,s,t,Yd,r,i);else{var a=r?r(Wo(n,s),o,s+"",n,e,i):void 0;a===void 0&&(a=o),qo(n,s,a)}},Zn)}var R_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},M_=_d(R_);const N_=M_;var Kd=/[&<>"']/g,F_=RegExp(Kd.source);function z_(n){return n=Sn(n),n&&F_.test(n)?n.replace(Kd,N_):n}var P_="[object String]";function Gn(n){return typeof n=="string"||!vt(n)&&ut(n)&&It(n)==P_}function L_(n,e){return Kh(e,function(t){return n[t]})}$t&&$t.isArrayBuffer;$t&&$t.isDate;function Zs(n,e){return Wd(n,e)}var H_=rd(function(n,e,t){Yd(n,e,t)});const Kt=H_;function U_(n,e,t,r){if(!Ne(n))return n;e=ud(e,n);for(var i=-1,o=e.length,s=o-1,a=n;a!=null&&++i<o;){var u=cd(e[i]),l=t;if(u==="__proto__"||u==="constructor"||u==="prototype")return n;if(i!=s){var c=a[u];l=r?r(c,u,a):void 0,l===void 0&&(l=Ne(c)?c:Ns(e[i+1])?[]:{})}zs(a,u,l),a=a[u]}return n}function no(n,e,t){return n==null?n:U_(n,e,t)}var Zd=Object.prototype,q_=Zd.hasOwnProperty;function Ul(n,e,t,r){return n===void 0||Yn(n,Zd[t])&&!q_.call(r,t)?e:n}var W_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function J_(n){return"\\"+W_[n]}var Y_=/<%=([\s\S]+?)%>/g;const Gd=Y_;var K_=/<%-([\s\S]+?)%>/g;const Z_=K_;var G_=/<%([\s\S]+?)%>/g;const X_=G_;var Q_={escape:Z_,evaluate:X_,interpolate:Gd,variable:"",imports:{_:{escape:z_}}};const ql=Q_;var ex="Invalid `variable` option passed into `_.template`",tx=/\b__p \+= '';/g,nx=/\b(__p \+=) '' \+/g,rx=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ix=/[()=,{}\[\]\/\s]/,ox=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zr=/($^)/,sx=/['\n\r\u2028\u2029\\]/g,ax=Object.prototype,Wl=ax.hasOwnProperty;function Xd(n,e,t){var r=ql.imports._.templateSettings||ql;t&&nd(n,e,t)&&(e=void 0),n=Sn(n),e=xl({},e,r,Ul);var i=xl({},e.imports,r.imports,Ul),o=Oi(i),s=L_(i,o),a,u,l=0,c=e.interpolate||zr,h="__p += '",d=RegExp((e.escape||zr).source+"|"+c.source+"|"+(c===Gd?ox:zr).source+"|"+(e.evaluate||zr).source+"|$","g"),p=Wl.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
45
- `:"";n.replace(d,function(y,$,g,w,_,x){return g||(g=w),h+=n.slice(l,x).replace(sx,J_),$&&(a=!0,h+=`' +
46
- __e(`+$+`) +
47
- '`),_&&(u=!0,h+=`';
48
- `+_+`;
49
- __p += '`),g&&(h+=`' +
50
- ((__t = (`+g+`)) == null ? '' : __t) +
51
- '`),l=x+y.length,y}),h+=`';
52
- `;var f=Wl.call(e,"variable")&&e.variable;if(!f)h=`with (obj) {
53
- `+h+`
54
- }
55
- `;else if(ix.test(f))throw new Error(ex);h=(u?h.replace(tx,""):h).replace(nx,"$1").replace(rx,"$1;"),h="function("+(f||"obj")+`) {
56
- `+(f?"":`obj || (obj = {});
57
- `)+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?`, __j = Array.prototype.join;
58
- function print() { __p += __j.call(arguments, '') }
59
- `:`;
60
- `)+h+`return __p
61
- }`;var v=Yw(function(){return Function(o,p+"return "+h).apply(void 0,s)});if(v.source=h,pd(v))throw v;return v}var lx="Expected a function";function ux(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(lx);return Ne(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),Jd(n,e,{leading:r,maxWait:e,trailing:i})}function Qd(n){return Js(dn(n))}var Ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ep={exports:{}};function cx(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Jl={exports:{}},Yl;function sn(){return Yl||(Yl=1,function(n,e){(function(t,r){n.exports=r()})(Ze,function(){var t=t||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Ze<"u"&&Ze.crypto&&(o=Ze.crypto),!o&&typeof cx=="function")try{o=require("crypto")}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function g(){}return function(w){var _;return g.prototype=w,_=new g,g.prototype=null,_}}(),u={},l=u.lib={},c=l.Base=function(){return{extend:function(g){var w=a(this);return g&&w.mixIn(g),(!w.hasOwnProperty("init")||this.init===w.init)&&(w.init=function(){w.$super.init.apply(this,arguments)}),w.init.prototype=w,w.$super=this,w},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var w in g)g.hasOwnProperty(w)&&(this[w]=g[w]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=l.WordArray=c.extend({init:function(g,w){g=this.words=g||[],w!=i?this.sigBytes=w:this.sigBytes=g.length*4},toString:function(g){return(g||p).stringify(this)},concat:function(g){var w=this.words,_=g.words,x=this.sigBytes,b=g.sigBytes;if(this.clamp(),x%4)for(var E=0;E<b;E++){var O=_[E>>>2]>>>24-E%4*8&255;w[x+E>>>2]|=O<<24-(x+E)%4*8}else for(var H=0;H<b;H+=4)w[x+H>>>2]=_[H>>>2];return this.sigBytes+=b,this},clamp:function(){var g=this.words,w=this.sigBytes;g[w>>>2]&=4294967295<<32-w%4*8,g.length=r.ceil(w/4)},clone:function(){var g=c.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var w=[],_=0;_<g;_+=4)w.push(s());return new h.init(w,g)}}),d=u.enc={},p=d.Hex={stringify:function(g){for(var w=g.words,_=g.sigBytes,x=[],b=0;b<_;b++){var E=w[b>>>2]>>>24-b%4*8&255;x.push((E>>>4).toString(16)),x.push((E&15).toString(16))}return x.join("")},parse:function(g){for(var w=g.length,_=[],x=0;x<w;x+=2)_[x>>>3]|=parseInt(g.substr(x,2),16)<<24-x%8*4;return new h.init(_,w/2)}},f=d.Latin1={stringify:function(g){for(var w=g.words,_=g.sigBytes,x=[],b=0;b<_;b++){var E=w[b>>>2]>>>24-b%4*8&255;x.push(String.fromCharCode(E))}return x.join("")},parse:function(g){for(var w=g.length,_=[],x=0;x<w;x++)_[x>>>2]|=(g.charCodeAt(x)&255)<<24-x%4*8;return new h.init(_,w)}},v=d.Utf8={stringify:function(g){try{return decodeURIComponent(escape(f.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return f.parse(unescape(encodeURIComponent(g)))}},y=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=v.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var w,_=this._data,x=_.words,b=_.sigBytes,E=this.blockSize,O=E*4,H=b/O;g?H=r.ceil(H):H=r.max((H|0)-this._minBufferSize,0);var S=H*E,j=r.min(S*4,b);if(S){for(var N=0;N<S;N+=E)this._doProcessBlock(x,N);w=x.splice(0,S),_.sigBytes-=j}return new h.init(w,j)},clone:function(){var g=c.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0});l.Hasher=y.extend({cfg:c.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var w=this._doFinalize();return w},blockSize:16,_createHelper:function(g){return function(w,_){return new g.init(_).finalize(w)}},_createHmacHelper:function(g){return function(w,_){return new $.HMAC.init(g,_).finalize(w)}}});var $=u.algo={};return u}(Math);return t})}(Jl)),Jl.exports}(function(n,e){(function(t,r){n.exports=r(sn())})(Ze,function(t){return function(r){var i=t,o=i.lib,s=o.WordArray,a=o.Hasher,u=i.algo,l=[];(function(){for(var v=0;v<64;v++)l[v]=r.abs(r.sin(v+1))*4294967296|0})();var c=u.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,y){for(var $=0;$<16;$++){var g=y+$,w=v[g];v[g]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var _=this._hash.words,x=v[y+0],b=v[y+1],E=v[y+2],O=v[y+3],H=v[y+4],S=v[y+5],j=v[y+6],N=v[y+7],V=v[y+8],z=v[y+9],B=v[y+10],R=v[y+11],U=v[y+12],P=v[y+13],G=v[y+14],X=v[y+15],D=_[0],C=_[1],I=_[2],M=_[3];D=h(D,C,I,M,x,7,l[0]),M=h(M,D,C,I,b,12,l[1]),I=h(I,M,D,C,E,17,l[2]),C=h(C,I,M,D,O,22,l[3]),D=h(D,C,I,M,H,7,l[4]),M=h(M,D,C,I,S,12,l[5]),I=h(I,M,D,C,j,17,l[6]),C=h(C,I,M,D,N,22,l[7]),D=h(D,C,I,M,V,7,l[8]),M=h(M,D,C,I,z,12,l[9]),I=h(I,M,D,C,B,17,l[10]),C=h(C,I,M,D,R,22,l[11]),D=h(D,C,I,M,U,7,l[12]),M=h(M,D,C,I,P,12,l[13]),I=h(I,M,D,C,G,17,l[14]),C=h(C,I,M,D,X,22,l[15]),D=d(D,C,I,M,b,5,l[16]),M=d(M,D,C,I,j,9,l[17]),I=d(I,M,D,C,R,14,l[18]),C=d(C,I,M,D,x,20,l[19]),D=d(D,C,I,M,S,5,l[20]),M=d(M,D,C,I,B,9,l[21]),I=d(I,M,D,C,X,14,l[22]),C=d(C,I,M,D,H,20,l[23]),D=d(D,C,I,M,z,5,l[24]),M=d(M,D,C,I,G,9,l[25]),I=d(I,M,D,C,O,14,l[26]),C=d(C,I,M,D,V,20,l[27]),D=d(D,C,I,M,P,5,l[28]),M=d(M,D,C,I,E,9,l[29]),I=d(I,M,D,C,N,14,l[30]),C=d(C,I,M,D,U,20,l[31]),D=p(D,C,I,M,S,4,l[32]),M=p(M,D,C,I,V,11,l[33]),I=p(I,M,D,C,R,16,l[34]),C=p(C,I,M,D,G,23,l[35]),D=p(D,C,I,M,b,4,l[36]),M=p(M,D,C,I,H,11,l[37]),I=p(I,M,D,C,N,16,l[38]),C=p(C,I,M,D,B,23,l[39]),D=p(D,C,I,M,P,4,l[40]),M=p(M,D,C,I,x,11,l[41]),I=p(I,M,D,C,O,16,l[42]),C=p(C,I,M,D,j,23,l[43]),D=p(D,C,I,M,z,4,l[44]),M=p(M,D,C,I,U,11,l[45]),I=p(I,M,D,C,X,16,l[46]),C=p(C,I,M,D,E,23,l[47]),D=f(D,C,I,M,x,6,l[48]),M=f(M,D,C,I,N,10,l[49]),I=f(I,M,D,C,G,15,l[50]),C=f(C,I,M,D,S,21,l[51]),D=f(D,C,I,M,U,6,l[52]),M=f(M,D,C,I,O,10,l[53]),I=f(I,M,D,C,B,15,l[54]),C=f(C,I,M,D,b,21,l[55]),D=f(D,C,I,M,V,6,l[56]),M=f(M,D,C,I,X,10,l[57]),I=f(I,M,D,C,j,15,l[58]),C=f(C,I,M,D,P,21,l[59]),D=f(D,C,I,M,H,6,l[60]),M=f(M,D,C,I,R,10,l[61]),I=f(I,M,D,C,E,15,l[62]),C=f(C,I,M,D,z,21,l[63]),_[0]=_[0]+D|0,_[1]=_[1]+C|0,_[2]=_[2]+I|0,_[3]=_[3]+M|0},_doFinalize:function(){var v=this._data,y=v.words,$=this._nDataBytes*8,g=v.sigBytes*8;y[g>>>5]|=128<<24-g%32;var w=r.floor($/4294967296),_=$;y[(g+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,y[(g+64>>>9<<4)+14]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,v.sigBytes=(y.length+1)*4,this._process();for(var x=this._hash,b=x.words,E=0;E<4;E++){var O=b[E];b[E]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}return x},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});function h(v,y,$,g,w,_,x){var b=v+(y&$|~y&g)+w+x;return(b<<_|b>>>32-_)+y}function d(v,y,$,g,w,_,x){var b=v+(y&g|$&~g)+w+x;return(b<<_|b>>>32-_)+y}function p(v,y,$,g,w,_,x){var b=v+(y^$^g)+w+x;return(b<<_|b>>>32-_)+y}function f(v,y,$,g,w,_,x){var b=v+($^(y|~g))+w+x;return(b<<_|b>>>32-_)+y}i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),t.MD5})})(ep);var tp=ep.exports;Xn(tp);var np={exports:{}};(function(n,e){(function(t,r){n.exports=r(sn())})(Ze,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(u){var l=u.words,c=u.sigBytes,h=this._map;u.clamp();for(var d=[],p=0;p<c;p+=3)for(var f=l[p>>>2]>>>24-p%4*8&255,v=l[p+1>>>2]>>>24-(p+1)%4*8&255,y=l[p+2>>>2]>>>24-(p+2)%4*8&255,$=f<<16|v<<8|y,g=0;g<4&&p+g*.75<c;g++)d.push(h.charAt($>>>6*(3-g)&63));var w=h.charAt(64);if(w)for(;d.length%4;)d.push(w);return d.join("")},parse:function(u){var l=u.length,c=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var d=0;d<c.length;d++)h[c.charCodeAt(d)]=d}var p=c.charAt(64);if(p){var f=u.indexOf(p);f!==-1&&(l=f)}return a(u,l,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,l,c){for(var h=[],d=0,p=0;p<l;p++)if(p%4){var f=c[u.charCodeAt(p-1)]<<p%4*2,v=c[u.charCodeAt(p)]>>>6-p%4*2,y=f|v;h[d>>>2]|=y<<24-d%4*8,d++}return o.create(h,d)}}(),t.enc.Base64})})(np);var rp=np.exports;Xn(rp);var ip={exports:{}};(function(n,e){(function(t,r){n.exports=r(sn())})(Ze,function(t){return t.enc.Utf8})})(ip);var hx=ip.exports;Xn(hx);var op={exports:{}},Kl={exports:{}},Zl={exports:{}},Gl;function dx(){return Gl||(Gl=1,function(n,e){(function(t,r){n.exports=r(sn())})(Ze,function(t){return function(){var r=t,i=r.lib,o=i.WordArray,s=i.Hasher,a=r.algo,u=[],l=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,h){for(var d=this._hash.words,p=d[0],f=d[1],v=d[2],y=d[3],$=d[4],g=0;g<80;g++){if(g<16)u[g]=c[h+g]|0;else{var w=u[g-3]^u[g-8]^u[g-14]^u[g-16];u[g]=w<<1|w>>>31}var _=(p<<5|p>>>27)+$+u[g];g<20?_+=(f&v|~f&y)+1518500249:g<40?_+=(f^v^y)+1859775393:g<60?_+=(f&v|f&y|v&y)-1894007588:_+=(f^v^y)-899497514,$=y,y=v,v=f<<30|f>>>2,f=p,p=_}d[0]=d[0]+p|0,d[1]=d[1]+f|0,d[2]=d[2]+v|0,d[3]=d[3]+y|0,d[4]=d[4]+$|0},_doFinalize:function(){var c=this._data,h=c.words,d=this._nDataBytes*8,p=c.sigBytes*8;return h[p>>>5]|=128<<24-p%32,h[(p+64>>>9<<4)+14]=Math.floor(d/4294967296),h[(p+64>>>9<<4)+15]=d,c.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var c=s.clone.call(this);return c._hash=this._hash.clone(),c}});r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l)}(),t.SHA1})}(Zl)),Zl.exports}var Xl={exports:{}},Ql;function px(){return Ql||(Ql=1,function(n,e){(function(t,r){n.exports=r(sn())})(Ze,function(t){(function(){var r=t,i=r.lib,o=i.Base,s=r.enc,a=s.Utf8,u=r.algo;u.HMAC=o.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=a.parse(c));var h=l.blockSize,d=h*4;c.sigBytes>d&&(c=l.finalize(c)),c.clamp();for(var p=this._oKey=c.clone(),f=this._iKey=c.clone(),v=p.words,y=f.words,$=0;$<h;$++)v[$]^=1549556828,y[$]^=909522486;p.sigBytes=f.sigBytes=d,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var c=this._hasher,h=c.finalize(l);c.reset();var d=c.finalize(this._oKey.clone().concat(h));return d}})})()})}(Xl)),Xl.exports}var eu;function sp(){return eu||(eu=1,function(n,e){(function(t,r,i){n.exports=r(sn(),dx(),px())})(Ze,function(t){return function(){var r=t,i=r.lib,o=i.Base,s=i.WordArray,a=r.algo,u=a.MD5,l=a.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:u,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,h){for(var d,p=this.cfg,f=p.hasher.create(),v=s.create(),y=v.words,$=p.keySize,g=p.iterations;y.length<$;){d&&f.update(d),d=f.update(c).finalize(h),f.reset();for(var w=1;w<g;w++)d=f.finalize(d),f.reset();v.concat(d)}return v.sigBytes=$*4,v}});r.EvpKDF=function(c,h,d){return l.create(d).compute(c,h)}}(),t.EvpKDF})}(Kl)),Kl.exports}var tu={exports:{}},nu;function fx(){return nu||(nu=1,function(n,e){(function(t,r,i){n.exports=r(sn(),sp())})(Ze,function(t){t.lib.Cipher||function(r){var i=t,o=i.lib,s=o.Base,a=o.WordArray,u=o.BufferedBlockAlgorithm,l=i.enc;l.Utf8;var c=l.Base64,h=i.algo,d=h.EvpKDF,p=o.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(S,j){return this.create(this._ENC_XFORM_MODE,S,j)},createDecryptor:function(S,j){return this.create(this._DEC_XFORM_MODE,S,j)},init:function(S,j,N){this.cfg=this.cfg.extend(N),this._xformMode=S,this._key=j,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var j=this._doFinalize();return j},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function S(j){return typeof j=="string"?H:b}return function(j){return{encrypt:function(N,V,z){return S(V).encrypt(j,N,V,z)},decrypt:function(N,V,z){return S(V).decrypt(j,N,V,z)}}}}()});o.StreamCipher=p.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1});var f=i.mode={},v=o.BlockCipherMode=s.extend({createEncryptor:function(S,j){return this.Encryptor.create(S,j)},createDecryptor:function(S,j){return this.Decryptor.create(S,j)},init:function(S,j){this._cipher=S,this._iv=j}}),y=f.CBC=function(){var S=v.extend();S.Encryptor=S.extend({processBlock:function(N,V){var z=this._cipher,B=z.blockSize;j.call(this,N,V,B),z.encryptBlock(N,V),this._prevBlock=N.slice(V,V+B)}}),S.Decryptor=S.extend({processBlock:function(N,V){var z=this._cipher,B=z.blockSize,R=N.slice(V,V+B);z.decryptBlock(N,V),j.call(this,N,V,B),this._prevBlock=R}});function j(N,V,z){var B,R=this._iv;R?(B=R,this._iv=r):B=this._prevBlock;for(var U=0;U<z;U++)N[V+U]^=B[U]}return S}(),$=i.pad={},g=$.Pkcs7={pad:function(S,j){for(var N=j*4,V=N-S.sigBytes%N,z=V<<24|V<<16|V<<8|V,B=[],R=0;R<V;R+=4)B.push(z);var U=a.create(B,V);S.concat(U)},unpad:function(S){var j=S.words[S.sigBytes-1>>>2]&255;S.sigBytes-=j}};o.BlockCipher=p.extend({cfg:p.cfg.extend({mode:y,padding:g}),reset:function(){var S;p.reset.call(this);var j=this.cfg,N=j.iv,V=j.mode;this._xformMode==this._ENC_XFORM_MODE?S=V.createEncryptor:(S=V.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,N&&N.words):(this._mode=S.call(V,this,N&&N.words),this._mode.__creator=S)},_doProcessBlock:function(S,j){this._mode.processBlock(S,j)},_doFinalize:function(){var S,j=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(j.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),j.unpad(S)),S},blockSize:128/32});var w=o.CipherParams=s.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),_=i.format={},x=_.OpenSSL={stringify:function(S){var j,N=S.ciphertext,V=S.salt;return V?j=a.create([1398893684,1701076831]).concat(V).concat(N):j=N,j.toString(c)},parse:function(S){var j,N=c.parse(S),V=N.words;return V[0]==1398893684&&V[1]==1701076831&&(j=a.create(V.slice(2,4)),V.splice(0,4),N.sigBytes-=16),w.create({ciphertext:N,salt:j})}},b=o.SerializableCipher=s.extend({cfg:s.extend({format:x}),encrypt:function(S,j,N,V){V=this.cfg.extend(V);var z=S.createEncryptor(N,V),B=z.finalize(j),R=z.cfg;return w.create({ciphertext:B,key:N,iv:R.iv,algorithm:S,mode:R.mode,padding:R.padding,blockSize:S.blockSize,formatter:V.format})},decrypt:function(S,j,N,V){V=this.cfg.extend(V),j=this._parse(j,V.format);var z=S.createDecryptor(N,V).finalize(j.ciphertext);return z},_parse:function(S,j){return typeof S=="string"?j.parse(S,this):S}}),E=i.kdf={},O=E.OpenSSL={execute:function(S,j,N,V,z){if(V||(V=a.random(64/8)),z)var B=d.create({keySize:j+N,hasher:z}).compute(S,V);else var B=d.create({keySize:j+N}).compute(S,V);var R=a.create(B.words.slice(j),N*4);return B.sigBytes=j*4,w.create({key:B,iv:R,salt:V})}},H=o.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:O}),encrypt:function(S,j,N,V){V=this.cfg.extend(V);var z=V.kdf.execute(N,S.keySize,S.ivSize,V.salt,V.hasher);V.iv=z.iv;var B=b.encrypt.call(this,S,j,z.key,V);return B.mixIn(z),B},decrypt:function(S,j,N,V){V=this.cfg.extend(V),j=this._parse(j,V.format);var z=V.kdf.execute(N,S.keySize,S.ivSize,j.salt,V.hasher);V.iv=z.iv;var B=b.decrypt.call(this,S,j,z.key,V);return B}})}()})}(tu)),tu.exports}(function(n,e){(function(t,r,i){n.exports=r(sn(),rp,tp,sp(),fx())})(Ze,function(t){return function(){var r=t,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],u=[],l=[],c=[],h=[],d=[],p=[],f=[],v=[],y=[];(function(){for(var w=[],_=0;_<256;_++)_<128?w[_]=_<<1:w[_]=_<<1^283;for(var x=0,b=0,_=0;_<256;_++){var E=b^b<<1^b<<2^b<<3^b<<4;E=E>>>8^E&255^99,a[x]=E,u[E]=x;var O=w[x],H=w[O],S=w[H],j=w[E]*257^E*16843008;l[x]=j<<24|j>>>8,c[x]=j<<16|j>>>16,h[x]=j<<8|j>>>24,d[x]=j;var j=S*16843009^H*65537^O*257^x*16843008;p[E]=j<<24|j>>>8,f[E]=j<<16|j>>>16,v[E]=j<<8|j>>>24,y[E]=j,x?(x=O^w[w[w[S^O]]],b^=w[w[b]]):x=b=1}})();var $=[0,1,2,4,8,16,32,64,128,27,54],g=s.AES=o.extend({_doReset:function(){var w;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var _=this._keyPriorReset=this._key,x=_.words,b=_.sigBytes/4,E=this._nRounds=b+6,O=(E+1)*4,H=this._keySchedule=[],S=0;S<O;S++)S<b?H[S]=x[S]:(w=H[S-1],S%b?b>6&&S%b==4&&(w=a[w>>>24]<<24|a[w>>>16&255]<<16|a[w>>>8&255]<<8|a[w&255]):(w=w<<8|w>>>24,w=a[w>>>24]<<24|a[w>>>16&255]<<16|a[w>>>8&255]<<8|a[w&255],w^=$[S/b|0]<<24),H[S]=H[S-b]^w);for(var j=this._invKeySchedule=[],N=0;N<O;N++){var S=O-N;if(N%4)var w=H[S];else var w=H[S-4];N<4||S<=4?j[N]=w:j[N]=p[a[w>>>24]]^f[a[w>>>16&255]]^v[a[w>>>8&255]]^y[a[w&255]]}}},encryptBlock:function(w,_){this._doCryptBlock(w,_,this._keySchedule,l,c,h,d,a)},decryptBlock:function(w,_){var x=w[_+1];w[_+1]=w[_+3],w[_+3]=x,this._doCryptBlock(w,_,this._invKeySchedule,p,f,v,y,u);var x=w[_+1];w[_+1]=w[_+3],w[_+3]=x},_doCryptBlock:function(w,_,x,b,E,O,H,S){for(var j=this._nRounds,N=w[_]^x[0],V=w[_+1]^x[1],z=w[_+2]^x[2],B=w[_+3]^x[3],R=4,U=1;U<j;U++){var P=b[N>>>24]^E[V>>>16&255]^O[z>>>8&255]^H[B&255]^x[R++],G=b[V>>>24]^E[z>>>16&255]^O[B>>>8&255]^H[N&255]^x[R++],X=b[z>>>24]^E[B>>>16&255]^O[N>>>8&255]^H[V&255]^x[R++],D=b[B>>>24]^E[N>>>16&255]^O[V>>>8&255]^H[z&255]^x[R++];N=P,V=G,z=X,B=D}var P=(S[N>>>24]<<24|S[V>>>16&255]<<16|S[z>>>8&255]<<8|S[B&255])^x[R++],G=(S[V>>>24]<<24|S[z>>>16&255]<<16|S[B>>>8&255]<<8|S[N&255])^x[R++],X=(S[z>>>24]<<24|S[B>>>16&255]<<16|S[N>>>8&255]<<8|S[V&255])^x[R++],D=(S[B>>>24]<<24|S[N>>>16&255]<<16|S[V>>>8&255]<<8|S[z&255])^x[R++];w[_]=P,w[_+1]=G,w[_+2]=X,w[_+3]=D},keySize:256/32});r.AES=o._createHelper(g)}(),t.AES})})(op);var mx=op.exports;Xn(mx);var vx="0123456789abcdefghijklmnopqrstuvwxyz";function ru(n){return vx.charAt(n)}function gx(n,e){return n&e}function Pr(n,e){return n|e}function iu(n,e){return n^e}function ou(n,e){return n&~e}function yx(n){if(n==0)return-1;var e=0;return n&65535||(n>>=16,e+=16),n&255||(n>>=8,e+=8),n&15||(n>>=4,e+=4),n&3||(n>>=2,e+=2),n&1||++e,e}function bx(n){for(var e=0;n!=0;)n&=n-1,++e;return e}var or="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wx="=";function su(n){var e,t,r="";for(e=0;e+3<=n.length;e+=3)t=parseInt(n.substring(e,e+3),16),r+=or.charAt(t>>6)+or.charAt(t&63);for(e+1==n.length?(t=parseInt(n.substring(e,e+1),16),r+=or.charAt(t<<2)):e+2==n.length&&(t=parseInt(n.substring(e,e+2),16),r+=or.charAt(t>>2)+or.charAt((t&3)<<4));(r.length&3)>0;)r+=wx;return r}var En,_x={decode:function(n){var e;if(En===void 0){var t="0123456789ABCDEF",r=` \f
62
- \r  \u2028\u2029`;for(En={},e=0;e<16;++e)En[t.charAt(e)]=e;for(t=t.toLowerCase(),e=10;e<16;++e)En[t.charAt(e)]=e;for(e=0;e<r.length;++e)En[r.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<n.length;++e){var a=n.charAt(e);if(a=="=")break;if(a=En[a],a!=-1){if(a===void 0)throw new Error("Illegal character at offset "+e);o|=a,++s>=2?(i[i.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},cn,Jo={decode:function(n){var e;if(cn===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
63
- \r  \u2028\u2029`;for(cn=Object.create(null),e=0;e<64;++e)cn[t.charAt(e)]=e;for(cn["-"]=62,cn._=63,e=0;e<r.length;++e)cn[r.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<n.length;++e){var a=n.charAt(e);if(a=="=")break;if(a=cn[a],a!=-1){if(a===void 0)throw new Error("Illegal character at offset "+e);o|=a,++s>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=o&255,o=0,s=0):o<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255;break}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(n){var e=Jo.re.exec(n);if(e)if(e[1])n=e[1];else if(e[2])n=e[2];else throw new Error("RegExp out of sync");return Jo.decode(n)}},kn=1e13,cr=function(){function n(e){this.buf=[+e||0]}return n.prototype.mulAdd=function(e,t){var r=this.buf,i=r.length,o,s;for(o=0;o<i;++o)s=r[o]*e+t,s<kn?t=0:(t=0|s/kn,s-=t*kn),r[o]=s;t>0&&(r[o]=t)},n.prototype.sub=function(e){var t=this.buf,r=t.length,i,o;for(i=0;i<r;++i)o=t[i]-e,o<0?(o+=kn,e=1):e=0,t[i]=o;for(;t[t.length-1]===0;)t.pop()},n.prototype.toString=function(e){if((e||10)!=10)throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),i=t.length-2;i>=0;--i)r+=(kn+t[i]).toString().substring(1);return r},n.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*kn+e[r];return t},n.prototype.simplify=function(){var e=this.buf;return e.length==1?e[0]:this},n}(),ap="…",xx=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Sx=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Mn(n,e){return n.length>e&&(n=n.substring(0,e)+ap),n}var ro=function(){function n(e,t){this.hexDigits="0123456789ABCDEF",e instanceof n?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=t)}return n.prototype.get=function(e){if(e===void 0&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(e):this.enc[e]},n.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(e&15)},n.prototype.hexDump=function(e,t,r){for(var i="",o=e;o<t;++o)if(i+=this.hexByte(this.get(o)),r!==!0)switch(o&15){case 7:i+=" ";break;case 15:i+=`
64
- `;break;default:i+=" "}return i},n.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},n.prototype.parseStringISO=function(e,t){for(var r="",i=e;i<t;++i)r+=String.fromCharCode(this.get(i));return r},n.prototype.parseStringUTF=function(e,t){for(var r="",i=e;i<t;){var o=this.get(i++);o<128?r+=String.fromCharCode(o):o>191&&o<224?r+=String.fromCharCode((o&31)<<6|this.get(i++)&63):r+=String.fromCharCode((o&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return r},n.prototype.parseStringBMP=function(e,t){for(var r="",i,o,s=e;s<t;)i=this.get(s++),o=this.get(s++),r+=String.fromCharCode(i<<8|o);return r},n.prototype.parseTime=function(e,t,r){var i=this.parseStringISO(e,t),o=(r?xx:Sx).exec(i);return o?(r&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),i=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(i+=":"+o[5],o[6]&&(i+=":"+o[6],o[7]&&(i+="."+o[7]))),o[8]&&(i+=" UTC",o[8]!="Z"&&(i+=o[8],o[9]&&(i+=":"+o[9]))),i):"Unrecognized time: "+i},n.prototype.parseInteger=function(e,t){for(var r=this.get(e),i=r>127,o=i?255:0,s,a="";r==o&&++e<t;)r=this.get(e);if(s=t-e,s===0)return i?-1:0;if(s>4){for(a=r,s<<=3;!((+a^o)&128);)a=+a<<1,--s;a="("+s+` bit)
65
- `}i&&(r=r-256);for(var u=new cr(r),l=e+1;l<t;++l)u.mulAdd(256,this.get(l));return a+u.toString()},n.prototype.parseBitString=function(e,t,r){for(var i=this.get(e),o=(t-e-1<<3)-i,s="("+o+` bit)
66
- `,a="",u=e+1;u<t;++u){for(var l=this.get(u),c=u==t-1?i:0,h=7;h>=c;--h)a+=l>>h&1?"1":"0";if(a.length>r)return s+Mn(a,r)}return s+a},n.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return Mn(this.parseStringISO(e,t),r);var i=t-e,o="("+i+` byte)
67
- `;r/=2,i>r&&(t=e+r);for(var s=e;s<t;++s)o+=this.hexByte(this.get(s));return i>r&&(o+=ap),o},n.prototype.parseOID=function(e,t,r){for(var i="",o=new cr,s=0,a=e;a<t;++a){var u=this.get(a);if(o.mulAdd(128,u&127),s+=7,!(u&128)){if(i==="")if(o=o.simplify(),o instanceof cr)o.sub(80),i="2."+o.toString();else{var l=o<80?o<40?0:1:2;i=l+"."+(o-l*40)}else i+="."+o.toString();if(i.length>r)return Mn(i,r);o=new cr,s=0}}return s>0&&(i+=".incomplete"),i},n}(),$x=function(){function n(e,t,r,i,o){if(!(i instanceof au))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=i,this.sub=o}return n.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},n.prototype.content=function(e){if(this.tag===void 0)return null;e===void 0&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return this.stream.get(t)===0?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return Mn(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return Mn(this.stream.parseStringISO(t,t+r),e);case 30:return Mn(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,this.tag.tagNumber==23)}return null},n.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},n.prototype.toPrettyString=function(e){e===void 0&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(t+=" (encapsulates)"),t+=`
68
- `,this.sub!==null){e+=" ";for(var r=0,i=this.sub.length;r<i;++r)t+=this.sub[r].toPrettyString(e)}return t},n.prototype.posStart=function(){return this.stream.pos},n.prototype.posContent=function(){return this.stream.pos+this.header},n.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},n.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},n.decodeLength=function(e){var t=e.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(r===0)return null;t=0;for(var i=0;i<r;++i)t=t*256+e.get();return t},n.prototype.getHexStringValue=function(){var e=this.toHexString(),t=this.header*2,r=this.length*2;return e.substr(t,r)},n.decode=function(e){var t;e instanceof ro?t=e:t=new ro(e,0);var r=new ro(t),i=new au(t),o=n.decodeLength(t),s=t.pos,a=s-r.pos,u=null,l=function(){var h=[];if(o!==null){for(var d=s+o;t.pos<d;)h[h.length]=n.decode(t);if(t.pos!=d)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var p=n.decode(t);if(p.tag.isEOC())break;h[h.length]=p}o=s-t.pos}catch(f){throw new Error("Exception while decoding undefined length content: "+f)}return h};if(i.tagConstructed)u=l();else if(i.isUniversal()&&(i.tagNumber==3||i.tagNumber==4))try{if(i.tagNumber==3&&t.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=l();for(var c=0;c<u.length;++c)if(u[c].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{u=null}if(u===null){if(o===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);t.pos=s+Math.abs(o)}return new n(r,a,o,i,u)},n}(),au=function(){function n(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=(t&32)!==0,this.tagNumber=t&31,this.tagNumber==31){var r=new cr;do t=e.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return n.prototype.isUniversal=function(){return this.tagClass===0},n.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},n}(),Ut,jx=0xdeadbeefcafe,lu=(jx&16777215)==15715070,Je=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Ex=(1<<26)/Je[Je.length-1],se=function(){function n(e,t,r){e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}return n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,o=!1,s="",a=this.t,u=this.DB-a*this.DB%t;if(a-- >0)for(u<this.DB&&(i=this[a]>>u)>0&&(o=!0,s=ru(i));a>=0;)u<t?(i=(this[a]&(1<<u)-1)<<t-u,i|=this[--a]>>(u+=this.DB-t)):(i=this[a]>>(u-=t)&r,u<=0&&(u+=this.DB,--a)),i>0&&(o=!0),o&&(s+=ru(i));return o?s:"0"},n.prototype.negate=function(){var e=ce();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Lr(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=ce();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.modPowInt=function(e,t){var r;return e<256||t.isEven()?r=new uu(t):r=new cu(t),this.exp(e,r)},n.prototype.clone=function(){var e=ce();return this.copyTo(e),e},n.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r=this.DB-e*this.DB%8,i,o=0;if(e-- >0)for(r<this.DB&&(i=this[e]>>r)!=(this.s&this.DM)>>r&&(t[o++]=i|this.s<<this.DB-r);e>=0;)r<8?(i=(this[e]&(1<<r)-1)<<8-r,i|=this[--e]>>(r+=this.DB-8)):(i=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),i&128&&(i|=-256),o==0&&(this.s&128)!=(i&128)&&++o,(o>0||i!=this.s)&&(t[o++]=i);return t},n.prototype.equals=function(e){return this.compareTo(e)==0},n.prototype.min=function(e){return this.compareTo(e)<0?this:e},n.prototype.max=function(e){return this.compareTo(e)>0?this:e},n.prototype.and=function(e){var t=ce();return this.bitwiseTo(e,gx,t),t},n.prototype.or=function(e){var t=ce();return this.bitwiseTo(e,Pr,t),t},n.prototype.xor=function(e){var t=ce();return this.bitwiseTo(e,iu,t),t},n.prototype.andNot=function(e){var t=ce();return this.bitwiseTo(e,ou,t),t},n.prototype.not=function(){for(var e=ce(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},n.prototype.shiftLeft=function(e){var t=ce();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=ce();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},n.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+yx(this[e]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=bx(this[r]^t);return e},n.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0},n.prototype.setBit=function(e){return this.changeBit(e,Pr)},n.prototype.clearBit=function(e){return this.changeBit(e,ou)},n.prototype.flipBit=function(e){return this.changeBit(e,iu)},n.prototype.add=function(e){var t=ce();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=ce();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=ce();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=ce();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=ce();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=ce(),r=ce();return this.divRemTo(e,t,r),[t,r]},n.prototype.modPow=function(e,t){var r=e.bitLength(),i,o=qt(1),s;if(r<=0)return o;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?s=new uu(t):t.isEven()?s=new Tx(t):s=new cu(t);var a=[],u=3,l=i-1,c=(1<<i)-1;if(a[1]=s.convert(this),i>1){var h=ce();for(s.sqrTo(a[1],h);u<=c;)a[u]=ce(),s.mulTo(h,a[u-2],a[u]),u+=2}var d=e.t-1,p,f=!0,v=ce(),y;for(r=Lr(e[d])-1;d>=0;){for(r>=l?p=e[d]>>r-l&c:(p=(e[d]&(1<<r+1)-1)<<l-r,d>0&&(p|=e[d-1]>>this.DB+r-l)),u=i;!(p&1);)p>>=1,--u;if((r-=u)<0&&(r+=this.DB,--d),f)a[p].copyTo(o),f=!1;else{for(;u>1;)s.sqrTo(o,v),s.sqrTo(v,o),u-=2;u>0?s.sqrTo(o,v):(y=o,o=v,v=y),s.mulTo(v,a[p],o)}for(;d>=0&&!(e[d]&1<<r);)s.sqrTo(o,v),y=o,o=v,v=y,--r<0&&(r=this.DB-1,--d)}return s.revert(o)},n.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return n.ZERO;for(var r=e.clone(),i=this.clone(),o=qt(1),s=qt(0),a=qt(0),u=qt(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!s.isEven())&&(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(e,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),t&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),t&&a.subTo(o,a),u.subTo(s,u))}if(i.compareTo(n.ONE)!=0)return n.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;return u.signum()<0?u.add(e):u},n.prototype.pow=function(e){return this.exp(e,new kx)},n.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var o=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;for(o<s&&(s=o),s>0&&(t.rShiftTo(s,t),r.rShiftTo(s,r));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},n.prototype.isProbablePrime=function(e){var t,r=this.abs();if(r.t==1&&r[0]<=Je[Je.length-1]){for(t=0;t<Je.length;++t)if(r[0]==Je[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Je.length;){for(var i=Je[t],o=t+1;o<Je.length&&i<Ex;)i*=Je[o++];for(i=r.modInt(i);t<o;)if(i%Je[t++]==0)return!1}return r.millerRabin(e)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var i=e.length,o=!1,s=0;--i>=0;){var a=r==8?+e[i]&255:du(e,i);if(a<0){e.charAt(i)=="-"&&(o=!0);continue}o=!1,s==0?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,s+=r,s>=this.DB&&(s-=this.DB)}r==8&&+e[0]&128&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},n.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM,u=this.t-1;u>=0;--u)t[u+s+1]=this[u]>>i|a,a=(this[u]&o)<<r;for(var u=s-1;u>=0;--u)t[u]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB,o=this.DB-i,s=(1<<i)-1;t[0]=this[r]>>i;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&s)<<o,t[a-r]=this[a]>>i;i>0&&(t[this.t-r-1]|=(this.s&s)<<o),t.t=this.t-r,t.clamp()},n.prototype.subTo=function(e,t){for(var r=0,i=0,o=Math.min(e.t,this.t);r<o;)i+=this[r]-e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i-=e[r],t[r++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+r.t]=r.am(0,i[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&n.ZERO.subTo(t,t)},n.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=ce());var s=ce(),a=this.s,u=e.s,l=this.DB-Lr(i[i.t-1]);l>0?(i.lShiftTo(l,s),o.lShiftTo(l,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,h=s[c-1];if(h!=0){var d=h*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),p=this.FV/d,f=(1<<this.F1)/d,v=1<<this.F2,y=r.t,$=y-c,g=t??ce();for(s.dlShiftTo($,g),r.compareTo(g)>=0&&(r[r.t++]=1,r.subTo(g,r)),n.ONE.dlShiftTo(c,g),g.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--$>=0;){var w=r[--y]==h?this.DM:Math.floor(r[y]*p+(r[y-1]+v)*f);if((r[y]+=s.am(0,w,r,$,0,c))<w)for(s.dlShiftTo($,g),r.subTo(g,r);r[y]<--w;)r.subTo(g,r)}t!=null&&(r.drShiftTo(c,t),a!=u&&n.ZERO.subTo(t,t)),r.t=c,r.clamp(),l>0&&r.rShiftTo(l,r),a<0&&n.ZERO.subTo(r,r)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t},n.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},n.prototype.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var r=ce(),i=ce(),o=t.convert(this),s=Lr(e)-1;for(o.copyTo(r);--s>=0;)if(t.sqrTo(r,i),(e&1<<s)>0)t.mulTo(i,o,r);else{var a=r;r=i,i=a}return t.revert(r)},n.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},n.prototype.toRadix=function(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=qt(r),o=ce(),s=ce(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(e)+a},n.prototype.fromRadix=function(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,s=0,a=0,u=0;u<e.length;++u){var l=du(e,u);if(l<0){e.charAt(u)=="-"&&this.signum()==0&&(o=!0);continue}a=t*a+l,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0)}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),Pr,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var i=[],o=e&7;i.length=(e>>3)+1,t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(e,t,r){var i,o,s=Math.min(e.t,this.t);for(i=0;i<s;++i)r[i]=t(this[i],e[i]);if(e.t<this.t){for(o=e.s&this.DM,i=s;i<this.t;++i)r[i]=t(this[i],o);r.t=this.t}else{for(o=this.s&this.DM,i=s;i<e.t;++i)r[i]=t(o,e[i]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},n.prototype.changeBit=function(e,t){var r=n.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},n.prototype.addTo=function(e,t){for(var r=0,i=0,o=Math.min(e.t,this.t);r<o;)i+=this[r]+e[r],t[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i+=e[r],t[r++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()},n.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},n.prototype.multiplyLowerTo=function(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var o=r.t-this.t;i<o;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(var o=Math.min(e.t,t);i<o;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()},n.prototype.multiplyUpperTo=function(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)},n.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r},n.prototype.millerRabin=function(e){var t=this.subtract(n.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>Je.length&&(e=Je.length);for(var o=ce(),s=0;s<e;++s){o.fromInt(Je[Math.floor(Math.random()*Je.length)]);var a=o.modPow(i,this);if(a.compareTo(n.ONE)!=0&&a.compareTo(t)!=0){for(var u=1;u++<r&&a.compareTo(t)!=0;)if(a=a.modPowInt(2,this),a.compareTo(n.ONE)==0)return!1;if(a.compareTo(t)!=0)return!1}}return!0},n.prototype.square=function(){var e=ce();return this.squareTo(e),e},n.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(r.compareTo(i)<0){var o=r;r=i,i=o}var s=r.getLowestSetBit(),a=i.getLowestSetBit();if(a<0){t(r);return}s<a&&(a=s),a>0&&(r.rShiftTo(a,r),i.rShiftTo(a,i));var u=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(u,0):(a>0&&i.lShiftTo(a,i),setTimeout(function(){t(i)},0))};setTimeout(u,10)},n.prototype.fromNumberAsync=function(e,t,r,i){if(typeof t=="number")if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(n.ONE.shiftLeft(e-1),Pr,this),this.isEven()&&this.dAddOffset(1,0);var o=this,s=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(n.ONE.shiftLeft(e-1),o),o.isProbablePrime(t)?setTimeout(function(){i()},0):setTimeout(s,0)};setTimeout(s,0)}else{var a=[],u=e&7;a.length=(e>>3)+1,t.nextBytes(a),u>0?a[0]&=(1<<u)-1:a[0]=0,this.fromString(a,256)}},n}(),kx=function(){function n(){}return n.prototype.convert=function(e){return e},n.prototype.revert=function(e){return e},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},n.prototype.sqrTo=function(e,t){e.squareTo(t)},n}(),uu=function(){function n(e){this.m=e}return n.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}(),cu=function(){function n(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return n.prototype.convert=function(e){var t=ce();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(se.ZERO)>0&&this.m.subTo(t,t),t},n.prototype.revert=function(e){var t=ce();return e.copyTo(t),this.reduce(t),t},n.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}(),Tx=function(){function n(e){this.m=e,this.r2=ce(),this.q3=ce(),se.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return n.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ce();return e.copyTo(t),this.reduce(t),t},n.prototype.revert=function(e){return e},n.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},n.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},n.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n}();function ce(){return new se(null)}function Ve(n,e){return new se(n,e)}var hu=typeof navigator<"u";hu&&lu&&navigator.appName=="Microsoft Internet Explorer"?(se.prototype.am=function(n,e,t,r,i,o){for(var s=e&32767,a=e>>15;--o>=0;){var u=this[n]&32767,l=this[n++]>>15,c=a*u+l*s;u=s*u+((c&32767)<<15)+t[r]+(i&1073741823),i=(u>>>30)+(c>>>15)+a*l+(i>>>30),t[r++]=u&1073741823}return i},Ut=30):hu&&lu&&navigator.appName!="Netscape"?(se.prototype.am=function(n,e,t,r,i,o){for(;--o>=0;){var s=e*this[n++]+t[r]+i;i=Math.floor(s/67108864),t[r++]=s&67108863}return i},Ut=26):(se.prototype.am=function(n,e,t,r,i,o){for(var s=e&16383,a=e>>14;--o>=0;){var u=this[n]&16383,l=this[n++]>>14,c=a*u+l*s;u=s*u+((c&16383)<<14)+t[r]+i,i=(u>>28)+(c>>14)+a*l,t[r++]=u&268435455}return i},Ut=28),se.prototype.DB=Ut,se.prototype.DM=(1<<Ut)-1,se.prototype.DV=1<<Ut;var io=52;se.prototype.FV=Math.pow(2,io),se.prototype.F1=io-Ut,se.prototype.F2=2*Ut-io;var Ii=[],Ln,at;for(Ln=48,at=0;at<=9;++at)Ii[Ln++]=at;for(Ln=97,at=10;at<36;++at)Ii[Ln++]=at;for(Ln=65,at=10;at<36;++at)Ii[Ln++]=at;function du(n,e){var t=Ii[n.charCodeAt(e)];return t??-1}function qt(n){var e=ce();return e.fromInt(n),e}function Lr(n){var e=1,t;return(t=n>>>16)!=0&&(n=t,e+=16),(t=n>>8)!=0&&(n=t,e+=8),(t=n>>4)!=0&&(n=t,e+=4),(t=n>>2)!=0&&(n=t,e+=2),(t=n>>1)!=0&&(n=t,e+=1),e}se.ZERO=qt(0),se.ONE=qt(1);var Vx=function(){function n(){this.i=0,this.j=0,this.S=[]}return n.prototype.init=function(e){var t,r,i;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[r],this.S[r]=i;this.i=0,this.j=0},n.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},n}();function Dx(){return new Vx}var lp=256,Hr,Zt=null,ft;if(Zt==null){Zt=[],ft=0;var Ur=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var oo=new Uint32Array(256);for(window.crypto.getRandomValues(oo),Ur=0;Ur<oo.length;++Ur)Zt[ft++]=oo[Ur]&255}var qr=0,Wr=function(n){if(qr=qr||0,qr>=256||ft>=lp){window.removeEventListener?window.removeEventListener("mousemove",Wr,!1):window.detachEvent&&window.detachEvent("onmousemove",Wr);return}try{var e=n.x+n.y;Zt[ft++]=e&255,qr+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Wr,!1):window.attachEvent&&window.attachEvent("onmousemove",Wr))}function Ox(){if(Hr==null){for(Hr=Dx();ft<lp;){var n=Math.floor(65536*Math.random());Zt[ft++]=n&255}for(Hr.init(Zt),ft=0;ft<Zt.length;++ft)Zt[ft]=0;ft=0}return Hr.next()}var Yo=function(){function n(){}return n.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=Ox()},n}();function Ax(n,e){if(e<n.length+22)return console.error("Message too long for RSA"),null;for(var t=e-n.length-6,r="",i=0;i<t;i+=2)r+="ff";var o="0001"+r+"00"+n;return Ve(o,16)}function Bx(n,e){if(e<n.length+11)return console.error("Message too long for RSA"),null;for(var t=[],r=n.length-1;r>=0&&e>0;){var i=n.charCodeAt(r--);i<128?t[--e]=i:i>127&&i<2048?(t[--e]=i&63|128,t[--e]=i>>6|192):(t[--e]=i&63|128,t[--e]=i>>6&63|128,t[--e]=i>>12|224)}t[--e]=0;for(var o=new Yo,s=[];e>2;){for(s[0]=0;s[0]==0;)o.nextBytes(s);t[--e]=s[0]}return t[--e]=2,t[--e]=0,new se(t)}var Cx=function(){function n(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return n.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},n.prototype.doPrivate=function(e){if(this.p==null||this.q==null)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},n.prototype.setPublic=function(e,t){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Ve(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},n.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,r=Bx(e,t);if(r==null)return null;var i=this.doPublic(r);if(i==null)return null;for(var o=i.toString(16),s=o.length,a=0;a<t*2-s;a++)o="0"+o;return o},n.prototype.setPrivate=function(e,t,r){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Ve(e,16),this.e=parseInt(t,16),this.d=Ve(r,16)):console.error("Invalid RSA private key")},n.prototype.setPrivateEx=function(e,t,r,i,o,s,a,u){e!=null&&t!=null&&e.length>0&&t.length>0?(this.n=Ve(e,16),this.e=parseInt(t,16),this.d=Ve(r,16),this.p=Ve(i,16),this.q=Ve(o,16),this.dmp1=Ve(s,16),this.dmq1=Ve(a,16),this.coeff=Ve(u,16)):console.error("Invalid RSA private key")},n.prototype.generate=function(e,t){var r=new Yo,i=e>>1;this.e=parseInt(t,16);for(var o=new se(t,16);;){for(;this.p=new se(e-i,1,r),!(this.p.subtract(se.ONE).gcd(o).compareTo(se.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new se(i,1,r),!(this.q.subtract(se.ONE).gcd(o).compareTo(se.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(se.ONE),u=this.q.subtract(se.ONE),l=a.multiply(u);if(l.gcd(o).compareTo(se.ONE)==0){this.n=this.p.multiply(this.q),this.d=o.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},n.prototype.decrypt=function(e){var t=Ve(e,16),r=this.doPrivate(t);return r==null?null:Ix(r,this.n.bitLength()+7>>3)},n.prototype.generateAsync=function(e,t,r){var i=new Yo,o=e>>1;this.e=parseInt(t,16);var s=new se(t,16),a=this,u=function(){var l=function(){if(a.p.compareTo(a.q)<=0){var d=a.p;a.p=a.q,a.q=d}var p=a.p.subtract(se.ONE),f=a.q.subtract(se.ONE),v=p.multiply(f);v.gcd(s).compareTo(se.ONE)==0?(a.n=a.p.multiply(a.q),a.d=s.modInverse(v),a.dmp1=a.d.mod(p),a.dmq1=a.d.mod(f),a.coeff=a.q.modInverse(a.p),setTimeout(function(){r()},0)):setTimeout(u,0)},c=function(){a.q=ce(),a.q.fromNumberAsync(o,1,i,function(){a.q.subtract(se.ONE).gcda(s,function(d){d.compareTo(se.ONE)==0&&a.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)})})},h=function(){a.p=ce(),a.p.fromNumberAsync(e-o,1,i,function(){a.p.subtract(se.ONE).gcda(s,function(d){d.compareTo(se.ONE)==0&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(h,0)})})};setTimeout(h,0)};setTimeout(u,0)},n.prototype.sign=function(e,t,r){var i=Rx(r),o=i+t(e).toString(),s=Ax(o,this.n.bitLength()/4);if(s==null)return null;var a=this.doPrivate(s);if(a==null)return null;var u=a.toString(16);return u.length&1?"0"+u:u},n.prototype.verify=function(e,t,r){var i=Ve(t,16),o=this.doPublic(i);if(o==null)return null;var s=o.toString(16).replace(/^1f+00/,""),a=Mx(s);return a==r(e).toString()},n}();function Ix(n,e){for(var t=n.toByteArray(),r=0;r<t.length&&t[r]==0;)++r;if(t.length-r!=e-1||t[r]!=2)return null;for(++r;t[r]!=0;)if(++r>=t.length)return null;for(var i="";++r<t.length;){var o=t[r]&255;o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((o&31)<<6|t[r+1]&63),++r):(i+=String.fromCharCode((o&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return i}var si={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function Rx(n){return si[n]||""}function Mx(n){for(var e in si)if(si.hasOwnProperty(e)){var t=si[e],r=t.length;if(n.substr(0,r)==t)return n.substr(r)}return n}/*!
69
- Copyright (c) 2011, Yahoo! Inc. All rights reserved.
70
- Code licensed under the BSD License:
71
- http://developer.yahoo.com/yui/license.html
72
- version: 2.9.0
73
- */var Oe={};Oe.lang={extend:function(n,e,t){if(!e||!n)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=e.prototype,n.prototype=new r,n.prototype.constructor=n,n.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),t){var i;for(i in t)n.prototype[i]=t[i];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(a,u){for(i=0;i<s.length;i=i+1){var l=s[i],c=u[l];typeof c=="function"&&c!=Object.prototype[l]&&(a[l]=c)}})}catch{}o(n.prototype,t)}}};/**
74
- * @fileOverview
75
- * @name asn1-1.0.js
76
- * @author Kenji Urushima kenji.urushima@gmail.com
77
- * @version asn1 1.0.13 (2017-Jun-02)
78
- * @since jsrsasign 2.1
79
- * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
80
- */var K={};(typeof K.asn1>"u"||!K.asn1)&&(K.asn1={}),K.asn1.ASN1Util=new function(){this.integerToByteHex=function(n){var e=n.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(n){var e=n.toString(16);if(e.substr(0,1)!="-")e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var t=e.substr(1),r=t.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;o<r;o++)i+="f";var s=new se(i,16),a=s.xor(n).add(se.ONE);e=a.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(n,e){return hextopem(n,e)},this.newObject=function(n){var e=K,t=e.asn1,r=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,s=t.DEROctetString,a=t.DERNull,u=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,h=t.DERNumericString,d=t.DERPrintableString,p=t.DERTeletexString,f=t.DERIA5String,v=t.DERUTCTime,y=t.DERGeneralizedTime,$=t.DERSequence,g=t.DERSet,w=t.DERTaggedObject,_=t.ASN1Util.newObject,x=Object.keys(n);if(x.length!=1)throw"key of param shall be only one.";var b=x[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+b+":")==-1)throw"undefined key: "+b;if(b=="bool")return new r(n[b]);if(b=="int")return new i(n[b]);if(b=="bitstr")return new o(n[b]);if(b=="octstr")return new s(n[b]);if(b=="null")return new a(n[b]);if(b=="oid")return new u(n[b]);if(b=="enum")return new l(n[b]);if(b=="utf8str")return new c(n[b]);if(b=="numstr")return new h(n[b]);if(b=="prnstr")return new d(n[b]);if(b=="telstr")return new p(n[b]);if(b=="ia5str")return new f(n[b]);if(b=="utctime")return new v(n[b]);if(b=="gentime")return new y(n[b]);if(b=="seq"){for(var E=n[b],O=[],H=0;H<E.length;H++){var S=_(E[H]);O.push(S)}return new $({array:O})}if(b=="set"){for(var E=n[b],O=[],H=0;H<E.length;H++){var S=_(E[H]);O.push(S)}return new g({array:O})}if(b=="tag"){var j=n[b];if(Object.prototype.toString.call(j)==="[object Array]"&&j.length==3){var N=_(j[2]);return new w({tag:j[0],explicit:j[1],obj:N})}else{var V={};if(j.explicit!==void 0&&(V.explicit=j.explicit),j.tag!==void 0&&(V.tag=j.tag),j.obj===void 0)throw"obj shall be specified for 'tag'.";return V.obj=_(j.obj),new w(V)}}},this.jsonToASN1HEX=function(n){var e=this.newObject(n);return e.getEncodedHex()}},K.asn1.ASN1Util.oidHexToInt=function(n){for(var i="",e=parseInt(n.substr(0,2),16),t=Math.floor(e/40),r=e%40,i=t+"."+r,o="",s=2;s<n.length;s+=2){var a=parseInt(n.substr(s,2),16),u=("00000000"+a.toString(2)).slice(-8);if(o=o+u.substr(1,7),u.substr(0,1)=="0"){var l=new se(o,2);i=i+"."+l.toString(10),o=""}}return i},K.asn1.ASN1Util.oidIntToHex=function(n){var e=function(a){var u=a.toString(16);return u.length==1&&(u="0"+u),u},t=function(a){var u="",l=new se(a,10),c=l.toString(2),h=7-c.length%7;h==7&&(h=0);for(var d="",p=0;p<h;p++)d+="0";c=d+c;for(var p=0;p<c.length-1;p+=7){var f=c.substr(p,7);p!=c.length-7&&(f="1"+f),u+=e(parseInt(f,2))}return u};if(!n.match(/^[0-9.]+$/))throw"malformed oid string: "+n;var r="",i=n.split("."),o=parseInt(i[0])*40+parseInt(i[1]);r+=e(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=t(i[s]);return r},K.asn1.ASN1Object=function(){var n="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+n.length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var i=128+r;return i.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},K.asn1.DERAbstractString=function(n){K.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"?this.setString(n):typeof n.str<"u"?this.setString(n.str):typeof n.hex<"u"&&this.setStringHex(n.hex))},Oe.lang.extend(K.asn1.DERAbstractString,K.asn1.ASN1Object),K.asn1.DERAbstractTime=function(n){K.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){utc=e.getTime()+e.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(e,t,r){var i=this.zeroPadding,o=this.localDateToUTC(e),s=String(o.getFullYear());t=="utc"&&(s=s.substr(2,2));var a=i(String(o.getMonth()+1),2),u=i(String(o.getDate()),2),l=i(String(o.getHours()),2),c=i(String(o.getMinutes()),2),h=i(String(o.getSeconds()),2),d=s+a+u+l+c+h;if(r===!0){var p=o.getMilliseconds();if(p!=0){var f=i(String(p),3);f=f.replace(/[0]+$/,""),d=d+"."+f}}return d+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,i,o,s){var a=new Date(Date.UTC(e,t-1,r,i,o,s,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},Oe.lang.extend(K.asn1.DERAbstractTime,K.asn1.ASN1Object),K.asn1.DERAbstractStructured=function(n){K.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,typeof n<"u"&&typeof n.array<"u"&&(this.asn1Array=n.array)},Oe.lang.extend(K.asn1.DERAbstractStructured,K.asn1.ASN1Object),K.asn1.DERBoolean=function(){K.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Oe.lang.extend(K.asn1.DERBoolean,K.asn1.ASN1Object),K.asn1.DERInteger=function(n){K.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=K.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new se(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.bigint<"u"?this.setByBigInteger(n.bigint):typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))},Oe.lang.extend(K.asn1.DERInteger,K.asn1.ASN1Object),K.asn1.DERBitString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=K.asn1.ASN1Util.newObject(n.obj);n.hex="00"+e.getEncodedHex()}K.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var i=0;i<=r;i++)t+="0";for(var o="",i=0;i<t.length-1;i+=8){var s=t.substr(i,8),a=parseInt(s,2).toString(16);a.length==1&&(a="0"+a),o+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+r+o},this.setByBooleanArray=function(t){for(var r="",i=0;i<t.length;i++)t[i]==!0?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(t){for(var r=new Array(t),i=0;i<t;i++)r[i]=!1;return r},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"&&n.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(n):typeof n.hex<"u"?this.setHexValueIncludingUnusedBits(n.hex):typeof n.bin<"u"?this.setByBinaryString(n.bin):typeof n.array<"u"&&this.setByBooleanArray(n.array))},Oe.lang.extend(K.asn1.DERBitString,K.asn1.ASN1Object),K.asn1.DEROctetString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=K.asn1.ASN1Util.newObject(n.obj);n.hex=e.getEncodedHex()}K.asn1.DEROctetString.superclass.constructor.call(this,n),this.hT="04"},Oe.lang.extend(K.asn1.DEROctetString,K.asn1.DERAbstractString),K.asn1.DERNull=function(){K.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Oe.lang.extend(K.asn1.DERNull,K.asn1.ASN1Object),K.asn1.DERObjectIdentifier=function(n){var e=function(r){var i=r.toString(16);return i.length==1&&(i="0"+i),i},t=function(r){var i="",o=new se(r,10),s=o.toString(2),a=7-s.length%7;a==7&&(a=0);for(var u="",l=0;l<a;l++)u+="0";s=u+s;for(var l=0;l<s.length-1;l+=7){var c=s.substr(l,7);l!=s.length-7&&(c="1"+c),i+=e(parseInt(c,2))}return i};K.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",o=r.split("."),s=parseInt(o[0])*40+parseInt(o[1]);i+=e(s),o.splice(0,2);for(var a=0;a<o.length;a++)i+=t(o[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(r){var i=K.asn1.x509.OID.name2oid(r);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},n!==void 0&&(typeof n=="string"?n.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(n):this.setValueName(n):n.oid!==void 0?this.setValueOidString(n.oid):n.hex!==void 0?this.setValueHex(n.hex):n.name!==void 0&&this.setValueName(n.name))},Oe.lang.extend(K.asn1.DERObjectIdentifier,K.asn1.ASN1Object),K.asn1.DEREnumerated=function(n){K.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=K.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new se(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))},Oe.lang.extend(K.asn1.DEREnumerated,K.asn1.ASN1Object),K.asn1.DERUTF8String=function(n){K.asn1.DERUTF8String.superclass.constructor.call(this,n),this.hT="0c"},Oe.lang.extend(K.asn1.DERUTF8String,K.asn1.DERAbstractString),K.asn1.DERNumericString=function(n){K.asn1.DERNumericString.superclass.constructor.call(this,n),this.hT="12"},Oe.lang.extend(K.asn1.DERNumericString,K.asn1.DERAbstractString),K.asn1.DERPrintableString=function(n){K.asn1.DERPrintableString.superclass.constructor.call(this,n),this.hT="13"},Oe.lang.extend(K.asn1.DERPrintableString,K.asn1.DERAbstractString),K.asn1.DERTeletexString=function(n){K.asn1.DERTeletexString.superclass.constructor.call(this,n),this.hT="14"},Oe.lang.extend(K.asn1.DERTeletexString,K.asn1.DERAbstractString),K.asn1.DERIA5String=function(n){K.asn1.DERIA5String.superclass.constructor.call(this,n),this.hT="16"},Oe.lang.extend(K.asn1.DERIA5String,K.asn1.DERAbstractString),K.asn1.DERUTCTime=function(n){K.asn1.DERUTCTime.superclass.constructor.call(this,n),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{12}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date))},Oe.lang.extend(K.asn1.DERUTCTime,K.asn1.DERAbstractTime),K.asn1.DERGeneralizedTime=function(n){K.asn1.DERGeneralizedTime.superclass.constructor.call(this,n),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{14}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date),n.millis===!0&&(this.withMillis=!0))},Oe.lang.extend(K.asn1.DERGeneralizedTime,K.asn1.DERAbstractTime),K.asn1.DERSequence=function(n){K.asn1.DERSequence.superclass.constructor.call(this,n),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e+=r.getEncodedHex()}return this.hV=e,this.hV}},Oe.lang.extend(K.asn1.DERSequence,K.asn1.DERAbstractStructured),K.asn1.DERSet=function(n){K.asn1.DERSet.superclass.constructor.call(this,n),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return this.sortFlag==!0&&e.sort(),this.hV=e.join(""),this.hV},typeof n<"u"&&typeof n.sortflag<"u"&&n.sortflag==!1&&(this.sortFlag=!1)},Oe.lang.extend(K.asn1.DERSet,K.asn1.DERAbstractStructured),K.asn1.DERTaggedObject=function(n){K.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.tag<"u"&&(this.hT=n.tag),typeof n.explicit<"u"&&(this.isExplicit=n.explicit),typeof n.obj<"u"&&(this.asn1Object=n.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Oe.lang.extend(K.asn1.DERTaggedObject,K.asn1.ASN1Object);var Nx=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}();(function(n){Nx(e,n);function e(t){var r=n.call(this)||this;return t&&(typeof t=="string"?r.parseKey(t):(e.hasPrivateKeyProperty(t)||e.hasPublicKeyProperty(t))&&r.parsePropertiesFrom(t)),r}return e.prototype.parseKey=function(t){try{var r=0,i=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,s=o.test(t)?_x.decode(t):Jo.unarmor(t),a=$x.decode(s);if(a.sub.length===3&&(a=a.sub[2].sub[0]),a.sub.length===9){r=a.sub[1].getHexStringValue(),this.n=Ve(r,16),i=a.sub[2].getHexStringValue(),this.e=parseInt(i,16);var u=a.sub[3].getHexStringValue();this.d=Ve(u,16);var l=a.sub[4].getHexStringValue();this.p=Ve(l,16);var c=a.sub[5].getHexStringValue();this.q=Ve(c,16);var h=a.sub[6].getHexStringValue();this.dmp1=Ve(h,16);var d=a.sub[7].getHexStringValue();this.dmq1=Ve(d,16);var p=a.sub[8].getHexStringValue();this.coeff=Ve(p,16)}else if(a.sub.length===2)if(a.sub[0].sub){var f=a.sub[1],v=f.sub[0];r=v.sub[0].getHexStringValue(),this.n=Ve(r,16),i=v.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=a.sub[0].getHexStringValue(),this.n=Ve(r,16),i=a.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new K.asn1.DERInteger({int:0}),new K.asn1.DERInteger({bigint:this.n}),new K.asn1.DERInteger({int:this.e}),new K.asn1.DERInteger({bigint:this.d}),new K.asn1.DERInteger({bigint:this.p}),new K.asn1.DERInteger({bigint:this.q}),new K.asn1.DERInteger({bigint:this.dmp1}),new K.asn1.DERInteger({bigint:this.dmq1}),new K.asn1.DERInteger({bigint:this.coeff})]},r=new K.asn1.DERSequence(t);return r.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return su(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new K.asn1.DERSequence({array:[new K.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new K.asn1.DERNull]}),r=new K.asn1.DERSequence({array:[new K.asn1.DERInteger({bigint:this.n}),new K.asn1.DERInteger({int:this.e})]}),i=new K.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new K.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return su(this.getPublicBaseKey())},e.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
81
- ?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
82
- `)},e.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
83
- `;return t+=e.wordwrap(this.getPrivateBaseKeyB64())+`
84
- `,t+="-----END RSA PRIVATE KEY-----",t},e.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
85
- `;return t+=e.wordwrap(this.getPublicBaseKeyB64())+`
86
- `,t+="-----END PUBLIC KEY-----",t},e.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e})(Cx);var so;typeof process<"u"&&((so=Xb)===null||so===void 0||so.npm_package_version);var up={exports:{}};/*! @preserve
87
- * numeral.js
88
- * version : 2.0.6
89
- * author : Adam Draper
90
- * license : MIT
91
- * http://adamwdraper.github.com/Numeral-js/
92
- */(function(n){(function(e,t){n.exports?n.exports=t():e.numeral=t()})(Ze,function(){var e,t,r="2.0.6",i={},o={},s={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},a={currentLocale:s.currentLocale,zeroFormat:s.zeroFormat,nullFormat:s.nullFormat,defaultFormat:s.defaultFormat,scalePercentBy100:s.scalePercentBy100};function u(l,c){this._input=l,this._value=c}return e=function(l){var c,h,d,p;if(e.isNumeral(l))c=l.value();else if(l===0||typeof l>"u")c=0;else if(l===null||t.isNaN(l))c=null;else if(typeof l=="string")if(a.zeroFormat&&l===a.zeroFormat)c=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)c=null;else{for(h in i)if(p=typeof i[h].regexps.unformat=="function"?i[h].regexps.unformat():i[h].regexps.unformat,p&&l.match(p)){d=i[h].unformat;break}d=d||e._.stringToNumber,c=d(l)}else c=Number(l)||null;return new u(l,c)},e.version=r,e.isNumeral=function(l){return l instanceof u},e._=t={numberToFormat:function(l,c,h){var d=o[e.options.currentLocale],p=!1,f=!1,v=0,y="",$=1e12,g=1e9,w=1e6,_=1e3,x="",b=!1,E,O,H,S,j,N,V;if(l=l||0,O=Math.abs(l),e._.includes(c,"(")?(p=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(j=e._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(E=c.match(/a(k|m|b|t)?/),E=E?E[1]:!1,e._.includes(c," a")&&(y=" "),c=c.replace(new RegExp(y+"a[kmbt]?"),""),O>=$&&!E||E==="t"?(y+=d.abbreviations.trillion,l=l/$):O<$&&O>=g&&!E||E==="b"?(y+=d.abbreviations.billion,l=l/g):O<g&&O>=w&&!E||E==="m"?(y+=d.abbreviations.million,l=l/w):(O<w&&O>=_&&!E||E==="k")&&(y+=d.abbreviations.thousand,l=l/_)),e._.includes(c,"[.]")&&(f=!0,c=c.replace("[.]",".")),H=l.toString().split(".")[0],S=c.split(".")[1],N=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,S?(e._.includes(S,"[")?(S=S.replace("]",""),S=S.split("["),x=e._.toFixed(l,S[0].length+S[1].length,h,S[1].length)):x=e._.toFixed(l,S.length,h),H=x.split(".")[0],e._.includes(x,".")?x=d.delimiters.decimal+x.split(".")[1]:x="",f&&Number(x.slice(1))===0&&(x="")):H=e._.toFixed(l,0,h),y&&!E&&Number(H)>=1e3&&y!==d.abbreviations.trillion)switch(H=String(Number(H)/1e3),y){case d.abbreviations.thousand:y=d.abbreviations.million;break;case d.abbreviations.million:y=d.abbreviations.billion;break;case d.abbreviations.billion:y=d.abbreviations.trillion;break}if(e._.includes(H,"-")&&(H=H.slice(1),b=!0),H.length<v)for(var z=v-H.length;z>0;z--)H="0"+H;return N>-1&&(H=H.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),c.indexOf(".")===0&&(H=""),V=H+x+(y||""),p?V=(p&&b?"(":"")+V+(p&&b?")":""):j>=0?V=j===0?(b?"-":"+")+V:V+(b?"-":"+"):b&&(V="-"+V),V},stringToNumber:function(l){var c=o[a.currentLocale],h=l,d={thousand:3,million:6,billion:9,trillion:12},p,f,v;if(a.zeroFormat&&l===a.zeroFormat)f=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)f=null;else{f=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(p in d)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[p]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),h.match(v)){f*=Math.pow(10,d[p]);break}f*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),f*=Number(l)}return f},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,h){return l.slice(0,h)+c+l.slice(h)},reduce:function(l,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var h=Object(l),d=h.length>>>0,p=0,f;if(arguments.length===3)f=arguments[2];else{for(;p<d&&!(p in h);)p++;if(p>=d)throw new TypeError("Reduce of empty array with no initial value");f=h[p++]}for(;p<d;p++)p in h&&(f=c(f,h[p],p,h));return f},multiplier:function(l){var c=l.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var l=Array.prototype.slice.call(arguments);return l.reduce(function(c,h){var d=t.multiplier(h);return c>d?c:d},1)},toFixed:function(l,c,h,d){var p=l.toString().split("."),f=c-(d||0),v,y,$,g;return p.length===2?v=Math.min(Math.max(p[1].length,f),c):v=f,$=Math.pow(10,v),g=(h(l+"e+"+v)/$).toFixed(v),d>c-v&&(y=new RegExp("\\.?0{1,"+(d-(c-v))+"}$"),g=g.replace(y,"")),g}},e.options=a,e.formats=i,e.locales=o,e.locale=function(l){return l&&(a.currentLocale=l.toLowerCase()),a.currentLocale},e.localeData=function(l){if(!l)return o[a.currentLocale];if(l=l.toLowerCase(),!o[l])throw new Error("Unknown locale : "+l);return o[l]},e.reset=function(){for(var l in s)a[l]=s[l]},e.zeroFormat=function(l){a.zeroFormat=typeof l=="string"?l:null},e.nullFormat=function(l){a.nullFormat=typeof l=="string"?l:null},e.defaultFormat=function(l){a.defaultFormat=typeof l=="string"?l:"0.0"},e.register=function(l,c,h){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=h,h},e.validate=function(l,c){var h,d,p,f,v,y,$,g;if(typeof l!="string"&&(l+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",l)),l=l.trim(),l.match(/^\d+$/))return!0;if(l==="")return!1;try{$=e.localeData(c)}catch{$=e.localeData(e.locale())}return p=$.currency.symbol,v=$.abbreviations,h=$.delimiters.decimal,$.delimiters.thousands==="."?d="\\.":d=$.delimiters.thousands,g=l.match(/^[^\d]+/),g!==null&&(l=l.substr(1),g[0]!==p)||(g=l.match(/[^\d]+$/),g!==null&&(l=l.slice(0,-1),g[0]!==v.thousand&&g[0]!==v.million&&g[0]!==v.billion&&g[0]!==v.trillion))?!1:(y=new RegExp(d+"{2}"),l.match(/[^\d.,]/g)?!1:(f=l.split(h),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(y):f[0].length===1?!!f[0].match(/^\d+$/)&&!f[0].match(y)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(y)&&!!f[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(l,c){var h=this._value,d=l||a.defaultFormat,p,f,v;if(c=c||Math.round,h===0&&a.zeroFormat!==null)f=a.zeroFormat;else if(h===null&&a.nullFormat!==null)f=a.nullFormat;else{for(p in i)if(d.match(i[p].regexps.format)){v=i[p].format;break}v=v||e._.numberToFormat,f=v(h,d,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(l){return this._value=Number(l),this},add:function(l){var c=t.correctionFactor.call(null,this._value,l);function h(d,p,f,v){return d+Math.round(c*p)}return this._value=t.reduce([this._value,l],h,0)/c,this},subtract:function(l){var c=t.correctionFactor.call(null,this._value,l);function h(d,p,f,v){return d-Math.round(c*p)}return this._value=t.reduce([l],h,Math.round(this._value*c))/c,this},multiply:function(l){function c(h,d,p,f){var v=t.correctionFactor(h,d);return Math.round(h*v)*Math.round(d*v)/Math.round(v*v)}return this._value=t.reduce([this._value,l],c,1),this},divide:function(l){function c(h,d,p,f){var v=t.correctionFactor(h,d);return Math.round(h*v)/Math.round(d*v)}return this._value=t.reduce([this._value,l],c),this},difference:function(l){return Math.abs(e(this._value).subtract(l).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(l){var c=l%10;return~~(l%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(l,c,h){var d=e._.includes(c," BPS")?" ":"",p;return l=l*1e4,c=c.replace(/\s?BPS/,""),p=e._.numberToFormat(l,c,h),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,d+"BPS"),p=p.join("")):p=p+d+"BPS",p},unformat:function(l){return+(e._.stringToNumber(l)*1e-4).toFixed(15)}})}(),function(){var l={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=l.suffixes.concat(c.suffixes.filter(function(p){return l.suffixes.indexOf(p)<0})),d=h.join("|");d="("+d.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(d)},format:function(p,f,v){var y,$=e._.includes(f,"ib")?c:l,g=e._.includes(f," b")||e._.includes(f," ib")?" ":"",w,_,x;for(f=f.replace(/\s?i?b/,""),w=0;w<=$.suffixes.length;w++)if(_=Math.pow($.base,w),x=Math.pow($.base,w+1),p===null||p===0||p>=_&&p<x){g+=$.suffixes[w],_>0&&(p=p/_);break}return y=e._.numberToFormat(p,f,v),y+g},unformat:function(p){var f=e._.stringToNumber(p),v,y;if(f){for(v=l.suffixes.length-1;v>=0;v--){if(e._.includes(p,l.suffixes[v])){y=Math.pow(l.base,v);break}if(e._.includes(p,c.suffixes[v])){y=Math.pow(c.base,v);break}}f*=y||1}return f}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,h){var d=e.locales[e.options.currentLocale],p={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},f,v,y;for(c=c.replace(/\s?\$\s?/,""),f=e._.numberToFormat(l,c,h),l>=0?(p.before=p.before.replace(/[\-\(]/,""),p.after=p.after.replace(/[\-\)]/,"")):l<0&&!e._.includes(p.before,"-")&&!e._.includes(p.before,"(")&&(p.before="-"+p.before),y=0;y<p.before.length;y++)switch(v=p.before[y],v){case"$":f=e._.insert(f,d.currency.symbol,y);break;case" ":f=e._.insert(f," ",y+d.currency.symbol.length-1);break}for(y=p.after.length-1;y>=0;y--)switch(v=p.after[y],v){case"$":f=y===p.after.length-1?f+d.currency.symbol:e._.insert(f,d.currency.symbol,-(p.after.length-(1+y)));break;case" ":f=y===p.after.length-1?f+" ":e._.insert(f," ",-(p.after.length-(1+y)+d.currency.symbol.length-1));break}return f}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,h){var d,p=typeof l=="number"&&!e._.isNaN(l)?l.toExponential():"0e+0",f=p.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),d=e._.numberToFormat(Number(f[0]),c,h),d+"e"+f[1]},unformat:function(l){var c=e._.includes(l,"e+")?l.split("e+"):l.split("e-"),h=Number(c[0]),d=Number(c[1]);d=e._.includes(l,"e-")?d*=-1:d;function p(f,v,y,$){var g=e._.correctionFactor(f,v),w=f*g*(v*g)/(g*g);return w}return e._.reduce([h,Math.pow(10,d)],p,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,h){var d=e.locales[e.options.currentLocale],p,f=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),f+=d.ordinal(l),p=e._.numberToFormat(l,c,h),p+f}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,h){var d=e._.includes(c," %")?" ":"",p;return e.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),p=e._.numberToFormat(l,c,h),e._.includes(p,")")?(p=p.split(""),p.splice(-1,0,d+"%"),p=p.join("")):p=p+d+"%",p},unformat:function(l){var c=e._.stringToNumber(l);return e.options.scalePercentBy100?c*.01:c}})}(),function(){e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(l,c,h){var d=Math.floor(l/60/60),p=Math.floor((l-d*60*60)/60),f=Math.round(l-d*60*60-p*60);return d+":"+(p<10?"0"+p:p)+":"+(f<10?"0"+f:f)},unformat:function(l){var c=l.split(":"),h=0;return c.length===3?(h=h+Number(c[0])*60*60,h=h+Number(c[1])*60,h=h+Number(c[2])):c.length===2&&(h=h+Number(c[0])*60,h=h+Number(c[1])),Number(h)}})}(),e})})(up);var Fx=up.exports;Xn(Fx);var cp={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Ze,function(){var t=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",u="hour",l="day",c="week",h="month",d="quarter",p="year",f="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var B=["th","st","nd","rd"],R=z%100;return"["+z+(B[(R-20)%10]||B[R]||B[0])+"]"}},w=function(z,B,R){var U=String(z);return!U||U.length>=B?z:""+Array(B+1-U.length).join(R)+z},_={s:w,z:function(z){var B=-z.utcOffset(),R=Math.abs(B),U=Math.floor(R/60),P=R%60;return(B<=0?"+":"-")+w(U,2,"0")+":"+w(P,2,"0")},m:function z(B,R){if(B.date()<R.date())return-z(R,B);var U=12*(R.year()-B.year())+(R.month()-B.month()),P=B.clone().add(U,h),G=R-P<0,X=B.clone().add(U+(G?-1:1),h);return+(-(U+(R-P)/(G?P-X:X-P))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:h,y:p,w:c,d:l,D:f,h:u,m:a,s,ms:o,Q:d}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},x="en",b={};b[x]=g;var E="$isDayjsObject",O=function(z){return z instanceof N||!(!z||!z[E])},H=function z(B,R,U){var P;if(!B)return x;if(typeof B=="string"){var G=B.toLowerCase();b[G]&&(P=G),R&&(b[G]=R,P=G);var X=B.split("-");if(!P&&X.length>1)return z(X[0])}else{var D=B.name;b[D]=B,P=D}return!U&&P&&(x=P),P||!U&&x},S=function(z,B){if(O(z))return z.clone();var R=typeof B=="object"?B:{};return R.date=z,R.args=arguments,new N(R)},j=_;j.l=H,j.i=O,j.w=function(z,B){return S(z,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var N=function(){function z(R){this.$L=H(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[E]=!0}var B=z.prototype;return B.parse=function(R){this.$d=function(U){var P=U.date,G=U.utc;if(P===null)return new Date(NaN);if(j.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var X=P.match(y);if(X){var D=X[2]-1||0,C=(X[7]||"0").substring(0,3);return G?new Date(Date.UTC(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,C)):new Date(X[1],D,X[3]||1,X[4]||0,X[5]||0,X[6]||0,C)}}return new Date(P)}(R),this.init()},B.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},B.$utils=function(){return j},B.isValid=function(){return this.$d.toString()!==v},B.isSame=function(R,U){var P=S(R);return this.startOf(U)<=P&&P<=this.endOf(U)},B.isAfter=function(R,U){return S(R)<this.startOf(U)},B.isBefore=function(R,U){return this.endOf(U)<S(R)},B.$g=function(R,U,P){return j.u(R)?this[U]:this.set(P,R)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(R,U){var P=this,G=!!j.u(U)||U,X=j.p(R),D=function(qe,me){var Ie=j.w(P.$u?Date.UTC(P.$y,me,qe):new Date(P.$y,me,qe),P);return G?Ie:Ie.endOf(l)},C=function(qe,me){return j.w(P.toDate()[qe].apply(P.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(me)),P)},I=this.$W,M=this.$M,xe=this.$D,et="set"+(this.$u?"UTC":"");switch(X){case p:return G?D(1,0):D(31,11);case h:return G?D(1,M):D(0,M+1);case c:var Ue=this.$locale().weekStart||0,ct=(I<Ue?I+7:I)-Ue;return D(G?xe-ct:xe+(6-ct),M);case l:case f:return C(et+"Hours",0);case u:return C(et+"Minutes",1);case a:return C(et+"Seconds",2);case s:return C(et+"Milliseconds",3);default:return this.clone()}},B.endOf=function(R){return this.startOf(R,!1)},B.$set=function(R,U){var P,G=j.p(R),X="set"+(this.$u?"UTC":""),D=(P={},P[l]=X+"Date",P[f]=X+"Date",P[h]=X+"Month",P[p]=X+"FullYear",P[u]=X+"Hours",P[a]=X+"Minutes",P[s]=X+"Seconds",P[o]=X+"Milliseconds",P)[G],C=G===l?this.$D+(U-this.$W):U;if(G===h||G===p){var I=this.clone().set(f,1);I.$d[D](C),I.init(),this.$d=I.set(f,Math.min(this.$D,I.daysInMonth())).$d}else D&&this.$d[D](C);return this.init(),this},B.set=function(R,U){return this.clone().$set(R,U)},B.get=function(R){return this[j.p(R)]()},B.add=function(R,U){var P,G=this;R=Number(R);var X=j.p(U),D=function(M){var xe=S(G);return j.w(xe.date(xe.date()+Math.round(M*R)),G)};if(X===h)return this.set(h,this.$M+R);if(X===p)return this.set(p,this.$y+R);if(X===l)return D(1);if(X===c)return D(7);var C=(P={},P[a]=r,P[u]=i,P[s]=t,P)[X]||1,I=this.$d.getTime()+R*C;return j.w(I,this)},B.subtract=function(R,U){return this.add(-1*R,U)},B.format=function(R){var U=this,P=this.$locale();if(!this.isValid())return P.invalidDate||v;var G=R||"YYYY-MM-DDTHH:mm:ssZ",X=j.z(this),D=this.$H,C=this.$m,I=this.$M,M=P.weekdays,xe=P.months,et=P.meridiem,Ue=function(me,Ie,ht,Tt){return me&&(me[Ie]||me(U,G))||ht[Ie].slice(0,Tt)},ct=function(me){return j.s(D%12||12,me,"0")},qe=et||function(me,Ie,ht){var Tt=me<12?"AM":"PM";return ht?Tt.toLowerCase():Tt};return G.replace($,function(me,Ie){return Ie||function(ht){switch(ht){case"YY":return String(U.$y).slice(-2);case"YYYY":return j.s(U.$y,4,"0");case"M":return I+1;case"MM":return j.s(I+1,2,"0");case"MMM":return Ue(P.monthsShort,I,xe,3);case"MMMM":return Ue(xe,I);case"D":return U.$D;case"DD":return j.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Ue(P.weekdaysMin,U.$W,M,2);case"ddd":return Ue(P.weekdaysShort,U.$W,M,3);case"dddd":return M[U.$W];case"H":return String(D);case"HH":return j.s(D,2,"0");case"h":return ct(1);case"hh":return ct(2);case"a":return qe(D,C,!0);case"A":return qe(D,C,!1);case"m":return String(C);case"mm":return j.s(C,2,"0");case"s":return String(U.$s);case"ss":return j.s(U.$s,2,"0");case"SSS":return j.s(U.$ms,3,"0");case"Z":return X}return null}(me)||X.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(R,U,P){var G,X=this,D=j.p(U),C=S(R),I=(C.utcOffset()-this.utcOffset())*r,M=this-C,xe=function(){return j.m(X,C)};switch(D){case p:G=xe()/12;break;case h:G=xe();break;case d:G=xe()/3;break;case c:G=(M-I)/6048e5;break;case l:G=(M-I)/864e5;break;case u:G=M/i;break;case a:G=M/r;break;case s:G=M/t;break;default:G=M}return P?G:j.a(G)},B.daysInMonth=function(){return this.endOf(h).$D},B.$locale=function(){return b[this.$L]},B.locale=function(R,U){if(!R)return this.$L;var P=this.clone(),G=H(R,U,!0);return G&&(P.$L=G),P},B.clone=function(){return j.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},z}(),V=N.prototype;return S.prototype=V,[["$ms",o],["$s",s],["$m",a],["$H",u],["$W",l],["$M",h],["$y",p],["$D",f]].forEach(function(z){V[z[1]]=function(B){return this.$g(B,z[0],z[1])}}),S.extend=function(z,B){return z.$i||(z(B,N,S),z.$i=!0),S},S.locale=H,S.isDayjs=O,S.unix=function(z){return S(1e3*z)},S.en=b[x],S.Ls=b,S.p={},S})})(cp);var hp=cp.exports;const zx=Xn(hp);var Px={exports:{}};(function(n,e){(function(t,r){n.exports=r(hp)})(Ze,function(t){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,a){return a==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,a){var u=100*s+a;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(Px),zx.locale("zh-cn");const Lx=n=>Object.prototype.toString.call(n),ao=n=>Lx(n).slice(8,-1);function Hx(n=!0){const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)});return n?e.toLowerCase():e.replace(/-/gi,"")}async function dp(n=0){return new Promise(e=>{setTimeout(e,n)})}function Ux(n,e){return n.reduce((t,r)=>{const i=r[e];return t.set(i,r),t},new Map)}function qx(n){return[...n.entries()].reduce((e,[t,r])=>(e[t]=r,e),{})}function pp(n){return n?[].concat(n):[]}function lo(n,e){const t={};if(Array.isArray(e))Object.keys(n).forEach(r=>{e.includes(r)||(t[r]=n[r])});else{const r=e;Object.entries(n).forEach(([i,o])=>{r(i,o)||(t[i]=o)})}return t}function Wx(n,e){const t={};if(Array.isArray(e))Object.keys(n).forEach(r=>{e.includes(r)&&(t[r]=n[r])});else{const r=e;Object.entries(n).forEach(([i,o])=>{r(i,o)&&(t[i]=o)})}return t}var Ko={exports:{}};Ko.exports,function(n){var e=function(){var t=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function s(u,l){if(!o[u]){o[u]={};for(var c=0;c<u.length;c++)o[u][u.charAt(c)]=c}return o[u][l]}var a={compressToBase64:function(u){if(u==null)return"";var l=a._compress(u,6,function(c){return r.charAt(c)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(u){return u==null?"":u==""?null:a._decompress(u.length,32,function(l){return s(r,u.charAt(l))})},compressToUTF16:function(u){return u==null?"":a._compress(u,15,function(l){return t(l+32)})+" "},decompressFromUTF16:function(u){return u==null?"":u==""?null:a._decompress(u.length,16384,function(l){return u.charCodeAt(l)-32})},compressToUint8Array:function(u){for(var l=a.compress(u),c=new Uint8Array(l.length*2),h=0,d=l.length;h<d;h++){var p=l.charCodeAt(h);c[h*2]=p>>>8,c[h*2+1]=p%256}return c},decompressFromUint8Array:function(u){if(u==null)return a.decompress(u);for(var l=new Array(u.length/2),c=0,h=l.length;c<h;c++)l[c]=u[c*2]*256+u[c*2+1];var d=[];return l.forEach(function(p){d.push(t(p))}),a.decompress(d.join(""))},compressToEncodedURIComponent:function(u){return u==null?"":a._compress(u,6,function(l){return i.charAt(l)})},decompressFromEncodedURIComponent:function(u){return u==null?"":u==""?null:(u=u.replace(/ /g,"+"),a._decompress(u.length,32,function(l){return s(i,u.charAt(l))}))},compress:function(u){return a._compress(u,16,function(l){return t(l)})},_compress:function(u,l,c){if(u==null)return"";var h,d,p={},f={},v="",y="",$="",g=2,w=3,_=2,x=[],b=0,E=0,O;for(O=0;O<u.length;O+=1)if(v=u.charAt(O),Object.prototype.hasOwnProperty.call(p,v)||(p[v]=w++,f[v]=!0),y=$+v,Object.prototype.hasOwnProperty.call(p,y))$=y;else{if(Object.prototype.hasOwnProperty.call(f,$)){if($.charCodeAt(0)<256){for(h=0;h<_;h++)b=b<<1,E==l-1?(E=0,x.push(c(b)),b=0):E++;for(d=$.charCodeAt(0),h=0;h<8;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}else{for(d=1,h=0;h<_;h++)b=b<<1|d,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=0;for(d=$.charCodeAt(0),h=0;h<16;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}g--,g==0&&(g=Math.pow(2,_),_++),delete f[$]}else for(d=p[$],h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;g--,g==0&&(g=Math.pow(2,_),_++),p[y]=w++,$=String(v)}if($!==""){if(Object.prototype.hasOwnProperty.call(f,$)){if($.charCodeAt(0)<256){for(h=0;h<_;h++)b=b<<1,E==l-1?(E=0,x.push(c(b)),b=0):E++;for(d=$.charCodeAt(0),h=0;h<8;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}else{for(d=1,h=0;h<_;h++)b=b<<1|d,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=0;for(d=$.charCodeAt(0),h=0;h<16;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1}g--,g==0&&(g=Math.pow(2,_),_++),delete f[$]}else for(d=p[$],h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;g--,g==0&&(g=Math.pow(2,_),_++)}for(d=2,h=0;h<_;h++)b=b<<1|d&1,E==l-1?(E=0,x.push(c(b)),b=0):E++,d=d>>1;for(;;)if(b=b<<1,E==l-1){x.push(c(b));break}else E++;return x.join("")},decompress:function(u){return u==null?"":u==""?null:a._decompress(u.length,32768,function(l){return u.charCodeAt(l)})},_decompress:function(u,l,c){var h=[],d=4,p=4,f=3,v="",y=[],$,g,w,_,x,b,E,O={val:c(0),position:l,index:1};for($=0;$<3;$+=1)h[$]=$;for(w=0,x=Math.pow(2,2),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;switch(w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;E=t(w);break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;E=t(w);break;case 2:return""}for(h[3]=E,g=E,y.push(E);;){if(O.index>u)return"";for(w=0,x=Math.pow(2,f),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;switch(E=w){case 0:for(w=0,x=Math.pow(2,8),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;h[p++]=t(w),E=p-1,d--;break;case 1:for(w=0,x=Math.pow(2,16),b=1;b!=x;)_=O.val&O.position,O.position>>=1,O.position==0&&(O.position=l,O.val=c(O.index++)),w|=(_>0?1:0)*b,b<<=1;h[p++]=t(w),E=p-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,f),f++),h[E])v=h[E];else if(E===p)v=g+g.charAt(0);else return null;y.push(v),h[p++]=g+v.charAt(0),d--,g=v,d==0&&(d=Math.pow(2,f),f++)}}};return a}();n!=null?n.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})}(Ko);var fp=Ko.exports;fp.compress;fp.decompress;function mp(n,e){return function(){return n.apply(e,arguments)}}const{toString:Jx}=Object.prototype,{getPrototypeOf:Gs}=Object,Ri=(n=>e=>{const t=Jx.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Et=n=>(n=n.toLowerCase(),e=>Ri(e)===n),Mi=n=>e=>typeof e===n,{isArray:Qn}=Array,jr=Mi("undefined");function Yx(n){return n!==null&&!jr(n)&&n.constructor!==null&&!jr(n.constructor)&&lt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const vp=Et("ArrayBuffer");function Kx(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&vp(n.buffer),e}const Zx=Mi("string"),lt=Mi("function"),gp=Mi("number"),Ni=n=>n!==null&&typeof n=="object",Gx=n=>n===!0||n===!1,ai=n=>{if(Ri(n)!=="object")return!1;const e=Gs(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Xx=Et("Date"),Qx=Et("File"),eS=Et("Blob"),tS=Et("FileList"),nS=n=>Ni(n)&&lt(n.pipe),rS=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||lt(n.append)&&((e=Ri(n))==="formdata"||e==="object"&&lt(n.toString)&&n.toString()==="[object FormData]"))},iS=Et("URLSearchParams"),oS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vr(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),Qn(n))for(r=0,i=n.length;r<i;r++)e.call(null,n[r],r,n);else{const o=t?Object.getOwnPropertyNames(n):Object.keys(n),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,n[a],a,n)}}function yp(n,e){e=e.toLowerCase();const t=Object.keys(n);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const bp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wp=n=>!jr(n)&&n!==bp;function Zo(){const{caseless:n}=wp(this)&&this||{},e={},t=(r,i)=>{const o=n&&yp(e,i)||i;ai(e[o])&&ai(r)?e[o]=Zo(e[o],r):ai(r)?e[o]=Zo({},r):Qn(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Vr(arguments[r],t);return e}const sS=(n,e,t,{allOwnKeys:r}={})=>(Vr(e,(i,o)=>{t&&lt(i)?n[o]=mp(i,t):n[o]=i},{allOwnKeys:r}),n),aS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),lS=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},uS=(n,e,t,r)=>{let i,o,s;const a={};if(e=e||{},n==null)return e;do{for(i=Object.getOwnPropertyNames(n),o=i.length;o-- >0;)s=i[o],(!r||r(s,n,e))&&!a[s]&&(e[s]=n[s],a[s]=!0);n=t!==!1&&Gs(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},cS=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},hS=n=>{if(!n)return null;if(Qn(n))return n;let e=n.length;if(!gp(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},dS=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Gs(Uint8Array)),pS=(n,e)=>{const t=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=t.next())&&!r.done;){const i=r.value;e.call(n,i[0],i[1])}},fS=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},mS=Et("HTMLFormElement"),vS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),pu=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),gS=Et("RegExp"),_p=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Vr(t,(i,o)=>{let s;(s=e(i,o,n))!==!1&&(r[o]=s||i)}),Object.defineProperties(n,r)},yS=n=>{_p(n,(e,t)=>{if(lt(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(lt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},bS=(n,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return Qn(n)?r(n):r(String(n).split(e)),t},wS=()=>{},_S=(n,e)=>(n=+n,Number.isFinite(n)?n:e),uo="abcdefghijklmnopqrstuvwxyz",fu="0123456789",xp={DIGIT:fu,ALPHA:uo,ALPHA_DIGIT:uo+uo.toUpperCase()+fu},xS=(n=16,e=xp.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function SS(n){return!!(n&&lt(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const $S=n=>{const e=new Array(10),t=(r,i)=>{if(Ni(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=Qn(r)?[]:{};return Vr(r,(s,a)=>{const u=t(s,i+1);!jr(u)&&(o[a]=u)}),e[i]=void 0,o}}return r};return t(n,0)},jS=Et("AsyncFunction"),ES=n=>n&&(Ni(n)||lt(n))&&lt(n.then)&&lt(n.catch),W={isArray:Qn,isArrayBuffer:vp,isBuffer:Yx,isFormData:rS,isArrayBufferView:Kx,isString:Zx,isNumber:gp,isBoolean:Gx,isObject:Ni,isPlainObject:ai,isUndefined:jr,isDate:Xx,isFile:Qx,isBlob:eS,isRegExp:gS,isFunction:lt,isStream:nS,isURLSearchParams:iS,isTypedArray:dS,isFileList:tS,forEach:Vr,merge:Zo,extend:sS,trim:oS,stripBOM:aS,inherits:lS,toFlatObject:uS,kindOf:Ri,kindOfTest:Et,endsWith:cS,toArray:hS,forEachEntry:pS,matchAll:fS,isHTMLForm:mS,hasOwnProperty:pu,hasOwnProp:pu,reduceDescriptors:_p,freezeMethods:yS,toObjectSet:bS,toCamelCase:vS,noop:wS,toFiniteNumber:_S,findKey:yp,global:bp,isContextDefined:wp,ALPHABET:xp,generateString:xS,isSpecCompliantForm:SS,toJSONObject:$S,isAsyncFn:jS,isThenable:ES};function de(n,e,t,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i)}W.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Sp=de.prototype,$p={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{$p[n]={value:n}});Object.defineProperties(de,$p);Object.defineProperty(Sp,"isAxiosError",{value:!0});de.from=(n,e,t,r,i,o)=>{const s=Object.create(Sp);return W.toFlatObject(n,s,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),de.call(s,n.message,e,t,r,i),s.cause=n,s.name=n.name,o&&Object.assign(s,o),s};const kS=null;function Go(n){return W.isPlainObject(n)||W.isArray(n)}function jp(n){return W.endsWith(n,"[]")?n.slice(0,-2):n}function mu(n,e,t){return n?n.concat(e).map(function(r,i){return r=jp(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function TS(n){return W.isArray(n)&&!n.some(Go)}const VS=W.toFlatObject(W,{},null,function(n){return/^is[A-Z]/.test(n)});function Fi(n,e,t){if(!W.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=W.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,f){return!W.isUndefined(f[p])});const r=t.metaTokens,i=t.visitor||l,o=t.dots,s=t.indexes,a=(t.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(W.isDate(p))return p.toISOString();if(!a&&W.isBlob(p))throw new de("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(p)||W.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,f,v){let y=p;if(p&&!v&&typeof p=="object"){if(W.endsWith(f,"{}"))f=r?f:f.slice(0,-2),p=JSON.stringify(p);else if(W.isArray(p)&&TS(p)||(W.isFileList(p)||W.endsWith(f,"[]"))&&(y=W.toArray(p)))return f=jp(f),y.forEach(function($,g){!(W.isUndefined($)||$===null)&&e.append(s===!0?mu([f],g,o):s===null?f:f+"[]",u($))}),!1}return Go(p)?!0:(e.append(mu(v,f,o),u(p)),!1)}const c=[],h=Object.assign(VS,{defaultVisitor:l,convertValue:u,isVisitable:Go});function d(p,f){if(!W.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+f.join("."));c.push(p),W.forEach(p,function(v,y){(!(W.isUndefined(v)||v===null)&&i.call(e,v,W.isString(y)?y.trim():y,f,h))===!0&&d(v,f?f.concat(y):[y])}),c.pop()}}if(!W.isObject(n))throw new TypeError("data must be an object");return d(n),e}function vu(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Xs(n,e){this._pairs=[],n&&Fi(n,this,e)}const Ep=Xs.prototype;Ep.append=function(n,e){this._pairs.push([n,e])};Ep.toString=function(n){const e=n?function(t){return n.call(this,t,vu)}:vu;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function DS(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kp(n,e,t){if(!e)return n;const r=t&&t.encode||DS,i=t&&t.serialize;let o;if(i?o=i(e,t):o=W.isURLSearchParams(e)?e.toString():new Xs(e,t).toString(r),o){const s=n.indexOf("#");s!==-1&&(n=n.slice(0,s)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}let gu=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){W.forEach(this.handlers,function(t){t!==null&&e(t)})}};const Tp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},OS=typeof URLSearchParams<"u"?URLSearchParams:Xs,AS=typeof FormData<"u"?FormData:null,BS=typeof Blob<"u"?Blob:null,CS={isBrowser:!0,classes:{URLSearchParams:OS,FormData:AS,Blob:BS},protocols:["http","https","file","blob","url","data"]},Vp=typeof window<"u"&&typeof document<"u",IS=(n=>Vp&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),RS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vp,hasStandardBrowserEnv:IS,hasStandardBrowserWebWorkerEnv:RS},Symbol.toStringTag,{value:"Module"})),wt={...MS,...CS};function NS(n,e){return Fi(n,new wt.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return wt.isNode&&W.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function FS(n){return W.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function zS(n){const e={},t=Object.keys(n);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],e[o]=n[o];return e}function Dp(n){function e(t,r,i,o){let s=t[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=o>=t.length;return s=!s&&W.isArray(i)?i.length:s,u?(W.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!W.isObject(i[s]))&&(i[s]=[]),e(t,r,i[s],o)&&W.isArray(i[s])&&(i[s]=zS(i[s])),!a)}if(W.isFormData(n)&&W.isFunction(n.entries)){const t={};return W.forEachEntry(n,(r,i)=>{e(FS(r),i,t,0)}),t}return null}function PS(n,e,t){if(W.isString(n))try{return(e||JSON.parse)(n),W.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Qs={transitional:Tp,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=W.isObject(n);if(i&&W.isHTMLForm(n)&&(n=new FormData(n)),W.isFormData(n))return r&&r?JSON.stringify(Dp(n)):n;if(W.isArrayBuffer(n)||W.isBuffer(n)||W.isStream(n)||W.isFile(n)||W.isBlob(n))return n;if(W.isArrayBufferView(n))return n.buffer;if(W.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return NS(n,this.formSerializer).toString();if((o=W.isFileList(n))||t.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Fi(o?{"files[]":n}:n,s&&new s,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),PS(n)):n}],transformResponse:[function(n){const e=this.transitional||Qs.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&W.isString(n)&&(t&&!this.responseType||r)){const i=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(o){if(i)throw o.name==="SyntaxError"?de.from(o,de.ERR_BAD_RESPONSE,this,null,this.response):o}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],n=>{Qs.headers[n]={}});const ea=Qs,LS=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),HS=n=>{const e={};let t,r,i;return n&&n.split(`
93
- `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!t||e[t]&&LS[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},yu=Symbol("internals");function sr(n){return n&&String(n).trim().toLowerCase()}function li(n){return n===!1||n==null?n:W.isArray(n)?n.map(li):String(n)}function US(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const qS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function co(n,e,t,r,i){if(W.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!W.isString(e)){if(W.isString(r))return e.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(e)}}function WS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function JS(n,e){const t=W.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}let zi=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(a,u,l){const c=sr(u);if(!c)throw new Error("header name must be a non-empty string");const h=W.findKey(i,c);(!h||i[h]===void 0||l===!0||l===void 0&&i[h]!==!1)&&(i[h||u]=li(a))}const s=(a,u)=>W.forEach(a,(l,c)=>o(l,c,u));return W.isPlainObject(e)||e instanceof this.constructor?s(e,t):W.isString(e)&&(e=e.trim())&&!qS(e)?s(HS(e),t):e!=null&&o(t,e,r),this}get(e,t){if(e=sr(e),e){const r=W.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return US(i);if(W.isFunction(t))return t.call(this,i,r);if(W.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=sr(e),e){const r=W.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||co(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(s){if(s=sr(s),s){const a=W.findKey(r,s);a&&(!t||co(r,r[a],a,t))&&(delete r[a],i=!0)}}return W.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!e||co(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return W.forEach(this,(i,o)=>{const s=W.findKey(r,o);if(s){t[s]=li(i),delete t[o];return}const a=e?WS(o):String(o).trim();a!==o&&delete t[o],t[a]=li(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return W.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&W.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
94
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(i=>r.set(i)),r}static accessor(e){const t=(this[yu]=this[yu]={accessors:{}}).accessors,r=this.prototype;function i(o){const s=sr(o);t[s]||(JS(r,o),t[s]=!0)}return W.isArray(e)?e.forEach(i):i(e),this}};zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(zi.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});W.freezeMethods(zi);const Bt=zi;function ho(n,e){const t=this||ea,r=e||t,i=Bt.from(r.headers);let o=r.data;return W.forEach(n,function(s){o=s.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Op(n){return!!(n&&n.__CANCEL__)}function Dr(n,e,t){de.call(this,n??"canceled",de.ERR_CANCELED,e,t),this.name="CanceledError"}W.inherits(Dr,de,{__CANCEL__:!0});function YS(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new de("Request failed with status code "+t.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const KS=wt.hasStandardBrowserEnv?{write(n,e,t,r,i,o){const s=[n+"="+encodeURIComponent(e)];W.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),W.isString(r)&&s.push("path="+r),W.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ZS(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function GS(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Ap(n,e){return n&&!ZS(e)?GS(n,e):e}const XS=wt.hasStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let t;function r(i){let o=i;return n&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return t=r(window.location.href),function(i){const o=W.isString(i)?r(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}();function QS(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function e7(n,e){n=n||10;const t=new Array(n),r=new Array(n);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(a){const u=Date.now(),l=r[o];s||(s=u),t[i]=a,r[i]=u;let c=o,h=0;for(;c!==i;)h+=t[c++],c=c%n;if(i=(i+1)%n,i===o&&(o=(o+1)%n),u-s<e)return;const d=l&&u-l;return d?Math.round(h*1e3/d):void 0}}function bu(n,e){let t=0;const r=e7(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-t,u=r(a),l=o<=s;t=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&l?(s-o)/u:void 0,event:i};c[e?"download":"upload"]=!0,n(c)}}const t7=typeof XMLHttpRequest<"u",n7=t7&&function(n){return new Promise(function(e,t){let r=n.data;const i=Bt.from(n.headers).normalize();let{responseType:o,withXSRFToken:s}=n,a;function u(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let l;if(W.isFormData(r)){if(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[f,...v]=l?l.split(";").map(y=>y.trim()).filter(Boolean):[];i.setContentType([f||"multipart/form-data",...v].join("; "))}}let c=new XMLHttpRequest;if(n.auth){const f=n.auth.username||"",v=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(f+":"+v))}const h=Ap(n.baseURL,n.url);c.open(n.method.toUpperCase(),kp(h,n.params,n.paramsSerializer),!0),c.timeout=n.timeout;function d(){if(!c)return;const f=Bt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:n,request:c};YS(function(y){e(y),u()},function(y){t(y),u()},v),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(t(new de("Request aborted",de.ECONNABORTED,n,c)),c=null)},c.onerror=function(){t(new de("Network Error",de.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let f=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const v=n.transitional||Tp;n.timeoutErrorMessage&&(f=n.timeoutErrorMessage),t(new de(f,v.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,n,c)),c=null},wt.hasStandardBrowserEnv&&(s&&W.isFunction(s)&&(s=s(n)),s||s!==!1&&XS(h))){const f=n.xsrfHeaderName&&n.xsrfCookieName&&KS.read(n.xsrfCookieName);f&&i.set(n.xsrfHeaderName,f)}r===void 0&&i.setContentType(null),"setRequestHeader"in c&&W.forEach(i.toJSON(),function(f,v){c.setRequestHeader(v,f)}),W.isUndefined(n.withCredentials)||(c.withCredentials=!!n.withCredentials),o&&o!=="json"&&(c.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&c.addEventListener("progress",bu(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",bu(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=f=>{c&&(t(!f||f.type?new Dr(null,n,c):f),c.abort(),c=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const p=QS(h);if(p&&wt.protocols.indexOf(p)===-1){t(new de("Unsupported protocol "+p+":",de.ERR_BAD_REQUEST,n));return}c.send(r||null)})},Xo={http:kS,xhr:n7};W.forEach(Xo,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const wu=n=>`- ${n}`,r7=n=>W.isFunction(n)||n===null||n===!1,Bp={getAdapter:n=>{n=W.isArray(n)?n:[n];const{length:e}=n;let t,r;const i={};for(let o=0;o<e;o++){t=n[o];let s;if(r=t,!r7(t)&&(r=Xo[(s=String(t)).toLowerCase()],r===void 0))throw new de(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
95
- `+o.map(wu).join(`
96
- `):" "+wu(o[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Xo};function po(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Dr(null,n)}function _u(n){return po(n),n.headers=Bt.from(n.headers),n.data=ho.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bp.getAdapter(n.adapter||ea.adapter)(n).then(function(e){return po(n),e.data=ho.call(n,n.transformResponse,e),e.headers=Bt.from(e.headers),e},function(e){return Op(e)||(po(n),e&&e.response&&(e.response.data=ho.call(n,n.transformResponse,e.response),e.response.headers=Bt.from(e.response.headers))),Promise.reject(e)})}const xu=n=>n instanceof Bt?n.toJSON():n;function Hn(n,e){e=e||{};const t={};function r(l,c,h){return W.isPlainObject(l)&&W.isPlainObject(c)?W.merge.call({caseless:h},l,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function i(l,c,h){if(W.isUndefined(c)){if(!W.isUndefined(l))return r(void 0,l,h)}else return r(l,c,h)}function o(l,c){if(!W.isUndefined(c))return r(void 0,c)}function s(l,c){if(W.isUndefined(c)){if(!W.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function a(l,c,h){if(h in e)return r(l,c);if(h in n)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(l,c)=>i(xu(l),xu(c),!0)};return W.forEach(Object.keys(Object.assign({},n,e)),function(l){const c=u[l]||i,h=c(n[l],e[l],l);W.isUndefined(h)&&c!==a||(t[l]=h)}),t}const Cp="1.6.5",ta={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{ta[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Su={};ta.transitional=function(n,e,t){function r(i,o){return"[Axios v"+Cp+"] Transitional option '"+i+"'"+o+(t?". "+t:"")}return(i,o,s)=>{if(n===!1)throw new de(r(o," has been removed"+(e?" in "+e:"")),de.ERR_DEPRECATED);return e&&!Su[o]&&(Su[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(i,o,s):!0}};function i7(n,e,t){if(typeof n!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=n[o],u=a===void 0||s(a,o,n);if(u!==!0)throw new de("option "+o+" must be "+u,de.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new de("Unknown option "+o,de.ERR_BAD_OPTION)}}const Qo={assertOptions:i7,validators:ta},Ft=Qo.validators;let yi=class{constructor(e){this.defaults=e,this.interceptors={request:new gu,response:new gu}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Hn(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Qo.assertOptions(r,{silentJSONParsing:Ft.transitional(Ft.boolean),forcedJSONParsing:Ft.transitional(Ft.boolean),clarifyTimeoutError:Ft.transitional(Ft.boolean)},!1),i!=null&&(W.isFunction(i)?t.paramsSerializer={serialize:i}:Qo.assertOptions(i,{encode:Ft.function,serialize:Ft.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&W.merge(o.common,o[t.method]);o&&W.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),t.headers=Bt.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(u=u&&f.synchronous,a.unshift(f.fulfilled,f.rejected))});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let c,h=0,d;if(!u){const f=[_u.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,l),d=f.length,c=Promise.resolve(t);h<d;)c=c.then(f[h++],f[h++]);return c}d=a.length;let p=t;for(h=0;h<d;){const f=a[h++],v=a[h++];try{p=f(p)}catch(y){v.call(this,y);break}}try{c=_u.call(this,p)}catch(f){return Promise.reject(f)}for(h=0,d=l.length;h<d;)c=c.then(l[h++],l[h++]);return c}getUri(e){e=Hn(this.defaults,e);const t=Ap(e.baseURL,e.url);return kp(t,e.params,e.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(n){yi.prototype[n]=function(e,t){return this.request(Hn(t||{},{method:n,url:e,data:(t||{}).data}))}});W.forEach(["post","put","patch"],function(n){function e(t){return function(r,i,o){return this.request(Hn(o||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}yi.prototype[n]=e(),yi.prototype[n+"Form"]=e(!0)});const ui=yi;class na{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(i,o,s){r.reason||(r.reason=new Dr(i,o,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new na(function(t){e=t}),cancel:e}}}const o7=na;function s7(n){return function(e){return n.apply(null,e)}}function a7(n){return W.isObject(n)&&n.isAxiosError===!0}const es={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(es).forEach(([n,e])=>{es[e]=n});const l7=es;function Ip(n){const e=new ui(n),t=mp(ui.prototype.request,e);return W.extend(t,ui.prototype,e,{allOwnKeys:!0}),W.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Ip(Hn(n,r))},t}const Be=Ip(ea);Be.Axios=ui;Be.CanceledError=Dr;Be.CancelToken=o7;Be.isCancel=Op;Be.VERSION=Cp;Be.toFormData=Fi;Be.AxiosError=de;Be.Cancel=Be.CanceledError;Be.all=function(n){return Promise.all(n)};Be.spread=s7;Be.isAxiosError=a7;Be.mergeConfig=Hn;Be.AxiosHeaders=Bt;Be.formToJSON=n=>Dp(W.isHTMLForm(n)?new FormData(n):n);Be.getAdapter=Bp.getAdapter;Be.HttpStatusCode=l7;Be.default=Be;const u7={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},c7=["put","post","patch"],$u="Local-Request-Id",h7=200,d7=500;class Rp{axios;settings;records={};isLoading=!1;stopSkipWarn;showLoading;showError;constructor(e={}){this.settings=e.settings||{};const t=lo(e,["settings"]);this.axios=Be.create(Kt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},t)),this.setupSkipWarn(this.settings),this.showLoading=Jd(this.openLoading.bind(this),h7),this.showError=ux(this._showError.bind(this),d7,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=Kt(this.settings,e.settings||{});const t=lo(e,["settings"]);this.axios.defaults=Kt(this.axios.defaults,t),this.setupSkipWarn(this.settings)}cancel(e,t="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(t)}else for(const r of Object.values(this.records))r.source.cancel(t)}createHeaders(e,t,r){const i=t.injectHeaders?typeof t.headers=="function"?t.headers(e,r,t):t.headers||{}:{},o={"Content-Type":u7[t.type||"form"],...r.headers,...i};return t.skipWarn&&(o[$u]=e),o}isJsonType(e){return Object.entries(e).some(([t,r])=>t.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,t="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=t==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([i,o])=>{r.append(i,o)}),r}createSendData(e,t,r,i){const{type:o,skipWarn:s}=e,{name:a="skipWarn"}=s||{};let{data:u,params:l,method:c="get"}=t;const h=i?{[a]:!0}:{};return c7.includes(c.toLowerCase())?(u=Object.assign(u||{},h),u=o!=="json"||!this.isJsonType(r)?this.toFormData(u,o):u):l={...u,...l,...h},{data:u,params:l}}createUrl(e){const{url:t,query:r}=e;return r?Xd(t)(r):t}openLoading(e){const{loading:t,showLoading:r}=e;t&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{loading:t,hideLoading:r}=e;if(!t)return;this.isLoading=!1;const i=Object.keys(this.records);r&&i.length===0&&(this.isLoading=!1,r())}_showError(e,t){const{failMessage:r,showError:i}=e;if(r&&i){const o=t?.message||t?.msg||"未知错误";i(o,t)}}validResponse(e,t){const{validSuccess:r,validate:i}=e;return r&&i?!!i(t):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},t=!1){const r=Kt({},this.settings,e.settings||{}),i=lo(e,["settings"]),o=Hx(!1),s=Be.CancelToken.source();this.records[o]={settings:r,config:i,source:s};const a=this.createUrl(i),u=this.createHeaders(o,r,i),{data:l,params:c}=this.createSendData(r,i,u,t);return this.showLoading(r),new Promise((h,d)=>{this.axios({cancelToken:s.token,...i,url:a,headers:u,data:l,params:c}).then(p=>this.isSkipWarnResponse(p)?h(p.promise):this.validResponse(r,p)?h(r.originResponse?p:p.data?.data):(this.showError(r,p.data),d(p.data))).catch(p=>(this.showError(r,p),d(p))).finally(()=>{delete this.records[o],this.closeLoading(r)})})}useResponse(e,t){const{response:r}=this.axios.interceptors,i=r.use(e,t);return()=>r.eject(i)}useRequest(e,t){const{request:r}=this.axios.interceptors,i=r.use(e,t);return()=>r.eject(i)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:t,executor:r,callback:i,complete:o}=e.skipWarn;this.stopSkipWarn=this.useResponse(s=>{const a=(s.config.headers||{})[$u],u=this.records[a];if(!u)return s;const{data:l}=s;if(!l||typeof l!="object")return s;if(l?.code===t){i&&i(s);const c=new Promise(r).then(()=>this.send({...u.config,settings:u.settings},!0));c.catch(h=>h).finally(()=>{o&&o()}),s.promise=c}return s})}}function Mp(n={}){const e=new Rp(n),t=e.send.bind(e),r=e.cancel.bind(e),i=e.setConfig.bind(e),o=e.useRequest.bind(e),s=e.useResponse.bind(e);return Object.assign(t,{...e,instance:e,send:t,cancel:r,setConfig:i,useRequest:o,useResponse:s})}Mp({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});const ju=typeof window<"u";class Np{options={type:"cache",expired:0,prefix:"__VTJ_"};caches={};types;constructor(e={}){this.types={local:ju?window.localStorage:this.caches,session:ju?window.sessionStorage:this.caches,cache:this.caches},this.config(e)}config(e={}){this.options=Object.assign(this.options,e)}save(e,t,r={}){const{type:i,expired:o,prefix:s}={...this.options,...r},a=Date.now(),u=s+e,l=this.types[i]||this.caches,c={value:t,timestamp:a,expired:o};l===this.caches?l[u]=c:l.setItem(u,JSON.stringify(c))}get(e,t={}){const{type:r,prefix:i}={...this.options,...t},o=i+e,s=this.types[r]||this.caches;let a;if(s===this.caches)a=s[o];else{const h=s.getItem(o);h&&(a=JSON.parse(h))}if(!a)return null;const{value:u,timestamp:l,expired:c}=a;return c>0&&l+c<Date.now()?(this.remove(e,t),null):u}remove(e,t={}){const{type:r,prefix:i}={...this.options,...t},o=this.types[r]||this.caches,s=i+e;o===this.caches?delete o[s]:o.removeItem(s)}clear(e={}){const{type:t}={...this.options,...e},r=this.types[t]||this.caches;r===this.caches?this.caches={}:r.clear()}}new Np;var p7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ts={exports:{}};(function(n,e){(function(t,r){r(e,n)})(p7,function(t,r){var i={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function o(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function s(l){try{delete window[l]}catch{window[l]=void 0}}function a(l){var c=document.getElementById(l);c&&document.getElementsByTagName("head")[0].removeChild(c)}function u(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=l,d=c.timeout||i.timeout,p=c.jsonpCallback||i.jsonpCallback,f=void 0;return new Promise(function(v,y){var $=c.jsonpCallbackFunction||o(),g=p+"_"+$;window[$]=function(_){v({ok:!0,json:function(){return Promise.resolve(_)}}),f&&clearTimeout(f),a(g),s($)},h+=h.indexOf("?")===-1?"?":"&";var w=document.createElement("script");w.setAttribute("src",""+h+p+"="+$),c.charset&&w.setAttribute("charset",c.charset),c.nonce&&w.setAttribute("nonce",c.nonce),c.referrerPolicy&&w.setAttribute("referrerPolicy",c.referrerPolicy),c.crossorigin&&w.setAttribute("crossorigin","true"),w.id=g,document.getElementsByTagName("head")[0].appendChild(w),f=setTimeout(function(){y(new Error("JSONP request to "+l+" timed out")),s($),a(g),window[$]=function(){s($)}},d),w.onerror=function(){y(new Error("JSONP request to "+l+" failed")),s($),a(g),f&&clearTimeout(f)}})}r.exports=u})})(ts,ts.exports);var f7=ts.exports;const m7=Fp(f7);function v7(n){const e=[];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.push([t,encodeURIComponent(n[t])].join("="));return e.join("&")}function Eu(n,e,t){const r={};n=(n||location.search).replace(/^[^]*\?/,""),e=e||"&",t=t||"=";let i;const o=new RegExp("(?:^|\\"+e+")([^\\"+t+"\\"+e+"]+)(?:\\"+t+"([^\\"+e+"]*))?","g");for(;(i=o.exec(n))!==null;)i[1]!==n&&(r[decodeURIComponent(i[1])]=decodeURIComponent(i[2]||""));return r}function g7(n,e){e=typeof e=="string"?Eu(e):e;const t=n.split("?")[0],r=Eu(n),i=Object.assign({},r,e),o=v7(i);return o?[t,o].join("?"):n}async function y7(n,e={}){const{query:t={}}=e;n.includes("${")&&(n=Xd(n)(t||{}));const r=g7(n,t);return await(await m7(r,e)).json()}var b7=function(n,e,t){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");typeof e=="function"&&(t=e,e={}),e=e||{},t=t||function(){},i.type=e.type||"text/javascript",i.charset=e.charset||"utf8",i.async="async"in e?!!e.async:!0,i.src=n,e.attrs&&w7(i,e.attrs),e.text&&(i.text=""+e.text);var o="onload"in i?ku:_7;o(i,t),i.onload||ku(i,t),r.appendChild(i)};function w7(n,e){for(var t in e)n.setAttribute(t,e[t])}function ku(n,e){n.onload=function(){this.onerror=this.onload=null,e(null,n)},n.onerror=function(){this.onerror=this.onload=null,e(new Error("Failed to load "+this.src),n)}}function _7(n,e){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,n))}}const x7=Fp(b7);function Tu(n,e={}){return new Promise((t,r)=>{const{library:i}=e;x7(n,e,(o,s)=>{o?r(o):t(i?window[i]:void 0)})})}/*! js-cookie v3.0.5 | MIT */function Jr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)n[r]=t[r]}return n}var S7={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ns(n,e){function t(i,o,s){if(!(typeof document>"u")){s=Jr({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var u in s)s[u]&&(a+="; "+u,s[u]!==!0&&(a+="="+s[u].split(";")[0]));return document.cookie=i+"="+n.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var u=o[a].split("="),l=u.slice(1).join("=");try{var c=decodeURIComponent(u[0]);if(s[c]=n.read(l,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:t,get:r,remove:function(i,o){t(i,"",Jr({},o,{expires:-1}))},withAttributes:function(i){return ns(this.converter,Jr({},this.attributes,i))},withConverter:function(i){return ns(Jr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}ns(S7,{path:"/"});/**!
97
- * Copyright (c) 2024, VTJ.PRO All rights reserved.
98
- * @name @vtj/ui
99
- * @author CHC chenhuachun1549@dingtalk.com
100
- * @version 0.7.0
101
- * @license <a href="https://vtj.pro/license.html">MIT License</a>
102
- */const $7={default:14,small:12,large:18},j7={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function Er(n){return typeof n=="string"?n:`${n}px`}function Yr(n=0,e){if(typeof n=="number")return n;if(/(%|vh|vw)$/i.test(n)){const t=Number.parseInt(n);return Math.floor(e*t/100)}return Number.parseInt(n)}const E7=["src"],en=J({name:"XIcon",__name:"Icon",props:j7,setup(n){const e=n,t=as(),r=kr(),i=L(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?Xt(e.icon):u?.component(e.icon)||e.icon}),o=L(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),s=L(()=>({"background-color":e.background,"border-radius":e.radius?Er(e.radius):void 0,padding:e.padding?Er(e.padding):void 0})),a=L(()=>typeof e.size=="number"?e.size:$7[e.size]??void 0);return(u,l)=>(k(),F(m(wf),{class:ke(["x-icon",o.value]),color:e.color,size:a.value,style:Gt(s.value)},{default:A(()=>[le(u.$slots,"default",{},()=>[i.value?(k(),F(rt(i.value),{key:0})):Z("",!0),e.src?(k(),te("img",{key:1,src:e.src},null,8,E7)):Z("",!0)])]),_:3},8,["class","color","size","style"]))}}),zp={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean}};function k7(n){return L(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function T7(n){return L(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function V7(n){return L(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function D7(n){const e=kr();return L(()=>{const t=m(n);if(t)if(typeof t=="string"||t.setup||t.render||ff(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function ra(n){const e=D7(n);return e.value?Xt(J({render:()=>Ye(en,e.value)})):void 0}function ia(n,e){return L(()=>{const t=m(n);return typeof t=="function"?t(e):!!t})}const O7={key:0},A7=J({__name:"Trigger",props:zp,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=ra(hi(t,"icon")),o=ia(hi(t,"disabled")),s=L(()=>({[`is-${t.mode}`]:!!t.mode,[`is-${t.type}`]:!!t.type,[`is-${t.size}`]:!!t.size&&t.size!=="default",[`is-background-${t.background}`]:t.mode==="icon"&&!!t.background,"is-disabled":!!t.disabled,"is-circle":!!t.circle})),a=u=>{if(u.stopPropagation(),u.preventDefault(),!o.value)return r("click"),!1};return(u,l)=>t.mode==="button"?(k(),F(m(ze),je({key:0,icon:m(i),type:t.type,size:t.size,disabled:m(o)},t.button,{onClick:a}),{default:A(()=>[pe(ie(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(k(),te("div",{key:1,class:ke(["x-action__inner",s.value]),onClick:a},[(k(),F(rt(m(i)))),u.label?(k(),te("span",O7,ie(u.label),1)):Z("",!0)],2))}}),tt=J({name:"XAction",__name:"Action",props:zp,emits:["click","command"],setup(n,{emit:e}){const t=n,r=df(),i=e,o=k7(t),s=T7(t),a=V7(t),u=ia(hi(t,"disabled")),l=L(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",An(t))},h=y=>{if(u.value)return;const $=t.menus?.find(g=>g.command===y);$&&i("command",An($))},d=y=>Ye(Hu,s.value,()=>[].concat(y)),p=y=>Ye(ds,{...a.value,disabled:u.value,onCommand:h},{default:()=>[y],dropdown:()=>[Ye(hs,()=>(t.menus||[]).map($=>Ye(pi,$,()=>r.item?r.item({item:$}):$.label)))]}),f=y=>Ye(_i,{...o.value,disabled:u.value},()=>[y]),v=L(()=>{let y=r.default?r.default()[0]:Ye(Xt(A7),{...t,onClick:c});return s.value&&(y=d(y)),a.value&&(y=p(y)),o.value&&(y=f(y)),y});return(y,$)=>(k(),te("div",{class:ke(["x-action",l.value])},[(k(),F(rt(v.value)))],2))}}),B7={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String,default:"primary"},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},C7=J({name:"XActionBar",__name:"ActionBar",props:B7,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>(t.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...t.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...t.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),o=a=>{r("click",a)},s=(a,u)=>{r("command",a,u)};return(a,u)=>(k(),F(m(he),{class:"x-action-bar",align:"center"},{default:A(()=>[(k(!0),te(re,null,ae(i.value,l=>(k(),te(re,null,[l==="|"?(k(),F(m(vr),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(k(),F(m(tt),je({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:m(ia)(t.disabled,l).value},l,{onClick:o,onCommand:c=>s(l,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),I7={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},he=J({name:"XContainer",__name:"Container",props:I7,setup(n){const e=n,t=as(),r=kr(),i=L(()=>{const a=r?.parent;if(!a)return!1;const u=a.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=L(()=>({"is-fit":e.fit,"is-flex":e.flex&&!e.inline,"is-inline-flex":e.flex&&e.inline,[`is-direction-${e.direction}`]:e.flex&&e.direction!=="row",[`is-wrap-${e.wrap}`]:e.flex&&e.wrap!=="nowrap",[`is-justify-${e.justify}`]:e.flex&&e.justify!=="flex-start",[`is-align-${e.align}`]:e.flex&&e.align!=="flex-start",[`is-align-content-${e.alignContent}`]:e.flex&&e.alignContent!=="stretch","is-grow":e.grow??i.value,"is-shrink":i.value&&e.shrink,[`is-align-self-${e.alignSelf}`]:i.value&&e.alignSelf!=="auto",[`is-overflow-${e.overflow}`]:!!e.overflow,"is-padding":!!e.padding,"is-pointer":e.autoPointer&&!!t.onClick,"is-gap":!!e.gap})),s=L(()=>{const{width:a,height:u,fit:l}=e;return l?null:{width:a?Er(a):void 0,height:u?Er(u):void 0}});return(a,u)=>(k(),F(rt(e.tag),{class:ke(["x-container",o.value]),style:Gt(s.value)},{default:A(()=>[le(a.$slots,"default")]),_:3},8,["class","style"]))}}),R7={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},M7={key:0,class:"x-header__actions"},N7=J({name:"XHeader",inheritAttrs:!1,__name:"Header",props:R7,setup(n){const e=n,t=ra(hi(e,"icon")),r=as(),i=L(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,s)=>(k(),F(m(he),{class:ke(["x-header",i.value]),justify:"space-between",align:"center"},{default:A(()=>[T(m(he),{align:"center",class:ke(["x-header__wrapper",i.value]),grow:""},{default:A(()=>[m(t)?(k(),F(rt(m(t)),{key:0,class:"x-header__icon",onClick:m(r).onClickIcon||m(r).onClick},null,8,["onClick"])):Z("",!0),fe("span",{class:"x-header__content",onClick:s[0]||(s[0]=(...a)=>m(r).onClick&&m(r).onClick(...a))},[le(o.$slots,"default",{},()=>[pe(ie(e.content),1)])]),e.more?(k(),F(m(en),{key:1,class:"x-header__more",icon:m(Ku)},null,8,["icon"])):Z("",!0),e.subtitle||o.$slots.subtitle?(k(),te("span",{key:2,class:"x-header__subtitle",onClick:s[1]||(s[1]=(...a)=>m(r).onClick&&m(r).onClick(...a))},[le(o.$slots,"subtitle",{},()=>[pe(ie(e.subtitle),1)])])):Z("",!0)]),_:3},8,["class"]),o.$slots.actions?(k(),te("div",M7,[le(o.$slots,"actions")])):Z("",!0)]),_:3},8,["class"]))}}),F7={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Pi=J({name:"XPanel",__name:"Panel",props:F7,setup(n,{expose:e}){const t=n,r=q(),i=L(()=>({"x-panel--card":!!t.card,"x-panel--default":!t.card,[`is-${t.size}`]:!!t.size&&t.size!=="default","is-border":!!t.border,"is-radius":!!t.radius,[`is-shadow-${t.shadow}`]:!!t.shadow&&t.shadow!=="none"})),o=L(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),s=L(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(a,u)=>(k(),F(m(he),{class:ke(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:A(()=>[o.value?(k(),F(m(he),{key:0,flex:!1,class:"x-panel__header"},{default:A(()=>[le(a.$slots,"header",{},()=>[T(m(N7),At(Qt(o.value)),{default:A(()=>[le(a.$slots,"title")]),actions:A(()=>[le(a.$slots,"actions")]),_:3},16)])]),_:3})):Z("",!0),T(m(he),je({ref_key:"bodyRef",ref:r,flex:!1,overflow:s.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:A(()=>[le(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(k(),F(m(he),je({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:A(()=>[le(a.$slots,"footer")]),_:3},16)):Z("",!0)]),_:3},8,["class","fit","width","height"]))}}),Vu="user-select-none";let Du=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=Fu(),this.scope.run(()=>{this.init()})}scope;dragging=!1;getHandle(){const{selector:e,handle:t}=this.options;return e?this.el.querySelector(e):t}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):m(e)||document.body}init(){const{el:e,options:t}=this,{disabled:r,delay:i=150,onStart:o,onEnd:s}=t;if(r)return;let a=null;const u=this.getHandle(),l=this.getTarget();let c=e.getBoundingClientRect(),h=null;const{x:d,y:p}=Kf(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(f,v)=>{document.body.classList.add(Vu),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),h=l?.getBoundingClientRect(),o&&o(f,v)},i)},onEnd:(f,v)=>{if(clearTimeout(a),document.body.classList.remove(Vu),this.dragging&&h){this.dragging=!1;const{x:y,y:$}=f,g=this.getPosition(h,c,y,$);s&&s(g,v),h=null}}});_e([d,p],()=>{if(this.dragging&&h){const f=this.getPosition(h,c,d.value,p.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,t,r,i){const{edge:o=50}=this.options,s=-t.width+o,a=e.width-o,u=0,l=e.height-o,c=Math.min(a,Math.max(r,s)),h=Math.min(l,Math.max(i,u));return{x:c,y:h}}destory(){this.scope.stop()}};const z7={mounted(n,e){const t=e.value||{},r=new Du(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!Zs(r.options,t)&&(r.destory(),n.__draggable__=new Du(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},fo="user-select-none";class Ou{constructor(e,t={}){this.el=e,this.options=t,this.scope=Fu(),this.scope.run(()=>{this.init()})}scope;resizing=q(!1);direction=q("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=Yf(e),this.cleanMousedown=da(document,"mousedown",()=>{this.direction?.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),i&&i(this.direction.value,this.MIE))}),this.cleanMouseup=da(document,"mouseup",()=>{this.resizing.value&&this.direction?.value&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),o&&o(this.direction.value,this.MIE)),this.resizing.value=!1}),_e(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(fo):l.classList.remove(fo)});const{x:s,y:a}=this.MIE;_e([s,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:t,resizing:r,options:i,el:o}=this,s=t?.value||"";if(!e||!r.value||!s)return;const{x:a,y:u,elementX:l,elementY:c,elementHeight:h,elementWidth:d}=e,{onResizing:p}=i,{minWidth:f=0,minHeight:v=0,maxWidth:y=99999,maxHeight:$=99999}=i;if(s.includes("e")){const g=Math.min(Math.max(l.value,f),y);o.style.width=`${g}px`}if(s.includes("s")){const g=Math.min(Math.max(c.value,v),$);o.style.height=`${g}px`}if(s.includes("w")){const g=Math.min(Math.max(d.value-l.value,f),y);o.style.width=`${g}px`,o.style.left=`${a.value}px`}if(s.includes("n")){const g=Math.min(Math.max(h.value-c.value,v),$);this.el.style.height=`${g}px`,this.el.style.top=`${u.value}px`}p&&p(s,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:t,elementHeight:r,elementWidth:i,isOutside:o}=this.MIE;if(o.value)return"";const{dirs:s=["n","s","w","e"],edge:a=5}=this.options;let u="";return s.includes("n")&&t.value<=a?u+="n":s.includes("s")&&t.value>r.value-a&&(u+="s"),s.includes("w")&&e.value<=a?u+="w":s.includes("e")&&e.value>i.value-a&&(u+="e"),u}destory(){const e=document.body;e.style.cursor="",e.classList.remove(fo),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}}const rs={mounted(n,e){const t=e.value||{},r=new Ou(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!Zs(r.options,t)&&(r.destory(),n.__resizable__=new Ou(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},P7={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let Nn=1e3;function L7(n,e){const{width:t,height:r}=ys(e),i=gn({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++Nn,dragging:!1,resizing:!1});return _e([t,r],([o,s])=>{i.wrapperWidth=o,i.wrapperHeight=s,i.width=Yr(n.width,o),i.height=Yr(n.height,s),i.left=n.left?Yr(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?Yr(n.top,s):Math.max(Math.floor((s-i.height)/2),0)}),_e(i,o=>{Nn=Math.max(o.zIndex,Nn)}),{state:i,normal:L(()=>i.mode==="normal"),maximized:L(()=>i.mode==="maximized"),minimized:L(()=>i.mode==="minimized")}}function H7(n,e){const t=L(()=>{const{width:s,height:a,top:u,left:l,zIndex:c}=e;return{width:`${s}px`,height:`${a}px`,top:`${u}px`,left:`${l}px`,zIndex:c}}),r=L(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=L(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=L(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function U7(n,e,t){const r=o=>{e.mode=o,["maximized","minimized","normal"].includes(o)&&t(o),t("modeChange",o)},i=async()=>{(!n.beforeClose||await n.beforeClose())&&(t("update:modelValue",!1),t("close"),t("destroy"))};return{close:i,changeMode:r,show:()=>r("normal"),hide:()=>r("minimized"),active:o=>{const s=o.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(s.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++Nn))},submit:()=>t("submit"),cancel:()=>{t("cancel"),i()}}}function q7(n,e,t,r){return L(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Ne(n.draggable)?n.draggable:{},disabled:i,target:r,selector:".x-panel__header",onStart(o){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++Nn),t("dragStart",o)},onMove(o){t("dragging",o)},onEnd(o){if(e.mode==="maximized")return;const{x:s,y:a}=o;e.left=s,e.top=a,e.dragging=!1,t("dragEnd",o)}}})}function W7(n,e,t){return L(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Ne(n.resizable)?n.resizable:{},disabled:r,dirs:["e","s","w"],onStart(i,o){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++Nn),t("resizeStart",i,o)},onResizing(i,o){t("resizing",i,o)},onEnd(i,o){e.left=o.elementPositionX.value,e.top=o.elementPositionY.value,e.width=o.elementWidth.value,e.height=o.elementHeight.value,e.resizing=!1,t("resizeEnd",i,o)}}})}function J7(n,e){const t=n.componentInstance;if(!t)return;let r=null;return us(()=>{const i=m(e),o=m(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),cs(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const Y7=["src"],er=J({name:"XDialog",__name:"Dialog",props:P7,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=kr(),s=q(),a=q(),{state:u,maximized:l,minimized:c,normal:h}=L7(r,s),{styles:d,classes:p,wrapperClass:f,modalStyle:v}=H7(r,u),{changeMode:y,active:$,close:g,show:w,hide:_,submit:x,cancel:b}=U7(r,u,i),E=q7(r,u,i,s),O=W7(r,u,i),H=J7(r,a);ls(async()=>{r.modelValue&&(await Jt(),o&&i("open",o))});const S=L(()=>a.value?.$el);return e({$vtjEl:S,panelRef:a,state:u,maximized:l,minimized:c,changeMode:y,show:w,hide:_,submit:x,cancel:b,componentInstance:H}),(j,N)=>r.modelValue?(k(),F(pf,{key:0,to:"body"},[fe("div",{ref_key:"wrapper",ref:s,class:ke(["x-dialog__wrapper",m(f)])},[r.modal?(k(),te("div",{key:0,class:"x-dialog__modal",style:Gt(m(v))},null,4)):Z("",!0),Bn((k(),F(m(Pi),je({ref_key:"panelRef",ref:a,class:["x-dialog",m(p)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:m(d),size:r.size,body:{padding:r.bodyPadding},onClick:m($)},j.$attrs),Fn({title:A(()=>[pe(ie(r.title),1)]),actions:A(()=>[le(j.$slots,"actions"),r.minimizable?(k(),F(m(tt),{key:0,icon:m(vh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[0]||(N[0]=V=>m(y)("minimized"))},null,8,["icon","size"])):Z("",!0),r.maximizable?(k(),te(re,{key:1},[m(h)?(k(),F(m(tt),{key:1,icon:m(mh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[2]||(N[2]=V=>m(y)("maximized"))},null,8,["icon","size"])):(k(),F(m(tt),{key:0,icon:m(gh),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:N[1]||(N[1]=V=>m(y)("normal"))},null,8,["icon","size"]))],64)):Z("",!0),r.closable?(k(),F(m(tt),{key:2,icon:m(yh),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:m(g)},null,8,["icon","size","onClick"])):Z("",!0)]),default:A(()=>[le(j.$slots,"default",{},()=>[r.content?(k(),F(rt(r.content),{key:0})):Z("",!0),r.src?(k(),te("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,Y7)):Z("",!0)])]),_:2},[r.cancel||r.submit||j.$slots.footer||j.$slots.extra||j.$slots.handle?{name:"footer",fn:A(()=>[le(j.$slots,"footer",{},()=>[T(m(he),{align:"center"},{default:A(()=>[le(j.$slots,"extra")]),_:3}),T(m(he),{align:"center"},{default:A(()=>[le(j.$slots,"handle"),r.cancel?(k(),F(m(ze),{key:0,type:"default",size:r.size,onClick:m(b)},{default:A(()=>[pe(ie(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Z("",!0),r.submit?(k(),F(m(ze),{key:1,type:"primary",size:r.size,onClick:m(x)},{default:A(()=>[pe(ie(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):Z("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[m(z7),m(E)],[m(rs),m(O)]])],2)])):Z("",!0)}}),K7=J({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(k(),F(m(Wu),At(Qt(t.$attrs)),{default:A(()=>[(k(!0),te(re,null,ae(e.options,(i,o)=>(k(),F(m(qu),je({key:`item_${o}_${i.value}`},i),Fn({_:2},[t.$slots.option?{name:"default",fn:A(()=>[le(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Z7=J({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=L(()=>Xt(e.button?jf:Ef));return(r,i)=>(k(),F(m(kf),At(Qt(r.$attrs)),{default:A(()=>[(k(!0),te(re,null,ae(e.options,(o,s)=>(k(),F(rt(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:A(()=>[pe(ie(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),G7=J({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=L(()=>Xt(e.button?Gr:Tf));return(r,i)=>(k(),F(m(Ju),At(Qt(r.$attrs)),{default:A(()=>[(k(!0),te(re,null,ae(e.options,(o,s)=>(k(),F(rt(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:A(()=>[pe(ie(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),Pp={none:{component:"div",props:{class:"x-field-none"}},text:{component:mt,props:{clearable:!0},defaultValue:""},textarea:{component:mt,props:{type:"textarea",rows:2},defaultValue:""},select:{component:K7,props:{clearable:!0}},checkbox:{component:Z7,props:{},defaultValue:[]},radio:{component:G7,props:{}},number:{component:Uu,props:{}},date:{component:ua,props:{}},time:{component:_f,props:{}},datetime:{component:ua,props:{type:"datetime"}},switch:{component:ps,props:{}},rate:{component:xf,props:{}},slider:{component:Sf,props:{}},cascader:{component:$f,props:{}}},X7={name:{type:String},label:{type:String},editor:{type:[String,Object],default:"text"},props:{type:Object},modelValue:{type:[String,Number,Boolean,Object,Array],default(n){return Pp[n.editor]?.defaultValue}},size:{type:String},width:{type:[String,Number]},tooltipMessage:{type:[Boolean,Object],default:!0},tooltipPosition:{type:[String,Number],default:"outer"},placeholder:{type:String},disabled:{type:Boolean},readonly:{type:Boolean},options:{type:[Array,Function]},visible:{type:[Boolean,Object,Function],default:!0},cascader:{type:[String,Array]},error:{type:String},tip:{type:String}};async function Q7(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function e$(n,e,t,r,i){const o=q([]),s=L(()=>!r||!i?{}:pp(n.cascader).reduce((a,u)=>(a[u]=ri(i,u),a),{}));return _e(s,async a=>{if(t.value){o.value=await Q7(n,a);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:L(()=>{const{editor:a="text",placeholder:u,label:l="...",disabled:c,readonly:h}=n,d={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:h,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:f=>e("change",f)},p=typeof a=="string"?Pp[a]:{component:a,props:{}};return Kt({},p,{props:d})})}}const t$={key:1,class:"el-form-item__error"},n$={class:"x-field__editor_wrap"},r$={key:0,class:"x-field__tip"},ne=J({name:"XField",__name:"Field",props:X7,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=hr(Lp,null),s=hr(gf,null),a=hr(Hp,null),u=L(()=>!o?.proxy||!a?r.visible:typeof r.visible=="function"?r.visible(a):Ne(r.visible)?Object.entries(r.visible).every(([x,b])=>ri(a,x)===b):r.visible),l=()=>o?.proxy&&a&&r.name?ri(a,r.name)??r.modelValue:r.modelValue,c=q(l()),{editor:h}=e$(r,i,u,o,a),d=q(),p=q(),f=L(()=>r.size||s?.size||"default"),v=L(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),y=(x="")=>r.error?r.error:x.includes("is required")?`${r.label||r.name}是必填项!`:x,$=L(()=>{const x=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!x&&!!r.tooltipPosition}}),g=L(()=>{const x=o?.proxy;return{width:r.width?Er(r.width):x&&x.inline&&x.inlineColumns?`${100/x.inlineColumns}%`:null}}),w=L(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),_=L(()=>({...h.value.props,modelValue:c.value,"onUpdate:modelValue":x=>{c.value=x}}));return _e(c,(x,b)=>{u.value&&!Zs(x,b)&&(i("update:modelValue",x),o?.proxy&&a&&r.name&&no(a,r.name,x))}),_e(()=>!o?.proxy||!r.name||!a?r.modelValue:ri(a,r.name)??r.modelValue,x=>{u.value&&(c.value=x)},{immediate:!0}),_e(u,x=>{o?.proxy&&a&&r.name&&(x?(c.value=l(),no(a,r.name,c.value)):(c.value=void 0,no(a,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:d,editorRef:p,focus:()=>{p.value?.focus&&p.value.focus()},blur:()=>{p.value?.foucs&&p.value.blur()}}),(x,b)=>u.value?(k(),F(m(Lu),je({key:0,class:["x-field",$.value],ref_key:"itemRef",ref:d,prop:r.name,label:x.label,size:f.value,style:g.value},x.$attrs),Fn({error:A(({error:E})=>[le(x.$slots,"error",{error:E},()=>[m(o)?.props.tooltipMessage??r.tooltipMessage?(k(),te("div",{key:0,class:"x-field__info",style:Gt(w.value)},[T(m(_i),je({content:y(E)},v.value),{default:A(()=>[T(m(en),{class:"x-field__trigger",icon:m(Uf),size:f.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(k(),te("div",t$,ie(y(E)),1))])]),default:A(()=>[fe("div",n$,[le(x.$slots,"editor",{editor:_.value},()=>[m(h).component?(k(),F(rt(m(h).component),je({key:0,class:"x-field__editor",ref_key:"editorRef",ref:p,modelValue:c.value,"onUpdate:modelValue":b[0]||(b[0]=E=>c.value=E)},m(h).props),Fn({_:2},[x.$slots.option?{name:"option",fn:A(({option:E})=>[le(x.$slots,"option",{option:E})]),key:"0"}:void 0]),1040,["modelValue"])):Z("",!0)]),r.tip||x.$slots.tip?(k(),te("div",r$,[le(x.$slots,"tip",{},()=>[pe(ie(r.tip),1)])])):Z("",!0)]),le(x.$slots,"default")]),_:2},[x.$slots.label?{name:"label",fn:A(()=>[le(x.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):Z("",!0)}}),i$={model:{type:Object,default(){return Object.create(null)}},inline:{type:Boolean},inlineColumns:{type:Number},footer:{type:Boolean,default:!0},submitText:{type:String,default:"提交"},resetText:{type:String,default:"重置"},submitMethod:{type:Function},tooltipMessage:{type:[Object,Boolean],default:void 0}},Lp=Symbol("formInstanceKey"),Hp=Symbol("formModelKey"),Up=J({name:"XForm",__name:"Form",props:i$,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=kr(),s=q(),a=gn(r.model||{}),u=q(!1);la(Lp,o),la(Hp,a),_e(a,()=>{i("change",An(a))}),_e(()=>r.model,h=>{Object.assign(a,h)},{deep:!0});const l=async()=>{await s.value.validate().catch(()=>!1)&&(i("submit",An(a)),r.submitMethod&&(u.value=!0,await r.submitMethod(An(a)),u.value=!1))},c=h=>{s.value.resetFields(h),i("reset")};return e({formRef:s,model:a,submit:l,reset:c}),(h,d)=>(k(),F(m(pr),je({ref_key:"formRef",ref:s,class:"x-form",inline:r.inline,model:a,onKeyup:dr(l,["enter"]),onSubmit:d[1]||(d[1]=Cn(()=>{},["stop","prevent"]))},h.$attrs),{default:A(()=>[le(h.$slots,"default"),r.footer?(k(),F(m(ne),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:A(()=>[le(h.$slots,"footer",{},()=>[r.submitText?(k(),F(m(ze),{key:0,loading:u.value,type:"primary",onClick:l},{default:A(()=>[pe(ie(r.submitText),1)]),_:1},8,["loading"])):Z("",!0),r.resetText?(k(),F(m(ze),{key:1,type:"default",onClick:d[0]||(d[0]=()=>c())},{default:A(()=>[pe(ie(r.resetText),1)]),_:1})):Z("",!0),le(h.$slots,"action")])]),_:3})):Z("",!0)]),_:3},16,["inline","model"]))}}),o$={modelValue:{type:Boolean,default:!0},size:{type:String},formProps:{type:Object},submit:{type:[Boolean,String],default:"确定"},cancel:{type:[Boolean,String],default:"取消"},model:{type:Object,default(){return Object.create(null)}},rules:{type:Object},submitMethod:{type:Function}},kt=J({name:"XDialogForm",__name:"DialogForm",props:o$,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=q(),s=q(),a=L(()=>s.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async p=>{i("submit",p),r.submitMethod?await r.submitMethod(p)&&l():l()},h=L(()=>r.formProps?.disabled?!1:r.submit),d=L(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:a,formRef:o,dialogRef:s}),(p,f)=>(k(),F(m(er),je({ref_key:"dialogRef",ref:s,class:"x-dialog-form","model-value":r.modelValue,submit:h.value,cancel:d.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},p.$attrs),Fn({default:A(()=>[T(m(Up),je({ref_key:"formRef",ref:o,class:"x-dialog-form__form",footer:!1,"label-width":"80px",size:r.size,model:r.model,rules:r.rules,"submit-method":c},r.formProps),{default:A(()=>[le(p.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[p.$slots.extra?{name:"extra",fn:A(()=>[le(p.$slots,"extra")]),key:"0"}:void 0,p.$slots.handle?{name:"handle",fn:A(()=>[le(p.$slots,"handle")]),key:"1"}:void 0,p.$slots.footer?{name:"footer",fn:A(()=>[le(p.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),s$={items:{type:Array,default(){return[]}},border:{type:Boolean}},qp=J({name:"XTabs",__name:"Tabs",props:s$,setup(n){const e=n,t=i=>{const{label:o,name:s,value:a,disabled:u,closable:l,lazy:c}=i;return{label:o,name:a??s,disabled:u,closable:l,lazy:c}},r=L(()=>({"is-no-border":!e.border}));return(i,o)=>(k(),F(m(bf),je({class:["x-tabs",r.value]},i.$attrs),{default:A(()=>[(k(!0),te(re,null,ae(e.items,s=>(k(),F(m(yf),je({key:s.value??s.name},t(s)),{label:A(()=>[le(i.$slots,"label",At(Qt(s)),()=>[s.icon?(k(),F(rt(m(ra)(s.icon)),{key:0,class:"x-tabs__icon"})):Z("",!0),pe(" "+ie(s.label),1)])]),default:A(()=>[le(i.$slots,"default",At(Qt(s)),()=>[s.component?(k(),F(rt(s.component),At(je({key:0},s.props)),null,16)):Z("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}});var nt=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(nt||{});const Au=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],a$=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],l$=["vIf","vShow","vModel","vFor","vBind"],Wp={String,Number,Boolean,Array,Object,Function,Date};function Jp(n){return/\.css$/.test(n)}function Yp(n){return/\.js$/.test(n)}function Bu(n){return n.map(e=>`<script src="${e}"><\/script>`).join("")}function u$(n=[]){return n.map(e=>`<link rel="stylesheet" href="${e}" />`).join("")}function Kp(n){const e=n.filter(l=>!!l.enabled),t=[],r=[],i=[],o=[],s={},a=[],u={};return e.forEach(({urls:l,assetsUrl:c,library:h,assetsLibrary:d})=>{l?.forEach(p=>{Yp(p)&&t.push(p),Jp(p)&&r.push(p)}),h&&(o.push(h),s[h]=l||[]),c&&i.push(c),d&&a.push(d),h&&d&&(u[d]=h)}),{scripts:t,css:r,materials:i,libraryExports:o,materialExports:a,materialMapLibrary:u,libraryMap:s}}function Zp(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function Gp(n){return Gn(n)?n:JSON.stringify(n)}function Xp(n,e,t){const r=n.CSSStyleSheet;if(r.prototype.replaceSync){const i=new r;i.id=e,i.replaceSync(t);const o=n.document,s=o.adoptedStyleSheets,a=Array.from(s).filter(u=>u.id!==e);o.adoptedStyleSheets=[...a,i]}else{const i=n.document;let o=i.getElementById(e);o?o.innerHTML=t:(o=i.createElement("style"),o.id=e,o.innerHTML=t,i.head.appendChild(o))}}async function c$(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&Xp(window,n,t)}function h$(n){return wr(n)||wr(n?.install)}var bi=function(){return bi=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},bi.apply(this,arguments)},is={debug:-1,log:0,info:0,warn:1,error:2},d$=function(n,e,t,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e&&is[e]<=is[n]&&console[n].apply&&(r==="*"||t.startsWith(r)))return console[n].apply(console,p$(i,t))}};function p$(n,e){return e!=="*"&&(typeof n[0]=="string"?n[0]="["+e+"] "+n[0]:n=["["+e+"]"].concat(n)),n}function f$(n,e){if(!n)return{targetLevel:e.level,targetBizName:e.bizName};if(~n.indexOf(":")){var t=n.split(":");return{targetLevel:t[0],targetBizName:t[1]}}return{targetLevel:n,targetBizName:"*"}}var m$={level:"warn",bizName:"*"},v$=function(){function n(e){e=bi(bi({},m$),e);var t=location||{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(t.href)||[])[1],i=f$(r,e),o=i.targetLevel,s=i.targetBizName;for(var a in is)this[a]=d$(a,o,e.bizName,s)}return n}();function g$(n){return new v$(n)}const it=g$({level:"log",bizName:"VTJ"});function tn(n,e,t=!1,r=!1){try{const i=['"use strict";',"var __self = arguments[0];"];i.push("return ");let o=(n.value||"").trim();o=o.replace(/this(\W|$)/g,(a,u)=>`__self${u}`),o=i.join(`
103
- `)+o;const s=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",s)(e)}catch(i){if(it.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function os(n,e,t=!1,r=!1){const i=tn(n,e,t,r);if(typeof i!="function"&&(it.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function Le(n){return n&&n.type==="JSExpression"}function Or(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function y$(n){return Le(n)||Or(n)}function Un(n){return y$(n)?n.value:JSON.stringify(n)}let Tn=null;const b$=Mp({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{yn.error({message:n||"未知错误"})},showLoading:()=>{Tn&&Tn.close(),Tn=Yu.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{Tn&&(Tn.close(),Tn=null)}}});function w$(n,e){const{jsonp:t,request:r}=e;if(n.method==="jsonp")return(i={})=>t(n.url,{...n.jsonpOptions,query:i});{const i=n.headers?tn(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(s,a)=>r.send(Kt(o,a||{},{data:s}))}}function Qp(n=[],e){return n.reduce((t,r)=>(t[r.id]=w$(r,e),t),{})}let _$=class{__id=null;__mode;__instance=null;__contextRefs={};__refs={};context={};state={};$props={};$refs={};$el=null;$emit=null;$nextTick=null;$parent=null;$root=null;$attrs=null;$slots=null;$watch=null;$options=null;$forceUpdate=null;$components={};$libs={};$apis={};__transform={};constructor(e){const{mode:t,dsl:r,attrs:i}=e;this.__mode=t,r&&(this.__id=r.id||null,this.__transform=r.transform||{}),i&&Object.assign(this,i)}setup(e,t=xi){const r=t.getCurrentInstance();if(!r)return;this.__instance=r.proxy;const i=r.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,e||{}),this.__proxy(),t.onMounted(()=>{this.__proxy()}),t.onUnmounted(()=>{this.__cleanup()})}__proxy(){this.__instance&&Au.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){Au.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===nt.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return os({type:r,value:i},this)}else return os(e,this)}__parseExpression(e){if(e)if(this.__mode===nt.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return tn({type:r,value:i},this)}else return tn(e,this)}__ref(e=null,t){if(this.__mode!==nt.VNode)return e&&e!==this.__id&&(this.__contextRefs[e]=this),r=>{let i=r?.$vtjEl||r?.$el||r;if(!i){typeof t=="string"&&(delete this.$refs[t],e&&delete this.__refs[e]);return}if(i.__vtj__=e,i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),nt.Design===this.__mode&&(i.__context__=this),e&&(this.__refs[e]=r),typeof t=="function")t(r);else if(t){const o=this.$refs[t];if(o){const s=new Set([].concat(o,r));this.$refs[t]=Array.from(s)}else this.$refs[t]=r}return r}}__clone(e={}){const t={...this.context,...e},r={...t,context:t};return r.context.__proto__=this.context,r.__proto__=this,r}};function oa(n){const{Vue:e=xi,mode:t=nt.Runtime,components:r={},libs:i={},apis:o={},loader:s}=n,a=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new _$({mode:t,dsl:a.value,attrs:u}),c=e.defineComponent({name:a.value.name,props:{...x$(a.value.props??[],l)},setup(h){l.$props=h,a.value.id&&Xp(n.window||window,a.value.id,a.value.css||""),l.state=S$(e,a.value.state??{},l);const d=$$(e,a.value.computed??{},l),p=j$(a.value.methods??{},l),f=E$(e,a.value.inject,l),v=k$(a.value.dataSources||{},l),y={...f,...d,...p,...v};return l.setup(y,e),T$(e,a.value.watch??[],l),{vtj:l}},emits:[...a.value.emits??[]],expose:["vtj"],render(){if(!a.value.nodes)return null;const h=a.value.nodes||[];return h.length===1?wi(h[0],l,e,s):h.map(d=>wi(d,l,e,s))},...V$(a.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function x$(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>Wp[i]):void 0;return n.map(r=>Gn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:Le(r.default)?e.__parseExpression(r.default):r.default}).reduce((r,i)=>(r[i.name]={type:t(i.type),required:i.required,default:i.default},r),{})}function S$(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return Le(o)?o=t.__parseExpression(o):Or(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function $$(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function j$(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function E$(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:s}=i||{};i.default;const a=Le(s)?t.__parseExpression(s)||o:s??o,u=Le(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(a,u),r},{})}function k$(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],s=Or(i.transform)?i.transform.value?e.__parseFunction(i.transform):void 0:i.transform;return t[r]=async(...a)=>{const u=await o.apply(e,a);return s?s(u):u},t},{})}function T$(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function V$(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const D$=n=>n;function sa(n){const{getDsl:e,options:t}=n;return(r,i,o=xi)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const s=await e(i.id);return s?oa({...t,Vue:o,dsl:s,mode:nt.Runtime,loader:sa(n)}).renderer:null}):r}function wi(n,e,t=xi,r=D$){if(!n||!n.name||n.invisible)return null;const{id:i=null,directives:o=[]}=n,{vIf:s,vFor:a,vShow:u,vModels:l,vBind:c}=O$(o);if(s&&!A$(s,e))return null;const h=d=>{const p=d.$components,f=(()=>{if(n.name==="component")return B$(d,n.props?.is);if(n.name==="slot")return n.name;const g=r(n.name,n.from,t);return Gn(g)?p[g]??g:g})(),v=C$(i,n.props??{},d),y=I$(t,n.events??{},d);if(n.name==="slot")return R$(t,n,v,d);c&&Object.assign(v,d.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},N$(u,d))),l.forEach(g=>{Object.assign(v,F$(t,g,d))});const $=z$(t,n.children??[],d,n);return t.createVNode(f,{...v,...y},$)};return a?H$(a,h,e):h(e)}function O$(n=[]){const e=n.find(a=>dn(a.name)==="vIf"),t=n.find(a=>dn(a.name)==="vFor"),r=n.find(a=>dn(a.name)==="vShow"),i=n.find(a=>dn(a.name)==="vBind"),o=n.filter(a=>dn(a.name)==="vModel"),s=n.filter(a=>!l$.includes(dn(a.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:s}}function A$(n,e){return!!e.__parseExpression(n.value)}function B$(n,e){return e?Le(e)?n.__parseExpression(e):e:"div"}function C$(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let s=e[o];return Le(s)?s=t.__parseExpression(s):Or(s)&&(s=t.__parseFunction(s)),i[o]=s,i},{});return r.ref=t.__ref(n,r.ref),r}function I$(n,e,t){const r=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(e||{}).reduce((o,s)=>{const a=e[s],u=ef(a.modifiers),l=u.find(d=>r.includes(d)),c="on"+Js(s)+(l&&i[l]||""),h=t.__parseFunction(a.handler);return h&&(o[c]=n.withModifiers(h,u)),o},{})}function ef(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function R$(n,e,t,r){const{children:i}=e,o=M$(e,r),s=r.$slots?.[o.name];return s?s(t):i?Gn(i)?n.createTextVNode(i):Le(i)?n.createTextVNode(Gp(r.__parseExpression(i))):Array.isArray(i)?i.map(a=>wi(a,r,n)):null:null}function M$(n,e){const{props:t}=n,r=t?.name||"default";return{name:Le(r)?e.__parseExpression(r):r,params:[]}}function N$(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function F$(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
104
- ${e.value.value} = v;
105
- }`:"(v) => {}"},i=t.__parseFunction(r),o=ef(e.modifiers),s=Le(e.arg)?t.__parseExpression(e.arg):e.arg||"modelValue";return{[s]:t.__parseExpression(e.value),[`onUpdate:${s}`]:o.length&&i?n.withModifiers(i,o):i}}function z$(n,e,t,r){if(!e)return null;if(Gn(e))return{default:()=>e};if(Le(e))return{default:()=>Gp(t.__parseExpression(e))};if(Array.isArray(e)){const i=P$(e),o=s=>!s||!r?{}:r?.id&&Object.keys(s).length?{[`scope_${r.id}`]:s}:{};return Object.entries(i).reduce((s,[a,{nodes:u,params:l}])=>(s[a]=c=>{const h=l.length?Wx(c??{},l):o(c);return u.map(d=>wi(d,t.__clone(h),n))},s),{})}}function P$(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=L$(t.slot),i=r.name;e[i]?(e[i].nodes.push(t),e[i].params=e[i].params.concat(r.params)):e[i]={nodes:[t],params:r.params}}return e}function L$(n="default"){return Gn(n)?{name:n,params:[]}:{params:[],...n}}function H$(n,e,t){const{value:r,iterator:i}=n,{item:o="item",index:s="index"}=i||{};let a=t.__parseExpression(r)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((u,l)=>l+1)),Array.isArray(a)?a.map((u,l)=>e(t.__clone({[o]:u,[s]:l}))):(console.warn("[vForRender]:",`${r?.value} is not a Arrary`),[])}const Cu=J({name:"VtjPageContainer",async setup(){const n=q$(),e=Xf(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&Zf(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Ye(this.component,this.query):Ye("div","页面不存在")}});var U$={ENV_TYPE:"local",NODE_ENV:"production"};const tf=Symbol("Provider");class nf extends Ds{mode;globals={};modules={};adapter={request:b$,jsonp:y7};apis={};dependencies={};materials={};library={};service;project=null;components={};router=null;constructor(e){super();const{service:t,mode:r=nt.Raw,dependencies:i,materials:o,project:s={},adapter:a={},globals:u={},modules:l={},router:c=null}=e;this.mode=r,this.modules=l,this.service=t,this.router=c,i&&(this.dependencies=i),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,a),r!==nt.Design&&this.load(s)}async load(e){const t=this.modules[".vtj/project.json"];if(this.project=t?await t():await this.service.init(e),!this.project)throw new Error("project is null");const{dependencies:r=[],apis:i}=this.project,{dependencies:o,library:s,components:a}=this,{libraryExports:u,libraryMap:l,materials:c,materialExports:h,materialMapLibrary:d}=Kp(r);for(const f of u){const v=o[f],y=window[f];if(y)s[f]=y;else if(v)window[f]=s[f]=await v();else{const $=l[f]||[];for(const g of $)Jp(g)&&await c$(f,g),Yp(g)&&await Tu(g),s[f]=window[f]}}for(const f of c)await Tu(f);const p=this.materials||{};for(const f of h){const v=p[f]?(await p[f]()).default:window[f],y=window[d[f]];v&&y&&v.components.forEach($=>{a[$.name]=Zp($,y)})}i&&(this.apis=Qp(i,this.adapter)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:Cu}),t?.homepage&&e.addRoute({path:"/",name:"VtjHomepage",component:Cu}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&h$(i)&&(e.use(i),t[r]=!0);e.provide(tf,this),e.config.globalProperties.installed=t}getFile(e){const{blocks:t=[]}=this.project||{};return this.getPage(e)||t.find(r=>r.id===e)||null}getPage(e){const{pages:t=[]}=this.project||{},r=(i,o=[])=>{for(const s of o){if(s.id===i)return s;if(s.children&&s.children.length){const a=r(i,s.children);if(a)return a}}};return r(e,t)||null}getHomepage(){const{homepage:e}=this.project||{};return e?this.getPage(e):null}async getDsl(e){const t=this.modules[`.vtj/files/${e}.json`];return t?await t():this.service.getFile(e).catch(()=>null)}async getRenderComponent(e){const t=this.getFile(e);if(!t)return it.warn(`Can not find file: ${e}`),null;const r=`.vtj/raw/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const o=await this.getDsl(t.id);if(!o)return it.warn(`Can not find dsl: ${e}`),null;const{library:s,components:a,mode:u,apis:l}=this,c={mode:u,Vue:s.Vue,components:a,libs:s,apis:l,window},h=sa({getDsl:async p=>await this.getDsl(p)||null,options:c}),{renderer:d}=oa({...c,dsl:o,loader:h});return d}}function U9(n){const e=new nf(n);return{provider:e,onReady:t=>e.ready(t)}}function q$(n={}){const e=hr(tf);if(!e)throw new Error("Can not find provider");if(e.mode===nt.Runtime&&U$.NODE_ENV==="development"){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&yn.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const W$=new Rp({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{yn.error({message:n||"未知错误"})}}}),J$=(n="/vtj/local/api/${type}.json")=>(e,t)=>W$.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}});class Y${api;constructor(){this.api=J$()}async init(e){return console.log("BaseService.init",e),{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return console.log("BaseService.saveMaterials",e,t),!1}async saveFile(e){return console.log("BaseService.saveFile",e),!1}async getFile(e){return console.log("BaseService.getFile",e),{}}async removeFile(e){return console.log("BaseService.removeFile",e),!1}async saveHistory(e){return console.log("BaseService.saveHistory",e),!1}async removeHistory(e){return console.log("BaseService.removeHistory",e),!1}async getHistory(e){return console.log("BaseService.getHistory",e),{}}async getHistoryItem(e,t){return console.log("BaseService.getHistoryItem",e,t),{}}async saveHistoryItem(e,t){return console.log("BaseService.saveHistoryItem",e,t),!1}async removeHistoryItem(e,t){return console.log("BaseService.removeHistoryItem",e,t),!1}async publish(e){return!!await this.api("publish",e).catch(()=>!1)}async publishFile(e,t){return!!await this.api("publishFile",{project:e,file:t}).catch(()=>!1)}async getRaw(e,t){return await this.api("getRaw",{project:e,dsl:t}).catch(()=>"")}}new Np({type:"local",expired:0,prefix:"__VTJ_"});class q9 extends Y${async init(e){return await this.api("init",e).catch(()=>null)||{}}async saveProject(e){return!!await this.api("saveProject",e).catch(()=>!1)}async saveMaterials(e,t){return!!await this.api("saveMaterials",{project:e,materials:qx(t)}).catch(()=>!1)}async saveFile(e){return!!await this.api("saveFile",e).catch(()=>!1)}async getFile(e){return await this.api("getFile",e).catch(()=>null)||{}}async removeFile(e){return!!await this.api("removeFile",e).catch(()=>!1)}async saveHistory(e){return!!await this.api("saveHistory",e).catch(()=>!1)}async removeHistory(e){return!!await this.api("removeHistory",e).catch(()=>!1)}async getHistory(e){return await this.api("getHistory",e).catch(()=>null)||{}}async getHistoryItem(e,t){return await this.api("getHistoryItem",{fId:e,id:t}).catch(()=>null)||{}}async saveHistoryItem(e,t){return!!await this.api("saveHistoryItem",{fId:e,item:t}).catch(()=>!1)}async removeHistoryItem(e,t){return!!await this.api("removeHistoryItem",{fId:e,ids:t}).catch(()=>!1)}}/**!
106
- * Copyright (c) 2024, VTJ.PRO All rights reserved.
107
- * @name @vtj/designer
108
- * @author CHC chenhuachun1549@dingtalk.com
109
- * @version 0.7.0
110
- * @license <a href="https://vtj.pro/license.html">MIT License</a>
111
- */const Iu={width:390,height:844},Ru={width:1180,height:820},Rt=/^[A-Za-z_$][\w_-]*$/,K$=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],Z$=["keydown","keyup","keypress"],G$=["GET","POST","PUT","PATCH","DELETE","JSONP"],X$=["stop","prevent","capture","self","once","passive"];var dt=(n=>(n.Block="block",n.Node="node",n))(dt||{});const Q$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC",ej=["title","src"],tj={key:1},nj=J({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:Q$},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(k(),te("div",{class:"v-logo-widget",onClick:t},[e.icon?(k(),te("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,ej)):(k(),te("span",tj,ie(e.text),1))]))}}),rj={class:"v-empty-widget"},ij=J({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(k(),te("div",rj,"EmptyWidget"))}});function rf(){const n=Ge(),e=L(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function an(n,e){const t=L(()=>uf.getWidgets(m(n),m(e)).filter(i=>!i.invisible)),r=q();return{widgets:t,widgetsRef:r}}function of(){const n=Ge();return{span:L(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function oj(){const n=Ge(),e=L(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const sj=(n=[])=>n.map(e=>e.name);function aj(){const n=Ge(),{components:e,groups:t,componentMap:r}=n.assets,i=gn({}),o=L(()=>{const h={};return t.value&&t.value.forEach(d=>{h[d.name]=d}),h}),s=L(()=>t.value?t.value.map(h=>({label:`${h.label} (${h.count})`,name:h.name,disabled:!h.children?.length})):[]),a=q(s.value[0]?.name),u=q(""),l=L(()=>o.value[a.value]);ls(()=>{const h=s.value.reduce((d,p)=>(d[p.name]=sj(o.value[p.name].children),d),{});Object.assign(i,h)});const c=L(()=>{const h=u.value.toLowerCase();return!h||!e?[]:e.filter(d=>d.name.toLowerCase().includes(h)||d.label?.toLowerCase().includes(h))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function He(){const n=Ge(),e=L(()=>n.current.value),t=L(()=>n.context.value),r=L(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function lj(n,e){const t=Ge();t.simulator.init(n,e);const r=L(()=>t.simulator.designer.value),i=L(()=>mo("hover",r.value?.hover.value)),o=L(()=>mo("dropping",r.value?.dropping.value)),s=L(()=>mo("selected",r.value?.selected.value));return{designer:r,dropping:o,hover:i,selected:s}}function uj(n,e=!0){const{top:t,height:r,width:i,left:o}=n||{};if(r>100&&i>200)return"inner";let s,a;return a=t>30?"top":"bottom",s=e||o<300&&i<300?"left":"right",[s,a].join("-")}function cj(n){const{rect:e,type:t}=n,{left:r,width:i,top:o,height:s}=e,a={left:r,width:i,top:o,height:s};switch(t){case"left":a.left=0,a.width=0;break;case"right":a.left=a.left+a.width-4,a.width=0;break;case"bottom":a.top=a.top+a.height-4,a.height=0;break;case"top":a.height=0;break}return a}function mo(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?cj(e):e.rect,s={left:`${t}px`,top:`${r}px`,width:`${i}px`,height:`${o}px`,visibility:i||o?"visible":"hidden"};return{...e,style:s,position:uj(e.rect,n!=="selected")}}function Mt(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>e.value?.selected.value),r=L(()=>Ae(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function hj(n,e){const t=q(""),{selected:r,isSelectBlock:i}=Mt(),o=L(()=>r.value?.model.id),s=L(()=>{const u=yo(n),l=yo(e),c=[];if(!u)return c;const h=l?.__contextRefs[o.value||""],d=l===h||i.value?[]:Object.keys(h?.context||{}).filter(_=>!["context","ref"].includes(_)).map(_=>`this.context.${_}`);d.length&&c.push({title:"上下文",items:d});const p=u.inject.map(_=>`this.${_.name}`);p.length&&c.push({title:"注入",items:p});const f=u.props.map(_=>typeof _=="string"?`this.$props.${_}`:`this.$props.${_.name}`);f.length&&c.push({title:"属性",items:f});const v=Object.keys(u.state).map(_=>`this.state.${_}`);v.length&&c.push({title:"状态",items:v});const y=Object.keys(u.computed).map(_=>`this.${_}.value`);y.length&&c.push({title:"计算属性",items:y});const $=Object.keys(u.methods).map(_=>`this.${_}`);$.length&&c.push({title:"方法",items:$});const g=Object.keys(u.dataSources).map(_=>`this.${_}`);g.length&&c.push({title:"数据源",items:g});const w=Object.keys(l?.$refs||{}).map(_=>`this.$refs.${_}`);return w.length&&c.push({title:"refs",items:w}),c}),a=L(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const h=c.items.filter(d=>d.toLowerCase().includes(u));h.length&&l.push({title:c.title,items:h})}),l});return{keyword:t,options:s,searchResult:a}}const Kr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function dj(n){const e=Ge(),t=L(()=>{const u=n.value?.model||null;return Ae(u)?null:u}),r=q();_e(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=L(()=>t.value?[{name:"key",setters:Kr,value:t.value.getPropValue("key")},{name:"ref",setters:Kr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:Kr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:Kr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=L(()=>{if(!t.value)return[];const u=r.value||e.assets.componentMap.get(t.value.name);return u?(u.props||[]).map(l=>({...l,value:t.value?.getPropValue(l.name)??l.defaultValue})):[]}),s=u=>i.value.some(l=>l.name===u)||o.value.some(l=>l.name===u)||u==="style",a=L(()=>t.value?Object.keys(t.value.props).filter(u=>!s(u)).map(u=>({name:u,setters:"InputSetter",value:t.value?.getPropValue(u)})):[]);return{commonProps:i,componentProps:o,customProps:a,node:t,change:(u,l)=>{t.value&&(u==="children"?t.value.setChildren(l):t.value.setProp(u,l))},addCustom:u=>{u&&t.value?.setProp(u,"")},removeCustom:u=>{t.value?.removeProp(u)},isExist:s}}function Me(n,e="提示"){return yn.warning({title:e,message:n})}async function tr(n){return await vs.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function ot(n,e="success"){return ms({message:n,type:e})}function Pe(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?tn(n,e,t,!0):os(n,e,t,!0)}catch(i){r=!1,yn.error({title:"代码错误",message:i.message})}return r}function sf(){const n=Ge(),e=L(()=>n.simulator.designer.value),t=L(()=>n.history.value),r=L(()=>t.value?.items.length||0),i=()=>{e.value?.cleanHelper(),t.value?.forward()},o=()=>{t.value?.backward(),e.value?.cleanHelper()},s=l=>{e.value?.cleanHelper(),t.value?.load(l),ot("已载入历史记录","success")},a=L(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=L(()=>r.value<=1?!0:(t.value?.index||-1)>=r.value-1);return{engine:n,history:t,total:r,forward:i,backward:o,load:s,forwardDisabled:a,backwardDisabled:u}}function Li(){const n=Ge(),e=L(()=>n.project.value);return{engine:n,project:e}}function pj(n){const e=Ge(),t=L(()=>{const a=n.value?.model||null;return Ae(a)?null:a}),r=q();_e(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=L(()=>{if(Ae(t.value))return[];const a=t.value?.events||{};return K$.map(u=>({name:u,event:a[u]}))}),o=L(()=>{if(Ae(t.value))return[];const a=t.value?.events||{};return Z$.map(u=>({name:u,event:a[u]}))}),s=L(()=>{if(!t.value||Ae(t.value))return[];const a=t.value.events||{};return(r.value?.events||e.assets.componentMap.get(t.value.name)?.events||[]).map(u=>{const l=typeof u=="string"?u:u.name;return{name:l,event:a[l]}})});return{mouseEventList:i,keyboardEventList:o,componentEventList:s}}const fj=(n,e)=>new On({name:n,value:void 0,iterator:e}),mj=(n="modelValue")=>new On({name:"vModel",value:void 0,arg:n});function vj(n){if(!n)return[];const{props:e=[],events:t=[]}=n;if(e.length&&t.length){const r=t.filter(i=>(typeof i=="string"?i:i.name).startsWith("update:")).map(i=>i=typeof i=="string"?i:i.name);return r.length?e.filter(i=>r.some(o=>o.includes(i.name))):[]}return[]}function gj(n){const e=Ge(),t=L(()=>{const h=n.value?.model||null;return Ae(h)?null:h}),r=h=>L(()=>t.value&&(t.value.directives||[]).find(d=>d.name===h)||fj(h)),i=()=>L(()=>{if(!t.value)return[];const h=e.assets.componentMap.get(t.value.name||"");return(h?vj(h):[]).map(d=>(t.value?.directives||[]).find(p=>p.name==="vModel"&&p.arg==d.name)||mj(d.name))}),o=r("vIf"),s=r("vShow"),a=r("vBind"),u=r("vFor"),l=i(),c={vIf:o,vShow:s,vBind:a,vFor:u};return{engine:e,node:t,vIf:o,vShow:s,vBind:a,vFor:u,vModels:l,onValueChange:(h,d)=>{const p=c[h];t.value&&(d?(p.value.value=d,t.value.setDirective(p.value)):(p.value.value=void 0,t.value.removeDirective(p.value)))},onForChange:(h,d)=>{if(t.value){if(h==="value"){d?(u.value.value=d,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(h==="item"||h==="index")&&(u.value.iterator={...u.value.iterator,[h]:d||void 0},t.value.setDirective(u.value))}},onModelChange:(h,d)=>{if(!t.value)return;const p=parseInt(h),f=l.value[p];f&&(d?(f.value=d,t.value.setDirective(f)):(f.value=void 0,t.value.removeDirective(f)))}}}function yj(){const{engine:n,project:e}=Li(),t=L(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const bj={class:"v-switcher-widget"},wj={key:1},_j=J({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=He(),i=L(()=>r.project.value?.name),o=L(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(k(),te("div",bj,[T(m(ze),{size:"small",round:"",onClick:s},{default:A(()=>[T(m(bh),{class:"v-switcher-widget__back"}),fe("span",null,ie(i.value),1),o.value?(k(),F(m(vr),{key:0,direction:"vertical"})):Z("",!0),o.value?(k(),te("span",wj,ie(o.value),1)):Z("",!0)]),_:1})]))}}),xj={class:"v-toolbar-widget"},Sj=J({name:"ToolbarWidget",inheritAttrs:!1,__name:"index",props:{preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{forward:r,backward:i,forwardDisabled:o,backwardDisabled:s}=sf(),a=q("pc");return e({mode:a}),(u,l)=>(k(),te("div",xj,[T(m(Ju),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:A(()=>[T(m(Gr),{label:"pc"},{default:A(()=>[T(m(Eh))]),_:1}),T(m(Gr),{label:"mobile"},{default:A(()=>[T(m(kh))]),_:1}),T(m(Gr),{label:"pad"},{default:A(()=>[T(m(Th))]),_:1})]),_:1},8,["modelValue"]),Z("",!0),T(m(Vf),null,{default:A(()=>[T(m(ze),{type:"default",size:"small",onClick:m(i),disabled:m(s)||!!t.preview},{default:A(()=>[T(m(Oh))]),_:1},8,["onClick","disabled"]),T(m(ze),{type:"default",size:"small",onClick:m(r),disabled:m(o)||!!t.preview},{default:A(()=>[T(m(Vh))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),$j={class:"v-actions-widget"},jj=fe("span",null,"发布",-1),Ej=J({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=Mt(),r=q(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),ot("刷新完成","success")):ot("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await dp(1e3)),t.value?.setSelected(e.current.value)):ot("请先打开文件","warning")},s=()=>{if(e.project.value)if(e.current.value){if(r.value){e.skeleton?.closePreview(),r.value=!1;return}e.skeleton?.openPreview(""),r.value=!0}else ot("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):ot("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(k(),te("div",$j,[T(m(Hu),{value:0,max:99,hidden:!0},{default:A(()=>[T(m(tt),{mode:"icon",icon:m(Bh),background:"hover"},null,8,["icon"])]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ze),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:A(()=>[T(m($h))]),_:1},8,["type"]),T(m(ze),{onClick:i,type:"default",size:"small",title:"刷新"},{default:A(()=>[T(m(Dh))]),_:1}),T(m(ze),{type:"default",size:"small",title:"页面设置",onClick:o},{default:A(()=>[T(m(Ch))]),_:1}),T(m(vr),{direction:"vertical"}),T(m(ds),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:A(()=>[T(m(hs),null,{default:A(()=>[T(m(pi),{command:"current"},{default:A(()=>[pe("发布页面")]),_:1}),T(m(pi),{command:"project"},{default:A(()=>[pe("整站发布")]),_:1})]),_:1})]),default:A(()=>[jj]),_:1})]))}}),kj={class:"v-icon-setter"},Tj={class:"v-icon-setter__content"},Vj={class:"v-icon-setter__list"},af=J({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(!1),o=q(t.modelValue),s=q(""),a=L(()=>Ro[t.modelValue]||t.modelValue),u=L(()=>{const p=Object.entries(Ro);return s.value?p.filter(f=>f[0].toLowerCase().includes(s.value)):p}),l=p=>{o.value=p},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},h=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},d=()=>{i.value=!0};return(p,f)=>(k(),te("div",kj,[T(m(mt),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":m(Jf),onFocus:d},{prepend:A(()=>[T(m(en),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(k(),F(m(er),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value=v),onSubmit:c},{extra:A(()=>[T(m(ze),{size:"default",type:"warning",onClick:h},{default:A(()=>[pe(" 清除绑定 ")]),_:1})]),default:A(()=>[fe("div",Tj,[T(m(mt),{size:t.size,"prefix-icon":m(Zu),clearable:"",modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),fe("div",Vj,[(k(!0),te(re,null,ae(u.value,v=>(k(),F(m(en),{icon:v[1],onClick:y=>l(v[0]),class:ke({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(k(),F(m(Re),{key:0})):Z("",!0)])])]),_:1},8,["modelValue"])):Z("",!0)]))}}),Dj=J({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Li(),r=L(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!1,hidden:!1,raw:!1}),o=q(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=Qd(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Me("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(k(),F(m(kt),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:A(()=>[T(m(ne),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),T(m(ne),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""}),T(m(ne),{name:"icon",label:"菜单图标",editor:"none"},{editor:A(()=>[T(af,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=h=>o.value.icon=h),size:"default"},null,8,["modelValue"])]),_:1}),T(m(ne),{name:"hidden",label:"隐藏菜单",editor:"switch"}),T(m(ne),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),T(m(ne),{visible:{dir:!1},name:"raw",label:"源码模式",editor:"switch"})]),_:1},8,["title","model"]))}}),Mu=J({name:"VIcon",__name:"Icon",props:{icon:{},label:{},active:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(k(),F(m(_i),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:A(()=>[fe("div",{class:ke(["v-apps-region__icon",i.value]),onClick:o},[(k(),F(rt(s.icon)))],2)]),_:1},8,["content"]))}}),ge=J({name:"VPanel",__name:"panel",props:{title:{},subtitle:{},plus:{type:Boolean},back:{type:Boolean},remove:{type:Boolean},save:{type:Boolean},header:{type:Boolean,default:!0}},emits:["plus","back","remove","save"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("plus")},o=()=>{r("back")},s=()=>{r("remove")},a=()=>{r("save")},u=L(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?qf:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(k(),F(m(Pi),{class:"v-panel",border:!1,header:u.value,fit:""},Fn({actions:A(()=>[t.plus?(k(),F(m(tt),{key:0,size:l.$attrs.size,mode:"icon",icon:m(Rs),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):Z("",!0),t.remove?(k(),F(m(tt),{key:1,size:l.$attrs.size,mode:"icon",icon:m(Wf),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):Z("",!0),t.save?(k(),F(m(tt),{key:2,size:l.$attrs.size,mode:"icon",icon:m(jh),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):Z("",!0),le(l.$slots,"actions")]),default:A(()=>[le(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:A(()=>[le(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),Oj={class:"v-tabs__header"},Aj={key:0,class:"v-tabs__actions"},Hi=J({__name:"tabs",props:{items:{default:()=>[]},menus:{},modelValue:{},stretch:{type:Boolean},checkable:{type:Boolean}},emits:["update:modelValue","command","remove"],setup(n,{emit:e}){const t=n,r=e,i=q((t.modelValue||t.items[0]?.name)??"");_e(i,()=>{r("update:modelValue",i.value)}),_e(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(k(),F(m(Pi),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:A(()=>[fe("div",Oj,[T(m(qp),{class:"v-tabs__tabs",items:t.items,type:"card",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=l=>i.value=l),onTabRemove:s,stretch:t.stretch},null,8,["items","modelValue","stretch"]),t.menus&&t.menus.length?(k(),te("div",Aj,[t.menus&&t.menus.length?(k(),F(m(tt),{key:0,mode:"icon",size:"small",icon:m(gs),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:A(({item:l})=>[fe("span",null,[t.checkable?(k(),F(m(Os),{key:0,class:ke({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):Z("",!0),pe(" "+ie(l.label),1)])]),_:1},8,["icon","menus"])):Z("",!0)])):Z("",!0)])]),default:A(()=>[le(a.$slots,"default")]),_:3}))}}),Bj={key:2,class:"v-item__index"},Cj={class:"v-item__content"},Ij={key:3,class:"v-item__subtitle"},Fe=J({name:"VItem",__name:"item",props:{icon:{},index:{},tag:{},tagType:{},title:{},subtitle:{},actions:{default:()=>[]},background:{type:Boolean},border:{type:Boolean},switch:{type:Boolean},modelValue:{},active:{type:Boolean},hover:{type:Boolean},small:{type:Boolean}},emits:["click","action","update:modelValue","switch"],setup(n,{emit:e}){const t={add:{label:"创建",icon:Rs},copy:{label:"复制",icon:As},edit:{label:"编辑",icon:Is},remove:{label:"删除",icon:Tr},lock:{label:"锁定",icon:Bs},unlock:{label:"解锁",icon:Sh},invisible:{label:"隐藏",icon:Ms},visible:{label:"显示",icon:Ph},home:{label:"主页",icon:wh}},r=n,i=e,o=q(!!r.modelValue),s=L(()=>r.actions.map(c=>{const h=t[c];return{name:c,...h}})),a=L(()=>({"is-background":r.background,"is-border":r.border,"is-active":r.active,"is-hover":r.hover,"is-small":r.small})),u=()=>{i("click",r.modelValue)},l=async c=>{c==="remove"?await vs.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return _e(o,c=>{i("update:modelValue",c),i("switch",c)}),_e(()=>r.modelValue,c=>{o.value=!!c}),(c,h)=>(k(),F(m(he),{class:ke(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:A(()=>[T(m(he),{class:"v-item__title",align:"center"},{default:A(()=>[le(c.$slots,"default",{},()=>[c.icon?(k(),F(m(en),{key:0,icon:c.icon},null,8,["icon"])):Z("",!0),r.tag?(k(),F(m(Ff),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:A(()=>[pe(ie(r.tag),1)]),_:1},8,["type"])):Z("",!0),c.index!==void 0?(k(),te("span",Bj," # "+ie(c.index),1)):Z("",!0),fe("span",Cj,ie(c.title),1),c.subtitle?(k(),te("span",Ij,ie(c.subtitle),1)):Z("",!0)])]),_:3}),T(m(he),{class:"v-item__actions",onClick:h[1]||(h[1]=Cn(()=>{},["stop"]))},{default:A(()=>[(k(!0),te(re,null,ae(s.value,d=>(k(),F(m(tt),{name:d.name,title:d.label,mode:"icon",size:"small",background:"none",type:"info",icon:d.icon,onClick:p=>l(d.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(k(),F(m(ps),{key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=d=>o.value=d),class:"v-item__switch",size:"small"},null,8,["modelValue"])):Z("",!0),le(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),Rj=["draggable"],Mj={class:"v-box__name"},Nj={class:"v-box__label"},ss=J({name:"VBox",__name:"box",props:{name:{},title:{},editable:{type:Boolean},active:{type:Boolean},draggable:{type:Boolean}},emits:["edit","remove","dragstart","dragend"],setup(n,{emit:e}){const t=n,r=e,i=()=>{r("edit")},o=async()=>{await vs.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=L(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(k(),te("div",{class:ke(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[T(m(he),{direction:"column",justify:"center",align:"center"},{default:A(()=>[fe("span",Mj,ie(t.name),1),fe("span",Nj,ie(t.title),1)]),_:1}),t.editable?(k(),F(m(he),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:A(()=>[T(m(en),{icon:m(Is),onClick:i},null,8,["icon"]),T(m(en),{icon:m(Tr),onClick:o},null,8,["icon"])]),_:1})):Z("",!0)],42,Rj))}}),Fj={class:"v-context-viewer"},zj=J({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const h=c.value,d=ao(h);return d==="Object"||d==="Module"?Object.keys(h||{}).length===0:d==="Array"?h.length===0:!0},s=(c,h="this")=>typeof c=="object"?Array.isArray(c)?c.map((d,p)=>{const f=`[${p}]`;return{label:f,value:d,type:ao(d),path:`${h}${f}`}}):Object.entries(c).map(([d,p])=>({label:d,value:p,type:ao(p),path:`${h}.${d}`})).filter(d=>!d.label.startsWith("__")&&!i.includes(d.label)):[],a=(c,h)=>{if(c.level===0)h(s(t.context));else{const d=An(c.data.value);h(s(d,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,h)=>(k(),te("div",Fj,[c.context?(k(),F(m(fs),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:A(({data:d})=>[T(Fe,{title:d.label,clickable:"",onClick:p=>l(d),background:"",actions:["copy"],onAction:p=>u(d),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):Z("",!0)]))}}),aa=J({__name:"binder",props:{title:{},context:{},block:{},model:{},rules:{},modelValue:{type:Boolean},submitMethod:{type:Function},unbindEnabled:{type:Boolean}},emits:["unbind","submit","cancel","pick","update:modelValue","close"],setup(n,{emit:e}){const t=n,r=e,{searchResult:i,keyword:o}=hj(t.block,t.context),{copy:s}=Gf({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=q("normal"),l=q(),c=async $=>{r("submit",$),t.submitMethod?await t.submitMethod($)&&h():h()},h=()=>{r("update:modelValue",!1),r("close")},d=()=>{r("unbind")},p=()=>{h()},f=async()=>{l.value?.submit()},v=$=>{r("pick",$)},y=$=>{s($),ms.success({message:"已经复制到粘贴板"})};return($,g)=>(k(),F(m(er),{"model-value":t.modelValue,class:"v-binder",title:$.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:h},{default:A(()=>[T(m(he),{fit:"",direction:"row",overflow:"hidden"},{default:A(()=>[T(m(he),{width:"30%",height:"100%"},{default:A(()=>[T(Hi,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":g[1]||(g[1]=w=>u.value=w)},{default:A(()=>[T(m(he),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:A(()=>[Bn(fe("div",null,[T(m(mt),{modelValue:m(o),"onUpdate:modelValue":g[0]||(g[0]=w=>go(o)?o.value=w:null),size:"small",clearable:"","prefix-icon":m(Zu),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(k(!0),te(re,null,ae(m(i),w=>(k(),te("div",null,[T(m(vr),{"border-style":"dotted"},{default:A(()=>[pe(ie(w.title),1)]),_:2},1024),(k(!0),te(re,null,ae(w.items,_=>(k(),F(Fe,{title:_,background:"",actions:["copy"],small:"",onClick:x=>v(_),onAction:x=>y(_)},null,8,["title","onClick","onAction"]))),256))]))),256)),m(i).length?Z("",!0):(k(),F(m(Re),{key:0}))],512),[[di,u.value==="normal"]]),Bn(T(zj,{context:t.context,onCopy:y,onPick:v},null,8,["context"]),[[di,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),T(m(Pi),{grow:"",header:null,border:!1},{footer:A(()=>[T(m(he),{justify:"space-between"},{default:A(()=>[T(m(he),null,{default:A(()=>[$.unbindEnabled?(k(),F(m(ze),{key:0,type:"warning",size:"default",onClick:d},{default:A(()=>[pe(" 移除绑定 ")]),_:1})):Z("",!0)]),_:1}),T(m(he),null,{default:A(()=>[T(m(ze),{type:"default",size:"default",onClick:p},{default:A(()=>[pe(" 取消 ")]),_:1}),T(m(ze),{type:"primary",size:"default",onClick:f},{default:A(()=>[pe(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:A(()=>[T(m(Up),{ref_key:"formRef",ref:l,class:"v-binder__form",footer:!1,"label-position":"top","tooltip-message":!1,model:t.model,rules:t.rules,"submit-method":c},{default:A(()=>[le($.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),Pj={class:"v-slots-picker__sn"},Lj=J({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=q(),o=L(()=>`${50*Math.ceil(t.slots.length/4)+180}px`),s=u=>{i.value=u},a=()=>{i.value?(r("submit",i.value),r("update:modelValue",!1)):Me("请选择插槽")};return(u,l)=>(k(),F(m(er),je({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:A(()=>[T(m(Lf),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),T(m(he),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:A(()=>[(k(!0),te(re,null,ae(t.slots,(c,h)=>(k(),F(m(he),{class:ke(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:d=>s(c)},{default:A(()=>[fe("span",Pj,"#"+ie(h+1),1),pe(" "+ie(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),lf=J({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=L(()=>[`is-${e.mode}`]),r=L(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?Iu:Ru,{width:s,height:a}=o,u=s>0?(e.width||0)/s:1,l=a>0?(e.height||0)/a:1;return Math.min(u,l)}),i=L(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?Iu:Ru,{width:s,height:a}=o;return{width:`${s}px`,height:`${a}px`,left:"50%",top:"50%",transform:`translate(-50%, -50%) scale(${r.value})`}});return(o,s)=>(k(),te("div",{class:ke(["v-viewport",t.value]),style:Gt(i.value)},[le(o.$slots,"default")],6))}}),Hj=J({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Li(),r=L(()=>e.value?.pages||[]),{current:i}=He(),o=q(!1),s=q(),a=q(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async p=>{const{name:f,modelValue:v}=p,{data:y,node:$}=v;if(f==="add"&&(s.value=void 0,a.value=y.id,o.value=!0),f==="edit"&&(s.value=Ci(y),a.value=void 0,o.value=!0),f==="remove"){if(y.dir){const g=e.value?.getPage(y.id);if(g&&g.children?.length){Me("请先删除子页面");return}}e.value?.removePage(y.id)}if(f==="copy"){const g=$.parent?.data.id;e.value?.clonePage(y,g)}f==="home"&&(e.value?.setHomepage(y.id),ot("设置主页成功","success"))},c=async p=>{p.dir||t.project.value?.active(p)},h=(p,f,v)=>v==="inner"?!!f.data.dir:!0,d=()=>{e.value?.update({pages:yo(r)})};return(p,f)=>(k(),F(m(ge),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:A(()=>[T(m(fs),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":h,onNodeDrop:d},{default:A(({data:v,node:y})=>[T(m(Fe),{class:"v-pages-widget__item",icon:m(Ro)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:y},actions:v.dir?["add","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:$=>c(v),active:m(i)?.id===v.id,tag:m(e)?.homepage===v.id?"主页":void 0,"tag-type":"success",grow:"",small:"",background:"",hover:""},null,8,["icon","title","subtitle","model-value","actions","onClick","active","tag"])]),_:1},8,["data"]),o.value?(k(),F(Dj,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):Z("",!0)]),_:1}))}}),Uj=J({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=of(),{blocks:t,engine:r}=oj(),i=q(void 0),{current:o}=He(),s=q(!1),a=L(()=>i.value?.id?"编辑":"新增"),u=L(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async g=>{const w=g,_=r.project.value;if(!_)return!1;if(g.id)if(!_.existBlockName(w.name,[w.id]))_.updateBlock(w);else return Me(`名称【${w.name}】已经存在,请更换名称`),!1;else if(!_.existBlockName(w.name))_.createBlock(w);else return Me(`名称【${w.name}】已经存在,请更换名称`),!1;return!0},h=()=>{i.value=l(),s.value=!0},d=g=>{i.value=Ci(g),s.value=!0},p=g=>{r.project.value?.removeBlock(g.id)},f=g=>{i.value&&(i.value.name=Qd(g))},v=async g=>{r.project.value?.active(g)},y=async g=>{const w={type:"Schema",id:g.id},_=await r.assets.getBlockMaterial(w),x=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;x&&_&&x.setDragging(_)},$=()=>{const g=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;g&&g.setDragging(null)};return(g,w)=>(k(),F(m(ge),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:h},{default:A(()=>[T(m(wo),{wrap:"wrap",gutter:5},{default:A(()=>[(k(!0),te(re,null,ae(m(t),_=>(k(),F(m(bo),{key:_.id,span:m(e)},{default:A(()=>[T(m(ss),{name:_.name,title:_.title,active:m(o)?.id===_.id,editable:"",onEdit:x=>d(_),onRemove:x=>p(_),onClick:x=>v(_),draggable:m(o)?.id!==_.id,onDragstart:x=>y(_),onDragend:$},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(t).length?Z("",!0):(k(),F(m(Re),{key:0})),T(m(kt),{modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=_=>s.value=_),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:A(()=>[T(m(ne),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:m(Rt)},onChange:f},null,8,["rules"]),T(m(ne),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),qj={class:"v-components-widget__search"},Wj={key:0,class:"v-components-widget__result"},Jj={class:"v-components-widget__list"},Yj=J({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=of(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=aj(),l=h=>{const d=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;d&&d.setDragging(h)},c=()=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(null)};return(h,d)=>(k(),F(m(ge),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:A(()=>[fe("div",qj,[T(m(mt),{modelValue:m(a),"onUpdate:modelValue":d[0]||(d[0]=p=>go(a)?a.value=p:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:A(()=>[T(m(Uh))]),_:1},8,["modelValue"])]),m(a)?(k(),te("div",Wj,[T(m(wo),{wrap:"wrap",gutter:5},{default:A(()=>[(k(!0),te(re,null,ae(m(u),p=>(k(),F(m(bo),{span:m(e),key:p.name},{default:A(()=>[T(m(ss),{name:p.name,title:p.label||p.name,draggable:"",onDragstart:f=>l(p),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),m(u).length?Z("",!0):(k(),F(m(Re),{key:0}))])):(k(),F(m(qp),{key:1,items:m(r),modelValue:m(i),"onUpdate:modelValue":d[2]||(d[2]=p=>go(i)?i.value=p:null)},{default:A(()=>[fe("div",Jj,[m(o)?(k(),F(m(Df),{key:0,modelValue:m(s)[m(i)],"onUpdate:modelValue":d[1]||(d[1]=p=>m(s)[m(i)]=p)},{default:A(()=>[(k(!0),te(re,null,ae(m(o).children,p=>(k(),F(m(Of),{key:p.name,name:p.name,title:`${p.label} (${p.count})`},{default:A(()=>[p.components?(k(),F(m(wo),{key:0,wrap:"wrap",gutter:5},{default:A(()=>[(k(!0),te(re,null,ae(p.components,f=>(k(),F(m(bo),{span:m(e),key:f.name},{default:A(()=>[T(m(ss),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:v=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):Z("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):Z("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),Kj=J({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=Mt(),{current:i}=He(),o=q([]),s=x=>{if(Ae(x))return x.locked?["unlock"]:["lock"];const b=x.parent;return b&&(b.locked||b.invisible)?[]:i.value?.locked?[]:x.locked?["unlock"]:x.invisible?["visible"]:["lock","invisible","copy","remove"]},a=x=>{const b=[];return x.forEach(E=>{const O={id:E.id,label:E.name,type:E.id,model:E};Array.isArray(E.children)&&(O.children=a(E.children)),b.push(O)}),b},u=()=>{if(!i.value)return[];const{id:x,name:b,nodes:E}=i.value;return[{id:x,label:b,type:x,model:i.value,children:a(E)}]},l=()=>{o.value=u()},c=L(()=>r.value?.model.id),h=x=>{const b=x.data;if(Ae(b.model)||b.model.locked||b.model.name==="template")return!1;const E=e.assets.componentMap.get(b.model.name);return E?(t.value?.setDragging(E),!0):!1},d=async(x,b,E)=>{const O=b.data,H={prev:"top",next:"bottom",inner:"inner"}[E];let S=!1;if(Ae(O.model))S=E==="inner",t.value?.setDropping(S?O.model:null,"inner");else{const j=O.model;S=!!await t.value?.allowDrop(j,H),t.value?.setDropping(S?j:null,"inner")}return S},p=x=>{const b=x?.model;!b||b.invisible||(t.value?.setSelected(b),t.value?.setHover(null))},f=async(x,b,E)=>{const O=x.data,H=b.data;if(Ae(H.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const S=H.model,j={before:"left",after:"right"}[E]||"inner";if(!await t.value?.allowDrop(S,j)){t.value?.setDropping(null),l(),ms.warning({message:`${O.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const N=await t.value?.getDropSlot(E==="inner"?S:S.parent);if(N!==null){const V=O.model;V.slot=N,i.value?.move(V,S,j)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=x=>{Ae(x.model)?t.value?.setHover(x.model):(t.value?.setHover(x.model),x.model.invisible&&t.value?.setHover(null),x.model.name==="slot"&&t.value?.setHover(null))},y=()=>{t.value?.setHover(null)},$=x=>{const b=x.data;b.dragging=!0;const E=e.assets.componentMap.get(b.model.name);E&&t.value?.setDragging(E)},g=async x=>{const b=x.data;b.dragging=!1},w=(x,b)=>{x&&((x.id===b.id||!Ae(x)&&b.isChild(x))&&t.value?.setSelected(null),t.value?.setHover(null))},_=x=>{const{name:b,modelValue:E}=x,O=r.value?.model;switch(b){case"lock":w(O,E),E.lock();break;case"unlock":w(O,E),E.unlock();break;case"invisible":w(O,E),E.setVisible(!1);break;case"visible":E.setVisible(!0);break;case"copy":const H=i.value?.cloneNode(E);H&&t.value?.setSelected(H);break;case"remove":w(O,E),i.value?.removeNode(E);break}};return _e(i,l,{immediate:!0,deep:!0}),(x,b)=>(k(),F(m(ge),{class:"v-outline-widget",title:"大纲树"},{default:A(()=>[T(m(fs),{data:o.value,"node-key":"id","default-expand-all":"",draggable:"","empty-text":"请新建或打开文件","current-node-key":c.value,"highlight-current":!0,"expand-on-click-node":!1,"allow-drop":d,"allow-drag":h,onCurrentChange:p,onNodeDrop:f,onNodeDragStart:$,onNodeDragEnd:g},{default:A(({data:E,node:O})=>[T(m(Fe),{class:ke(["v-outline-widget__item",{"is-locked":E.model.locked,"is-invisible":E.model.invisible,"is-dragging":E.dragging}]),active:!E.model.invisible&&O.isCurrent,grow:"",small:"",background:"",hover:"","model-value":E.model,icon:E.model.locked?m(Bs):E.model.invisible?m(Ms):void 0,title:E.label,subtitle:E.type,actions:s(E.model),onAction:_,onMouseenter:H=>v(E),onMouseleave:y},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"])]),_:1}))}}),Zj=J({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=sf(),i=L(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await tr("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(k(),F(m(ge),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!m(r),onRemove:s},{default:A(()=>[m(r)===0?(k(),F(m(Re),{key:0,"image-size":50})):Z("",!0),m(e)?(k(!0),te(re,{key:1},ae(m(e).items,(l,c)=>(k(),F(m(Fe),{index:c+1,title:l.label,"model-value":l,active:c==m(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:h=>m(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):Z("",!0)]),_:1},8,["subtitle","remove"]))}}),Ce=vf({loader:()=>hf(()=>import("./Editor-ctkAn2cu-J9BpKj5_.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:J({render(){return Ye("div","正在拼命加载...")}}),errorComponent:J({render(){return Ye("div","组件加载失败!")}})}),Gj=J({name:"ApisWidget",__name:"index",setup(n){const e=q(!1),t=q(null),r=q(!1),i=L(()=>r.value?"编辑API":"新增API"),o=L(()=>s.value?.apis||[]),{project:s}=Li(),a=()=>({method:"get",name:"",label:"",url:"",settings:{loading:!0,failMessage:!0,validSuccess:!0,originResponse:!1,injectHeaders:!1,type:"form",headers:{type:"JSExpression",value:"({})"}}}),u=()=>{e.value=!0,r.value=!1,t.value=a()},l=G$.map(y=>({label:y,value:y.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},h=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],d=(y,$,g)=>{Pe({type:"JSExpression",value:$},window)?g():g(new Error("代码错误"))},p=y=>{y.name==="edit"&&f(y.modelValue),y.name==="remove"&&s.value?.removeApi(y.modelValue.name)},f=y=>{r.value=!0,t.value=Ci(y),e.value=!0},v=async y=>s.value?.existApiName(y.name,r.value?[y.id]:[])?(Me(`API名称 [ ${y.name} ] 已存在`),!1):(s.value?.setApi(y),!0);return(y,$)=>(k(),F(m(ge),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:A(()=>[(k(!0),te(re,null,ae(o.value,g=>(k(),F(m(Fe),{key:g.id,small:"",title:g.name,subtitle:g.label,"model-value":g,tag:g.method?.toUpperCase(),"tag-type":c[g.method||"get"],background:"",actions:["edit","remove"],onClick:w=>f(g),onAction:p},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(k(),F(m(Re),{key:0,"image-size":50})):Z("",!0),T(m(kt),{modelValue:e.value,"onUpdate:modelValue":$[1]||($[1]=g=>e.value=g),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:A(()=>[T(m(he),{gap:"",fit:""},{default:A(()=>[T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:A(()=>[T(m(ne),{name:"method",label:"请求类型",required:"",editor:"radio",options:m(l),props:{button:!0}},null,8,["options"]),T(m(ne),{name:"name",label:"接口名称",required:"",rules:{pattern:m(Rt),message:"名称格式不正确"}},null,8,["rules"]),T(m(ne),{name:"label",label:"备注说明",required:""}),T(m(ne),{name:"url",label:"接口URL",required:""})]),_:1}),T(m(he),{direction:"column",grow:"",width:"50%",shrink:""},{default:A(()=>[t.value.method!=="jsonp"?(k(),F(m(ge),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:A(()=>[T(m(he),{justify:"space-around"},{default:A(()=>[T(m(ne),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),T(m(ne),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),T(m(ne),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),T(m(ne),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),T(m(ne),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:h,props:{button:!0}}),T(m(ne),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:d}},{editor:A(()=>[T(m(Ce),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":$[0]||($[0]=g=>t.value.settings.headers.value=g),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):Z("",!0),t.value.method==="jsonp"?(k(),F(m(ge),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:A(()=>[T(m(ne),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),T(m(ne),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),T(m(ne),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),T(m(ne),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):Z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),Xj=J({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=rf(),r=q(!1),i=q(!1),o=q({}),s=L(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=f=>f.required||f.official?[]:["edit","remove"],u=f=>f.official&&!f.required,l=async f=>(f.urls=f.urls.split(`
112
- `),t.project.value?.setDeps(f),!0),c=f=>{t.project.value?.setDeps(f)},h=()=>{i.value=!1,r.value=!0,o.value=null},d=f=>{i.value=!0,o.value={...f,urls:f.urls.join(`
113
- `)},r.value=!0},p=(f,v)=>{v.name==="edit"&&(o.value={...f,urls:f.urls.join(`
114
- `)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(f)};return(f,v)=>(k(),F(m(ge),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:h},{default:A(()=>[(k(!0),te(re,null,ae(m(e),y=>(k(),F(m(Fe),{key:y.package,title:y.package,subtitle:y.version,actions:a(y),background:"",switch:u(y),modelValue:y.enabled,"onUpdate:modelValue":$=>y.enabled=$,onSwitch:$=>c(y),onClick:$=>d(y),onAction:$=>p(y,$)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),T(m(kt),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=y=>r.value=y),width:"600px",height:"500px",title:s.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:A(()=>[T(m(ne),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),T(m(ne),{name:"version",label:"版本",required:""}),T(m(ne),{name:"library",label:"导出名称",required:""}),T(m(ne),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),T(m(ne),{name:"assetsUrl",label:"物料URL"}),T(m(ne),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),Qj=J({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>t.model.name),o=L(()=>!Ae(t.model)&&!t.model.locked),s=L(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),a=[{name:"prev",icon:Rh,title:"向前移动"},{name:"next",icon:Ih,title:"向后移动"},{name:"copy",icon:As,title:"复制"},{name:"remove",icon:Tr,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await tr("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,h)=>(k(),te("div",{class:ke(["v-actions",[`is-${t.position}`]])},[T(m(tt),{mode:"icon",size:"small",icon:m(Cs),label:i.value,menus:s.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),T(m(C7),{disabled:!o.value,mode:"icon",size:"small",items:a,background:"none",onClick:l},null,8,["disabled"])],2))}}),eE={key:1,class:"v-designer__placeholder"},tE=J({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=q(),r=q(),{width:i,height:o}=ys(t),{dependencies:s,engine:a}=rf(),{current:u,isEmpty:l}=He(),c=L(()=>a.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:h,hover:d,dropping:p,selected:f}=lj(r,s),v=y=>{const $=y.type,g=y.model;if(u.value)switch($){case"remove":u.value.removeNode(g),h.value?.setSelected(null);break;case"copy":const w=u.value.cloneNode(g);h.value?.setSelected(w);break;case"prev":u.value.movePrev(g),h.value?.setSelected(g);break;case"next":u.value.moveNext(g),h.value?.setSelected(g);break;case"hover":h.value?.setHover(g);break;case"selected":h.value?.setSelected(g);break}};return e({designer:h,mode:c}),(y,$)=>(k(),te("div",{ref_key:"container",ref:t,class:"v-designer"},[T(m(lf),{mode:c.value,width:m(i),height:m(o)},{default:A(()=>[fe("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),m(p)?(k(),te("div",{key:0,class:ke(["v-designer__dropping","is-inner"]),style:Gt(m(p).style)},null,4)):Z("",!0),m(d)?(k(),te("div",{key:1,class:"v-designer__hover",style:Gt(m(d).style)},[fe("span",{class:ke(`is-${m(d).position}`)},[pe(ie(m(d).model.name)+": ",1),fe("i",null,ie(m(d).model.id),1)],2)],4)):Z("",!0),m(f)?(k(),te("div",{key:2,class:"v-designer__selected",style:Gt(m(f).style)},[T(Qj,{position:m(f).position,model:m(f).model,path:m(f).path,onAction:v},null,8,["position","model","path"])],4)):Z("",!0)]),_:1},8,["mode","width","height"]),m(u)?Z("",!0):(k(),F(m(Re),{key:0,description:"请新建或打开文件"})),m(u)&&m(l)?(k(),te("div",eE," 您可以拖拽组件放置到这里 ")):Z("",!0)],512))}}),Ar=J({__name:"group",props:{context:{},current:{},title:{},nameLabel:{},valueLabel:{},createEmpty:{},list:{},remove:{},submit:{},itemTitle:{type:Function,default:n=>n.name}},setup(n){const e=n,t=q(),r=q(),i=q(!1),o=q(e.createEmpty()),s=q(!1),a=L(()=>s.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{s.value=!1,o.value=e.createEmpty(),i.value=!0},l=(f,v)=>{switch(v.name){case"edit":h(f);break;case"remove":e.remove(f);break}},c=f=>{o.value.value=f},h=f=>{s.value=!0,o.value={...f},i.value=!0},d=async f=>e.submit(f,s.value),p=()=>{r.value?.itemRef.validate()};return(f,v)=>(k(),F(m(ge),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:A(()=>[(k(!0),te(re,null,ae(f.list,y=>(k(),F(m(Fe),{title:e.itemTitle(y),border:"",actions:["edit","remove"],onAction:$=>l(y,$),onClick:$=>h(y)},null,8,["title","onAction","onClick"]))),256)),f.list.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":40})),T(m(aa),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=y=>i.value=y),title:a.value,"submit-method":d,model:o.value,block:f.current,context:f.context,onPick:c},{default:A(()=>[le(f.$slots,"fields",At(Qt({model:o.value,isEdit:s.value,nameLabel:f.nameLabel,valueLabel:f.valueLabel})),()=>[T(m(ne),{name:"name",label:f.nameLabel,required:"",disabled:s.value},null,8,["label","disabled"]),T(m(ne),{ref_key:"codeFieldRef",ref:r,name:"value",label:f.valueLabel,required:""},{editor:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=y=>o.value.value=y),onBlur:p},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),nE=J({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.state||{}).map(([s,a])=>({name:s,value:Un(a)}))),r=()=>({name:"",value:""}),i=s=>e.current?.removeState(s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.state[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Pe(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(s,a)=>(k(),F(Ar,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),rE=J({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.computed||{}).map(([s,a])=>({name:s,value:Un(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("computed",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.computed[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Pe(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(s,a)=>(k(),F(Ar,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),iE=J({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>Object.entries(e.current?.methods||{}).map(([s,a])=>({name:s,value:Un(a)}))),r=()=>({name:"",value:"() => { }"}),i=s=>e.current?.removeFunction("methods",s.name),o=async(s,a)=>{const{name:u,value:l}=s;if(!a&&e.current?.methods[u])return Me(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Pe(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(s,a)=>(k(),F(Ar,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),oE=J({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>a$.map(a=>({label:a,value:a}))),r=L(()=>Object.entries(e.current?.lifeCycles||{}).map(([a,u])=>({name:a,value:Un(u)}))),i=()=>({name:"",value:"() => { }"}),o=a=>e.current?.removeFunction("lifeCycles",a.name),s=async(a,u)=>{const{name:l,value:c}=a;if(!u&&e.current?.lifeCycles[l])return Me(`名称 ${l} 已存在,请更换!`),!1;const h={type:"JSFunction",value:c};return Pe(h,e.context,!0)?(e.current?.setFunction("lifeCycles",l,h),!0):!1};return(a,u)=>(k(),F(Ar,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:s},{fields:A(({model:l,nameLabel:c,isEdit:h,valueLabel:d})=>[T(m(ne),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:h},null,8,["label","options","disabled"]),T(m(ne),{name:"value",label:d,required:""},{editor:A(()=>[T(m(Ce),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":p=>l.value=p},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),sE=J({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=L(()=>(e.current?.watch||[]).map(a=>({...a,source:Un(a.source),handler:Un(a.handler)}))),r=()=>({source:"() => { }",deep:!1,immediate:!1,handler:"() => { }"}),i=a=>a.source,o=a=>e.current?.removeWatch(a),s=async(a,u)=>{const l={type:"JSFunction",value:a.source},c={type:"JSFunction",value:a.handler};if(!Pe(l,e.context,!0)||!Pe(c,e.context,!0))return!1;const h={...a,source:l,handler:c};return e.current?.setWatch(h),!0};return(a,u)=>(k(),F(Ar,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:s,itemTitle:i,grow:""},{fields:A(({model:l,nameLabel:c,valueLabel:h})=>[T(m(ne),{name:"source",label:c,required:""},{editor:A(()=>[T(m(Ce),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":d=>l.source=d},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),T(m(ne),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":d=>l.deep=d,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),T(m(ne),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":d=>l.immediate=d,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),T(m(ne),{name:"handler",label:h,required:""},{editor:A(()=>[T(m(Ce),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":d=>l.handler=d},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),aE=J({__name:"index",setup(n){const{current:e,context:t}=He();return(r,i)=>(k(),F(m(he),{class:"v-scripts-widget",direction:"column",fit:""},{default:A(()=>[T(nE,{current:m(e),context:m(t)},null,8,["current","context"]),T(rE,{current:m(e),context:m(t)},null,8,["current","context"]),T(iE,{current:m(e),context:m(t)},null,8,["current","context"]),T(oE,{current:m(e),context:m(t)},null,8,["current","context"]),T(sE,{current:m(e),context:m(t)},null,8,["current","context"])]),_:1}))}}),vo=J({__name:"setters",props:{context:{},current:{},title:{},items:{},node:{},removable:{type:Boolean}},emits:["change","remove"],setup(n,{emit:e}){const t=n,r=e,i=(s,a)=>{r("change",s,a)},o=s=>{r("remove",s)};return(s,a)=>(k(),F(m(ge),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:A(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:a[0]||(a[0]=dr(Cn(()=>{},["prevent","stop"]),["enter"]))},{default:A(()=>[(k(!0),te(re,null,ae(t.items,u=>(k(),F(m(Pt),je(u,{key:`${u.name}_${t.node.id}`,current:t.current,context:t.context,removable:t.removable,onChange:i,onRemove:o}),null,16,["current","context","removable"]))),128))]),_:1})]),_:1},8,["title"]))}}),lE=J({__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{node:i,commonProps:o,change:s,componentProps:a,customProps:u,addCustom:l,removeCustom:c,isExist:h}=dj(r),d=q(!1),p=q(),f=()=>{d.value=!0,p.value={name:""}},v=async $=>{const g=Object.keys(i.value?.props||{});return!h($.name)&&!g.includes($.name)?(l($.name),!0):(Me("已存在该属性名称"),!1)},y=async $=>{await tr("确定删除?")&&c($)};return($,g)=>m(e)?(k(),F(m(he),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:A(()=>[m(i)?(k(),F(vo,{key:0,title:"通用属性",current:m(e),context:m(t),node:m(i),items:m(o),onChange:m(s)},null,8,["current","context","node","items","onChange"])):Z("",!0),m(i)?(k(),F(vo,{key:1,title:"组件属性",current:m(e),context:m(t),node:m(i),items:m(a),onChange:m(s)},null,8,["current","context","node","items","onChange"])):Z("",!0),m(i)?(k(),F(vo,{key:2,title:"自定义属性",current:m(e),context:m(t),node:m(i),items:m(u),onChange:m(s),removable:"",plus:"",grow:"",onPlus:f,onRemove:y},null,8,["current","context","node","items","onChange"])):Z("",!0),T(m(kt),{modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=w=>d.value=w),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:p.value},{default:A(()=>[T(m(ne),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):Z("",!0)}}),uE=J({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=q(),r=gn({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,s)=>(k(),F(m(aa),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:A(()=>[T(m(ne),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),dark:"",height:"450px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),cE=J({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=q(),r=gn({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=X$.map(s=>({label:s,value:s})),o=s=>{t.value.getEditor().setValue(s),r.handler.value=s};return(s,a)=>(k(),F(m(aa),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:A(()=>[T(m(ne),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:m(i)},null,8,["options"]),T(m(ne),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,modelValue:r.handler.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.handler.value=u),dark:"",height:"350px"},null,8,["modelValue"])]),_:1})]),_:1},8,["block","context","model"]))}}),hE=J({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{mouseEventList:i,keyboardEventList:o,componentEventList:s}=pj(r),a=q({name:"",event:void 0}),u=q(!1),l=f=>{a.value=Ci(f),u.value=!0},c=async f=>{const v={...f,modifiers:f.modifiers.reduce((y,$)=>(y[$]=!0,y),{})};return Pe(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},h=async f=>{const v=r.value?.model;f.name&&(v.removeEvent(f.name),u.value=!1)},d=async()=>{a.value.name&&await tr("确定要删除该事件吗?")&&h(a.value)},p=f=>{const{name:v,modelValue:y}=f;v==="edit"&&l(y),v==="remove"&&h(y)};return(f,v)=>(k(),F(m(he),{class:"v-events-widget",direction:"column",fit:""},{default:A(()=>[T(m(ge),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:A(()=>[m(s).length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50,description:"该组件无自带事件"})),(k(!0),te(re,null,ae(m(s),y=>(k(),F(m(Fe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),T(m(ge),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:A(()=>[(k(!0),te(re,null,ae(m(i),y=>(k(),F(m(Fe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),T(m(ge),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:A(()=>[(k(!0),te(re,null,ae(m(o),y=>(k(),F(m(Fe),{title:y.name,"model-value":y,border:"",small:"",actions:y.event?["edit","remove"]:["edit"],active:!!y.event,onClick:$=>l(y),onAction:p},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),u.value?(k(),F(m(cE),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=y=>u.value=y),context:m(t),current:m(e),name:a.value.name,event:a.value.event,submitMethod:c,onUnbind:d},null,8,["modelValue","context","current","name","event"])):Z("",!0)]),_:1}))}}),dE=J({name:"CssWidget",__name:"index",setup(n){const{current:e}=He(),t=q(),r=L(()=>e.value?.css||""),i=s=>{e.value?.setCss(s)},o=()=>{const s=(t.value?.getEditor()).getValue();i(s),ot("保存成功")};return(s,a)=>(k(),F(m(ge),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),pE=J({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=He(),{selected:r}=Mt(),{vIf:i,vShow:o,vBind:s,vFor:a,vModels:u,onValueChange:l,onForChange:c,onModelChange:h}=gj(r),d=p=>p.arg?typeof p.arg=="string"?p.arg:tn(p.arg,{}):"modelValue";return(p,f)=>(k(),F(m(he),{class:"v-directives-widget",direction:"column",fit:""},{default:A(()=>[T(m(ge),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:A(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:f[0]||(f[0]=dr(Cn(()=>{},["prevent","stop"]),["enter"]))},{default:A(()=>[T(m(Pt),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(i).value,onChange:m(l)},null,8,["current","context","value","onChange"]),T(m(Pt),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(o).value,onChange:m(l)},null,8,["current","context","value","onChange"]),T(m(Pt),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(s).value,onChange:m(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),T(m(ge),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:A(()=>[T(m(pr),{size:"small","label-width":"80px",onKeydown:f[1]||(f[1]=dr(Cn(()=>{},["prevent","stop"]),["enter"]))},{default:A(()=>[T(m(Pt),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:m(e),context:m(t),value:m(a).value,onChange:m(c)},null,8,["current","context","value","onChange"]),T(m(Pt),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:m(e),context:m(t),value:m(a).iterator?.item,onChange:m(c)},null,8,["current","context","value","onChange"]),T(m(Pt),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:m(e),context:m(t),value:m(a).iterator?.index,onChange:m(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),T(m(ge),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:A(()=>[(k(!0),te(re,null,ae(m(u),(v,y)=>(k(),F(m(ge),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${d(v)}`,body:{grow:!1},fit:!1},{default:A(()=>[T(m(pr),{size:"small","label-width":"60px",onKeydown:f[2]||(f[2]=dr(Cn(()=>{},["prevent","stop"]),["enter"]))},{default:A(()=>[T(m(Pt),{name:y.toString(),label:"绑定变量",setters:"ExpressionSetter",current:m(e),context:m(t),value:v.value,onChange:m(h)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),m(u).length?Z("",!0):(k(),F(m(Re),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),fE=J({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义属性":"新增定义属性"),r=q(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys(Wp).map(s=>({label:s,value:s})),o=async s=>{const a=s.default;return a&&!Pe(a,e.context,!0)?!1:(e.current.setProp(s),!0)};return(s,a)=>(k(),F(m(kt),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:A(()=>[T(m(ne),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"]),T(m(ne),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:m(i),required:""},null,8,["options"]),T(m(ne),{name:"required",label:"必须",editor:"switch"}),T(m(ne),{name:"default.value",label:"默认值",editor:"none"},{default:A(()=>[T(m(Ce),{modelValue:r.value.default.value,"onUpdate:modelValue":a[0]||(a[0]=u=>r.value.default.value=u),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),mE=J({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义事件":"新增定义事件"),r=q({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,s)=>(k(),F(m(kt),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:A(()=>[T(m(ne),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),vE=J({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=q({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,s)=>(k(),F(m(kt),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:A(()=>[T(m(ne),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),gE=J({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=L(()=>e.item?"编辑注入":"新增注入"),r=q(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const s=o.default;return s&&!Pe(s,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,s)=>(k(),F(m(kt),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:A(()=>[T(m(ne),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"]),T(m(ne),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),T(m(ne),{name:"default.value",label:"默认值",editor:"none"},{default:A(()=>[T(m(Ce),{modelValue:r.value.default.value,"onUpdate:modelValue":s[0]||(s[0]=a=>r.value.default.value=a),height:"200px",dark:""},null,8,["modelValue"])]),_:1})]),_:1},8,["title","model"]))}}),yE=J({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=He(),r=L(()=>(e.value?.props||[]).map(j=>typeof j=="string"?{name:j}:j)),i=L(()=>e.value?.emits||[]),o=L(()=>e.value?.slots||[]),s=L(()=>e.value?.inject||[]),a=q(!1),u=q(),l=q(!1),c=q(),h=q(!1),d=q(),p=q(!1),f=q(),v=()=>{u.value=void 0,a.value=!0},y=j=>{const{name:N,modelValue:V}=j;N==="edit"&&$(V),N==="remove"&&e.value?.removeProp(V)},$=j=>{u.value=j,a.value=!0},g=()=>{c.value=void 0,l.value=!0},w=j=>{c.value=j,l.value=!0},_=j=>{const{name:N,modelValue:V}=j;N==="edit"&&w(V),N==="remove"&&e.value?.removeEmit(V)},x=()=>{d.value=void 0,h.value=!0},b=j=>{d.value=j,h.value=!0},E=j=>{const{name:N,modelValue:V}=j;N==="edit"&&b(V),N==="remove"&&e.value?.removeSlot(V)},O=()=>{f.value=void 0,p.value=!0},H=j=>{f.value=j,p.value=!0},S=j=>{const{name:N,modelValue:V}=j;N==="edit"&&H(V),N==="remove"&&e.value?.removeInject(V)};return(j,N)=>m(e)&&m(t)?(k(),F(m(he),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:A(()=>[T(m(ge),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:A(()=>[(k(!0),te(re,null,ae(r.value,V=>(k(),F(m(Fe),{"model-value":V,title:V.name,border:"",actions:["edit","remove"],onClick:z=>$(V),onAction:y},null,8,["model-value","title","onClick"]))),256)),r.value.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50})),a.value?(k(),F(fE,{key:1,current:m(e),context:m(t),modelValue:a.value,"onUpdate:modelValue":N[0]||(N[0]=V=>a.value=V),item:u.value},null,8,["current","context","modelValue","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:g},{default:A(()=>[(k(!0),te(re,null,ae(i.value,V=>(k(),F(m(Fe),{"model-value":V,title:V,border:"",actions:["remove"],onClick:z=>w(V),onAction:_},null,8,["model-value","title","onClick"]))),256)),i.value.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50})),l.value?(k(),F(mE,{key:1,modelValue:l.value,"onUpdate:modelValue":N[1]||(N[1]=V=>l.value=V),current:m(e),context:m(t),item:c.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:x},{default:A(()=>[(k(!0),te(re,null,ae(o.value,V=>(k(),F(m(Fe),{"model-value":V,title:V,border:"",actions:["remove"],onClick:z=>b(V),onAction:E},null,8,["model-value","title","onClick"]))),256)),o.value.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50})),h.value?(k(),F(vE,{key:1,modelValue:h.value,"onUpdate:modelValue":N[2]||(N[2]=V=>h.value=V),current:m(e),context:m(t),item:d.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1}),T(m(ge),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:O},{default:A(()=>[(k(!0),te(re,null,ae(s.value,V=>(k(),F(m(Fe),{"model-value":V,title:V.name,border:"",actions:["remove"],onClick:z=>H(V),onAction:S},null,8,["model-value","title","onClick"]))),256)),s.value.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50})),p.value?(k(),F(gE,{key:1,modelValue:p.value,"onUpdate:modelValue":N[3]||(N[3]=V=>p.value=V),current:m(e),context:m(t),item:f.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1})]),_:1})):Z("",!0)}}),bE=J({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=yj(),r=q(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {
115
- /* 在这里可对接口返回数据进行转换 */
116
- return res;
117
- }`},test:{type:"JSFunction",value:`() => this.runApi({
118
- /* 在这里可输入接口参数 */
119
- })`}},e.item)),i=q(!1),o=q(""),s=q(!1),a=L(()=>t.value.map(d=>({label:d.label||"",value:d.id,data:d}))),u=L(()=>e.item?"编辑数据源":"新增数据源"),l=d=>{const p=t.value.find(f=>f.id===d);p&&(r.value.name=p.name,r.value.label=p.label||"")},c=async d=>{const{transform:p,test:f,name:v}=d;if(!e.current)return!1;if(!e.item&&e.current.dataSources[v])return Me(`名称【${v}】已经存在,请更换名称`),!1;if(p?.value){if(!Pe(p,e.context,!0))return!1}else d.transform=void 0;if(f?.value){if(!Pe(f,e.context,!0))return!1}else d.test=void 0;return e.current?.setDataSource(d),!0},h=async()=>{if(!e.context)return;if(!r.value.ref){Me("请先选择API");return}if(!r.value.test?.value){Me("请先填写测试用例");return}if(!Pe(r.value.test,e.context,!0))return;const d=async(...v)=>{const y=e.context?.$apis[r.value.ref];if(y)return await y.apply(y,v);it.warn(`API【${r.value.ref}】不存在`)},p=tn(r.value.test,{runApi:d}),f=r.value.transform?.value?tn(r.value.transform,{},!0):v=>v;i.value=!0;try{const v=await p();o.value=JSON.stringify(await f(v),null,2)}catch(v){it.error(v)}i.value=!1,s.value=!0};return(d,p)=>(k(),F(m(kt),{width:"1000px",height:"600px",title:u.value,model:r.value,"form-props":{tooltipMessage:!1},"submit-method":c},{extra:A(()=>[T(m(ze),{loading:i.value,type:"warning",onClick:h},{default:A(()=>[pe(" 运行测试用例 ")]),_:1},8,["loading"])]),default:A(()=>[T(m(ne),{name:"ref",label:"引用API",editor:"select",required:"",disabled:!!e.item,options:a.value,props:{filterable:!0},onChange:l},{option:A(({option:f})=>[pe(ie(f.data.label)+" ",1),fe("i",null,"[ "+ie(f.data.name)+" ]",1)]),_:1},8,["disabled","options"]),T(m(ne),{name:"name",label:"调用名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:m(Rt)}},null,8,["disabled","rules"]),T(m(ne),{name:"label",label:"备注说明",required:""}),T(m(ne),{name:"transform.value",label:"转换函数",editor:"none"},{default:A(()=>[T(m(Ce),{modelValue:r.value.transform.value,"onUpdate:modelValue":p[0]||(p[0]=f=>r.value.transform.value=f),height:"200px",dark:""},null,8,["modelValue"])]),_:1}),T(m(ne),{name:"test.value",label:"测试用例",editor:"none"},{default:A(()=>[T(m(Ce),{modelValue:r.value.test.value,"onUpdate:modelValue":p[1]||(p[1]=f=>r.value.test.value=f),height:"100px",dark:""},null,8,["modelValue"])]),_:1}),s.value?(k(),F(m(zf),{key:0,class:"v-drawer",modelValue:s.value,"onUpdate:modelValue":p[2]||(p[2]=f=>s.value=f),title:"测试用例运行结果",direction:"btt","append-to-body":"",size:"80%"},{default:A(()=>[T(m(Ce),{"model-value":o.value,border:"",dark:"",height:"100%",lang:"json"},null,8,["model-value"])]),_:1},8,["modelValue"])):Z("",!0)]),_:1},8,["title","model"]))}}),wE=J({name:"DataSourcesWidget",__name:"index",setup(n){const{current:e,context:t}=He(),r=q(!1),i=q(),o=L(()=>Object.values(e.value?.dataSources||{}).filter(l=>l.type==="api")),s=()=>{i.value=void 0,r.value=!0},a=l=>{i.value=l,r.value=!0},u=l=>{const{name:c,modelValue:h}=l;c==="edit"&&a(h),c==="remove"&&e.value?.removeDataSource(h.name)};return(l,c)=>(k(),F(m(he),{class:"v-data-sources-widget",direction:"column",fit:""},{default:A(()=>[T(m(ge),{title:"API",class:"v-sub-panel",size:"small",plus:"",onPlus:s},{default:A(()=>[(k(!0),te(re,null,ae(o.value,h=>(k(),F(m(Fe),{border:"",title:h.name,subtitle:h.label,"model-value":h,actions:["edit","remove"],onAction:u,onClick:d=>a(h)},null,8,["title","subtitle","model-value","onClick"]))),256)),o.value.length?Z("",!0):(k(),F(m(Re),{key:0,"image-size":50}))]),_:1}),r.value?(k(),F(bE,{key:0,modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=h=>r.value=h),current:m(e),context:m(t),item:i.value},null,8,["modelValue","current","context","item"])):Z("",!0)]),_:1}))}}),_E=J({name:"StyleWidget",__name:"index",setup(n){const{selected:e}=Mt(),t=q(),r=L(()=>{const a=e.value?.model||null;return Ae(a)?null:a}),i=L(()=>JSON.stringify(r.value?.getPropValue("style")||{},null,2)),o=a=>{try{const u=JSON.parse(a);r.value?.setProp("style",u)}catch{Me("JSON格式错误")}},s=()=>{const a=(t.value?.getEditor()).getValue();o(a),ot("保存成功")};return(a,u)=>(k(),F(m(ge),{class:"v-css-widget v-sub-panel",title:"style",size:"small",fit:"",save:"",onSave:s},{default:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,"model-value":i.value,height:"100%",lang:"json",dark:"",onBlur:o},null,8,["model-value"])]),_:1}))}}),xE=["src"],SE=J({name:"PreviewerWidget",__name:"index",props:{path:{type:Function}},setup(n,{expose:e}){const t=n,r=q(),i=q(Symbol()),{current:o,engine:s}=He(),{width:a,height:u}=ys(r),l=L(()=>o.value&&t.path?t.path(o.value):null),c=L(()=>s.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc");return e({refresh:()=>{i.value=Symbol()}}),(h,d)=>(k(),te("div",{ref_key:"container",ref:r,class:"v-previewer",key:i.value},[T(m(lf),{mode:c.value,width:m(a),height:m(u)},{default:A(()=>[l.value?(k(),te("iframe",{key:0,ref:"iframe",frameborder:"0",src:l.value},null,8,xE)):Z("",!0)]),_:1},8,["mode","width","height"])]))}}),$E=J({name:"NodePathWidget",inheritAttrs:!1,__name:"index",setup(n){const{selected:e,designer:t}=Mt(),r=L(()=>(e.value?.path||[]).slice(0).reverse()),i=s=>{t.value?.setSelected(s)},o=s=>{t.value?.setHover(s)};return(s,a)=>m(e)?(k(),F(m(Bf),{key:0,class:"v-nodepath-widget","separator-icon":m(Ku)},{default:A(()=>[(k(!0),te(re,null,ae(r.value,u=>(k(),F(m(Af),{onClick:l=>i(u),onMouseover:l=>o(u)},{default:A(()=>[pe(ie(u.name),1)]),_:2},1032,["onClick","onMouseover"]))),256))]),_:1},8,["separator-icon"])):Z("",!0)}}),jE=J({name:"SchemaWidget",__name:"index",setup(n){const{current:e}=He(),t=q(),r=L(()=>JSON.stringify(e.value?.toDsl()||{},null,2)),i=L(()=>e.value?e.value.name:""),o=async()=>{const s=(t.value?.getEditor()).getValue();if(s&&await tr("手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"))try{const a=JSON.parse(s);e.value?.update(a),ot("保存成功")}catch(a){Me(a?.message)}};return(s,a)=>(k(),F(m(ge),{class:"v-schema-widget",title:i.value,subtitle:"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。",size:"small",fit:"",save:"",onSave:o},{default:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"json",dark:""},null,8,["model-value"])]),_:1},8,["title"]))}}),EE=J({name:"SchemaWidget",__name:"index",setup(n){const{current:e,engine:t}=He(),r=q(),i=q(""),o=L(()=>e.value?`$vtj/raw/${e.value.id}.vue`:""),s=L(()=>e.value?e.value.name:"");return _e(e,async a=>{const u=t.project.value;u&&a?i.value=await t.service.getRaw(u.toDsl(),a.toDsl()):i.value=""},{immediate:!0,deep:!0}),(a,u)=>(k(),F(m(ge),{class:"v-raw-widget",title:s.value,subtitle:o.value,size:"small",fit:""},{default:A(()=>[T(m(Ce),{ref_key:"editorRef",ref:r,"model-value":i.value,height:"100%",lang:"html",dark:"",readonly:""},null,8,["model-value"])]),_:1},8,["title","subtitle"]))}}),kE=["src"],TE=J({name:"DocsWidget",__name:"index",props:{url:{default:"https://newgateway.gitee.io/vtj/docs/index.html"}},setup(n){const e=n,t=q();let r=null;us(()=>{r||(r=Yu.service({target:t.value?.$el}))}),cs(()=>{i(),r=null});const i=()=>{r?.close()};return(o,s)=>(k(),F(m(ge),{class:"v-docs-widget",size:"small",fit:"",body:{padding:!1},header:!1,ref_key:"panel",ref:t},{default:A(()=>[fe("iframe",{ref:"frame",src:e.url,onLoad:i},null,40,kE)]),_:1},512))}}),ye={Logo:nj,EmptyWidget:ij,Switcher:_j,Toolbar:Sj,Actions:Ej,Pages:Hj,Blocks:Uj,Components:Yj,Outline:Kj,History:Zj,Apis:Gj,Deps:Xj,Designer:tE,Scripts:aE,Properties:lE,Events:hE,Css:dE,Directives:pE,Defined:yE,DataSources:wE,Style:_E,Previewer:SE,NodePath:$E,Schema:jE,Raw:EE,Docs:TE},VE=[{name:"Logo",region:"Brand",component:ye.Logo},{name:"Switcher",region:"Brand",component:ye.Switcher},{name:"Toolbar",region:"Toolbar",component:ye.Toolbar},{name:"Actions",region:"Actions",component:ye.Actions},{name:"Pages",region:"Apps",component:ye.Pages,type:"app",openType:"panel",icon:Lh,label:"页面管理"},{name:"Blocks",region:"Apps",component:ye.Blocks,type:"app",openType:"panel",icon:qh,label:"区块管理"},{name:"Components",region:"Apps",component:ye.Components,type:"app",openType:"panel",icon:Wh,label:"组件库"},{name:"Outline",region:"Apps",component:ye.Outline,type:"app",openType:"panel",icon:zh,label:"大纲树"},{name:"History",region:"Apps",component:ye.History,type:"app",openType:"panel",icon:Hh,label:"历史记录"},{name:"Apis",region:"Apps",component:ye.Apis,type:"app",openType:"panel",icon:_h,label:"API管理"},{name:"Deps",region:"Apps",component:ye.Deps,type:"app",openType:"panel",icon:Ah,label:"依赖管理"},{name:"About",region:"Apps",component:ye.EmptyWidget,type:"app",openType:"dialog",icon:Mh,label:"关于"},{name:"Designer",region:"Workspace",component:ye.Designer,type:"tab",closable:!1,label:"设计视图"},{name:"Previewer",region:"Preview",component:ye.Previewer,type:"tab",closable:!1,label:"预览视图"},{name:"Schema",region:"Workspace",component:ye.Schema,type:"tab",closable:!0,label:"DSL视图"},{name:"Raw",region:"Workspace",component:ye.Raw,type:"tab",closable:!0,label:"源码视图"},{name:"Docs",region:"Workspace",component:ye.Docs,type:"tab",closable:!0,label:"帮助中心"},{name:"Scripts",region:"Settings",component:ye.Scripts,type:"tab",group:dt.Block,label:"设置"},{name:"Css",region:"Settings",component:ye.Css,type:"tab",group:dt.Block,label:"CSS"},{name:"DataSources",region:"Settings",component:ye.DataSources,type:"tab",group:dt.Block,label:"数据源"},{name:"Defined",region:"Settings",component:ye.Defined,type:"tab",group:dt.Block,label:"定义"},{name:"Properties",region:"Settings",component:ye.Properties,type:"tab",group:dt.Node,label:"属性"},{name:"Style",region:"Settings",component:ye.Style,type:"tab",group:dt.Node,label:"样式"},{name:"Events",region:"Settings",component:ye.Events,type:"tab",group:dt.Node,label:"事件"},{name:"Directives",region:"Settings",component:ye.Directives,type:"tab",group:dt.Node,label:"指令"},{name:"NodePath",region:"Status",component:ye.NodePath}],DE=[{package:"vue",version:"latest",library:"Vue",urls:["./@vtj/materials/deps/vue/vue.global.prod.js"],required:!0,official:!0,enabled:!0},{package:"vue-router",version:"latest",library:"VueRouter",urls:["./@vtj/materials/deps/vue-router/vue-router.global.prod.js"],required:!0,official:!0,enabled:!0},{package:"@vtj/utils",version:"latest",library:"VtjUtils",urls:["./@vtj/materials/deps/@vtj/utils/index.umd.js"],required:!0,official:!0,enabled:!0},{package:"@vtj/icons",version:"latest",library:"VtjIcons",urls:["./@vtj/materials/deps/@vtj/icons/style.css","./@vtj/materials/deps/@vtj/icons/index.umd.js"],required:!0,official:!0,enabled:!0},{package:"element-plus",version:"latest",library:"ElementPlus",urls:["./@vtj/materials/deps/element-plus/index.css","./@vtj/materials/deps/element-plus/index.full.min.js"],assetsUrl:"./@vtj/materials/assets/element/index.umd.js",assetsLibrary:"ElementPlusMaterial",required:!1,official:!0,enabled:!0},{package:"echarts",version:"latest",library:"echarts",urls:["./@vtj/materials/deps/echarts/echarts.min.js"],required:!1,official:!0,enabled:!0},{package:"@vtj/ui",version:"latest",library:"VtjUI",urls:["./@vtj/materials/deps/@vtj/ui/style.css","./@vtj/materials/deps/@vtj/ui/index.umd.js"],assetsUrl:"./@vtj/materials/assets/ui/index.umd.js",assetsLibrary:"VtjUIMaterial",required:!1,official:!0,enabled:!0},{package:"ant-design-vue",version:"latest",library:"antd",urls:["./@vtj/materials/deps/ant-design-vue/rest.css","./@vtj/materials/deps/ant-design-vue/dayjs/dayjs.min.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/customParseFormat.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/weekday.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/localeData.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/weekOfYear.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/weekYear.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/advancedFormat.js","./@vtj/materials/deps/ant-design-vue/dayjs/plugin/quarterOfYear.js","./@vtj/materials/deps/ant-design-vue/antd.min.js"],assetsUrl:"./@vtj/materials/assets/antdv/index.umd.js",assetsLibrary:"AntdvMaterial",required:!1,official:!0,enabled:!1}],OE=[{id:"elements",category:"特殊元素"},{id:"components",category:"内置组件"}],AE=[{name:"component",label:"动态组件",categoryId:"elements",doc:"https://cn.vuejs.org/api/built-in-special-elements.html#component",props:[{name:"is",label:"组件名",setters:"InputSetter"}],snippet:{children:"组件文本内容示例",props:{is:"div"}}},{name:"slot",label:"插槽",categoryId:"elements",doc:"https://cn.vuejs.org/api/built-in-special-elements.html#slot",props:[{name:"name",label:"名称",defaultValue:"default",setters:"InputSetter"}],snippet:{children:"默认插槽内容"}}],BE=[...AE,{name:"Transition",label:"过渡效果",categoryId:"components",doc:"https://cn.vuejs.org/api/built-in-components.html#transition",package:"vue",props:[{name:"name",label:"名称",defaultValue:"",title:"用于自动生成过渡 CSS class 名",setters:"InputSetter"},{name:"css",label:"应用CSS",defaultValue:!0,title:"是否应用 CSS 过渡 class",setters:"BooleanSetter"},{name:"type",label:"事件类型",defaultValue:void 0,title:"指定要等待的过渡事件类型来确定过渡结束的时间,默认情况下会自动检测持续时间较长的类型",setters:"SelectSetter",options:["transition","animation"]},{name:"duration",label:"持续时间",defaultValue:void 0,title:"显式指定过渡的持续时间",setters:["NumberSetter","JSONSetter"]},{name:"mode",label:"时序",defaultValue:"default",title:"控制离开/进入过渡的时序。",setters:"SelectSetter",options:["in-out","out-in","default"]},{name:"appear",label:"使用过渡",defaultValue:!1,title:"是否对初始渲染使用过渡",setters:"BooleanSetter"},{name:"enterFromClass",label:"enterFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"enterActiveClass",label:"enterActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"enterToClass",label:"enterToClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearFromClass",label:"appearFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearActiveClass",label:"appearActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearToClass",label:"appearToClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveFromClass",label:"leaveFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveActiveClass",label:"leaveActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveToClass",label:"leaveToClass",defaultValue:void 0,setters:"InputSetter"}],events:["before-enter","before-leave","enter","leave","appear","after-enter","after-leave","after-appear","enter-cancelled","leave-cancelled","ppear-cancelled"],snippet:{children:"Transition"}},{name:"TransitionGroup",label:"过渡效果组",categoryId:"components",doc:"https://cn.vuejs.org/api/built-in-components.html#transitiongroup",package:"vue",props:[{name:"name",label:"名称",defaultValue:"",title:"用于自动生成过渡 CSS class 名",setters:"InputSetter"},{name:"tag",label:"标签名",defaultValue:void 0,title:"如果未定义,则渲染为片段 (fragment)",setters:"InputSetter"},{name:"moveClass",label:"moveClass",defaultValue:void 0,title:"用于自定义过渡期间被应用的 CSS class。",setters:"InputSetter"},{name:"css",label:"应用CSS",defaultValue:!0,title:"是否应用 CSS 过渡 class",setters:"BooleanSetter"},{name:"type",label:"事件类型",defaultValue:void 0,title:"指定要等待的过渡事件类型来确定过渡结束的时间,默认情况下会自动检测持续时间较长的类型",setters:"SelectSetter",options:["transition","animation"]},{name:"duration",label:"持续时间",defaultValue:void 0,title:"显式指定过渡的持续时间",setters:["NumberSetter","JSONSetter"]},{name:"appear",label:"使用过渡",defaultValue:!1,title:"是否对初始渲染使用过渡",setters:"BooleanSetter"},{name:"enterFromClass",label:"enterFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"enterActiveClass",label:"enterActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"enterToClass",label:"enterToClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearFromClass",label:"appearFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearActiveClass",label:"appearActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"appearToClass",label:"appearToClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveFromClass",label:"leaveFromClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveActiveClass",label:"leaveActiveClass",defaultValue:void 0,setters:"InputSetter"},{name:"leaveToClass",label:"leaveToClass",defaultValue:void 0,setters:"InputSetter"}],events:["before-enter","before-leave","enter","leave","appear","after-enter","after-leave","after-appear","enter-cancelled","leave-cancelled","ppear-cancelled"],snippet:{children:"TransitionGroup"}},{name:"KeepAlive",label:"缓存切换组件",categoryId:"components",doc:"https://cn.vuejs.org/api/built-in-components.html#keepalive",package:"vue",props:[{name:"include",label:"匹配包含",title:"如果指定,则只有与 `include` 名称, 匹配的组件才会被缓存。",setters:["InputSetter","JSONSetter"]},{name:"exclude",label:"匹配排除",title:"任何名称与 `exclude` 匹配的组件都不会被缓存。",setters:["InputSetter","JSONSetter"]},{name:"max",label:"最大缓存数",title:"最多可以缓存多少组件实例。",setters:["InputSetter"]}]},{name:"Teleport",label:"传送组件",categoryId:"components",doc:"https://cn.vuejs.org/api/built-in-components.html#teleport",package:"vue",props:[{name:"to",label:"目标容器",title:"指定目标容器,可以是选择器或实际元素",setters:["InputSetter"]},{name:"disabled",label:"目标容器",title:"当值为 `true` 时,内容将保留在其原始位置, 而不是移动到目标容器中, 可以动态更改",setters:["BooleanSetter"]}]},{name:"Suspense",label:"异步依赖",categoryId:"components",doc:"https://cn.vuejs.org/api/built-in-components.html#suspense",package:"vue",props:[{name:"timeout",label:"timeout",setters:["InputSetter"]}]}],CE=[{name:"vue",version:"latest",label:"内置",library:"Vue",order:0,categories:OE,components:BE}],IE=J({name:"StringSetter",__name:"string",setup(n){return(e,t)=>(k(),F(m(mt),je({clearable:""},e.$attrs),null,16))}}),RE=J({name:"BooleanSetter",__name:"boolean",setup(n){return(e,t)=>(k(),F(m(ps),je(e.$attrs,{"model-value":!!e.$attrs.modelValue}),null,16,["model-value"]))}}),ME="{{",NE="}}",FE=J({name:"ExpressionSetter",__name:"expression",props:{modelValue:{},context:{}},emits:["change"],setup(n,{emit:e}){const t=(u="")=>({type:"JSExpression",value:Le(u)?u.value:u}),r=n,i=e,o=u=>Pe(u,r.context,!0),s=q(t(r.modelValue).value);_e(()=>r.modelValue,u=>{s.value=t(u).value},{immediate:!0});const a=u=>{const l={type:"JSExpression",value:u};o(l)&&i("change",l)};return(u,l)=>(k(),F(m(mt),{class:"v-expression-setter",modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),onChange:a},{prefix:A(()=>[pe(ie(ME))]),suffix:A(()=>[pe(ie(NE))]),_:1},8,["modelValue"]))}}),zE=J({name:"SelectSetter",__name:"select",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(k(),F(m(Wu),je({clearable:""},t.$attrs),{default:A(()=>[(k(!0),te(re,null,ae(e.options,i=>(k(),F(m(qu),je({key:i.label},i),null,16))),128))]),_:1},16))}}),PE=J({name:"NumberSetter",__name:"number",props:{modelValue:{}},emits:["change"],setup(n,{emit:e}){const t=n,r=e,i=L(()=>Le(t.modelValue)?void 0:Number(t.modelValue||0)),o=s=>{r("change",s)};return(s,a)=>(k(),F(m(Uu),je({class:"v-number-setter","controls-position":"right","model-value":i.value},s.$attrs,{onChange:o}),null,16,["model-value"]))}}),LE=J({name:"ColorSetter",__name:"color",setup(n){return(e,t)=>(k(),F(m(Pf),At(Qt(e.$attrs)),null,16))}}),HE=J({name:"JsonSetter",__name:"json",props:{modelValue:{default:void 0},type:{default:"JSON"}},emits:["change"],setup(n,{emit:e}){const t=n,r=q(),i=q(typeof t.modelValue=="object"?JSON.stringify(t.modelValue,null,2):void 0),o=L(()=>!!i.value),s=q(!1),a=e,u=d=>{let p=!0;try{const f=JSON.parse(d);if(t.type==="Array"&&!Array.isArray(f))throw new Error(`"${d}" is not a Array`);if(t.type==="Object"&&!Ws(f))throw new Error(`"${d}" is not a PlainObject`);if(typeof f!="object")throw new Error(`"${d}" is not a ${t.type}`)}catch(f){p=!1,yn.error({title:"代码错误",message:f?.message||f})}return p},l=()=>{const d=r.value?.getEditor();if(d){const p=d.getValue();u(p)&&(i.value=p,a("change",JSON.parse(p)),s.value=!1)}},c=()=>{i.value="",a("change",void 0),s.value=!1},h=()=>{s.value=!0};return(d,p)=>(k(),te("div",{class:ke(["v-json-setter",{"is-active":o.value}])},[T(m(mt),je({readonly:"",onFocus:h,"model-value":t.type,"suffix-icon":m(gs)},d.$attrs),null,16,["model-value","suffix-icon"]),s.value?(k(),F(m(er),{key:0,modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=f=>s.value=f),title:t.type,width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:l,onClear:c},{default:A(()=>[T(m(Ce),{ref_key:"codeEditor",ref:r,height:"100%",lang:"json",dark:"","model-value":i.value},null,8,["model-value"])]),_:1},8,["modelValue","title"])):Z("",!0)],2))}}),UE=J({name:"FunctionSetter",__name:"function",props:{modelValue:{default:()=>({type:"JSFunction",value:""})}},emits:["change"],setup(n,{emit:e}){const t=n,r=q(),i=q(t.modelValue.value),o=q(!1),s=L(()=>!!i.value),a=e,u=()=>{const h=r.value?.getEditor();if(h){const d=h.getValue(),p={type:"JSFunction",value:d};Pe(p,{})&&(i.value=d,a("change",p),o.value=!1)}},l=()=>{i.value="",a("change",void 0),o.value=!1},c=()=>{o.value=!0};return(h,d)=>(k(),te("div",{class:ke(["v-function-setter",{"is-active":s.value}])},[T(m(mt),je({readonly:"",onFocus:c,"model-value":"JSFunction","suffix-icon":m(gs)},h.$attrs),null,16,["suffix-icon"]),o.value?(k(),F(m(er),{key:0,modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=p=>o.value=p),title:"JSFunction",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:u,onClear:l},{default:A(()=>[T(m(Ce),{ref_key:"codeEditor",ref:r,height:"100%","model-value":i.value,dark:""},null,8,["model-value"])]),_:1},8,["modelValue"])):Z("",!0)],2))}}),Qe={StringSetter:IE,BooleanSetter:RE,ExpressionSetter:FE,SelectSetter:zE,NumberSetter:PE,ColorSetter:LE,IconSetter:af,JsonSetter:HE,FunctionSetter:UE},qE={name:"StringSetter",component:Qe.StringSetter,type:"String"},WE=[{name:"InputSetter",component:Qe.StringSetter,type:"String"},{name:"StringSetter",component:Qe.StringSetter,type:"String"},{name:"BooleanSetter",component:Qe.BooleanSetter,type:"Boolean"},{name:"ExpressionSetter",component:Qe.ExpressionSetter,type:"Object"},{name:"SelectSetter",component:Qe.SelectSetter,type:"String"},{name:"NumberSetter",component:Qe.NumberSetter,type:"Number"},{name:"ColorSetter",component:Qe.ColorSetter,type:"String"},{name:"IconSetter",component:Qe.IconSetter,type:"String"},{name:"ObjectSetter",component:Qe.JsonSetter,type:"Object",props:{type:"Object"}},{name:"ArraySetter",component:Qe.JsonSetter,type:"Array",props:{type:"Array"}},{name:"JsonSetter",component:Qe.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"JSONSetter",component:Qe.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"FunctionSetter",component:Qe.FunctionSetter,type:"Function"}];class JE{widgets={};constructor(){this.widgets=this.createWidgets()}createWidgets(){const e={};for(const t of VE)e[t.name]=t;return e}register(e){this.widgets[e.name]=e}get(e){return this.widgets[e]}set(e,t){const r=this.widgets[e];if(!r){it.warn(`widget '${e}' is not found`);return}Kt(r,t),t.component&&(r.component=t.component)}getWidgets(e,t){const r=Object.values(this.widgets);return e?r.filter(i=>i.region===e&&(!t||t&&t===i.group)):r}}const uf=new JE;class YE{constructor(e=DE){this.deps=e}get(){return this.deps}set(e){this.deps=e}add(e){const t=this.deps.find(r=>r.package===e.package);t?Object.assign(t,e):this.deps.push(e)}merge(e){const t=[];for(const r of this.deps){const i=e.find(o=>o.package===r.package);t.push({...r,...i})}for(const r of e)this.deps.find(i=>i.package===r.package)||t.push(r);return t}remove(e){const t=this.deps.findIndex(r=>r.package===e);t>-1&&this.deps.splice(t,1)}}const KE=new YE;class ZE{setters={};defaultSetter=qE;constructor(){this.setters=this.createSetters()}createSetters(){const e={};for(const t of WE)e[t.name]=t;return e}register(e){this.setters[e.name]=e}get(e){return this.setters[e]}set(e,t){const r=this.setters[e];if(!r){it.warn(`setter '${e}' is not found`);return}Kt(r,t),t.component&&(r.component=t.component)}getByType(e){return Object.values(this.setters).filter(t=>t.type===e).map(t=>t.name)}}const ci=new ZE;function GE(n){return new Promise((e,t)=>{const r=zu(Lj,{slots:n,onClose:()=>{r.unmount(),t(null)},onSubmit:i=>{r.unmount(),e(i)}});r.mount(document.createElement("div"))})}class XE{constructor(e,t,r){this.engine=e,this.contentWindow=t,this.dependencies=r,this.document=this.contentWindow.document,this.bindEvents(t,this.document)}proxied={};document=null;hover=Zr(null);dropping=Zr(null);selected=Zr(null);dragging=null;bind(e,t){let r=this.proxied[t];return r||(r=e.bind(this),this.proxied[t]=r),r}bindEvents(e,t){t.addEventListener("mouseover",this.bind(this.onMouseOver,"onMouseOver")),t.addEventListener("scroll",this.bind(this.onViewChange,"onViewChange")),e.addEventListener("resize",this.bind(this.onViewChange,"onViewChange")),t.addEventListener("mouseleave",this.bind(this.onLeave,"onLeave")),t.addEventListener("dragleave",this.bind(this.onLeave,"onLeave")),t.addEventListener("dragover",this.bind(this.onDragOver,"onDragOver")),t.addEventListener("drop",this.bind(this.onDrop,"onDrop")),t.addEventListener("click",this.bind(this.onSelected,"onSelected")),Q.on(br,this.bind(this.onActiveChange,"onActiveChange")),Q.on(Ee,this.bind(this.onViewChange,"onViewChange"))}unbindEvents(e,t){t.removeEventListener("mouseover",this.bind(this.onMouseOver,"onMouseOver")),t.removeEventListener("scroll",this.bind(this.onViewChange,"onViewChange")),e.removeEventListener("resize",this.bind(this.onViewChange,"onViewChange")),t.removeEventListener("mouseleave",this.bind(this.onLeave,"onLeave")),t.removeEventListener("dragleave",this.bind(this.onLeave,"onLeave")),t.removeEventListener("dragover",this.bind(this.onDragOver,"onDragOver")),t.removeEventListener("drop",this.bind(this.onDrop,"onDrop")),t.removeEventListener("click",this.bind(this.onSelected,"onSelected")),Q.off(br,this.bind(this.onActiveChange,"onActiveChange")),Q.off(Ee,this.bind(this.onViewChange,"onViewChange"))}onMouseOver(e){const t=this.getHelper(e);t?.model.id!==this.selected.value?.model.id&&(this.hover.value=t)}onViewChange(){this.updateRect()}onLeave(e){this.hover.value=null,this.dropping.value=null}onActiveChange(){this.hover.value=null,this.dropping.value=null,this.selected.value=null}async getDropSlot(e){if(!e)return;const{engine:t}=this,r=t.assets,i=r.componentMap,o=await r.getBlockMaterial(e.from)||i.get(e.name);if(!o?.slots)return;const s=(o?.slots||["default"]).map(u=>typeof u=="string"?{name:u,params:[]}:{name:u.name,params:u.params||[]});if(s.length===0)return;if(s.length===1)return s[0];const a=await GE(s).catch(()=>null);if(!(a&&a.name==="default"&&(!a.params||a.params?.length===0)))return a}async onDrop(e){e.preventDefault();const{engine:t,dragging:r,dropping:i}=this,o=t.current.value,s=this.getHelper(e);if(!o||!r||!i.value||!s)return;const a=s.model,u=i.value.type;if(!await this.allowDrop(a,u))return;const l=this.createNodeDsl(r),c=new mi(l);if(Ae(a))o.addNode(c,void 0,u);else{const h=await this.getDropSlot(u==="inner"?a:a.parent);if(h===null){this.dropping.value=null;return}c.slot=h,o.addNode(c,a,u)}this.dropping.value=null}onSelected(e){this.setHover(null),this.selected.value=this.getHelper(e)}async onDragOver(e){const t=this.getHelper(e);if(!t)return;const{model:r,type:i}=t;r&&await this.allowDrop(r,i)?(e.preventDefault(),this.dropping.value=t):this.dropping.value=null}isVtjElement(e){return!!e.__vtj__&&!!e.__context__}findVtjElement(e){return e.find(t=>this.isVtjElement(t))}getNodeByElement(e){const t=e.__vtj__??"";return mi.nodes[t]||null}getDropType(e,t,r){const{left:i,top:o,width:s,height:a}=e;return t>=i&&t<=i+s*.2?"left":t>=i+s*.8&&t<=i+s?"right":r>=o&&r<=o+a*.2?"top":r>=o+a*.8&&r<=o+a?"bottom":"inner"}getNodePath(e=[]){const t=e.filter(i=>this.isVtjElement(i)),r=this.engine.current.value;return[...t.map(i=>this.getNodeByElement(i)).filter(i=>!!i),r]}setDslFrom(e){const t=this.engine.assets.componentMap.get(e.name);if(e.from=e.from||t?.package,Array.isArray(e.children))for(const r of e.children)this.setDslFrom(r)}createNodeDsl(e){const{name:t,snippet:r={},from:i}=e,o={...r,name:t,from:i||e.package};return this.setDslFrom(o),o}getElmenetByModel(e){return!this.document||!e?null:Ae(e)?this.document.body:Array.from(this.document.querySelectorAll("*")).find(t=>t.__vtj__===e.id)}findPathByNode(e){const t=[e];let r=e;for(;r.parent&&r.parent!==r;)r=r.parent,r!==e&&t.unshift(r);const i=this.engine.current.value;return t.unshift(i),t.reverse()}getHelper(e){const t=e.composedPath()||[],r=this.findVtjElement(t)||this.document?.body;if(!r)return null;const i=this.getNodeByElement(r)||this.engine.current.value;if(!i)return null;const o=r.getBoundingClientRect(),s=this.getDropType(o,e.clientX,e.clientY),a=this.getNodePath(t);return{el:r,model:i,rect:o,type:s,path:a}}cleanHelper(){this.setSelected(null),this.setHover(null),this.setDragging(null),this.setDropping(null)}async updateRect(){await dp(0);const e=m(this.selected),t=m(this.hover);if(e){const r=e.el.getBoundingClientRect();this.selected.value={...e,rect:r}}if(t){const r=t.el.getBoundingClientRect();this.hover.value={...t,rect:r}}}setDragging(e){this.dragging=e}async setHover(e){if(await Jt(),e){const t=this.getElmenetByModel(e);if(!t)return;const r=t.getBoundingClientRect(),i=Ae(e)?[]:this.findPathByNode(e);this.hover.value={el:t,model:e,rect:r,type:"inner",path:i}}else this.hover.value=null}async setSelected(e){if(await Jt(),e){const t=this.getElmenetByModel(e)||this.document?.createElement("span");if(!t)return;const r=t.getBoundingClientRect(),i=Ae(e)?[]:this.findPathByNode(e);this.selected.value={el:t,model:e,rect:r,type:"inner",path:i}}else this.selected.value=null}async setDropping(e,t="inner"){if(await Jt(),e){const r=this.getElmenetByModel(e);if(!r)return;const i=r.getBoundingClientRect(),o=Ae(e)?[]:this.findPathByNode(e);this.dropping.value={el:r,model:e,rect:i,type:t,path:o}}else this.dropping.value=null}async allowDrop(e,t="inner"){const{dragging:r,engine:i}=this,o=i.current.value;if(!r||!o)return!1;if(Ae(e))return!0;const s=i.assets.componentMap,a=t!=="inner"&&e.parent||e,u=await i.assets.getBlockMaterial(a.from)||s.get(a.name);if(!u)return!1;const{parentIncludes:l=!0,name:c}=r,{childIncludes:h=!0}=u,d=l===!0||Array.isArray(l)&&l.includes(a.name),p=h===!0||Array.isArray(h)&&h.includes(c);return d&&p}dispose(){const{contentWindow:e,document:t}=this;this.setSelected(null),this.setHover(null),this.setDragging(null),e&&t&&this.unbindEvents(e,t),this.document=null}}class QE{constructor(e,t,r=null){this.env=e,this.service=t,this.designer=r,this.nodeChange=this.__onNodeChange.bind(this),this.blockChange=this.__onBlockChange.bind(this)}app=null;dsl=null;nodeChange;blockChange;context=null;install(e){const{library:t,globals:r}=this.env,i=Object.values(t);Object.assign(e.config.globalProperties,r),e.config.errorHandler=(o,s,a)=>{const u=s?.$options.name,l=o?.message||o?.msg||"未知错误",c=`[ ${u} ] ${l}`;console.error({err:o,instance:s,info:a}),yn.error({title:"运行错误",message:c})},i.forEach(o=>{(typeof o=="function"||typeof o.install=="function")&&e?.use(o)})}render(e){const{window:t,container:r,Vue:i,components:o,library:s,apis:a}=this.env,u=t.document.createElement("div");u.id="app",r.appendChild(u),this.dsl=i.reactive(e.toDsl());const l=sa({getDsl:async d=>await this.service.getFile(d)||null,options:{mode:nt.Design,Vue:i,components:o,libs:s,apis:a,window:t}}),{renderer:c,context:h}=oa({Vue:i,mode:nt.Design,dsl:this.dsl,components:o,libs:s,apis:a,loader:l,window:t});this.app=i.createApp(c),this.install(this.app);try{this.app.mount(u)}catch(d){Me(d.message||"未知错误","运行时错误"),console.error(d)}this.context=h,Q.on(Ee,this.nodeChange),Q.on(ve,this.blockChange)}dispose(){if(this.app){this.app.unmount();const e=this.app._container;e&&e.parentNode&&(e.parentNode.removeChild(e),this.app._container=null),this.app=null}this.dsl=null,this.context=null,Q.off(Ee,this.nodeChange),Q.off(ve,this.blockChange)}updateChild(e,t){const r=t.children||t.nodes||[];if(Array.isArray(r))for(let i=0;i<r.length;i++){const o=r[i];if(o.id===e.id){r.splice(i,1,e);return}else this.updateChild(e,o)}}__onNodeChange(e){this.dsl&&this.updateChild(e.toDsl(),this.dsl)}__onBlockChange(e){this.dispose(),this.render(e),this.designer?.selected.value&&this.designer.setSelected(e)}}class e9 extends Ds{contentWindow=null;renderer=null;designer=Zr(null);engine;constructor(e){super();const{engine:t}=e;this.engine=t,_e(this.engine.current,()=>{this.refresh()})}init(e,t){ls(()=>{e.value&&t.value.length&&(this.resetReady(),this.setup(e.value,t.value),this.contentWindow&&(this.designer.value?.dispose(),this.designer.value=new XE(this.engine,this.contentWindow,t)))})}setup(e,t){const r=e.contentWindow;if(!r){it.warn("Simulator contentWindow is null");return}r.__simulator__=this;const i=r.document;this.contentWindow=r;const{scripts:o,css:s,materials:a,libraryExports:u,materialExports:l,materialMapLibrary:c}=Kp(t);i.open(),i.write(`
120
- <!DOCTYPE html>
121
- <html lang="zh-CN">
122
- <head>
123
- <meta charset="utf-8">
124
- <meta name="viewport"
125
- content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover"/>
126
- <style>
127
- html, body, #app {
128
- padding: 0;
129
- margin: 0;
130
- min-height: 100vh;
131
- width: 100%;
132
- height: 100%;
133
- background: #fff;
134
- }
135
- </style>
136
- ${u$(s)}
137
- ${Bu(o)}
138
- ${Bu(a)}
139
- </head>
140
- <body>
141
- </body>
142
- <script>
143
- __simulator__.emitReady(${JSON.stringify(u)},
144
- ${JSON.stringify(l)},
145
- ${JSON.stringify(c)});
146
- <\/script>
147
- </html>
148
- `),i.close()}async emitReady(e=[],t=[],r={}){this.renderer?.dispose(),this.renderer=null;const i=this.contentWindow,{assets:o,service:s,current:a,provider:u}=this.engine,l=u.materials||{},c=[];for(const d of t){const p=l[d]?(await l[d]()).default:i[d];c.push(p)}o.load(c);const h=this.createEnv(e,r,c);this.renderer=new QE(h,s,this.designer.value),a.value&&this.renderer.render(a.value),this.triggerReady()}createEnv(e=[],t={},r=[]){const i=this.contentWindow,{engine:o}=this,{project:s,assets:a,provider:u}=o,l=e.reduce((y,$)=>(y[$]=i[$],y),{}),c={},{groups:h,componentMap:d}=a;for(const y of h.value){const $=y.names||[],g=l[t[y.library||""]];g&&$.forEach(w=>{const _=d.get(w);_?c[w]=Zp(_,g):c[w]=g[w]})}const{adapter:p,globals:f}=u,v=Qp(s.value?.apis,p);return{window:i,Vue:i.Vue,library:l,materials:r,components:c,container:i.document.body,apis:v,globals:f}}refresh(){this.renderer?.dispose();const e=this.engine.current.value;e&&this.renderer?.render(e)}dispose(){this.renderer?.dispose(),this.designer.value?.dispose(),this.contentWindow=null,this.renderer=null,this.designer.value=null}}class t9{constructor(e){this.service=e}components=[];componentMap=new Map;groups=q([]);getCateoryComponents(e,t){const r=t.filter(i=>i.categoryId===e.id&&i.hidden!==!0);return{name:e.id,label:e.category,count:r.length,components:r}}parseGroups(e){const t=[];for(let r of e){const{categories:i,components:o,label:s,name:a,library:u}=r;if(!i||!o)continue;const l=o.map(p=>p.name),c=i.map(p=>this.getCateoryComponents(p,o)),h=c.reduce((p,f)=>f.count+p,0),d={name:r.name,label:s||a,count:h,names:l,library:u,children:c};t.push(d)}return t}load(e){const t=[...CE,...e].filter(r=>!!r);t.sort((r,i)=>r.order-i.order);for(let r of t)r.components&&(this.components=this.components.concat(r.components));this.groups.value=this.parseGroups(t),this.componentMap=Ux(this.components,"name")}async getBlockMaterial(e){if(!e||typeof e=="string")return null;const t=e.type==="Schema"?e.id:null;if(!t)return null;const r=await this.service.getFile(t);if(!r)return null;const{id:i,name:o,slots:s,props:a,emits:u}=r,l=c=>{const h=Array.isArray(c)?c:[c];let d=[];for(const p of h)d=d.concat(ci.getByType(p));return d};return{id:i,name:o,childIncludes:s?.length?void 0:!1,props:(a||[]).map(c=>typeof c=="string"?{name:c}:{name:c.name,type:c.type,setters:l(c.type)}),events:u,slots:s,from:e}}}const cf=Symbol("VtjEngine");class W9 extends Ds{app;skeleton;container;service;assets;simulator;emitter=Q;project=q(null);current=q(null);context=q(null);isEmptyCurrent=q(!1);history=q(null);provider;constructor(e){super();const{container:t,service:r,project:i={},globals:o={},dependencies:s,materials:a}=e;this.container=t,this.service=r,this.provider=new nf({mode:nt.Design,globals:o,project:i,service:r,dependencies:s,materials:a}),this.assets=new t9(this.service),this.simulator=new e9({engine:this}),this.bindEvents(),this.init(i),us(this.render.bind(this)),cs(this.dispose.bind(this))}async init(e){const t=await this.service.init(e).catch(r=>(it.warn("VTJEngine service init fail.",r),null));t&&(t.dependencies=KE.merge(t.dependencies||[]),this.project.value=new T2(t),this.saveMaterials(),this.triggerReady())}render(){const e=m(this.container);if(e){const t=zu(n9);t.provide(cf,mf(this)),t.mount(e),this.app=t}else it.warn("VTJEngine constructor param [ container ] is undefined")}bindEvents(){Q.on(Xe,e=>this.saveProject(e)),Q.on(ti,e=>this.saveBlockFile(e)),Q.on(lr,e=>this.saveBlockFile(e)),Q.on(Co,()=>this.saveMaterials()),Q.on(br,e=>this.activeFile(e)),Q.on(dh,()=>this.publish()),Q.on(ph,()=>this.publishCurrent()),Q.on(ve,e=>this.changeFile(e)),Q.on(Ee,()=>this.changeCurrentFile()),Q.on(ur,e=>this.saveHistory(e)),Q.on(ni,e=>this.loadHistory(e))}async activeFile(e){await Jt();const t=e.model.currentFile;if(t){const r=await this.service.getFile(t.id);r&&(t.dsl=r)}if(t?.dsl){const r=new Rn(t.dsl);this.updateCurrent(r),this.initHistory(r)}else this.updateCurrent(null);Nt(this.project)}async changeFile(e){await Jt();const t=e.toDsl();this.service.saveFile(t),this.updateCurrent(e),this.history.value?.add(t),Nt(this.history)}changeCurrentFile(){this.saveCurrentFile(),this.current.value&&(this.history.value?.add(this.current.value.toDsl()),Nt(this.history))}async updateCurrent(e,t=!0){this.current.value=e,await Jt(),this.context.value=this.simulator.renderer?.context||null,this.isEmptyCurrent.value=this.current.value?.nodes.length===0,t&&Nt(this.context)}async saveProject(e){const t=e.model.toDsl();await this.service.saveProject(t),Nt(this.project)}async saveBlockFile(e){const t=e.type,r=e.model;if(t==="create"){const i=e.data;i.dsl&&await this.service.saveFile(i.dsl)}if(t==="update"){const i=e.data;if(r.isPageFile(i)&&i.dir)return;const o=await this.service.getFile(i.id);o&&(o.name=i.name,await this.service.saveFile(o))}if(t==="delete"){const i=e.data;await this.service.removeFile(i),await this.service.removeHistory(i)}if(t==="clone"){const{page:i,newPage:o}=e.data,s=await this.service.getFile(i.id);s&&(s.id=o.id,s.name=o.name,await this.service.saveFile(s))}Nt(this.project)}async saveMaterials(){await Jt(),this.simulator.ready(()=>{const e=this.project.value;if(e){const t=this.assets.componentMap;this.service.saveMaterials(e.toDsl(),t)}})}saveCurrentFile(){const e=this.current.value;e&&(this.updateCurrent(e),this.service.saveFile(e.toDsl()))}async initHistory(e){if(e){const t=await this.service.getHistory(e.id).catch(()=>null);this.history.value=new V2(Object.assign(t||{},{id:e.id}))}else this.history.value=null}async saveHistory(e){const t=e.type,r=e.model;t==="create"&&await this.service.saveHistoryItem(r.id,e.data),t==="delete"&&await this.service.removeHistoryItem(r.id,e.data),t==="clear"&&await this.service.removeHistoryItem(r.id,e.data);const i=r.toDsl();await this.service.saveHistory(i),Nt(this.history)}async loadHistory(e){const t=e.model,r=e.data,i=await this.service.getHistoryItem(t.id,r.id);if(i&&i.dsl){const o=new Rn(i.dsl);await this.updateCurrent(o),Nt(this.history)}}async publish(){const e=this.project.value;if(e){const t={...e.toDsl(),pages:e.getPages()};await this.service.publish(t)&&ot("整站发布成功","success")}}async publishCurrent(){const e=this.project.value,t=e?.currentFile;if(e&&t){const r={...e.toDsl(),pages:e.getPages()};await this.service.publishFile(r,t)&&ot("发布成功","success")}}dispose(){this.emitter.all.clear(),this.simulator.dispose(),this.app&&(this.app.unmount(),this.container=void 0)}async openFile(e){const t=this.project.value,r=this.skeleton?.getRegion("Apps"),i=e||t?.homepage;if(!t||!r||!i)return;const o=t.getPage(i);o&&(r.regionRef?.setActive("Pages"),this.simulator.ready(()=>{t.active(o)}));const s=t.getBlock(i);s&&(r.regionRef?.setActive("Blocks"),this.simulator?.ready(()=>{t.active(s)}))}}function Ge(){const n=hr(cf,null);return n||it.error("VTJEngine is not exist"),n}const zt=J({name:"RegionWrapper",props:{region:{type:String,required:!0}},setup(){return{regionRef:q()}},render(){const n=Nu[this.region]||Nu.EmptyRegion;return Ye(n,{...this.$props,...this.$attrs,ref:"regionRef"})}}),ln=J({name:"WidgetWrapper",props:{region:{type:String,required:!0},widget:{type:Object,required:!0}},setup(){return{widgetRef:q()}},render(){return Ye(this.widget.component,{...this.widget.props,...this.$props,...this.$attrs,ref:"widgetRef"})}}),n9=J({name:"SkeletonWrapper",setup(){const n=q(),e=Ge(),t=q({});return{skeletonRef:n,engine:e,widgets:t}},mounted(){this.engine.skeleton=this},render(){return Ye(r9,{...this.$props,...this.$attrs,ref:"skeletonRef"})},methods:{getRegion(n){return this.skeletonRef[n.toLowerCase()]},toggleCollapse(n){if(this.skeletonRef){const e=this.skeletonRef.collapsed;this.skeletonRef.collapsed=n??!e}},settable(n){this.skeletonRef&&(this.skeletonRef.settable=n)},getWidgets(n){const e=this.getRegion(n);return e?pp(e.regionRef?.widgetsRef||[]):[]},getWidget(n){const e=uf.get(n);if(!e){it.warn(`widget [ ${n} ] is not exsit`);return}return this.getWidgets(e.region).find(t=>t.widget.name===n)},openPreview(n){this.skeletonRef&&(this.skeletonRef.isPreview=!0)},closePreview(){this.skeletonRef&&(this.skeletonRef.isPreview=!1)}}}),Pt=J({name:"SetterWrapper",props:{context:{type:Object},current:{type:Object},name:String,label:String,title:String,value:{type:[String,Object,Array,Number,Boolean],default:void 0},setters:{type:[String,Object,Array],required:!0,default(){return[]}},options:{type:Array,default(){return[]}},variable:{type:Boolean,default:!0},removable:{type:Boolean,default:!1}},computed:{computedSetters(){return(Array.isArray(this.setters)?this.setters:[this.setters]).map(n=>{let e;if(typeof n=="string")return e=this.getSetter(n),{component:Xt(e.component),name:e.name,label:n,props:e.props||{}};{const t=n;return e=this.getSetter(t.name),{component:Xt(t.component||e.component),name:t.name,label:t.label||t.name,props:Object.assign(e.props||{},t.props)}}})},computedOptions(){return(this.options||[]).map(n=>typeof n=="string"?{label:n,value:n}:n)},defaultSetter(){const{value:n,computedSetters:e}=this;let t=typeof n;t==="Object"&&(Array.isArray(n)?t="Array":Le(n)?t="Object":Or(n)&&(t="Function"));const r=ci.getByType(t)||[];return r.length?(e.find(i=>r.includes(i.name))||e[0])?.name:e[0]?.name}},render(){const{context:n,current:e,name:t,label:r,title:i,value:o,computedSetters:s,computedOptions:a,variable:u,changeValue:l,defaultSetter:c,removable:h,onRemove:d}=this;return Ye(c9,{context:n,current:e,name:t,label:r,title:i,setters:s,defaultSetter:c,variable:u,value:o,removable:h,options:a,onChange:l,onRemove:d})},emits:["change","remove"],methods:{getSetter(n){return typeof n=="string"?ci.get(n)||ci.defaultSetter:n},changeValue(n){this.$emit("change",this.name,n)},onRemove(n){this.$emit("remove",n)}}}),r9=J({name:"Skeletion",__name:"skeleton",props:{headerHeight:{default:"36px"},leftWidth:{default:"400px"},rightWidth:{default:"350px"},footerHeight:{default:"20px"}},setup(n,{expose:e}){const t=n,r=q(!1),i=q(parseInt(t.leftWidth)),o=q(parseInt(t.rightWidth)),s={dirs:["e"],maxWidth:600,minWidth:49,onResizing(g,w){i.value=w.elementWidth.value},onEnd(g,w){i.value=w.elementWidth.value}},a={dirs:["w"],maxWidth:600,minWidth:2,onResizing(g,w){o.value=w.elementWidth.value},onEnd(g,w){o.value=w.elementWidth.value}},u=q(),l=q(),c=q(),h=q(),d=q(),p=q(),f=q(),v=q(),y=q(!1),$=q(!1);return e({brand:u,toolbar:l,actions:c,apps:h,workspace:d,settings:p,status:f,collapsed:y,settable:$,leftWidth:i,rightWidth:o,preview:v,isPreview:r}),(g,w)=>(k(),F(m(Nf),{locale:m(Mf)},{default:A(()=>[T(m(ca),{class:"v-skeleton"},{default:A(()=>[T(m(Cf),{class:"v-skeleton__header",height:g.headerHeight},{default:A(()=>[T(m(zt),{ref_key:"brand",ref:u,region:"Brand"},null,512),T(m(zt),{ref_key:"toolbar",ref:l,region:"Toolbar",preview:r.value},null,8,["preview"]),T(m(zt),{ref_key:"actions",ref:c,region:"Actions"},null,512)]),_:1},8,["height"]),T(m(ca),{class:"v-skeleton__wrapper"},{default:A(()=>[r.value?Z("",!0):Bn((k(),F(m(ha),{key:0,width:t.leftWidth,class:ke(["v-skeleton__left",{"is-collapsed":y.value}])},{default:A(()=>[T(m(zt),{ref_key:"apps",ref:h,region:"Apps"},null,512)]),_:1},8,["width","class"])),[[m(rs),s]]),T(m(If),{class:"v-skeleton__main"},{default:A(()=>[r.value?(k(),F(m(zt),{key:0,ref_key:"preview",ref:v,region:"Preview",preview:r.value},null,8,["preview"])):Z("",!0),Bn(T(m(zt),{ref_key:"workspace",ref:d,region:"Workspace"},null,512),[[di,!r.value]])]),_:1}),r.value?Z("",!0):Bn((k(),F(m(ha),{key:1,width:t.rightWidth,class:"v-skeleton__right"},{default:A(()=>[T(m(zt),{ref_key:"settings",ref:p,region:"Settings"},null,512)]),_:1},8,["width"])),[[di,$.value],[m(rs),a]])]),_:1}),r.value?Z("",!0):(k(),F(m(Rf),{key:0,class:"v-skeleton__footer",height:g.footerHeight},{default:A(()=>[T(m(zt),{ref_key:"status",ref:f,region:"Status"},null,512)]),_:1},8,["height"]))]),_:1})]),_:1},8,["locale"]))}}),i9={key:1},o9={class:"v-setter__content"},s9={key:0,class:"v-setter__input"},a9={class:"v-setter__action"},l9="{{",u9="}}",c9=J({__name:"setter",props:{context:{},current:{},name:{},label:{default:""},title:{},setters:{},variable:{type:Boolean,default:!0},value:{},options:{default:()=>[]},defaultSetter:{},removable:{type:Boolean}},emits:["change","remove"],setup(n,{emit:e}){const t=n,r=e,i=q(!1),o=q(""),s=q(t.setters.find($=>$.name===t.defaultSetter)||t.setters[0]),a=q(t.value),u=L(()=>!!Le(a.value)),l={[s.value.name]:a.value},c=$=>{l[s.value.name]=a.value,s.value=$,a.value=l[$.name]??void 0,h(a.value)};_e(()=>t.value,()=>{a.value=t.value}),_e(()=>t.defaultSetter,()=>{s.value=t.setters.find($=>$.name===t.defaultSetter)||t.setters[0]});const h=$=>{r("change",$)},d=()=>{r("remove",t.name)},p=()=>{i.value=!0,o.value=Le(a.value)?a.value.value:""},f=()=>{i.value=!1,o.value=""},v=async $=>Pe($,t.context,!0)?(l[s.value.name]=a.value,a.value=$,r("change",$),!0):!1,y=async()=>{await tr("确定要解除绑定吗?")&&(f(),a.value=void 0,r("change",""))};return($,g)=>(k(),F(m(Lu),{class:"v-setter",size:"small","label-positon":"left"},{label:A(()=>[t.title?(k(),F(m(_i),{key:0,placement:"top-start",content:t.title},{default:A(()=>[pe(ie(t.label||t.name),1)]),_:1},8,["content"])):(k(),te("span",i9,ie(t.label||t.name),1))]),default:A(()=>[fe("div",o9,[s.value?(k(),te("div",s9,[u.value?Z("",!0):(k(),F(rt(s.value.component),je({key:0,current:t.current,context:t.context},s.value.props,{options:t.options,modelValue:a.value,"onUpdate:modelValue":g[0]||(g[0]=w=>a.value=w),onChange:h,disabled:u.value}),null,16,["current","context","options","modelValue","disabled"])),u.value?(k(),F(m(mt),{key:1,class:"v-expression-setter",disabled:"","model-value":"JSExpression"},{prefix:A(()=>[pe(ie(l9))]),suffix:A(()=>[pe(ie(u9))]),_:1})):Z("",!0)])):Z("",!0),fe("div",a9,[t.variable?(k(),F(m(Fh),{key:0,onClick:p,class:ke(["v-icon-vars",{"is-active":u.value}]),title:"绑定变量"},null,8,["class"])):Z("",!0),t.setters.length>1?(k(),F(m(ds),{key:1,disabled:u.value,size:"small","popper-class":"v-setter-switch",onCommand:c},{dropdown:A(()=>[T(m(hs),null,{default:A(()=>[(k(!0),te(re,null,ae(t.setters,w=>(k(),F(m(pi),{command:w,key:w.name},{default:A(()=>[T(m(Os),{class:ke({"is-placeholder":w.name!==s.value.name})},null,8,["class"]),pe(" "+ie(w.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:A(()=>[T(m(xh),{title:"切换设置器"})]),_:1},8,["disabled"])):Z("",!0),t.removable?(k(),F(m(Tr),{key:2,onClick:d,title:"删除"})):Z("",!0)])]),i.value?(k(),F(m(uE),{key:0,current:t.current,context:t.context,value:o.value,modelValue:i.value,"onUpdate:modelValue":g[1]||(g[1]=w=>i.value=w),submitMethod:v,onUnbind:y},null,8,["current","context","value","modelValue"])):Z("",!0)]),_:1}))}}),h9={class:"v-empty-region"},d9=J({name:"EmptyRegion",__name:"empty",props:{region:{}},setup(n){return(e,t)=>(k(),te("div",h9,"找不到符合【"+ie(e.region)+"】名称的区域组件",1))}}),p9={class:"v-brand-region"},f9=J({name:"BrandRegion",inheritAttrs:!1,__name:"brand",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(k(),te("div",p9,[(k(!0),te(re,null,ae(m(r),a=>(k(),F(m(ln),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),m9={class:"v-toolbar-region"},v9=J({name:"ToolbarRegion",__name:"toolbar",props:{region:{},preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(k(),te("div",m9,[(k(!0),te(re,null,ae(m(r),a=>(k(),F(m(ln),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a,preview:o.preview},null,8,["region","widget","preview"]))),256))]))}}),g9={class:"v-actions-region"},y9=J({name:"ActionsRegion",inheritAttrs:!1,__name:"actions",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(k(),te("div",g9,[(k(!0),te(re,null,ae(m(r),a=>(k(),F(m(ln),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),b9={class:"v-apps-region"},w9={class:"v-apps-region__header"},_9={class:"v-apps-region__top"},x9={class:"v-apps-region__bottom"},S9={class:"v-apps-region__panels"},$9=J({name:"AppsRegion",inheritAttrs:!1,__name:"apps",props:{region:{},index:{default:0}},setup(n,{expose:e}){const t=n,r=Ge(),{widgets:i,widgetsRef:o}=an(t.region),s=L(()=>i.value.filter(p=>p.openType==="panel")),a=L(()=>i.value.filter(p=>p.openType!=="panel")),u=s.value[t.index],l=q(u),c=q(u),h=p=>{l.value=p,c.value=c.value?.name===p.name?null:p},d=p=>{p.openType==="link"&&p.url&&window.open(p.url),p.openType};return _e(c,p=>{r.skeleton?.toggleCollapse(!p)}),e({widgets:i,widgetsRef:o,setActive:p=>{const f=s.value.find(v=>v.name===p);l.value=f,c.value=f}}),(p,f)=>(k(),te("div",b9,[fe("div",w9,[fe("div",_9,[(k(!0),te(re,null,ae(s.value,v=>(k(),F(m(Mu),{key:`icon-${v.name}`,icon:v.icon,label:v.label,active:l.value?.name===v.name,open:c.value?.name===v.name,onClick:y=>h(v)},null,8,["icon","label","active","open","onClick"]))),128))]),fe("div",x9,[(k(!0),te(re,null,ae(a.value,v=>(k(),F(m(Mu),{key:`icon-${v.name}`,icon:v.icon,label:v.label,onClick:y=>d(v)},null,8,["icon","label","onClick"]))),128))])]),fe("div",S9,[(k(!0),te(re,null,ae(s.value,v=>(k(),F(Pu,{key:v.name},[l.value?.name===v.name?(k(),F(m(ln),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:o,region:p.region,widget:v},null,8,["region","widget"])):Z("",!0)],1024))),128))])]))}}),j9=J({name:"WorkspaceRegion",__name:"workspace",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region),o=gn(r.value.map(d=>({name:d.name,command:d.name,label:d.label,closable:!!d.closable,props:d.props||{},checked:!1}))),s=L(()=>o.filter(d=>!d.closable||d.checked)),a=L(()=>o.filter(d=>d.closable)),u=q(s.value[0]?.name),l=L(()=>o.find(d=>d.name===u.value)?.props||{}),c=d=>{const p=o.find(f=>f.name===d);p&&(p.checked=!1),u.value===d&&(u.value=s.value[0]?.name)},h=d=>{const p=o.find(f=>f.name===d.name);p&&(p.checked=!p.checked,p.checked&&(u.value=p.name),!p.checked&&u.value===p.name&&(u.value=s.value[0]?.name))};return e({currentTab:u,widgets:r,widgetsRef:i,openTab:(d,p={})=>{const f=o.find(v=>v.name===d);f&&(f.props=Object.assign({},f.props,p),f.checked=!0,u.value=f.name)}}),(d,p)=>(k(),F(m(Hi),{class:"v-workspace-region",items:s.value,menus:a.value,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),checkable:"",onRemove:c,onCommand:h},{default:A(()=>[(k(!0),te(re,null,ae(m(r),f=>(k(),te(re,{key:f.name},[u.value===f.name?(k(),F(m(ln),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:d.region,widget:{...f,props:l.value}},null,8,["region","widget"])):Z("",!0)],64))),128))]),_:1},8,["items","menus","modelValue"]))}}),E9=J({name:"SettingsRegion",__name:"settings",props:{region:{}},setup(n,{expose:e}){const t=n,r=Ge(),{current:i}=He(),{selected:o,isSelectBlock:s}=Mt(),a=L(()=>s.value?dt.Block:dt.Node),{widgets:u,widgetsRef:l}=an(t.region,a),c=L(()=>u.value.map(f=>({name:f.name,label:f.label}))),h=q(""),d=L(()=>{const f=o.value?.model;return f?r.assets.componentMap.get(f.name)?.doc:null});_e(i,f=>{r.skeleton?.settable(!!f)}),_e(a,()=>{h.value=c.value[0]?.name},{immediate:!0});const p=()=>{if(d.value){const f=r.skeleton?.getRegion("Workspace");f&&f.regionRef.openTab("Docs",{url:d.value})}};return e({widgets:u,widgetsRef:l}),(f,v)=>m(i)?(k(),F(m(he),{key:0,class:"v-settings-region",fit:"",direction:"column"},{default:A(()=>[m(o)?(k(),F(m(he),{key:0,flex:"",justify:"space-between",align:"center",class:"v-settings-region__header"},{default:A(()=>[T(m(he),{class:"v-settings-region__title"},{default:A(()=>[T(m(Cs)),fe("span",null,[pe(ie(m(o)?.model.name)+": ",1),fe("i",null,ie(m(o)?.model.id),1)])]),_:1}),d.value?(k(),F(m(he),{key:0},{default:A(()=>[T(m(tt),{onClick:p,icon:m(Nh),mode:"text",label:"帮助"},null,8,["icon"])]),_:1})):Z("",!0)]),_:1})):Z("",!0),m(o)&&!m(o).model.locked?(k(),F(m(he),{key:1,grow:"",padding:!1},{default:A(()=>[T(m(Hi),{items:c.value,modelValue:h.value,"onUpdate:modelValue":v[0]||(v[0]=y=>h.value=y),stretch:"",body:{padding:!1}},{default:A(()=>[(k(!0),te(re,null,ae(m(u),y=>(k(),te(re,{key:y.name},[h.value===y.name?(k(),F(m(ln),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:l,region:f.region,widget:y},null,8,["region","widget"])):Z("",!0)],64))),128))]),_:1},8,["items","modelValue"])]),_:1})):Z("",!0),m(o)?Z("",!0):(k(),F(m(Re),{key:2,description:"请在左侧画布选中节点"})),m(o)&&m(o).model.locked?(k(),F(m(Re),{key:3,"image-size":1,description:"节点已被锁定, 禁止编辑"})):Z("",!0)]),_:1})):Z("",!0)}}),k9={class:"v-status-region"},T9=J({name:"StatusRegion",inheritAttrs:!1,__name:"status",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(k(),te("div",k9,[(k(!0),te(re,null,ae(m(r),a=>(k(),F(m(ln),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),V9=J({name:"PreviewRegion",__name:"preview",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=an(t.region),o=gn(r.value.map(u=>({name:u.name,command:u.name,label:u.label,closable:!!u.closable,checked:!1}))),s=L(()=>o.filter(u=>!u.closable||u.checked)),a=q(s.value[0]?.name);return e({currentTab:a,widgets:r,widgetsRef:i}),(u,l)=>(k(),F(m(Hi),{class:"v-workspace-region",items:s.value,modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:A(()=>[(k(!0),te(re,null,ae(m(r),c=>(k(),F(Pu,{key:c.name},[a.value===c.name?(k(),F(m(ln),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:u.region,widget:c},null,8,["region","widget"])):Z("",!0)],1024))),128))]),_:1},8,["items","modelValue"]))}}),Nu={EmptyRegion:d9,Brand:f9,Toolbar:v9,Actions:y9,Apps:$9,Workspace:j9,Settings:E9,Status:T9,Preview:V9};export{W9 as P,U9 as _,uf as a,q9 as w,nt as y};
149
- function __vite__mapDeps(indexes) {
150
- if (!__vite__mapDeps.viteFileDeps) {
151
- __vite__mapDeps.viteFileDeps = ["./Editor-ctkAn2cu-J9BpKj5_.js","./monaco-editor-ginzV8u1.js","./monaco-editor-cf__QvdG.css","./@vue-3K-Vdqr2.js"]
152
- }
153
- return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
154
- }