@vtj/pro 0.7.6 → 0.7.7

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.
@@ -1,28 +1,28 @@
1
- import{_ as $c}from"./monaco-editor-ginzV8u1.js";import{an as Et,d as B,_ as x,R as Vc,t as mr,j as O,J as Ae,o as b,c as G,S as $,W as Ue,O as be,a4 as zi,U as k,M as se,P as kt,G as Sn,r as I,f as ve,ab as rn,u as d,Q as ye,Z as ne,a as ae,X as N,Y as de,F as re,a9 as oe,ad as dt,am as $t,ae as Zt,h as Rn,ao as da,w as Ni,n as St,V as Xt,T as Cc,a1 as zt,L as Co,aa as jn,a5 as Qt,D as Ac,i as Fi,I as Li,ar as Ao,m as ai,au as pa,aw as Oc,bD as gt,$ as vr,bB as li,aU as Tc,s as nr,aD as ha}from"./@vue-lwVaHA3a.js";import{f as Dc,a as kr,b as fa,c as Ic,d as Bc,e as Rc,g as $e,h as ma,i as Hi,j as gr,k as Ui,l as $n,m as kn,n as Xe,o as va,p as Oo,q as Mc,r as qi,s as Pc,t as zc,u as Nc,v as ga,w as ya,x as Fc,y as Lc,A as Hc,B as rr,C as Uc,D as ba,F as Nt,G as wa,H as qc,I as Wi,J as ui,K as ci,L as Ee,M as Wc,N as Jc,O as Kc,P as Gc,Q as Yc,R as To,S as Do,T as Zc,U as Xc,z as Qc,E as ed,V as Ji,W as td,X as nd,Y as Ki,Z as rd,_ as id}from"./element-plus-QmYYDsz9.js";import{Q as od,w as sd,n as _a,R as ad,D as ld,P as ud,k as cd,M as xa,E as Gi}from"./@element-plus-LjLasQGj.js";import{n as dd,p as Io,q as Yi,s as pd,v as hd,w as fd}from"./@vueuse-4RidYFUd.js";import{M as Er}from"./vue-gPxz3K__.js";import{useRoute as md}from"./vue-router-7jZRLvj2.js";var vd={ENV_TYPE:"live",NODE_ENV:"production"},gd=typeof global=="object"&&global&&global.Object===Object&&global;const Sa=gd;var yd=typeof self=="object"&&self&&self.Object===Object&&self,bd=Sa||yd||Function("return this")();const et=bd;var wd=et.Symbol;const it=wd;var ja=Object.prototype,_d=ja.hasOwnProperty,xd=ja.toString,gn=it?it.toStringTag:void 0;function Sd(n){var e=_d.call(n,gn),t=n[gn];try{n[gn]=void 0;var r=!0}catch{}var i=xd.call(n);return r&&(e?n[gn]=t:delete n[gn]),i}var jd=Object.prototype,kd=jd.toString;function Ed(n){return kd.call(n)}var $d="[object Null]",Vd="[object Undefined]",Bo=it?it.toStringTag:void 0;function ht(n){return n==null?n===void 0?Vd:$d:Bo&&Bo in Object(n)?Sd(n):Ed(n)}function Ge(n){return n!=null&&typeof n=="object"}var Cd="[object Symbol]";function $r(n){return typeof n=="symbol"||Ge(n)&&ht(n)==Cd}function ka(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 Ad=Array.isArray;const Qe=Ad;var Od=1/0,Ro=it?it.prototype:void 0,Mo=Ro?Ro.toString:void 0;function Ea(n){if(typeof n=="string")return n;if(Qe(n))return ka(n,Ea)+"";if($r(n))return Mo?Mo.call(n):"";var e=n+"";return e=="0"&&1/n==-Od?"-0":e}var Td=/\s/;function Dd(n){for(var e=n.length;e--&&Td.test(n.charAt(e)););return e}var Id=/^\s+/;function Bd(n){return n&&n.slice(0,Dd(n)+1).replace(Id,"")}function Ce(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Po=NaN,Rd=/^[-+]0x[0-9a-f]+$/i,Md=/^0b[01]+$/i,Pd=/^0o[0-7]+$/i,zd=parseInt;function zo(n){if(typeof n=="number")return n;if($r(n))return Po;if(Ce(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ce(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Bd(n);var t=Md.test(n);return t||Pd.test(n)?zd(n.slice(2),t?2:8):Rd.test(n)?Po:+n}function $a(n){return n}var Nd="[object AsyncFunction]",Fd="[object Function]",Ld="[object GeneratorFunction]",Hd="[object Proxy]";function Vn(n){if(!Ce(n))return!1;var e=ht(n);return e==Fd||e==Ld||e==Nd||e==Hd}var Ud=et["__core-js_shared__"];const Fr=Ud;var No=function(){var n=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function qd(n){return!!No&&No in n}var Wd=Function.prototype,Jd=Wd.toString;function Ft(n){if(n!=null){try{return Jd.call(n)}catch{}try{return n+""}catch{}}return""}var Kd=/[\\^$.*+?()[\]{}|]/g,Gd=/^\[object .+?Constructor\]$/,Yd=Function.prototype,Zd=Object.prototype,Xd=Yd.toString,Qd=Zd.hasOwnProperty,ep=RegExp("^"+Xd.call(Qd).replace(Kd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function tp(n){if(!Ce(n)||qd(n))return!1;var e=Vn(n)?ep:Gd;return e.test(Ft(n))}function np(n,e){return n?.[e]}function Lt(n,e){var t=np(n,e);return tp(t)?t:void 0}var rp=Lt(et,"WeakMap");const di=rp;var Fo=Object.create,ip=function(){function n(){}return function(e){if(!Ce(e))return{};if(Fo)return Fo(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const op=ip;function Va(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 Ca(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var sp=800,ap=16,lp=Date.now;function up(n){var e=0,t=0;return function(){var r=lp(),i=ap-(r-t);if(t=r,i>0){if(++e>=sp)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function cp(n){return function(){return n}}var dp=function(){try{var n=Lt(Object,"defineProperty");return n({},"",{}),n}catch{}}();const yr=dp;var pp=yr?function(n,e){return yr(n,"toString",{configurable:!0,enumerable:!1,value:cp(e),writable:!0})}:$a;const hp=pp;var fp=up(hp);const mp=fp;function vp(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var gp=9007199254740991,yp=/^(?:0|[1-9]\d*)$/;function Zi(n,e){var t=typeof n;return e=e??gp,!!e&&(t=="number"||t!="symbol"&&yp.test(n))&&n>-1&&n%1==0&&n<e}function Xi(n,e,t){e=="__proto__"&&yr?yr(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function ln(n,e){return n===e||n!==n&&e!==e}var bp=Object.prototype,wp=bp.hasOwnProperty;function Qi(n,e,t){var r=n[e];(!(wp.call(n,e)&&ln(r,t))||t===void 0&&!(e in n))&&Xi(n,e,t)}function un(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?Xi(t,a,u):Qi(t,a,u)}return t}var Lo=Math.max;function _p(n,e,t){return e=Lo(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=Lo(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),Va(n,this,a)}}function Aa(n,e){return mp(_p(n,e,$a),n+"")}var xp=9007199254740991;function Oa(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=xp}function Vr(n){return n!=null&&Oa(n.length)&&!Vn(n)}function Ta(n,e,t){if(!Ce(t))return!1;var r=typeof e;return(r=="number"?Vr(t)&&Zi(e,t.length):r=="string"&&e in t)?ln(t[e],n):!1}function Da(n){return Aa(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&&Ta(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 Sp=Object.prototype;function eo(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||Sp;return n===t}function jp(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var kp="[object Arguments]";function Ho(n){return Ge(n)&&ht(n)==kp}var Ia=Object.prototype,Ep=Ia.hasOwnProperty,$p=Ia.propertyIsEnumerable,Vp=Ho(function(){return arguments}())?Ho:function(n){return Ge(n)&&Ep.call(n,"callee")&&!$p.call(n,"callee")};const pi=Vp;function Cp(){return!1}var Ba=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uo=Ba&&typeof module=="object"&&module&&!module.nodeType&&module,Ap=Uo&&Uo.exports===Ba,qo=Ap?et.Buffer:void 0,Op=qo?qo.isBuffer:void 0,Tp=Op||Cp;const Cn=Tp;var Dp="[object Arguments]",Ip="[object Array]",Bp="[object Boolean]",Rp="[object Date]",Mp="[object Error]",Pp="[object Function]",zp="[object Map]",Np="[object Number]",Fp="[object Object]",Lp="[object RegExp]",Hp="[object Set]",Up="[object String]",qp="[object WeakMap]",Wp="[object ArrayBuffer]",Jp="[object DataView]",Kp="[object Float32Array]",Gp="[object Float64Array]",Yp="[object Int8Array]",Zp="[object Int16Array]",Xp="[object Int32Array]",Qp="[object Uint8Array]",eh="[object Uint8ClampedArray]",th="[object Uint16Array]",nh="[object Uint32Array]",ge={};ge[Kp]=ge[Gp]=ge[Yp]=ge[Zp]=ge[Xp]=ge[Qp]=ge[eh]=ge[th]=ge[nh]=!0,ge[Dp]=ge[Ip]=ge[Wp]=ge[Bp]=ge[Jp]=ge[Rp]=ge[Mp]=ge[Pp]=ge[zp]=ge[Np]=ge[Fp]=ge[Lp]=ge[Hp]=ge[Up]=ge[qp]=!1;function rh(n){return Ge(n)&&Oa(n.length)&&!!ge[ht(n)]}function to(n){return function(e){return n(e)}}var Ra=typeof exports=="object"&&exports&&!exports.nodeType&&exports,En=Ra&&typeof module=="object"&&module&&!module.nodeType&&module,ih=En&&En.exports===Ra,Lr=ih&&Sa.process,oh=function(){try{var n=En&&En.require&&En.require("util").types;return n||Lr&&Lr.binding&&Lr.binding("util")}catch{}}();const ot=oh;var Wo=ot&&ot.isTypedArray,sh=Wo?to(Wo):rh;const no=sh;var ah=Object.prototype,lh=ah.hasOwnProperty;function Ma(n,e){var t=Qe(n),r=!t&&pi(n),i=!t&&!r&&Cn(n),o=!t&&!r&&!i&&no(n),s=t||r||i||o,a=s?jp(n.length,String):[],u=a.length;for(var l in n)(e||lh.call(n,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Zi(l,u)))&&a.push(l);return a}function Pa(n,e){return function(t){return n(e(t))}}var uh=Pa(Object.keys,Object);const ch=uh;var dh=Object.prototype,ph=dh.hasOwnProperty;function hh(n){if(!eo(n))return ch(n);var e=[];for(var t in Object(n))ph.call(n,t)&&t!="constructor"&&e.push(t);return e}function Cr(n){return Vr(n)?Ma(n):hh(n)}function fh(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var mh=Object.prototype,vh=mh.hasOwnProperty;function gh(n){if(!Ce(n))return fh(n);var e=eo(n),t=[];for(var r in n)r=="constructor"&&(e||!vh.call(n,r))||t.push(r);return t}function cn(n){return Vr(n)?Ma(n,!0):gh(n)}var yh=Da(function(n,e,t,r){un(e,cn(e),n,r)});const Jo=yh;var bh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/;function _h(n,e){if(Qe(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||$r(n)?!0:wh.test(n)||!bh.test(n)||e!=null&&n in Object(e)}var xh=Lt(Object,"create");const An=xh;function Sh(){this.__data__=An?An(null):{},this.size=0}function jh(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var kh="__lodash_hash_undefined__",Eh=Object.prototype,$h=Eh.hasOwnProperty;function Vh(n){var e=this.__data__;if(An){var t=e[n];return t===kh?void 0:t}return $h.call(e,n)?e[n]:void 0}var Ch=Object.prototype,Ah=Ch.hasOwnProperty;function Oh(n){var e=this.__data__;return An?e[n]!==void 0:Ah.call(e,n)}var Th="__lodash_hash_undefined__";function Dh(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=An&&e===void 0?Th:e,this}function Pt(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])}}Pt.prototype.clear=Sh,Pt.prototype.delete=jh,Pt.prototype.get=Vh,Pt.prototype.has=Oh,Pt.prototype.set=Dh;function Ih(){this.__data__=[],this.size=0}function Ar(n,e){for(var t=n.length;t--;)if(ln(n[t][0],e))return t;return-1}var Bh=Array.prototype,Rh=Bh.splice;function Mh(n){var e=this.__data__,t=Ar(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Rh.call(e,t,1),--this.size,!0}function Ph(n){var e=this.__data__,t=Ar(e,n);return t<0?void 0:e[t][1]}function zh(n){return Ar(this.__data__,n)>-1}function Nh(n,e){var t=this.__data__,r=Ar(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function lt(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])}}lt.prototype.clear=Ih,lt.prototype.delete=Mh,lt.prototype.get=Ph,lt.prototype.has=zh,lt.prototype.set=Nh;var Fh=Lt(et,"Map");const On=Fh;function Lh(){this.size=0,this.__data__={hash:new Pt,map:new(On||lt),string:new Pt}}function Hh(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Or(n,e){var t=n.__data__;return Hh(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Uh(n){var e=Or(this,n).delete(n);return this.size-=e?1:0,e}function qh(n){return Or(this,n).get(n)}function Wh(n){return Or(this,n).has(n)}function Jh(n,e){var t=Or(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function ut(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])}}ut.prototype.clear=Lh,ut.prototype.delete=Uh,ut.prototype.get=qh,ut.prototype.has=Wh,ut.prototype.set=Jh;var Kh="Expected a function";function ro(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Kh);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(ro.Cache||ut),t}ro.Cache=ut;var Gh=500;function Yh(n){var e=ro(n,function(r){return t.size===Gh&&t.clear(),r}),t=e.cache;return e}var Zh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xh=/\\(\\)?/g,Qh=Yh(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(Zh,function(t,r,i,o){e.push(i?o.replace(Xh,"$1"):r||t)}),e});const ef=Qh;function Ht(n){return n==null?"":Ea(n)}function za(n,e){return Qe(n)?n:_h(n,e)?[n]:ef(Ht(n))}var tf=1/0;function Na(n){if(typeof n=="string"||$r(n))return n;var e=n+"";return e=="0"&&1/n==-tf?"-0":e}function nf(n,e){e=za(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[Na(e[t++])];return t&&t==r?n:void 0}function ir(n,e,t){var r=n==null?void 0:nf(n,e);return r===void 0?t:r}function Fa(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var rf=Pa(Object.getPrototypeOf,Object);const io=rf;var of="[object Object]",sf=Function.prototype,af=Object.prototype,La=sf.toString,lf=af.hasOwnProperty,uf=La.call(Object);function oo(n){if(!Ge(n)||ht(n)!=of)return!1;var e=io(n);if(e===null)return!0;var t=lf.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&La.call(t)==uf}var cf="[object DOMException]",df="[object Error]";function Ha(n){if(!Ge(n))return!1;var e=ht(n);return e==df||e==cf||typeof n.message=="string"&&typeof n.name=="string"&&!oo(n)}var pf=Aa(function(n,e){try{return Va(n,void 0,e)}catch(t){return Ha(t)?t:new Error(t)}});const hf=pf;function ff(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 mf(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:ff(n,e,t)}var vf="\\ud800-\\udfff",gf="\\u0300-\\u036f",yf="\\ufe20-\\ufe2f",bf="\\u20d0-\\u20ff",wf=gf+yf+bf,_f="\\ufe0e\\ufe0f",xf="\\u200d",Sf=RegExp("["+xf+vf+wf+_f+"]");function Ua(n){return Sf.test(n)}function jf(n){return n.split("")}var qa="\\ud800-\\udfff",kf="\\u0300-\\u036f",Ef="\\ufe20-\\ufe2f",$f="\\u20d0-\\u20ff",Vf=kf+Ef+$f,Cf="\\ufe0e\\ufe0f",Af="["+qa+"]",hi="["+Vf+"]",fi="\\ud83c[\\udffb-\\udfff]",Of="(?:"+hi+"|"+fi+")",Wa="[^"+qa+"]",Ja="(?:\\ud83c[\\udde6-\\uddff]){2}",Ka="[\\ud800-\\udbff][\\udc00-\\udfff]",Tf="\\u200d",Ga=Of+"?",Ya="["+Cf+"]?",Df="(?:"+Tf+"(?:"+[Wa,Ja,Ka].join("|")+")"+Ya+Ga+")*",If=Ya+Ga+Df,Bf="(?:"+[Wa+hi+"?",hi,Ja,Ka,Af].join("|")+")",Rf=RegExp(fi+"(?="+fi+")|"+Bf+If,"g");function Mf(n){return n.match(Rf)||[]}function Pf(n){return Ua(n)?Mf(n):jf(n)}function zf(n){return function(e){e=Ht(e);var t=Ua(e)?Pf(e):void 0,r=t?t[0]:e.charAt(0),i=t?mf(t,1).join(""):e.slice(1);return r[n]()+i}}var Nf=zf("toUpperCase");const so=Nf;function Ff(n){return so(Ht(n).toLowerCase())}function Lf(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 Za(n){return function(e){return n?.[e]}}var Hf={À:"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"},Uf=Za(Hf);const qf=Uf;var Wf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jf="\\u0300-\\u036f",Kf="\\ufe20-\\ufe2f",Gf="\\u20d0-\\u20ff",Yf=Jf+Kf+Gf,Zf="["+Yf+"]",Xf=RegExp(Zf,"g");function Qf(n){return n=Ht(n),n&&n.replace(Wf,qf).replace(Xf,"")}var em=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function tm(n){return n.match(em)||[]}var nm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function rm(n){return nm.test(n)}var Xa="\\ud800-\\udfff",im="\\u0300-\\u036f",om="\\ufe20-\\ufe2f",sm="\\u20d0-\\u20ff",am=im+om+sm,Qa="\\u2700-\\u27bf",el="a-z\\xdf-\\xf6\\xf8-\\xff",lm="\\xac\\xb1\\xd7\\xf7",um="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cm="\\u2000-\\u206f",dm=" \\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",tl="A-Z\\xc0-\\xd6\\xd8-\\xde",pm="\\ufe0e\\ufe0f",nl=lm+um+cm+dm,rl="['’]",Ko="["+nl+"]",hm="["+am+"]",il="\\d+",fm="["+Qa+"]",ol="["+el+"]",sl="[^"+Xa+nl+il+Qa+el+tl+"]",mm="\\ud83c[\\udffb-\\udfff]",vm="(?:"+hm+"|"+mm+")",gm="[^"+Xa+"]",al="(?:\\ud83c[\\udde6-\\uddff]){2}",ll="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+tl+"]",ym="\\u200d",Go="(?:"+ol+"|"+sl+")",bm="(?:"+Gt+"|"+sl+")",Yo="(?:"+rl+"(?:d|ll|m|re|s|t|ve))?",Zo="(?:"+rl+"(?:D|LL|M|RE|S|T|VE))?",ul=vm+"?",cl="["+pm+"]?",wm="(?:"+ym+"(?:"+[gm,al,ll].join("|")+")"+cl+ul+")*",_m="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Sm=cl+ul+wm,jm="(?:"+[fm,al,ll].join("|")+")"+Sm,km=RegExp([Gt+"?"+ol+"+"+Yo+"(?="+[Ko,Gt,"$"].join("|")+")",bm+"+"+Zo+"(?="+[Ko,Gt+Go,"$"].join("|")+")",Gt+"?"+Go+"+"+Yo,Gt+"+"+Zo,xm,_m,il,jm].join("|"),"g");function Em(n){return n.match(km)||[]}function $m(n,e,t){return n=Ht(n),e=t?void 0:e,e===void 0?rm(n)?Em(n):tm(n):n.match(e)||[]}var Vm="['’]",Cm=RegExp(Vm,"g");function Am(n){return function(e){return Lf($m(Qf(e).replace(Cm,"")),n,"")}}var Om=Am(function(n,e,t){return e=e.toLowerCase(),n+(t?Ff(e):e)});const Rt=Om;function Tm(){this.__data__=new lt,this.size=0}function Dm(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function Im(n){return this.__data__.get(n)}function Bm(n){return this.__data__.has(n)}var Rm=200;function Mm(n,e){var t=this.__data__;if(t instanceof lt){var r=t.__data__;if(!On||r.length<Rm-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new ut(r)}return t.set(n,e),this.size=t.size,this}function tt(n){var e=this.__data__=new lt(n);this.size=e.size}tt.prototype.clear=Tm,tt.prototype.delete=Dm,tt.prototype.get=Im,tt.prototype.has=Bm,tt.prototype.set=Mm;function Pm(n,e){return n&&un(e,Cr(e),n)}function zm(n,e){return n&&un(e,cn(e),n)}var dl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xo=dl&&typeof module=="object"&&module&&!module.nodeType&&module,Nm=Xo&&Xo.exports===dl,Qo=Nm?et.Buffer:void 0,es=Qo?Qo.allocUnsafe:void 0;function pl(n,e){if(e)return n.slice();var t=n.length,r=es?es(t):new n.constructor(t);return n.copy(r),r}function Fm(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 hl(){return[]}var Lm=Object.prototype,Hm=Lm.propertyIsEnumerable,ts=Object.getOwnPropertySymbols,Um=ts?function(n){return n==null?[]:(n=Object(n),Fm(ts(n),function(e){return Hm.call(n,e)}))}:hl;const ao=Um;function qm(n,e){return un(n,ao(n),e)}var Wm=Object.getOwnPropertySymbols,Jm=Wm?function(n){for(var e=[];n;)Fa(e,ao(n)),n=io(n);return e}:hl;const fl=Jm;function Km(n,e){return un(n,fl(n),e)}function ml(n,e,t){var r=e(n);return Qe(n)?r:Fa(r,t(n))}function mi(n){return ml(n,Cr,ao)}function Gm(n){return ml(n,cn,fl)}var Ym=Lt(et,"DataView");const vi=Ym;var Zm=Lt(et,"Promise");const gi=Zm;var Xm=Lt(et,"Set");const yi=Xm;var ns="[object Map]",Qm="[object Object]",rs="[object Promise]",is="[object Set]",os="[object WeakMap]",ss="[object DataView]",e1=Ft(vi),t1=Ft(On),n1=Ft(gi),r1=Ft(yi),i1=Ft(di),Mt=ht;(vi&&Mt(new vi(new ArrayBuffer(1)))!=ss||On&&Mt(new On)!=ns||gi&&Mt(gi.resolve())!=rs||yi&&Mt(new yi)!=is||di&&Mt(new di)!=os)&&(Mt=function(n){var e=ht(n),t=e==Qm?n.constructor:void 0,r=t?Ft(t):"";if(r)switch(r){case e1:return ss;case t1:return ns;case n1:return rs;case r1:return is;case i1:return os}return e});const Tn=Mt;var o1=Object.prototype,s1=o1.hasOwnProperty;function a1(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&s1.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var l1=et.Uint8Array;const br=l1;function lo(n){var e=new n.constructor(n.byteLength);return new br(e).set(new br(n)),e}function u1(n,e){var t=e?lo(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var c1=/\w*$/;function d1(n){var e=new n.constructor(n.source,c1.exec(n));return e.lastIndex=n.lastIndex,e}var as=it?it.prototype:void 0,ls=as?as.valueOf:void 0;function p1(n){return ls?Object(ls.call(n)):{}}function vl(n,e){var t=e?lo(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var h1="[object Boolean]",f1="[object Date]",m1="[object Map]",v1="[object Number]",g1="[object RegExp]",y1="[object Set]",b1="[object String]",w1="[object Symbol]",_1="[object ArrayBuffer]",x1="[object DataView]",S1="[object Float32Array]",j1="[object Float64Array]",k1="[object Int8Array]",E1="[object Int16Array]",$1="[object Int32Array]",V1="[object Uint8Array]",C1="[object Uint8ClampedArray]",A1="[object Uint16Array]",O1="[object Uint32Array]";function T1(n,e,t){var r=n.constructor;switch(e){case _1:return lo(n);case h1:case f1:return new r(+n);case x1:return u1(n,t);case S1:case j1:case k1:case E1:case $1:case V1:case C1:case A1:case O1:return vl(n,t);case m1:return new r;case v1:case b1:return new r(n);case g1:return d1(n);case y1:return new r;case w1:return p1(n)}}function gl(n){return typeof n.constructor=="function"&&!eo(n)?op(io(n)):{}}var D1="[object Map]";function I1(n){return Ge(n)&&Tn(n)==D1}var us=ot&&ot.isMap,B1=us?to(us):I1;const R1=B1;var M1="[object Set]";function P1(n){return Ge(n)&&Tn(n)==M1}var cs=ot&&ot.isSet,z1=cs?to(cs):P1;const N1=z1;var F1=1,L1=2,H1=4,yl="[object Arguments]",U1="[object Array]",q1="[object Boolean]",W1="[object Date]",J1="[object Error]",bl="[object Function]",K1="[object GeneratorFunction]",G1="[object Map]",Y1="[object Number]",wl="[object Object]",Z1="[object RegExp]",X1="[object Set]",Q1="[object String]",ev="[object Symbol]",tv="[object WeakMap]",nv="[object ArrayBuffer]",rv="[object DataView]",iv="[object Float32Array]",ov="[object Float64Array]",sv="[object Int8Array]",av="[object Int16Array]",lv="[object Int32Array]",uv="[object Uint8Array]",cv="[object Uint8ClampedArray]",dv="[object Uint16Array]",pv="[object Uint32Array]",me={};me[yl]=me[U1]=me[nv]=me[rv]=me[q1]=me[W1]=me[iv]=me[ov]=me[sv]=me[av]=me[lv]=me[G1]=me[Y1]=me[wl]=me[Z1]=me[X1]=me[Q1]=me[ev]=me[uv]=me[cv]=me[dv]=me[pv]=!0,me[J1]=me[bl]=me[tv]=!1;function or(n,e,t,r,i,o){var s,a=e&F1,u=e&L1,l=e&H1;if(t&&(s=i?t(n,r,i,o):t(n)),s!==void 0)return s;if(!Ce(n))return n;var c=Qe(n);if(c){if(s=a1(n),!a)return Ca(n,s)}else{var p=Tn(n),h=p==bl||p==K1;if(Cn(n))return pl(n,a);if(p==wl||p==yl||h&&!i){if(s=u||h?{}:gl(n),!a)return u?Km(n,zm(s,n)):qm(n,Pm(s,n))}else{if(!me[p])return i?n:{};s=T1(n,p,a)}}o||(o=new tt);var f=o.get(n);if(f)return f;o.set(n,s),N1(n)?n.forEach(function(g){s.add(or(g,e,t,g,n,o))}):R1(n)&&n.forEach(function(g,S){s.set(S,or(g,e,t,S,n,o))});var m=l?u?Gm:mi:u?cn:Cr,v=c?void 0:m(n);return vp(v||n,function(g,S){v&&(S=g,g=n[S]),Qi(s,S,or(g,e,t,S,n,o))}),s}var hv=1,fv=4;function Mn(n){return or(n,hv|fv)}var mv="__lodash_hash_undefined__";function vv(n){return this.__data__.set(n,mv),this}function gv(n){return this.__data__.has(n)}function sr(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new ut;++e<t;)this.add(n[e])}sr.prototype.add=sr.prototype.push=vv,sr.prototype.has=gv;function yv(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 bv(n,e){return n.has(e)}var wv=1,_v=2;function _l(n,e,t,r,i,o){var s=t&wv,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 p=-1,h=!0,f=t&_v?new sr:void 0;for(o.set(n,e),o.set(e,n);++p<a;){var m=n[p],v=e[p];if(r)var g=s?r(v,m,p,e,n,o):r(m,v,p,n,e,o);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!yv(e,function(S,y){if(!bv(f,y)&&(m===S||i(m,S,t,r,o)))return f.push(y)})){h=!1;break}}else if(!(m===v||i(m,v,t,r,o))){h=!1;break}}return o.delete(n),o.delete(e),h}function xv(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function Sv(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var jv=1,kv=2,Ev="[object Boolean]",$v="[object Date]",Vv="[object Error]",Cv="[object Map]",Av="[object Number]",Ov="[object RegExp]",Tv="[object Set]",Dv="[object String]",Iv="[object Symbol]",Bv="[object ArrayBuffer]",Rv="[object DataView]",ds=it?it.prototype:void 0,Hr=ds?ds.valueOf:void 0;function Mv(n,e,t,r,i,o,s){switch(t){case Rv:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Bv:return!(n.byteLength!=e.byteLength||!o(new br(n),new br(e)));case Ev:case $v:case Av:return ln(+n,+e);case Vv:return n.name==e.name&&n.message==e.message;case Ov:case Dv:return n==e+"";case Cv:var a=xv;case Tv:var u=r&jv;if(a||(a=Sv),n.size!=e.size&&!u)return!1;var l=s.get(n);if(l)return l==e;r|=kv,s.set(n,e);var c=_l(a(n),a(e),r,i,o,s);return s.delete(n),c;case Iv:if(Hr)return Hr.call(n)==Hr.call(e)}return!1}var Pv=1,zv=Object.prototype,Nv=zv.hasOwnProperty;function Fv(n,e,t,r,i,o){var s=t&Pv,a=mi(n),u=a.length,l=mi(e),c=l.length;if(u!=c&&!s)return!1;for(var p=u;p--;){var h=a[p];if(!(s?h in e:Nv.call(e,h)))return!1}var f=o.get(n),m=o.get(e);if(f&&m)return f==e&&m==n;var v=!0;o.set(n,e),o.set(e,n);for(var g=s;++p<u;){h=a[p];var S=n[h],y=e[h];if(r)var w=s?r(y,S,h,e,n,o):r(S,y,h,n,e,o);if(!(w===void 0?S===y||i(S,y,t,r,o):w)){v=!1;break}g||(g=h=="constructor")}if(v&&!g){var E=n.constructor,j=e.constructor;E!=j&&"constructor"in n&&"constructor"in e&&!(typeof E=="function"&&E instanceof E&&typeof j=="function"&&j instanceof j)&&(v=!1)}return o.delete(n),o.delete(e),v}var Lv=1,ps="[object Arguments]",hs="[object Array]",Un="[object Object]",Hv=Object.prototype,fs=Hv.hasOwnProperty;function Uv(n,e,t,r,i,o){var s=Qe(n),a=Qe(e),u=s?hs:Tn(n),l=a?hs:Tn(e);u=u==ps?Un:u,l=l==ps?Un:l;var c=u==Un,p=l==Un,h=u==l;if(h&&Cn(n)){if(!Cn(e))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new tt),s||no(n)?_l(n,e,t,r,i,o):Mv(n,e,u,t,r,i,o);if(!(t&Lv)){var f=c&&fs.call(n,"__wrapped__"),m=p&&fs.call(e,"__wrapped__");if(f||m){var v=f?n.value():n,g=m?e.value():e;return o||(o=new tt),i(v,g,t,r,o)}}return h?(o||(o=new tt),Fv(n,e,t,r,i,o)):!1}function xl(n,e,t,r,i){return n===e?!0:n==null||e==null||!Ge(n)&&!Ge(e)?n!==n&&e!==e:Uv(n,e,t,r,xl,i)}function qv(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 Wv=qv();const Jv=Wv;var Kv=function(){return et.Date.now()};const Ur=Kv;var Gv="Expected a function",Yv=Math.max,Zv=Math.min;function Sl(n,e,t){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof n!="function")throw new TypeError(Gv);e=zo(e)||0,Ce(t)&&(c=!!t.leading,p="maxWait"in t,o=p?Yv(zo(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function f(_){var V=r,D=i;return r=i=void 0,l=_,s=n.apply(D,V),s}function m(_){return l=_,a=setTimeout(S,e),c?f(_):s}function v(_){var V=_-u,D=_-l,Y=e-V;return p?Zv(Y,o-D):Y}function g(_){var V=_-u,D=_-l;return u===void 0||V>=e||V<0||p&&D>=o}function S(){var _=Ur();if(g(_))return y(_);a=setTimeout(S,v(_))}function y(_){return a=void 0,h&&r?f(_):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function E(){return a===void 0?s:y(Ur())}function j(){var _=Ur(),V=g(_);if(r=arguments,i=this,u=_,V){if(a===void 0)return m(u);if(p)return clearTimeout(a),a=setTimeout(S,e),f(u)}return a===void 0&&(a=setTimeout(S,e)),s}return j.cancel=w,j.flush=E,j}function bi(n,e,t){(t!==void 0&&!ln(n[e],t)||t===void 0&&!(e in n))&&Xi(n,e,t)}function Xv(n){return Ge(n)&&Vr(n)}function wi(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function Qv(n){return un(n,cn(n))}function e0(n,e,t,r,i,o,s){var a=wi(n,t),u=wi(e,t),l=s.get(u);if(l){bi(n,t,l);return}var c=o?o(a,u,t+"",n,e,s):void 0,p=c===void 0;if(p){var h=Qe(u),f=!h&&Cn(u),m=!h&&!f&&no(u);c=u,h||f||m?Qe(a)?c=a:Xv(a)?c=Ca(a):f?(p=!1,c=pl(u,!0)):m?(p=!1,c=vl(u,!0)):c=[]:oo(u)||pi(u)?(c=a,pi(a)?c=Qv(a):(!Ce(a)||Vn(a))&&(c=gl(u))):p=!1}p&&(s.set(u,c),i(c,u,r,o,s),s.delete(u)),bi(n,t,c)}function jl(n,e,t,r,i){n!==e&&Jv(e,function(o,s){if(i||(i=new tt),Ce(o))e0(n,e,s,t,jl,r,i);else{var a=r?r(wi(n,s),o,s+"",n,e,i):void 0;a===void 0&&(a=o),bi(n,s,a)}},cn)}var t0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},n0=Za(t0);const r0=n0;var kl=/[&<>"']/g,i0=RegExp(kl.source);function o0(n){return n=Ht(n),n&&i0.test(n)?n.replace(kl,r0):n}var s0="[object String]";function dn(n){return typeof n=="string"||!Qe(n)&&Ge(n)&&ht(n)==s0}function a0(n,e){return ka(e,function(t){return n[t]})}ot&&ot.isArrayBuffer;ot&&ot.isDate;function uo(n,e){return xl(n,e)}var l0=Da(function(n,e,t){jl(n,e,t)});const ct=l0;function u0(n,e,t,r){if(!Ce(n))return n;e=za(e,n);for(var i=-1,o=e.length,s=o-1,a=n;a!=null&&++i<o;){var u=Na(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=Ce(c)?c:Zi(e[i+1])?[]:{})}Qi(a,u,l),a=a[u]}return n}function qr(n,e,t){return n==null?n:u0(n,e,t)}var El=Object.prototype,c0=El.hasOwnProperty;function ms(n,e,t,r){return n===void 0||ln(n,El[t])&&!c0.call(r,t)?e:n}var d0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function p0(n){return"\\"+d0[n]}var h0=/<%=([\s\S]+?)%>/g;const $l=h0;var f0=/<%-([\s\S]+?)%>/g;const m0=f0;var v0=/<%([\s\S]+?)%>/g;const g0=v0;var y0={escape:m0,evaluate:g0,interpolate:$l,variable:"",imports:{_:{escape:o0}}};const vs=y0;var b0="Invalid `variable` option passed into `_.template`",w0=/\b__p \+= '';/g,_0=/\b(__p \+=) '' \+/g,x0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,S0=/[()=,{}\[\]\/\s]/,j0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qn=/($^)/,k0=/['\n\r\u2028\u2029\\]/g,E0=Object.prototype,gs=E0.hasOwnProperty;function Vl(n,e,t){var r=vs.imports._.templateSettings||vs;t&&Ta(n,e,t)&&(e=void 0),n=Ht(n),e=Jo({},e,r,ms);var i=Jo({},e.imports,r.imports,ms),o=Cr(i),s=a0(i,o),a,u,l=0,c=e.interpolate||qn,p="__p += '",h=RegExp((e.escape||qn).source+"|"+c.source+"|"+(c===$l?j0:qn).source+"|"+(e.evaluate||qn).source+"|$","g"),f=gs.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
2
- `:"";n.replace(h,function(g,S,y,w,E,j){return y||(y=w),p+=n.slice(l,j).replace(k0,p0),S&&(a=!0,p+=`' +
1
+ import{_ as Tc}from"./monaco-editor-ginzV8u1.js";import{an as Et,d as B,_ as x,R as Dc,t as gr,j as O,J as Ae,o as b,c as G,S as $,W as Ue,O as be,a4 as Hi,U as k,M as se,P as kt,G as Sn,r as I,f as ve,ab as rn,u as d,Q as ye,Z as ne,a as ae,X as N,Y as de,F as re,a9 as oe,ad as pt,am as $t,ae as Zt,h as Pn,ao as ha,w as Ui,n as ct,V as Xt,T as Ic,a1 as zt,L as Do,aa as jn,a5 as Qt,D as Bc,i as qi,I as Wi,ar as Io,m as ui,au as fa,aw as Rc,bD as yt,$ as yr,bB as ci,aU as Mc,s as ir,aD as ma}from"./@vue-lwVaHA3a.js";import{f as Pc,a as $r,b as va,c as zc,d as Nc,e as Fc,g as $e,h as ga,i as Ji,j as br,k as Ki,l as Cn,m as kn,n as Xe,o as ya,p as Bo,q as Lc,r as Gi,s as Hc,t as Uc,u as qc,v as ba,w as wa,x as Wc,y as Jc,A as Kc,B as or,C as Gc,D as _a,F as Nt,G as xa,H as Yc,I as Yi,J as di,K as pi,L as Ee,M as Zc,N as Xc,O as Qc,P as ed,Q as td,R as Ro,S as Mo,T as nd,U as rd,z as id,E as od,V as Zi,W as sd,X as ad,Y as Xi,Z as ld,_ as ud}from"./element-plus-mQa-xjrd.js";import{Q as cd,w as dd,n as Sa,R as pd,D as hd,P as fd,k as md,M as ja,E as Qi}from"./@element-plus-LjLasQGj.js";import{n as vd,p as Po,q as eo,s as gd,v as yd,w as bd}from"./@vueuse-4RidYFUd.js";import{B as Vr}from"./vue-OW2xvptn.js";import{useRoute as wd}from"./vue-router-7jZRLvj2.js";var _d={ENV_TYPE:"live",NODE_ENV:"production"},xd=typeof global=="object"&&global&&global.Object===Object&&global;const ka=xd;var Sd=typeof self=="object"&&self&&self.Object===Object&&self,jd=ka||Sd||Function("return this")();const et=jd;var kd=et.Symbol;const it=kd;var Ea=Object.prototype,Ed=Ea.hasOwnProperty,$d=Ea.toString,gn=it?it.toStringTag:void 0;function Vd(n){var e=Ed.call(n,gn),t=n[gn];try{n[gn]=void 0;var r=!0}catch{}var i=$d.call(n);return r&&(e?n[gn]=t:delete n[gn]),i}var Cd=Object.prototype,Ad=Cd.toString;function Od(n){return Ad.call(n)}var Td="[object Null]",Dd="[object Undefined]",zo=it?it.toStringTag:void 0;function ft(n){return n==null?n===void 0?Dd:Td:zo&&zo in Object(n)?Vd(n):Od(n)}function Ge(n){return n!=null&&typeof n=="object"}var Id="[object Symbol]";function Cr(n){return typeof n=="symbol"||Ge(n)&&ft(n)==Id}function $a(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 Bd=Array.isArray;const Qe=Bd;var Rd=1/0,No=it?it.prototype:void 0,Fo=No?No.toString:void 0;function Va(n){if(typeof n=="string")return n;if(Qe(n))return $a(n,Va)+"";if(Cr(n))return Fo?Fo.call(n):"";var e=n+"";return e=="0"&&1/n==-Rd?"-0":e}var Md=/\s/;function Pd(n){for(var e=n.length;e--&&Md.test(n.charAt(e)););return e}var zd=/^\s+/;function Nd(n){return n&&n.slice(0,Pd(n)+1).replace(zd,"")}function Ce(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var Lo=NaN,Fd=/^[-+]0x[0-9a-f]+$/i,Ld=/^0b[01]+$/i,Hd=/^0o[0-7]+$/i,Ud=parseInt;function Ho(n){if(typeof n=="number")return n;if(Cr(n))return Lo;if(Ce(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ce(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Nd(n);var t=Ld.test(n);return t||Hd.test(n)?Ud(n.slice(2),t?2:8):Fd.test(n)?Lo:+n}function Ca(n){return n}var qd="[object AsyncFunction]",Wd="[object Function]",Jd="[object GeneratorFunction]",Kd="[object Proxy]";function An(n){if(!Ce(n))return!1;var e=ft(n);return e==Wd||e==Jd||e==qd||e==Kd}var Gd=et["__core-js_shared__"];const Hr=Gd;var Uo=function(){var n=/[^.]+$/.exec(Hr&&Hr.keys&&Hr.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function Yd(n){return!!Uo&&Uo in n}var Zd=Function.prototype,Xd=Zd.toString;function Ft(n){if(n!=null){try{return Xd.call(n)}catch{}try{return n+""}catch{}}return""}var Qd=/[\\^$.*+?()[\]{}|]/g,ep=/^\[object .+?Constructor\]$/,tp=Function.prototype,np=Object.prototype,rp=tp.toString,ip=np.hasOwnProperty,op=RegExp("^"+rp.call(ip).replace(Qd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sp(n){if(!Ce(n)||Yd(n))return!1;var e=An(n)?op:ep;return e.test(Ft(n))}function ap(n,e){return n?.[e]}function Lt(n,e){var t=ap(n,e);return sp(t)?t:void 0}var lp=Lt(et,"WeakMap");const hi=lp;var qo=Object.create,up=function(){function n(){}return function(e){if(!Ce(e))return{};if(qo)return qo(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const cp=up;function Aa(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 Oa(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var dp=800,pp=16,hp=Date.now;function fp(n){var e=0,t=0;return function(){var r=hp(),i=pp-(r-t);if(t=r,i>0){if(++e>=dp)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function mp(n){return function(){return n}}var vp=function(){try{var n=Lt(Object,"defineProperty");return n({},"",{}),n}catch{}}();const wr=vp;var gp=wr?function(n,e){return wr(n,"toString",{configurable:!0,enumerable:!1,value:mp(e),writable:!0})}:Ca;const yp=gp;var bp=fp(yp);const wp=bp;function _p(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var xp=9007199254740991,Sp=/^(?:0|[1-9]\d*)$/;function to(n,e){var t=typeof n;return e=e??xp,!!e&&(t=="number"||t!="symbol"&&Sp.test(n))&&n>-1&&n%1==0&&n<e}function no(n,e,t){e=="__proto__"&&wr?wr(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function ln(n,e){return n===e||n!==n&&e!==e}var jp=Object.prototype,kp=jp.hasOwnProperty;function ro(n,e,t){var r=n[e];(!(kp.call(n,e)&&ln(r,t))||t===void 0&&!(e in n))&&no(n,e,t)}function un(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?no(t,a,u):ro(t,a,u)}return t}var Wo=Math.max;function Ep(n,e,t){return e=Wo(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,o=Wo(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),Aa(n,this,a)}}function Ta(n,e){return wp(Ep(n,e,Ca),n+"")}var $p=9007199254740991;function Da(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=$p}function Ar(n){return n!=null&&Da(n.length)&&!An(n)}function Ia(n,e,t){if(!Ce(t))return!1;var r=typeof e;return(r=="number"?Ar(t)&&to(e,t.length):r=="string"&&e in t)?ln(t[e],n):!1}function Ba(n){return Ta(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&&Ia(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 Vp=Object.prototype;function io(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||Vp;return n===t}function Cp(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var Ap="[object Arguments]";function Jo(n){return Ge(n)&&ft(n)==Ap}var Ra=Object.prototype,Op=Ra.hasOwnProperty,Tp=Ra.propertyIsEnumerable,Dp=Jo(function(){return arguments}())?Jo:function(n){return Ge(n)&&Op.call(n,"callee")&&!Tp.call(n,"callee")};const fi=Dp;function Ip(){return!1}var Ma=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ko=Ma&&typeof module=="object"&&module&&!module.nodeType&&module,Bp=Ko&&Ko.exports===Ma,Go=Bp?et.Buffer:void 0,Rp=Go?Go.isBuffer:void 0,Mp=Rp||Ip;const On=Mp;var Pp="[object Arguments]",zp="[object Array]",Np="[object Boolean]",Fp="[object Date]",Lp="[object Error]",Hp="[object Function]",Up="[object Map]",qp="[object Number]",Wp="[object Object]",Jp="[object RegExp]",Kp="[object Set]",Gp="[object String]",Yp="[object WeakMap]",Zp="[object ArrayBuffer]",Xp="[object DataView]",Qp="[object Float32Array]",eh="[object Float64Array]",th="[object Int8Array]",nh="[object Int16Array]",rh="[object Int32Array]",ih="[object Uint8Array]",oh="[object Uint8ClampedArray]",sh="[object Uint16Array]",ah="[object Uint32Array]",ge={};ge[Qp]=ge[eh]=ge[th]=ge[nh]=ge[rh]=ge[ih]=ge[oh]=ge[sh]=ge[ah]=!0,ge[Pp]=ge[zp]=ge[Zp]=ge[Np]=ge[Xp]=ge[Fp]=ge[Lp]=ge[Hp]=ge[Up]=ge[qp]=ge[Wp]=ge[Jp]=ge[Kp]=ge[Gp]=ge[Yp]=!1;function lh(n){return Ge(n)&&Da(n.length)&&!!ge[ft(n)]}function oo(n){return function(e){return n(e)}}var Pa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,En=Pa&&typeof module=="object"&&module&&!module.nodeType&&module,uh=En&&En.exports===Pa,Ur=uh&&ka.process,ch=function(){try{var n=En&&En.require&&En.require("util").types;return n||Ur&&Ur.binding&&Ur.binding("util")}catch{}}();const ot=ch;var Yo=ot&&ot.isTypedArray,dh=Yo?oo(Yo):lh;const so=dh;var ph=Object.prototype,hh=ph.hasOwnProperty;function za(n,e){var t=Qe(n),r=!t&&fi(n),i=!t&&!r&&On(n),o=!t&&!r&&!i&&so(n),s=t||r||i||o,a=s?Cp(n.length,String):[],u=a.length;for(var l in n)(e||hh.call(n,l))&&!(s&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||to(l,u)))&&a.push(l);return a}function Na(n,e){return function(t){return n(e(t))}}var fh=Na(Object.keys,Object);const mh=fh;var vh=Object.prototype,gh=vh.hasOwnProperty;function yh(n){if(!io(n))return mh(n);var e=[];for(var t in Object(n))gh.call(n,t)&&t!="constructor"&&e.push(t);return e}function Or(n){return Ar(n)?za(n):yh(n)}function bh(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var wh=Object.prototype,_h=wh.hasOwnProperty;function xh(n){if(!Ce(n))return bh(n);var e=io(n),t=[];for(var r in n)r=="constructor"&&(e||!_h.call(n,r))||t.push(r);return t}function cn(n){return Ar(n)?za(n,!0):xh(n)}var Sh=Ba(function(n,e,t,r){un(e,cn(e),n,r)});const Zo=Sh;var jh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kh=/^\w*$/;function Eh(n,e){if(Qe(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||Cr(n)?!0:kh.test(n)||!jh.test(n)||e!=null&&n in Object(e)}var $h=Lt(Object,"create");const Tn=$h;function Vh(){this.__data__=Tn?Tn(null):{},this.size=0}function Ch(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var Ah="__lodash_hash_undefined__",Oh=Object.prototype,Th=Oh.hasOwnProperty;function Dh(n){var e=this.__data__;if(Tn){var t=e[n];return t===Ah?void 0:t}return Th.call(e,n)?e[n]:void 0}var Ih=Object.prototype,Bh=Ih.hasOwnProperty;function Rh(n){var e=this.__data__;return Tn?e[n]!==void 0:Bh.call(e,n)}var Mh="__lodash_hash_undefined__";function Ph(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Tn&&e===void 0?Mh:e,this}function Pt(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])}}Pt.prototype.clear=Vh,Pt.prototype.delete=Ch,Pt.prototype.get=Dh,Pt.prototype.has=Rh,Pt.prototype.set=Ph;function zh(){this.__data__=[],this.size=0}function Tr(n,e){for(var t=n.length;t--;)if(ln(n[t][0],e))return t;return-1}var Nh=Array.prototype,Fh=Nh.splice;function Lh(n){var e=this.__data__,t=Tr(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Fh.call(e,t,1),--this.size,!0}function Hh(n){var e=this.__data__,t=Tr(e,n);return t<0?void 0:e[t][1]}function Uh(n){return Tr(this.__data__,n)>-1}function qh(n,e){var t=this.__data__,r=Tr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function lt(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])}}lt.prototype.clear=zh,lt.prototype.delete=Lh,lt.prototype.get=Hh,lt.prototype.has=Uh,lt.prototype.set=qh;var Wh=Lt(et,"Map");const Dn=Wh;function Jh(){this.size=0,this.__data__={hash:new Pt,map:new(Dn||lt),string:new Pt}}function Kh(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Dr(n,e){var t=n.__data__;return Kh(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Gh(n){var e=Dr(this,n).delete(n);return this.size-=e?1:0,e}function Yh(n){return Dr(this,n).get(n)}function Zh(n){return Dr(this,n).has(n)}function Xh(n,e){var t=Dr(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function ut(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])}}ut.prototype.clear=Jh,ut.prototype.delete=Gh,ut.prototype.get=Yh,ut.prototype.has=Zh,ut.prototype.set=Xh;var Qh="Expected a function";function ao(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(Qh);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(ao.Cache||ut),t}ao.Cache=ut;var ef=500;function tf(n){var e=ao(n,function(r){return t.size===ef&&t.clear(),r}),t=e.cache;return e}var nf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rf=/\\(\\)?/g,of=tf(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(nf,function(t,r,i,o){e.push(i?o.replace(rf,"$1"):r||t)}),e});const sf=of;function Ht(n){return n==null?"":Va(n)}function Fa(n,e){return Qe(n)?n:Eh(n,e)?[n]:sf(Ht(n))}var af=1/0;function La(n){if(typeof n=="string"||Cr(n))return n;var e=n+"";return e=="0"&&1/n==-af?"-0":e}function lf(n,e){e=Fa(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[La(e[t++])];return t&&t==r?n:void 0}function sr(n,e,t){var r=n==null?void 0:lf(n,e);return r===void 0?t:r}function Ha(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var uf=Na(Object.getPrototypeOf,Object);const lo=uf;var cf="[object Object]",df=Function.prototype,pf=Object.prototype,Ua=df.toString,hf=pf.hasOwnProperty,ff=Ua.call(Object);function uo(n){if(!Ge(n)||ft(n)!=cf)return!1;var e=lo(n);if(e===null)return!0;var t=hf.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ua.call(t)==ff}var mf="[object DOMException]",vf="[object Error]";function qa(n){if(!Ge(n))return!1;var e=ft(n);return e==vf||e==mf||typeof n.message=="string"&&typeof n.name=="string"&&!uo(n)}var gf=Ta(function(n,e){try{return Aa(n,void 0,e)}catch(t){return qa(t)?t:new Error(t)}});const yf=gf;function bf(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 wf(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:bf(n,e,t)}var _f="\\ud800-\\udfff",xf="\\u0300-\\u036f",Sf="\\ufe20-\\ufe2f",jf="\\u20d0-\\u20ff",kf=xf+Sf+jf,Ef="\\ufe0e\\ufe0f",$f="\\u200d",Vf=RegExp("["+$f+_f+kf+Ef+"]");function Wa(n){return Vf.test(n)}function Cf(n){return n.split("")}var Ja="\\ud800-\\udfff",Af="\\u0300-\\u036f",Of="\\ufe20-\\ufe2f",Tf="\\u20d0-\\u20ff",Df=Af+Of+Tf,If="\\ufe0e\\ufe0f",Bf="["+Ja+"]",mi="["+Df+"]",vi="\\ud83c[\\udffb-\\udfff]",Rf="(?:"+mi+"|"+vi+")",Ka="[^"+Ja+"]",Ga="(?:\\ud83c[\\udde6-\\uddff]){2}",Ya="[\\ud800-\\udbff][\\udc00-\\udfff]",Mf="\\u200d",Za=Rf+"?",Xa="["+If+"]?",Pf="(?:"+Mf+"(?:"+[Ka,Ga,Ya].join("|")+")"+Xa+Za+")*",zf=Xa+Za+Pf,Nf="(?:"+[Ka+mi+"?",mi,Ga,Ya,Bf].join("|")+")",Ff=RegExp(vi+"(?="+vi+")|"+Nf+zf,"g");function Lf(n){return n.match(Ff)||[]}function Hf(n){return Wa(n)?Lf(n):Cf(n)}function Uf(n){return function(e){e=Ht(e);var t=Wa(e)?Hf(e):void 0,r=t?t[0]:e.charAt(0),i=t?wf(t,1).join(""):e.slice(1);return r[n]()+i}}var qf=Uf("toUpperCase");const co=qf;function Wf(n){return co(Ht(n).toLowerCase())}function Jf(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 Qa(n){return function(e){return n?.[e]}}var Kf={À:"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"},Gf=Qa(Kf);const Yf=Gf;var Zf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xf="\\u0300-\\u036f",Qf="\\ufe20-\\ufe2f",em="\\u20d0-\\u20ff",tm=Xf+Qf+em,nm="["+tm+"]",rm=RegExp(nm,"g");function im(n){return n=Ht(n),n&&n.replace(Zf,Yf).replace(rm,"")}var om=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function sm(n){return n.match(om)||[]}var am=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function lm(n){return am.test(n)}var el="\\ud800-\\udfff",um="\\u0300-\\u036f",cm="\\ufe20-\\ufe2f",dm="\\u20d0-\\u20ff",pm=um+cm+dm,tl="\\u2700-\\u27bf",nl="a-z\\xdf-\\xf6\\xf8-\\xff",hm="\\xac\\xb1\\xd7\\xf7",fm="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mm="\\u2000-\\u206f",vm=" \\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",rl="A-Z\\xc0-\\xd6\\xd8-\\xde",gm="\\ufe0e\\ufe0f",il=hm+fm+mm+vm,ol="['’]",Xo="["+il+"]",ym="["+pm+"]",sl="\\d+",bm="["+tl+"]",al="["+nl+"]",ll="[^"+el+il+sl+tl+nl+rl+"]",wm="\\ud83c[\\udffb-\\udfff]",_m="(?:"+ym+"|"+wm+")",xm="[^"+el+"]",ul="(?:\\ud83c[\\udde6-\\uddff]){2}",cl="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+rl+"]",Sm="\\u200d",Qo="(?:"+al+"|"+ll+")",jm="(?:"+Gt+"|"+ll+")",es="(?:"+ol+"(?:d|ll|m|re|s|t|ve))?",ts="(?:"+ol+"(?:D|LL|M|RE|S|T|VE))?",dl=_m+"?",pl="["+gm+"]?",km="(?:"+Sm+"(?:"+[xm,ul,cl].join("|")+")"+pl+dl+")*",Em="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$m="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vm=pl+dl+km,Cm="(?:"+[bm,ul,cl].join("|")+")"+Vm,Am=RegExp([Gt+"?"+al+"+"+es+"(?="+[Xo,Gt,"$"].join("|")+")",jm+"+"+ts+"(?="+[Xo,Gt+Qo,"$"].join("|")+")",Gt+"?"+Qo+"+"+es,Gt+"+"+ts,$m,Em,sl,Cm].join("|"),"g");function Om(n){return n.match(Am)||[]}function Tm(n,e,t){return n=Ht(n),e=t?void 0:e,e===void 0?lm(n)?Om(n):sm(n):n.match(e)||[]}var Dm="['’]",Im=RegExp(Dm,"g");function Bm(n){return function(e){return Jf(Tm(im(e).replace(Im,"")),n,"")}}var Rm=Bm(function(n,e,t){return e=e.toLowerCase(),n+(t?Wf(e):e)});const Rt=Rm;function Mm(){this.__data__=new lt,this.size=0}function Pm(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function zm(n){return this.__data__.get(n)}function Nm(n){return this.__data__.has(n)}var Fm=200;function Lm(n,e){var t=this.__data__;if(t instanceof lt){var r=t.__data__;if(!Dn||r.length<Fm-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new ut(r)}return t.set(n,e),this.size=t.size,this}function tt(n){var e=this.__data__=new lt(n);this.size=e.size}tt.prototype.clear=Mm,tt.prototype.delete=Pm,tt.prototype.get=zm,tt.prototype.has=Nm,tt.prototype.set=Lm;function Hm(n,e){return n&&un(e,Or(e),n)}function Um(n,e){return n&&un(e,cn(e),n)}var hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ns=hl&&typeof module=="object"&&module&&!module.nodeType&&module,qm=ns&&ns.exports===hl,rs=qm?et.Buffer:void 0,is=rs?rs.allocUnsafe:void 0;function fl(n,e){if(e)return n.slice();var t=n.length,r=is?is(t):new n.constructor(t);return n.copy(r),r}function Wm(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 ml(){return[]}var Jm=Object.prototype,Km=Jm.propertyIsEnumerable,os=Object.getOwnPropertySymbols,Gm=os?function(n){return n==null?[]:(n=Object(n),Wm(os(n),function(e){return Km.call(n,e)}))}:ml;const po=Gm;function Ym(n,e){return un(n,po(n),e)}var Zm=Object.getOwnPropertySymbols,Xm=Zm?function(n){for(var e=[];n;)Ha(e,po(n)),n=lo(n);return e}:ml;const vl=Xm;function Qm(n,e){return un(n,vl(n),e)}function gl(n,e,t){var r=e(n);return Qe(n)?r:Ha(r,t(n))}function gi(n){return gl(n,Or,po)}function e1(n){return gl(n,cn,vl)}var t1=Lt(et,"DataView");const yi=t1;var n1=Lt(et,"Promise");const bi=n1;var r1=Lt(et,"Set");const wi=r1;var ss="[object Map]",i1="[object Object]",as="[object Promise]",ls="[object Set]",us="[object WeakMap]",cs="[object DataView]",o1=Ft(yi),s1=Ft(Dn),a1=Ft(bi),l1=Ft(wi),u1=Ft(hi),Mt=ft;(yi&&Mt(new yi(new ArrayBuffer(1)))!=cs||Dn&&Mt(new Dn)!=ss||bi&&Mt(bi.resolve())!=as||wi&&Mt(new wi)!=ls||hi&&Mt(new hi)!=us)&&(Mt=function(n){var e=ft(n),t=e==i1?n.constructor:void 0,r=t?Ft(t):"";if(r)switch(r){case o1:return cs;case s1:return ss;case a1:return as;case l1:return ls;case u1:return us}return e});const In=Mt;var c1=Object.prototype,d1=c1.hasOwnProperty;function p1(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&d1.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var h1=et.Uint8Array;const _r=h1;function ho(n){var e=new n.constructor(n.byteLength);return new _r(e).set(new _r(n)),e}function f1(n,e){var t=e?ho(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var m1=/\w*$/;function v1(n){var e=new n.constructor(n.source,m1.exec(n));return e.lastIndex=n.lastIndex,e}var ds=it?it.prototype:void 0,ps=ds?ds.valueOf:void 0;function g1(n){return ps?Object(ps.call(n)):{}}function yl(n,e){var t=e?ho(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var y1="[object Boolean]",b1="[object Date]",w1="[object Map]",_1="[object Number]",x1="[object RegExp]",S1="[object Set]",j1="[object String]",k1="[object Symbol]",E1="[object ArrayBuffer]",$1="[object DataView]",V1="[object Float32Array]",C1="[object Float64Array]",A1="[object Int8Array]",O1="[object Int16Array]",T1="[object Int32Array]",D1="[object Uint8Array]",I1="[object Uint8ClampedArray]",B1="[object Uint16Array]",R1="[object Uint32Array]";function M1(n,e,t){var r=n.constructor;switch(e){case E1:return ho(n);case y1:case b1:return new r(+n);case $1:return f1(n,t);case V1:case C1:case A1:case O1:case T1:case D1:case I1:case B1:case R1:return yl(n,t);case w1:return new r;case _1:case j1:return new r(n);case x1:return v1(n);case S1:return new r;case k1:return g1(n)}}function bl(n){return typeof n.constructor=="function"&&!io(n)?cp(lo(n)):{}}var P1="[object Map]";function z1(n){return Ge(n)&&In(n)==P1}var hs=ot&&ot.isMap,N1=hs?oo(hs):z1;const F1=N1;var L1="[object Set]";function H1(n){return Ge(n)&&In(n)==L1}var fs=ot&&ot.isSet,U1=fs?oo(fs):H1;const q1=U1;var W1=1,J1=2,K1=4,wl="[object Arguments]",G1="[object Array]",Y1="[object Boolean]",Z1="[object Date]",X1="[object Error]",_l="[object Function]",Q1="[object GeneratorFunction]",ev="[object Map]",tv="[object Number]",xl="[object Object]",nv="[object RegExp]",rv="[object Set]",iv="[object String]",ov="[object Symbol]",sv="[object WeakMap]",av="[object ArrayBuffer]",lv="[object DataView]",uv="[object Float32Array]",cv="[object Float64Array]",dv="[object Int8Array]",pv="[object Int16Array]",hv="[object Int32Array]",fv="[object Uint8Array]",mv="[object Uint8ClampedArray]",vv="[object Uint16Array]",gv="[object Uint32Array]",me={};me[wl]=me[G1]=me[av]=me[lv]=me[Y1]=me[Z1]=me[uv]=me[cv]=me[dv]=me[pv]=me[hv]=me[ev]=me[tv]=me[xl]=me[nv]=me[rv]=me[iv]=me[ov]=me[fv]=me[mv]=me[vv]=me[gv]=!0,me[X1]=me[_l]=me[sv]=!1;function ar(n,e,t,r,i,o){var s,a=e&W1,u=e&J1,l=e&K1;if(t&&(s=i?t(n,r,i,o):t(n)),s!==void 0)return s;if(!Ce(n))return n;var c=Qe(n);if(c){if(s=p1(n),!a)return Oa(n,s)}else{var p=In(n),h=p==_l||p==Q1;if(On(n))return fl(n,a);if(p==xl||p==wl||h&&!i){if(s=u||h?{}:bl(n),!a)return u?Qm(n,Um(s,n)):Ym(n,Hm(s,n))}else{if(!me[p])return i?n:{};s=M1(n,p,a)}}o||(o=new tt);var f=o.get(n);if(f)return f;o.set(n,s),q1(n)?n.forEach(function(g){s.add(ar(g,e,t,g,n,o))}):F1(n)&&n.forEach(function(g,S){s.set(S,ar(g,e,t,S,n,o))});var m=l?u?e1:gi:u?cn:Or,v=c?void 0:m(n);return _p(v||n,function(g,S){v&&(S=g,g=n[S]),ro(s,S,ar(g,e,t,S,n,o))}),s}var yv=1,bv=4;function zn(n){return ar(n,yv|bv)}var wv="__lodash_hash_undefined__";function _v(n){return this.__data__.set(n,wv),this}function xv(n){return this.__data__.has(n)}function lr(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new ut;++e<t;)this.add(n[e])}lr.prototype.add=lr.prototype.push=_v,lr.prototype.has=xv;function Sv(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 jv(n,e){return n.has(e)}var kv=1,Ev=2;function Sl(n,e,t,r,i,o){var s=t&kv,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 p=-1,h=!0,f=t&Ev?new lr:void 0;for(o.set(n,e),o.set(e,n);++p<a;){var m=n[p],v=e[p];if(r)var g=s?r(v,m,p,e,n,o):r(m,v,p,n,e,o);if(g!==void 0){if(g)continue;h=!1;break}if(f){if(!Sv(e,function(S,y){if(!jv(f,y)&&(m===S||i(m,S,t,r,o)))return f.push(y)})){h=!1;break}}else if(!(m===v||i(m,v,t,r,o))){h=!1;break}}return o.delete(n),o.delete(e),h}function $v(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function Vv(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var Cv=1,Av=2,Ov="[object Boolean]",Tv="[object Date]",Dv="[object Error]",Iv="[object Map]",Bv="[object Number]",Rv="[object RegExp]",Mv="[object Set]",Pv="[object String]",zv="[object Symbol]",Nv="[object ArrayBuffer]",Fv="[object DataView]",ms=it?it.prototype:void 0,qr=ms?ms.valueOf:void 0;function Lv(n,e,t,r,i,o,s){switch(t){case Fv:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Nv:return!(n.byteLength!=e.byteLength||!o(new _r(n),new _r(e)));case Ov:case Tv:case Bv:return ln(+n,+e);case Dv:return n.name==e.name&&n.message==e.message;case Rv:case Pv:return n==e+"";case Iv:var a=$v;case Mv:var u=r&Cv;if(a||(a=Vv),n.size!=e.size&&!u)return!1;var l=s.get(n);if(l)return l==e;r|=Av,s.set(n,e);var c=Sl(a(n),a(e),r,i,o,s);return s.delete(n),c;case zv:if(qr)return qr.call(n)==qr.call(e)}return!1}var Hv=1,Uv=Object.prototype,qv=Uv.hasOwnProperty;function Wv(n,e,t,r,i,o){var s=t&Hv,a=gi(n),u=a.length,l=gi(e),c=l.length;if(u!=c&&!s)return!1;for(var p=u;p--;){var h=a[p];if(!(s?h in e:qv.call(e,h)))return!1}var f=o.get(n),m=o.get(e);if(f&&m)return f==e&&m==n;var v=!0;o.set(n,e),o.set(e,n);for(var g=s;++p<u;){h=a[p];var S=n[h],y=e[h];if(r)var w=s?r(y,S,h,e,n,o):r(S,y,h,n,e,o);if(!(w===void 0?S===y||i(S,y,t,r,o):w)){v=!1;break}g||(g=h=="constructor")}if(v&&!g){var E=n.constructor,j=e.constructor;E!=j&&"constructor"in n&&"constructor"in e&&!(typeof E=="function"&&E instanceof E&&typeof j=="function"&&j instanceof j)&&(v=!1)}return o.delete(n),o.delete(e),v}var Jv=1,vs="[object Arguments]",gs="[object Array]",Wn="[object Object]",Kv=Object.prototype,ys=Kv.hasOwnProperty;function Gv(n,e,t,r,i,o){var s=Qe(n),a=Qe(e),u=s?gs:In(n),l=a?gs:In(e);u=u==vs?Wn:u,l=l==vs?Wn:l;var c=u==Wn,p=l==Wn,h=u==l;if(h&&On(n)){if(!On(e))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new tt),s||so(n)?Sl(n,e,t,r,i,o):Lv(n,e,u,t,r,i,o);if(!(t&Jv)){var f=c&&ys.call(n,"__wrapped__"),m=p&&ys.call(e,"__wrapped__");if(f||m){var v=f?n.value():n,g=m?e.value():e;return o||(o=new tt),i(v,g,t,r,o)}}return h?(o||(o=new tt),Wv(n,e,t,r,i,o)):!1}function jl(n,e,t,r,i){return n===e?!0:n==null||e==null||!Ge(n)&&!Ge(e)?n!==n&&e!==e:Gv(n,e,t,r,jl,i)}function Yv(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 Zv=Yv();const Xv=Zv;var Qv=function(){return et.Date.now()};const Wr=Qv;var e0="Expected a function",t0=Math.max,n0=Math.min;function kl(n,e,t){var r,i,o,s,a,u,l=0,c=!1,p=!1,h=!0;if(typeof n!="function")throw new TypeError(e0);e=Ho(e)||0,Ce(t)&&(c=!!t.leading,p="maxWait"in t,o=p?t0(Ho(t.maxWait)||0,e):o,h="trailing"in t?!!t.trailing:h);function f(_){var V=r,D=i;return r=i=void 0,l=_,s=n.apply(D,V),s}function m(_){return l=_,a=setTimeout(S,e),c?f(_):s}function v(_){var V=_-u,D=_-l,Y=e-V;return p?n0(Y,o-D):Y}function g(_){var V=_-u,D=_-l;return u===void 0||V>=e||V<0||p&&D>=o}function S(){var _=Wr();if(g(_))return y(_);a=setTimeout(S,v(_))}function y(_){return a=void 0,h&&r?f(_):(r=i=void 0,s)}function w(){a!==void 0&&clearTimeout(a),l=0,r=u=i=a=void 0}function E(){return a===void 0?s:y(Wr())}function j(){var _=Wr(),V=g(_);if(r=arguments,i=this,u=_,V){if(a===void 0)return m(u);if(p)return clearTimeout(a),a=setTimeout(S,e),f(u)}return a===void 0&&(a=setTimeout(S,e)),s}return j.cancel=w,j.flush=E,j}function _i(n,e,t){(t!==void 0&&!ln(n[e],t)||t===void 0&&!(e in n))&&no(n,e,t)}function r0(n){return Ge(n)&&Ar(n)}function xi(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function i0(n){return un(n,cn(n))}function o0(n,e,t,r,i,o,s){var a=xi(n,t),u=xi(e,t),l=s.get(u);if(l){_i(n,t,l);return}var c=o?o(a,u,t+"",n,e,s):void 0,p=c===void 0;if(p){var h=Qe(u),f=!h&&On(u),m=!h&&!f&&so(u);c=u,h||f||m?Qe(a)?c=a:r0(a)?c=Oa(a):f?(p=!1,c=fl(u,!0)):m?(p=!1,c=yl(u,!0)):c=[]:uo(u)||fi(u)?(c=a,fi(a)?c=i0(a):(!Ce(a)||An(a))&&(c=bl(u))):p=!1}p&&(s.set(u,c),i(c,u,r,o,s),s.delete(u)),_i(n,t,c)}function El(n,e,t,r,i){n!==e&&Xv(e,function(o,s){if(i||(i=new tt),Ce(o))o0(n,e,s,t,El,r,i);else{var a=r?r(xi(n,s),o,s+"",n,e,i):void 0;a===void 0&&(a=o),_i(n,s,a)}},cn)}var s0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a0=Qa(s0);const l0=a0;var $l=/[&<>"']/g,u0=RegExp($l.source);function c0(n){return n=Ht(n),n&&u0.test(n)?n.replace($l,l0):n}var d0="[object String]";function dn(n){return typeof n=="string"||!Qe(n)&&Ge(n)&&ft(n)==d0}function p0(n,e){return $a(e,function(t){return n[t]})}ot&&ot.isArrayBuffer;ot&&ot.isDate;function fo(n,e){return jl(n,e)}var h0=Ba(function(n,e,t){El(n,e,t)});const dt=h0;function f0(n,e,t,r){if(!Ce(n))return n;e=Fa(e,n);for(var i=-1,o=e.length,s=o-1,a=n;a!=null&&++i<o;){var u=La(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=Ce(c)?c:to(e[i+1])?[]:{})}ro(a,u,l),a=a[u]}return n}function Jr(n,e,t){return n==null?n:f0(n,e,t)}var Vl=Object.prototype,m0=Vl.hasOwnProperty;function bs(n,e,t,r){return n===void 0||ln(n,Vl[t])&&!m0.call(r,t)?e:n}var v0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function g0(n){return"\\"+v0[n]}var y0=/<%=([\s\S]+?)%>/g;const Cl=y0;var b0=/<%-([\s\S]+?)%>/g;const w0=b0;var _0=/<%([\s\S]+?)%>/g;const x0=_0;var S0={escape:w0,evaluate:x0,interpolate:Cl,variable:"",imports:{_:{escape:c0}}};const ws=S0;var j0="Invalid `variable` option passed into `_.template`",k0=/\b__p \+= '';/g,E0=/\b(__p \+=) '' \+/g,$0=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V0=/[()=,{}\[\]\/\s]/,C0=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jn=/($^)/,A0=/['\n\r\u2028\u2029\\]/g,O0=Object.prototype,_s=O0.hasOwnProperty;function Al(n,e,t){var r=ws.imports._.templateSettings||ws;t&&Ia(n,e,t)&&(e=void 0),n=Ht(n),e=Zo({},e,r,bs);var i=Zo({},e.imports,r.imports,bs),o=Or(i),s=p0(i,o),a,u,l=0,c=e.interpolate||Jn,p="__p += '",h=RegExp((e.escape||Jn).source+"|"+c.source+"|"+(c===Cl?C0:Jn).source+"|"+(e.evaluate||Jn).source+"|$","g"),f=_s.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+`
2
+ `:"";n.replace(h,function(g,S,y,w,E,j){return y||(y=w),p+=n.slice(l,j).replace(A0,g0),S&&(a=!0,p+=`' +
3
3
  __e(`+S+`) +
4
4
  '`),E&&(u=!0,p+=`';
5
5
  `+E+`;
6
6
  __p += '`),y&&(p+=`' +
7
7
  ((__t = (`+y+`)) == null ? '' : __t) +
8
8
  '`),l=j+g.length,g}),p+=`';
9
- `;var m=gs.call(e,"variable")&&e.variable;if(!m)p=`with (obj) {
9
+ `;var m=_s.call(e,"variable")&&e.variable;if(!m)p=`with (obj) {
10
10
  `+p+`
11
11
  }
12
- `;else if(S0.test(m))throw new Error(b0);p=(u?p.replace(w0,""):p).replace(_0,"$1").replace(x0,"$1;"),p="function("+(m||"obj")+`) {
12
+ `;else if(V0.test(m))throw new Error(j0);p=(u?p.replace(k0,""):p).replace(E0,"$1").replace($0,"$1;"),p="function("+(m||"obj")+`) {
13
13
  `+(m?"":`obj || (obj = {});
14
14
  `)+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?`, __j = Array.prototype.join;
15
15
  function print() { __p += __j.call(arguments, '') }
16
16
  `:`;
17
17
  `)+p+`return __p
18
- }`;var v=hf(function(){return Function(o,f+"return "+p).apply(void 0,s)});if(v.source=p,Ha(v))throw v;return v}var $0="Expected a function";function V0(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError($0);return Ce(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),Sl(n,e,{leading:r,maxWait:e,trailing:i})}function wr(n){return so(Rt(n))}var Re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Cl={exports:{}};function C0(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 ys={exports:{}},bs;function At(){return bs||(bs=1,function(n,e){(function(t,r){n.exports=r()})(Re,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 Re<"u"&&Re.crypto&&(o=Re.crypto),!o&&typeof C0=="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 y(){}return function(w){var E;return y.prototype=w,E=new y,y.prototype=null,E}}(),u={},l=u.lib={},c=l.Base=function(){return{extend:function(y){var w=a(this);return y&&w.mixIn(y),(!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 y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var w in y)y.hasOwnProperty(w)&&(this[w]=y[w]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=l.WordArray=c.extend({init:function(y,w){y=this.words=y||[],w!=i?this.sigBytes=w:this.sigBytes=y.length*4},toString:function(y){return(y||f).stringify(this)},concat:function(y){var w=this.words,E=y.words,j=this.sigBytes,_=y.sigBytes;if(this.clamp(),j%4)for(var V=0;V<_;V++){var D=E[V>>>2]>>>24-V%4*8&255;w[j+V>>>2]|=D<<24-(j+V)%4*8}else for(var Y=0;Y<_;Y+=4)w[j+Y>>>2]=E[Y>>>2];return this.sigBytes+=_,this},clamp:function(){var y=this.words,w=this.sigBytes;y[w>>>2]&=4294967295<<32-w%4*8,y.length=r.ceil(w/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var w=[],E=0;E<y;E+=4)w.push(s());return new p.init(w,y)}}),h=u.enc={},f=h.Hex={stringify:function(y){for(var w=y.words,E=y.sigBytes,j=[],_=0;_<E;_++){var V=w[_>>>2]>>>24-_%4*8&255;j.push((V>>>4).toString(16)),j.push((V&15).toString(16))}return j.join("")},parse:function(y){for(var w=y.length,E=[],j=0;j<w;j+=2)E[j>>>3]|=parseInt(y.substr(j,2),16)<<24-j%8*4;return new p.init(E,w/2)}},m=h.Latin1={stringify:function(y){for(var w=y.words,E=y.sigBytes,j=[],_=0;_<E;_++){var V=w[_>>>2]>>>24-_%4*8&255;j.push(String.fromCharCode(V))}return j.join("")},parse:function(y){for(var w=y.length,E=[],j=0;j<w;j++)E[j>>>2]|=(y.charCodeAt(j)&255)<<24-j%4*8;return new p.init(E,w)}},v=h.Utf8={stringify:function(y){try{return decodeURIComponent(escape(m.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return m.parse(unescape(encodeURIComponent(y)))}},g=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=v.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var w,E=this._data,j=E.words,_=E.sigBytes,V=this.blockSize,D=V*4,Y=_/D;y?Y=r.ceil(Y):Y=r.max((Y|0)-this._minBufferSize,0);var C=Y*V,A=r.min(C*4,_);if(C){for(var P=0;P<C;P+=V)this._doProcessBlock(j,P);w=j.splice(0,C),E.sigBytes-=A}return new p.init(w,A)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});l.Hasher=g.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var w=this._doFinalize();return w},blockSize:16,_createHelper:function(y){return function(w,E){return new y.init(E).finalize(w)}},_createHmacHelper:function(y){return function(w,E){return new S.HMAC.init(y,E).finalize(w)}}});var S=u.algo={};return u}(Math);return t})}(ys)),ys.exports}(function(n,e){(function(t,r){n.exports=r(At())})(Re,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,g){for(var S=0;S<16;S++){var y=g+S,w=v[y];v[y]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var E=this._hash.words,j=v[g+0],_=v[g+1],V=v[g+2],D=v[g+3],Y=v[g+4],C=v[g+5],A=v[g+6],P=v[g+7],T=v[g+8],K=v[g+9],F=v[g+10],q=v[g+11],X=v[g+12],Z=v[g+13],ee=v[g+14],te=v[g+15],M=E[0],L=E[1],H=E[2],W=E[3];M=p(M,L,H,W,j,7,l[0]),W=p(W,M,L,H,_,12,l[1]),H=p(H,W,M,L,V,17,l[2]),L=p(L,H,W,M,D,22,l[3]),M=p(M,L,H,W,Y,7,l[4]),W=p(W,M,L,H,C,12,l[5]),H=p(H,W,M,L,A,17,l[6]),L=p(L,H,W,M,P,22,l[7]),M=p(M,L,H,W,T,7,l[8]),W=p(W,M,L,H,K,12,l[9]),H=p(H,W,M,L,F,17,l[10]),L=p(L,H,W,M,q,22,l[11]),M=p(M,L,H,W,X,7,l[12]),W=p(W,M,L,H,Z,12,l[13]),H=p(H,W,M,L,ee,17,l[14]),L=p(L,H,W,M,te,22,l[15]),M=h(M,L,H,W,_,5,l[16]),W=h(W,M,L,H,A,9,l[17]),H=h(H,W,M,L,q,14,l[18]),L=h(L,H,W,M,j,20,l[19]),M=h(M,L,H,W,C,5,l[20]),W=h(W,M,L,H,F,9,l[21]),H=h(H,W,M,L,te,14,l[22]),L=h(L,H,W,M,Y,20,l[23]),M=h(M,L,H,W,K,5,l[24]),W=h(W,M,L,H,ee,9,l[25]),H=h(H,W,M,L,D,14,l[26]),L=h(L,H,W,M,T,20,l[27]),M=h(M,L,H,W,Z,5,l[28]),W=h(W,M,L,H,V,9,l[29]),H=h(H,W,M,L,P,14,l[30]),L=h(L,H,W,M,X,20,l[31]),M=f(M,L,H,W,C,4,l[32]),W=f(W,M,L,H,T,11,l[33]),H=f(H,W,M,L,q,16,l[34]),L=f(L,H,W,M,ee,23,l[35]),M=f(M,L,H,W,_,4,l[36]),W=f(W,M,L,H,Y,11,l[37]),H=f(H,W,M,L,P,16,l[38]),L=f(L,H,W,M,F,23,l[39]),M=f(M,L,H,W,Z,4,l[40]),W=f(W,M,L,H,j,11,l[41]),H=f(H,W,M,L,D,16,l[42]),L=f(L,H,W,M,A,23,l[43]),M=f(M,L,H,W,K,4,l[44]),W=f(W,M,L,H,X,11,l[45]),H=f(H,W,M,L,te,16,l[46]),L=f(L,H,W,M,V,23,l[47]),M=m(M,L,H,W,j,6,l[48]),W=m(W,M,L,H,P,10,l[49]),H=m(H,W,M,L,ee,15,l[50]),L=m(L,H,W,M,C,21,l[51]),M=m(M,L,H,W,X,6,l[52]),W=m(W,M,L,H,D,10,l[53]),H=m(H,W,M,L,F,15,l[54]),L=m(L,H,W,M,_,21,l[55]),M=m(M,L,H,W,T,6,l[56]),W=m(W,M,L,H,te,10,l[57]),H=m(H,W,M,L,A,15,l[58]),L=m(L,H,W,M,Z,21,l[59]),M=m(M,L,H,W,Y,6,l[60]),W=m(W,M,L,H,q,10,l[61]),H=m(H,W,M,L,V,15,l[62]),L=m(L,H,W,M,K,21,l[63]),E[0]=E[0]+M|0,E[1]=E[1]+L|0,E[2]=E[2]+H|0,E[3]=E[3]+W|0},_doFinalize:function(){var v=this._data,g=v.words,S=this._nDataBytes*8,y=v.sigBytes*8;g[y>>>5]|=128<<24-y%32;var w=r.floor(S/4294967296),E=S;g[(y+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g[(y+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,v.sigBytes=(g.length+1)*4,this._process();for(var j=this._hash,_=j.words,V=0;V<4;V++){var D=_[V];_[V]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return j},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});function p(v,g,S,y,w,E,j){var _=v+(g&S|~g&y)+w+j;return(_<<E|_>>>32-E)+g}function h(v,g,S,y,w,E,j){var _=v+(g&y|S&~y)+w+j;return(_<<E|_>>>32-E)+g}function f(v,g,S,y,w,E,j){var _=v+(g^S^y)+w+j;return(_<<E|_>>>32-E)+g}function m(v,g,S,y,w,E,j){var _=v+(S^(g|~y))+w+j;return(_<<E|_>>>32-E)+g}i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),t.MD5})})(Cl);var Al=Cl.exports;pn(Al);var Ol={exports:{}};(function(n,e){(function(t,r){n.exports=r(At())})(Re,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,p=this._map;u.clamp();for(var h=[],f=0;f<c;f+=3)for(var m=l[f>>>2]>>>24-f%4*8&255,v=l[f+1>>>2]>>>24-(f+1)%4*8&255,g=l[f+2>>>2]>>>24-(f+2)%4*8&255,S=m<<16|v<<8|g,y=0;y<4&&f+y*.75<c;y++)h.push(p.charAt(S>>>6*(3-y)&63));var w=p.charAt(64);if(w)for(;h.length%4;)h.push(w);return h.join("")},parse:function(u){var l=u.length,c=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h<c.length;h++)p[c.charCodeAt(h)]=h}var f=c.charAt(64);if(f){var m=u.indexOf(f);m!==-1&&(l=m)}return a(u,l,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,l,c){for(var p=[],h=0,f=0;f<l;f++)if(f%4){var m=c[u.charCodeAt(f-1)]<<f%4*2,v=c[u.charCodeAt(f)]>>>6-f%4*2,g=m|v;p[h>>>2]|=g<<24-h%4*8,h++}return o.create(p,h)}}(),t.enc.Base64})})(Ol);var Tl=Ol.exports;pn(Tl);var Dl={exports:{}};(function(n,e){(function(t,r){n.exports=r(At())})(Re,function(t){return t.enc.Utf8})})(Dl);var A0=Dl.exports;pn(A0);var Il={exports:{}},ws={exports:{}},_s={exports:{}},xs;function O0(){return xs||(xs=1,function(n,e){(function(t,r){n.exports=r(At())})(Re,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,p){for(var h=this._hash.words,f=h[0],m=h[1],v=h[2],g=h[3],S=h[4],y=0;y<80;y++){if(y<16)u[y]=c[p+y]|0;else{var w=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=w<<1|w>>>31}var E=(f<<5|f>>>27)+S+u[y];y<20?E+=(m&v|~m&g)+1518500249:y<40?E+=(m^v^g)+1859775393:y<60?E+=(m&v|m&g|v&g)-1894007588:E+=(m^v^g)-899497514,S=g,g=v,v=m<<30|m>>>2,m=f,f=E}h[0]=h[0]+f|0,h[1]=h[1]+m|0,h[2]=h[2]+v|0,h[3]=h[3]+g|0,h[4]=h[4]+S|0},_doFinalize:function(){var c=this._data,p=c.words,h=this._nDataBytes*8,f=c.sigBytes*8;return p[f>>>5]|=128<<24-f%32,p[(f+64>>>9<<4)+14]=Math.floor(h/4294967296),p[(f+64>>>9<<4)+15]=h,c.sigBytes=p.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})}(_s)),_s.exports}var Ss={exports:{}},js;function T0(){return js||(js=1,function(n,e){(function(t,r){n.exports=r(At())})(Re,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 p=l.blockSize,h=p*4;c.sigBytes>h&&(c=l.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),m=this._iKey=c.clone(),v=f.words,g=m.words,S=0;S<p;S++)v[S]^=1549556828,g[S]^=909522486;f.sigBytes=m.sigBytes=h,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,p=c.finalize(l);c.reset();var h=c.finalize(this._oKey.clone().concat(p));return h}})})()})}(Ss)),Ss.exports}var ks;function Bl(){return ks||(ks=1,function(n,e){(function(t,r,i){n.exports=r(At(),O0(),T0())})(Re,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,p){for(var h,f=this.cfg,m=f.hasher.create(),v=s.create(),g=v.words,S=f.keySize,y=f.iterations;g.length<S;){h&&m.update(h),h=m.update(c).finalize(p),m.reset();for(var w=1;w<y;w++)h=m.finalize(h),m.reset();v.concat(h)}return v.sigBytes=S*4,v}});r.EvpKDF=function(c,p,h){return l.create(h).compute(c,p)}}(),t.EvpKDF})}(ws)),ws.exports}var Es={exports:{}},$s;function D0(){return $s||($s=1,function(n,e){(function(t,r,i){n.exports=r(At(),Bl())})(Re,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,p=i.algo,h=p.EvpKDF,f=o.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(C,A){return this.create(this._ENC_XFORM_MODE,C,A)},createDecryptor:function(C,A){return this.create(this._DEC_XFORM_MODE,C,A)},init:function(C,A,P){this.cfg=this.cfg.extend(P),this._xformMode=C,this._key=A,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var A=this._doFinalize();return A},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(A){return typeof A=="string"?Y:_}return function(A){return{encrypt:function(P,T,K){return C(T).encrypt(A,P,T,K)},decrypt:function(P,T,K){return C(T).decrypt(A,P,T,K)}}}}()});o.StreamCipher=f.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1});var m=i.mode={},v=o.BlockCipherMode=s.extend({createEncryptor:function(C,A){return this.Encryptor.create(C,A)},createDecryptor:function(C,A){return this.Decryptor.create(C,A)},init:function(C,A){this._cipher=C,this._iv=A}}),g=m.CBC=function(){var C=v.extend();C.Encryptor=C.extend({processBlock:function(P,T){var K=this._cipher,F=K.blockSize;A.call(this,P,T,F),K.encryptBlock(P,T),this._prevBlock=P.slice(T,T+F)}}),C.Decryptor=C.extend({processBlock:function(P,T){var K=this._cipher,F=K.blockSize,q=P.slice(T,T+F);K.decryptBlock(P,T),A.call(this,P,T,F),this._prevBlock=q}});function A(P,T,K){var F,q=this._iv;q?(F=q,this._iv=r):F=this._prevBlock;for(var X=0;X<K;X++)P[T+X]^=F[X]}return C}(),S=i.pad={},y=S.Pkcs7={pad:function(C,A){for(var P=A*4,T=P-C.sigBytes%P,K=T<<24|T<<16|T<<8|T,F=[],q=0;q<T;q+=4)F.push(K);var X=a.create(F,T);C.concat(X)},unpad:function(C){var A=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=A}};o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:g,padding:y}),reset:function(){var C;f.reset.call(this);var A=this.cfg,P=A.iv,T=A.mode;this._xformMode==this._ENC_XFORM_MODE?C=T.createEncryptor:(C=T.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,P&&P.words):(this._mode=C.call(T,this,P&&P.words),this._mode.__creator=C)},_doProcessBlock:function(C,A){this._mode.processBlock(C,A)},_doFinalize:function(){var C,A=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(A.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),A.unpad(C)),C},blockSize:128/32});var w=o.CipherParams=s.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),E=i.format={},j=E.OpenSSL={stringify:function(C){var A,P=C.ciphertext,T=C.salt;return T?A=a.create([1398893684,1701076831]).concat(T).concat(P):A=P,A.toString(c)},parse:function(C){var A,P=c.parse(C),T=P.words;return T[0]==1398893684&&T[1]==1701076831&&(A=a.create(T.slice(2,4)),T.splice(0,4),P.sigBytes-=16),w.create({ciphertext:P,salt:A})}},_=o.SerializableCipher=s.extend({cfg:s.extend({format:j}),encrypt:function(C,A,P,T){T=this.cfg.extend(T);var K=C.createEncryptor(P,T),F=K.finalize(A),q=K.cfg;return w.create({ciphertext:F,key:P,iv:q.iv,algorithm:C,mode:q.mode,padding:q.padding,blockSize:C.blockSize,formatter:T.format})},decrypt:function(C,A,P,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var K=C.createDecryptor(P,T).finalize(A.ciphertext);return K},_parse:function(C,A){return typeof C=="string"?A.parse(C,this):C}}),V=i.kdf={},D=V.OpenSSL={execute:function(C,A,P,T,K){if(T||(T=a.random(64/8)),K)var F=h.create({keySize:A+P,hasher:K}).compute(C,T);else var F=h.create({keySize:A+P}).compute(C,T);var q=a.create(F.words.slice(A),P*4);return F.sigBytes=A*4,w.create({key:F,iv:q,salt:T})}},Y=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:D}),encrypt:function(C,A,P,T){T=this.cfg.extend(T);var K=T.kdf.execute(P,C.keySize,C.ivSize,T.salt,T.hasher);T.iv=K.iv;var F=_.encrypt.call(this,C,A,K.key,T);return F.mixIn(K),F},decrypt:function(C,A,P,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var K=T.kdf.execute(P,C.keySize,C.ivSize,A.salt,T.hasher);T.iv=K.iv;var F=_.decrypt.call(this,C,A,K.key,T);return F}})}()})}(Es)),Es.exports}(function(n,e){(function(t,r,i){n.exports=r(At(),Tl,Al,Bl(),D0())})(Re,function(t){return function(){var r=t,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],u=[],l=[],c=[],p=[],h=[],f=[],m=[],v=[],g=[];(function(){for(var w=[],E=0;E<256;E++)E<128?w[E]=E<<1:w[E]=E<<1^283;for(var j=0,_=0,E=0;E<256;E++){var V=_^_<<1^_<<2^_<<3^_<<4;V=V>>>8^V&255^99,a[j]=V,u[V]=j;var D=w[j],Y=w[D],C=w[Y],A=w[V]*257^V*16843008;l[j]=A<<24|A>>>8,c[j]=A<<16|A>>>16,p[j]=A<<8|A>>>24,h[j]=A;var A=C*16843009^Y*65537^D*257^j*16843008;f[V]=A<<24|A>>>8,m[V]=A<<16|A>>>16,v[V]=A<<8|A>>>24,g[V]=A,j?(j=D^w[w[w[C^D]]],_^=w[w[_]]):j=_=1}})();var S=[0,1,2,4,8,16,32,64,128,27,54],y=s.AES=o.extend({_doReset:function(){var w;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var E=this._keyPriorReset=this._key,j=E.words,_=E.sigBytes/4,V=this._nRounds=_+6,D=(V+1)*4,Y=this._keySchedule=[],C=0;C<D;C++)C<_?Y[C]=j[C]:(w=Y[C-1],C%_?_>6&&C%_==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[C/_|0]<<24),Y[C]=Y[C-_]^w);for(var A=this._invKeySchedule=[],P=0;P<D;P++){var C=D-P;if(P%4)var w=Y[C];else var w=Y[C-4];P<4||C<=4?A[P]=w:A[P]=f[a[w>>>24]]^m[a[w>>>16&255]]^v[a[w>>>8&255]]^g[a[w&255]]}}},encryptBlock:function(w,E){this._doCryptBlock(w,E,this._keySchedule,l,c,p,h,a)},decryptBlock:function(w,E){var j=w[E+1];w[E+1]=w[E+3],w[E+3]=j,this._doCryptBlock(w,E,this._invKeySchedule,f,m,v,g,u);var j=w[E+1];w[E+1]=w[E+3],w[E+3]=j},_doCryptBlock:function(w,E,j,_,V,D,Y,C){for(var A=this._nRounds,P=w[E]^j[0],T=w[E+1]^j[1],K=w[E+2]^j[2],F=w[E+3]^j[3],q=4,X=1;X<A;X++){var Z=_[P>>>24]^V[T>>>16&255]^D[K>>>8&255]^Y[F&255]^j[q++],ee=_[T>>>24]^V[K>>>16&255]^D[F>>>8&255]^Y[P&255]^j[q++],te=_[K>>>24]^V[F>>>16&255]^D[P>>>8&255]^Y[T&255]^j[q++],M=_[F>>>24]^V[P>>>16&255]^D[T>>>8&255]^Y[K&255]^j[q++];P=Z,T=ee,K=te,F=M}var Z=(C[P>>>24]<<24|C[T>>>16&255]<<16|C[K>>>8&255]<<8|C[F&255])^j[q++],ee=(C[T>>>24]<<24|C[K>>>16&255]<<16|C[F>>>8&255]<<8|C[P&255])^j[q++],te=(C[K>>>24]<<24|C[F>>>16&255]<<16|C[P>>>8&255]<<8|C[T&255])^j[q++],M=(C[F>>>24]<<24|C[P>>>16&255]<<16|C[T>>>8&255]<<8|C[K&255])^j[q++];w[E]=Z,w[E+1]=ee,w[E+2]=te,w[E+3]=M},keySize:256/32});r.AES=o._createHelper(y)}(),t.AES})})(Il);var I0=Il.exports;pn(I0);var B0="0123456789abcdefghijklmnopqrstuvwxyz";function Vs(n){return B0.charAt(n)}function R0(n,e){return n&e}function Wn(n,e){return n|e}function Cs(n,e){return n^e}function As(n,e){return n&~e}function M0(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 P0(n){for(var e=0;n!=0;)n&=n-1,++e;return e}var yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z0="=";function Os(n){var e,t,r="";for(e=0;e+3<=n.length;e+=3)t=parseInt(n.substring(e,e+3),16),r+=yn.charAt(t>>6)+yn.charAt(t&63);for(e+1==n.length?(t=parseInt(n.substring(e,e+1),16),r+=yn.charAt(t<<2)):e+2==n.length&&(t=parseInt(n.substring(e,e+2),16),r+=yn.charAt(t>>2)+yn.charAt((t&3)<<4));(r.length&3)>0;)r+=z0;return r}var Wt,N0={decode:function(n){var e;if(Wt===void 0){var t="0123456789ABCDEF",r=` \f
19
- \r  \u2028\u2029`;for(Wt={},e=0;e<16;++e)Wt[t.charAt(e)]=e;for(t=t.toLowerCase(),e=10;e<16;++e)Wt[t.charAt(e)]=e;for(e=0;e<r.length;++e)Wt[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=Wt[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}},Bt,_i={decode:function(n){var e;if(Bt===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
20
- \r  \u2028\u2029`;for(Bt=Object.create(null),e=0;e<64;++e)Bt[t.charAt(e)]=e;for(Bt["-"]=62,Bt._=63,e=0;e<r.length;++e)Bt[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=Bt[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=_i.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 _i.decode(n)}},Jt=1e13,wn=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<Jt?t=0:(t=0|s/Jt,s-=t*Jt),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+=Jt,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+=(Jt+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*Jt+e[r];return t},n.prototype.simplify=function(){var e=this.buf;return e.length==1?e[0]:this},n}(),Rl="…",F0=/^(\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)?)?$/,L0=/^(\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 en(n,e){return n.length>e&&(n=n.substring(0,e)+Rl),n}var Wr=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+=`
21
- `;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?F0:L0).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)
18
+ }`;var v=yf(function(){return Function(o,f+"return "+p).apply(void 0,s)});if(v.source=p,qa(v))throw v;return v}var T0="Expected a function";function D0(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(T0);return Ce(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),kl(n,e,{leading:r,maxWait:e,trailing:i})}function xr(n){return co(Rt(n))}var Re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ol={exports:{}};function I0(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 xs={exports:{}},Ss;function At(){return Ss||(Ss=1,function(n,e){(function(t,r){n.exports=r()})(Re,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 Re<"u"&&Re.crypto&&(o=Re.crypto),!o&&typeof I0=="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 y(){}return function(w){var E;return y.prototype=w,E=new y,y.prototype=null,E}}(),u={},l=u.lib={},c=l.Base=function(){return{extend:function(y){var w=a(this);return y&&w.mixIn(y),(!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 y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var w in y)y.hasOwnProperty(w)&&(this[w]=y[w]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=l.WordArray=c.extend({init:function(y,w){y=this.words=y||[],w!=i?this.sigBytes=w:this.sigBytes=y.length*4},toString:function(y){return(y||f).stringify(this)},concat:function(y){var w=this.words,E=y.words,j=this.sigBytes,_=y.sigBytes;if(this.clamp(),j%4)for(var V=0;V<_;V++){var D=E[V>>>2]>>>24-V%4*8&255;w[j+V>>>2]|=D<<24-(j+V)%4*8}else for(var Y=0;Y<_;Y+=4)w[j+Y>>>2]=E[Y>>>2];return this.sigBytes+=_,this},clamp:function(){var y=this.words,w=this.sigBytes;y[w>>>2]&=4294967295<<32-w%4*8,y.length=r.ceil(w/4)},clone:function(){var y=c.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var w=[],E=0;E<y;E+=4)w.push(s());return new p.init(w,y)}}),h=u.enc={},f=h.Hex={stringify:function(y){for(var w=y.words,E=y.sigBytes,j=[],_=0;_<E;_++){var V=w[_>>>2]>>>24-_%4*8&255;j.push((V>>>4).toString(16)),j.push((V&15).toString(16))}return j.join("")},parse:function(y){for(var w=y.length,E=[],j=0;j<w;j+=2)E[j>>>3]|=parseInt(y.substr(j,2),16)<<24-j%8*4;return new p.init(E,w/2)}},m=h.Latin1={stringify:function(y){for(var w=y.words,E=y.sigBytes,j=[],_=0;_<E;_++){var V=w[_>>>2]>>>24-_%4*8&255;j.push(String.fromCharCode(V))}return j.join("")},parse:function(y){for(var w=y.length,E=[],j=0;j<w;j++)E[j>>>2]|=(y.charCodeAt(j)&255)<<24-j%4*8;return new p.init(E,w)}},v=h.Utf8={stringify:function(y){try{return decodeURIComponent(escape(m.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return m.parse(unescape(encodeURIComponent(y)))}},g=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=v.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var w,E=this._data,j=E.words,_=E.sigBytes,V=this.blockSize,D=V*4,Y=_/D;y?Y=r.ceil(Y):Y=r.max((Y|0)-this._minBufferSize,0);var C=Y*V,A=r.min(C*4,_);if(C){for(var P=0;P<C;P+=V)this._doProcessBlock(j,P);w=j.splice(0,C),E.sigBytes-=A}return new p.init(w,A)},clone:function(){var y=c.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});l.Hasher=g.extend({cfg:c.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var w=this._doFinalize();return w},blockSize:16,_createHelper:function(y){return function(w,E){return new y.init(E).finalize(w)}},_createHmacHelper:function(y){return function(w,E){return new S.HMAC.init(y,E).finalize(w)}}});var S=u.algo={};return u}(Math);return t})}(xs)),xs.exports}(function(n,e){(function(t,r){n.exports=r(At())})(Re,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,g){for(var S=0;S<16;S++){var y=g+S,w=v[y];v[y]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var E=this._hash.words,j=v[g+0],_=v[g+1],V=v[g+2],D=v[g+3],Y=v[g+4],C=v[g+5],A=v[g+6],P=v[g+7],T=v[g+8],K=v[g+9],F=v[g+10],q=v[g+11],X=v[g+12],Z=v[g+13],ee=v[g+14],te=v[g+15],M=E[0],L=E[1],H=E[2],W=E[3];M=p(M,L,H,W,j,7,l[0]),W=p(W,M,L,H,_,12,l[1]),H=p(H,W,M,L,V,17,l[2]),L=p(L,H,W,M,D,22,l[3]),M=p(M,L,H,W,Y,7,l[4]),W=p(W,M,L,H,C,12,l[5]),H=p(H,W,M,L,A,17,l[6]),L=p(L,H,W,M,P,22,l[7]),M=p(M,L,H,W,T,7,l[8]),W=p(W,M,L,H,K,12,l[9]),H=p(H,W,M,L,F,17,l[10]),L=p(L,H,W,M,q,22,l[11]),M=p(M,L,H,W,X,7,l[12]),W=p(W,M,L,H,Z,12,l[13]),H=p(H,W,M,L,ee,17,l[14]),L=p(L,H,W,M,te,22,l[15]),M=h(M,L,H,W,_,5,l[16]),W=h(W,M,L,H,A,9,l[17]),H=h(H,W,M,L,q,14,l[18]),L=h(L,H,W,M,j,20,l[19]),M=h(M,L,H,W,C,5,l[20]),W=h(W,M,L,H,F,9,l[21]),H=h(H,W,M,L,te,14,l[22]),L=h(L,H,W,M,Y,20,l[23]),M=h(M,L,H,W,K,5,l[24]),W=h(W,M,L,H,ee,9,l[25]),H=h(H,W,M,L,D,14,l[26]),L=h(L,H,W,M,T,20,l[27]),M=h(M,L,H,W,Z,5,l[28]),W=h(W,M,L,H,V,9,l[29]),H=h(H,W,M,L,P,14,l[30]),L=h(L,H,W,M,X,20,l[31]),M=f(M,L,H,W,C,4,l[32]),W=f(W,M,L,H,T,11,l[33]),H=f(H,W,M,L,q,16,l[34]),L=f(L,H,W,M,ee,23,l[35]),M=f(M,L,H,W,_,4,l[36]),W=f(W,M,L,H,Y,11,l[37]),H=f(H,W,M,L,P,16,l[38]),L=f(L,H,W,M,F,23,l[39]),M=f(M,L,H,W,Z,4,l[40]),W=f(W,M,L,H,j,11,l[41]),H=f(H,W,M,L,D,16,l[42]),L=f(L,H,W,M,A,23,l[43]),M=f(M,L,H,W,K,4,l[44]),W=f(W,M,L,H,X,11,l[45]),H=f(H,W,M,L,te,16,l[46]),L=f(L,H,W,M,V,23,l[47]),M=m(M,L,H,W,j,6,l[48]),W=m(W,M,L,H,P,10,l[49]),H=m(H,W,M,L,ee,15,l[50]),L=m(L,H,W,M,C,21,l[51]),M=m(M,L,H,W,X,6,l[52]),W=m(W,M,L,H,D,10,l[53]),H=m(H,W,M,L,F,15,l[54]),L=m(L,H,W,M,_,21,l[55]),M=m(M,L,H,W,T,6,l[56]),W=m(W,M,L,H,te,10,l[57]),H=m(H,W,M,L,A,15,l[58]),L=m(L,H,W,M,Z,21,l[59]),M=m(M,L,H,W,Y,6,l[60]),W=m(W,M,L,H,q,10,l[61]),H=m(H,W,M,L,V,15,l[62]),L=m(L,H,W,M,K,21,l[63]),E[0]=E[0]+M|0,E[1]=E[1]+L|0,E[2]=E[2]+H|0,E[3]=E[3]+W|0},_doFinalize:function(){var v=this._data,g=v.words,S=this._nDataBytes*8,y=v.sigBytes*8;g[y>>>5]|=128<<24-y%32;var w=r.floor(S/4294967296),E=S;g[(y+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g[(y+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,v.sigBytes=(g.length+1)*4,this._process();for(var j=this._hash,_=j.words,V=0;V<4;V++){var D=_[V];_[V]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return j},clone:function(){var v=a.clone.call(this);return v._hash=this._hash.clone(),v}});function p(v,g,S,y,w,E,j){var _=v+(g&S|~g&y)+w+j;return(_<<E|_>>>32-E)+g}function h(v,g,S,y,w,E,j){var _=v+(g&y|S&~y)+w+j;return(_<<E|_>>>32-E)+g}function f(v,g,S,y,w,E,j){var _=v+(g^S^y)+w+j;return(_<<E|_>>>32-E)+g}function m(v,g,S,y,w,E,j){var _=v+(S^(g|~y))+w+j;return(_<<E|_>>>32-E)+g}i.MD5=a._createHelper(c),i.HmacMD5=a._createHmacHelper(c)}(Math),t.MD5})})(Ol);var Tl=Ol.exports;pn(Tl);var Dl={exports:{}};(function(n,e){(function(t,r){n.exports=r(At())})(Re,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,p=this._map;u.clamp();for(var h=[],f=0;f<c;f+=3)for(var m=l[f>>>2]>>>24-f%4*8&255,v=l[f+1>>>2]>>>24-(f+1)%4*8&255,g=l[f+2>>>2]>>>24-(f+2)%4*8&255,S=m<<16|v<<8|g,y=0;y<4&&f+y*.75<c;y++)h.push(p.charAt(S>>>6*(3-y)&63));var w=p.charAt(64);if(w)for(;h.length%4;)h.push(w);return h.join("")},parse:function(u){var l=u.length,c=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var h=0;h<c.length;h++)p[c.charCodeAt(h)]=h}var f=c.charAt(64);if(f){var m=u.indexOf(f);m!==-1&&(l=m)}return a(u,l,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(u,l,c){for(var p=[],h=0,f=0;f<l;f++)if(f%4){var m=c[u.charCodeAt(f-1)]<<f%4*2,v=c[u.charCodeAt(f)]>>>6-f%4*2,g=m|v;p[h>>>2]|=g<<24-h%4*8,h++}return o.create(p,h)}}(),t.enc.Base64})})(Dl);var Il=Dl.exports;pn(Il);var Bl={exports:{}};(function(n,e){(function(t,r){n.exports=r(At())})(Re,function(t){return t.enc.Utf8})})(Bl);var B0=Bl.exports;pn(B0);var Rl={exports:{}},js={exports:{}},ks={exports:{}},Es;function R0(){return Es||(Es=1,function(n,e){(function(t,r){n.exports=r(At())})(Re,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,p){for(var h=this._hash.words,f=h[0],m=h[1],v=h[2],g=h[3],S=h[4],y=0;y<80;y++){if(y<16)u[y]=c[p+y]|0;else{var w=u[y-3]^u[y-8]^u[y-14]^u[y-16];u[y]=w<<1|w>>>31}var E=(f<<5|f>>>27)+S+u[y];y<20?E+=(m&v|~m&g)+1518500249:y<40?E+=(m^v^g)+1859775393:y<60?E+=(m&v|m&g|v&g)-1894007588:E+=(m^v^g)-899497514,S=g,g=v,v=m<<30|m>>>2,m=f,f=E}h[0]=h[0]+f|0,h[1]=h[1]+m|0,h[2]=h[2]+v|0,h[3]=h[3]+g|0,h[4]=h[4]+S|0},_doFinalize:function(){var c=this._data,p=c.words,h=this._nDataBytes*8,f=c.sigBytes*8;return p[f>>>5]|=128<<24-f%32,p[(f+64>>>9<<4)+14]=Math.floor(h/4294967296),p[(f+64>>>9<<4)+15]=h,c.sigBytes=p.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})}(ks)),ks.exports}var $s={exports:{}},Vs;function M0(){return Vs||(Vs=1,function(n,e){(function(t,r){n.exports=r(At())})(Re,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 p=l.blockSize,h=p*4;c.sigBytes>h&&(c=l.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),m=this._iKey=c.clone(),v=f.words,g=m.words,S=0;S<p;S++)v[S]^=1549556828,g[S]^=909522486;f.sigBytes=m.sigBytes=h,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,p=c.finalize(l);c.reset();var h=c.finalize(this._oKey.clone().concat(p));return h}})})()})}($s)),$s.exports}var Cs;function Ml(){return Cs||(Cs=1,function(n,e){(function(t,r,i){n.exports=r(At(),R0(),M0())})(Re,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,p){for(var h,f=this.cfg,m=f.hasher.create(),v=s.create(),g=v.words,S=f.keySize,y=f.iterations;g.length<S;){h&&m.update(h),h=m.update(c).finalize(p),m.reset();for(var w=1;w<y;w++)h=m.finalize(h),m.reset();v.concat(h)}return v.sigBytes=S*4,v}});r.EvpKDF=function(c,p,h){return l.create(h).compute(c,p)}}(),t.EvpKDF})}(js)),js.exports}var As={exports:{}},Os;function P0(){return Os||(Os=1,function(n,e){(function(t,r,i){n.exports=r(At(),Ml())})(Re,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,p=i.algo,h=p.EvpKDF,f=o.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(C,A){return this.create(this._ENC_XFORM_MODE,C,A)},createDecryptor:function(C,A){return this.create(this._DEC_XFORM_MODE,C,A)},init:function(C,A,P){this.cfg=this.cfg.extend(P),this._xformMode=C,this._key=A,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(C){return this._append(C),this._process()},finalize:function(C){C&&this._append(C);var A=this._doFinalize();return A},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function C(A){return typeof A=="string"?Y:_}return function(A){return{encrypt:function(P,T,K){return C(T).encrypt(A,P,T,K)},decrypt:function(P,T,K){return C(T).decrypt(A,P,T,K)}}}}()});o.StreamCipher=f.extend({_doFinalize:function(){var C=this._process(!0);return C},blockSize:1});var m=i.mode={},v=o.BlockCipherMode=s.extend({createEncryptor:function(C,A){return this.Encryptor.create(C,A)},createDecryptor:function(C,A){return this.Decryptor.create(C,A)},init:function(C,A){this._cipher=C,this._iv=A}}),g=m.CBC=function(){var C=v.extend();C.Encryptor=C.extend({processBlock:function(P,T){var K=this._cipher,F=K.blockSize;A.call(this,P,T,F),K.encryptBlock(P,T),this._prevBlock=P.slice(T,T+F)}}),C.Decryptor=C.extend({processBlock:function(P,T){var K=this._cipher,F=K.blockSize,q=P.slice(T,T+F);K.decryptBlock(P,T),A.call(this,P,T,F),this._prevBlock=q}});function A(P,T,K){var F,q=this._iv;q?(F=q,this._iv=r):F=this._prevBlock;for(var X=0;X<K;X++)P[T+X]^=F[X]}return C}(),S=i.pad={},y=S.Pkcs7={pad:function(C,A){for(var P=A*4,T=P-C.sigBytes%P,K=T<<24|T<<16|T<<8|T,F=[],q=0;q<T;q+=4)F.push(K);var X=a.create(F,T);C.concat(X)},unpad:function(C){var A=C.words[C.sigBytes-1>>>2]&255;C.sigBytes-=A}};o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:g,padding:y}),reset:function(){var C;f.reset.call(this);var A=this.cfg,P=A.iv,T=A.mode;this._xformMode==this._ENC_XFORM_MODE?C=T.createEncryptor:(C=T.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==C?this._mode.init(this,P&&P.words):(this._mode=C.call(T,this,P&&P.words),this._mode.__creator=C)},_doProcessBlock:function(C,A){this._mode.processBlock(C,A)},_doFinalize:function(){var C,A=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(A.pad(this._data,this.blockSize),C=this._process(!0)):(C=this._process(!0),A.unpad(C)),C},blockSize:128/32});var w=o.CipherParams=s.extend({init:function(C){this.mixIn(C)},toString:function(C){return(C||this.formatter).stringify(this)}}),E=i.format={},j=E.OpenSSL={stringify:function(C){var A,P=C.ciphertext,T=C.salt;return T?A=a.create([1398893684,1701076831]).concat(T).concat(P):A=P,A.toString(c)},parse:function(C){var A,P=c.parse(C),T=P.words;return T[0]==1398893684&&T[1]==1701076831&&(A=a.create(T.slice(2,4)),T.splice(0,4),P.sigBytes-=16),w.create({ciphertext:P,salt:A})}},_=o.SerializableCipher=s.extend({cfg:s.extend({format:j}),encrypt:function(C,A,P,T){T=this.cfg.extend(T);var K=C.createEncryptor(P,T),F=K.finalize(A),q=K.cfg;return w.create({ciphertext:F,key:P,iv:q.iv,algorithm:C,mode:q.mode,padding:q.padding,blockSize:C.blockSize,formatter:T.format})},decrypt:function(C,A,P,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var K=C.createDecryptor(P,T).finalize(A.ciphertext);return K},_parse:function(C,A){return typeof C=="string"?A.parse(C,this):C}}),V=i.kdf={},D=V.OpenSSL={execute:function(C,A,P,T,K){if(T||(T=a.random(64/8)),K)var F=h.create({keySize:A+P,hasher:K}).compute(C,T);else var F=h.create({keySize:A+P}).compute(C,T);var q=a.create(F.words.slice(A),P*4);return F.sigBytes=A*4,w.create({key:F,iv:q,salt:T})}},Y=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:D}),encrypt:function(C,A,P,T){T=this.cfg.extend(T);var K=T.kdf.execute(P,C.keySize,C.ivSize,T.salt,T.hasher);T.iv=K.iv;var F=_.encrypt.call(this,C,A,K.key,T);return F.mixIn(K),F},decrypt:function(C,A,P,T){T=this.cfg.extend(T),A=this._parse(A,T.format);var K=T.kdf.execute(P,C.keySize,C.ivSize,A.salt,T.hasher);T.iv=K.iv;var F=_.decrypt.call(this,C,A,K.key,T);return F}})}()})}(As)),As.exports}(function(n,e){(function(t,r,i){n.exports=r(At(),Il,Tl,Ml(),P0())})(Re,function(t){return function(){var r=t,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],u=[],l=[],c=[],p=[],h=[],f=[],m=[],v=[],g=[];(function(){for(var w=[],E=0;E<256;E++)E<128?w[E]=E<<1:w[E]=E<<1^283;for(var j=0,_=0,E=0;E<256;E++){var V=_^_<<1^_<<2^_<<3^_<<4;V=V>>>8^V&255^99,a[j]=V,u[V]=j;var D=w[j],Y=w[D],C=w[Y],A=w[V]*257^V*16843008;l[j]=A<<24|A>>>8,c[j]=A<<16|A>>>16,p[j]=A<<8|A>>>24,h[j]=A;var A=C*16843009^Y*65537^D*257^j*16843008;f[V]=A<<24|A>>>8,m[V]=A<<16|A>>>16,v[V]=A<<8|A>>>24,g[V]=A,j?(j=D^w[w[w[C^D]]],_^=w[w[_]]):j=_=1}})();var S=[0,1,2,4,8,16,32,64,128,27,54],y=s.AES=o.extend({_doReset:function(){var w;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var E=this._keyPriorReset=this._key,j=E.words,_=E.sigBytes/4,V=this._nRounds=_+6,D=(V+1)*4,Y=this._keySchedule=[],C=0;C<D;C++)C<_?Y[C]=j[C]:(w=Y[C-1],C%_?_>6&&C%_==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[C/_|0]<<24),Y[C]=Y[C-_]^w);for(var A=this._invKeySchedule=[],P=0;P<D;P++){var C=D-P;if(P%4)var w=Y[C];else var w=Y[C-4];P<4||C<=4?A[P]=w:A[P]=f[a[w>>>24]]^m[a[w>>>16&255]]^v[a[w>>>8&255]]^g[a[w&255]]}}},encryptBlock:function(w,E){this._doCryptBlock(w,E,this._keySchedule,l,c,p,h,a)},decryptBlock:function(w,E){var j=w[E+1];w[E+1]=w[E+3],w[E+3]=j,this._doCryptBlock(w,E,this._invKeySchedule,f,m,v,g,u);var j=w[E+1];w[E+1]=w[E+3],w[E+3]=j},_doCryptBlock:function(w,E,j,_,V,D,Y,C){for(var A=this._nRounds,P=w[E]^j[0],T=w[E+1]^j[1],K=w[E+2]^j[2],F=w[E+3]^j[3],q=4,X=1;X<A;X++){var Z=_[P>>>24]^V[T>>>16&255]^D[K>>>8&255]^Y[F&255]^j[q++],ee=_[T>>>24]^V[K>>>16&255]^D[F>>>8&255]^Y[P&255]^j[q++],te=_[K>>>24]^V[F>>>16&255]^D[P>>>8&255]^Y[T&255]^j[q++],M=_[F>>>24]^V[P>>>16&255]^D[T>>>8&255]^Y[K&255]^j[q++];P=Z,T=ee,K=te,F=M}var Z=(C[P>>>24]<<24|C[T>>>16&255]<<16|C[K>>>8&255]<<8|C[F&255])^j[q++],ee=(C[T>>>24]<<24|C[K>>>16&255]<<16|C[F>>>8&255]<<8|C[P&255])^j[q++],te=(C[K>>>24]<<24|C[F>>>16&255]<<16|C[P>>>8&255]<<8|C[T&255])^j[q++],M=(C[F>>>24]<<24|C[P>>>16&255]<<16|C[T>>>8&255]<<8|C[K&255])^j[q++];w[E]=Z,w[E+1]=ee,w[E+2]=te,w[E+3]=M},keySize:256/32});r.AES=o._createHelper(y)}(),t.AES})})(Rl);var z0=Rl.exports;pn(z0);var N0="0123456789abcdefghijklmnopqrstuvwxyz";function Ts(n){return N0.charAt(n)}function F0(n,e){return n&e}function Kn(n,e){return n|e}function Ds(n,e){return n^e}function Is(n,e){return n&~e}function L0(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 H0(n){for(var e=0;n!=0;)n&=n-1,++e;return e}var yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U0="=";function Bs(n){var e,t,r="";for(e=0;e+3<=n.length;e+=3)t=parseInt(n.substring(e,e+3),16),r+=yn.charAt(t>>6)+yn.charAt(t&63);for(e+1==n.length?(t=parseInt(n.substring(e,e+1),16),r+=yn.charAt(t<<2)):e+2==n.length&&(t=parseInt(n.substring(e,e+2),16),r+=yn.charAt(t>>2)+yn.charAt((t&3)<<4));(r.length&3)>0;)r+=U0;return r}var Wt,q0={decode:function(n){var e;if(Wt===void 0){var t="0123456789ABCDEF",r=` \f
19
+ \r  \u2028\u2029`;for(Wt={},e=0;e<16;++e)Wt[t.charAt(e)]=e;for(t=t.toLowerCase(),e=10;e<16;++e)Wt[t.charAt(e)]=e;for(e=0;e<r.length;++e)Wt[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=Wt[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}},Bt,Si={decode:function(n){var e;if(Bt===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
20
+ \r  \u2028\u2029`;for(Bt=Object.create(null),e=0;e<64;++e)Bt[t.charAt(e)]=e;for(Bt["-"]=62,Bt._=63,e=0;e<r.length;++e)Bt[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=Bt[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=Si.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 Si.decode(n)}},Jt=1e13,wn=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<Jt?t=0:(t=0|s/Jt,s-=t*Jt),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+=Jt,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+=(Jt+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*Jt+e[r];return t},n.prototype.simplify=function(){var e=this.buf;return e.length==1?e[0]:this},n}(),Pl="…",W0=/^(\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)?)?$/,J0=/^(\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 en(n,e){return n.length>e&&(n=n.substring(0,e)+Pl),n}var Kr=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+=`
21
+ `;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?W0:J0).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)
22
22
  `}i&&(r=r-256);for(var u=new wn(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)
23
23
  `,a="",u=e+1;u<t;++u){for(var l=this.get(u),c=u==t-1?i:0,p=7;p>=c;--p)a+=l>>p&1?"1":"0";if(a.length>r)return s+en(a,r)}return s+a},n.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return en(this.parseStringISO(e,t),r);var i=t-e,o="("+i+` byte)
24
- `;r/=2,i>r&&(t=e+r);for(var s=e;s<t;++s)o+=this.hexByte(this.get(s));return i>r&&(o+=Rl),o},n.prototype.parseOID=function(e,t,r){for(var i="",o=new wn,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 wn)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 en(i,r);o=new wn,s=0}}return s>0&&(i+=".incomplete"),i},n}(),H0=function(){function n(e,t,r,i,o){if(!(i instanceof Ts))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 en(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return en(this.stream.parseStringISO(t,t+r),e);case 30:return en(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+=`
25
- `,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 Wr?t=e:t=new Wr(e,0);var r=new Wr(t),i=new Ts(t),o=n.decodeLength(t),s=t.pos,a=s-r.pos,u=null,l=function(){var p=[];if(o!==null){for(var h=s+o;t.pos<h;)p[p.length]=n.decode(t);if(t.pos!=h)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var f=n.decode(t);if(f.tag.isEOC())break;p[p.length]=f}o=s-t.pos}catch(m){throw new Error("Exception while decoding undefined length content: "+m)}return p};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}(),Ts=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 wn;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}(),_t,U0=0xdeadbeefcafe,Ds=(U0&16777215)==15715070,Be=[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],q0=(1<<26)/Be[Be.length-1],ie=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=Vs(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+=Vs(i));return o?s:"0"},n.prototype.negate=function(){var e=le();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)+Jn(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=le();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 Is(t):r=new Bs(t),this.exp(e,r)},n.prototype.clone=function(){var e=le();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=le();return this.bitwiseTo(e,R0,t),t},n.prototype.or=function(e){var t=le();return this.bitwiseTo(e,Wn,t),t},n.prototype.xor=function(e){var t=le();return this.bitwiseTo(e,Cs,t),t},n.prototype.andNot=function(e){var t=le();return this.bitwiseTo(e,As,t),t},n.prototype.not=function(){for(var e=le(),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=le();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=le();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+M0(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+=P0(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,Wn)},n.prototype.clearBit=function(e){return this.changeBit(e,As)},n.prototype.flipBit=function(e){return this.changeBit(e,Cs)},n.prototype.add=function(e){var t=le();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=le();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=le();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=le();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=le();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=le(),r=le();return this.divRemTo(e,t,r),[t,r]},n.prototype.modPow=function(e,t){var r=e.bitLength(),i,o=xt(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 Is(t):t.isEven()?s=new J0(t):s=new Bs(t);var a=[],u=3,l=i-1,c=(1<<i)-1;if(a[1]=s.convert(this),i>1){var p=le();for(s.sqrTo(a[1],p);u<=c;)a[u]=le(),s.mulTo(p,a[u-2],a[u]),u+=2}var h=e.t-1,f,m=!0,v=le(),g;for(r=Jn(e[h])-1;h>=0;){for(r>=l?f=e[h]>>r-l&c:(f=(e[h]&(1<<r+1)-1)<<l-r,h>0&&(f|=e[h-1]>>this.DB+r-l)),u=i;!(f&1);)f>>=1,--u;if((r-=u)<0&&(r+=this.DB,--h),m)a[f].copyTo(o),m=!1;else{for(;u>1;)s.sqrTo(o,v),s.sqrTo(v,o),u-=2;u>0?s.sqrTo(o,v):(g=o,o=v,v=g),s.mulTo(v,a[f],o)}for(;h>=0&&!(e[h]&1<<r);)s.sqrTo(o,v),g=o,o=v,v=g,--r<0&&(r=this.DB-1,--h)}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=xt(1),s=xt(0),a=xt(0),u=xt(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 W0)},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]<=Be[Be.length-1]){for(t=0;t<Be.length;++t)if(r[0]==Be[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Be.length;){for(var i=Be[t],o=t+1;o<Be.length&&i<q0;)i*=Be[o++];for(i=r.modInt(i);t<o;)if(i%Be[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:Ms(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=le());var s=le(),a=this.s,u=e.s,l=this.DB-Jn(i[i.t-1]);l>0?(i.lShiftTo(l,s),o.lShiftTo(l,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,p=s[c-1];if(p!=0){var h=p*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),f=this.FV/h,m=(1<<this.F1)/h,v=1<<this.F2,g=r.t,S=g-c,y=t??le();for(s.dlShiftTo(S,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),n.ONE.dlShiftTo(c,y),y.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--S>=0;){var w=r[--g]==p?this.DM:Math.floor(r[g]*f+(r[g-1]+v)*m);if((r[g]+=s.am(0,w,r,S,0,c))<w)for(s.dlShiftTo(S,y),r.subTo(y,r);r[g]<--w;)r.subTo(y,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=le(),i=le(),o=t.convert(this),s=Jn(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=xt(r),o=le(),s=le(),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=Ms(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),Wn,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>Be.length&&(e=Be.length);for(var o=le(),s=0;s<e;++s){o.fromInt(Be[Math.floor(Math.random()*Be.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=le();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),Wn,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}(),W0=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}(),Is=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}(),Bs=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=le();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ie.ZERO)>0&&this.m.subTo(t,t),t},n.prototype.revert=function(e){var t=le();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}(),J0=function(){function n(e){this.m=e,this.r2=le(),this.q3=le(),ie.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=le();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 le(){return new ie(null)}function _e(n,e){return new ie(n,e)}var Rs=typeof navigator<"u";Rs&&Ds&&navigator.appName=="Microsoft Internet Explorer"?(ie.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},_t=30):Rs&&Ds&&navigator.appName!="Netscape"?(ie.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},_t=26):(ie.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},_t=28),ie.prototype.DB=_t,ie.prototype.DM=(1<<_t)-1,ie.prototype.DV=1<<_t;var Jr=52;ie.prototype.FV=Math.pow(2,Jr),ie.prototype.F1=Jr-_t,ie.prototype.F2=2*_t-Jr;var Tr=[],on,Je;for(on=48,Je=0;Je<=9;++Je)Tr[on++]=Je;for(on=97,Je=10;Je<36;++Je)Tr[on++]=Je;for(on=65,Je=10;Je<36;++Je)Tr[on++]=Je;function Ms(n,e){var t=Tr[n.charCodeAt(e)];return t??-1}function xt(n){var e=le();return e.fromInt(n),e}function Jn(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}ie.ZERO=xt(0),ie.ONE=xt(1);var K0=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 G0(){return new K0}var Ml=256,Kn,jt=null,Ze;if(jt==null){jt=[],Ze=0;var Gn=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Kr=new Uint32Array(256);for(window.crypto.getRandomValues(Kr),Gn=0;Gn<Kr.length;++Gn)jt[Ze++]=Kr[Gn]&255}var Yn=0,Zn=function(n){if(Yn=Yn||0,Yn>=256||Ze>=Ml){window.removeEventListener?window.removeEventListener("mousemove",Zn,!1):window.detachEvent&&window.detachEvent("onmousemove",Zn);return}try{var e=n.x+n.y;jt[Ze++]=e&255,Yn+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Zn,!1):window.attachEvent&&window.attachEvent("onmousemove",Zn))}function Y0(){if(Kn==null){for(Kn=G0();Ze<Ml;){var n=Math.floor(65536*Math.random());jt[Ze++]=n&255}for(Kn.init(jt),Ze=0;Ze<jt.length;++Ze)jt[Ze]=0;Ze=0}return Kn.next()}var xi=function(){function n(){}return n.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=Y0()},n}();function Z0(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 _e(o,16)}function X0(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 xi,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 ie(t)}var Q0=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=_e(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=X0(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=_e(e,16),this.e=parseInt(t,16),this.d=_e(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=_e(e,16),this.e=parseInt(t,16),this.d=_e(r,16),this.p=_e(i,16),this.q=_e(o,16),this.dmp1=_e(s,16),this.dmq1=_e(a,16),this.coeff=_e(u,16)):console.error("Invalid RSA private key")},n.prototype.generate=function(e,t){var r=new xi,i=e>>1;this.e=parseInt(t,16);for(var o=new ie(t,16);;){for(;this.p=new ie(e-i,1,r),!(this.p.subtract(ie.ONE).gcd(o).compareTo(ie.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new ie(i,1,r),!(this.q.subtract(ie.ONE).gcd(o).compareTo(ie.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(ie.ONE),u=this.q.subtract(ie.ONE),l=a.multiply(u);if(l.gcd(o).compareTo(ie.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=_e(e,16),r=this.doPrivate(t);return r==null?null:eg(r,this.n.bitLength()+7>>3)},n.prototype.generateAsync=function(e,t,r){var i=new xi,o=e>>1;this.e=parseInt(t,16);var s=new ie(t,16),a=this,u=function(){var l=function(){if(a.p.compareTo(a.q)<=0){var h=a.p;a.p=a.q,a.q=h}var f=a.p.subtract(ie.ONE),m=a.q.subtract(ie.ONE),v=f.multiply(m);v.gcd(s).compareTo(ie.ONE)==0?(a.n=a.p.multiply(a.q),a.d=s.modInverse(v),a.dmp1=a.d.mod(f),a.dmq1=a.d.mod(m),a.coeff=a.q.modInverse(a.p),setTimeout(function(){r()},0)):setTimeout(u,0)},c=function(){a.q=le(),a.q.fromNumberAsync(o,1,i,function(){a.q.subtract(ie.ONE).gcda(s,function(h){h.compareTo(ie.ONE)==0&&a.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)})})},p=function(){a.p=le(),a.p.fromNumberAsync(e-o,1,i,function(){a.p.subtract(ie.ONE).gcda(s,function(h){h.compareTo(ie.ONE)==0&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(p,0)})})};setTimeout(p,0)};setTimeout(u,0)},n.prototype.sign=function(e,t,r){var i=tg(r),o=i+t(e).toString(),s=Z0(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=_e(t,16),o=this.doPublic(i);if(o==null)return null;var s=o.toString(16).replace(/^1f+00/,""),a=ng(s);return a==r(e).toString()},n}();function eg(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 ar={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function tg(n){return ar[n]||""}function ng(n){for(var e in ar)if(ar.hasOwnProperty(e)){var t=ar[e],r=t.length;if(n.substr(0,r)==t)return n.substr(r)}return n}/*!
24
+ `;r/=2,i>r&&(t=e+r);for(var s=e;s<t;++s)o+=this.hexByte(this.get(s));return i>r&&(o+=Pl),o},n.prototype.parseOID=function(e,t,r){for(var i="",o=new wn,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 wn)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 en(i,r);o=new wn,s=0}}return s>0&&(i+=".incomplete"),i},n}(),K0=function(){function n(e,t,r,i,o){if(!(i instanceof Rs))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 en(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return en(this.stream.parseStringISO(t,t+r),e);case 30:return en(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+=`
25
+ `,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 Kr?t=e:t=new Kr(e,0);var r=new Kr(t),i=new Rs(t),o=n.decodeLength(t),s=t.pos,a=s-r.pos,u=null,l=function(){var p=[];if(o!==null){for(var h=s+o;t.pos<h;)p[p.length]=n.decode(t);if(t.pos!=h)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var f=n.decode(t);if(f.tag.isEOC())break;p[p.length]=f}o=s-t.pos}catch(m){throw new Error("Exception while decoding undefined length content: "+m)}return p};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}(),Rs=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 wn;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}(),xt,G0=0xdeadbeefcafe,Ms=(G0&16777215)==15715070,Be=[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],Y0=(1<<26)/Be[Be.length-1],ie=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=Ts(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+=Ts(i));return o?s:"0"},n.prototype.negate=function(){var e=le();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)+Gn(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=le();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 Ps(t):r=new zs(t),this.exp(e,r)},n.prototype.clone=function(){var e=le();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=le();return this.bitwiseTo(e,F0,t),t},n.prototype.or=function(e){var t=le();return this.bitwiseTo(e,Kn,t),t},n.prototype.xor=function(e){var t=le();return this.bitwiseTo(e,Ds,t),t},n.prototype.andNot=function(e){var t=le();return this.bitwiseTo(e,Is,t),t},n.prototype.not=function(){for(var e=le(),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=le();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},n.prototype.shiftRight=function(e){var t=le();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+L0(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+=H0(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,Kn)},n.prototype.clearBit=function(e){return this.changeBit(e,Is)},n.prototype.flipBit=function(e){return this.changeBit(e,Ds)},n.prototype.add=function(e){var t=le();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=le();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=le();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=le();return this.divRemTo(e,t,null),t},n.prototype.remainder=function(e){var t=le();return this.divRemTo(e,null,t),t},n.prototype.divideAndRemainder=function(e){var t=le(),r=le();return this.divRemTo(e,t,r),[t,r]},n.prototype.modPow=function(e,t){var r=e.bitLength(),i,o=St(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 Ps(t):t.isEven()?s=new X0(t):s=new zs(t);var a=[],u=3,l=i-1,c=(1<<i)-1;if(a[1]=s.convert(this),i>1){var p=le();for(s.sqrTo(a[1],p);u<=c;)a[u]=le(),s.mulTo(p,a[u-2],a[u]),u+=2}var h=e.t-1,f,m=!0,v=le(),g;for(r=Gn(e[h])-1;h>=0;){for(r>=l?f=e[h]>>r-l&c:(f=(e[h]&(1<<r+1)-1)<<l-r,h>0&&(f|=e[h-1]>>this.DB+r-l)),u=i;!(f&1);)f>>=1,--u;if((r-=u)<0&&(r+=this.DB,--h),m)a[f].copyTo(o),m=!1;else{for(;u>1;)s.sqrTo(o,v),s.sqrTo(v,o),u-=2;u>0?s.sqrTo(o,v):(g=o,o=v,v=g),s.mulTo(v,a[f],o)}for(;h>=0&&!(e[h]&1<<r);)s.sqrTo(o,v),g=o,o=v,v=g,--r<0&&(r=this.DB-1,--h)}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=St(1),s=St(0),a=St(0),u=St(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 Z0)},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]<=Be[Be.length-1]){for(t=0;t<Be.length;++t)if(r[0]==Be[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Be.length;){for(var i=Be[t],o=t+1;o<Be.length&&i<Y0;)i*=Be[o++];for(i=r.modInt(i);t<o;)if(i%Be[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:Fs(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=le());var s=le(),a=this.s,u=e.s,l=this.DB-Gn(i[i.t-1]);l>0?(i.lShiftTo(l,s),o.lShiftTo(l,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,p=s[c-1];if(p!=0){var h=p*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),f=this.FV/h,m=(1<<this.F1)/h,v=1<<this.F2,g=r.t,S=g-c,y=t??le();for(s.dlShiftTo(S,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),n.ONE.dlShiftTo(c,y),y.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--S>=0;){var w=r[--g]==p?this.DM:Math.floor(r[g]*f+(r[g-1]+v)*m);if((r[g]+=s.am(0,w,r,S,0,c))<w)for(s.dlShiftTo(S,y),r.subTo(y,r);r[g]<--w;)r.subTo(y,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=le(),i=le(),o=t.convert(this),s=Gn(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=St(r),o=le(),s=le(),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=Fs(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),Kn,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>Be.length&&(e=Be.length);for(var o=le(),s=0;s<e;++s){o.fromInt(Be[Math.floor(Math.random()*Be.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=le();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),Kn,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}(),Z0=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}(),Ps=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}(),zs=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=le();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ie.ZERO)>0&&this.m.subTo(t,t),t},n.prototype.revert=function(e){var t=le();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}(),X0=function(){function n(e){this.m=e,this.r2=le(),this.q3=le(),ie.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=le();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 le(){return new ie(null)}function _e(n,e){return new ie(n,e)}var Ns=typeof navigator<"u";Ns&&Ms&&navigator.appName=="Microsoft Internet Explorer"?(ie.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},xt=30):Ns&&Ms&&navigator.appName!="Netscape"?(ie.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},xt=26):(ie.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},xt=28),ie.prototype.DB=xt,ie.prototype.DM=(1<<xt)-1,ie.prototype.DV=1<<xt;var Gr=52;ie.prototype.FV=Math.pow(2,Gr),ie.prototype.F1=Gr-xt,ie.prototype.F2=2*xt-Gr;var Ir=[],on,Je;for(on=48,Je=0;Je<=9;++Je)Ir[on++]=Je;for(on=97,Je=10;Je<36;++Je)Ir[on++]=Je;for(on=65,Je=10;Je<36;++Je)Ir[on++]=Je;function Fs(n,e){var t=Ir[n.charCodeAt(e)];return t??-1}function St(n){var e=le();return e.fromInt(n),e}function Gn(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}ie.ZERO=St(0),ie.ONE=St(1);var Q0=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 eg(){return new Q0}var zl=256,Yn,jt=null,Ze;if(jt==null){jt=[],Ze=0;var Zn=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Yr=new Uint32Array(256);for(window.crypto.getRandomValues(Yr),Zn=0;Zn<Yr.length;++Zn)jt[Ze++]=Yr[Zn]&255}var Xn=0,Qn=function(n){if(Xn=Xn||0,Xn>=256||Ze>=zl){window.removeEventListener?window.removeEventListener("mousemove",Qn,!1):window.detachEvent&&window.detachEvent("onmousemove",Qn);return}try{var e=n.x+n.y;jt[Ze++]=e&255,Xn+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Qn,!1):window.attachEvent&&window.attachEvent("onmousemove",Qn))}function tg(){if(Yn==null){for(Yn=eg();Ze<zl;){var n=Math.floor(65536*Math.random());jt[Ze++]=n&255}for(Yn.init(jt),Ze=0;Ze<jt.length;++Ze)jt[Ze]=0;Ze=0}return Yn.next()}var ji=function(){function n(){}return n.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=tg()},n}();function ng(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 _e(o,16)}function rg(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 ji,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 ie(t)}var ig=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=_e(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=rg(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=_e(e,16),this.e=parseInt(t,16),this.d=_e(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=_e(e,16),this.e=parseInt(t,16),this.d=_e(r,16),this.p=_e(i,16),this.q=_e(o,16),this.dmp1=_e(s,16),this.dmq1=_e(a,16),this.coeff=_e(u,16)):console.error("Invalid RSA private key")},n.prototype.generate=function(e,t){var r=new ji,i=e>>1;this.e=parseInt(t,16);for(var o=new ie(t,16);;){for(;this.p=new ie(e-i,1,r),!(this.p.subtract(ie.ONE).gcd(o).compareTo(ie.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new ie(i,1,r),!(this.q.subtract(ie.ONE).gcd(o).compareTo(ie.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(ie.ONE),u=this.q.subtract(ie.ONE),l=a.multiply(u);if(l.gcd(o).compareTo(ie.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=_e(e,16),r=this.doPrivate(t);return r==null?null:og(r,this.n.bitLength()+7>>3)},n.prototype.generateAsync=function(e,t,r){var i=new ji,o=e>>1;this.e=parseInt(t,16);var s=new ie(t,16),a=this,u=function(){var l=function(){if(a.p.compareTo(a.q)<=0){var h=a.p;a.p=a.q,a.q=h}var f=a.p.subtract(ie.ONE),m=a.q.subtract(ie.ONE),v=f.multiply(m);v.gcd(s).compareTo(ie.ONE)==0?(a.n=a.p.multiply(a.q),a.d=s.modInverse(v),a.dmp1=a.d.mod(f),a.dmq1=a.d.mod(m),a.coeff=a.q.modInverse(a.p),setTimeout(function(){r()},0)):setTimeout(u,0)},c=function(){a.q=le(),a.q.fromNumberAsync(o,1,i,function(){a.q.subtract(ie.ONE).gcda(s,function(h){h.compareTo(ie.ONE)==0&&a.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)})})},p=function(){a.p=le(),a.p.fromNumberAsync(e-o,1,i,function(){a.p.subtract(ie.ONE).gcda(s,function(h){h.compareTo(ie.ONE)==0&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(p,0)})})};setTimeout(p,0)};setTimeout(u,0)},n.prototype.sign=function(e,t,r){var i=sg(r),o=i+t(e).toString(),s=ng(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=_e(t,16),o=this.doPublic(i);if(o==null)return null;var s=o.toString(16).replace(/^1f+00/,""),a=ag(s);return a==r(e).toString()},n}();function og(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 ur={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function sg(n){return ur[n]||""}function ag(n){for(var e in ur)if(ur.hasOwnProperty(e)){var t=ur[e],r=t.length;if(n.substr(0,r)==t)return n.substr(r)}return n}/*!
26
26
  Copyright (c) 2011, Yahoo! Inc. All rights reserved.
27
27
  Code licensed under the BSD License:
28
28
  http://developer.yahoo.com/yui/license.html
@@ -34,52 +34,58 @@ version: 2.9.0
34
34
  * @version asn1 1.0.13 (2017-Jun-02)
35
35
  * @since jsrsasign 2.1
36
36
  * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
37
- */var z={};(typeof z.asn1>"u"||!z.asn1)&&(z.asn1={}),z.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 ie(i,16),a=s.xor(n).add(ie.ONE);e=a.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(n,e){return hextopem(n,e)},this.newObject=function(n){var e=z,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,p=t.DERNumericString,h=t.DERPrintableString,f=t.DERTeletexString,m=t.DERIA5String,v=t.DERUTCTime,g=t.DERGeneralizedTime,S=t.DERSequence,y=t.DERSet,w=t.DERTaggedObject,E=t.ASN1Util.newObject,j=Object.keys(n);if(j.length!=1)throw"key of param shall be only one.";var _=j[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+_+":")==-1)throw"undefined key: "+_;if(_=="bool")return new r(n[_]);if(_=="int")return new i(n[_]);if(_=="bitstr")return new o(n[_]);if(_=="octstr")return new s(n[_]);if(_=="null")return new a(n[_]);if(_=="oid")return new u(n[_]);if(_=="enum")return new l(n[_]);if(_=="utf8str")return new c(n[_]);if(_=="numstr")return new p(n[_]);if(_=="prnstr")return new h(n[_]);if(_=="telstr")return new f(n[_]);if(_=="ia5str")return new m(n[_]);if(_=="utctime")return new v(n[_]);if(_=="gentime")return new g(n[_]);if(_=="seq"){for(var V=n[_],D=[],Y=0;Y<V.length;Y++){var C=E(V[Y]);D.push(C)}return new S({array:D})}if(_=="set"){for(var V=n[_],D=[],Y=0;Y<V.length;Y++){var C=E(V[Y]);D.push(C)}return new y({array:D})}if(_=="tag"){var A=n[_];if(Object.prototype.toString.call(A)==="[object Array]"&&A.length==3){var P=E(A[2]);return new w({tag:A[0],explicit:A[1],obj:P})}else{var T={};if(A.explicit!==void 0&&(T.explicit=A.explicit),A.tag!==void 0&&(T.tag=A.tag),A.obj===void 0)throw"obj shall be specified for 'tag'.";return T.obj=E(A.obj),new w(T)}}},this.jsonToASN1HEX=function(n){var e=this.newObject(n);return e.getEncodedHex()}},z.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 ie(o,2);i=i+"."+l.toString(10),o=""}}return i},z.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 ie(a,10),c=l.toString(2),p=7-c.length%7;p==7&&(p=0);for(var h="",f=0;f<p;f++)h+="0";c=h+c;for(var f=0;f<c.length-1;f+=7){var m=c.substr(f,7);f!=c.length-7&&(m="1"+m),u+=e(parseInt(m,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},z.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""}},z.asn1.DERAbstractString=function(n){z.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))},xe.lang.extend(z.asn1.DERAbstractString,z.asn1.ASN1Object),z.asn1.DERAbstractTime=function(n){z.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),p=i(String(o.getSeconds()),2),h=s+a+u+l+c+p;if(r===!0){var f=o.getMilliseconds();if(f!=0){var m=i(String(f),3);m=m.replace(/[0]+$/,""),h=h+"."+m}}return h+"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}},xe.lang.extend(z.asn1.DERAbstractTime,z.asn1.ASN1Object),z.asn1.DERAbstractStructured=function(n){z.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)},xe.lang.extend(z.asn1.DERAbstractStructured,z.asn1.ASN1Object),z.asn1.DERBoolean=function(){z.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},xe.lang.extend(z.asn1.DERBoolean,z.asn1.ASN1Object),z.asn1.DERInteger=function(n){z.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new ie(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))},xe.lang.extend(z.asn1.DERInteger,z.asn1.ASN1Object),z.asn1.DERBitString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=z.asn1.ASN1Util.newObject(n.obj);n.hex="00"+e.getEncodedHex()}z.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))},xe.lang.extend(z.asn1.DERBitString,z.asn1.ASN1Object),z.asn1.DEROctetString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=z.asn1.ASN1Util.newObject(n.obj);n.hex=e.getEncodedHex()}z.asn1.DEROctetString.superclass.constructor.call(this,n),this.hT="04"},xe.lang.extend(z.asn1.DEROctetString,z.asn1.DERAbstractString),z.asn1.DERNull=function(){z.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},xe.lang.extend(z.asn1.DERNull,z.asn1.ASN1Object),z.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 ie(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};z.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=z.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))},xe.lang.extend(z.asn1.DERObjectIdentifier,z.asn1.ASN1Object),z.asn1.DEREnumerated=function(n){z.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new ie(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))},xe.lang.extend(z.asn1.DEREnumerated,z.asn1.ASN1Object),z.asn1.DERUTF8String=function(n){z.asn1.DERUTF8String.superclass.constructor.call(this,n),this.hT="0c"},xe.lang.extend(z.asn1.DERUTF8String,z.asn1.DERAbstractString),z.asn1.DERNumericString=function(n){z.asn1.DERNumericString.superclass.constructor.call(this,n),this.hT="12"},xe.lang.extend(z.asn1.DERNumericString,z.asn1.DERAbstractString),z.asn1.DERPrintableString=function(n){z.asn1.DERPrintableString.superclass.constructor.call(this,n),this.hT="13"},xe.lang.extend(z.asn1.DERPrintableString,z.asn1.DERAbstractString),z.asn1.DERTeletexString=function(n){z.asn1.DERTeletexString.superclass.constructor.call(this,n),this.hT="14"},xe.lang.extend(z.asn1.DERTeletexString,z.asn1.DERAbstractString),z.asn1.DERIA5String=function(n){z.asn1.DERIA5String.superclass.constructor.call(this,n),this.hT="16"},xe.lang.extend(z.asn1.DERIA5String,z.asn1.DERAbstractString),z.asn1.DERUTCTime=function(n){z.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))},xe.lang.extend(z.asn1.DERUTCTime,z.asn1.DERAbstractTime),z.asn1.DERGeneralizedTime=function(n){z.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))},xe.lang.extend(z.asn1.DERGeneralizedTime,z.asn1.DERAbstractTime),z.asn1.DERSequence=function(n){z.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}},xe.lang.extend(z.asn1.DERSequence,z.asn1.DERAbstractStructured),z.asn1.DERSet=function(n){z.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)},xe.lang.extend(z.asn1.DERSet,z.asn1.DERAbstractStructured),z.asn1.DERTaggedObject=function(n){z.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)))},xe.lang.extend(z.asn1.DERTaggedObject,z.asn1.ASN1Object);var rg=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){rg(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)?N0.decode(t):_i.unarmor(t),a=H0.decode(s);if(a.sub.length===3&&(a=a.sub[2].sub[0]),a.sub.length===9){r=a.sub[1].getHexStringValue(),this.n=_e(r,16),i=a.sub[2].getHexStringValue(),this.e=parseInt(i,16);var u=a.sub[3].getHexStringValue();this.d=_e(u,16);var l=a.sub[4].getHexStringValue();this.p=_e(l,16);var c=a.sub[5].getHexStringValue();this.q=_e(c,16);var p=a.sub[6].getHexStringValue();this.dmp1=_e(p,16);var h=a.sub[7].getHexStringValue();this.dmq1=_e(h,16);var f=a.sub[8].getHexStringValue();this.coeff=_e(f,16)}else if(a.sub.length===2)if(a.sub[0].sub){var m=a.sub[1],v=m.sub[0];r=v.sub[0].getHexStringValue(),this.n=_e(r,16),i=v.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=a.sub[0].getHexStringValue(),this.n=_e(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 z.asn1.DERInteger({int:0}),new z.asn1.DERInteger({bigint:this.n}),new z.asn1.DERInteger({int:this.e}),new z.asn1.DERInteger({bigint:this.d}),new z.asn1.DERInteger({bigint:this.p}),new z.asn1.DERInteger({bigint:this.q}),new z.asn1.DERInteger({bigint:this.dmp1}),new z.asn1.DERInteger({bigint:this.dmq1}),new z.asn1.DERInteger({bigint:this.coeff})]},r=new z.asn1.DERSequence(t);return r.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return Os(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new z.asn1.DERSequence({array:[new z.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new z.asn1.DERNull]}),r=new z.asn1.DERSequence({array:[new z.asn1.DERInteger({bigint:this.n}),new z.asn1.DERInteger({int:this.e})]}),i=new z.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new z.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return Os(this.getPublicBaseKey())},e.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
37
+ */var z={};(typeof z.asn1>"u"||!z.asn1)&&(z.asn1={}),z.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 ie(i,16),a=s.xor(n).add(ie.ONE);e=a.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(n,e){return hextopem(n,e)},this.newObject=function(n){var e=z,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,p=t.DERNumericString,h=t.DERPrintableString,f=t.DERTeletexString,m=t.DERIA5String,v=t.DERUTCTime,g=t.DERGeneralizedTime,S=t.DERSequence,y=t.DERSet,w=t.DERTaggedObject,E=t.ASN1Util.newObject,j=Object.keys(n);if(j.length!=1)throw"key of param shall be only one.";var _=j[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+_+":")==-1)throw"undefined key: "+_;if(_=="bool")return new r(n[_]);if(_=="int")return new i(n[_]);if(_=="bitstr")return new o(n[_]);if(_=="octstr")return new s(n[_]);if(_=="null")return new a(n[_]);if(_=="oid")return new u(n[_]);if(_=="enum")return new l(n[_]);if(_=="utf8str")return new c(n[_]);if(_=="numstr")return new p(n[_]);if(_=="prnstr")return new h(n[_]);if(_=="telstr")return new f(n[_]);if(_=="ia5str")return new m(n[_]);if(_=="utctime")return new v(n[_]);if(_=="gentime")return new g(n[_]);if(_=="seq"){for(var V=n[_],D=[],Y=0;Y<V.length;Y++){var C=E(V[Y]);D.push(C)}return new S({array:D})}if(_=="set"){for(var V=n[_],D=[],Y=0;Y<V.length;Y++){var C=E(V[Y]);D.push(C)}return new y({array:D})}if(_=="tag"){var A=n[_];if(Object.prototype.toString.call(A)==="[object Array]"&&A.length==3){var P=E(A[2]);return new w({tag:A[0],explicit:A[1],obj:P})}else{var T={};if(A.explicit!==void 0&&(T.explicit=A.explicit),A.tag!==void 0&&(T.tag=A.tag),A.obj===void 0)throw"obj shall be specified for 'tag'.";return T.obj=E(A.obj),new w(T)}}},this.jsonToASN1HEX=function(n){var e=this.newObject(n);return e.getEncodedHex()}},z.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 ie(o,2);i=i+"."+l.toString(10),o=""}}return i},z.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 ie(a,10),c=l.toString(2),p=7-c.length%7;p==7&&(p=0);for(var h="",f=0;f<p;f++)h+="0";c=h+c;for(var f=0;f<c.length-1;f+=7){var m=c.substr(f,7);f!=c.length-7&&(m="1"+m),u+=e(parseInt(m,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},z.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""}},z.asn1.DERAbstractString=function(n){z.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))},xe.lang.extend(z.asn1.DERAbstractString,z.asn1.ASN1Object),z.asn1.DERAbstractTime=function(n){z.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),p=i(String(o.getSeconds()),2),h=s+a+u+l+c+p;if(r===!0){var f=o.getMilliseconds();if(f!=0){var m=i(String(f),3);m=m.replace(/[0]+$/,""),h=h+"."+m}}return h+"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}},xe.lang.extend(z.asn1.DERAbstractTime,z.asn1.ASN1Object),z.asn1.DERAbstractStructured=function(n){z.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)},xe.lang.extend(z.asn1.DERAbstractStructured,z.asn1.ASN1Object),z.asn1.DERBoolean=function(){z.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},xe.lang.extend(z.asn1.DERBoolean,z.asn1.ASN1Object),z.asn1.DERInteger=function(n){z.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new ie(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))},xe.lang.extend(z.asn1.DERInteger,z.asn1.ASN1Object),z.asn1.DERBitString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=z.asn1.ASN1Util.newObject(n.obj);n.hex="00"+e.getEncodedHex()}z.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))},xe.lang.extend(z.asn1.DERBitString,z.asn1.ASN1Object),z.asn1.DEROctetString=function(n){if(n!==void 0&&typeof n.obj<"u"){var e=z.asn1.ASN1Util.newObject(n.obj);n.hex=e.getEncodedHex()}z.asn1.DEROctetString.superclass.constructor.call(this,n),this.hT="04"},xe.lang.extend(z.asn1.DEROctetString,z.asn1.DERAbstractString),z.asn1.DERNull=function(){z.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},xe.lang.extend(z.asn1.DERNull,z.asn1.ASN1Object),z.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 ie(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};z.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=z.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))},xe.lang.extend(z.asn1.DERObjectIdentifier,z.asn1.ASN1Object),z.asn1.DEREnumerated=function(n){z.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new ie(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))},xe.lang.extend(z.asn1.DEREnumerated,z.asn1.ASN1Object),z.asn1.DERUTF8String=function(n){z.asn1.DERUTF8String.superclass.constructor.call(this,n),this.hT="0c"},xe.lang.extend(z.asn1.DERUTF8String,z.asn1.DERAbstractString),z.asn1.DERNumericString=function(n){z.asn1.DERNumericString.superclass.constructor.call(this,n),this.hT="12"},xe.lang.extend(z.asn1.DERNumericString,z.asn1.DERAbstractString),z.asn1.DERPrintableString=function(n){z.asn1.DERPrintableString.superclass.constructor.call(this,n),this.hT="13"},xe.lang.extend(z.asn1.DERPrintableString,z.asn1.DERAbstractString),z.asn1.DERTeletexString=function(n){z.asn1.DERTeletexString.superclass.constructor.call(this,n),this.hT="14"},xe.lang.extend(z.asn1.DERTeletexString,z.asn1.DERAbstractString),z.asn1.DERIA5String=function(n){z.asn1.DERIA5String.superclass.constructor.call(this,n),this.hT="16"},xe.lang.extend(z.asn1.DERIA5String,z.asn1.DERAbstractString),z.asn1.DERUTCTime=function(n){z.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))},xe.lang.extend(z.asn1.DERUTCTime,z.asn1.DERAbstractTime),z.asn1.DERGeneralizedTime=function(n){z.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))},xe.lang.extend(z.asn1.DERGeneralizedTime,z.asn1.DERAbstractTime),z.asn1.DERSequence=function(n){z.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}},xe.lang.extend(z.asn1.DERSequence,z.asn1.DERAbstractStructured),z.asn1.DERSet=function(n){z.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)},xe.lang.extend(z.asn1.DERSet,z.asn1.DERAbstractStructured),z.asn1.DERTaggedObject=function(n){z.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)))},xe.lang.extend(z.asn1.DERTaggedObject,z.asn1.ASN1Object);var lg=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){lg(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)?q0.decode(t):Si.unarmor(t),a=K0.decode(s);if(a.sub.length===3&&(a=a.sub[2].sub[0]),a.sub.length===9){r=a.sub[1].getHexStringValue(),this.n=_e(r,16),i=a.sub[2].getHexStringValue(),this.e=parseInt(i,16);var u=a.sub[3].getHexStringValue();this.d=_e(u,16);var l=a.sub[4].getHexStringValue();this.p=_e(l,16);var c=a.sub[5].getHexStringValue();this.q=_e(c,16);var p=a.sub[6].getHexStringValue();this.dmp1=_e(p,16);var h=a.sub[7].getHexStringValue();this.dmq1=_e(h,16);var f=a.sub[8].getHexStringValue();this.coeff=_e(f,16)}else if(a.sub.length===2)if(a.sub[0].sub){var m=a.sub[1],v=m.sub[0];r=v.sub[0].getHexStringValue(),this.n=_e(r,16),i=v.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=a.sub[0].getHexStringValue(),this.n=_e(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 z.asn1.DERInteger({int:0}),new z.asn1.DERInteger({bigint:this.n}),new z.asn1.DERInteger({int:this.e}),new z.asn1.DERInteger({bigint:this.d}),new z.asn1.DERInteger({bigint:this.p}),new z.asn1.DERInteger({bigint:this.q}),new z.asn1.DERInteger({bigint:this.dmp1}),new z.asn1.DERInteger({bigint:this.dmq1}),new z.asn1.DERInteger({bigint:this.coeff})]},r=new z.asn1.DERSequence(t);return r.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return Bs(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new z.asn1.DERSequence({array:[new z.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new z.asn1.DERNull]}),r=new z.asn1.DERSequence({array:[new z.asn1.DERInteger({bigint:this.n}),new z.asn1.DERInteger({int:this.e})]}),i=new z.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new z.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return Bs(this.getPublicBaseKey())},e.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
38
38
  ?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
39
39
  `)},e.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
40
40
  `;return t+=e.wordwrap(this.getPrivateBaseKeyB64())+`
41
41
  `,t+="-----END RSA PRIVATE KEY-----",t},e.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
42
42
  `;return t+=e.wordwrap(this.getPublicBaseKeyB64())+`
43
- `,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})(Q0);var Gr;typeof process<"u"&&((Gr=vd)===null||Gr===void 0||Gr.npm_package_version);const ig=/^(http|https):\/\/[\w.:\-@]*/;function og(n){return ig.test(n)}var Pl={exports:{}};/*! @preserve
43
+ `,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})(ig);var Zr;typeof process<"u"&&((Zr=_d)===null||Zr===void 0||Zr.npm_package_version);const Nl=/^(http|https):\/\/[\w.:\-@]*/;function ug(n){return Nl.test(n)}var Fl={exports:{}};/*! @preserve
44
44
  * numeral.js
45
45
  * version : 2.0.6
46
46
  * author : Adam Draper
47
47
  * license : MIT
48
48
  * http://adamwdraper.github.com/Numeral-js/
49
- */(function(n){(function(e,t){n.exports?n.exports=t():e.numeral=t()})(Re,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,p,h,f;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(p in i)if(f=typeof i[p].regexps.unformat=="function"?i[p].regexps.unformat():i[p].regexps.unformat,f&&l.match(f)){h=i[p].unformat;break}h=h||e._.stringToNumber,c=h(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,p){var h=o[e.options.currentLocale],f=!1,m=!1,v=0,g="",S=1e12,y=1e9,w=1e6,E=1e3,j="",_=!1,V,D,Y,C,A,P,T;if(l=l||0,D=Math.abs(l),e._.includes(c,"(")?(f=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(A=e._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(V=c.match(/a(k|m|b|t)?/),V=V?V[1]:!1,e._.includes(c," a")&&(g=" "),c=c.replace(new RegExp(g+"a[kmbt]?"),""),D>=S&&!V||V==="t"?(g+=h.abbreviations.trillion,l=l/S):D<S&&D>=y&&!V||V==="b"?(g+=h.abbreviations.billion,l=l/y):D<y&&D>=w&&!V||V==="m"?(g+=h.abbreviations.million,l=l/w):(D<w&&D>=E&&!V||V==="k")&&(g+=h.abbreviations.thousand,l=l/E)),e._.includes(c,"[.]")&&(m=!0,c=c.replace("[.]",".")),Y=l.toString().split(".")[0],C=c.split(".")[1],P=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,C?(e._.includes(C,"[")?(C=C.replace("]",""),C=C.split("["),j=e._.toFixed(l,C[0].length+C[1].length,p,C[1].length)):j=e._.toFixed(l,C.length,p),Y=j.split(".")[0],e._.includes(j,".")?j=h.delimiters.decimal+j.split(".")[1]:j="",m&&Number(j.slice(1))===0&&(j="")):Y=e._.toFixed(l,0,p),g&&!V&&Number(Y)>=1e3&&g!==h.abbreviations.trillion)switch(Y=String(Number(Y)/1e3),g){case h.abbreviations.thousand:g=h.abbreviations.million;break;case h.abbreviations.million:g=h.abbreviations.billion;break;case h.abbreviations.billion:g=h.abbreviations.trillion;break}if(e._.includes(Y,"-")&&(Y=Y.slice(1),_=!0),Y.length<v)for(var K=v-Y.length;K>0;K--)Y="0"+Y;return P>-1&&(Y=Y.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),c.indexOf(".")===0&&(Y=""),T=Y+j+(g||""),f?T=(f&&_?"(":"")+T+(f&&_?")":""):A>=0?T=A===0?(_?"-":"+")+T:T+(_?"-":"+"):_&&(T="-"+T),T},stringToNumber:function(l){var c=o[a.currentLocale],p=l,h={thousand:3,million:6,billion:9,trillion:12},f,m,v;if(a.zeroFormat&&l===a.zeroFormat)m=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)m=null;else{m=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(f in h)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[f]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),p.match(v)){m*=Math.pow(10,h[f]);break}m*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),m*=Number(l)}return m},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,p){return l.slice(0,p)+c+l.slice(p)},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 p=Object(l),h=p.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<h&&!(f in p);)f++;if(f>=h)throw new TypeError("Reduce of empty array with no initial value");m=p[f++]}for(;f<h;f++)f in p&&(m=c(m,p[f],f,p));return m},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,p){var h=t.multiplier(p);return c>h?c:h},1)},toFixed:function(l,c,p,h){var f=l.toString().split("."),m=c-(h||0),v,g,S,y;return f.length===2?v=Math.min(Math.max(f[1].length,m),c):v=m,S=Math.pow(10,v),y=(p(l+"e+"+v)/S).toFixed(v),h>c-v&&(g=new RegExp("\\.?0{1,"+(h-(c-v))+"}$"),y=y.replace(g,"")),y}},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,p){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=p,p},e.validate=function(l,c){var p,h,f,m,v,g,S,y;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{S=e.localeData(c)}catch{S=e.localeData(e.locale())}return f=S.currency.symbol,v=S.abbreviations,p=S.delimiters.decimal,S.delimiters.thousands==="."?h="\\.":h=S.delimiters.thousands,y=l.match(/^[^\d]+/),y!==null&&(l=l.substr(1),y[0]!==f)||(y=l.match(/[^\d]+$/),y!==null&&(l=l.slice(0,-1),y[0]!==v.thousand&&y[0]!==v.million&&y[0]!==v.billion&&y[0]!==v.trillion))?!1:(g=new RegExp(h+"{2}"),l.match(/[^\d.,]/g)?!1:(m=l.split(p),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(l,c){var p=this._value,h=l||a.defaultFormat,f,m,v;if(c=c||Math.round,p===0&&a.zeroFormat!==null)m=a.zeroFormat;else if(p===null&&a.nullFormat!==null)m=a.nullFormat;else{for(f in i)if(h.match(i[f].regexps.format)){v=i[f].format;break}v=v||e._.numberToFormat,m=v(p,h,c)}return m},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 p(h,f,m,v){return h+Math.round(c*f)}return this._value=t.reduce([this._value,l],p,0)/c,this},subtract:function(l){var c=t.correctionFactor.call(null,this._value,l);function p(h,f,m,v){return h-Math.round(c*f)}return this._value=t.reduce([l],p,Math.round(this._value*c))/c,this},multiply:function(l){function c(p,h,f,m){var v=t.correctionFactor(p,h);return Math.round(p*v)*Math.round(h*v)/Math.round(v*v)}return this._value=t.reduce([this._value,l],c,1),this},divide:function(l){function c(p,h,f,m){var v=t.correctionFactor(p,h);return Math.round(p*v)/Math.round(h*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,p){var h=e._.includes(c," BPS")?" ":"",f;return l=l*1e4,c=c.replace(/\s?BPS/,""),f=e._.numberToFormat(l,c,p),e._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"BPS"),f=f.join("")):f=f+h+"BPS",f},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"]},p=l.suffixes.concat(c.suffixes.filter(function(f){return l.suffixes.indexOf(f)<0})),h=p.join("|");h="("+h.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(h)},format:function(f,m,v){var g,S=e._.includes(m,"ib")?c:l,y=e._.includes(m," b")||e._.includes(m," ib")?" ":"",w,E,j;for(m=m.replace(/\s?i?b/,""),w=0;w<=S.suffixes.length;w++)if(E=Math.pow(S.base,w),j=Math.pow(S.base,w+1),f===null||f===0||f>=E&&f<j){y+=S.suffixes[w],E>0&&(f=f/E);break}return g=e._.numberToFormat(f,m,v),g+y},unformat:function(f){var m=e._.stringToNumber(f),v,g;if(m){for(v=l.suffixes.length-1;v>=0;v--){if(e._.includes(f,l.suffixes[v])){g=Math.pow(l.base,v);break}if(e._.includes(f,c.suffixes[v])){g=Math.pow(c.base,v);break}}m*=g||1}return m}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,p){var h=e.locales[e.options.currentLocale],f={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,v,g;for(c=c.replace(/\s?\$\s?/,""),m=e._.numberToFormat(l,c,p),l>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):l<0&&!e._.includes(f.before,"-")&&!e._.includes(f.before,"(")&&(f.before="-"+f.before),g=0;g<f.before.length;g++)switch(v=f.before[g],v){case"$":m=e._.insert(m,h.currency.symbol,g);break;case" ":m=e._.insert(m," ",g+h.currency.symbol.length-1);break}for(g=f.after.length-1;g>=0;g--)switch(v=f.after[g],v){case"$":m=g===f.after.length-1?m+h.currency.symbol:e._.insert(m,h.currency.symbol,-(f.after.length-(1+g)));break;case" ":m=g===f.after.length-1?m+" ":e._.insert(m," ",-(f.after.length-(1+g)+h.currency.symbol.length-1));break}return m}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,p){var h,f=typeof l=="number"&&!e._.isNaN(l)?l.toExponential():"0e+0",m=f.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),h=e._.numberToFormat(Number(m[0]),c,p),h+"e"+m[1]},unformat:function(l){var c=e._.includes(l,"e+")?l.split("e+"):l.split("e-"),p=Number(c[0]),h=Number(c[1]);h=e._.includes(l,"e-")?h*=-1:h;function f(m,v,g,S){var y=e._.correctionFactor(m,v),w=m*y*(v*y)/(y*y);return w}return e._.reduce([p,Math.pow(10,h)],f,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,p){var h=e.locales[e.options.currentLocale],f,m=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),m+=h.ordinal(l),f=e._.numberToFormat(l,c,p),f+m}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,p){var h=e._.includes(c," %")?" ":"",f;return e.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),f=e._.numberToFormat(l,c,p),e._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"%"),f=f.join("")):f=f+h+"%",f},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,p){var h=Math.floor(l/60/60),f=Math.floor((l-h*60*60)/60),m=Math.round(l-h*60*60-f*60);return h+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(l){var c=l.split(":"),p=0;return c.length===3?(p=p+Number(c[0])*60*60,p=p+Number(c[1])*60,p=p+Number(c[2])):c.length===2&&(p=p+Number(c[0])*60,p=p+Number(c[1])),Number(p)}})}(),e})})(Pl);var sg=Pl.exports;pn(sg);var zl={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Re,function(){var t=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",u="hour",l="day",c="week",p="month",h="quarter",f="year",m="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,y={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(K){var F=["th","st","nd","rd"],q=K%100;return"["+K+(F[(q-20)%10]||F[q]||F[0])+"]"}},w=function(K,F,q){var X=String(K);return!X||X.length>=F?K:""+Array(F+1-X.length).join(q)+K},E={s:w,z:function(K){var F=-K.utcOffset(),q=Math.abs(F),X=Math.floor(q/60),Z=q%60;return(F<=0?"+":"-")+w(X,2,"0")+":"+w(Z,2,"0")},m:function K(F,q){if(F.date()<q.date())return-K(q,F);var X=12*(q.year()-F.year())+(q.month()-F.month()),Z=F.clone().add(X,p),ee=q-Z<0,te=F.clone().add(X+(ee?-1:1),p);return+(-(X+(q-Z)/(ee?Z-te:te-Z))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:p,y:f,w:c,d:l,D:m,h:u,m:a,s,ms:o,Q:h}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},j="en",_={};_[j]=y;var V="$isDayjsObject",D=function(K){return K instanceof P||!(!K||!K[V])},Y=function K(F,q,X){var Z;if(!F)return j;if(typeof F=="string"){var ee=F.toLowerCase();_[ee]&&(Z=ee),q&&(_[ee]=q,Z=ee);var te=F.split("-");if(!Z&&te.length>1)return K(te[0])}else{var M=F.name;_[M]=F,Z=M}return!X&&Z&&(j=Z),Z||!X&&j},C=function(K,F){if(D(K))return K.clone();var q=typeof F=="object"?F:{};return q.date=K,q.args=arguments,new P(q)},A=E;A.l=Y,A.i=D,A.w=function(K,F){return C(K,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var P=function(){function K(q){this.$L=Y(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[V]=!0}var F=K.prototype;return F.parse=function(q){this.$d=function(X){var Z=X.date,ee=X.utc;if(Z===null)return new Date(NaN);if(A.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var te=Z.match(g);if(te){var M=te[2]-1||0,L=(te[7]||"0").substring(0,3);return ee?new Date(Date.UTC(te[1],M,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)):new Date(te[1],M,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)}}return new Date(Z)}(q),this.init()},F.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},F.$utils=function(){return A},F.isValid=function(){return this.$d.toString()!==v},F.isSame=function(q,X){var Z=C(q);return this.startOf(X)<=Z&&Z<=this.endOf(X)},F.isAfter=function(q,X){return C(q)<this.startOf(X)},F.isBefore=function(q,X){return this.endOf(X)<C(q)},F.$g=function(q,X,Z){return A.u(q)?this[X]:this.set(Z,q)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(q,X){var Z=this,ee=!!A.u(X)||X,te=A.p(q),M=function(It,Pe){var vt=A.w(Z.$u?Date.UTC(Z.$y,Pe,It):new Date(Z.$y,Pe,It),Z);return ee?vt:vt.endOf(l)},L=function(It,Pe){return A.w(Z.toDate()[It].apply(Z.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Pe)),Z)},H=this.$W,W=this.$M,We=this.$D,qt="set"+(this.$u?"UTC":"");switch(te){case f:return ee?M(1,0):M(31,11);case p:return ee?M(1,W):M(0,W+1);case c:var Dt=this.$locale().weekStart||0,mn=(H<Dt?H+7:H)-Dt;return M(ee?We-mn:We+(6-mn),W);case l:case m:return L(qt+"Hours",0);case u:return L(qt+"Minutes",1);case a:return L(qt+"Seconds",2);case s:return L(qt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(q){return this.startOf(q,!1)},F.$set=function(q,X){var Z,ee=A.p(q),te="set"+(this.$u?"UTC":""),M=(Z={},Z[l]=te+"Date",Z[m]=te+"Date",Z[p]=te+"Month",Z[f]=te+"FullYear",Z[u]=te+"Hours",Z[a]=te+"Minutes",Z[s]=te+"Seconds",Z[o]=te+"Milliseconds",Z)[ee],L=ee===l?this.$D+(X-this.$W):X;if(ee===p||ee===f){var H=this.clone().set(m,1);H.$d[M](L),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else M&&this.$d[M](L);return this.init(),this},F.set=function(q,X){return this.clone().$set(q,X)},F.get=function(q){return this[A.p(q)]()},F.add=function(q,X){var Z,ee=this;q=Number(q);var te=A.p(X),M=function(W){var We=C(ee);return A.w(We.date(We.date()+Math.round(W*q)),ee)};if(te===p)return this.set(p,this.$M+q);if(te===f)return this.set(f,this.$y+q);if(te===l)return M(1);if(te===c)return M(7);var L=(Z={},Z[a]=r,Z[u]=i,Z[s]=t,Z)[te]||1,H=this.$d.getTime()+q*L;return A.w(H,this)},F.subtract=function(q,X){return this.add(-1*q,X)},F.format=function(q){var X=this,Z=this.$locale();if(!this.isValid())return Z.invalidDate||v;var ee=q||"YYYY-MM-DDTHH:mm:ssZ",te=A.z(this),M=this.$H,L=this.$m,H=this.$M,W=Z.weekdays,We=Z.months,qt=Z.meridiem,Dt=function(Pe,vt,vn,Hn){return Pe&&(Pe[vt]||Pe(X,ee))||vn[vt].slice(0,Hn)},mn=function(Pe){return A.s(M%12||12,Pe,"0")},It=qt||function(Pe,vt,vn){var Hn=Pe<12?"AM":"PM";return vn?Hn.toLowerCase():Hn};return ee.replace(S,function(Pe,vt){return vt||function(vn){switch(vn){case"YY":return String(X.$y).slice(-2);case"YYYY":return A.s(X.$y,4,"0");case"M":return H+1;case"MM":return A.s(H+1,2,"0");case"MMM":return Dt(Z.monthsShort,H,We,3);case"MMMM":return Dt(We,H);case"D":return X.$D;case"DD":return A.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return Dt(Z.weekdaysMin,X.$W,W,2);case"ddd":return Dt(Z.weekdaysShort,X.$W,W,3);case"dddd":return W[X.$W];case"H":return String(M);case"HH":return A.s(M,2,"0");case"h":return mn(1);case"hh":return mn(2);case"a":return It(M,L,!0);case"A":return It(M,L,!1);case"m":return String(L);case"mm":return A.s(L,2,"0");case"s":return String(X.$s);case"ss":return A.s(X.$s,2,"0");case"SSS":return A.s(X.$ms,3,"0");case"Z":return te}return null}(Pe)||te.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(q,X,Z){var ee,te=this,M=A.p(X),L=C(q),H=(L.utcOffset()-this.utcOffset())*r,W=this-L,We=function(){return A.m(te,L)};switch(M){case f:ee=We()/12;break;case p:ee=We();break;case h:ee=We()/3;break;case c:ee=(W-H)/6048e5;break;case l:ee=(W-H)/864e5;break;case u:ee=W/i;break;case a:ee=W/r;break;case s:ee=W/t;break;default:ee=W}return Z?ee:A.a(ee)},F.daysInMonth=function(){return this.endOf(p).$D},F.$locale=function(){return _[this.$L]},F.locale=function(q,X){if(!q)return this.$L;var Z=this.clone(),ee=Y(q,X,!0);return ee&&(Z.$L=ee),Z},F.clone=function(){return A.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},K}(),T=P.prototype;return C.prototype=T,[["$ms",o],["$s",s],["$m",a],["$H",u],["$W",l],["$M",p],["$y",f],["$D",m]].forEach(function(K){T[K[1]]=function(F){return this.$g(F,K[0],K[1])}}),C.extend=function(K,F){return K.$i||(K(F,P,C),K.$i=!0),C},C.locale=Y,C.isDayjs=D,C.unix=function(K){return C(1e3*K)},C.en=_[j],C.Ls=_,C.p={},C})})(zl);var Nl=zl.exports;const ag=pn(Nl);var lg={exports:{}};(function(n,e){(function(t,r){n.exports=r(Nl)})(Re,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})})(lg),ag.locale("zh-cn");const ug=n=>Object.prototype.toString.call(n),Yr=n=>ug(n).slice(8,-1),Fl=()=>+Date.now();function nt(){return Number(Math.random().toString().substring(2,5)+Date.now()).toString(36)}function cg(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 Ll(n=0){return new Promise(e=>{setTimeout(e,n)})}function dg(n,e){return n.reduce((t,r)=>{const i=r[e];return t.set(i,r),t},new Map)}function pg(n){return[...n.entries()].reduce((e,[t,r])=>(e[t]=r,e),{})}function Hl(n){return n?[].concat(n):[]}function Zr(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 hg(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 Si={exports:{}};Si.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),p=0,h=l.length;p<h;p++){var f=l.charCodeAt(p);c[p*2]=f>>>8,c[p*2+1]=f%256}return c},decompressFromUint8Array:function(u){if(u==null)return a.decompress(u);for(var l=new Array(u.length/2),c=0,p=l.length;c<p;c++)l[c]=u[c*2]*256+u[c*2+1];var h=[];return l.forEach(function(f){h.push(t(f))}),a.decompress(h.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 p,h,f={},m={},v="",g="",S="",y=2,w=3,E=2,j=[],_=0,V=0,D;for(D=0;D<u.length;D+=1)if(v=u.charAt(D),Object.prototype.hasOwnProperty.call(f,v)||(f[v]=w++,m[v]=!0),g=S+v,Object.prototype.hasOwnProperty.call(f,g))S=g;else{if(Object.prototype.hasOwnProperty.call(m,S)){if(S.charCodeAt(0)<256){for(p=0;p<E;p++)_=_<<1,V==l-1?(V=0,j.push(c(_)),_=0):V++;for(h=S.charCodeAt(0),p=0;p<8;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}else{for(h=1,p=0;p<E;p++)_=_<<1|h,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=0;for(h=S.charCodeAt(0),p=0;p<16;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}y--,y==0&&(y=Math.pow(2,E),E++),delete m[S]}else for(h=f[S],p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;y--,y==0&&(y=Math.pow(2,E),E++),f[g]=w++,S=String(v)}if(S!==""){if(Object.prototype.hasOwnProperty.call(m,S)){if(S.charCodeAt(0)<256){for(p=0;p<E;p++)_=_<<1,V==l-1?(V=0,j.push(c(_)),_=0):V++;for(h=S.charCodeAt(0),p=0;p<8;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}else{for(h=1,p=0;p<E;p++)_=_<<1|h,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=0;for(h=S.charCodeAt(0),p=0;p<16;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}y--,y==0&&(y=Math.pow(2,E),E++),delete m[S]}else for(h=f[S],p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;y--,y==0&&(y=Math.pow(2,E),E++)}for(h=2,p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;for(;;)if(_=_<<1,V==l-1){j.push(c(_));break}else V++;return j.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 p=[],h=4,f=4,m=3,v="",g=[],S,y,w,E,j,_,V,D={val:c(0),position:l,index:1};for(S=0;S<3;S+=1)p[S]=S;for(w=0,j=Math.pow(2,2),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;switch(w){case 0:for(w=0,j=Math.pow(2,8),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;V=t(w);break;case 1:for(w=0,j=Math.pow(2,16),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;V=t(w);break;case 2:return""}for(p[3]=V,y=V,g.push(V);;){if(D.index>u)return"";for(w=0,j=Math.pow(2,m),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;switch(V=w){case 0:for(w=0,j=Math.pow(2,8),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;p[f++]=t(w),V=f-1,h--;break;case 1:for(w=0,j=Math.pow(2,16),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;p[f++]=t(w),V=f-1,h--;break;case 2:return g.join("")}if(h==0&&(h=Math.pow(2,m),m++),p[V])v=p[V];else if(V===f)v=y+y.charAt(0);else return null;g.push(v),p[f++]=y+v.charAt(0),h--,y=v,h==0&&(h=Math.pow(2,m),m++)}}};return a}();n!=null?n.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})}(Si);var Ul=Si.exports;Ul.compress;Ul.decompress;function fg(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 co=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}},Xr=class ql{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 ql(r,i),t),{})}},Qr=class Wl{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 Wl(i),t),{})}},Yt=class Jl{constructor(e){this.schema=e,this.id=e.id||nt(),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 Jl(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 we="EVENT_NODE_CHANGE";let _r=class lr{constructor(e,t=null){this.parent=t;const{id:r=nt(),name:i,from:o=""}=e;this.id=r,this.name=i,this.from=o,this.update(e,!0),lr.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=Xr.parse(a),this.events=Qr.parse(u),this.directives=Yt.parse(l),t||U.emit(we,this)}setChildren(e="",t=!1){Array.isArray(e)?this.children=e.map(r=>new lr(r,this)):this.children=e,t||U.emit(we,this)}setSlot(e,t=!1){this.slot=typeof e=="string"?{name:e,params:[]}:e,t||U.emit(we,this)}setProp(e,t,r,i=!1){const o=this.props[e];o?o.setValue(t):this.props[e]=new Xr(e,t,r),i||U.emit(we,this)}removeProp(e,t=!1){delete this.props[e],t||U.emit(we,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 Qr(e),t||U.emit(we,this)}removeEvent(e,t=!1){delete this.events[e],t||U.emit(we,this)}setDirective(e,t=!1){const r=this.directives.findIndex(i=>i.id===e.id);r>=0?this.directives.splice(r,1,new Yt(e)):this.directives.push(new Yt(e)),t||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,t))}}toDsl(){const{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:a,props:u,directives:l,events:c}=this,p=Array.isArray(a)?a.map(h=>h.toDsl()):a;return{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:p,props:Xr.toDsl(u),directives:Yt.toDsl(l),events:Qr.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||U.emit(we,this),this.parent=null,this.disposed=!0,delete lr.nodes[this.id])}lock(e=!1){if(this.locked=!0,Array.isArray(this.children))for(const t of this.children)t.lock(!0);e||U.emit(we,this)}unlock(e=!1){if(this.locked=!1,Array.isArray(this.children))for(const t of this.children)t.unlock(!0);e||U.emit(we,this)}setVisible(e,t=!1){if(this.invisible=!e,Array.isArray(this.children))for(const r of this.children)r.setVisible(e,!0);t||U.emit(we,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 pe="EVENT_BLOCK_CHANGE";let tn=class ji{__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||nt(),this.update(e,!0)}update(e,t=!1){for(const i of ji.normalAttrs){const o=e[i];o&&(this[i]=o)}const{nodes:r=[]}=e;r.length&&(this.nodes=r.map(i=>new _r(i))),t||U.emit(pe,this)}toDsl(e){const{__VTJ_BLOCK__:t,id:r,nodes:i}=this;return{...ji.normalAttrs.reduce((o,s)=>(o[s]=this[s],o),{}),__VTJ_BLOCK__:t,__VERSION__:e||Fl().toString(),id:r,nodes:i.map(o=>o.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||U.emit(pe,this)}removeFunction(e,t,r=!1){delete this[e][t],r||U.emit(pe,this)}setState(e,t,r=!1){this.state[e]=t,r||U.emit(pe,this)}removeState(e,t=!1){delete this.state[e],t||U.emit(pe,this)}setCss(e,t=!1){this.css=e,t||U.emit(pe,this)}setWatch(e,t=!1){e.id=e.id||nt();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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,this)}removeEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1&&(this.emits.splice(r,1),t||U.emit(pe,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||U.emit(pe,this)}removeSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1&&(this.slots.splice(r,1),t||U.emit(pe,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||U.emit(pe,this)}removeInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1&&(this.inject.splice(r,1),t||U.emit(pe,this))}setDataSource(e,t=!1){this.dataSources[e.name]=e,t||U.emit(pe,this)}removeDataSource(e,t=!1){delete this.dataSources[e],t||U.emit(pe,this)}insertAfter(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i+1,0,e),r||U.emit(pe,this)}insertBefore(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i,0,e),r||U.emit(pe,this)}appendNode(e,t=!1){e.parent=null,this.nodes.push(e),t||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,this))}}cloneNode(e,t=!1){const r=Yl(e.toDsl()),i=new _r(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||U.emit(pe,this)}unlock(e=!1){this.locked=!1;for(const t of this.nodes)t.unlock(!0);e||U.emit(pe,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 ze="EVENT_PROJECT_CHANGE",Dn="EVENT_PROJECT_ACTIVED",ki="EVENT_PROJECT_DEPS_CHANGE",_n="EVENT_PROJECT_PAGES_CHANGE",ur="EVENT_PROJECT_BLOCKS_CHANGE",Ps="EVENT_PROJECT_APIS_CHANGE",Kl="EVENT_PROJECT_PUBLISH",Gl="EVENT_PROJECT_FILE_PUBLISH";let mg=class Ei{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||nt(),this.update(e,!0)}update(e,t=!1){for(const r of Ei.attrs){const i=e[r];i&&(this[r]=i)}t||U.emit(ze,{model:this,type:"update",data:e})}isPageFile(e){return e.type==="page"}toDsl(e){const{id:t}=this,r=Ei.attrs.reduce((i,o)=>(i[o]=this[o],i),{});return r.pages&&(r.pages=r.pages.map(i=>(delete i.dsl,i))),r.blocks&&(r.blocks=r.blocks.map(i=>(delete i.dsl,i))),{__VTJ_PROJECT__:!0,__VERSION__:e||Fl().toString(),id:t,...r}}active(e,t=!1){this.currentFile=e,t||U.emit(Dn,{model:this,type:"update",data:e})}deactivate(e=!1){this.currentFile=null,e||U.emit(Dn,{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};U.emit(ki,s),U.emit(ze,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};U.emit(ki,o),U.emit(ze,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.raw?e.name:e.id||nt(),e.type="page",e.dir?e.children=[]:e.dsl=e.dsl||new tn({id:e.id,name:wr(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&&!e.dir&&this.active(e,r),!r){const i={model:this,type:"create",data:e};U.emit(_n,i),U.emit(ze,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};U.emit(_n,i),U.emit(ze,i)}}clonePage(e,t,r=!1){const i=nt(),o=`${e.name}Copy`,s=`${e.title}_副本`,a=new tn({id:i,name:o}).toDsl(),u=ct({},e,{id:i,name:o,title:s,dsl:a}),l=t?this.getPage(t)?.children||[]:this.pages,c=l.findIndex(p=>p.id===e.id);if(l.splice(c+1,0,u),!r){const p={model:this,type:"clone",data:{page:e,newPage:u}};U.emit(_n,p),U.emit(ze,p)}}removePage(e,t=!1){const r=this.getPage(e),i=(o,s)=>{const a=s.findIndex(u=>u.id===o);if(a>=0){s.splice(a,1);return}for(const u of s)if(u.children&&u.children.length)return i(o,u.children)};if(i(e,this.pages),e===this.homepage&&(this.homepage=""),this.currentFile?.id===e&&this.deactivate(t),!t){const o={model:this,type:"delete",data:r};U.emit(_n,o),U.emit(ze,o)}}getBlock(e){return this.blocks.find(t=>t.id===e)}createBlock(e,t=!1){const r=e.id||nt(),i=wr(e.name);if(e.id=r,e.type="block",e.dsl=new tn({id:r,name:i}).toDsl(),this.blocks.push(e),this.currentFile||this.active(e,t),!t){const o={model:this,type:"create",data:e};U.emit(ur,o),U.emit(ze,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};U.emit(ur,i),U.emit(ze,i)}}removeBlock(e,t=!1){const r=this.getBlock(e),i=this.blocks,o=i.findIndex(s=>s.id===e);if(o>-1?(i.splice(o,1),this.currentFile?.id===e&&this.deactivate(t)):console.warn(`not found PageFile for id: ${e} `),!t){const s={model:this,type:"delete",data:r};U.emit(ur,s),U.emit(ze,s)}}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=nt(),this.apis.push(e)),!t){const o={model:this,type:i,data:e};U.emit(Ps,o),U.emit(ze,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};U.emit(Ps,i),U.emit(ze,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};U.emit(ze,r)}}publish(e){const t={model:this,type:"publish",data:e||this};e?U.emit(Gl,t):U.emit(Kl,t)}};const xn="EVENT_HISTORY_CHANGE",cr="EVENT_HISTORY_LOAD";let vg=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:nt(),label:new Date().toLocaleString(),dsl:Mn(e)};if(this.items.unshift(i),this.items.length>r){const o=this.items.splice(r);t||U.emit(xn,{model:this,type:"delete",data:o.map(s=>s.id)})}this.index=-1,t||U.emit(xn,{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||U.emit(xn,{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&&U.emit(cr,{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&&U.emit(cr,{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||U.emit(cr,{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||U.emit(xn,{model:this,type:"clear",data:t})}};const U=fg();function Se(n){return n instanceof tn}function Yl(n){return delete n.id,Array.isArray(n.children)&&(n.children=n.children.map(e=>Yl(e))),n}/**!
49
+ */(function(n){(function(e,t){n.exports?n.exports=t():e.numeral=t()})(Re,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,p,h,f;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(p in i)if(f=typeof i[p].regexps.unformat=="function"?i[p].regexps.unformat():i[p].regexps.unformat,f&&l.match(f)){h=i[p].unformat;break}h=h||e._.stringToNumber,c=h(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,p){var h=o[e.options.currentLocale],f=!1,m=!1,v=0,g="",S=1e12,y=1e9,w=1e6,E=1e3,j="",_=!1,V,D,Y,C,A,P,T;if(l=l||0,D=Math.abs(l),e._.includes(c,"(")?(f=!0,c=c.replace(/[\(|\)]/g,"")):(e._.includes(c,"+")||e._.includes(c,"-"))&&(A=e._.includes(c,"+")?c.indexOf("+"):l<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),e._.includes(c,"a")&&(V=c.match(/a(k|m|b|t)?/),V=V?V[1]:!1,e._.includes(c," a")&&(g=" "),c=c.replace(new RegExp(g+"a[kmbt]?"),""),D>=S&&!V||V==="t"?(g+=h.abbreviations.trillion,l=l/S):D<S&&D>=y&&!V||V==="b"?(g+=h.abbreviations.billion,l=l/y):D<y&&D>=w&&!V||V==="m"?(g+=h.abbreviations.million,l=l/w):(D<w&&D>=E&&!V||V==="k")&&(g+=h.abbreviations.thousand,l=l/E)),e._.includes(c,"[.]")&&(m=!0,c=c.replace("[.]",".")),Y=l.toString().split(".")[0],C=c.split(".")[1],P=c.indexOf(","),v=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,C?(e._.includes(C,"[")?(C=C.replace("]",""),C=C.split("["),j=e._.toFixed(l,C[0].length+C[1].length,p,C[1].length)):j=e._.toFixed(l,C.length,p),Y=j.split(".")[0],e._.includes(j,".")?j=h.delimiters.decimal+j.split(".")[1]:j="",m&&Number(j.slice(1))===0&&(j="")):Y=e._.toFixed(l,0,p),g&&!V&&Number(Y)>=1e3&&g!==h.abbreviations.trillion)switch(Y=String(Number(Y)/1e3),g){case h.abbreviations.thousand:g=h.abbreviations.million;break;case h.abbreviations.million:g=h.abbreviations.billion;break;case h.abbreviations.billion:g=h.abbreviations.trillion;break}if(e._.includes(Y,"-")&&(Y=Y.slice(1),_=!0),Y.length<v)for(var K=v-Y.length;K>0;K--)Y="0"+Y;return P>-1&&(Y=Y.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),c.indexOf(".")===0&&(Y=""),T=Y+j+(g||""),f?T=(f&&_?"(":"")+T+(f&&_?")":""):A>=0?T=A===0?(_?"-":"+")+T:T+(_?"-":"+"):_&&(T="-"+T),T},stringToNumber:function(l){var c=o[a.currentLocale],p=l,h={thousand:3,million:6,billion:9,trillion:12},f,m,v;if(a.zeroFormat&&l===a.zeroFormat)m=0;else if(a.nullFormat&&l===a.nullFormat||!l.replace(/[^0-9]+/g,"").length)m=null;else{m=1,c.delimiters.decimal!=="."&&(l=l.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(f in h)if(v=new RegExp("[^a-zA-Z]"+c.abbreviations[f]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),p.match(v)){m*=Math.pow(10,h[f]);break}m*=(l.split("-").length+Math.min(l.split("(").length-1,l.split(")").length-1))%2?1:-1,l=l.replace(/[^0-9\.]+/g,""),m*=Number(l)}return m},isNaN:function(l){return typeof l=="number"&&isNaN(l)},includes:function(l,c){return l.indexOf(c)!==-1},insert:function(l,c,p){return l.slice(0,p)+c+l.slice(p)},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 p=Object(l),h=p.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<h&&!(f in p);)f++;if(f>=h)throw new TypeError("Reduce of empty array with no initial value");m=p[f++]}for(;f<h;f++)f in p&&(m=c(m,p[f],f,p));return m},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,p){var h=t.multiplier(p);return c>h?c:h},1)},toFixed:function(l,c,p,h){var f=l.toString().split("."),m=c-(h||0),v,g,S,y;return f.length===2?v=Math.min(Math.max(f[1].length,m),c):v=m,S=Math.pow(10,v),y=(p(l+"e+"+v)/S).toFixed(v),h>c-v&&(g=new RegExp("\\.?0{1,"+(h-(c-v))+"}$"),y=y.replace(g,"")),y}},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,p){if(c=c.toLowerCase(),this[l+"s"][c])throw new TypeError(c+" "+l+" already registered.");return this[l+"s"][c]=p,p},e.validate=function(l,c){var p,h,f,m,v,g,S,y;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{S=e.localeData(c)}catch{S=e.localeData(e.locale())}return f=S.currency.symbol,v=S.abbreviations,p=S.delimiters.decimal,S.delimiters.thousands==="."?h="\\.":h=S.delimiters.thousands,y=l.match(/^[^\d]+/),y!==null&&(l=l.substr(1),y[0]!==f)||(y=l.match(/[^\d]+$/),y!==null&&(l=l.slice(0,-1),y[0]!==v.thousand&&y[0]!==v.million&&y[0]!==v.billion&&y[0]!==v.trillion))?!1:(g=new RegExp(h+"{2}"),l.match(/[^\d.,]/g)?!1:(m=l.split(p),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(g)&&!!m[1].match(/^\d+$/)))},e.fn=u.prototype={clone:function(){return e(this)},format:function(l,c){var p=this._value,h=l||a.defaultFormat,f,m,v;if(c=c||Math.round,p===0&&a.zeroFormat!==null)m=a.zeroFormat;else if(p===null&&a.nullFormat!==null)m=a.nullFormat;else{for(f in i)if(h.match(i[f].regexps.format)){v=i[f].format;break}v=v||e._.numberToFormat,m=v(p,h,c)}return m},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 p(h,f,m,v){return h+Math.round(c*f)}return this._value=t.reduce([this._value,l],p,0)/c,this},subtract:function(l){var c=t.correctionFactor.call(null,this._value,l);function p(h,f,m,v){return h-Math.round(c*f)}return this._value=t.reduce([l],p,Math.round(this._value*c))/c,this},multiply:function(l){function c(p,h,f,m){var v=t.correctionFactor(p,h);return Math.round(p*v)*Math.round(h*v)/Math.round(v*v)}return this._value=t.reduce([this._value,l],c,1),this},divide:function(l){function c(p,h,f,m){var v=t.correctionFactor(p,h);return Math.round(p*v)/Math.round(h*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,p){var h=e._.includes(c," BPS")?" ":"",f;return l=l*1e4,c=c.replace(/\s?BPS/,""),f=e._.numberToFormat(l,c,p),e._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"BPS"),f=f.join("")):f=f+h+"BPS",f},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"]},p=l.suffixes.concat(c.suffixes.filter(function(f){return l.suffixes.indexOf(f)<0})),h=p.join("|");h="("+h.replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(h)},format:function(f,m,v){var g,S=e._.includes(m,"ib")?c:l,y=e._.includes(m," b")||e._.includes(m," ib")?" ":"",w,E,j;for(m=m.replace(/\s?i?b/,""),w=0;w<=S.suffixes.length;w++)if(E=Math.pow(S.base,w),j=Math.pow(S.base,w+1),f===null||f===0||f>=E&&f<j){y+=S.suffixes[w],E>0&&(f=f/E);break}return g=e._.numberToFormat(f,m,v),g+y},unformat:function(f){var m=e._.stringToNumber(f),v,g;if(m){for(v=l.suffixes.length-1;v>=0;v--){if(e._.includes(f,l.suffixes[v])){g=Math.pow(l.base,v);break}if(e._.includes(f,c.suffixes[v])){g=Math.pow(c.base,v);break}}m*=g||1}return m}})}(),function(){e.register("format","currency",{regexps:{format:/(\$)/},format:function(l,c,p){var h=e.locales[e.options.currentLocale],f={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,v,g;for(c=c.replace(/\s?\$\s?/,""),m=e._.numberToFormat(l,c,p),l>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):l<0&&!e._.includes(f.before,"-")&&!e._.includes(f.before,"(")&&(f.before="-"+f.before),g=0;g<f.before.length;g++)switch(v=f.before[g],v){case"$":m=e._.insert(m,h.currency.symbol,g);break;case" ":m=e._.insert(m," ",g+h.currency.symbol.length-1);break}for(g=f.after.length-1;g>=0;g--)switch(v=f.after[g],v){case"$":m=g===f.after.length-1?m+h.currency.symbol:e._.insert(m,h.currency.symbol,-(f.after.length-(1+g)));break;case" ":m=g===f.after.length-1?m+" ":e._.insert(m," ",-(f.after.length-(1+g)+h.currency.symbol.length-1));break}return m}})}(),function(){e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(l,c,p){var h,f=typeof l=="number"&&!e._.isNaN(l)?l.toExponential():"0e+0",m=f.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),h=e._.numberToFormat(Number(m[0]),c,p),h+"e"+m[1]},unformat:function(l){var c=e._.includes(l,"e+")?l.split("e+"):l.split("e-"),p=Number(c[0]),h=Number(c[1]);h=e._.includes(l,"e-")?h*=-1:h;function f(m,v,g,S){var y=e._.correctionFactor(m,v),w=m*y*(v*y)/(y*y);return w}return e._.reduce([p,Math.pow(10,h)],f,1)}})}(),function(){e.register("format","ordinal",{regexps:{format:/(o)/},format:function(l,c,p){var h=e.locales[e.options.currentLocale],f,m=e._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),m+=h.ordinal(l),f=e._.numberToFormat(l,c,p),f+m}})}(),function(){e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(l,c,p){var h=e._.includes(c," %")?" ":"",f;return e.options.scalePercentBy100&&(l=l*100),c=c.replace(/\s?\%/,""),f=e._.numberToFormat(l,c,p),e._.includes(f,")")?(f=f.split(""),f.splice(-1,0,h+"%"),f=f.join("")):f=f+h+"%",f},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,p){var h=Math.floor(l/60/60),f=Math.floor((l-h*60*60)/60),m=Math.round(l-h*60*60-f*60);return h+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(l){var c=l.split(":"),p=0;return c.length===3?(p=p+Number(c[0])*60*60,p=p+Number(c[1])*60,p=p+Number(c[2])):c.length===2&&(p=p+Number(c[0])*60,p=p+Number(c[1])),Number(p)}})}(),e})})(Fl);var cg=Fl.exports;pn(cg);var Ll={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(Re,function(){var t=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",u="hour",l="day",c="week",p="month",h="quarter",f="year",m="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|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,y={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(K){var F=["th","st","nd","rd"],q=K%100;return"["+K+(F[(q-20)%10]||F[q]||F[0])+"]"}},w=function(K,F,q){var X=String(K);return!X||X.length>=F?K:""+Array(F+1-X.length).join(q)+K},E={s:w,z:function(K){var F=-K.utcOffset(),q=Math.abs(F),X=Math.floor(q/60),Z=q%60;return(F<=0?"+":"-")+w(X,2,"0")+":"+w(Z,2,"0")},m:function K(F,q){if(F.date()<q.date())return-K(q,F);var X=12*(q.year()-F.year())+(q.month()-F.month()),Z=F.clone().add(X,p),ee=q-Z<0,te=F.clone().add(X+(ee?-1:1),p);return+(-(X+(q-Z)/(ee?Z-te:te-Z))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:p,y:f,w:c,d:l,D:m,h:u,m:a,s,ms:o,Q:h}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},j="en",_={};_[j]=y;var V="$isDayjsObject",D=function(K){return K instanceof P||!(!K||!K[V])},Y=function K(F,q,X){var Z;if(!F)return j;if(typeof F=="string"){var ee=F.toLowerCase();_[ee]&&(Z=ee),q&&(_[ee]=q,Z=ee);var te=F.split("-");if(!Z&&te.length>1)return K(te[0])}else{var M=F.name;_[M]=F,Z=M}return!X&&Z&&(j=Z),Z||!X&&j},C=function(K,F){if(D(K))return K.clone();var q=typeof F=="object"?F:{};return q.date=K,q.args=arguments,new P(q)},A=E;A.l=Y,A.i=D,A.w=function(K,F){return C(K,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var P=function(){function K(q){this.$L=Y(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[V]=!0}var F=K.prototype;return F.parse=function(q){this.$d=function(X){var Z=X.date,ee=X.utc;if(Z===null)return new Date(NaN);if(A.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var te=Z.match(g);if(te){var M=te[2]-1||0,L=(te[7]||"0").substring(0,3);return ee?new Date(Date.UTC(te[1],M,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)):new Date(te[1],M,te[3]||1,te[4]||0,te[5]||0,te[6]||0,L)}}return new Date(Z)}(q),this.init()},F.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},F.$utils=function(){return A},F.isValid=function(){return this.$d.toString()!==v},F.isSame=function(q,X){var Z=C(q);return this.startOf(X)<=Z&&Z<=this.endOf(X)},F.isAfter=function(q,X){return C(q)<this.startOf(X)},F.isBefore=function(q,X){return this.endOf(X)<C(q)},F.$g=function(q,X,Z){return A.u(q)?this[X]:this.set(Z,q)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(q,X){var Z=this,ee=!!A.u(X)||X,te=A.p(q),M=function(It,Pe){var gt=A.w(Z.$u?Date.UTC(Z.$y,Pe,It):new Date(Z.$y,Pe,It),Z);return ee?gt:gt.endOf(l)},L=function(It,Pe){return A.w(Z.toDate()[It].apply(Z.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Pe)),Z)},H=this.$W,W=this.$M,We=this.$D,qt="set"+(this.$u?"UTC":"");switch(te){case f:return ee?M(1,0):M(31,11);case p:return ee?M(1,W):M(0,W+1);case c:var Dt=this.$locale().weekStart||0,mn=(H<Dt?H+7:H)-Dt;return M(ee?We-mn:We+(6-mn),W);case l:case m:return L(qt+"Hours",0);case u:return L(qt+"Minutes",1);case a:return L(qt+"Seconds",2);case s:return L(qt+"Milliseconds",3);default:return this.clone()}},F.endOf=function(q){return this.startOf(q,!1)},F.$set=function(q,X){var Z,ee=A.p(q),te="set"+(this.$u?"UTC":""),M=(Z={},Z[l]=te+"Date",Z[m]=te+"Date",Z[p]=te+"Month",Z[f]=te+"FullYear",Z[u]=te+"Hours",Z[a]=te+"Minutes",Z[s]=te+"Seconds",Z[o]=te+"Milliseconds",Z)[ee],L=ee===l?this.$D+(X-this.$W):X;if(ee===p||ee===f){var H=this.clone().set(m,1);H.$d[M](L),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else M&&this.$d[M](L);return this.init(),this},F.set=function(q,X){return this.clone().$set(q,X)},F.get=function(q){return this[A.p(q)]()},F.add=function(q,X){var Z,ee=this;q=Number(q);var te=A.p(X),M=function(W){var We=C(ee);return A.w(We.date(We.date()+Math.round(W*q)),ee)};if(te===p)return this.set(p,this.$M+q);if(te===f)return this.set(f,this.$y+q);if(te===l)return M(1);if(te===c)return M(7);var L=(Z={},Z[a]=r,Z[u]=i,Z[s]=t,Z)[te]||1,H=this.$d.getTime()+q*L;return A.w(H,this)},F.subtract=function(q,X){return this.add(-1*q,X)},F.format=function(q){var X=this,Z=this.$locale();if(!this.isValid())return Z.invalidDate||v;var ee=q||"YYYY-MM-DDTHH:mm:ssZ",te=A.z(this),M=this.$H,L=this.$m,H=this.$M,W=Z.weekdays,We=Z.months,qt=Z.meridiem,Dt=function(Pe,gt,vn,qn){return Pe&&(Pe[gt]||Pe(X,ee))||vn[gt].slice(0,qn)},mn=function(Pe){return A.s(M%12||12,Pe,"0")},It=qt||function(Pe,gt,vn){var qn=Pe<12?"AM":"PM";return vn?qn.toLowerCase():qn};return ee.replace(S,function(Pe,gt){return gt||function(vn){switch(vn){case"YY":return String(X.$y).slice(-2);case"YYYY":return A.s(X.$y,4,"0");case"M":return H+1;case"MM":return A.s(H+1,2,"0");case"MMM":return Dt(Z.monthsShort,H,We,3);case"MMMM":return Dt(We,H);case"D":return X.$D;case"DD":return A.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return Dt(Z.weekdaysMin,X.$W,W,2);case"ddd":return Dt(Z.weekdaysShort,X.$W,W,3);case"dddd":return W[X.$W];case"H":return String(M);case"HH":return A.s(M,2,"0");case"h":return mn(1);case"hh":return mn(2);case"a":return It(M,L,!0);case"A":return It(M,L,!1);case"m":return String(L);case"mm":return A.s(L,2,"0");case"s":return String(X.$s);case"ss":return A.s(X.$s,2,"0");case"SSS":return A.s(X.$ms,3,"0");case"Z":return te}return null}(Pe)||te.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(q,X,Z){var ee,te=this,M=A.p(X),L=C(q),H=(L.utcOffset()-this.utcOffset())*r,W=this-L,We=function(){return A.m(te,L)};switch(M){case f:ee=We()/12;break;case p:ee=We();break;case h:ee=We()/3;break;case c:ee=(W-H)/6048e5;break;case l:ee=(W-H)/864e5;break;case u:ee=W/i;break;case a:ee=W/r;break;case s:ee=W/t;break;default:ee=W}return Z?ee:A.a(ee)},F.daysInMonth=function(){return this.endOf(p).$D},F.$locale=function(){return _[this.$L]},F.locale=function(q,X){if(!q)return this.$L;var Z=this.clone(),ee=Y(q,X,!0);return ee&&(Z.$L=ee),Z},F.clone=function(){return A.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},K}(),T=P.prototype;return C.prototype=T,[["$ms",o],["$s",s],["$m",a],["$H",u],["$W",l],["$M",p],["$y",f],["$D",m]].forEach(function(K){T[K[1]]=function(F){return this.$g(F,K[0],K[1])}}),C.extend=function(K,F){return K.$i||(K(F,P,C),K.$i=!0),C},C.locale=Y,C.isDayjs=D,C.unix=function(K){return C(1e3*K)},C.en=_[j],C.Ls=_,C.p={},C})})(Ll);var Hl=Ll.exports;const dg=pn(Hl);var pg={exports:{}};(function(n,e){(function(t,r){n.exports=r(Hl)})(Re,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})})(pg),dg.locale("zh-cn");const hg=n=>Object.prototype.toString.call(n),Xr=n=>hg(n).slice(8,-1),Ul=()=>+Date.now();function nt(){return Number(Math.random().toString().substring(2,5)+Date.now()).toString(36)}function fg(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 ql(n=0){return new Promise(e=>{setTimeout(e,n)})}function mg(n,e){return n.reduce((t,r)=>{const i=r[e];return t.set(i,r),t},new Map)}function vg(n){return[...n.entries()].reduce((e,[t,r])=>(e[t]=r,e),{})}function Wl(n){return n?[].concat(n):[]}function Qr(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 gg(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 ki={exports:{}};ki.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),p=0,h=l.length;p<h;p++){var f=l.charCodeAt(p);c[p*2]=f>>>8,c[p*2+1]=f%256}return c},decompressFromUint8Array:function(u){if(u==null)return a.decompress(u);for(var l=new Array(u.length/2),c=0,p=l.length;c<p;c++)l[c]=u[c*2]*256+u[c*2+1];var h=[];return l.forEach(function(f){h.push(t(f))}),a.decompress(h.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 p,h,f={},m={},v="",g="",S="",y=2,w=3,E=2,j=[],_=0,V=0,D;for(D=0;D<u.length;D+=1)if(v=u.charAt(D),Object.prototype.hasOwnProperty.call(f,v)||(f[v]=w++,m[v]=!0),g=S+v,Object.prototype.hasOwnProperty.call(f,g))S=g;else{if(Object.prototype.hasOwnProperty.call(m,S)){if(S.charCodeAt(0)<256){for(p=0;p<E;p++)_=_<<1,V==l-1?(V=0,j.push(c(_)),_=0):V++;for(h=S.charCodeAt(0),p=0;p<8;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}else{for(h=1,p=0;p<E;p++)_=_<<1|h,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=0;for(h=S.charCodeAt(0),p=0;p<16;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}y--,y==0&&(y=Math.pow(2,E),E++),delete m[S]}else for(h=f[S],p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;y--,y==0&&(y=Math.pow(2,E),E++),f[g]=w++,S=String(v)}if(S!==""){if(Object.prototype.hasOwnProperty.call(m,S)){if(S.charCodeAt(0)<256){for(p=0;p<E;p++)_=_<<1,V==l-1?(V=0,j.push(c(_)),_=0):V++;for(h=S.charCodeAt(0),p=0;p<8;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}else{for(h=1,p=0;p<E;p++)_=_<<1|h,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=0;for(h=S.charCodeAt(0),p=0;p<16;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1}y--,y==0&&(y=Math.pow(2,E),E++),delete m[S]}else for(h=f[S],p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;y--,y==0&&(y=Math.pow(2,E),E++)}for(h=2,p=0;p<E;p++)_=_<<1|h&1,V==l-1?(V=0,j.push(c(_)),_=0):V++,h=h>>1;for(;;)if(_=_<<1,V==l-1){j.push(c(_));break}else V++;return j.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 p=[],h=4,f=4,m=3,v="",g=[],S,y,w,E,j,_,V,D={val:c(0),position:l,index:1};for(S=0;S<3;S+=1)p[S]=S;for(w=0,j=Math.pow(2,2),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;switch(w){case 0:for(w=0,j=Math.pow(2,8),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;V=t(w);break;case 1:for(w=0,j=Math.pow(2,16),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;V=t(w);break;case 2:return""}for(p[3]=V,y=V,g.push(V);;){if(D.index>u)return"";for(w=0,j=Math.pow(2,m),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;switch(V=w){case 0:for(w=0,j=Math.pow(2,8),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;p[f++]=t(w),V=f-1,h--;break;case 1:for(w=0,j=Math.pow(2,16),_=1;_!=j;)E=D.val&D.position,D.position>>=1,D.position==0&&(D.position=l,D.val=c(D.index++)),w|=(E>0?1:0)*_,_<<=1;p[f++]=t(w),V=f-1,h--;break;case 2:return g.join("")}if(h==0&&(h=Math.pow(2,m),m++),p[V])v=p[V];else if(V===f)v=y+y.charAt(0);else return null;g.push(v),p[f++]=y+v.charAt(0),h--,y=v,h==0&&(h=Math.pow(2,m),m++)}}};return a}();n!=null?n.exports=e:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return e})}(ki);var Jl=ki.exports;Jl.compress;Jl.decompress;function yg(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 mo=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}},ei=class Kl{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 Kl(r,i),t),{})}},ti=class Gl{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 Gl(i),t),{})}},Yt=class Yl{constructor(e){this.schema=e,this.id=e.id||nt(),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 Yl(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 we="EVENT_NODE_CHANGE";let Sr=class cr{constructor(e,t=null){this.parent=t;const{id:r=nt(),name:i,from:o=""}=e;this.id=r,this.name=i,this.from=o,this.update(e,!0),cr.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=ei.parse(a),this.events=ti.parse(u),this.directives=Yt.parse(l),t||U.emit(we,this)}setChildren(e="",t=!1){Array.isArray(e)?this.children=e.map(r=>new cr(r,this)):this.children=e,t||U.emit(we,this)}setSlot(e,t=!1){this.slot=typeof e=="string"?{name:e,params:[]}:e,t||U.emit(we,this)}setProp(e,t,r,i=!1){const o=this.props[e];o?o.setValue(t):this.props[e]=new ei(e,t,r),i||U.emit(we,this)}removeProp(e,t=!1){delete this.props[e],t||U.emit(we,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 ti(e),t||U.emit(we,this)}removeEvent(e,t=!1){delete this.events[e],t||U.emit(we,this)}setDirective(e,t=!1){const r=this.directives.findIndex(i=>i.id===e.id);r>=0?this.directives.splice(r,1,new Yt(e)):this.directives.push(new Yt(e)),t||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,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||U.emit(we,t))}}toDsl(){const{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:a,props:u,directives:l,events:c}=this,p=Array.isArray(a)?a.map(h=>h.toDsl()):a;return{id:e,name:t,from:r,invisible:i,locked:o,slot:s,children:p,props:ei.toDsl(u),directives:Yt.toDsl(l),events:ti.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||U.emit(we,this),this.parent=null,this.disposed=!0,delete cr.nodes[this.id])}lock(e=!1){if(this.locked=!0,Array.isArray(this.children))for(const t of this.children)t.lock(!0);e||U.emit(we,this)}unlock(e=!1){if(this.locked=!1,Array.isArray(this.children))for(const t of this.children)t.unlock(!0);e||U.emit(we,this)}setVisible(e,t=!1){if(this.invisible=!e,Array.isArray(this.children))for(const r of this.children)r.setVisible(e,!0);t||U.emit(we,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 pe="EVENT_BLOCK_CHANGE";let tn=class Ei{__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||nt(),this.update(e,!0)}update(e,t=!1){for(const i of Ei.normalAttrs){const o=e[i];o&&(this[i]=o)}const{nodes:r=[]}=e;r.length&&(this.nodes=r.map(i=>new Sr(i))),t||U.emit(pe,this)}toDsl(e){const{__VTJ_BLOCK__:t,id:r,nodes:i}=this;return{...Ei.normalAttrs.reduce((o,s)=>(o[s]=this[s],o),{}),__VTJ_BLOCK__:t,__VERSION__:e||Ul().toString(),id:r,nodes:i.map(o=>o.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||U.emit(pe,this)}removeFunction(e,t,r=!1){delete this[e][t],r||U.emit(pe,this)}setState(e,t,r=!1){this.state[e]=t,r||U.emit(pe,this)}removeState(e,t=!1){delete this.state[e],t||U.emit(pe,this)}setCss(e,t=!1){this.css=e,t||U.emit(pe,this)}setWatch(e,t=!1){e.id=e.id||nt();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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,this)}removeEmit(e,t=!1){const r=this.emits.findIndex(i=>i===e);r>-1&&(this.emits.splice(r,1),t||U.emit(pe,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||U.emit(pe,this)}removeSlot(e,t=!1){const r=this.slots.findIndex(i=>i===e);r>-1&&(this.slots.splice(r,1),t||U.emit(pe,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||U.emit(pe,this)}removeInject(e,t=!1){const r=this.inject.findIndex(i=>i.name===e.name);r>-1&&(this.inject.splice(r,1),t||U.emit(pe,this))}setDataSource(e,t=!1){this.dataSources[e.name]=e,t||U.emit(pe,this)}removeDataSource(e,t=!1){delete this.dataSources[e],t||U.emit(pe,this)}insertAfter(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i+1,0,e),r||U.emit(pe,this)}insertBefore(e,t,r=!1){e.parent=null;const i=this.nodes.indexOf(t);this.nodes.splice(i,0,e),r||U.emit(pe,this)}appendNode(e,t=!1){e.parent=null,this.nodes.push(e),t||U.emit(pe,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||U.emit(pe,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||U.emit(pe,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||U.emit(pe,this))}}cloneNode(e,t=!1){const r=Ql(e.toDsl()),i=new Sr(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||U.emit(pe,this)}unlock(e=!1){this.locked=!1;for(const t of this.nodes)t.unlock(!0);e||U.emit(pe,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 ze="EVENT_PROJECT_CHANGE",Bn="EVENT_PROJECT_ACTIVED",$i="EVENT_PROJECT_DEPS_CHANGE",_n="EVENT_PROJECT_PAGES_CHANGE",dr="EVENT_PROJECT_BLOCKS_CHANGE",Ls="EVENT_PROJECT_APIS_CHANGE",Zl="EVENT_PROJECT_PUBLISH",Xl="EVENT_PROJECT_FILE_PUBLISH";let bg=class Vi{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||nt(),this.update(e,!0)}update(e,t=!1){for(const r of Vi.attrs){const i=e[r];i&&(this[r]=i)}t||U.emit(ze,{model:this,type:"update",data:e})}isPageFile(e){return e.type==="page"}toDsl(e){const{id:t}=this,r=Vi.attrs.reduce((i,o)=>(i[o]=this[o],i),{});return r.pages&&(r.pages=r.pages.map(i=>(delete i.dsl,i))),r.blocks&&(r.blocks=r.blocks.map(i=>(delete i.dsl,i))),{__VTJ_PROJECT__:!0,__VERSION__:e||Ul().toString(),id:t,...r}}active(e,t=!1){this.currentFile=e,t||U.emit(Bn,{model:this,type:"update",data:e})}deactivate(e=!1){this.currentFile=null,e||U.emit(Bn,{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};U.emit($i,s),U.emit(ze,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};U.emit($i,o),U.emit(ze,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.raw?e.name:e.id||nt(),e.type="page",e.dir?e.children=[]:e.dsl=e.dsl||new tn({id:e.id,name:xr(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&&!e.dir&&this.active(e,r),!r){const i={model:this,type:"create",data:e};U.emit(_n,i),U.emit(ze,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};U.emit(_n,i),U.emit(ze,i)}}clonePage(e,t,r=!1){const i=nt(),o=`${e.name}Copy`,s=`${e.title}_副本`,a=new tn({id:i,name:o}).toDsl(),u=dt({},e,{id:i,name:o,title:s,dsl:a}),l=t?this.getPage(t)?.children||[]:this.pages,c=l.findIndex(p=>p.id===e.id);if(l.splice(c+1,0,u),!r){const p={model:this,type:"clone",data:{page:e,newPage:u}};U.emit(_n,p),U.emit(ze,p)}}removePage(e,t=!1){const r=this.getPage(e),i=(o,s)=>{const a=s.findIndex(u=>u.id===o);if(a>=0){s.splice(a,1);return}for(const u of s)if(u.children&&u.children.length)return i(o,u.children)};if(i(e,this.pages),e===this.homepage&&(this.homepage=""),this.currentFile?.id===e&&this.deactivate(t),!t){const o={model:this,type:"delete",data:r};U.emit(_n,o),U.emit(ze,o)}}getBlock(e){return this.blocks.find(t=>t.id===e)}createBlock(e,t=!1){const r=e.id||nt(),i=xr(e.name);if(e.id=r,e.type="block",e.dsl=new tn({id:r,name:i}).toDsl(),this.blocks.push(e),this.currentFile||this.active(e,t),!t){const o={model:this,type:"create",data:e};U.emit(dr,o),U.emit(ze,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};U.emit(dr,i),U.emit(ze,i)}}removeBlock(e,t=!1){const r=this.getBlock(e),i=this.blocks,o=i.findIndex(s=>s.id===e);if(o>-1?(i.splice(o,1),this.currentFile?.id===e&&this.deactivate(t)):console.warn(`not found PageFile for id: ${e} `),!t){const s={model:this,type:"delete",data:r};U.emit(dr,s),U.emit(ze,s)}}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=nt(),this.apis.push(e)),!t){const o={model:this,type:i,data:e};U.emit(Ls,o),U.emit(ze,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};U.emit(Ls,i),U.emit(ze,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};U.emit(ze,r)}}publish(e){const t={model:this,type:"publish",data:e||this};e?U.emit(Xl,t):U.emit(Zl,t)}};const xn="EVENT_HISTORY_CHANGE",pr="EVENT_HISTORY_LOAD";let wg=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:nt(),label:new Date().toLocaleString(),dsl:zn(e)};if(this.items.unshift(i),this.items.length>r){const o=this.items.splice(r);t||U.emit(xn,{model:this,type:"delete",data:o.map(s=>s.id)})}this.index=-1,t||U.emit(xn,{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||U.emit(xn,{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&&U.emit(pr,{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&&U.emit(pr,{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||U.emit(pr,{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||U.emit(xn,{model:this,type:"clear",data:t})}};const U=yg();function Se(n){return n instanceof tn}function Ql(n){return delete n.id,Array.isArray(n.children)&&(n.children=n.children.map(e=>Ql(e))),n}/**!
50
50
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
51
51
  * @name @vtj/icons
52
52
  * @author CHC chenhuachun1549@dingtalk.com
53
- * @version 0.7.6
53
+ * @version 0.7.7
54
54
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
55
- */const gg=B({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),yg=B({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),bg=B({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),wg=B({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),_g=B({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Zl=B({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Xl=B({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ql=B({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),xg=B({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),eu=B({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Sg=B({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),jg=B({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),kg=B({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Eg=B({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),$g=B({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Vg=B({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Cg=B({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ag=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:gg,Fixed:yg,Fullscreen:bg,Invisible:wg,LineHeight:_g,Maximize:Zl,Minimize:Xl,Popup:Ql,QrCodeLogin:xg,RawClose:eu,RawLock:Sg,RawUnLock:jg,Rows:kg,Skin:Eg,UnFixed:$g,UserLogin:Vg,Visible:Cg},Symbol.toStringTag,{value:"Module"}));function J(n,e){return Et(B({name:n,render(){return x("i",{class:e})}}))}const Og=J("VtjIconWindowMax","vtj-icon-window-max"),Tg=J("VtjIconWindowMin","vtj-icon-window-min"),Dg=J("VtjIconWindowClose","vtj-icon-window-close"),Ig=J("VtjIconWindowNormal","vtj-icon-window-normal"),Bg=J("VtjIconWindowDown","vtj-icon-window-down"),Rg=J("VtjIconWindowUp","vtj-icon-window-up"),Mg=J("VtjIconNpSave","vtj-icon-np-save"),Pg=J("VtjIconNpFile","vtj-icon-np-file"),zg=J("VtjIconNpEdit","vtj-icon-np-edit"),Ng=J("VtjIconNpShare","vtj-icon-np-share"),Fg=J("VtjIconNpSearch","vtj-icon-np-search"),Lg=J("VtjIconNpExport","vtj-icon-np-export"),Hg=J("VtjIconNpImport","vtj-icon-np-import"),Ug=J("VtjIconNpList","vtj-icon-np-list"),qg=J("VtjIconNpPrint","vtj-icon-np-print"),Wg=J("VtjIconNpCancel","vtj-icon-np-cancel"),Jg=J("VtjIconNpConfirm","vtj-icon-np-confirm"),Kg=J("VtjIconNpReset","vtj-icon-np-reset"),Gg=J("VtjIconNpReturnAll","vtj-icon-np-return-all"),Yg=J("VtjIconNpReturn","vtj-icon-np-return"),Zg=J("VtjIconNpRemove","vtj-icon-np-remove"),Xg=J("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),Qg=J("VtjIconNpDelete","vtj-icon-np-delete"),ey=J("VtjIconNpExit","vtj-icon-np-exit"),ty=J("VtjIconNpRefresh","vtj-icon-np-refresh"),ny=J("VtjIconNpAdd","vtj-icon-np-add"),ry=J("VtjIconNpSelect","vtj-icon-np-select"),iy=J("VtjIconNpAddRow","vtj-icon-np-add-row"),oy=J("VtjIconNpExtend","vtj-icon-np-extend"),sy=J("VtjIconNpClose","vtj-icon-np-close"),ay=J("VtjIconNpSubmit","vtj-icon-np-submit"),ly=J("VtjIconDeps","vtj-icon-deps"),tu=J("VtjIconBack","vtj-icon-back"),nu=J("VtjIconHome","vtj-icon-home"),ru=J("VtjIconApi","vtj-icon-api"),uy=J("VtjIconExport","vtj-icon-export"),cy=J("VtjIconImport","vtj-icon-import"),dy=J("VtjIconGreater","vtj-icon-greater"),py=J("VtjIconSmaller","vtj-icon-smaller"),po=J("VtjIconCheck","vtj-icon-check"),iu=J("VtjIconSwitch","vtj-icon-switch"),ho=J("VtjIconCopy","vtj-icon-copy"),fo=J("VtjIconLock","vtj-icon-lock"),ou=J("VtjIconUnlock","vtj-icon-unlock"),mo=J("VtjIconLayers","vtj-icon-layers"),hy=J("VtjIconConsole","vtj-icon-console"),fy=J("VtjIconTeam","vtj-icon-team"),my=J("VtjIconPublish","vtj-icon-publish"),su=J("VtjIconPreview","vtj-icon-preview"),au=J("VtjIconSave","vtj-icon-save"),lu=J("VtjIconPc","vtj-icon-pc"),uu=J("VtjIconPhone","vtj-icon-phone"),cu=J("VtjIconPad","vtj-icon-pad"),du=J("VtjIconRedo","vtj-icon-redo"),pu=J("VtjIconRefresh","vtj-icon-refresh"),hu=J("VtjIconUndo","vtj-icon-undo"),fu=J("VtjIconCategory","vtj-icon-category"),vy=J("VtjIconProject","vtj-icon-project"),gy=J("VtjIconNotice","vtj-icon-notice"),yy=J("VtjIconFav","vtj-icon-fav"),mu=J("VtjIconBug","vtj-icon-bug"),by=J("VtjIconFile","vtj-icon-file"),wy=J("VtjIconFolder","vtj-icon-folder"),_y=J("VtjIconUpload","vtj-icon-upload"),xy=J("VtjIconDownload","vtj-icon-download"),Sy=J("VtjIconUser","vtj-icon-user"),vu=J("VtjIconSetting","vtj-icon-setting"),jy=J("VtjIconArrowRight","vtj-icon-arrow-right"),ky=J("VtjIconArrowLeft","vtj-icon-arrow-left"),gu=J("VtjIconArrowDown","vtj-icon-arrow-down"),yu=J("VtjIconArrowUp","vtj-icon-arrow-up"),Ey=J("VtjIconShare","vtj-icon-share"),$y=J("VtjIconData","vtj-icon-data"),Vy=J("VtjIconTemplate","vtj-icon-template"),Cy=J("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),Ay=J("VtjIconFullscreen","vtj-icon-fullscreen"),vo=J("VtjIconEdit","vtj-icon-edit"),Pn=J("VtjIconRemove","vtj-icon-remove"),Oy=J("VtjIconJs","vtj-icon-js"),Ty=J("VtjIconDatabase","vtj-icon-database"),bu=J("VtjIconInfo","vtj-icon-info"),go=J("VtjIconPlus","vtj-icon-plus"),Dy=J("VtjIconMinus","vtj-icon-minus"),wu=J("VtjIconHelp","vtj-icon-help"),_u=J("VtjIconVars","vtj-icon-vars"),xu=J("VtjIconOutline","vtj-icon-outline"),Su=J("VtjIconVisible","vtj-icon-visible"),yo=J("VtjIconInvisible","vtj-icon-invisible"),ju=J("VtjIconDocument","vtj-icon-document"),ku=J("VtjIconHistory","vtj-icon-history"),Iy=J("VtjIconFixed","vtj-icon-fixed"),By=J("VtjIconUnfixed","vtj-icon-unfixed"),Eu=J("VtjIconSearch","vtj-icon-search"),Ry=J("VtjIconMore","vtj-icon-more"),My=J("VtjIconClose","vtj-icon-close"),$u=J("VtjIconComponents","vtj-icon-components"),Vu=J("VtjIconBlock","vtj-icon-block"),Py=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:ru,VtjIconArrowDown:gu,VtjIconArrowLeft:ky,VtjIconArrowRight:jy,VtjIconArrowUp:yu,VtjIconBack:tu,VtjIconBlock:Vu,VtjIconBug:mu,VtjIconCategory:fu,VtjIconCheck:po,VtjIconClose:My,VtjIconComponents:$u,VtjIconConsole:hy,VtjIconCopy:ho,VtjIconData:$y,VtjIconDatabase:Ty,VtjIconDeps:ly,VtjIconDocument:ju,VtjIconDownload:xy,VtjIconEdit:vo,VtjIconExitFullscreen:Cy,VtjIconExport:uy,VtjIconFav:yy,VtjIconFile:by,VtjIconFixed:Iy,VtjIconFolder:wy,VtjIconFullscreen:Ay,VtjIconGreater:dy,VtjIconHelp:wu,VtjIconHistory:ku,VtjIconHome:nu,VtjIconImport:cy,VtjIconInfo:bu,VtjIconInvisible:yo,VtjIconJs:Oy,VtjIconLayers:mo,VtjIconLock:fo,VtjIconMinus:Dy,VtjIconMore:Ry,VtjIconNotice:gy,VtjIconNpAdd:ny,VtjIconNpAddRow:iy,VtjIconNpCancel:Wg,VtjIconNpClose:sy,VtjIconNpConfirm:Jg,VtjIconNpDelete:Qg,VtjIconNpEdit:zg,VtjIconNpExit:ey,VtjIconNpExport:Lg,VtjIconNpExtend:oy,VtjIconNpFile:Pg,VtjIconNpImport:Hg,VtjIconNpList:Ug,VtjIconNpPrint:qg,VtjIconNpRefresh:ty,VtjIconNpRemove:Zg,VtjIconNpRemoveRow:Xg,VtjIconNpReset:Kg,VtjIconNpReturn:Yg,VtjIconNpReturnAll:Gg,VtjIconNpSave:Mg,VtjIconNpSearch:Fg,VtjIconNpSelect:ry,VtjIconNpShare:Ng,VtjIconNpSubmit:ay,VtjIconOutline:xu,VtjIconPad:cu,VtjIconPc:lu,VtjIconPhone:uu,VtjIconPlus:go,VtjIconPreview:su,VtjIconProject:vy,VtjIconPublish:my,VtjIconRedo:du,VtjIconRefresh:pu,VtjIconRemove:Pn,VtjIconSave:au,VtjIconSearch:Eu,VtjIconSetting:vu,VtjIconShare:Ey,VtjIconSmaller:py,VtjIconSwitch:iu,VtjIconTeam:fy,VtjIconTemplate:Vy,VtjIconUndo:hu,VtjIconUnfixed:By,VtjIconUnlock:ou,VtjIconUpload:_y,VtjIconUser:Sy,VtjIconVars:_u,VtjIconVisible:Su,VtjIconWindowClose:Dg,VtjIconWindowDown:Bg,VtjIconWindowMax:Og,VtjIconWindowMin:Tg,VtjIconWindowNormal:Ig,VtjIconWindowUp:Rg},Symbol.toStringTag,{value:"Module"})),$i={...od,...Ag,...Py};function Cu(n,e){return function(){return n.apply(e,arguments)}}const{toString:zy}=Object.prototype,{getPrototypeOf:bo}=Object,Dr=(n=>e=>{const t=zy.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),st=n=>(n=n.toLowerCase(),e=>Dr(e)===n),Ir=n=>e=>typeof e===n,{isArray:hn}=Array,In=Ir("undefined");function Ny(n){return n!==null&&!In(n)&&n.constructor!==null&&!In(n.constructor)&&Ke(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Au=st("ArrayBuffer");function Fy(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Au(n.buffer),e}const Ly=Ir("string"),Ke=Ir("function"),Ou=Ir("number"),Br=n=>n!==null&&typeof n=="object",Hy=n=>n===!0||n===!1,dr=n=>{if(Dr(n)!=="object")return!1;const e=bo(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Uy=st("Date"),qy=st("File"),Wy=st("Blob"),Jy=st("FileList"),Ky=n=>Br(n)&&Ke(n.pipe),Gy=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Ke(n.append)&&((e=Dr(n))==="formdata"||e==="object"&&Ke(n.toString)&&n.toString()==="[object FormData]"))},Yy=st("URLSearchParams"),Zy=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zn(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),hn(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 Tu(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 Du=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Iu=n=>!In(n)&&n!==Du;function Vi(){const{caseless:n}=Iu(this)&&this||{},e={},t=(r,i)=>{const o=n&&Tu(e,i)||i;dr(e[o])&&dr(r)?e[o]=Vi(e[o],r):dr(r)?e[o]=Vi({},r):hn(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&zn(arguments[r],t);return e}const Xy=(n,e,t,{allOwnKeys:r}={})=>(zn(e,(i,o)=>{t&&Ke(i)?n[o]=Cu(i,t):n[o]=i},{allOwnKeys:r}),n),Qy=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),e2=(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)},t2=(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&&bo(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},n2=(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},r2=n=>{if(!n)return null;if(hn(n))return n;let e=n.length;if(!Ou(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},i2=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&bo(Uint8Array)),o2=(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])}},s2=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},a2=st("HTMLFormElement"),l2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),zs=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),u2=st("RegExp"),Bu=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};zn(t,(i,o)=>{let s;(s=e(i,o,n))!==!1&&(r[o]=s||i)}),Object.defineProperties(n,r)},c2=n=>{Bu(n,(e,t)=>{if(Ke(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Ke(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+"'")})}})},d2=(n,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return hn(n)?r(n):r(String(n).split(e)),t},p2=()=>{},h2=(n,e)=>(n=+n,Number.isFinite(n)?n:e),ei="abcdefghijklmnopqrstuvwxyz",Ns="0123456789",Ru={DIGIT:Ns,ALPHA:ei,ALPHA_DIGIT:ei+ei.toUpperCase()+Ns},f2=(n=16,e=Ru.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function m2(n){return!!(n&&Ke(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const v2=n=>{const e=new Array(10),t=(r,i)=>{if(Br(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hn(r)?[]:{};return zn(r,(s,a)=>{const u=t(s,i+1);!In(u)&&(o[a]=u)}),e[i]=void 0,o}}return r};return t(n,0)},g2=st("AsyncFunction"),y2=n=>n&&(Br(n)||Ke(n))&&Ke(n.then)&&Ke(n.catch),R={isArray:hn,isArrayBuffer:Au,isBuffer:Ny,isFormData:Gy,isArrayBufferView:Fy,isString:Ly,isNumber:Ou,isBoolean:Hy,isObject:Br,isPlainObject:dr,isUndefined:In,isDate:Uy,isFile:qy,isBlob:Wy,isRegExp:u2,isFunction:Ke,isStream:Ky,isURLSearchParams:Yy,isTypedArray:i2,isFileList:Jy,forEach:zn,merge:Vi,extend:Xy,trim:Zy,stripBOM:Qy,inherits:e2,toFlatObject:t2,kindOf:Dr,kindOfTest:st,endsWith:n2,toArray:r2,forEachEntry:o2,matchAll:s2,isHTMLForm:a2,hasOwnProperty:zs,hasOwnProp:zs,reduceDescriptors:Bu,freezeMethods:c2,toObjectSet:d2,toCamelCase:l2,noop:p2,toFiniteNumber:h2,findKey:Tu,global:Du,isContextDefined:Iu,ALPHABET:Ru,generateString:f2,isSpecCompliantForm:m2,toJSONObject:v2,isAsyncFn:g2,isThenable:y2};function ce(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)}R.inherits(ce,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:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Mu=ce.prototype,Pu={};["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=>{Pu[n]={value:n}});Object.defineProperties(ce,Pu);Object.defineProperty(Mu,"isAxiosError",{value:!0});ce.from=(n,e,t,r,i,o)=>{const s=Object.create(Mu);return R.toFlatObject(n,s,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ce.call(s,n.message,e,t,r,i),s.cause=n,s.name=n.name,o&&Object.assign(s,o),s};const b2=null;function Ci(n){return R.isPlainObject(n)||R.isArray(n)}function zu(n){return R.endsWith(n,"[]")?n.slice(0,-2):n}function Fs(n,e,t){return n?n.concat(e).map(function(r,i){return r=zu(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function w2(n){return R.isArray(n)&&!n.some(Ci)}const _2=R.toFlatObject(R,{},null,function(n){return/^is[A-Z]/.test(n)});function Rr(n,e,t){if(!R.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=R.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!R.isUndefined(m[f])});const r=t.metaTokens,i=t.visitor||l,o=t.dots,s=t.indexes,a=(t.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(R.isDate(f))return f.toISOString();if(!a&&R.isBlob(f))throw new ce("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(f)||R.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,m,v){let g=f;if(f&&!v&&typeof f=="object"){if(R.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(R.isArray(f)&&w2(f)||(R.isFileList(f)||R.endsWith(m,"[]"))&&(g=R.toArray(f)))return m=zu(m),g.forEach(function(S,y){!(R.isUndefined(S)||S===null)&&e.append(s===!0?Fs([m],y,o):s===null?m:m+"[]",u(S))}),!1}return Ci(f)?!0:(e.append(Fs(v,m,o),u(f)),!1)}const c=[],p=Object.assign(_2,{defaultVisitor:l,convertValue:u,isVisitable:Ci});function h(f,m){if(!R.isUndefined(f)){if(c.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(f),R.forEach(f,function(v,g){(!(R.isUndefined(v)||v===null)&&i.call(e,v,R.isString(g)?g.trim():g,m,p))===!0&&h(v,m?m.concat(g):[g])}),c.pop()}}if(!R.isObject(n))throw new TypeError("data must be an object");return h(n),e}function Ls(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function wo(n,e){this._pairs=[],n&&Rr(n,this,e)}const Nu=wo.prototype;Nu.append=function(n,e){this._pairs.push([n,e])};Nu.toString=function(n){const e=n?function(t){return n.call(this,t,Ls)}:Ls;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function x2(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Fu(n,e,t){if(!e)return n;const r=t&&t.encode||x2,i=t&&t.serialize;let o;if(i?o=i(e,t):o=R.isURLSearchParams(e)?e.toString():new wo(e,t).toString(r),o){const s=n.indexOf("#");s!==-1&&(n=n.slice(0,s)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}let Hs=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){R.forEach(this.handlers,function(t){t!==null&&e(t)})}};const Lu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},S2=typeof URLSearchParams<"u"?URLSearchParams:wo,j2=typeof FormData<"u"?FormData:null,k2=typeof Blob<"u"?Blob:null,E2={isBrowser:!0,classes:{URLSearchParams:S2,FormData:j2,Blob:k2},protocols:["http","https","file","blob","url","data"]},Hu=typeof window<"u"&&typeof document<"u",$2=(n=>Hu&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),V2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hu,hasStandardBrowserEnv:$2,hasStandardBrowserWebWorkerEnv:V2},Symbol.toStringTag,{value:"Module"})),rt={...C2,...E2};function A2(n,e){return Rr(n,new rt.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return rt.isNode&&R.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function O2(n){return R.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function T2(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 Uu(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&&R.isArray(i)?i.length:s,u?(R.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),e(t,r,i[s],o)&&R.isArray(i[s])&&(i[s]=T2(i[s])),!a)}if(R.isFormData(n)&&R.isFunction(n.entries)){const t={};return R.forEachEntry(n,(r,i)=>{e(O2(r),i,t,0)}),t}return null}function D2(n,e,t){if(R.isString(n))try{return(e||JSON.parse)(n),R.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const _o={transitional:Lu,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=R.isObject(n);if(i&&R.isHTMLForm(n)&&(n=new FormData(n)),R.isFormData(n))return r&&r?JSON.stringify(Uu(n)):n;if(R.isArrayBuffer(n)||R.isBuffer(n)||R.isStream(n)||R.isFile(n)||R.isBlob(n))return n;if(R.isArrayBufferView(n))return n.buffer;if(R.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 A2(n,this.formSerializer).toString();if((o=R.isFileList(n))||t.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Rr(o?{"files[]":n}:n,s&&new s,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),D2(n)):n}],transformResponse:[function(n){const e=this.transitional||_o.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&R.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"?ce.from(o,ce.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:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],n=>{_o.headers[n]={}});const xo=_o,I2=R.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"]),B2=n=>{const e={};let t,r,i;return n&&n.split(`
56
- `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!t||e[t]&&I2[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Us=Symbol("internals");function bn(n){return n&&String(n).trim().toLowerCase()}function pr(n){return n===!1||n==null?n:R.isArray(n)?n.map(pr):String(n)}function R2(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 M2=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ti(n,e,t,r,i){if(R.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!R.isString(e)){if(R.isString(r))return e.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(e)}}function P2(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function z2(n,e){const t=R.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 Mr=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(a,u,l){const c=bn(u);if(!c)throw new Error("header name must be a non-empty string");const p=R.findKey(i,c);(!p||i[p]===void 0||l===!0||l===void 0&&i[p]!==!1)&&(i[p||u]=pr(a))}const s=(a,u)=>R.forEach(a,(l,c)=>o(l,c,u));return R.isPlainObject(e)||e instanceof this.constructor?s(e,t):R.isString(e)&&(e=e.trim())&&!M2(e)?s(B2(e),t):e!=null&&o(t,e,r),this}get(e,t){if(e=bn(e),e){const r=R.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return R2(i);if(R.isFunction(t))return t.call(this,i,r);if(R.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bn(e),e){const r=R.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||ti(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(s){if(s=bn(s),s){const a=R.findKey(r,s);a&&(!t||ti(r,r[a],a,t))&&(delete r[a],i=!0)}}return R.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||ti(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return R.forEach(this,(i,o)=>{const s=R.findKey(r,o);if(s){t[s]=pr(i),delete t[o];return}const a=e?P2(o):String(o).trim();a!==o&&delete t[o],t[a]=pr(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&R.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(`
57
- `)}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[Us]=this[Us]={accessors:{}}).accessors,r=this.prototype;function i(o){const s=bn(o);t[s]||(z2(r,o),t[s]=!0)}return R.isArray(e)?e.forEach(i):i(e),this}};Mr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(Mr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});R.freezeMethods(Mr);const pt=Mr;function ni(n,e){const t=this||xo,r=e||t,i=pt.from(r.headers);let o=r.data;return R.forEach(n,function(s){o=s.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function qu(n){return!!(n&&n.__CANCEL__)}function Nn(n,e,t){ce.call(this,n??"canceled",ce.ERR_CANCELED,e,t),this.name="CanceledError"}R.inherits(Nn,ce,{__CANCEL__:!0});function N2(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new ce("Request failed with status code "+t.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const F2=rt.hasStandardBrowserEnv?{write(n,e,t,r,i,o){const s=[n+"="+encodeURIComponent(e)];R.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),R.isString(r)&&s.push("path="+r),R.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 L2(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function H2(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Wu(n,e){return n&&!L2(e)?H2(n,e):e}const U2=rt.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=R.isString(i)?r(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}();function q2(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function W2(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,p=0;for(;c!==i;)p+=t[c++],c=c%n;if(i=(i+1)%n,i===o&&(o=(o+1)%n),u-s<e)return;const h=l&&u-l;return h?Math.round(p*1e3/h):void 0}}function qs(n,e){let t=0;const r=W2(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 J2=typeof XMLHttpRequest<"u",K2=J2&&function(n){return new Promise(function(e,t){let r=n.data;const i=pt.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(R.isFormData(r)){if(rt.hasStandardBrowserEnv||rt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[m,...v]=l?l.split(";").map(g=>g.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...v].join("; "))}}let c=new XMLHttpRequest;if(n.auth){const m=n.auth.username||"",v=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+v))}const p=Wu(n.baseURL,n.url);c.open(n.method.toUpperCase(),Fu(p,n.params,n.paramsSerializer),!0),c.timeout=n.timeout;function h(){if(!c)return;const m=pt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:n,request:c};N2(function(g){e(g),u()},function(g){t(g),u()},v),c=null}if("onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){c&&(t(new ce("Request aborted",ce.ECONNABORTED,n,c)),c=null)},c.onerror=function(){t(new ce("Network Error",ce.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let m=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const v=n.transitional||Lu;n.timeoutErrorMessage&&(m=n.timeoutErrorMessage),t(new ce(m,v.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,n,c)),c=null},rt.hasStandardBrowserEnv&&(s&&R.isFunction(s)&&(s=s(n)),s||s!==!1&&U2(p))){const m=n.xsrfHeaderName&&n.xsrfCookieName&&F2.read(n.xsrfCookieName);m&&i.set(n.xsrfHeaderName,m)}r===void 0&&i.setContentType(null),"setRequestHeader"in c&&R.forEach(i.toJSON(),function(m,v){c.setRequestHeader(v,m)}),R.isUndefined(n.withCredentials)||(c.withCredentials=!!n.withCredentials),o&&o!=="json"&&(c.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&c.addEventListener("progress",qs(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",qs(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=m=>{c&&(t(!m||m.type?new Nn(null,n,c):m),c.abort(),c=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const f=q2(p);if(f&&rt.protocols.indexOf(f)===-1){t(new ce("Unsupported protocol "+f+":",ce.ERR_BAD_REQUEST,n));return}c.send(r||null)})},Ai={http:b2,xhr:K2};R.forEach(Ai,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Ws=n=>`- ${n}`,G2=n=>R.isFunction(n)||n===null||n===!1,Ju={getAdapter:n=>{n=R.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,!G2(t)&&(r=Ai[(s=String(t)).toLowerCase()],r===void 0))throw new ce(`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 :
58
- `+o.map(Ws).join(`
59
- `):" "+Ws(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ai};function ri(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Nn(null,n)}function Js(n){return ri(n),n.headers=pt.from(n.headers),n.data=ni.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ju.getAdapter(n.adapter||xo.adapter)(n).then(function(e){return ri(n),e.data=ni.call(n,n.transformResponse,e),e.headers=pt.from(e.headers),e},function(e){return qu(e)||(ri(n),e&&e.response&&(e.response.data=ni.call(n,n.transformResponse,e.response),e.response.headers=pt.from(e.response.headers))),Promise.reject(e)})}const Ks=n=>n instanceof pt?n.toJSON():n;function sn(n,e){e=e||{};const t={};function r(l,c,p){return R.isPlainObject(l)&&R.isPlainObject(c)?R.merge.call({caseless:p},l,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(l,c,p){if(R.isUndefined(c)){if(!R.isUndefined(l))return r(void 0,l,p)}else return r(l,c,p)}function o(l,c){if(!R.isUndefined(c))return r(void 0,c)}function s(l,c){if(R.isUndefined(c)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function a(l,c,p){if(p in e)return r(l,c);if(p 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(Ks(l),Ks(c),!0)};return R.forEach(Object.keys(Object.assign({},n,e)),function(l){const c=u[l]||i,p=c(n[l],e[l],l);R.isUndefined(p)&&c!==a||(t[l]=p)}),t}const Ku="1.6.5",So={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{So[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Gs={};So.transitional=function(n,e,t){function r(i,o){return"[Axios v"+Ku+"] Transitional option '"+i+"'"+o+(t?". "+t:"")}return(i,o,s)=>{if(n===!1)throw new ce(r(o," has been removed"+(e?" in "+e:"")),ce.ERR_DEPRECATED);return e&&!Gs[o]&&(Gs[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 Y2(n,e,t){if(typeof n!="object")throw new ce("options must be an object",ce.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 ce("option "+o+" must be "+u,ce.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ce("Unknown option "+o,ce.ERR_BAD_OPTION)}}const Oi={assertOptions:Y2,validators:So},yt=Oi.validators;class xr{constructor(e){this.defaults=e,this.interceptors={request:new Hs,response:new Hs}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=sn(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Oi.assertOptions(r,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),i!=null&&(R.isFunction(i)?t.paramsSerializer={serialize:i}:Oi.assertOptions(i,{encode:yt.function,serialize:yt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&R.merge(o.common,o[t.method]);o&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=pt.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(u=u&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,p=0,h;if(!u){const m=[Js.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,c=Promise.resolve(t);p<h;)c=c.then(m[p++],m[p++]);return c}h=a.length;let f=t;for(p=0;p<h;){const m=a[p++],v=a[p++];try{f=m(f)}catch(g){v.call(this,g);break}}try{c=Js.call(this,f)}catch(m){return Promise.reject(m)}for(p=0,h=l.length;p<h;)c=c.then(l[p++],l[p++]);return c}getUri(e){e=sn(this.defaults,e);const t=Wu(e.baseURL,e.url);return Fu(t,e.params,e.paramsSerializer)}}R.forEach(["delete","get","head","options"],function(n){xr.prototype[n]=function(e,t){return this.request(sn(t||{},{method:n,url:e,data:(t||{}).data}))}});R.forEach(["post","put","patch"],function(n){function e(t){return function(r,i,o){return this.request(sn(o||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}xr.prototype[n]=e(),xr.prototype[n+"Form"]=e(!0)});const hr=xr;let Z2=class Gu{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 Nn(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 Gu(function(t){e=t}),cancel:e}}};const X2=Z2;function Q2(n){return function(e){return n.apply(null,e)}}function eb(n){return R.isObject(n)&&n.isAxiosError===!0}const Ti={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(Ti).forEach(([n,e])=>{Ti[e]=n});const tb=Ti;function Yu(n){const e=new hr(n),t=Cu(hr.prototype.request,e);return R.extend(t,hr.prototype,e,{allOwnKeys:!0}),R.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Yu(sn(n,r))},t}const je=Yu(xo);je.Axios=hr;je.CanceledError=Nn;je.CancelToken=X2;je.isCancel=qu;je.VERSION=Ku;je.toFormData=Rr;je.AxiosError=ce;je.Cancel=je.CanceledError;je.all=function(n){return Promise.all(n)};je.spread=Q2;je.isAxiosError=eb;je.mergeConfig=sn;je.AxiosHeaders=pt;je.formToJSON=n=>Uu(R.isHTMLForm(n)?new FormData(n):n);je.getAdapter=Ju.getAdapter;je.HttpStatusCode=tb;je.default=je;const nb={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},rb=["put","post","patch"],Ys="Local-Request-Id",ib=200,ob=500;class Zu{axios;settings;records={};isLoading=!1;stopSkipWarn;showLoading;showError;constructor(e={}){this.settings=e.settings||{};const t=Zr(e,["settings"]);this.axios=je.create(ct({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},t)),this.setupSkipWarn(this.settings),this.showLoading=Sl(this.openLoading.bind(this),ib),this.showError=V0(this._showError.bind(this),ob,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=ct(this.settings,e.settings||{});const t=Zr(e,["settings"]);this.axios.defaults=ct(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":nb[t.type||"form"],...r.headers,...i};return t.skipWarn&&(o[Ys]=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 p=i?{[a]:!0}:{};return rb.includes(c.toLowerCase())?(u=Object.assign(u||{},p),u=o!=="json"||!this.isJsonType(r)?this.toFormData(u,o):u):l={...u,...l,...p},{data:u,params:l}}createUrl(e){const{url:t,query:r}=e;return r?Vl(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=ct({},this.settings,e.settings||{}),i=Zr(e,["settings"]),o=cg(!1),s=je.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((p,h)=>{this.axios({cancelToken:s.token,...i,url:a,headers:u,data:l,params:c}).then(f=>this.isSkipWarnResponse(f)?p(f.promise):this.validResponse(r,f)?p(r.originResponse?f:f.data?.data):(this.showError(r,f.data),h(f.data))).catch(f=>(this.showError(r,f),h(f))).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||{})[Ys],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(p=>p).finally(()=>{o&&o()}),s.promise=c}return s})}}function Xu(n={}){const e=new Zu(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})}Xu({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});const Zs=typeof window<"u";let Qu=class{options={type:"cache",expired:0,prefix:"__VTJ_"};caches={};types;constructor(e={}){this.types={local:Zs?window.localStorage:this.caches,session:Zs?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 p=s.getItem(o);p&&(a=JSON.parse(p))}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 Qu;var sb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Di={exports:{}};(function(n,e){(function(t,r){r(e,n)})(sb,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],p=l,h=c.timeout||i.timeout,f=c.jsonpCallback||i.jsonpCallback,m=void 0;return new Promise(function(v,g){var S=c.jsonpCallbackFunction||o(),y=f+"_"+S;window[S]=function(E){v({ok:!0,json:function(){return Promise.resolve(E)}}),m&&clearTimeout(m),a(y),s(S)},p+=p.indexOf("?")===-1?"?":"&";var w=document.createElement("script");w.setAttribute("src",""+p+f+"="+S),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=y,document.getElementsByTagName("head")[0].appendChild(w),m=setTimeout(function(){g(new Error("JSONP request to "+l+" timed out")),s(S),a(y),window[S]=function(){s(S)}},h),w.onerror=function(){g(new Error("JSONP request to "+l+" failed")),s(S),a(y),m&&clearTimeout(m)}})}r.exports=u})})(Di,Di.exports);var ab=Di.exports;const lb=ec(ab);function ub(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 Xs(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 cb(n,e){e=typeof e=="string"?Xs(e):e;const t=n.split("?")[0],r=Xs(n),i=Object.assign({},r,e),o=ub(i);return o?[t,o].join("?"):n}async function db(n,e={}){const{query:t={}}=e;n.includes("${")&&(n=Vl(n)(t||{}));const r=cb(n,t);return await(await lb(r,e)).json()}var pb=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&&hb(i,e.attrs),e.text&&(i.text=""+e.text);var o="onload"in i?Qs:fb;o(i,t),i.onload||Qs(i,t),r.appendChild(i)};function hb(n,e){for(var t in e)n.setAttribute(t,e[t])}function Qs(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 fb(n,e){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,n))}}const mb=ec(pb);function ea(n,e={}){return new Promise((t,r)=>{const{library:i}=e;mb(n,e,(o,s)=>{o?r(o):t(i?window[i]:void 0)})})}/*! js-cookie v3.0.5 | MIT */function Xn(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 vb={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 Ii(n,e){function t(i,o,s){if(!(typeof document>"u")){s=Xn({},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,"",Xn({},o,{expires:-1}))},withAttributes:function(i){return Ii(this.converter,Xn({},this.attributes,i))},withConverter:function(i){return Ii(Xn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}Ii(vb,{path:"/"});/**!
55
+ */const _g=B({name:"ExitFullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),xg=B({name:"Fixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Sg=B({name:"Fullscreen",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),jg=B({name:"Invisible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),kg=B({name:"LineHeight",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),eu=B({name:"Maximize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),tu=B({name:"Minimize",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),nu=B({name:"Popup",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Eg=B({name:"QrCodeLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),ru=B({name:"RawClose",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),$g=B({name:"RawLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Vg=B({name:"RawUnLock",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Cg=B({name:"Rows",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ag=B({name:"Skin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Og=B({name:"UnFixed",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Tg=B({name:"UserLogin",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Dg=B({name:"Visible",props:{colors:{type:Array,default:()=>[]}},setup(n){return()=>x("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)=>x("path",{d:e.path,fill:n.colors[t]??"currentColor"},null))])}}),Ig=Object.freeze(Object.defineProperty({__proto__:null,ExitFullscreen:_g,Fixed:xg,Fullscreen:Sg,Invisible:jg,LineHeight:kg,Maximize:eu,Minimize:tu,Popup:nu,QrCodeLogin:Eg,RawClose:ru,RawLock:$g,RawUnLock:Vg,Rows:Cg,Skin:Ag,UnFixed:Og,UserLogin:Tg,Visible:Dg},Symbol.toStringTag,{value:"Module"}));function J(n,e){return Et(B({name:n,render(){return x("i",{class:e})}}))}const Bg=J("VtjIconWindowMax","vtj-icon-window-max"),Rg=J("VtjIconWindowMin","vtj-icon-window-min"),Mg=J("VtjIconWindowClose","vtj-icon-window-close"),Pg=J("VtjIconWindowNormal","vtj-icon-window-normal"),zg=J("VtjIconWindowDown","vtj-icon-window-down"),Ng=J("VtjIconWindowUp","vtj-icon-window-up"),Fg=J("VtjIconNpSave","vtj-icon-np-save"),Lg=J("VtjIconNpFile","vtj-icon-np-file"),Hg=J("VtjIconNpEdit","vtj-icon-np-edit"),Ug=J("VtjIconNpShare","vtj-icon-np-share"),qg=J("VtjIconNpSearch","vtj-icon-np-search"),Wg=J("VtjIconNpExport","vtj-icon-np-export"),Jg=J("VtjIconNpImport","vtj-icon-np-import"),Kg=J("VtjIconNpList","vtj-icon-np-list"),Gg=J("VtjIconNpPrint","vtj-icon-np-print"),Yg=J("VtjIconNpCancel","vtj-icon-np-cancel"),Zg=J("VtjIconNpConfirm","vtj-icon-np-confirm"),Xg=J("VtjIconNpReset","vtj-icon-np-reset"),Qg=J("VtjIconNpReturnAll","vtj-icon-np-return-all"),ey=J("VtjIconNpReturn","vtj-icon-np-return"),ty=J("VtjIconNpRemove","vtj-icon-np-remove"),ny=J("VtjIconNpRemoveRow","vtj-icon-np-remove-row"),ry=J("VtjIconNpDelete","vtj-icon-np-delete"),iy=J("VtjIconNpExit","vtj-icon-np-exit"),oy=J("VtjIconNpRefresh","vtj-icon-np-refresh"),sy=J("VtjIconNpAdd","vtj-icon-np-add"),ay=J("VtjIconNpSelect","vtj-icon-np-select"),ly=J("VtjIconNpAddRow","vtj-icon-np-add-row"),uy=J("VtjIconNpExtend","vtj-icon-np-extend"),cy=J("VtjIconNpClose","vtj-icon-np-close"),dy=J("VtjIconNpSubmit","vtj-icon-np-submit"),py=J("VtjIconDeps","vtj-icon-deps"),iu=J("VtjIconBack","vtj-icon-back"),ou=J("VtjIconHome","vtj-icon-home"),su=J("VtjIconApi","vtj-icon-api"),hy=J("VtjIconExport","vtj-icon-export"),fy=J("VtjIconImport","vtj-icon-import"),my=J("VtjIconGreater","vtj-icon-greater"),vy=J("VtjIconSmaller","vtj-icon-smaller"),vo=J("VtjIconCheck","vtj-icon-check"),au=J("VtjIconSwitch","vtj-icon-switch"),go=J("VtjIconCopy","vtj-icon-copy"),yo=J("VtjIconLock","vtj-icon-lock"),lu=J("VtjIconUnlock","vtj-icon-unlock"),bo=J("VtjIconLayers","vtj-icon-layers"),gy=J("VtjIconConsole","vtj-icon-console"),yy=J("VtjIconTeam","vtj-icon-team"),by=J("VtjIconPublish","vtj-icon-publish"),uu=J("VtjIconPreview","vtj-icon-preview"),cu=J("VtjIconSave","vtj-icon-save"),du=J("VtjIconPc","vtj-icon-pc"),pu=J("VtjIconPhone","vtj-icon-phone"),hu=J("VtjIconPad","vtj-icon-pad"),fu=J("VtjIconRedo","vtj-icon-redo"),mu=J("VtjIconRefresh","vtj-icon-refresh"),vu=J("VtjIconUndo","vtj-icon-undo"),gu=J("VtjIconCategory","vtj-icon-category"),wy=J("VtjIconProject","vtj-icon-project"),_y=J("VtjIconNotice","vtj-icon-notice"),xy=J("VtjIconFav","vtj-icon-fav"),yu=J("VtjIconBug","vtj-icon-bug"),Sy=J("VtjIconFile","vtj-icon-file"),jy=J("VtjIconFolder","vtj-icon-folder"),ky=J("VtjIconUpload","vtj-icon-upload"),Ey=J("VtjIconDownload","vtj-icon-download"),$y=J("VtjIconUser","vtj-icon-user"),bu=J("VtjIconSetting","vtj-icon-setting"),Vy=J("VtjIconArrowRight","vtj-icon-arrow-right"),Cy=J("VtjIconArrowLeft","vtj-icon-arrow-left"),wu=J("VtjIconArrowDown","vtj-icon-arrow-down"),_u=J("VtjIconArrowUp","vtj-icon-arrow-up"),Ay=J("VtjIconShare","vtj-icon-share"),Oy=J("VtjIconData","vtj-icon-data"),Ty=J("VtjIconTemplate","vtj-icon-template"),Dy=J("VtjIconExitFullscreen","vtj-icon-exit-fullscreen"),Iy=J("VtjIconFullscreen","vtj-icon-fullscreen"),wo=J("VtjIconEdit","vtj-icon-edit"),Nn=J("VtjIconRemove","vtj-icon-remove"),By=J("VtjIconJs","vtj-icon-js"),Ry=J("VtjIconDatabase","vtj-icon-database"),xu=J("VtjIconInfo","vtj-icon-info"),_o=J("VtjIconPlus","vtj-icon-plus"),My=J("VtjIconMinus","vtj-icon-minus"),Su=J("VtjIconHelp","vtj-icon-help"),ju=J("VtjIconVars","vtj-icon-vars"),ku=J("VtjIconOutline","vtj-icon-outline"),Eu=J("VtjIconVisible","vtj-icon-visible"),xo=J("VtjIconInvisible","vtj-icon-invisible"),$u=J("VtjIconDocument","vtj-icon-document"),Vu=J("VtjIconHistory","vtj-icon-history"),Py=J("VtjIconFixed","vtj-icon-fixed"),zy=J("VtjIconUnfixed","vtj-icon-unfixed"),Cu=J("VtjIconSearch","vtj-icon-search"),Ny=J("VtjIconMore","vtj-icon-more"),Fy=J("VtjIconClose","vtj-icon-close"),Au=J("VtjIconComponents","vtj-icon-components"),Ou=J("VtjIconBlock","vtj-icon-block"),Ly=Object.freeze(Object.defineProperty({__proto__:null,VtjIconApi:su,VtjIconArrowDown:wu,VtjIconArrowLeft:Cy,VtjIconArrowRight:Vy,VtjIconArrowUp:_u,VtjIconBack:iu,VtjIconBlock:Ou,VtjIconBug:yu,VtjIconCategory:gu,VtjIconCheck:vo,VtjIconClose:Fy,VtjIconComponents:Au,VtjIconConsole:gy,VtjIconCopy:go,VtjIconData:Oy,VtjIconDatabase:Ry,VtjIconDeps:py,VtjIconDocument:$u,VtjIconDownload:Ey,VtjIconEdit:wo,VtjIconExitFullscreen:Dy,VtjIconExport:hy,VtjIconFav:xy,VtjIconFile:Sy,VtjIconFixed:Py,VtjIconFolder:jy,VtjIconFullscreen:Iy,VtjIconGreater:my,VtjIconHelp:Su,VtjIconHistory:Vu,VtjIconHome:ou,VtjIconImport:fy,VtjIconInfo:xu,VtjIconInvisible:xo,VtjIconJs:By,VtjIconLayers:bo,VtjIconLock:yo,VtjIconMinus:My,VtjIconMore:Ny,VtjIconNotice:_y,VtjIconNpAdd:sy,VtjIconNpAddRow:ly,VtjIconNpCancel:Yg,VtjIconNpClose:cy,VtjIconNpConfirm:Zg,VtjIconNpDelete:ry,VtjIconNpEdit:Hg,VtjIconNpExit:iy,VtjIconNpExport:Wg,VtjIconNpExtend:uy,VtjIconNpFile:Lg,VtjIconNpImport:Jg,VtjIconNpList:Kg,VtjIconNpPrint:Gg,VtjIconNpRefresh:oy,VtjIconNpRemove:ty,VtjIconNpRemoveRow:ny,VtjIconNpReset:Xg,VtjIconNpReturn:ey,VtjIconNpReturnAll:Qg,VtjIconNpSave:Fg,VtjIconNpSearch:qg,VtjIconNpSelect:ay,VtjIconNpShare:Ug,VtjIconNpSubmit:dy,VtjIconOutline:ku,VtjIconPad:hu,VtjIconPc:du,VtjIconPhone:pu,VtjIconPlus:_o,VtjIconPreview:uu,VtjIconProject:wy,VtjIconPublish:by,VtjIconRedo:fu,VtjIconRefresh:mu,VtjIconRemove:Nn,VtjIconSave:cu,VtjIconSearch:Cu,VtjIconSetting:bu,VtjIconShare:Ay,VtjIconSmaller:vy,VtjIconSwitch:au,VtjIconTeam:yy,VtjIconTemplate:Ty,VtjIconUndo:vu,VtjIconUnfixed:zy,VtjIconUnlock:lu,VtjIconUpload:ky,VtjIconUser:$y,VtjIconVars:ju,VtjIconVisible:Eu,VtjIconWindowClose:Mg,VtjIconWindowDown:zg,VtjIconWindowMax:Bg,VtjIconWindowMin:Rg,VtjIconWindowNormal:Pg,VtjIconWindowUp:Ng},Symbol.toStringTag,{value:"Module"})),Ci={...cd,...Ig,...Ly};function Tu(n,e){return function(){return n.apply(e,arguments)}}const{toString:Hy}=Object.prototype,{getPrototypeOf:So}=Object,Br=(n=>e=>{const t=Hy.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),st=n=>(n=n.toLowerCase(),e=>Br(e)===n),Rr=n=>e=>typeof e===n,{isArray:hn}=Array,Rn=Rr("undefined");function Uy(n){return n!==null&&!Rn(n)&&n.constructor!==null&&!Rn(n.constructor)&&Ke(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Du=st("ArrayBuffer");function qy(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Du(n.buffer),e}const Wy=Rr("string"),Ke=Rr("function"),Iu=Rr("number"),Mr=n=>n!==null&&typeof n=="object",Jy=n=>n===!0||n===!1,hr=n=>{if(Br(n)!=="object")return!1;const e=So(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},Ky=st("Date"),Gy=st("File"),Yy=st("Blob"),Zy=st("FileList"),Xy=n=>Mr(n)&&Ke(n.pipe),Qy=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Ke(n.append)&&((e=Br(n))==="formdata"||e==="object"&&Ke(n.toString)&&n.toString()==="[object FormData]"))},e2=st("URLSearchParams"),t2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fn(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,i;if(typeof n!="object"&&(n=[n]),hn(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 Bu(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 Ru=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mu=n=>!Rn(n)&&n!==Ru;function Ai(){const{caseless:n}=Mu(this)&&this||{},e={},t=(r,i)=>{const o=n&&Bu(e,i)||i;hr(e[o])&&hr(r)?e[o]=Ai(e[o],r):hr(r)?e[o]=Ai({},r):hn(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Fn(arguments[r],t);return e}const n2=(n,e,t,{allOwnKeys:r}={})=>(Fn(e,(i,o)=>{t&&Ke(i)?n[o]=Tu(i,t):n[o]=i},{allOwnKeys:r}),n),r2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),i2=(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)},o2=(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&&So(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},s2=(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},a2=n=>{if(!n)return null;if(hn(n))return n;let e=n.length;if(!Iu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},l2=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&So(Uint8Array)),u2=(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])}},c2=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},d2=st("HTMLFormElement"),p2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Hs=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),h2=st("RegExp"),Pu=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Fn(t,(i,o)=>{let s;(s=e(i,o,n))!==!1&&(r[o]=s||i)}),Object.defineProperties(n,r)},f2=n=>{Pu(n,(e,t)=>{if(Ke(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];if(Ke(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+"'")})}})},m2=(n,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return hn(n)?r(n):r(String(n).split(e)),t},v2=()=>{},g2=(n,e)=>(n=+n,Number.isFinite(n)?n:e),ni="abcdefghijklmnopqrstuvwxyz",Us="0123456789",zu={DIGIT:Us,ALPHA:ni,ALPHA_DIGIT:ni+ni.toUpperCase()+Us},y2=(n=16,e=zu.ALPHA_DIGIT)=>{let t="";const{length:r}=e;for(;n--;)t+=e[Math.random()*r|0];return t};function b2(n){return!!(n&&Ke(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const w2=n=>{const e=new Array(10),t=(r,i)=>{if(Mr(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=hn(r)?[]:{};return Fn(r,(s,a)=>{const u=t(s,i+1);!Rn(u)&&(o[a]=u)}),e[i]=void 0,o}}return r};return t(n,0)},_2=st("AsyncFunction"),x2=n=>n&&(Mr(n)||Ke(n))&&Ke(n.then)&&Ke(n.catch),R={isArray:hn,isArrayBuffer:Du,isBuffer:Uy,isFormData:Qy,isArrayBufferView:qy,isString:Wy,isNumber:Iu,isBoolean:Jy,isObject:Mr,isPlainObject:hr,isUndefined:Rn,isDate:Ky,isFile:Gy,isBlob:Yy,isRegExp:h2,isFunction:Ke,isStream:Xy,isURLSearchParams:e2,isTypedArray:l2,isFileList:Zy,forEach:Fn,merge:Ai,extend:n2,trim:t2,stripBOM:r2,inherits:i2,toFlatObject:o2,kindOf:Br,kindOfTest:st,endsWith:s2,toArray:a2,forEachEntry:u2,matchAll:c2,isHTMLForm:d2,hasOwnProperty:Hs,hasOwnProp:Hs,reduceDescriptors:Pu,freezeMethods:f2,toObjectSet:m2,toCamelCase:p2,noop:v2,toFiniteNumber:g2,findKey:Bu,global:Ru,isContextDefined:Mu,ALPHABET:zu,generateString:y2,isSpecCompliantForm:b2,toJSONObject:w2,isAsyncFn:_2,isThenable:x2};function ce(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)}R.inherits(ce,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:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Nu=ce.prototype,Fu={};["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=>{Fu[n]={value:n}});Object.defineProperties(ce,Fu);Object.defineProperty(Nu,"isAxiosError",{value:!0});ce.from=(n,e,t,r,i,o)=>{const s=Object.create(Nu);return R.toFlatObject(n,s,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ce.call(s,n.message,e,t,r,i),s.cause=n,s.name=n.name,o&&Object.assign(s,o),s};const S2=null;function Oi(n){return R.isPlainObject(n)||R.isArray(n)}function Lu(n){return R.endsWith(n,"[]")?n.slice(0,-2):n}function qs(n,e,t){return n?n.concat(e).map(function(r,i){return r=Lu(r),!t&&i?"["+r+"]":r}).join(t?".":""):e}function j2(n){return R.isArray(n)&&!n.some(Oi)}const k2=R.toFlatObject(R,{},null,function(n){return/^is[A-Z]/.test(n)});function Pr(n,e,t){if(!R.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=R.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!R.isUndefined(m[f])});const r=t.metaTokens,i=t.visitor||l,o=t.dots,s=t.indexes,a=(t.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(R.isDate(f))return f.toISOString();if(!a&&R.isBlob(f))throw new ce("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(f)||R.isTypedArray(f)?a&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,m,v){let g=f;if(f&&!v&&typeof f=="object"){if(R.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(R.isArray(f)&&j2(f)||(R.isFileList(f)||R.endsWith(m,"[]"))&&(g=R.toArray(f)))return m=Lu(m),g.forEach(function(S,y){!(R.isUndefined(S)||S===null)&&e.append(s===!0?qs([m],y,o):s===null?m:m+"[]",u(S))}),!1}return Oi(f)?!0:(e.append(qs(v,m,o),u(f)),!1)}const c=[],p=Object.assign(k2,{defaultVisitor:l,convertValue:u,isVisitable:Oi});function h(f,m){if(!R.isUndefined(f)){if(c.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(f),R.forEach(f,function(v,g){(!(R.isUndefined(v)||v===null)&&i.call(e,v,R.isString(g)?g.trim():g,m,p))===!0&&h(v,m?m.concat(g):[g])}),c.pop()}}if(!R.isObject(n))throw new TypeError("data must be an object");return h(n),e}function Ws(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function jo(n,e){this._pairs=[],n&&Pr(n,this,e)}const Hu=jo.prototype;Hu.append=function(n,e){this._pairs.push([n,e])};Hu.toString=function(n){const e=n?function(t){return n.call(this,t,Ws)}:Ws;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function E2(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uu(n,e,t){if(!e)return n;const r=t&&t.encode||E2,i=t&&t.serialize;let o;if(i?o=i(e,t):o=R.isURLSearchParams(e)?e.toString():new jo(e,t).toString(r),o){const s=n.indexOf("#");s!==-1&&(n=n.slice(0,s)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}let Js=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){R.forEach(this.handlers,function(t){t!==null&&e(t)})}};const qu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$2=typeof URLSearchParams<"u"?URLSearchParams:jo,V2=typeof FormData<"u"?FormData:null,C2=typeof Blob<"u"?Blob:null,A2={isBrowser:!0,classes:{URLSearchParams:$2,FormData:V2,Blob:C2},protocols:["http","https","file","blob","url","data"]},Wu=typeof window<"u"&&typeof document<"u",O2=(n=>Wu&&["ReactNative","NativeScript","NS"].indexOf(n)<0)(typeof navigator<"u"&&navigator.product),T2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",D2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wu,hasStandardBrowserEnv:O2,hasStandardBrowserWebWorkerEnv:T2},Symbol.toStringTag,{value:"Module"})),rt={...D2,...A2};function I2(n,e){return Pr(n,new rt.classes.URLSearchParams,Object.assign({visitor:function(t,r,i,o){return rt.isNode&&R.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function B2(n){return R.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function R2(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 Ju(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&&R.isArray(i)?i.length:s,u?(R.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),e(t,r,i[s],o)&&R.isArray(i[s])&&(i[s]=R2(i[s])),!a)}if(R.isFormData(n)&&R.isFunction(n.entries)){const t={};return R.forEachEntry(n,(r,i)=>{e(B2(r),i,t,0)}),t}return null}function M2(n,e,t){if(R.isString(n))try{return(e||JSON.parse)(n),R.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const ko={transitional:qu,adapter:["xhr","http"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=R.isObject(n);if(i&&R.isHTMLForm(n)&&(n=new FormData(n)),R.isFormData(n))return r&&r?JSON.stringify(Ju(n)):n;if(R.isArrayBuffer(n)||R.isBuffer(n)||R.isStream(n)||R.isFile(n)||R.isBlob(n))return n;if(R.isArrayBufferView(n))return n.buffer;if(R.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 I2(n,this.formSerializer).toString();if((o=R.isFileList(n))||t.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Pr(o?{"files[]":n}:n,s&&new s,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),M2(n)):n}],transformResponse:[function(n){const e=this.transitional||ko.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(n&&R.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"?ce.from(o,ce.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:rt.classes.FormData,Blob:rt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],n=>{ko.headers[n]={}});const Eo=ko,P2=R.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"]),z2=n=>{const e={};let t,r,i;return n&&n.split(`
56
+ `).forEach(function(o){i=o.indexOf(":"),t=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!t||e[t]&&P2[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Ks=Symbol("internals");function bn(n){return n&&String(n).trim().toLowerCase()}function fr(n){return n===!1||n==null?n:R.isArray(n)?n.map(fr):String(n)}function N2(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 F2=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ri(n,e,t,r,i){if(R.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!R.isString(e)){if(R.isString(r))return e.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(e)}}function L2(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function H2(n,e){const t=R.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 zr=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(a,u,l){const c=bn(u);if(!c)throw new Error("header name must be a non-empty string");const p=R.findKey(i,c);(!p||i[p]===void 0||l===!0||l===void 0&&i[p]!==!1)&&(i[p||u]=fr(a))}const s=(a,u)=>R.forEach(a,(l,c)=>o(l,c,u));return R.isPlainObject(e)||e instanceof this.constructor?s(e,t):R.isString(e)&&(e=e.trim())&&!F2(e)?s(z2(e),t):e!=null&&o(t,e,r),this}get(e,t){if(e=bn(e),e){const r=R.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return N2(i);if(R.isFunction(t))return t.call(this,i,r);if(R.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bn(e),e){const r=R.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||ri(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(s){if(s=bn(s),s){const a=R.findKey(r,s);a&&(!t||ri(r,r[a],a,t))&&(delete r[a],i=!0)}}return R.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||ri(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return R.forEach(this,(i,o)=>{const s=R.findKey(r,o);if(s){t[s]=fr(i),delete t[o];return}const a=e?L2(o):String(o).trim();a!==o&&delete t[o],t[a]=fr(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&R.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(`
57
+ `)}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[Ks]=this[Ks]={accessors:{}}).accessors,r=this.prototype;function i(o){const s=bn(o);t[s]||(H2(r,o),t[s]=!0)}return R.isArray(e)?e.forEach(i):i(e),this}};zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(zr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}});R.freezeMethods(zr);const ht=zr;function ii(n,e){const t=this||Eo,r=e||t,i=ht.from(r.headers);let o=r.data;return R.forEach(n,function(s){o=s.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Ku(n){return!!(n&&n.__CANCEL__)}function Ln(n,e,t){ce.call(this,n??"canceled",ce.ERR_CANCELED,e,t),this.name="CanceledError"}R.inherits(Ln,ce,{__CANCEL__:!0});function U2(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new ce("Request failed with status code "+t.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const q2=rt.hasStandardBrowserEnv?{write(n,e,t,r,i,o){const s=[n+"="+encodeURIComponent(e)];R.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),R.isString(r)&&s.push("path="+r),R.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 W2(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function J2(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Gu(n,e){return n&&!W2(e)?J2(n,e):e}const K2=rt.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=R.isString(i)?r(i):i;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}();function G2(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function Y2(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,p=0;for(;c!==i;)p+=t[c++],c=c%n;if(i=(i+1)%n,i===o&&(o=(o+1)%n),u-s<e)return;const h=l&&u-l;return h?Math.round(p*1e3/h):void 0}}function Gs(n,e){let t=0;const r=Y2(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 Z2=typeof XMLHttpRequest<"u",X2=Z2&&function(n){return new Promise(function(e,t){let r=n.data;const i=ht.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(R.isFormData(r)){if(rt.hasStandardBrowserEnv||rt.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[m,...v]=l?l.split(";").map(g=>g.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...v].join("; "))}}let c=new XMLHttpRequest;if(n.auth){const m=n.auth.username||"",v=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+v))}const p=Gu(n.baseURL,n.url);c.open(n.method.toUpperCase(),Uu(p,n.params,n.paramsSerializer),!0),c.timeout=n.timeout;function h(){if(!c)return;const m=ht.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:n,request:c};U2(function(g){e(g),u()},function(g){t(g),u()},v),c=null}if("onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){c&&(t(new ce("Request aborted",ce.ECONNABORTED,n,c)),c=null)},c.onerror=function(){t(new ce("Network Error",ce.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let m=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const v=n.transitional||qu;n.timeoutErrorMessage&&(m=n.timeoutErrorMessage),t(new ce(m,v.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,n,c)),c=null},rt.hasStandardBrowserEnv&&(s&&R.isFunction(s)&&(s=s(n)),s||s!==!1&&K2(p))){const m=n.xsrfHeaderName&&n.xsrfCookieName&&q2.read(n.xsrfCookieName);m&&i.set(n.xsrfHeaderName,m)}r===void 0&&i.setContentType(null),"setRequestHeader"in c&&R.forEach(i.toJSON(),function(m,v){c.setRequestHeader(v,m)}),R.isUndefined(n.withCredentials)||(c.withCredentials=!!n.withCredentials),o&&o!=="json"&&(c.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&c.addEventListener("progress",Gs(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Gs(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=m=>{c&&(t(!m||m.type?new Ln(null,n,c):m),c.abort(),c=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const f=G2(p);if(f&&rt.protocols.indexOf(f)===-1){t(new ce("Unsupported protocol "+f+":",ce.ERR_BAD_REQUEST,n));return}c.send(r||null)})},Ti={http:S2,xhr:X2};R.forEach(Ti,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Ys=n=>`- ${n}`,Q2=n=>R.isFunction(n)||n===null||n===!1,Yu={getAdapter:n=>{n=R.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,!Q2(t)&&(r=Ti[(s=String(t)).toLowerCase()],r===void 0))throw new ce(`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 :
58
+ `+o.map(Ys).join(`
59
+ `):" "+Ys(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Ti};function oi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ln(null,n)}function Zs(n){return oi(n),n.headers=ht.from(n.headers),n.data=ii.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Yu.getAdapter(n.adapter||Eo.adapter)(n).then(function(e){return oi(n),e.data=ii.call(n,n.transformResponse,e),e.headers=ht.from(e.headers),e},function(e){return Ku(e)||(oi(n),e&&e.response&&(e.response.data=ii.call(n,n.transformResponse,e.response),e.response.headers=ht.from(e.response.headers))),Promise.reject(e)})}const Xs=n=>n instanceof ht?n.toJSON():n;function sn(n,e){e=e||{};const t={};function r(l,c,p){return R.isPlainObject(l)&&R.isPlainObject(c)?R.merge.call({caseless:p},l,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(l,c,p){if(R.isUndefined(c)){if(!R.isUndefined(l))return r(void 0,l,p)}else return r(l,c,p)}function o(l,c){if(!R.isUndefined(c))return r(void 0,c)}function s(l,c){if(R.isUndefined(c)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function a(l,c,p){if(p in e)return r(l,c);if(p 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(Xs(l),Xs(c),!0)};return R.forEach(Object.keys(Object.assign({},n,e)),function(l){const c=u[l]||i,p=c(n[l],e[l],l);R.isUndefined(p)&&c!==a||(t[l]=p)}),t}const Zu="1.6.5",$o={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{$o[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Qs={};$o.transitional=function(n,e,t){function r(i,o){return"[Axios v"+Zu+"] Transitional option '"+i+"'"+o+(t?". "+t:"")}return(i,o,s)=>{if(n===!1)throw new ce(r(o," has been removed"+(e?" in "+e:"")),ce.ERR_DEPRECATED);return e&&!Qs[o]&&(Qs[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 eb(n,e,t){if(typeof n!="object")throw new ce("options must be an object",ce.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 ce("option "+o+" must be "+u,ce.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ce("Unknown option "+o,ce.ERR_BAD_OPTION)}}const Di={assertOptions:eb,validators:$o},bt=Di.validators;let jr=class{constructor(e){this.defaults=e,this.interceptors={request:new Js,response:new Js}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=sn(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&Di.assertOptions(r,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),i!=null&&(R.isFunction(i)?t.paramsSerializer={serialize:i}:Di.assertOptions(i,{encode:bt.function,serialize:bt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&R.merge(o.common,o[t.method]);o&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),t.headers=ht.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(u=u&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,p=0,h;if(!u){const m=[Zs.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),h=m.length,c=Promise.resolve(t);p<h;)c=c.then(m[p++],m[p++]);return c}h=a.length;let f=t;for(p=0;p<h;){const m=a[p++],v=a[p++];try{f=m(f)}catch(g){v.call(this,g);break}}try{c=Zs.call(this,f)}catch(m){return Promise.reject(m)}for(p=0,h=l.length;p<h;)c=c.then(l[p++],l[p++]);return c}getUri(e){e=sn(this.defaults,e);const t=Gu(e.baseURL,e.url);return Uu(t,e.params,e.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(n){jr.prototype[n]=function(e,t){return this.request(sn(t||{},{method:n,url:e,data:(t||{}).data}))}});R.forEach(["post","put","patch"],function(n){function e(t){return function(r,i,o){return this.request(sn(o||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}jr.prototype[n]=e(),jr.prototype[n+"Form"]=e(!0)});const mr=jr;let tb=class Xu{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 Ln(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 Xu(function(t){e=t}),cancel:e}}};const nb=tb;function rb(n){return function(e){return n.apply(null,e)}}function ib(n){return R.isObject(n)&&n.isAxiosError===!0}const Ii={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(Ii).forEach(([n,e])=>{Ii[e]=n});const ob=Ii;function Qu(n){const e=new mr(n),t=Tu(mr.prototype.request,e);return R.extend(t,mr.prototype,e,{allOwnKeys:!0}),R.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return Qu(sn(n,r))},t}const je=Qu(Eo);je.Axios=mr;je.CanceledError=Ln;je.CancelToken=nb;je.isCancel=Ku;je.VERSION=Zu;je.toFormData=Pr;je.AxiosError=ce;je.Cancel=je.CanceledError;je.all=function(n){return Promise.all(n)};je.spread=rb;je.isAxiosError=ib;je.mergeConfig=sn;je.AxiosHeaders=ht;je.formToJSON=n=>Ju(R.isHTMLForm(n)?new FormData(n):n);je.getAdapter=Yu.getAdapter;je.HttpStatusCode=ob;je.default=je;const sb={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},ab=["put","post","patch"],ea="Local-Request-Id",lb=200,ub=500;class ec{axios;settings;records={};isLoading=!1;stopSkipWarn;showLoading;showError;constructor(e={}){this.settings=e.settings||{};const t=Qr(e,["settings"]);this.axios=je.create(dt({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:2*60*1e3},t)),this.setupSkipWarn(this.settings),this.showLoading=kl(this.openLoading.bind(this),lb),this.showError=D0(this._showError.bind(this),ub,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=dt(this.settings,e.settings||{});const t=Qr(e,["settings"]);this.axios.defaults=dt(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":sb[t.type||"form"],...r.headers,...i};return t.skipWarn&&(o[ea]=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 p=i?{[a]:!0}:{};return ab.includes(c.toLowerCase())?(u=Object.assign(u||{},p),u=o!=="json"||!this.isJsonType(r)?this.toFormData(u,o):u):l={...u,...l,...p},{data:u,params:l}}createUrl(e){const{url:t,query:r}=e;return r?Al(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=dt({},this.settings,e.settings||{}),i=Qr(e,["settings"]),o=fg(!1),s=je.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((p,h)=>{this.axios({cancelToken:s.token,...i,url:a,headers:u,data:l,params:c}).then(f=>this.isSkipWarnResponse(f)?p(f.promise):this.validResponse(r,f)?p(r.originResponse?f:f.data?.data):(this.showError(r,f.data),h(f.data))).catch(f=>(this.showError(r,f),h(f))).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||{})[ea],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(p=>p).finally(()=>{o&&o()}),s.promise=c}return s})}}function tc(n={}){const e=new ec(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})}tc({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});const Bi=typeof window<"u";let nc=class{options={type:"cache",expired:0,prefix:"__VTJ_"};caches={};types;constructor(e={}){this.types={local:Bi?window.localStorage:this.caches,session:Bi?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 p=s.getItem(o);p&&(a=JSON.parse(p))}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 nc;var cb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ri={exports:{}};(function(n,e){(function(t,r){r(e,n)})(cb,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],p=l,h=c.timeout||i.timeout,f=c.jsonpCallback||i.jsonpCallback,m=void 0;return new Promise(function(v,g){var S=c.jsonpCallbackFunction||o(),y=f+"_"+S;window[S]=function(E){v({ok:!0,json:function(){return Promise.resolve(E)}}),m&&clearTimeout(m),a(y),s(S)},p+=p.indexOf("?")===-1?"?":"&";var w=document.createElement("script");w.setAttribute("src",""+p+f+"="+S),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=y,document.getElementsByTagName("head")[0].appendChild(w),m=setTimeout(function(){g(new Error("JSONP request to "+l+" timed out")),s(S),a(y),window[S]=function(){s(S)}},h),w.onerror=function(){g(new Error("JSONP request to "+l+" failed")),s(S),a(y),m&&clearTimeout(m)}})}r.exports=u})})(Ri,Ri.exports);var db=Ri.exports;const pb=rc(db);function hb(n){if(Bi){const{protocol:e,host:t,pathname:r}=location;return`${e}//${t}${n?r:""}`}else return null}function fb(n=""){const e=n.match(Nl);return e?e[0]:""}function ic(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 Mi(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 oc(n,e){e=typeof e=="string"?Mi(e):e;const t=n.split("?")[0],r=Mi(n),i=Object.assign({},r,e),o=ic(i);return o?[t,o].join("?"):n}const $n=Object.freeze(Object.defineProperty({__proto__:null,append:oc,getCurrentHost:hb,getHost:fb,parse:Mi,stringify:ic},Symbol.toStringTag,{value:"Module"}));async function mb(n,e={}){const{query:t={}}=e;n.includes("${")&&(n=Al(n)(t||{}));const r=oc(n,t);return await(await pb(r,e)).json()}var vb=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&&gb(i,e.attrs),e.text&&(i.text=""+e.text);var o="onload"in i?ta:yb;o(i,t),i.onload||ta(i,t),r.appendChild(i)};function gb(n,e){for(var t in e)n.setAttribute(t,e[t])}function ta(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 yb(n,e){n.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,e(null,n))}}const bb=rc(vb);function na(n,e={}){return new Promise((t,r)=>{const{library:i}=e;bb(n,e,(o,s)=>{o?r(o):t(i?window[i]:void 0)})})}/*! js-cookie v3.0.5 | MIT */function er(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 wb={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 Pi(n,e){function t(i,o,s){if(!(typeof document>"u")){s=er({},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,"",er({},o,{expires:-1}))},withAttributes:function(i){return Pi(this.converter,er({},this.attributes,i))},withConverter:function(i){return Pi(er({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}Pi(wb,{path:"/"});/**!
60
60
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
61
61
  * @name @vtj/ui
62
62
  * @author CHC chenhuachun1549@dingtalk.com
63
- * @version 0.7.6
63
+ * @version 0.7.7
64
64
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
65
- */const gb={default:14,small:12,large:18},yb={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 Bn(n){return typeof n=="string"?n:`${n}px`}function Qn(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 bb=["src"],Vt=B({name:"XIcon",__name:"Icon",props:yb,setup(n){const e=n,t=zi(),r=Rn(),i=O(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?Et(e.icon):u?.component(e.icon)||e.icon}),o=O(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),s=O(()=>({"background-color":e.background,"border-radius":e.radius?Bn(e.radius):void 0,padding:e.padding?Bn(e.padding):void 0})),a=O(()=>typeof e.size=="number"?e.size:gb[e.size]??void 0);return(u,l)=>(b(),$(d(Rc),{class:be(["x-icon",o.value]),color:e.color,size:a.value,style:kt(s.value)},{default:k(()=>[se(u.$slots,"default",{},()=>[i.value?(b(),$(Ue(i.value),{key:0})):N("",!0),e.src?(b(),G("img",{key:1,src:e.src},null,8,bb)):N("",!0)])]),_:3},8,["class","color","size","style"]))}}),tc={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 wb(n){return O(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function _b(n){return O(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function xb(n){return O(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function Sb(n){const e=Rn();return O(()=>{const t=d(n);if(t)if(typeof t=="string"||t.setup||t.render||Ac(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function jo(n){const e=Sb(n);return e.value?Et(B({render:()=>Ae(Vt,e.value)})):void 0}function ko(n,e){return O(()=>{const t=d(n);return typeof t=="function"?t(e):!!t})}const jb={key:0},kb=B({__name:"Trigger",props:tc,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=jo(mr(t,"icon")),o=ko(mr(t,"disabled")),s=O(()=>({[`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"?(b(),$(d($e),ye({key:0,icon:d(i),type:t.type,size:t.size,disabled:d(o)},t.button,{onClick:a}),{default:k(()=>[de(ne(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(b(),G("div",{key:1,class:be(["x-action__inner",s.value]),onClick:a},[(b(),$(Ue(d(i)))),u.label?(b(),G("span",jb,ne(u.label),1)):N("",!0)],2))}}),Le=B({name:"XAction",__name:"Action",props:tc,emits:["click","command"],setup(n,{emit:e}){const t=n,r=Vc(),i=e,o=wb(t),s=_b(t),a=xb(t),u=ko(mr(t,"disabled")),l=O(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",Zt(t))},p=g=>{if(u.value)return;const S=t.menus?.find(y=>y.command===g);S&&i("command",Zt(S))},h=g=>Ae(ma,s.value,()=>[].concat(g)),f=g=>Ae(Ui,{...a.value,disabled:u.value,onCommand:p},{default:()=>[g],dropdown:()=>[Ae(Hi,()=>(t.menus||[]).map(S=>Ae(gr,S,()=>r.item?r.item({item:S}):S.label)))]}),m=g=>Ae(kr,{...o.value,disabled:u.value},()=>[g]),v=O(()=>{let g=r.default?r.default()[0]:Ae(Et(kb),{...t,onClick:c});return s.value&&(g=h(g)),a.value&&(g=f(g)),o.value&&(g=m(g)),g});return(g,S)=>(b(),G("div",{class:be(["x-action",l.value])},[(b(),$(Ue(v.value)))],2))}}),Eb={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}},$b=B({name:"XActionBar",__name:"ActionBar",props:Eb,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>(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)=>(b(),$(d(ue),{class:"x-action-bar",align:"center"},{default:k(()=>[(b(!0),G(re,null,oe(i.value,l=>(b(),G(re,null,[l==="|"?(b(),$(d($n),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(b(),$(d(Le),ye({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:d(ko)(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}))}}),Vb={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}},ue=B({name:"XContainer",__name:"Container",props:Vb,setup(n){const e=n,t=zi(),r=Rn(),i=O(()=>{const a=r?.parent;if(!a)return!1;const u=a.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=O(()=>({"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=O(()=>{const{width:a,height:u,fit:l}=e;return l?null:{width:a?Bn(a):void 0,height:u?Bn(u):void 0}});return(a,u)=>(b(),$(Ue(e.tag),{class:be(["x-container",o.value]),style:kt(s.value)},{default:k(()=>[se(a.$slots,"default")]),_:3},8,["class","style"]))}}),Cb={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},Ab={key:0,class:"x-header__actions"},Ob=B({name:"XHeader",inheritAttrs:!1,__name:"Header",props:Cb,setup(n){const e=n,t=jo(mr(e,"icon")),r=zi(),i=O(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,s)=>(b(),$(d(ue),{class:be(["x-header",i.value]),justify:"space-between",align:"center"},{default:k(()=>[x(d(ue),{align:"center",class:be(["x-header__wrapper",i.value]),grow:""},{default:k(()=>[d(t)?(b(),$(Ue(d(t)),{key:0,class:"x-header__icon",onClick:d(r).onClickIcon||d(r).onClick},null,8,["onClick"])):N("",!0),ae("span",{class:"x-header__content",onClick:s[0]||(s[0]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"default",{},()=>[de(ne(e.content),1)])]),e.more?(b(),$(d(Vt),{key:1,class:"x-header__more",icon:d(_a)},null,8,["icon"])):N("",!0),e.subtitle||o.$slots.subtitle?(b(),G("span",{key:2,class:"x-header__subtitle",onClick:s[1]||(s[1]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"subtitle",{},()=>[de(ne(e.subtitle),1)])])):N("",!0)]),_:3},8,["class"]),o.$slots.actions?(b(),G("div",Ab,[se(o.$slots,"actions")])):N("",!0)]),_:3},8,["class"]))}}),Tb={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}},Pr=B({name:"XPanel",__name:"Panel",props:Tb,setup(n,{expose:e}){const t=n,r=I(),i=O(()=>({"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=O(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),s=O(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(a,u)=>(b(),$(d(ue),{class:be(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:k(()=>[o.value?(b(),$(d(ue),{key:0,flex:!1,class:"x-panel__header"},{default:k(()=>[se(a.$slots,"header",{},()=>[x(d(Ob),dt($t(o.value)),{default:k(()=>[se(a.$slots,"title")]),actions:k(()=>[se(a.$slots,"actions")]),_:3},16)])]),_:3})):N("",!0),x(d(ue),ye({ref_key:"bodyRef",ref:r,flex:!1,overflow:s.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(b(),$(d(ue),ye({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:k(()=>[se(a.$slots,"footer")]),_:3},16)):N("",!0)]),_:3},8,["class","fit","width","height"]))}}),ta="user-select-none";let na=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=da(),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):d(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(),p=null;const{x:h,y:f}=pd(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(m,v)=>{document.body.classList.add(ta),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),p=l?.getBoundingClientRect(),o&&o(m,v)},i)},onEnd:(m,v)=>{if(clearTimeout(a),document.body.classList.remove(ta),this.dragging&&p){this.dragging=!1;const{x:g,y:S}=m,y=this.getPosition(p,c,g,S);s&&s(y,v),p=null}}});ve([h,f],()=>{if(this.dragging&&p){const m=this.getPosition(p,c,h.value,f.value);e.style.left=`${m.x}px`,e.style.top=`${m.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)),p=Math.min(l,Math.max(i,u));return{x:c,y:p}}destory(){this.scope.stop()}};const Db={mounted(n,e){const t=e.value||{},r=new na(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!uo(r.options,t)&&(r.destory(),n.__draggable__=new na(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},ii="user-select-none";let ra=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=da(),this.scope.run(()=>{this.init()})}scope;resizing=I(!1);direction=I("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=dd(e),this.cleanMousedown=Io(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=Io(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}),ve(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(ii):l.classList.remove(ii)});const{x:s,y:a}=this.MIE;ve([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:p,elementWidth:h}=e,{onResizing:f}=i,{minWidth:m=0,minHeight:v=0,maxWidth:g=99999,maxHeight:S=99999}=i;if(s.includes("e")){const y=Math.min(Math.max(l.value,m),g);o.style.width=`${y}px`}if(s.includes("s")){const y=Math.min(Math.max(c.value,v),S);o.style.height=`${y}px`}if(s.includes("w")){const y=Math.min(Math.max(h.value-l.value,m),g);o.style.width=`${y}px`,o.style.left=`${a.value}px`}if(s.includes("n")){const y=Math.min(Math.max(p.value-c.value,v),S);this.el.style.height=`${y}px`,this.el.style.top=`${u.value}px`}f&&f(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(ii),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}};const Bi={mounted(n,e){const t=e.value||{},r=new ra(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!uo(r.options,t)&&(r.destory(),n.__resizable__=new ra(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},Ib={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 Bb(n,e){const{width:t,height:r}=Yi(e),i=zt({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++nn,dragging:!1,resizing:!1});return ve([t,r],([o,s])=>{i.wrapperWidth=o,i.wrapperHeight=s,i.width=Qn(n.width,o),i.height=Qn(n.height,s),i.left=n.left?Qn(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?Qn(n.top,s):Math.max(Math.floor((s-i.height)/2),0)}),ve(i,o=>{nn=Math.max(o.zIndex,nn)}),{state:i,normal:O(()=>i.mode==="normal"),maximized:O(()=>i.mode==="maximized"),minimized:O(()=>i.mode==="minimized")}}function Rb(n,e){const t=O(()=>{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=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=O(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function Mb(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 Pb(n,e,t,r){return O(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Ce(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 zb(n,e,t){return O(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Ce(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 Nb(n,e){const t=n.componentInstance;if(!t)return;let r=null;return Fi(()=>{const i=d(e),o=d(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),Li(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const Fb=["src"],Ut=B({name:"XDialog",__name:"Dialog",props:Ib,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=Rn(),s=I(),a=I(),{state:u,maximized:l,minimized:c,normal:p}=Bb(r,s),{styles:h,classes:f,wrapperClass:m,modalStyle:v}=Rb(r,u),{changeMode:g,active:S,close:y,show:w,hide:E,submit:j,cancel:_}=Mb(r,u,i),V=Pb(r,u,i,s),D=zb(r,u,i),Y=Nb(r,a);Ni(async()=>{r.modelValue&&(await St(),o&&i("open",o))});const C=O(()=>a.value?.$el);return e({$vtjEl:C,panelRef:a,state:u,maximized:l,minimized:c,changeMode:g,show:w,hide:E,submit:j,cancel:_,componentInstance:Y}),(A,P)=>r.modelValue?(b(),$(Cc,{key:0,to:"body"},[ae("div",{ref_key:"wrapper",ref:s,class:be(["x-dialog__wrapper",d(m)])},[r.modal?(b(),G("div",{key:0,class:"x-dialog__modal",style:kt(d(v))},null,4)):N("",!0),Xt((b(),$(d(Pr),ye({ref_key:"panelRef",ref:a,class:["x-dialog",d(f)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:d(h),size:r.size,body:{padding:r.bodyPadding},onClick:d(S)},A.$attrs),rn({title:k(()=>[de(ne(r.title),1)]),actions:k(()=>[se(A.$slots,"actions"),r.minimizable?(b(),$(d(Le),{key:0,icon:d(Xl),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[0]||(P[0]=T=>d(g)("minimized"))},null,8,["icon","size"])):N("",!0),r.maximizable?(b(),G(re,{key:1},[d(p)?(b(),$(d(Le),{key:1,icon:d(Zl),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[2]||(P[2]=T=>d(g)("maximized"))},null,8,["icon","size"])):(b(),$(d(Le),{key:0,icon:d(Ql),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[1]||(P[1]=T=>d(g)("normal"))},null,8,["icon","size"]))],64)):N("",!0),r.closable?(b(),$(d(Le),{key:2,icon:d(eu),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:d(y)},null,8,["icon","size","onClick"])):N("",!0)]),default:k(()=>[se(A.$slots,"default",{},()=>[r.content?(b(),$(Ue(r.content),{key:0})):N("",!0),r.src?(b(),G("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,Fb)):N("",!0)])]),_:2},[r.cancel||r.submit||A.$slots.footer||A.$slots.extra||A.$slots.handle?{name:"footer",fn:k(()=>[se(A.$slots,"footer",{},()=>[x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"extra")]),_:3}),x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"handle"),r.cancel?(b(),$(d($e),{key:0,type:"default",size:r.size,onClick:d(_)},{default:k(()=>[de(ne(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):N("",!0),r.submit?(b(),$(d($e),{key:1,type:"primary",size:r.size,onClick:d(j)},{default:k(()=>[de(ne(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):N("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[d(Db),d(V)],[d(Bi),d(D)]])],2)])):N("",!0)}});function nc(n,e){const t=document.createElement("div"),r=x(Ut,n);r.appContext=e??nc._context,Ao(r,t);const i=()=>{Ao(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const Lb=B({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(b(),$(d(ya),dt($t(t.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(i,o)=>(b(),$(d(ga),ye({key:`item_${o}_${i.value}`},i),rn({_:2},[t.$slots.option?{name:"default",fn:k(()=>[se(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Hb=B({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?Fc:Lc));return(r,i)=>(b(),$(d(Hc),dt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),Ub=B({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?rr:Uc));return(r,i)=>(b(),$(d(ba),dt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),rc={none:{component:"div",props:{class:"x-field-none"}},text:{component:Xe,props:{clearable:!0},defaultValue:""},textarea:{component:Xe,props:{type:"textarea",rows:2},defaultValue:""},select:{component:Lb,props:{clearable:!0}},checkbox:{component:Hb,props:{},defaultValue:[]},radio:{component:Ub,props:{}},number:{component:va,props:{}},date:{component:Oo,props:{}},time:{component:Mc,props:{}},datetime:{component:Oo,props:{type:"datetime"}},switch:{component:qi,props:{}},rate:{component:Pc,props:{}},slider:{component:zc,props:{}},cascader:{component:Nc,props:{}}},qb={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 rc[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},inline:{type:Boolean}};async function Wb(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function Jb(n,e,t,r,i){const o=I([]),s=O(()=>!r||!i?{}:Hl(n.cascader).reduce((a,u)=>(a[u]=ir(i,u),a),{}));return ve(s,async a=>{if(t.value){o.value=await Wb(n,a);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:O(()=>{const{editor:a="text",placeholder:u,label:l="...",disabled:c,readonly:p}=n,h={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:p,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:m=>e("change",m)},f=typeof a=="string"?rc[a]:{component:a,props:{}};return ct({},f,{props:h})})}}const Kb={key:1,class:"el-form-item__error"},Gb={key:0,class:"x-field__tip"},Q=B({name:"XField",__name:"Field",props:qb,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Sn(ic,null),s=Sn(Dc,null),a=Sn(oc,null),u=O(()=>!o?.proxy||!a?r.visible:typeof r.visible=="function"?r.visible(a):Ce(r.visible)?Object.entries(r.visible).every(([j,_])=>ir(a,j)===_):r.visible),l=()=>o?.proxy&&a&&r.name?ir(a,r.name)??r.modelValue:r.modelValue,c=I(l()),{editor:p}=Jb(r,i,u,o,a),h=I(),f=I(),m=O(()=>r.size||s?.size||"default"),v=O(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),g=(j="")=>r.error?r.error:j.includes("is required")?`${r.label||r.name}是必填项!`:j,S=O(()=>{const j=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!j&&!!r.tooltipPosition}}),y=O(()=>{const j=o?.proxy;return{width:r.width?Bn(r.width):j&&j.inline&&j.inlineColumns?`${100/j.inlineColumns}%`:null}}),w=O(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),E=O(()=>({...p.value.props,modelValue:c.value,"onUpdate:modelValue":j=>{c.value=j}}));return ve(c,(j,_)=>{u.value&&!uo(j,_)&&(i("update:modelValue",j),o?.proxy&&a&&r.name&&qr(a,r.name,j))}),ve(()=>!o?.proxy||!r.name||!a?r.modelValue:ir(a,r.name)??r.modelValue,j=>{u.value&&(c.value=j)},{immediate:!0}),ve(u,j=>{o?.proxy&&a&&r.name&&(j?(c.value=l(),qr(a,r.name,c.value)):(c.value=void 0,qr(a,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:h,editorRef:f,focus:()=>{f.value?.focus&&f.value.focus()},blur:()=>{f.value?.foucs&&f.value.blur()}}),(j,_)=>u.value?(b(),$(d(fa),ye({key:0,class:["x-field",S.value],ref_key:"itemRef",ref:h,prop:r.name,label:j.label,size:m.value,style:y.value},j.$attrs),rn({error:k(({error:V})=>[se(j.$slots,"error",{error:V},()=>[d(o)?.props.tooltipMessage??r.tooltipMessage?(b(),G("div",{key:0,class:"x-field__info",style:kt(w.value)},[x(d(kr),ye({content:g(V)},v.value),{default:k(()=>[x(d(Vt),{class:"x-field__trigger",icon:d(sd),size:m.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(b(),G("div",Kb,ne(g(V)),1))])]),default:k(()=>[ae("div",{class:be(["x-field__editor_wrap",{"is-inline":r.inline}])},[se(j.$slots,"editor",{editor:E.value},()=>[d(p).component?(b(),$(Ue(d(p).component),ye({key:0,class:"x-field__editor",ref_key:"editorRef",ref:f,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=V=>c.value=V)},d(p).props),rn({_:2},[j.$slots.option?{name:"option",fn:k(({option:V})=>[se(j.$slots,"option",{option:V})]),key:"0"}:void 0]),1040,["modelValue"])):N("",!0)]),r.tip||j.$slots.tip?(b(),G("div",Gb,[se(j.$slots,"tip",{},()=>[de(ne(r.tip),1)])])):N("",!0)],2),se(j.$slots,"default")]),_:2},[j.$slots.label?{name:"label",fn:k(()=>[se(j.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):N("",!0)}}),Yb={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}},ic=Symbol("formInstanceKey"),oc=Symbol("formModelKey"),sc=B({name:"XForm",__name:"Form",props:Yb,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Rn(),s=I(),a=zt(r.model||{}),u=I(!1);Co(ic,o),Co(oc,a),ve(a,()=>{i("change",Zt(a))}),ve(()=>r.model,p=>{Object.assign(a,p)},{deep:!0});const l=async()=>{await s.value.validate().catch(()=>!1)&&(i("submit",Zt(a)),r.submitMethod&&(u.value=!0,await r.submitMethod(Zt(a)),u.value=!1))},c=p=>{s.value.resetFields(p),i("reset")};return e({formRef:s,model:a,submit:l,reset:c}),(p,h)=>(b(),$(d(kn),ye({ref_key:"formRef",ref:s,class:"x-form",inline:r.inline,model:a,onKeyup:jn(l,["enter"]),onSubmit:h[1]||(h[1]=Qt(()=>{},["stop","prevent"]))},p.$attrs),{default:k(()=>[se(p.$slots,"default"),r.footer?(b(),$(d(Q),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:k(()=>[se(p.$slots,"footer",{},()=>[r.submitText?(b(),$(d($e),{key:0,loading:u.value,type:"primary",onClick:l},{default:k(()=>[de(ne(r.submitText),1)]),_:1},8,["loading"])):N("",!0),r.resetText?(b(),$(d($e),{key:1,type:"default",onClick:h[0]||(h[0]=()=>c())},{default:k(()=>[de(ne(r.resetText),1)]),_:1})):N("",!0),se(p.$slots,"action")])]),_:3})):N("",!0)]),_:3},16,["inline","model"]))}}),Zb={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}},at=B({name:"XDialogForm",__name:"DialogForm",props:Zb,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=I(),s=I(),a=O(()=>s.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async f=>{i("submit",f),r.submitMethod?await r.submitMethod(f)&&l():l()},p=O(()=>r.formProps?.disabled?!1:r.submit),h=O(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:a,formRef:o,dialogRef:s}),(f,m)=>(b(),$(d(Ut),ye({ref_key:"dialogRef",ref:s,class:"x-dialog-form","model-value":r.modelValue,submit:p.value,cancel:h.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},f.$attrs),rn({default:k(()=>[x(d(sc),ye({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:k(()=>[se(f.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[f.$slots.extra?{name:"extra",fn:k(()=>[se(f.$slots,"extra")]),key:"0"}:void 0,f.$slots.handle?{name:"handle",fn:k(()=>[se(f.$slots,"handle")]),key:"1"}:void 0,f.$slots.footer?{name:"footer",fn:k(()=>[se(f.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),Xb={items:{type:Array,default(){return[]}},border:{type:Boolean}},ac=B({name:"XTabs",__name:"Tabs",props:Xb,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=O(()=>({"is-no-border":!e.border}));return(i,o)=>(b(),$(d(Bc),ye({class:["x-tabs",r.value]},i.$attrs),{default:k(()=>[(b(!0),G(re,null,oe(e.items,s=>(b(),$(d(Ic),ye({key:s.value??s.name},t(s)),{label:k(()=>[se(i.$slots,"label",dt($t(s)),()=>[s.icon?(b(),$(Ue(d(jo)(s.icon)),{key:0,class:"x-tabs__icon"})):N("",!0),de(" "+ne(s.label),1)])]),default:k(()=>[se(i.$slots,"default",dt($t(s)),()=>[s.component?(b(),$(Ue(s.component),dt(ye({key:0},s.props)),null,16)):N("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}});var He=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(He||{});const ia=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Qb=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],e6=["vIf","vShow","vModel","vFor","vBind"],lc={String,Number,Boolean,Array,Object,Function,Date};function er(n,e){return n.map(t=>og(t)?t:`${e}${t}`)}function uc(n){return/\.css$/.test(n)}function cc(n){return/\.js$/.test(n)}function oa(n){return n.map(e=>`<script src="${e}"><\/script>`).join("")}function t6(n=[]){return n.map(e=>`<link rel="stylesheet" href="${e}" />`).join("")}function dc(n,e){const t=n.filter(c=>!!c.enabled),r=[],i=[],o=[],s=[],a={},u=[],l={};return t.forEach(({urls:c,assetsUrl:p,library:h,assetsLibrary:f})=>{c?.forEach(m=>{cc(m)&&r.push(m),uc(m)&&i.push(m)}),h&&(s.push(h),a[h]=er(c||[],e)),p&&o.push(p),f&&u.push(f),h&&f&&(l[f]=h)}),{scripts:er(r,e),css:er(i,e),materials:er(o,e),libraryExports:s,materialExports:u,materialMapLibrary:l,libraryMap:a}}function pc(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function hc(n){return dn(n)?n:JSON.stringify(n)}function fc(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 n6(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&fc(window,n,t)}function r6(n){return Vn(n)||Vn(n?.install)}var Sr=function(){return Sr=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},Sr.apply(this,arguments)},Ri={debug:-1,log:0,info:0,warn:1,error:2},i6=function(n,e,t,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e&&Ri[e]<=Ri[n]&&console[n].apply&&(r==="*"||t.startsWith(r)))return console[n].apply(console,o6(i,t))}};function o6(n,e){return e!=="*"&&(typeof n[0]=="string"?n[0]="["+e+"] "+n[0]:n=["["+e+"]"].concat(n)),n}function s6(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 a6={level:"warn",bizName:"*"},l6=function(){function n(e){e=Sr(Sr({},a6),e);var t=location||{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(t.href)||[])[1],i=s6(r,e),o=i.targetLevel,s=i.targetBizName;for(var a in Ri)this[a]=i6(a,o,e.bizName,s)}return n}();function u6(n){return new l6(n)}const qe=u6({level:"log",bizName:"VTJ"});function Ct(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(`
66
- `)+o;const s=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",s)(e)}catch(i){if(qe.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function Mi(n,e,t=!1,r=!1){const i=Ct(n,e,t,r);if(typeof i!="function"&&(qe.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function De(n){return n&&n.type==="JSExpression"}function Fn(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function c6(n){return De(n)||Fn(n)}function an(n){return c6(n)?n.value:JSON.stringify(n)}let Kt=null;const d6=Xu({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{Nt.error({message:n||"未知错误"})},showLoading:()=>{Kt&&Kt.close(),Kt=wa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{Kt&&(Kt.close(),Kt=null)}}});function p6(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?Ct(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(s,a)=>r.send(ct(o,a||{},{data:s}))}}function mc(n=[],e){return n.reduce((t,r)=>(t[r.id]=p6(r,e),t),{})}class h6{__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=Er){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&&ia.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){ia.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Mi({type:r,value:i},this)}else return Mi(e,this)}__parseExpression(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Ct({type:r,value:i},this)}else return Ct(e,this)}__ref(e=null,t){if(this.__mode!==He.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),He.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 Eo(n){const{Vue:e=Er,mode:t=He.Runtime,components:r={},libs:i={},apis:o={},loader:s}=n,a=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new h6({mode:t,dsl:a.value,attrs:u}),c=e.defineComponent({name:a.value.name,props:{...f6(a.value.props??[],l)},setup(p){l.$props=p,a.value.id&&fc(n.window||window,a.value.id,a.value.css||""),l.state=m6(e,a.value.state??{},l);const h=v6(e,a.value.computed??{},l),f=g6(a.value.methods??{},l),m=y6(e,a.value.inject,l),v=b6(a.value.dataSources||{},l),g={...m,...h,...f,...v};return l.setup(g,e),w6(e,a.value.watch??[],l),{vtj:l}},emits:[...a.value.emits??[]],expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?jr(p[0],l,e,s):p.map(h=>jr(h,l,e,s))},..._6(a.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function f6(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>lc[i]):void 0;return n.map(r=>dn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:De(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 m6(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return De(o)?o=t.__parseExpression(o):Fn(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function v6(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function g6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function y6(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:s}=i||{};i.default;const a=De(s)?t.__parseExpression(s)||o:s??o,u=De(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(a,u),r},{})}function b6(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],s=Fn(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 w6(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function _6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const x6=n=>n;function $o(n){const{getDsl:e,options:t}=n;return(r,i,o=Er)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const s=await e(i.id);return s?Eo({...t,Vue:o,dsl:s,mode:He.Runtime,loader:$o(n)}).renderer:null}):r}function jr(n,e,t=Er,r=x6){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}=S6(o);if(s&&!j6(s,e))return null;const p=h=>{const f=h.$components,m=(()=>{if(n.name==="component")return k6(h,n.props?.is);if(n.name==="slot")return n.name;const y=r(n.name,n.from,t);return dn(y)?f[y]??y:y})(),v=E6(i,n.props??{},h),g=$6(t,n.events??{},h);if(n.name==="slot")return V6(t,n,v,h);c&&Object.assign(v,h.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},A6(u,h))),l.forEach(y=>{Object.assign(v,O6(t,y,h))});const S=T6(t,n.children??[],h,n);return t.createVNode(m,{...v,...g},S)};return a?B6(a,p,e):p(e)}function S6(n=[]){const e=n.find(a=>Rt(a.name)==="vIf"),t=n.find(a=>Rt(a.name)==="vFor"),r=n.find(a=>Rt(a.name)==="vShow"),i=n.find(a=>Rt(a.name)==="vBind"),o=n.filter(a=>Rt(a.name)==="vModel"),s=n.filter(a=>!e6.includes(Rt(a.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:s}}function j6(n,e){return!!e.__parseExpression(n.value)}function k6(n,e){return e?De(e)?n.__parseExpression(e):e:"div"}function E6(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let s=e[o];return De(s)?s=t.__parseExpression(s):Fn(s)&&(s=t.__parseFunction(s)),i[o]=s,i},{});return r.ref=t.__ref(n,r.ref),r}function $6(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=vc(a.modifiers),l=u.find(h=>r.includes(h)),c="on"+so(s)+(l&&i[l]||""),p=t.__parseFunction(a.handler);return p&&(o[c]=n.withModifiers(p,u)),o},{})}function vc(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function V6(n,e,t,r){const{children:i}=e,o=C6(e,r),s=r.$slots?.[o.name];return s?s(t):i?dn(i)?n.createTextVNode(i):De(i)?n.createTextVNode(hc(r.__parseExpression(i))):Array.isArray(i)?i.map(a=>jr(a,r,n)):null:null}function C6(n,e){const{props:t}=n,r=t?.name||"default";return{name:De(r)?e.__parseExpression(r):r,params:[]}}function A6(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function O6(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
65
+ */const _b={default:14,small:12,large:18},xb={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 Mn(n){return typeof n=="string"?n:`${n}px`}function tr(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 Sb=["src"],Vt=B({name:"XIcon",__name:"Icon",props:xb,setup(n){const e=n,t=Hi(),r=Pn(),i=O(()=>{if(!e.icon)return null;const u=r?.appContext.app;return typeof e.icon=="object"?Et(e.icon):u?.component(e.icon)||e.icon}),o=O(()=>{const u={"is-pointer":!!t.onClick};return!i.value&&e.icon&&(u[e.icon]=!0),u}),s=O(()=>({"background-color":e.background,"border-radius":e.radius?Mn(e.radius):void 0,padding:e.padding?Mn(e.padding):void 0})),a=O(()=>typeof e.size=="number"?e.size:_b[e.size]??void 0);return(u,l)=>(b(),$(d(Fc),{class:be(["x-icon",o.value]),color:e.color,size:a.value,style:kt(s.value)},{default:k(()=>[se(u.$slots,"default",{},()=>[i.value?(b(),$(Ue(i.value),{key:0})):N("",!0),e.src?(b(),G("img",{key:1,src:e.src},null,8,Sb)):N("",!0)])]),_:3},8,["class","color","size","style"]))}}),sc={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 jb(n){return O(()=>{const e=n.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function kb(n){return O(()=>{const e=n.badge;if(e)return typeof e=="object"?e:{value:e}})}function Eb(n){return O(()=>{const{dropdown:e,menus:t}=n;if(t&&t.length>0)return Object.assign({popperClass:"x-action__menus",size:n.size},e||{})})}function $b(n){const e=Pn();return O(()=>{const t=d(n);if(t)if(typeof t=="string"||t.setup||t.render||Bc(t)){const r=e?.appContext.app;return{icon:typeof t=="string"&&r?.component(t)||t}}else return t;return null})}function Vo(n){const e=$b(n);return e.value?Et(B({render:()=>Ae(Vt,e.value)})):void 0}function Co(n,e){return O(()=>{const t=d(n);return typeof t=="function"?t(e):!!t})}const Vb={key:0},Cb=B({__name:"Trigger",props:sc,emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=Vo(gr(t,"icon")),o=Co(gr(t,"disabled")),s=O(()=>({[`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"?(b(),$(d($e),ye({key:0,icon:d(i),type:t.type,size:t.size,disabled:d(o)},t.button,{onClick:a}),{default:k(()=>[de(ne(u.label),1)]),_:1},16,["icon","type","size","disabled"])):(b(),G("div",{key:1,class:be(["x-action__inner",s.value]),onClick:a},[(b(),$(Ue(d(i)))),u.label?(b(),G("span",Vb,ne(u.label),1)):N("",!0)],2))}}),Le=B({name:"XAction",__name:"Action",props:sc,emits:["click","command"],setup(n,{emit:e}){const t=n,r=Dc(),i=e,o=jb(t),s=kb(t),a=Eb(t),u=Co(gr(t,"disabled")),l=O(()=>({[`x-action--${t.mode}`]:!!t.mode})),c=()=>{u.value||i("click",Zt(t))},p=g=>{if(u.value)return;const S=t.menus?.find(y=>y.command===g);S&&i("command",Zt(S))},h=g=>Ae(ga,s.value,()=>[].concat(g)),f=g=>Ae(Ki,{...a.value,disabled:u.value,onCommand:p},{default:()=>[g],dropdown:()=>[Ae(Ji,()=>(t.menus||[]).map((S,y)=>Ae(br,S,()=>r.item?r.item({item:S,index:y}):S.label)))]}),m=g=>Ae($r,{...o.value,disabled:u.value},()=>[g]),v=O(()=>{let g=Ae(Et(Cb),{...t,onClick:c});const S=r.default?.();return S&&S.length&&(g=S[0]),s.value&&(g=h(g)),a.value&&(g=f(g)),o.value&&(g=m(g)),g});return(g,S)=>(b(),G("div",{class:be(["x-action",l.value])},[(b(),$(Ue(v.value)))],2))}}),Ab={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}},Ob=B({name:"XActionBar",__name:"ActionBar",props:Ab,emits:["click","command"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>(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)=>(b(),$(d(ue),{class:"x-action-bar",align:"center"},{default:k(()=>[(b(!0),G(re,null,oe(i.value,l=>(b(),G(re,null,[l==="|"?(b(),$(d(Cn),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(b(),$(d(Le),ye({key:1,mode:t.mode,size:t.size,type:t.type,circle:t.circle,background:t.background,button:t.button,dropdown:t.dropdown,disabled:d(Co)(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}))}}),Tb={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}},ue=B({name:"XContainer",__name:"Container",props:Tb,setup(n){const e=n,t=Hi(),r=Pn(),i=O(()=>{const a=r?.parent;if(!a)return!1;const u=a.proxy;return u.$options.name==="XContainer"||!!u.flex}),o=O(()=>({"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=O(()=>{const{width:a,height:u,fit:l}=e;return l?null:{width:a?Mn(a):void 0,height:u?Mn(u):void 0}});return(a,u)=>(b(),$(Ue(e.tag),{class:be(["x-container",o.value]),style:kt(s.value)},{default:k(()=>[se(a.$slots,"default")]),_:3},8,["class","style"]))}}),Db={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},Ib={key:0,class:"x-header__actions"},Bb=B({name:"XHeader",inheritAttrs:!1,__name:"Header",props:Db,setup(n){const e=n,t=Vo(gr(e,"icon")),r=Hi(),i=O(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!r.onClick}));return(o,s)=>(b(),$(d(ue),{class:be(["x-header",i.value]),justify:"space-between",align:"center"},{default:k(()=>[x(d(ue),{align:"center",class:be(["x-header__wrapper",i.value]),grow:""},{default:k(()=>[d(t)?(b(),$(Ue(d(t)),{key:0,class:"x-header__icon",onClick:d(r).onClickIcon||d(r).onClick},null,8,["onClick"])):N("",!0),ae("span",{class:"x-header__content",onClick:s[0]||(s[0]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"default",{},()=>[de(ne(e.content),1)])]),e.more?(b(),$(d(Vt),{key:1,class:"x-header__more",icon:d(Sa)},null,8,["icon"])):N("",!0),e.subtitle||o.$slots.subtitle?(b(),G("span",{key:2,class:"x-header__subtitle",onClick:s[1]||(s[1]=(...a)=>d(r).onClick&&d(r).onClick(...a))},[se(o.$slots,"subtitle",{},()=>[de(ne(e.subtitle),1)])])):N("",!0)]),_:3},8,["class"]),o.$slots.actions?(b(),G("div",Ib,[se(o.$slots,"actions")])):N("",!0)]),_:3},8,["class"]))}}),Rb={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}},Nr=B({name:"XPanel",__name:"Panel",props:Rb,setup(n,{expose:e}){const t=n,r=I(),i=O(()=>({"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=O(()=>t.header===null?null:typeof t.header=="string"?{content:t.header,size:t.size}:{...t.header,size:t.size}),s=O(()=>t.fit||t.height?"auto":void 0);return e({bodyRef:r}),(a,u)=>(b(),$(d(ue),{class:be(["x-panel",i.value]),direction:"column",fit:t.fit,width:t.width,height:t.height},{default:k(()=>[o.value?(b(),$(d(ue),{key:0,flex:!1,class:"x-panel__header"},{default:k(()=>[se(a.$slots,"header",{},()=>[x(d(Bb),pt($t(o.value)),{default:k(()=>[se(a.$slots,"title")]),actions:k(()=>[se(a.$slots,"actions")]),_:3},16)])]),_:3})):N("",!0),x(d(ue),ye({ref_key:"bodyRef",ref:r,flex:!1,overflow:s.value,grow:"",padding:"",class:"x-panel__body"},t.body),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(b(),$(d(ue),ye({key:1,flex:!1,padding:"",class:"x-panel__footer"},t.footer),{default:k(()=>[se(a.$slots,"footer")]),_:3},16)):N("",!0)]),_:3},8,["class","fit","width","height"]))}}),ra="user-select-none";let ia=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=ha(),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):d(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(),p=null;const{x:h,y:f}=gd(e,{initialValue:{x:c.x,y:c.y},...t,handle:u,onStart:(m,v)=>{document.body.classList.add(ra),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),p=l?.getBoundingClientRect(),o&&o(m,v)},i)},onEnd:(m,v)=>{if(clearTimeout(a),document.body.classList.remove(ra),this.dragging&&p){this.dragging=!1;const{x:g,y:S}=m,y=this.getPosition(p,c,g,S);s&&s(y,v),p=null}}});ve([h,f],()=>{if(this.dragging&&p){const m=this.getPosition(p,c,h.value,f.value);e.style.left=`${m.x}px`,e.style.top=`${m.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)),p=Math.min(l,Math.max(i,u));return{x:c,y:p}}destory(){this.scope.stop()}};const Mb={mounted(n,e){const t=e.value||{},r=new ia(n,t);n.__draggable__=r},updated(n,e){const t=e.value||{};let r=n.__draggable__;r&&!fo(r.options,t)&&(r.destory(),n.__draggable__=new ia(n,t))},unmounted(n){const e=n.__draggable__;e&&(e.destory(),n.__draggable__=null)}},si="user-select-none";let oa=class{constructor(e,t={}){this.el=e,this.options=t,this.scope=ha(),this.scope.run(()=>{this.init()})}scope;resizing=I(!1);direction=I("");MIE=null;cleanMousedown;cleanMouseup;init(){const{el:e,options:t}=this,{disabled:r,onStart:i,onEnd:o}=t;if(r)return;this.MIE=vd(e),this.cleanMousedown=Po(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=Po(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}),ve(this.direction,u=>{const l=document.body;l.style.cursor=u?`${u}-resize`:"",u?l.classList.add(si):l.classList.remove(si)});const{x:s,y:a}=this.MIE;ve([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:p,elementWidth:h}=e,{onResizing:f}=i,{minWidth:m=0,minHeight:v=0,maxWidth:g=99999,maxHeight:S=99999}=i;if(s.includes("e")){const y=Math.min(Math.max(l.value,m),g);o.style.width=`${y}px`}if(s.includes("s")){const y=Math.min(Math.max(c.value,v),S);o.style.height=`${y}px`}if(s.includes("w")){const y=Math.min(Math.max(h.value-l.value,m),g);o.style.width=`${y}px`,o.style.left=`${a.value}px`}if(s.includes("n")){const y=Math.min(Math.max(p.value-c.value,v),S);this.el.style.height=`${y}px`,this.el.style.top=`${u.value}px`}f&&f(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(si),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),this.MIE?.stop(),this.scope.stop()}};const zi={mounted(n,e){const t=e.value||{},r=new oa(n,t);n.__resizable__=r},updated(n,e){const t=e.value||{};let r=n.__resizable__;r&&!fo(r.options,t)&&(r.destory(),n.__resizable__=new oa(n,t))},unmounted(n){const e=n.__resizable__;e&&(e.destory(),n.__resizable__=null)}},Pb={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 zb(n,e){const{width:t,height:r}=eo(e),i=zt({mode:n.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++nn,dragging:!1,resizing:!1});return ve([t,r],([o,s])=>{i.wrapperWidth=o,i.wrapperHeight=s,i.width=tr(n.width,o),i.height=tr(n.height,s),i.left=n.left?tr(n.left,o)-i.width/2:Math.max(Math.floor((o-i.width)/2),0),i.top=n.top?tr(n.top,s):Math.max(Math.floor((s-i.height)/2),0)}),ve(i,o=>{nn=Math.max(o.zIndex,nn)}),{state:i,normal:O(()=>i.mode==="normal"),maximized:O(()=>i.mode==="maximized"),minimized:O(()=>i.mode==="minimized")}}function Nb(n,e){const t=O(()=>{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=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!n.draggable,"is-resizable":!!n.resizable,"is-primary":!!n.primary})),i=O(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),o=O(()=>({zIndex:e.zIndex}));return{styles:t,classes:r,wrapperClass:i,modalStyle:o}}function Fb(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 Lb(n,e,t,r){return O(()=>{const i=typeof n.draggable=="boolean"?!n.draggable:!!n.draggable?.disabled;return{...Ce(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 Hb(n,e,t){return O(()=>{const r=typeof n.resizable=="boolean"?!n.resizable:!!n.resizable?.disabled;return{minWidth:200,minHeight:150,...Ce(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 Ub(n,e){const t=n.componentInstance;if(!t)return;let r=null;return qi(()=>{const i=d(e),o=d(i?.bodyRef);r=t.$el,o&&o.$el&&o.$el.appendChild(r)}),Wi(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)}),{componentInstance:t}}const qb=["src"],Ut=B({name:"XDialog",__name:"Dialog",props:Pb,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=Pn(),s=I(),a=I(),{state:u,maximized:l,minimized:c,normal:p}=zb(r,s),{styles:h,classes:f,wrapperClass:m,modalStyle:v}=Nb(r,u),{changeMode:g,active:S,close:y,show:w,hide:E,submit:j,cancel:_}=Fb(r,u,i),V=Lb(r,u,i,s),D=Hb(r,u,i),Y=Ub(r,a);Ui(async()=>{r.modelValue&&(await ct(),o&&i("open",o))});const C=O(()=>a.value?.$el);return e({$vtjEl:C,panelRef:a,state:u,maximized:l,minimized:c,changeMode:g,show:w,hide:E,submit:j,cancel:_,componentInstance:Y}),(A,P)=>r.modelValue?(b(),$(Ic,{key:0,to:"body"},[ae("div",{ref_key:"wrapper",ref:s,class:be(["x-dialog__wrapper",d(m)])},[r.modal?(b(),G("div",{key:0,class:"x-dialog__modal",style:kt(d(v))},null,4)):N("",!0),Xt((b(),$(d(Nr),ye({ref_key:"panelRef",ref:a,class:["x-dialog",d(f)],card:"",shadow:"always",header:{icon:r.icon,subtitle:r.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:d(h),size:r.size,body:{padding:r.bodyPadding},onClick:d(S)},A.$attrs),rn({title:k(()=>[de(ne(r.title),1)]),actions:k(()=>[se(A.$slots,"actions"),r.minimizable?(b(),$(d(Le),{key:0,icon:d(tu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[0]||(P[0]=T=>d(g)("minimized"))},null,8,["icon","size"])):N("",!0),r.maximizable?(b(),G(re,{key:1},[d(p)?(b(),$(d(Le),{key:1,icon:d(eu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[2]||(P[2]=T=>d(g)("maximized"))},null,8,["icon","size"])):(b(),$(d(Le),{key:0,icon:d(nu),size:r.size,mode:"icon",type:"primary",background:"hover",onClick:P[1]||(P[1]=T=>d(g)("normal"))},null,8,["icon","size"]))],64)):N("",!0),r.closable?(b(),$(d(Le),{key:2,icon:d(ru),size:r.size,mode:"icon",type:"danger",background:"hover",onClick:d(y)},null,8,["icon","size","onClick"])):N("",!0)]),default:k(()=>[se(A.$slots,"default",{},()=>[r.content?(b(),$(Ue(r.content),{key:0})):N("",!0),r.src?(b(),G("iframe",{key:1,src:r.src,class:"x-dialog__frame"},null,8,qb)):N("",!0)])]),_:2},[r.cancel||r.submit||A.$slots.footer||A.$slots.extra||A.$slots.handle?{name:"footer",fn:k(()=>[se(A.$slots,"footer",{},()=>[x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"extra")]),_:3}),x(d(ue),{align:"center"},{default:k(()=>[se(A.$slots,"handle"),r.cancel?(b(),$(d($e),{key:0,type:"default",size:r.size,onClick:d(_)},{default:k(()=>[de(ne(typeof r.cancel=="string"?r.cancel:"取消"),1)]),_:1},8,["size","onClick"])):N("",!0),r.submit?(b(),$(d($e),{key:1,type:"primary",size:r.size,onClick:d(j)},{default:k(()=>[de(ne(typeof r.submit=="string"?r.submit:"确定"),1)]),_:1},8,["size","onClick"])):N("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[d(Mb),d(V)],[d(zi),d(D)]])],2)])):N("",!0)}});function ac(n,e){const t=document.createElement("div"),r=x(Ut,n);r.appContext=e??ac._context,Io(r,t);const i=()=>{Io(null,t),t.parentNode?.removeChild(t)};return r.props.onDestroy=()=>{i()},document.body.appendChild(t),{vnode:r,destroy:i}}const Wb=B({__name:"SelectEditor",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(b(),$(d(wa),pt($t(t.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(i,o)=>(b(),$(d(ba),ye({key:`item_${o}_${i.value}`},i),rn({_:2},[t.$slots.option?{name:"default",fn:k(()=>[se(t.$slots,"option",{option:i})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Jb=B({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?Wc:Jc));return(r,i)=>(b(),$(d(Kc),pt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),Kb=B({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(n){const e=n,t=O(()=>Et(e.button?or:Gc));return(r,i)=>(b(),$(d(_a),pt($t(r.$attrs)),{default:k(()=>[(b(!0),G(re,null,oe(e.options,(o,s)=>(b(),$(Ue(t.value),{key:`item_${s}_${o.value}`,label:o.value},{default:k(()=>[de(ne(o.label),1)]),_:2},1032,["label"]))),128))]),_:1},16))}}),lc={none:{component:"div",props:{class:"x-field-none"}},text:{component:Xe,props:{clearable:!0},defaultValue:""},textarea:{component:Xe,props:{type:"textarea",rows:2},defaultValue:""},select:{component:Wb,props:{clearable:!0}},checkbox:{component:Jb,props:{},defaultValue:[]},radio:{component:Kb,props:{}},number:{component:ya,props:{}},date:{component:Bo,props:{}},time:{component:Lc,props:{}},datetime:{component:Bo,props:{type:"datetime"}},switch:{component:Gi,props:{}},rate:{component:Hc,props:{}},slider:{component:Uc,props:{}},cascader:{component:qc,props:{}}},Gb={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 lc[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},inline:{type:Boolean}};async function Yb(n,e){const t=n.options;return t?typeof t=="function"?await t(e)||[]:t:[]}function Zb(n,e,t,r,i){const o=I([]),s=O(()=>!r||!i?{}:Wl(n.cascader).reduce((a,u)=>(a[u]=sr(i,u),a),{}));return ve(s,async a=>{if(t.value){o.value=await Yb(n,a);const u=r?.exposed?.reset;u&&n.name&&u(n.name)}},{immediate:!0}),{editor:O(()=>{const{editor:a="text",placeholder:u,label:l="...",disabled:c,readonly:p}=n,h={...n.props,placeholder:u||(u===null?void 0:`请输入${l}`),disabled:c,readonly:p,options:o.value,onFocus:()=>e("focus"),onBlur:()=>e("blur"),onChange:m=>e("change",m)},f=typeof a=="string"?lc[a]:{component:a,props:{}};return dt({},f,{props:h})})}}const Xb={key:1,class:"el-form-item__error"},Qb={key:0,class:"x-field__tip"},Q=B({name:"XField",__name:"Field",props:Gb,emits:["update:modelValue","change","focus","blur"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Sn(uc,null),s=Sn(Pc,null),a=Sn(cc,null),u=O(()=>!o?.proxy||!a?r.visible:typeof r.visible=="function"?r.visible(a):Ce(r.visible)?Object.entries(r.visible).every(([j,_])=>sr(a,j)===_):r.visible),l=()=>o?.proxy&&a&&r.name?sr(a,r.name)??r.modelValue:r.modelValue,c=I(l()),{editor:p}=Zb(r,i,u,o,a),h=I(),f=I(),m=O(()=>r.size||s?.size||"default"),v=O(()=>Object.assign({},o?.props.tooltipMessage||{},typeof r.tooltipMessage=="boolean"?{}:r.tooltipMessage)),g=(j="")=>r.error?r.error:j.includes("is required")?`${r.label||r.name}是必填项!`:j,S=O(()=>{const j=o?.props.tooltipMessage??r.tooltipMessage;return{[`is-tooltip-${r.tooltipPosition}`]:!!j&&!!r.tooltipPosition}}),y=O(()=>{const j=o?.proxy;return{width:r.width?Mn(r.width):j&&j.inline&&j.inlineColumns?`${100/j.inlineColumns}%`:null}}),w=O(()=>({right:typeof r.tooltipPosition=="number"?`${r.tooltipPosition}px`:void 0})),E=O(()=>({...p.value.props,modelValue:c.value,"onUpdate:modelValue":j=>{c.value=j}}));return ve(c,(j,_)=>{u.value&&!fo(j,_)&&(i("update:modelValue",j),o?.proxy&&a&&r.name&&Jr(a,r.name,j))}),ve(()=>!o?.proxy||!r.name||!a?r.modelValue:sr(a,r.name)??r.modelValue,j=>{u.value&&(c.value=j)},{immediate:!0}),ve(u,j=>{o?.proxy&&a&&r.name&&(j?(c.value=l(),Jr(a,r.name,c.value)):(c.value=void 0,Jr(a,r.name,void 0)))},{immediate:!0}),e({fieldValue:c,itemRef:h,editorRef:f,focus:()=>{f.value?.focus&&f.value.focus()},blur:()=>{f.value?.foucs&&f.value.blur()}}),(j,_)=>u.value?(b(),$(d(va),ye({key:0,class:["x-field",S.value],ref_key:"itemRef",ref:h,prop:r.name,label:j.label,size:m.value,style:y.value},j.$attrs),rn({error:k(({error:V})=>[se(j.$slots,"error",{error:V},()=>[d(o)?.props.tooltipMessage??r.tooltipMessage?(b(),G("div",{key:0,class:"x-field__info",style:kt(w.value)},[x(d($r),ye({content:g(V)},v.value),{default:k(()=>[x(d(Vt),{class:"x-field__trigger",icon:d(dd),size:m.value},null,8,["icon","size"])]),_:2},1040,["content"])],4)):(b(),G("div",Xb,ne(g(V)),1))])]),default:k(()=>[ae("div",{class:be(["x-field__editor_wrap",{"is-inline":r.inline}])},[se(j.$slots,"editor",{editor:E.value},()=>[d(p).component?(b(),$(Ue(d(p).component),ye({key:0,class:"x-field__editor",ref_key:"editorRef",ref:f,modelValue:c.value,"onUpdate:modelValue":_[0]||(_[0]=V=>c.value=V)},d(p).props),rn({_:2},[j.$slots.option?{name:"option",fn:k(({option:V})=>[se(j.$slots,"option",{option:V})]),key:"0"}:void 0]),1040,["modelValue"])):N("",!0)]),r.tip||j.$slots.tip?(b(),G("div",Qb,[se(j.$slots,"tip",{},()=>[de(ne(r.tip),1)])])):N("",!0)],2),se(j.$slots,"default")]),_:2},[j.$slots.label?{name:"label",fn:k(()=>[se(j.$slots,"label")]),key:"0"}:void 0]),1040,["prop","label","size","class","style"])):N("",!0)}}),e6={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}},uc=Symbol("formInstanceKey"),cc=Symbol("formModelKey"),dc=B({name:"XForm",__name:"Form",props:e6,emits:["change","submit","reset"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=Pn(),s=I(),a=zt(r.model||{}),u=I(!1);Do(uc,o),Do(cc,a),ve(a,()=>{i("change",Zt(a))}),ve(()=>r.model,p=>{Object.assign(a,p)},{deep:!0});const l=async()=>{await s.value.validate().catch(()=>!1)&&(i("submit",Zt(a)),r.submitMethod&&(u.value=!0,await r.submitMethod(Zt(a)),u.value=!1))},c=p=>{s.value.resetFields(p),i("reset")};return e({formRef:s,model:a,submit:l,reset:c}),(p,h)=>(b(),$(d(kn),ye({ref_key:"formRef",ref:s,class:"x-form",inline:r.inline,model:a,onKeyup:jn(l,["enter"]),onSubmit:h[1]||(h[1]=Qt(()=>{},["stop","prevent"]))},p.$attrs),{default:k(()=>[se(p.$slots,"default"),r.footer?(b(),$(d(Q),{key:0,editor:"none",class:"x-form__footer",label:" "},{editor:k(()=>[se(p.$slots,"footer",{},()=>[r.submitText?(b(),$(d($e),{key:0,loading:u.value,type:"primary",onClick:l},{default:k(()=>[de(ne(r.submitText),1)]),_:1},8,["loading"])):N("",!0),r.resetText?(b(),$(d($e),{key:1,type:"default",onClick:h[0]||(h[0]=()=>c())},{default:k(()=>[de(ne(r.resetText),1)]),_:1})):N("",!0),se(p.$slots,"action")])]),_:3})):N("",!0)]),_:3},16,["inline","model"]))}}),t6={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}},at=B({name:"XDialogForm",__name:"DialogForm",props:t6,emits:["update:modelValue","submit","close"],setup(n,{expose:e,emit:t}){const r=n,i=t,o=I(),s=I(),a=O(()=>s.value?.$vtjEl),u=()=>{o.value?.submit()},l=()=>{i("update:modelValue",!1),i("close")},c=async f=>{i("submit",f),r.submitMethod?await r.submitMethod(f)&&l():l()},p=O(()=>r.formProps?.disabled?!1:r.submit),h=O(()=>r.formProps?.disabled?!1:r.cancel);return e({$vtjEl:a,formRef:o,dialogRef:s}),(f,m)=>(b(),$(d(Ut),ye({ref_key:"dialogRef",ref:s,class:"x-dialog-form","model-value":r.modelValue,submit:p.value,cancel:h.value,size:r.size,onSubmit:u,onClose:l,minimizable:!1,maximizable:!1},f.$attrs),rn({default:k(()=>[x(d(dc),ye({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:k(()=>[se(f.$slots,"default")]),_:3},16,["size","model","rules"])]),_:2},[f.$slots.extra?{name:"extra",fn:k(()=>[se(f.$slots,"extra")]),key:"0"}:void 0,f.$slots.handle?{name:"handle",fn:k(()=>[se(f.$slots,"handle")]),key:"1"}:void 0,f.$slots.footer?{name:"footer",fn:k(()=>[se(f.$slots,"footer")]),key:"2"}:void 0]),1040,["model-value","submit","cancel","size"]))}}),n6={items:{type:Array,default(){return[]}},border:{type:Boolean}},pc=B({name:"XTabs",__name:"Tabs",props:n6,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=O(()=>({"is-no-border":!e.border}));return(i,o)=>(b(),$(d(Nc),ye({class:["x-tabs",r.value]},i.$attrs),{default:k(()=>[(b(!0),G(re,null,oe(e.items,s=>(b(),$(d(zc),ye({key:s.value??s.name},t(s)),{label:k(()=>[se(i.$slots,"label",pt($t(s)),()=>[s.icon?(b(),$(Ue(d(Vo)(s.icon)),{key:0,class:"x-tabs__icon"})):N("",!0),de(" "+ne(s.label),1)])]),default:k(()=>[se(i.$slots,"default",pt($t(s)),()=>[s.component?(b(),$(Ue(s.component),pt(ye({key:0},s.props)),null,16)):N("",!0)])]),_:2},1040))),128))]),_:3},16,["class"]))}});/**!
66
+ * Copyright (c) 2024, VTJ.PRO All rights reserved.
67
+ * @name @vtj/renderer
68
+ * @author CHC chenhuachun1549@dingtalk.com
69
+ * @version 0.7.7
70
+ * @license <a href="https://vtj.pro/license.html">MIT License</a>
71
+ */const Vn="0.7.7";var He=(n=>(n.Runtime="Runtime",n.Design="Design",n.Raw="Raw",n.VNode="VNode",n))(He||{});const sa=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],r6=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],i6=["vIf","vShow","vModel","vFor","vBind"],hc={String,Number,Boolean,Array,Object,Function,Date};function nr(n,e){return n.map(t=>ug(t)?t:`${e}${t}`)}function fc(n){return/\.css$/.test(n)}function mc(n){return/\.js$/.test(n)}function aa(n){return n.map(e=>`<script src="${$n.append(e,{v:Vn})}"><\/script>`).join("")}function o6(n=[]){return n.map(e=>`<link rel="stylesheet" href="${$n.append(e,{v:Vn})}" />`).join("")}function vc(n,e){const t=n.filter(c=>!!c.enabled),r=[],i=[],o=[],s=[],a={},u=[],l={};return t.forEach(({urls:c,assetsUrl:p,library:h,assetsLibrary:f})=>{c?.forEach(m=>{mc(m)&&r.push(m),fc(m)&&i.push(m)}),h&&(s.push(h),a[h]=nr(c||[],e)),p&&o.push(p),f&&u.push(f),h&&f&&(l[f]=h)}),{scripts:nr(r,e),css:nr(i,e),materials:nr(o,e),libraryExports:s,materialExports:u,materialMapLibrary:l,libraryMap:a}}function gc(n,e){const{name:t,parent:r,alias:i}=n;return r?e[r]?.[i||t]:e[i||t]}function yc(n){return dn(n)?n:JSON.stringify(n)}function bc(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 s6(n,e){const t=await window.fetch(e).then(r=>r.text()).catch(()=>"");t&&bc(window,n,t)}function a6(n){return An(n)||An(n?.install)}var kr=function(){return kr=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},kr.apply(this,arguments)},Ni={debug:-1,log:0,info:0,warn:1,error:2},l6=function(n,e,t,r){return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(e&&Ni[e]<=Ni[n]&&console[n].apply&&(r==="*"||t.startsWith(r)))return console[n].apply(console,u6(i,t))}};function u6(n,e){return e!=="*"&&(typeof n[0]=="string"?n[0]="["+e+"] "+n[0]:n=["["+e+"]"].concat(n)),n}function c6(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 d6={level:"warn",bizName:"*"},p6=function(){function n(e){e=kr(kr({},d6),e);var t=location||{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(t.href)||[])[1],i=c6(r,e),o=i.targetLevel,s=i.targetBizName;for(var a in Ni)this[a]=l6(a,o,e.bizName,s)}return n}();function h6(n){return new p6(n)}const qe=h6({level:"log",bizName:"VTJ"});function Ct(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(`
72
+ `)+o;const s=`with(${t?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",s)(e)}catch(i){if(qe.error("parseExpression.error",i,n,e?.__self??e),r)throw i}}function Fi(n,e,t=!1,r=!1){const i=Ct(n,e,t,r);if(typeof i!="function"&&(qe.error("parseFunction.error","not a function",n,e?.__self??e),r))throw new Error(`"${n.value}" not a function`);return i}function De(n){return n&&n.type==="JSExpression"}function Hn(n){return typeof n=="object"&&n&&n.type==="JSFunction"}function f6(n){return De(n)||Hn(n)}function an(n){return f6(n)?n.value:JSON.stringify(n)}let Kt=null;const m6=tc({settings:{type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:n=>n.data?.code===0||!!n.data?.success,failMessage:!0,showError:n=>{Nt.error({message:n||"未知错误"})},showLoading:()=>{Kt&&Kt.close(),Kt=xa.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.05)"})},hideLoading:()=>{Kt&&(Kt.close(),Kt=null)}}});function v6(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?Ct(n.headers,{},!0):void 0,o={url:n.url,method:n.method,settings:{...n.settings,headers:i}};return(s,a)=>r.send(dt(o,a||{},{data:s}))}}function wc(n=[],e){return n.reduce((t,r)=>(t[r.id]=v6(r,e),t),{})}class g6{__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=Vr){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&&sa.forEach(e=>{this[e]=this.__instance?.[e]})}__cleanup(){sa.forEach(e=>{this[e]=null})}__parseFunction(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Fi({type:r,value:i},this)}else return Fi(e,this)}__parseExpression(e){if(e)if(this.__mode===He.Runtime){const{id:t,type:r}=e,i=t?this.__transform[t]??e.value:e.value;return Ct({type:r,value:i},this)}else return Ct(e,this)}__ref(e=null,t){if(this.__mode!==He.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),He.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 Ao(n){const{Vue:e=Vr,mode:t=He.Runtime,components:r={},libs:i={},apis:o={},loader:s}=n,a=e.computed(()=>n.dsl),u={$components:r,$libs:i,$apis:o},l=new g6({mode:t,dsl:a.value,attrs:u}),c=e.defineComponent({name:a.value.name,props:{...y6(a.value.props??[],l)},setup(p){l.$props=p,a.value.id&&bc(n.window||window,a.value.id,a.value.css||""),l.state=b6(e,a.value.state??{},l);const h=w6(e,a.value.computed??{},l),f=_6(a.value.methods??{},l),m=x6(e,a.value.inject,l),v=S6(a.value.dataSources||{},l),g={...m,...h,...f,...v};return l.setup(g,e),j6(e,a.value.watch??[],l),{vtj:l}},emits:[...a.value.emits??[]],expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?Er(p[0],l,e,s):p.map(h=>Er(h,l,e,s))},...k6(a.value.lifeCycles??{},l)});return{renderer:e.markRaw(c),context:l}}function y6(n=[],e){const t=r=>r?(Array.isArray(r)?r:[r]).map(i=>hc[i]):void 0;return n.map(r=>dn(r)?{name:r}:{name:r.name,type:r.type,required:r.required,default:De(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 b6(n,e,t){return n.reactive(Object.keys(e||{}).reduce((r,i)=>{let o=e[i];return De(o)?o=t.__parseExpression(o):Hn(o)&&(o=t.__parseFunction(o)),r[i]=o,r},{}))}function w6(n,e,t){return Object.entries(e??{}).reduce((r,[i,o])=>(r[i]=n.computed(t.__parseFunction(o)),r),{})}function _6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}function x6(n,e=[],t){return e.reduce((r,i)=>{const{name:o,from:s}=i||{};i.default;const a=De(s)?t.__parseExpression(s)||o:s??o,u=De(i.default)?t.__parseExpression(i.default):i.default??null;return r[o]=n.inject(a,u),r},{})}function S6(n,e){return Object.keys(n).reduce((t,r)=>{const i=n[r],o=e.$apis[i.ref],s=Hn(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 j6(n,e=[],t){e.forEach(r=>{n.watch(t.__parseExpression(r.source),t.__parseFunction(r.handler),{deep:r.deep,immediate:r.immediate})})}function k6(n,e){return Object.entries(n??{}).reduce((t,[r,i])=>(t[r]=e.__parseFunction(i),t),{})}const E6=n=>n;function Oo(n){const{getDsl:e,options:t}=n;return(r,i,o=Vr)=>!i||typeof i=="string"?r:i.type==="Schema"?o.defineAsyncComponent(async()=>{const s=await e(i.id);return s?Ao({...t,Vue:o,dsl:s,mode:He.Runtime,loader:Oo(n)}).renderer:null}):r}function Er(n,e,t=Vr,r=E6){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}=$6(o);if(s&&!V6(s,e))return null;const p=h=>{const f=h.$components,m=(()=>{if(n.name==="component")return C6(h,n.props?.is);if(n.name==="slot")return n.name;const y=r(n.name,n.from,t);return dn(y)?f[y]??y:y})(),v=A6(i,n.props??{},h),g=O6(t,n.events??{},h);if(n.name==="slot")return T6(t,n,v,h);c&&Object.assign(v,h.__parseExpression(c.value)),u&&(v.style=Object.assign(v.style??{},I6(u,h))),l.forEach(y=>{Object.assign(v,B6(t,y,h))});const S=R6(t,n.children??[],h,n);return t.createVNode(m,{...v,...g},S)};return a?z6(a,p,e):p(e)}function $6(n=[]){const e=n.find(a=>Rt(a.name)==="vIf"),t=n.find(a=>Rt(a.name)==="vFor"),r=n.find(a=>Rt(a.name)==="vShow"),i=n.find(a=>Rt(a.name)==="vBind"),o=n.filter(a=>Rt(a.name)==="vModel"),s=n.filter(a=>!i6.includes(Rt(a.name)));return{vIf:e,vFor:t,vShow:r,vModels:o,vBind:i,others:s}}function V6(n,e){return!!e.__parseExpression(n.value)}function C6(n,e){return e?De(e)?n.__parseExpression(e):e:"div"}function A6(n,e,t){const r=Object.keys(e||{}).reduce((i,o)=>{let s=e[o];return De(s)?s=t.__parseExpression(s):Hn(s)&&(s=t.__parseFunction(s)),i[o]=s,i},{});return r.ref=t.__ref(n,r.ref),r}function O6(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=_c(a.modifiers),l=u.find(h=>r.includes(h)),c="on"+co(s)+(l&&i[l]||""),p=t.__parseFunction(a.handler);return p&&(o[c]=n.withModifiers(p,u)),o},{})}function _c(n={},e=!1){const t=Object.keys(n);return e?t.map(r=>"."+r):t}function T6(n,e,t,r){const{children:i}=e,o=D6(e,r),s=r.$slots?.[o.name];return s?s(t):i?dn(i)?n.createTextVNode(i):De(i)?n.createTextVNode(yc(r.__parseExpression(i))):Array.isArray(i)?i.map(a=>Er(a,r,n)):null:null}function D6(n,e){const{props:t}=n,r=t?.name||"default";return{name:De(r)?e.__parseExpression(r):r,params:[]}}function I6(n,e){return e.__parseExpression(n.value)?{}:{display:"none"}}function B6(n,e,t){const r={type:"JSFunction",value:e.value?.value?`(v) => {
67
73
  ${e.value.value} = v;
68
- }`:"(v) => {}"},i=t.__parseFunction(r),o=vc(e.modifiers),s=De(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 T6(n,e,t,r){if(!e)return null;if(dn(e))return{default:()=>e};if(De(e))return{default:()=>hc(t.__parseExpression(e))};if(Array.isArray(e)){const i=D6(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 p=l.length?hg(c??{},l):o(c);return u.map(h=>jr(h,t.__clone(p),n))},s),{})}}function D6(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=I6(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 I6(n="default"){return dn(n)?{name:n,params:[]}:{params:[],...n}}function B6(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 sa=B({name:"VtjPageContainer",async setup(){const n=q6(),e=md(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&hd(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Ae(this.component,this.query):Ae("div","页面不存在")}}),R6={name:{type:String,default:"VTJ.PRO"},tagline:{type:String,default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{type:String,default:"开始设计"},actionLink:{type:String,default:"/@vtj/pro/"}},M6={class:"x-startup"},P6={class:"x-startup__wrapper"},z6={class:"x-startup__name"},N6={class:"clip"},F6={class:"x-startup__tagline"},L6={class:"x-startup__actions"},H6=B({__name:"Startup",props:R6,setup(n){const e=n,t=()=>{let r=(window.__VTJ_LINK__||{}).href||window.location.pathname+"@vtj/pro/#/";location.href=r};return(r,i)=>(b(),G("div",M6,[ae("div",P6,[ae("div",z6,[ae("span",N6,ne(e.name),1)]),ae("div",F6,ne(e.tagline),1),ae("div",L6,[x(d($e),{type:"primary",size:"large",round:"",icon:d(ad),onClick:t},{default:k(()=>[de(ne(e.actionText),1)]),_:1},8,["icon"])])])]))}}),U6=B({name:"VtjStartupContainer",render(){return Ae(H6)}}),gc=Symbol("Provider");class yc extends co{mode;globals={};modules={};adapter={request:d6,jsonp:db};apis={};dependencies={};materials={};library={};service;project=null;components={};router=null;materialPath="./";constructor(e){super();const{service:t,mode:r=He.Raw,dependencies:i,materials:o,project:s={},adapter:a={},globals:u={},modules:l={},router:c=null,materialPath:p="./"}=e;this.mode=r,this.modules=l,this.service=t,this.router=c,this.materialPath=p,i&&(this.dependencies=i),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,a),r!==He.Design&&this.load(s)}async load(e){const t=this.modules[`.vtj/projects/${e.id}.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,materialPath:u}=this,{libraryExports:l,libraryMap:c,materials:p,materialExports:h,materialMapLibrary:f}=dc(r,u);for(const v of l){const g=o[v],S=window[v];if(S)s[v]=S;else if(g)window[v]=s[v]=await g();else{const y=c[v]||[];for(const w of y)uc(w)&&await n6(v,w),cc(w)&&await ea(w),s[v]=window[v]}}for(const v of p)await ea(v);const m=this.materials||{};for(const v of h){const g=m[v]?(await m[v]()).default:window[v],S=window[f[v]];g&&S&&g.components.forEach(y=>{a[y.name]=pc(y,S)})}i&&(this.apis=mc(i,this.adapter)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:sa}),e.addRoute({path:"/",name:"VtjHomepage",component:t?.homepage?sa:U6}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&r6(i)&&(e.use(i),t[r]=!0);e.provide(gc,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 qe.warn(`Can not find file: ${e}`),null;const r=`.vtj/vue/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const o=await this.getDsl(t.id);if(!o)return qe.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},p=$o({getDsl:async f=>await this.getDsl(f)||null,options:c}),{renderer:h}=Eo({...c,dsl:o,loader:p});return h}}function Y4(n){const e=new yc(n);return{provider:e,onReady:t=>e.ready(t)}}function q6(n={}){const e=Sn(gc);if(!e)throw new Error("Can not find provider");if(e.mode===He.Raw){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&Nt.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const W6=new Zu({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{Nt.error({message:n||"未知错误"})}}}),J6=(n="/vtj/local/repository/${type}.json")=>(e,t)=>W6.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}});let K6=class{api;constructor(){this.api=J6()}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 genVueContent(e,t){return await this.api("genVueContent",{project:e,dsl:t}).catch(()=>"")}async createRawPage(e){return await this.api("createRawPage",e).catch(()=>"")}async removeRawPage(e){return await this.api("removeRawPage",e).catch(()=>"")}};new Qu({type:"local",expired:0,prefix:"__VTJ_"});let X4=class extends K6{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:pg(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)}};/**!
74
+ }`:"(v) => {}"},i=t.__parseFunction(r),o=_c(e.modifiers),s=De(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 R6(n,e,t,r){if(!e)return null;if(dn(e))return{default:()=>e};if(De(e))return{default:()=>yc(t.__parseExpression(e))};if(Array.isArray(e)){const i=M6(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 p=l.length?gg(c??{},l):o(c);return u.map(h=>Er(h,t.__clone(p),n))},s),{})}}function M6(n){const e={default:{params:[],nodes:[]}};for(const t of n){const r=P6(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 P6(n="default"){return dn(n)?{name:n,params:[]}:{params:[],...n}}function z6(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 la=B({name:"VtjPageContainer",async setup(){const n=G6(),e=wd(),t=e.params.id,r=t?n.getPage(t):n.getHomepage(),i=r?await n.getRenderComponent(r.id):null;return r&&yd(r.title||"VTJ"),{provider:n,component:i,file:r,query:e.query}},render(){return this.component?Ae(this.component,this.query):Ae("div","页面不存在")}}),N6={name:{type:String,default:"VTJ.PRO"},tagline:{type:String,default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{type:String,default:"开始设计"},actionLink:{type:String,default:"/@vtj/pro/"}},F6={class:"x-startup"},L6={class:"x-startup__wrapper"},H6={class:"x-startup__name"},U6={class:"clip"},q6={class:"x-startup__tagline"},W6={class:"x-startup__actions"},J6=B({__name:"Startup",props:N6,setup(n){const e=n,t=()=>{let r=(window.__VTJ_LINK__||{}).href||window.location.pathname+"@vtj/pro/#/";location.href=r};return(r,i)=>(b(),G("div",F6,[ae("div",L6,[ae("div",H6,[ae("span",U6,ne(e.name),1)]),ae("div",q6,ne(e.tagline),1),ae("div",W6,[x(d($e),{type:"primary",size:"large",round:"",icon:d(pd),onClick:t},{default:k(()=>[de(ne(e.actionText),1)]),_:1},8,["icon"])])])]))}}),K6=B({name:"VtjStartupContainer",render(){return Ae(J6)}}),xc=Symbol("Provider");class Sc extends mo{mode;globals={};modules={};adapter={request:m6,jsonp:mb};apis={};dependencies={};materials={};library={};service;project=null;components={};router=null;materialPath="./";constructor(e){super();const{service:t,mode:r=He.Raw,dependencies:i,materials:o,project:s={},adapter:a={},globals:u={},modules:l={},router:c=null,materialPath:p="./"}=e;this.mode=r,this.modules=l,this.service=t,this.router=c,this.materialPath=p,i&&(this.dependencies=i),o&&(this.materials=o),Object.assign(this.globals,u),Object.assign(this.adapter,a),r!==He.Design&&this.load(s)}async load(e){const t=this.modules[`.vtj/projects/${e.id}.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,materialPath:u}=this,{libraryExports:l,libraryMap:c,materials:p,materialExports:h,materialMapLibrary:f}=vc(r,u);for(const v of l){const g=o[v],S=window[v];if(S)s[v]=S;else if(g)window[v]=s[v]=await g();else{const y=c[v]||[];for(const w of y)fc(w)&&await s6(v,$n.append(w,{v:Vn})),mc(w)&&await na($n.append(w,{v:Vn})),s[v]=window[v]}}for(const v of p)await na($n.append(v,{v:Vn}));const m=this.materials||{};for(const v of h){const g=m[v]?(await m[v]()).default:window[v],S=window[f[v]];g&&S&&g.components.forEach(y=>{a[y.name]=gc(y,S)})}i&&(this.apis=wc(i,this.adapter)),this.initRouter(),this.triggerReady()}initRouter(){const{router:e,project:t}=this;e&&(e.addRoute({path:"/page/:id",name:"VtjPage",component:la}),e.addRoute({path:"/",name:"VtjHomepage",component:t?.homepage?la:K6}))}install(e){const t=e.config.globalProperties.installed||{};for(const[r,i]of Object.entries(this.library))!t[r]&&a6(i)&&(e.use(i),t[r]=!0);e.provide(xc,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 qe.warn(`Can not find file: ${e}`),null;const r=`.vtj/vue/${e}.vue`,i=this.modules[r];if(i)return(await i())?.default;const o=await this.getDsl(t.id);if(!o)return qe.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},p=Oo({getDsl:async f=>await this.getDsl(f)||null,options:c}),{renderer:h}=Ao({...c,dsl:o,loader:p});return h}}function t8(n){const e=new Sc(n);return{provider:e,onReady:t=>e.ready(t)}}function G6(n={}){const e=Sn(xc);if(!e)throw new Error("Can not find provider");if(e.mode===He.Raw){const{id:t,version:r}=n;t&&r&&(async()=>{const i=await e.getDsl(t);i?.__VERSION__!==r&&Nt.warning({title:i?.name,message:"当前组件源码版本与运行时版本不一致,请重新发布组件"})})()}return e}const Y6=new ec({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:n=>n.data?.code===0,showError:n=>{Nt.error({message:n||"未知错误"})}}}),Z6=(n="/vtj/local/repository/${type}.json")=>(e,t)=>Y6.send({url:n,method:"post",query:{type:e},data:{type:e,data:t}});class X6{api;constructor(){this.api=Z6()}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 genVueContent(e,t){return await this.api("genVueContent",{project:e,dsl:t}).catch(()=>"")}async createRawPage(e){return await this.api("createRawPage",e).catch(()=>"")}async removeRawPage(e){return await this.api("removeRawPage",e).catch(()=>"")}}new nc({type:"local",expired:0,prefix:"__VTJ_"});class n8 extends X6{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:vg(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)}}/**!
69
75
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
70
76
  * @name @vtj/designer
71
77
  * @author CHC chenhuachun1549@dingtalk.com
72
- * @version 0.7.6
78
+ * @version 0.7.7
73
79
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
74
- */const G6="0.7.6",aa={width:390,height:844},la={width:1180,height:820},ft=/^[A-Za-z_$][\w_-]*$/,Y6=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],Z6=["keydown","keyup","keypress"],X6=["GET","POST","PUT","PATCH","DELETE","JSONP"],Q6=["stop","prevent","capture","self","once","passive"];var Ye=(n=>(n.Block="block",n.Node="node",n))(Ye||{});const bc="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",e3=["title","src"],t3={key:1},n3=B({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:bc},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(b(),G("div",{class:"v-logo-widget",onClick:t},[e.icon?(b(),G("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,e3)):(b(),G("span",t3,ne(e.text),1))]))}}),r3={class:"v-empty-widget"},i3=B({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",r3,"EmptyWidget"))}});function wc(){const n=Me(),e=O(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function Ot(n,e){const t=O(()=>kc.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=I();return{widgets:t,widgetsRef:r}}function _c(){const n=Me();return{span:O(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function o3(){const n=Me(),e=O(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const s3=(n=[])=>n.map(e=>e.name);function a3(){const n=Me(),{components:e,groups:t,componentMap:r}=n.assets,i=zt({}),o=O(()=>{const p={};return t.value&&t.value.forEach(h=>{p[h.name]=h}),p}),s=O(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),a=I(s.value[0]?.name),u=I(""),l=O(()=>o.value[a.value]);Ni(()=>{const p=s.value.reduce((h,f)=>(h[f.name]=s3(o.value[f.name].children),h),{});Object.assign(i,p)});const c=O(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(h=>h.name.toLowerCase().includes(p)||h.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function Ie(){const n=Me(),e=O(()=>n.current.value),t=O(()=>n.context.value),r=O(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function l3(n,e){const t=Me();t.simulator.init(n,e);const r=O(()=>t.simulator.designer.value),i=O(()=>oi("hover",r.value?.hover.value)),o=O(()=>oi("dropping",r.value?.dropping.value)),s=O(()=>oi("selected",r.value?.selected.value));return{designer:r,dropping:o,hover:i,selected:s}}function u3(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 c3(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 oi(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?c3(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:u3(e.rect,n!=="selected")}}function mt(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>e.value?.selected.value),r=O(()=>Se(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function d3(n,e){const t=I(""),{selected:r,isSelectBlock:i}=mt(),o=O(()=>r.value?.model.id),s=O(()=>{const u=li(n),l=li(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],h=l===p||i.value?[]:Object.keys(p?.context||{}).filter(E=>!["context","ref"].includes(E)).map(E=>`this.context.${E}`);h.length&&c.push({title:"上下文",items:h});const f=u.inject.map(E=>`this.${E.name}`);f.length&&c.push({title:"注入",items:f});const m=u.props.map(E=>typeof E=="string"?`this.$props.${E}`:`this.$props.${E.name}`);m.length&&c.push({title:"属性",items:m});const v=Object.keys(u.state).map(E=>`this.state.${E}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(E=>`this.${E}.value`);g.length&&c.push({title:"计算属性",items:g});const S=Object.keys(u.methods).map(E=>`this.${E}`);S.length&&c.push({title:"方法",items:S});const y=Object.keys(u.dataSources).map(E=>`this.${E}`);y.length&&c.push({title:"数据源",items:y});const w=Object.keys(l?.$refs||{}).map(E=>`this.$refs.${E}`);return w.length&&c.push({title:"refs",items:w}),c}),a=O(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const p=c.items.filter(h=>h.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:s,searchResult:a}}const tr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function p3(n){const e=Me(),t=O(()=>{const u=n.value?.model||null;return Se(u)?null:u}),r=I();ve(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=O(()=>t.value?[{name:"key",setters:tr,value:t.value.getPropValue("key")},{name:"ref",setters:tr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:tr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:tr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=O(()=>{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=O(()=>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 Ve(n,e="提示"){return Nt.warning({title:e,message:n})}async function fn(n){return await Ki.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Fe(n,e="success"){return Ji({message:n,type:e})}function Te(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Ct(n,e,t,!0):Mi(n,e,t,!0)}catch(i){r=!1,Nt.error({title:"代码错误",message:i.message})}return r}function xc(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>n.current.value?n.history.value:null),r=O(()=>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),Fe("已载入历史记录","success")},a=O(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=O(()=>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 zr(){const n=Me(),e=O(()=>n.project.value);return{engine:n,project:e}}function h3(n){const e=Me(),t=O(()=>{const a=n.value?.model||null;return Se(a)?null:a}),r=I();ve(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return Y6.map(u=>({name:u,event:a[u]}))}),o=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return Z6.map(u=>({name:u,event:a[u]}))}),s=O(()=>{if(!t.value||Se(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 f3=(n,e)=>new Yt({name:n,value:void 0,iterator:e}),m3=(n="modelValue")=>new Yt({name:"vModel",value:void 0,arg:n});function v3(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 g3(n){const e=Me(),t=O(()=>{const p=n.value?.model||null;return Se(p)?null:p}),r=p=>O(()=>t.value&&(t.value.directives||[]).find(h=>h.name===p)||f3(p)),i=()=>O(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?v3(p):[]).map(h=>(t.value?.directives||[]).find(f=>f.name==="vModel"&&f.arg==h.name)||m3(h.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:(p,h)=>{const f=c[p];t.value&&(h?(f.value.value=h,t.value.setDirective(f.value)):(f.value.value=void 0,t.value.removeDirective(f.value)))},onForChange:(p,h)=>{if(t.value){if(p==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(p,h)=>{if(!t.value)return;const f=parseInt(p),m=l.value[f];m&&(h?(m.value=h,t.value.setDirective(m)):(m.value=void 0,t.value.removeDirective(m)))}}}function y3(){const{engine:n,project:e}=zr(),t=O(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const b3={class:"v-switcher-widget"},w3={key:1},_3=B({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=O(()=>r.project.value?.name),o=O(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(b(),G("div",b3,[x(d($e),{size:"small",round:"",onClick:s},{default:k(()=>[x(d(tu),{class:"v-switcher-widget__back"}),ae("span",null,ne(i.value),1),o.value?(b(),$(d($n),{key:0,direction:"vertical"})):N("",!0),o.value?(b(),G("span",w3,ne(o.value),1)):N("",!0)]),_:1})]))}}),x3={class:"v-toolbar-widget"},S3=B({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}=xc(),a=I("pc");return e({mode:a}),(u,l)=>(b(),G("div",x3,[x(d(ba),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[x(d(rr),{label:"pc"},{default:k(()=>[x(d(lu))]),_:1}),x(d(rr),{label:"mobile"},{default:k(()=>[x(d(uu))]),_:1}),x(d(rr),{label:"pad"},{default:k(()=>[x(d(cu))]),_:1})]),_:1},8,["modelValue"]),N("",!0),x(d(qc),null,{default:k(()=>[x(d($e),{type:"default",size:"small",onClick:d(i),disabled:d(s)||!!t.preview},{default:k(()=>[x(d(hu))]),_:1},8,["onClick","disabled"]),x(d($e),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:k(()=>[x(d(du))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),j3={class:"v-actions-widget"},k3=ae("span",null,"发布",-1),E3=B({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=mt(),r=I(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Fe("刷新完成","success")):Fe("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await Ll(1e3)),t.value?.setSelected(e.current.value)):Fe("请先打开文件","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 Fe("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Fe("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(b(),G("div",j3,[x(d(ma),{value:0,max:99,hidden:!0},{default:k(()=>[x(d(Le),{mode:"icon",icon:d(mu),background:"hover"},null,8,["icon"])]),_:1}),x(d($n),{direction:"vertical"}),x(d($e),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:k(()=>[x(d(su))]),_:1},8,["type"]),x(d($e),{onClick:i,type:"default",size:"small",title:"刷新"},{default:k(()=>[x(d(pu))]),_:1}),x(d($e),{type:"default",size:"small",title:"页面设置",onClick:o},{default:k(()=>[x(d(vu))]),_:1}),x(d($n),{direction:"vertical"}),x(d(Ui),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:k(()=>[x(d(Hi),null,{default:k(()=>[x(d(gr),{command:"current"},{default:k(()=>[de("发布页面")]),_:1}),x(d(gr),{command:"project"},{default:k(()=>[de("整站发布")]),_:1})]),_:1})]),default:k(()=>[k3]),_:1})]))}}),$3={class:"v-icon-setter"},V3={class:"v-icon-setter__content"},C3={class:"v-icon-setter__list"},Sc=B({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(!1),o=I(t.modelValue),s=I(""),a=O(()=>$i[t.modelValue]||t.modelValue),u=O(()=>{const f=Object.entries($i);return s.value?f.filter(m=>m[0].toLowerCase().includes(s.value)):f}),l=f=>{o.value=f},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(f,m)=>(b(),G("div",$3,[x(d(Xe),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(cd),onFocus:h},{prepend:k(()=>[x(d(Vt),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(b(),$(d(Ut),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=v=>i.value=v),onSubmit:c},{extra:k(()=>[x(d($e),{size:"default",type:"warning",onClick:p},{default:k(()=>[de(" 清除绑定 ")]),_:1})]),default:k(()=>[ae("div",V3,[x(d(Xe),{size:t.size,"prefix-icon":d(xa),clearable:"",modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),ae("div",C3,[(b(!0),G(re,null,oe(u.value,v=>(b(),$(d(Vt),{icon:v[1],onClick:g=>l(v[0]),class:be({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(b(),$(d(Ee),{key:0})):N("",!0)])])]),_:1},8,["modelValue"])):N("",!0)]))}}),A3=B({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=zr(),r=O(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=I(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=wr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ve("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(b(),$(d(at),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:k(()=>[x(d(Q),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),x(d(Q),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:d(ft),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""}),x(d(Q),{name:"icon",label:"菜单图标",editor:"none"},{editor:k(()=>[x(Sc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),x(d(Q),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),x(d(Q),{name:"hidden",label:"隐藏菜单",editor:"switch"}),x(d(Q),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),ua=B({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=O(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(b(),$(d(kr),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:k(()=>[ae("div",{class:be(["v-apps-region__icon",i.value]),onClick:o},[(b(),$(Ue(s.icon)))],2)]),_:1},8,["content"]))}}),he=B({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=O(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?ld:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(b(),$(d(Pr),{class:"v-panel",border:!1,header:u.value,fit:""},rn({actions:k(()=>[t.plus?(b(),$(d(Le),{key:0,size:l.$attrs.size,mode:"icon",icon:d(go),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):N("",!0),t.remove?(b(),$(d(Le),{key:1,size:l.$attrs.size,mode:"icon",icon:d(ud),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):N("",!0),t.save?(b(),$(d(Le),{key:2,size:l.$attrs.size,mode:"icon",icon:d(au),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):N("",!0),se(l.$slots,"actions")]),default:k(()=>[se(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:k(()=>[se(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),O3={class:"v-tabs__header"},T3={key:0,class:"v-tabs__actions"},Nr=B({__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=I((t.modelValue||t.items[0]?.name)??"");ve(i,()=>{r("update:modelValue",i.value)}),ve(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(b(),$(d(Pr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:k(()=>[ae("div",O3,[x(d(ac),{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?(b(),G("div",T3,[t.menus&&t.menus.length?(b(),$(d(Le),{key:0,mode:"icon",size:"small",icon:d(Gi),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:k(({item:l})=>[ae("span",null,[t.checkable?(b(),$(d(po),{key:0,class:be({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):N("",!0),de(" "+ne(l.label),1)])]),_:1},8,["icon","menus"])):N("",!0)])):N("",!0)])]),default:k(()=>[se(a.$slots,"default")]),_:3}))}}),D3={key:2,class:"v-item__index"},I3={class:"v-item__content"},B3={key:3,class:"v-item__subtitle"},Oe=B({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:go},copy:{label:"复制",icon:ho},edit:{label:"编辑",icon:vo},remove:{label:"删除",icon:Pn},lock:{label:"锁定",icon:fo},unlock:{label:"解锁",icon:ou},invisible:{label:"隐藏",icon:yo},visible:{label:"显示",icon:Su},home:{label:"主页",icon:nu}},r=n,i=e,o=I(!!r.modelValue),s=O(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),a=O(()=>({"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 Ki.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return ve(o,c=>{i("update:modelValue",c),i("switch",c)}),ve(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(b(),$(d(ue),{class:be(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:k(()=>[x(d(ue),{class:"v-item__title",align:"center"},{default:k(()=>[se(c.$slots,"default",{},()=>[c.icon?(b(),$(d(Vt),{key:0,icon:c.icon},null,8,["icon"])):N("",!0),r.tag?(b(),$(d(td),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:k(()=>[de(ne(r.tag),1)]),_:1},8,["type"])):N("",!0),c.index!==void 0?(b(),G("span",D3," # "+ne(c.index),1)):N("",!0),ae("span",I3,ne(c.title),1),c.subtitle?(b(),G("span",B3,ne(c.subtitle),1)):N("",!0)])]),_:3}),x(d(ue),{class:"v-item__actions",onClick:p[1]||(p[1]=Qt(()=>{},["stop"]))},{default:k(()=>[(b(!0),G(re,null,oe(s.value,h=>(b(),$(d(Le),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:f=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(b(),$(d(qi),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):N("",!0),se(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),R3=["draggable"],M3={class:"v-box__name"},P3={class:"v-box__label"},Pi=B({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 Ki.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=O(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(b(),G("div",{class:be(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[x(d(ue),{direction:"column",justify:"center",align:"center"},{default:k(()=>[ae("span",M3,ne(t.name),1),ae("span",P3,ne(t.title),1)]),_:1}),t.editable?(b(),$(d(ue),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:k(()=>[x(d(Vt),{icon:d(vo),onClick:i},null,8,["icon"]),x(d(Vt),{icon:d(Pn),onClick:o},null,8,["icon"])]),_:1})):N("",!0)],42,R3))}}),z3={class:"v-context-viewer"},N3=B({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,h=Yr(p);return h==="Object"||h==="Module"?Object.keys(p||{}).length===0:h==="Array"?p.length===0:!0},s=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,f)=>{const m=`[${f}]`;return{label:m,value:h,type:Yr(h),path:`${p}${m}`}}):Object.entries(c).map(([h,f])=>({label:h,value:f,type:Yr(f),path:`${p}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,p)=>{if(c.level===0)p(s(t.context));else{const h=Zt(c.data.value);p(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(b(),G("div",z3,[c.context?(b(),$(d(Wi),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:k(({data:h})=>[x(Oe,{title:h.label,clickable:"",onClick:f=>l(h),background:"",actions:["copy"],onAction:f=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):N("",!0)]))}}),Vo=B({__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}=d3(t.block,t.context),{copy:s}=fd({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=I("normal"),l=I(),c=async S=>{r("submit",S),t.submitMethod?await t.submitMethod(S)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},f=()=>{p()},m=async()=>{l.value?.submit()},v=S=>{r("pick",S)},g=S=>{s(S),Ji.success({message:"已经复制到粘贴板"})};return(S,y)=>(b(),$(d(Ut),{"model-value":t.modelValue,class:"v-binder",title:S.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:k(()=>[x(d(ue),{fit:"",direction:"row",overflow:"hidden"},{default:k(()=>[x(d(ue),{width:"30%",height:"100%"},{default:k(()=>[x(Nr,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":y[1]||(y[1]=w=>u.value=w)},{default:k(()=>[x(d(ue),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:k(()=>[Xt(ae("div",null,[x(d(Xe),{modelValue:d(o),"onUpdate:modelValue":y[0]||(y[0]=w=>ai(o)?o.value=w:null),size:"small",clearable:"","prefix-icon":d(xa),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(b(!0),G(re,null,oe(d(i),w=>(b(),G("div",null,[x(d($n),{"border-style":"dotted"},{default:k(()=>[de(ne(w.title),1)]),_:2},1024),(b(!0),G(re,null,oe(w.items,E=>(b(),$(Oe,{title:E,background:"",actions:["copy"],small:"",onClick:j=>v(E),onAction:j=>g(E)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?N("",!0):(b(),$(d(Ee),{key:0}))],512),[[vr,u.value==="normal"]]),Xt(x(N3,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[vr,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),x(d(Pr),{grow:"",header:null,border:!1},{footer:k(()=>[x(d(ue),{justify:"space-between"},{default:k(()=>[x(d(ue),null,{default:k(()=>[S.unbindEnabled?(b(),$(d($e),{key:0,type:"warning",size:"default",onClick:h},{default:k(()=>[de(" 移除绑定 ")]),_:1})):N("",!0)]),_:1}),x(d(ue),null,{default:k(()=>[x(d($e),{type:"default",size:"default",onClick:f},{default:k(()=>[de(" 取消 ")]),_:1}),x(d($e),{type:"primary",size:"default",onClick:m},{default:k(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:k(()=>[x(d(sc),{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:k(()=>[se(S.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),F3={class:"v-slots-picker__sn"},L3=B({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(),o=O(()=>`${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)):Ve("请选择插槽")};return(u,l)=>(b(),$(d(Ut),ye({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:k(()=>[x(d(id),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),x(d(ue),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:k(()=>[(b(!0),G(re,null,oe(t.slots,(c,p)=>(b(),$(d(ue),{class:be(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:k(()=>[ae("span",F3,"#"+ne(p+1),1),de(" "+ne(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),jc=B({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=O(()=>[`is-${e.mode}`]),r=O(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?aa:la,{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=O(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?aa:la,{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)=>(b(),G("div",{class:be(["v-viewport",t.value]),style:kt(i.value)},[se(o.$slots,"default")],6))}}),H3=B({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=zr(),r=O(()=>e.value?.pages||[]),{current:i}=Ie(),o=I(!1),s=I(),a=I(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async f=>{const{name:m,modelValue:v}=f,{data:g,node:S}=v;if(m==="add"&&(s.value=void 0,a.value=g.id,o.value=!0),m==="edit"&&(s.value=Mn(g),a.value=void 0,o.value=!0),m==="remove"){if(g.dir){const y=e.value?.getPage(g.id);if(y&&y.children?.length){Ve("请先删除子页面");return}}e.value?.removePage(g.id)}if(m==="copy"){const y=S.parent?.data.id;e.value?.clonePage(g,y)}m==="home"&&(e.value?.setHomepage(g.id),Fe("设置主页成功","success"))},c=async f=>{f.raw&&Fe("这是源码模式页面,不能低代码设计","warning"),f.dir||f.raw?t.project.value?.deactivate():t.project.value?.active(f)},p=(f,m,v)=>v==="inner"?!!m.data.dir:!0,h=()=>{e.value?.update({pages:li(r)})};return(f,m)=>(b(),$(d(he),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:k(()=>[x(d(Wi),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:h},{default:k(({data:v,node:g})=>[x(d(Oe),{class:"v-pages-widget__item",icon:d($i)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:S=>c(v),active:d(i)?.id===v.id,tag:d(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?(b(),$(A3,{key:0,modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):N("",!0)]),_:1}))}}),U3=B({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=_c(),{blocks:t,engine:r}=o3(),i=I(void 0),{current:o}=Ie(),s=I(!1),a=O(()=>i.value?.id?"编辑":"新增"),u=O(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async y=>{const w=y,E=r.project.value;if(!E)return!1;if(y.id)if(!E.existBlockName(w.name,[w.id]))E.updateBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName(w.name))E.createBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),s.value=!0},h=y=>{i.value=Mn(y),s.value=!0},f=y=>{r.project.value?.removeBlock(y.id)},m=y=>{i.value&&(i.value.name=wr(y))},v=async y=>{r.project.value?.active(y)},g=async y=>{const w={type:"Schema",id:y.id},E=await r.assets.getBlockMaterial(w),j=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;j&&E&&j.setDragging(E)},S=()=>{const y=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;y&&y.setDragging(null)};return(y,w)=>(b(),$(d(he),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:k(()=>[x(d(ci),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(t),E=>(b(),$(d(ui),{key:E.id,span:d(e)},{default:k(()=>[x(d(Pi),{name:E.name,title:E.title,active:d(o)?.id===E.id,editable:"",onEdit:j=>h(E),onRemove:j=>f(E),onClick:j=>v(E),draggable:d(o)?.id!==E.id,onDragstart:j=>g(E),onDragend:S},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?N("",!0):(b(),$(d(Ee),{key:0})),x(d(at),{modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=E=>s.value=E),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:k(()=>[x(d(Q),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(ft)},onChange:m},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),q3={class:"v-components-widget__search"},W3={key:0,class:"v-components-widget__result"},J3={class:"v-components-widget__list"},K3=B({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=_c(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=a3(),l=p=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,h)=>(b(),$(d(he),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:k(()=>[ae("div",q3,[x(d(Xe),{modelValue:d(a),"onUpdate:modelValue":h[0]||(h[0]=f=>ai(a)?a.value=f:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:k(()=>[x(d(Eu))]),_:1},8,["modelValue"])]),d(a)?(b(),G("div",W3,[x(d(ci),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(u),f=>(b(),$(d(ui),{span:d(e),key:f.name},{default:k(()=>[x(d(Pi),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:m=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?N("",!0):(b(),$(d(Ee),{key:0}))])):(b(),$(d(ac),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":h[2]||(h[2]=f=>ai(i)?i.value=f:null)},{default:k(()=>[ae("div",J3,[d(o)?(b(),$(d(Wc),{key:0,modelValue:d(s)[d(i)],"onUpdate:modelValue":h[1]||(h[1]=f=>d(s)[d(i)]=f)},{default:k(()=>[(b(!0),G(re,null,oe(d(o).children,f=>(b(),$(d(Jc),{key:f.name,name:f.name,title:`${f.label} (${f.count})`},{default:k(()=>[f.components?(b(),$(d(ci),{key:0,wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(f.components,m=>(b(),$(d(ui),{span:d(e),key:m.name},{default:k(()=>[x(d(Pi),{name:m.name,title:m.label||m.name,draggable:"",onDragstart:v=>l(m),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):N("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):N("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),G3=B({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=mt(),{current:i}=Ie(),o=I([]),s=j=>{if(Se(j))return j.locked?["unlock"]:["lock"];const _=j.parent;return _&&(_.locked||_.invisible)?[]:i.value?.locked?[]:j.locked?["unlock"]:j.invisible?["visible"]:["lock","invisible","copy","remove"]},a=j=>{const _=[];return j.forEach(V=>{const D={id:V.id,label:V.name,type:V.id,model:V};Array.isArray(V.children)&&(D.children=a(V.children)),_.push(D)}),_},u=()=>{if(!i.value)return[];const{id:j,name:_,nodes:V}=i.value;return[{id:j,label:_,type:j,model:i.value,children:a(V)}]},l=()=>{o.value=u()},c=O(()=>r.value?.model.id),p=j=>{const _=j.data;if(Se(_.model)||_.model.locked||_.model.name==="template")return!1;const V=e.assets.componentMap.get(_.model.name);return V?(t.value?.setDragging(V),!0):!1},h=async(j,_,V)=>{const D=_.data,Y={prev:"top",next:"bottom",inner:"inner"}[V];let C=!1;if(Se(D.model))C=V==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Y),t.value?.setDropping(C?A:null,"inner")}return C},f=j=>{const _=j?.model;!_||_.invisible||(t.value?.setSelected(_),t.value?.setHover(null))},m=async(j,_,V)=>{const D=j.data,Y=_.data;if(Se(Y.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Y.model,A={before:"left",after:"right"}[V]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Ji.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const P=await t.value?.getDropSlot(V==="inner"?C:C.parent);if(P!==null){const T=D.model;T.slot=P,i.value?.move(T,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=j=>{Se(j.model)?t.value?.setHover(j.model):(t.value?.setHover(j.model),j.model.invisible&&t.value?.setHover(null),j.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},S=j=>{const _=j.data;_.dragging=!0;const V=e.assets.componentMap.get(_.model.name);V&&t.value?.setDragging(V)},y=async j=>{const _=j.data;_.dragging=!1},w=(j,_)=>{j&&((j.id===_.id||!Se(j)&&_.isChild(j))&&t.value?.setSelected(null),t.value?.setHover(null))},E=j=>{const{name:_,modelValue:V}=j,D=r.value?.model;switch(_){case"lock":w(D,V),V.lock();break;case"unlock":w(D,V),V.unlock();break;case"invisible":w(D,V),V.setVisible(!1);break;case"visible":V.setVisible(!0);break;case"copy":const Y=i.value?.cloneNode(V);Y&&t.value?.setSelected(Y);break;case"remove":w(D,V),i.value?.removeNode(V);break}};return ve(i,l,{immediate:!0,deep:!0}),(j,_)=>(b(),$(d(he),{class:"v-outline-widget",title:"大纲树"},{default:k(()=>[x(d(Wi),{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":h,"allow-drag":p,onCurrentChange:f,onNodeDrop:m,onNodeDragStart:S,onNodeDragEnd:y},{default:k(({data:V,node:D})=>[x(d(Oe),{class:be(["v-outline-widget__item",{"is-locked":V.model.locked,"is-invisible":V.model.invisible,"is-dragging":V.dragging}]),active:!V.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":V.model,icon:V.model.locked?d(fo):V.model.invisible?d(yo):void 0,title:V.label,subtitle:V.type,actions:s(V.model),onAction:E,onMouseenter:Y=>v(V),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"])]),_:1}))}}),Y3=B({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=xc(),i=O(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await fn("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(b(),$(d(he),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:s},{default:k(()=>[d(r)===0?(b(),$(d(Ee),{key:0,"image-size":50})):N("",!0),d(e)?(b(!0),G(re,{key:1},oe(d(e).items,(l,c)=>(b(),$(d(Oe),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):N("",!0)]),_:1},8,["subtitle","remove"]))}}),ke=Tc({loader:()=>$c(()=>import("./Editor-ctkAn2cu-O6Vp28_y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:B({render(){return Ae("div","正在拼命加载...")}}),errorComponent:B({render(){return Ae("div","组件加载失败!")}})}),Z3=B({name:"ApisWidget",__name:"index",setup(n){const e=I(!1),t=I(null),r=I(!1),i=O(()=>r.value?"编辑API":"新增API"),o=O(()=>s.value?.apis||[]),{project:s}=zr(),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=X6.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(g,S,y)=>{Te({type:"JSExpression",value:S},window)?y():y(new Error("代码错误"))},f=g=>{g.name==="edit"&&m(g.modelValue),g.name==="remove"&&s.value?.removeApi(g.modelValue.name)},m=g=>{r.value=!0,t.value=Mn(g),e.value=!0},v=async g=>s.value?.existApiName(g.name,r.value?[g.id]:[])?(Ve(`API名称 [ ${g.name} ] 已存在`),!1):(s.value?.setApi(g),!0);return(g,S)=>(b(),$(d(he),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(o.value,y=>(b(),$(d(Oe),{key:y.id,small:"",title:y.name,subtitle:y.label,"model-value":y,tag:y.method?.toUpperCase(),"tag-type":c[y.method||"get"],background:"",actions:["edit","remove"],onClick:w=>m(y),onAction:f},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(b(),$(d(Ee),{key:0,"image-size":50})):N("",!0),x(d(at),{modelValue:e.value,"onUpdate:modelValue":S[1]||(S[1]=y=>e.value=y),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:k(()=>[x(d(ue),{gap:"",fit:""},{default:k(()=>[x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[x(d(Q),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),x(d(Q),{name:"name",label:"接口名称",required:"",rules:{pattern:d(ft),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"url",label:"接口URL",required:""})]),_:1}),x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[t.value.method!=="jsonp"?(b(),$(d(he),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(ue),{justify:"space-around"},{default:k(()=>[x(d(Q),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),x(d(Q),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),x(d(Q),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),x(d(Q),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),x(d(Q),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:k(()=>[x(d(ke),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":S[0]||(S[0]=y=>t.value.settings.headers.value=y),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):N("",!0),t.value.method==="jsonp"?(b(),$(d(he),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(Q),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),x(d(Q),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),x(d(Q),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),x(d(Q),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):N("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),X3=B({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=wc(),r=I(!1),i=I(!1),o=I({}),s=O(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=m=>m.required||m.official?[]:["edit","remove"],u=m=>m.official&&!m.required,l=async m=>(m.urls=m.urls.split(`
80
+ */const Q6="0.7.7",ua={width:390,height:844},ca={width:1180,height:820},mt=/^[A-Za-z_$][\w_-]*$/,e3=["click","dblclick","mouseenter","mouseleave","mousedown","mouseup","mouseover","contextmenu"],t3=["keydown","keyup","keypress"],n3=["GET","POST","PUT","PATCH","DELETE","JSONP"],r3=["stop","prevent","capture","self","once","passive"];var Ye=(n=>(n.Block="block",n.Node="node",n))(Ye||{});const jc="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",i3=["title","src"],o3={key:1},s3=B({name:"LogoWidget",inheritAttrs:!1,__name:"index",props:{icon:{default:jc},text:{default:"VTJ"},link:{}},setup(n){const e=n,t=()=>{e.link&&(location.href=e.link)};return(r,i)=>(b(),G("div",{class:"v-logo-widget",onClick:t},[e.icon?(b(),G("img",{key:0,title:e.text,class:"v-logo-widget__icon",src:e.icon},null,8,i3)):(b(),G("span",o3,ne(e.text),1))]))}}),a3={class:"v-empty-widget"},l3=B({name:"EmptyWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",a3,"EmptyWidget"))}});function kc(){const n=Me(),e=O(()=>n.project.value?.dependencies??[]);return{engine:n,dependencies:e}}function Ot(n,e){const t=O(()=>Ac.getWidgets(d(n),d(e)).filter(i=>!i.invisible)),r=I();return{widgets:t,widgetsRef:r}}function Ec(){const n=Me();return{span:O(()=>{const e=n.skeleton?.skeletonRef.leftWidth||400,t=Math.min(Math.floor((e-50)/120),24);return Math.floor(24/t)}),engine:n}}function u3(){const n=Me(),e=O(()=>n.project.value?.blocks??[]);return{engine:n,blocks:e}}const c3=(n=[])=>n.map(e=>e.name);function d3(){const n=Me(),{components:e,groups:t,componentMap:r}=n.assets,i=zt({}),o=O(()=>{const p={};return t.value&&t.value.forEach(h=>{p[h.name]=h}),p}),s=O(()=>t.value?t.value.map(p=>({label:`${p.label} (${p.count})`,name:p.name,disabled:!p.children?.length})):[]),a=I(s.value[0]?.name),u=I(""),l=O(()=>o.value[a.value]);Ui(()=>{const p=s.value.reduce((h,f)=>(h[f.name]=c3(o.value[f.name].children),h),{});Object.assign(i,p)});const c=O(()=>{const p=u.value.toLowerCase();return!p||!e?[]:e.filter(h=>h.name.toLowerCase().includes(p)||h.label?.toLowerCase().includes(p))});return{components:e,groups:t,componentMap:r,groupMap:o,tabs:s,model:i,currentTab:a,currentGroup:l,searchKey:u,searchResult:c}}function Ie(){const n=Me(),e=O(()=>n.current.value),t=O(()=>n.context.value),r=O(()=>n.isEmptyCurrent.value);return{engine:n,current:e,isEmpty:r,context:t}}function p3(n,e){const t=Me();t.simulator.init(n,e);const r=O(()=>t.simulator.designer.value),i=O(()=>ai("hover",r.value?.hover.value)),o=O(()=>ai("dropping",r.value?.dropping.value)),s=O(()=>ai("selected",r.value?.selected.value));return{designer:r,dropping:o,hover:i,selected:s}}function h3(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 f3(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 ai(n,e){if(!e)return null;const{left:t,top:r,width:i,height:o}=n==="dropping"?f3(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:h3(e.rect,n!=="selected")}}function vt(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>e.value?.selected.value),r=O(()=>Se(t.value?.model));return{engine:n,designer:e,selected:t,isSelectBlock:r}}function m3(n,e){const t=I(""),{selected:r,isSelectBlock:i}=vt(),o=O(()=>r.value?.model.id),s=O(()=>{const u=ci(n),l=ci(e),c=[];if(!u)return c;const p=l?.__contextRefs[o.value||""],h=l===p||i.value?[]:Object.keys(p?.context||{}).filter(E=>!["context","ref"].includes(E)).map(E=>`this.context.${E}`);h.length&&c.push({title:"上下文",items:h});const f=u.inject.map(E=>`this.${E.name}`);f.length&&c.push({title:"注入",items:f});const m=u.props.map(E=>typeof E=="string"?`this.$props.${E}`:`this.$props.${E.name}`);m.length&&c.push({title:"属性",items:m});const v=Object.keys(u.state).map(E=>`this.state.${E}`);v.length&&c.push({title:"状态",items:v});const g=Object.keys(u.computed).map(E=>`this.${E}.value`);g.length&&c.push({title:"计算属性",items:g});const S=Object.keys(u.methods).map(E=>`this.${E}`);S.length&&c.push({title:"方法",items:S});const y=Object.keys(u.dataSources).map(E=>`this.${E}`);y.length&&c.push({title:"数据源",items:y});const w=Object.keys(l?.$refs||{}).map(E=>`this.$refs.${E}`);return w.length&&c.push({title:"refs",items:w}),c}),a=O(()=>{if(!t.value)return s.value;const u=t.value.toLowerCase(),l=[];return s.value.forEach(c=>{const p=c.items.filter(h=>h.toLowerCase().includes(u));p.length&&l.push({title:c.title,items:p})}),l});return{keyword:t,options:s,searchResult:a}}const rr=[{name:"StringSetter",label:"文本"},{name:"ExpressionSetter",label:"表达式"}];function v3(n){const e=Me(),t=O(()=>{const u=n.value?.model||null;return Se(u)?null:u}),r=I();ve(t,async u=>{u?.from?r.value=await e.assets.getBlockMaterial(u.from)||void 0:r.value=void 0},{immediate:!0});const i=O(()=>t.value?[{name:"key",setters:rr,value:t.value.getPropValue("key")},{name:"ref",setters:rr,value:t.value.getPropValue("ref")},{name:"class",label:"class",setters:rr,value:t.value.getPropValue("class")},{name:"children",label:"文本",title:"如设置组件文本,将清空子组件",setters:rr,value:Array.isArray(t.value.children)?"":t.value.children}]:[]),o=O(()=>{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=O(()=>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 Ve(n,e="提示"){return Nt.warning({title:e,message:n})}async function fn(n){return await Xi.confirm(n,"提示",{type:"warning"}).catch(()=>!1)}function Fe(n,e="success"){return Zi({message:n,type:e})}function Te(n,e,t=!1){let r=!0;try{n.type==="JSExpression"?Ct(n,e,t,!0):Fi(n,e,t,!0)}catch(i){r=!1,Nt.error({title:"代码错误",message:i.message})}return r}function $c(){const n=Me(),e=O(()=>n.simulator.designer.value),t=O(()=>n.current.value?n.history.value:null),r=O(()=>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),Fe("已载入历史记录","success")},a=O(()=>r.value<=1?!0:(t.value?.index||-1)<=0),u=O(()=>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 Fr(){const n=Me(),e=O(()=>n.project.value);return{engine:n,project:e}}function g3(n){const e=Me(),t=O(()=>{const a=n.value?.model||null;return Se(a)?null:a}),r=I();ve(t,async a=>{a?.from?r.value=await e.assets.getBlockMaterial(a.from)||void 0:r.value=void 0});const i=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return e3.map(u=>({name:u,event:a[u]}))}),o=O(()=>{if(Se(t.value))return[];const a=t.value?.events||{};return t3.map(u=>({name:u,event:a[u]}))}),s=O(()=>{if(!t.value||Se(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 y3=(n,e)=>new Yt({name:n,value:void 0,iterator:e}),b3=(n="modelValue")=>new Yt({name:"vModel",value:void 0,arg:n});function w3(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 _3(n){const e=Me(),t=O(()=>{const p=n.value?.model||null;return Se(p)?null:p}),r=p=>O(()=>t.value&&(t.value.directives||[]).find(h=>h.name===p)||y3(p)),i=()=>O(()=>{if(!t.value)return[];const p=e.assets.componentMap.get(t.value.name||"");return(p?w3(p):[]).map(h=>(t.value?.directives||[]).find(f=>f.name==="vModel"&&f.arg==h.name)||b3(h.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:(p,h)=>{const f=c[p];t.value&&(h?(f.value.value=h,t.value.setDirective(f.value)):(f.value.value=void 0,t.value.removeDirective(f.value)))},onForChange:(p,h)=>{if(t.value){if(p==="value"){h?(u.value.value=h,t.value.setDirective(u.value)):t.value.removeDirective(u.value);return}(p==="item"||p==="index")&&(u.value.iterator={...u.value.iterator,[p]:h||void 0},t.value.setDirective(u.value))}},onModelChange:(p,h)=>{if(!t.value)return;const f=parseInt(p),m=l.value[f];m&&(h?(m.value=h,t.value.setDirective(m)):(m.value=void 0,t.value.removeDirective(m)))}}}function x3(){const{engine:n,project:e}=Fr(),t=O(()=>e.value?.apis||[]);return{engine:n,project:e,apis:t}}const S3={class:"v-switcher-widget"},j3={key:1},k3=B({name:"SwitcherWidget",inheritAttrs:!1,__name:"index",emits:["click"],setup(n,{emit:e}){const t=e,{engine:r}=Ie(),i=O(()=>r.project.value?.name),o=O(()=>r.project.value?.currentFile?.title),s=()=>{t("click",r.project.value)};return(a,u)=>(b(),G("div",S3,[x(d($e),{size:"small",round:"",onClick:s},{default:k(()=>[x(d(iu),{class:"v-switcher-widget__back"}),ae("span",null,ne(i.value),1),o.value?(b(),$(d(Cn),{key:0,direction:"vertical"})):N("",!0),o.value?(b(),G("span",j3,ne(o.value),1)):N("",!0)]),_:1})]))}}),E3={class:"v-toolbar-widget"},$3=B({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}=$c(),a=I("pc");return e({mode:a}),(u,l)=>(b(),G("div",E3,[x(d(_a),{size:"small",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[x(d(or),{label:"pc"},{default:k(()=>[x(d(du))]),_:1}),x(d(or),{label:"mobile"},{default:k(()=>[x(d(pu))]),_:1}),x(d(or),{label:"pad"},{default:k(()=>[x(d(hu))]),_:1})]),_:1},8,["modelValue"]),N("",!0),x(d(Yc),null,{default:k(()=>[x(d($e),{type:"default",size:"small",onClick:d(i),disabled:d(s)||!!t.preview},{default:k(()=>[x(d(vu))]),_:1},8,["onClick","disabled"]),x(d($e),{type:"default",size:"small",onClick:d(r),disabled:d(o)||!!t.preview},{default:k(()=>[x(d(fu))]),_:1},8,["onClick","disabled"])]),_:1})]))}}),V3={class:"v-actions-widget"},C3=ae("span",null,"发布",-1),A3=B({name:"ActionsWidget",inheritAttrs:!1,__name:"index",props:{coder:{type:Boolean,default:!0}},setup(n){const{engine:e,designer:t}=vt(),r=I(!1),i=()=>{e.current.value?(r.value?e.skeleton?.getWidget("Previewer")?.widgetRef.refresh():(t.value?.setSelected(null),e.simulator.refresh()),Fe("刷新完成","success")):Fe("请先打开文件","warning")},o=async()=>{e.current.value?(r.value&&(e.skeleton?.closePreview(),r.value=!1,await ql(1e3)),t.value?.setSelected(e.current.value)):Fe("请先打开文件","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 Fe("请先打开文件","warning")},a=()=>{const l=e.project.value;l&&(l.currentFile?l.publish(l.currentFile):Fe("请先打开文件","warning"))},u=l=>{const c=e.project.value;c&&(l==="current"?a():c.publish())};return(l,c)=>(b(),G("div",V3,[x(d(ga),{value:0,max:99,hidden:!0},{default:k(()=>[x(d(Le),{mode:"icon",icon:d(yu),background:"hover"},null,8,["icon"])]),_:1}),x(d(Cn),{direction:"vertical"}),x(d($e),{onClick:s,type:r.value?"warning":"default",size:"small",title:"预览"},{default:k(()=>[x(d(uu))]),_:1},8,["type"]),x(d($e),{onClick:i,type:"default",size:"small",title:"刷新"},{default:k(()=>[x(d(mu))]),_:1}),x(d($e),{type:"default",size:"small",title:"页面设置",onClick:o},{default:k(()=>[x(d(bu))]),_:1}),x(d(Cn),{direction:"vertical"}),x(d(Ki),{"split-button":"",type:"primary",size:"small",onClick:a,onCommand:u},{dropdown:k(()=>[x(d(Ji),null,{default:k(()=>[x(d(br),{command:"current"},{default:k(()=>[de("发布页面")]),_:1}),x(d(br),{command:"project"},{default:k(()=>[de("整站发布")]),_:1})]),_:1})]),default:k(()=>[C3]),_:1})]))}}),O3={class:"v-icon-setter"},T3={class:"v-icon-setter__content"},D3={class:"v-icon-setter__list"},Vc=B({name:"IconSetter",__name:"icon",props:{modelValue:{default:""},size:{default:"small"}},emits:["change","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(!1),o=I(t.modelValue),s=I(""),a=O(()=>Ci[t.modelValue]||t.modelValue),u=O(()=>{const f=Object.entries(Ci);return s.value?f.filter(m=>m[0].toLowerCase().includes(s.value)):f}),l=f=>{o.value=f},c=()=>{r("change",o.value),r("update:modelValue",o.value),i.value=!1},p=()=>{o.value="",r("change",""),r("update:modelValue",""),i.value=!1},h=()=>{i.value=!0};return(f,m)=>(b(),G("div",O3,[x(d(Xe),{size:t.size,readonly:"",placeholder:"请选择图标","model-value":t.modelValue,"suffix-icon":d(md),onFocus:h},{prepend:k(()=>[x(d(Vt),{icon:a.value},null,8,["icon"])]),_:1},8,["size","model-value","suffix-icon"]),i.value?(b(),$(d(Ut),{key:0,title:"图标选择器",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=v=>i.value=v),onSubmit:c},{extra:k(()=>[x(d($e),{size:"default",type:"warning",onClick:p},{default:k(()=>[de(" 清除绑定 ")]),_:1})]),default:k(()=>[ae("div",T3,[x(d(Xe),{size:t.size,"prefix-icon":d(ja),clearable:"",modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=v=>s.value=v),placeholder:"请输入查询关键字"},null,8,["size","prefix-icon","modelValue"]),ae("div",D3,[(b(!0),G(re,null,oe(u.value,v=>(b(),$(d(Vt),{icon:v[1],onClick:g=>l(v[0]),class:be({"is-active":o.value===v[0]})},null,8,["icon","onClick","class"]))),256)),u.value.length===0?(b(),$(d(Ee),{key:0})):N("",!0)])])]),_:1},8,["modelValue"])):N("",!0)]))}}),I3=B({name:"PageForm",__name:"form",props:{item:{},parentId:{}},setup(n){const e=n,{project:t}=Fr(),r=O(()=>e.item?"编辑页面":"新增页面"),i=()=>({dir:!1,name:"",title:"",icon:"",mask:!0,hidden:!1,raw:!1}),o=I(e.item||i()),s=[{label:"页面",value:!1},{label:"目录",value:!0}],a=l=>{o.value&&(o.value.name=xr(l))},u=async l=>t.value?.existPageName(l.name,[l.id])?(Ve("页面名称已存在,请更换"),!1):(e.item?t.value?.updatePage(l):t.value?.createPage(l,e.parentId),!0);return(l,c)=>(b(),$(d(at),{title:r.value,width:"800px",height:"500px","form-props":{tooltipMessage:!1},model:o.value,"submit-method":u},{default:k(()=>[x(d(Q),{name:"dir",label:"类型",editor:"radio",options:s,props:{button:!0,size:"small"},disabled:!!e.item,required:""},null,8,["disabled"]),x(d(Q),{name:"name",label:"名称",required:"",onChange:a,rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""}),x(d(Q),{name:"icon",label:"菜单图标",editor:"none"},{editor:k(()=>[x(Vc,{modelValue:o.value.icon,"onUpdate:modelValue":c[0]||(c[0]=p=>o.value.icon=p),size:"default"},null,8,["modelValue"])]),_:1}),x(d(Q),{visible:{dir:!1},name:"mask",label:"包含母版",editor:"switch"}),x(d(Q),{name:"hidden",label:"隐藏菜单",editor:"switch"}),x(d(Q),{visible:{dir:!1},disabled:!!e.item,inline:"",name:"raw",label:"源码模式",editor:"switch",tip:"页面是非低代码开发,不能在线编辑"},null,8,["disabled"])]),_:1},8,["title","model"]))}}),da=B({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=O(()=>({"is-active":t.active,"is-open":t.open})),o=()=>{r("click")};return(s,a)=>(b(),$(d($r),{effect:"dark",placement:"right",content:s.label,"show-after":600},{default:k(()=>[ae("div",{class:be(["v-apps-region__icon",i.value]),onClick:o},[(b(),$(Ue(s.icon)))],2)]),_:1},8,["content"]))}}),he=B({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=O(()=>t.header?{content:t.title,subtitle:t.subtitle,icon:t.back?hd:void 0,onClickBack:t.back?o:void 0}:null);return(l,c)=>(b(),$(d(Nr),{class:"v-panel",border:!1,header:u.value,fit:""},rn({actions:k(()=>[t.plus?(b(),$(d(Le),{key:0,size:l.$attrs.size,mode:"icon",icon:d(_o),background:"hover",title:"新增",onClick:i},null,8,["size","icon"])):N("",!0),t.remove?(b(),$(d(Le),{key:1,size:l.$attrs.size,mode:"icon",icon:d(fd),background:"hover",title:"清除",onClick:s},null,8,["size","icon"])):N("",!0),t.save?(b(),$(d(Le),{key:2,size:l.$attrs.size,mode:"icon",icon:d(cu),background:"hover",title:"保存",onClick:a},null,8,["size","icon"])):N("",!0),se(l.$slots,"actions")]),default:k(()=>[se(l.$slots,"default")]),_:2},[l.$slots.footer?{name:"footer",fn:k(()=>[se(l.$slots,"footer")]),key:"0"}:void 0]),1032,["header"]))}}),B3={class:"v-tabs__header"},R3={key:0,class:"v-tabs__actions"},Lr=B({__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=I((t.modelValue||t.items[0]?.name)??"");ve(i,()=>{r("update:modelValue",i.value)}),ve(()=>t.modelValue,a=>{i.value=a});const o=a=>{r("command",a)},s=a=>{r("remove",a)};return(a,u)=>(b(),$(d(Nr),{class:"v-tabs",border:!1,fit:"",radius:!1},{header:k(()=>[ae("div",B3,[x(d(pc),{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?(b(),G("div",R3,[t.menus&&t.menus.length?(b(),$(d(Le),{key:0,mode:"icon",size:"small",icon:d(Qi),background:"hover",dropdown:{size:"small",placement:"bottom-end"},menus:t.menus,onCommand:o},{item:k(({item:l})=>[ae("span",null,[t.checkable?(b(),$(d(vo),{key:0,class:be({"v-tabs__checked":!0,"is-checked":l.checked})},null,8,["class"])):N("",!0),de(" "+ne(l.label),1)])]),_:1},8,["icon","menus"])):N("",!0)])):N("",!0)])]),default:k(()=>[se(a.$slots,"default")]),_:3}))}}),M3={key:2,class:"v-item__index"},P3={class:"v-item__content"},z3={key:3,class:"v-item__subtitle"},Oe=B({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:_o},copy:{label:"复制",icon:go},edit:{label:"编辑",icon:wo},remove:{label:"删除",icon:Nn},lock:{label:"锁定",icon:yo},unlock:{label:"解锁",icon:lu},invisible:{label:"隐藏",icon:xo},visible:{label:"显示",icon:Eu},home:{label:"主页",icon:ou}},r=n,i=e,o=I(!!r.modelValue),s=O(()=>r.actions.map(c=>{const p=t[c];return{name:c,...p}})),a=O(()=>({"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 Xi.confirm("确定删除吗?","提示",{type:"warning"}).catch(()=>!1)&&i("action",{name:c,modelValue:r.modelValue}):i("action",{name:c,modelValue:r.modelValue})};return ve(o,c=>{i("update:modelValue",c),i("switch",c)}),ve(()=>r.modelValue,c=>{o.value=!!c}),(c,p)=>(b(),$(d(ue),{class:be(["v-item",a.value]),justify:"space-between",align:"center",onClick:u},{default:k(()=>[x(d(ue),{class:"v-item__title",align:"center"},{default:k(()=>[se(c.$slots,"default",{},()=>[c.icon?(b(),$(d(Vt),{key:0,icon:c.icon},null,8,["icon"])):N("",!0),r.tag?(b(),$(d(sd),{key:1,class:"v-item__tag",size:"small",type:r.tagType},{default:k(()=>[de(ne(r.tag),1)]),_:1},8,["type"])):N("",!0),c.index!==void 0?(b(),G("span",M3," # "+ne(c.index),1)):N("",!0),ae("span",P3,ne(c.title),1),c.subtitle?(b(),G("span",z3,ne(c.subtitle),1)):N("",!0)])]),_:3}),x(d(ue),{class:"v-item__actions",onClick:p[1]||(p[1]=Qt(()=>{},["stop"]))},{default:k(()=>[(b(!0),G(re,null,oe(s.value,h=>(b(),$(d(Le),{name:h.name,title:h.label,mode:"icon",size:"small",background:"none",type:"info",icon:h.icon,onClick:f=>l(h.name)},null,8,["name","title","icon","onClick"]))),256)),r.switch?(b(),$(d(Gi),{key:0,modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=h=>o.value=h),class:"v-item__switch",size:"small"},null,8,["modelValue"])):N("",!0),se(c.$slots,"status")]),_:3})]),_:3},8,["class"]))}}),N3=["draggable"],F3={class:"v-box__name"},L3={class:"v-box__label"},Li=B({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 Xi.confirm("确认删除?","提示",{type:"warning"}).catch(()=>!1)&&r("remove")},s=O(()=>({"is-active":t.active,"is-draggable":t.draggable})),a=()=>{r("dragstart",t)},u=()=>{r("dragend",t)};return(l,c)=>(b(),G("div",{class:be(["v-box",s.value]),draggable:l.draggable,onDragstart:a,onDragend:u},[x(d(ue),{direction:"column",justify:"center",align:"center"},{default:k(()=>[ae("span",F3,ne(t.name),1),ae("span",L3,ne(t.title),1)]),_:1}),t.editable?(b(),$(d(ue),{key:0,class:"v-box__footer",justify:"flex-end",align:"center"},{default:k(()=>[x(d(Vt),{icon:d(wo),onClick:i},null,8,["icon"]),x(d(Vt),{icon:d(Nn),onClick:o},null,8,["icon"])]),_:1})):N("",!0)],42,N3))}}),H3={class:"v-context-viewer"},U3=B({__name:"viewer",props:{context:{}},emits:["pick","copy"],setup(n,{emit:e}){const t=n,r=e,i=["$provider","$apis","$components","context"],o=c=>{const p=c.value,h=Xr(p);return h==="Object"||h==="Module"?Object.keys(p||{}).length===0:h==="Array"?p.length===0:!0},s=(c,p="this")=>typeof c=="object"?Array.isArray(c)?c.map((h,f)=>{const m=`[${f}]`;return{label:m,value:h,type:Xr(h),path:`${p}${m}`}}):Object.entries(c).map(([h,f])=>({label:h,value:f,type:Xr(f),path:`${p}.${h}`})).filter(h=>!h.label.startsWith("__")&&!i.includes(h.label)):[],a=(c,p)=>{if(c.level===0)p(s(t.context));else{const h=Zt(c.data.value);p(s(h,c.data.path))}},u=c=>{r("copy",c.path)},l=c=>{r("pick",c.path)};return(c,p)=>(b(),G("div",H3,[c.context?(b(),$(d(Yi),{key:0,lazy:"",load:a,"expand-on-click-node":!1,props:{isLeaf:o}},{default:k(({data:h})=>[x(Oe,{title:h.label,clickable:"",onClick:f=>l(h),background:"",actions:["copy"],onAction:f=>u(h),grow:"",small:""},null,8,["title","onClick","onAction"])]),_:1},8,["props"])):N("",!0)]))}}),To=B({__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}=m3(t.block,t.context),{copy:s}=bd({}),a=[{name:"normal",label:"常用"},{name:"viewer",label:"高级"}],u=I("normal"),l=I(),c=async S=>{r("submit",S),t.submitMethod?await t.submitMethod(S)&&p():p()},p=()=>{r("update:modelValue",!1),r("close")},h=()=>{r("unbind")},f=()=>{p()},m=async()=>{l.value?.submit()},v=S=>{r("pick",S)},g=S=>{s(S),Zi.success({message:"已经复制到粘贴板"})};return(S,y)=>(b(),$(d(Ut),{"model-value":t.modelValue,class:"v-binder",title:S.title,width:"1000px",height:"600px","body-padding":!1,maximizable:!1,minimizable:!1,onClose:p},{default:k(()=>[x(d(ue),{fit:"",direction:"row",overflow:"hidden"},{default:k(()=>[x(d(ue),{width:"30%",height:"100%"},{default:k(()=>[x(Lr,{class:"v-binder__tabs",items:a,modelValue:u.value,"onUpdate:modelValue":y[1]||(y[1]=w=>u.value=w)},{default:k(()=>[x(d(ue),{class:"v-binder__tab-content",fit:"",padding:"",flex:!1},{default:k(()=>[Xt(ae("div",null,[x(d(Xe),{modelValue:d(o),"onUpdate:modelValue":y[0]||(y[0]=w=>ui(o)?o.value=w:null),size:"small",clearable:"","prefix-icon":d(ja),placeholder:"筛选可用项"},null,8,["modelValue","prefix-icon"]),(b(!0),G(re,null,oe(d(i),w=>(b(),G("div",null,[x(d(Cn),{"border-style":"dotted"},{default:k(()=>[de(ne(w.title),1)]),_:2},1024),(b(!0),G(re,null,oe(w.items,E=>(b(),$(Oe,{title:E,background:"",actions:["copy"],small:"",onClick:j=>v(E),onAction:j=>g(E)},null,8,["title","onClick","onAction"]))),256))]))),256)),d(i).length?N("",!0):(b(),$(d(Ee),{key:0}))],512),[[yr,u.value==="normal"]]),Xt(x(U3,{context:t.context,onCopy:g,onPick:v},null,8,["context"]),[[yr,u.value==="viewer"]])]),_:1})]),_:1},8,["modelValue"])]),_:1}),x(d(Nr),{grow:"",header:null,border:!1},{footer:k(()=>[x(d(ue),{justify:"space-between"},{default:k(()=>[x(d(ue),null,{default:k(()=>[S.unbindEnabled?(b(),$(d($e),{key:0,type:"warning",size:"default",onClick:h},{default:k(()=>[de(" 移除绑定 ")]),_:1})):N("",!0)]),_:1}),x(d(ue),null,{default:k(()=>[x(d($e),{type:"default",size:"default",onClick:f},{default:k(()=>[de(" 取消 ")]),_:1}),x(d($e),{type:"primary",size:"default",onClick:m},{default:k(()=>[de(" 确定 ")]),_:1})]),_:1})]),_:1})]),default:k(()=>[x(d(dc),{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:k(()=>[se(S.$slots,"default")]),_:3},8,["model","rules"])]),_:3})]),_:3})]),_:3},8,["model-value","title"]))}}),q3={class:"v-slots-picker__sn"},W3=B({__name:"slots",props:{slots:{default:()=>[]}},emits:["submit","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=I(),o=O(()=>`${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)):Ve("请选择插槽")};return(u,l)=>(b(),$(d(Ut),ye({class:"v-slots-picker",title:"选择插槽",width:"600px",height:o.value,submit:"",cancel:"",onSubmit:a},u.$attrs),{default:k(()=>[x(d(ud),{title:"该组件支持多个插槽,请选择放置到其中一个",type:"warning",closable:!1}),x(d(ue),{class:"v-slots-picker__content",justify:"space-around",alignContent:"flex-start",gap:"",wrap:"wrap"},{default:k(()=>[(b(!0),G(re,null,oe(t.slots,(c,p)=>(b(),$(d(ue),{class:be(["v-slots-picker__item",{"is-active":c.name===i.value?.name}]),grow:"",flex:!1,onClick:h=>s(c)},{default:k(()=>[ae("span",q3,"#"+ne(p+1),1),de(" "+ne(c.name),1)]),_:2},1032,["class","onClick"]))),256))]),_:1})]),_:1},16,["height"]))}}),Cc=B({name:"Viewport",__name:"viewport",props:{mode:{default:"pc"},width:{},height:{}},setup(n){const e=n,t=O(()=>[`is-${e.mode}`]),r=O(()=>{if(e.mode==="pc")return 1;const o=e.mode==="mobile"?ua:ca,{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=O(()=>{if(e.mode==="pc")return{};const o=e.mode==="mobile"?ua:ca,{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)=>(b(),G("div",{class:be(["v-viewport",t.value]),style:kt(i.value)},[se(o.$slots,"default")],6))}}),J3=B({name:"PagesWidget",__name:"index",setup(n){const{project:e,engine:t}=Fr(),r=O(()=>e.value?.pages||[]),{current:i}=Ie(),o=I(!1),s=I(),a=I(),u=()=>{a.value=void 0,s.value=void 0,o.value=!0},l=async f=>{const{name:m,modelValue:v}=f,{data:g,node:S}=v;if(m==="add"&&(s.value=void 0,a.value=g.id,o.value=!0),m==="edit"&&(s.value=zn(g),a.value=void 0,o.value=!0),m==="remove"){if(g.dir){const y=e.value?.getPage(g.id);if(y&&y.children?.length){Ve("请先删除子页面");return}}e.value?.removePage(g.id)}if(m==="copy"){const y=S.parent?.data.id;e.value?.clonePage(g,y)}m==="home"&&(e.value?.setHomepage(g.id),Fe("设置主页成功","success"))},c=async f=>{f.raw&&Fe("这是源码模式页面,不能低代码设计","warning"),f.dir||f.raw?t.project.value?.deactivate():t.project.value?.active(f)},p=(f,m,v)=>v==="inner"?!!m.data.dir:!0,h=()=>{e.value?.update({pages:ci(r)})};return(f,m)=>(b(),$(d(he),{class:"v-pages-widget",title:"页面管理",plus:"",subtitle:"(共 0 条)",onPlus:u},{default:k(()=>[x(d(Yi),{data:r.value,"node-key":"id","default-expand-all":"",draggable:"","allow-drop":p,onNodeDrop:h},{default:k(({data:v,node:g})=>[x(d(Oe),{class:"v-pages-widget__item",icon:d(Ci)[v.icon],title:v.title,subtitle:v.name,"model-value":{data:v,node:g},actions:v.dir?["add","edit","remove"]:v.raw?["home","edit","remove"]:["home","copy","edit","remove"],onAction:l,onClick:S=>c(v),active:d(i)?.id===v.id,tag:d(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?(b(),$(I3,{key:0,modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=v=>o.value=v),item:s.value,"parent-id":a.value},null,8,["modelValue","item","parent-id"])):N("",!0)]),_:1}))}}),K3=B({name:"BlocksWidget",__name:"index",setup(n){const{span:e}=Ec(),{blocks:t,engine:r}=u3(),i=I(void 0),{current:o}=Ie(),s=I(!1),a=O(()=>i.value?.id?"编辑":"新增"),u=O(()=>`(共 ${t.value.length} 个)`),l=()=>({name:"",title:"",type:"block"}),c=async y=>{const w=y,E=r.project.value;if(!E)return!1;if(y.id)if(!E.existBlockName(w.name,[w.id]))E.updateBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;else if(!E.existBlockName(w.name))E.createBlock(w);else return Ve(`名称【${w.name}】已经存在,请更换名称`),!1;return!0},p=()=>{i.value=l(),s.value=!0},h=y=>{i.value=zn(y),s.value=!0},f=y=>{r.project.value?.removeBlock(y.id)},m=y=>{i.value&&(i.value.name=xr(y))},v=async y=>{r.project.value?.active(y)},g=async y=>{const w={type:"Schema",id:y.id},E=await r.assets.getBlockMaterial(w),j=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;j&&E&&j.setDragging(E)},S=()=>{const y=r.skeleton?.getWidget("Designer")?.widgetRef?.designer;y&&y.setDragging(null)};return(y,w)=>(b(),$(d(he),{class:"v-blocks-widget",title:"区块管理",subtitle:u.value,plus:"",onPlus:p},{default:k(()=>[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(t),E=>(b(),$(d(di),{key:E.id,span:d(e)},{default:k(()=>[x(d(Li),{name:E.name,title:E.title,active:d(o)?.id===E.id,editable:"",onEdit:j=>h(E),onRemove:j=>f(E),onClick:j=>v(E),draggable:d(o)?.id!==E.id,onDragstart:j=>g(E),onDragend:S},null,8,["name","title","active","onEdit","onRemove","onClick","draggable","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(t).length?N("",!0):(b(),$(d(Ee),{key:0})),x(d(at),{modelValue:s.value,"onUpdate:modelValue":w[0]||(w[0]=E=>s.value=E),title:a.value,model:i.value,width:"600px",height:"250px","form-props":{tooltipMessage:!1},"submit-method":c},{default:k(()=>[x(d(Q),{name:"name",label:"名称",required:"",tip:"名称为英文驼峰格式",rules:{message:"名称格式错误",pattern:d(mt)},onChange:m},null,8,["rules"]),x(d(Q),{name:"title",label:"标题",required:""})]),_:1},8,["modelValue","title","model"])]),_:1},8,["subtitle"]))}}),G3={class:"v-components-widget__search"},Y3={key:0,class:"v-components-widget__result"},Z3={class:"v-components-widget__list"},X3=B({name:"ComponentsWidget",__name:"index",setup(n){const{span:e,engine:t}=Ec(),{tabs:r,currentTab:i,currentGroup:o,model:s,searchKey:a,searchResult:u}=d3(),l=p=>{const h=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;h&&h.setDragging(p)},c=()=>{const p=t.skeleton?.getWidget("Designer")?.widgetRef?.designer;p&&p.setDragging(null)};return(p,h)=>(b(),$(d(he),{class:"v-components-widget",title:"组件库",body:{flex:!0,direction:"column"}},{default:k(()=>[ae("div",G3,[x(d(Xe),{modelValue:d(a),"onUpdate:modelValue":h[0]||(h[0]=f=>ui(a)?a.value=f:null),placeholder:"搜索组件",clearable:"",size:"small"},{prefix:k(()=>[x(d(Cu))]),_:1},8,["modelValue"])]),d(a)?(b(),G("div",Y3,[x(d(pi),{wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(d(u),f=>(b(),$(d(di),{span:d(e),key:f.name},{default:k(()=>[x(d(Li),{name:f.name,title:f.label||f.name,draggable:"",onDragstart:m=>l(f),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:1}),d(u).length?N("",!0):(b(),$(d(Ee),{key:0}))])):(b(),$(d(pc),{key:1,items:d(r),modelValue:d(i),"onUpdate:modelValue":h[2]||(h[2]=f=>ui(i)?i.value=f:null)},{default:k(()=>[ae("div",Z3,[d(o)?(b(),$(d(Zc),{key:0,modelValue:d(s)[d(i)],"onUpdate:modelValue":h[1]||(h[1]=f=>d(s)[d(i)]=f)},{default:k(()=>[(b(!0),G(re,null,oe(d(o).children,f=>(b(),$(d(Xc),{key:f.name,name:f.name,title:`${f.label} (${f.count})`},{default:k(()=>[f.components?(b(),$(d(pi),{key:0,wrap:"wrap",gutter:5},{default:k(()=>[(b(!0),G(re,null,oe(f.components,m=>(b(),$(d(di),{span:d(e),key:m.name},{default:k(()=>[x(d(Li),{name:m.name,title:m.label||m.name,draggable:"",onDragstart:v=>l(m),onDragend:c},null,8,["name","title","onDragstart"])]),_:2},1032,["span"]))),128))]),_:2},1024)):N("",!0)]),_:2},1032,["name","title"]))),128))]),_:1},8,["modelValue"])):N("",!0)])]),_:1},8,["items","modelValue"]))]),_:1}))}}),Q3=B({name:"OutlineWidget",__name:"index",setup(n){const{engine:e,designer:t,selected:r}=vt(),{current:i}=Ie(),o=I([]),s=j=>{if(Se(j))return j.locked?["unlock"]:["lock"];const _=j.parent;return _&&(_.locked||_.invisible)?[]:i.value?.locked?[]:j.locked?["unlock"]:j.invisible?["visible"]:["lock","invisible","copy","remove"]},a=j=>{const _=[];return j.forEach(V=>{const D={id:V.id,label:V.name,type:V.id,model:V};Array.isArray(V.children)&&(D.children=a(V.children)),_.push(D)}),_},u=()=>{if(!i.value)return[];const{id:j,name:_,nodes:V}=i.value;return[{id:j,label:_,type:j,model:i.value,children:a(V)}]},l=async()=>{o.value=u(),r.value?.model&&(await ct(),t.value?.setSelected(r.value.model))},c=O(()=>r.value?.model.id),p=j=>{const _=j.data;if(Se(_.model)||_.model.locked||_.model.name==="template")return!1;const V=e.assets.componentMap.get(_.model.name);return V?(t.value?.setDragging(V),!0):!1},h=async(j,_,V)=>{const D=_.data,Y={prev:"top",next:"bottom",inner:"inner"}[V];let C=!1;if(Se(D.model))C=V==="inner",t.value?.setDropping(C?D.model:null,"inner");else{const A=D.model;C=!!await t.value?.allowDrop(A,Y),t.value?.setDropping(C?A:null,"inner")}return C},f=j=>{const _=j?.model;!_||_.invisible||(t.value?.setSelected(_),t.value?.setHover(null))},m=async(j,_,V)=>{const D=j.data,Y=_.data;if(Se(Y.model)){t.value?.setDropping(null),t.value?.setDragging(null);return}const C=Y.model,A={before:"left",after:"right"}[V]||"inner";if(!await t.value?.allowDrop(C,A)){t.value?.setDropping(null),l(),Zi.warning({message:`${D.model.name}不能放置到该位置`}),t.value?.setDragging(null);return}const P=await t.value?.getDropSlot(V==="inner"?C:C.parent);if(P!==null){const T=D.model;T.slot=P,i.value?.move(T,C,A)}else l();t.value?.setDropping(null),t.value?.setDragging(null),e.simulator.refresh()},v=j=>{Se(j.model)?t.value?.setHover(j.model):(t.value?.setHover(j.model),j.model.invisible&&t.value?.setHover(null),j.model.name==="slot"&&t.value?.setHover(null))},g=()=>{t.value?.setHover(null)},S=j=>{const _=j.data;_.dragging=!0;const V=e.assets.componentMap.get(_.model.name);V&&t.value?.setDragging(V)},y=async j=>{const _=j.data;_.dragging=!1},w=(j,_)=>{j&&((j.id===_.id||!Se(j)&&_.isChild(j))&&t.value?.setSelected(null),t.value?.setHover(null))},E=j=>{const{name:_,modelValue:V}=j,D=r.value?.model;switch(_){case"lock":w(D,V),V.lock();break;case"unlock":w(D,V),V.unlock();break;case"invisible":w(D,V),V.setVisible(!1);break;case"visible":V.setVisible(!0);break;case"copy":const Y=i.value?.cloneNode(V);Y&&t.value?.setSelected(Y);break;case"remove":w(D,V),i.value?.removeNode(V);break}};return ve(e.changed,l,{immediate:!0}),(j,_)=>(b(),$(d(he),{class:"v-outline-widget",title:"大纲树"},{default:k(()=>[(b(),$(d(Yi),{key:d(e).changed.value,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":h,"allow-drag":p,onCurrentChange:f,onNodeDrop:m,onNodeDragStart:S,onNodeDragEnd:y},{default:k(({data:V,node:D})=>[x(d(Oe),{class:be(["v-outline-widget__item",{"is-locked":V.model.locked,"is-invisible":V.model.invisible,"is-dragging":V.dragging}]),active:!V.model.invisible&&D.isCurrent,grow:"",small:"",background:"",hover:"","model-value":V.model,icon:V.model.locked?d(yo):V.model.invisible?d(xo):void 0,title:V.label,subtitle:V.type,actions:s(V.model),onAction:E,onMouseenter:Y=>v(V),onMouseleave:g},null,8,["class","active","model-value","icon","title","subtitle","actions","onMouseenter"])]),_:1},8,["data","current-node-key"]))]),_:1}))}}),ew=B({name:"HistoryWidget",__name:"index",setup(n){const{history:e,load:t,total:r}=$c(),i=O(()=>`(共 ${r.value} 条)`),o=a=>{a.name==="remove"&&e.value?.remove(a.modelValue.id)},s=async()=>{await fn("确定要清空历史记录吗?")&&e.value?.clear()};return(a,u)=>(b(),$(d(he),{class:"v-history-widget",title:"历史记录",subtitle:i.value,remove:!!d(r),onRemove:s},{default:k(()=>[d(r)===0?(b(),$(d(Ee),{key:0,"image-size":50})):N("",!0),d(e)?(b(!0),G(re,{key:1},oe(d(e).items,(l,c)=>(b(),$(d(Oe),{index:c+1,title:l.label,"model-value":l,active:c==d(e).index,small:"",background:"",actions:["remove"],onAction:o,onClick:p=>d(t)(l.id)},null,8,["index","title","model-value","active","onClick"]))),256)):N("",!0)]),_:1},8,["subtitle","remove"]))}}),ke=Mc({loader:()=>Tc(()=>import("./Editor-ctkAn2cu-O6Vp28_y.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),loadingComponent:B({render(){return Ae("div","正在拼命加载...")}}),errorComponent:B({render(){return Ae("div","组件加载失败!")}})}),tw=B({name:"ApisWidget",__name:"index",setup(n){const e=I(!1),t=I(null),r=I(!1),i=O(()=>r.value?"编辑API":"新增API"),o=O(()=>s.value?.apis||[]),{project:s}=Fr(),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=n3.map(g=>({label:g,value:g.toLowerCase()})),c={get:"success",post:"primary",put:"warning",delete:"danger",patch:"warning",jsonp:"info"},p=[{label:"表单",value:"form"},{label:"JSON",value:"json"},{label:"文件",value:"data"}],h=(g,S,y)=>{Te({type:"JSExpression",value:S},window)?y():y(new Error("代码错误"))},f=g=>{g.name==="edit"&&m(g.modelValue),g.name==="remove"&&s.value?.removeApi(g.modelValue.name)},m=g=>{r.value=!0,t.value=zn(g),e.value=!0},v=async g=>s.value?.existApiName(g.name,r.value?[g.id]:[])?(Ve(`API名称 [ ${g.name} ] 已存在`),!1):(s.value?.setApi(g),!0);return(g,S)=>(b(),$(d(he),{class:"v-apis-widget",title:"API管理",plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(o.value,y=>(b(),$(d(Oe),{key:y.id,small:"",title:y.name,subtitle:y.label,"model-value":y,tag:y.method?.toUpperCase(),"tag-type":c[y.method||"get"],background:"",actions:["edit","remove"],onClick:w=>m(y),onAction:f},null,8,["title","subtitle","model-value","tag","tag-type","onClick"]))),128)),o.value.length===0?(b(),$(d(Ee),{key:0,"image-size":50})):N("",!0),x(d(at),{modelValue:e.value,"onUpdate:modelValue":S[1]||(S[1]=y=>e.value=y),model:t.value,title:i.value,width:"1000px",height:"600px","form-props":{labelPosition:"top",tooltipMessage:!1,size:"default"},"submit-method":v},{default:k(()=>[x(d(ue),{gap:"",fit:""},{default:k(()=>[x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[x(d(Q),{name:"method",label:"请求类型",required:"",editor:"radio",options:d(l),props:{button:!0}},null,8,["options"]),x(d(Q),{name:"name",label:"接口名称",required:"",rules:{pattern:d(mt),message:"名称格式不正确"}},null,8,["rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"url",label:"接口URL",required:""})]),_:1}),x(d(ue),{direction:"column",grow:"",width:"50%",shrink:""},{default:k(()=>[t.value.method!=="jsonp"?(b(),$(d(he),{key:0,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(ue),{justify:"space-around"},{default:k(()=>[x(d(Q),{name:"settings.loading",size:"small",label:"加载提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.failMessage",label:"失败提示",editor:"switch"}),x(d(Q),{size:"small",name:"settings.validSuccess",label:"校验成功",editor:"switch"}),x(d(Q),{size:"small",name:"settings.originResponse",label:"原始响应",editor:"switch"}),x(d(Q),{size:"small",name:"settings.injectHeaders",label:"注入请求头",editor:"switch"})]),_:1}),x(d(Q),{size:"small",name:"settings.type",label:"发送数据类型",editor:"radio",options:p,props:{button:!0}}),x(d(Q),{size:"small",name:"settings.headers.value",label:"请求头配置",tip:"支持 JSExpression 或 JSFunction",rules:{validator:h}},{editor:k(()=>[x(d(ke),{modelValue:t.value.settings.headers.value,"onUpdate:modelValue":S[0]||(S[0]=y=>t.value.settings.headers.value=y),dark:"",height:"200px"},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["subtitle"])):N("",!0),t.value.method==="jsonp"?(b(),$(d(he),{key:1,title:"请求配置",subtitle:t.value.method,border:""},{default:k(()=>[x(d(Q),{name:"jsonpOptions.jsonpCallback",size:"small",label:"jsonpCallback"}),x(d(Q),{name:"jsonpOptions.jsonpCallbackFunction",size:"small",label:"jsonpCallbackFunction"}),x(d(Q),{name:"jsonpOptions.timeout",size:"small",label:"timeout",editor:"number"}),x(d(Q),{name:"jsonpOptions.crossorigin",size:"small",label:"crossorigin",editor:"switch"})]),_:1},8,["subtitle"])):N("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue","model","title"])]),_:1}))}}),nw=B({name:"DepsWidget",__name:"index",setup(n){const{dependencies:e,engine:t}=kc(),r=I(!1),i=I(!1),o=I({}),s=O(()=>i.value?"查看依赖":o.value?"编辑依赖":"新增依赖"),a=m=>m.required||m.official?[]:["edit","remove"],u=m=>m.official&&!m.required,l=async m=>(m.urls=m.urls.split(`
75
81
  `),t.project.value?.setDeps(m),!0),c=m=>{t.project.value?.setDeps(m)},p=()=>{i.value=!1,r.value=!0,o.value=null},h=m=>{i.value=!0,o.value={...m,urls:m.urls.join(`
76
82
  `)},r.value=!0},f=(m,v)=>{v.name==="edit"&&(o.value={...m,urls:m.urls.join(`
77
- `)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(m)};return(m,v)=>(b(),$(d(he),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:p},{default:k(()=>[(b(!0),G(re,null,oe(d(e),g=>(b(),$(d(Oe),{key:g.package,title:g.package,subtitle:g.version,actions:a(g),background:"",switch:u(g),modelValue:g.enabled,"onUpdate:modelValue":S=>g.enabled=S,onSwitch:S=>c(g),onClick:S=>h(g),onAction:S=>f(g,S)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),x(d(at),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),width:"600px",height:"500px",title:s.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:k(()=>[x(d(Q),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),x(d(Q),{name:"version",label:"版本",required:""}),x(d(Q),{name:"library",label:"导出名称",required:""}),x(d(Q),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),x(d(Q),{name:"assetsUrl",label:"物料URL"}),x(d(Q),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),Q3=B({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>t.model.name),o=O(()=>!Se(t.model)&&!t.model.locked),s=O(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),a=[{name:"prev",icon:yu,title:"向前移动"},{name:"next",icon:gu,title:"向后移动"},{name:"copy",icon:ho,title:"复制"},{name:"remove",icon:Pn,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await fn("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,p)=>(b(),G("div",{class:be(["v-actions",[`is-${t.position}`]])},[x(d(Le),{mode:"icon",size:"small",icon:d(mo),label:i.value,menus:s.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),x(d($b),{disabled:!o.value,mode:"icon",size:"small",items:a,background:"none",onClick:l},null,8,["disabled"])],2))}}),ew={key:1,class:"v-designer__placeholder"},tw=B({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=I(),r=I(),{width:i,height:o}=Yi(t),{dependencies:s,engine:a}=wc(),{current:u,isEmpty:l}=Ie(),c=O(()=>a.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:p,hover:h,dropping:f,selected:m}=l3(r,s),v=g=>{const S=g.type,y=g.model;if(u.value)switch(S){case"remove":u.value.removeNode(y),p.value?.setSelected(null);break;case"copy":const w=u.value.cloneNode(y);p.value?.setSelected(w);break;case"prev":u.value.movePrev(y),p.value?.setSelected(y);break;case"next":u.value.moveNext(y),p.value?.setSelected(y);break;case"hover":p.value?.setHover(y);break;case"selected":p.value?.setSelected(y);break}};return e({designer:p,mode:c}),(g,S)=>(b(),G("div",{ref_key:"container",ref:t,class:"v-designer"},[x(d(jc),{mode:c.value,width:d(i),height:d(o)},{default:k(()=>[ae("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),d(f)?(b(),G("div",{key:0,class:be(["v-designer__dropping","is-inner"]),style:kt(d(f).style)},null,4)):N("",!0),d(h)?(b(),G("div",{key:1,class:"v-designer__hover",style:kt(d(h).style)},[ae("span",{class:be(`is-${d(h).position}`)},[de(ne(d(h).model.name)+": ",1),ae("i",null,ne(d(h).model.id),1)],2)],4)):N("",!0),d(m)?(b(),G("div",{key:2,class:"v-designer__selected",style:kt(d(m).style)},[x(Q3,{position:d(m).position,model:d(m).model,path:d(m).path,onAction:v},null,8,["position","model","path"])],4)):N("",!0)]),_:1},8,["mode","width","height"]),d(u)?N("",!0):(b(),$(d(Ee),{key:0,description:"请新建或打开文件"})),d(u)&&d(l)?(b(),G("div",ew," 您可以拖拽组件放置到这里 ")):N("",!0)],512))}}),Ln=B({__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=I(),r=I(),i=I(!1),o=I(e.createEmpty()),s=I(!1),a=O(()=>s.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{s.value=!1,o.value=e.createEmpty(),i.value=!0},l=(m,v)=>{switch(v.name){case"edit":p(m);break;case"remove":e.remove(m);break}},c=m=>{o.value.value=m},p=m=>{s.value=!0,o.value={...m},i.value=!0},h=async m=>e.submit(m,s.value),f=()=>{r.value?.itemRef.validate()};return(m,v)=>(b(),$(d(he),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(m.list,g=>(b(),$(d(Oe),{title:e.itemTitle(g),border:"",actions:["edit","remove"],onAction:S=>l(g,S),onClick:S=>p(g)},null,8,["title","onAction","onClick"]))),256)),m.list.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":40})),x(d(Vo),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=g=>i.value=g),title:a.value,"submit-method":h,model:o.value,block:m.current,context:m.context,onPick:c},{default:k(()=>[se(m.$slots,"fields",dt($t({model:o.value,isEdit:s.value,nameLabel:m.nameLabel,valueLabel:m.valueLabel})),()=>[x(d(Q),{name:"name",label:m.nameLabel,required:"",disabled:s.value},null,8,["label","disabled"]),x(d(Q),{ref_key:"codeFieldRef",ref:r,name:"value",label:m.valueLabel,required:""},{editor:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=g=>o.value.value=g),onBlur:f},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),nw=B({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.state||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Te(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(s,a)=>(b(),$(Ln,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),rw=B({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.computed||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(s,a)=>(b(),$(Ln,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),iw=B({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.methods||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(s,a)=>(b(),$(Ln,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),ow=B({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Qb.map(a=>({label:a,value:a}))),r=O(()=>Object.entries(e.current?.lifeCycles||{}).map(([a,u])=>({name:a,value:an(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 Ve(`名称 ${l} 已存在,请更换!`),!1;const p={type:"JSFunction",value:c};return Te(p,e.context,!0)?(e.current?.setFunction("lifeCycles",l,p),!0):!1};return(a,u)=>(b(),$(Ln,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:s},{fields:k(({model:l,nameLabel:c,isEdit:p,valueLabel:h})=>[x(d(Q),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:p},null,8,["label","options","disabled"]),x(d(Q),{name:"value",label:h,required:""},{editor:k(()=>[x(d(ke),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":f=>l.value=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),sw=B({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>(e.current?.watch||[]).map(a=>({...a,source:an(a.source),handler:an(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(!Te(l,e.context,!0)||!Te(c,e.context,!0))return!1;const p={...a,source:l,handler:c};return e.current?.setWatch(p),!0};return(a,u)=>(b(),$(Ln,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:s,itemTitle:i,grow:""},{fields:k(({model:l,nameLabel:c,valueLabel:p})=>[x(d(Q),{name:"source",label:c,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":h=>l.source=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),x(d(Q),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":h=>l.deep=h,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":h=>l.immediate=h,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"handler",label:p,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":h=>l.handler=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),aw=B({__name:"index",setup(n){const{current:e,context:t}=Ie();return(r,i)=>(b(),$(d(ue),{class:"v-scripts-widget",direction:"column",fit:""},{default:k(()=>[x(nw,{current:d(e),context:d(t)},null,8,["current","context"]),x(rw,{current:d(e),context:d(t)},null,8,["current","context"]),x(iw,{current:d(e),context:d(t)},null,8,["current","context"]),x(ow,{current:d(e),context:d(t)},null,8,["current","context"]),x(sw,{current:d(e),context:d(t)},null,8,["current","context"])]),_:1}))}}),si=B({__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)=>(b(),$(d(he),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:a[0]||(a[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[(b(!0),G(re,null,oe(t.items,u=>(b(),$(d(wt),ye(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"]))}}),lw=B({__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=mt(),{node:i,commonProps:o,change:s,componentProps:a,customProps:u,addCustom:l,removeCustom:c,isExist:p}=p3(r),h=I(!1),f=I(),m=()=>{h.value=!0,f.value={name:""}},v=async S=>{const y=Object.keys(i.value?.props||{});return!p(S.name)&&!y.includes(S.name)?(l(S.name),!0):(Ve("已存在该属性名称"),!1)},g=async S=>{await fn("确定删除?")&&c(S)};return(S,y)=>d(e)?(b(),$(d(ue),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:k(()=>[d(i)?(b(),$(si,{key:0,title:"通用属性",current:d(e),context:d(t),node:d(i),items:d(o),onChange:d(s)},null,8,["current","context","node","items","onChange"])):N("",!0),d(i)?(b(),$(si,{key:1,title:"组件属性",current:d(e),context:d(t),node:d(i),items:d(a),onChange:d(s)},null,8,["current","context","node","items","onChange"])):N("",!0),d(i)?(b(),$(si,{key:2,title:"自定义属性",current:d(e),context:d(t),node:d(i),items:d(u),onChange:d(s),removable:"",plus:"",grow:"",onPlus:m,onRemove:g},null,8,["current","context","node","items","onChange"])):N("",!0),x(d(at),{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=w=>h.value=w),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:f.value},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):N("",!0)}}),uw=B({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=I(),r=zt({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,s)=>(b(),$(d(Vo),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:k(()=>[x(d(Q),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:k(()=>[x(d(ke),{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"]))}}),cw=B({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=I(),r=zt({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=Q6.map(s=>({label:s,value:s})),o=s=>{t.value.getEditor().setValue(s),r.handler.value=s};return(s,a)=>(b(),$(d(Vo),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:k(()=>[x(d(Q),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:d(i)},null,8,["options"]),x(d(Q),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:k(()=>[x(d(ke),{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"]))}}),dw=B({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=mt(),{mouseEventList:i,keyboardEventList:o,componentEventList:s}=h3(r),a=I({name:"",event:void 0}),u=I(!1),l=m=>{a.value=Mn(m),u.value=!0},c=async m=>{const v={...m,modifiers:m.modifiers.reduce((g,S)=>(g[S]=!0,g),{})};return Te(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},p=async m=>{const v=r.value?.model;m.name&&(v.removeEvent(m.name),u.value=!1)},h=async()=>{a.value.name&&await fn("确定要删除该事件吗?")&&p(a.value)},f=m=>{const{name:v,modelValue:g}=m;v==="edit"&&l(g),v==="remove"&&p(g)};return(m,v)=>(b(),$(d(ue),{class:"v-events-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[d(s).length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50,description:"该组件无自带事件"})),(b(!0),G(re,null,oe(d(s),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(i),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(o),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),u.value?(b(),$(d(cw),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=g=>u.value=g),context:d(t),current:d(e),name:a.value.name,event:a.value.event,submitMethod:c,onUnbind:h},null,8,["modelValue","context","current","name","event"])):N("",!0)]),_:1}))}}),pw=B({name:"CssWidget",__name:"index",setup(n){const{current:e}=Ie(),t=I(),r=O(()=>e.value?.css||""),i=s=>{e.value?.setCss(s)},o=()=>{const s=(t.value?.getEditor()).getValue();i(s),Fe("保存成功")};return(s,a)=>(b(),$(d(he),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),hw=B({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=mt(),{vIf:i,vShow:o,vBind:s,vFor:a,vModels:u,onValueChange:l,onForChange:c,onModelChange:p}=g3(r),h=f=>f.arg?typeof f.arg=="string"?f.arg:Ct(f.arg,{}):"modelValue";return(f,m)=>(b(),$(d(ue),{class:"v-directives-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[0]||(m[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(wt),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(i).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(wt),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(o).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(wt),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(s).value,onChange:d(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[1]||(m[1]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(wt),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(a).value,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(wt),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:d(e),context:d(t),value:d(a).iterator?.item,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(wt),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:d(e),context:d(t),value:d(a).iterator?.index,onChange:d(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:k(()=>[(b(!0),G(re,null,oe(d(u),(v,g)=>(b(),$(d(he),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${h(v)}`,body:{grow:!1},fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"60px",onKeydown:m[2]||(m[2]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(wt),{name:g.toString(),label:"绑定变量",setters:"ExpressionSetter",current:d(e),context:d(t),value:v.value,onChange:d(p)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),d(u).length?N("",!0):(b(),$(d(Ee),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),fw=B({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义属性":"新增定义属性"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys(lc).map(s=>({label:s,value:s})),o=async s=>{const a=s.default;return a&&!Te(a,e.context,!0)?!1:(e.current.setProp(s),!0)};return(s,a)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["disabled","rules"]),x(d(Q),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:d(i),required:""},null,8,["options"]),x(d(Q),{name:"required",label:"必须",editor:"switch"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{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"]))}}),mw=B({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义事件":"新增定义事件"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),vw=B({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),gw=B({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑注入":"新增注入"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const s=o.default;return s&&!Te(s,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,s)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["disabled","rules"]),x(d(Q),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{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"]))}}),yw=B({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),r=O(()=>(e.value?.props||[]).map(A=>typeof A=="string"?{name:A}:A)),i=O(()=>e.value?.emits||[]),o=O(()=>e.value?.slots||[]),s=O(()=>e.value?.inject||[]),a=I(!1),u=I(),l=I(!1),c=I(),p=I(!1),h=I(),f=I(!1),m=I(),v=()=>{u.value=void 0,a.value=!0},g=A=>{const{name:P,modelValue:T}=A;P==="edit"&&S(T),P==="remove"&&e.value?.removeProp(T)},S=A=>{u.value=A,a.value=!0},y=()=>{c.value=void 0,l.value=!0},w=A=>{c.value=A,l.value=!0},E=A=>{const{name:P,modelValue:T}=A;P==="edit"&&w(T),P==="remove"&&e.value?.removeEmit(T)},j=()=>{h.value=void 0,p.value=!0},_=A=>{h.value=A,p.value=!0},V=A=>{const{name:P,modelValue:T}=A;P==="edit"&&_(T),P==="remove"&&e.value?.removeSlot(T)},D=()=>{m.value=void 0,f.value=!0},Y=A=>{m.value=A,f.value=!0},C=A=>{const{name:P,modelValue:T}=A;P==="edit"&&Y(T),P==="remove"&&e.value?.removeInject(T)};return(A,P)=>d(e)&&d(t)?(b(),$(d(ue),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:k(()=>[(b(!0),G(re,null,oe(r.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["edit","remove"],onClick:K=>S(T),onAction:g},null,8,["model-value","title","onClick"]))),256)),r.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),a.value?(b(),$(fw,{key:1,current:d(e),context:d(t),modelValue:a.value,"onUpdate:modelValue":P[0]||(P[0]=T=>a.value=T),item:u.value},null,8,["current","context","modelValue","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:y},{default:k(()=>[(b(!0),G(re,null,oe(i.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>w(T),onAction:E},null,8,["model-value","title","onClick"]))),256)),i.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),l.value?(b(),$(mw,{key:1,modelValue:l.value,"onUpdate:modelValue":P[1]||(P[1]=T=>l.value=T),current:d(e),context:d(t),item:c.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:j},{default:k(()=>[(b(!0),G(re,null,oe(o.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>_(T),onAction:V},null,8,["model-value","title","onClick"]))),256)),o.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),p.value?(b(),$(vw,{key:1,modelValue:p.value,"onUpdate:modelValue":P[2]||(P[2]=T=>p.value=T),current:d(e),context:d(t),item:h.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:D},{default:k(()=>[(b(!0),G(re,null,oe(s.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["remove"],onClick:K=>Y(T),onAction:C},null,8,["model-value","title","onClick"]))),256)),s.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),f.value?(b(),$(gw,{key:1,modelValue:f.value,"onUpdate:modelValue":P[3]||(P[3]=T=>f.value=T),current:d(e),context:d(t),item:m.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1})]),_:1})):N("",!0)}}),bw=B({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=y3(),r=I(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {
83
+ `)},i.value=!1,r.value=!0),v.name==="remove"&&t.project.value?.removeDeps(m)};return(m,v)=>(b(),$(d(he),{class:"v-deps-widget",title:"依赖管理",plus:"",onPlus:p},{default:k(()=>[(b(!0),G(re,null,oe(d(e),g=>(b(),$(d(Oe),{key:g.package,title:g.package,subtitle:g.version,actions:a(g),background:"",switch:u(g),modelValue:g.enabled,"onUpdate:modelValue":S=>g.enabled=S,onSwitch:S=>c(g),onClick:S=>h(g),onAction:S=>f(g,S)},null,8,["title","subtitle","actions","switch","modelValue","onUpdate:modelValue","onSwitch","onClick","onAction"]))),128)),x(d(at),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=g=>r.value=g),width:"600px",height:"500px",title:s.value,model:o.value,submitMethod:l,formProps:{disabled:i.value,tooltipMessage:!1}},{default:k(()=>[x(d(Q),{name:"package",label:"包名",required:"",disabled:!!o.value},null,8,["disabled"]),x(d(Q),{name:"version",label:"版本",required:""}),x(d(Q),{name:"library",label:"导出名称",required:""}),x(d(Q),{name:"urls",label:"资源文件",editor:"textarea",props:{rows:3},tip:"多个资源可以换行输入",required:""}),x(d(Q),{name:"assetsUrl",label:"物料URL"}),x(d(Q),{name:"assetsLibrary",label:"物料名称"})]),_:1},8,["modelValue","title","model","formProps"])]),_:1}))}}),rw=B({__name:"actions",props:{position:{},model:{},path:{default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>t.model.name),o=O(()=>!Se(t.model)&&!t.model.locked),s=O(()=>t.path.map(c=>({command:c,label:c.name,onMouseenter:()=>{r("action",{type:"hover",model:c})}}))),a=[{name:"prev",icon:_u,title:"向前移动"},{name:"next",icon:wu,title:"向后移动"},{name:"copy",icon:go,title:"复制"},{name:"remove",icon:Nn,title:"删除"}],u=c=>{r("action",{type:"selected",model:c.command})},l=async c=>{c.name==="remove"?await fn("确定删除?")&&r("action",{type:c.name,model:t.model}):r("action",{type:c.name,model:t.model})};return(c,p)=>(b(),G("div",{class:be(["v-actions",[`is-${t.position}`]])},[x(d(Le),{mode:"icon",size:"small",icon:d(bo),label:i.value,menus:s.value,background:"none",onCommand:u},null,8,["icon","label","menus"]),x(d(Ob),{disabled:!o.value,mode:"icon",size:"small",items:a,background:"none",onClick:l},null,8,["disabled"])],2))}}),iw={key:1,class:"v-designer__placeholder"},ow=B({name:"VDesigner",inheritAttrs:!1,__name:"index",setup(n,{expose:e}){const t=I(),r=I(),{width:i,height:o}=eo(t),{dependencies:s,engine:a}=kc(),{current:u,isEmpty:l}=Ie(),c=O(()=>a.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc"),{designer:p,hover:h,dropping:f,selected:m}=p3(r,s),v=g=>{const S=g.type,y=g.model;if(u.value)switch(S){case"remove":u.value.removeNode(y),p.value?.setSelected(null);break;case"copy":const w=u.value.cloneNode(y);p.value?.setSelected(w);break;case"prev":u.value.movePrev(y),p.value?.setSelected(y);break;case"next":u.value.moveNext(y),p.value?.setSelected(y);break;case"hover":p.value?.setHover(y);break;case"selected":p.value?.setSelected(y);break}};return e({designer:p,mode:c}),(g,S)=>(b(),G("div",{ref_key:"container",ref:t,class:"v-designer"},[x(d(Cc),{mode:c.value,width:d(i),height:d(o)},{default:k(()=>[ae("iframe",{ref_key:"iframe",ref:r,frameborder:"0"},null,512),d(f)?(b(),G("div",{key:0,class:be(["v-designer__dropping","is-inner"]),style:kt(d(f).style)},null,4)):N("",!0),d(h)?(b(),G("div",{key:1,class:"v-designer__hover",style:kt(d(h).style)},[ae("span",{class:be(`is-${d(h).position}`)},[de(ne(d(h).model.name)+": ",1),ae("i",null,ne(d(h).model.id),1)],2)],4)):N("",!0),d(m)?(b(),G("div",{key:2,class:"v-designer__selected",style:kt(d(m).style)},[x(rw,{position:d(m).position,model:d(m).model,path:d(m).path,onAction:v},null,8,["position","model","path"])],4)):N("",!0)]),_:1},8,["mode","width","height"]),d(u)?N("",!0):(b(),$(d(Ee),{key:0,description:"请新建或打开文件"})),d(u)&&d(l)?(b(),G("div",iw," 您可以拖拽组件放置到这里 ")):N("",!0)],512))}}),Un=B({__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=I(),r=I(),i=I(!1),o=I(e.createEmpty()),s=I(!1),a=O(()=>s.value?`编辑${e.title}`:`新增${e.title}`),u=()=>{s.value=!1,o.value=e.createEmpty(),i.value=!0},l=(m,v)=>{switch(v.name){case"edit":p(m);break;case"remove":e.remove(m);break}},c=m=>{o.value.value=m},p=m=>{s.value=!0,o.value={...m},i.value=!0},h=async m=>e.submit(m,s.value),f=()=>{r.value?.itemRef.validate()};return(m,v)=>(b(),$(d(he),{title:e.title,class:"v-sub-panel",size:"small",fit:!1,plus:"",onPlus:u},{default:k(()=>[(b(!0),G(re,null,oe(m.list,g=>(b(),$(d(Oe),{title:e.itemTitle(g),border:"",actions:["edit","remove"],onAction:S=>l(g,S),onClick:S=>p(g)},null,8,["title","onAction","onClick"]))),256)),m.list.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":40})),x(d(To),{modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=g=>i.value=g),title:a.value,"submit-method":h,model:o.value,block:m.current,context:m.context,onPick:c},{default:k(()=>[se(m.$slots,"fields",pt($t({model:o.value,isEdit:s.value,nameLabel:m.nameLabel,valueLabel:m.valueLabel})),()=>[x(d(Q),{name:"name",label:m.nameLabel,required:"",disabled:s.value},null,8,["label","disabled"]),x(d(Q),{ref_key:"codeFieldRef",ref:r,name:"value",label:m.valueLabel,required:""},{editor:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,dark:"",height:"350px",modelValue:o.value.value,"onUpdate:modelValue":v[0]||(v[0]=g=>o.value.value=g),onBlur:f},null,8,["modelValue"])]),_:1},8,["label"])])]),_:3},8,["modelValue","title","model","block","context"])]),_:3},8,["title"]))}}),sw=B({__name:"state",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.state||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSExpression",value:l};return Te(c,e.context,!0)?(e.current?.setState(u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"状态数据",current:e.current,context:e.context,list:t.value,nameLabel:"状态数据名称",valueLabel:"状态初始值 [ JSExpression ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),aw=B({__name:"computed",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.computed||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("computed",u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"计算属性",current:e.current,context:e.context,list:t.value,nameLabel:"计算属性名称",valueLabel:"计算函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),lw=B({__name:"methods",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>Object.entries(e.current?.methods||{}).map(([s,a])=>({name:s,value:an(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 Ve(`名称 ${u} 已存在,请更换!`),!1;const c={type:"JSFunction",value:l};return Te(c,e.context,!0)?(e.current?.setFunction("methods",u,c),!0):!1};return(s,a)=>(b(),$(Un,{title:"组件方法",current:e.current,context:e.context,list:t.value,nameLabel:"方法名称",valueLabel:"方法函数 [ JSFunction ]",createEmpty:r,remove:i,submit:o},null,8,["current","context","list"]))}}),uw=B({__name:"lifeCycles",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>r6.map(a=>({label:a,value:a}))),r=O(()=>Object.entries(e.current?.lifeCycles||{}).map(([a,u])=>({name:a,value:an(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 Ve(`名称 ${l} 已存在,请更换!`),!1;const p={type:"JSFunction",value:c};return Te(p,e.context,!0)?(e.current?.setFunction("lifeCycles",l,p),!0):!1};return(a,u)=>(b(),$(Un,{title:"生命周期",current:e.current,context:e.context,list:r.value,nameLabel:"名称",valueLabel:"函数 [ JSFunction ]",createEmpty:i,remove:o,submit:s},{fields:k(({model:l,nameLabel:c,isEdit:p,valueLabel:h})=>[x(d(Q),{name:"name",label:c,editor:"select",options:t.value,required:"",disabled:p},null,8,["label","options","disabled"]),x(d(Q),{name:"value",label:h,required:""},{editor:k(()=>[x(d(ke),{ref:"editorRef",dark:"",height:"350px",modelValue:l.value,"onUpdate:modelValue":f=>l.value=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),cw=B({__name:"watch",props:{context:{},current:{}},setup(n){const e=n,t=O(()=>(e.current?.watch||[]).map(a=>({...a,source:an(a.source),handler:an(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(!Te(l,e.context,!0)||!Te(c,e.context,!0))return!1;const p={...a,source:l,handler:c};return e.current?.setWatch(p),!0};return(a,u)=>(b(),$(Un,{title:"侦听器",current:e.current,context:e.context,list:t.value,nameLabel:"侦听源 [ JSFunction ]",valueLabel:"处理函数 [ JSFunction ]",createEmpty:r,remove:o,submit:s,itemTitle:i,grow:""},{fields:k(({model:l,nameLabel:c,valueLabel:p})=>[x(d(Q),{name:"source",label:c,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"100px",modelValue:l.source,"onUpdate:modelValue":h=>l.source=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),x(d(Q),{name:"deep",modelValue:l.deep,"onUpdate:modelValue":h=>l.deep=h,label:"深度监听",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"immediate",modelValue:l.immediate,"onUpdate:modelValue":h=>l.immediate=h,label:"立即执行",editor:"switch"},null,8,["modelValue","onUpdate:modelValue"]),x(d(Q),{name:"handler",label:p,required:""},{editor:k(()=>[x(d(ke),{dark:"",height:"130px",modelValue:l.handler,"onUpdate:modelValue":h=>l.handler=h},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"])]),_:1},8,["current","context","list"]))}}),dw=B({__name:"index",setup(n){const{current:e,context:t}=Ie();return(r,i)=>(b(),$(d(ue),{class:"v-scripts-widget",direction:"column",fit:""},{default:k(()=>[x(sw,{current:d(e),context:d(t)},null,8,["current","context"]),x(aw,{current:d(e),context:d(t)},null,8,["current","context"]),x(lw,{current:d(e),context:d(t)},null,8,["current","context"]),x(uw,{current:d(e),context:d(t)},null,8,["current","context"]),x(cw,{current:d(e),context:d(t)},null,8,["current","context"])]),_:1}))}}),li=B({__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)=>(b(),$(d(he),{title:t.title,class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[x(d(kn),{class:"v-properties-widget__form",size:"small","label-width":"90px",onKeydown:a[0]||(a[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[(b(!0),G(re,null,oe(t.items,u=>(b(),$(d(_t),ye(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"]))}}),pw=B({name:"PropertiesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{node:i,commonProps:o,change:s,componentProps:a,customProps:u,addCustom:l,removeCustom:c,isExist:p}=v3(r),h=I(!1),f=I(),m=()=>{h.value=!0,f.value={name:""}},v=async S=>{const y=Object.keys(i.value?.props||{});return!p(S.name)&&!y.includes(S.name)?(l(S.name),!0):(Ve("已存在该属性名称"),!1)},g=async S=>{await fn("确定删除?")&&c(S)};return(S,y)=>d(e)?(b(),$(d(ue),{key:0,class:"v-properties-widget",direction:"column",fit:""},{default:k(()=>[d(i)?(b(),$(li,{key:0,title:"通用属性",current:d(e),context:d(t),node:d(i),items:d(o),onChange:d(s)},null,8,["current","context","node","items","onChange"])):N("",!0),d(i)?(b(),$(li,{key:1,title:"组件属性",current:d(e),context:d(t),node:d(i),items:d(a),onChange:d(s)},null,8,["current","context","node","items","onChange"])):N("",!0),d(i)?(b(),$(li,{key:2,title:"自定义属性",current:d(e),context:d(t),node:d(i),items:d(u),onChange:d(s),removable:"",plus:"",grow:"",onPlus:m,onRemove:g},null,8,["current","context","node","items","onChange"])):N("",!0),x(d(at),{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=w=>h.value=w),title:"新增自定义属性",width:"400px",height:"150px","submit-method":v,formProps:{tooltipMessage:!1},model:f.value},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["rules"])]),_:1},8,["modelValue","model"])]),_:1})):N("",!0)}}),hw=B({name:"VariableBinder",__name:"variable",props:{context:{},current:{},value:{}},setup(n){const e=n,t=I(),r=zt({type:"JSExpression",value:e.value}),i=o=>{t.value.getEditor().setValue(o),r.value=o};return(o,s)=>(b(),$(d(To),{title:"绑定变量","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:i},{default:k(()=>[x(d(Q),{name:"value",label:"绑定内容 [ JSExpression ]",required:""},{editor:k(()=>[x(d(ke),{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"]))}}),fw=B({name:"EventBinder",__name:"event",props:{context:{},current:{},name:{},event:{}},setup(n){const e=n,t=I(),r=zt({name:e.name,...e.event,modifiers:Object.keys(e.event?.modifiers||{}),handler:{type:"JSFunction",value:e.event?.handler?.value||"() => {}"}}),i=r3.map(s=>({label:s,value:s})),o=s=>{t.value.getEditor().setValue(s),r.handler.value=s};return(s,a)=>(b(),$(d(To),{title:"绑定事件","unbind-enabled":"",block:e.current,context:e.context,model:r,onPick:o},{default:k(()=>[x(d(Q),{name:"modifiers",label:"事件修饰符",editor:"checkbox",options:d(i)},null,8,["options"]),x(d(Q),{name:"handler.value",label:"事件处理函数 [ JSFunction ]",required:""},{editor:k(()=>[x(d(ke),{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"]))}}),mw=B({name:"EventsWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{mouseEventList:i,keyboardEventList:o,componentEventList:s}=g3(r),a=I({name:"",event:void 0}),u=I(!1),l=m=>{a.value=zn(m),u.value=!0},c=async m=>{const v={...m,modifiers:m.modifiers.reduce((g,S)=>(g[S]=!0,g),{})};return Te(v.handler,t.value,!0)?((r.value?.model).setEvent(v),!0):!1},p=async m=>{const v=r.value?.model;m.name&&(v.removeEvent(m.name),u.value=!1)},h=async()=>{a.value.name&&await fn("确定要删除该事件吗?")&&p(a.value)},f=m=>{const{name:v,modelValue:g}=m;v==="edit"&&l(g),v==="remove"&&p(g)};return(m,v)=>(b(),$(d(ue),{class:"v-events-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{title:"组件事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[d(s).length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50,description:"该组件无自带事件"})),(b(!0),G(re,null,oe(d(s),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"鼠标事件",class:"v-sub-panel",size:"small",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(i),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),x(d(he),{title:"键盘事件",class:"v-sub-panel",size:"small",grow:"",fit:!1},{default:k(()=>[(b(!0),G(re,null,oe(d(o),g=>(b(),$(d(Oe),{title:g.name,"model-value":g,border:"",small:"",actions:g.event?["edit","remove"]:["edit"],active:!!g.event,onClick:S=>l(g),onAction:f},null,8,["title","model-value","actions","active","onClick"]))),256))]),_:1}),u.value?(b(),$(d(fw),{key:0,modelValue:u.value,"onUpdate:modelValue":v[0]||(v[0]=g=>u.value=g),context:d(t),current:d(e),name:a.value.name,event:a.value.event,submitMethod:c,onUnbind:h},null,8,["modelValue","context","current","name","event"])):N("",!0)]),_:1}))}}),vw=B({name:"CssWidget",__name:"index",setup(n){const{current:e}=Ie(),t=I(),r=O(()=>e.value?.css||""),i=s=>{e.value?.setCss(s)},o=()=>{const s=(t.value?.getEditor()).getValue();i(s),Fe("保存成功")};return(s,a)=>(b(),$(d(he),{class:"v-css-widget v-sub-panel",title:"lang:css scoped",size:"small",fit:"",save:"",onSave:o},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"css",dark:"",onBlur:i},null,8,["model-value"])]),_:1}))}}),gw=B({name:"DirectivesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),{selected:r}=vt(),{vIf:i,vShow:o,vBind:s,vFor:a,vModels:u,onValueChange:l,onForChange:c,onModelChange:p}=_3(r),h=f=>f.arg?typeof f.arg=="string"?f.arg:Ct(f.arg,{}):"modelValue";return(f,m)=>(b(),$(d(ue),{class:"v-directives-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"内置指令",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[0]||(m[0]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:"vIf",label:"v-if",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(i).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"vShow",label:"v-show",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(o).value,onChange:d(l)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"vBind",label:"v-bind",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(s).value,onChange:d(l)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"循环",size:"small",fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"80px",onKeydown:m[1]||(m[1]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:"value",label:"循环数据",setters:"ExpressionSetter",current:d(e),context:d(t),value:d(a).value,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"item",label:"迭代变量名",setters:{name:"StringSetter",props:{placeholder:"item"}},current:d(e),context:d(t),value:d(a).iterator?.item,onChange:d(c)},null,8,["current","context","value","onChange"]),x(d(_t),{name:"index",label:"索引变量名",setters:{name:"StringSetter",props:{placeholder:"index"}},current:d(e),context:d(t),value:d(a).iterator?.index,onChange:d(c)},null,8,["current","context","value","onChange"])]),_:1})]),_:1}),x(d(he),{class:"v-sub-panel",title:"双向绑定",size:"small",fit:!1,grow:""},{default:k(()=>[(b(!0),G(re,null,oe(d(u),(v,g)=>(b(),$(d(he),{card:"",border:"",class:"v-sub-panel",size:"small",title:`v-model: ${h(v)}`,body:{grow:!1},fit:!1},{default:k(()=>[x(d(kn),{size:"small","label-width":"60px",onKeydown:m[2]||(m[2]=jn(Qt(()=>{},["prevent","stop"]),["enter"]))},{default:k(()=>[x(d(_t),{name:g.toString(),label:"绑定变量",setters:"ExpressionSetter",current:d(e),context:d(t),value:v.value,onChange:d(p)},null,8,["name","current","context","value","onChange"])]),_:2},1024)]),_:2},1032,["title"]))),256)),d(u).length?N("",!0):(b(),$(d(Ee),{key:0,description:"当前组件没有双向绑定属性","image-size":50}))]),_:1})]),_:1}))}}),yw=B({name:"DefinedPropsDialog",__name:"props",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义属性":"新增定义属性"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=Object.keys(hc).map(s=>({label:s,value:s})),o=async s=>{const a=s.default;return a&&!Te(a,e.context,!0)?!1:(e.current.setProp(s),!0)};return(s,a)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":o},{default:k(()=>[x(d(Q),{name:"name",label:"属性名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"]),x(d(Q),{name:"type",label:"数据类型",editor:"checkbox",props:{button:!0,size:"small"},options:d(i),required:""},null,8,["options"]),x(d(Q),{name:"required",label:"必须",editor:"switch"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{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"]))}}),bw=B({name:"DefinedEventsDialog",__name:"events",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义事件":"新增定义事件"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeEmit(e.item,!0),e.current.setEmit(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"事件名称",required:"",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),ww=B({name:"DefinedSlotsDialog",__name:"slots",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑定义插槽":"新增定义插槽"),r=I({name:e.item}),i=async o=>(e.item&&e.current.removeSlot(e.item,!0),e.current.setSlot(o.name),!0);return(o,s)=>(b(),$(d(at),{title:t.value,width:"600px",height:"200px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"插槽名称",disabled:!!e.item,required:"",rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"])]),_:1},8,["title","model"]))}}),_w=B({name:"DefinedInjectsDialog",__name:"injects",props:{item:{},current:{},context:{}},setup(n){const e=n,t=O(()=>e.item?"编辑注入":"新增注入"),r=I(Object.assign({default:{type:"JSExpression",value:""}},e.item)),i=async o=>{const s=o.default;return s&&!Te(s,e.context,!0)?!1:(e.current.setInject(o),!0)};return(o,s)=>(b(),$(d(at),{title:t.value,width:"800px",height:"500px",model:r.value,"form-props":{tooltipMessage:!1},"submit-method":i},{default:k(()=>[x(d(Q),{name:"name",label:"注入名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"]),x(d(Q),{name:"from",label:"来源名称",tip:"默认和注入名称一致"}),x(d(Q),{name:"default.value",label:"默认值",editor:"none"},{default:k(()=>[x(d(ke),{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"]))}}),xw=B({name:"DefinedWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),r=O(()=>(e.value?.props||[]).map(A=>typeof A=="string"?{name:A}:A)),i=O(()=>e.value?.emits||[]),o=O(()=>e.value?.slots||[]),s=O(()=>e.value?.inject||[]),a=I(!1),u=I(),l=I(!1),c=I(),p=I(!1),h=I(),f=I(!1),m=I(),v=()=>{u.value=void 0,a.value=!0},g=A=>{const{name:P,modelValue:T}=A;P==="edit"&&S(T),P==="remove"&&e.value?.removeProp(T)},S=A=>{u.value=A,a.value=!0},y=()=>{c.value=void 0,l.value=!0},w=A=>{c.value=A,l.value=!0},E=A=>{const{name:P,modelValue:T}=A;P==="edit"&&w(T),P==="remove"&&e.value?.removeEmit(T)},j=()=>{h.value=void 0,p.value=!0},_=A=>{h.value=A,p.value=!0},V=A=>{const{name:P,modelValue:T}=A;P==="edit"&&_(T),P==="remove"&&e.value?.removeSlot(T)},D=()=>{m.value=void 0,f.value=!0},Y=A=>{m.value=A,f.value=!0},C=A=>{const{name:P,modelValue:T}=A;P==="edit"&&Y(T),P==="remove"&&e.value?.removeInject(T)};return(A,P)=>d(e)&&d(t)?(b(),$(d(ue),{key:0,class:"v-defined-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{class:"v-sub-panel",title:"定义属性",size:"small",plus:"",fit:!1,onPlus:v},{default:k(()=>[(b(!0),G(re,null,oe(r.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["edit","remove"],onClick:K=>S(T),onAction:g},null,8,["model-value","title","onClick"]))),256)),r.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),a.value?(b(),$(yw,{key:1,current:d(e),context:d(t),modelValue:a.value,"onUpdate:modelValue":P[0]||(P[0]=T=>a.value=T),item:u.value},null,8,["current","context","modelValue","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义事件",size:"small",plus:"",fit:!1,onPlus:y},{default:k(()=>[(b(!0),G(re,null,oe(i.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>w(T),onAction:E},null,8,["model-value","title","onClick"]))),256)),i.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),l.value?(b(),$(bw,{key:1,modelValue:l.value,"onUpdate:modelValue":P[1]||(P[1]=T=>l.value=T),current:d(e),context:d(t),item:c.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"定义插槽",size:"small",plus:"",fit:!1,onPlus:j},{default:k(()=>[(b(!0),G(re,null,oe(o.value,T=>(b(),$(d(Oe),{"model-value":T,title:T,border:"",actions:["remove"],onClick:K=>_(T),onAction:V},null,8,["model-value","title","onClick"]))),256)),o.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),p.value?(b(),$(ww,{key:1,modelValue:p.value,"onUpdate:modelValue":P[2]||(P[2]=T=>p.value=T),current:d(e),context:d(t),item:h.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}),x(d(he),{class:"v-sub-panel",title:"注入",size:"small",plus:"",fit:!1,grow:"",onPlus:D},{default:k(()=>[(b(!0),G(re,null,oe(s.value,T=>(b(),$(d(Oe),{"model-value":T,title:T.name,border:"",actions:["remove"],onClick:K=>Y(T),onAction:C},null,8,["model-value","title","onClick"]))),256)),s.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50})),f.value?(b(),$(_w,{key:1,modelValue:f.value,"onUpdate:modelValue":P[3]||(P[3]=T=>f.value=T),current:d(e),context:d(t),item:m.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1})]),_:1})):N("",!0)}}),Sw=B({name:"DataSourceDialogForm",__name:"form",props:{context:{},current:{},item:{}},setup(n){const e=n,{apis:t}=x3(),r=I(Object.assign({type:"api",ref:"",name:"",label:"",transform:{type:"JSFunction",value:`(res) => {
78
84
  /* 在这里可对接口返回数据进行转换 */
79
85
  return res;
80
86
  }`},test:{type:"JSFunction",value:`() => this.runApi({
81
87
  /* 在这里可输入接口参数 */
82
- })`}},e.item)),i=I(!1),o=I(""),s=I(!1),a=O(()=>t.value.map(h=>({label:h.label||"",value:h.id,data:h}))),u=O(()=>e.item?"编辑数据源":"新增数据源"),l=h=>{const f=t.value.find(m=>m.id===h);f&&(r.value.name=f.name,r.value.label=f.label||"")},c=async h=>{const{transform:f,test:m,name:v}=h;if(!e.current)return!1;if(!e.item&&e.current.dataSources[v])return Ve(`名称【${v}】已经存在,请更换名称`),!1;if(f?.value){if(!Te(f,e.context,!0))return!1}else h.transform=void 0;if(m?.value){if(!Te(m,e.context,!0))return!1}else h.test=void 0;return e.current?.setDataSource(h),!0},p=async()=>{if(!e.context)return;if(!r.value.ref){Ve("请先选择API");return}if(!r.value.test?.value){Ve("请先填写测试用例");return}if(!Te(r.value.test,e.context,!0))return;const h=async(...v)=>{const g=e.context?.$apis[r.value.ref];if(g)return await g.apply(g,v);qe.warn(`API【${r.value.ref}】不存在`)},f=Ct(r.value.test,{runApi:h}),m=r.value.transform?.value?Ct(r.value.transform,{},!0):v=>v;i.value=!0;try{const v=await f();o.value=JSON.stringify(await m(v),null,2)}catch(v){qe.error(v)}i.value=!1,s.value=!0};return(h,f)=>(b(),$(d(at),{width:"1000px",height:"600px",title:u.value,model:r.value,"form-props":{tooltipMessage:!1},"submit-method":c},{extra:k(()=>[x(d($e),{loading:i.value,type:"warning",onClick:p},{default:k(()=>[de(" 运行测试用例 ")]),_:1},8,["loading"])]),default:k(()=>[x(d(Q),{name:"ref",label:"引用API",editor:"select",required:"",disabled:!!e.item,options:a.value,props:{filterable:!0},onChange:l},{option:k(({option:m})=>[de(ne(m.data.label)+" ",1),ae("i",null,"[ "+ne(m.data.name)+" ]",1)]),_:1},8,["disabled","options"]),x(d(Q),{name:"name",label:"调用名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(ft)}},null,8,["disabled","rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"transform.value",label:"转换函数",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.transform.value,"onUpdate:modelValue":f[0]||(f[0]=m=>r.value.transform.value=m),height:"200px",dark:""},null,8,["modelValue"])]),_:1}),x(d(Q),{name:"test.value",label:"测试用例",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.test.value,"onUpdate:modelValue":f[1]||(f[1]=m=>r.value.test.value=m),height:"100px",dark:""},null,8,["modelValue"])]),_:1}),s.value?(b(),$(d(nd),{key:0,class:"v-drawer",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=m=>s.value=m),title:"测试用例运行结果",direction:"btt","append-to-body":"",size:"80%"},{default:k(()=>[x(d(ke),{"model-value":o.value,border:"",dark:"",height:"100%",lang:"json"},null,8,["model-value"])]),_:1},8,["modelValue"])):N("",!0)]),_:1},8,["title","model"]))}}),ww=B({name:"DataSourcesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),r=I(!1),i=I(),o=O(()=>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:p}=l;c==="edit"&&a(p),c==="remove"&&e.value?.removeDataSource(p.name)};return(l,c)=>(b(),$(d(ue),{class:"v-data-sources-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{title:"API",class:"v-sub-panel",size:"small",plus:"",onPlus:s},{default:k(()=>[(b(!0),G(re,null,oe(o.value,p=>(b(),$(d(Oe),{border:"",title:p.name,subtitle:p.label,"model-value":p,actions:["edit","remove"],onAction:u,onClick:h=>a(p)},null,8,["title","subtitle","model-value","onClick"]))),256)),o.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50}))]),_:1}),r.value?(b(),$(bw,{key:0,modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),current:d(e),context:d(t),item:i.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}))}}),_w=B({name:"StyleWidget",__name:"index",setup(n){const{selected:e}=mt(),t=I(),r=O(()=>{const a=e.value?.model||null;return Se(a)?null:a}),i=O(()=>JSON.stringify(r.value?.getPropValue("style")||{},null,2)),o=a=>{try{const u=JSON.parse(a);r.value?.setProp("style",u)}catch{Ve("JSON格式错误")}},s=()=>{const a=(t.value?.getEditor()).getValue();o(a),Fe("保存成功")};return(a,u)=>(b(),$(d(he),{class:"v-css-widget v-sub-panel",title:"style",size:"small",fit:"",save:"",onSave:s},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":i.value,height:"100%",lang:"json",dark:"",onBlur:o},null,8,["model-value"])]),_:1}))}}),xw=["src"],Sw=B({name:"PreviewerWidget",__name:"index",props:{path:{type:Function}},setup(n,{expose:e}){const t=n,r=I(),i=I(Symbol()),{current:o,engine:s}=Ie(),{width:a,height:u}=Yi(r),l=O(()=>o.value&&t.path?t.path(o.value):null),c=O(()=>s.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc");return e({refresh:()=>{i.value=Symbol()}}),(p,h)=>(b(),G("div",{ref_key:"container",ref:r,class:"v-previewer",key:i.value},[x(d(jc),{mode:c.value,width:d(a),height:d(u)},{default:k(()=>[l.value?(b(),G("iframe",{key:0,ref:"iframe",frameborder:"0",src:l.value},null,8,xw)):N("",!0)]),_:1},8,["mode","width","height"])]))}}),jw=B({name:"NodePathWidget",inheritAttrs:!1,__name:"index",setup(n){const{selected:e,designer:t}=mt(),r=O(()=>(e.value?.path||[]).slice(0).reverse()),i=s=>{t.value?.setSelected(s)},o=s=>{t.value?.setHover(s)};return(s,a)=>d(e)?(b(),$(d(Gc),{key:0,class:"v-nodepath-widget","separator-icon":d(_a)},{default:k(()=>[(b(!0),G(re,null,oe(r.value,u=>(b(),$(d(Kc),{onClick:l=>i(u),onMouseover:l=>o(u)},{default:k(()=>[de(ne(u.name),1)]),_:2},1032,["onClick","onMouseover"]))),256))]),_:1},8,["separator-icon"])):N("",!0)}}),kw=B({name:"SchemaWidget",__name:"index",setup(n){const{current:e}=Ie(),t=I(),r=O(()=>JSON.stringify(e.value?.toDsl()||{},null,2)),i=O(()=>e.value?e.value.name:""),o=async()=>{const s=(t.value?.getEditor()).getValue();if(s&&await fn("手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"))try{const a=JSON.parse(s);e.value?.update(a),Fe("保存成功")}catch(a){Ve(a?.message)}};return(s,a)=>(b(),$(d(he),{class:"v-schema-widget",title:i.value,subtitle:"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。",size:"small",fit:"",save:"",onSave:o},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"json",dark:""},null,8,["model-value"])]),_:1},8,["title"]))}}),Ew=B({name:"SchemaWidget",__name:"index",setup(n){const{current:e,engine:t}=Ie(),r=I(),i=I(""),o=O(()=>e.value?`$vtj/raw/${e.value.id}.vue`:""),s=O(()=>e.value?e.value.name:"");return ve(e,async a=>{const u=t.project.value;u&&a?i.value=await t.service.genVueContent(u.toDsl(),a.toDsl()):i.value=""},{immediate:!0,deep:!0}),(a,u)=>(b(),$(d(he),{class:"v-raw-widget",title:s.value,subtitle:o.value,size:"small",fit:""},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:r,"model-value":i.value,height:"100%",lang:"html",dark:"",readonly:""},null,8,["model-value"])]),_:1},8,["title","subtitle"]))}}),$w=["src"],Vw=B({name:"DocsWidget",__name:"index",props:{url:{default:"https://newgateway.gitee.io/vtj/help/index.html"}},setup(n){const e=n,t=I();let r=null;Fi(()=>{r||(r=wa.service({target:t.value?.$el}))}),Li(()=>{i(),r=null});const i=()=>{r?.close()};return(o,s)=>(b(),$(d(he),{class:"v-docs-widget",size:"small",fit:"",body:{padding:!1},header:!1,ref_key:"panel",ref:t},{default:k(()=>[ae("iframe",{ref:"frame",src:e.url,onLoad:i},null,40,$w)]),_:1},512))}}),Cw={class:"v-about-widget"},Aw={class:"v-about-widget__logo"},Ow=["src"],Tw=ae("div",{class:"v-about-widget__name"},"VTJ.PRO",-1),Dw={class:"v-about-widget__version"},Iw=B({name:"AboutWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",Cw,[ae("div",Aw,[ae("img",{src:d(bc)},null,8,Ow)]),Tw,ae("div",Dw,"版本:"+ne(d(G6)),1)]))}}),fe={Logo:n3,EmptyWidget:i3,Switcher:_3,Toolbar:S3,Actions:E3,Pages:H3,Blocks:U3,Components:K3,Outline:G3,History:Y3,Apis:Z3,Deps:X3,Designer:tw,Scripts:aw,Properties:lw,Events:dw,Css:pw,Directives:hw,Defined:yw,DataSources:ww,Style:_w,Previewer:Sw,NodePath:jw,Schema:kw,Raw:Ew,Docs:Vw,About:Iw},Bw=[{name:"Logo",region:"Brand",component:fe.Logo},{name:"Switcher",region:"Brand",component:fe.Switcher},{name:"Toolbar",region:"Toolbar",component:fe.Toolbar},{name:"Actions",region:"Actions",component:fe.Actions},{name:"Pages",region:"Apps",component:fe.Pages,type:"app",openType:"panel",icon:ju,label:"页面管理"},{name:"Blocks",region:"Apps",component:fe.Blocks,type:"app",openType:"panel",icon:$u,label:"区块管理"},{name:"Components",region:"Apps",component:fe.Components,type:"app",openType:"panel",icon:Vu,label:"组件库"},{name:"Outline",region:"Apps",component:fe.Outline,type:"app",openType:"panel",icon:xu,label:"大纲树"},{name:"History",region:"Apps",component:fe.History,type:"app",openType:"panel",icon:ku,label:"历史记录"},{name:"Apis",region:"Apps",component:fe.Apis,type:"app",openType:"panel",icon:ru,label:"API管理"},{name:"Deps",region:"Apps",component:fe.Deps,type:"app",openType:"panel",icon:fu,label:"依赖管理"},{name:"About",region:"Apps",component:fe.About,type:"app",openType:"dialog",icon:bu,label:"关于",props:{width:500,height:300}},{name:"Designer",region:"Workspace",component:fe.Designer,type:"tab",closable:!1,label:"设计视图"},{name:"Previewer",region:"Preview",component:fe.Previewer,type:"tab",closable:!1,label:"预览视图"},{name:"Schema",region:"Workspace",component:fe.Schema,type:"tab",closable:!0,label:"DSL视图"},{name:"Raw",region:"Workspace",component:fe.Raw,type:"tab",closable:!0,label:"源码视图"},{name:"Docs",region:"Workspace",component:fe.Docs,type:"tab",closable:!0,label:"帮助中心"},{name:"Scripts",region:"Settings",component:fe.Scripts,type:"tab",group:Ye.Block,label:"设置"},{name:"Css",region:"Settings",component:fe.Css,type:"tab",group:Ye.Block,label:"CSS"},{name:"DataSources",region:"Settings",component:fe.DataSources,type:"tab",group:Ye.Block,label:"数据源"},{name:"Defined",region:"Settings",component:fe.Defined,type:"tab",group:Ye.Block,label:"定义"},{name:"Properties",region:"Settings",component:fe.Properties,type:"tab",group:Ye.Node,label:"属性"},{name:"Style",region:"Settings",component:fe.Style,type:"tab",group:Ye.Node,label:"样式"},{name:"Events",region:"Settings",component:fe.Events,type:"tab",group:Ye.Node,label:"事件"},{name:"Directives",region:"Settings",component:fe.Directives,type:"tab",group:Ye.Node,label:"指令"},{name:"NodePath",region:"Status",component:fe.NodePath}],Rw=[{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}],Mw=[{id:"elements",category:"特殊元素"},{id:"components",category:"内置组件"}],Pw=[{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:"默认插槽内容"}}],zw=[...Pw,{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"]}]}],Nw=[{name:"vue",version:"latest",label:"内置",library:"Vue",order:0,categories:Mw,components:zw}],Fw=B({name:"StringSetter",__name:"string",setup(n){return(e,t)=>(b(),$(d(Xe),ye({clearable:""},e.$attrs),null,16))}}),Lw=B({name:"BooleanSetter",__name:"boolean",setup(n){return(e,t)=>(b(),$(d(qi),ye(e.$attrs,{"model-value":!!e.$attrs.modelValue}),null,16,["model-value"]))}}),Hw="{{",Uw="}}",qw=B({name:"ExpressionSetter",__name:"expression",props:{modelValue:{},context:{}},emits:["change"],setup(n,{emit:e}){const t=(u="")=>({type:"JSExpression",value:De(u)?u.value:u}),r=n,i=e,o=u=>Te(u,r.context,!0),s=I(t(r.modelValue).value);ve(()=>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)=>(b(),$(d(Xe),{class:"v-expression-setter",modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),onChange:a},{prefix:k(()=>[de(ne(Hw))]),suffix:k(()=>[de(ne(Uw))]),_:1},8,["modelValue"]))}}),Ww=B({name:"SelectSetter",__name:"select",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(b(),$(d(ya),ye({clearable:""},t.$attrs),{default:k(()=>[(b(!0),G(re,null,oe(e.options,i=>(b(),$(d(ga),ye({key:i.label},i),null,16))),128))]),_:1},16))}}),Jw=B({name:"NumberSetter",__name:"number",props:{modelValue:{}},emits:["change"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>De(t.modelValue)?void 0:Number(t.modelValue||0)),o=s=>{r("change",s)};return(s,a)=>(b(),$(d(va),ye({class:"v-number-setter","controls-position":"right","model-value":i.value},s.$attrs,{onChange:o}),null,16,["model-value"]))}}),Kw=B({name:"ColorSetter",__name:"color",setup(n){return(e,t)=>(b(),$(d(rd),dt($t(e.$attrs)),null,16))}}),Gw=B({name:"JsonSetter",__name:"json",props:{modelValue:{default:void 0},type:{default:"JSON"}},emits:["change"],setup(n,{emit:e}){const t=n,r=I(),i=I(typeof t.modelValue=="object"?JSON.stringify(t.modelValue,null,2):void 0),o=O(()=>!!i.value),s=I(!1),a=e,u=h=>{let f=!0;try{const m=JSON.parse(h);if(t.type==="Array"&&!Array.isArray(m))throw new Error(`"${h}" is not a Array`);if(t.type==="Object"&&!oo(m))throw new Error(`"${h}" is not a PlainObject`);if(typeof m!="object")throw new Error(`"${h}" is not a ${t.type}`)}catch(m){f=!1,Nt.error({title:"代码错误",message:m?.message||m})}return f},l=()=>{const h=r.value?.getEditor();if(h){const f=h.getValue();u(f)&&(i.value=f,a("change",JSON.parse(f)),s.value=!1)}},c=()=>{i.value="",a("change",void 0),s.value=!1},p=()=>{s.value=!0};return(h,f)=>(b(),G("div",{class:be(["v-json-setter",{"is-active":o.value}])},[x(d(Xe),ye({readonly:"",onFocus:p,"model-value":t.type,"suffix-icon":d(Gi)},h.$attrs),null,16,["model-value","suffix-icon"]),s.value?(b(),$(d(Ut),{key:0,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),title:t.type,width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:l,onClear:c},{default:k(()=>[x(d(ke),{ref_key:"codeEditor",ref:r,height:"100%",lang:"json",dark:"","model-value":i.value},null,8,["model-value"])]),_:1},8,["modelValue","title"])):N("",!0)],2))}}),Yw=B({name:"FunctionSetter",__name:"function",props:{modelValue:{default:()=>({type:"JSFunction",value:""})}},emits:["change"],setup(n,{emit:e}){const t=n,r=I(),i=I(t.modelValue.value),o=I(!1),s=O(()=>!!i.value),a=e,u=()=>{const p=r.value?.getEditor();if(p){const h=p.getValue(),f={type:"JSFunction",value:h};Te(f,{})&&(i.value=h,a("change",f),o.value=!1)}},l=()=>{i.value="",a("change",void 0),o.value=!1},c=()=>{o.value=!0};return(p,h)=>(b(),G("div",{class:be(["v-function-setter",{"is-active":s.value}])},[x(d(Xe),ye({readonly:"",onFocus:c,"model-value":"JSFunction","suffix-icon":d(Gi)},p.$attrs),null,16,["suffix-icon"]),o.value?(b(),$(d(Ut),{key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=f=>o.value=f),title:"JSFunction",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:u,onClear:l},{default:k(()=>[x(d(ke),{ref_key:"codeEditor",ref:r,height:"100%","model-value":i.value,dark:""},null,8,["model-value"])]),_:1},8,["modelValue"])):N("",!0)],2))}}),Ne={StringSetter:Fw,BooleanSetter:Lw,ExpressionSetter:qw,SelectSetter:Ww,NumberSetter:Jw,ColorSetter:Kw,IconSetter:Sc,JsonSetter:Gw,FunctionSetter:Yw},Zw={name:"StringSetter",component:Ne.StringSetter,type:"String"},Xw=[{name:"InputSetter",component:Ne.StringSetter,type:"String"},{name:"StringSetter",component:Ne.StringSetter,type:"String"},{name:"BooleanSetter",component:Ne.BooleanSetter,type:"Boolean"},{name:"ExpressionSetter",component:Ne.ExpressionSetter,type:"Object"},{name:"SelectSetter",component:Ne.SelectSetter,type:"String"},{name:"NumberSetter",component:Ne.NumberSetter,type:"Number"},{name:"ColorSetter",component:Ne.ColorSetter,type:"String"},{name:"IconSetter",component:Ne.IconSetter,type:"String"},{name:"ObjectSetter",component:Ne.JsonSetter,type:"Object",props:{type:"Object"}},{name:"ArraySetter",component:Ne.JsonSetter,type:"Array",props:{type:"Array"}},{name:"JsonSetter",component:Ne.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"JSONSetter",component:Ne.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"FunctionSetter",component:Ne.FunctionSetter,type:"Function"}];class Qw{widgets={};constructor(){this.widgets=this.createWidgets()}createWidgets(){const e={};for(const t of Bw)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){qe.warn(`widget '${e}' is not found`);return}ct(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 kc=new Qw;class e4{constructor(e=Rw){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 t4=new e4;class n4{setters={};defaultSetter=Zw;constructor(){this.setters=this.createSetters()}createSetters(){const e={};for(const t of Xw)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){qe.warn(`setter '${e}' is not found`);return}ct(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 fr=new n4;function r4(n){return new Promise((e,t)=>{const r=pa(L3,{slots:n,onClose:()=>{r.unmount(),t(null)},onSubmit:i=>{r.unmount(),e(i)}});r.mount(document.createElement("div"))})}class i4{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=nr(null);dropping=nr(null);selected=nr(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")),U.on(Dn,this.bind(this.onActiveChange,"onActiveChange")),U.on(we,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")),U.off(Dn,this.bind(this.onActiveChange,"onActiveChange")),U.off(we,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 r4(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 _r(l);if(Se(a))o.addNode(c,void 0,u);else{const p=await this.getDropSlot(u==="inner"?a:a.parent);if(p===null){this.dropping.value=null;return}c.slot=p,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 _r.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:Se(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 Ll(0);const e=d(this.selected),t=d(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 St(),e){const t=this.getElmenetByModel(e);if(!t)return;const r=t.getBoundingClientRect(),i=Se(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 St(),e){const t=this.getElmenetByModel(e)||this.document?.createElement("span");if(!t)return;const r=t.getBoundingClientRect(),i=Se(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 St(),e){const r=this.getElmenetByModel(e);if(!r)return;const i=r.getBoundingClientRect(),o=Se(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(Se(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:p=!0}=u,h=l===!0||Array.isArray(l)&&l.includes(a.name),f=p===!0||Array.isArray(p)&&p.includes(c);return h&&f}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 o4{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}),Nt.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=$o({getDsl:async h=>await this.service.getFile(h)||null,options:{mode:He.Design,Vue:i,components:o,libs:s,apis:a,window:t}}),{renderer:c,context:p}=Eo({Vue:i,mode:He.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(h){Ve(h.message||"未知错误","运行时错误"),console.error(h)}this.context=p,U.on(we,this.nodeChange),U.on(pe,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,U.off(we,this.nodeChange),U.off(pe,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 s4 extends co{contentWindow=null;renderer=null;designer=nr(null);engine;materialPath;constructor(e){super();const{engine:t,materialPath:r}=e;this.engine=t,this.materialPath=r,ve(this.engine.current,()=>{this.refresh()})}init(e,t){Ni(()=>{e.value&&t.value.length&&(this.resetReady(),this.setup(e.value,t.value),this.contentWindow&&(this.designer.value?.dispose(),this.designer.value=new i4(this.engine,this.contentWindow,t)))})}setup(e,t){const r=e.contentWindow;if(!r){qe.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}=dc(t,this.materialPath);i.open(),i.write(`
88
+ })`}},e.item)),i=I(!1),o=I(""),s=I(!1),a=O(()=>t.value.map(h=>({label:h.label||"",value:h.id,data:h}))),u=O(()=>e.item?"编辑数据源":"新增数据源"),l=h=>{const f=t.value.find(m=>m.id===h);f&&(r.value.name=f.name,r.value.label=f.label||"")},c=async h=>{const{transform:f,test:m,name:v}=h;if(!e.current)return!1;if(!e.item&&e.current.dataSources[v])return Ve(`名称【${v}】已经存在,请更换名称`),!1;if(f?.value){if(!Te(f,e.context,!0))return!1}else h.transform=void 0;if(m?.value){if(!Te(m,e.context,!0))return!1}else h.test=void 0;return e.current?.setDataSource(h),!0},p=async()=>{if(!e.context)return;if(!r.value.ref){Ve("请先选择API");return}if(!r.value.test?.value){Ve("请先填写测试用例");return}if(!Te(r.value.test,e.context,!0))return;const h=async(...v)=>{const g=e.context?.$apis[r.value.ref];if(g)return await g.apply(g,v);qe.warn(`API【${r.value.ref}】不存在`)},f=Ct(r.value.test,{runApi:h}),m=r.value.transform?.value?Ct(r.value.transform,{},!0):v=>v;i.value=!0;try{const v=await f();o.value=JSON.stringify(await m(v),null,2)}catch(v){qe.error(v)}i.value=!1,s.value=!0};return(h,f)=>(b(),$(d(at),{width:"1000px",height:"600px",title:u.value,model:r.value,"form-props":{tooltipMessage:!1},"submit-method":c},{extra:k(()=>[x(d($e),{loading:i.value,type:"warning",onClick:p},{default:k(()=>[de(" 运行测试用例 ")]),_:1},8,["loading"])]),default:k(()=>[x(d(Q),{name:"ref",label:"引用API",editor:"select",required:"",disabled:!!e.item,options:a.value,props:{filterable:!0},onChange:l},{option:k(({option:m})=>[de(ne(m.data.label)+" ",1),ae("i",null,"[ "+ne(m.data.name)+" ]",1)]),_:1},8,["disabled","options"]),x(d(Q),{name:"name",label:"调用名称",required:"",tip:"名称为英文驼峰格式",disabled:!!e.item,rules:{message:"名称格式错误",pattern:d(mt)}},null,8,["disabled","rules"]),x(d(Q),{name:"label",label:"备注说明",required:""}),x(d(Q),{name:"transform.value",label:"转换函数",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.transform.value,"onUpdate:modelValue":f[0]||(f[0]=m=>r.value.transform.value=m),height:"200px",dark:""},null,8,["modelValue"])]),_:1}),x(d(Q),{name:"test.value",label:"测试用例",editor:"none"},{default:k(()=>[x(d(ke),{modelValue:r.value.test.value,"onUpdate:modelValue":f[1]||(f[1]=m=>r.value.test.value=m),height:"100px",dark:""},null,8,["modelValue"])]),_:1}),s.value?(b(),$(d(ad),{key:0,class:"v-drawer",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=m=>s.value=m),title:"测试用例运行结果",direction:"btt","append-to-body":"",size:"80%"},{default:k(()=>[x(d(ke),{"model-value":o.value,border:"",dark:"",height:"100%",lang:"json"},null,8,["model-value"])]),_:1},8,["modelValue"])):N("",!0)]),_:1},8,["title","model"]))}}),jw=B({name:"DataSourcesWidget",__name:"index",setup(n){const{current:e,context:t}=Ie(),r=I(!1),i=I(),o=O(()=>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:p}=l;c==="edit"&&a(p),c==="remove"&&e.value?.removeDataSource(p.name)};return(l,c)=>(b(),$(d(ue),{class:"v-data-sources-widget",direction:"column",fit:""},{default:k(()=>[x(d(he),{title:"API",class:"v-sub-panel",size:"small",plus:"",onPlus:s},{default:k(()=>[(b(!0),G(re,null,oe(o.value,p=>(b(),$(d(Oe),{border:"",title:p.name,subtitle:p.label,"model-value":p,actions:["edit","remove"],onAction:u,onClick:h=>a(p)},null,8,["title","subtitle","model-value","onClick"]))),256)),o.value.length?N("",!0):(b(),$(d(Ee),{key:0,"image-size":50}))]),_:1}),r.value?(b(),$(Sw,{key:0,modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),current:d(e),context:d(t),item:i.value},null,8,["modelValue","current","context","item"])):N("",!0)]),_:1}))}}),kw=B({name:"StyleWidget",__name:"index",setup(n){const{selected:e}=vt(),t=I(),r=O(()=>{const a=e.value?.model||null;return Se(a)?null:a}),i=O(()=>JSON.stringify(r.value?.getPropValue("style")||{},null,2)),o=a=>{try{const u=JSON.parse(a);r.value?.setProp("style",u)}catch{Ve("JSON格式错误")}},s=()=>{const a=(t.value?.getEditor()).getValue();o(a),Fe("保存成功")};return(a,u)=>(b(),$(d(he),{class:"v-css-widget v-sub-panel",title:"style",size:"small",fit:"",save:"",onSave:s},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":i.value,height:"100%",lang:"json",dark:"",onBlur:o},null,8,["model-value"])]),_:1}))}}),Ew=["src"],$w=B({name:"PreviewerWidget",__name:"index",props:{path:{type:Function}},setup(n,{expose:e}){const t=n,r=I(),i=I(Symbol()),{current:o,engine:s}=Ie(),{width:a,height:u}=eo(r),l=O(()=>o.value&&t.path?t.path(o.value):null),c=O(()=>s.skeleton?.getWidget("Toolbar")?.widgetRef.mode??"pc");return e({refresh:()=>{i.value=Symbol()}}),(p,h)=>(b(),G("div",{ref_key:"container",ref:r,class:"v-previewer",key:i.value},[x(d(Cc),{mode:c.value,width:d(a),height:d(u)},{default:k(()=>[l.value?(b(),G("iframe",{key:0,ref:"iframe",frameborder:"0",src:l.value},null,8,Ew)):N("",!0)]),_:1},8,["mode","width","height"])]))}}),Vw=B({name:"NodePathWidget",inheritAttrs:!1,__name:"index",setup(n){const{selected:e,designer:t}=vt(),r=O(()=>(e.value?.path||[]).slice(0).reverse()),i=s=>{t.value?.setSelected(s)},o=s=>{t.value?.setHover(s)};return(s,a)=>d(e)?(b(),$(d(ed),{key:0,class:"v-nodepath-widget","separator-icon":d(Sa)},{default:k(()=>[(b(!0),G(re,null,oe(r.value,u=>(b(),$(d(Qc),{onClick:l=>i(u),onMouseover:l=>o(u)},{default:k(()=>[de(ne(u.name),1)]),_:2},1032,["onClick","onMouseover"]))),256))]),_:1},8,["separator-icon"])):N("",!0)}}),Cw=B({name:"SchemaWidget",__name:"index",setup(n){const{current:e}=Ie(),t=I(),r=O(()=>JSON.stringify(e.value?.toDsl()||{},null,2)),i=O(()=>e.value?e.value.name:""),o=async()=>{const s=(t.value?.getEditor()).getValue();if(s&&await fn("手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。"))try{const a=JSON.parse(s);e.value?.update(a),Fe("保存成功")}catch(a){Ve(a?.message)}};return(s,a)=>(b(),$(d(he),{class:"v-schema-widget",title:i.value,subtitle:"手动修改DSL有风险,可能导致页面无法加载,请确认您的操作无误。",size:"small",fit:"",save:"",onSave:o},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:t,"model-value":r.value,height:"100%",lang:"json",dark:""},null,8,["model-value"])]),_:1},8,["title"]))}}),Aw=B({name:"SchemaWidget",__name:"index",setup(n){const{current:e,engine:t}=Ie(),r=I(),i=I(""),o=O(()=>e.value?`$vtj/raw/${e.value.id}.vue`:""),s=O(()=>e.value?e.value.name:"");return ve(e,async a=>{const u=t.project.value;u&&a?i.value=await t.service.genVueContent(u.toDsl(),a.toDsl()):i.value=""},{immediate:!0,deep:!0}),(a,u)=>(b(),$(d(he),{class:"v-raw-widget",title:s.value,subtitle:o.value,size:"small",fit:""},{default:k(()=>[x(d(ke),{ref_key:"editorRef",ref:r,"model-value":i.value,height:"100%",lang:"html",dark:"",readonly:""},null,8,["model-value"])]),_:1},8,["title","subtitle"]))}}),Ow=["src"],Tw=B({name:"DocsWidget",__name:"index",props:{url:{default:"https://newgateway.gitee.io/vtj/help/index.html"}},setup(n){const e=n,t=I();let r=null;qi(()=>{r||(r=xa.service({target:t.value?.$el}))}),Wi(()=>{i(),r=null});const i=()=>{r?.close()};return(o,s)=>(b(),$(d(he),{class:"v-docs-widget",size:"small",fit:"",body:{padding:!1},header:!1,ref_key:"panel",ref:t},{default:k(()=>[ae("iframe",{ref:"frame",src:e.url,onLoad:i},null,40,Ow)]),_:1},512))}}),Dw={class:"v-about-widget"},Iw={class:"v-about-widget__logo"},Bw=["src"],Rw=ae("div",{class:"v-about-widget__name"},"VTJ.PRO",-1),Mw={class:"v-about-widget__version"},Pw=B({name:"AboutWidget",__name:"index",setup(n){return(e,t)=>(b(),G("div",Dw,[ae("div",Iw,[ae("img",{src:d(jc)},null,8,Bw)]),Rw,ae("div",Mw,"版本:"+ne(d(Q6)),1)]))}}),fe={Logo:s3,EmptyWidget:l3,Switcher:k3,Toolbar:$3,Actions:A3,Pages:J3,Blocks:K3,Components:X3,Outline:Q3,History:ew,Apis:tw,Deps:nw,Designer:ow,Scripts:dw,Properties:pw,Events:mw,Css:vw,Directives:gw,Defined:xw,DataSources:jw,Style:kw,Previewer:$w,NodePath:Vw,Schema:Cw,Raw:Aw,Docs:Tw,About:Pw},zw=[{name:"Logo",region:"Brand",component:fe.Logo},{name:"Switcher",region:"Brand",component:fe.Switcher},{name:"Toolbar",region:"Toolbar",component:fe.Toolbar},{name:"Actions",region:"Actions",component:fe.Actions},{name:"Pages",region:"Apps",component:fe.Pages,type:"app",openType:"panel",icon:$u,label:"页面管理"},{name:"Blocks",region:"Apps",component:fe.Blocks,type:"app",openType:"panel",icon:Au,label:"区块管理"},{name:"Components",region:"Apps",component:fe.Components,type:"app",openType:"panel",icon:Ou,label:"组件库"},{name:"Outline",region:"Apps",component:fe.Outline,type:"app",openType:"panel",icon:ku,label:"大纲树"},{name:"History",region:"Apps",component:fe.History,type:"app",openType:"panel",icon:Vu,label:"历史记录"},{name:"Apis",region:"Apps",component:fe.Apis,type:"app",openType:"panel",icon:su,label:"API管理"},{name:"Deps",region:"Apps",component:fe.Deps,type:"app",openType:"panel",icon:gu,label:"依赖管理"},{name:"About",region:"Apps",component:fe.About,type:"app",openType:"dialog",icon:xu,label:"关于",props:{width:500,height:300}},{name:"Designer",region:"Workspace",component:fe.Designer,type:"tab",closable:!1,label:"设计视图"},{name:"Previewer",region:"Preview",component:fe.Previewer,type:"tab",closable:!1,label:"预览视图"},{name:"Schema",region:"Workspace",component:fe.Schema,type:"tab",closable:!0,label:"DSL视图"},{name:"Raw",region:"Workspace",component:fe.Raw,type:"tab",closable:!0,label:"源码视图"},{name:"Docs",region:"Workspace",component:fe.Docs,type:"tab",closable:!0,label:"帮助中心"},{name:"Scripts",region:"Settings",component:fe.Scripts,type:"tab",group:Ye.Block,label:"设置"},{name:"Css",region:"Settings",component:fe.Css,type:"tab",group:Ye.Block,label:"CSS"},{name:"DataSources",region:"Settings",component:fe.DataSources,type:"tab",group:Ye.Block,label:"数据源"},{name:"Defined",region:"Settings",component:fe.Defined,type:"tab",group:Ye.Block,label:"定义"},{name:"Properties",region:"Settings",component:fe.Properties,type:"tab",group:Ye.Node,label:"属性"},{name:"Style",region:"Settings",component:fe.Style,type:"tab",group:Ye.Node,label:"样式"},{name:"Events",region:"Settings",component:fe.Events,type:"tab",group:Ye.Node,label:"事件"},{name:"Directives",region:"Settings",component:fe.Directives,type:"tab",group:Ye.Node,label:"指令"},{name:"NodePath",region:"Status",component:fe.NodePath}],Nw=[{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}],Fw=[{id:"elements",category:"特殊元素"},{id:"components",category:"内置组件"}],Lw=[{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:"默认插槽内容"}}],Hw=[...Lw,{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"]}]}],Uw=[{name:"vue",version:"latest",label:"内置",library:"Vue",order:0,categories:Fw,components:Hw}],qw=B({name:"StringSetter",__name:"string",setup(n){return(e,t)=>(b(),$(d(Xe),ye({clearable:""},e.$attrs),null,16))}}),Ww=B({name:"BooleanSetter",__name:"boolean",setup(n){return(e,t)=>(b(),$(d(Gi),ye(e.$attrs,{"model-value":!!e.$attrs.modelValue}),null,16,["model-value"]))}}),Jw="{{",Kw="}}",Gw=B({name:"ExpressionSetter",__name:"expression",props:{modelValue:{},context:{}},emits:["change"],setup(n,{emit:e}){const t=(u="")=>({type:"JSExpression",value:De(u)?u.value:u}),r=n,i=e,o=u=>Te(u,r.context,!0),s=I(t(r.modelValue).value);ve(()=>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)=>(b(),$(d(Xe),{class:"v-expression-setter",modelValue:s.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.value=c),onChange:a},{prefix:k(()=>[de(ne(Jw))]),suffix:k(()=>[de(ne(Kw))]),_:1},8,["modelValue"]))}}),Yw=B({name:"SelectSetter",__name:"select",props:{options:{default:()=>[]}},setup(n){const e=n;return(t,r)=>(b(),$(d(wa),ye({clearable:""},t.$attrs),{default:k(()=>[(b(!0),G(re,null,oe(e.options,i=>(b(),$(d(ba),ye({key:i.label},i),null,16))),128))]),_:1},16))}}),Zw=B({name:"NumberSetter",__name:"number",props:{modelValue:{}},emits:["change"],setup(n,{emit:e}){const t=n,r=e,i=O(()=>De(t.modelValue)?void 0:Number(t.modelValue||0)),o=s=>{r("change",s)};return(s,a)=>(b(),$(d(ya),ye({class:"v-number-setter","controls-position":"right","model-value":i.value},s.$attrs,{onChange:o}),null,16,["model-value"]))}}),Xw=B({name:"ColorSetter",__name:"color",setup(n){return(e,t)=>(b(),$(d(ld),pt($t(e.$attrs)),null,16))}}),Qw=B({name:"JsonSetter",__name:"json",props:{modelValue:{default:void 0},type:{default:"JSON"}},emits:["change"],setup(n,{emit:e}){const t=n,r=I(),i=I(typeof t.modelValue=="object"?JSON.stringify(t.modelValue,null,2):void 0),o=O(()=>!!i.value),s=I(!1),a=e,u=h=>{let f=!0;try{const m=JSON.parse(h);if(t.type==="Array"&&!Array.isArray(m))throw new Error(`"${h}" is not a Array`);if(t.type==="Object"&&!uo(m))throw new Error(`"${h}" is not a PlainObject`);if(typeof m!="object")throw new Error(`"${h}" is not a ${t.type}`)}catch(m){f=!1,Nt.error({title:"代码错误",message:m?.message||m})}return f},l=()=>{const h=r.value?.getEditor();if(h){const f=h.getValue();u(f)&&(i.value=f,a("change",JSON.parse(f)),s.value=!1)}},c=()=>{i.value="",a("change",void 0),s.value=!1},p=()=>{s.value=!0};return(h,f)=>(b(),G("div",{class:be(["v-json-setter",{"is-active":o.value}])},[x(d(Xe),ye({readonly:"",onFocus:p,"model-value":t.type,"suffix-icon":d(Qi)},h.$attrs),null,16,["model-value","suffix-icon"]),s.value?(b(),$(d(Ut),{key:0,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),title:t.type,width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:l,onClear:c},{default:k(()=>[x(d(ke),{ref_key:"codeEditor",ref:r,height:"100%",lang:"json",dark:"","model-value":i.value},null,8,["model-value"])]),_:1},8,["modelValue","title"])):N("",!0)],2))}}),e4=B({name:"FunctionSetter",__name:"function",props:{modelValue:{default:()=>({type:"JSFunction",value:""})}},emits:["change"],setup(n,{emit:e}){const t=n,r=I(),i=I(t.modelValue.value),o=I(!1),s=O(()=>!!i.value),a=e,u=()=>{const p=r.value?.getEditor();if(p){const h=p.getValue(),f={type:"JSFunction",value:h};Te(f,{})&&(i.value=h,a("change",f),o.value=!1)}},l=()=>{i.value="",a("change",void 0),o.value=!1},c=()=>{o.value=!0};return(p,h)=>(b(),G("div",{class:be(["v-function-setter",{"is-active":s.value}])},[x(d(Xe),ye({readonly:"",onFocus:c,"model-value":"JSFunction","suffix-icon":d(Qi)},p.$attrs),null,16,["suffix-icon"]),o.value?(b(),$(d(Ut),{key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=f=>o.value=f),title:"JSFunction",width:"1000px",height:"600px",cancel:"",submit:"",clear:"",onSubmit:u,onClear:l},{default:k(()=>[x(d(ke),{ref_key:"codeEditor",ref:r,height:"100%","model-value":i.value,dark:""},null,8,["model-value"])]),_:1},8,["modelValue"])):N("",!0)],2))}}),Ne={StringSetter:qw,BooleanSetter:Ww,ExpressionSetter:Gw,SelectSetter:Yw,NumberSetter:Zw,ColorSetter:Xw,IconSetter:Vc,JsonSetter:Qw,FunctionSetter:e4},t4={name:"StringSetter",component:Ne.StringSetter,type:"String"},n4=[{name:"InputSetter",component:Ne.StringSetter,type:"String"},{name:"StringSetter",component:Ne.StringSetter,type:"String"},{name:"BooleanSetter",component:Ne.BooleanSetter,type:"Boolean"},{name:"ExpressionSetter",component:Ne.ExpressionSetter,type:"Object"},{name:"SelectSetter",component:Ne.SelectSetter,type:"String"},{name:"NumberSetter",component:Ne.NumberSetter,type:"Number"},{name:"ColorSetter",component:Ne.ColorSetter,type:"String"},{name:"IconSetter",component:Ne.IconSetter,type:"String"},{name:"ObjectSetter",component:Ne.JsonSetter,type:"Object",props:{type:"Object"}},{name:"ArraySetter",component:Ne.JsonSetter,type:"Array",props:{type:"Array"}},{name:"JsonSetter",component:Ne.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"JSONSetter",component:Ne.JsonSetter,type:"Object",props:{type:"JSON"}},{name:"FunctionSetter",component:Ne.FunctionSetter,type:"Function"}];class r4{widgets={};constructor(){this.widgets=this.createWidgets()}createWidgets(){const e={};for(const t of zw)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){qe.warn(`widget '${e}' is not found`);return}dt(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 Ac=new r4;class i4{constructor(e=Nw){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 o4=new i4;class s4{setters={};defaultSetter=t4;constructor(){this.setters=this.createSetters()}createSetters(){const e={};for(const t of n4)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){qe.warn(`setter '${e}' is not found`);return}dt(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 vr=new s4;function a4(n){return new Promise((e,t)=>{const r=fa(W3,{slots:n,onClose:()=>{r.unmount(),t(null)},onSubmit:i=>{r.unmount(),e(i)}});r.mount(document.createElement("div"))})}class l4{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=ir(null);dropping=ir(null);selected=ir(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")),U.on(Bn,this.bind(this.onActiveChange,"onActiveChange")),U.on(we,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")),U.off(Bn,this.bind(this.onActiveChange,"onActiveChange")),U.off(we,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 a4(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 Sr(l);if(Se(a))o.addNode(c,void 0,u);else{const p=await this.getDropSlot(u==="inner"?a:a.parent);if(p===null){this.dropping.value=null;return}c.slot=p,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 Sr.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:Se(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 ql(0);const e=d(this.selected),t=d(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 ct(),e){const t=this.getElmenetByModel(e);if(!t)return;const r=t.getBoundingClientRect(),i=Se(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 ct(),e){const t=this.getElmenetByModel(e)||this.document?.createElement("span");if(!t)return;const r=t.getBoundingClientRect(),i=Se(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 ct(),e){const r=this.getElmenetByModel(e);if(!r)return;const i=r.getBoundingClientRect(),o=Se(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(Se(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:p=!0}=u,h=l===!0||Array.isArray(l)&&l.includes(a.name),f=p===!0||Array.isArray(p)&&p.includes(c);return h&&f}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 u4{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}),Nt.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=Oo({getDsl:async h=>await this.service.getFile(h)||null,options:{mode:He.Design,Vue:i,components:o,libs:s,apis:a,window:t}}),{renderer:c,context:p}=Ao({Vue:i,mode:He.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(h){Ve(h.message||"未知错误","运行时错误"),console.error(h)}this.context=p,U.on(we,this.nodeChange),U.on(pe,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,U.off(we,this.nodeChange),U.off(pe,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 c4 extends mo{contentWindow=null;renderer=null;designer=ir(null);engine;materialPath;constructor(e){super();const{engine:t,materialPath:r}=e;this.engine=t,this.materialPath=r,ve(this.engine.current,()=>{this.refresh()})}init(e,t){Ui(()=>{e.value&&t.value.length&&(this.resetReady(),this.setup(e.value,t.value),this.contentWindow&&(this.designer.value?.dispose(),this.designer.value=new l4(this.engine,this.contentWindow,t)))})}setup(e,t){const r=e.contentWindow;if(!r){qe.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}=vc(t,this.materialPath);i.open(),i.write(`
83
89
  <!DOCTYPE html>
84
90
  <html lang="zh-CN">
85
91
  <head>
@@ -96,9 +102,9 @@ version: 2.9.0
96
102
  background: #fff;
97
103
  }
98
104
  </style>
99
- ${t6(s)}
100
- ${oa(o)}
101
- ${oa(a)}
105
+ ${o6(s)}
106
+ ${aa(o)}
107
+ ${aa(a)}
102
108
  </head>
103
109
  <body>
104
110
  </body>
@@ -108,7 +114,7 @@ version: 2.9.0
108
114
  ${JSON.stringify(c)});
109
115
  <\/script>
110
116
  </html>
111
- `),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 h of t){const f=l[h]?(await l[h]()).default:i[h];c.push(f)}o.load(c);const p=this.createEnv(e,r,c);this.renderer=new o4(p,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((g,S)=>(g[S]=i[S],g),{}),c={},{groups:p,componentMap:h}=a;for(const g of p.value){const S=g.names||[],y=l[t[g.library||""]];y&&S.forEach(w=>{const E=h.get(w);E?c[w]=pc(E,y):c[w]=y[w]})}const{adapter:f,globals:m}=u,v=mc(s.value?.apis,f);return{window:i,Vue:i.Vue,library:l,materials:r,components:c,container:i.document.body,apis:v,globals:m}}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 a4{constructor(e){this.service=e}components=[];componentMap=new Map;groups=I([]);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(f=>f.name),c=i.map(f=>this.getCateoryComponents(f,o)),p=c.reduce((f,m)=>m.count+f,0),h={name:r.name,label:s||a,count:p,names:l,library:u,children:c};t.push(h)}return t}load(e){const t=[...Nw,...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=dg(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 p=Array.isArray(c)?c:[c];let h=[];for(const f of p)h=h.concat(fr.getByType(f));return h};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 Ec=Symbol("VtjEngine");class e8 extends co{app;skeleton;container;service;assets;simulator;emitter=U;project=I(null);current=I(null);context=I(null);isEmptyCurrent=I(!1);history=I(null);provider;constructor(e){super();const{container:t,service:r,project:i={},globals:o={},dependencies:s,materials:a,materialPath:u="./"}=e;this.container=t,this.service=r,this.provider=new yc({mode:He.Design,globals:o,project:i,service:r,dependencies:s,materials:a,materialPath:u}),this.assets=new a4(this.service),this.simulator=new s4({engine:this,materialPath:u}),this.bindEvents(),this.init(i),Fi(this.render.bind(this)),Li(this.dispose.bind(this))}async init(e){const t=await this.service.init(e).catch(r=>(qe.warn("VTJEngine service init fail.",r),null));t&&(t.dependencies=t4.merge(t.dependencies||[]),this.project.value=new mg(t),this.saveMaterials(),this.triggerReady())}render(){const e=d(this.container);if(e){const t=pa(l4);t.provide(Ec,Oc(this)),t.mount(e),this.app=t}else qe.warn("VTJEngine constructor param [ container ] is undefined")}bindEvents(){U.on(ze,e=>this.saveProject(e)),U.on(ur,e=>this.saveBlockFile(e)),U.on(_n,e=>this.saveBlockFile(e)),U.on(ki,()=>this.saveMaterials()),U.on(Dn,e=>this.activeFile(e)),U.on(Kl,()=>this.publish()),U.on(Gl,()=>this.publishCurrent()),U.on(pe,e=>this.changeFile(e)),U.on(we,()=>this.changeCurrentFile()),U.on(xn,e=>this.saveHistory(e)),U.on(cr,e=>this.loadHistory(e))}async activeFile(e){await St();const t=e.model,r=e.model.currentFile;if(r){if(t.isPageFile(r)&&r.raw)return;const i=await this.service.getFile(r.id);i&&(r.dsl=i)}if(r?.dsl){const i=new tn(r.dsl);this.updateCurrent(i),this.initHistory(i)}else this.updateCurrent(null);gt(this.project)}async changeFile(e){await St();const t=e.toDsl();this.service.saveFile(t),this.updateCurrent(e),this.history.value?.add(t),gt(this.history)}changeCurrentFile(){this.saveCurrentFile(),this.current.value&&(this.history.value?.add(this.current.value.toDsl()),gt(this.history))}async updateCurrent(e,t=!0){this.current.value=e,await St(),this.context.value=this.simulator.renderer?.context||null,this.isEmptyCurrent.value=this.current.value?.nodes.length===0,t&&gt(this.context)}async saveProject(e){const t=e.model.toDsl();await this.service.saveProject(t),gt(this.project)}async saveBlockFile(e){const t=e.type,r=e.model;if(t==="create"){const i=e.data;r.isPageFile(i)&&i.raw?(await this.service.createRawPage(i),Fe(`源码文件已经生成:/.vtj/vue/${i.id}.vue`,"success")):i.dsl&&await this.service.saveFile(i.dsl)}if(t==="update"){const i=e.data;if(r.isPageFile(i)&&(i.dir||i.raw))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;i&&r.isPageFile(i)&&i.raw?await this.service.removeRawPage(i.id):i.dir||(await this.service.removeFile(i.id),await this.service.removeHistory(i.id))}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))}gt(this.project)}async saveMaterials(){await St(),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 vg(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),gt(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 tn(i.dsl);await this.updateCurrent(o),gt(this.history)}}async publish(){const e=this.project.value;if(e){const t={...e.toDsl(),pages:e.getPages()};await this.service.publish(t)&&Fe("整站发布成功","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)&&Fe("发布成功","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&&!o.raw&&(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 Me(){const n=Sn(Ec,null);return n||qe.error("VTJEngine is not exist"),n}const bt=B({name:"RegionWrapper",props:{region:{type:String,required:!0}},setup(){return{regionRef:I()}},render(){const n=ca[this.region]||ca.EmptyRegion;return Ae(n,{...this.$props,...this.$attrs,ref:"regionRef"})}}),Tt=B({name:"WidgetWrapper",props:{region:{type:String,required:!0},widget:{type:Object,required:!0}},setup(){return{widgetRef:I()}},render(){return Ae(this.widget.component,{...this.widget.props,...this.$props,...this.$attrs,ref:"widgetRef"})}}),l4=B({name:"SkeletonWrapper",setup(){const n=I(),e=Me(),t=I({});return{skeletonRef:n,engine:e,widgets:t}},mounted(){this.engine.skeleton=this},render(){return Ae(u4,{...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?Hl(e.regionRef?.widgetsRef||[]):[]},getWidget(n){const e=kc.get(n);if(!e){qe.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)}}}),wt=B({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:Et(e.component),name:e.name,label:n,props:e.props||{}};{const t=n;return e=this.getSetter(t.name),{component:Et(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":De(n)?t="Object":Fn(n)&&(t="Function"));const r=fr.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:p,onRemove:h}=this;return Ae(v4,{context:n,current:e,name:t,label:r,title:i,setters:s,defaultSetter:c,variable:u,value:o,removable:p,options:a,onChange:l,onRemove:h})},emits:["change","remove"],methods:{getSetter(n){return typeof n=="string"?fr.get(n)||fr.defaultSetter:n},changeValue(n){this.$emit("change",this.name,n)},onRemove(n){this.$emit("remove",n)}}}),u4=B({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=I(!1),i=I(parseInt(t.leftWidth)),o=I(parseInt(t.rightWidth)),s={dirs:["e"],maxWidth:600,minWidth:49,onResizing(y,w){i.value=w.elementWidth.value},onEnd(y,w){i.value=w.elementWidth.value}},a={dirs:["w"],maxWidth:600,minWidth:2,onResizing(y,w){o.value=w.elementWidth.value},onEnd(y,w){o.value=w.elementWidth.value}},u=I(),l=I(),c=I(),p=I(),h=I(),f=I(),m=I(),v=I(),g=I(!1),S=I(!1);return e({brand:u,toolbar:l,actions:c,apps:p,workspace:h,settings:f,status:m,collapsed:g,settable:S,leftWidth:i,rightWidth:o,preview:v,isPreview:r}),(y,w)=>(b(),$(d(ed),{locale:d(Qc)},{default:k(()=>[x(d(To),{class:"v-skeleton"},{default:k(()=>[x(d(Yc),{class:"v-skeleton__header",height:y.headerHeight},{default:k(()=>[x(d(bt),{ref_key:"brand",ref:u,region:"Brand"},null,512),x(d(bt),{ref_key:"toolbar",ref:l,region:"Toolbar",preview:r.value},null,8,["preview"]),x(d(bt),{ref_key:"actions",ref:c,region:"Actions"},null,512)]),_:1},8,["height"]),x(d(To),{class:"v-skeleton__wrapper"},{default:k(()=>[r.value?N("",!0):Xt((b(),$(d(Do),{key:0,width:t.leftWidth,class:be(["v-skeleton__left",{"is-collapsed":g.value}])},{default:k(()=>[x(d(bt),{ref_key:"apps",ref:p,region:"Apps"},null,512)]),_:1},8,["width","class"])),[[d(Bi),s]]),x(d(Zc),{class:"v-skeleton__main"},{default:k(()=>[r.value?(b(),$(d(bt),{key:0,ref_key:"preview",ref:v,region:"Preview",preview:r.value},null,8,["preview"])):N("",!0),Xt(x(d(bt),{ref_key:"workspace",ref:h,region:"Workspace"},null,512),[[vr,!r.value]])]),_:1}),r.value?N("",!0):Xt((b(),$(d(Do),{key:1,width:t.rightWidth,class:"v-skeleton__right"},{default:k(()=>[x(d(bt),{ref_key:"settings",ref:f,region:"Settings"},null,512)]),_:1},8,["width"])),[[vr,S.value],[d(Bi),a]])]),_:1}),r.value?N("",!0):(b(),$(d(Xc),{key:0,class:"v-skeleton__footer",height:y.footerHeight},{default:k(()=>[x(d(bt),{ref_key:"status",ref:m,region:"Status"},null,512)]),_:1},8,["height"]))]),_:1})]),_:1},8,["locale"]))}}),c4={key:1},d4={class:"v-setter__content"},p4={key:0,class:"v-setter__input"},h4={class:"v-setter__action"},f4="{{",m4="}}",v4=B({__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=I(!1),o=I(""),s=I(t.setters.find(S=>S.name===t.defaultSetter)||t.setters[0]),a=I(t.value),u=O(()=>!!De(a.value)),l={[s.value.name]:a.value},c=S=>{l[s.value.name]=a.value,s.value=S,a.value=l[S.name]??void 0,p(a.value)};ve(()=>t.value,()=>{a.value=t.value}),ve(()=>t.defaultSetter,()=>{s.value=t.setters.find(S=>S.name===t.defaultSetter)||t.setters[0]});const p=S=>{r("change",S)},h=()=>{r("remove",t.name)},f=()=>{i.value=!0,o.value=De(a.value)?a.value.value:""},m=()=>{i.value=!1,o.value=""},v=async S=>Te(S,t.context,!0)?(l[s.value.name]=a.value,a.value=S,r("change",S),!0):!1,g=async()=>{await fn("确定要解除绑定吗?")&&(m(),a.value=void 0,r("change",""))};return(S,y)=>(b(),$(d(fa),{class:"v-setter",size:"small","label-positon":"left"},{label:k(()=>[t.title?(b(),$(d(kr),{key:0,placement:"top-start",content:t.title},{default:k(()=>[de(ne(t.label||t.name),1)]),_:1},8,["content"])):(b(),G("span",c4,ne(t.label||t.name),1))]),default:k(()=>[ae("div",d4,[s.value?(b(),G("div",p4,[u.value?N("",!0):(b(),$(Ue(s.value.component),ye({key:0,current:t.current,context:t.context},s.value.props,{options:t.options,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=w=>a.value=w),onChange:p,disabled:u.value}),null,16,["current","context","options","modelValue","disabled"])),u.value?(b(),$(d(Xe),{key:1,class:"v-expression-setter",disabled:"","model-value":"JSExpression"},{prefix:k(()=>[de(ne(f4))]),suffix:k(()=>[de(ne(m4))]),_:1})):N("",!0)])):N("",!0),ae("div",h4,[t.variable?(b(),$(d(_u),{key:0,onClick:f,class:be(["v-icon-vars",{"is-active":u.value}]),title:"绑定变量"},null,8,["class"])):N("",!0),t.setters.length>1?(b(),$(d(Ui),{key:1,disabled:u.value,size:"small","popper-class":"v-setter-switch",onCommand:c},{dropdown:k(()=>[x(d(Hi),null,{default:k(()=>[(b(!0),G(re,null,oe(t.setters,w=>(b(),$(d(gr),{command:w,key:w.name},{default:k(()=>[x(d(po),{class:be({"is-placeholder":w.name!==s.value.name})},null,8,["class"]),de(" "+ne(w.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:k(()=>[x(d(iu),{title:"切换设置器"})]),_:1},8,["disabled"])):N("",!0),t.removable?(b(),$(d(Pn),{key:2,onClick:h,title:"删除"})):N("",!0)])]),i.value?(b(),$(d(uw),{key:0,current:t.current,context:t.context,value:o.value,modelValue:i.value,"onUpdate:modelValue":y[1]||(y[1]=w=>i.value=w),submitMethod:v,onUnbind:g},null,8,["current","context","value","modelValue"])):N("",!0)]),_:1}))}}),g4={class:"v-empty-region"},y4=B({name:"EmptyRegion",__name:"empty",props:{region:{}},setup(n){return(e,t)=>(b(),G("div",g4,"找不到符合【"+ne(e.region)+"】名称的区域组件",1))}}),b4={class:"v-brand-region"},w4=B({name:"BrandRegion",inheritAttrs:!1,__name:"brand",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",b4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),_4={class:"v-toolbar-region"},x4=B({name:"ToolbarRegion",__name:"toolbar",props:{region:{},preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",_4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a,preview:o.preview},null,8,["region","widget","preview"]))),256))]))}}),S4={class:"v-actions-region"},j4=B({name:"ActionsRegion",inheritAttrs:!1,__name:"actions",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",S4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),k4={class:"v-apps-region"},E4={class:"v-apps-region__header"},$4={class:"v-apps-region__top"},V4={class:"v-apps-region__bottom"},C4={class:"v-apps-region__panels"},A4=B({name:"AppsRegion",inheritAttrs:!1,__name:"apps",props:{region:{},index:{default:0}},setup(n,{expose:e}){const t=n,r=Me(),{widgets:i,widgetsRef:o}=Ot(t.region),s=O(()=>i.value.filter(f=>f.openType==="panel")),a=O(()=>i.value.filter(f=>f.openType!=="panel")),u=s.value[t.index],l=I(u),c=I(u),p=f=>{l.value=f,c.value=c.value?.name===f.name?null:f},h=f=>{f.openType==="link"&&f.url&&window.open(f.url),f.openType==="dialog"&&nc({title:f.label,icon:f.icon,...f.props,content:f.component})};return ve(c,f=>{r.skeleton?.toggleCollapse(!f)}),e({widgets:i,widgetsRef:o,setActive:f=>{const m=s.value.find(v=>v.name===f);l.value=m,c.value=m}}),(f,m)=>(b(),G("div",k4,[ae("div",E4,[ae("div",$4,[(b(!0),G(re,null,oe(s.value,v=>(b(),$(d(ua),{key:`icon-${v.name}`,icon:v.icon,label:v.label,active:l.value?.name===v.name,open:c.value?.name===v.name,onClick:g=>p(v)},null,8,["icon","label","active","open","onClick"]))),128))]),ae("div",V4,[(b(!0),G(re,null,oe(a.value,v=>(b(),$(d(ua),{key:`icon-${v.name}`,icon:v.icon,label:v.label,onClick:g=>h(v)},null,8,["icon","label","onClick"]))),128))])]),ae("div",C4,[(b(!0),G(re,null,oe(s.value,v=>(b(),$(ha,{key:v.name},[l.value?.name===v.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:o,region:f.region,widget:v},null,8,["region","widget"])):N("",!0)],1024))),128))])]))}}),O4=B({name:"WorkspaceRegion",__name:"workspace",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region),o=zt(r.value.map(h=>({name:h.name,command:h.name,label:h.label,closable:!!h.closable,props:h.props||{},checked:!h.closable}))),s=O(()=>o.filter(h=>!h.closable||h.checked)),a=O(()=>o.map(h=>({...h,disabled:!h.closable}))),u=I(s.value[0]?.name),l=O(()=>o.find(h=>h.name===u.value)?.props||{}),c=h=>{const f=o.find(m=>m.name===h);f&&(f.checked=!1),u.value===h&&(u.value=s.value[0]?.name)},p=h=>{const f=o.find(m=>m.name===h.name);f&&f.closable&&(f.checked=!f.checked,f.checked&&(u.value=f.name),!f.checked&&u.value===f.name&&(u.value=s.value[0]?.name))};return e({currentTab:u,widgets:r,widgetsRef:i,openTab:(h,f={})=>{const m=o.find(v=>v.name===h);m&&(m.props=Object.assign({},m.props,f),m.checked=!0,u.value=m.name)}}),(h,f)=>(b(),$(d(Nr),{class:"v-workspace-region",items:s.value,menus:a.value,modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=m=>u.value=m),checkable:"",onRemove:c,onCommand:p},{default:k(()=>[(b(!0),G(re,null,oe(d(r),m=>(b(),G(re,{key:m.name},[u.value===m.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:h.region,widget:{...m,props:l.value}},null,8,["region","widget"])):N("",!0)],64))),128))]),_:1},8,["items","menus","modelValue"]))}}),T4=B({name:"SettingsRegion",__name:"settings",props:{region:{}},setup(n,{expose:e}){const t=n,r=Me(),{current:i}=Ie(),{selected:o,isSelectBlock:s}=mt(),a=O(()=>s.value?Ye.Block:Ye.Node),{widgets:u,widgetsRef:l}=Ot(t.region,a),c=O(()=>u.value.map(m=>({name:m.name,label:m.label}))),p=I(""),h=O(()=>{const m=o.value?.model;return m?r.assets.componentMap.get(m.name)?.doc:null});ve(i,m=>{r.skeleton?.settable(!!m)}),ve(a,()=>{p.value=c.value[0]?.name},{immediate:!0});const f=()=>{if(h.value){const m=r.skeleton?.getRegion("Workspace");m&&m.regionRef.openTab("Docs",{url:h.value})}};return e({widgets:u,widgetsRef:l}),(m,v)=>d(i)?(b(),$(d(ue),{key:0,class:"v-settings-region",fit:"",direction:"column"},{default:k(()=>[d(o)?(b(),$(d(ue),{key:0,flex:"",justify:"space-between",align:"center",class:"v-settings-region__header"},{default:k(()=>[x(d(ue),{class:"v-settings-region__title"},{default:k(()=>[x(d(mo)),ae("span",null,[de(ne(d(o)?.model.name)+": ",1),ae("i",null,ne(d(o)?.model.id),1)])]),_:1}),h.value?(b(),$(d(ue),{key:0},{default:k(()=>[x(d(Le),{onClick:f,icon:d(wu),mode:"text",label:"帮助"},null,8,["icon"])]),_:1})):N("",!0)]),_:1})):N("",!0),d(o)&&!d(o).model.locked?(b(),$(d(ue),{key:1,grow:"",padding:!1},{default:k(()=>[x(d(Nr),{items:c.value,modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=g=>p.value=g),stretch:"",body:{padding:!1}},{default:k(()=>[(b(!0),G(re,null,oe(d(u),g=>(b(),G(re,{key:g.name},[p.value===g.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:l,region:m.region,widget:g},null,8,["region","widget"])):N("",!0)],64))),128))]),_:1},8,["items","modelValue"])]),_:1})):N("",!0),d(o)?N("",!0):(b(),$(d(Ee),{key:2,description:"请在左侧画布选中节点"})),d(o)&&d(o).model.locked?(b(),$(d(Ee),{key:3,"image-size":1,description:"节点已被锁定, 禁止编辑"})):N("",!0)]),_:1})):N("",!0)}}),D4={class:"v-status-region"},I4=B({name:"StatusRegion",inheritAttrs:!1,__name:"status",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",D4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),B4=B({name:"PreviewRegion",__name:"preview",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region),o=zt(r.value.map(u=>({name:u.name,command:u.name,label:u.label,closable:!!u.closable,checked:!1}))),s=O(()=>o.filter(u=>!u.closable||u.checked)),a=I(s.value[0]?.name);return e({currentTab:a,widgets:r,widgetsRef:i}),(u,l)=>(b(),$(d(Nr),{class:"v-workspace-region",items:s.value,modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[(b(!0),G(re,null,oe(d(r),c=>(b(),$(ha,{key:c.name},[a.value===c.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:u.region,widget:c},null,8,["region","widget"])):N("",!0)],1024))),128))]),_:1},8,["items","modelValue"]))}}),ca={EmptyRegion:y4,Brand:w4,Toolbar:x4,Actions:j4,Apps:A4,Workspace:O4,Settings:T4,Status:I4,Preview:B4};export{e8 as M,X4 as V,Y4 as k,kc as r,He as y};
117
+ `),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 h of t){const f=l[h]?(await l[h]()).default:i[h];c.push(f)}o.load(c);const p=this.createEnv(e,r,c);this.renderer=new u4(p,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((g,S)=>(g[S]=i[S],g),{}),c={},{groups:p,componentMap:h}=a;for(const g of p.value){const S=g.names||[],y=l[t[g.library||""]];y&&S.forEach(w=>{const E=h.get(w);E?c[w]=gc(E,y):c[w]=y[w]})}const{adapter:f,globals:m}=u,v=wc(s.value?.apis,f);return{window:i,Vue:i.Vue,library:l,materials:r,components:c,container:i.document.body,apis:v,globals:m}}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 d4{constructor(e){this.service=e}components=[];componentMap=new Map;groups=I([]);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(f=>f.name),c=i.map(f=>this.getCateoryComponents(f,o)),p=c.reduce((f,m)=>m.count+f,0),h={name:r.name,label:s||a,count:p,names:l,library:u,children:c};t.push(h)}return t}load(e){const t=[...Uw,...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=mg(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 p=Array.isArray(c)?c:[c];let h=[];for(const f of p)h=h.concat(vr.getByType(f));return h};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 Oc=Symbol("VtjEngine");class r8 extends mo{app;skeleton;container;service;assets;simulator;emitter=U;project=I(null);current=I(null);context=I(null);isEmptyCurrent=I(!1);history=I(null);provider;changed=I(Symbol());constructor(e){super();const{container:t,service:r,project:i={},globals:o={},dependencies:s,materials:a,materialPath:u="./"}=e;this.container=t,this.service=r,this.provider=new Sc({mode:He.Design,globals:o,project:i,service:r,dependencies:s,materials:a,materialPath:u}),this.assets=new d4(this.service),this.simulator=new c4({engine:this,materialPath:u}),this.bindEvents(),this.init(i),qi(this.render.bind(this)),Wi(this.dispose.bind(this))}async init(e){const t=await this.service.init(e).catch(r=>(qe.warn("VTJEngine service init fail.",r),null));t&&(t.dependencies=o4.merge(t.dependencies||[]),this.project.value=new bg(t),this.saveMaterials(),this.triggerReady())}render(){const e=d(this.container);if(e){const t=fa(p4);t.provide(Oc,Rc(this)),t.mount(e),this.app=t}else qe.warn("VTJEngine constructor param [ container ] is undefined")}bindEvents(){U.on(ze,e=>this.saveProject(e)),U.on(dr,e=>this.saveBlockFile(e)),U.on(_n,e=>this.saveBlockFile(e)),U.on($i,()=>this.saveMaterials()),U.on(Bn,e=>this.activeFile(e)),U.on(Zl,()=>this.publish()),U.on(Xl,()=>this.publishCurrent()),U.on(pe,e=>this.changeFile(e)),U.on(we,()=>this.changeCurrentFile()),U.on(xn,e=>this.saveHistory(e)),U.on(pr,e=>this.loadHistory(e))}async activeFile(e){await ct();const t=e.model,r=e.model.currentFile;if(r){if(t.isPageFile(r)&&r.raw)return;const i=await this.service.getFile(r.id);i&&(r.dsl=i)}if(r?.dsl){const i=new tn(r.dsl);this.updateCurrent(i),this.initHistory(i)}else this.updateCurrent(null);yt(this.project)}async changeFile(e){await ct();const t=e.toDsl();this.service.saveFile(t),this.updateCurrent(e),this.history.value?.add(t),yt(this.history)}changeCurrentFile(){this.saveCurrentFile(),this.current.value&&(this.history.value?.add(this.current.value.toDsl()),yt(this.history))}async updateCurrent(e,t=!0){this.current.value=e,await ct(),this.context.value=this.simulator.renderer?.context||null,this.isEmptyCurrent.value=this.current.value?.nodes.length===0,this.changed.value=Symbol(),t&&yt(this.context)}async saveProject(e){const t=e.model.toDsl();await this.service.saveProject(t),yt(this.project)}async saveBlockFile(e){const t=e.type,r=e.model;if(t==="create"){const i=e.data;r.isPageFile(i)&&i.raw?(await this.service.createRawPage(i),Fe(`源码文件已经生成:/.vtj/vue/${i.id}.vue`,"success")):i.dsl&&await this.service.saveFile(i.dsl)}if(t==="update"){const i=e.data;if(r.isPageFile(i)&&(i.dir||i.raw))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;i&&r.isPageFile(i)&&i.raw?await this.service.removeRawPage(i.id):i.dir||(await this.service.removeFile(i.id),await this.service.removeHistory(i.id))}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))}yt(this.project)}async saveMaterials(){await ct(),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 wg(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),yt(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 tn(i.dsl);await this.updateCurrent(o),yt(this.history)}}async publish(){const e=this.project.value;if(e){const t={...e.toDsl(),pages:e.getPages()};await this.service.publish(t)&&Fe("整站发布成功","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)&&Fe("发布成功","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&&!o.raw&&(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 Me(){const n=Sn(Oc,null);return n||qe.error("VTJEngine is not exist"),n}const wt=B({name:"RegionWrapper",props:{region:{type:String,required:!0}},setup(){return{regionRef:I()}},render(){const n=pa[this.region]||pa.EmptyRegion;return Ae(n,{...this.$props,...this.$attrs,ref:"regionRef"})}}),Tt=B({name:"WidgetWrapper",props:{region:{type:String,required:!0},widget:{type:Object,required:!0}},setup(){return{widgetRef:I()}},render(){return Ae(this.widget.component,{...this.widget.props,...this.$props,...this.$attrs,ref:"widgetRef"})}}),p4=B({name:"SkeletonWrapper",setup(){const n=I(),e=Me(),t=I({});return{skeletonRef:n,engine:e,widgets:t}},mounted(){this.engine.skeleton=this},render(){return Ae(h4,{...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?Wl(e.regionRef?.widgetsRef||[]):[]},getWidget(n){const e=Ac.get(n);if(!e){qe.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)}}}),_t=B({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:Et(e.component),name:e.name,label:n,props:e.props||{}};{const t=n;return e=this.getSetter(t.name),{component:Et(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":De(n)?t="Object":Hn(n)&&(t="Function"));const r=vr.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:p,onRemove:h}=this;return Ae(w4,{context:n,current:e,name:t,label:r,title:i,setters:s,defaultSetter:c,variable:u,value:o,removable:p,options:a,onChange:l,onRemove:h})},emits:["change","remove"],methods:{getSetter(n){return typeof n=="string"?vr.get(n)||vr.defaultSetter:n},changeValue(n){this.$emit("change",this.name,n)},onRemove(n){this.$emit("remove",n)}}}),h4=B({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=I(!1),i=I(parseInt(t.leftWidth)),o=I(parseInt(t.rightWidth)),s={dirs:["e"],maxWidth:600,minWidth:49,onResizing(y,w){i.value=w.elementWidth.value},onEnd(y,w){i.value=w.elementWidth.value}},a={dirs:["w"],maxWidth:600,minWidth:2,onResizing(y,w){o.value=w.elementWidth.value},onEnd(y,w){o.value=w.elementWidth.value}},u=I(),l=I(),c=I(),p=I(),h=I(),f=I(),m=I(),v=I(),g=I(!1),S=I(!1);return e({brand:u,toolbar:l,actions:c,apps:p,workspace:h,settings:f,status:m,collapsed:g,settable:S,leftWidth:i,rightWidth:o,preview:v,isPreview:r}),(y,w)=>(b(),$(d(od),{locale:d(id)},{default:k(()=>[x(d(Ro),{class:"v-skeleton"},{default:k(()=>[x(d(td),{class:"v-skeleton__header",height:y.headerHeight},{default:k(()=>[x(d(wt),{ref_key:"brand",ref:u,region:"Brand"},null,512),x(d(wt),{ref_key:"toolbar",ref:l,region:"Toolbar",preview:r.value},null,8,["preview"]),x(d(wt),{ref_key:"actions",ref:c,region:"Actions"},null,512)]),_:1},8,["height"]),x(d(Ro),{class:"v-skeleton__wrapper"},{default:k(()=>[r.value?N("",!0):Xt((b(),$(d(Mo),{key:0,width:t.leftWidth,class:be(["v-skeleton__left",{"is-collapsed":g.value}])},{default:k(()=>[x(d(wt),{ref_key:"apps",ref:p,region:"Apps"},null,512)]),_:1},8,["width","class"])),[[d(zi),s]]),x(d(nd),{class:"v-skeleton__main"},{default:k(()=>[r.value?(b(),$(d(wt),{key:0,ref_key:"preview",ref:v,region:"Preview",preview:r.value},null,8,["preview"])):N("",!0),Xt(x(d(wt),{ref_key:"workspace",ref:h,region:"Workspace"},null,512),[[yr,!r.value]])]),_:1}),r.value?N("",!0):Xt((b(),$(d(Mo),{key:1,width:t.rightWidth,class:"v-skeleton__right"},{default:k(()=>[x(d(wt),{ref_key:"settings",ref:f,region:"Settings"},null,512)]),_:1},8,["width"])),[[yr,S.value],[d(zi),a]])]),_:1}),r.value?N("",!0):(b(),$(d(rd),{key:0,class:"v-skeleton__footer",height:y.footerHeight},{default:k(()=>[x(d(wt),{ref_key:"status",ref:m,region:"Status"},null,512)]),_:1},8,["height"]))]),_:1})]),_:1},8,["locale"]))}}),f4={key:1},m4={class:"v-setter__content"},v4={key:0,class:"v-setter__input"},g4={class:"v-setter__action"},y4="{{",b4="}}",w4=B({__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=I(!1),o=I(""),s=I(t.setters.find(S=>S.name===t.defaultSetter)||t.setters[0]),a=I(t.value),u=O(()=>!!De(a.value)),l={[s.value.name]:a.value},c=S=>{l[s.value.name]=a.value,s.value=S,a.value=l[S.name]??void 0,p(a.value)};ve(()=>t.value,()=>{a.value=t.value}),ve(()=>t.defaultSetter,()=>{s.value=t.setters.find(S=>S.name===t.defaultSetter)||t.setters[0]});const p=S=>{r("change",S)},h=()=>{r("remove",t.name)},f=()=>{i.value=!0,o.value=De(a.value)?a.value.value:""},m=()=>{i.value=!1,o.value=""},v=async S=>Te(S,t.context,!0)?(l[s.value.name]=a.value,a.value=S,r("change",S),!0):!1,g=async()=>{await fn("确定要解除绑定吗?")&&(m(),a.value=void 0,r("change",""))};return(S,y)=>(b(),$(d(va),{class:"v-setter",size:"small","label-positon":"left"},{label:k(()=>[t.title?(b(),$(d($r),{key:0,placement:"top-start",content:t.title},{default:k(()=>[de(ne(t.label||t.name),1)]),_:1},8,["content"])):(b(),G("span",f4,ne(t.label||t.name),1))]),default:k(()=>[ae("div",m4,[s.value?(b(),G("div",v4,[u.value?N("",!0):(b(),$(Ue(s.value.component),ye({key:0,current:t.current,context:t.context},s.value.props,{options:t.options,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=w=>a.value=w),onChange:p,disabled:u.value}),null,16,["current","context","options","modelValue","disabled"])),u.value?(b(),$(d(Xe),{key:1,class:"v-expression-setter",disabled:"","model-value":"JSExpression"},{prefix:k(()=>[de(ne(y4))]),suffix:k(()=>[de(ne(b4))]),_:1})):N("",!0)])):N("",!0),ae("div",g4,[t.variable?(b(),$(d(ju),{key:0,onClick:f,class:be(["v-icon-vars",{"is-active":u.value}]),title:"绑定变量"},null,8,["class"])):N("",!0),t.setters.length>1?(b(),$(d(Ki),{key:1,disabled:u.value,size:"small","popper-class":"v-setter-switch",onCommand:c},{dropdown:k(()=>[x(d(Ji),null,{default:k(()=>[(b(!0),G(re,null,oe(t.setters,w=>(b(),$(d(br),{command:w,key:w.name},{default:k(()=>[x(d(vo),{class:be({"is-placeholder":w.name!==s.value.name})},null,8,["class"]),de(" "+ne(w.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:k(()=>[x(d(au),{title:"切换设置器"})]),_:1},8,["disabled"])):N("",!0),t.removable?(b(),$(d(Nn),{key:2,onClick:h,title:"删除"})):N("",!0)])]),i.value?(b(),$(d(hw),{key:0,current:t.current,context:t.context,value:o.value,modelValue:i.value,"onUpdate:modelValue":y[1]||(y[1]=w=>i.value=w),submitMethod:v,onUnbind:g},null,8,["current","context","value","modelValue"])):N("",!0)]),_:1}))}}),_4={class:"v-empty-region"},x4=B({name:"EmptyRegion",__name:"empty",props:{region:{}},setup(n){return(e,t)=>(b(),G("div",_4,"找不到符合【"+ne(e.region)+"】名称的区域组件",1))}}),S4={class:"v-brand-region"},j4=B({name:"BrandRegion",inheritAttrs:!1,__name:"brand",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",S4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),k4={class:"v-toolbar-region"},E4=B({name:"ToolbarRegion",__name:"toolbar",props:{region:{},preview:{type:Boolean}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",k4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a,preview:o.preview},null,8,["region","widget","preview"]))),256))]))}}),$4={class:"v-actions-region"},V4=B({name:"ActionsRegion",inheritAttrs:!1,__name:"actions",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",$4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),C4={class:"v-apps-region"},A4={class:"v-apps-region__header"},O4={class:"v-apps-region__top"},T4={class:"v-apps-region__bottom"},D4={class:"v-apps-region__panels"},I4=B({name:"AppsRegion",inheritAttrs:!1,__name:"apps",props:{region:{},index:{default:0}},setup(n,{expose:e}){const t=n,r=Me(),{widgets:i,widgetsRef:o}=Ot(t.region),s=O(()=>i.value.filter(f=>f.openType==="panel")),a=O(()=>i.value.filter(f=>f.openType!=="panel")),u=s.value[t.index],l=I(u),c=I(u),p=f=>{l.value=f,c.value=c.value?.name===f.name?null:f},h=f=>{f.openType==="link"&&f.url&&window.open(f.url),f.openType==="dialog"&&ac({title:f.label,icon:f.icon,...f.props,content:f.component})};return ve(c,f=>{r.skeleton?.toggleCollapse(!f)}),e({widgets:i,widgetsRef:o,setActive:f=>{const m=s.value.find(v=>v.name===f);l.value=m,c.value=m}}),(f,m)=>(b(),G("div",C4,[ae("div",A4,[ae("div",O4,[(b(!0),G(re,null,oe(s.value,v=>(b(),$(d(da),{key:`icon-${v.name}`,icon:v.icon,label:v.label,active:l.value?.name===v.name,open:c.value?.name===v.name,onClick:g=>p(v)},null,8,["icon","label","active","open","onClick"]))),128))]),ae("div",T4,[(b(!0),G(re,null,oe(a.value,v=>(b(),$(d(da),{key:`icon-${v.name}`,icon:v.icon,label:v.label,onClick:g=>h(v)},null,8,["icon","label","onClick"]))),128))])]),ae("div",D4,[(b(!0),G(re,null,oe(s.value,v=>(b(),$(ma,{key:v.name},[l.value?.name===v.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:o,region:f.region,widget:v},null,8,["region","widget"])):N("",!0)],1024))),128))])]))}}),B4=B({name:"WorkspaceRegion",__name:"workspace",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region),o=zt(r.value.map(h=>({name:h.name,command:h.name,label:h.label,closable:!!h.closable,props:h.props||{},checked:!h.closable}))),s=O(()=>o.filter(h=>!h.closable||h.checked)),a=O(()=>o.map(h=>({...h,disabled:!h.closable}))),u=I(s.value[0]?.name),l=O(()=>o.find(h=>h.name===u.value)?.props||{}),c=h=>{const f=o.find(m=>m.name===h);f&&(f.checked=!1),u.value===h&&(u.value=s.value[0]?.name)},p=h=>{const f=o.find(m=>m.name===h.name);f&&f.closable&&(f.checked=!f.checked,f.checked&&(u.value=f.name),!f.checked&&u.value===f.name&&(u.value=s.value[0]?.name))};return e({currentTab:u,widgets:r,widgetsRef:i,openTab:(h,f={})=>{const m=o.find(v=>v.name===h);m&&(m.props=Object.assign({},m.props,f),m.checked=!0,u.value=m.name)}}),(h,f)=>(b(),$(d(Lr),{class:"v-workspace-region",items:s.value,menus:a.value,modelValue:u.value,"onUpdate:modelValue":f[0]||(f[0]=m=>u.value=m),checkable:"",onRemove:c,onCommand:p},{default:k(()=>[(b(!0),G(re,null,oe(d(r),m=>(b(),G(re,{key:m.name},[u.value===m.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:h.region,widget:{...m,props:l.value}},null,8,["region","widget"])):N("",!0)],64))),128))]),_:1},8,["items","menus","modelValue"]))}}),R4=B({name:"SettingsRegion",__name:"settings",props:{region:{}},setup(n,{expose:e}){const t=n,r=Me(),{current:i}=Ie(),{selected:o,isSelectBlock:s}=vt(),a=O(()=>s.value?Ye.Block:Ye.Node),{widgets:u,widgetsRef:l}=Ot(t.region,a),c=O(()=>u.value.map(m=>({name:m.name,label:m.label}))),p=I(""),h=O(()=>{const m=o.value?.model;return m?r.assets.componentMap.get(m.name)?.doc:null});ve(i,m=>{r.skeleton?.settable(!!m)}),ve(a,()=>{p.value=c.value[0]?.name},{immediate:!0});const f=()=>{if(h.value){const m=r.skeleton?.getRegion("Workspace");m&&m.regionRef.openTab("Docs",{url:h.value})}};return e({widgets:u,widgetsRef:l}),(m,v)=>d(i)?(b(),$(d(ue),{key:0,class:"v-settings-region",fit:"",direction:"column"},{default:k(()=>[d(o)?(b(),$(d(ue),{key:0,flex:"",justify:"space-between",align:"center",class:"v-settings-region__header"},{default:k(()=>[x(d(ue),{class:"v-settings-region__title"},{default:k(()=>[x(d(bo)),ae("span",null,[de(ne(d(o)?.model.name)+": ",1),ae("i",null,ne(d(o)?.model.id),1)])]),_:1}),h.value?(b(),$(d(ue),{key:0},{default:k(()=>[x(d(Le),{onClick:f,icon:d(Su),mode:"text",label:"帮助"},null,8,["icon"])]),_:1})):N("",!0)]),_:1})):N("",!0),d(o)&&!d(o).model.locked?(b(),$(d(ue),{key:1,grow:"",padding:!1},{default:k(()=>[x(d(Lr),{items:c.value,modelValue:p.value,"onUpdate:modelValue":v[0]||(v[0]=g=>p.value=g),stretch:"",body:{padding:!1}},{default:k(()=>[(b(!0),G(re,null,oe(d(u),g=>(b(),G(re,{key:g.name},[p.value===g.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:l,region:m.region,widget:g},null,8,["region","widget"])):N("",!0)],64))),128))]),_:1},8,["items","modelValue"])]),_:1})):N("",!0),d(o)?N("",!0):(b(),$(d(Ee),{key:2,description:"请在左侧画布选中节点"})),d(o)&&d(o).model.locked?(b(),$(d(Ee),{key:3,"image-size":1,description:"节点已被锁定, 禁止编辑"})):N("",!0)]),_:1})):N("",!0)}}),M4={class:"v-status-region"},P4=B({name:"StatusRegion",inheritAttrs:!1,__name:"status",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region);return e({widgets:r,widgetsRef:i}),(o,s)=>(b(),G("div",M4,[(b(!0),G(re,null,oe(d(r),a=>(b(),$(d(Tt),{ref_for:!0,ref_key:"widgetsRef",ref:i,region:o.region,widget:a},null,8,["region","widget"]))),256))]))}}),z4=B({name:"PreviewRegion",__name:"preview",props:{region:{}},setup(n,{expose:e}){const t=n,{widgets:r,widgetsRef:i}=Ot(t.region),o=zt(r.value.map(u=>({name:u.name,command:u.name,label:u.label,closable:!!u.closable,checked:!1}))),s=O(()=>o.filter(u=>!u.closable||u.checked)),a=I(s.value[0]?.name);return e({currentTab:a,widgets:r,widgetsRef:i}),(u,l)=>(b(),$(d(Lr),{class:"v-workspace-region",items:s.value,modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},{default:k(()=>[(b(!0),G(re,null,oe(d(r),c=>(b(),$(ma,{key:c.name},[a.value===c.name?(b(),$(d(Tt),{key:0,ref_for:!0,ref_key:"widgetsRef",ref:i,region:u.region,widget:c},null,8,["region","widget"])):N("",!0)],1024))),128))]),_:1},8,["items","modelValue"]))}}),pa={EmptyRegion:x4,Brand:j4,Toolbar:E4,Actions:V4,Apps:I4,Workspace:B4,Settings:R4,Status:P4,Preview:z4};export{t8 as D,n8 as L,r8 as M,Ac as r,He as y};
112
118
  function __vite__mapDeps(indexes) {
113
119
  if (!__vite__mapDeps.viteFileDeps) {
114
120
  __vite__mapDeps.viteFileDeps = ["./Editor-ctkAn2cu-O6Vp28_y.js","./monaco-editor-ginzV8u1.js","./monaco-editor-cf__QvdG.css","./@vue-lwVaHA3a.js"]