var ule=Object.defineProperty;var cle=(t,e,n)=>e in t?ule(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var dle=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var RT=(t,e,n)=>(cle(t,typeof e!="symbol"?e+"":e,n),n);var zut=dle((Fs,Vs)=>{const fle=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}};fle();function GN(t,e){const n=Object.create(null),r=t.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}function bt(t){if(Ye(t)){const e={};for(let n=0;n{if(n){const r=n.split(ple);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function j(t){let e="";if(St(t))e=t;else if(Ye(t))for(let n=0;nuv(n,e))}const ze=t=>St(t)?t:t==null?"":Ye(t)||Zt(t)&&(t.toString===j7||!kt(t.toString))?JSON.stringify(t,z7,2):String(t),z7=(t,e)=>e&&e.__v_isRef?z7(t,e.value):zg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:$x(e)?{[`Set(${e.size})`]:[...e.values()]}:Zt(e)&&!Ye(e)&&!m0(e)?String(e):e,bo={},Vg=[],or=()=>{},_le=()=>!1,Ole=/^on[^a-z]/,Mx=t=>Ole.test(t),qN=t=>t.startsWith("onUpdate:"),wi=Object.assign,KN=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},wle=Object.prototype.hasOwnProperty,Dn=(t,e)=>wle.call(t,e),Ye=Array.isArray,zg=t=>Nb(t)==="[object Map]",$x=t=>Nb(t)==="[object Set]",_f=t=>Nb(t)==="[object Date]",kt=t=>typeof t=="function",St=t=>typeof t=="string",v0=t=>typeof t=="symbol",Zt=t=>t!==null&&typeof t=="object",dp=t=>Zt(t)&&kt(t.then)&&kt(t.catch),j7=Object.prototype.toString,Nb=t=>j7.call(t),Sle=t=>Nb(t).slice(8,-1),m0=t=>Nb(t)==="[object Object]",JN=t=>St(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,$1=GN(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rx=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},xle=/-(\w)/g,Ws=Rx(t=>t.replace(xle,(e,n)=>n?n.toUpperCase():"")),Cle=/\B([A-Z])/g,Qf=Rx(t=>t.replace(Cle,"-$1").toLowerCase()),Mb=Rx(t=>t.charAt(0).toUpperCase()+t.slice(1)),Iy=Rx(t=>t?`on${Mb(t)}`:""),y0=(t,e)=>!Object.is(t,e),R1=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},wk=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Ele=t=>{const e=St(t)?Number(t):NaN;return isNaN(e)?t:e};let QL;const Tle=()=>QL||(QL=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let As;class W7{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=As,!e&&As&&(this.index=(As.scopes||(As.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=As;try{return As=this,e()}finally{As=n}}}on(){As=this}off(){As=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const e=new Set(t);return e.w=0,e.n=0,e},U7=t=>(t.w&Of)>0,Y7=t=>(t.n&Of)>0,Ple=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r{(c==="length"||c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),e){case"add":Ye(t)?JN(n)&&s.push(a.get("length")):(s.push(a.get(Jh)),zg(t)&&s.push(a.get(xk)));break;case"delete":Ye(t)||(s.push(a.get(Jh)),zg(t)&&s.push(a.get(xk)));break;case"set":zg(t)&&s.push(a.get(Jh));break}if(s.length===1)s[0]&&Ck(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);Ck(eM(l))}}function Ck(t,e){const n=Ye(t)?t:[...t];for(const r of n)r.computed&&UL(r);for(const r of n)r.computed||UL(r)}function UL(t,e){(t!==nu||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function Mle(t,e){var n;return(n=Sw.get(t))===null||n===void 0?void 0:n.get(e)}const $le=GN("__proto__,__v_isRef,__isVue"),G7=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(v0)),Rle=nM(),Dle=nM(!1,!0),Ile=nM(!0),YL=Lle();function Lle(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Mn(this);for(let i=0,a=this.length;i{t[e]=function(...n){Xv();const r=Mn(this)[e].apply(this,n);return Zv(),r}}),t}function Ble(t){const e=Mn(this);return as(e,"has",t),e.hasOwnProperty(t)}function nM(t=!1,e=!1){return function(r,o,i){if(o==="__v_isReactive")return!t;if(o==="__v_isReadonly")return t;if(o==="__v_isShallow")return e;if(o==="__v_raw"&&i===(t?e?eue:tz:e?ez:J7).get(r))return r;const a=Ye(r);if(!t){if(a&&Dn(YL,o))return Reflect.get(YL,o,i);if(o==="hasOwnProperty")return Ble}const s=Reflect.get(r,o,i);return(v0(o)?G7.has(o):$le(o))||(t||as(r,"get",o),e)?s:Pr(s)?a&&JN(o)?s:s.value:Zt(s)?t?$b(s):pn(s):s}}const Fle=q7(),Vle=q7(!0);function q7(t=!1){return function(n,r,o,i){let a=n[r];if(cv(a)&&Pr(a)&&!Pr(o))return!1;if(!t&&(!xw(o)&&!cv(o)&&(a=Mn(a),o=Mn(o)),!Ye(n)&&Pr(a)&&!Pr(o)))return a.value=o,!0;const s=Ye(n)&&JN(r)?Number(r)t,Dx=t=>Reflect.getPrototypeOf(t);function dO(t,e,n=!1,r=!1){t=t.__v_raw;const o=Mn(t),i=Mn(e);n||(e!==i&&as(o,"get",e),as(o,"get",i));const{has:a}=Dx(o),s=r?rM:n?aM:b0;if(a.call(o,e))return s(t.get(e));if(a.call(o,i))return s(t.get(i));t!==o&&t.get(e)}function fO(t,e=!1){const n=this.__v_raw,r=Mn(n),o=Mn(t);return e||(t!==o&&as(r,"has",t),as(r,"has",o)),t===o?n.has(t):n.has(t)||n.has(o)}function hO(t,e=!1){return t=t.__v_raw,!e&&as(Mn(t),"iterate",Jh),Reflect.get(t,"size",t)}function XL(t){t=Mn(t);const e=Mn(this);return Dx(e).has.call(e,t)||(e.add(t),ed(e,"add",t,t)),this}function ZL(t,e){e=Mn(e);const n=Mn(this),{has:r,get:o}=Dx(n);let i=r.call(n,t);i||(t=Mn(t),i=r.call(n,t));const a=o.call(n,t);return n.set(t,e),i?y0(e,a)&&ed(n,"set",t,e):ed(n,"add",t,e),this}function GL(t){const e=Mn(this),{has:n,get:r}=Dx(e);let o=n.call(e,t);o||(t=Mn(t),o=n.call(e,t)),r&&r.call(e,t);const i=e.delete(t);return o&&ed(e,"delete",t,void 0),i}function qL(){const t=Mn(this),e=t.size!==0,n=t.clear();return e&&ed(t,"clear",void 0,void 0),n}function pO(t,e){return function(r,o){const i=this,a=i.__v_raw,s=Mn(a),l=e?rM:t?aM:b0;return!t&&as(s,"iterate",Jh),a.forEach((u,c)=>r.call(o,l(u),l(c),i))}}function gO(t,e,n){return function(...r){const o=this.__v_raw,i=Mn(o),a=zg(i),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,u=o[t](...r),c=n?rM:e?aM:b0;return!e&&as(i,"iterate",l?xk:Jh),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Vd(t){return function(...e){return t==="delete"?!1:this}}function Ule(){const t={get(i){return dO(this,i)},get size(){return hO(this)},has:fO,add:XL,set:ZL,delete:GL,clear:qL,forEach:pO(!1,!1)},e={get(i){return dO(this,i,!1,!0)},get size(){return hO(this)},has:fO,add:XL,set:ZL,delete:GL,clear:qL,forEach:pO(!1,!0)},n={get(i){return dO(this,i,!0)},get size(){return hO(this,!0)},has(i){return fO.call(this,i,!0)},add:Vd("add"),set:Vd("set"),delete:Vd("delete"),clear:Vd("clear"),forEach:pO(!0,!1)},r={get(i){return dO(this,i,!0,!0)},get size(){return hO(this,!0)},has(i){return fO.call(this,i,!0)},add:Vd("add"),set:Vd("set"),delete:Vd("delete"),clear:Vd("clear"),forEach:pO(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=gO(i,!1,!1),n[i]=gO(i,!0,!1),e[i]=gO(i,!1,!0),r[i]=gO(i,!0,!0)}),[t,n,e,r]}const[Yle,Xle,Zle,Gle]=Ule();function oM(t,e){const n=e?t?Gle:Zle:t?Xle:Yle;return(r,o,i)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?r:Reflect.get(Dn(n,o)&&o in r?n:r,o,i)}const qle={get:oM(!1,!1)},Kle={get:oM(!1,!0)},Jle={get:oM(!0,!1)},J7=new WeakMap,ez=new WeakMap,tz=new WeakMap,eue=new WeakMap;function tue(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nue(t){return t.__v_skip||!Object.isExtensible(t)?0:tue(Sle(t))}function pn(t){return cv(t)?t:iM(t,!1,K7,qle,J7)}function nz(t){return iM(t,!1,Hle,Kle,ez)}function $b(t){return iM(t,!0,Qle,Jle,tz)}function iM(t,e,n,r,o){if(!Zt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=o.get(t);if(i)return i;const a=nue(t);if(a===0)return t;const s=new Proxy(t,a===2?r:n);return o.set(t,s),s}function jg(t){return cv(t)?jg(t.__v_raw):!!(t&&t.__v_isReactive)}function cv(t){return!!(t&&t.__v_isReadonly)}function xw(t){return!!(t&&t.__v_isShallow)}function rz(t){return jg(t)||cv(t)}function Mn(t){const e=t&&t.__v_raw;return e?Mn(e):t}function uu(t){return ww(t,"__v_skip",!0),t}const b0=t=>Zt(t)?pn(t):t,aM=t=>Zt(t)?$b(t):t;function sM(t){ff&&nu&&(t=Mn(t),Z7(t.dep||(t.dep=eM())))}function Ix(t,e){t=Mn(t);const n=t.dep;n&&Ck(n)}function Pr(t){return!!(t&&t.__v_isRef===!0)}function z(t){return oz(t,!1)}function wr(t){return oz(t,!0)}function oz(t,e){return Pr(t)?t:new rue(t,e)}class rue{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Mn(e),this._value=n?e:b0(e)}get value(){return sM(this),this._value}set value(e){const n=this.__v_isShallow||xw(e)||cv(e);e=n?e:Mn(e),y0(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:b0(e),Ix(this))}}function D1(t){Ix(t)}function p(t){return Pr(t)?t.value:t}const oue={get:(t,e,n)=>p(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const o=t[e];return Pr(o)&&!Pr(n)?(o.value=n,!0):Reflect.set(t,e,n,r)}};function iz(t){return jg(t)?t:new Proxy(t,oue)}class iue{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>sM(this),()=>Ix(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function aue(t){return new iue(t)}function Mo(t){const e=Ye(t)?new Array(t.length):{};for(const n in t)e[n]=jn(t,n);return e}class sue{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return Mle(Mn(this._object),this._key)}}function jn(t,e,n){const r=t[e];return Pr(r)?r:new sue(t,e,n)}var az;class lue{constructor(e,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[az]=!1,this._dirty=!0,this.effect=new tM(e,()=>{this._dirty||(this._dirty=!0,Ix(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const e=Mn(this);return sM(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}az="__v_isReadonly";function uue(t,e,n=!1){let r,o;const i=kt(t);return i?(r=t,o=or):(r=t.get,o=t.set),new lue(r,o,i||!o,n)}function cue(t,...e){}function hf(t,e,n,r){let o;try{o=r?t(...r):t()}catch(i){Lx(i,e,n)}return o}function _l(t,e,n,r){if(kt(t)){const i=hf(t,e,n,r);return i&&dp(i)&&i.catch(a=>{Lx(a,e,n)}),i}const o=[];for(let i=0;i>>1;O0(ra[r])Qu&&ra.splice(e,1)}function pue(t){Ye(t)?Wg.push(...t):(!zc||!zc.includes(t,t.allowRecurse?Ah+1:Ah))&&Wg.push(t),lz()}function KL(t,e=_0?Qu+1:0){for(;eO0(n)-O0(r)),Ah=0;Aht.id==null?1/0:t.id,gue=(t,e)=>{const n=O0(t)-O0(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function cz(t){Ek=!1,_0=!0,ra.sort(gue);const e=or;try{for(Qu=0;QuSt(h)?h.trim():h)),d&&(o=n.map(wk))}let s,l=r[s=Iy(e)]||r[s=Iy(Ws(e))];!l&&i&&(l=r[s=Iy(Qf(e))]),l&&_l(l,t,6,o);const u=r[s+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,_l(u,t,6,o)}}function dz(t,e,n=!1){const r=e.emitsCache,o=r.get(t);if(o!==void 0)return o;const i=t.emits;let a={},s=!1;if(!kt(t)){const l=u=>{const c=dz(u,e,!0);c&&(s=!0,wi(a,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!s?(Zt(t)&&r.set(t,null),null):(Ye(i)?i.forEach(l=>a[l]=null):wi(a,i),Zt(t)&&r.set(t,a),a)}function Bx(t,e){return!t||!Mx(e)?!1:(e=e.slice(2).replace(/Once$/,""),Dn(t,e[0].toLowerCase()+e.slice(1))||Dn(t,Qf(e))||Dn(t,e))}let ji=null,fz=null;function Cw(t){const e=ji;return ji=t,fz=t&&t.type.__scopeId||null,e}function V(t,e=ji,n){if(!e||t._n)return t;const r=(...o)=>{r._d&&u4(-1);const i=Cw(e);let a;try{a=t(...o)}finally{Cw(i),r._d&&u4(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function DT(t){const{type:e,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[a],slots:s,attrs:l,emit:u,render:c,renderCache:d,data:f,setupState:h,ctx:g,inheritAttrs:v}=t;let m,b;const w=Cw(t);try{if(n.shapeFlag&4){const S=o||r;m=Vu(c.call(S,S,d,i,h,f,g)),b=l}else{const S=e;m=Vu(S.length>1?S(i,{attrs:l,slots:s,emit:u}):S(i,null)),b=e.props?l:mue(l)}}catch(S){Vy.length=0,Lx(S,t,1),m=B(vi)}let O=m;if(b&&v!==!1){const S=Object.keys(b),{shapeFlag:x}=O;S.length&&x&7&&(a&&S.some(qN)&&(b=yue(b,a)),O=td(O,b))}return n.dirs&&(O=td(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),m=O,Cw(w),m}const mue=t=>{let e;for(const n in t)(n==="class"||n==="style"||Mx(n))&&((e||(e={}))[n]=t[n]);return e},yue=(t,e)=>{const n={};for(const r in t)(!qN(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function bue(t,e,n){const{props:r,children:o,component:i}=t,{props:a,children:s,patchFlag:l}=e,u=i.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?JL(r,a,u):!!a;if(l&8){const c=e.dynamicProps;for(let d=0;dt.__isSuspense;function wue(t,e){e&&e.pendingBranch?Ye(t)?e.effects.push(...t):e.effects.push(t):pue(t)}function mn(t,e){if(Ho){let n=Ho.provides;const r=Ho.parent&&Ho.parent.provides;r===n&&(n=Ho.provides=Object.create(r)),n[t]=e}}function gt(t,e,n=!1){const r=Ho||ji;if(r){const o=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&t in o)return o[t];if(arguments.length>1)return n&&kt(e)?e.call(r.proxy):e}}function ua(t,e){return cM(t,null,e)}const vO={};function Le(t,e,n){return cM(t,e,n)}function cM(t,e,{immediate:n,deep:r,flush:o,onTrack:i,onTrigger:a}=bo){const s=Q7()===(Ho==null?void 0:Ho.scope)?Ho:null;let l,u=!1,c=!1;if(Pr(t)?(l=()=>t.value,u=xw(t)):jg(t)?(l=()=>t,r=!0):Ye(t)?(c=!0,u=t.some(O=>jg(O)||xw(O)),l=()=>t.map(O=>{if(Pr(O))return O.value;if(jg(O))return Qh(O);if(kt(O))return hf(O,s,2)})):kt(t)?e?l=()=>hf(t,s,2):l=()=>{if(!(s&&s.isUnmounted))return d&&d(),_l(t,s,3,[f])}:l=or,e&&r){const O=l;l=()=>Qh(O())}let d,f=O=>{d=b.onStop=()=>{hf(O,s,4)}},h;if(C0)if(f=or,e?n&&_l(e,s,3,[l(),c?[]:void 0,f]):l(),o==="sync"){const O=lce();h=O.__watcherHandles||(O.__watcherHandles=[])}else return or;let g=c?new Array(t.length).fill(vO):vO;const v=()=>{if(!!b.active)if(e){const O=b.run();(r||u||(c?O.some((S,x)=>y0(S,g[x])):y0(O,g)))&&(d&&d(),_l(e,s,3,[O,g===vO?void 0:c&&g[0]===vO?[]:g,f]),g=O)}else b.run()};v.allowRecurse=!!e;let m;o==="sync"?m=v:o==="post"?m=()=>Xa(v,s&&s.suspense):(v.pre=!0,s&&(v.id=s.uid),m=()=>uM(v));const b=new tM(l,m);e?n?v():g=b.run():o==="post"?Xa(b.run.bind(b),s&&s.suspense):b.run();const w=()=>{b.stop(),s&&s.scope&&KN(s.scope.effects,b)};return h&&h.push(w),w}function Sue(t,e,n){const r=this.proxy,o=St(t)?t.includes(".")?hz(r,t):()=>r[t]:t.bind(r,r);let i;kt(e)?i=e:(i=e.handler,n=e);const a=Ho;dv(this);const s=cM(o,i.bind(r),n);return a?dv(a):ep(),s}function hz(t,e){const n=e.split(".");return()=>{let r=t;for(let o=0;o{Qh(n,e)});else if(m0(t))for(const n in t)Qh(t[n],e);return t}function pz(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return jt(()=>{t.isMounted=!0}),Yn(()=>{t.isUnmounting=!0}),t}const il=[Function,Array],xue={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:il,onEnter:il,onAfterEnter:il,onEnterCancelled:il,onBeforeLeave:il,onLeave:il,onAfterLeave:il,onLeaveCancelled:il,onBeforeAppear:il,onAppear:il,onAfterAppear:il,onAppearCancelled:il},setup(t,{slots:e}){const n=Kt(),r=pz();let o;return()=>{const i=e.default&&dM(e.default(),!0);if(!i||!i.length)return;let a=i[0];if(i.length>1){for(const v of i)if(v.type!==vi){a=v;break}}const s=Mn(t),{mode:l}=s;if(r.isLeaving)return IT(a);const u=e4(a);if(!u)return IT(a);const c=w0(u,s,r,n);S0(u,c);const d=n.subTree,f=d&&e4(d);let h=!1;const{getTransitionKey:g}=u.type;if(g){const v=g();o===void 0?o=v:v!==o&&(o=v,h=!0)}if(f&&f.type!==vi&&(!Ph(u,f)||h)){const v=w0(f,s,r,n);if(S0(f,v),l==="out-in")return r.isLeaving=!0,v.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},IT(a);l==="in-out"&&u.type!==vi&&(v.delayLeave=(m,b,w)=>{const O=vz(r,f);O[String(f.key)]=f,m._leaveCb=()=>{b(),m._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=w})}return a}}},gz=xue;function vz(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function w0(t,e,n,r){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:v,onAppear:m,onAfterAppear:b,onAppearCancelled:w}=e,O=String(t.key),S=vz(n,t),x=(T,M)=>{T&&_l(T,r,9,M)},C=(T,M)=>{const k=M[1];x(T,M),Ye(T)?T.every(P=>P.length<=1)&&k():T.length<=1&&k()},E={mode:i,persisted:a,beforeEnter(T){let M=s;if(!n.isMounted)if(o)M=v||s;else return;T._leaveCb&&T._leaveCb(!0);const k=S[O];k&&Ph(t,k)&&k.el._leaveCb&&k.el._leaveCb(),x(M,[T])},enter(T){let M=l,k=u,P=c;if(!n.isMounted)if(o)M=m||l,k=b||u,P=w||c;else return;let R=!1;const D=T._enterCb=F=>{R||(R=!0,F?x(P,[T]):x(k,[T]),E.delayedLeave&&E.delayedLeave(),T._enterCb=void 0)};M?C(M,[T,D]):D()},leave(T,M){const k=String(t.key);if(T._enterCb&&T._enterCb(!0),n.isUnmounting)return M();x(d,[T]);let P=!1;const R=T._leaveCb=D=>{P||(P=!0,M(),D?x(g,[T]):x(h,[T]),T._leaveCb=void 0,S[k]===t&&delete S[k])};S[k]=t,f?C(f,[T,R]):R()},clone(T){return w0(T,e,n,r)}};return E}function IT(t){if(Fx(t))return t=td(t),t.children=null,t}function e4(t){return Fx(t)?t.children?t.children[0]:void 0:t}function S0(t,e){t.shapeFlag&6&&t.component?S0(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function dM(t,e=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;i!!t.type.__asyncLoader,Fx=t=>t.type.__isKeepAlive;function Vx(t,e){yz(t,"a",e)}function mz(t,e){yz(t,"da",e)}function yz(t,e,n=Ho){const r=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(zx(e,r,n),n){let o=n.parent;for(;o&&o.parent;)Fx(o.parent.vnode)&&Cue(r,e,n,o),o=o.parent}}function Cue(t,e,n,r){const o=zx(e,t,r,!0);Hf(()=>{KN(r[e],o)},n)}function zx(t,e,n=Ho,r=!1){if(n){const o=n[t]||(n[t]=[]),i=e.__weh||(e.__weh=(...a)=>{if(n.isUnmounted)return;Xv(),dv(n);const s=_l(e,n,t,a);return ep(),Zv(),s});return r?o.unshift(i):o.push(i),i}}const gd=t=>(e,n=Ho)=>(!C0||t==="sp")&&zx(t,(...r)=>e(...r),n),jx=gd("bm"),jt=gd("m"),fM=gd("bu"),_u=gd("u"),Yn=gd("bum"),Hf=gd("um"),Eue=gd("sp"),Tue=gd("rtg"),kue=gd("rtc");function Aue(t,e=Ho){zx("ec",t,e)}function Yt(t,e){const n=ji;if(n===null)return t;const r=Hx(n)||n.proxy,o=t.dirs||(t.dirs=[]);for(let i=0;ie(a,s,void 0,i&&i[s]));else{const a=Object.keys(t);o=new Array(a.length);for(let s=0,l=a.length;s{const i=r.fn(...o);return i&&(i.key=r.key),i}:r.fn)}return t}function ke(t,e,n={},r,o){if(ji.isCE||ji.parent&&Ly(ji.parent)&&ji.parent.isCE)return e!=="default"&&(n.name=e),B("slot",n,r&&r());let i=t[e];i&&i._c&&(i._d=!1),N();const a=i&&_z(i(n)),s=me(ut,{key:n.key||a&&a.key||`_${e}`},a||(r?r():[]),a&&t._===1?64:-2);return!o&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),i&&i._c&&(i._d=!0),s}function _z(t){return t.some(e=>Mr(e)?!(e.type===vi||e.type===ut&&!_z(e.children)):!0)?t:null}function Nue(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:Iy(r)]=t[r];return n}const Tk=t=>t?Mz(t)?Hx(t)||t.proxy:Tk(t.parent):null,By=wi(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Tk(t.parent),$root:t=>Tk(t.root),$emit:t=>t.emit,$options:t=>gM(t),$forceUpdate:t=>t.f||(t.f=()=>uM(t.update)),$nextTick:t=>t.n||(t.n=wt.bind(t.proxy)),$watch:t=>Sue.bind(t)}),LT=(t,e)=>t!==bo&&!t.__isScriptSetup&&Dn(t,e),Mue={get({_:t},e){const{ctx:n,setupState:r,data:o,props:i,accessCache:a,type:s,appContext:l}=t;let u;if(e[0]!=="$"){const h=a[e];if(h!==void 0)switch(h){case 1:return r[e];case 2:return o[e];case 4:return n[e];case 3:return i[e]}else{if(LT(r,e))return a[e]=1,r[e];if(o!==bo&&Dn(o,e))return a[e]=2,o[e];if((u=t.propsOptions[0])&&Dn(u,e))return a[e]=3,i[e];if(n!==bo&&Dn(n,e))return a[e]=4,n[e];kk&&(a[e]=0)}}const c=By[e];let d,f;if(c)return e==="$attrs"&&as(t,"get",e),c(t);if((d=s.__cssModules)&&(d=d[e]))return d;if(n!==bo&&Dn(n,e))return a[e]=4,n[e];if(f=l.config.globalProperties,Dn(f,e))return f[e]},set({_:t},e,n){const{data:r,setupState:o,ctx:i}=t;return LT(o,e)?(o[e]=n,!0):r!==bo&&Dn(r,e)?(r[e]=n,!0):Dn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:i}},a){let s;return!!n[a]||t!==bo&&Dn(t,a)||LT(e,a)||(s=i[0])&&Dn(s,a)||Dn(r,a)||Dn(By,a)||Dn(o.config.globalProperties,a)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Dn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};let kk=!0;function $ue(t){const e=gM(t),n=t.proxy,r=t.ctx;kk=!1,e.beforeCreate&&n4(e.beforeCreate,t,"bc");const{data:o,computed:i,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:v,deactivated:m,beforeDestroy:b,beforeUnmount:w,destroyed:O,unmounted:S,render:x,renderTracked:C,renderTriggered:E,errorCaptured:T,serverPrefetch:M,expose:k,inheritAttrs:P,components:R,directives:D,filters:F}=e;if(u&&Rue(u,r,null,t.appContext.config.unwrapInjectedRef),a)for(const Q in a){const L=a[Q];kt(L)&&(r[Q]=L.bind(n))}if(o){const Q=o.call(n,n);Zt(Q)&&(t.data=pn(Q))}if(kk=!0,i)for(const Q in i){const L=i[Q],H=kt(L)?L.bind(n,n):kt(L.get)?L.get.bind(n,n):or,re=!kt(L)&&kt(L.set)?L.set.bind(n):or,U=$({get:H,set:re});Object.defineProperty(r,Q,{enumerable:!0,configurable:!0,get:()=>U.value,set:J=>U.value=J})}if(s)for(const Q in s)Oz(s[Q],r,n,Q);if(l){const Q=kt(l)?l.call(n):l;Reflect.ownKeys(Q).forEach(L=>{mn(L,Q[L])})}c&&n4(c,t,"c");function I(Q,L){Ye(L)?L.forEach(H=>Q(H.bind(n))):L&&Q(L.bind(n))}if(I(jx,d),I(jt,f),I(fM,h),I(_u,g),I(Vx,v),I(mz,m),I(Aue,T),I(kue,C),I(Tue,E),I(Yn,w),I(Hf,S),I(Eue,M),Ye(k))if(k.length){const Q=t.exposed||(t.exposed={});k.forEach(L=>{Object.defineProperty(Q,L,{get:()=>n[L],set:H=>n[L]=H})})}else t.exposed||(t.exposed={});x&&t.render===or&&(t.render=x),P!=null&&(t.inheritAttrs=P),R&&(t.components=R),D&&(t.directives=D)}function Rue(t,e,n=or,r=!1){Ye(t)&&(t=Ak(t));for(const o in t){const i=t[o];let a;Zt(i)?"default"in i?a=gt(i.from||o,i.default,!0):a=gt(i.from||o):a=gt(i),Pr(a)&&r?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):e[o]=a}}function n4(t,e,n){_l(Ye(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function Oz(t,e,n,r){const o=r.includes(".")?hz(n,r):()=>n[r];if(St(t)){const i=e[t];kt(i)&&Le(o,i)}else if(kt(t))Le(o,t.bind(n));else if(Zt(t))if(Ye(t))t.forEach(i=>Oz(i,e,n,r));else{const i=kt(t.handler)?t.handler.bind(n):e[t.handler];kt(i)&&Le(o,i,t)}}function gM(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:o,optionsCache:i,config:{optionMergeStrategies:a}}=t.appContext,s=i.get(e);let l;return s?l=s:!o.length&&!n&&!r?l=e:(l={},o.length&&o.forEach(u=>Ew(l,u,a,!0)),Ew(l,e,a)),Zt(e)&&i.set(e,l),l}function Ew(t,e,n,r=!1){const{mixins:o,extends:i}=e;i&&Ew(t,i,n,!0),o&&o.forEach(a=>Ew(t,a,n,!0));for(const a in e)if(!(r&&a==="expose")){const s=Due[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const Due={data:r4,props:Ch,emits:Ch,methods:Ch,computed:Ch,beforeCreate:Ca,created:Ca,beforeMount:Ca,mounted:Ca,beforeUpdate:Ca,updated:Ca,beforeDestroy:Ca,beforeUnmount:Ca,destroyed:Ca,unmounted:Ca,activated:Ca,deactivated:Ca,errorCaptured:Ca,serverPrefetch:Ca,components:Ch,directives:Ch,watch:Lue,provide:r4,inject:Iue};function r4(t,e){return e?t?function(){return wi(kt(t)?t.call(this,this):t,kt(e)?e.call(this,this):e)}:e:t}function Iue(t,e){return Ch(Ak(t),Ak(e))}function Ak(t){if(Ye(t)){const e={};for(let n=0;n0)&&!(a&16)){if(a&8){const c=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,h]=Sz(d,e,!0);wi(a,f),h&&s.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!i&&!l)return Zt(t)&&r.set(t,Vg),Vg;if(Ye(i))for(let c=0;c-1,h[1]=v<0||g-1||Dn(h,"default"))&&s.push(d)}}}const u=[a,s];return Zt(t)&&r.set(t,u),u}function o4(t){return t[0]!=="$"}function i4(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function a4(t,e){return i4(t)===i4(e)}function s4(t,e){return Ye(e)?e.findIndex(n=>a4(n,t)):kt(e)&&a4(e,t)?0:-1}const xz=t=>t[0]==="_"||t==="$stable",vM=t=>Ye(t)?t.map(Vu):[Vu(t)],Vue=(t,e,n)=>{if(e._n)return e;const r=V((...o)=>vM(e(...o)),n);return r._c=!1,r},Cz=(t,e,n)=>{const r=t._ctx;for(const o in t){if(xz(o))continue;const i=t[o];if(kt(i))e[o]=Vue(o,i,r);else if(i!=null){const a=vM(i);e[o]=()=>a}}},Ez=(t,e)=>{const n=vM(e);t.slots.default=()=>n},zue=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Mn(e),ww(e,"_",n)):Cz(e,t.slots={})}else t.slots={},e&&Ez(t,e);ww(t.slots,Qx,1)},jue=(t,e,n)=>{const{vnode:r,slots:o}=t;let i=!0,a=bo;if(r.shapeFlag&32){const s=e._;s?n&&s===1?i=!1:(wi(o,e),!n&&s===1&&delete o._):(i=!e.$stable,Cz(e,o)),a=e}else e&&(Ez(t,e),a={default:1});if(i)for(const s in o)!xz(s)&&!(s in a)&&delete o[s]};function Tz(){return{app:null,config:{isNativeTag:_le,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Wue=0;function Que(t,e){return function(r,o=null){kt(r)||(r=Object.assign({},r)),o!=null&&!Zt(o)&&(o=null);const i=Tz(),a=new Set;let s=!1;const l=i.app={_uid:Wue++,_component:r,_props:o,_container:null,_context:i,_instance:null,version:uce,get config(){return i.config},set config(u){},use(u,...c){return a.has(u)||(u&&kt(u.install)?(a.add(u),u.install(l,...c)):kt(u)&&(a.add(u),u(l,...c))),l},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),l},component(u,c){return c?(i.components[u]=c,l):i.components[u]},directive(u,c){return c?(i.directives[u]=c,l):i.directives[u]},mount(u,c,d){if(!s){const f=B(r,o);return f.appContext=i,c&&e?e(f,u):t(f,u,d),s=!0,l._container=u,u.__vue_app__=l,Hx(f.component)||f.component.proxy}},unmount(){s&&(t(null,l._container),delete l._container.__vue_app__)},provide(u,c){return i.provides[u]=c,l}};return l}}function Nk(t,e,n,r,o=!1){if(Ye(t)){t.forEach((f,h)=>Nk(f,e&&(Ye(e)?e[h]:e),n,r,o));return}if(Ly(r)&&!o)return;const i=r.shapeFlag&4?Hx(r.component)||r.component.proxy:r.el,a=o?null:i,{i:s,r:l}=t,u=e&&e.r,c=s.refs===bo?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(St(u)?(c[u]=null,Dn(d,u)&&(d[u]=null)):Pr(u)&&(u.value=null)),kt(l))hf(l,s,12,[a,c]);else{const f=St(l),h=Pr(l);if(f||h){const g=()=>{if(t.f){const v=f?Dn(d,l)?d[l]:c[l]:l.value;o?Ye(v)&&KN(v,i):Ye(v)?v.includes(i)||v.push(i):f?(c[l]=[i],Dn(d,l)&&(d[l]=c[l])):(l.value=[i],t.k&&(c[t.k]=l.value))}else f?(c[l]=a,Dn(d,l)&&(d[l]=a)):h&&(l.value=a,t.k&&(c[t.k]=a))};a?(g.id=-1,Xa(g,n)):g()}}}const Xa=wue;function Hue(t){return Uue(t)}function Uue(t,e){const n=Tle();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=or,insertStaticContent:g}=t,v=(G,ve,q,Ie=null,Ee=null,Oe=null,se=!1,X=null,oe=!!ve.dynamicChildren)=>{if(G===ve)return;G&&!Ph(G,ve)&&(Ie=ne(G),J(G,Ee,Oe,!0),G=null),ve.patchFlag===-2&&(oe=!1,ve.dynamicChildren=null);const{type:ce,ref:Ae,shapeFlag:ye}=ve;switch(ce){case Gv:m(G,ve,q,Ie);break;case vi:b(G,ve,q,Ie);break;case BT:G==null&&w(ve,q,Ie,se);break;case ut:R(G,ve,q,Ie,Ee,Oe,se,X,oe);break;default:ye&1?x(G,ve,q,Ie,Ee,Oe,se,X,oe):ye&6?D(G,ve,q,Ie,Ee,Oe,se,X,oe):(ye&64||ye&128)&&ce.process(G,ve,q,Ie,Ee,Oe,se,X,oe,Ne)}Ae!=null&&Ee&&Nk(Ae,G&&G.ref,Oe,ve||G,!ve)},m=(G,ve,q,Ie)=>{if(G==null)r(ve.el=s(ve.children),q,Ie);else{const Ee=ve.el=G.el;ve.children!==G.children&&u(Ee,ve.children)}},b=(G,ve,q,Ie)=>{G==null?r(ve.el=l(ve.children||""),q,Ie):ve.el=G.el},w=(G,ve,q,Ie)=>{[G.el,G.anchor]=g(G.children,ve,q,Ie,G.el,G.anchor)},O=({el:G,anchor:ve},q,Ie)=>{let Ee;for(;G&&G!==ve;)Ee=f(G),r(G,q,Ie),G=Ee;r(ve,q,Ie)},S=({el:G,anchor:ve})=>{let q;for(;G&&G!==ve;)q=f(G),o(G),G=q;o(ve)},x=(G,ve,q,Ie,Ee,Oe,se,X,oe)=>{se=se||ve.type==="svg",G==null?C(ve,q,Ie,Ee,Oe,se,X,oe):M(G,ve,Ee,Oe,se,X,oe)},C=(G,ve,q,Ie,Ee,Oe,se,X)=>{let oe,ce;const{type:Ae,props:ye,shapeFlag:Te,transition:Me,dirs:Fe}=G;if(oe=G.el=a(G.type,Oe,ye&&ye.is,ye),Te&8?c(oe,G.children):Te&16&&T(G.children,oe,null,Ie,Ee,Oe&&Ae!=="foreignObject",se,X),Fe&&vh(G,null,Ie,"created"),E(oe,G,G.scopeId,se,Ie),ye){for(const nt in ye)nt!=="value"&&!$1(nt)&&i(oe,nt,null,ye[nt],Oe,G.children,Ie,Ee,K);"value"in ye&&i(oe,"value",null,ye.value),(ce=ye.onVnodeBeforeMount)&&Nu(ce,Ie,G)}Fe&&vh(G,null,Ie,"beforeMount");const at=(!Ee||Ee&&!Ee.pendingBranch)&&Me&&!Me.persisted;at&&Me.beforeEnter(oe),r(oe,ve,q),((ce=ye&&ye.onVnodeMounted)||at||Fe)&&Xa(()=>{ce&&Nu(ce,Ie,G),at&&Me.enter(oe),Fe&&vh(G,null,Ie,"mounted")},Ee)},E=(G,ve,q,Ie,Ee)=>{if(q&&h(G,q),Ie)for(let Oe=0;Oe{for(let ce=oe;ce{const X=ve.el=G.el;let{patchFlag:oe,dynamicChildren:ce,dirs:Ae}=ve;oe|=G.patchFlag&16;const ye=G.props||bo,Te=ve.props||bo;let Me;q&&mh(q,!1),(Me=Te.onVnodeBeforeUpdate)&&Nu(Me,q,ve,G),Ae&&vh(ve,G,q,"beforeUpdate"),q&&mh(q,!0);const Fe=Ee&&ve.type!=="foreignObject";if(ce?k(G.dynamicChildren,ce,X,q,Ie,Fe,Oe):se||L(G,ve,X,null,q,Ie,Fe,Oe,!1),oe>0){if(oe&16)P(X,ve,ye,Te,q,Ie,Ee);else if(oe&2&&ye.class!==Te.class&&i(X,"class",null,Te.class,Ee),oe&4&&i(X,"style",ye.style,Te.style,Ee),oe&8){const at=ve.dynamicProps;for(let nt=0;nt{Me&&Nu(Me,q,ve,G),Ae&&vh(ve,G,q,"updated")},Ie)},k=(G,ve,q,Ie,Ee,Oe,se)=>{for(let X=0;X{if(q!==Ie){if(q!==bo)for(const X in q)!$1(X)&&!(X in Ie)&&i(G,X,q[X],null,se,ve.children,Ee,Oe,K);for(const X in Ie){if($1(X))continue;const oe=Ie[X],ce=q[X];oe!==ce&&X!=="value"&&i(G,X,ce,oe,se,ve.children,Ee,Oe,K)}"value"in Ie&&i(G,"value",q.value,Ie.value)}},R=(G,ve,q,Ie,Ee,Oe,se,X,oe)=>{const ce=ve.el=G?G.el:s(""),Ae=ve.anchor=G?G.anchor:s("");let{patchFlag:ye,dynamicChildren:Te,slotScopeIds:Me}=ve;Me&&(X=X?X.concat(Me):Me),G==null?(r(ce,q,Ie),r(Ae,q,Ie),T(ve.children,q,Ae,Ee,Oe,se,X,oe)):ye>0&&ye&64&&Te&&G.dynamicChildren?(k(G.dynamicChildren,Te,q,Ee,Oe,se,X),(ve.key!=null||Ee&&ve===Ee.subTree)&&mM(G,ve,!0)):L(G,ve,q,Ae,Ee,Oe,se,X,oe)},D=(G,ve,q,Ie,Ee,Oe,se,X,oe)=>{ve.slotScopeIds=X,G==null?ve.shapeFlag&512?Ee.ctx.activate(ve,q,Ie,se,oe):F(ve,q,Ie,Ee,Oe,se,oe):W(G,ve,oe)},F=(G,ve,q,Ie,Ee,Oe,se)=>{const X=G.component=tce(G,Ie,Ee);if(Fx(G)&&(X.ctx.renderer=Ne),nce(X),X.asyncDep){if(Ee&&Ee.registerDep(X,I),!G.el){const oe=X.subTree=B(vi);b(null,oe,ve,q)}return}I(X,G,ve,q,Ee,Oe,se)},W=(G,ve,q)=>{const Ie=ve.component=G.component;if(bue(G,ve,q))if(Ie.asyncDep&&!Ie.asyncResolved){Q(Ie,ve,q);return}else Ie.next=ve,hue(Ie.update),Ie.update();else ve.el=G.el,Ie.vnode=ve},I=(G,ve,q,Ie,Ee,Oe,se)=>{const X=()=>{if(G.isMounted){let{next:Ae,bu:ye,u:Te,parent:Me,vnode:Fe}=G,at=Ae,nt;mh(G,!1),Ae?(Ae.el=Fe.el,Q(G,Ae,se)):Ae=Fe,ye&&R1(ye),(nt=Ae.props&&Ae.props.onVnodeBeforeUpdate)&&Nu(nt,Me,Ae,Fe),mh(G,!0);const ct=DT(G),ht=G.subTree;G.subTree=ct,v(ht,ct,d(ht.el),ne(ht),G,Ee,Oe),Ae.el=ct.el,at===null&&_ue(G,ct.el),Te&&Xa(Te,Ee),(nt=Ae.props&&Ae.props.onVnodeUpdated)&&Xa(()=>Nu(nt,Me,Ae,Fe),Ee)}else{let Ae;const{el:ye,props:Te}=ve,{bm:Me,m:Fe,parent:at}=G,nt=Ly(ve);if(mh(G,!1),Me&&R1(Me),!nt&&(Ae=Te&&Te.onVnodeBeforeMount)&&Nu(Ae,at,ve),mh(G,!0),ye&&ue){const ct=()=>{G.subTree=DT(G),ue(ye,G.subTree,G,Ee,null)};nt?ve.type.__asyncLoader().then(()=>!G.isUnmounted&&ct()):ct()}else{const ct=G.subTree=DT(G);v(null,ct,q,Ie,G,Ee,Oe),ve.el=ct.el}if(Fe&&Xa(Fe,Ee),!nt&&(Ae=Te&&Te.onVnodeMounted)){const ct=ve;Xa(()=>Nu(Ae,at,ct),Ee)}(ve.shapeFlag&256||at&&Ly(at.vnode)&&at.vnode.shapeFlag&256)&&G.a&&Xa(G.a,Ee),G.isMounted=!0,ve=q=Ie=null}},oe=G.effect=new tM(X,()=>uM(ce),G.scope),ce=G.update=()=>oe.run();ce.id=G.uid,mh(G,!0),ce()},Q=(G,ve,q)=>{ve.component=G;const Ie=G.vnode.props;G.vnode=ve,G.next=null,Fue(G,ve.props,Ie,q),jue(G,ve.children,q),Xv(),KL(),Zv()},L=(G,ve,q,Ie,Ee,Oe,se,X,oe=!1)=>{const ce=G&&G.children,Ae=G?G.shapeFlag:0,ye=ve.children,{patchFlag:Te,shapeFlag:Me}=ve;if(Te>0){if(Te&128){re(ce,ye,q,Ie,Ee,Oe,se,X,oe);return}else if(Te&256){H(ce,ye,q,Ie,Ee,Oe,se,X,oe);return}}Me&8?(Ae&16&&K(ce,Ee,Oe),ye!==ce&&c(q,ye)):Ae&16?Me&16?re(ce,ye,q,Ie,Ee,Oe,se,X,oe):K(ce,Ee,Oe,!0):(Ae&8&&c(q,""),Me&16&&T(ye,q,Ie,Ee,Oe,se,X,oe))},H=(G,ve,q,Ie,Ee,Oe,se,X,oe)=>{G=G||Vg,ve=ve||Vg;const ce=G.length,Ae=ve.length,ye=Math.min(ce,Ae);let Te;for(Te=0;TeAe?K(G,Ee,Oe,!0,!1,ye):T(ve,q,Ie,Ee,Oe,se,X,oe,ye)},re=(G,ve,q,Ie,Ee,Oe,se,X,oe)=>{let ce=0;const Ae=ve.length;let ye=G.length-1,Te=Ae-1;for(;ce<=ye&&ce<=Te;){const Me=G[ce],Fe=ve[ce]=oe?Yd(ve[ce]):Vu(ve[ce]);if(Ph(Me,Fe))v(Me,Fe,q,null,Ee,Oe,se,X,oe);else break;ce++}for(;ce<=ye&&ce<=Te;){const Me=G[ye],Fe=ve[Te]=oe?Yd(ve[Te]):Vu(ve[Te]);if(Ph(Me,Fe))v(Me,Fe,q,null,Ee,Oe,se,X,oe);else break;ye--,Te--}if(ce>ye){if(ce<=Te){const Me=Te+1,Fe=MeTe)for(;ce<=ye;)J(G[ce],Ee,Oe,!0),ce++;else{const Me=ce,Fe=ce,at=new Map;for(ce=Fe;ce<=Te;ce++){const Ce=ve[ce]=oe?Yd(ve[ce]):Vu(ve[ce]);Ce.key!=null&&at.set(Ce.key,ce)}let nt,ct=0;const ht=Te-Fe+1;let Je=!1,ft=0;const Mt=new Array(ht);for(ce=0;ce=ht){J(Ce,Ee,Oe,!0);continue}let pe;if(Ce.key!=null)pe=at.get(Ce.key);else for(nt=Fe;nt<=Te;nt++)if(Mt[nt-Fe]===0&&Ph(Ce,ve[nt])){pe=nt;break}pe===void 0?J(Ce,Ee,Oe,!0):(Mt[pe-Fe]=ce+1,pe>=ft?ft=pe:Je=!0,v(Ce,ve[pe],q,null,Ee,Oe,se,X,oe),ct++)}const Pe=Je?Yue(Mt):Vg;for(nt=Pe.length-1,ce=ht-1;ce>=0;ce--){const Ce=Fe+ce,pe=ve[Ce],Be=Ce+1{const{el:Oe,type:se,transition:X,children:oe,shapeFlag:ce}=G;if(ce&6){U(G.component.subTree,ve,q,Ie);return}if(ce&128){G.suspense.move(ve,q,Ie);return}if(ce&64){se.move(G,ve,q,Ne);return}if(se===ut){r(Oe,ve,q);for(let ye=0;yeX.enter(Oe),Ee);else{const{leave:ye,delayLeave:Te,afterLeave:Me}=X,Fe=()=>r(Oe,ve,q),at=()=>{ye(Oe,()=>{Fe(),Me&&Me()})};Te?Te(Oe,Fe,at):at()}else r(Oe,ve,q)},J=(G,ve,q,Ie=!1,Ee=!1)=>{const{type:Oe,props:se,ref:X,children:oe,dynamicChildren:ce,shapeFlag:Ae,patchFlag:ye,dirs:Te}=G;if(X!=null&&Nk(X,null,q,G,!0),Ae&256){ve.ctx.deactivate(G);return}const Me=Ae&1&&Te,Fe=!Ly(G);let at;if(Fe&&(at=se&&se.onVnodeBeforeUnmount)&&Nu(at,ve,G),Ae&6)he(G.component,q,Ie);else{if(Ae&128){G.suspense.unmount(q,Ie);return}Me&&vh(G,null,ve,"beforeUnmount"),Ae&64?G.type.remove(G,ve,q,Ee,Ne,Ie):ce&&(Oe!==ut||ye>0&&ye&64)?K(ce,ve,q,!1,!0):(Oe===ut&&ye&384||!Ee&&Ae&16)&&K(oe,ve,q),Ie&&ie(G)}(Fe&&(at=se&&se.onVnodeUnmounted)||Me)&&Xa(()=>{at&&Nu(at,ve,G),Me&&vh(G,null,ve,"unmounted")},q)},ie=G=>{const{type:ve,el:q,anchor:Ie,transition:Ee}=G;if(ve===ut){te(q,Ie);return}if(ve===BT){S(G);return}const Oe=()=>{o(q),Ee&&!Ee.persisted&&Ee.afterLeave&&Ee.afterLeave()};if(G.shapeFlag&1&&Ee&&!Ee.persisted){const{leave:se,delayLeave:X}=Ee,oe=()=>se(q,Oe);X?X(G.el,Oe,oe):oe()}else Oe()},te=(G,ve)=>{let q;for(;G!==ve;)q=f(G),o(G),G=q;o(ve)},he=(G,ve,q)=>{const{bum:Ie,scope:Ee,update:Oe,subTree:se,um:X}=G;Ie&&R1(Ie),Ee.stop(),Oe&&(Oe.active=!1,J(se,G,ve,q)),X&&Xa(X,ve),Xa(()=>{G.isUnmounted=!0},ve),ve&&ve.pendingBranch&&!ve.isUnmounted&&G.asyncDep&&!G.asyncResolved&&G.suspenseId===ve.pendingId&&(ve.deps--,ve.deps===0&&ve.resolve())},K=(G,ve,q,Ie=!1,Ee=!1,Oe=0)=>{for(let se=Oe;seG.shapeFlag&6?ne(G.component.subTree):G.shapeFlag&128?G.suspense.next():f(G.anchor||G.el),fe=(G,ve,q)=>{G==null?ve._vnode&&J(ve._vnode,null,null,!0):v(ve._vnode||null,G,ve,null,null,null,q),KL(),uz(),ve._vnode=G},Ne={p:v,um:J,m:U,r:ie,mt:F,mc:T,pc:L,pbc:k,n:ne,o:t};let $e,ue;return e&&([$e,ue]=e(Ne)),{render:fe,hydrate:$e,createApp:Que(fe,$e)}}function mh({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function mM(t,e,n=!1){const r=t.children,o=e.children;if(Ye(r)&&Ye(o))for(let i=0;i>1,t[n[s]]0&&(e[r]=n[i-1]),n[i]=r)}}for(i=n.length,a=n[i-1];i-- >0;)n[i]=a,a=e[a];return n}const Xue=t=>t.__isTeleport,Fy=t=>t&&(t.disabled||t.disabled===""),l4=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,Mk=(t,e)=>{const n=t&&t.to;return St(n)?e?e(n):null:n},Zue={__isTeleport:!0,process(t,e,n,r,o,i,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:v,createComment:m}}=u,b=Fy(e.props);let{shapeFlag:w,children:O,dynamicChildren:S}=e;if(t==null){const x=e.el=v(""),C=e.anchor=v("");h(x,n,r),h(C,n,r);const E=e.target=Mk(e.props,g),T=e.targetAnchor=v("");E&&(h(T,E),a=a||l4(E));const M=(k,P)=>{w&16&&c(O,k,P,o,i,a,s,l)};b?M(n,C):E&&M(E,T)}else{e.el=t.el;const x=e.anchor=t.anchor,C=e.target=t.target,E=e.targetAnchor=t.targetAnchor,T=Fy(t.props),M=T?n:C,k=T?x:E;if(a=a||l4(C),S?(f(t.dynamicChildren,S,M,o,i,a,s),mM(t,e,!0)):l||d(t,e,M,k,o,i,a,s,!1),b)T||mO(e,n,x,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const P=e.target=Mk(e.props,g);P&&mO(e,P,null,u,0)}else T&&mO(e,C,E,u,1)}Az(e)},remove(t,e,n,r,{um:o,o:{remove:i}},a){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:d,props:f}=t;if(d&&i(c),(a||!Fy(f))&&(i(u),s&16))for(let h=0;h0?iu||Vg:null,que(),x0>0&&iu&&iu.push(t),t}function Z(t,e,n,r,o,i){return Pz(ee(t,e,n,r,o,i,!0))}function me(t,e,n,r,o){return Pz(B(t,e,n,r,o,!0))}function Mr(t){return t?t.__v_isVNode===!0:!1}function Ph(t,e){return t.type===e.type&&t.key===e.key}const Qx="__vInternal",Nz=({key:t})=>t!=null?t:null,I1=({ref:t,ref_key:e,ref_for:n})=>t!=null?St(t)||Pr(t)||kt(t)?{i:ji,r:t,k:e,f:!!n}:t:null;function ee(t,e=null,n=null,r=0,o=null,i=t===ut?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Nz(e),ref:e&&I1(e),scopeId:fz,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:ji};return s?(yM(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=St(n)?8:16),x0>0&&!a&&iu&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&iu.push(l),l}const B=Kue;function Kue(t,e=null,n=null,r=0,o=null,i=!1){if((!t||t===bz)&&(t=vi),Mr(t)){const s=td(t,e,!0);return n&&yM(s,n),x0>0&&!i&&iu&&(s.shapeFlag&6?iu[iu.indexOf(t)]=s:iu.push(s)),s.patchFlag|=-2,s}if(ace(t)&&(t=t.__vccOpts),e){e=ic(e);let{class:s,style:l}=e;s&&!St(s)&&(e.class=j(s)),Zt(l)&&(rz(l)&&!Ye(l)&&(l=wi({},l)),e.style=bt(l))}const a=St(t)?1:Oue(t)?128:Xue(t)?64:Zt(t)?4:kt(t)?2:0;return ee(t,e,n,r,o,a,i,!0)}function ic(t){return t?rz(t)||Qx in t?wi({},t):t:null}function td(t,e,n=!1){const{props:r,ref:o,patchFlag:i,children:a}=t,s=e?rn(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:s,key:s&&Nz(s),ref:e&&e.ref?n&&o?Ye(o)?o.concat(I1(e)):[o,I1(e)]:I1(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ut?i===-1?16:i|16:i,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&td(t.ssContent),ssFallback:t.ssFallback&&td(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function We(t=" ",e=0){return B(Gv,null,t,e)}function ge(t="",e=!1){return e?(N(),me(vi,null,t)):B(vi,null,t)}function Vu(t){return t==null||typeof t=="boolean"?B(vi):Ye(t)?B(ut,null,t.slice()):typeof t=="object"?Yd(t):B(Gv,null,String(t))}function Yd(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:td(t)}function yM(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(Ye(e))n=16;else if(typeof e=="object")if(r&65){const o=e.default;o&&(o._c&&(o._d=!1),yM(t,o()),o._c&&(o._d=!0));return}else{n=32;const o=e._;!o&&!(Qx in e)?e._ctx=ji:o===3&&ji&&(ji.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else kt(e)?(e={default:e,_ctx:ji},n=32):(e=String(e),r&64?(n=16,e=[We(e)]):n=8);t.children=e,t.shapeFlag|=n}function rn(...t){const e={};for(let n=0;nHo||ji,dv=t=>{Ho=t,t.scope.on()},ep=()=>{Ho&&Ho.scope.off(),Ho=null};function Mz(t){return t.vnode.shapeFlag&4}let C0=!1;function nce(t,e=!1){C0=e;const{props:n,children:r}=t.vnode,o=Mz(t);Bue(t,n,o,e),zue(t,r);const i=o?rce(t,e):void 0;return C0=!1,i}function rce(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=uu(new Proxy(t.ctx,Mue));const{setup:r}=n;if(r){const o=t.setupContext=r.length>1?Rz(t):null;dv(t),Xv();const i=hf(r,t,0,[t.props,o]);if(Zv(),ep(),dp(i)){if(i.then(ep,ep),e)return i.then(a=>{c4(t,a,e)}).catch(a=>{Lx(a,t,0)});t.asyncDep=i}else c4(t,i,e)}else $z(t,e)}function c4(t,e,n){kt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Zt(e)&&(t.setupState=iz(e)),$z(t,n)}let d4;function $z(t,e,n){const r=t.type;if(!t.render){if(!e&&d4&&!r.render){const o=r.template||gM(t).template;if(o){const{isCustomElement:i,compilerOptions:a}=t.appContext.config,{delimiters:s,compilerOptions:l}=r,u=wi(wi({isCustomElement:i,delimiters:s},a),l);r.render=d4(o,u)}}t.render=r.render||or}dv(t),Xv(),$ue(t),Zv(),ep()}function oce(t){return new Proxy(t.attrs,{get(e,n){return as(t,"get","$attrs"),e[n]}})}function Rz(t){const e=r=>{t.exposed=r||{}};let n;return{get attrs(){return n||(n=oce(t))},slots:t.slots,emit:t.emit,expose:e}}function Hx(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(iz(uu(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in By)return By[n](t)},has(e,n){return n in e||n in By}}))}function ice(t,e=!0){return kt(t)?t.displayName||t.name:t.name||e&&t.__name}function ace(t){return kt(t)&&"__vccOpts"in t}const $=(t,e)=>uue(t,e,C0);function Ro(){return Dz().slots}function vd(){return Dz().attrs}function Dz(){const t=Kt();return t.setupContext||(t.setupContext=Rz(t))}function At(t,e,n){const r=arguments.length;return r===2?Zt(e)&&!Ye(e)?Mr(e)?B(t,null,[e]):B(t,e):B(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Mr(n)&&(n=[n]),B(t,e,n))}const sce=Symbol(""),lce=()=>gt(sce),uce="3.2.47",cce="http://www.w3.org/2000/svg",Nh=typeof document!="undefined"?document:null,f4=Nh&&Nh.createElement("template"),dce={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const o=e?Nh.createElementNS(cce,t):Nh.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:t=>Nh.createTextNode(t),createComment:t=>Nh.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Nh.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,o,i){const a=n?n.previousSibling:e.lastChild;if(o&&(o===i||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{f4.innerHTML=r?`${t}`:t;const s=f4.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function fce(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function hce(t,e,n){const r=t.style,o=St(n);if(n&&!o){if(e&&!St(e))for(const i in e)n[i]==null&&$k(r,i,"");for(const i in n)$k(r,i,n[i])}else{const i=r.display;o?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=i)}}const h4=/\s*!important$/;function $k(t,e,n){if(Ye(n))n.forEach(r=>$k(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=pce(t,e);h4.test(n)?t.setProperty(Qf(r),n.replace(h4,""),"important"):t[r]=n}}const p4=["Webkit","Moz","ms"],FT={};function pce(t,e){const n=FT[e];if(n)return n;let r=Ws(e);if(r!=="filter"&&r in t)return FT[e]=r;r=Mb(r);for(let o=0;oVT||(_ce.then(()=>VT=0),VT=Date.now());function wce(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;_l(Sce(r,n.value),e,5,[r])};return n.value=t,n.attached=Oce(),n}function Sce(t,e){if(Ye(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>o=>!o._stopped&&r&&r(o))}else return e}const m4=/^on[a-z]/,xce=(t,e,n,r,o=!1,i,a,s,l)=>{e==="class"?fce(t,r,o):e==="style"?hce(t,n,r):Mx(e)?qN(e)||yce(t,e,n,r,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Cce(t,e,r,o))?vce(t,e,r,i,a,s,l):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),gce(t,e,r,o))};function Cce(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&m4.test(e)&&kt(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||m4.test(e)&&St(n)?!1:e in t}const zd="transition",qm="animation",Xo=(t,{slots:e})=>At(gz,Lz(t),e);Xo.displayName="Transition";const Iz={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ece=Xo.props=wi({},gz.props,Iz),yh=(t,e=[])=>{Ye(t)?t.forEach(n=>n(...e)):t&&t(...e)},y4=t=>t?Ye(t)?t.some(e=>e.length>1):t.length>1:!1;function Lz(t){const e={};for(const R in t)R in Iz||(e[R]=t[R]);if(t.css===!1)return e;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,g=Tce(o),v=g&&g[0],m=g&&g[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:O,onLeave:S,onLeaveCancelled:x,onBeforeAppear:C=b,onAppear:E=w,onAppearCancelled:T=O}=e,M=(R,D,F)=>{Wd(R,D?c:s),Wd(R,D?u:a),F&&F()},k=(R,D)=>{R._isLeaving=!1,Wd(R,d),Wd(R,h),Wd(R,f),D&&D()},P=R=>(D,F)=>{const W=R?E:w,I=()=>M(D,R,F);yh(W,[D,I]),b4(()=>{Wd(D,R?l:i),Vc(D,R?c:s),y4(W)||_4(D,r,v,I)})};return wi(e,{onBeforeEnter(R){yh(b,[R]),Vc(R,i),Vc(R,a)},onBeforeAppear(R){yh(C,[R]),Vc(R,l),Vc(R,u)},onEnter:P(!1),onAppear:P(!0),onLeave(R,D){R._isLeaving=!0;const F=()=>k(R,D);Vc(R,d),Fz(),Vc(R,f),b4(()=>{!R._isLeaving||(Wd(R,d),Vc(R,h),y4(S)||_4(R,r,m,F))}),yh(S,[R,F])},onEnterCancelled(R){M(R,!1),yh(O,[R])},onAppearCancelled(R){M(R,!0),yh(T,[R])},onLeaveCancelled(R){k(R),yh(x,[R])}})}function Tce(t){if(t==null)return null;if(Zt(t))return[zT(t.enter),zT(t.leave)];{const e=zT(t);return[e,e]}}function zT(t){return Ele(t)}function Vc(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function Wd(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function b4(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let kce=0;function _4(t,e,n,r){const o=t._endId=++kce,i=()=>{o===t._endId&&r()};if(n)return setTimeout(i,n);const{type:a,timeout:s,propCount:l}=Bz(t,e);if(!a)return r();const u=a+"end";let c=0;const d=()=>{t.removeEventListener(u,f),i()},f=h=>{h.target===t&&++c>=l&&d()};setTimeout(()=>{c(n[g]||"").split(", "),o=r(`${zd}Delay`),i=r(`${zd}Duration`),a=O4(o,i),s=r(`${qm}Delay`),l=r(`${qm}Duration`),u=O4(s,l);let c=null,d=0,f=0;e===zd?a>0&&(c=zd,d=a,f=i.length):e===qm?u>0&&(c=qm,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?zd:qm:null,f=c?c===zd?i.length:l.length:0);const h=c===zd&&/\b(transform|all)(,|$)/.test(r(`${zd}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function O4(t,e){for(;t.lengthw4(n)+w4(t[r])))}function w4(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Fz(){return document.body.offsetHeight}const Vz=new WeakMap,zz=new WeakMap,jz={name:"TransitionGroup",props:wi({},Ece,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Kt(),r=pz();let o,i;return _u(()=>{if(!o.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!$ce(o[0].el,n.vnode.el,a))return;o.forEach(Pce),o.forEach(Nce);const s=o.filter(Mce);Fz(),s.forEach(l=>{const u=l.el,c=u.style;Vc(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u._moveCb=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u._moveCb=null,Wd(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=Mn(t),s=Lz(a);let l=a.tag||ut;o=i,i=e.default?dM(e.default()):[];for(let u=0;udelete t.mode;jz.props;const Wz=jz;function Pce(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function Nce(t){zz.set(t,t.el.getBoundingClientRect())}function Mce(t){const e=Vz.get(t),n=zz.get(t),r=e.left-n.left,o=e.top-n.top;if(r||o){const i=t.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${o}px)`,i.transitionDuration="0s",t}}function $ce(t,e,n){const r=t.cloneNode();t._vtc&&t._vtc.forEach(a=>{a.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(r);const{hasTransform:i}=Bz(r);return o.removeChild(r),i}const fv=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ye(e)?n=>R1(e,n):e};function Rce(t){t.target.composing=!0}function S4(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ux={created(t,{modifiers:{lazy:e,trim:n,number:r}},o){t._assign=fv(o);const i=r||o.props&&o.props.type==="number";Jd(t,e?"change":"input",a=>{if(a.target.composing)return;let s=t.value;n&&(s=s.trim()),i&&(s=wk(s)),t._assign(s)}),n&&Jd(t,"change",()=>{t.value=t.value.trim()}),e||(Jd(t,"compositionstart",Rce),Jd(t,"compositionend",S4),Jd(t,"change",S4))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:o}},i){if(t._assign=fv(i),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(o||t.type==="number")&&wk(t.value)===e))return;const a=e==null?"":e;t.value!==a&&(t.value=a)}},Tw={deep:!0,created(t,e,n){t._assign=fv(n),Jd(t,"change",()=>{const r=t._modelValue,o=Hz(t),i=t.checked,a=t._assign;if(Ye(r)){const s=V7(r,o),l=s!==-1;if(i&&!l)a(r.concat(o));else if(!i&&l){const u=[...r];u.splice(s,1),a(u)}}else if($x(r)){const s=new Set(r);i?s.add(o):s.delete(o),a(s)}else a(Uz(t,i))})},mounted:x4,beforeUpdate(t,e,n){t._assign=fv(n),x4(t,e,n)}};function x4(t,{value:e,oldValue:n},r){t._modelValue=e,Ye(e)?t.checked=V7(e,r.props.value)>-1:$x(e)?t.checked=e.has(r.props.value):e!==n&&(t.checked=uv(e,Uz(t,!0)))}const Qz={created(t,{value:e},n){t.checked=uv(e,n.props.value),t._assign=fv(n),Jd(t,"change",()=>{t._assign(Hz(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t._assign=fv(r),e!==n&&(t.checked=uv(e,r.props.value))}};function Hz(t){return"_value"in t?t._value:t.value}function Uz(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const Dce=["ctrl","shift","alt","meta"],Ice={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Dce.some(n=>t[`${n}Key`]&&!e.includes(n))},Rt=(t,e)=>(n,...r)=>{for(let o=0;on=>{if(!("key"in n))return;const r=Qf(n.key);if(e.some(o=>o===r||Lce[o]===r))return t(n)},Bn={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Km(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),Km(t,!0),r.enter(t)):r.leave(t,()=>{Km(t,!1)}):Km(t,e))},beforeUnmount(t,{value:e}){Km(t,e)}};function Km(t,e){t.style.display=e?t._vod:"none"}const Bce=wi({patchProp:xce},dce);let C4;function Yz(){return C4||(C4=Hue(Bce))}const wf=(...t)=>{Yz().render(...t)},qv=(...t)=>{const e=Yz().createApp(...t),{mount:n}=e;return e.mount=r=>{const o=Fce(r);if(!o)return;const i=e._component;!kt(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.innerHTML="";const a=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},e};function Fce(t){return St(t)?document.querySelector(t):t}const Vce="2.10.7",E4=Symbol("INSTALLED_KEY"),Xz=Symbol(),zy="el",zce="is-",bh=(t,e,n,r,o)=>{let i=`${t}-${e}`;return n&&(i+=`-${n}`),r&&(i+=`__${r}`),o&&(i+=`--${o}`),i},Zz=Symbol("namespaceContextKey"),bM=t=>{const e=t||(Kt()?gt(Zz,z(zy)):z(zy));return $(()=>p(e)||zy)},je=(t,e)=>{const n=bM(e);return{namespace:n,b:(v="")=>bh(n.value,t,v,"",""),e:v=>v?bh(n.value,t,"",v,""):"",m:v=>v?bh(n.value,t,"","",v):"",be:(v,m)=>v&&m?bh(n.value,t,v,m,""):"",em:(v,m)=>v&&m?bh(n.value,t,"",v,m):"",bm:(v,m)=>v&&m?bh(n.value,t,v,"",m):"",bem:(v,m,b)=>v&&m&&b?bh(n.value,t,v,m,b):"",is:(v,...m)=>{const b=m.length>=1?m[0]:!0;return v&&b?`${zce}${v}`:""},cssVar:v=>{const m={};for(const b in v)v[b]&&(m[`--${n.value}-${b}`]=v[b]);return m},cssVarName:v=>`--${n.value}-${v}`,cssVarBlock:v=>{const m={};for(const b in v)v[b]&&(m[`--${n.value}-${t}-${b}`]=v[b]);return m},cssVarBlockName:v=>`--${n.value}-${t}-${v}`}};var jce=typeof global=="object"&&global&&global.Object===Object&&global,Gz=jce,Wce=typeof self=="object"&&self&&self.Object===Object&&self,Qce=Gz||Wce||Function("return this")(),Ci=Qce,Hce=Ci.Symbol,pa=Hce,qz=Object.prototype,Uce=qz.hasOwnProperty,Yce=qz.toString,Jm=pa?pa.toStringTag:void 0;function Xce(t){var e=Uce.call(t,Jm),n=t[Jm];try{t[Jm]=void 0;var r=!0}catch{}var o=Yce.call(t);return r&&(e?t[Jm]=n:delete t[Jm]),o}var Zce=Object.prototype,Gce=Zce.toString;function qce(t){return Gce.call(t)}var Kce="[object Null]",Jce="[object Undefined]",T4=pa?pa.toStringTag:void 0;function Ia(t){return t==null?t===void 0?Jce:Kce:T4&&T4 in Object(t)?Xce(t):qce(t)}function Bo(t){return t!=null&&typeof t=="object"}var ede="[object Symbol]";function Qs(t){return typeof t=="symbol"||Bo(t)&&Ia(t)==ede}var tde=0/0;function k4(t){return typeof t=="number"?t:Qs(t)?tde:+t}function ko(t,e){for(var n=-1,r=t==null?0:t.length,o=Array(r);++n0){if(++e>=Yde)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Gde=ij(tj),aj=Gde,qde=/\{\n\/\* \[wrapped with (.+)\] \*/,Kde=/,? & /;function Jde(t){var e=t.match(qde);return e?e[1].split(Kde):[]}var efe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function tfe(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(efe,`{ /* [wrapped with `+e+`] */ `)}function OM(t){return function(){return t}}var nfe=function(){try{var t=Mp(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Aw=nfe,rfe=Aw?function(t,e){return Aw(t,"toString",{configurable:!0,enumerable:!1,value:OM(e),writable:!0})}:La,ofe=rfe,ife=ij(ofe),wM=ife;function Ll(t,e){for(var n=-1,r=t==null?0:t.length;++n-1}var sfe=1,lfe=2,ufe=8,cfe=16,dfe=32,ffe=64,hfe=128,pfe=256,gfe=512,vfe=[["ary",hfe],["bind",sfe],["bindKey",lfe],["curry",ufe],["curryRight",cfe],["flip",gfe],["partial",dfe],["partialRight",ffe],["rearg",pfe]];function mfe(t,e){return Ll(vfe,function(n){var r="_."+n[0];e&n[1]&&!Gx(t,r)&&t.push(r)}),t.sort()}function lj(t,e,n){var r=e+"";return wM(t,tfe(r,mfe(Jde(r),n)))}var yfe=1,bfe=2,_fe=4,Ofe=8,D4=32,I4=64;function uj(t,e,n,r,o,i,a,s,l,u){var c=e&Ofe,d=c?a:void 0,f=c?void 0:a,h=c?i:void 0,g=c?void 0:i;e|=c?D4:I4,e&=~(c?I4:D4),e&_fe||(e&=~(yfe|bfe));var v=[t,e,o,h,d,g,f,s,l,u],m=n.apply(void 0,v);return Rk(t)&&aj(m,v),m.placeholder=r,lj(m,t,e)}function em(t){var e=t;return e.placeholder}var wfe=9007199254740991,Sfe=/^(?:0|[1-9]\d*)$/;function yd(t,e){var n=typeof t;return e=e==null?wfe:e,!!e&&(n=="number"||n!="symbol"&&Sfe.test(t))&&t>-1&&t%1==0&&t1&&w.reverse(),c&&l-1&&t%1==0&&t<=Qfe}function cs(t){return t!=null&&Kx(t.length)&&!md(t)}function Ma(t,e,n){if(!wo(n))return!1;var r=typeof e;return(r=="number"?cs(n)&&yd(e,n.length):r=="string"&&e in n)?Ou(n[e],t):!1}function tm(t){return mr(function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(o--,i):void 0,a&&Ma(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++r-1}function cpe(t,e){var n=this.__data__,r=Jx(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Od(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0&&n(s)?e>1?Ui(s,e-1,n,r,o):Yf(o,s):r||(o[o.length]=s)}return o}function kM(t){var e=t==null?0:t.length;return e?Ui(t,1):[]}function Sd(t){return wM(dj(t,void 0,kM),t+"")}var Epe=Sd(TM),Tpe=Epe,kpe=vj(Object.getPrototypeOf,Object),tC=kpe,Ape="[object Object]",Ppe=Function.prototype,Npe=Object.prototype,yj=Ppe.toString,Mpe=Npe.hasOwnProperty,$pe=yj.call(Object);function Lb(t){if(!Bo(t)||Ia(t)!=Ape)return!1;var e=tC(t);if(e===null)return!0;var n=Mpe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&yj.call(n)==$pe}var Rpe="[object DOMException]",Dpe="[object Error]";function AM(t){if(!Bo(t))return!1;var e=Ia(t);return e==Dpe||e==Rpe||typeof t.message=="string"&&typeof t.name=="string"&&!Lb(t)}var Ipe=mr(function(t,e){try{return Us(t,void 0,e)}catch(n){return AM(n)?n:new Error(n)}}),bj=Ipe,Lpe="Expected a function";function _j(t,e){var n;if(typeof e!="function")throw new TypeError(Lpe);return t=nr(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var Bpe=1,Fpe=32,PM=mr(function(t,e,n){var r=Bpe;if(n.length){var o=Sf(n,em(PM));r|=Fpe}return bd(t,r,e,n,o)});PM.placeholder={};var Oj=PM,Vpe=Sd(function(t,e){return Ll(e,function(n){n=mc(n),_d(t,n,Oj(t[n],t))}),t}),zpe=Vpe,jpe=1,Wpe=2,Qpe=32,NM=mr(function(t,e,n){var r=jpe|Wpe;if(n.length){var o=Sf(n,em(NM));r|=Qpe}return bd(e,r,t,n,o)});NM.placeholder={};var Hpe=NM;function kl(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r=r?t:kl(t,e,n)}var Upe="\\ud800-\\udfff",Ype="\\u0300-\\u036f",Xpe="\\ufe20-\\ufe2f",Zpe="\\u20d0-\\u20ff",Gpe=Ype+Xpe+Zpe,qpe="\\ufe0e\\ufe0f",Kpe="\\u200d",Jpe=RegExp("["+Kpe+Upe+Gpe+qpe+"]");function rm(t){return Jpe.test(t)}function ege(t){return t.split("")}var wj="\\ud800-\\udfff",tge="\\u0300-\\u036f",nge="\\ufe20-\\ufe2f",rge="\\u20d0-\\u20ff",oge=tge+nge+rge,ige="\\ufe0e\\ufe0f",age="["+wj+"]",Dk="["+oge+"]",Ik="\\ud83c[\\udffb-\\udfff]",sge="(?:"+Dk+"|"+Ik+")",Sj="[^"+wj+"]",xj="(?:\\ud83c[\\udde6-\\uddff]){2}",Cj="[\\ud800-\\udbff][\\udc00-\\udfff]",lge="\\u200d",Ej=sge+"?",Tj="["+ige+"]?",uge="(?:"+lge+"(?:"+[Sj,xj,Cj].join("|")+")"+Tj+Ej+")*",cge=Tj+Ej+uge,dge="(?:"+[Sj+Dk+"?",Dk,xj,Cj,age].join("|")+")",fge=RegExp(Ik+"(?="+Ik+")|"+dge+cge,"g");function hge(t){return t.match(fge)||[]}function mu(t){return rm(t)?hge(t):ege(t)}function kj(t){return function(e){e=Hr(e);var n=rm(e)?mu(e):void 0,r=n?n[0]:e.charAt(0),o=n?Xf(n,1).join(""):e.slice(1);return r[t]()+o}}var pge=kj("toUpperCase"),MM=pge;function Aj(t){return MM(Hr(t).toLowerCase())}function $M(t,e,n,r){var o=-1,i=t==null?0:t.length;for(r&&i&&(n=t[++o]);++o=e?t:e)),t}function uve(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Ol(n),n=n===n?n:0),e!==void 0&&(e=Ol(e),e=e===e?e:0),Rp(Ol(t),e,n)}function cve(){this.__data__=new Od,this.size=0}function dve(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function fve(t){return this.__data__.get(t)}function hve(t){return this.__data__.has(t)}var pve=200;function gve(t,e){var n=this.__data__;if(n instanceof Od){var r=n.__data__;if(!A0||r.lengths))return!1;var u=i.get(t),c=i.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=n&tye?new pp:void 0;for(i.set(t,e),i.set(e,t);++d=e||E<0||d&&T>=i}function b(){var C=F1();if(m(C))return w(C);s=setTimeout(b,v(C))}function w(C){return s=void 0,f&&r?h(C):(r=o=void 0,a)}function O(){s!==void 0&&clearTimeout(s),u=0,r=l=o=s=void 0}function S(){return s===void 0?a:w(F1())}function x(){var C=F1(),E=m(C);if(r=arguments,o=this,l=C,E){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(b,e),h(l)}return s===void 0&&(s=setTimeout(b,e)),a}return x.cancel=O,x.flush=S,x}function Gye(t,e){return t==null||t!==t?e:t}var pW=Object.prototype,qye=pW.hasOwnProperty,Kye=mr(function(t,e){t=Object(t);var n=-1,r=e.length,o=r>2?e[2]:void 0;for(o&&Ma(e[0],e[1],o)&&(r=1);++n=u0e&&(i=P0,a=!1,e=new pp(e));e:for(;++o=0&&t.slice(n,o)==e}function E0e(t,e){return ko(e,function(n){return[n,t[n]]})}function T0e(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=[r,r]}),n}var k0e="[object Map]",A0e="[object Set]";function OW(t){return function(e){var n=ac(e);return n==k0e?zM(e):n==A0e?T0e(e):E0e(e,t(e))}}var P0e=OW(yi),sc=P0e,N0e=OW(ds),b8=N0e,M0e={"&":"&","<":"<",">":">",'"':""","'":"'"},$0e=RM(M0e),R0e=$0e,wW=/[&<>"']/g,D0e=RegExp(wW.source);function SW(t){return t=Hr(t),t&&D0e.test(t)?t.replace(wW,R0e):t}var xW=/[\\^$.*+?()[\]{}|]/g,I0e=RegExp(xW.source);function L0e(t){return t=Hr(t),t&&I0e.test(t)?t.replace(xW,"\\$&"):t}function CW(t,e){for(var n=-1,r=t==null?0:t.length;++no?0:o+n),r=r===void 0||r>o?o:nr(r),r<0&&(r+=o),r=n>r?0:EW(r);n-1?o[i?e[a]:a]:void 0}}var W0e=Math.max;function qM(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var o=n==null?0:nr(n);return o<0&&(o=W0e(r+o,0)),Zx(t,Hn(e),o)}var Q0e=kW(qM),Cf=Q0e;function AW(t,e,n){var r;return n(t,function(o,i,a){if(e(o,i,a))return r=i,!1}),r}function H0e(t,e){return AW(t,Hn(e),yc)}var U0e=Math.max,Y0e=Math.min;function aC(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var o=r-1;return n!==void 0&&(o=nr(n),o=n<0?U0e(r+o,0):Y0e(o,r-1)),Zx(t,Hn(e),o,!0)}var X0e=kW(aC),Z0e=X0e;function G0e(t,e){return AW(t,Hn(e),GM)}function _8(t){return t&&t.length?t[0]:void 0}function PW(t,e){var n=-1,r=cs(t)?Array(t.length):[];return Gf(t,function(o,i,a){r[++n]=e(o,i,a)}),r}function $a(t,e){var n=Wn(t)?ko:PW;return n(t,Hn(e))}function KM(t,e){return Ui($a(t,e),1)}var q0e=1/0;function K0e(t,e){return Ui($a(t,e),q0e)}function J0e(t,e,n){return n=n===void 0?1:nr(n),Ui($a(t,e),n)}var ebe=1/0;function NW(t){var e=t==null?0:t.length;return e?Ui(t,ebe):[]}function tbe(t,e){var n=t==null?0:t.length;return n?(e=e===void 0?1:nr(e),Ui(t,e)):[]}var nbe=512;function rbe(t){return bd(t,nbe)}var obe=DM("floor"),ibe=obe,abe="Expected a function",sbe=8,lbe=32,ube=128,cbe=256;function MW(t){return Sd(function(e){var n=e.length,r=n,o=El.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if(typeof i!="function")throw new TypeError(abe);if(o&&!a&&B1(i)=="wrapper")var a=new El([],!0)}for(r=a?r:n;++re}function lC(t){return function(e,n){return typeof e=="string"&&typeof n=="string"||(e=Ol(e),n=Ol(n)),t(e,n)}}var Cbe=lC(JM),Ebe=Cbe,Tbe=lC(function(t,e){return t>=e}),kbe=Tbe,Abe=Object.prototype,Pbe=Abe.hasOwnProperty;function Nbe(t,e){return t!=null&&Pbe.call(t,e)}function pv(t,e){return t!=null&&lW(t,e,Nbe)}var Mbe=Math.max,$be=Math.min;function Rbe(t,e,n){return t>=$be(e,n)&&t-1:!!o&&Jv(t,e,n)>-1}var Fbe=Math.max;function $W(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var o=n==null?0:nr(n);return o<0&&(o=Fbe(r+o,0)),Jv(t,e,o)}function Vbe(t){var e=t==null?0:t.length;return e?kl(t,0,-1):[]}var zbe=Math.min;function t$(t,e,n){for(var r=n?ZM:Gx,o=t[0].length,i=t.length,a=i,s=Array(i),l=1/0,u=[];a--;){var c=t[a];a&&e&&(c=ko(c,Ys(e))),l=zbe(c.length,l),s[a]=!n&&(e||o>=120&&c.length>=120)?new pp(a&&c):void 0}c=t[0];var d=-1,f=s[0];e:for(;++d=-x8&&t<=x8}function Ef(t){return t===void 0}var I_e="[object WeakMap]";function L_e(t){return Bo(t)&&ac(t)==I_e}var B_e="[object WeakSet]";function F_e(t){return Bo(t)&&Ia(t)==B_e}var V_e=1;function z_e(t){return Hn(typeof t=="function"?t:wl(t,V_e))}var j_e=Array.prototype,W_e=j_e.join;function Q_e(t,e){return t==null?"":W_e.call(t,e)}var H_e=om(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),U_e=H_e,Y_e=rC(function(t,e,n){_d(t,n,e)}),X_e=Y_e;function Z_e(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}var G_e=Math.max,q_e=Math.min;function K_e(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var o=r;return n!==void 0&&(o=nr(n),o=o<0?G_e(r+o,0):q_e(o,r-1)),e===e?Z_e(t,e,o):Zx(t,sj,o,!0)}var J_e=om(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),eOe=J_e,tOe=kj("toLowerCase"),nOe=tOe;function o$(t,e){return t=this.__values__.length,e=t?void 0:this.__values__[this.__index__++];return{done:t,value:e}}function WW(t,e){var n=t.length;if(!!n)return e+=e<0?n:0,yd(e,n)?t[e]:void 0}function NOe(t,e){return t&&t.length?WW(t,nr(e)):void 0}function MOe(t){return t=nr(t),mr(function(e){return WW(e,t)})}function a$(t,e){return e=Uf(e,t),t=IW(t,e),t==null||delete t[mc(ss(e))]}function $Oe(t){return Lb(t)?void 0:t}var ROe=1,DOe=2,IOe=4,LOe=Sd(function(t,e){var n={};if(t==null)return n;var r=!1;e=ko(e,function(i){return i=Uf(i,t),r||(r=i.length>1),i}),vc(t,BM(t),n),r&&(n=wl(n,ROe|DOe|IOe,$Oe));for(var o=e.length;o--;)a$(n,e[o]);return n}),s$=LOe;function jb(t,e,n,r){if(!wo(t))return t;e=Uf(e,t);for(var o=-1,i=e.length,a=i-1,s=t;s!=null&&++oe||i&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!u&&t=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function YW(t,e,n){e.length?e=ko(e,function(i){return Wn(i)?function(a){return $p(a,i.length===1?i[0]:i)}:i}):e=[La];var r=-1;e=ko(e,Ys(Hn));var o=PW(t,function(i,a,s){var l=ko(e,function(u){return u(i)});return{criteria:l,index:++r,value:i}});return VOe(o,function(i,a){return zOe(i,a,n)})}function jOe(t,e,n,r){return t==null?[]:(Wn(e)||(e=e==null?[]:[e]),n=r?void 0:n,Wn(n)||(n=n==null?[]:[n]),YW(t,e,n))}function l$(t){return Sd(function(e){return e=ko(e,Ys(Hn)),mr(function(n){var r=this;return t(e,function(o){return Us(o,r,n)})})})}var WOe=l$(ko),QOe=WOe,HOe=mr,UOe=HOe,YOe=Math.min,XOe=UOe(function(t,e){e=e.length==1&&Wn(e[0])?ko(e[0],Ys(Hn)):ko(Ui(e,1),Ys(Hn));var n=e.length;return mr(function(r){for(var o=-1,i=YOe(r.length,n);++oe1e)return n;do e%2&&(n+=t),e=t1e(e/2),e&&(t+=t);while(e);return n}var n1e=HM("length"),r1e=n1e,XW="\\ud800-\\udfff",o1e="\\u0300-\\u036f",i1e="\\ufe20-\\ufe2f",a1e="\\u20d0-\\u20ff",s1e=o1e+i1e+a1e,l1e="\\ufe0e\\ufe0f",u1e="["+XW+"]",Qk="["+s1e+"]",Hk="\\ud83c[\\udffb-\\udfff]",c1e="(?:"+Qk+"|"+Hk+")",ZW="[^"+XW+"]",GW="(?:\\ud83c[\\udde6-\\uddff]){2}",qW="[\\ud800-\\udbff][\\udc00-\\udfff]",d1e="\\u200d",KW=c1e+"?",JW="["+l1e+"]?",f1e="(?:"+d1e+"(?:"+[ZW,GW,qW].join("|")+")"+JW+KW+")*",h1e=JW+KW+f1e,p1e="(?:"+[ZW+Qk+"?",Qk,GW,qW,u1e].join("|")+")",C8=RegExp(Hk+"(?="+Hk+")|"+p1e+h1e,"g");function g1e(t){for(var e=C8.lastIndex=0;C8.test(t);)++e;return e}function sm(t){return rm(t)?g1e(t):r1e(t)}var v1e=Math.ceil;function Rw(t,e){e=e===void 0?" ":Hs(e);var n=e.length;if(n<2)return n?Wk(e,t):e;var r=Wk(e,v1e(t/sm(e)));return rm(e)?Xf(mu(r),0,t).join(""):r.slice(0,t)}var m1e=Math.ceil,y1e=Math.floor;function b1e(t,e,n){t=Hr(t),e=nr(e);var r=e?sm(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Rw(y1e(o),n)+t+Rw(m1e(o),n)}function _1e(t,e,n){t=Hr(t),e=nr(e);var r=e?sm(t):0;return e&&r-1;)s!==t&&E8.call(s,l,1),E8.call(t,l,1);return t}function tQ(t,e){return t&&t.length&&e&&e.length?d$(t,e):t}var I1e=mr(tQ),L1e=I1e;function B1e(t,e,n){return t&&t.length&&e&&e.length?d$(t,e,Hn(n)):t}function F1e(t,e,n){return t&&t.length&&e&&e.length?d$(t,e,void 0,n):t}var V1e=Array.prototype,z1e=V1e.splice;function nQ(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;yd(o)?z1e.call(t,o,1):a$(t,o)}}return t}var j1e=Sd(function(t,e){var n=t==null?0:t.length,r=TM(t,e);return nQ(t,ko(e,function(o){return yd(o,n)?+o:o}).sort(UW)),r}),W1e=j1e,Q1e=Math.floor,H1e=Math.random;function f$(t,e){return t+Q1e(H1e()*(e-t+1))}var U1e=parseFloat,Y1e=Math.min,X1e=Math.random;function Z1e(t,e,n){if(n&&typeof n!="boolean"&&Ma(t,e,n)&&(e=n=void 0),n===void 0&&(typeof e=="boolean"?(n=e,e=void 0):typeof t=="boolean"&&(n=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=Gc(t),e===void 0?(e=t,t=0):e=Gc(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=X1e();return Y1e(t+o*(e-t+U1e("1e-"+((o+"").length-1))),e)}return f$(t,e)}var G1e=Math.ceil,q1e=Math.max;function K1e(t,e,n,r){for(var o=-1,i=q1e(G1e((e-t)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=t,t+=n;return a}function rQ(t){return function(e,n,r){return r&&typeof r!="number"&&Ma(e,n,r)&&(n=r=void 0),e=Gc(e),n===void 0?(n=e,e=0):n=Gc(n),r=r===void 0?e1&&Ma(t,e[0],e[1])?e=[]:n>2&&Ma(e[0],e[1],e[2])&&(e=[e[0]]),YW(t,Ui(e,1),[])}),sQ=Iwe,Lwe=4294967295,Bwe=Lwe-1,Fwe=Math.floor,Vwe=Math.min;function p$(t,e,n,r){var o=0,i=t==null?0:t.length;if(i===0)return 0;e=n(e);for(var a=e!==e,s=e===null,l=Qs(e),u=e===void 0;o>>1;function fC(t,e,n){var r=0,o=t==null?r:t.length;if(typeof e=="number"&&e===e&&o<=jwe){for(;r>>1,a=t[i];a!==null&&!Qs(a)&&(n?a<=e:a>>0,n?(t=Hr(t),t&&(typeof e=="string"||e!=null&&!r$(e))&&(e=Hs(e),!e&&rm(t))?Xf(mu(t),0,n):t.split(e,n)):[]}var Jwe="Expected a function",eSe=Math.max;function tSe(t,e){if(typeof t!="function")throw new TypeError(Jwe);return e=e==null?0:eSe(nr(e),0),mr(function(n){var r=n[e],o=Xf(n,0,e);return r&&Yf(o,r),Us(t,this,o)})}var nSe=om(function(t,e,n){return t+(n?" ":"")+MM(e)}),rSe=nSe;function oSe(t,e,n){return t=Hr(t),n=n==null?0:Rp(nr(n),0,t.length),e=Hs(e),t.slice(n,n+e.length)==e}function iSe(){return{}}function aSe(){return""}function sSe(){return!0}var lSe=Yx(function(t,e){return t-e},0),uSe=lSe;function cSe(t){return t&&t.length?i$(t,La):0}function dSe(t,e){return t&&t.length?i$(t,Hn(e)):0}function fSe(t){var e=t==null?0:t.length;return e?kl(t,1,e):[]}function hSe(t,e,n){return t&&t.length?(e=n||e===void 0?1:nr(e),kl(t,0,e<0?0:e)):[]}function pSe(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:nr(e),e=r-e,kl(t,e<0?0:e,r)):[]}function gSe(t,e){return t&&t.length?iC(t,Hn(e),!1,!0):[]}function vSe(t,e){return t&&t.length?iC(t,Hn(e)):[]}function mSe(t,e){return e(t),t}var uQ=Object.prototype,ySe=uQ.hasOwnProperty;function T8(t,e,n,r){return t===void 0||Ou(t,uQ[n])&&!ySe.call(r,n)?e:t}var bSe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function _Se(t){return"\\"+bSe[t]}var OSe=/<%=([\s\S]+?)%>/g,cQ=OSe,wSe=/<%-([\s\S]+?)%>/g,SSe=wSe,xSe=/<%([\s\S]+?)%>/g,CSe=xSe,ESe={escape:SSe,evaluate:CSe,interpolate:cQ,variable:"",imports:{_:{escape:SW}}},Yk=ESe,TSe="Invalid `variable` option passed into `_.template`",kSe=/\b__p \+= '';/g,ASe=/\b(__p \+=) '' \+/g,PSe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,NSe=/[()=,{}\[\]\/\s]/,MSe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bO=/($^)/,$Se=/['\n\r\u2028\u2029\\]/g,RSe=Object.prototype,k8=RSe.hasOwnProperty;function DSe(t,e,n){var r=Yk.imports._.templateSettings||Yk;n&&Ma(t,e,n)&&(e=void 0),t=Hr(t),e=Pw({},e,r,T8);var o=Pw({},e.imports,r.imports,T8),i=yi(o),a=e$(o,i),s,l,u=0,c=e.interpolate||bO,d="__p += '",f=RegExp((e.escape||bO).source+"|"+c.source+"|"+(c===cQ?MSe:bO).source+"|"+(e.evaluate||bO).source+"|$","g"),h=k8.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+` `:"";t.replace(f,function(m,b,w,O,S,x){return w||(w=O),d+=t.slice(u,x).replace($Se,_Se),b&&(s=!0,d+=`' + __e(`+b+`) + '`),S&&(l=!0,d+=`'; `+S+`; __p += '`),w&&(d+=`' + ((__t = (`+w+`)) == null ? '' : __t) + '`),u=x+m.length,m}),d+=`'; `;var g=k8.call(e,"variable")&&e.variable;if(!g)d=`with (obj) { `+d+` } `;else if(NSe.test(g))throw new Error(TSe);d=(l?d.replace(kSe,""):d).replace(ASe,"$1").replace(PSe,"$1;"),d="function("+(g||"obj")+`) { `+(g?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+d+`return __p }`;var v=bj(function(){return Function(i,h+"return "+d).apply(void 0,a)});if(v.source=d,AM(v))throw v;return v}var ISe="Expected a function";function qc(t,e,n){var r=!0,o=!0;if(typeof t!="function")throw new TypeError(ISe);return wo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Hi(t,e,{leading:r,maxWait:e,trailing:o})}function Wb(t,e){return e(t)}var LSe=9007199254740991,ZT=4294967295,BSe=Math.min;function FSe(t,e){if(t=nr(t),t<1||t>LSe)return[];var n=ZT,r=BSe(t,ZT);e=bc(e),t-=ZT;for(var o=SM(r,e);++n-1;);return n}function hQ(t,e){for(var n=-1,r=t.length;++n-1;);return n}function USe(t,e,n){if(t=Hr(t),t&&(n||e===void 0))return Jz(t);if(!t||!(e=Hs(e)))return t;var r=mu(t),o=mu(e),i=hQ(r,o),a=fQ(r,o)+1;return Xf(r,i,a).join("")}function YSe(t,e,n){if(t=Hr(t),t&&(n||e===void 0))return t.slice(0,Kz(t)+1);if(!t||!(e=Hs(e)))return t;var r=mu(t),o=fQ(r,mu(e))+1;return Xf(r,0,o).join("")}var XSe=/^\s+/;function ZSe(t,e,n){if(t=Hr(t),t&&(n||e===void 0))return t.replace(XSe,"");if(!t||!(e=Hs(e)))return t;var r=mu(t),o=hQ(r,mu(e));return Xf(r,o).join("")}var GSe=30,qSe="...",KSe=/\w*$/;function JSe(t,e){var n=GSe,r=qSe;if(wo(e)){var o="separator"in e?e.separator:o;n="length"in e?nr(e.length):n,r="omission"in e?Hs(e.omission):r}t=Hr(t);var i=t.length;if(rm(t)){var a=mu(t);i=a.length}if(n>=i)return t;var s=n-sm(r);if(s<1)return r;var l=a?Xf(a,0,s).join(""):t.slice(0,s);if(o===void 0)return l+r;if(a&&(s+=l.length-s),r$(o)){if(t.slice(s).search(o)){var u,c=l;for(o.global||(o=RegExp(o.source,Hr(KSe.exec(o))+"g")),o.lastIndex=0;u=o.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(t.indexOf(Hs(o),s)!=s){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+r}function exe(t){return cj(t,1)}var txe={"&":"&","<":"<",">":">",""":'"',"'":"'"},nxe=RM(txe),rxe=nxe,pQ=/&(?:amp|lt|gt|quot|#39);/g,oxe=RegExp(pQ.source);function ixe(t){return t=Hr(t),t&&oxe.test(t)?t.replace(pQ,rxe):t}var axe=1/0,sxe=Ug&&1/nC(new Ug([,-0]))[1]==axe?function(t){return new Ug(t)}:Qg,lxe=sxe,uxe=200;function Tf(t,e,n){var r=-1,o=Gx,i=t.length,a=!0,s=[],l=s;if(n)a=!1,o=ZM;else if(i>=uxe){var u=e?null:lxe(t);if(u)return nC(u);a=!1,o=P0,l=new pp}else l=e?[]:s;e:for(;++r1||this.__actions__.length||!(r instanceof Er)||!yd(n)?this.thru(o):(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:Wb,args:[o],thisArg:void 0}),new El(r,this.__chain__).thru(function(i){return e&&!i.length&&i.push(void 0),i}))}),Nxe=Pxe;function Mxe(){return Hj(this)}function $xe(){var t=this.__wrapped__;if(t instanceof Er){var e=t;return this.__actions__.length&&(e=new Er(this)),e=e.reverse(),e.__actions__.push({func:Wb,args:[Uk],thisArg:void 0}),new El(e,this.__chain__)}return this.thru(Uk)}function v$(t,e,n){var r=t.length;if(r<2)return r?Tf(t[0]):[];for(var o=-1,i=Array(r);++o1?t[e-1]:void 0;return n=typeof n=="function"?(t.pop(),n):void 0,gQ(t,n)}),Hxe=Qxe,un={chunk:lve,compact:Zme,concat:Gme,difference:d0e,differenceBy:h0e,differenceWith:g0e,drop:y0e,dropRight:b0e,dropRightWhile:_0e,dropWhile:O0e,fill:j0e,findIndex:qM,findLastIndex:aC,first:_8,flatten:kM,flattenDeep:NW,flattenDepth:tbe,fromPairs:hv,head:_8,indexOf:$W,initial:Vbe,intersection:Wbe,intersectionBy:Hbe,intersectionWith:Ybe,join:Q_e,last:ss,lastIndexOf:K_e,nth:NOe,pull:L1e,pullAll:tQ,pullAllBy:B1e,pullAllWith:F1e,pullAt:W1e,remove:uwe,reverse:Uk,slice:Nwe,sortedIndex:Wwe,sortedIndexBy:Qwe,sortedIndexOf:Hwe,sortedLastIndex:Uwe,sortedLastIndexBy:Ywe,sortedLastIndexOf:Xwe,sortedUniq:Zwe,sortedUniqBy:Gwe,tail:fSe,take:hSe,takeRight:pSe,takeRightWhile:gSe,takeWhile:vSe,union:V1,unionBy:fxe,unionWith:pxe,uniq:gxe,uniqBy:vxe,uniqWith:mxe,unzip:g$,unzipWith:gQ,without:kxe,xor:Dxe,xorBy:Lxe,xorWith:Fxe,zip:zxe,zipObject:jxe,zipObjectDeep:Wxe,zipWith:Hxe},eo={countBy:jye,each:zn,eachRight:y8,every:F0e,filter:by,find:Cf,findLast:Z0e,flatMap:KM,flatMapDeep:K0e,flatMapDepth:J0e,forEach:zn,forEachRight:y8,groupBy:xbe,includes:Bbe,invokeMap:a_e,keyBy:X_e,map:$a,orderBy:jOe,partition:A1e,reduce:iQ,reduceRight:swe,reject:lwe,sample:_we,sampleSize:Swe,shuffle:Twe,size:Pwe,some:Dwe,sortBy:sQ},Uxe={now:F1},Vo={after:pde,ary:cj,before:_j,bind:Oj,bindKey:Hpe,curry:YM,curryRight:XM,debounce:Hi,defer:a0e,delay:l0e,flip:rbe,memoize:Ib,negate:zb,once:FOe,overArgs:ZOe,partial:eQ,partialRight:T1e,rearg:iwe,rest:hwe,spread:tSe,throttle:qc,unary:exe,wrap:Axe},Cn={castArray:Jo,clone:Vk,cloneDeep:bn,cloneDeepWith:Hme,cloneWith:Yme,conformsTo:Rye,eq:Ou,gt:Ebe,gte:kbe,isArguments:fp,isArray:Wn,isArrayBuffer:c_e,isArrayLike:cs,isArrayLikeObject:Yo,isBoolean:Mw,isBuffer:xf,isDate:g_e,isElement:v_e,isEmpty:$w,isEqual:Oo,isEqualWith:O_e,isError:AM,isFinite:S_e,isFunction:md,isInteger:LW,isLength:Kx,isMap:Jj,isMatch:x_e,isMatchWith:C_e,isNaN:T_e,isNative:N_e,isNil:gr,isNull:am,isNumber:BW,isObject:wo,isObjectLike:Bo,isPlainObject:Lb,isRegExp:r$,isSafeInteger:D_e,isSet:eW,isString:uC,isSymbol:Qs,isTypedArray:nm,isUndefined:Ef,isWeakMap:L_e,isWeakSet:F_e,lt:oOe,lte:aOe,toArray:jW,toFinite:Gc,toInteger:nr,toLength:EW,toNumber:Ol,toPlainObject:gW,toSafeInteger:WSe,toString:Hr},Ba={add:ide,ceil:ive,divide:m0e,floor:ibe,max:fOe,maxBy:hOe,mean:gOe,meanBy:vOe,min:wOe,minBy:SOe,multiply:COe,round:ywe,subtract:uSe,sum:cSe,sumBy:dSe},m$={clamp:uve,inRange:Dbe,random:Z1e},Qn={assign:kr,assignIn:Z4,assignInWith:Pw,assignWith:Whe,at:Tpe,create:Wye,defaults:Jye,defaultsDeep:r0e,entries:sc,entriesIn:b8,extend:Z4,extendWith:Pw,findKey:H0e,findLastKey:G0e,forIn:gbe,forInRight:vbe,forOwn:mbe,forOwnRight:ybe,functions:bbe,functionsIn:_be,get:Vr,has:pv,hasIn:QM,invert:Kbe,invertBy:n_e,invoke:o_e,keys:yi,keysIn:ds,mapKeys:FW,mapValues:sOe,merge:nd,mergeWith:mW,omit:s$,omitBy:BOe,pick:hi,pickBy:HW,result:pwe,set:h$,setWith:xwe,toPairs:sc,toPairsIn:b8,transform:HSe,unset:_xe,update:wxe,updateWith:Sxe,values:im,valuesIn:Exe},_c={at:Nxe,chain:Hj,commit:Xme,lodash:_e,next:POe,plant:M1e,reverse:$xe,tap:mSe,thru:Wb,toIterator:VSe,toJSON:GT,value:GT,valueOf:GT,wrapperChain:Mxe},zr={camelCase:tve,capitalize:Aj,deburr:Pj,endsWith:C0e,escape:SW,escapeRegExp:L0e,kebabCase:U_e,lowerCase:eOe,lowerFirst:nOe,pad:b1e,padEnd:_1e,padStart:O1e,parseInt:x1e,repeat:cwe,replace:dwe,snakeCase:$we,split:Kwe,startCase:rSe,startsWith:oSe,template:DSe,templateSettings:Yk,toLower:zSe,toUpper:QSe,trim:USe,trimEnd:YSe,trimStart:ZSe,truncate:JSe,unescape:ixe,upperCase:Cxe,upperFirst:MM,words:Qj},Ur={attempt:bj,bindAll:zpe,cond:Pye,conforms:$ye,constant:OM,defaultTo:Gye,flow:fbe,flowRight:pbe,identity:La,iteratee:z_e,matches:uOe,matchesProperty:dOe,method:bOe,methodOf:OOe,mixin:zW,noop:Qg,nthArg:MOe,over:QOe,overEvery:qOe,overSome:JOe,property:cW,propertyOf:$1e,range:ewe,rangeRight:nwe,stubArray:IM,stubFalse:xM,stubObject:iSe,stubString:aSe,stubTrue:sSe,times:FSe,toPath:jSe,uniqueId:bxe};function Yxe(){var t=new Er(this.__wrapped__);return t.__actions__=es(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=es(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=es(this.__views__),t}function Xxe(){if(this.__filtered__){var t=new Er(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}var Zxe=Math.max,Gxe=Math.min;function qxe(t,e,n){for(var r=-1,o=n.length;++r * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */var nCe="4.17.21",rCe=2,oCe=1,iCe=3,yQ=4294967295,aCe=Array.prototype,sCe=Object.prototype,bQ=sCe.hasOwnProperty,P8=pa?pa.iterator:void 0,lCe=Math.max,N8=Math.min,y$=function(t){return function(e,n,r){if(r==null){var o=wo(n),i=o&&yi(n),a=i&&i.length&&sC(n,i);(a?a.length:o)||(r=n,n=e,e=this)}return t(e,n,r)}}(zW);_e.after=Vo.after;_e.ary=Vo.ary;_e.assign=Qn.assign;_e.assignIn=Qn.assignIn;_e.assignInWith=Qn.assignInWith;_e.assignWith=Qn.assignWith;_e.at=Qn.at;_e.before=Vo.before;_e.bind=Vo.bind;_e.bindAll=Ur.bindAll;_e.bindKey=Vo.bindKey;_e.castArray=Cn.castArray;_e.chain=_c.chain;_e.chunk=un.chunk;_e.compact=un.compact;_e.concat=un.concat;_e.cond=Ur.cond;_e.conforms=Ur.conforms;_e.constant=Ur.constant;_e.countBy=eo.countBy;_e.create=Qn.create;_e.curry=Vo.curry;_e.curryRight=Vo.curryRight;_e.debounce=Vo.debounce;_e.defaults=Qn.defaults;_e.defaultsDeep=Qn.defaultsDeep;_e.defer=Vo.defer;_e.delay=Vo.delay;_e.difference=un.difference;_e.differenceBy=un.differenceBy;_e.differenceWith=un.differenceWith;_e.drop=un.drop;_e.dropRight=un.dropRight;_e.dropRightWhile=un.dropRightWhile;_e.dropWhile=un.dropWhile;_e.fill=un.fill;_e.filter=eo.filter;_e.flatMap=eo.flatMap;_e.flatMapDeep=eo.flatMapDeep;_e.flatMapDepth=eo.flatMapDepth;_e.flatten=un.flatten;_e.flattenDeep=un.flattenDeep;_e.flattenDepth=un.flattenDepth;_e.flip=Vo.flip;_e.flow=Ur.flow;_e.flowRight=Ur.flowRight;_e.fromPairs=un.fromPairs;_e.functions=Qn.functions;_e.functionsIn=Qn.functionsIn;_e.groupBy=eo.groupBy;_e.initial=un.initial;_e.intersection=un.intersection;_e.intersectionBy=un.intersectionBy;_e.intersectionWith=un.intersectionWith;_e.invert=Qn.invert;_e.invertBy=Qn.invertBy;_e.invokeMap=eo.invokeMap;_e.iteratee=Ur.iteratee;_e.keyBy=eo.keyBy;_e.keys=yi;_e.keysIn=Qn.keysIn;_e.map=eo.map;_e.mapKeys=Qn.mapKeys;_e.mapValues=Qn.mapValues;_e.matches=Ur.matches;_e.matchesProperty=Ur.matchesProperty;_e.memoize=Vo.memoize;_e.merge=Qn.merge;_e.mergeWith=Qn.mergeWith;_e.method=Ur.method;_e.methodOf=Ur.methodOf;_e.mixin=y$;_e.negate=zb;_e.nthArg=Ur.nthArg;_e.omit=Qn.omit;_e.omitBy=Qn.omitBy;_e.once=Vo.once;_e.orderBy=eo.orderBy;_e.over=Ur.over;_e.overArgs=Vo.overArgs;_e.overEvery=Ur.overEvery;_e.overSome=Ur.overSome;_e.partial=Vo.partial;_e.partialRight=Vo.partialRight;_e.partition=eo.partition;_e.pick=Qn.pick;_e.pickBy=Qn.pickBy;_e.property=Ur.property;_e.propertyOf=Ur.propertyOf;_e.pull=un.pull;_e.pullAll=un.pullAll;_e.pullAllBy=un.pullAllBy;_e.pullAllWith=un.pullAllWith;_e.pullAt=un.pullAt;_e.range=Ur.range;_e.rangeRight=Ur.rangeRight;_e.rearg=Vo.rearg;_e.reject=eo.reject;_e.remove=un.remove;_e.rest=Vo.rest;_e.reverse=un.reverse;_e.sampleSize=eo.sampleSize;_e.set=Qn.set;_e.setWith=Qn.setWith;_e.shuffle=eo.shuffle;_e.slice=un.slice;_e.sortBy=eo.sortBy;_e.sortedUniq=un.sortedUniq;_e.sortedUniqBy=un.sortedUniqBy;_e.split=zr.split;_e.spread=Vo.spread;_e.tail=un.tail;_e.take=un.take;_e.takeRight=un.takeRight;_e.takeRightWhile=un.takeRightWhile;_e.takeWhile=un.takeWhile;_e.tap=_c.tap;_e.throttle=Vo.throttle;_e.thru=Wb;_e.toArray=Cn.toArray;_e.toPairs=Qn.toPairs;_e.toPairsIn=Qn.toPairsIn;_e.toPath=Ur.toPath;_e.toPlainObject=Cn.toPlainObject;_e.transform=Qn.transform;_e.unary=Vo.unary;_e.union=un.union;_e.unionBy=un.unionBy;_e.unionWith=un.unionWith;_e.uniq=un.uniq;_e.uniqBy=un.uniqBy;_e.uniqWith=un.uniqWith;_e.unset=Qn.unset;_e.unzip=un.unzip;_e.unzipWith=un.unzipWith;_e.update=Qn.update;_e.updateWith=Qn.updateWith;_e.values=Qn.values;_e.valuesIn=Qn.valuesIn;_e.without=un.without;_e.words=zr.words;_e.wrap=Vo.wrap;_e.xor=un.xor;_e.xorBy=un.xorBy;_e.xorWith=un.xorWith;_e.zip=un.zip;_e.zipObject=un.zipObject;_e.zipObjectDeep=un.zipObjectDeep;_e.zipWith=un.zipWith;_e.entries=Qn.toPairs;_e.entriesIn=Qn.toPairsIn;_e.extend=Qn.assignIn;_e.extendWith=Qn.assignInWith;y$(_e,_e);_e.add=Ba.add;_e.attempt=Ur.attempt;_e.camelCase=zr.camelCase;_e.capitalize=zr.capitalize;_e.ceil=Ba.ceil;_e.clamp=m$.clamp;_e.clone=Cn.clone;_e.cloneDeep=Cn.cloneDeep;_e.cloneDeepWith=Cn.cloneDeepWith;_e.cloneWith=Cn.cloneWith;_e.conformsTo=Cn.conformsTo;_e.deburr=zr.deburr;_e.defaultTo=Ur.defaultTo;_e.divide=Ba.divide;_e.endsWith=zr.endsWith;_e.eq=Cn.eq;_e.escape=zr.escape;_e.escapeRegExp=zr.escapeRegExp;_e.every=eo.every;_e.find=eo.find;_e.findIndex=un.findIndex;_e.findKey=Qn.findKey;_e.findLast=eo.findLast;_e.findLastIndex=un.findLastIndex;_e.findLastKey=Qn.findLastKey;_e.floor=Ba.floor;_e.forEach=eo.forEach;_e.forEachRight=eo.forEachRight;_e.forIn=Qn.forIn;_e.forInRight=Qn.forInRight;_e.forOwn=Qn.forOwn;_e.forOwnRight=Qn.forOwnRight;_e.get=Qn.get;_e.gt=Cn.gt;_e.gte=Cn.gte;_e.has=Qn.has;_e.hasIn=Qn.hasIn;_e.head=un.head;_e.identity=La;_e.includes=eo.includes;_e.indexOf=un.indexOf;_e.inRange=m$.inRange;_e.invoke=Qn.invoke;_e.isArguments=Cn.isArguments;_e.isArray=Wn;_e.isArrayBuffer=Cn.isArrayBuffer;_e.isArrayLike=Cn.isArrayLike;_e.isArrayLikeObject=Cn.isArrayLikeObject;_e.isBoolean=Cn.isBoolean;_e.isBuffer=Cn.isBuffer;_e.isDate=Cn.isDate;_e.isElement=Cn.isElement;_e.isEmpty=Cn.isEmpty;_e.isEqual=Cn.isEqual;_e.isEqualWith=Cn.isEqualWith;_e.isError=Cn.isError;_e.isFinite=Cn.isFinite;_e.isFunction=Cn.isFunction;_e.isInteger=Cn.isInteger;_e.isLength=Cn.isLength;_e.isMap=Cn.isMap;_e.isMatch=Cn.isMatch;_e.isMatchWith=Cn.isMatchWith;_e.isNaN=Cn.isNaN;_e.isNative=Cn.isNative;_e.isNil=Cn.isNil;_e.isNull=Cn.isNull;_e.isNumber=Cn.isNumber;_e.isObject=wo;_e.isObjectLike=Cn.isObjectLike;_e.isPlainObject=Cn.isPlainObject;_e.isRegExp=Cn.isRegExp;_e.isSafeInteger=Cn.isSafeInteger;_e.isSet=Cn.isSet;_e.isString=Cn.isString;_e.isSymbol=Cn.isSymbol;_e.isTypedArray=Cn.isTypedArray;_e.isUndefined=Cn.isUndefined;_e.isWeakMap=Cn.isWeakMap;_e.isWeakSet=Cn.isWeakSet;_e.join=un.join;_e.kebabCase=zr.kebabCase;_e.last=ss;_e.lastIndexOf=un.lastIndexOf;_e.lowerCase=zr.lowerCase;_e.lowerFirst=zr.lowerFirst;_e.lt=Cn.lt;_e.lte=Cn.lte;_e.max=Ba.max;_e.maxBy=Ba.maxBy;_e.mean=Ba.mean;_e.meanBy=Ba.meanBy;_e.min=Ba.min;_e.minBy=Ba.minBy;_e.stubArray=Ur.stubArray;_e.stubFalse=Ur.stubFalse;_e.stubObject=Ur.stubObject;_e.stubString=Ur.stubString;_e.stubTrue=Ur.stubTrue;_e.multiply=Ba.multiply;_e.nth=un.nth;_e.noop=Ur.noop;_e.now=Uxe.now;_e.pad=zr.pad;_e.padEnd=zr.padEnd;_e.padStart=zr.padStart;_e.parseInt=zr.parseInt;_e.random=m$.random;_e.reduce=eo.reduce;_e.reduceRight=eo.reduceRight;_e.repeat=zr.repeat;_e.replace=zr.replace;_e.result=Qn.result;_e.round=Ba.round;_e.sample=eo.sample;_e.size=eo.size;_e.snakeCase=zr.snakeCase;_e.some=eo.some;_e.sortedIndex=un.sortedIndex;_e.sortedIndexBy=un.sortedIndexBy;_e.sortedIndexOf=un.sortedIndexOf;_e.sortedLastIndex=un.sortedLastIndex;_e.sortedLastIndexBy=un.sortedLastIndexBy;_e.sortedLastIndexOf=un.sortedLastIndexOf;_e.startCase=zr.startCase;_e.startsWith=zr.startsWith;_e.subtract=Ba.subtract;_e.sum=Ba.sum;_e.sumBy=Ba.sumBy;_e.template=zr.template;_e.times=Ur.times;_e.toFinite=Cn.toFinite;_e.toInteger=nr;_e.toLength=Cn.toLength;_e.toLower=zr.toLower;_e.toNumber=Cn.toNumber;_e.toSafeInteger=Cn.toSafeInteger;_e.toString=Cn.toString;_e.toUpper=zr.toUpper;_e.trim=zr.trim;_e.trimEnd=zr.trimEnd;_e.trimStart=zr.trimStart;_e.truncate=zr.truncate;_e.unescape=zr.unescape;_e.uniqueId=Ur.uniqueId;_e.upperCase=zr.upperCase;_e.upperFirst=zr.upperFirst;_e.each=eo.forEach;_e.eachRight=eo.forEachRight;_e.first=un.head;y$(_e,function(){var t={};return yc(_e,function(e,n){bQ.call(_e.prototype,n)||(t[n]=e)}),t}(),{chain:!1});_e.VERSION=nCe;(_e.templateSettings=zr.templateSettings).imports._=_e;Ll(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){_e[t].placeholder=_e});Ll(["drop","take"],function(t,e){Er.prototype[t]=function(n){n=n===void 0?1:lCe(nr(n),0);var r=this.__filtered__&&!e?new Er(this):this.clone();return r.__filtered__?r.__takeCount__=N8(n,r.__takeCount__):r.__views__.push({size:N8(n,yQ),type:t+(r.__dir__<0?"Right":"")}),r},Er.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}});Ll(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==oCe||n==iCe;Er.prototype[t]=function(o){var i=this.clone();return i.__iteratees__.push({iteratee:Hn(o),type:n}),i.__filtered__=i.__filtered__||r,i}});Ll(["head","last"],function(t,e){var n="take"+(e?"Right":"");Er.prototype[t]=function(){return this[n](1).value()[0]}});Ll(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Er.prototype[t]=function(){return this.__filtered__?new Er(this):this[n](1)}});Er.prototype.compact=function(){return this.filter(La)};Er.prototype.find=function(t){return this.filter(t).head()};Er.prototype.findLast=function(t){return this.reverse().find(t)};Er.prototype.invokeMap=mr(function(t,e){return typeof t=="function"?new Er(this):this.map(function(n){return Vb(n,t,e)})});Er.prototype.reject=function(t){return this.filter(zb(Hn(t)))};Er.prototype.slice=function(t,e){t=nr(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Er(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=nr(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)};Er.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};Er.prototype.toArray=function(){return this.take(yQ)};yc(Er.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=_e[r?"take"+(e=="last"?"Right":""):e],i=r||/^find/.test(e);!o||(_e.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof Er,u=s[0],c=l||Wn(a),d=function(b){var w=o.apply(_e,Yf([b],s));return r&&f?w[0]:w};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,g=i&&!f,v=l&&!h;if(!i&&c){a=v?a:new Er(this);var m=t.apply(a,s);return m.__actions__.push({func:Wb,args:[d],thisArg:void 0}),new El(m,f)}return g&&v?t.apply(this,s):(m=this.thru(d),g?r?m.value()[0]:m.value():m)})});Ll(["pop","push","shift","sort","splice","unshift"],function(t){var e=aCe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);_e.prototype[t]=function(){var o=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Wn(i)?i:[],o)}return this[n](function(a){return e.apply(Wn(a)?a:[],o)})}});yc(Er.prototype,function(t,e){var n=_e[e];if(n){var r=n.name+"";bQ.call(Hg,r)||(Hg[r]=[]),Hg[r].push({name:e,func:n})}});Hg[qx(void 0,rCe).name]=[{name:"wrapper",func:void 0}];Er.prototype.clone=Yxe;Er.prototype.reverse=Xxe;Er.prototype.value=tCe;_e.prototype.at=_c.at;_e.prototype.chain=_c.wrapperChain;_e.prototype.commit=_c.commit;_e.prototype.next=_c.next;_e.prototype.plant=_c.plant;_e.prototype.reverse=_c.reverse;_e.prototype.toJSON=_e.prototype.valueOf=_e.prototype.value=_c.value;_e.prototype.first=_e.prototype.head;P8&&(_e.prototype[P8]=_c.toIterator);const Sn=t=>t===void 0,ir=t=>typeof t=="boolean",Pt=t=>typeof t=="number",$s=t=>!t&&t!==0||Ye(t)&&t.length===0||Zt(t)&&!Object.keys(t).length,Aa=t=>typeof Element=="undefined"?!1:t instanceof Element,ts=t=>gr(t),uCe=t=>St(t)?!Number.isNaN(Number(t)):!1,Qb=t=>t===window;var cCe=Object.defineProperty,dCe=Object.defineProperties,fCe=Object.getOwnPropertyDescriptors,M8=Object.getOwnPropertySymbols,hCe=Object.prototype.hasOwnProperty,pCe=Object.prototype.propertyIsEnumerable,$8=(t,e,n)=>e in t?cCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gCe=(t,e)=>{for(var n in e||(e={}))hCe.call(e,n)&&$8(t,n,e[n]);if(M8)for(var n of M8(e))pCe.call(e,n)&&$8(t,n,e[n]);return t},vCe=(t,e)=>dCe(t,fCe(e));function Dw(t,e){var n;const r=wr();return ua(()=>{r.value=t()},vCe(gCe({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),$b(r)}var R8;const kn=typeof window!="undefined",mCe=t=>typeof t!="undefined",D8=t=>typeof t=="function",yCe=t=>typeof t=="string",Yg=()=>{},Xk=kn&&((R8=window==null?void 0:window.navigator)==null?void 0:R8.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function gp(t){return typeof t=="function"?t():p(t)}function _Q(t,e){function n(...r){t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})}return n}function bCe(t,e={}){let n,r;return i=>{const a=gp(t),s=gp(e.maxWait);if(n&&clearTimeout(n),a<=0||s!==void 0&&s<=0)return r&&(clearTimeout(r),r=null),i();s&&!r&&(r=setTimeout(()=>{n&&clearTimeout(n),r=null,i()},s)),n=setTimeout(()=>{r&&clearTimeout(r),r=null,i()},a)}}function _Ce(t,e=!0,n=!0){let r=0,o,i=!0;const a=()=>{o&&(clearTimeout(o),o=void 0)};return l=>{const u=gp(t),c=Date.now()-r;if(a(),u<=0)return r=Date.now(),l();c>u&&(n||!i)?(r=Date.now(),l()):e&&(o=setTimeout(()=>{r=Date.now(),i=!0,a(),l()},u)),!n&&!o&&(o=setTimeout(()=>i=!0,u)),i=!1}}function OCe(t){return t}function wCe(t,e){let n,r,o;const i=z(!0),a=()=>{i.value=!0,o()};Le(t,a,{flush:"sync"});const s=D8(e)?e:e.get,l=D8(e)?void 0:e.set,u=aue((c,d)=>(r=c,o=d,{get(){return i.value&&(n=s(),i.value=!1),r(),n},set(f){l==null||l(f)}}));return Object.isExtensible(u)&&(u.trigger=a),u}function lm(t){return Q7()?(H7(t),!0):!1}function SCe(t,e=200,n={}){return _Q(bCe(e,n),t)}function xCe(t,e=200,n={}){if(e<=0)return t;const r=z(t.value),o=SCe(()=>{r.value=t.value},e,n);return Le(t,()=>o()),r}function OQ(t,e=200,n=!1,r=!0){return _Q(_Ce(e,n,r),t)}function b$(t,e=!0){Kt()?jt(t):e?t():wt(t)}function vp(t,e,n={}){const{immediate:r=!0}=n,o=z(!1);let i=null;function a(){i&&(clearTimeout(i),i=null)}function s(){o.value=!1,a()}function l(...u){a(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,t(...u)},gp(e))}return r&&(o.value=!0,kn&&l()),lm(s),{isPending:o,start:l,stop:s}}function pi(t){var e;const n=gp(t);return(e=n==null?void 0:n.$el)!=null?e:n}const xd=kn?window:void 0,CCe=kn?window.document:void 0;function pr(...t){let e,n,r,o;if(yCe(t[0])?([n,r,o]=t,e=xd):[e,n,r,o]=t,!e)return Yg;let i=Yg;const a=Le(()=>pi(e),l=>{i(),l&&(l.addEventListener(n,r,o),i=()=>{l.removeEventListener(n,r,o),i=Yg})},{immediate:!0,flush:"post"}),s=()=>{a(),i()};return lm(s),s}function _$(t,e,n={}){const{window:r=xd,ignore:o,capture:i=!0,detectIframe:a=!1}=n;if(!r)return;const s=z(!0);let l;const u=f=>{r.clearTimeout(l);const h=pi(t),g=f.composedPath();!h||h===f.target||g.includes(h)||!s.value||o&&o.length>0&&o.some(v=>{const m=pi(v);return m&&(f.target===m||g.includes(m))})||e(f)},c=[pr(r,"click",u,{passive:!0,capture:i}),pr(r,"pointerdown",f=>{const h=pi(t);s.value=!!h&&!f.composedPath().includes(h)},{passive:!0}),pr(r,"pointerup",f=>{if(f.button===0){const h=f.composedPath();f.composedPath=()=>h,l=r.setTimeout(()=>u(f),50)}},{passive:!0}),a&&pr(r,"blur",f=>{var h;const g=pi(t);((h=document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(g!=null&&g.contains(document.activeElement))&&e(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function ECe(t={}){const{window:e=xd}=t,n=wCe(()=>null,()=>e==null?void 0:e.document.activeElement);return e&&(pr(e,"blur",n.trigger,!0),pr(e,"focus",n.trigger,!0)),n}function O$(t,e=!1){const n=z(),r=()=>n.value=Boolean(t());return r(),b$(r,e),n}const Zk=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Gk="__vueuse_ssr_handlers__";Zk[Gk]=Zk[Gk]||{};Zk[Gk];function TCe(t,e,{window:n=xd,initialValue:r=""}={}){const o=z(r),i=$(()=>{var a;return pi(e)||((a=n==null?void 0:n.document)==null?void 0:a.documentElement)});return Le([i,()=>gp(t)],([a,s])=>{var l;if(a&&n){const u=(l=n.getComputedStyle(a).getPropertyValue(s))==null?void 0:l.trim();o.value=u||r}},{immediate:!0}),Le(o,a=>{var s;(s=i.value)!=null&&s.style&&i.value.style.setProperty(gp(t),a)}),o}function kCe({document:t=CCe}={}){if(!t)return z("visible");const e=z(t.visibilityState);return pr(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var I8=Object.getOwnPropertySymbols,ACe=Object.prototype.hasOwnProperty,PCe=Object.prototype.propertyIsEnumerable,NCe=(t,e)=>{var n={};for(var r in t)ACe.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&I8)for(var r of I8(t))e.indexOf(r)<0&&PCe.call(t,r)&&(n[r]=t[r]);return n};function Wr(t,e,n={}){const r=n,{window:o=xd}=r,i=NCe(r,["window"]);let a;const s=O$(()=>o&&"ResizeObserver"in o),l=()=>{a&&(a.disconnect(),a=void 0)},u=Le(()=>pi(t),d=>{l(),s.value&&o&&d&&(a=new ResizeObserver(e),a.observe(d,i))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return lm(c),{isSupported:s,stop:c}}function L8(t,e={}){const{reset:n=!0,windowResize:r=!0,windowScroll:o=!0,immediate:i=!0}=e,a=z(0),s=z(0),l=z(0),u=z(0),c=z(0),d=z(0),f=z(0),h=z(0);function g(){const v=pi(t);if(!v){n&&(a.value=0,s.value=0,l.value=0,u.value=0,c.value=0,d.value=0,f.value=0,h.value=0);return}const m=v.getBoundingClientRect();a.value=m.height,s.value=m.bottom,l.value=m.left,u.value=m.right,c.value=m.top,d.value=m.width,f.value=m.x,h.value=m.y}return Wr(t,g),Le(()=>pi(t),v=>!v&&g()),o&&pr("scroll",g,{passive:!0}),r&&pr("resize",g,{passive:!0}),b$(()=>{i&&g()}),{height:a,bottom:s,left:l,right:u,top:c,width:d,x:f,y:h,update:g}}function MCe(t,e={width:0,height:0},n={}){const r=z(e.width),o=z(e.height);return Wr(t,([i])=>{r.value=i.contentRect.width,o.value=i.contentRect.height},n),Le(()=>pi(t),i=>{r.value=i?e.width:0,o.value=i?e.height:0}),{width:r,height:o}}function $Ce(t,e,n={}){const{root:r,rootMargin:o="0px",threshold:i=.1,window:a=xd}=n,s=O$(()=>a&&"IntersectionObserver"in a);let l=Yg;const u=s.value?Le(()=>({el:pi(t),root:pi(r)}),({el:d,root:f})=>{if(l(),!d)return;const h=new IntersectionObserver(e,{root:f,rootMargin:o,threshold:i});h.observe(d),l=()=>{h.disconnect(),l=Yg}},{immediate:!0,flush:"post"}):Yg,c=()=>{l(),u()};return lm(c),{isSupported:s,stop:c}}var B8=Object.getOwnPropertySymbols,RCe=Object.prototype.hasOwnProperty,DCe=Object.prototype.propertyIsEnumerable,ICe=(t,e)=>{var n={};for(var r in t)RCe.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&B8)for(var r of B8(t))e.indexOf(r)<0&&DCe.call(t,r)&&(n[r]=t[r]);return n};function wQ(t,e,n={}){const r=n,{window:o=xd}=r,i=ICe(r,["window"]);let a;const s=O$(()=>o&&"MutationObserver"in o),l=()=>{a&&(a.disconnect(),a=void 0)},u=Le(()=>pi(t),d=>{l(),s.value&&o&&d&&(a=new MutationObserver(e),a.observe(d,i))},{immediate:!0}),c=()=>{l(),u()};return lm(c),{isSupported:s,stop:c}}var F8;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(F8||(F8={}));var LCe=Object.defineProperty,V8=Object.getOwnPropertySymbols,BCe=Object.prototype.hasOwnProperty,FCe=Object.prototype.propertyIsEnumerable,z8=(t,e,n)=>e in t?LCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VCe=(t,e)=>{for(var n in e||(e={}))BCe.call(e,n)&&z8(t,n,e[n]);if(V8)for(var n of V8(e))FCe.call(e,n)&&z8(t,n,e[n]);return t};const zCe={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};VCe({linear:OCe},zCe);function SQ(t,e,n,r={}){var o,i,a;const{passive:s=!1,eventName:l,deep:u=!1,defaultValue:c}=r,d=Kt(),f=n||(d==null?void 0:d.emit)||((o=d==null?void 0:d.$emit)==null?void 0:o.bind(d))||((a=(i=d==null?void 0:d.proxy)==null?void 0:i.$emit)==null?void 0:a.bind(d==null?void 0:d.proxy));let h=l;e||(e="modelValue"),h=l||h||`update:${e.toString()}`;const g=()=>mCe(t[e])?t[e]:c;if(s){const v=z(g());return Le(()=>t[e],m=>v.value=m),Le(v,m=>{(m!==t[e]||u)&&f(h,m)},{deep:u}),v}else return $({get(){return g()},set(v){f(h,v)}})}function jCe({window:t=xd}={}){if(!t)return z(!1);const e=z(t.document.hasFocus());return pr(t,"blur",()=>{e.value=!1}),pr(t,"focus",()=>{e.value=!0}),e}function WCe(t={}){const{window:e=xd,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:o=!0}=t,i=z(n),a=z(r),s=()=>{e&&(i.value=e.innerWidth,a.value=e.innerHeight)};return s(),b$(s),pr("resize",s,{passive:!0}),o&&pr("orientationchange",s,{passive:!0}),{width:i,height:a}}const j8={current:0},W8=z(0),xQ=2e3,Q8=Symbol("elZIndexContextKey"),CQ=Symbol("zIndexContextKey"),um=t=>{const e=Kt()?gt(Q8,j8):j8,n=t||(Kt()?gt(CQ,void 0):void 0),r=$(()=>{const a=p(n);return Pt(a)?a:xQ}),o=$(()=>r.value+W8.value),i=()=>(e.current++,W8.value=e.current,o.value);return!kn&>(Q8),{initialZIndex:r,currentZIndex:o,nextZIndex:i}};var QCe={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const HCe=t=>(e,n)=>UCe(e,n,p(t)),UCe=(t,e,n)=>Vr(n,t,t).replace(/\{(\w+)\}/g,(r,o)=>{var i;return`${(i=e==null?void 0:e[o])!=null?i:`{${o}}`}`}),YCe=t=>{const e=$(()=>p(t).name),n=Pr(t)?t:z(t);return{lang:e,locale:n,t:HCe(t)}},EQ=Symbol("localeContextKey"),En=t=>{const e=t||gt(EQ,z());return YCe($(()=>e.value||QCe))},TQ="__epPropKey",we=t=>t,XCe=t=>Zt(t)&&!!t[TQ],wu=(t,e)=>{if(!Zt(t)||XCe(t))return t;const{values:n,required:r,default:o,type:i,validator:a}=t,l={type:i,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Dn(t,"default")&&d.push(o),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");cue(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[TQ]:!0};return Dn(t,"default")&&(l.default=o),l},Ze=t=>hv(Object.entries(t).map(([e,n])=>[e,wu(n,e)])),Oc=["","default","small","large"],Fo=wu({type:String,values:Oc,required:!1}),kQ=Symbol("size"),AQ=()=>{const t=gt(kQ,{});return $(()=>p(t.size)||"")},PQ=Symbol("emptyValuesContextKey"),ZCe=["",void 0,null],GCe=void 0,Dp=Ze({emptyValues:Array,valueOnClear:{type:we([String,Number,Boolean,Function]),default:void 0,validator:t=>kt(t)?!t():!t}}),Hb=(t,e)=>{const n=Kt()?gt(PQ,z({})):z({}),r=$(()=>t.emptyValues||n.value.emptyValues||ZCe),o=$(()=>kt(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:kt(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:GCe),i=a=>r.value.includes(a);return r.value.includes(o.value),{emptyValues:r,valueOnClear:o,isEmptyValue:i}},gv=t=>Object.keys(t),NQ=t=>Object.entries(t),Wy=(t,e,n)=>({get value(){return Vr(t,e,n)},set value(r){h$(t,e,r)}}),Iw=z();function cm(t,e=void 0){const n=Kt()?gt(Xz,Iw):Iw;return t?$(()=>{var r,o;return(o=(r=n.value)==null?void 0:r[t])!=null?o:e}):n}function hC(t,e){const n=cm(),r=je(t,$(()=>{var s;return((s=n.value)==null?void 0:s.namespace)||zy})),o=En($(()=>{var s;return(s=n.value)==null?void 0:s.locale})),i=um($(()=>{var s;return((s=n.value)==null?void 0:s.zIndex)||xQ})),a=$(()=>{var s;return p(e)||((s=n.value)==null?void 0:s.size)||""});return w$($(()=>p(n)||{})),{ns:r,locale:o,zIndex:i,size:a}}const w$=(t,e,n=!1)=>{var r;const o=!!Kt(),i=o?cm():void 0,a=(r=e==null?void 0:e.provide)!=null?r:o?mn:void 0;if(!a)return;const s=$(()=>{const l=p(t);return i!=null&&i.value?qCe(i.value,l):l});return a(Xz,s),a(EQ,$(()=>s.value.locale)),a(Zz,$(()=>s.value.namespace)),a(CQ,$(()=>s.value.zIndex)),a(kQ,{size:$(()=>s.value.size||"")}),a(PQ,$(()=>({emptyValues:s.value.emptyValues,valueOnClear:s.value.valueOnClear}))),(n||!Iw.value)&&(Iw.value=s.value),s},qCe=(t,e)=>{const n=[...new Set([...gv(t),...gv(e)])],r={};for(const o of n)r[o]=e[o]!==void 0?e[o]:t[o];return r},KCe=(t=[])=>({version:Vce,install:(n,r)=>{n[E4]||(n[E4]=!0,t.forEach(o=>n.use(o)),r&&w$(r,n,!0))}}),zt="update:modelValue",ln="change",Lo="input",JCe=Ze({zIndex:{type:we([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),eEe={scroll:({scrollTop:t,fixed:e})=>Pt(t)&&ir(e),[ln]:t=>ir(t)};var Ge=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n};function tEe(t,e,n,r){const o=n-e;return t/=r/2,t<1?o/2*t*t*t+e:o/2*((t-=2)*t*t+2)+e}const kf=t=>kn?window.requestAnimationFrame(t):setTimeout(t,16),mp=t=>kn?window.cancelAnimationFrame(t):clearTimeout(t),MQ=(t="")=>t.split(" ").filter(e=>!!e.trim()),Ka=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},pl=(t,e)=>{!t||!e.trim()||t.classList.add(...MQ(e))},ca=(t,e)=>{!t||!e.trim()||t.classList.remove(...MQ(e))},Yc=(t,e)=>{var n;if(!kn||!t||!e)return"";let r=Ws(e);r==="float"&&(r="cssFloat");try{const o=t.style[r];if(o)return o;const i=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return i?i[r]:""}catch{return t.style[r]}},$Q=(t,e,n)=>{if(!(!t||!e))if(Zt(e))NQ(e).forEach(([r,o])=>$Q(t,r,o));else{const r=Ws(e);t.style[r]=n}};function so(t,e="px"){if(!t)return"";if(Pt(t)||uCe(t))return`${t}${e}`;if(St(t))return t}const nEe=(t,e)=>{if(!kn)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],r=Yc(t,n);return["scroll","auto","overlay"].some(o=>r.includes(o))},S$=(t,e)=>{if(!kn)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(nEe(n,e))return n;n=n.parentNode}return n};let _O;const RQ=t=>{var e;if(!kn)return 0;if(_O!==void 0)return _O;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const r=n.offsetWidth;n.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",n.appendChild(o);const i=o.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),_O=r-i,_O};function x$(t,e){if(!kn)return;if(!e){t.scrollTop=0;return}const n=[];let r=e.offsetParent;for(;r!==null&&t!==r&&t.contains(r);)n.push(r),r=r.offsetParent;const o=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),i=o+e.offsetHeight,a=t.scrollTop,s=a+t.clientHeight;os&&(t.scrollTop=i-t.clientHeight)}function rEe(t,e,n,r,o){const i=Date.now();let a;const s=()=>{const u=Date.now()-i,c=tEe(u>r?r:u,e,n,r);Qb(t)?t.scrollTo(window.pageXOffset,c):t.scrollTop=c,u{a&&mp(a)}}const H8=(t,e)=>Qb(e)?t.ownerDocument.documentElement:e,U8=t=>Qb(t)?window.scrollY:t.scrollTop;class oEe extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Ao(t,e){throw new oEe(`[${t}] ${e}`)}const DQ="ElAffix",iEe=de({name:DQ}),aEe=de({...iEe,props:JCe,emits:eEe,setup(t,{expose:e,emit:n}){const r=t,o=je("affix"),i=wr(),a=wr(),s=wr(),{height:l}=WCe(),{height:u,width:c,top:d,bottom:f,update:h}=L8(a,{windowScroll:!1}),g=L8(i),v=z(!1),m=z(0),b=z(0),w=$(()=>({height:v.value?`${u.value}px`:"",width:v.value?`${c.value}px`:""})),O=$(()=>{if(!v.value)return{};const E=r.offset?so(r.offset):0;return{height:`${u.value}px`,width:`${c.value}px`,top:r.position==="top"?E:"",bottom:r.position==="bottom"?E:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:r.zIndex}}),S=()=>{if(!s.value)return;m.value=s.value instanceof Window?document.documentElement.scrollTop:s.value.scrollTop||0;const{position:E,target:T,offset:M}=r,k=M+u.value;if(E==="top")if(T){const P=g.bottom.value-k;v.value=M>d.value&&g.bottom.value>0,b.value=P<0?P:0}else v.value=M>d.value;else if(T){const P=l.value-g.top.value-k;v.value=l.value-Mg.top.value,b.value=P<0?-P:0}else v.value=l.value-M{if(!v.value){h();return}v.value=!1,await wt(),h(),v.value=!0},C=async()=>{h(),await wt(),n("scroll",{scrollTop:m.value,fixed:v.value})};return Le(v,E=>n(ln,E)),jt(()=>{var E;r.target?(i.value=(E=document.querySelector(r.target))!=null?E:void 0,i.value||Ao(DQ,`Target does not exist: ${r.target}`)):i.value=document.documentElement,s.value=S$(a.value,!0),h()}),pr(s,"scroll",C),ua(S),e({update:S,updateRoot:x}),(E,T)=>(N(),Z("div",{ref_key:"root",ref:a,class:j(p(o).b()),style:bt(p(w))},[ee("div",{class:j({[p(o).m("fixed")]:v.value}),style:bt(p(O))},[ke(E.$slots,"default")],6)],6))}});var sEe=Ge(aEe,[["__file","affix.vue"]]);const Wt=(t,e)=>{if(t.install=n=>{for(const r of[t,...Object.values(e!=null?e:{})])n.component(r.name,r)},e)for(const[n,r]of Object.entries(e))t[n]=r;return t},IQ=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),lEe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),qr=t=>(t.install=or,t),uEe=Wt(sEe),cEe=Ze({size:{type:we([Number,String])},color:{type:String}}),dEe=de({name:"ElIcon",inheritAttrs:!1}),fEe=de({...dEe,props:cEe,setup(t){const e=t,n=je("icon"),r=$(()=>{const{size:o,color:i}=e;return!o&&!i?{}:{fontSize:Sn(o)?void 0:so(o),"--color":i}});return(o,i)=>(N(),Z("i",rn({class:p(n).b(),style:p(r)},o.$attrs),[ke(o.$slots,"default")],16))}});var hEe=Ge(fEe,[["__file","icon.vue"]]);const Ot=Wt(hEe);function Y8(){let t;const e=(r,o)=>{n(),t=window.setTimeout(r,o)},n=()=>window.clearTimeout(t);return lm(()=>n()),{registerTimeout:e,cancelTimeout:n}}const LQ=Ze({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),BQ=({showAfter:t,hideAfter:e,autoClose:n,open:r,close:o})=>{const{registerTimeout:i}=Y8(),{registerTimeout:a,cancelTimeout:s}=Y8();return{onOpen:c=>{i(()=>{r(c);const d=p(n);Pt(d)&&d>0&&a(()=>{o(c)},d)},p(t))},onClose:c=>{s(),i(()=>{o(c)},p(e))}}};/*! Element Plus Icons Vue v2.3.1 */var pEe=de({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),wc=pEe,gEe=de({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),rd=gEe,vEe=de({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),da=vEe,mEe=de({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),pC=mEe,yEe=de({name:"Back",__name:"back",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),ee("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),bEe=yEe,_Ee=de({name:"BottomLeft",__name:"bottom-left",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),ee("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),Ub=_Ee,OEe=de({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),wEe=OEe,SEe=de({name:"CaretRight",__name:"caret-right",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),FQ=SEe,xEe=de({name:"CaretTop",__name:"caret-top",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),CEe=xEe,EEe=de({name:"Check",__name:"check",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Yb=EEe,TEe=de({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),kEe=TEe,AEe=de({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ee("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),C$=AEe,PEe=de({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),E$=PEe,NEe=de({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),ee("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Cd=NEe,MEe=de({name:"Clock",__name:"clock",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ee("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),ee("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),VQ=MEe,$Ee=de({name:"Close",__name:"close",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),fa=$Ee,REe=de({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Af=REe,DEe=de({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Pf=DEe,IEe=de({name:"Delete",__name:"delete",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),gC=IEe,LEe=de({name:"Document",__name:"document",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),BEe=LEe,FEe=de({name:"Edit",__name:"edit",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),ee("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),zQ=FEe,VEe=de({name:"Expand",__name:"expand",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),zEe=VEe,jEe=de({name:"Fold",__name:"fold",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M896 192H128v128h768zm0 256H384v128h512zm0 256H128v128h768zM320 384 128 512l192 128z"})]))}}),WEe=jEe,QEe=de({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),od=QEe,HEe=de({name:"Hide",__name:"hide",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),ee("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),UEe=HEe,YEe=de({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),N0=YEe,XEe=de({name:"Loading",__name:"loading",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),lc=XEe,ZEe=de({name:"MapLocation",__name:"map-location",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),ee("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),GEe=ZEe,qEe=de({name:"Minus",__name:"minus",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),KEe=qEe,JEe=de({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),Qy=JEe,eTe=de({name:"More",__name:"more",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),tTe=eTe,nTe=de({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),rTe=nTe,oTe=de({name:"Plus",__name:"plus",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Lw=oTe,iTe=de({name:"Promotion",__name:"promotion",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),aTe=iTe,sTe=de({name:"QuestionFilled",__name:"question-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),lTe=sTe,uTe=de({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),cTe=uTe,dTe=de({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),jQ=dTe,fTe=de({name:"RemoveFilled",__name:"remove-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),hTe=fTe,pTe=de({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),gTe=pTe,vTe=de({name:"Search",__name:"search",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),T$=vTe,mTe=de({name:"Select",__name:"select",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04-316.8-316.8a64 64 0 0 1 0-90.496z"})]))}}),yTe=mTe,bTe=de({name:"Setting",__name:"setting",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),_Te=bTe,OTe=de({name:"SortDown",__name:"sort-down",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),wTe=OTe,STe=de({name:"SortUp",__name:"sort-up",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),xTe=STe,CTe=de({name:"StarFilled",__name:"star-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),OO=CTe,ETe=de({name:"Star",__name:"star",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),WQ=ETe,TTe=de({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),QQ=TTe,kTe=de({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),ATe=kTe,PTe=de({name:"View",__name:"view",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),NTe=PTe,MTe=de({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),vC=MTe,$Te=de({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),HQ=$Te,RTe=de({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(N(),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ee("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),DTe=RTe;const cr=we([String,Object,Function]),UQ={Close:fa},k$={Close:fa,SuccessFilled:QQ,InfoFilled:N0,WarningFilled:vC,CircleCloseFilled:E$},Nf={primary:N0,success:QQ,warning:vC,error:E$,info:N0},mC={validating:lc,success:C$,error:Cd},ITe=["light","dark"],LTe=Ze({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:gv(Nf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:ITe,default:"light"},...LQ}),BTe={open:()=>!0,close:t=>Sn(t)||t instanceof Event},FTe=de({name:"ElAlert"}),VTe=de({...FTe,props:LTe,emits:BTe,setup(t,{emit:e}){const n=t,{Close:r}=k$,o=Ro(),i=je("alert"),a=z(!1),s=$(()=>Nf[n.type]),l=$(()=>!!(n.description||o.default)),u=()=>{a.value=!0,e("open")},c=h=>{a.value=!1,e("close",h)},{onOpen:d,onClose:f}=BQ({showAfter:jn(n,"showAfter"),hideAfter:jn(n,"hideAfter"),autoClose:jn(n,"autoClose"),open:u,close:c});return kn&&d(),(h,g)=>(N(),me(Xo,{name:p(i).b("fade"),persisted:""},{default:V(()=>[Yt(ee("div",{class:j([p(i).b(),p(i).m(h.type),p(i).is("center",h.center),p(i).is(h.effect)]),role:"alert"},[h.showIcon&&(h.$slots.icon||p(s))?(N(),me(p(Ot),{key:0,class:j([p(i).e("icon"),{[p(i).is("big")]:p(l)}])},{default:V(()=>[ke(h.$slots,"icon",{},()=>[(N(),me(Jt(p(s))))])]),_:3},8,["class"])):ge("v-if",!0),ee("div",{class:j(p(i).e("content"))},[h.title||h.$slots.title?(N(),Z("span",{key:0,class:j([p(i).e("title"),{"with-description":p(l)}])},[ke(h.$slots,"title",{},()=>[We(ze(h.title),1)])],2)):ge("v-if",!0),p(l)?(N(),Z("p",{key:1,class:j(p(i).e("description"))},[ke(h.$slots,"default",{},()=>[We(ze(h.description),1)])],2)):ge("v-if",!0),h.closable?(N(),Z(ut,{key:2},[h.closeText?(N(),Z("div",{key:0,class:j([p(i).e("close-btn"),p(i).is("customed")]),onClick:c},ze(h.closeText),3)):(N(),me(p(Ot),{key:1,class:j(p(i).e("close-btn")),onClick:p(f)},{default:V(()=>[B(p(r))]),_:1},8,["class","onClick"]))],64)):ge("v-if",!0)],2)],2),[[Bn,a.value]])]),_:3},8,["name"]))}});var zTe=Ge(VTe,[["__file","alert.vue"]]);const jTe=Wt(zTe),A$=()=>kn&&/firefox/i.test(window.navigator.userAgent);let Ua;const WTe={height:"0",visibility:"hidden",overflow:A$()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},QTe=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function HTe(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),r=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),o=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:QTe.map(a=>[a,e.getPropertyValue(a)]),paddingSize:r,borderSize:o,boxSizing:n}}function X8(t,e=1,n){var r,o;Ua||(Ua=document.createElement("textarea"),((r=t.parentNode)!=null?r:document.body).appendChild(Ua));const{paddingSize:i,borderSize:a,boxSizing:s,contextStyle:l}=HTe(t);l.forEach(([f,h])=>Ua==null?void 0:Ua.style.setProperty(f,h)),Object.entries(WTe).forEach(([f,h])=>Ua==null?void 0:Ua.style.setProperty(f,h,"important")),Ua.value=t.value||t.placeholder||"";let u=Ua.scrollHeight;const c={};s==="border-box"?u=u+a:s==="content-box"&&(u=u-i),Ua.value="";const d=Ua.scrollHeight-i;if(Pt(e)){let f=d*e;s==="border-box"&&(f=f+i+a),u=Math.max(f,u),c.minHeight=`${f}px`}if(Pt(n)){let f=d*n;s==="border-box"&&(f=f+i+a),u=Math.min(f,u)}return c.height=`${u}px`,(o=Ua.parentNode)==null||o.removeChild(Ua),Ua=void 0,c}const Gr=t=>t,UTe=Ze({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Yi=t=>hi(UTe,t),Xb=Ze({id:{type:String,default:void 0},size:Fo,disabled:Boolean,modelValue:{type:we([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:we([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:cr},prefixIcon:{type:cr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:we([Object,Array,String]),default:()=>Gr({})},autofocus:Boolean,rows:{type:Number,default:2},...Yi(["ariaLabel"]),inputmode:{type:we(String),default:void 0},name:String}),YTe={[zt]:t=>St(t),input:t=>St(t),change:t=>St(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},XTe=["class","style"],ZTe=/^on[A-Z]/,yC=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,r=$(()=>((n==null?void 0:n.value)||[]).concat(XTe)),o=Kt();return $(o?()=>{var i;return hv(Object.entries((i=o.proxy)==null?void 0:i.$attrs).filter(([a])=>!r.value.includes(a)&&!(e&&ZTe.test(a))))}:()=>({}))},Z8={prefix:Math.floor(Math.random()*1e4),current:0},GTe=Symbol("elIdInjection"),P$=()=>Kt()?gt(GTe,Z8):Z8,Si=t=>{const e=P$(),n=bM();return Dw(()=>p(t)||`${n.value}-id-${e.prefix}-${e.current++}`)},Ip=Symbol("formContextKey"),uc=Symbol("formItemContextKey"),Xi=()=>{const t=gt(Ip,void 0),e=gt(uc,void 0);return{form:t,formItem:e}},Bl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=z(!1)),r||(r=z(!1));const o=Kt(),i=()=>{let u=o==null?void 0:o.parent;for(;u;){if(u.type.name==="ElFormItem")return!1;if(u.type.name==="ElLabelWrap")return!0;u=u.parent}return!1},a=z();let s;const l=$(()=>{var u;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((u=e.inputIds)==null?void 0:u.length)<=1)});return jt(()=>{s=Le([jn(t,"id"),n],([u,c])=>{const d=u!=null?u:c?void 0:Si().value;d!==a.value&&((e==null?void 0:e.removeInputId)&&!i()&&(a.value&&e.removeInputId(a.value),!(r!=null&&r.value)&&!c&&d&&e.addInputId(d)),a.value=d)},{immediate:!0})}),Hf(()=>{s&&s(),e!=null&&e.removeInputId&&a.value&&e.removeInputId(a.value)}),{isLabeledByFormItem:l,inputId:a}},YQ=t=>{const e=Kt();return $(()=>{var n,r;return(r=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:r[t]})},$o=(t,e={})=>{const n=z(void 0),r=e.prop?n:YQ("size"),o=e.global?n:AQ(),i=e.form?{size:void 0}:gt(Ip,void 0),a=e.formItem?{size:void 0}:gt(uc,void 0);return $(()=>r.value||p(t)||(a==null?void 0:a.size)||(i==null?void 0:i.size)||o.value||"")},Zi=t=>{const e=YQ("disabled"),n=gt(Ip,void 0);return $(()=>e.value||p(t)||(n==null?void 0:n.disabled)||!1)},qTe='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',KTe=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,G8=t=>Array.from(t.querySelectorAll(qTe)).filter(e=>M0(e)&&KTe(e)),M0=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},z1=function(t,e,...n){let r;e.includes("mouse")||e.includes("click")?r="MouseEvents":e.includes("key")?r="KeyboardEvent":r="HTMLEvents";const o=document.createEvent(r);return o.initEvent(e,...n),t.dispatchEvent(o),t},XQ=t=>!t.getAttribute("aria-owns"),ZQ=(t,e,n)=>{const{parentNode:r}=t;if(!r)return null;const o=r.querySelectorAll(n),i=Array.prototype.indexOf.call(o,t);return o[i+e]||null},j1=t=>{!t||(t.focus(),!XQ(t)&&t.click())};function qf(t,{disabled:e,beforeFocus:n,afterFocus:r,beforeBlur:o,afterBlur:i}={}){const a=Kt(),{emit:s}=a,l=wr(),u=z(!1),c=h=>{const g=kt(n)?n(h):!1;p(e)||u.value||g||(u.value=!0,s("focus",h),r==null||r())},d=h=>{var g;const v=kt(o)?o(h):!1;p(e)||h.relatedTarget&&((g=l.value)==null?void 0:g.contains(h.relatedTarget))||v||(u.value=!1,s("blur",h),i==null||i())},f=h=>{var g,v;p(e)||M0(h.target)||((g=l.value)==null?void 0:g.contains(document.activeElement))&&l.value!==document.activeElement||(v=t.value)==null||v.focus()};return Le([l,()=>p(e)],([h,g])=>{!h||(g?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),pr(l,"focus",c,!0),pr(l,"blur",d,!0),pr(l,"click",f,!0),{isFocused:u,wrapperRef:l,handleFocus:c,handleBlur:d}}const JTe=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t);function Zb({afterComposition:t,emit:e}){const n=z(!1),r=s=>{e==null||e("compositionstart",s),n.value=!0},o=s=>{var l;e==null||e("compositionupdate",s);const u=(l=s.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!JTe(c)},i=s=>{e==null||e("compositionend",s),n.value&&(n.value=!1,wt(()=>t(s)))};return{isComposing:n,handleComposition:s=>{s.type==="compositionend"?i(s):o(s)},handleCompositionStart:r,handleCompositionUpdate:o,handleCompositionEnd:i}}function e2e(t){let e;function n(){if(t.value==null)return;const{selectionStart:o,selectionEnd:i,value:a}=t.value;if(o==null||i==null)return;const s=a.slice(0,Math.max(0,o)),l=a.slice(Math.max(0,i));e={selectionStart:o,selectionEnd:i,value:a,beforeTxt:s,afterTxt:l}}function r(){if(t.value==null||e==null)return;const{value:o}=t.value,{beforeTxt:i,afterTxt:a,selectionStart:s}=e;if(i==null||a==null||s==null)return;let l=o.length;if(o.endsWith(a))l=o.length-a.length;else if(o.startsWith(i))l=i.length;else{const u=i[s-1],c=o.indexOf(u,s-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,r]}const t2e="ElInput",n2e=de({name:t2e,inheritAttrs:!1}),r2e=de({...n2e,props:Xb,emits:YTe,setup(t,{expose:e,emit:n}){const r=t,o=vd(),i=yC(),a=Ro(),s=$(()=>[r.type==="textarea"?v.b():g.b(),g.m(f.value),g.is("disabled",h.value),g.is("exceed",J.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||r.prefixIcon,[g.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:L.value&&H.value,[g.b("hidden")]:r.type==="hidden"},o.class]),l=$(()=>[g.e("wrapper"),g.is("focus",T.value)]),{form:u,formItem:c}=Xi(),{inputId:d}=Bl(r,{formItemContext:c}),f=$o(),h=Zi(),g=je("input"),v=je("textarea"),m=wr(),b=wr(),w=z(!1),O=z(!1),S=z(),x=wr(r.inputStyle),C=$(()=>m.value||b.value),{wrapperRef:E,isFocused:T,handleFocus:M,handleBlur:k}=qf(C,{disabled:h,afterBlur(){var Te;r.validateEvent&&((Te=c==null?void 0:c.validate)==null||Te.call(c,"blur").catch(Me=>void 0))}}),P=$(()=>{var Te;return(Te=u==null?void 0:u.statusIcon)!=null?Te:!1}),R=$(()=>(c==null?void 0:c.validateState)||""),D=$(()=>R.value&&mC[R.value]),F=$(()=>O.value?NTe:UEe),W=$(()=>[o.style]),I=$(()=>[r.inputStyle,x.value,{resize:r.resize}]),Q=$(()=>gr(r.modelValue)?"":String(r.modelValue)),L=$(()=>r.clearable&&!h.value&&!r.readonly&&!!Q.value&&(T.value||w.value)),H=$(()=>r.showPassword&&!h.value&&!!Q.value),re=$(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!h.value&&!r.readonly&&!r.showPassword),U=$(()=>Q.value.length),J=$(()=>!!re.value&&U.value>Number(r.maxlength)),ie=$(()=>!!a.suffix||!!r.suffixIcon||L.value||r.showPassword||re.value||!!R.value&&P.value),[te,he]=e2e(m);Wr(b,Te=>{if(fe(),!re.value||r.resize!=="both")return;const Me=Te[0],{width:Fe}=Me.contentRect;S.value={right:`calc(100% - ${Fe+15+6}px)`}});const K=()=>{const{type:Te,autosize:Me}=r;if(!(!kn||Te!=="textarea"||!b.value))if(Me){const Fe=Zt(Me)?Me.minRows:void 0,at=Zt(Me)?Me.maxRows:void 0,nt=X8(b.value,Fe,at);x.value={overflowY:"hidden",...nt},wt(()=>{b.value.offsetHeight,x.value=nt})}else x.value={minHeight:X8(b.value).minHeight}},fe=(Te=>{let Me=!1;return()=>{var Fe;if(Me||!r.autosize)return;((Fe=b.value)==null?void 0:Fe.offsetParent)===null||(Te(),Me=!0)}})(K),Ne=()=>{const Te=C.value,Me=r.formatter?r.formatter(Q.value):Q.value;!Te||Te.value===Me||(Te.value=Me)},$e=async Te=>{te();let{value:Me}=Te.target;if(r.formatter&&r.parser&&(Me=r.parser(Me)),!G.value){if(Me===Q.value){Ne();return}n(zt,Me),n(Lo,Me),await wt(),Ne(),he()}},ue=Te=>{let{value:Me}=Te.target;r.formatter&&r.parser&&(Me=r.parser(Me)),n(ln,Me)},{isComposing:G,handleCompositionStart:ve,handleCompositionUpdate:q,handleCompositionEnd:Ie}=Zb({emit:n,afterComposition:$e}),Ee=()=>{te(),O.value=!O.value,setTimeout(he)},Oe=()=>{var Te;return(Te=C.value)==null?void 0:Te.focus()},se=()=>{var Te;return(Te=C.value)==null?void 0:Te.blur()},X=Te=>{w.value=!1,n("mouseleave",Te)},oe=Te=>{w.value=!0,n("mouseenter",Te)},ce=Te=>{n("keydown",Te)},Ae=()=>{var Te;(Te=C.value)==null||Te.select()},ye=()=>{n(zt,""),n(ln,""),n("clear"),n(Lo,"")};return Le(()=>r.modelValue,()=>{var Te;wt(()=>K()),r.validateEvent&&((Te=c==null?void 0:c.validate)==null||Te.call(c,"change").catch(Me=>void 0))}),Le(Q,()=>Ne()),Le(()=>r.type,async()=>{await wt(),Ne(),K()}),jt(()=>{!r.formatter&&r.parser,Ne(),wt(K)}),e({input:m,textarea:b,ref:C,textareaStyle:I,autosize:jn(r,"autosize"),isComposing:G,focus:Oe,blur:se,select:Ae,clear:ye,resizeTextarea:K}),(Te,Me)=>(N(),Z("div",{class:j([p(s),{[p(g).bm("group","append")]:Te.$slots.append,[p(g).bm("group","prepend")]:Te.$slots.prepend}]),style:bt(p(W)),onMouseenter:oe,onMouseleave:X},[ge(" input "),Te.type!=="textarea"?(N(),Z(ut,{key:0},[ge(" prepend slot "),Te.$slots.prepend?(N(),Z("div",{key:0,class:j(p(g).be("group","prepend"))},[ke(Te.$slots,"prepend")],2)):ge("v-if",!0),ee("div",{ref_key:"wrapperRef",ref:E,class:j(p(l))},[ge(" prefix slot "),Te.$slots.prefix||Te.prefixIcon?(N(),Z("span",{key:0,class:j(p(g).e("prefix"))},[ee("span",{class:j(p(g).e("prefix-inner"))},[ke(Te.$slots,"prefix"),Te.prefixIcon?(N(),me(p(Ot),{key:0,class:j(p(g).e("icon"))},{default:V(()=>[(N(),me(Jt(Te.prefixIcon)))]),_:1},8,["class"])):ge("v-if",!0)],2)],2)):ge("v-if",!0),ee("input",rn({id:p(d),ref_key:"input",ref:m,class:p(g).e("inner")},p(i),{name:Te.name,minlength:Te.minlength,maxlength:Te.maxlength,type:Te.showPassword?O.value?"text":"password":Te.type,disabled:p(h),readonly:Te.readonly,autocomplete:Te.autocomplete,tabindex:Te.tabindex,"aria-label":Te.ariaLabel,placeholder:Te.placeholder,style:Te.inputStyle,form:Te.form,autofocus:Te.autofocus,role:Te.containerRole,inputmode:Te.inputmode,onCompositionstart:p(ve),onCompositionupdate:p(q),onCompositionend:p(Ie),onInput:$e,onChange:ue,onKeydown:ce}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),ge(" suffix slot "),p(ie)?(N(),Z("span",{key:1,class:j(p(g).e("suffix"))},[ee("span",{class:j(p(g).e("suffix-inner"))},[!p(L)||!p(H)||!p(re)?(N(),Z(ut,{key:0},[ke(Te.$slots,"suffix"),Te.suffixIcon?(N(),me(p(Ot),{key:0,class:j(p(g).e("icon"))},{default:V(()=>[(N(),me(Jt(Te.suffixIcon)))]),_:1},8,["class"])):ge("v-if",!0)],64)):ge("v-if",!0),p(L)?(N(),me(p(Ot),{key:1,class:j([p(g).e("icon"),p(g).e("clear")]),onMousedown:Rt(p(or),["prevent"]),onClick:ye},{default:V(()=>[B(p(Cd))]),_:1},8,["class","onMousedown"])):ge("v-if",!0),p(H)?(N(),me(p(Ot),{key:2,class:j([p(g).e("icon"),p(g).e("password")]),onClick:Ee},{default:V(()=>[(N(),me(Jt(p(F))))]),_:1},8,["class"])):ge("v-if",!0),p(re)?(N(),Z("span",{key:3,class:j(p(g).e("count"))},[ee("span",{class:j(p(g).e("count-inner"))},ze(p(U))+" / "+ze(Te.maxlength),3)],2)):ge("v-if",!0),p(R)&&p(D)&&p(P)?(N(),me(p(Ot),{key:4,class:j([p(g).e("icon"),p(g).e("validateIcon"),p(g).is("loading",p(R)==="validating")])},{default:V(()=>[(N(),me(Jt(p(D))))]),_:1},8,["class"])):ge("v-if",!0)],2)],2)):ge("v-if",!0)],2),ge(" append slot "),Te.$slots.append?(N(),Z("div",{key:1,class:j(p(g).be("group","append"))},[ke(Te.$slots,"append")],2)):ge("v-if",!0)],64)):(N(),Z(ut,{key:1},[ge(" textarea "),ee("textarea",rn({id:p(d),ref_key:"textarea",ref:b,class:[p(v).e("inner"),p(g).is("focus",p(T))]},p(i),{minlength:Te.minlength,maxlength:Te.maxlength,tabindex:Te.tabindex,disabled:p(h),readonly:Te.readonly,autocomplete:Te.autocomplete,style:p(I),"aria-label":Te.ariaLabel,placeholder:Te.placeholder,form:Te.form,autofocus:Te.autofocus,rows:Te.rows,role:Te.containerRole,onCompositionstart:p(ve),onCompositionupdate:p(q),onCompositionend:p(Ie),onInput:$e,onFocus:p(M),onBlur:p(k),onChange:ue,onKeydown:ce}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),p(re)?(N(),Z("span",{key:0,style:bt(S.value),class:j(p(g).e("count"))},ze(p(U))+" / "+ze(Te.maxlength),7)):ge("v-if",!0)],64))],38))}});var o2e=Ge(r2e,[["__file","input.vue"]]);const ao=Wt(o2e),rg=4,GQ={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},i2e=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),N$=Symbol("scrollbarContextKey"),a2e=Ze({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),s2e="Thumb",l2e=de({__name:"thumb",props:a2e,setup(t){const e=t,n=gt(N$),r=je("scrollbar");n||Ao(s2e,"can not inject scrollbar context");const o=z(),i=z(),a=z({}),s=z(!1);let l=!1,u=!1,c=0,d=0,f=kn?document.onselectstart:null;const h=$(()=>GQ[e.vertical?"vertical":"horizontal"]),g=$(()=>i2e({size:e.size,move:e.move,bar:h.value})),v=$(()=>o.value[h.value.offset]**2/n.wrapElement[h.value.scrollSize]/e.ratio/i.value[h.value.offset]),m=T=>{var M;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(M=window.getSelection())==null||M.removeAllRanges(),w(T);const k=T.currentTarget;!k||(a.value[h.value.axis]=k[h.value.offset]-(T[h.value.client]-k.getBoundingClientRect()[h.value.direction]))},b=T=>{if(!i.value||!o.value||!n.wrapElement)return;const M=Math.abs(T.target.getBoundingClientRect()[h.value.direction]-T[h.value.client]),k=i.value[h.value.offset]/2,P=(M-k)*100*v.value/o.value[h.value.offset];n.wrapElement[h.value.scroll]=P*n.wrapElement[h.value.scrollSize]/100},w=T=>{T.stopImmediatePropagation(),l=!0,c=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",O),document.addEventListener("mouseup",S),f=document.onselectstart,document.onselectstart=()=>!1},O=T=>{if(!o.value||!i.value||l===!1)return;const M=a.value[h.value.axis];if(!M)return;const k=(o.value.getBoundingClientRect()[h.value.direction]-T[h.value.client])*-1,P=i.value[h.value.offset]-M,R=(k-P)*100*v.value/o.value[h.value.offset];h.value.scroll==="scrollLeft"?n.wrapElement[h.value.scroll]=R*d/100:n.wrapElement[h.value.scroll]=R*c/100},S=()=>{l=!1,a.value[h.value.axis]=0,document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",S),E(),u&&(s.value=!1)},x=()=>{u=!1,s.value=!!e.size},C=()=>{u=!0,s.value=l};Yn(()=>{E(),document.removeEventListener("mouseup",S)});const E=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return pr(jn(n,"scrollbarElement"),"mousemove",x),pr(jn(n,"scrollbarElement"),"mouseleave",C),(T,M)=>(N(),me(Xo,{name:p(r).b("fade"),persisted:""},{default:V(()=>[Yt(ee("div",{ref_key:"instance",ref:o,class:j([p(r).e("bar"),p(r).is(p(h).key)]),onMousedown:b,onClick:Rt(()=>{},["stop"])},[ee("div",{ref_key:"thumb",ref:i,class:j(p(r).e("thumb")),style:bt(p(g)),onMousedown:m},null,38)],42,["onClick"]),[[Bn,T.always||s.value]])]),_:1},8,["name"]))}});var q8=Ge(l2e,[["__file","thumb.vue"]]);const u2e=Ze({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),c2e=de({__name:"bar",props:u2e,setup(t,{expose:e}){const n=t,r=gt(N$),o=z(0),i=z(0),a=z(""),s=z(""),l=z(1),u=z(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-rg,g=f.offsetWidth-rg;i.value=f.scrollTop*100/h*l.value,o.value=f.scrollLeft*100/g*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-rg,g=f.offsetWidth-rg,v=h**2/f.scrollHeight,m=g**2/f.scrollWidth,b=Math.max(v,n.minSize),w=Math.max(m,n.minSize);l.value=v/(h-v)/(b/(h-b)),u.value=m/(g-m)/(w/(g-w)),s.value=b+rg(N(),Z(ut,null,[B(q8,{move:o.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),B(q8,{move:i.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var d2e=Ge(c2e,[["__file","bar.vue"]]);const f2e=Ze({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:we([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Yi(["ariaLabel","ariaOrientation"])}),qQ={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(Pt)},h2e="ElScrollbar",p2e=de({name:h2e}),g2e=de({...p2e,props:f2e,emits:qQ,setup(t,{expose:e,emit:n}){const r=t,o=je("scrollbar");let i,a,s,l=0,u=0,c="";const d={bottom:!1,top:!1,right:!1,left:!1},f=z(),h=z(),g=z(),v=z(),m=$(()=>{const P={};return r.height&&(P.height=so(r.height)),r.maxHeight&&(P.maxHeight=so(r.maxHeight)),[r.wrapStyle,P]}),b=$(()=>[r.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!r.native}]),w=$(()=>[o.e("view"),r.viewClass]),O=P=>{var R;return(R=d[P])!=null?R:!1},S={top:"bottom",bottom:"top",left:"right",right:"left"},x=P=>{const R=S[c];if(!R)return;const D=P[c],F=P[R];D&&!d[c]&&(d[c]=!0),!F&&d[R]&&(d[R]=!1)},C=()=>{var P;if(h.value){(P=v.value)==null||P.handleScroll(h.value);const R=l,D=u;l=h.value.scrollTop,u=h.value.scrollLeft;const F={bottom:l+h.value.clientHeight>=h.value.scrollHeight-r.distance,top:l<=r.distance&&R!==0,right:u+h.value.clientWidth>=h.value.scrollWidth-r.distance&&D!==u,left:u<=r.distance&&D!==0};if(n("scroll",{scrollTop:l,scrollLeft:u}),R!==l&&(c=l>R?"bottom":"top"),D!==u&&(c=u>D?"right":"left"),r.distance>0){if(O(c))return;x(F)}F[c]&&n("end-reached",c)}};function E(P,R){Zt(P)?h.value.scrollTo(P):Pt(P)&&Pt(R)&&h.value.scrollTo(P,R)}const T=P=>{!Pt(P)||(h.value.scrollTop=P)},M=P=>{!Pt(P)||(h.value.scrollLeft=P)},k=()=>{var P;(P=v.value)==null||P.update(),d[c]=!1};return Le(()=>r.noresize,P=>{P?(i==null||i(),a==null||a(),s==null||s()):({stop:i}=Wr(g,k),{stop:a}=Wr(h,k),s=pr("resize",k))},{immediate:!0}),Le(()=>[r.maxHeight,r.height],()=>{r.native||wt(()=>{var P;k(),h.value&&((P=v.value)==null||P.handleScroll(h.value))})}),mn(N$,pn({scrollbarElement:f,wrapElement:h})),Vx(()=>{h.value&&(h.value.scrollTop=l,h.value.scrollLeft=u)}),jt(()=>{r.native||wt(()=>{k()})}),_u(()=>k()),e({wrapRef:h,update:k,scrollTo:E,setScrollTop:T,setScrollLeft:M,handleScroll:C}),(P,R)=>(N(),Z("div",{ref_key:"scrollbarRef",ref:f,class:j(p(o).b())},[ee("div",{ref_key:"wrapRef",ref:h,class:j(p(b)),style:bt(p(m)),tabindex:P.tabindex,onScroll:C},[(N(),me(Jt(P.tag),{id:P.id,ref_key:"resizeRef",ref:g,class:j(p(w)),style:bt(P.viewStyle),role:P.role,"aria-label":P.ariaLabel,"aria-orientation":P.ariaOrientation},{default:V(()=>[ke(P.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),P.native?ge("v-if",!0):(N(),me(d2e,{key:0,ref_key:"barRef",ref:v,always:P.always,"min-size":P.minSize},null,8,["always","min-size"]))],2))}});var v2e=Ge(g2e,[["__file","scrollbar.vue"]]);const Al=Wt(v2e),M$=Symbol("popper"),KQ=Symbol("popperContent"),JQ=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],eH=Ze({role:{type:String,values:JQ,default:"tooltip"}}),m2e=de({name:"ElPopper",inheritAttrs:!1}),y2e=de({...m2e,props:eH,setup(t,{expose:e}){const n=t,r=z(),o=z(),i=z(),a=z(),s=$(()=>n.role),l={triggerRef:r,popperInstanceRef:o,contentRef:i,referenceRef:a,role:s};return e(l),mn(M$,l),(u,c)=>ke(u.$slots,"default")}});var b2e=Ge(y2e,[["__file","popper.vue"]]);const _2e=de({name:"ElPopperArrow",inheritAttrs:!1}),O2e=de({..._2e,setup(t,{expose:e}){const n=je("popper"),{arrowRef:r,arrowStyle:o}=gt(KQ,void 0);return Yn(()=>{r.value=void 0}),e({arrowRef:r}),(i,a)=>(N(),Z("span",{ref_key:"arrowRef",ref:r,class:j(p(n).e("arrow")),style:bt(p(o)),"data-popper-arrow":""},null,6))}});var w2e=Ge(O2e,[["__file","arrow.vue"]]);const tH=Ze({virtualRef:{type:we(Object)},virtualTriggering:Boolean,onMouseenter:{type:we(Function)},onMouseleave:{type:we(Function)},onClick:{type:we(Function)},onKeydown:{type:we(Function)},onFocus:{type:we(Function)},onBlur:{type:we(Function)},onContextmenu:{type:we(Function)},id:String,open:Boolean}),nH=Symbol("elForwardRef"),S2e=t=>{mn(nH,{setForwardRef:n=>{t.value=n}})},x2e=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),C2e="ElOnlyChild",rH=de({name:C2e,setup(t,{slots:e,attrs:n}){var r;const o=gt(nH),i=x2e((r=o==null?void 0:o.setForwardRef)!=null?r:or);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,n);if(!s||s.length>1)return null;const l=oH(s);return l?Yt(td(l,n),[[i]]):null}}});function oH(t){if(!t)return null;const e=t;for(const n of e){if(Zt(n))switch(n.type){case vi:continue;case Gv:case"svg":return K8(n);case ut:return oH(n.children);default:return n}return K8(n)}return null}function K8(t){const e=je("only-child");return B("span",{class:e.e("content")},[t])}const E2e=de({name:"ElPopperTrigger",inheritAttrs:!1}),T2e=de({...E2e,props:tH,setup(t,{expose:e}){const n=t,{role:r,triggerRef:o}=gt(M$,void 0);S2e(o);const i=$(()=>s.value?n.id:void 0),a=$(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=$(()=>{if(r&&r.value!=="tooltip")return r.value}),l=$(()=>s.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return jt(()=>{Le(()=>n.virtualRef,d=>{d&&(o.value=pi(d))},{immediate:!0}),Le(o,(d,f)=>{u==null||u(),u=void 0,Aa(d)&&(c.forEach(h=>{var g;const v=n[h];v&&(d.addEventListener(h.slice(2).toLowerCase(),v),(g=f==null?void 0:f.removeEventListener)==null||g.call(f,h.slice(2).toLowerCase(),v))}),M0(d)&&(u=Le([i,a,s,l],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((g,v)=>{gr(h[v])?d.removeAttribute(g):d.setAttribute(g,h[v])})},{immediate:!0}))),Aa(f)&&M0(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>f.removeAttribute(h))},{immediate:!0})}),Yn(()=>{if(u==null||u(),u=void 0,o.value&&Aa(o.value)){const d=o.value;c.forEach(f=>{const h=n[f];h&&d.removeEventListener(f.slice(2).toLowerCase(),h)}),o.value=void 0}}),e({triggerRef:o}),(d,f)=>d.virtualTriggering?ge("v-if",!0):(N(),me(p(rH),rn({key:0},d.$attrs,{"aria-controls":p(i),"aria-describedby":p(a),"aria-expanded":p(l),"aria-haspopup":p(s)}),{default:V(()=>[ke(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var k2e=Ge(T2e,[["__file","trigger.vue"]]);const qT="focus-trap.focus-after-trapped",KT="focus-trap.focus-after-released",A2e="focus-trap.focusout-prevented",J8={cancelable:!0,bubbles:!1},P2e={cancelable:!0,bubbles:!1},e5="focusAfterTrapped",t5="focusAfterReleased",$$=Symbol("elFocusTrap"),R$=z(),bC=z(0),D$=z(0);let wO=0;const iH=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},n5=(t,e)=>{for(const n of t)if(!N2e(n,e))return n},N2e=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},M2e=t=>{const e=iH(t),n=n5(e,t),r=n5(e.reverse(),t);return[n,r]},$2e=t=>t instanceof HTMLInputElement&&"select"in t,jc=(t,e)=>{if(t&&t.focus){const n=document.activeElement;let r=!1;Aa(t)&&!M0(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),r=!0),t.focus({preventScroll:!0}),D$.value=window.performance.now(),t!==n&&$2e(t)&&e&&t.select(),Aa(t)&&r&&t.removeAttribute("tabindex")}};function r5(t,e){const n=[...t],r=t.indexOf(e);return r!==-1&&n.splice(r,1),n}const R2e=()=>{let t=[];return{push:r=>{const o=t[0];o&&r!==o&&o.pause(),t=r5(t,r),t.unshift(r)},remove:r=>{var o,i;t=r5(t,r),(i=(o=t[0])==null?void 0:o.resume)==null||i.call(o)}}},D2e=(t,e=!1)=>{const n=document.activeElement;for(const r of t)if(jc(r,e),document.activeElement!==n)return},o5=R2e(),I2e=()=>bC.value>D$.value,SO=()=>{R$.value="pointer",bC.value=window.performance.now()},i5=()=>{R$.value="keyboard",bC.value=window.performance.now()},L2e=()=>(jt(()=>{wO===0&&(document.addEventListener("mousedown",SO),document.addEventListener("touchstart",SO),document.addEventListener("keydown",i5)),wO++}),Yn(()=>{wO--,wO<=0&&(document.removeEventListener("mousedown",SO),document.removeEventListener("touchstart",SO),document.removeEventListener("keydown",i5))}),{focusReason:R$,lastUserFocusTimestamp:bC,lastAutomatedFocusTimestamp:D$}),xO=t=>new CustomEvent(A2e,{...P2e,detail:t}),st={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let wg=[];const a5=t=>{t.code===st.esc&&wg.forEach(e=>e(t))},B2e=t=>{jt(()=>{wg.length===0&&document.addEventListener("keydown",a5),kn&&wg.push(t)}),Yn(()=>{wg=wg.filter(e=>e!==t),wg.length===0&&kn&&document.removeEventListener("keydown",a5)})},F2e=de({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[e5,t5,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=z();let r,o;const{focusReason:i}=L2e();B2e(g=>{t.trapped&&!a.paused&&e("release-requested",g)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=g=>{if(!t.loop&&!t.trapped||a.paused)return;const{code:v,altKey:m,ctrlKey:b,metaKey:w,currentTarget:O,shiftKey:S}=g,{loop:x}=t,C=v===st.tab&&!m&&!b&&!w,E=document.activeElement;if(C&&E){const T=O,[M,k]=M2e(T);if(M&&k){if(!S&&E===k){const R=xO({focusReason:i.value});e("focusout-prevented",R),R.defaultPrevented||(g.preventDefault(),x&&jc(M,!0))}else if(S&&[M,T].includes(E)){const R=xO({focusReason:i.value});e("focusout-prevented",R),R.defaultPrevented||(g.preventDefault(),x&&jc(k,!0))}}else if(E===T){const R=xO({focusReason:i.value});e("focusout-prevented",R),R.defaultPrevented||g.preventDefault()}}};mn($$,{focusTrapRef:n,onKeydown:s}),Le(()=>t.focusTrapEl,g=>{g&&(n.value=g)},{immediate:!0}),Le([n],([g],[v])=>{g&&(g.addEventListener("keydown",s),g.addEventListener("focusin",c),g.addEventListener("focusout",d)),v&&(v.removeEventListener("keydown",s),v.removeEventListener("focusin",c),v.removeEventListener("focusout",d))});const l=g=>{e(e5,g)},u=g=>e(t5,g),c=g=>{const v=p(n);if(!v)return;const m=g.target,b=g.relatedTarget,w=m&&v.contains(m);t.trapped||b&&v.contains(b)||(r=b),w&&e("focusin",g),!a.paused&&t.trapped&&(w?o=m:jc(o,!0))},d=g=>{const v=p(n);if(!(a.paused||!v))if(t.trapped){const m=g.relatedTarget;!gr(m)&&!v.contains(m)&&setTimeout(()=>{if(!a.paused&&t.trapped){const b=xO({focusReason:i.value});e("focusout-prevented",b),b.defaultPrevented||jc(o,!0)}},0)}else{const m=g.target;m&&v.contains(m)||e("focusout",g)}};async function f(){await wt();const g=p(n);if(g){o5.push(a);const v=g.contains(document.activeElement)?r:document.activeElement;if(r=v,!g.contains(v)){const b=new Event(qT,J8);g.addEventListener(qT,l),g.dispatchEvent(b),b.defaultPrevented||wt(()=>{let w=t.focusStartEl;St(w)||(jc(w),document.activeElement!==w&&(w="first")),w==="first"&&D2e(iH(g),!0),(document.activeElement===v||w==="container")&&jc(g)})}}}function h(){const g=p(n);if(g){g.removeEventListener(qT,l);const v=new CustomEvent(KT,{...J8,detail:{focusReason:i.value}});g.addEventListener(KT,u),g.dispatchEvent(v),!v.defaultPrevented&&(i.value=="keyboard"||!I2e()||g.contains(document.activeElement))&&jc(r!=null?r:document.body),g.removeEventListener(KT,u),o5.remove(a)}}return jt(()=>{t.trapped&&f(),Le(()=>t.trapped,g=>{g?f():h()})}),Yn(()=>{t.trapped&&h(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:s}}});function V2e(t,e,n,r,o,i){return ke(t.$slots,"default",{handleKeydown:t.onKeydown})}var dm=Ge(F2e,[["render",V2e],["__file","focus-trap.vue"]]),ns="top",Pl="bottom",Nl="right",rs="left",I$="auto",Gb=[ns,Pl,Nl,rs],vv="start",$0="end",z2e="clippingParents",aH="viewport",ty="popper",j2e="reference",s5=Gb.reduce(function(t,e){return t.concat([e+"-"+vv,e+"-"+$0])},[]),Ed=[].concat(Gb,[I$]).reduce(function(t,e){return t.concat([e,e+"-"+vv,e+"-"+$0])},[]),W2e="beforeRead",Q2e="read",H2e="afterRead",U2e="beforeMain",Y2e="main",X2e="afterMain",Z2e="beforeWrite",G2e="write",q2e="afterWrite",K2e=[W2e,Q2e,H2e,U2e,Y2e,X2e,Z2e,G2e,q2e];function cc(t){return t?(t.nodeName||"").toLowerCase():null}function Su(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function mv(t){var e=Su(t).Element;return t instanceof e||t instanceof Element}function Sl(t){var e=Su(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function L$(t){if(typeof ShadowRoot=="undefined")return!1;var e=Su(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function J2e(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!Sl(i)||!cc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function eke(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!Sl(o)||!cc(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}var sH={name:"applyStyles",enabled:!0,phase:"write",fn:J2e,effect:eke,requires:["computeStyles"]};function ec(t){return t.split("-")[0]}var tp=Math.max,Bw=Math.min,yv=Math.round;function bv(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,o=1;if(Sl(t)&&e){var i=t.offsetHeight,a=t.offsetWidth;a>0&&(r=yv(n.width)/a||1),i>0&&(o=yv(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function B$(t){var e=bv(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function lH(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&L$(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function id(t){return Su(t).getComputedStyle(t)}function tke(t){return["table","td","th"].indexOf(cc(t))>=0}function Kf(t){return((mv(t)?t.ownerDocument:t.document)||window.document).documentElement}function _C(t){return cc(t)==="html"?t:t.assignedSlot||t.parentNode||(L$(t)?t.host:null)||Kf(t)}function l5(t){return!Sl(t)||id(t).position==="fixed"?null:t.offsetParent}function nke(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Sl(t)){var r=id(t);if(r.position==="fixed")return null}var o=_C(t);for(L$(o)&&(o=o.host);Sl(o)&&["html","body"].indexOf(cc(o))<0;){var i=id(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function qb(t){for(var e=Su(t),n=l5(t);n&&tke(n)&&id(n).position==="static";)n=l5(n);return n&&(cc(n)==="html"||cc(n)==="body"&&id(n).position==="static")?e:n||nke(t)||e}function F$(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Hy(t,e,n){return tp(t,Bw(e,n))}function rke(t,e,n){var r=Hy(t,e,n);return r>n?n:r}function uH(){return{top:0,right:0,bottom:0,left:0}}function cH(t){return Object.assign({},uH(),t)}function dH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var oke=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,cH(typeof t!="number"?t:dH(t,Gb))};function ike(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ec(n.placement),l=F$(s),u=[rs,Nl].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!a)){var d=oke(o.padding,n),f=B$(i),h=l==="y"?ns:rs,g=l==="y"?Pl:Nl,v=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],b=qb(i),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,O=v/2-m/2,S=d[h],x=w-f[c]-d[g],C=w/2-f[c]/2+O,E=Hy(S,C,x),T=l;n.modifiersData[r]=(e={},e[T]=E,e.centerOffset=E-C,e)}}function ake(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!lH(e.elements.popper,o)||(e.elements.arrow=o))}var ske={name:"arrow",enabled:!0,phase:"main",fn:ike,effect:ake,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _v(t){return t.split("-")[1]}var lke={top:"auto",right:"auto",bottom:"auto",left:"auto"};function uke(t){var e=t.x,n=t.y,r=window,o=r.devicePixelRatio||1;return{x:yv(e*o)/o||0,y:yv(n*o)/o||0}}function u5(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=a.x,h=f===void 0?0:f,g=a.y,v=g===void 0?0:g,m=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=m.x,v=m.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),O=rs,S=ns,x=window;if(u){var C=qb(n),E="clientHeight",T="clientWidth";if(C===Su(n)&&(C=Kf(n),id(C).position!=="static"&&s==="absolute"&&(E="scrollHeight",T="scrollWidth")),C=C,o===ns||(o===rs||o===Nl)&&i===$0){S=Pl;var M=d&&C===x&&x.visualViewport?x.visualViewport.height:C[E];v-=M-r.height,v*=l?1:-1}if(o===rs||(o===ns||o===Pl)&&i===$0){O=Nl;var k=d&&C===x&&x.visualViewport?x.visualViewport.width:C[T];h-=k-r.width,h*=l?1:-1}}var P=Object.assign({position:s},u&&lke),R=c===!0?uke({x:h,y:v}):{x:h,y:v};if(h=R.x,v=R.y,l){var D;return Object.assign({},P,(D={},D[S]=w?"0":"",D[O]=b?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",D))}return Object.assign({},P,(e={},e[S]=w?v+"px":"",e[O]=b?h+"px":"",e.transform="",e))}function cke(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:ec(e.placement),variation:_v(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,u5(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,u5(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var fH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cke,data:{}},CO={passive:!0};function dke(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=Su(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,CO)}),s&&l.addEventListener("resize",n.update,CO),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,CO)}),s&&l.removeEventListener("resize",n.update,CO)}}var hH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dke,data:{}},fke={left:"right",right:"left",bottom:"top",top:"bottom"};function W1(t){return t.replace(/left|right|bottom|top/g,function(e){return fke[e]})}var hke={start:"end",end:"start"};function c5(t){return t.replace(/start|end/g,function(e){return hke[e]})}function V$(t){var e=Su(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function z$(t){return bv(Kf(t)).left+V$(t).scrollLeft}function pke(t){var e=Su(t),n=Kf(t),r=e.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+z$(t),y:s}}function gke(t){var e,n=Kf(t),r=V$(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=tp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=tp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+z$(t),l=-r.scrollTop;return id(o||n).direction==="rtl"&&(s+=tp(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function j$(t){var e=id(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function pH(t){return["html","body","#document"].indexOf(cc(t))>=0?t.ownerDocument.body:Sl(t)&&j$(t)?t:pH(_C(t))}function Uy(t,e){var n;e===void 0&&(e=[]);var r=pH(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Su(r),a=o?[i].concat(i.visualViewport||[],j$(r)?r:[]):r,s=e.concat(a);return o?s:s.concat(Uy(_C(a)))}function qk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vke(t){var e=bv(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function d5(t,e){return e===aH?qk(pke(t)):mv(e)?vke(e):qk(gke(Kf(t)))}function mke(t){var e=Uy(_C(t)),n=["absolute","fixed"].indexOf(id(t).position)>=0,r=n&&Sl(t)?qb(t):t;return mv(r)?e.filter(function(o){return mv(o)&&lH(o,r)&&cc(o)!=="body"}):[]}function yke(t,e,n){var r=e==="clippingParents"?mke(t):[].concat(e),o=[].concat(r,[n]),i=o[0],a=o.reduce(function(s,l){var u=d5(t,l);return s.top=tp(u.top,s.top),s.right=Bw(u.right,s.right),s.bottom=Bw(u.bottom,s.bottom),s.left=tp(u.left,s.left),s},d5(t,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function gH(t){var e=t.reference,n=t.element,r=t.placement,o=r?ec(r):null,i=r?_v(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(o){case ns:l={x:a,y:e.y-n.height};break;case Pl:l={x:a,y:e.y+e.height};break;case Nl:l={x:e.x+e.width,y:s};break;case rs:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=o?F$(o):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case vv:l[u]=l[u]-(e[c]/2-n[c]/2);break;case $0:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function R0(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.boundary,a=i===void 0?z2e:i,s=n.rootBoundary,l=s===void 0?aH:s,u=n.elementContext,c=u===void 0?ty:u,d=n.altBoundary,f=d===void 0?!1:d,h=n.padding,g=h===void 0?0:h,v=cH(typeof g!="number"?g:dH(g,Gb)),m=c===ty?j2e:ty,b=t.rects.popper,w=t.elements[f?m:c],O=yke(mv(w)?w:w.contextElement||Kf(t.elements.popper),a,l),S=bv(t.elements.reference),x=gH({reference:S,element:b,strategy:"absolute",placement:o}),C=qk(Object.assign({},b,x)),E=c===ty?C:S,T={top:O.top-E.top+v.top,bottom:E.bottom-O.bottom+v.bottom,left:O.left-E.left+v.left,right:E.right-O.right+v.right},M=t.modifiersData.offset;if(c===ty&&M){var k=M[o];Object.keys(T).forEach(function(P){var R=[Nl,Pl].indexOf(P)>=0?1:-1,D=[ns,Pl].indexOf(P)>=0?"y":"x";T[P]+=k[D]*R})}return T}function bke(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Ed:l,c=_v(r),d=c?s?s5:s5.filter(function(g){return _v(g)===c}):Gb,f=d.filter(function(g){return u.indexOf(g)>=0});f.length===0&&(f=d);var h=f.reduce(function(g,v){return g[v]=R0(t,{placement:v,boundary:o,rootBoundary:i,padding:a})[ec(v)],g},{});return Object.keys(h).sort(function(g,v){return h[g]-h[v]})}function _ke(t){if(ec(t)===I$)return[];var e=W1(t);return[c5(t),e,c5(e)]}function Oke(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,g=h===void 0?!0:h,v=n.allowedAutoPlacements,m=e.options.placement,b=ec(m),w=b===m,O=l||(w||!g?[W1(m)]:_ke(m)),S=[m].concat(O).reduce(function(te,he){return te.concat(ec(he)===I$?bke(e,{placement:he,boundary:c,rootBoundary:d,padding:u,flipVariations:g,allowedAutoPlacements:v}):he)},[]),x=e.rects.reference,C=e.rects.popper,E=new Map,T=!0,M=S[0],k=0;k=0,W=F?"width":"height",I=R0(e,{placement:P,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),Q=F?D?Nl:rs:D?Pl:ns;x[W]>C[W]&&(Q=W1(Q));var L=W1(Q),H=[];if(i&&H.push(I[R]<=0),s&&H.push(I[Q]<=0,I[L]<=0),H.every(function(te){return te})){M=P,T=!1;break}E.set(P,H)}if(T)for(var re=g?3:1,U=function(te){var he=S.find(function(K){var ne=E.get(K);if(ne)return ne.slice(0,te).every(function(fe){return fe})});if(he)return M=he,"break"},J=re;J>0;J--){var ie=U(J);if(ie==="break")break}e.placement!==M&&(e.modifiersData[r]._skip=!0,e.placement=M,e.reset=!0)}}var wke={name:"flip",enabled:!0,phase:"main",fn:Oke,requiresIfExists:["offset"],data:{_skip:!1}};function f5(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function h5(t){return[ns,Nl,Pl,rs].some(function(e){return t[e]>=0})}function Ske(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,a=R0(e,{elementContext:"reference"}),s=R0(e,{altBoundary:!0}),l=f5(a,r),u=f5(s,o,i),c=h5(l),d=h5(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var xke={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ske};function Cke(t,e,n){var r=ec(t),o=[rs,ns].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[rs,Nl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function Eke(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,a=Ed.reduce(function(c,d){return c[d]=Cke(d,e.rects,i),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}var Tke={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Eke};function kke(t){var e=t.state,n=t.name;e.modifiersData[n]=gH({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var vH={name:"popperOffsets",enabled:!0,phase:"read",fn:kke,data:{}};function Ake(t){return t==="x"?"y":"x"}function Pke(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,g=n.tetherOffset,v=g===void 0?0:g,m=R0(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=ec(e.placement),w=_v(e.placement),O=!w,S=F$(b),x=Ake(S),C=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,M=typeof v=="function"?v(Object.assign({},e.rects,{placement:e.placement})):v,k=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(C){if(i){var D,F=S==="y"?ns:rs,W=S==="y"?Pl:Nl,I=S==="y"?"height":"width",Q=C[S],L=Q+m[F],H=Q-m[W],re=h?-T[I]/2:0,U=w===vv?E[I]:T[I],J=w===vv?-T[I]:-E[I],ie=e.elements.arrow,te=h&&ie?B$(ie):{width:0,height:0},he=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:uH(),K=he[F],ne=he[W],fe=Hy(0,E[I],te[I]),Ne=O?E[I]/2-re-fe-K-k.mainAxis:U-fe-K-k.mainAxis,$e=O?-E[I]/2+re+fe+ne+k.mainAxis:J+fe+ne+k.mainAxis,ue=e.elements.arrow&&qb(e.elements.arrow),G=ue?S==="y"?ue.clientTop||0:ue.clientLeft||0:0,ve=(D=P==null?void 0:P[S])!=null?D:0,q=Q+Ne-ve-G,Ie=Q+$e-ve,Ee=Hy(h?Bw(L,q):L,Q,h?tp(H,Ie):H);C[S]=Ee,R[S]=Ee-Q}if(s){var Oe,se=S==="x"?ns:rs,X=S==="x"?Pl:Nl,oe=C[x],ce=x==="y"?"height":"width",Ae=oe+m[se],ye=oe-m[X],Te=[ns,rs].indexOf(b)!==-1,Me=(Oe=P==null?void 0:P[x])!=null?Oe:0,Fe=Te?Ae:oe-E[ce]-T[ce]-Me+k.altAxis,at=Te?oe+E[ce]+T[ce]-Me-k.altAxis:ye,nt=h&&Te?rke(Fe,oe,at):Hy(h?Fe:Ae,oe,h?at:ye);C[x]=nt,R[x]=nt-oe}e.modifiersData[r]=R}}var Nke={name:"preventOverflow",enabled:!0,phase:"main",fn:Pke,requiresIfExists:["offset"]};function Mke(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function $ke(t){return t===Su(t)||!Sl(t)?V$(t):Mke(t)}function Rke(t){var e=t.getBoundingClientRect(),n=yv(e.width)/t.offsetWidth||1,r=yv(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Dke(t,e,n){n===void 0&&(n=!1);var r=Sl(e),o=Sl(e)&&Rke(e),i=Kf(e),a=bv(t,o),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((cc(e)!=="body"||j$(i))&&(s=$ke(e)),Sl(e)?(l=bv(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=z$(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ike(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&o(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function Lke(t){var e=Ike(t);return K2e.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function Bke(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Fke(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var p5={placement:"bottom",modifiers:[],strategy:"absolute"};function g5(){for(var t=arguments.length,e=new Array(t),n=0;n({})},strategy:{type:String,values:Wke,default:"absolute"}}),yH=Ze({...Qke,...mH,id:String,style:{type:we([String,Array,Object])},className:{type:we([String,Array,Object])},effect:{type:we(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:we([String,Array,Object])},popperStyle:{type:we([String,Array,Object])},referenceEl:{type:we(Object)},triggerTargetEl:{type:we(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Yi(["ariaLabel"])}),Hke={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},Uke=(t,e)=>{const n=z(!1),r=z();return{focusStartRef:r,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(r.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:u=>{t.visible&&!n.value&&(u.target&&(r.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},Yke=(t,e=[])=>{const{placement:n,strategy:r,popperOptions:o}=t,i={placement:n,strategy:r,...o,modifiers:[...Zke(t),...e]};return Gke(i,o==null?void 0:o.modifiers),i},Xke=t=>{if(!!kn)return pi(t)};function Zke(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:r}=t;return[{name:"offset",options:{offset:[0,e!=null?e:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Gke(t,e){e&&(t.modifiers=[...t.modifiers,...e!=null?e:[]])}const qke=(t,e,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=Kke(l);Object.assign(a.value,u)},requires:["computeStyles"]},o=$(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=p(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),i=wr(),a=z({styles:{popper:{position:p(o).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{!i.value||(i.value.destroy(),i.value=void 0)};return Le(o,l=>{const u=p(i);u&&u.setOptions(l)},{deep:!0}),Le([t,e],([l,u])=>{s(),!(!l||!u)&&(i.value=jke(l,u,p(o)))}),Yn(()=>{s()}),{state:$(()=>{var l;return{...((l=p(i))==null?void 0:l.state)||{}}}),styles:$(()=>p(a).styles),attributes:$(()=>p(a).attributes),update:()=>{var l;return(l=p(i))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=p(i))==null?void 0:l.forceUpdate()},instanceRef:$(()=>p(i))}};function Kke(t){const e=Object.keys(t.elements),n=hv(e.map(o=>[o,t.styles[o]||{}])),r=hv(e.map(o=>[o,t.attributes[o]]));return{styles:n,attributes:r}}const Jke=0,eAe=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:r,role:o}=gt(M$,void 0),i=z(),a=$(()=>t.arrowOffset),s=$(()=>({name:"eventListeners",enabled:!!t.visible})),l=$(()=>{var b;const w=p(i),O=(b=p(a))!=null?b:Jke;return{name:"arrow",enabled:!Ef(w),options:{element:w,padding:O}}}),u=$(()=>({onFirstUpdate:()=>{g()},...Yke(t,[p(l),p(s)])})),c=$(()=>Xke(t.referenceEl)||p(r)),{attributes:d,state:f,styles:h,update:g,forceUpdate:v,instanceRef:m}=qke(c,n,u);return Le(m,b=>e.value=b,{flush:"sync"}),jt(()=>{Le(()=>{var b;return(b=p(c))==null?void 0:b.getBoundingClientRect()},()=>{g()})}),{attributes:d,arrowRef:i,contentRef:n,instanceRef:m,state:f,styles:h,role:o,forceUpdate:v,update:g}},tAe=(t,{attributes:e,styles:n,role:r})=>{const{nextZIndex:o}=um(),i=je("popper"),a=$(()=>p(e).popper),s=z(Pt(t.zIndex)?t.zIndex:o()),l=$(()=>[i.b(),i.is("pure",t.pure),i.is(t.effect),t.popperClass]),u=$(()=>[{zIndex:p(s)},p(n).popper,t.popperStyle||{}]),c=$(()=>r.value==="dialog"?"false":void 0),d=$(()=>p(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:a,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=Pt(t.zIndex)?t.zIndex:o()}}},nAe=de({name:"ElPopperContent"}),rAe=de({...nAe,props:yH,emits:Hke,setup(t,{expose:e,emit:n}){const r=t,{focusStartRef:o,trapped:i,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=Uke(r,n),{attributes:d,arrowRef:f,contentRef:h,styles:g,instanceRef:v,role:m,update:b}=eAe(r),{ariaModal:w,arrowStyle:O,contentAttrs:S,contentClass:x,contentStyle:C,updateZIndex:E}=tAe(r,{styles:g,attributes:d,role:m}),T=gt(uc,void 0);mn(KQ,{arrowStyle:O,arrowRef:f}),T&&mn(uc,{...T,addInputId:or,removeInputId:or});let M;const k=(R=!0)=>{b(),R&&E()},P=()=>{k(!1),r.visible&&r.focusOnShow?i.value=!0:r.visible===!1&&(i.value=!1)};return jt(()=>{Le(()=>r.triggerTargetEl,(R,D)=>{M==null||M(),M=void 0;const F=p(R||h.value),W=p(D||h.value);Aa(F)&&(M=Le([m,()=>r.ariaLabel,w,()=>r.id],I=>{["role","aria-label","aria-modal","id"].forEach((Q,L)=>{gr(I[L])?F.removeAttribute(Q):F.setAttribute(Q,I[L])})},{immediate:!0})),W!==F&&Aa(W)&&["role","aria-label","aria-modal","id"].forEach(I=>{W.removeAttribute(I)})},{immediate:!0}),Le(()=>r.visible,P,{immediate:!0})}),Yn(()=>{M==null||M(),M=void 0}),e({popperContentRef:h,popperInstanceRef:v,updatePopper:k,contentStyle:C}),(R,D)=>(N(),Z("div",rn({ref_key:"contentRef",ref:h},p(S),{style:p(C),class:p(x),tabindex:"-1",onMouseenter:F=>R.$emit("mouseenter",F),onMouseleave:F=>R.$emit("mouseleave",F)}),[B(p(dm),{trapped:p(i),"trap-on-focus-in":!0,"focus-trap-el":p(h),"focus-start-el":p(o),onFocusAfterTrapped:p(s),onFocusAfterReleased:p(a),onFocusin:p(l),onFocusoutPrevented:p(u),onReleaseRequested:p(c)},{default:V(()=>[ke(R.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var oAe=Ge(rAe,[["__file","content.vue"]]);const bH=Wt(b2e),OC=Symbol("elTooltip"),wC=Ze({to:{type:we([String,Object]),required:!0},disabled:Boolean}),yo=Ze({...LQ,...yH,appendTo:{type:wC.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:we(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Yi(["ariaLabel"])}),Xg=Ze({...tH,disabled:Boolean,trigger:{type:we([String,Array]),default:"hover"},triggerKeys:{type:we(Array),default:()=>[st.enter,st.numpadEnter,st.space]}}),iAe=wu({type:we(Boolean),default:null}),aAe=wu({type:we(Function)}),sAe=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,r=[e],o={[t]:iAe,[n]:aAe};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const f=Kt(),{emit:h}=f,g=f.props,v=$(()=>kt(g[n])),m=$(()=>g[t]===null),b=E=>{a.value!==!0&&(a.value=!0,s&&(s.value=E),kt(c)&&c(E))},w=E=>{a.value!==!1&&(a.value=!1,s&&(s.value=E),kt(d)&&d(E))},O=E=>{if(g.disabled===!0||kt(u)&&!u())return;const T=v.value&&kn;T&&h(e,!0),(m.value||!T)&&b(E)},S=E=>{if(g.disabled===!0||!kn)return;const T=v.value&&kn;T&&h(e,!1),(m.value||!T)&&w(E)},x=E=>{!ir(E)||(g.disabled&&E?v.value&&h(e,!1):a.value!==E&&(E?b():w()))},C=()=>{a.value?S():O()};return Le(()=>g[t],x),l&&f.appContext.config.globalProperties.$route!==void 0&&Le(()=>({...f.proxy.$route}),()=>{l.value&&a.value&&S()}),jt(()=>{x(g[t])}),{hide:S,show:O,toggle:C,hasUpdateHandler:v}},useModelToggleProps:o,useModelToggleEmits:r}},{useModelToggleProps:lAe,useModelToggleEmits:uAe,useModelToggle:cAe}=sAe("visible"),dAe=Ze({...eH,...lAe,...yo,...Xg,...mH,showArrow:{type:Boolean,default:!0}}),fAe=[...uAe,"before-show","before-hide","show","hide","open","close"],hAe=(t,e)=>Ye(t)?t.includes(e):t===e,og=(t,e,n)=>r=>{hAe(p(t),e)&&n(r)},po=(t,e,{checkForDefaultPrevented:n=!0}={})=>o=>{const i=t==null?void 0:t(o);if(n===!1||!i)return e==null?void 0:e(o)},v5=t=>e=>e.pointerType==="mouse"?t(e):void 0,pAe=de({name:"ElTooltipTrigger"}),gAe=de({...pAe,props:Xg,setup(t,{expose:e}){const n=t,r=je("tooltip"),{controlled:o,id:i,open:a,onOpen:s,onClose:l,onToggle:u}=gt(OC,void 0),c=z(null),d=()=>{if(p(o)||n.disabled)return!0},f=jn(n,"trigger"),h=po(d,og(f,"hover",s)),g=po(d,og(f,"hover",l)),v=po(d,og(f,"click",S=>{S.button===0&&u(S)})),m=po(d,og(f,"focus",s)),b=po(d,og(f,"focus",l)),w=po(d,og(f,"contextmenu",S=>{S.preventDefault(),u(S)})),O=po(d,S=>{const{code:x}=S;n.triggerKeys.includes(x)&&(S.preventDefault(),u(S))});return e({triggerRef:c}),(S,x)=>(N(),me(p(k2e),{id:p(i),"virtual-ref":S.virtualRef,open:p(a),"virtual-triggering":S.virtualTriggering,class:j(p(r).e("trigger")),onBlur:p(b),onClick:p(v),onContextmenu:p(w),onFocus:p(m),onMouseenter:p(h),onMouseleave:p(g),onKeydown:p(O)},{default:V(()=>[ke(S.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var vAe=Ge(gAe,[["__file","trigger.vue"]]);const mAe=de({__name:"teleport",props:wC,setup(t){return(e,n)=>e.disabled?ke(e.$slots,"default",{key:0}):(N(),me(kz,{key:1,to:e.to},[ke(e.$slots,"default")],8,["to"]))}});var yAe=Ge(mAe,[["__file","teleport.vue"]]);const fm=Wt(yAe),_H=()=>{const t=bM(),e=P$(),n=$(()=>`${t.value}-popper-container-${e.prefix}`),r=$(()=>`#${n.value}`);return{id:n,selector:r}},bAe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},_Ae=()=>{const{id:t,selector:e}=_H();return jx(()=>{!kn||document.body.querySelector(e.value)||bAe(t.value)}),{id:t,selector:e}},OAe=de({name:"ElTooltipContent",inheritAttrs:!1}),wAe=de({...OAe,props:yo,setup(t,{expose:e}){const n=t,{selector:r}=_H(),o=je("tooltip"),i=z(),a=Dw(()=>{var L;return(L=i.value)==null?void 0:L.popperContentRef});let s;const{controlled:l,id:u,open:c,trigger:d,onClose:f,onOpen:h,onShow:g,onHide:v,onBeforeShow:m,onBeforeHide:b}=gt(OC,void 0),w=$(()=>n.transition||`${o.namespace.value}-fade-in-linear`),O=$(()=>n.persistent);Yn(()=>{s==null||s()});const S=$(()=>p(O)?!0:p(c)),x=$(()=>n.disabled?!1:p(c)),C=$(()=>n.appendTo||r.value),E=$(()=>{var L;return(L=n.style)!=null?L:{}}),T=z(!0),M=()=>{v(),Q()&&jc(document.body),T.value=!0},k=()=>{if(p(l))return!0},P=po(k,()=>{n.enterable&&p(d)==="hover"&&h()}),R=po(k,()=>{p(d)==="hover"&&f()}),D=()=>{var L,H;(H=(L=i.value)==null?void 0:L.updatePopper)==null||H.call(L),m==null||m()},F=()=>{b==null||b()},W=()=>{g()},I=()=>{n.virtualTriggering||f()},Q=L=>{var H;const re=(H=i.value)==null?void 0:H.popperContentRef,U=(L==null?void 0:L.relatedTarget)||document.activeElement;return re==null?void 0:re.contains(U)};return Le(()=>p(c),L=>{L?(T.value=!1,s=_$(a,()=>{if(p(l))return;p(d)!=="hover"&&f()})):s==null||s()},{flush:"post"}),Le(()=>n.content,()=>{var L,H;(H=(L=i.value)==null?void 0:L.updatePopper)==null||H.call(L)}),e({contentRef:i,isFocusInsideContent:Q}),(L,H)=>(N(),me(p(fm),{disabled:!L.teleported,to:p(C)},{default:V(()=>[p(S)||!T.value?(N(),me(Xo,{key:0,name:p(w),appear:!p(O),onAfterLeave:M,onBeforeEnter:D,onAfterEnter:W,onBeforeLeave:F,persisted:""},{default:V(()=>[Yt(B(p(oAe),rn({id:p(u),ref_key:"contentRef",ref:i},L.$attrs,{"aria-label":L.ariaLabel,"aria-hidden":T.value,"boundaries-padding":L.boundariesPadding,"fallback-placements":L.fallbackPlacements,"gpu-acceleration":L.gpuAcceleration,offset:L.offset,placement:L.placement,"popper-options":L.popperOptions,"arrow-offset":L.arrowOffset,strategy:L.strategy,effect:L.effect,enterable:L.enterable,pure:L.pure,"popper-class":L.popperClass,"popper-style":[L.popperStyle,p(E)],"reference-el":L.referenceEl,"trigger-target-el":L.triggerTargetEl,visible:p(x),"z-index":L.zIndex,onMouseenter:p(P),onMouseleave:p(R),onBlur:I,onClose:p(f)}),{default:V(()=>[ke(L.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"]),[[Bn,p(x)]])]),_:3},8,["name","appear"])):ge("v-if",!0)]),_:3},8,["disabled","to"]))}});var SAe=Ge(wAe,[["__file","content.vue"]]);const xAe=de({name:"ElTooltip"}),CAe=de({...xAe,props:dAe,emits:fAe,setup(t,{expose:e,emit:n}){const r=t;_Ae();const o=je("tooltip"),i=Si(),a=z(),s=z(),l=()=>{var O;const S=p(a);S&&((O=S.popperInstanceRef)==null||O.update())},u=z(!1),c=z(),{show:d,hide:f,hasUpdateHandler:h}=cAe({indicator:u,toggleReason:c}),{onOpen:g,onClose:v}=BQ({showAfter:jn(r,"showAfter"),hideAfter:jn(r,"hideAfter"),autoClose:jn(r,"autoClose"),open:d,close:f}),m=$(()=>ir(r.visible)&&!h.value),b=$(()=>[o.b(),r.popperClass]);mn(OC,{controlled:m,id:i,open:$b(u),trigger:jn(r,"trigger"),onOpen:g,onClose:v,onToggle:O=>{p(u)?v(O):g(O)},onShow:()=>{n("show",c.value)},onHide:()=>{n("hide",c.value)},onBeforeShow:()=>{n("before-show",c.value)},onBeforeHide:()=>{n("before-hide",c.value)},updatePopper:l}),Le(()=>r.disabled,O=>{O&&u.value&&(u.value=!1)});const w=O=>{var S;return(S=s.value)==null?void 0:S.isFocusInsideContent(O)};return mz(()=>u.value&&f()),e({popperRef:a,contentRef:s,isFocusInsideContent:w,updatePopper:l,onOpen:g,onClose:v,hide:f}),(O,S)=>(N(),me(p(bH),{ref_key:"popperRef",ref:a,role:O.role},{default:V(()=>[B(vAe,{disabled:O.disabled,trigger:O.trigger,"trigger-keys":O.triggerKeys,"virtual-ref":O.virtualRef,"virtual-triggering":O.virtualTriggering},{default:V(()=>[O.$slots.default?ke(O.$slots,"default",{key:0}):ge("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),B(SAe,{ref_key:"contentRef",ref:s,"aria-label":O.ariaLabel,"boundaries-padding":O.boundariesPadding,content:O.content,disabled:O.disabled,effect:O.effect,enterable:O.enterable,"fallback-placements":O.fallbackPlacements,"hide-after":O.hideAfter,"gpu-acceleration":O.gpuAcceleration,offset:O.offset,persistent:O.persistent,"popper-class":p(b),"popper-style":O.popperStyle,placement:O.placement,"popper-options":O.popperOptions,"arrow-offset":O.arrowOffset,pure:O.pure,"raw-content":O.rawContent,"reference-el":O.referenceEl,"trigger-target-el":O.triggerTargetEl,"show-after":O.showAfter,strategy:O.strategy,teleported:O.teleported,transition:O.transition,"virtual-triggering":O.virtualTriggering,"z-index":O.zIndex,"append-to":O.appendTo},{default:V(()=>[ke(O.$slots,"content",{},()=>[O.rawContent?(N(),Z("span",{key:0,innerHTML:O.content},null,8,["innerHTML"])):(N(),Z("span",{key:1},ze(O.content),1))]),O.showArrow?(N(),me(p(w2e),{key:0})):ge("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var EAe=Ge(CAe,[["__file","tooltip.vue"]]);const Zo=Wt(EAe),TAe=Ze({...Xb,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:we(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:we([Function,Array]),default:or},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:yo.teleported,appendTo:yo.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),kAe={[zt]:t=>St(t),[Lo]:t=>St(t),[ln]:t=>St(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,select:t=>Zt(t)},OH="ElAutocomplete",AAe=de({name:OH,inheritAttrs:!1}),PAe=de({...AAe,props:TAe,emits:kAe,setup(t,{expose:e,emit:n}){const r=t,o=$(()=>hi(r,Object.keys(Xb))),i=vd(),a=Zi(),s=je("autocomplete"),l=z(),u=z(),c=z(),d=z();let f=!1,h=!1;const g=z([]),v=z(-1),m=z(""),b=z(!1),w=z(!1),O=z(!1),S=Si(),x=$(()=>i.style),C=$(()=>(g.value.length>0||O.value)&&b.value),E=$(()=>!r.hideLoading&&O.value),T=$(()=>l.value?Array.from(l.value.$el.querySelectorAll("input")):[]),M=()=>{C.value&&(m.value=`${l.value.$el.offsetWidth}px`)},k=()=>{v.value=-1},P=async ne=>{if(w.value)return;const fe=Ne=>{O.value=!1,!w.value&&(Ye(Ne)?(g.value=Ne,v.value=r.highlightFirstItem?0:-1):Ao(OH,"autocomplete suggestions must be an array"))};if(O.value=!0,Ye(r.fetchSuggestions))fe(r.fetchSuggestions);else{const Ne=await r.fetchSuggestions(ne,fe);Ye(Ne)&&fe(Ne)}},R=Hi(P,r.debounce),D=ne=>{const fe=!!ne;if(n(Lo,ne),n(zt,ne),w.value=!1,b.value||(b.value=fe),!r.triggerOnFocus&&!ne){w.value=!0,g.value=[];return}R(ne)},F=ne=>{var fe;a.value||(((fe=ne.target)==null?void 0:fe.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(b.value=!0)},W=ne=>{n(ln,ne)},I=ne=>{var fe;if(h)h=!1;else{b.value=!0,n("focus",ne);const Ne=(fe=r.modelValue)!=null?fe:"";r.triggerOnFocus&&!f&&R(String(Ne))}},Q=ne=>{setTimeout(()=>{var fe;if((fe=c.value)!=null&&fe.isFocusInsideContent()){h=!0;return}b.value&&U(),n("blur",ne)})},L=()=>{b.value=!1,n(zt,""),n("clear")},H=async()=>{C.value&&v.value>=0&&v.value{C.value&&(ne.preventDefault(),ne.stopPropagation(),U())},U=()=>{b.value=!1},J=()=>{var ne;(ne=l.value)==null||ne.focus()},ie=()=>{var ne;(ne=l.value)==null||ne.blur()},te=async ne=>{n(Lo,ne[r.valueKey]),n(zt,ne[r.valueKey]),n("select",ne),g.value=[],v.value=-1},he=ne=>{if(!C.value||O.value)return;if(ne<0){v.value=-1;return}ne>=g.value.length&&(ne=g.value.length-1);const fe=u.value.querySelector(`.${s.be("suggestion","wrap")}`),$e=fe.querySelectorAll(`.${s.be("suggestion","list")} li`)[ne],ue=fe.scrollTop,{offsetTop:G,scrollHeight:ve}=$e;G+ve>ue+fe.clientHeight&&(fe.scrollTop+=ve),G{var ne;(ne=c.value)!=null&&ne.isFocusInsideContent()||C.value&&U()});return Yn(()=>{K==null||K()}),jt(()=>{l.value.ref.setAttribute("role","textbox"),l.value.ref.setAttribute("aria-autocomplete","list"),l.value.ref.setAttribute("aria-controls","id"),l.value.ref.setAttribute("aria-activedescendant",`${S.value}-item-${v.value}`),f=l.value.ref.hasAttribute("readonly")}),e({highlightedIndex:v,activated:b,loading:O,inputRef:l,popperRef:c,suggestions:g,handleSelect:te,handleKeyEnter:H,focus:J,blur:ie,close:U,highlight:he,getData:P}),(ne,fe)=>(N(),me(p(Zo),{ref_key:"popperRef",ref:c,visible:p(C),placement:ne.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[p(s).e("popper"),ne.popperClass],teleported:ne.teleported,"append-to":ne.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${p(s).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:M,onHide:k},{content:V(()=>[ee("div",{ref_key:"regionRef",ref:u,class:j([p(s).b("suggestion"),p(s).is("loading",p(E))]),style:bt({[ne.fitInputWidth?"width":"minWidth"]:m.value,outline:"none"}),role:"region"},[ne.$slots.header?(N(),Z("div",{key:0,class:j(p(s).be("suggestion","header")),onClick:Rt(()=>{},["stop"])},[ke(ne.$slots,"header")],10,["onClick"])):ge("v-if",!0),B(p(Al),{id:p(S),tag:"ul","wrap-class":p(s).be("suggestion","wrap"),"view-class":p(s).be("suggestion","list"),role:"listbox"},{default:V(()=>[p(E)?(N(),Z("li",{key:0},[ke(ne.$slots,"loading",{},()=>[B(p(Ot),{class:j(p(s).is("loading"))},{default:V(()=>[B(p(lc))]),_:1},8,["class"])])])):(N(!0),Z(ut,{key:1},Xt(g.value,(Ne,$e)=>(N(),Z("li",{id:`${p(S)}-item-${$e}`,key:$e,class:j({highlighted:v.value===$e}),role:"option","aria-selected":v.value===$e,onClick:ue=>te(Ne)},[ke(ne.$slots,"default",{item:Ne},()=>[We(ze(Ne[ne.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),ne.$slots.footer?(N(),Z("div",{key:1,class:j(p(s).be("suggestion","footer")),onClick:Rt(()=>{},["stop"])},[ke(ne.$slots,"footer")],10,["onClick"])):ge("v-if",!0)],6)]),default:V(()=>[ee("div",{ref_key:"listboxRef",ref:d,class:j([p(s).b(),ne.$attrs.class]),style:bt(p(x)),role:"combobox","aria-haspopup":"listbox","aria-expanded":p(C),"aria-owns":p(S)},[B(p(ao),rn({ref_key:"inputRef",ref:l},rn(p(o),ne.$attrs),{"model-value":ne.modelValue,disabled:p(a),onInput:D,onChange:W,onFocus:I,onBlur:Q,onClear:L,onKeydown:[yr(Rt(Ne=>he(v.value-1),["prevent"]),["up"]),yr(Rt(Ne=>he(v.value+1),["prevent"]),["down"]),yr(H,["enter"]),yr(U,["tab"]),yr(re,["esc"])],onMousedown:F}),ha({_:2},[ne.$slots.prepend?{name:"prepend",fn:V(()=>[ke(ne.$slots,"prepend")])}:void 0,ne.$slots.append?{name:"append",fn:V(()=>[ke(ne.$slots,"append")])}:void 0,ne.$slots.prefix?{name:"prefix",fn:V(()=>[ke(ne.$slots,"prefix")])}:void 0,ne.$slots.suffix?{name:"suffix",fn:V(()=>[ke(ne.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var NAe=Ge(PAe,[["__file","autocomplete.vue"]]);const MAe=Wt(NAe),$Ae=Ze({size:{type:[Number,String],values:Oc,default:"",validator:t=>Pt(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:cr},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:we(String),default:"cover"}}),RAe={error:t=>t instanceof Event},DAe=de({name:"ElAvatar"}),IAe=de({...DAe,props:$Ae,emits:RAe,setup(t,{emit:e}){const n=t,r=je("avatar"),o=z(!1),i=$(()=>{const{size:u,icon:c,shape:d}=n,f=[r.b()];return St(u)&&f.push(r.m(u)),c&&f.push(r.m("icon")),d&&f.push(r.m(d)),f}),a=$(()=>{const{size:u}=n;return Pt(u)?r.cssVarBlock({size:so(u)||""}):void 0}),s=$(()=>({objectFit:n.fit}));Le(()=>n.src,()=>o.value=!1);function l(u){o.value=!0,e("error",u)}return(u,c)=>(N(),Z("span",{class:j(p(i)),style:bt(p(a))},[(u.src||u.srcSet)&&!o.value?(N(),Z("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:bt(p(s)),onError:l},null,44,["src","alt","srcset"])):u.icon?(N(),me(p(Ot),{key:1},{default:V(()=>[(N(),me(Jt(u.icon)))]),_:1})):ke(u.$slots,"default",{key:2})],6))}});var LAe=Ge(IAe,[["__file","avatar.vue"]]);const BAe=Wt(LAe),FAe={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},VAe={click:t=>t instanceof MouseEvent},zAe=(t,e,n)=>{const r=wr(),o=wr(),i=z(!1),a=()=>{r.value&&(i.value=r.value.scrollTop>=t.visibilityHeight)},s=u=>{var c;(c=r.value)==null||c.scrollTo({top:0,behavior:"smooth"}),e("click",u)},l=OQ(a,300,!0);return pr(o,"scroll",l),jt(()=>{var u;o.value=document,r.value=document.documentElement,t.target&&(r.value=(u=document.querySelector(t.target))!=null?u:void 0,r.value||Ao(n,`target does not exist: ${t.target}`),o.value=r.value),a()}),{visible:i,handleClick:s}},wH="ElBacktop",jAe=de({name:wH}),WAe=de({...jAe,props:FAe,emits:VAe,setup(t,{emit:e}){const n=t,r=je("backtop"),{handleClick:o,visible:i}=zAe(n,e,wH),a=$(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(s,l)=>(N(),me(Xo,{name:`${p(r).namespace.value}-fade-in`},{default:V(()=>[p(i)?(N(),Z("div",{key:0,style:bt(p(a)),class:j(p(r).b()),onClick:Rt(p(o),["stop"])},[ke(s.$slots,"default",{},()=>[B(p(Ot),{class:j(p(r).e("icon"))},{default:V(()=>[B(p(CEe))]),_:1},8,["class"])])],14,["onClick"])):ge("v-if",!0)]),_:3},8,["name"]))}});var QAe=Ge(WAe,[["__file","backtop.vue"]]);const HAe=Wt(QAe),UAe=Ze({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:we([String,Object,Array])},offset:{type:we(Array),default:[0,0]},badgeClass:{type:String}}),YAe=de({name:"ElBadge"}),XAe=de({...YAe,props:UAe,setup(t,{expose:e}){const n=t,r=je("badge"),o=$(()=>n.isDot?"":Pt(n.value)&&Pt(n.max)?n.max{var a,s,l,u,c;return[{backgroundColor:n.color,marginRight:so(-((s=(a=n.offset)==null?void 0:a[0])!=null?s:0)),marginTop:so((u=(l=n.offset)==null?void 0:l[1])!=null?u:0)},(c=n.badgeStyle)!=null?c:{}]});return e({content:o}),(a,s)=>(N(),Z("div",{class:j(p(r).b())},[ke(a.$slots,"default"),B(Xo,{name:`${p(r).namespace.value}-zoom-in-center`,persisted:""},{default:V(()=>[Yt(ee("sup",{class:j([p(r).e("content"),p(r).em("content",a.type),p(r).is("fixed",!!a.$slots.default),p(r).is("dot",a.isDot),p(r).is("hide-zero",!a.showZero&&n.value===0),a.badgeClass]),style:bt(p(i))},[ke(a.$slots,"content",{value:p(o)},()=>[We(ze(p(o)),1)])],6),[[Bn,!a.hidden&&(p(o)||a.isDot||a.$slots.content)]])]),_:3},8,["name"])],2))}});var ZAe=Ge(XAe,[["__file","badge.vue"]]);const Q$=Wt(ZAe),SH=Symbol("breadcrumbKey"),GAe=Ze({separator:{type:String,default:"/"},separatorIcon:{type:cr}}),qAe=de({name:"ElBreadcrumb"}),KAe=de({...qAe,props:GAe,setup(t){const e=t,{t:n}=En(),r=je("breadcrumb"),o=z();return mn(SH,e),jt(()=>{const i=o.value.querySelectorAll(`.${r.e("item")}`);i.length&&i[i.length-1].setAttribute("aria-current","page")}),(i,a)=>(N(),Z("div",{ref_key:"breadcrumb",ref:o,class:j(p(r).b()),"aria-label":p(n)("el.breadcrumb.label"),role:"navigation"},[ke(i.$slots,"default")],10,["aria-label"]))}});var JAe=Ge(KAe,[["__file","breadcrumb.vue"]]);const ePe=Ze({to:{type:we([String,Object]),default:""},replace:Boolean}),tPe=de({name:"ElBreadcrumbItem"}),nPe=de({...tPe,props:ePe,setup(t){const e=t,n=Kt(),r=gt(SH,void 0),o=je("breadcrumb"),i=n.appContext.config.globalProperties.$router,a=z(),s=()=>{!e.to||!i||(e.replace?i.replace(e.to):i.push(e.to))};return(l,u)=>{var c,d;return N(),Z("span",{class:j(p(o).e("item"))},[ee("span",{ref_key:"link",ref:a,class:j([p(o).e("inner"),p(o).is("link",!!l.to)]),role:"link",onClick:s},[ke(l.$slots,"default")],2),(c=p(r))!=null&&c.separatorIcon?(N(),me(p(Ot),{key:0,class:j(p(o).e("separator"))},{default:V(()=>[(N(),me(Jt(p(r).separatorIcon)))]),_:1},8,["class"])):(N(),Z("span",{key:1,class:j(p(o).e("separator")),role:"presentation"},ze((d=p(r))==null?void 0:d.separator),3))],2)}}});var xH=Ge(nPe,[["__file","breadcrumb-item.vue"]]);const rPe=Wt(JAe,{BreadcrumbItem:xH}),oPe=qr(xH),CH=Symbol("buttonGroupContextKey"),Kc=({from:t,replacement:e,scope:n,version:r,ref:o,type:i="API"},a)=>{Le(()=>p(a),s=>{},{immediate:!0})},iPe=(t,e)=>{Kc({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},$(()=>t.type==="text"));const n=gt(CH,void 0),r=cm("button"),{form:o}=Xi(),i=$o($(()=>n==null?void 0:n.size)),a=Zi(),s=z(),l=Ro(),u=$(()=>{var m;return t.type||(n==null?void 0:n.type)||((m=r.value)==null?void 0:m.type)||""}),c=$(()=>{var m,b,w;return(w=(b=t.autoInsertSpace)!=null?b:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?w:!1}),d=$(()=>{var m,b,w;return(w=(b=t.plain)!=null?b:(m=r.value)==null?void 0:m.plain)!=null?w:!1}),f=$(()=>{var m,b,w;return(w=(b=t.round)!=null?b:(m=r.value)==null?void 0:m.round)!=null?w:!1}),h=$(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),g=$(()=>{var m;const b=(m=l.default)==null?void 0:m.call(l);if(c.value&&(b==null?void 0:b.length)===1){const w=b[0];if((w==null?void 0:w.type)===Gv){const O=w.children;return/^\p{Unified_Ideograph}{2}$/u.test(O.trim())}}return!1});return{_disabled:a,_size:i,_type:u,_ref:s,_props:h,_plain:d,_round:f,shouldAddSpace:g,handleClick:m=>{if(a.value||t.loading){m.stopPropagation();return}t.nativeType==="reset"&&(o==null||o.resetFields()),e("click",m)}}},Kk=["default","primary","success","warning","info","danger","text",""],aPe=["button","submit","reset"],Jk=Ze({size:Fo,disabled:Boolean,type:{type:String,values:Kk,default:""},icon:{type:cr},nativeType:{type:String,values:aPe,default:"button"},loading:Boolean,loadingIcon:{type:cr,default:()=>lc},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:we([String,Object]),default:"button"}}),sPe={click:t=>t instanceof MouseEvent};function Wi(t,e){lPe(t)&&(t="100%");var n=uPe(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function EO(t){return Math.min(1,Math.max(0,t))}function lPe(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function uPe(t){return typeof t=="string"&&t.indexOf("%")!==-1}function EH(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function TO(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Hh(t){return t.length===1?"0"+t:String(t)}function cPe(t,e,n){return{r:Wi(t,255)*255,g:Wi(e,255)*255,b:Wi(n,255)*255}}function m5(t,e,n){t=Wi(t,255),e=Wi(e,255),n=Wi(n,255);var r=Math.max(t,e,n),o=Math.min(t,e,n),i=0,a=0,s=(r+o)/2;if(r===o)a=0,i=0;else{var l=r-o;switch(a=s>.5?l/(2-r-o):l/(r+o),r){case t:i=(e-n)/l+(e1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function dPe(t,e,n){var r,o,i;if(t=Wi(t,360),e=Wi(e,100),n=Wi(n,100),e===0)o=n,i=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=JT(s,a,t+1/3),o=JT(s,a,t),i=JT(s,a,t-1/3)}return{r:r*255,g:o*255,b:i*255}}function y5(t,e,n){t=Wi(t,255),e=Wi(e,255),n=Wi(n,255);var r=Math.max(t,e,n),o=Math.min(t,e,n),i=0,a=r,s=r-o,l=r===0?0:s/r;if(r===o)i=0;else{switch(r){case t:i=(e-n)/s+(e>16,g:(t&65280)>>8,b:t&255}}var eA={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function vPe(t){var e={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;return typeof t=="string"&&(t=bPe(t)),typeof t=="object"&&(Fc(t.r)&&Fc(t.g)&&Fc(t.b)?(e=cPe(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Fc(t.h)&&Fc(t.s)&&Fc(t.v)?(r=TO(t.s),o=TO(t.v),e=fPe(t.h,r,o),a=!0,s="hsv"):Fc(t.h)&&Fc(t.s)&&Fc(t.l)&&(r=TO(t.s),i=TO(t.l),e=dPe(t.h,r,i),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=EH(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var mPe="[-\\+]?\\d+%?",yPe="[-\\+]?\\d*\\.\\d+%?",nf="(?:".concat(yPe,")|(?:").concat(mPe,")"),e2="[\\s|\\(]+(".concat(nf,")[,|\\s]+(").concat(nf,")[,|\\s]+(").concat(nf,")\\s*\\)?"),t2="[\\s|\\(]+(".concat(nf,")[,|\\s]+(").concat(nf,")[,|\\s]+(").concat(nf,")[,|\\s]+(").concat(nf,")\\s*\\)?"),ql={CSS_UNIT:new RegExp(nf),rgb:new RegExp("rgb"+e2),rgba:new RegExp("rgba"+t2),hsl:new RegExp("hsl"+e2),hsla:new RegExp("hsla"+t2),hsv:new RegExp("hsv"+e2),hsva:new RegExp("hsva"+t2),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function bPe(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(eA[t])t=eA[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ql.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=ql.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ql.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=ql.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ql.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=ql.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ql.hex8.exec(t),n?{r:Es(n[1]),g:Es(n[2]),b:Es(n[3]),a:_5(n[4]),format:e?"name":"hex8"}:(n=ql.hex6.exec(t),n?{r:Es(n[1]),g:Es(n[2]),b:Es(n[3]),format:e?"name":"hex"}:(n=ql.hex4.exec(t),n?{r:Es(n[1]+n[1]),g:Es(n[2]+n[2]),b:Es(n[3]+n[3]),a:_5(n[4]+n[4]),format:e?"name":"hex8"}:(n=ql.hex3.exec(t),n?{r:Es(n[1]+n[1]),g:Es(n[2]+n[2]),b:Es(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function Fc(t){return Boolean(ql.CSS_UNIT.exec(String(t)))}var Pg=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=gPe(e)),this.originalInput=e;var o=vPe(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,r,o,i=e.r/255,a=e.g/255,s=e.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=EH(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.toHsv=function(){var e=y5(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=y5(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=m5(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=m5(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),b5(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),hPe(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Wi(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Wi(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+b5(this.r,this.g,this.b,!1),n=0,r=Object.entries(eA);n=0,i=!n&&o&&(e.startsWith("hex")||e==="name");return i?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=EO(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=EO(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=EO(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=EO(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),o=new t(e).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*e>>1)+720)%360;--e;)r.h=(r.h+o)%360,i.push(new t(r));return i},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/e;e--;)a.push(new t({h:r,s:o,v:i})),i=(i+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),r=new t(e).toRgb();return new t({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),r=n.h,o=[this],i=360/e,a=1;a{let r={},o=t.color;if(o){const i=o.match(/var\((.*?)\)/);i&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const a=new Pg(o),s=t.dark?a.tint(20).toString():jd(a,20);if(t.plain)r=n.cssVarBlock({"bg-color":t.dark?jd(a,90):a.tint(90).toString(),"text-color":o,"border-color":t.dark?jd(a,50):a.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":s,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(r[n.cssVarBlockName("disabled-bg-color")]=t.dark?jd(a,90):a.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=t.dark?jd(a,50):a.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=t.dark?jd(a,80):a.tint(80).toString());else{const l=t.dark?jd(a,30):a.tint(30).toString(),u=a.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":o,"text-color":u,"border-color":o,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),e.value){const c=t.dark?jd(a,50):a.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=c,r[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=c}}}return r})}const OPe=de({name:"ElButton"}),wPe=de({...OPe,props:Jk,emits:sPe,setup(t,{expose:e,emit:n}){const r=t,o=_Pe(r),i=je("button"),{_ref:a,_size:s,_type:l,_disabled:u,_props:c,_plain:d,_round:f,shouldAddSpace:h,handleClick:g}=iPe(r,n),v=$(()=>[i.b(),i.m(l.value),i.m(s.value),i.is("disabled",u.value),i.is("loading",r.loading),i.is("plain",d.value),i.is("round",f.value),i.is("circle",r.circle),i.is("text",r.text),i.is("link",r.link),i.is("has-bg",r.bg)]);return e({ref:a,size:s,type:l,disabled:u,shouldAddSpace:h}),(m,b)=>(N(),me(Jt(m.tag),rn({ref_key:"_ref",ref:a},p(c),{class:p(v),style:p(o),onClick:p(g)}),{default:V(()=>[m.loading?(N(),Z(ut,{key:0},[m.$slots.loading?ke(m.$slots,"loading",{key:0}):(N(),me(p(Ot),{key:1,class:j(p(i).is("loading"))},{default:V(()=>[(N(),me(Jt(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(N(),me(p(Ot),{key:1},{default:V(()=>[m.icon?(N(),me(Jt(m.icon),{key:0})):ke(m.$slots,"icon",{key:1})]),_:3})):ge("v-if",!0),m.$slots.default?(N(),Z("span",{key:2,class:j({[p(i).em("text","expand")]:p(h)})},[ke(m.$slots,"default")],2)):ge("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var SPe=Ge(wPe,[["__file","button.vue"]]);const xPe={size:Jk.size,type:Jk.type},CPe=de({name:"ElButtonGroup"}),EPe=de({...CPe,props:xPe,setup(t){const e=t;mn(CH,pn({size:jn(e,"size"),type:jn(e,"type")}));const n=je("button");return(r,o)=>(N(),Z("div",{class:j(p(n).b("group"))},[ke(r.$slots,"default")],2))}});var TH=Ge(EPe,[["__file","button-group.vue"]]);const Kn=Wt(SPe,{ButtonGroup:TH}),kH=qr(TH);var Io=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},AH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",g="date",v="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,w={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(F){var W=["th","st","nd","rd"],I=F%100;return"["+F+(W[(I-20)%10]||W[I]||W[0])+"]"}},O=function(F,W,I){var Q=String(F);return!Q||Q.length>=W?F:""+Array(W+1-Q.length).join(I)+F},S={s:O,z:function(F){var W=-F.utcOffset(),I=Math.abs(W),Q=Math.floor(I/60),L=I%60;return(W<=0?"+":"-")+O(Q,2,"0")+":"+O(L,2,"0")},m:function F(W,I){if(W.date()1)return F(re[0])}else{var U=W.name;C[U]=W,L=U}return!Q&&L&&(x=L),L||!Q&&x},k=function(F,W){if(T(F))return F.clone();var I=typeof W=="object"?W:{};return I.date=F,I.args=arguments,new R(I)},P=S;P.l=M,P.i=T,P.w=function(F,W){return k(F,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var R=function(){function F(I){this.$L=M(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[E]=!0}var W=F.prototype;return W.parse=function(I){this.$d=function(Q){var L=Q.date,H=Q.utc;if(L===null)return new Date(NaN);if(P.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var re=L.match(m);if(re){var U=re[2]-1||0,J=(re[7]||"0").substring(0,3);return H?new Date(Date.UTC(re[1],U,re[3]||1,re[4]||0,re[5]||0,re[6]||0,J)):new Date(re[1],U,re[3]||1,re[4]||0,re[5]||0,re[6]||0,J)}}return new Date(L)}(I),this.init()},W.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},W.$utils=function(){return P},W.isValid=function(){return this.$d.toString()!==v},W.isSame=function(I,Q){var L=k(I);return this.startOf(Q)<=L&&L<=this.endOf(Q)},W.isAfter=function(I,Q){return k(I)[t>0?t-1:void 0,t,tArray.from(Array.from({length:t}).keys()),PH=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),NH=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),O5=function(t,e){const n=_f(t),r=_f(e);return n&&r?t.getTime()===e.getTime():!n&&!r?t===e:!1},w5=function(t,e){const n=Ye(t),r=Ye(e);return n&&r?t.length!==e.length?!1:t.every((o,i)=>O5(o,e[i])):!n&&!r?O5(t,e):!1},S5=function(t,e,n){const r=$s(e)||e==="x"?Ht(t).locale(n):Ht(t,e).locale(n);return r.isValid()?r:void 0},x5=function(t,e,n){return $s(e)?t:e==="x"?+t:Ht(t).locale(n).format(e)},r2=(t,e)=>{var n;const r=[],o=e==null?void 0:e();for(let i=0;iYe(t)?t.map(e=>e.toDate()):t.toDate(),TPe=(t,e)=>{const n=t.subtract(1,"month").endOf("month").date();return pf(e).map((r,o)=>n-(e-o-1))},kPe=t=>{const e=t.daysInMonth();return pf(e).map((n,r)=>r+1)},APe=t=>pf(t.length/7).map(e=>{const n=e*7;return t.slice(n,n+7)}),PPe=Ze({selectedDay:{type:we(Object)},range:{type:we(Array)},date:{type:we(Object),required:!0},hideHeader:{type:Boolean}}),NPe={pick:t=>Zt(t)};var MH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r,o){var i=r.prototype,a=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,f,h,g,v){var m=d.name?d:d.$locale(),b=a(m[f]),w=a(m[h]),O=b||w.map(function(x){return x.slice(0,g)});if(!v)return O;var S=m.weekStart;return O.map(function(x,C){return O[(C+(S||0))%7]})},l=function(){return o.Ls[o.locale()]},u=function(d,f){return d.formats[f]||function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,v,m){return v||m.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):s(d,"months")},monthsShort:function(f){return f?f.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):s(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return c.bind(this)()},o.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},o.months=function(){return s(l(),"months")},o.monthsShort=function(){return s(l(),"monthsShort","months",3)},o.weekdays=function(d){return s(l(),"weekdays",null,null,d)},o.weekdaysShort=function(d){return s(l(),"weekdaysShort","weekdays",3,d)},o.weekdaysMin=function(d){return s(l(),"weekdaysMin","weekdays",2,d)}}})})(MH);var $H=MH.exports;const MPe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],o2=["sun","mon","tue","wed","thu","fri","sat"],$Pe=(t,e)=>{Ht.extend($H);const n=Ht.localeData().firstDayOfWeek(),{t:r,lang:o}=En(),i=Ht().locale(o.value),a=$(()=>!!t.range&&!!t.range.length),s=$(()=>{let f=[];if(a.value){const[h,g]=t.range,v=pf(g.date()-h.date()+1).map(w=>({text:h.date()+w,type:"current"}));let m=v.length%7;m=m===0?0:7-m;const b=pf(m).map((w,O)=>({text:O+1,type:"next"}));f=v.concat(b)}else{const h=t.date.startOf("month").day(),g=TPe(t.date,(h-n+7)%7).map(w=>({text:w,type:"prev"})),v=kPe(t.date).map(w=>({text:w,type:"current"}));f=[...g,...v];const m=7-(f.length%7||7),b=pf(m).map((w,O)=>({text:O+1,type:"next"}));f=f.concat(b)}return APe(f)}),l=$(()=>{const f=n;return f===0?o2.map(h=>r(`el.datepicker.weeks.${h}`)):o2.slice(f).concat(o2.slice(0,f)).map(h=>r(`el.datepicker.weeks.${h}`))}),u=(f,h)=>{switch(h){case"prev":return t.date.startOf("month").subtract(1,"month").date(f);case"next":return t.date.startOf("month").add(1,"month").date(f);case"current":return t.date.date(f)}};return{now:i,isInRange:a,rows:s,weekDays:l,getFormattedDate:u,handlePickDay:({text:f,type:h})=>{const g=u(f,h);e("pick",g)},getSlotData:({text:f,type:h})=>{const g=u(f,h);return{isSelected:g.isSame(t.selectedDay),type:`${h}-month`,day:g.format("YYYY-MM-DD"),date:g.toDate()}}}},RPe=de({name:"DateTable"}),DPe=de({...RPe,props:PPe,emits:NPe,setup(t,{expose:e,emit:n}){const r=t,{isInRange:o,now:i,rows:a,weekDays:s,getFormattedDate:l,handlePickDay:u,getSlotData:c}=$Pe(r,n),d=je("calendar-table"),f=je("calendar-day"),h=({text:g,type:v})=>{const m=[v];if(v==="current"){const b=l(g,v);b.isSame(r.selectedDay,"day")&&m.push(f.is("selected")),b.isSame(i,"day")&&m.push(f.is("today"))}return m};return e({getFormattedDate:l}),(g,v)=>(N(),Z("table",{class:j([p(d).b(),p(d).is("range",p(o))]),cellspacing:"0",cellpadding:"0"},[g.hideHeader?ge("v-if",!0):(N(),Z("thead",{key:0},[ee("tr",null,[(N(!0),Z(ut,null,Xt(p(s),m=>(N(),Z("th",{key:m,scope:"col"},ze(m),1))),128))])])),ee("tbody",null,[(N(!0),Z(ut,null,Xt(p(a),(m,b)=>(N(),Z("tr",{key:b,class:j({[p(d).e("row")]:!0,[p(d).em("row","hide-border")]:b===0&&g.hideHeader})},[(N(!0),Z(ut,null,Xt(m,(w,O)=>(N(),Z("td",{key:O,class:j(h(w)),onClick:S=>p(u)(w)},[ee("div",{class:j(p(f).b())},[ke(g.$slots,"date-cell",{data:p(c)(w)},()=>[ee("span",null,ze(w.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var C5=Ge(DPe,[["__file","date-table.vue"]]);const IPe=(t,e)=>{const n=t.endOf("month"),r=e.startOf("month"),i=n.isSame(r,"week")?r.add(1,"week"):r;return[[t,n],[i.startOf("week"),e]]},LPe=(t,e)=>{const n=t.endOf("month"),r=t.add(1,"month").startOf("month"),o=n.isSame(r,"week")?r.add(1,"week"):r,i=o.endOf("month"),a=e.startOf("month"),s=i.isSame(a,"week")?a.add(1,"week"):a;return[[t,n],[o.startOf("week"),i],[s.startOf("week"),e]]},BPe=(t,e,n)=>{const{lang:r}=En(),o=z(),i=Ht().locale(r.value),a=$({get(){return t.modelValue?l.value:o.value},set(m){if(!m)return;o.value=m;const b=m.toDate();e(Lo,b),e(zt,b)}}),s=$(()=>{if(!t.range||!Ye(t.range)||t.range.length!==2||t.range.some(O=>!_f(O)))return[];const m=t.range.map(O=>Ht(O).locale(r.value)),[b,w]=m;return b.isAfter(w)?[]:b.isSame(w,"month")?h(b,w):b.add(1,"month").month()!==w.month()?[]:h(b,w)}),l=$(()=>t.modelValue?Ht(t.modelValue).locale(r.value):a.value||(s.value.length?s.value[0][0]:i)),u=$(()=>l.value.subtract(1,"month").date(1)),c=$(()=>l.value.add(1,"month").date(1)),d=$(()=>l.value.subtract(1,"year").date(1)),f=$(()=>l.value.add(1,"year").date(1)),h=(m,b)=>{const w=m.startOf("week"),O=b.endOf("week"),S=w.get("month"),x=O.get("month");return S===x?[[w,O]]:(S+1)%12===x?IPe(w,O):S+2===x||(S+1)%11===x?LPe(w,O):[]},g=m=>{a.value=m};return{calculateValidatedDateRange:h,date:l,realSelectedDay:a,pickDay:g,selectDate:m=>{const w={"prev-month":u.value,"next-month":c.value,"prev-year":d.value,"next-year":f.value,today:i}[m];w.isSame(l.value,"day")||g(w)},validatedRange:s}},FPe=t=>Ye(t)&&t.length===2&&t.every(e=>_f(e)),VPe=Ze({modelValue:{type:Date},range:{type:we(Array),validator:FPe}}),zPe={[zt]:t=>_f(t),[Lo]:t=>_f(t)},jPe="ElCalendar",WPe=de({name:jPe}),QPe=de({...WPe,props:VPe,emits:zPe,setup(t,{expose:e,emit:n}){const r=t,o=je("calendar"),{calculateValidatedDateRange:i,date:a,pickDay:s,realSelectedDay:l,selectDate:u,validatedRange:c}=BPe(r,n),{t:d}=En(),f=$(()=>{const h=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${d("el.datepicker.year")} ${d(h)}`});return e({selectedDay:l,pickDay:s,selectDate:u,calculateValidatedDateRange:i}),(h,g)=>(N(),Z("div",{class:j(p(o).b())},[ee("div",{class:j(p(o).e("header"))},[ke(h.$slots,"header",{date:p(f)},()=>[ee("div",{class:j(p(o).e("title"))},ze(p(f)),3),p(c).length===0?(N(),Z("div",{key:0,class:j(p(o).e("button-group"))},[B(p(kH),null,{default:V(()=>[B(p(Kn),{size:"small",onClick:v=>p(u)("prev-month")},{default:V(()=>[We(ze(p(d)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),B(p(Kn),{size:"small",onClick:v=>p(u)("today")},{default:V(()=>[We(ze(p(d)("el.datepicker.today")),1)]),_:1},8,["onClick"]),B(p(Kn),{size:"small",onClick:v=>p(u)("next-month")},{default:V(()=>[We(ze(p(d)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):ge("v-if",!0)])],2),p(c).length===0?(N(),Z("div",{key:0,class:j(p(o).e("body"))},[B(C5,{date:p(a),"selected-day":p(l),onPick:p(s)},ha({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:V(v=>[ke(h.$slots,"date-cell",Is(ic(v)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(N(),Z("div",{key:1,class:j(p(o).e("body"))},[(N(!0),Z(ut,null,Xt(p(c),(v,m)=>(N(),me(C5,{key:m,date:v[0],"selected-day":p(l),range:v,"hide-header":m!==0,onPick:p(s)},ha({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:V(b=>[ke(h.$slots,"date-cell",Is(ic(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var HPe=Ge(QPe,[["__file","calendar.vue"]]);const UPe=Wt(HPe),YPe=Ze({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:we([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:void 0}}),XPe=de({name:"ElCard"}),ZPe=de({...XPe,props:YPe,setup(t){const e=cm("card"),n=je("card");return(r,o)=>{var i;return N(),Z("div",{class:j([p(n).b(),p(n).is(`${r.shadow||((i=p(e))==null?void 0:i.shadow)||"always"}-shadow`)])},[r.$slots.header||r.header?(N(),Z("div",{key:0,class:j([p(n).e("header"),r.headerClass])},[ke(r.$slots,"header",{},()=>[We(ze(r.header),1)])],2)):ge("v-if",!0),ee("div",{class:j([p(n).e("body"),r.bodyClass]),style:bt(r.bodyStyle)},[ke(r.$slots,"default")],6),r.$slots.footer||r.footer?(N(),Z("div",{key:1,class:j([p(n).e("footer"),r.footerClass])},[ke(r.$slots,"footer",{},()=>[We(ze(r.footer),1)])],2)):ge("v-if",!0)],2)}}});var GPe=Ge(ZPe,[["__file","card.vue"]]);const qPe=Wt(GPe),KPe=Ze({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),JPe={change:(t,e)=>[t,e].every(Pt)},RH=Symbol("carouselContextKey"),tA="ElCarouselItem";var ul=(t=>(t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t))(ul||{});function nA(t){return Mr(t)&&t.type===ut}function eNe(t){return Mr(t)&&t.type===vi}function tNe(t){return Mr(t)&&!nA(t)&&!eNe(t)}const nNe=t=>{if(!Mr(t))return{};const e=t.props||{},n=(Mr(t.type)?t.type.props:void 0)||{},r={};return Object.keys(n).forEach(o=>{Dn(n[o],"default")&&(r[o]=n[o].default)}),Object.keys(e).forEach(o=>{r[Ws(o)]=e[o]}),r},rNe=t=>{if(!Ye(t)||t.length>1)throw new Error("expect to receive a single Vue element child");return t[0]},Zu=t=>{const e=Ye(t)?t:[t],n=[];return e.forEach(r=>{var o;Ye(r)?n.push(...Zu(r)):Mr(r)&&((o=r.component)==null?void 0:o.subTree)?n.push(r,...Zu(r.component.subTree)):Mr(r)&&Ye(r.children)?n.push(...Zu(r.children)):Mr(r)&&r.shapeFlag===2?n.push(...Zu(r.type())):n.push(r)}),n};function DH(t){return t.some(e=>Mr(e)?!(e.type===vi||e.type===ut&&!DH(e.children)):!0)?t:null}const oNe=(t,e,n)=>Zu(t.subTree).filter(i=>{var a;return Mr(i)&&((a=i.type)==null?void 0:a.name)===e&&!!i.component}).map(i=>i.component.uid).map(i=>n[i]).filter(i=>!!i),SC=(t,e)=>{const n=wr({}),r=wr([]),o=new WeakMap,i=c=>{n.value[c.uid]=c,D1(n),jt(()=>{const d=c.getVnode().el,f=d.parentNode;if(!o.has(f)){o.set(f,[]);const h=f.insertBefore.bind(f);f.insertBefore=(g,v)=>(o.get(f).some(b=>g===b||v===b)&&D1(n),h(g,v))}o.get(f).push(d)})},a=c=>{delete n.value[c.uid],D1(n);const d=c.getVnode().el,f=d.parentNode,h=o.get(f),g=h.indexOf(d);h.splice(g,1)},s=()=>{r.value=oNe(t,e,n.value)},l=c=>c.render(),u=de({setup(c,{slots:d}){return()=>(s(),d.default?At(l,{render:d.default}):null)}});return{children:r,addChild:i,removeChild:a,ChildrenSorter:u}},E5=300,iNe=(t,e,n)=>{const{children:r,addChild:o,removeChild:i,ChildrenSorter:a}=SC(Kt(),tA),s=Ro(),l=z(-1),u=z(null),c=z(!1),d=z(),f=z(0),h=z(!0),g=$(()=>t.arrow!=="never"&&!p(b)),v=$(()=>r.value.some(te=>te.props.label.toString().length>0)),m=$(()=>t.type==="card"),b=$(()=>t.direction==="vertical"),w=$(()=>t.height!=="auto"?{height:t.height}:{height:`${f.value}px`,overflow:"hidden"}),O=qc(te=>{M(te)},E5,{trailing:!0}),S=qc(te=>{Q(te)},E5),x=te=>h.value?l.value<=1?te<=1:te>1:!0;function C(){u.value&&(clearInterval(u.value),u.value=null)}function E(){t.interval<=0||!t.autoplay||u.value||(u.value=setInterval(()=>T(),t.interval))}const T=()=>{l.valuefe.props.name===te);ne.length>0&&(te=r.value.indexOf(ne[0]))}if(te=Number(te),Number.isNaN(te)||te!==Math.floor(te))return;const he=r.value.length,K=l.value;te<0?l.value=t.loop?he-1:0:te>=he?l.value=t.loop?0:he-1:l.value=te,K===l.value&&k(K),re()}function k(te){r.value.forEach((he,K)=>{he.translateItem(K,l.value,te)})}function P(te,he){var K,ne,fe,Ne;const $e=p(r),ue=$e.length;if(ue===0||!te.states.inStage)return!1;const G=he+1,ve=he-1,q=ue-1,Ie=$e[q].states.active,Ee=$e[0].states.active,Oe=(ne=(K=$e[G])==null?void 0:K.states)==null?void 0:ne.active,se=(Ne=(fe=$e[ve])==null?void 0:fe.states)==null?void 0:Ne.active;return he===q&&Ee||Oe?"left":he===0&&Ie||se?"right":!1}function R(){c.value=!0,t.pauseOnHover&&C()}function D(){c.value=!1,E()}function F(te){p(b)||r.value.forEach((he,K)=>{te===P(he,K)&&(he.states.hover=!0)})}function W(){p(b)||r.value.forEach(te=>{te.states.hover=!1})}function I(te){l.value=te}function Q(te){t.trigger==="hover"&&te!==l.value&&(l.value=te)}function L(){M(l.value-1)}function H(){M(l.value+1)}function re(){C(),t.pauseOnHover||E()}function U(te){t.height==="auto"&&(f.value=te)}function J(){var te;const he=(te=s.default)==null?void 0:te.call(s);if(!he)return null;const ne=Zu(he).filter(fe=>Mr(fe)&&fe.type.name===tA);return(ne==null?void 0:ne.length)===2&&t.loop&&!m.value?(h.value=!0,ne):(h.value=!1,null)}Le(()=>l.value,(te,he)=>{k(he),h.value&&(te=te%2,he=he%2),he>-1&&e(ln,te,he)}),Le(()=>t.autoplay,te=>{te?E():C()}),Le(()=>t.loop,()=>{M(l.value)}),Le(()=>t.interval,()=>{re()});const ie=wr();return jt(()=>{Le(()=>r.value,()=>{r.value.length>0&&M(t.initialIndex)},{immediate:!0}),ie.value=Wr(d.value,()=>{k()}),E()}),Yn(()=>{C(),d.value&&ie.value&&ie.value.stop()}),mn(RH,{root:d,isCardType:m,isVertical:b,items:r,loop:t.loop,cardScale:t.cardScale,addItem:o,removeItem:i,setActiveItem:M,setContainerHeight:U}),{root:d,activeIndex:l,arrowDisplay:g,hasLabel:v,hover:c,isCardType:m,items:r,isVertical:b,containerStyle:w,isItemsTwoLength:h,handleButtonEnter:F,handleButtonLeave:W,handleIndicatorClick:I,handleMouseEnter:R,handleMouseLeave:D,setActiveItem:M,prev:L,next:H,PlaceholderItem:J,isTwoLengthShow:x,ItemsSorter:a,throttledArrowClick:O,throttledIndicatorHover:S}},aNe="ElCarousel",sNe=de({name:aNe}),lNe=de({...sNe,props:KPe,emits:JPe,setup(t,{expose:e,emit:n}){const r=t,{root:o,activeIndex:i,arrowDisplay:a,hasLabel:s,hover:l,isCardType:u,items:c,isVertical:d,containerStyle:f,handleButtonEnter:h,handleButtonLeave:g,handleIndicatorClick:v,handleMouseEnter:m,handleMouseLeave:b,setActiveItem:w,prev:O,next:S,PlaceholderItem:x,isTwoLengthShow:C,ItemsSorter:E,throttledArrowClick:T,throttledIndicatorHover:M}=iNe(r,n),k=je("carousel"),{t:P}=En(),R=$(()=>{const I=[k.b(),k.m(r.direction)];return p(u)&&I.push(k.m("card")),I}),D=$(()=>{const I=[k.e("indicators"),k.em("indicators",r.direction)];return p(s)&&I.push(k.em("indicators","labels")),r.indicatorPosition==="outside"&&I.push(k.em("indicators","outside")),p(d)&&I.push(k.em("indicators","right")),I});function F(I){if(!r.motionBlur)return;const Q=p(d)?`${k.namespace.value}-transitioning-vertical`:`${k.namespace.value}-transitioning`;I.currentTarget.classList.add(Q)}function W(I){if(!r.motionBlur)return;const Q=p(d)?`${k.namespace.value}-transitioning-vertical`:`${k.namespace.value}-transitioning`;I.currentTarget.classList.remove(Q)}return e({activeIndex:i,setActiveItem:w,prev:O,next:S}),(I,Q)=>(N(),Z("div",{ref_key:"root",ref:o,class:j(p(R)),onMouseenter:Rt(p(m),["stop"]),onMouseleave:Rt(p(b),["stop"])},[p(a)?(N(),me(Xo,{key:0,name:"carousel-arrow-left",persisted:""},{default:V(()=>[Yt(ee("button",{type:"button",class:j([p(k).e("arrow"),p(k).em("arrow","left")]),"aria-label":p(P)("el.carousel.leftArrow"),onMouseenter:L=>p(h)("left"),onMouseleave:p(g),onClick:Rt(L=>p(T)(p(i)-1),["stop"])},[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Bn,(I.arrow==="always"||p(l))&&(r.loop||p(i)>0)]])]),_:1})):ge("v-if",!0),p(a)?(N(),me(Xo,{key:1,name:"carousel-arrow-right",persisted:""},{default:V(()=>[Yt(ee("button",{type:"button",class:j([p(k).e("arrow"),p(k).em("arrow","right")]),"aria-label":p(P)("el.carousel.rightArrow"),onMouseenter:L=>p(h)("right"),onMouseleave:p(g),onClick:Rt(L=>p(T)(p(i)+1),["stop"])},[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[Bn,(I.arrow==="always"||p(l))&&(r.loop||p(i)[I.indicatorPosition!=="none"?(N(),Z("ul",{key:0,class:j(p(D))},[(N(!0),Z(ut,null,Xt(p(c),(L,H)=>Yt((N(),Z("li",{key:H,class:j([p(k).e("indicator"),p(k).em("indicator",I.direction),p(k).is("active",H===p(i))]),onMouseenter:re=>p(M)(H),onClick:Rt(re=>p(v)(H),["stop"])},[ee("button",{class:j(p(k).e("button")),"aria-label":p(P)("el.carousel.indicator",{index:H+1})},[p(s)?(N(),Z("span",{key:0},ze(L.props.label),1)):ge("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[Bn,p(C)(H)]])),128))],2)):ge("v-if",!0)]),_:1}),r.motionBlur?(N(),Z("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[ee("defs",null,[ee("filter",{id:"elCarouselHorizontal"},[ee("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),ee("filter",{id:"elCarouselVertical"},[ee("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):ge("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var uNe=Ge(lNe,[["__file","carousel.vue"]]);const cNe=Ze({name:{type:String,default:""},label:{type:[String,Number],default:""}}),dNe=t=>{const e=gt(RH),n=Kt(),r=z(),o=z(!1),i=z(0),a=z(1),s=z(!1),l=z(!1),u=z(!1),c=z(!1),{isCardType:d,isVertical:f,cardScale:h}=e;function g(S,x,C){const E=C-1,T=x-1,M=x+1,k=C/2;return x===0&&S===E?-1:x===E&&S===0?C:S=k?C+1:S>M&&S-x>=k?-2:S}function v(S,x){var C,E;const T=p(f)?((C=e.root.value)==null?void 0:C.offsetHeight)||0:((E=e.root.value)==null?void 0:E.offsetWidth)||0;return u.value?T*((2-h)*(S-x)+1)/4:S{var E;const T=p(d),M=(E=e.items.value.length)!=null?E:Number.NaN,k=S===x;!T&&!Sn(C)&&(c.value=k||S===C),!k&&M>2&&e.loop&&(S=g(S,x,M));const P=p(f);s.value=k,T?(u.value=Math.round(Math.abs(S-x))<=1,i.value=v(S,x),a.value=p(s)?1:h):i.value=m(S,x,P),l.value=!0,k&&r.value&&e.setContainerHeight(r.value.offsetHeight)};function w(){if(e&&p(d)){const S=e.items.value.findIndex(({uid:x})=>x===n.uid);e.setActiveItem(S)}}const O={props:t,states:pn({hover:o,translate:i,scale:a,active:s,ready:l,inStage:u,animating:c}),uid:n.uid,getVnode:()=>n.vnode,translateItem:b};return e.addItem(O),Yn(()=>{e.removeItem(O)}),{carouselItemRef:r,active:s,animating:c,hover:o,inStage:u,isVertical:f,translate:i,isCardType:d,scale:a,ready:l,handleItemClick:w}},fNe=de({name:tA}),hNe=de({...fNe,props:cNe,setup(t){const e=t,n=je("carousel"),{carouselItemRef:r,active:o,animating:i,hover:a,inStage:s,isVertical:l,translate:u,isCardType:c,scale:d,ready:f,handleItemClick:h}=dNe(e),g=$(()=>[n.e("item"),n.is("active",o.value),n.is("in-stage",s.value),n.is("hover",a.value),n.is("animating",i.value),{[n.em("item","card")]:c.value,[n.em("item","card-vertical")]:c.value&&l.value}]),v=$(()=>{const b=`${`translate${p(l)?"Y":"X"}`}(${p(u)}px)`,w=`scale(${p(d)})`;return{transform:[b,w].join(" ")}});return(m,b)=>Yt((N(),Z("div",{ref_key:"carouselItemRef",ref:r,class:j(p(g)),style:bt(p(v)),onClick:p(h)},[p(c)?Yt((N(),Z("div",{key:0,class:j(p(n).e("mask"))},null,2)),[[Bn,!p(o)]]):ge("v-if",!0),ke(m.$slots,"default")],14,["onClick"])),[[Bn,p(f)]])}});var IH=Ge(hNe,[["__file","carousel-item.vue"]]);const pNe=Wt(uNe,{CarouselItem:IH}),gNe=qr(IH),LH={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Fo,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...Yi(["ariaControls"])},BH={[zt]:t=>St(t)||Pt(t)||ir(t),change:t=>St(t)||Pt(t)||ir(t)},hm=Symbol("checkboxGroupContextKey"),vNe=({model:t,isChecked:e})=>{const n=gt(hm,void 0),r=$(()=>{var i,a;const s=(i=n==null?void 0:n.max)==null?void 0:i.value,l=(a=n==null?void 0:n.min)==null?void 0:a.value;return!Sn(s)&&t.value.length>=s&&!e.value||!Sn(l)&&t.value.length<=l&&e.value});return{isDisabled:Zi($(()=>(n==null?void 0:n.disabled.value)||r.value)),isLimitDisabled:r}},mNe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:r,isDisabled:o,isLabeledByFormItem:i})=>{const a=gt(hm,void 0),{formItem:s}=Xi(),{emit:l}=Kt();function u(g){var v,m,b,w;return[!0,t.trueValue,t.trueLabel].includes(g)?(m=(v=t.trueValue)!=null?v:t.trueLabel)!=null?m:!0:(w=(b=t.falseValue)!=null?b:t.falseLabel)!=null?w:!1}function c(g,v){l(ln,u(g),v)}function d(g){if(n.value)return;const v=g.target;l(ln,u(v.checked),g)}async function f(g){n.value||!r.value&&!o.value&&i.value&&(g.composedPath().some(b=>b.tagName==="LABEL")||(e.value=u([!1,t.falseValue,t.falseLabel].includes(e.value)),await wt(),c(e.value,g)))}const h=$(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return Le(()=>t.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(g=>void 0))}),{handleChange:d,onClickRoot:f}},yNe=t=>{const e=z(!1),{emit:n}=Kt(),r=gt(hm,void 0),o=$(()=>Sn(r)===!1),i=z(!1),a=$({get(){var s,l;return o.value?(s=r==null?void 0:r.modelValue)==null?void 0:s.value:(l=t.modelValue)!=null?l:e.value},set(s){var l,u;o.value&&Ye(s)?(i.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&s.length>(r==null?void 0:r.max.value)&&s.length>a.value.length,i.value===!1&&((u=r==null?void 0:r.changeEvent)==null||u.call(r,s))):(n(zt,s),e.value=s)}});return{model:a,isGroup:o,isLimitExceeded:i}},bNe=(t,e,{model:n})=>{const r=gt(hm,void 0),o=z(!1),i=$(()=>ts(t.value)?t.label:t.value),a=$(()=>{const c=n.value;return ir(c)?c:Ye(c)?Zt(i.value)?c.map(Mn).some(d=>Oo(d,i.value)):c.map(Mn).includes(i.value):c!=null?c===t.trueValue||c===t.trueLabel:!!c}),s=$o($(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value}),{prop:!0}),l=$o($(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value})),u=$(()=>!!e.default||!ts(i.value));return{checkboxButtonSize:s,isChecked:a,isFocused:o,checkboxSize:l,hasOwnLabel:u,actualValue:i}},FH=(t,e)=>{const{formItem:n}=Xi(),{model:r,isGroup:o,isLimitExceeded:i}=yNe(t),{isFocused:a,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,actualValue:d}=bNe(t,e,{model:r}),{isDisabled:f}=vNe({model:r,isChecked:s}),{inputId:h,isLabeledByFormItem:g}=Bl(t,{formItemContext:n,disableIdGeneration:c,disableIdManagement:o}),{handleChange:v,onClickRoot:m}=mNe(t,{model:r,isLimitExceeded:i,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:g});return(()=>{function w(){var O,S;Ye(r.value)&&!r.value.includes(d.value)?r.value.push(d.value):r.value=(S=(O=t.trueValue)!=null?O:t.trueLabel)!=null?S:!0}t.checked&&w()})(),Kc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},$(()=>o.value&&ts(t.value))),Kc({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},$(()=>!!t.trueLabel)),Kc({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},$(()=>!!t.falseLabel)),{inputId:h,isLabeledByFormItem:g,isChecked:s,isDisabled:f,isFocused:a,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:r,actualValue:d,handleChange:v,onClickRoot:m}},_Ne=de({name:"ElCheckbox"}),ONe=de({..._Ne,props:LH,emits:BH,setup(t){const e=t,n=Ro(),{inputId:r,isLabeledByFormItem:o,isChecked:i,isDisabled:a,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:h}=FH(e,n),g=je("checkbox"),v=$(()=>[g.b(),g.m(l.value),g.is("disabled",a.value),g.is("bordered",e.border),g.is("checked",i.value)]),m=$(()=>[g.e("input"),g.is("disabled",a.value),g.is("checked",i.value),g.is("indeterminate",e.indeterminate),g.is("focus",s.value)]);return(b,w)=>(N(),me(Jt(!p(u)&&p(o)?"span":"label"),{class:j(p(v)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:p(h)},{default:V(()=>{var O,S,x,C;return[ee("span",{class:j(p(m))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?Yt((N(),Z("input",{key:0,id:p(r),"onUpdate:modelValue":E=>Pr(c)?c.value=E:null,class:j(p(g).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:p(a),"true-value":(S=(O=b.trueValue)!=null?O:b.trueLabel)!=null?S:!0,"false-value":(C=(x=b.falseValue)!=null?x:b.falseLabel)!=null?C:!1,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Rt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Tw,p(c)]]):Yt((N(),Z("input",{key:1,id:p(r),"onUpdate:modelValue":E=>Pr(c)?c.value=E:null,class:j(p(g).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:p(a),value:p(d),name:b.name,tabindex:b.tabindex,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Rt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[Tw,p(c)]]),ee("span",{class:j(p(g).e("inner"))},null,2)],2),p(u)?(N(),Z("span",{key:0,class:j(p(g).e("label"))},[ke(b.$slots,"default"),b.$slots.default?ge("v-if",!0):(N(),Z(ut,{key:0},[We(ze(b.label),1)],64))],2)):ge("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var wNe=Ge(ONe,[["__file","checkbox.vue"]]);const SNe=de({name:"ElCheckboxButton"}),xNe=de({...SNe,props:LH,emits:BH,setup(t){const e=t,n=Ro(),{isFocused:r,isChecked:o,isDisabled:i,checkboxButtonSize:a,model:s,actualValue:l,handleChange:u}=FH(e,n),c=gt(hm,void 0),d=je("checkbox"),f=$(()=>{var g,v,m,b;const w=(v=(g=c==null?void 0:c.fill)==null?void 0:g.value)!=null?v:"";return{backgroundColor:w,borderColor:w,color:(b=(m=c==null?void 0:c.textColor)==null?void 0:m.value)!=null?b:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),h=$(()=>[d.b("button"),d.bm("button",a.value),d.is("disabled",i.value),d.is("checked",o.value),d.is("focus",r.value)]);return(g,v)=>{var m,b,w,O;return N(),Z("label",{class:j(p(h))},[g.trueValue||g.falseValue||g.trueLabel||g.falseLabel?Yt((N(),Z("input",{key:0,"onUpdate:modelValue":S=>Pr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:p(i),"true-value":(b=(m=g.trueValue)!=null?m:g.trueLabel)!=null?b:!0,"false-value":(O=(w=g.falseValue)!=null?w:g.falseLabel)!=null?O:!1,onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Rt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Tw,p(s)]]):Yt((N(),Z("input",{key:1,"onUpdate:modelValue":S=>Pr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:p(i),value:p(l),onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Rt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[Tw,p(s)]]),g.$slots.default||g.label?(N(),Z("span",{key:2,class:j(p(d).be("button","inner")),style:bt(p(o)?p(f):void 0)},[ke(g.$slots,"default",{},()=>[We(ze(g.label),1)])],6)):ge("v-if",!0)],2)}}});var VH=Ge(xNe,[["__file","checkbox-button.vue"]]);const CNe=Ze({modelValue:{type:we(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Fo,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...Yi(["ariaLabel"])}),ENe={[zt]:t=>Ye(t),change:t=>Ye(t)},TNe=de({name:"ElCheckboxGroup"}),kNe=de({...TNe,props:CNe,emits:ENe,setup(t,{emit:e}){const n=t,r=je("checkbox"),{formItem:o}=Xi(),{inputId:i,isLabeledByFormItem:a}=Bl(n,{formItemContext:o}),s=async u=>{e(zt,u),await wt(),e(ln,u)},l=$({get(){return n.modelValue},set(u){s(u)}});return mn(hm,{...hi(Mo(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Le(()=>n.modelValue,(u,c)=>{n.validateEvent&&!Oo(u,c)&&(o==null||o.validate("change").catch(d=>void 0))}),(u,c)=>{var d;return N(),me(Jt(u.tag),{id:p(i),class:j(p(r).b("group")),role:"group","aria-label":p(a)?void 0:u.ariaLabel||"checkbox-group","aria-labelledby":p(a)?(d=p(o))==null?void 0:d.labelId:void 0},{default:V(()=>[ke(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var zH=Ge(kNe,[["__file","checkbox-group.vue"]]);const Xs=Wt(wNe,{CheckboxButton:VH,CheckboxGroup:zH}),ANe=qr(VH),jH=qr(zH),WH=Ze({modelValue:{type:[String,Number,Boolean],default:void 0},size:Fo,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),PNe=Ze({...WH,border:Boolean}),QH={[zt]:t=>St(t)||Pt(t)||ir(t),[ln]:t=>St(t)||Pt(t)||ir(t)},HH=Symbol("radioGroupKey"),UH=(t,e)=>{const n=z(),r=gt(HH,void 0),o=$(()=>!!r),i=$(()=>ts(t.value)?t.label:t.value),a=$({get(){return o.value?r.modelValue:t.modelValue},set(d){o.value?r.changeEvent(d):e&&e(zt,d),n.value.checked=t.modelValue===i.value}}),s=$o($(()=>r==null?void 0:r.size)),l=Zi($(()=>r==null?void 0:r.disabled)),u=z(!1),c=$(()=>l.value||o.value&&a.value!==i.value?-1:0);return Kc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},$(()=>o.value&&ts(t.value))),{radioRef:n,isGroup:o,radioGroup:r,focus:u,size:s,disabled:l,tabIndex:c,modelValue:a,actualValue:i}},NNe=de({name:"ElRadio"}),MNe=de({...NNe,props:PNe,emits:QH,setup(t,{emit:e}){const n=t,r=je("radio"),{radioRef:o,radioGroup:i,focus:a,size:s,disabled:l,modelValue:u,actualValue:c}=UH(n,e);function d(){wt(()=>e(ln,u.value))}return(f,h)=>{var g;return N(),Z("label",{class:j([p(r).b(),p(r).is("disabled",p(l)),p(r).is("focus",p(a)),p(r).is("bordered",f.border),p(r).is("checked",p(u)===p(c)),p(r).m(p(s))])},[ee("span",{class:j([p(r).e("input"),p(r).is("disabled",p(l)),p(r).is("checked",p(u)===p(c))])},[Yt(ee("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":v=>Pr(u)?u.value=v:null,class:j(p(r).e("original")),value:p(c),name:f.name||((g=p(i))==null?void 0:g.name),disabled:p(l),checked:p(u)===p(c),type:"radio",onFocus:v=>a.value=!0,onBlur:v=>a.value=!1,onChange:d,onClick:Rt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Qz,p(u)]]),ee("span",{class:j(p(r).e("inner"))},null,2)],2),ee("span",{class:j(p(r).e("label")),onKeydown:Rt(()=>{},["stop"])},[ke(f.$slots,"default",{},()=>[We(ze(f.label),1)])],42,["onKeydown"])],2)}}});var $Ne=Ge(MNe,[["__file","radio.vue"]]);const RNe=Ze({...WH}),DNe=de({name:"ElRadioButton"}),INe=de({...DNe,props:RNe,setup(t){const e=t,n=je("radio"),{radioRef:r,focus:o,size:i,disabled:a,modelValue:s,radioGroup:l,actualValue:u}=UH(e),c=$(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,f)=>{var h;return N(),Z("label",{class:j([p(n).b("button"),p(n).is("active",p(s)===p(u)),p(n).is("disabled",p(a)),p(n).is("focus",p(o)),p(n).bm("button",p(i))])},[Yt(ee("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":g=>Pr(s)?s.value=g:null,class:j(p(n).be("button","original-radio")),value:p(u),type:"radio",name:d.name||((h=p(l))==null?void 0:h.name),disabled:p(a),onFocus:g=>o.value=!0,onBlur:g=>o.value=!1,onClick:Rt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Qz,p(s)]]),ee("span",{class:j(p(n).be("button","inner")),style:bt(p(s)===p(u)?p(c):{}),onKeydown:Rt(()=>{},["stop"])},[ke(d.$slots,"default",{},()=>[We(ze(d.label),1)])],46,["onKeydown"])],2)}}});var YH=Ge(INe,[["__file","radio-button.vue"]]);const LNe=Ze({id:{type:String,default:void 0},size:Fo,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...Yi(["ariaLabel"])}),BNe=QH,FNe=de({name:"ElRadioGroup"}),VNe=de({...FNe,props:LNe,emits:BNe,setup(t,{emit:e}){const n=t,r=je("radio"),o=Si(),i=z(),{formItem:a}=Xi(),{inputId:s,isLabeledByFormItem:l}=Bl(n,{formItemContext:a}),u=d=>{e(zt,d),wt(()=>e(ln,d))};jt(()=>{const d=i.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(h=>h.checked)&&f&&(f.tabIndex=0)});const c=$(()=>n.name||o.value);return mn(HH,pn({...Mo(n),changeEvent:u,name:c})),Le(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(d=>void 0))}),(d,f)=>(N(),Z("div",{id:p(s),ref_key:"radioGroupRef",ref:i,class:j(p(r).b("group")),role:"radiogroup","aria-label":p(l)?void 0:d.ariaLabel||"radio-group","aria-labelledby":p(l)?p(a).labelId:void 0},[ke(d.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var XH=Ge(VNe,[["__file","radio-group.vue"]]);const ZH=Wt($Ne,{RadioButton:YH,RadioGroup:XH}),zNe=qr(XH),jNe=qr(YH),xC=Symbol();function WNe(t){return!!(Ye(t)?t.every(({type:e})=>e===vi):(t==null?void 0:t.type)===vi)}var QNe=de({name:"NodeContent",props:{node:{type:Object,required:!0},disabled:Boolean},setup(t,{emit:e}){const n=je("cascader-node"),{config:r,renderLabelFn:o}=gt(xC),{checkOnClickNode:i,checkOnClickLeaf:a}=r,{node:s,disabled:l}=t,{data:u,label:c}=s,d=()=>{const h=o==null?void 0:o({node:s,data:u});return WNe(h)?c:h!=null?h:c};function f(){(i||s.isLeaf&&a)&&!l&&e("handleSelectCheck",!s.checked)}return()=>B("span",{class:n.e("label"),onClick:f},[d()])}});const HNe=de({name:"ElCascaderNode"}),UNe=de({...HNe,props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=t,r=gt(xC),o=je("cascader-node"),i=$(()=>r.isHoverMenu),a=$(()=>r.config.multiple),s=$(()=>r.config.checkStrictly),l=$(()=>r.config.showPrefix),u=$(()=>{var T;return(T=r.checkedNodes[0])==null?void 0:T.uid}),c=$(()=>n.node.isDisabled),d=$(()=>n.node.isLeaf),f=$(()=>s.value&&!d.value||!c.value),h=$(()=>v(r.expandingNode)),g=$(()=>s.value&&r.checkedNodes.some(v)),v=T=>{var M;const{level:k,uid:P}=n.node;return((M=T==null?void 0:T.pathNodes[k-1])==null?void 0:M.uid)===P},m=()=>{h.value||r.expandNode(n.node)},b=T=>{const{node:M}=n;T!==M.checked&&r.handleCheckChange(M,T)},w=()=>{r.lazyLoad(n.node,()=>{d.value||m()})},O=T=>{!i.value||(S(),!d.value&&e("expand",T))},S=()=>{const{node:T}=n;!f.value||T.loading||(T.loaded?m():w())},x=()=>{i.value&&!d.value||(d.value&&!c.value&&!s.value&&!a.value?E(!0):S())},C=T=>{s.value?(b(T),n.node.loaded&&m()):E(T)},E=T=>{n.node.loaded?(b(T),!s.value&&m()):w()};return(T,M)=>(N(),Z("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!p(d),"aria-owns":p(d)?void 0:t.menuId,"aria-expanded":p(h),tabindex:p(f)?-1:void 0,class:j([p(o).b(),p(o).is("selectable",p(s)),p(o).is("active",t.node.checked),p(o).is("disabled",!p(f)),p(h)&&"in-active-path",p(g)&&"in-checked-path"]),onMouseenter:O,onFocus:O,onClick:x},[ge(" prefix "),p(a)&&p(l)?(N(),me(p(Xs),{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:p(c),onClick:Rt(()=>{},["stop"]),"onUpdate:modelValue":C},null,8,["model-value","indeterminate","disabled","onClick"])):p(s)&&p(l)?(N(),me(p(ZH),{key:1,"model-value":p(u),label:t.node.uid,disabled:p(c),"onUpdate:modelValue":C,onClick:Rt(()=>{},["stop"])},{default:V(()=>[ge(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `),ee("span")]),_:1},8,["model-value","label","disabled","onClick"])):p(d)&&t.node.checked?(N(),me(p(Ot),{key:2,class:j(p(o).e("prefix"))},{default:V(()=>[B(p(Yb))]),_:1},8,["class"])):ge("v-if",!0),ge(" content "),B(p(QNe),{node:t.node,disabled:p(c),onHandleSelectCheck:C},null,8,["node","disabled"]),ge(" postfix "),p(d)?ge("v-if",!0):(N(),Z(ut,{key:3},[t.node.loading?(N(),me(p(Ot),{key:0,class:j([p(o).is("loading"),p(o).e("postfix")])},{default:V(()=>[B(p(lc))]),_:1},8,["class"])):(N(),me(p(Ot),{key:1,class:j(["arrow-right",p(o).e("postfix")])},{default:V(()=>[B(p(da))]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex"]))}});var YNe=Ge(UNe,[["__file","node.vue"]]);const XNe=de({name:"ElCascaderMenu"}),ZNe=de({...XNe,props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=t,n=Kt(),r=je("cascader-menu"),{t:o}=En(),i=Si();let a,s;const l=gt(xC),u=z(),c=$(()=>!e.nodes.length),d=$(()=>!l.initialLoaded),f=$(()=>`${i.value}-${e.index}`),h=b=>{a=b.target},g=b=>{if(!(!l.isHoverMenu||!a||!u.value))if(a.contains(b.target)){v();const w=n.vnode.el,{left:O}=w.getBoundingClientRect(),{offsetWidth:S,offsetHeight:x}=w,C=b.clientX-O,E=a.offsetTop,T=E+a.offsetHeight;u.value.innerHTML=` `}else s||(s=window.setTimeout(m,l.config.hoverThreshold))},v=()=>{!s||(clearTimeout(s),s=void 0)},m=()=>{!u.value||(u.value.innerHTML="",v())};return(b,w)=>(N(),me(p(Al),{key:p(f),tag:"ul",role:"menu",class:j(p(r).b()),"wrap-class":p(r).e("wrap"),"view-class":[p(r).e("list"),p(r).is("empty",p(c))],onMousemove:g,onMouseleave:m},{default:V(()=>{var O;return[(N(!0),Z(ut,null,Xt(t.nodes,S=>(N(),me(YNe,{key:S.uid,node:S,"menu-id":p(f),onExpand:h},null,8,["node","menu-id"]))),128)),p(d)?(N(),Z("div",{key:0,class:j(p(r).e("empty-text"))},[B(p(Ot),{size:"14",class:j(p(r).is("loading"))},{default:V(()=>[B(p(lc))]),_:1},8,["class"]),We(" "+ze(p(o)("el.cascader.loading")),1)],2)):p(c)?(N(),Z("div",{key:1,class:j(p(r).e("empty-text"))},[ke(b.$slots,"empty",{},()=>[We(ze(p(o)("el.cascader.noData")),1)])],2)):(O=p(l))!=null&&O.isHoverMenu?(N(),Z(ut,{key:2},[ge(" eslint-disable-next-line vue/html-self-closing "),(N(),Z("svg",{ref_key:"hoverZone",ref:u,class:j(p(r).e("hover-zone"))},null,2))],2112)):ge("v-if",!0)]}),_:3},8,["class","wrap-class","view-class"]))}});var GNe=Ge(ZNe,[["__file","menu.vue"]]);let qNe=0;const KNe=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};class Ov{constructor(e,n,r,o=!1){this.data=e,this.config=n,this.parent=r,this.root=o,this.uid=qNe++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:i,label:a,children:s}=n,l=e[s],u=KNe(this);this.level=o?0:r?r.level+1:1,this.value=e[i],this.label=e[a],this.pathNodes=u,this.pathValues=u.map(c=>c.value),this.pathLabels=u.map(c=>c.label),this.childrenData=l,this.children=(l||[]).map(c=>new Ov(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!$s(l),this.text=""}get isDisabled(){const{data:e,parent:n,config:r}=this,{disabled:o,checkStrictly:i}=r;return(kt(o)?o(e,this):!!e[o])||!i&&!!(n!=null&&n.isDisabled)}get isLeaf(){const{data:e,config:n,childrenData:r,loaded:o}=this,{lazy:i,leaf:a}=n,s=kt(a)?a(e,this):e[a];return Sn(s)?i&&!o?!1:!(Ye(r)&&r.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:r}=this,o=new Ov(e,this.config,this);return Ye(n)?n.push(e):this.childrenData=[e],r.push(o),o}calcText(e,n){const r=e?this.pathLabels.join(n):this.label;return this.text=r,r}broadcast(e){this.children.forEach(n=>{var r;n&&(n.broadcast(e),(r=n.onParentCheck)==null||r.call(n,e))})}emit(){var e;const{parent:n}=this;n&&((e=n.onChildCheck)==null||e.call(n),n.emit())}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(o=>!o.isDisabled),r=n.length?n.every(o=>o.checked):!1;this.setCheckState(r)}setCheckState(e){const n=this.children.length,r=this.children.reduce((o,i)=>{const a=i.checked?1:i.indeterminate?.5:0;return o+a},0);this.checked=this.loaded&&this.children.filter(o=>!o.isDisabled).every(o=>o.loaded&&o.checked)&&e,this.indeterminate=this.loaded&&r!==n&&r>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:r}=this.config;n||!r?this.checked=e:(this.broadcast(e),this.setCheckState(e),this.emit())}}const rA=(t,e)=>t.reduce((n,r)=>(r.isLeaf?n.push(r):(!e&&n.push(r),n=n.concat(rA(r.children,e))),n),[]);class T5{constructor(e,n){this.config=n;const r=(e||[]).map(o=>new Ov(o,this.config));this.nodes=r,this.allNodes=rA(r,!1),this.leafNodes=rA(r,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const r=n?n.appendChild(e):new Ov(e,this.config);n||this.nodes.push(r),this.appendAllNodesAndLeafNodes(r)}appendNodes(e,n){e.forEach(r=>this.appendNode(r,n))}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e.children.forEach(n=>{this.appendAllNodesAndLeafNodes(n)})}getNodeByValue(e,n=!1){return ts(e)?null:this.getFlattedNodes(n).find(o=>Oo(o.value,e)||Oo(o.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:r,level:o})=>Oo(e.value,r)&&e.level===o)||null}}const GH=Ze({modelValue:{type:we([Number,String,Array])},options:{type:we(Array),default:()=>[]},props:{type:we(Object),default:()=>({})}}),JNe={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:or,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500,checkOnClickNode:!1,checkOnClickLeaf:!0,showPrefix:!0},eMe=Ze({...GH,border:{type:Boolean,default:!0},renderLabel:{type:Function}}),k5=t=>!0,tMe={[zt]:k5,[ln]:k5,close:()=>!0,"expand-change":t=>t},nMe=t=>$(()=>({...JNe,...t.props})),A5=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},rMe=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():XQ(t)&&t.click()},oMe=(t,e)=>{const n=e.slice(0),r=n.map(i=>i.uid),o=t.reduce((i,a)=>{const s=r.indexOf(a.uid);return s>-1&&(i.push(a),n.splice(s,1),r.splice(s,1)),i},[]);return o.push(...n),o},P5=t=>[...new Set(t)],ka=t=>!t&&t!==0?[]:Ye(t)?t:[t],iMe=de({name:"ElCascaderPanel",inheritAttrs:!1}),aMe=de({...iMe,props:eMe,emits:tMe,setup(t,{expose:e,emit:n}){const r=t;let o=!1;const i=je("cascader"),a=nMe(r),s=Ro();let l;const u=z(!0),c=z([]),d=z(),f=z([]),h=z(),g=z([]),v=$(()=>a.value.expandTrigger==="hover"),m=$(()=>r.renderLabel||s.default),b=()=>{const{options:F}=r,W=a.value;o=!1,l=new T5(F,W),f.value=[l.getNodes()],W.lazy&&$s(r.options)?(u.value=!1,w(void 0,I=>{I&&(l=new T5(I,W),f.value=[l.getNodes()]),u.value=!0,k(!1,!0)})):k(!1,!0)},w=(F,W)=>{const I=a.value;F=F||new Ov({},I,void 0,!0),F.loading=!0;const Q=L=>{const H=F,re=H.root?null:H;L&&(l==null||l.appendNodes(L,re)),H.loading=!1,H.loaded=!0,H.childrenData=H.childrenData||[],L&&(W==null||W(L))};I.lazyLoad(F,Q)},O=(F,W)=>{var I;const{level:Q}=F,L=f.value.slice(0,Q);let H;F.isLeaf?H=F.pathNodes[Q-2]:(H=F,L.push(F.children)),((I=h.value)==null?void 0:I.uid)!==(H==null?void 0:H.uid)&&(h.value=F,f.value=L,!W&&n("expand-change",(F==null?void 0:F.pathValues)||[]))},S=(F,W,I=!0)=>{const{checkStrictly:Q,multiple:L}=a.value,H=g.value[0];o=!0,!L&&(H==null||H.doCheck(!1)),F.doCheck(W),M(),I&&!L&&!Q&&n("close"),!I&&!L&&!Q&&x(F)},x=F=>{!F||(F=F.parent,x(F),F&&O(F))},C=F=>l==null?void 0:l.getFlattedNodes(F),E=F=>{var W;return(W=C(F))==null?void 0:W.filter(({checked:I})=>I!==!1)},T=()=>{g.value.forEach(F=>F.doCheck(!1)),M(),f.value=f.value.slice(0,1),h.value=void 0,n("expand-change",[])},M=()=>{const{checkStrictly:F,multiple:W}=a.value,I=g.value,Q=E(!F),L=oMe(I,Q),H=L.map(re=>re.valueByOption);g.value=L,d.value=W?H:H[0]},k=(F=!1,W=!1)=>{const{modelValue:I}=r,{lazy:Q,multiple:L,checkStrictly:H}=a.value,re=!H;if(!(!u.value||o||!W&&Oo(I,d.value)))if(Q&&!F){const J=P5(NW(ka(I))).map(ie=>l==null?void 0:l.getNodeByValue(ie)).filter(ie=>!!ie&&!ie.loaded&&!ie.loading);J.length?J.forEach(ie=>{w(ie,()=>k(!1,W))}):k(!0,W)}else{const U=L?ka(I):[I],J=P5(U.map(ie=>l==null?void 0:l.getNodeByValue(ie,re)));P(J,W),d.value=bn(I!=null?I:void 0)}},P=(F,W=!0)=>{const{checkStrictly:I}=a.value,Q=g.value,L=F.filter(U=>!!U&&(I||U.isLeaf)),H=l==null?void 0:l.getSameNode(h.value),re=W&&H||L[0];re?re.pathNodes.forEach(U=>O(U,!0)):h.value=void 0,Q.forEach(U=>U.doCheck(!1)),pn(L).forEach(U=>U.doCheck(!0)),g.value=L,wt(R)},R=()=>{!kn||c.value.forEach(F=>{const W=F==null?void 0:F.$el;if(W){const I=W.querySelector(`.${i.namespace.value}-scrollbar__wrap`),Q=W.querySelector(`.${i.b("node")}.${i.is("active")}:last-child`)||W.querySelector(`.${i.b("node")}.in-active-path`);x$(I,Q)}})},D=F=>{const W=F.target,{code:I}=F;switch(I){case st.up:case st.down:{F.preventDefault();const Q=I===st.up?-1:1;j1(ZQ(W,Q,`.${i.b("node")}[tabindex="-1"]`));break}case st.left:{F.preventDefault();const Q=c.value[A5(W)-1],L=Q==null?void 0:Q.$el.querySelector(`.${i.b("node")}[aria-expanded="true"]`);j1(L);break}case st.right:{F.preventDefault();const Q=c.value[A5(W)+1],L=Q==null?void 0:Q.$el.querySelector(`.${i.b("node")}[tabindex="-1"]`);j1(L);break}case st.enter:case st.numpadEnter:rMe(W);break}};return mn(xC,pn({config:a,expandingNode:h,checkedNodes:g,isHoverMenu:v,initialLoaded:u,renderLabelFn:m,lazyLoad:w,expandNode:O,handleCheckChange:S})),Le(a,(F,W)=>{Oo(F,W)||b()},{immediate:!0}),Le(()=>r.options,b,{deep:!0}),Le(()=>r.modelValue,()=>{o=!1,k()},{deep:!0}),Le(()=>d.value,F=>{Oo(F,r.modelValue)||(n(zt,F),n(ln,F))}),fM(()=>c.value=[]),jt(()=>!$s(r.modelValue)&&k()),e({menuList:c,menus:f,checkedNodes:g,handleKeyDown:D,handleCheckChange:S,getFlattedNodes:C,getCheckedNodes:E,clearCheckedNodes:T,calculateCheckedValue:M,scrollToExpandingNode:R}),(F,W)=>(N(),Z("div",{class:j([p(i).b("panel"),p(i).is("bordered",F.border)]),onKeydown:D},[(N(!0),Z(ut,null,Xt(f.value,(I,Q)=>(N(),me(GNe,{key:Q,ref_for:!0,ref:L=>c.value[Q]=L,index:Q,nodes:[...I]},{empty:V(()=>[ke(F.$slots,"empty")]),_:2},1032,["index","nodes"]))),128))],34))}});var sMe=Ge(aMe,[["__file","index.vue"]]);const qH=Wt(sMe),ad=Ze({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Oc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),lMe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},uMe=de({name:"ElTag"}),cMe=de({...uMe,props:ad,emits:lMe,setup(t,{emit:e}){const n=t,r=$o(),o=je("tag"),i=$(()=>{const{type:u,hit:c,effect:d,closable:f,round:h}=n;return[o.b(),o.is("closable",f),o.m(u||"primary"),o.m(r.value),o.m(d),o.is("hit",c),o.is("round",h)]}),a=u=>{e("close",u)},s=u=>{e("click",u)},l=u=>{var c,d,f;(f=(d=(c=u==null?void 0:u.component)==null?void 0:c.subTree)==null?void 0:d.component)!=null&&f.bum&&(u.component.subTree.component.bum=null)};return(u,c)=>u.disableTransitions?(N(),Z("span",{key:0,class:j(p(i)),style:bt({backgroundColor:u.color}),onClick:s},[ee("span",{class:j(p(o).e("content"))},[ke(u.$slots,"default")],2),u.closable?(N(),me(p(Ot),{key:0,class:j(p(o).e("close")),onClick:Rt(a,["stop"])},{default:V(()=>[B(p(fa))]),_:1},8,["class","onClick"])):ge("v-if",!0)],6)):(N(),me(Xo,{key:1,name:`${p(o).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:V(()=>[ee("span",{class:j(p(i)),style:bt({backgroundColor:u.color}),onClick:s},[ee("span",{class:j(p(o).e("content"))},[ke(u.$slots,"default")],2),u.closable?(N(),me(p(Ot),{key:0,class:j(p(o).e("close")),onClick:Rt(a,["stop"])},{default:V(()=>[B(p(fa))]),_:1},8,["class","onClick"])):ge("v-if",!0)],6)]),_:3},8,["name"]))}});var dMe=Ge(cMe,[["__file","tag.vue"]]);const Zs=Wt(dMe),fMe=Ze({...GH,size:Fo,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:we(Function),default:(t,e)=>t.text.includes(e)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:Boolean,maxCollapseTagsTooltipHeight:{type:[String,Number]},debounce:{type:Number,default:300},beforeFilter:{type:we(Function),default:()=>!0},placement:{type:we(String),values:Ed,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:yo.teleported,effect:{type:we(String),default:"light"},tagType:{...ad.type,default:"info"},tagEffect:{...ad.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},showCheckedStrategy:{type:String,values:["parent","child"],default:"child"},checkOnClickNode:Boolean,showPrefix:{type:Boolean,default:!0},...Dp}),N5=t=>!0,hMe={[zt]:N5,[ln]:N5,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>ir(t),expandChange:t=>!!t,removeTag:t=>!!t},Qd=new Map;if(kn){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Qd.values())for(const{documentHandler:r}of n)r(e,t);t=void 0}})}function M5(t,e){let n=[];return Ye(e.arg)?n=e.arg:Aa(e.arg)&&n.push(e.arg),function(r,o){const i=e.instance.popperRef,a=r.target,s=o==null?void 0:o.target,l=!e||!e.instance,u=!a||!s,c=t.contains(a)||t.contains(s),d=t===a,f=n.length&&n.some(g=>g==null?void 0:g.contains(a))||n.length&&n.includes(s),h=i&&(i.contains(a)||i.contains(s));l||u||c||d||f||h||e.value(r,o)}}const sd={beforeMount(t,e){Qd.has(t)||Qd.set(t,[]),Qd.get(t).push({documentHandler:M5(t,e),bindingFn:e.value})},updated(t,e){Qd.has(t)||Qd.set(t,[]);const n=Qd.get(t),r=n.findIndex(i=>i.bindingFn===e.oldValue),o={documentHandler:M5(t,e),bindingFn:e.value};r>=0?n.splice(r,1,o):n.push(o)},unmounted(t){Qd.delete(t)}},pMe="ElCascader",gMe=de({name:pMe}),vMe=de({...gMe,props:fMe,emits:hMe,setup(t,{expose:e,emit:n}){const r=t,o={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:Ce})=>{const{modifiersData:pe,placement:Be}=Ce;["right","left","bottom","top"].includes(Be)||pe.arrow&&(pe.arrow.x=35)},requires:["arrow"]}]},i=vd();let a=0,s=0;const l=je("cascader"),u=je("input"),{t:c}=En(),{form:d,formItem:f}=Xi(),{valueOnClear:h}=Hb(r),{isComposing:g,handleComposition:v}=Zb({afterComposition(Ce){var pe;const Be=(pe=Ce.target)==null?void 0:pe.value;Mt(Be)}}),m=z(null),b=z(null),w=z(null),O=z(null),S=z(null),x=z(!1),C=z(!1),E=z(!1),T=z(!1),M=z(""),k=z(""),P=z([]),R=z([]),D=z([]),F=$(()=>i.style),W=$(()=>r.disabled||(d==null?void 0:d.disabled)),I=$(()=>{var Ce;return(Ce=r.placeholder)!=null?Ce:c("el.cascader.placeholder")}),Q=$(()=>k.value||P.value.length>0||g.value?"":I.value),L=$o(),H=$(()=>L.value==="small"?"small":"default"),re=$(()=>!!r.props.multiple),U=$(()=>!r.filterable||re.value),J=$(()=>re.value?k.value:M.value),ie=$(()=>{var Ce;return((Ce=O.value)==null?void 0:Ce.checkedNodes)||[]}),te=$(()=>!r.clearable||W.value||E.value||!C.value?!1:!!ie.value.length),he=$(()=>{const{showAllLevels:Ce,separator:pe}=r,Be=ie.value;return Be.length?re.value?"":Be[0].calcText(Ce,pe):""}),K=$(()=>(f==null?void 0:f.validateState)||""),ne=$({get(){return bn(r.modelValue)},set(Ce){const pe=Ce!=null?Ce:h.value;n(zt,pe),n(ln,pe),r.validateEvent&&(f==null||f.validate("change").catch(Be=>void 0))}}),fe=$(()=>[l.b(),l.m(L.value),l.is("disabled",W.value),i.class]),Ne=$(()=>[u.e("icon"),"icon-arrow-down",l.is("reverse",x.value)]),$e=$(()=>l.is("focus",x.value||T.value)),ue=$(()=>{var Ce,pe;return(pe=(Ce=m.value)==null?void 0:Ce.popperRef)==null?void 0:pe.contentRef}),G=Ce=>{var pe,Be,_t;W.value||(Ce=Ce!=null?Ce:!x.value,Ce!==x.value&&(x.value=Ce,(Be=(pe=b.value)==null?void 0:pe.input)==null||Be.setAttribute("aria-expanded",`${Ce}`),Ce?(ve(),wt((_t=O.value)==null?void 0:_t.scrollToExpandingNode)):r.filterable&&Fe(),n("visibleChange",Ce)))},ve=()=>{wt(()=>{var Ce;(Ce=m.value)==null||Ce.updatePopper()})},q=()=>{E.value=!1},Ie=Ce=>{const{showAllLevels:pe,separator:Be}=r;return{node:Ce,key:Ce.uid,text:Ce.calcText(pe,Be),hitState:!1,closable:!W.value&&!Ce.isDisabled,isCollapseTag:!1}},Ee=Ce=>{var pe;const Be=Ce.node;Be.doCheck(!1),(pe=O.value)==null||pe.calculateCheckedValue(),n("removeTag",Be.valueByOption)},Oe=()=>{switch(r.showCheckedStrategy){case"child":return ie.value;case"parent":{const Ce=Ae(!1),pe=Ce.map(_t=>_t.value);return Ce.filter(_t=>!_t.parent||!pe.includes(_t.parent.value))}default:return[]}},se=()=>{if(!re.value)return;const Ce=Oe(),pe=[],Be=[];if(Ce.forEach(_t=>Be.push(Ie(_t))),R.value=Be,Ce.length){Ce.slice(0,r.maxCollapseTags).forEach(On=>pe.push(Ie(On)));const _t=Ce.slice(r.maxCollapseTags),en=_t.length;en&&(r.collapseTags?pe.push({key:-1,text:`+ ${en}`,closable:!1,isCollapseTag:!0}):_t.forEach(On=>pe.push(Ie(On))))}P.value=pe},X=()=>{var Ce,pe;const{filterMethod:Be,showAllLevels:_t,separator:en}=r,On=(pe=(Ce=O.value)==null?void 0:Ce.getFlattedNodes(!r.props.checkStrictly))==null?void 0:pe.filter(yn=>yn.isDisabled?!1:(yn.calcText(_t,en),Be(yn,J.value)));re.value&&(P.value.forEach(yn=>{yn.hitState=!1}),R.value.forEach(yn=>{yn.hitState=!1})),E.value=!0,D.value=On,ve()},oe=()=>{var Ce;let pe;E.value&&S.value?pe=S.value.$el.querySelector(`.${l.e("suggestion-item")}`):pe=(Ce=O.value)==null?void 0:Ce.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`),pe&&(pe.focus(),!E.value&&pe.click())},ce=()=>{var Ce,pe;const Be=(Ce=b.value)==null?void 0:Ce.input,_t=w.value,en=(pe=S.value)==null?void 0:pe.$el;if(!(!kn||!Be)){if(en){const On=en.querySelector(`.${l.e("suggestion-list")}`);On.style.minWidth=`${Be.offsetWidth}px`}if(_t){const{offsetHeight:On}=_t,yn=P.value.length>0?`${Math.max(On,a)-2}px`:`${a}px`;Be.style.height=yn,ve()}}},Ae=Ce=>{var pe;return(pe=O.value)==null?void 0:pe.getCheckedNodes(Ce)},ye=Ce=>{ve(),n("expandChange",Ce)},Te=Ce=>{if(!g.value)switch(Ce.code){case st.enter:case st.numpadEnter:G();break;case st.down:G(!0),wt(oe),Ce.preventDefault();break;case st.esc:x.value===!0&&(Ce.preventDefault(),Ce.stopPropagation(),G(!1));break;case st.tab:G(!1);break}},Me=()=>{var Ce;(Ce=O.value)==null||Ce.clearCheckedNodes(),!x.value&&r.filterable&&Fe(),G(!1),n("clear")},Fe=()=>{const{value:Ce}=he;M.value=Ce,k.value=Ce},at=Ce=>{var pe,Be;const{checked:_t}=Ce;re.value?(pe=O.value)==null||pe.handleCheckChange(Ce,!_t,!1):(!_t&&((Be=O.value)==null||Be.handleCheckChange(Ce,!0,!1)),G(!1))},nt=Ce=>{const pe=Ce.target,{code:Be}=Ce;switch(Be){case st.up:case st.down:{Ce.preventDefault();const _t=Be===st.up?-1:1;j1(ZQ(pe,_t,`.${l.e("suggestion-item")}[tabindex="-1"]`));break}case st.enter:case st.numpadEnter:pe.click();break}},ct=()=>{const Ce=P.value,pe=Ce[Ce.length-1];s=k.value?0:s+1,!(!pe||!s||r.collapseTags&&Ce.length>1)&&(pe.hitState?Ee(pe):pe.hitState=!0)},ht=Ce=>{const pe=Ce.target,Be=l.e("search-input");pe.className===Be&&(T.value=!0),n("focus",Ce)},Je=Ce=>{T.value=!1,n("blur",Ce)},ft=Hi(()=>{const{value:Ce}=J;if(!Ce)return;const pe=r.beforeFilter(Ce);dp(pe)?pe.then(X).catch(()=>{}):pe!==!1?X():q()},r.debounce),Mt=(Ce,pe)=>{!x.value&&G(!0),!(pe!=null&&pe.isComposing)&&(Ce?ft():q())},Pe=Ce=>Number.parseFloat(TCe(u.cssVarName("input-height"),Ce).value)-2;return Le(E,ve),Le([ie,W,()=>r.collapseTags],se),Le(P,()=>{wt(()=>ce())}),Le(L,async()=>{await wt();const Ce=b.value.input;a=Pe(Ce)||a,ce()}),Le(he,Fe,{immediate:!0}),jt(()=>{const Ce=b.value.input,pe=Pe(Ce);a=Ce.offsetHeight||pe,Wr(Ce,ce)}),e({getCheckedNodes:Ae,cascaderPanelRef:O,togglePopperVisible:G,contentRef:ue,presentText:he}),(Ce,pe)=>(N(),me(p(Zo),{ref_key:"tooltipRef",ref:m,visible:x.value,teleported:Ce.teleported,"popper-class":[p(l).e("dropdown"),Ce.popperClass],"popper-options":o,"fallback-placements":Ce.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:Ce.placement,transition:`${p(l).namespace.value}-zoom-in-top`,effect:Ce.effect,pure:"",persistent:Ce.persistent,onHide:q},{default:V(()=>[Yt((N(),Z("div",{class:j(p(fe)),style:bt(p(F)),onClick:()=>G(p(U)?void 0:!0),onKeydown:Te,onMouseenter:Be=>C.value=!0,onMouseleave:Be=>C.value=!1},[B(p(ao),{ref_key:"input",ref:b,modelValue:M.value,"onUpdate:modelValue":Be=>M.value=Be,placeholder:p(Q),readonly:p(U),disabled:p(W),"validate-event":!1,size:p(L),class:j(p($e)),tabindex:p(re)&&Ce.filterable&&!p(W)?-1:void 0,onCompositionstart:p(v),onCompositionupdate:p(v),onCompositionend:p(v),onFocus:ht,onBlur:Je,onInput:Mt},ha({suffix:V(()=>[p(te)?(N(),me(p(Ot),{key:"clear",class:j([p(u).e("icon"),"icon-circle-close"]),onClick:Rt(Me,["stop"])},{default:V(()=>[B(p(Cd))]),_:1},8,["class","onClick"])):(N(),me(p(Ot),{key:"arrow-down",class:j(p(Ne)),onClick:Rt(Be=>G(),["stop"])},{default:V(()=>[B(p(wc))]),_:1},8,["class","onClick"]))]),_:2},[Ce.$slots.prefix?{name:"prefix",fn:V(()=>[ke(Ce.$slots,"prefix")])}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),p(re)?(N(),Z("div",{key:0,ref_key:"tagWrapper",ref:w,class:j([p(l).e("tags"),p(l).is("validate",Boolean(p(K)))])},[ke(Ce.$slots,"tag",{data:R.value,deleteTag:Ee},()=>[(N(!0),Z(ut,null,Xt(P.value,Be=>(N(),me(p(Zs),{key:Be.key,type:Ce.tagType,size:p(H),effect:Ce.tagEffect,hit:Be.hitState,closable:Be.closable,"disable-transitions":"",onClose:_t=>Ee(Be)},{default:V(()=>[Be.isCollapseTag===!1?(N(),Z("span",{key:0},ze(Be.text),1)):(N(),me(p(Zo),{key:1,disabled:x.value||!Ce.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:Ce.effect},{default:V(()=>[ee("span",null,ze(Be.text),1)]),content:V(()=>[B(p(Al),{"max-height":Ce.maxCollapseTagsTooltipHeight},{default:V(()=>[ee("div",{class:j(p(l).e("collapse-tags"))},[(N(!0),Z(ut,null,Xt(R.value.slice(Ce.maxCollapseTags),(_t,en)=>(N(),Z("div",{key:en,class:j(p(l).e("collapse-tag"))},[(N(),me(p(Zs),{key:_t.key,class:"in-tooltip",type:Ce.tagType,size:p(H),effect:Ce.tagEffect,hit:_t.hitState,closable:_t.closable,"disable-transitions":"",onClose:On=>Ee(_t)},{default:V(()=>[ee("span",null,ze(_t.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:1},8,["max-height"])]),_:2},1032,["disabled","effect"]))]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128))]),Ce.filterable&&!p(W)?Yt((N(),Z("input",{key:0,"onUpdate:modelValue":Be=>k.value=Be,type:"text",class:j(p(l).e("search-input")),placeholder:p(he)?"":p(I),onInput:Be=>Mt(k.value,Be),onClick:Rt(Be=>G(!0),["stop"]),onKeydown:yr(ct,["delete"]),onCompositionstart:p(v),onCompositionupdate:p(v),onCompositionend:p(v),onFocus:ht,onBlur:Je},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[Ux,k.value]]):ge("v-if",!0)],2)):ge("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[p(sd),()=>G(!1),p(ue)]])]),content:V(()=>[Ce.$slots.header?(N(),Z("div",{key:0,class:j(p(l).e("header")),onClick:Rt(()=>{},["stop"])},[ke(Ce.$slots,"header")],10,["onClick"])):ge("v-if",!0),Yt(B(p(qH),{ref_key:"cascaderPanelRef",ref:O,modelValue:p(ne),"onUpdate:modelValue":Be=>Pr(ne)?ne.value=Be:null,options:Ce.options,props:r.props,border:!1,"render-label":Ce.$slots.default,onExpandChange:ye,onClose:Be=>Ce.$nextTick(()=>G(!1))},{empty:V(()=>[ke(Ce.$slots,"empty")]),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[Bn,!E.value]]),Ce.filterable?Yt((N(),me(p(Al),{key:1,ref_key:"suggestionPanel",ref:S,tag:"ul",class:j(p(l).e("suggestion-panel")),"view-class":p(l).e("suggestion-list"),onKeydown:nt},{default:V(()=>[D.value.length?(N(!0),Z(ut,{key:0},Xt(D.value,Be=>(N(),Z("li",{key:Be.uid,class:j([p(l).e("suggestion-item"),p(l).is("checked",Be.checked)]),tabindex:-1,onClick:_t=>at(Be)},[ke(Ce.$slots,"suggestion-item",{item:Be},()=>[ee("span",null,ze(Be.text),1),Be.checked?(N(),me(p(Ot),{key:0},{default:V(()=>[B(p(Yb))]),_:1})):ge("v-if",!0)])],10,["onClick"]))),128)):ke(Ce.$slots,"empty",{key:1},()=>[ee("li",{class:j(p(l).e("empty-text"))},ze(p(c)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Bn,E.value]]):ge("v-if",!0),Ce.$slots.footer?(N(),Z("div",{key:2,class:j(p(l).e("footer")),onClick:Rt(()=>{},["stop"])},[ke(Ce.$slots,"footer")],10,["onClick"])):ge("v-if",!0)]),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","effect","persistent"]))}});var mMe=Ge(vMe,[["__file","cascader.vue"]]);const yMe=Wt(mMe),bMe=Ze({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),_Me={"update:checked":t=>ir(t),[ln]:t=>ir(t)},OMe=de({name:"ElCheckTag"}),wMe=de({...OMe,props:bMe,emits:_Me,setup(t,{emit:e}){const n=t,r=je("check-tag"),o=$(()=>n.disabled),i=$(()=>[r.b(),r.is("checked",n.checked),r.is("disabled",o.value),r.m(n.type||"primary")]),a=()=>{if(o.value)return;const s=!n.checked;e(ln,s),e("update:checked",s)};return(s,l)=>(N(),Z("span",{class:j(p(i)),onClick:a},[ke(s.$slots,"default")],2))}});var SMe=Ge(wMe,[["__file","check-tag.vue"]]);const xMe=Wt(SMe),CMe=Ze({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:we([Number,Object]),default:()=>Gr({})},sm:{type:we([Number,Object]),default:()=>Gr({})},md:{type:we([Number,Object]),default:()=>Gr({})},lg:{type:we([Number,Object]),default:()=>Gr({})},xl:{type:we([Number,Object]),default:()=>Gr({})}}),KH=Symbol("rowContextKey"),EMe=de({name:"ElCol"}),TMe=de({...EMe,props:CMe,setup(t){const e=t,{gutter:n}=gt(KH,{gutter:$(()=>0)}),r=je("col"),o=$(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),i=$(()=>{const a=[];return["span","offset","pull","push"].forEach(u=>{const c=e[u];Pt(c)&&(u==="span"?a.push(r.b(`${e[u]}`)):c>0&&a.push(r.b(`${u}-${e[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{Pt(e[u])?a.push(r.b(`${u}-${e[u]}`)):Zt(e[u])&&Object.entries(e[u]).forEach(([c,d])=>{a.push(c!=="span"?r.b(`${u}-${c}-${d}`):r.b(`${u}-${d}`))})}),n.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,s)=>(N(),me(Jt(a.tag),{class:j(p(i)),style:bt(p(o))},{default:V(()=>[ke(a.$slots,"default")]),_:3},8,["class","style"]))}});var kMe=Ge(TMe,[["__file","col.vue"]]);const ri=Wt(kMe),$5=t=>Pt(t)||St(t)||Ye(t),AMe=Ze({accordion:Boolean,modelValue:{type:we([Array,String,Number]),default:()=>Gr([])},expandIconPosition:{type:we([String]),default:"right"},beforeCollapse:{type:we(Function)}}),PMe={[zt]:$5,[ln]:$5},JH=Symbol("collapseContextKey"),NMe="ElCollapse",MMe=(t,e)=>{const n=z(Jo(t.modelValue)),r=a=>{n.value=a;const s=t.accordion?n.value[0]:n.value;e(zt,s),e(ln,s)},o=a=>{if(t.accordion)r([n.value[0]===a?"":a]);else{const s=[...n.value],l=s.indexOf(a);l>-1?s.splice(l,1):s.push(a),r(s)}},i=async a=>{const{beforeCollapse:s}=t;if(!s){o(a);return}const l=s(a);[dp(l),ir(l)].includes(!0)||Ao(NMe,"beforeCollapse must return type `Promise` or `boolean`"),dp(l)?l.then(c=>{c!==!1&&o(a)}).catch(c=>{}):l&&o(a)};return Le(()=>t.modelValue,()=>n.value=Jo(t.modelValue),{deep:!0}),mn(JH,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:r}},$Me=t=>{const e=je("collapse");return{rootKls:$(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}},RMe=de({name:"ElCollapse"}),DMe=de({...RMe,props:AMe,emits:PMe,setup(t,{expose:e,emit:n}){const r=t,{activeNames:o,setActiveNames:i}=MMe(r,n),{rootKls:a}=$Me(r);return e({activeNames:o,setActiveNames:i}),(s,l)=>(N(),Z("div",{class:j(p(a))},[ke(s.$slots,"default")],2))}});var IMe=Ge(DMe,[["__file","collapse.vue"]]);const LMe=de({name:"ElCollapseTransition"}),BMe=de({...LMe,setup(t){const e=je("collapse-transition"),n=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){n(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){n(o)},leaveCancelled(o){n(o)}};return(o,i)=>(N(),me(Xo,rn({name:p(e).b()},Nue(r)),{default:V(()=>[ke(o.$slots,"default")]),_:3},16,["name"]))}});var FMe=Ge(BMe,[["__file","collapse-transition.vue"]]);const CC=Wt(FMe),VMe=Ze({title:{type:String,default:""},name:{type:we([String,Number]),default:void 0},icon:{type:cr,default:da},disabled:Boolean}),zMe=t=>{const e=gt(JH),{namespace:n}=je("collapse"),r=z(!1),o=z(!1),i=P$(),a=$(()=>i.current++),s=$(()=>{var f;return(f=t.name)!=null?f:`${n.value}-id-${i.prefix}-${p(a)}`}),l=$(()=>e==null?void 0:e.activeNames.value.includes(p(s)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{o.value?o.value=!1:r.value=!0},50)},handleHeaderClick:f=>{if(t.disabled)return;const h=f.target;h!=null&&h.closest("input, textarea, select")||(e==null||e.handleItemClick(p(s)),r.value=!1,o.value=!0)},handleEnterClick:f=>{const h=f.target;h!=null&&h.closest("input, textarea, select")||(f.preventDefault(),e==null||e.handleItemClick(p(s)))}}},jMe=(t,{focusing:e,isActive:n,id:r})=>{const o=je("collapse"),i=$(()=>[o.b("item"),o.is("active",p(n)),o.is("disabled",t.disabled)]),a=$(()=>[o.be("item","header"),o.is("active",p(n)),{focusing:p(e)&&!t.disabled}]),s=$(()=>[o.be("item","arrow"),o.is("active",p(n))]),l=$(()=>[o.be("item","title")]),u=$(()=>o.be("item","wrap")),c=$(()=>o.be("item","content")),d=$(()=>o.b(`content-${p(r)}`)),f=$(()=>o.b(`head-${p(r)}`));return{itemTitleKls:l,arrowKls:s,headKls:a,rootKls:i,itemWrapperKls:u,itemContentKls:c,scopedContentId:d,scopedHeadId:f}},WMe=de({name:"ElCollapseItem"}),QMe=de({...WMe,props:VMe,setup(t,{expose:e}){const n=t,{focusing:r,id:o,isActive:i,handleFocus:a,handleHeaderClick:s,handleEnterClick:l}=zMe(n),{arrowKls:u,headKls:c,rootKls:d,itemTitleKls:f,itemWrapperKls:h,itemContentKls:g,scopedContentId:v,scopedHeadId:m}=jMe(n,{focusing:r,isActive:i,id:o});return e({isActive:i}),(b,w)=>(N(),Z("div",{class:j(p(d))},[ee("div",{id:p(m),class:j(p(c)),"aria-expanded":p(i),"aria-controls":p(v),"aria-describedby":p(v),tabindex:b.disabled?-1:0,role:"button",onClick:p(s),onKeydown:yr(Rt(p(l),["stop"]),["space","enter"]),onFocus:p(a),onBlur:O=>r.value=!1},[ee("span",{class:j(p(f))},[ke(b.$slots,"title",{isActive:p(i)},()=>[We(ze(b.title),1)])],2),ke(b.$slots,"icon",{isActive:p(i)},()=>[B(p(Ot),{class:j(p(u))},{default:V(()=>[(N(),me(Jt(b.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),B(p(CC),null,{default:V(()=>[Yt(ee("div",{id:p(v),role:"region",class:j(p(h)),"aria-hidden":!p(i),"aria-labelledby":p(m)},[ee("div",{class:j(p(g))},[ke(b.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[Bn,p(i)]])]),_:3})],2))}});var eU=Ge(QMe,[["__file","collapse-item.vue"]]);const H$=Wt(IMe,{CollapseItem:eU}),U$=qr(eU),HMe=Ze({color:{type:we(Object),required:!0},vertical:Boolean});let i2=!1;function D0(t,e){if(!kn)return;const n=function(i){var a;(a=e.drag)==null||a.call(e,i)},r=function(i){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,i2=!1,(a=e.end)==null||a.call(e,i)},o=function(i){var a;i2||(i.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",r),document.addEventListener("touchmove",n),document.addEventListener("touchend",r),i2=!0,(a=e.start)==null||a.call(e,i))};t.addEventListener("mousedown",o),t.addEventListener("touchstart",o,{passive:!1})}const R5=t=>{let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e},oA=(t,e)=>Math.abs(R5(t)-R5(e)),Y$=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}},UMe=t=>{const e=Kt(),{t:n}=En(),r=wr(),o=wr(),i=$(()=>t.color.get("alpha")),a=$(()=>n("el.colorpicker.alphaLabel"));function s(d){var f;d.target!==r.value&&l(d),(f=r.value)==null||f.focus()}function l(d){if(!o.value||!r.value)return;const h=e.vnode.el.getBoundingClientRect(),{clientX:g,clientY:v}=Y$(d);if(t.vertical){let m=v-h.top;m=Math.max(r.value.offsetHeight/2,m),m=Math.min(m,h.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((m-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let m=g-h.left;m=Math.max(r.value.offsetWidth/2,m),m=Math.min(m,h.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((m-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}function u(d){const{code:f,shiftKey:h}=d,g=h?10:1;switch(f){case st.left:case st.down:d.preventDefault(),d.stopPropagation(),c(-g);break;case st.right:case st.up:d.preventDefault(),d.stopPropagation(),c(g);break}}function c(d){let f=i.value+d;f=f<0?0:f>100?100:f,t.color.set("alpha",f)}return{thumb:r,bar:o,alpha:i,alphaLabel:a,handleDrag:l,handleClick:s,handleKeydown:u}},YMe=(t,{bar:e,thumb:n,handleDrag:r})=>{const o=Kt(),i=je("color-alpha-slider"),a=z(0),s=z(0),l=z();function u(){if(!n.value||t.vertical)return 0;const w=o.vnode.el,O=t.color.get("alpha");return w?Math.round(O*(w.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const w=o.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return w?Math.round(O*(w.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(t.color&&t.color.value){const{r:w,g:O,b:S}=t.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${O}, ${S}, 0) 0%, rgba(${w}, ${O}, ${S}, 1) 100%)`}return""}function f(){a.value=u(),s.value=c(),l.value=d()}jt(()=>{if(!e.value||!n.value)return;const w={drag:O=>{r(O)},end:O=>{r(O)}};D0(e.value,w),D0(n.value,w),f()}),Le(()=>t.color.get("alpha"),()=>f()),Le(()=>t.color.value,()=>f());const h=$(()=>[i.b(),i.is("vertical",t.vertical)]),g=$(()=>i.e("bar")),v=$(()=>i.e("thumb")),m=$(()=>({background:l.value})),b=$(()=>({left:so(a.value),top:so(s.value)}));return{rootKls:h,barKls:g,barStyle:m,thumbKls:v,thumbStyle:b,update:f}},XMe="ElColorAlphaSlider",ZMe=de({name:XMe}),GMe=de({...ZMe,props:HMe,setup(t,{expose:e}){const n=t,{alpha:r,alphaLabel:o,bar:i,thumb:a,handleDrag:s,handleClick:l,handleKeydown:u}=UMe(n),{rootKls:c,barKls:d,barStyle:f,thumbKls:h,thumbStyle:g,update:v}=YMe(n,{bar:i,thumb:a,handleDrag:s});return e({update:v,bar:i,thumb:a}),(m,b)=>(N(),Z("div",{class:j(p(c))},[ee("div",{ref_key:"bar",ref:i,class:j(p(d)),style:bt(p(f)),onClick:p(l)},null,14,["onClick"]),ee("div",{ref_key:"thumb",ref:a,class:j(p(h)),style:bt(p(g)),"aria-label":p(o),"aria-valuenow":p(r),"aria-orientation":m.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:p(u)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var qMe=Ge(GMe,[["__file","alpha-slider.vue"]]);const KMe=de({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=je("color-hue-slider"),n=Kt(),r=z(),o=z(),i=z(0),a=z(0),s=$(()=>t.color.get("hue"));Le(()=>s.value,()=>{f()});function l(h){h.target!==r.value&&u(h)}function u(h){if(!o.value||!r.value)return;const v=n.vnode.el.getBoundingClientRect(),{clientX:m,clientY:b}=Y$(h);let w;if(t.vertical){let O=b-v.top;O=Math.min(O,v.height-r.value.offsetHeight/2),O=Math.max(r.value.offsetHeight/2,O),w=Math.round((O-r.value.offsetHeight/2)/(v.height-r.value.offsetHeight)*360)}else{let O=m-v.left;O=Math.min(O,v.width-r.value.offsetWidth/2),O=Math.max(r.value.offsetWidth/2,O),w=Math.round((O-r.value.offsetWidth/2)/(v.width-r.value.offsetWidth)*360)}t.color.set("hue",w)}function c(){if(!r.value)return 0;const h=n.vnode.el;if(t.vertical)return 0;const g=t.color.get("hue");return h?Math.round(g*(h.offsetWidth-r.value.offsetWidth/2)/360):0}function d(){if(!r.value)return 0;const h=n.vnode.el;if(!t.vertical)return 0;const g=t.color.get("hue");return h?Math.round(g*(h.offsetHeight-r.value.offsetHeight/2)/360):0}function f(){i.value=c(),a.value=d()}return jt(()=>{if(!o.value||!r.value)return;const h={drag:g=>{u(g)},end:g=>{u(g)}};D0(o.value,h),D0(r.value,h),f()}),{bar:o,thumb:r,thumbLeft:i,thumbTop:a,hueValue:s,handleClick:l,update:f,ns:e}}});function JMe(t,e,n,r,o,i){return N(),Z("div",{class:j([t.ns.b(),t.ns.is("vertical",t.vertical)])},[ee("div",{ref:"bar",class:j(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),ee("div",{ref:"thumb",class:j(t.ns.e("thumb")),style:bt({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var e$e=Ge(KMe,[["render",JMe],["__file","hue-slider.vue"]]);const t$e=Ze({persistent:{type:Boolean,default:!0},modelValue:{type:we(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Fo,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:yo.teleported,appendTo:yo.appendTo,predefine:{type:we(Array)},validateEvent:{type:Boolean,default:!0},...Dp,...Yi(["ariaLabel"])}),n$e={[zt]:t=>St(t)||gr(t),[ln]:t=>St(t)||gr(t),activeChange:t=>St(t)||gr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},tU=Symbol("colorPickerContextKey");class Fw{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Pg,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const n in e)Dn(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const r in e)Dn(e,r)&&this.set(r,e[r]);return}this[`_${e}`]=n,this._isValid=!0,this.doOnChange()}get(e){return["hue","saturation","value","alpha"].includes(e)?Math.round(this[`_${e}`]):this[`_${e}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(e){const n=new Pg(e);if(this._isValid=n.isValid,n.isValid){const{h:r,s:o,v:i,a}=n.toHsv();this._hue=r,this._saturation=o*100,this._value=i*100,this._alpha=a*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}compare(e){const n=new Pg({h:e._hue,s:e._saturation/100,v:e._value/100,a:e._alpha/100});return this._tiny.equals(n)}doOnChange(){const{_hue:e,_saturation:n,_value:r,_alpha:o,format:i,enableAlpha:a}=this;let s=i||(a?"rgb":"hex");i==="hex"&&a&&(s="hex8"),this._tiny=new Pg({h:e,s:n/100,v:r/100,a:o/100}),this.value=this._isValid?this._tiny.toString(s):""}}const r$e=de({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=je("color-predefine"),{currentColor:n}=gt(tU),r=z(i(t.colors,t.color));Le(()=>n.value,a=>{const s=new Fw({value:a});r.value.forEach(l=>{l.selected=s.compare(l)})}),ua(()=>{r.value=i(t.colors,t.color)});function o(a){t.color.fromString(t.colors[a])}function i(a,s){return a.map(l=>{const u=new Fw({value:l});return u.selected=u.compare(s),u})}return{rgbaColors:r,handleSelect:o,ns:e}}});function o$e(t,e,n,r,o,i){return N(),Z("div",{class:j(t.ns.b())},[ee("div",{class:j(t.ns.e("colors"))},[(N(!0),Z(ut,null,Xt(t.rgbaColors,(a,s)=>(N(),Z("div",{key:t.colors[s],class:j([t.ns.e("color-selector"),t.ns.is("alpha",a.get("alpha")<100),{selected:a.selected}]),onClick:l=>t.handleSelect(s)},[ee("div",{style:bt({backgroundColor:a.value})},null,4)],10,["onClick"]))),128))],2)],2)}var i$e=Ge(r$e,[["render",o$e],["__file","predefine.vue"]]);const a$e=de({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=je("color-svpanel"),n=Kt(),r=z(0),o=z(0),i=z("hsl(0, 100%, 50%)"),a=$(()=>{const u=t.color.get("hue"),c=t.color.get("value");return{hue:u,value:c}});function s(){const u=t.color.get("saturation"),c=t.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:h}=d;o.value=u*f/100,r.value=(100-c)*h/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function l(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:h}=Y$(u);let g=f-d.left,v=h-d.top;g=Math.max(0,g),g=Math.min(g,d.width),v=Math.max(0,v),v=Math.min(v,d.height),o.value=g,r.value=v,t.color.set({saturation:g/d.width*100,value:100-v/d.height*100})}return Le(()=>a.value,()=>{s()}),jt(()=>{D0(n.vnode.el,{drag:u=>{l(u)},end:u=>{l(u)}}),s()}),{cursorTop:r,cursorLeft:o,background:i,colorValue:a,handleDrag:l,update:s,ns:e}}});function s$e(t,e,n,r,o,i){return N(),Z("div",{class:j(t.ns.b()),style:bt({backgroundColor:t.background})},[ee("div",{class:j(t.ns.e("white"))},null,2),ee("div",{class:j(t.ns.e("black"))},null,2),ee("div",{class:j(t.ns.e("cursor")),style:bt({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[ee("div")],6)],6)}var l$e=Ge(a$e,[["render",s$e],["__file","sv-panel.vue"]]);const u$e=de({name:"ElColorPicker"}),c$e=de({...u$e,props:t$e,emits:n$e,setup(t,{expose:e,emit:n}){const r=t,{t:o}=En(),i=je("color"),{formItem:a}=Xi(),s=$o(),l=Zi(),{valueOnClear:u,isEmptyValue:c}=Hb(r,null),{inputId:d,isLabeledByFormItem:f}=Bl(r,{formItemContext:a}),h=z(),g=z(),v=z(),m=z(),b=z(),w=z(),{isFocused:O,handleFocus:S,handleBlur:x}=qf(b,{disabled:l,beforeBlur(ue){var G;return(G=m.value)==null?void 0:G.isFocusInsideContent(ue)},afterBlur(){Q(!1),U()}});let C=!0;const E=pn(new Fw({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),T=z(!1),M=z(!1),k=z(""),P=$(()=>!r.modelValue&&!M.value?"transparent":I(E,r.showAlpha)),R=$(()=>!r.modelValue&&!M.value?"":E.value),D=$(()=>f.value?void 0:r.ariaLabel||o("el.colorpicker.defaultLabel")),F=$(()=>f.value?a==null?void 0:a.labelId:void 0),W=$(()=>[i.b("picker"),i.is("disabled",l.value),i.bm("picker",s.value),i.is("focused",O.value)]);function I(ue,G){const{r:ve,g:q,b:Ie,a:Ee}=ue.toRgb();return G?`rgba(${ve}, ${q}, ${Ie}, ${Ee})`:`rgb(${ve}, ${q}, ${Ie})`}function Q(ue){T.value=ue}const L=Hi(Q,100,{leading:!0});function H(){l.value||Q(!0)}function re(){L(!1),U()}function U(){wt(()=>{r.modelValue?E.fromString(r.modelValue):(E.value="",!R.value&&k.value&&(k.value=""),wt(()=>{M.value=!1}))})}function J(){l.value||(T.value&&U(),L(!T.value))}function ie(){E.fromString(k.value),E.value!==k.value&&(k.value=E.value)}function te(){const ue=c(E.value)?u.value:E.value;n(zt,ue),n(ln,ue),r.validateEvent&&(a==null||a.validate("change").catch(G=>void 0)),L(!1),wt(()=>{const G=new Fw({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});E.compare(G)||U()})}function he(){L(!1),n(zt,u.value),n(ln,u.value),r.modelValue!==u.value&&r.validateEvent&&(a==null||a.validate("change").catch(ue=>void 0)),U()}function K(){!T.value||(re(),O.value&&Ne())}function ne(ue){ue.preventDefault(),ue.stopPropagation(),Q(!1),U()}function fe(ue){switch(ue.code){case st.enter:case st.numpadEnter:case st.space:ue.preventDefault(),ue.stopPropagation(),H(),w.value.focus();break;case st.esc:ne(ue);break}}function Ne(){b.value.focus()}function $e(){b.value.blur()}return jt(()=>{r.modelValue&&(k.value=R.value)}),Le(()=>r.modelValue,ue=>{ue?ue&&ue!==E.value&&(C=!1,E.fromString(ue)):M.value=!1}),Le(()=>[r.colorFormat,r.showAlpha],()=>{E.enableAlpha=r.showAlpha,E.format=r.colorFormat||E.format,E.doOnChange(),n(zt,E.value)}),Le(()=>R.value,ue=>{k.value=ue,C&&n("activeChange",ue),C=!0}),Le(()=>E.value,()=>{!r.modelValue&&!M.value&&(M.value=!0)}),Le(()=>T.value,()=>{wt(()=>{var ue,G,ve;(ue=h.value)==null||ue.update(),(G=g.value)==null||G.update(),(ve=v.value)==null||ve.update()})}),mn(tU,{currentColor:R}),e({color:E,show:H,hide:re,focus:Ne,blur:$e}),(ue,G)=>(N(),me(p(Zo),{ref_key:"popper",ref:m,visible:T.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[p(i).be("picker","panel"),p(i).b("dropdown"),ue.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:ue.teleported,transition:`${p(i).namespace.value}-zoom-in-top`,persistent:ue.persistent,"append-to":ue.appendTo,onHide:ve=>Q(!1)},{content:V(()=>[Yt((N(),Z("div",{onKeydown:yr(ne,["esc"])},[ee("div",{class:j(p(i).be("dropdown","main-wrapper"))},[B(e$e,{ref_key:"hue",ref:h,class:"hue-slider",color:p(E),vertical:""},null,8,["color"]),B(l$e,{ref_key:"sv",ref:g,color:p(E)},null,8,["color"])],2),ue.showAlpha?(N(),me(qMe,{key:0,ref_key:"alpha",ref:v,color:p(E)},null,8,["color"])):ge("v-if",!0),ue.predefine?(N(),me(i$e,{key:1,ref:"predefine","enable-alpha":ue.showAlpha,color:p(E),colors:ue.predefine},null,8,["enable-alpha","color","colors"])):ge("v-if",!0),ee("div",{class:j(p(i).be("dropdown","btns"))},[ee("span",{class:j(p(i).be("dropdown","value"))},[B(p(ao),{ref_key:"inputRef",ref:w,modelValue:k.value,"onUpdate:modelValue":ve=>k.value=ve,"validate-event":!1,size:"small",onChange:ie},null,8,["modelValue","onUpdate:modelValue"])],2),B(p(Kn),{class:j(p(i).be("dropdown","link-btn")),text:"",size:"small",onClick:he},{default:V(()=>[We(ze(p(o)("el.colorpicker.clear")),1)]),_:1},8,["class"]),B(p(Kn),{plain:"",size:"small",class:j(p(i).be("dropdown","btn")),onClick:te},{default:V(()=>[We(ze(p(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[p(sd),K,b.value]])]),default:V(()=>[ee("div",rn({id:p(d),ref_key:"triggerRef",ref:b},ue.$attrs,{class:p(W),role:"button","aria-label":p(D),"aria-labelledby":p(F),"aria-description":p(o)("el.colorpicker.description",{color:ue.modelValue||""}),"aria-disabled":p(l),tabindex:p(l)?void 0:ue.tabindex,onKeydown:fe,onFocus:p(S),onBlur:p(x)}),[ee("div",{class:j(p(i).be("picker","trigger")),onClick:J},[ee("span",{class:j([p(i).be("picker","color"),p(i).is("alpha",ue.showAlpha)])},[ee("span",{class:j(p(i).be("picker","color-inner")),style:bt({backgroundColor:p(P)})},[Yt(B(p(Ot),{class:j([p(i).be("picker","icon"),p(i).is("icon-arrow-down")])},{default:V(()=>[B(p(wc))]),_:1},8,["class"]),[[Bn,ue.modelValue||M.value]]),Yt(B(p(Ot),{class:j([p(i).be("picker","empty"),p(i).is("icon-close")])},{default:V(()=>[B(p(fa))]),_:1},8,["class"]),[[Bn,!ue.modelValue&&!M.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","persistent","append-to","onHide"]))}});var d$e=Ge(c$e,[["__file","color-picker.vue"]]);const f$e=Wt(d$e),h$e=Ze({a11y:{type:Boolean,default:!0},locale:{type:we(Object)},size:Fo,button:{type:we(Object)},card:{type:we(Object)},dialog:{type:we(Object)},link:{type:we(Object)},experimentalFeatures:{type:we(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:we(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Dp}),Ts={},p$e=de({name:"ElConfigProvider",props:h$e,setup(t,{slots:e}){const n=w$(t);return Le(()=>t.message,r=>{var o,i;Object.assign(Ts,(i=(o=n==null?void 0:n.value)==null?void 0:o.message)!=null?i:{},r!=null?r:{})},{immediate:!0,deep:!0}),()=>ke(e,"default",{config:n==null?void 0:n.value})}}),nU=Wt(p$e),g$e=de({name:"ElContainer"}),v$e=de({...g$e,props:{direction:{type:String}},setup(t){const e=t,n=Ro(),r=je("container"),o=$(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(i,a)=>(N(),Z("section",{class:j([p(r).b(),p(r).is("vertical",p(o))])},[ke(i.$slots,"default")],2))}});var m$e=Ge(v$e,[["__file","container.vue"]]);const y$e=de({name:"ElAside"}),b$e=de({...y$e,props:{width:{type:String,default:null}},setup(t){const e=t,n=je("aside"),r=$(()=>e.width?n.cssVarBlock({width:e.width}):{});return(o,i)=>(N(),Z("aside",{class:j(p(n).b()),style:bt(p(r))},[ke(o.$slots,"default")],6))}});var rU=Ge(b$e,[["__file","aside.vue"]]);const _$e=de({name:"ElFooter"}),O$e=de({..._$e,props:{height:{type:String,default:null}},setup(t){const e=t,n=je("footer"),r=$(()=>e.height?n.cssVarBlock({height:e.height}):{});return(o,i)=>(N(),Z("footer",{class:j(p(n).b()),style:bt(p(r))},[ke(o.$slots,"default")],6))}});var oU=Ge(O$e,[["__file","footer.vue"]]);const w$e=de({name:"ElHeader"}),S$e=de({...w$e,props:{height:{type:String,default:null}},setup(t){const e=t,n=je("header"),r=$(()=>e.height?n.cssVarBlock({height:e.height}):{});return(o,i)=>(N(),Z("header",{class:j(p(n).b()),style:bt(p(r))},[ke(o.$slots,"default")],6))}});var iU=Ge(S$e,[["__file","header.vue"]]);const x$e=de({name:"ElMain"}),C$e=de({...x$e,setup(t){const e=je("main");return(n,r)=>(N(),Z("main",{class:j(p(e).b())},[ke(n.$slots,"default")],2))}});var aU=Ge(C$e,[["__file","main.vue"]]);const E$e=Wt(m$e,{Aside:rU,Footer:oU,Header:iU,Main:aU}),T$e=qr(rU),k$e=qr(oU),A$e=qr(iU),P$e=qr(aU);var sU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},u=function(m){return(m=+m)+(m>68?1900:2e3)},c=function(m){return function(b){this[m]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(m)}],f=function(m){var b=l[m];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(m,b){var w,O=l.meridiem;if(O){for(var S=1;S<=24;S+=1)if(m.indexOf(O(S,0,b))>-1){w=S>12;break}}else w=m===(b?"pm":"PM");return w},g={A:[s,function(m){this.afternoon=h(m,!1)}],a:[s,function(m){this.afternoon=h(m,!0)}],Q:[o,function(m){this.month=3*(m-1)+1}],S:[o,function(m){this.milliseconds=100*+m}],SS:[i,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[i,c("day")],Do:[s,function(m){var b=l.ordinal,w=m.match(/\d+/);if(this.day=w[0],b)for(var O=1;O<=31;O+=1)b(O).replace(/\[|\]/g,"")===m&&(this.day=O)}],w:[a,c("week")],ww:[i,c("week")],M:[a,c("month")],MM:[i,c("month")],MMM:[s,function(m){var b=f("months"),w=(f("monthsShort")||b.map(function(O){return O.slice(0,3)})).indexOf(m)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(m){var b=f("months").indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(m){this.year=u(m)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function v(m){var b,w;b=m,w=l&&l.formats;for(var O=(m=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,P,R){var D=R&&R.toUpperCase();return P||w[R]||n[R]||w[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,W,I){return W||I.slice(1)})})).match(r),S=O.length,x=0;x-1)return new Date((L==="X"?1e3:1)*Q);var U=v(L)(Q),J=U.year,ie=U.month,te=U.day,he=U.hours,K=U.minutes,ne=U.seconds,fe=U.milliseconds,Ne=U.zone,$e=U.week,ue=new Date,G=te||(J||ie?1:ue.getDate()),ve=J||ue.getFullYear(),q=0;J&&!ie||(q=ie>0?ie-1:ue.getMonth());var Ie,Ee=he||0,Oe=K||0,se=ne||0,X=fe||0;return Ne?new Date(Date.UTC(ve,q,G,Ee,Oe,se,X+60*Ne.offset*1e3)):H?new Date(Date.UTC(ve,q,G,Ee,Oe,se,X)):(Ie=new Date(ve,q,G,Ee,Oe,se,X),$e&&(Ie=re(Ie).week($e).toDate()),Ie)}catch{return new Date("")}}(C,M,E,w),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),R&&C!=this.format(M)&&(this.$d=new Date("")),l={}}else if(M instanceof Array)for(var F=M.length,W=1;W<=F;W+=1){T[1]=M[W-1];var I=w.apply(this,T);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}W===F&&(this.$d=new Date(""))}else S.call(this,x)}}})})(sU);var X$=sU.exports,lU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),c=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return i.bind(this)(c)}}})})(lU);var N$e=lU.exports,uU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){var n="week",r="year";return function(o,i,a){var s=i.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=a(this).startOf(r).add(1,r).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(uU);var M$e=uU.exports,cU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r){r.prototype.weekYear=function(){var o=this.month(),i=this.week(),a=this.year();return i===1&&o===11?a+1:o===0&&i>=52?a-1:a}}})})(cU);var $$e=cU.exports,dU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r,o){r.prototype.dayOfYear=function(i){var a=Math.round((o(this).startOf("day")-o(this).startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"day")}}})})(dU);var R$e=dU.exports,fU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r){r.prototype.isSameOrAfter=function(o,i){return this.isSame(o,i)||this.isAfter(o,i)}}})})(fU);var D$e=fU.exports,hU={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Io,function(){return function(n,r){r.prototype.isSameOrBefore=function(o,i){return this.isSame(o,i)||this.isBefore(o,i)}}})})(hU);var I$e=hU.exports;const D5=["hours","minutes","seconds"],Td="EP_PICKER_BASE",Z$="ElPopperOptions",Vw="HH:mm:ss",Sg="YYYY-MM-DD",L$e={date:Sg,dates:Sg,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${Sg} ${Vw}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:Sg,datetimerange:`${Sg} ${Vw}`},pU=Ze({disabledHours:{type:we(Function)},disabledMinutes:{type:we(Function)},disabledSeconds:{type:we(Function)}}),gU=Ze({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),G$=Ze({id:{type:we([Array,String])},name:{type:we([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:we([String,Object]),default:Cd},editable:{type:Boolean,default:!0},prefixIcon:{type:we([String,Object]),default:""},size:Fo,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},modelValue:{type:we([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:we([Date,Array])},defaultTime:{type:we([Date,Array])},isRange:Boolean,...pU,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:we([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:we(String),values:Ed,default:"bottom"},fallbackPlacements:{type:we(Array),default:["bottom","top","right","left"]},...Dp,...Yi(["ariaLabel"]),showNow:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),B$e=Ze({id:{type:we(Array)},name:{type:we(Array)},modelValue:{type:we([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),F$e=de({name:"PickerRangeTrigger",inheritAttrs:!1}),V$e=de({...F$e,props:B$e,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const r=t,o=yC(),i=je("date"),a=je("range"),s=z(),l=z(),{wrapperRef:u,isFocused:c}=qf(s,{disabled:$(()=>r.disabled)}),d=x=>{n("click",x)},f=x=>{n("mouseenter",x)},h=x=>{n("mouseleave",x)},g=x=>{n("touchstart",x)},v=x=>{n("startInput",x)},m=x=>{n("endInput",x)},b=x=>{n("startChange",x)},w=x=>{n("endChange",x)};return e({focus:()=>{var x;(x=s.value)==null||x.focus()},blur:()=>{var x,C;(x=s.value)==null||x.blur(),(C=l.value)==null||C.blur()}}),(x,C)=>(N(),Z("div",{ref_key:"wrapperRef",ref:u,class:j([p(i).is("active",p(c)),x.$attrs.class]),style:bt(x.$attrs.style),onClick:d,onMouseenter:f,onMouseleave:h,onTouchstartPassive:g},[ke(x.$slots,"prefix"),ee("input",rn(p(o),{id:x.id&&x.id[0],ref_key:"inputRef",ref:s,name:x.name&&x.name[0],placeholder:x.startPlaceholder,value:x.modelValue&&x.modelValue[0],class:p(a).b("input"),disabled:x.disabled,onInput:v,onChange:b}),null,16,["id","name","placeholder","value","disabled"]),ke(x.$slots,"range-separator"),ee("input",rn(p(o),{id:x.id&&x.id[1],ref_key:"endInputRef",ref:l,name:x.name&&x.name[1],placeholder:x.endPlaceholder,value:x.modelValue&&x.modelValue[1],class:p(a).b("input"),disabled:x.disabled,onInput:m,onChange:w}),null,16,["id","name","placeholder","value","disabled"]),ke(x.$slots,"suffix")],38))}});var z$e=Ge(V$e,[["__file","picker-range-trigger.vue"]]);const j$e=de({name:"Picker"}),W$e=de({...j$e,props:G$,emits:[zt,ln,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const r=t,o=vd(),{lang:i}=En(),a=je("date"),s=je("input"),l=je("range"),{form:u,formItem:c}=Xi(),d=gt(Z$,{}),{valueOnClear:f}=Hb(r,null),h=z(),g=z(),v=z(!1),m=z(!1),b=z(null);let w=!1;const O=$(()=>r.disabled||!!(u!=null&&u.disabled)),{isFocused:S,handleFocus:x,handleBlur:C}=qf(g,{disabled:O,beforeFocus(){return r.readonly},afterFocus(){v.value=!0},beforeBlur(pe){var Be;return!w&&((Be=h.value)==null?void 0:Be.isFocusInsideContent(pe))},afterBlur(){oe(),v.value=!1,w=!1,r.validateEvent&&(c==null||c.validate("blur").catch(pe=>void 0))}}),E=$(()=>[a.b("editor"),a.bm("editor",r.type),s.e("wrapper"),a.is("disabled",O.value),a.is("active",v.value),l.b("editor"),Ee?l.bm("editor",Ee.value):"",o.class]),T=$(()=>[s.e("icon"),l.e("close-icon"),fe.value?"":l.e("close-icon--hidden")]);Le(v,pe=>{pe?wt(()=>{pe&&(b.value=r.modelValue)}):(X.value=null,wt(()=>{M(r.modelValue)}))});const M=(pe,Be)=>{(Be||!w5(pe,b.value))&&(n(ln,pe),Be&&(b.value=pe),r.validateEvent&&(c==null||c.validate("change").catch(_t=>void 0)))},k=pe=>{if(!w5(r.modelValue,pe)){let Be;Ye(pe)?Be=pe.map(_t=>x5(_t,r.valueFormat,i.value)):pe&&(Be=x5(pe,r.valueFormat,i.value)),n(zt,pe&&Be,i.value)}},P=pe=>{n("keydown",pe)},R=$(()=>g.value?Array.from(g.value.$el.querySelectorAll("input")):[]),D=(pe,Be,_t)=>{const en=R.value;!en.length||(!_t||_t==="min"?(en[0].setSelectionRange(pe,Be),en[0].focus()):_t==="max"&&(en[1].setSelectionRange(pe,Be),en[1].focus()))},F=(pe="",Be=!1)=>{v.value=Be;let _t;Ye(pe)?_t=pe.map(en=>en.toDate()):_t=pe&&pe.toDate(),X.value=null,k(_t)},W=()=>{m.value=!0},I=()=>{n("visible-change",!0)},Q=()=>{m.value=!1,v.value=!1,n("visible-change",!1)},L=()=>{v.value=!0},H=()=>{v.value=!1},re=$(()=>{var pe;let Be;if($e.value?ht.value.getDefaultValue&&(Be=ht.value.getDefaultValue()):Ye(r.modelValue)?Be=r.modelValue.map(_t=>S5(_t,r.valueFormat,i.value)):Be=S5((pe=r.modelValue)!=null?pe:"",r.valueFormat,i.value),ht.value.getRangeAvailableTime){const _t=ht.value.getRangeAvailableTime(Be);Oo(_t,Be)||(Be=_t,$e.value||k(kO(Be)))}return Ye(Be)&&Be.some(_t=>!_t)&&(Be=[]),Be}),U=$(()=>{if(!ht.value.panelReady)return"";const pe=Ae(re.value);return Ye(X.value)?[X.value[0]||pe&&pe[0]||"",X.value[1]||pe&&pe[1]||""]:X.value!==null?X.value:!ie.value&&$e.value||!v.value&&$e.value?"":pe?te.value||he.value||K.value?pe.join(", "):pe:""}),J=$(()=>r.type.includes("time")),ie=$(()=>r.type.startsWith("time")),te=$(()=>r.type==="dates"),he=$(()=>r.type==="months"),K=$(()=>r.type==="years"),ne=$(()=>r.prefixIcon||(J.value?VQ:wEe)),fe=z(!1),Ne=pe=>{r.readonly||O.value||(fe.value&&(pe.stopPropagation(),ht.value.handleClear?ht.value.handleClear():k(f.value),M(f.value,!0),fe.value=!1,Q()),n("clear"))},$e=$(()=>{const{modelValue:pe}=r;return!pe||Ye(pe)&&!pe.filter(Boolean).length}),ue=async pe=>{var Be;r.readonly||O.value||(((Be=pe.target)==null?void 0:Be.tagName)!=="INPUT"||S.value)&&(v.value=!0)},G=()=>{r.readonly||O.value||!$e.value&&r.clearable&&(fe.value=!0)},ve=()=>{fe.value=!1},q=pe=>{var Be;r.readonly||O.value||(((Be=pe.touches[0].target)==null?void 0:Be.tagName)!=="INPUT"||S.value)&&(v.value=!0)},Ie=$(()=>r.type.includes("range")),Ee=$o(),Oe=$(()=>{var pe,Be;return(Be=(pe=p(h))==null?void 0:pe.popperRef)==null?void 0:Be.contentRef}),se=_$(g,pe=>{const Be=p(Oe),_t=pi(g);Be&&(pe.target===Be||pe.composedPath().includes(Be))||pe.target===_t||_t&&pe.composedPath().includes(_t)||(v.value=!1)});Yn(()=>{se==null||se()});const X=z(null),oe=()=>{if(X.value){const pe=ce(U.value);pe&&ye(pe)&&(k(kO(pe)),X.value=null)}X.value===""&&(k(f.value),M(f.value,!0),X.value=null)},ce=pe=>pe?ht.value.parseUserInput(pe):null,Ae=pe=>pe?ht.value.formatToString(pe):null,ye=pe=>ht.value.isValidValue(pe),Te=async pe=>{if(r.readonly||O.value)return;const{code:Be}=pe;if(P(pe),Be===st.esc){v.value===!0&&(v.value=!1,pe.preventDefault(),pe.stopPropagation());return}if(Be===st.down&&(ht.value.handleFocusPicker&&(pe.preventDefault(),pe.stopPropagation()),v.value===!1&&(v.value=!0,await wt()),ht.value.handleFocusPicker)){ht.value.handleFocusPicker();return}if(Be===st.tab){w=!0;return}if(Be===st.enter||Be===st.numpadEnter){(X.value===null||X.value===""||ye(ce(U.value)))&&(oe(),v.value=!1),pe.stopPropagation();return}if(X.value){pe.stopPropagation();return}ht.value.handleKeydownInput&&ht.value.handleKeydownInput(pe)},Me=pe=>{X.value=pe,v.value||(v.value=!0)},Fe=pe=>{const Be=pe.target;X.value?X.value=[Be.value,X.value[1]]:X.value=[Be.value,null]},at=pe=>{const Be=pe.target;X.value?X.value=[X.value[0],Be.value]:X.value=[null,Be.value]},nt=()=>{var pe;const Be=X.value,_t=ce(Be&&Be[0]),en=p(re);if(_t&&_t.isValid()){X.value=[Ae(_t),((pe=U.value)==null?void 0:pe[1])||null];const On=[_t,en&&(en[1]||null)];ye(On)&&(k(kO(On)),X.value=null)}},ct=()=>{var pe;const Be=p(X),_t=ce(Be&&Be[1]),en=p(re);if(_t&&_t.isValid()){X.value=[((pe=p(U))==null?void 0:pe[0])||null,Ae(_t)];const On=[en&&en[0],_t];ye(On)&&(k(kO(On)),X.value=null)}},ht=z({}),Je=pe=>{ht.value[pe[0]]=pe[1],ht.value.panelReady=!0},ft=pe=>{n("calendar-change",pe)},Mt=(pe,Be,_t)=>{n("panel-change",pe,Be,_t)},Pe=()=>{var pe;(pe=g.value)==null||pe.focus()},Ce=()=>{var pe;(pe=g.value)==null||pe.blur()};return mn(Td,{props:r}),e({focus:Pe,blur:Ce,handleOpen:L,handleClose:H,onPick:F}),(pe,Be)=>(N(),me(p(Zo),rn({ref_key:"refPopper",ref:h,visible:v.value,effect:"light",pure:"",trigger:"click"},pe.$attrs,{role:"dialog",teleported:"",transition:`${p(a).namespace.value}-zoom-in-top`,"popper-class":[`${p(a).namespace.value}-picker__popper`,pe.popperClass],"popper-options":p(d),"fallback-placements":pe.fallbackPlacements,"gpu-acceleration":!1,placement:pe.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:W,onShow:I,onHide:Q}),{default:V(()=>[p(Ie)?(N(),me(z$e,{key:1,id:pe.id,ref_key:"inputRef",ref:g,"model-value":p(U),name:pe.name,disabled:p(O),readonly:!pe.editable||pe.readonly,"start-placeholder":pe.startPlaceholder,"end-placeholder":pe.endPlaceholder,class:j(p(E)),style:bt(pe.$attrs.style),"aria-label":pe.ariaLabel,tabindex:pe.tabindex,autocomplete:"off",role:"combobox",onClick:ue,onFocus:p(x),onBlur:p(C),onStartInput:Fe,onStartChange:nt,onEndInput:at,onEndChange:ct,onMousedown:ue,onMouseenter:G,onMouseleave:ve,onTouchstartPassive:q,onKeydown:Te},{prefix:V(()=>[p(ne)?(N(),me(p(Ot),{key:0,class:j([p(s).e("icon"),p(l).e("icon")])},{default:V(()=>[(N(),me(Jt(p(ne))))]),_:1},8,["class"])):ge("v-if",!0)]),"range-separator":V(()=>[ke(pe.$slots,"range-separator",{},()=>[ee("span",{class:j(p(l).b("separator"))},ze(pe.rangeSeparator),3)])]),suffix:V(()=>[pe.clearIcon?(N(),me(p(Ot),{key:0,class:j(p(T)),onMousedown:Rt(p(or),["prevent"]),onClick:Ne},{default:V(()=>[(N(),me(Jt(pe.clearIcon)))]),_:1},8,["class","onMousedown"])):ge("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(N(),me(p(ao),{key:0,id:pe.id,ref_key:"inputRef",ref:g,"container-role":"combobox","model-value":p(U),name:pe.name,size:p(Ee),disabled:p(O),placeholder:pe.placeholder,class:j([p(a).b("editor"),p(a).bm("editor",pe.type),pe.$attrs.class]),style:bt(pe.$attrs.style),readonly:!pe.editable||pe.readonly||p(te)||p(he)||p(K)||pe.type==="week","aria-label":pe.ariaLabel,tabindex:pe.tabindex,"validate-event":!1,onInput:Me,onFocus:p(x),onBlur:p(C),onKeydown:Te,onChange:oe,onMousedown:ue,onMouseenter:G,onMouseleave:ve,onTouchstartPassive:q,onClick:Rt(()=>{},["stop"])},{prefix:V(()=>[p(ne)?(N(),me(p(Ot),{key:0,class:j(p(s).e("icon")),onMousedown:Rt(ue,["prevent"]),onTouchstartPassive:q},{default:V(()=>[(N(),me(Jt(p(ne))))]),_:1},8,["class","onMousedown"])):ge("v-if",!0)]),suffix:V(()=>[fe.value&&pe.clearIcon?(N(),me(p(Ot),{key:0,class:j(`${p(s).e("icon")} clear-icon`),onMousedown:Rt(p(or),["prevent"]),onClick:Ne},{default:V(()=>[(N(),me(Jt(pe.clearIcon)))]),_:1},8,["class","onMousedown"])):ge("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:V(()=>[ke(pe.$slots,"default",{visible:v.value,actualVisible:m.value,parsedValue:p(re),format:pe.format,dateFormat:pe.dateFormat,timeFormat:pe.timeFormat,unlinkPanels:pe.unlinkPanels,type:pe.type,defaultValue:pe.defaultValue,showNow:pe.showNow,showFooter:pe.showFooter,showWeekNumber:pe.showWeekNumber,onPick:F,onSelectRange:D,onSetPickerOption:Je,onCalendarChange:ft,onPanelChange:Mt,onMousedown:Rt(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var vU=Ge(W$e,[["__file","picker.vue"]]);const Q$e=Ze({...gU,datetimeRole:String,parsedValue:{type:we(Object)}}),mU=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const r=(a,s,l,u)=>{const c={hour:t,minute:e,second:n};let d=a;return["hour","minute","second"].forEach(f=>{if(c[f]){let h;const g=c[f];switch(f){case"minute":{h=g(d.hour(),s,u);break}case"second":{h=g(d.hour(),d.minute(),s,u);break}default:{h=g(s,u);break}}if((h==null?void 0:h.length)&&!h.includes(d[f]())){const v=l?0:h.length-1;d=d[f](h[v])}}}),d},o={};return{timePickerOptions:o,getAvailableTime:r,onSetOption:([a,s])=>{o[a]=s}}},a2=t=>{const e=(r,o)=>r||o,n=r=>r!==!0;return t.map(e).filter(n)},yU=(t,e,n)=>({getHoursList:(a,s)=>r2(24,t&&(()=>t==null?void 0:t(a,s))),getMinutesList:(a,s,l)=>r2(60,e&&(()=>e==null?void 0:e(a,s,l))),getSecondsList:(a,s,l,u)=>r2(60,n&&(()=>n==null?void 0:n(a,s,l,u)))}),bU=(t,e,n)=>{const{getHoursList:r,getMinutesList:o,getSecondsList:i}=yU(t,e,n);return{getAvailableHours:(u,c)=>a2(r(u,c)),getAvailableMinutes:(u,c,d)=>a2(o(u,c,d)),getAvailableSeconds:(u,c,d,f)=>a2(i(u,c,d,f))}},_U=t=>{const e=z(t.parsedValue);return Le(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},H$e=Ze({role:{type:String,required:!0},spinnerDate:{type:we(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:we(String),default:""},...pU}),U$e=100,Y$e=600,zw={beforeMount(t,e){const n=e.value,{interval:r=U$e,delay:o=Y$e}=kt(n)?{}:n;let i,a;const s=()=>kt(n)?n():n.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),i&&(clearInterval(i),i=void 0)};t.addEventListener("mousedown",u=>{u.button===0&&(l(),s(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{i=setInterval(()=>{s()},r)},o))})}},X$e=de({__name:"basic-time-spinner",props:H$e,emits:[ln,"select-range","set-option"],setup(t,{emit:e}){const n=t,r=gt(Td),{isRange:o,format:i}=r.props,a=je("time"),{getHoursList:s,getMinutesList:l,getSecondsList:u}=yU(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let c=!1;const d=z(),f=z(),h=z(),g=z(),v={hours:f,minutes:h,seconds:g},m=$(()=>n.showSeconds?D5:D5.slice(0,2)),b=$(()=>{const{spinnerDate:J}=n,ie=J.hour(),te=J.minute(),he=J.second();return{hours:ie,minutes:te,seconds:he}}),w=$(()=>{const{hours:J,minutes:ie}=p(b),{role:te,spinnerDate:he}=n,K=o?void 0:he;return{hours:s(te,K),minutes:l(J,te,K),seconds:u(J,ie,te,K)}}),O=$(()=>{const{hours:J,minutes:ie,seconds:te}=p(b);return{hours:n2(J,23),minutes:n2(ie,59),seconds:n2(te,59)}}),S=Hi(J=>{c=!1,E(J)},200),x=J=>{if(!!!n.amPmMode)return"";const te=n.amPmMode==="A";let he=J<12?" am":" pm";return te&&(he=he.toUpperCase()),he},C=J=>{let ie=[0,0];const te=i||Vw,he=te.indexOf("HH"),K=te.indexOf("mm"),ne=te.indexOf("ss");switch(J){case"hours":he!==-1&&(ie=[he,he+2]);break;case"minutes":K!==-1&&(ie=[K,K+2]);break;case"seconds":ne!==-1&&(ie=[ne,ne+2]);break}const[fe,Ne]=ie;e("select-range",fe,Ne),d.value=J},E=J=>{k(J,p(b)[J])},T=()=>{E("hours"),E("minutes"),E("seconds")},M=J=>J.querySelector(`.${a.namespace.value}-scrollbar__wrap`),k=(J,ie)=>{if(n.arrowControl)return;const te=p(v[J]);te&&te.$el&&(M(te.$el).scrollTop=Math.max(0,ie*P(J)))},P=J=>{const ie=p(v[J]),te=ie==null?void 0:ie.$el.querySelector("li");return te&&Number.parseFloat(Yc(te,"height"))||0},R=()=>{F(1)},D=()=>{F(-1)},F=J=>{d.value||C("hours");const ie=d.value,te=p(b)[ie],he=d.value==="hours"?24:60,K=W(ie,te,J,he);I(ie,K),k(ie,K),wt(()=>C(ie))},W=(J,ie,te,he)=>{let K=(ie+te+he)%he;const ne=p(w)[J];for(;ne[K]&&K!==ie;)K=(K+te+he)%he;return K},I=(J,ie)=>{if(p(w)[J][ie])return;const{hours:K,minutes:ne,seconds:fe}=p(b);let Ne;switch(J){case"hours":Ne=n.spinnerDate.hour(ie).minute(ne).second(fe);break;case"minutes":Ne=n.spinnerDate.hour(K).minute(ie).second(fe);break;case"seconds":Ne=n.spinnerDate.hour(K).minute(ne).second(ie);break}e(ln,Ne)},Q=(J,{value:ie,disabled:te})=>{te||(I(J,ie),C(J),k(J,ie))},L=J=>{const ie=p(v[J]);if(!ie)return;c=!0,S(J);const te=Math.min(Math.round((M(ie.$el).scrollTop-(H(J)*.5-10)/P(J)+3)/P(J)),J==="hours"?23:59);I(J,te)},H=J=>p(v[J]).$el.offsetHeight,re=()=>{const J=ie=>{const te=p(v[ie]);te&&te.$el&&(M(te.$el).onscroll=()=>{L(ie)})};J("hours"),J("minutes"),J("seconds")};jt(()=>{wt(()=>{!n.arrowControl&&re(),T(),n.role==="start"&&C("hours")})});const U=(J,ie)=>{v[ie].value=J!=null?J:void 0};return e("set-option",[`${n.role}_scrollDown`,F]),e("set-option",[`${n.role}_emitSelectRange`,C]),Le(()=>n.spinnerDate,()=>{c||T()}),(J,ie)=>(N(),Z("div",{class:j([p(a).b("spinner"),{"has-seconds":J.showSeconds}])},[J.arrowControl?ge("v-if",!0):(N(!0),Z(ut,{key:0},Xt(p(m),te=>(N(),me(p(Al),{key:te,ref_for:!0,ref:he=>U(he,te),class:j(p(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":p(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:he=>C(te),onMousemove:he=>E(te)},{default:V(()=>[(N(!0),Z(ut,null,Xt(p(w)[te],(he,K)=>(N(),Z("li",{key:K,class:j([p(a).be("spinner","item"),p(a).is("active",K===p(b)[te]),p(a).is("disabled",he)]),onClick:ne=>Q(te,{value:K,disabled:he})},[te==="hours"?(N(),Z(ut,{key:0},[We(ze(("0"+(J.amPmMode?K%12||12:K)).slice(-2))+ze(x(K)),1)],64)):(N(),Z(ut,{key:1},[We(ze(("0"+K).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),J.arrowControl?(N(!0),Z(ut,{key:1},Xt(p(m),te=>(N(),Z("div",{key:te,class:j([p(a).be("spinner","wrapper"),p(a).is("arrow")]),onMouseenter:he=>C(te)},[Yt((N(),me(p(Ot),{class:j(["arrow-up",p(a).be("spinner","arrow")])},{default:V(()=>[B(p(pC))]),_:1},8,["class"])),[[p(zw),D]]),Yt((N(),me(p(Ot),{class:j(["arrow-down",p(a).be("spinner","arrow")])},{default:V(()=>[B(p(wc))]),_:1},8,["class"])),[[p(zw),R]]),ee("ul",{class:j(p(a).be("spinner","list"))},[(N(!0),Z(ut,null,Xt(p(O)[te],(he,K)=>(N(),Z("li",{key:K,class:j([p(a).be("spinner","item"),p(a).is("active",he===p(b)[te]),p(a).is("disabled",p(w)[te][he])])},[p(Pt)(he)?(N(),Z(ut,{key:0},[te==="hours"?(N(),Z(ut,{key:0},[We(ze(("0"+(J.amPmMode?he%12||12:he)).slice(-2))+ze(x(he)),1)],64)):(N(),Z(ut,{key:1},[We(ze(("0"+he).slice(-2)),1)],64))],64)):ge("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):ge("v-if",!0)],2))}});var iA=Ge(X$e,[["__file","basic-time-spinner.vue"]]);const Z$e=de({__name:"panel-time-pick",props:Q$e,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=gt(Td),{arrowControl:o,disabledHours:i,disabledMinutes:a,disabledSeconds:s,defaultValue:l}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=bU(i,a,s),f=je("time"),{t:h,lang:g}=En(),v=z([0,2]),m=_U(n),b=$(()=>Sn(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),w=$(()=>n.format.includes("ss")),O=$(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=L=>{const H=Ht(L).locale(g.value),re=F(H);return H.isSame(re)},x=()=>{e("pick",m.value,!1)},C=(L=!1,H=!1)=>{H||e("pick",n.parsedValue,L)},E=L=>{if(!n.visible)return;const H=F(L).millisecond(0);e("pick",H,!0)},T=(L,H)=>{e("select-range",L,H),v.value=[L,H]},M=L=>{const H=n.format,re=H.indexOf("HH"),U=H.indexOf("mm"),J=H.indexOf("ss"),ie=[],te=[];re!==-1&&(ie.push(re),te.push("hours")),U!==-1&&(ie.push(U),te.push("minutes")),J!==-1&&w.value&&(ie.push(J),te.push("seconds"));const K=(ie.indexOf(v.value[0])+L+ie.length)%ie.length;P.start_emitSelectRange(te[K])},k=L=>{const H=L.code,{left:re,right:U,up:J,down:ie}=st;if([re,U].includes(H)){M(H===re?-1:1),L.preventDefault();return}if([J,ie].includes(H)){const te=H===J?-1:1;P.start_scrollDown(te),L.preventDefault();return}},{timePickerOptions:P,onSetOption:R,getAvailableTime:D}=mU({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),F=L=>D(L,n.datetimeRole||"",!0),W=L=>L?Ht(L,n.format).locale(g.value):null,I=L=>L?L.format(n.format):null,Q=()=>Ht(l).locale(g.value);return e("set-picker-option",["isValidValue",S]),e("set-picker-option",["formatToString",I]),e("set-picker-option",["parseUserInput",W]),e("set-picker-option",["handleKeydownInput",k]),e("set-picker-option",["getRangeAvailableTime",F]),e("set-picker-option",["getDefaultValue",Q]),(L,H)=>(N(),me(Xo,{name:p(b)},{default:V(()=>[L.actualVisible||L.visible?(N(),Z("div",{key:0,class:j(p(f).b("panel"))},[ee("div",{class:j([p(f).be("panel","content"),{"has-seconds":p(w)}])},[B(iA,{ref:"spinner",role:L.datetimeRole||"start","arrow-control":p(o),"show-seconds":p(w),"am-pm-mode":p(O),"spinner-date":L.parsedValue,"disabled-hours":p(i),"disabled-minutes":p(a),"disabled-seconds":p(s),onChange:E,onSetOption:p(R),onSelectRange:T},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),ee("div",{class:j(p(f).be("panel","footer"))},[ee("button",{type:"button",class:j([p(f).be("panel","btn"),"cancel"]),onClick:x},ze(p(h)("el.datepicker.cancel")),3),ee("button",{type:"button",class:j([p(f).be("panel","btn"),"confirm"]),onClick:re=>C()},ze(p(h)("el.datepicker.confirm")),11,["onClick"])],2)],2)):ge("v-if",!0)]),_:1},8,["name"]))}});var jw=Ge(Z$e,[["__file","panel-time-pick.vue"]]);const G$e=Ze({...gU,parsedValue:{type:we(Array)}}),q$e=de({__name:"panel-time-range",props:G$e,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=(ue,G)=>{const ve=[];for(let q=ue;q<=G;q++)ve.push(q);return ve},{t:o,lang:i}=En(),a=je("time"),s=je("picker"),l=gt(Td),{arrowControl:u,disabledHours:c,disabledMinutes:d,disabledSeconds:f,defaultValue:h}=l.props,g=$(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),v=$(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),m=$(()=>n.parsedValue[0]),b=$(()=>n.parsedValue[1]),w=_U(n),O=()=>{e("pick",w.value,!1)},S=$(()=>n.format.includes("ss")),x=$(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),C=(ue=!1)=>{e("pick",[m.value,b.value],ue)},E=ue=>{k(ue.millisecond(0),b.value)},T=ue=>{k(m.value,ue.millisecond(0))},M=ue=>{const G=ue.map(q=>Ht(q).locale(i.value)),ve=U(G);return G[0].isSame(ve[0])&&G[1].isSame(ve[1])},k=(ue,G)=>{!n.visible||e("pick",[ue,G],!0)},P=$(()=>m.value>b.value),R=z([0,2]),D=(ue,G)=>{e("select-range",ue,G,"min"),R.value=[ue,G]},F=$(()=>S.value?11:8),W=(ue,G)=>{e("select-range",ue,G,"max");const ve=p(F);R.value=[ue+ve,G+ve]},I=ue=>{const G=S.value?[0,3,6,11,14,17]:[0,3,8,11],ve=["hours","minutes"].concat(S.value?["seconds"]:[]),Ie=(G.indexOf(R.value[0])+ue+G.length)%G.length,Ee=G.length/2;Ie{const G=ue.code,{left:ve,right:q,up:Ie,down:Ee}=st;if([ve,q].includes(G)){I(G===ve?-1:1),ue.preventDefault();return}if([Ie,Ee].includes(G)){const Oe=G===Ie?-1:1,se=R.value[0]{const ve=c?c(ue):[],q=ue==="start",Ee=(G||(q?b.value:m.value)).hour(),Oe=q?r(Ee+1,23):r(0,Ee-1);return V1(ve,Oe)},H=(ue,G,ve)=>{const q=d?d(ue,G):[],Ie=G==="start",Ee=ve||(Ie?b.value:m.value),Oe=Ee.hour();if(ue!==Oe)return q;const se=Ee.minute(),X=Ie?r(se+1,59):r(0,se-1);return V1(q,X)},re=(ue,G,ve,q)=>{const Ie=f?f(ue,G,ve):[],Ee=ve==="start",Oe=q||(Ee?b.value:m.value),se=Oe.hour(),X=Oe.minute();if(ue!==se||G!==X)return Ie;const oe=Oe.second(),ce=Ee?r(oe+1,59):r(0,oe-1);return V1(Ie,ce)},U=([ue,G])=>[K(ue,"start",!0,G),K(G,"end",!1,ue)],{getAvailableHours:J,getAvailableMinutes:ie,getAvailableSeconds:te}=bU(L,H,re),{timePickerOptions:he,getAvailableTime:K,onSetOption:ne}=mU({getAvailableHours:J,getAvailableMinutes:ie,getAvailableSeconds:te}),fe=ue=>ue?Ye(ue)?ue.map(G=>Ht(G,n.format).locale(i.value)):Ht(ue,n.format).locale(i.value):null,Ne=ue=>ue?Ye(ue)?ue.map(G=>G.format(n.format)):ue.format(n.format):null,$e=()=>{if(Ye(h))return h.map(G=>Ht(G).locale(i.value));const ue=Ht(h).locale(i.value);return[ue,ue.add(60,"m")]};return e("set-picker-option",["formatToString",Ne]),e("set-picker-option",["parseUserInput",fe]),e("set-picker-option",["isValidValue",M]),e("set-picker-option",["handleKeydownInput",Q]),e("set-picker-option",["getDefaultValue",$e]),e("set-picker-option",["getRangeAvailableTime",U]),(ue,G)=>ue.actualVisible?(N(),Z("div",{key:0,class:j([p(a).b("range-picker"),p(s).b("panel")])},[ee("div",{class:j(p(a).be("range-picker","content"))},[ee("div",{class:j(p(a).be("range-picker","cell"))},[ee("div",{class:j(p(a).be("range-picker","header"))},ze(p(o)("el.datepicker.startTime")),3),ee("div",{class:j(p(g))},[B(iA,{ref:"minSpinner",role:"start","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(m),"disabled-hours":L,"disabled-minutes":H,"disabled-seconds":re,onChange:E,onSetOption:p(ne),onSelectRange:D},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),ee("div",{class:j(p(a).be("range-picker","cell"))},[ee("div",{class:j(p(a).be("range-picker","header"))},ze(p(o)("el.datepicker.endTime")),3),ee("div",{class:j(p(v))},[B(iA,{ref:"maxSpinner",role:"end","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(b),"disabled-hours":L,"disabled-minutes":H,"disabled-seconds":re,onChange:T,onSetOption:p(ne),onSelectRange:W},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),ee("div",{class:j(p(a).be("panel","footer"))},[ee("button",{type:"button",class:j([p(a).be("panel","btn"),"cancel"]),onClick:ve=>O()},ze(p(o)("el.datepicker.cancel")),11,["onClick"]),ee("button",{type:"button",class:j([p(a).be("panel","btn"),"confirm"]),disabled:p(P),onClick:ve=>C()},ze(p(o)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):ge("v-if",!0)}});var K$e=Ge(q$e,[["__file","panel-time-range.vue"]]);Ht.extend(X$);var J$e=de({name:"ElTimePicker",install:null,props:{...G$,isRange:Boolean},emits:[zt],setup(t,e){const n=z(),[r,o]=t.isRange?["timerange",K$e]:["time",jw],i=a=>e.emit(zt,a);return mn(Z$,t.popperOptions),e.expose({focus:()=>{var a;(a=n.value)==null||a.focus()},blur:()=>{var a;(a=n.value)==null||a.blur()},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const s=(a=t.format)!=null?a:Vw;return B(vU,rn(t,{ref:n,type:r,format:s,"onUpdate:modelValue":i}),{default:l=>B(o,l,null)})}}});const eRe=Wt(J$e),q$=Symbol(),Kb="ElIsDefaultFormat",tRe=Ze({...G$,type:{type:we(String),default:"date"}}),nRe=["date","dates","year","years","month","months","week","range"],K$=Ze({disabledDate:{type:we(Function)},date:{type:we(Object),required:!0},minDate:{type:we(Object)},maxDate:{type:we(Object)},parsedValue:{type:we([Object,Array])},rangeState:{type:we(Object),default:()=>({endDate:null,selecting:!1})}}),OU=Ze({type:{type:we(String),required:!0,values:MPe},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),J$=Ze({unlinkPanels:Boolean,visible:Boolean,showFooter:{type:Boolean,default:!0},parsedValue:{type:we(Array)}}),eR=t=>({type:String,values:nRe,default:t}),rRe=Ze({...OU,parsedValue:{type:we([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),I0=t=>{if(!Ye(t))return!1;const[e,n]=t;return Ht.isDayjs(e)&&Ht.isDayjs(n)&&Ht(e).isValid()&&Ht(n).isValid()&&e.isSameOrBefore(n)},EC=(t,{lang:e,step:n=1,unit:r,unlinkPanels:o})=>{let i;if(Ye(t)){let[a,s]=t.map(l=>Ht(l).locale(e));return o||(s=a.add(n,r)),[a,s]}else t?i=Ht(t):i=Ht();return i=i.locale(e),[i,i.add(n,r)]},oRe=(t,e,{columnIndexOffset:n,startDate:r,nextEndDate:o,now:i,unit:a,relativeDateGetter:s,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c{const o=Ht().locale(r).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second()),i=o.daysInMonth();return pf(i).map(a=>o.add(a,"day").toDate())},wv=(t,e,n,r,o)=>{const i=Ht().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),a=Ww(t,e,n,r).find(s=>!(o!=null&&o(s)));return a?Ht(a).locale(r):i.locale(r)},Qw=(t,e,n)=>{const r=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const o=t.month();if(!Ww(t,r,o,e).every(n))return wv(t,r,o,e,n);for(let i=0;i<12;i++)if(!Ww(t,r,i,e).every(n))return wv(t,r,i,e,n);return t},Sv=(t,e,n,r)=>{if(Ye(t))return t.map(o=>Sv(o,e,n,r));if(St(t)){const o=r.value?Ht(t):Ht(t,e);if(!o.isValid())return o}return Ht(t,e).locale(n)},iRe=Ze({...K$,cellClassName:{type:we(Function)},showWeekNumber:Boolean,selectionMode:eR("date")}),aRe=["changerange","pick","select"],aA=(t="")=>["normal","today"].includes(t),sRe=(t,e)=>{const{lang:n}=En(),r=z(),o=z(),i=z(),a=z(),s=z([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(H=>H.toLowerCase()),d=$(()=>u>3?7-u:-u),f=$(()=>{const H=t.date.startOf("month");return H.subtract(H.day()||7,"day")}),h=$(()=>c.concat(c).slice(u,u+7)),g=$(()=>kM(p(S)).some(H=>H.isCurrent)),v=$(()=>{const H=t.date.startOf("month"),re=H.day()||7,U=H.daysInMonth(),J=H.subtract(1,"month").daysInMonth();return{startOfMonthDay:re,dateCountOfMonth:U,dateCountOfLastMonth:J}}),m=$(()=>t.selectionMode==="dates"?ka(t.parsedValue):[]),b=(H,{count:re,rowIndex:U,columnIndex:J})=>{const{startOfMonthDay:ie,dateCountOfMonth:te,dateCountOfLastMonth:he}=p(v),K=p(d);if(U>=0&&U<=1){const ne=ie+K<0?7+ie+K:ie+K;if(J+U*7>=ne)return H.text=re,!0;H.text=he-(ne-J%7)+1+U*7,H.type="prev-month"}else return re<=te?H.text=re:(H.text=re-te,H.type="next-month"),!0;return!1},w=(H,{columnIndex:re,rowIndex:U},J)=>{const{disabledDate:ie,cellClassName:te}=t,he=p(m),K=b(H,{count:J,rowIndex:U,columnIndex:re}),ne=H.dayjs.toDate();return H.selected=he.find(fe=>fe.isSame(H.dayjs,"day")),H.isSelected=!!H.selected,H.isCurrent=C(H),H.disabled=ie==null?void 0:ie(ne),H.customClass=te==null?void 0:te(ne),K},O=H=>{if(t.selectionMode==="week"){const[re,U]=t.showWeekNumber?[1,7]:[0,6],J=L(H[re+1]);H[re].inRange=J,H[re].start=J,H[U].inRange=J,H[U].end=J}},S=$(()=>{const{minDate:H,maxDate:re,rangeState:U,showWeekNumber:J}=t,ie=p(d),te=p(s),he="day";let K=1;if(oRe({row:6,column:7},te,{startDate:H,columnIndexOffset:J?1:0,nextEndDate:U.endDate||re||U.selecting&&H||null,now:Ht().locale(p(n)).startOf(he),unit:he,relativeDateGetter:ne=>p(f).add(ne-ie,he),setCellMetadata:(...ne)=>{w(...ne,K)&&(K+=1)},setRowMetadata:O}),J)for(let ne=0;ne<6;ne++)te[ne][1].dayjs&&(te[ne][0]={type:"week",text:te[ne][1].dayjs.week()});return te});Le(()=>t.date,async()=>{var H;(H=p(r))!=null&&H.contains(document.activeElement)&&(await wt(),await x())});const x=async()=>{var H;return(H=p(o))==null?void 0:H.focus()},C=H=>t.selectionMode==="date"&&aA(H.type)&&E(H,t.parsedValue),E=(H,re)=>re?Ht(re).locale(p(n)).isSame(t.date.date(Number(H.text)),"day"):!1,T=(H,re)=>{const U=H*7+(re-(t.showWeekNumber?1:0))-p(d);return p(f).add(U,"day")},M=H=>{var re;if(!t.rangeState.selecting)return;let U=H.target;if(U.tagName==="SPAN"&&(U=(re=U.parentNode)==null?void 0:re.parentNode),U.tagName==="DIV"&&(U=U.parentNode),U.tagName!=="TD")return;const J=U.parentNode.rowIndex-1,ie=U.cellIndex;p(S)[J][ie].disabled||(J!==p(i)||ie!==p(a))&&(i.value=J,a.value=ie,e("changerange",{selecting:!0,endDate:T(J,ie)}))},k=H=>!p(g)&&(H==null?void 0:H.text)===1&&H.type==="normal"||H.isCurrent,P=H=>{l||p(g)||t.selectionMode!=="date"||Q(H,!0)},R=H=>{!H.target.closest("td")||(l=!0)},D=H=>{!H.target.closest("td")||(l=!1)},F=H=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:H,maxDate:null}),e("select",!0)):(H>=t.minDate?e("pick",{minDate:t.minDate,maxDate:H}):e("pick",{minDate:H,maxDate:t.minDate}),e("select",!1))},W=H=>{const re=H.week(),U=`${H.year()}w${re}`;e("pick",{year:H.year(),week:re,value:U,date:H.startOf("week")})},I=(H,re)=>{const U=re?ka(t.parsedValue).filter(J=>(J==null?void 0:J.valueOf())!==H.valueOf()):ka(t.parsedValue).concat([H]);e("pick",U)},Q=(H,re=!1)=>{const U=H.target.closest("td");if(!U)return;const J=U.parentNode.rowIndex-1,ie=U.cellIndex,te=p(S)[J][ie];if(te.disabled||te.type==="week")return;const he=T(J,ie);switch(t.selectionMode){case"range":{F(he);break}case"date":{e("pick",he,re);break}case"week":{W(he);break}case"dates":{I(he,!!te.selected);break}}},L=H=>{if(t.selectionMode!=="week")return!1;let re=t.date.startOf("day");if(H.type==="prev-month"&&(re=re.subtract(1,"month")),H.type==="next-month"&&(re=re.add(1,"month")),re=re.date(Number.parseInt(H.text,10)),t.parsedValue&&!Ye(t.parsedValue)){const U=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(U,"day").isSame(re,"day")}return!1};return{WEEKS:h,rows:S,tbodyRef:r,currentCellRef:o,focus:x,isCurrent:C,isWeekActive:L,isSelectedCell:k,handlePickDate:Q,handleMouseUp:D,handleMouseDown:R,handleMouseMove:M,handleFocus:P}},lRe=(t,{isCurrent:e,isWeekActive:n})=>{const r=je("date-table"),{t:o}=En(),i=$(()=>[r.b(),{"is-week-mode":t.selectionMode==="week"}]),a=$(()=>o("el.datepicker.dateTablePrompt")),s=u=>{const c=[];return aA(u.type)&&!u.disabled?(c.push("available"),u.type==="today"&&c.push("today")):c.push(u.type),e(u)&&c.push("current"),u.inRange&&(aA(u.type)||t.selectionMode==="week")&&(c.push("in-range"),u.start&&c.push("start-date"),u.end&&c.push("end-date")),u.disabled&&c.push("disabled"),u.selected&&c.push("selected"),u.customClass&&c.push(u.customClass),c.join(" ")},l=u=>[r.e("row"),{current:n(u)}];return{tableKls:i,tableLabel:a,weekHeaderClass:r.e("week-header"),getCellClasses:s,getRowKls:l,t:o}},uRe=Ze({cell:{type:we(Object)}});var tR=de({name:"ElDatePickerCell",props:uRe,setup(t){const e=je("date-table-cell"),{slots:n}=gt(q$);return()=>{const{cell:r}=t;return ke(n,"default",{...r},()=>{var o;return[B("div",{class:e.b()},[B("span",{class:e.e("text")},[(o=r==null?void 0:r.renderText)!=null?o:r==null?void 0:r.text])])]})}}});const cRe=de({__name:"basic-date-table",props:iRe,emits:aRe,setup(t,{expose:e,emit:n}){const r=t,{WEEKS:o,rows:i,tbodyRef:a,currentCellRef:s,focus:l,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:h,handleMouseDown:g,handleMouseMove:v,handleFocus:m}=sRe(r,n),{tableLabel:b,tableKls:w,getCellClasses:O,getRowKls:S,weekHeaderClass:x,t:C}=lRe(r,{isCurrent:u,isWeekActive:c});let E=!1;return Yn(()=>{E=!0}),e({focus:l}),(T,M)=>(N(),Z("table",{"aria-label":p(b),class:j(p(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:p(f),onMousemove:p(v),onMousedown:p(g),onMouseup:p(h)},[ee("tbody",{ref_key:"tbodyRef",ref:a},[ee("tr",null,[T.showWeekNumber?(N(),Z("th",{key:0,scope:"col",class:j(p(x))},null,2)):ge("v-if",!0),(N(!0),Z(ut,null,Xt(p(o),(k,P)=>(N(),Z("th",{key:P,"aria-label":p(C)("el.datepicker.weeksFull."+k),scope:"col"},ze(p(C)("el.datepicker.weeks."+k)),9,["aria-label"]))),128))]),(N(!0),Z(ut,null,Xt(p(i),(k,P)=>(N(),Z("tr",{key:P,class:j(p(S)(k[1]))},[(N(!0),Z(ut,null,Xt(k,(R,D)=>(N(),Z("td",{key:`${P}.${D}`,ref_for:!0,ref:F=>!p(E)&&p(d)(R)&&(s.value=F),class:j(p(O)(R)),"aria-current":R.isCurrent?"date":void 0,"aria-selected":R.isCurrent,tabindex:p(d)(R)?0:-1,onFocus:p(m)},[B(p(tR),{cell:R},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var sA=Ge(cRe,[["__file","basic-date-table.vue"]]);const dRe=Ze({...K$,selectionMode:eR("month")}),fRe=de({__name:"basic-month-table",props:dRe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,o=je("month-table"),{t:i,lang:a}=En(),s=z(),l=z(),u=z(r.date.locale("en").localeData().monthsShort().map(O=>O.toLowerCase())),c=z([[],[],[]]),d=z(),f=z(),h=$(()=>{var O,S;const x=c.value,C=Ht().locale(a.value).startOf("month");for(let E=0;E<3;E++){const T=x[E];for(let M=0;M<4;M++){const k=T[M]||(T[M]={row:E,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});k.type="normal";const P=E*4+M,R=r.date.startOf("year").month(P),D=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;k.inRange=!!(r.minDate&&R.isSameOrAfter(r.minDate,"month")&&D&&R.isSameOrBefore(D,"month"))||!!(r.minDate&&R.isSameOrBefore(r.minDate,"month")&&D&&R.isSameOrAfter(D,"month")),(O=r.minDate)!=null&&O.isSameOrAfter(D)?(k.start=!!(D&&R.isSame(D,"month")),k.end=r.minDate&&R.isSame(r.minDate,"month")):(k.start=!!(r.minDate&&R.isSame(r.minDate,"month")),k.end=!!(D&&R.isSame(D,"month"))),C.isSame(R)&&(k.type="today"),k.text=P,k.disabled=((S=r.disabledDate)==null?void 0:S.call(r,R.toDate()))||!1}}return x}),g=()=>{var O;(O=l.value)==null||O.focus()},v=O=>{const S={},x=r.date.year(),C=new Date,E=O.text;return S.disabled=r.disabledDate?Ww(r.date,x,E,a.value).every(r.disabledDate):!1,S.current=ka(r.parsedValue).findIndex(T=>Ht.isDayjs(T)&&T.year()===x&&T.month()===E)>=0,S.today=C.getFullYear()===x&&C.getMonth()===E,O.inRange&&(S["in-range"]=!0,O.start&&(S["start-date"]=!0),O.end&&(S["end-date"]=!0)),S},m=O=>{const S=r.date.year(),x=O.text;return ka(r.date).findIndex(C=>C.year()===S&&C.month()===x)>=0},b=O=>{var S;if(!r.rangeState.selecting)return;let x=O.target;if(x.tagName==="SPAN"&&(x=(S=x.parentNode)==null?void 0:S.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const C=x.parentNode.rowIndex,E=x.cellIndex;h.value[C][E].disabled||(C!==d.value||E!==f.value)&&(d.value=C,f.value=E,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(C*4+E)}))},w=O=>{var S;const x=(S=O.target)==null?void 0:S.closest("td");if((x==null?void 0:x.tagName)!=="TD"||Ka(x,"disabled"))return;const C=x.cellIndex,T=x.parentNode.rowIndex*4+C,M=r.date.startOf("year").month(T);if(r.selectionMode==="months"){if(O.type==="keydown"){n("pick",ka(r.parsedValue),!1);return}const k=wv(r.date,r.date.year(),T,a.value,r.disabledDate),P=Ka(x,"current")?ka(r.parsedValue).filter(R=>(R==null?void 0:R.year())!==k.year()||(R==null?void 0:R.month())!==k.month()):ka(r.parsedValue).concat([Ht(k)]);n("pick",P)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&M>=r.minDate?n("pick",{minDate:r.minDate,maxDate:M}):n("pick",{minDate:M,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:M,maxDate:null}),n("select",!0)):n("pick",T)};return Le(()=>r.date,async()=>{var O,S;(O=s.value)!=null&&O.contains(document.activeElement)&&(await wt(),(S=l.value)==null||S.focus())}),e({focus:g}),(O,S)=>(N(),Z("table",{role:"grid","aria-label":p(i)("el.datepicker.monthTablePrompt"),class:j(p(o).b()),onClick:w,onMousemove:b},[ee("tbody",{ref_key:"tbodyRef",ref:s},[(N(!0),Z(ut,null,Xt(p(h),(x,C)=>(N(),Z("tr",{key:C},[(N(!0),Z(ut,null,Xt(x,(E,T)=>(N(),Z("td",{key:T,ref_for:!0,ref:M=>m(E)&&(l.value=M),class:j(v(E)),"aria-selected":`${m(E)}`,"aria-label":p(i)(`el.datepicker.month${+E.text+1}`),tabindex:m(E)?0:-1,onKeydown:[yr(Rt(w,["prevent","stop"]),["space"]),yr(Rt(w,["prevent","stop"]),["enter"])]},[B(p(tR),{cell:{...E,renderText:p(i)("el.datepicker.months."+u.value[E.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var L0=Ge(fRe,[["__file","basic-month-table.vue"]]);const hRe=Ze({...K$,selectionMode:eR("year")}),pRe=de({__name:"basic-year-table",props:hRe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,o=(S,x)=>{const C=Ht(String(S)).locale(x).startOf("year"),T=C.endOf("year").dayOfYear();return pf(T).map(M=>C.add(M,"day").toDate())},i=je("year-table"),{t:a,lang:s}=En(),l=z(),u=z(),c=$(()=>Math.floor(r.date.year()/10)*10),d=z([[],[],[]]),f=z(),h=z(),g=$(()=>{var S;const x=d.value,C=Ht().locale(s.value).startOf("year");for(let E=0;E<3;E++){const T=x[E];for(let M=0;M<4&&!(E*4+M>=10);M++){let k=T[M];k||(k={row:E,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),k.type="normal";const P=E*4+M+c.value,R=Ht().year(P),D=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;k.inRange=!!(r.minDate&&R.isSameOrAfter(r.minDate,"year")&&D&&R.isSameOrBefore(D,"year"))||!!(r.minDate&&R.isSameOrBefore(r.minDate,"year")&&D&&R.isSameOrAfter(D,"year")),(S=r.minDate)!=null&&S.isSameOrAfter(D)?(k.start=!!(D&&R.isSame(D,"year")),k.end=!!(r.minDate&&R.isSame(r.minDate,"year"))):(k.start=!!(r.minDate&&R.isSame(r.minDate,"year")),k.end=!!(D&&R.isSame(D,"year"))),C.isSame(R)&&(k.type="today"),k.text=P;const W=R.toDate();k.disabled=r.disabledDate&&r.disabledDate(W)||!1,T[M]=k}}return x}),v=()=>{var S;(S=u.value)==null||S.focus()},m=S=>{const x={},C=Ht().locale(s.value),E=S.text;return x.disabled=r.disabledDate?o(E,s.value).every(r.disabledDate):!1,x.today=C.year()===E,x.current=ka(r.parsedValue).findIndex(T=>T.year()===E)>=0,S.inRange&&(x["in-range"]=!0,S.start&&(x["start-date"]=!0),S.end&&(x["end-date"]=!0)),x},b=S=>{const x=S.text;return ka(r.date).findIndex(C=>C.year()===x)>=0},w=S=>{var x;const C=(x=S.target)==null?void 0:x.closest("td");if(!C||!C.textContent||Ka(C,"disabled"))return;const E=C.cellIndex,M=C.parentNode.rowIndex*4+E+c.value,k=Ht().year(M);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&k>=r.minDate?n("pick",{minDate:r.minDate,maxDate:k}):n("pick",{minDate:k,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:k,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(S.type==="keydown"){n("pick",ka(r.parsedValue),!1);return}const P=Qw(k.startOf("year"),s.value,r.disabledDate),R=Ka(C,"current")?ka(r.parsedValue).filter(D=>(D==null?void 0:D.year())!==M):ka(r.parsedValue).concat([P]);n("pick",R)}else n("pick",M)},O=S=>{var x;if(!r.rangeState.selecting)return;const C=(x=S.target)==null?void 0:x.closest("td");if(!C)return;const E=C.parentNode.rowIndex,T=C.cellIndex;g.value[E][T].disabled||(E!==f.value||T!==h.value)&&(f.value=E,h.value=T,n("changerange",{selecting:!0,endDate:Ht().year(c.value).add(E*4+T,"year")}))};return Le(()=>r.date,async()=>{var S,x;(S=l.value)!=null&&S.contains(document.activeElement)&&(await wt(),(x=u.value)==null||x.focus())}),e({focus:v}),(S,x)=>(N(),Z("table",{role:"grid","aria-label":p(a)("el.datepicker.yearTablePrompt"),class:j(p(i).b()),onClick:w,onMousemove:O},[ee("tbody",{ref_key:"tbodyRef",ref:l},[(N(!0),Z(ut,null,Xt(p(g),(C,E)=>(N(),Z("tr",{key:E},[(N(!0),Z(ut,null,Xt(C,(T,M)=>(N(),Z("td",{key:`${E}_${M}`,ref_for:!0,ref:k=>b(T)&&(u.value=k),class:j(["available",m(T)]),"aria-selected":b(T),"aria-label":String(T.text),tabindex:b(T)?0:-1,onKeydown:[yr(Rt(w,["prevent","stop"]),["space"]),yr(Rt(w,["prevent","stop"]),["enter"])]},[B(p(tR),{cell:T},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var B0=Ge(pRe,[["__file","basic-year-table.vue"]]);const gRe=de({__name:"panel-date-pick",props:rRe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,r=(Pe,Ce,pe)=>!0,o=je("picker-panel"),i=je("date-picker"),a=vd(),s=Ro(),{t:l,lang:u}=En(),c=gt(Td),d=gt(Kb),f=gt(OC),{shortcuts:h,disabledDate:g,cellClassName:v,defaultTime:m}=c.props,b=jn(c.props,"defaultValue"),w=z(),O=z(Ht().locale(u.value)),S=z(!1);let x=!1;const C=$(()=>Ht(m).locale(u.value)),E=$(()=>O.value.month()),T=$(()=>O.value.year()),M=z([]),k=z(null),P=z(null),R=Pe=>M.value.length>0?r(Pe,M.value,n.format||"HH:mm:ss"):!0,D=Pe=>m&&!Ee.value&&!S.value&&!x?C.value.year(Pe.year()).month(Pe.month()).date(Pe.date()):fe.value?Pe.millisecond(0):Pe.startOf("day"),F=(Pe,...Ce)=>{if(!Pe)e("pick",Pe,...Ce);else if(Ye(Pe)){const pe=Pe.map(D);e("pick",pe,...Ce)}else e("pick",D(Pe),...Ce);k.value=null,P.value=null,S.value=!1,x=!1},W=async(Pe,Ce)=>{if(U.value==="date"){Pe=Pe;let pe=n.parsedValue?n.parsedValue.year(Pe.year()).month(Pe.month()).date(Pe.date()):Pe;R(pe)||(pe=M.value[0][0].year(Pe.year()).month(Pe.month()).date(Pe.date())),O.value=pe,F(pe,fe.value||Ce)}else U.value==="week"?F(Pe.date):U.value==="dates"&&F(Pe,!0)},I=Pe=>{const Ce=Pe?"add":"subtract";O.value=O.value[Ce](1,"month"),Mt("month")},Q=Pe=>{const Ce=O.value,pe=Pe?"add":"subtract";O.value=L.value==="year"?Ce[pe](10,"year"):Ce[pe](1,"year"),Mt("year")},L=z("date"),H=$(()=>{const Pe=l("el.datepicker.year");if(L.value==="year"){const Ce=Math.floor(T.value/10)*10;return Pe?`${Ce} ${Pe} - ${Ce+9} ${Pe}`:`${Ce} - ${Ce+9}`}return`${T.value} ${Pe}`}),re=Pe=>{const Ce=kt(Pe.value)?Pe.value():Pe.value;if(Ce){x=!0,F(Ht(Ce).locale(u.value));return}Pe.onClick&&Pe.onClick({attrs:a,slots:s,emit:e})},U=$(()=>{const{type:Pe}=n;return["week","month","months","year","years","dates"].includes(Pe)?Pe:"date"}),J=$(()=>U.value==="dates"||U.value==="months"||U.value==="years"),ie=$(()=>U.value==="date"?L.value:U.value),te=$(()=>!!h.length),he=async(Pe,Ce)=>{U.value==="month"?(O.value=wv(O.value,O.value.year(),Pe,u.value,g),F(O.value,!1)):U.value==="months"?F(Pe,Ce!=null?Ce:!0):(O.value=wv(O.value,O.value.year(),Pe,u.value,g),L.value="date",["month","year","date","week"].includes(U.value)&&(F(O.value,!0),await wt(),ct())),Mt("month")},K=async(Pe,Ce)=>{if(U.value==="year"){const pe=O.value.startOf("year").year(Pe);O.value=Qw(pe,u.value,g),F(O.value,!1)}else if(U.value==="years")F(Pe,Ce!=null?Ce:!0);else{const pe=O.value.year(Pe);O.value=Qw(pe,u.value,g),L.value="month",["month","year","date","week"].includes(U.value)&&(F(O.value,!0),await wt(),ct())}Mt("year")},ne=async Pe=>{L.value=Pe,await wt(),ct()},fe=$(()=>n.type==="datetime"||n.type==="datetimerange"),Ne=$(()=>{const Pe=fe.value||U.value==="dates",Ce=U.value==="years",pe=U.value==="months",Be=L.value==="date",_t=L.value==="year",en=L.value==="month";return Pe&&Be||Ce&&_t||pe&&en}),$e=$(()=>g?n.parsedValue?Ye(n.parsedValue)?g(n.parsedValue[0].toDate()):g(n.parsedValue.toDate()):!0:!1),ue=()=>{if(J.value)F(n.parsedValue);else{let Pe=n.parsedValue;if(!Pe){const Ce=Ht(m).locale(u.value),pe=nt();Pe=Ce.year(pe.year()).month(pe.month()).date(pe.date())}O.value=Pe,F(Pe)}},G=$(()=>g?g(Ht().locale(u.value).toDate()):!1),ve=()=>{const Ce=Ht().locale(u.value).toDate();S.value=!0,(!g||!g(Ce))&&R(Ce)&&(O.value=Ht().locale(u.value),F(O.value))},q=$(()=>n.timeFormat||NH(n.format)),Ie=$(()=>n.dateFormat||PH(n.format)),Ee=$(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!b.value))return(n.parsedValue||O.value).format(q.value)}),Oe=$(()=>{if(k.value)return k.value;if(!(!n.parsedValue&&!b.value))return(n.parsedValue||O.value).format(Ie.value)}),se=z(!1),X=()=>{se.value=!0},oe=()=>{se.value=!1},ce=Pe=>({hour:Pe.hour(),minute:Pe.minute(),second:Pe.second(),year:Pe.year(),month:Pe.month(),date:Pe.date()}),Ae=(Pe,Ce,pe)=>{const{hour:Be,minute:_t,second:en}=ce(Pe),On=n.parsedValue?n.parsedValue.hour(Be).minute(_t).second(en):Pe;O.value=On,F(O.value,!0),pe||(se.value=Ce)},ye=Pe=>{const Ce=Ht(Pe,q.value).locale(u.value);if(Ce.isValid()&&R(Ce)){const{year:pe,month:Be,date:_t}=ce(O.value);O.value=Ce.year(pe).month(Be).date(_t),P.value=null,se.value=!1,F(O.value,!0)}},Te=Pe=>{const Ce=Sv(Pe,Ie.value,u.value,d);if(Ce.isValid()){if(g&&g(Ce.toDate()))return;const{hour:pe,minute:Be,second:_t}=ce(O.value);O.value=Ce.hour(pe).minute(Be).second(_t),k.value=null,F(O.value,!0)}},Me=Pe=>Ht.isDayjs(Pe)&&Pe.isValid()&&(g?!g(Pe.toDate()):!0),Fe=Pe=>Ye(Pe)?Pe.map(Ce=>Ce.format(n.format)):Pe.format(n.format),at=Pe=>Sv(Pe,n.format,u.value,d),nt=()=>{const Pe=Ht(b.value).locale(u.value);if(!b.value){const Ce=C.value;return Ht().hour(Ce.hour()).minute(Ce.minute()).second(Ce.second()).locale(u.value)}return Pe},ct=()=>{var Pe;["week","month","year","date"].includes(U.value)&&((Pe=w.value)==null||Pe.focus())},ht=()=>{ct(),U.value==="week"&&ft(st.down)},Je=Pe=>{const{code:Ce}=Pe;[st.up,st.down,st.left,st.right,st.home,st.end,st.pageUp,st.pageDown].includes(Ce)&&(ft(Ce),Pe.stopPropagation(),Pe.preventDefault()),[st.enter,st.space,st.numpadEnter].includes(Ce)&&k.value===null&&P.value===null&&(Pe.preventDefault(),F(O.value,!1))},ft=Pe=>{var Ce;const{up:pe,down:Be,left:_t,right:en,home:On,end:yn,pageUp:dr,pageDown:to}=st,Kr={year:{[pe]:-4,[Be]:4,[_t]:-1,[en]:1,offset:(vt,dt)=>vt.setFullYear(vt.getFullYear()+dt)},month:{[pe]:-4,[Be]:4,[_t]:-1,[en]:1,offset:(vt,dt)=>vt.setMonth(vt.getMonth()+dt)},week:{[pe]:-1,[Be]:1,[_t]:-1,[en]:1,offset:(vt,dt)=>vt.setDate(vt.getDate()+dt*7)},date:{[pe]:-7,[Be]:7,[_t]:-1,[en]:1,[On]:vt=>-vt.getDay(),[yn]:vt=>-vt.getDay()+6,[dr]:vt=>-new Date(vt.getFullYear(),vt.getMonth(),0).getDate(),[to]:vt=>new Date(vt.getFullYear(),vt.getMonth()+1,0).getDate(),offset:(vt,dt)=>vt.setDate(vt.getDate()+dt)}},qe=O.value.toDate();for(;Math.abs(O.value.diff(qe,"year",!0))<1;){const vt=Kr[ie.value];if(!vt)return;if(vt.offset(qe,kt(vt[Pe])?vt[Pe](qe):(Ce=vt[Pe])!=null?Ce:0),g&&g(qe))break;const dt=Ht(qe).locale(u.value);O.value=dt,e("pick",dt,!0);break}},Mt=Pe=>{e("panel-change",O.value.toDate(),Pe,L.value)};return Le(()=>U.value,Pe=>{if(["month","year"].includes(Pe)){L.value=Pe;return}else if(Pe==="years"){L.value="year";return}else if(Pe==="months"){L.value="month";return}L.value="date"},{immediate:!0}),Le(()=>L.value,()=>{f==null||f.updatePopper()}),Le(()=>b.value,Pe=>{Pe&&(O.value=nt())},{immediate:!0}),Le(()=>n.parsedValue,Pe=>{if(Pe){if(J.value||Ye(Pe))return;O.value=Pe}else O.value=nt()},{immediate:!0}),e("set-picker-option",["isValidValue",Me]),e("set-picker-option",["formatToString",Fe]),e("set-picker-option",["parseUserInput",at]),e("set-picker-option",["handleFocusPicker",ht]),(Pe,Ce)=>(N(),Z("div",{class:j([p(o).b(),p(i).b(),{"has-sidebar":Pe.$slots.sidebar||p(te),"has-time":p(fe)}])},[ee("div",{class:j(p(o).e("body-wrapper"))},[ke(Pe.$slots,"sidebar",{class:j(p(o).e("sidebar"))}),p(te)?(N(),Z("div",{key:0,class:j(p(o).e("sidebar"))},[(N(!0),Z(ut,null,Xt(p(h),(pe,Be)=>(N(),Z("button",{key:Be,type:"button",class:j(p(o).e("shortcut")),onClick:_t=>re(pe)},ze(pe.text),11,["onClick"]))),128))],2)):ge("v-if",!0),ee("div",{class:j(p(o).e("body"))},[p(fe)?(N(),Z("div",{key:0,class:j(p(i).e("time-header"))},[ee("span",{class:j(p(i).e("editor-wrap"))},[B(p(ao),{placeholder:p(l)("el.datepicker.selectDate"),"model-value":p(Oe),size:"small","validate-event":!1,onInput:pe=>k.value=pe,onChange:Te},null,8,["placeholder","model-value","onInput"])],2),Yt((N(),Z("span",{class:j(p(i).e("editor-wrap"))},[B(p(ao),{placeholder:p(l)("el.datepicker.selectTime"),"model-value":p(Ee),size:"small","validate-event":!1,onFocus:X,onInput:pe=>P.value=pe,onChange:ye},null,8,["placeholder","model-value","onInput"]),B(p(jw),{visible:se.value,format:p(q),"parsed-value":O.value,onPick:Ae},null,8,["visible","format","parsed-value"])],2)),[[p(sd),oe]])],2)):ge("v-if",!0),Yt(ee("div",{class:j([p(i).e("header"),(L.value==="year"||L.value==="month")&&p(i).e("header--bordered")])},[ee("span",{class:j(p(i).e("prev-btn"))},[ee("button",{type:"button","aria-label":p(l)("el.datepicker.prevYear"),class:j(["d-arrow-left",p(o).e("icon-btn")]),onClick:pe=>Q(!1)},[ke(Pe.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["aria-label","onClick"]),Yt(ee("button",{type:"button","aria-label":p(l)("el.datepicker.prevMonth"),class:j([p(o).e("icon-btn"),"arrow-left"]),onClick:pe=>I(!1)},[ke(Pe.$slots,"prev-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1})])],10,["aria-label","onClick"]),[[Bn,L.value==="date"]])],2),ee("span",{role:"button",class:j(p(i).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:yr(pe=>ne("year"),["enter"]),onClick:pe=>ne("year")},ze(p(H)),43,["onKeydown","onClick"]),Yt(ee("span",{role:"button","aria-live":"polite",tabindex:"0",class:j([p(i).e("header-label"),{active:L.value==="month"}]),onKeydown:yr(pe=>ne("month"),["enter"]),onClick:pe=>ne("month")},ze(p(l)(`el.datepicker.month${p(E)+1}`)),43,["onKeydown","onClick"]),[[Bn,L.value==="date"]]),ee("span",{class:j(p(i).e("next-btn"))},[Yt(ee("button",{type:"button","aria-label":p(l)("el.datepicker.nextMonth"),class:j([p(o).e("icon-btn"),"arrow-right"]),onClick:pe=>I(!0)},[ke(Pe.$slots,"next-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})])],10,["aria-label","onClick"]),[[Bn,L.value==="date"]]),ee("button",{type:"button","aria-label":p(l)("el.datepicker.nextYear"),class:j([p(o).e("icon-btn"),"d-arrow-right"]),onClick:pe=>Q(!0)},[ke(Pe.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[Bn,L.value!=="time"]]),ee("div",{class:j(p(o).e("content")),onKeydown:Je},[L.value==="date"?(N(),me(sA,{key:0,ref_key:"currentViewRef",ref:w,"selection-mode":p(U),date:O.value,"parsed-value":Pe.parsedValue,"disabled-date":p(g),"cell-class-name":p(v),"show-week-number":Pe.showWeekNumber,onPick:W},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name","show-week-number"])):ge("v-if",!0),L.value==="year"?(N(),me(B0,{key:1,ref_key:"currentViewRef",ref:w,"selection-mode":p(U),date:O.value,"disabled-date":p(g),"parsed-value":Pe.parsedValue,onPick:K},null,8,["selection-mode","date","disabled-date","parsed-value"])):ge("v-if",!0),L.value==="month"?(N(),me(L0,{key:2,ref_key:"currentViewRef",ref:w,"selection-mode":p(U),date:O.value,"parsed-value":Pe.parsedValue,"disabled-date":p(g),onPick:he},null,8,["selection-mode","date","parsed-value","disabled-date"])):ge("v-if",!0)],34)],2)],2),Pe.showFooter&&p(Ne)?(N(),Z("div",{key:0,class:j(p(o).e("footer"))},[Yt(B(p(Kn),{text:"",size:"small",class:j(p(o).e("link-btn")),disabled:p(G),onClick:ve},{default:V(()=>[We(ze(p(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Bn,!p(J)&&Pe.showNow]]),B(p(Kn),{plain:"",size:"small",class:j(p(o).e("link-btn")),disabled:p($e),onClick:ue},{default:V(()=>[We(ze(p(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):ge("v-if",!0)],2))}});var vRe=Ge(gRe,[["__file","panel-date-pick.vue"]]);const mRe=Ze({...OU,...J$}),yRe=t=>{const{emit:e}=Kt(),n=vd(),r=Ro();return i=>{const a=kt(i.value)?i.value():i.value;if(a){e("pick",[Ht(a[0]).locale(t.value),Ht(a[1]).locale(t.value)]);return}i.onClick&&i.onClick({attrs:n,slots:r,emit:e})}},nR=(t,{defaultValue:e,defaultTime:n,leftDate:r,rightDate:o,step:i,unit:a,onParsedValueChanged:s})=>{const{emit:l}=Kt(),{pickerNs:u}=gt(q$),c=je("date-range-picker"),{t:d,lang:f}=En(),h=yRe(f),g=z(),v=z(),m=z({endDate:null,selecting:!1}),b=C=>{m.value=C},w=(C=!1)=>{const E=p(g),T=p(v);I0([E,T])&&l("pick",[E,T],C)},O=C=>{m.value.selecting=C,C||(m.value.endDate=null)},S=C=>{if(Ye(C)&&C.length===2){const[E,T]=C;g.value=E,r.value=E,v.value=T,s(p(g),p(v))}else x()},x=()=>{let[C,E]=EC(p(e),{lang:p(f),step:i,unit:a,unlinkPanels:t.unlinkPanels});const T=k=>k.diff(k.startOf("d"),"ms"),M=p(n);if(M){let k=0,P=0;if(Ye(M)){const[R,D]=M.map(Ht);k=T(R),P=T(D)}else{const R=T(Ht(M));k=R,P=R}C=C.startOf("d").add(k,"ms"),E=E.startOf("d").add(P,"ms")}g.value=void 0,v.value=void 0,r.value=C,o.value=E};return Le(e,C=>{C&&x()},{immediate:!0}),Le(()=>t.parsedValue,C=>{C!=null&&C.length||S(C)},{immediate:!0}),Le(()=>t.visible,()=>{t.visible&&S(t.parsedValue)},{immediate:!0}),{minDate:g,maxDate:v,rangeState:m,lang:f,ppNs:u,drpNs:c,handleChangeRange:b,handleRangeConfirm:w,handleShortcutClick:h,onSelect:O,onReset:S,t:d}},bRe=(t,e,n,r)=>{const o=z("date"),i=z(),a=z("date"),s=z(),l=gt(Td),{disabledDate:u}=l.props,{t:c,lang:d}=En(),f=$(()=>n.value.year()),h=$(()=>n.value.month()),g=$(()=>r.value.year()),v=$(()=>r.value.month());function m(C,E){const T=c("el.datepicker.year");if(C.value==="year"){const M=Math.floor(E.value/10)*10;return T?`${M} ${T} - ${M+9} ${T}`:`${M} - ${M+9}`}return`${E.value} ${T}`}function b(C){C==null||C.focus()}async function w(C,E){const T=C==="left"?o:a,M=C==="left"?i:s;T.value=E,await wt(),b(M.value)}async function O(C,E,T){const M=E==="left",k=M?n:r,P=M?r:n,R=M?o:a,D=M?i:s;if(C==="year"){const F=k.value.year(T);k.value=Qw(F,d.value,u)}C==="month"&&(k.value=wv(k.value,k.value.year(),T,d.value,u)),t.unlinkPanels||(P.value=E==="left"?k.value.add(1,"month"):k.value.subtract(1,"month")),R.value=C==="year"?"month":"date",await wt(),b(D.value),S(C)}function S(C){e("panel-change",[n.value.toDate(),r.value.toDate()],C)}function x(C,E,T){const M=T?"add":"subtract";return C==="year"?E[M](10,"year"):E[M](1,"year")}return{leftCurrentView:o,rightCurrentView:a,leftCurrentViewRef:i,rightCurrentViewRef:s,leftYear:f,rightYear:g,leftMonth:h,rightMonth:v,leftYearLabel:$(()=>m(o,f)),rightYearLabel:$(()=>m(a,g)),showLeftPicker:C=>w("left",C),showRightPicker:C=>w("right",C),handleLeftYearPick:C=>O("year","left",C),handleRightYearPick:C=>O("year","right",C),handleLeftMonthPick:C=>O("month","left",C),handleRightMonthPick:C=>O("month","right",C),handlePanelChange:S,adjustDateByView:x}},AO="month",_Re=de({__name:"panel-date-range",props:mRe,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,r=gt(Td),o=gt(Kb),{disabledDate:i,cellClassName:a,defaultTime:s,clearable:l}=r.props,u=jn(r.props,"format"),c=jn(r.props,"shortcuts"),d=jn(r.props,"defaultValue"),{lang:f}=En(),h=z(Ht().locale(f.value)),g=z(Ht().locale(f.value).add(1,AO));let v=!0;const{minDate:m,maxDate:b,rangeState:w,ppNs:O,drpNs:S,handleChangeRange:x,handleRangeConfirm:C,handleShortcutClick:E,onSelect:T,onReset:M,t:k}=nR(n,{defaultValue:d,defaultTime:s,leftDate:h,rightDate:g,unit:AO,onParsedValueChanged:vt});Le(()=>n.visible,dt=>{!dt&&w.value.selecting&&(M(n.parsedValue),T(!1))});const P=z({min:null,max:null}),R=z({min:null,max:null}),{leftCurrentView:D,rightCurrentView:F,leftCurrentViewRef:W,rightCurrentViewRef:I,leftYear:Q,rightYear:L,leftMonth:H,rightMonth:re,leftYearLabel:U,rightYearLabel:J,showLeftPicker:ie,showRightPicker:te,handleLeftYearPick:he,handleRightYearPick:K,handleLeftMonthPick:ne,handleRightMonthPick:fe,handlePanelChange:Ne,adjustDateByView:$e}=bRe(n,e,h,g),ue=$(()=>!!c.value.length),G=$(()=>P.value.min!==null?P.value.min:m.value?m.value.format(Oe.value):""),ve=$(()=>P.value.max!==null?P.value.max:b.value||m.value?(b.value||m.value).format(Oe.value):""),q=$(()=>R.value.min!==null?R.value.min:m.value?m.value.format(Ee.value):""),Ie=$(()=>R.value.max!==null?R.value.max:b.value||m.value?(b.value||m.value).format(Ee.value):""),Ee=$(()=>n.timeFormat||NH(u.value)),Oe=$(()=>n.dateFormat||PH(u.value)),se=dt=>I0(dt)&&(i?!i(dt[0].toDate())&&!i(dt[1].toDate()):!0),X=()=>{h.value=$e(D.value,h.value,!1),n.unlinkPanels||(g.value=h.value.add(1,"month")),Ne("year")},oe=()=>{h.value=h.value.subtract(1,"month"),n.unlinkPanels||(g.value=h.value.add(1,"month")),Ne("month")},ce=()=>{n.unlinkPanels?g.value=$e(F.value,g.value,!0):(h.value=$e(F.value,h.value,!0),g.value=h.value.add(1,"month")),Ne("year")},Ae=()=>{n.unlinkPanels?g.value=g.value.add(1,"month"):(h.value=h.value.add(1,"month"),g.value=h.value.add(1,"month")),Ne("month")},ye=()=>{h.value=$e(D.value,h.value,!0),Ne("year")},Te=()=>{h.value=h.value.add(1,"month"),Ne("month")},Me=()=>{g.value=$e(F.value,g.value,!1),Ne("year")},Fe=()=>{g.value=g.value.subtract(1,"month"),Ne("month")},at=$(()=>{const dt=(H.value+1)%12,$t=H.value+1>=12?1:0;return n.unlinkPanels&&new Date(Q.value+$t,dt)n.unlinkPanels&&L.value*12+re.value-(Q.value*12+H.value+1)>=12),ct=$(()=>!(m.value&&b.value&&!w.value.selecting&&I0([m.value,b.value]))),ht=$(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(dt,$t)=>{if(!!dt)return s?Ht(s[$t]||s).locale(f.value).year(dt.year()).month(dt.month()).date(dt.date()):dt},ft=(dt,$t=!0)=>{const Dt=dt.minDate,Vn=dt.maxDate,no=Je(Dt,0),lo=Je(Vn,1);b.value===lo&&m.value===no||(e("calendar-change",[Dt.toDate(),Vn&&Vn.toDate()]),b.value=lo,m.value=no,!ht.value&&$t&&($t=!no||!lo),v=$t)};Le([b,m],([dt,$t])=>{dt&&$t&&(C(v),v=!0)});const Mt=z(!1),Pe=z(!1),Ce=()=>{Mt.value=!1},pe=()=>{Pe.value=!1},Be=(dt,$t)=>{P.value[$t]=dt;const Dt=Ht(dt,Oe.value).locale(f.value);if(Dt.isValid()){if(i&&i(Dt.toDate()))return;$t==="min"?(h.value=Dt,m.value=(m.value||h.value).year(Dt.year()).month(Dt.month()).date(Dt.date()),!n.unlinkPanels&&(!b.value||b.value.isBefore(m.value))&&(g.value=Dt.add(1,"month"),b.value=m.value.add(1,"month"))):(g.value=Dt,b.value=(b.value||g.value).year(Dt.year()).month(Dt.month()).date(Dt.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(b.value))&&(h.value=Dt.subtract(1,"month"),m.value=b.value.subtract(1,"month")))}},_t=(dt,$t)=>{P.value[$t]=null},en=(dt,$t)=>{R.value[$t]=dt;const Dt=Ht(dt,Ee.value).locale(f.value);Dt.isValid()&&($t==="min"?(Mt.value=!0,m.value=(m.value||h.value).hour(Dt.hour()).minute(Dt.minute()).second(Dt.second())):(Pe.value=!0,b.value=(b.value||g.value).hour(Dt.hour()).minute(Dt.minute()).second(Dt.second()),g.value=b.value))},On=(dt,$t)=>{R.value[$t]=null,$t==="min"?(h.value=m.value,Mt.value=!1,(!b.value||b.value.isBefore(m.value))&&(b.value=m.value)):(g.value=b.value,Pe.value=!1,b.value&&b.value.isBefore(m.value)&&(m.value=b.value))},yn=(dt,$t,Dt)=>{R.value.min||(dt&&(h.value=dt,m.value=(m.value||h.value).hour(dt.hour()).minute(dt.minute()).second(dt.second())),Dt||(Mt.value=$t),(!b.value||b.value.isBefore(m.value))&&(b.value=m.value,g.value=dt,wt(()=>{M(n.parsedValue)})))},dr=(dt,$t,Dt)=>{R.value.max||(dt&&(g.value=dt,b.value=(b.value||g.value).hour(dt.hour()).minute(dt.minute()).second(dt.second())),Dt||(Pe.value=$t),b.value&&b.value.isBefore(m.value)&&(m.value=b.value))},to=()=>{h.value=EC(p(d),{lang:p(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],g.value=h.value.add(1,"month"),b.value=void 0,m.value=void 0,e("pick",null)},Kr=dt=>Ye(dt)?dt.map($t=>$t.format(u.value)):dt.format(u.value),qe=dt=>Sv(dt,u.value,f.value,o);function vt(dt,$t){if(n.unlinkPanels&&$t){const Dt=(dt==null?void 0:dt.year())||0,Vn=(dt==null?void 0:dt.month())||0,no=$t.year(),lo=$t.month();g.value=Dt===no&&Vn===lo?$t.add(1,AO):$t}else g.value=h.value.add(1,AO),$t&&(g.value=g.value.hour($t.hour()).minute($t.minute()).second($t.second()))}return e("set-picker-option",["isValidValue",se]),e("set-picker-option",["parseUserInput",qe]),e("set-picker-option",["formatToString",Kr]),e("set-picker-option",["handleClear",to]),(dt,$t)=>(N(),Z("div",{class:j([p(O).b(),p(S).b(),{"has-sidebar":dt.$slots.sidebar||p(ue),"has-time":p(ht)}])},[ee("div",{class:j(p(O).e("body-wrapper"))},[ke(dt.$slots,"sidebar",{class:j(p(O).e("sidebar"))}),p(ue)?(N(),Z("div",{key:0,class:j(p(O).e("sidebar"))},[(N(!0),Z(ut,null,Xt(p(c),(Dt,Vn)=>(N(),Z("button",{key:Vn,type:"button",class:j(p(O).e("shortcut")),onClick:no=>p(E)(Dt)},ze(Dt.text),11,["onClick"]))),128))],2)):ge("v-if",!0),ee("div",{class:j(p(O).e("body"))},[p(ht)?(N(),Z("div",{key:0,class:j(p(S).e("time-header"))},[ee("span",{class:j(p(S).e("editors-wrap"))},[ee("span",{class:j(p(S).e("time-picker-wrap"))},[B(p(ao),{size:"small",disabled:p(w).selecting,placeholder:p(k)("el.datepicker.startDate"),class:j(p(S).e("editor")),"model-value":p(G),"validate-event":!1,onInput:Dt=>Be(Dt,"min"),onChange:Dt=>_t(Dt,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),Yt((N(),Z("span",{class:j(p(S).e("time-picker-wrap"))},[B(p(ao),{size:"small",class:j(p(S).e("editor")),disabled:p(w).selecting,placeholder:p(k)("el.datepicker.startTime"),"model-value":p(q),"validate-event":!1,onFocus:Dt=>Mt.value=!0,onInput:Dt=>en(Dt,"min"),onChange:Dt=>On(Dt,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),B(p(jw),{visible:Mt.value,format:p(Ee),"datetime-role":"start","parsed-value":h.value,onPick:yn},null,8,["visible","format","parsed-value"])],2)),[[p(sd),Ce]])],2),ee("span",null,[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})]),ee("span",{class:j([p(S).e("editors-wrap"),"is-right"])},[ee("span",{class:j(p(S).e("time-picker-wrap"))},[B(p(ao),{size:"small",class:j(p(S).e("editor")),disabled:p(w).selecting,placeholder:p(k)("el.datepicker.endDate"),"model-value":p(ve),readonly:!p(m),"validate-event":!1,onInput:Dt=>Be(Dt,"max"),onChange:Dt=>_t(Dt,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),Yt((N(),Z("span",{class:j(p(S).e("time-picker-wrap"))},[B(p(ao),{size:"small",class:j(p(S).e("editor")),disabled:p(w).selecting,placeholder:p(k)("el.datepicker.endTime"),"model-value":p(Ie),readonly:!p(m),"validate-event":!1,onFocus:Dt=>p(m)&&(Pe.value=!0),onInput:Dt=>en(Dt,"max"),onChange:Dt=>On(Dt,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),B(p(jw),{"datetime-role":"end",visible:Pe.value,format:p(Ee),"parsed-value":g.value,onPick:dr},null,8,["visible","format","parsed-value"])],2)),[[p(sd),pe]])],2)],2)):ge("v-if",!0),ee("div",{class:j([[p(O).e("content"),p(S).e("content")],"is-left"])},[ee("div",{class:j(p(S).e("header"))},[ee("button",{type:"button",class:j([p(O).e("icon-btn"),"d-arrow-left"]),"aria-label":p(k)("el.datepicker.prevYear"),onClick:X},[ke(dt.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["aria-label"]),Yt(ee("button",{type:"button",class:j([p(O).e("icon-btn"),"arrow-left"]),"aria-label":p(k)("el.datepicker.prevMonth"),onClick:oe},[ke(dt.$slots,"prev-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1})])],10,["aria-label"]),[[Bn,p(D)==="date"]]),dt.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(nt),class:j([[p(O).e("icon-btn"),{"is-disabled":!p(nt)}],"d-arrow-right"]),"aria-label":p(k)("el.datepicker.nextYear"),onClick:ye},[ke(dt.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["disabled","aria-label"])):ge("v-if",!0),dt.unlinkPanels&&p(D)==="date"?(N(),Z("button",{key:1,type:"button",disabled:!p(at),class:j([[p(O).e("icon-btn"),{"is-disabled":!p(at)}],"arrow-right"]),"aria-label":p(k)("el.datepicker.nextMonth"),onClick:Te},[ke(dt.$slots,"next-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})])],10,["disabled","aria-label"])):ge("v-if",!0),ee("div",null,[ee("span",{role:"button",class:j(p(S).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:yr(Dt=>p(ie)("year"),["enter"]),onClick:Dt=>p(ie)("year")},ze(p(U)),43,["onKeydown","onClick"]),Yt(ee("span",{role:"button","aria-live":"polite",tabindex:"0",class:j([p(S).e("header-label"),{active:p(D)==="month"}]),onKeydown:yr(Dt=>p(ie)("month"),["enter"]),onClick:Dt=>p(ie)("month")},ze(p(k)(`el.datepicker.month${h.value.month()+1}`)),43,["onKeydown","onClick"]),[[Bn,p(D)==="date"]])])],2),p(D)==="date"?(N(),me(sA,{key:0,ref_key:"leftCurrentViewRef",ref:W,"selection-mode":"range",date:h.value,"min-date":p(m),"max-date":p(b),"range-state":p(w),"disabled-date":p(i),"cell-class-name":p(a),"show-week-number":dt.showWeekNumber,onChangerange:p(x),onPick:ft,onSelect:p(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","onChangerange","onSelect"])):ge("v-if",!0),p(D)==="year"?(N(),me(B0,{key:1,ref_key:"leftCurrentViewRef",ref:W,"selection-mode":"year",date:h.value,"disabled-date":p(i),"parsed-value":dt.parsedValue,onPick:p(he)},null,8,["date","disabled-date","parsed-value","onPick"])):ge("v-if",!0),p(D)==="month"?(N(),me(L0,{key:2,ref_key:"leftCurrentViewRef",ref:W,"selection-mode":"month",date:h.value,"parsed-value":dt.parsedValue,"disabled-date":p(i),onPick:p(ne)},null,8,["date","parsed-value","disabled-date","onPick"])):ge("v-if",!0)],2),ee("div",{class:j([[p(O).e("content"),p(S).e("content")],"is-right"])},[ee("div",{class:j(p(S).e("header"))},[dt.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(nt),class:j([[p(O).e("icon-btn"),{"is-disabled":!p(nt)}],"d-arrow-left"]),"aria-label":p(k)("el.datepicker.prevYear"),onClick:Me},[ke(dt.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["disabled","aria-label"])):ge("v-if",!0),dt.unlinkPanels&&p(F)==="date"?(N(),Z("button",{key:1,type:"button",disabled:!p(at),class:j([[p(O).e("icon-btn"),{"is-disabled":!p(at)}],"arrow-left"]),"aria-label":p(k)("el.datepicker.prevMonth"),onClick:Fe},[ke(dt.$slots,"prev-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1})])],10,["disabled","aria-label"])):ge("v-if",!0),ee("button",{type:"button","aria-label":p(k)("el.datepicker.nextYear"),class:j([p(O).e("icon-btn"),"d-arrow-right"]),onClick:ce},[ke(dt.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["aria-label"]),Yt(ee("button",{type:"button",class:j([p(O).e("icon-btn"),"arrow-right"]),"aria-label":p(k)("el.datepicker.nextMonth"),onClick:Ae},[ke(dt.$slots,"next-month",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})])],10,["aria-label"]),[[Bn,p(F)==="date"]]),ee("div",null,[ee("span",{role:"button",class:j(p(S).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:yr(Dt=>p(te)("year"),["enter"]),onClick:Dt=>p(te)("year")},ze(p(J)),43,["onKeydown","onClick"]),Yt(ee("span",{role:"button","aria-live":"polite",tabindex:"0",class:j([p(S).e("header-label"),{active:p(F)==="month"}]),onKeydown:yr(Dt=>p(te)("month"),["enter"]),onClick:Dt=>p(te)("month")},ze(p(k)(`el.datepicker.month${g.value.month()+1}`)),43,["onKeydown","onClick"]),[[Bn,p(F)==="date"]])])],2),p(F)==="date"?(N(),me(sA,{key:0,ref_key:"rightCurrentViewRef",ref:I,"selection-mode":"range",date:g.value,"min-date":p(m),"max-date":p(b),"range-state":p(w),"disabled-date":p(i),"cell-class-name":p(a),"show-week-number":dt.showWeekNumber,onChangerange:p(x),onPick:ft,onSelect:p(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","onChangerange","onSelect"])):ge("v-if",!0),p(F)==="year"?(N(),me(B0,{key:1,ref_key:"rightCurrentViewRef",ref:I,"selection-mode":"year",date:g.value,"disabled-date":p(i),"parsed-value":dt.parsedValue,onPick:p(K)},null,8,["date","disabled-date","parsed-value","onPick"])):ge("v-if",!0),p(F)==="month"?(N(),me(L0,{key:2,ref_key:"rightCurrentViewRef",ref:I,"selection-mode":"month",date:g.value,"parsed-value":dt.parsedValue,"disabled-date":p(i),onPick:p(fe)},null,8,["date","parsed-value","disabled-date","onPick"])):ge("v-if",!0)],2)],2)],2),dt.showFooter&&p(ht)?(N(),Z("div",{key:0,class:j(p(O).e("footer"))},[p(l)?(N(),me(p(Kn),{key:0,text:"",size:"small",class:j(p(O).e("link-btn")),onClick:to},{default:V(()=>[We(ze(p(k)("el.datepicker.clear")),1)]),_:1},8,["class"])):ge("v-if",!0),B(p(Kn),{plain:"",size:"small",class:j(p(O).e("link-btn")),disabled:p(ct),onClick:Dt=>p(C)(!1)},{default:V(()=>[We(ze(p(k)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):ge("v-if",!0)],2))}});var ORe=Ge(_Re,[["__file","panel-date-range.vue"]]);const wRe=Ze({...J$}),SRe=["pick","set-picker-option","calendar-change"],xRe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:r}=En(),o=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},i=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},a=()=>{e.value=e.value.add(1,"year")},s=()=>{n.value=n.value.subtract(1,"year")},l=$(()=>`${e.value.year()} ${r("el.datepicker.year")}`),u=$(()=>`${n.value.year()} ${r("el.datepicker.year")}`),c=$(()=>e.value.year()),d=$(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:o,rightNextYear:i,leftNextYear:a,rightPrevYear:s,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},PO="year",CRe=de({name:"DatePickerMonthRange"}),ERe=de({...CRe,props:wRe,emits:SRe,setup(t,{emit:e}){const n=t,{lang:r}=En(),o=gt(Td),i=gt(Kb),{shortcuts:a,disabledDate:s}=o.props,l=jn(o.props,"format"),u=jn(o.props,"defaultValue"),c=z(Ht().locale(r.value)),d=z(Ht().locale(r.value).add(1,PO)),{minDate:f,maxDate:h,rangeState:g,ppNs:v,drpNs:m,handleChangeRange:b,handleRangeConfirm:w,handleShortcutClick:O,onSelect:S,onReset:x}=nR(n,{defaultValue:u,leftDate:c,rightDate:d,unit:PO,onParsedValueChanged:re}),C=$(()=>!!a.length),{leftPrevYear:E,rightNextYear:T,leftNextYear:M,rightPrevYear:k,leftLabel:P,rightLabel:R,leftYear:D,rightYear:F}=xRe({unlinkPanels:jn(n,"unlinkPanels"),leftDate:c,rightDate:d}),W=$(()=>n.unlinkPanels&&F.value>D.value+1),I=(U,J=!0)=>{const ie=U.minDate,te=U.maxDate;h.value===te&&f.value===ie||(e("calendar-change",[ie.toDate(),te&&te.toDate()]),h.value=te,f.value=ie,J&&w())},Q=()=>{c.value=EC(p(u),{lang:p(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],d.value=c.value.add(1,"year"),e("pick",null)},L=U=>Ye(U)?U.map(J=>J.format(l.value)):U.format(l.value),H=U=>Sv(U,l.value,r.value,i);function re(U,J){if(n.unlinkPanels&&J){const ie=(U==null?void 0:U.year())||0,te=J.year();d.value=ie===te?J.add(1,PO):J}else d.value=c.value.add(1,PO)}return Le(()=>n.visible,U=>{!U&&g.value.selecting&&(x(n.parsedValue),S(!1))}),e("set-picker-option",["isValidValue",I0]),e("set-picker-option",["formatToString",L]),e("set-picker-option",["parseUserInput",H]),e("set-picker-option",["handleClear",Q]),(U,J)=>(N(),Z("div",{class:j([p(v).b(),p(m).b(),{"has-sidebar":Boolean(U.$slots.sidebar)||p(C)}])},[ee("div",{class:j(p(v).e("body-wrapper"))},[ke(U.$slots,"sidebar",{class:j(p(v).e("sidebar"))}),p(C)?(N(),Z("div",{key:0,class:j(p(v).e("sidebar"))},[(N(!0),Z(ut,null,Xt(p(a),(ie,te)=>(N(),Z("button",{key:te,type:"button",class:j(p(v).e("shortcut")),onClick:he=>p(O)(ie)},ze(ie.text),11,["onClick"]))),128))],2)):ge("v-if",!0),ee("div",{class:j(p(v).e("body"))},[ee("div",{class:j([[p(v).e("content"),p(m).e("content")],"is-left"])},[ee("div",{class:j(p(m).e("header"))},[ee("button",{type:"button",class:j([p(v).e("icon-btn"),"d-arrow-left"]),onClick:p(E)},[ke(U.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["onClick"]),U.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(W),class:j([[p(v).e("icon-btn"),{[p(v).is("disabled")]:!p(W)}],"d-arrow-right"]),onClick:p(M)},[ke(U.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["disabled","onClick"])):ge("v-if",!0),ee("div",null,ze(p(P)),1)],2),B(L0,{"selection-mode":"range",date:c.value,"min-date":p(f),"max-date":p(h),"range-state":p(g),"disabled-date":p(s),onChangerange:p(b),onPick:I,onSelect:p(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),ee("div",{class:j([[p(v).e("content"),p(m).e("content")],"is-right"])},[ee("div",{class:j(p(m).e("header"))},[U.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(W),class:j([[p(v).e("icon-btn"),{"is-disabled":!p(W)}],"d-arrow-left"]),onClick:p(k)},[ke(U.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["disabled","onClick"])):ge("v-if",!0),ee("button",{type:"button",class:j([p(v).e("icon-btn"),"d-arrow-right"]),onClick:p(T)},[ke(U.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["onClick"]),ee("div",null,ze(p(R)),1)],2),B(L0,{"selection-mode":"range",date:d.value,"min-date":p(f),"max-date":p(h),"range-state":p(g),"disabled-date":p(s),onChangerange:p(b),onPick:I,onSelect:p(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var TRe=Ge(ERe,[["__file","panel-month-range.vue"]]);const kRe=Ze({...J$}),ARe=["pick","set-picker-option","calendar-change"],PRe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const r=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},o=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},i=()=>{e.value=e.value.add(10,"year")},a=()=>{n.value=n.value.subtract(10,"year")},s=$(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=$(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),u=$(()=>Math.floor(e.value.year()/10)*10+9),c=$(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:o,leftNextYear:i,rightPrevYear:a,leftLabel:s,rightLabel:l,leftYear:u,rightYear:c}},ig=10,ny="year",NRe=de({name:"DatePickerYearRange"}),MRe=de({...NRe,props:kRe,emits:ARe,setup(t,{emit:e}){const n=t,{lang:r}=En(),o=z(Ht().locale(r.value)),i=z(Ht().locale(r.value).add(ig,ny)),a=gt(Kb),s=gt(Td),{shortcuts:l,disabledDate:u}=s.props,c=jn(s.props,"format"),d=jn(s.props,"defaultValue"),{minDate:f,maxDate:h,rangeState:g,ppNs:v,drpNs:m,handleChangeRange:b,handleRangeConfirm:w,handleShortcutClick:O,onSelect:S,onReset:x}=nR(n,{defaultValue:d,leftDate:o,rightDate:i,step:ig,unit:ny,onParsedValueChanged:te}),{leftPrevYear:C,rightNextYear:E,leftNextYear:T,rightPrevYear:M,leftLabel:k,rightLabel:P,leftYear:R,rightYear:D}=PRe({unlinkPanels:jn(n,"unlinkPanels"),leftDate:o,rightDate:i}),F=$(()=>!!l.length),W=$(()=>[v.b(),m.b(),{"has-sidebar":Boolean(Ro().sidebar)||F.value}]),I=$(()=>({content:[v.e("content"),m.e("content"),"is-left"],arrowLeftBtn:[v.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[v.e("icon-btn"),{[v.is("disabled")]:!L.value},"d-arrow-right"]})),Q=$(()=>({content:[v.e("content"),m.e("content"),"is-right"],arrowLeftBtn:[v.e("icon-btn"),{"is-disabled":!L.value},"d-arrow-left"],arrowRightBtn:[v.e("icon-btn"),"d-arrow-right"]})),L=$(()=>n.unlinkPanels&&D.value>R.value+1),H=(he,K=!0)=>{const ne=he.minDate,fe=he.maxDate;h.value===fe&&f.value===ne||(e("calendar-change",[ne.toDate(),fe&&fe.toDate()]),h.value=fe,f.value=ne,K&&w())},re=he=>Sv(he,c.value,r.value,a),U=he=>Ye(he)?he.map(K=>K.format(c.value)):he.format(c.value),J=he=>I0(he)&&(u?!u(he[0].toDate())&&!u(he[1].toDate()):!0),ie=()=>{const he=EC(p(d),{lang:p(r),step:ig,unit:ny,unlinkPanels:n.unlinkPanels});o.value=he[0],i.value=he[1],e("pick",null)};function te(he,K){if(n.unlinkPanels&&K){const ne=(he==null?void 0:he.year())||0,fe=K.year();i.value=ne+ig>fe?K.add(ig,ny):K}else i.value=o.value.add(ig,ny)}return Le(()=>n.visible,he=>{!he&&g.value.selecting&&(x(n.parsedValue),S(!1))}),e("set-picker-option",["isValidValue",J]),e("set-picker-option",["parseUserInput",re]),e("set-picker-option",["formatToString",U]),e("set-picker-option",["handleClear",ie]),(he,K)=>(N(),Z("div",{class:j(p(W))},[ee("div",{class:j(p(v).e("body-wrapper"))},[ke(he.$slots,"sidebar",{class:j(p(v).e("sidebar"))}),p(F)?(N(),Z("div",{key:0,class:j(p(v).e("sidebar"))},[(N(!0),Z(ut,null,Xt(p(l),(ne,fe)=>(N(),Z("button",{key:fe,type:"button",class:j(p(v).e("shortcut")),onClick:Ne=>p(O)(ne)},ze(ne.text),11,["onClick"]))),128))],2)):ge("v-if",!0),ee("div",{class:j(p(v).e("body"))},[ee("div",{class:j(p(I).content)},[ee("div",{class:j(p(m).e("header"))},[ee("button",{type:"button",class:j(p(I).arrowLeftBtn),onClick:p(C)},[ke(he.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["onClick"]),he.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(L),class:j(p(I).arrowRightBtn),onClick:p(T)},[ke(he.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["disabled","onClick"])):ge("v-if",!0),ee("div",null,ze(p(k)),1)],2),B(B0,{"selection-mode":"range",date:o.value,"min-date":p(f),"max-date":p(h),"range-state":p(g),"disabled-date":p(u),onChangerange:p(b),onPick:H,onSelect:p(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),ee("div",{class:j(p(Q).content)},[ee("div",{class:j(p(m).e("header"))},[he.unlinkPanels?(N(),Z("button",{key:0,type:"button",disabled:!p(L),class:j(p(Q).arrowLeftBtn),onClick:p(M)},[ke(he.$slots,"prev-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Af))]),_:1})])],10,["disabled","onClick"])):ge("v-if",!0),ee("button",{type:"button",class:j(p(Q).arrowRightBtn),onClick:p(E)},[ke(he.$slots,"next-year",{},()=>[B(p(Ot),null,{default:V(()=>[B(p(Pf))]),_:1})])],10,["onClick"]),ee("div",null,ze(p(P)),1)],2),B(B0,{"selection-mode":"range",date:i.value,"min-date":p(f),"max-date":p(h),"range-state":p(g),"disabled-date":p(u),onChangerange:p(b),onPick:H,onSelect:p(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var $Re=Ge(MRe,[["__file","panel-year-range.vue"]]);const RRe=function(t){switch(t){case"daterange":case"datetimerange":return ORe;case"monthrange":return TRe;case"yearrange":return $Re;default:return vRe}};Ht.extend($H);Ht.extend(N$e);Ht.extend(X$);Ht.extend(M$e);Ht.extend($$e);Ht.extend(R$e);Ht.extend(D$e);Ht.extend(I$e);var DRe=de({name:"ElDatePicker",install:null,props:tRe,emits:[zt],setup(t,{expose:e,emit:n,slots:r}){const o=je("picker-panel"),i=$(()=>!t.format);mn(Kb,i),mn(Z$,pn(jn(t,"popperOptions"))),mn(q$,{slots:r,pickerNs:o});const a=z();e({focus:()=>{var u;(u=a.value)==null||u.focus()},blur:()=>{var u;(u=a.value)==null||u.blur()},handleOpen:()=>{var u;(u=a.value)==null||u.handleOpen()},handleClose:()=>{var u;(u=a.value)==null||u.handleClose()}});const l=u=>{n(zt,u)};return()=>{var u;const c=(u=t.format)!=null?u:L$e[t.type]||Sg,d=RRe(t.type);return B(vU,rn(t,{format:c,type:t.type,ref:a,"onUpdate:modelValue":l}),{default:f=>B(d,f,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const IRe=Wt(DRe),rR=Symbol("elDescriptions");var ry=de({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:gt(rR,{})}},render(){var t;const e=nNe(this.cell),n=(((t=this.cell)==null?void 0:t.dirs)||[]).map(b=>{const{dir:w,arg:O,modifiers:S,value:x}=b;return[w,x,O,S]}),{border:r,direction:o}=this.descriptions,i=o==="vertical",a=()=>{var b,w,O;return((O=(w=(b=this.cell)==null?void 0:b.children)==null?void 0:w.label)==null?void 0:O.call(w))||e.label},s=()=>{var b,w,O;return(O=(w=(b=this.cell)==null?void 0:b.children)==null?void 0:w.default)==null?void 0:O.call(w)},l=e.span,u=e.rowspan,c=e.align?`is-${e.align}`:"",d=e.labelAlign?`is-${e.labelAlign}`:c,f=e.className,h=e.labelClassName,g=this.type==="label"&&(e.labelWidth||this.descriptions.labelWidth)||e.width,v={width:so(g),minWidth:so(e.minWidth)},m=je("descriptions");switch(this.type){case"label":return Yt(At(this.tag,{style:v,class:[m.e("cell"),m.e("label"),m.is("bordered-label",r),m.is("vertical-label",i),d,h],colSpan:i?l:1,rowspan:i?1:u},a()),n);case"content":return Yt(At(this.tag,{style:v,class:[m.e("cell"),m.e("content"),m.is("bordered-content",r),m.is("vertical-content",i),c,f],colSpan:i?l:l*2-1,rowspan:i?u*2-1:u},s()),n);default:{const b=a(),w={},O=so(e.labelWidth||this.descriptions.labelWidth);return O&&(w.width=O,w.display="inline-block"),Yt(At("td",{style:v,class:[m.e("cell"),c],colSpan:l,rowspan:u},[gr(b)?void 0:At("span",{style:w,class:[m.e("label"),h]},b),At("span",{class:[m.e("content"),f]},s())]),n)}}}});const LRe=Ze({row:{type:we(Array),default:()=>[]}}),BRe=de({name:"ElDescriptionsRow"}),FRe=de({...BRe,props:LRe,setup(t){const e=gt(rR,{});return(n,r)=>p(e).direction==="vertical"?(N(),Z(ut,{key:0},[ee("tr",null,[(N(!0),Z(ut,null,Xt(n.row,(o,i)=>(N(),me(p(ry),{key:`tr1-${i}`,cell:o,tag:"th",type:"label"},null,8,["cell"]))),128))]),ee("tr",null,[(N(!0),Z(ut,null,Xt(n.row,(o,i)=>(N(),me(p(ry),{key:`tr2-${i}`,cell:o,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(N(),Z("tr",{key:1},[(N(!0),Z(ut,null,Xt(n.row,(o,i)=>(N(),Z(ut,{key:`tr3-${i}`},[p(e).border?(N(),Z(ut,{key:0},[B(p(ry),{cell:o,tag:"td",type:"label"},null,8,["cell"]),B(p(ry),{cell:o,tag:"td",type:"content"},null,8,["cell"])],64)):(N(),me(p(ry),{key:1,cell:o,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var VRe=Ge(FRe,[["__file","descriptions-row.vue"]]);const zRe=Ze({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Fo,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number],default:""}}),wU="ElDescriptionsItem",jRe=de({name:"ElDescriptions"}),WRe=de({...jRe,props:zRe,setup(t){const e=t,n=je("descriptions"),r=$o(),o=Ro();mn(rR,e);const i=$(()=>[n.b(),n.m(r.value)]),a=(l,u,c,d=!1)=>(l.props||(l.props={}),u>c&&(l.props.span=c),d&&(l.props.span=u),l),s=()=>{if(!o.default)return[];const l=Zu(o.default()).filter(g=>{var v;return((v=g==null?void 0:g.type)==null?void 0:v.name)===wU}),u=[];let c=[],d=e.column,f=0;const h=[];return l.forEach((g,v)=>{var m,b,w;const O=((m=g.props)==null?void 0:m.span)||1,S=((b=g.props)==null?void 0:b.rowspan)||1,x=u.length;if(h[x]||(h[x]=0),S>1)for(let C=1;C0&&(d-=h[x],h[x]=0),vd?d:O),v===l.length-1){const C=e.column-f%e.column;c.push(a(g,C,d,!0)),u.push(c);return}O(N(),Z("div",{class:j(p(i))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(N(),Z("div",{key:0,class:j(p(n).e("header"))},[ee("div",{class:j(p(n).e("title"))},[ke(l.$slots,"title",{},()=>[We(ze(l.title),1)])],2),ee("div",{class:j(p(n).e("extra"))},[ke(l.$slots,"extra",{},()=>[We(ze(l.extra),1)])],2)],2)):ge("v-if",!0),ee("div",{class:j(p(n).e("body"))},[ee("table",{class:j([p(n).e("table"),p(n).is("bordered",l.border)])},[ee("tbody",null,[(N(!0),Z(ut,null,Xt(s(),(c,d)=>(N(),me(VRe,{key:d,row:c},null,8,["row"]))),128))])],2)],2)],2))}});var QRe=Ge(WRe,[["__file","description.vue"]]);const I5=["left","center","right"],HRe=Ze({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number],default:""},align:{type:String,values:I5,default:"left"},labelAlign:{type:String,values:I5},className:{type:String,default:""},labelClassName:{type:String,default:""}}),SU=de({name:wU,props:HRe}),xU=Wt(QRe,{DescriptionsItem:SU}),CU=qr(SU),oR=t=>{if(!t)return{onClick:or,onMousedown:or,onMouseup:or};let e=!1,n=!1;return{onClick:a=>{e&&n&&t(a),e=n=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{n=a.target===a.currentTarget}}},URe=Ze({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:we([String,Array,Object])},zIndex:{type:we([String,Number])}}),YRe={click:t=>t instanceof MouseEvent},XRe="overlay";var ZRe=de({name:"ElOverlay",props:URe,emits:YRe,setup(t,{slots:e,emit:n}){const r=je(XRe),o=l=>{n("click",l)},{onClick:i,onMousedown:a,onMouseup:s}=oR(t.customMaskEvent?void 0:o);return()=>t.mask?B("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:i,onMousedown:a,onMouseup:s},[ke(e,"default")],ul.STYLE|ul.CLASS|ul.PROPS,["onClick","onMouseup","onMousedown"]):At("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ke(e,"default")])}});const iR=ZRe,EU=Symbol("dialogInjectionKey"),L5="dialog-fade",TU=Ze({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:cr},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),GRe={close:()=>!0},kU=(t,e,n,r)=>{const o={offsetX:0,offsetY:0},i=(d,f)=>{if(t.value){const{offsetX:h,offsetY:g}=o,v=t.value.getBoundingClientRect(),m=v.left,b=v.top,w=v.width,O=v.height,S=document.documentElement.clientWidth,x=document.documentElement.clientHeight,C=-m+h,E=-b+g,T=S-m-w+h,M=x-b-(O{const f=d.clientX,h=d.clientY,{offsetX:g,offsetY:v}=o,m=w=>{const O=g+w.clientX-f,S=v+w.clientY-h;i(O,S)},b=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",b)},s=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",c))},l=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",c))},u=()=>{o.offsetX=0,o.offsetY=0,t.value&&(t.value.style.transform="")},c=()=>{const{offsetX:d,offsetY:f}=o;i(d,f)};return jt(()=>{ua(()=>{n.value?s():l()})}),Yn(()=>{l()}),{resetPosition:u,updatePosition:c}},TC=(...t)=>e=>{t.forEach(n=>{kt(n)?n(e):n.value=e})},qRe=de({name:"ElDialogContent"}),KRe=de({...qRe,props:TU,emits:GRe,setup(t,{expose:e}){const n=t,{t:r}=En(),{Close:o}=UQ,{dialogRef:i,headerRef:a,bodyId:s,ns:l,style:u}=gt(EU),{focusTrapRef:c}=gt($$),d=$(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",!!n.draggable),l.is("align-center",!!n.alignCenter),{[l.m("center")]:n.center}]),f=TC(c,i),h=$(()=>!!n.draggable),g=$(()=>!!n.overflow),{resetPosition:v,updatePosition:m}=kU(i,a,h,g);return e({resetPosition:v,updatePosition:m}),(b,w)=>(N(),Z("div",{ref:p(f),class:j(p(d)),style:bt(p(u)),tabindex:"-1"},[ee("header",{ref_key:"headerRef",ref:a,class:j([p(l).e("header"),b.headerClass,{"show-close":b.showClose}])},[ke(b.$slots,"header",{},()=>[ee("span",{role:"heading","aria-level":b.ariaLevel,class:j(p(l).e("title"))},ze(b.title),11,["aria-level"])]),b.showClose?(N(),Z("button",{key:0,"aria-label":p(r)("el.dialog.close"),class:j(p(l).e("headerbtn")),type:"button",onClick:O=>b.$emit("close")},[B(p(Ot),{class:j(p(l).e("close"))},{default:V(()=>[(N(),me(Jt(b.closeIcon||p(o))))]),_:1},8,["class"])],10,["aria-label","onClick"])):ge("v-if",!0)],2),ee("div",{id:p(s),class:j([p(l).e("body"),b.bodyClass])},[ke(b.$slots,"default")],10,["id"]),b.$slots.footer?(N(),Z("footer",{key:0,class:j([p(l).e("footer"),b.footerClass])},[ke(b.$slots,"footer")],2)):ge("v-if",!0)],6))}});var JRe=Ge(KRe,[["__file","dialog-content.vue"]]);const AU=Ze({...TU,appendToBody:Boolean,appendTo:{type:wC.to.type,default:"body"},beforeClose:{type:we(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:we([String,Object]),default:void 0}}),PU={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[zt]:t=>ir(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},aR=(t,e={})=>{Pr(t)||Ao("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||je("popup"),r=$(()=>n.bm("parent","hidden"));if(!kn||Ka(document.body,r.value))return;let o=0,i=!1,a="0";const s=()=>{setTimeout(()=>{typeof document!="undefined"&&i&&document&&(document.body.style.width=a,ca(document.body,r.value))},200)};Le(t,l=>{if(!l){s();return}i=!Ka(document.body,r.value),i&&(a=document.body.style.width,pl(document.body,r.value)),o=RQ(n.namespace.value);const u=document.documentElement.clientHeight0&&(u||c==="scroll")&&i&&(document.body.style.width=`calc(100% - ${o}px)`)}),H7(()=>s())},NU=(t,e)=>{var n;const o=Kt().emit,{nextZIndex:i}=um();let a="";const s=Si(),l=Si(),u=z(!1),c=z(!1),d=z(!1),f=z((n=t.zIndex)!=null?n:i());let h,g;const v=cm(),m=$(()=>{var U,J;return(J=(U=v.value)==null?void 0:U.namespace)!=null?J:zy}),b=$(()=>{var U;return(U=v.value)==null?void 0:U.dialog}),w=$(()=>{const U={},J=`--${m.value}-dialog`;return t.fullscreen||(t.top&&(U[`${J}-margin-top`]=t.top),t.width&&(U[`${J}-width`]=so(t.width))),U}),O=$(()=>{var U,J,ie;return((ie=(J=t.draggable)!=null?J:(U=b.value)==null?void 0:U.draggable)!=null?ie:!1)&&!t.fullscreen}),S=$(()=>{var U,J,ie;return(ie=(J=t.alignCenter)!=null?J:(U=b.value)==null?void 0:U.alignCenter)!=null?ie:!1}),x=$(()=>{var U,J,ie;return(ie=(J=t.overflow)!=null?J:(U=b.value)==null?void 0:U.overflow)!=null?ie:!1}),C=$(()=>S.value?{display:"flex"}:{}),E=$(()=>{var U,J,ie;const te=(ie=(J=t.transition)!=null?J:(U=b.value)==null?void 0:U.transition)!=null?ie:L5,he={name:te,onAfterEnter:T,onBeforeLeave:k,onAfterLeave:M};if(Zt(te)){const K={...te},ne=(fe,Ne)=>$e=>{Ye(fe)?fe.forEach(ue=>{kt(ue)&&ue($e)}):kt(fe)&&fe($e),Ne()};return K.onAfterEnter=ne(K.onAfterEnter,T),K.onBeforeLeave=ne(K.onBeforeLeave,k),K.onAfterLeave=ne(K.onAfterLeave,M),K.name||(K.name=L5),K}return he});function T(){o("opened")}function M(){o("closed"),o(zt,!1),t.destroyOnClose&&(d.value=!1)}function k(){o("close")}function P(){g==null||g(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=vp(()=>W(),t.openDelay):W()}function R(){h==null||h(),g==null||g(),t.closeDelay&&t.closeDelay>0?{stop:g}=vp(()=>I(),t.closeDelay):I()}function D(){function U(J){J||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(U):R()}function F(){t.closeOnClickModal&&D()}function W(){!kn||(u.value=!0)}function I(){u.value=!1}function Q(){o("openAutoFocus")}function L(){o("closeAutoFocus")}function H(U){var J;((J=U.detail)==null?void 0:J.focusReason)==="pointer"&&U.preventDefault()}t.lockScroll&&aR(u);function re(){t.closeOnPressEscape&&D()}return Le(()=>t.zIndex,()=>{var U;f.value=(U=t.zIndex)!=null?U:i()}),Le(()=>t.modelValue,U=>{var J;U?(c.value=!1,P(),d.value=!0,f.value=(J=t.zIndex)!=null?J:i(),wt(()=>{o("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):u.value&&R()}),Le(()=>t.fullscreen,U=>{!e.value||(U?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),jt(()=>{t.modelValue&&(u.value=!0,d.value=!0,P())}),{afterEnter:T,afterLeave:M,beforeLeave:k,handleClose:D,onModalClick:F,close:R,doClose:I,onOpenAutoFocus:Q,onCloseAutoFocus:L,onCloseRequested:re,onFocusoutPrevented:H,titleId:s,bodyId:l,closed:c,style:w,overlayDialogStyle:C,rendered:d,visible:u,zIndex:f,transitionConfig:E,_draggable:O,_alignCenter:S,_overflow:x}},eDe=de({name:"ElDialog",inheritAttrs:!1}),tDe=de({...eDe,props:AU,emits:PU,setup(t,{expose:e}){const n=t,r=Ro();Kc({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},$(()=>!!r.title));const o=je("dialog"),i=z(),a=z(),s=z(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:h,transitionConfig:g,zIndex:v,_draggable:m,_alignCenter:b,_overflow:w,handleClose:O,onModalClick:S,onOpenAutoFocus:x,onCloseAutoFocus:C,onCloseRequested:E,onFocusoutPrevented:T}=NU(n,i);mn(EU,{dialogRef:i,headerRef:a,bodyId:c,ns:o,rendered:h,style:d});const M=oR(S),k=$(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:s,resetPosition:()=>{var R;(R=s.value)==null||R.resetPosition()},handleClose:O}),(R,D)=>(N(),me(p(fm),{to:R.appendTo,disabled:R.appendTo!=="body"?!1:!R.appendToBody},{default:V(()=>[B(Xo,rn(p(g),{persisted:""}),{default:V(()=>{var F;return[Yt(B(p(iR),{"custom-mask-event":"",mask:R.modal,"overlay-class":[(F=R.modalClass)!=null?F:"",`${p(o).namespace.value}-modal-dialog`,p(o).is("penetrable",p(k))],"z-index":p(v)},{default:V(()=>[ee("div",{role:"dialog","aria-modal":"true","aria-label":R.title||void 0,"aria-labelledby":R.title?void 0:p(u),"aria-describedby":p(c),class:j(`${p(o).namespace.value}-overlay-dialog`),style:bt(p(f)),onClick:p(M).onClick,onMousedown:p(M).onMousedown,onMouseup:p(M).onMouseup},[B(p(dm),{loop:"",trapped:p(l),"focus-start-el":"container",onFocusAfterTrapped:p(x),onFocusAfterReleased:p(C),onFocusoutPrevented:p(T),onReleaseRequested:p(E)},{default:V(()=>[p(h)?(N(),me(JRe,rn({key:0,ref_key:"dialogContentRef",ref:s},R.$attrs,{center:R.center,"align-center":p(b),"close-icon":R.closeIcon,draggable:p(m),overflow:p(w),fullscreen:R.fullscreen,"header-class":R.headerClass,"body-class":R.bodyClass,"footer-class":R.footerClass,"show-close":R.showClose,title:R.title,"aria-level":R.headerAriaLevel,onClose:p(O)}),ha({header:V(()=>[R.$slots.title?ke(R.$slots,"title",{key:1}):ke(R.$slots,"header",{key:0,close:p(O),titleId:p(u),titleClass:p(o).e("title")})]),default:V(()=>[ke(R.$slots,"default")]),_:2},[R.$slots.footer?{name:"footer",fn:V(()=>[ke(R.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):ge("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[Bn,p(l)]])]}),_:3},16)]),_:3},8,["to","disabled"]))}});var nDe=Ge(tDe,[["__file","dialog.vue"]]);const Ei=Wt(nDe),rDe=Ze({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:we(String),default:"solid"}}),oDe=de({name:"ElDivider"}),iDe=de({...oDe,props:rDe,setup(t){const e=t,n=je("divider"),r=$(()=>n.cssVar({"border-style":e.borderStyle}));return(o,i)=>(N(),Z("div",{class:j([p(n).b(),p(n).m(o.direction)]),style:bt(p(r)),role:"separator"},[o.$slots.default&&o.direction!=="vertical"?(N(),Z("div",{key:0,class:j([p(n).e("text"),p(n).is(o.contentPosition)])},[ke(o.$slots,"default")],2)):ge("v-if",!0)],6))}});var aDe=Ge(iDe,[["__file","divider.vue"]]);const MU=Wt(aDe),sDe=Ze({...AU,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),lDe=PU,uDe=de({name:"ElDrawer",inheritAttrs:!1}),cDe=de({...uDe,props:sDe,emits:lDe,setup(t,{expose:e}){const n=t,r=Ro();Kc({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},$(()=>!!r.title));const o=z(),i=z(),a=je("drawer"),{t:s}=En(),{afterEnter:l,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:h,bodyId:g,zIndex:v,onModalClick:m,onOpenAutoFocus:b,onCloseAutoFocus:w,onFocusoutPrevented:O,onCloseRequested:S,handleClose:x}=NU(n,o),C=$(()=>n.direction==="rtl"||n.direction==="ltr"),E=$(()=>so(n.size));return e({handleClose:x,afterEnter:l,afterLeave:u}),(T,M)=>(N(),me(p(fm),{to:T.appendTo,disabled:T.appendTo!=="body"?!1:!T.appendToBody},{default:V(()=>[B(Xo,{name:p(a).b("fade"),onAfterEnter:p(l),onAfterLeave:p(u),onBeforeLeave:p(c),persisted:""},{default:V(()=>[Yt(B(p(iR),{mask:T.modal,"overlay-class":T.modalClass,"z-index":p(v),onClick:p(m)},{default:V(()=>[B(p(dm),{loop:"",trapped:p(d),"focus-trap-el":o.value,"focus-start-el":i.value,onFocusAfterTrapped:p(b),onFocusAfterReleased:p(w),onFocusoutPrevented:p(O),onReleaseRequested:p(S)},{default:V(()=>[ee("div",rn({ref_key:"drawerRef",ref:o,"aria-modal":"true","aria-label":T.title||void 0,"aria-labelledby":T.title?void 0:p(h),"aria-describedby":p(g)},T.$attrs,{class:[p(a).b(),T.direction,p(d)&&"open"],style:p(C)?"width: "+p(E):"height: "+p(E),role:"dialog",onClick:Rt(()=>{},["stop"])}),[ee("span",{ref_key:"focusStartRef",ref:i,class:j(p(a).e("sr-focus")),tabindex:"-1"},null,2),T.withHeader?(N(),Z("header",{key:0,class:j([p(a).e("header"),T.headerClass])},[T.$slots.title?ke(T.$slots,"title",{key:1},()=>[ge(" DEPRECATED SLOT ")]):ke(T.$slots,"header",{key:0,close:p(x),titleId:p(h),titleClass:p(a).e("title")},()=>[T.$slots.title?ge("v-if",!0):(N(),Z("span",{key:0,id:p(h),role:"heading","aria-level":T.headerAriaLevel,class:j(p(a).e("title"))},ze(T.title),11,["id","aria-level"]))]),T.showClose?(N(),Z("button",{key:2,"aria-label":p(s)("el.drawer.close"),class:j(p(a).e("close-btn")),type:"button",onClick:p(x)},[B(p(Ot),{class:j(p(a).e("close"))},{default:V(()=>[B(p(fa))]),_:1},8,["class"])],10,["aria-label","onClick"])):ge("v-if",!0)],2)):ge("v-if",!0),p(f)?(N(),Z("div",{key:1,id:p(g),class:j([p(a).e("body"),T.bodyClass])},[ke(T.$slots,"default")],10,["id"])):ge("v-if",!0),T.$slots.footer?(N(),Z("div",{key:2,class:j([p(a).e("footer"),T.footerClass])},[ke(T.$slots,"footer")],2)):ge("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Bn,p(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var dDe=Ge(cDe,[["__file","drawer.vue"]]);const sR=Wt(dDe),fDe=de({inheritAttrs:!1});function hDe(t,e,n,r,o,i){return ke(t.$slots,"default")}var pDe=Ge(fDe,[["render",hDe],["__file","collection.vue"]]);const gDe=de({name:"ElCollectionItem",inheritAttrs:!1});function vDe(t,e,n,r,o,i){return ke(t.$slots,"default")}var mDe=Ge(gDe,[["render",vDe],["__file","collection-item.vue"]]);const $U="data-el-collection-item",RU=t=>{const e=`El${t}Collection`,n=`${e}Item`,r=Symbol(e),o=Symbol(n),i={...pDe,name:e,setup(){const s=z(),l=new Map;mn(r,{itemMap:l,getItems:()=>{const c=p(s);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${$U}]`));return[...l.values()].sort((h,g)=>d.indexOf(h.ref)-d.indexOf(g.ref))},collectionRef:s})}},a={...mDe,name:n,setup(s,{attrs:l}){const u=z(),c=gt(r,void 0);mn(o,{collectionItemRef:u}),jt(()=>{const d=p(u);d&&c.itemMap.set(d,{ref:d,...l})}),Yn(()=>{const d=p(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:i,ElCollectionItem:a}},yDe=Ze({style:{type:we([String,Array,Object])},currentTabId:{type:we(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:we(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:bDe,ElCollectionItem:_De,COLLECTION_INJECTION_KEY:lR,COLLECTION_ITEM_INJECTION_KEY:ODe}=RU("RovingFocusGroup"),uR=Symbol("elRovingFocusGroup"),DU=Symbol("elRovingFocusGroupItem"),wDe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},SDe=(t,e)=>{if(e!=="rtl")return t;switch(t){case st.right:return st.left;case st.left:return st.right;default:return t}},xDe=(t,e,n)=>{const r=SDe(t.code,n);if(!(e==="vertical"&&[st.left,st.right].includes(r))&&!(e==="horizontal"&&[st.up,st.down].includes(r)))return wDe[r]},CDe=(t,e)=>t.map((n,r)=>t[(r+e)%t.length]),cR=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},B5="currentTabIdChange",F5="rovingFocusGroup.entryFocus",EDe={bubbles:!1,cancelable:!0},TDe=de({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:yDe,emits:[B5,"entryFocus"],setup(t,{emit:e}){var n;const r=z((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),o=z(!1),i=z(!1),a=z(),{getItems:s}=gt(lR,void 0),l=$(()=>[{outline:"none"},t.style]),u=v=>{e(B5,v)},c=()=>{o.value=!0},d=po(v=>{var m;(m=t.onMousedown)==null||m.call(t,v)},()=>{i.value=!0}),f=po(v=>{var m;(m=t.onFocus)==null||m.call(t,v)},v=>{const m=!p(i),{target:b,currentTarget:w}=v;if(b===w&&m&&!p(o)){const O=new Event(F5,EDe);if(w==null||w.dispatchEvent(O),!O.defaultPrevented){const S=s().filter(M=>M.focusable),x=S.find(M=>M.active),C=S.find(M=>M.id===p(r)),T=[x,C,...S].filter(Boolean).map(M=>M.ref);cR(T)}}i.value=!1}),h=po(v=>{var m;(m=t.onBlur)==null||m.call(t,v)},()=>{o.value=!1}),g=(...v)=>{e("entryFocus",...v)};mn(uR,{currentTabbedId:$b(r),loop:jn(t,"loop"),tabIndex:$(()=>p(o)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:l,orientation:jn(t,"orientation"),dir:jn(t,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:h,onFocus:f,onMousedown:d}),Le(()=>t.currentTabId,v=>{r.value=v!=null?v:null}),pr(a,F5,g)}});function kDe(t,e,n,r,o,i){return ke(t.$slots,"default")}var ADe=Ge(TDe,[["render",kDe],["__file","roving-focus-group-impl.vue"]]);const PDe=de({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:bDe,ElRovingFocusGroupImpl:ADe}});function NDe(t,e,n,r,o,i){const a=Nn("el-roving-focus-group-impl"),s=Nn("el-focus-group-collection");return N(),me(s,null,{default:V(()=>[B(a,Is(ic(t.$attrs)),{default:V(()=>[ke(t.$slots,"default")]),_:3},16)]),_:3})}var MDe=Ge(PDe,[["render",NDe],["__file","roving-focus-group.vue"]]);const Q1=Ze({trigger:Xg.trigger,triggerKeys:{type:we(Array),default:()=>[st.enter,st.numpadEnter,st.space,st.down]},effect:{...yo.effect,default:"light"},type:{type:we(String)},placement:{type:we(String),default:"bottom"},popperOptions:{type:we(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:we([Number,String]),default:0},maxHeight:{type:we([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:JQ,default:"menu"},buttonProps:{type:we(Object)},teleported:yo.teleported,persistent:{type:Boolean,default:!0}}),IU=Ze({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:cr}}),$De=Ze({onKeydown:{type:we(Function)}}),RDe=[st.down,st.pageDown,st.home],LU=[st.up,st.pageUp,st.end],DDe=[...RDe,...LU],{ElCollection:IDe,ElCollectionItem:LDe,COLLECTION_INJECTION_KEY:BDe,COLLECTION_ITEM_INJECTION_KEY:FDe}=RU("Dropdown"),kC=Symbol("elDropdown"),BU="elDropdown",{ButtonGroup:VDe}=Kn,zDe=de({name:"ElDropdown",components:{ElButton:Kn,ElButtonGroup:VDe,ElScrollbar:Al,ElDropdownCollection:IDe,ElTooltip:Zo,ElRovingFocusGroup:MDe,ElOnlyChild:rH,ElIcon:Ot,ArrowDown:wc},props:Q1,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=Kt(),r=je("dropdown"),{t:o}=En(),i=z(),a=z(),s=z(),l=z(),u=z(null),c=z(null),d=z(!1),f=$(()=>({maxHeight:so(t.maxHeight)})),h=$(()=>[r.m(S.value)]),g=$(()=>Jo(t.trigger)),v=Si().value,m=$(()=>t.id||v);Le([i,g],([I,Q],[L])=>{var H,re,U;(H=L==null?void 0:L.$el)!=null&&H.removeEventListener&&L.$el.removeEventListener("pointerenter",C),(re=I==null?void 0:I.$el)!=null&&re.removeEventListener&&I.$el.removeEventListener("pointerenter",C),((U=I==null?void 0:I.$el)==null?void 0:U.addEventListener)&&Q.includes("hover")&&I.$el.addEventListener("pointerenter",C)},{immediate:!0}),Yn(()=>{var I,Q;(Q=(I=i.value)==null?void 0:I.$el)!=null&&Q.removeEventListener&&i.value.$el.removeEventListener("pointerenter",C)});function b(){w()}function w(){var I;(I=s.value)==null||I.onClose()}function O(){var I;(I=s.value)==null||I.onOpen()}const S=$o();function x(...I){e("command",...I)}function C(){var I,Q;(Q=(I=i.value)==null?void 0:I.$el)==null||Q.focus({preventScroll:!0})}function E(){}function T(){const I=p(l);g.value.includes("hover")&&(I==null||I.focus({preventScroll:!0})),c.value=null}function M(I){c.value=I}function k(I){d.value||(I.preventDefault(),I.stopImmediatePropagation())}function P(){e("visible-change",!0)}function R(I){var Q;(I==null?void 0:I.type)==="keydown"&&((Q=l.value)==null||Q.focus())}function D(){e("visible-change",!1)}return mn(kC,{contentRef:l,role:$(()=>t.role),triggerId:m,isUsingKeyboard:d,onItemEnter:E,onItemLeave:T}),mn(BU,{instance:n,dropdownSize:S,handleClick:b,commandHandler:x,trigger:jn(t,"trigger"),hideOnClick:jn(t,"hideOnClick")}),{t:o,ns:r,scrollbar:u,wrapStyle:f,dropdownTriggerKls:h,dropdownSize:S,triggerId:m,currentTabId:c,handleCurrentTabIdChange:M,handlerMainButtonClick:I=>{e("click",I)},handleEntryFocus:k,handleClose:w,handleOpen:O,handleBeforeShowTooltip:P,handleShowTooltip:R,handleBeforeHideTooltip:D,onFocusAfterTrapped:I=>{var Q,L;I.preventDefault(),(L=(Q=l.value)==null?void 0:Q.focus)==null||L.call(Q,{preventScroll:!0})},popperRef:s,contentRef:l,triggeringElementRef:i,referenceElementRef:a}}});function jDe(t,e,n,r,o,i){var a;const s=Nn("el-dropdown-collection"),l=Nn("el-roving-focus-group"),u=Nn("el-scrollbar"),c=Nn("el-only-child"),d=Nn("el-tooltip"),f=Nn("el-button"),h=Nn("arrow-down"),g=Nn("el-icon"),v=Nn("el-button-group");return N(),Z("div",{class:j([t.ns.b(),t.ns.is("disabled",t.disabled)])},[B(d,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"reference-element":(a=t.referenceElementRef)==null?void 0:a.$el,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":t.triggeringElementRef,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},ha({content:V(()=>[B(u,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:V(()=>[B(l,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange,onEntryFocus:t.handleEntryFocus},{default:V(()=>[B(s,null,{default:V(()=>[ke(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:V(()=>[B(c,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:V(()=>[ke(t.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(N(),me(v,{key:0},{default:V(()=>[B(f,rn({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:V(()=>[ke(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),B(f,rn({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:V(()=>[B(g,{class:j(t.ns.e("icon"))},{default:V(()=>[B(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):ge("v-if",!0)],2)}var WDe=Ge(zDe,[["render",jDe],["__file","dropdown.vue"]]);const QDe=de({components:{ElRovingFocusCollectionItem:_De},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,loop:r,onItemFocus:o,onItemShiftTab:i}=gt(uR,void 0),{getItems:a}=gt(lR,void 0),s=Si(),l=z(),u=po(h=>{e("mousedown",h)},h=>{t.focusable?o(p(s)):h.preventDefault()}),c=po(h=>{e("focus",h)},()=>{o(p(s))}),d=po(h=>{e("keydown",h)},h=>{const{code:g,shiftKey:v,target:m,currentTarget:b}=h;if(g===st.tab&&v){i();return}if(m!==b)return;const w=xDe(h);if(w){h.preventDefault();let S=a().filter(x=>x.focusable).map(x=>x.ref);switch(w){case"last":{S.reverse();break}case"prev":case"next":{w==="prev"&&S.reverse();const x=S.indexOf(b);S=r.value?CDe(S,x+1):S.slice(x+1);break}}wt(()=>{cR(S)})}}),f=$(()=>n.value===p(s));return mn(DU,{rovingFocusGroupItemRef:l,tabIndex:$(()=>p(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:s,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function HDe(t,e,n,r,o,i){const a=Nn("el-roving-focus-collection-item");return N(),me(a,{id:t.id,focusable:t.focusable,active:t.active},{default:V(()=>[ke(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var UDe=Ge(QDe,[["render",HDe],["__file","roving-focus-item.vue"]]);const YDe=de({name:"DropdownItemImpl",components:{ElIcon:Ot},props:IU,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=je("dropdown"),{role:r}=gt(kC,void 0),{collectionItemRef:o}=gt(FDe,void 0),{collectionItemRef:i}=gt(ODe,void 0),{rovingFocusGroupItemRef:a,tabIndex:s,handleFocus:l,handleKeydown:u,handleMousedown:c}=gt(DU,void 0),d=TC(o,i,a),f=$(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),h=po(g=>{if([st.enter,st.numpadEnter,st.space].includes(g.code))return g.preventDefault(),g.stopImmediatePropagation(),e("clickimpl",g),!0},u);return{ns:n,itemRef:d,dataset:{[$U]:""},role:f,tabIndex:s,handleFocus:l,handleKeydown:h,handleMousedown:c}}});function XDe(t,e,n,r,o,i){const a=Nn("el-icon");return N(),Z(ut,null,[t.divided?(N(),Z("li",{key:0,role:"separator",class:j(t.ns.bem("menu","item","divided"))},null,2)):ge("v-if",!0),ee("li",rn({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:s=>t.$emit("clickimpl",s),onFocus:t.handleFocus,onKeydown:Rt(t.handleKeydown,["self"]),onMousedown:t.handleMousedown,onPointermove:s=>t.$emit("pointermove",s),onPointerleave:s=>t.$emit("pointerleave",s)}),[t.icon?(N(),me(a,{key:0},{default:V(()=>[(N(),me(Jt(t.icon)))]),_:1})):ge("v-if",!0),ke(t.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var ZDe=Ge(YDe,[["render",XDe],["__file","dropdown-item-impl.vue"]]);const FU=()=>{const t=gt(BU,{}),e=$(()=>t==null?void 0:t.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},GDe=de({name:"ElDropdownItem",components:{ElDropdownCollectionItem:LDe,ElRovingFocusItem:UDe,ElDropdownItemImpl:ZDe},inheritAttrs:!1,props:IU,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:r}=FU(),o=Kt(),i=z(null),a=$(()=>{var h,g;return(g=(h=p(i))==null?void 0:h.textContent)!=null?g:""}),{onItemEnter:s,onItemLeave:l}=gt(kC,void 0),u=po(h=>(e("pointermove",h),h.defaultPrevented),v5(h=>{if(t.disabled){l(h);return}const g=h.currentTarget;g===document.activeElement||g.contains(document.activeElement)||(s(h),h.defaultPrevented||g==null||g.focus({preventScroll:!0}))})),c=po(h=>(e("pointerleave",h),h.defaultPrevented),v5(l)),d=po(h=>{if(!t.disabled)return e("click",h),h.type!=="keydown"&&h.defaultPrevented},h=>{var g,v,m;if(t.disabled){h.stopImmediatePropagation();return}(g=r==null?void 0:r.hideOnClick)!=null&&g.value&&((v=r.handleClick)==null||v.call(r)),(m=r.commandHandler)==null||m.call(r,t.command,o,h)}),f=$(()=>({...t,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:a,propsAndAttrs:f}}});function qDe(t,e,n,r,o,i){var a;const s=Nn("el-dropdown-item-impl"),l=Nn("el-roving-focus-item"),u=Nn("el-dropdown-collection-item");return N(),me(u,{disabled:t.disabled,"text-value":(a=t.textValue)!=null?a:t.textContent},{default:V(()=>[B(l,{focusable:!t.disabled},{default:V(()=>[B(s,rn(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:V(()=>[ke(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var VU=Ge(GDe,[["render",qDe],["__file","dropdown-item.vue"]]);const KDe=de({name:"ElDropdownMenu",props:$De,setup(t){const e=je("dropdown"),{_elDropdownSize:n}=FU(),r=n.value,{focusTrapRef:o,onKeydown:i}=gt($$,void 0),{contentRef:a,role:s,triggerId:l}=gt(kC,void 0),{collectionRef:u,getItems:c}=gt(BDe,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:h,onBlur:g,onFocus:v,onMousedown:m}=gt(uR,void 0),{collectionRef:b}=gt(lR,void 0),w=$(()=>[e.b("menu"),e.bm("menu",r==null?void 0:r.value)]),O=TC(a,u,o,d,b),S=po(C=>{var E;(E=t.onKeydown)==null||E.call(t,C)},C=>{const{currentTarget:E,code:T,target:M}=C;if(E.contains(M),st.tab===T&&C.stopImmediatePropagation(),C.preventDefault(),M!==p(a)||!DDe.includes(T))return;const P=c().filter(R=>!R.disabled).map(R=>R.ref);LU.includes(T)&&P.reverse(),cR(P)});return{size:r,rovingFocusGroupRootStyle:f,tabIndex:h,dropdownKls:w,role:s,triggerId:l,dropdownListWrapperRef:O,handleKeydown:C=>{S(C),i(C)},onBlur:g,onFocus:v,onMousedown:m}}});function JDe(t,e,n,r,o,i){return N(),Z("ul",{ref:t.dropdownListWrapperRef,class:j(t.dropdownKls),style:bt(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onBlur:t.onBlur,onFocus:t.onFocus,onKeydown:Rt(t.handleKeydown,["self"]),onMousedown:Rt(t.onMousedown,["self"])},[ke(t.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var zU=Ge(KDe,[["render",JDe],["__file","dropdown-menu.vue"]]);const jU=Wt(WDe,{DropdownItem:VU,DropdownMenu:zU}),WU=qr(VU),QU=qr(zU),eIe=de({name:"ImgEmpty"}),tIe=de({...eIe,setup(t){const e=je("empty"),n=Si();return(r,o)=>(N(),Z("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[ee("defs",null,[ee("linearGradient",{id:`linearGradient-1-${p(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[ee("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),ee("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),ee("linearGradient",{id:`linearGradient-2-${p(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[ee("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),ee("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),ee("rect",{id:`path-3-${p(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),ee("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[ee("g",{transform:"translate(-1268.000000, -535.000000)"},[ee("g",{transform:"translate(1268.000000, 535.000000)"},[ee("path",{d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${p(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),ee("g",{transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),ee("rect",{fill:`url(#linearGradient-1-${p(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),ee("rect",{fill:`url(#linearGradient-2-${p(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),ee("g",{transform:"translate(53.000000, 45.000000)"},[ee("use",{fill:`var(${p(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${p(n)}`},null,8,["fill","xlink:href"]),ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${p(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),ee("polygon",{fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var nIe=Ge(tIe,[["__file","img-empty.vue"]]);const rIe=Ze({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),oIe=de({name:"ElEmpty"}),iIe=de({...oIe,props:rIe,setup(t){const e=t,{t:n}=En(),r=je("empty"),o=$(()=>e.description||n("el.table.emptyText")),i=$(()=>({width:so(e.imageSize)}));return(a,s)=>(N(),Z("div",{class:j(p(r).b())},[ee("div",{class:j(p(r).e("image")),style:bt(p(i))},[a.image?(N(),Z("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):ke(a.$slots,"image",{key:1},()=>[B(nIe)])],6),ee("div",{class:j(p(r).e("description"))},[a.$slots.description?ke(a.$slots,"description",{key:0}):(N(),Z("p",{key:1},ze(p(o)),1))],2),a.$slots.default?(N(),Z("div",{key:0,class:j(p(r).e("bottom"))},[ke(a.$slots,"default")],2)):ge("v-if",!0)],2))}});var aIe=Ge(iIe,[["__file","empty.vue"]]);const HU=Wt(aIe),sIe=Ze({size:{type:String,values:Oc},disabled:Boolean}),lIe=Ze({...sIe,model:Object,rules:{type:we(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:we([Object,Boolean]),default:!0}}),uIe={validate:(t,e,n)=>(Ye(t)||St(t))&&ir(e)&&St(n)};function cIe(){const t=z([]),e=$(()=>{if(!t.value.length)return"0";const i=Math.max(...t.value);return i?`${i}px`:""});function n(i){const a=t.value.indexOf(i);return a===-1&&e.value,a}function r(i,a){if(i&&a){const s=n(a);t.value.splice(s,1,i)}else i&&t.value.push(i)}function o(i){const a=n(i);a>-1&&t.value.splice(a,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:o}}const NO=(t,e)=>{const n=Jo(e).map(r=>Ye(r)?r.join("."):r);return n.length>0?t.filter(r=>r.propString&&n.includes(r.propString)):t},dIe="ElForm",fIe=de({name:dIe}),hIe=de({...fIe,props:lIe,emits:uIe,setup(t,{expose:e,emit:n}){const r=t,o=z(),i=pn([]),a=$o(),s=je("form"),l=$(()=>{const{labelPosition:S,inline:x}=r;return[s.b(),s.m(a.value||"default"),{[s.m(`label-${S}`)]:S,[s.m("inline")]:x}]}),u=S=>NO(i,[S])[0],c=S=>{i.push(S)},d=S=>{S.prop&&i.splice(i.indexOf(S),1)},f=(S=[])=>{!r.model||NO(i,S).forEach(x=>x.resetField())},h=(S=[])=>{NO(i,S).forEach(x=>x.clearValidate())},g=$(()=>!!r.model),v=S=>{if(i.length===0)return[];const x=NO(i,S);return x.length?x:[]},m=async S=>w(void 0,S),b=async(S=[])=>{if(!g.value)return!1;const x=v(S);if(x.length===0)return!0;let C={};for(const E of x)try{await E.validate(""),E.validateState==="error"&&!E.error&&E.resetField()}catch(T){C={...C,...T}}return Object.keys(C).length===0?!0:Promise.reject(C)},w=async(S=[],x)=>{let C=!1;const E=!kt(x);try{return C=await b(S),C===!0&&await(x==null?void 0:x(C)),C}catch(T){if(T instanceof Error)throw T;const M=T;if(r.scrollToError&&o.value){const k=o.value.querySelector(`.${s.b()}-item.is-error`);k==null||k.scrollIntoView(r.scrollIntoViewOptions)}return!C&&await(x==null?void 0:x(!1,M)),E&&Promise.reject(M)}},O=S=>{var x;const C=u(S);C&&((x=C.$el)==null||x.scrollIntoView(r.scrollIntoViewOptions))};return Le(()=>r.rules,()=>{r.validateOnRuleChange&&m().catch(S=>void 0)},{deep:!0,flush:"post"}),mn(Ip,pn({...Mo(r),emit:n,resetFields:f,clearValidate:h,validateField:w,getField:u,addField:c,removeField:d,...cIe()})),e({validate:m,validateField:w,resetFields:f,clearValidate:h,scrollToField:O,getField:u,fields:i}),(S,x)=>(N(),Z("form",{ref_key:"formRef",ref:o,class:j(p(l))},[ke(S.$slots,"default")],2))}});var pIe=Ge(hIe,[["__file","form.vue"]]);function Uh(){return Uh=Object.assign?Object.assign.bind():function(t){for(var e=1;e1?e-1:0),r=1;r=i)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function _Ie(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function mi(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||_Ie(e)&&typeof t=="string"&&!t)}function OIe(t,e,n){var r=[],o=0,i=t.length;function a(s){r.push.apply(r,s||[]),o++,o===i&&n(r)}t.forEach(function(s){e(s,a)})}function V5(t,e,n){var r=0,o=t.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},_y={integer:function(e){return _y.number(e)&&parseInt(e,10)===e},float:function(e){return _y.number(e)&&!_y.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!_y.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Q5.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(TIe())},hex:function(e){return typeof e=="string"&&!!e.match(Q5.hex)}},kIe=function(e,n,r,o,i){if(e.required&&n===void 0){UU(e,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?_y[s](n)||o.push(Ls(i.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&o.push(Ls(i.messages.types[s],e.fullField,e.type))},AIe=function(e,n,r,o,i){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",h=typeof n=="string",g=Array.isArray(n);if(f?d="number":h?d="string":g&&(d="array"),!d)return!1;g&&(c=n.length),h&&(c=n.replace(u,"_").length),a?c!==e.len&&o.push(Ls(i.messages[d].len,e.fullField,e.len)):s&&!l&&ce.max?o.push(Ls(i.messages[d].max,e.fullField,e.max)):s&&l&&(ce.max)&&o.push(Ls(i.messages[d].range,e.fullField,e.min,e.max))},ag="enum",PIe=function(e,n,r,o,i){e[ag]=Array.isArray(e[ag])?e[ag]:[],e[ag].indexOf(n)===-1&&o.push(Ls(i.messages[ag],e.fullField,e[ag].join(", ")))},NIe=function(e,n,r,o,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(Ls(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(Ls(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},Cr={required:UU,whitespace:EIe,type:kIe,range:AIe,enum:PIe,pattern:NIe},MIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n,"string")&&!e.required)return r();Cr.required(e,n,o,a,i,"string"),mi(n,"string")||(Cr.type(e,n,o,a,i),Cr.range(e,n,o,a,i),Cr.pattern(e,n,o,a,i),e.whitespace===!0&&Cr.whitespace(e,n,o,a,i))}r(a)},$Ie=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&Cr.type(e,n,o,a,i)}r(a)},RIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&(Cr.type(e,n,o,a,i),Cr.range(e,n,o,a,i))}r(a)},DIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&Cr.type(e,n,o,a,i)}r(a)},IIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),mi(n)||Cr.type(e,n,o,a,i)}r(a)},LIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&(Cr.type(e,n,o,a,i),Cr.range(e,n,o,a,i))}r(a)},BIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&(Cr.type(e,n,o,a,i),Cr.range(e,n,o,a,i))}r(a)},FIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();Cr.required(e,n,o,a,i,"array"),n!=null&&(Cr.type(e,n,o,a,i),Cr.range(e,n,o,a,i))}r(a)},VIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&Cr.type(e,n,o,a,i)}r(a)},zIe="enum",jIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i),n!==void 0&&Cr[zIe](e,n,o,a,i)}r(a)},WIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n,"string")&&!e.required)return r();Cr.required(e,n,o,a,i),mi(n,"string")||Cr.pattern(e,n,o,a,i)}r(a)},QIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n,"date")&&!e.required)return r();if(Cr.required(e,n,o,a,i),!mi(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Cr.type(e,l,o,a,i),l&&Cr.range(e,l.getTime(),o,a,i)}}r(a)},HIe=function(e,n,r,o,i){var a=[],s=Array.isArray(n)?"array":typeof n;Cr.required(e,n,o,a,i,s),r(a)},s2=function(e,n,r,o,i){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(mi(n,a)&&!e.required)return r();Cr.required(e,n,o,s,i,a),mi(n,a)||Cr.type(e,n,o,s,i)}r(s)},UIe=function(e,n,r,o,i){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(mi(n)&&!e.required)return r();Cr.required(e,n,o,a,i)}r(a)},Yy={string:MIe,method:$Ie,number:RIe,boolean:DIe,regexp:IIe,integer:LIe,float:BIe,array:FIe,object:VIe,enum:jIe,pattern:WIe,date:QIe,url:s2,hex:s2,email:s2,required:HIe,any:UIe};function dA(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var fA=dA(),Jb=function(){function t(n){this.rules=null,this._messages=fA,this.define(n)}var e=t.prototype;return e.define=function(r){var o=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var a=r[i];o.rules[i]=Array.isArray(a)?a:[a]})},e.messages=function(r){return r&&(this._messages=W5(dA(),r)),this._messages},e.validate=function(r,o,i){var a=this;o===void 0&&(o={}),i===void 0&&(i=function(){});var s=r,l=o,u=i;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(v){var m=[],b={};function w(S){if(Array.isArray(S)){var x;m=(x=m).concat.apply(x,S)}else m.push(S)}for(var O=0;O");const o=je("form"),i=z(),a=z(0),s=()=>{var c;if((c=i.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(i.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(c="update")=>{wt(()=>{e.default&&t.isAutoWidth&&(c==="update"?a.value=s():c==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},u=()=>l("update");return jt(()=>{u()}),Yn(()=>{l("remove")}),_u(()=>u()),Le(a,(c,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Wr($(()=>{var c,d;return(d=(c=i.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!e)return null;const{isAutoWidth:f}=t;if(f){const h=n==null?void 0:n.autoLabelWidth,g=r==null?void 0:r.hasLabel,v={};if(g&&h&&h!=="auto"){const m=Math.max(0,Number.parseInt(h,10)-a.value),w=(r.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";m&&(v[w]=`${m}px`)}return B("div",{ref:i,class:[o.be("item","label-wrap")],style:v},[(c=e.default)==null?void 0:c.call(e)])}else return B(ut,{ref:i},[(d=e.default)==null?void 0:d.call(e)])}}});const GIe=de({name:"ElFormItem"}),qIe=de({...GIe,props:XIe,setup(t,{expose:e}){const n=t,r=Ro(),o=gt(Ip,void 0),i=gt(uc,void 0),a=$o(void 0,{formItem:!1}),s=je("form-item"),l=Si().value,u=z([]),c=z(""),d=xCe(c,100),f=z(""),h=z();let g,v=!1;const m=$(()=>n.labelPosition||(o==null?void 0:o.labelPosition)),b=$(()=>{if(m.value==="top")return{};const fe=so(n.labelWidth||(o==null?void 0:o.labelWidth)||"");return fe?{width:fe}:{}}),w=$(()=>{if(m.value==="top"||(o==null?void 0:o.inline))return{};if(!n.label&&!n.labelWidth&&k)return{};const fe=so(n.labelWidth||(o==null?void 0:o.labelWidth)||"");return!n.label&&!r.label?{marginLeft:fe}:{}}),O=$(()=>[s.b(),s.m(a.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",W.value||n.required),s.is("no-asterisk",o==null?void 0:o.hideRequiredAsterisk),(o==null?void 0:o.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:o==null?void 0:o.statusIcon,[s.m(`label-${m.value}`)]:m.value}]),S=$(()=>ir(n.inlineMessage)?n.inlineMessage:(o==null?void 0:o.inlineMessage)||!1),x=$(()=>[s.e("error"),{[s.em("error","inline")]:S.value}]),C=$(()=>n.prop?Ye(n.prop)?n.prop.join("."):n.prop:""),E=$(()=>!!(n.label||r.label)),T=$(()=>{var fe;return(fe=n.for)!=null?fe:u.value.length===1?u.value[0]:void 0}),M=$(()=>!T.value&&E.value),k=!!i,P=$(()=>{const fe=o==null?void 0:o.model;if(!(!fe||!n.prop))return Wy(fe,n.prop).value}),R=$(()=>{const{required:fe}=n,Ne=[];n.rules&&Ne.push(...Jo(n.rules));const $e=o==null?void 0:o.rules;if($e&&n.prop){const ue=Wy($e,n.prop).value;ue&&Ne.push(...Jo(ue))}if(fe!==void 0){const ue=Ne.map((G,ve)=>[G,ve]).filter(([G])=>Object.keys(G).includes("required"));if(ue.length>0)for(const[G,ve]of ue)G.required!==fe&&(Ne[ve]={...G,required:fe});else Ne.push({required:fe})}return Ne}),D=$(()=>R.value.length>0),F=fe=>R.value.filter($e=>!$e.trigger||!fe?!0:Ye($e.trigger)?$e.trigger.includes(fe):$e.trigger===fe).map(({trigger:$e,...ue})=>ue),W=$(()=>R.value.some(fe=>fe.required)),I=$(()=>{var fe;return d.value==="error"&&n.showMessage&&((fe=o==null?void 0:o.showMessage)!=null?fe:!0)}),Q=$(()=>`${n.label||""}${(o==null?void 0:o.labelSuffix)||""}`),L=fe=>{c.value=fe},H=fe=>{var Ne,$e;const{errors:ue,fields:G}=fe;(!ue||!G)&&console.error(fe),L("error"),f.value=ue?($e=(Ne=ue==null?void 0:ue[0])==null?void 0:Ne.message)!=null?$e:`${n.prop} is required`:"",o==null||o.emit("validate",n.prop,!1,f.value)},re=()=>{L("success"),o==null||o.emit("validate",n.prop,!0,"")},U=async fe=>{const Ne=C.value;return new Jb({[Ne]:fe}).validate({[Ne]:P.value},{firstFields:!0}).then(()=>(re(),!0)).catch(ue=>(H(ue),Promise.reject(ue)))},J=async(fe,Ne)=>{if(v||!n.prop)return!1;const $e=kt(Ne);if(!D.value)return Ne==null||Ne(!1),!1;const ue=F(fe);return ue.length===0?(Ne==null||Ne(!0),!0):(L("validating"),U(ue).then(()=>(Ne==null||Ne(!0),!0)).catch(G=>{const{fields:ve}=G;return Ne==null||Ne(!1,ve),$e?!1:Promise.reject(ve)}))},ie=()=>{L(""),f.value="",v=!1},te=async()=>{const fe=o==null?void 0:o.model;if(!fe||!n.prop)return;const Ne=Wy(fe,n.prop);v=!0,Ne.value=Vk(g),await wt(),ie(),v=!1},he=fe=>{u.value.includes(fe)||u.value.push(fe)},K=fe=>{u.value=u.value.filter(Ne=>Ne!==fe)};Le(()=>n.error,fe=>{f.value=fe||"",L(fe?"error":"")},{immediate:!0}),Le(()=>n.validateStatus,fe=>L(fe||""));const ne=pn({...Mo(n),$el:h,size:a,validateMessage:f,validateState:c,labelId:l,inputIds:u,isGroup:M,hasLabel:E,fieldValue:P,addInputId:he,removeInputId:K,resetField:te,clearValidate:ie,validate:J,propString:C});return mn(uc,ne),jt(()=>{n.prop&&(o==null||o.addField(ne),g=Vk(P.value))}),Yn(()=>{o==null||o.removeField(ne)}),e({size:a,validateMessage:f,validateState:c,validate:J,clearValidate:ie,resetField:te}),(fe,Ne)=>{var $e;return N(),Z("div",{ref_key:"formItemRef",ref:h,class:j(p(O)),role:p(M)?"group":void 0,"aria-labelledby":p(M)?p(l):void 0},[B(p(ZIe),{"is-auto-width":p(b).width==="auto","update-all":(($e=p(o))==null?void 0:$e.labelWidth)==="auto"},{default:V(()=>[p(E)?(N(),me(Jt(p(T)?"label":"div"),{key:0,id:p(l),for:p(T),class:j(p(s).e("label")),style:bt(p(b))},{default:V(()=>[ke(fe.$slots,"label",{label:p(Q)},()=>[We(ze(p(Q)),1)])]),_:3},8,["id","for","class","style"])):ge("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),ee("div",{class:j(p(s).e("content")),style:bt(p(w))},[ke(fe.$slots,"default"),B(Wz,{name:`${p(s).namespace.value}-zoom-in-top`},{default:V(()=>[p(I)?ke(fe.$slots,"error",{key:0,error:f.value},()=>[ee("div",{class:j(p(x))},ze(f.value),3)]):ge("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var YU=Ge(qIe,[["__file","form-item.vue"]]);const fs=Wt(pIe,{FormItem:YU}),hs=qr(YU),KIe=Ze({urlList:{type:we(Array),default:()=>Gr([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:we(String)}}),JIe={close:()=>!0,switch:t=>Pt(t),rotate:t=>Pt(t)},e3e=de({name:"ElImageViewer"}),t3e=de({...e3e,props:KIe,emits:JIe,setup(t,{expose:e,emit:n}){var r;const o=t,i={CONTAIN:{name:"contain",icon:uu(od)},ORIGINAL:{name:"original",icon:uu(gTe)}};let a,s="";const{t:l}=En(),u=je("image-viewer"),{nextZIndex:c}=um(),d=z(),f=z([]),h=kle(),g=z(!0),v=z(o.initialIndex),m=wr(i.CONTAIN),b=z({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),w=z((r=o.zIndex)!=null?r:c()),O=$(()=>{const{urlList:K}=o;return K.length<=1}),S=$(()=>v.value===0),x=$(()=>v.value===o.urlList.length-1),C=$(()=>o.urlList[v.value]),E=$(()=>[u.e("btn"),u.e("prev"),u.is("disabled",!o.infinite&&S.value)]),T=$(()=>[u.e("btn"),u.e("next"),u.is("disabled",!o.infinite&&x.value)]),M=$(()=>{const{scale:K,deg:ne,offsetX:fe,offsetY:Ne,enableTransition:$e}=b.value;let ue=fe/K,G=Ne/K;const ve=ne*Math.PI/180,q=Math.cos(ve),Ie=Math.sin(ve);ue=ue*q+G*Ie,G=G*q-fe/K*Ie;const Ee={transform:`scale(${K}) rotate(${ne}deg) translate(${ue}px, ${G}px)`,transition:$e?"transform .3s":""};return m.value.name===i.CONTAIN.name&&(Ee.maxWidth=Ee.maxHeight="100%"),Ee}),k=$(()=>`${v.value+1} / ${o.urlList.length}`);function P(){D(),a==null||a(),document.body.style.overflow=s,n("close")}function R(){const K=qc(fe=>{switch(fe.code){case st.esc:o.closeOnPressEscape&&P();break;case st.space:L();break;case st.left:re();break;case st.up:J("zoomIn");break;case st.right:U();break;case st.down:J("zoomOut");break}}),ne=qc(fe=>{const Ne=fe.deltaY||fe.deltaX;J(Ne<0?"zoomIn":"zoomOut",{zoomRate:o.zoomRate,enableTransition:!1})});h.run(()=>{pr(document,"keydown",K),pr(document,"wheel",ne)})}function D(){h.stop()}function F(){g.value=!1}function W(K){g.value=!1,K.target.alt=l("el.image.error")}function I(K){if(g.value||K.button!==0||!d.value)return;b.value.enableTransition=!1;const{offsetX:ne,offsetY:fe}=b.value,Ne=K.pageX,$e=K.pageY,ue=qc(ve=>{b.value={...b.value,offsetX:ne+ve.pageX-Ne,offsetY:fe+ve.pageY-$e}}),G=pr(document,"mousemove",ue);pr(document,"mouseup",()=>{G()}),K.preventDefault()}function Q(){b.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function L(){if(g.value)return;const K=gv(i),ne=Object.values(i),fe=m.value.name,$e=(ne.findIndex(ue=>ue.name===fe)+1)%K.length;m.value=i[K[$e]],Q()}function H(K){const ne=o.urlList.length;v.value=(K+ne)%ne}function re(){S.value&&!o.infinite||H(v.value-1)}function U(){x.value&&!o.infinite||H(v.value+1)}function J(K,ne={}){if(g.value)return;const{minScale:fe,maxScale:Ne}=o,{zoomRate:$e,rotateDeg:ue,enableTransition:G}={zoomRate:o.zoomRate,rotateDeg:90,enableTransition:!0,...ne};switch(K){case"zoomOut":b.value.scale>fe&&(b.value.scale=Number.parseFloat((b.value.scale/$e).toFixed(3)));break;case"zoomIn":b.value.scale0)return K.preventDefault(),!1}}return Le(C,()=>{wt(()=>{const K=f.value[0];K!=null&&K.complete||(g.value=!0)})}),Le(v,K=>{Q(),n("switch",K)}),jt(()=>{R(),a=pr("wheel",he,{passive:!1}),s=document.body.style.overflow,document.body.style.overflow="hidden"}),e({setActiveItem:H}),(K,ne)=>(N(),me(p(fm),{to:"body",disabled:!K.teleported},{default:V(()=>[B(Xo,{name:"viewer-fade",appear:""},{default:V(()=>[ee("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:j(p(u).e("wrapper")),style:bt({zIndex:w.value})},[B(p(dm),{loop:"",trapped:"","focus-trap-el":d.value,"focus-start-el":"container",onFocusoutPrevented:ie,onReleaseRequested:te},{default:V(()=>[ee("div",{class:j(p(u).e("mask")),onClick:Rt(fe=>K.hideOnClickModal&&P(),["self"])},null,10,["onClick"]),ge(" CLOSE "),ee("span",{class:j([p(u).e("btn"),p(u).e("close")]),onClick:P},[B(p(Ot),null,{default:V(()=>[B(p(fa))]),_:1})],2),ge(" ARROW "),p(O)?ge("v-if",!0):(N(),Z(ut,{key:0},[ee("span",{class:j(p(E)),onClick:re},[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1})],2),ee("span",{class:j(p(T)),onClick:U},[B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})],2)],64)),K.$slots.progress||K.showProgress?(N(),Z("div",{key:1,class:j([p(u).e("btn"),p(u).e("progress")])},[ke(K.$slots,"progress",{activeIndex:v.value,total:K.urlList.length},()=>[We(ze(p(k)),1)])],2)):ge("v-if",!0),ge(" ACTIONS "),ee("div",{class:j([p(u).e("btn"),p(u).e("actions")])},[ee("div",{class:j(p(u).e("actions__inner"))},[ke(K.$slots,"toolbar",{actions:J,prev:re,next:U,reset:L,activeIndex:v.value,setActiveItem:H},()=>[B(p(Ot),{onClick:fe=>J("zoomOut")},{default:V(()=>[B(p(DTe))]),_:1},8,["onClick"]),B(p(Ot),{onClick:fe=>J("zoomIn")},{default:V(()=>[B(p(HQ))]),_:1},8,["onClick"]),ee("i",{class:j(p(u).e("actions__divider"))},null,2),B(p(Ot),{onClick:L},{default:V(()=>[(N(),me(Jt(p(m).icon)))]),_:1}),ee("i",{class:j(p(u).e("actions__divider"))},null,2),B(p(Ot),{onClick:fe=>J("anticlockwise")},{default:V(()=>[B(p(cTe))]),_:1},8,["onClick"]),B(p(Ot),{onClick:fe=>J("clockwise")},{default:V(()=>[B(p(jQ))]),_:1},8,["onClick"])])],2)],2),ge(" CANVAS "),ee("div",{class:j(p(u).e("canvas"))},[(N(!0),Z(ut,null,Xt(K.urlList,(fe,Ne)=>(N(),Z(ut,{key:Ne},[Ne===v.value?(N(),Z("img",{key:0,ref_for:!0,ref:$e=>f.value[Ne]=$e,src:fe,style:bt(p(M)),class:j(p(u).e("img")),crossorigin:K.crossorigin,onLoad:F,onError:W,onMousedown:I},null,46,["src","crossorigin"])):ge("v-if",!0)],64))),128))],2),ke(K.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}});var n3e=Ge(t3e,[["__file","image-viewer.vue"]]);const XU=Wt(n3e),r3e=Ze({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:we([String,Object])},previewSrcList:{type:we(Array),default:()=>Gr([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:we(String)}}),o3e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>Pt(t),close:()=>!0,show:()=>!0},i3e=de({name:"ElImage",inheritAttrs:!1}),a3e=de({...i3e,props:r3e,emits:o3e,setup(t,{expose:e,emit:n}){const r=t,{t:o}=En(),i=je("image"),a=vd(),s=$(()=>hv(Object.entries(a).filter(([I])=>/^(data-|on[A-Z])/i.test(I)||["id","style"].includes(I)))),l=yC({excludeListeners:!0,excludeKeys:$(()=>Object.keys(s.value))}),u=z(),c=z(!1),d=z(!0),f=z(!1),h=z(),g=z(),v=kn&&"loading"in HTMLImageElement.prototype;let m;const b=$(()=>[i.e("inner"),O.value&&i.e("preview"),d.value&&i.is("loading")]),w=$(()=>{const{fit:I}=r;return kn&&I?{objectFit:I}:{}}),O=$(()=>{const{previewSrcList:I}=r;return Ye(I)&&I.length>0}),S=$(()=>{const{previewSrcList:I,initialIndex:Q}=r;let L=Q;return Q>I.length-1&&(L=0),L}),x=$(()=>r.loading==="eager"?!1:!v&&r.loading==="lazy"||r.lazy),C=()=>{!kn||(d.value=!0,c.value=!1,u.value=r.src)};function E(I){d.value=!1,c.value=!1,n("load",I)}function T(I){d.value=!1,c.value=!0,n("error",I)}function M(I){I&&(C(),R())}const k=OQ(M,200,!0);async function P(){var I;if(!kn)return;await wt();const{scrollContainer:Q}=r;if(Aa(Q))g.value=Q;else if(St(Q)&&Q!=="")g.value=(I=document.querySelector(Q))!=null?I:void 0;else if(h.value){const H=S$(h.value);g.value=Qb(H)?void 0:H}const{stop:L}=$Ce(h,([H])=>{k(H.isIntersecting)},{root:g});m=L}function R(){!kn||!k||(m==null||m(),g.value=void 0,m=void 0)}function D(){!O.value||(f.value=!0,n("show"))}function F(){f.value=!1,n("close")}function W(I){n("switch",I)}return Le(()=>r.src,()=>{x.value?(d.value=!0,c.value=!1,R(),P()):C()}),jt(()=>{x.value?P():C()}),e({showPreview:D}),(I,Q)=>(N(),Z("div",rn({ref_key:"container",ref:h},p(s),{class:[p(i).b(),I.$attrs.class]}),[c.value?ke(I.$slots,"error",{key:0},()=>[ee("div",{class:j(p(i).e("error"))},ze(p(o)("el.image.error")),3)]):(N(),Z(ut,{key:1},[u.value!==void 0?(N(),Z("img",rn({key:0},p(l),{src:u.value,loading:I.loading,style:p(w),class:p(b),crossorigin:I.crossorigin,onClick:D,onLoad:E,onError:T}),null,16,["src","loading","crossorigin"])):ge("v-if",!0),d.value?(N(),Z("div",{key:1,class:j(p(i).e("wrapper"))},[ke(I.$slots,"placeholder",{},()=>[ee("div",{class:j(p(i).e("placeholder"))},null,2)])],2)):ge("v-if",!0)],64)),p(O)?(N(),Z(ut,{key:2},[f.value?(N(),me(p(XU),{key:0,"z-index":I.zIndex,"initial-index":p(S),infinite:I.infinite,"zoom-rate":I.zoomRate,"min-scale":I.minScale,"max-scale":I.maxScale,"show-progress":I.showProgress,"url-list":I.previewSrcList,crossorigin:I.crossorigin,"hide-on-click-modal":I.hideOnClickModal,teleported:I.previewTeleported,"close-on-press-escape":I.closeOnPressEscape,onClose:F,onSwitch:W},ha({toolbar:V(L=>[ke(I.$slots,"toolbar",Is(ic(L)))]),default:V(()=>[I.$slots.viewer?(N(),Z("div",{key:0},[ke(I.$slots,"viewer")])):ge("v-if",!0)]),_:2},[I.$slots.progress?{name:"progress",fn:V(L=>[ke(I.$slots,"progress",Is(ic(L)))])}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):ge("v-if",!0)],64)):ge("v-if",!0)],16))}});var s3e=Ge(a3e,[["__file","image.vue"]]);const ZU=Wt(s3e),l3e=Ze({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:Fo,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:t=>t===null||Pt(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...Yi(["ariaLabel"]),inputmode:{type:we(String),default:void 0},align:{type:we(String),default:"center"},disabledScientific:Boolean}),u3e={[ln]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Lo]:t=>Pt(t)||gr(t),[zt]:t=>Pt(t)||gr(t)},c3e=de({name:"ElInputNumber"}),d3e=de({...c3e,props:l3e,emits:u3e,setup(t,{expose:e,emit:n}){const r=t,{t:o}=En(),i=je("input-number"),a=z(),s=pn({currentValue:r.modelValue,userInput:null}),{formItem:l}=Xi(),u=$(()=>Pt(r.modelValue)&&r.modelValue<=r.min),c=$(()=>Pt(r.modelValue)&&r.modelValue>=r.max),d=$(()=>{const I=b(r.step);return Sn(r.precision)?Math.max(b(r.modelValue),I):(I>r.precision,r.precision)}),f=$(()=>r.controls&&r.controlsPosition==="right"),h=$o(),g=Zi(),v=$(()=>{if(s.userInput!==null)return s.userInput;let I=s.currentValue;if(gr(I))return"";if(Pt(I)){if(Number.isNaN(I))return"";Sn(r.precision)||(I=I.toFixed(r.precision))}return I}),m=(I,Q)=>{if(Sn(Q)&&(Q=d.value),Q===0)return Math.round(I);let L=String(I);const H=L.indexOf(".");if(H===-1||!L.replace(".","").split("")[H+Q])return I;const J=L.length;return L.charAt(J-1)==="5"&&(L=`${L.slice(0,Math.max(0,J-1))}6`),Number.parseFloat(Number(L).toFixed(Q))},b=I=>{if(gr(I))return 0;const Q=I.toString(),L=Q.indexOf(".");let H=0;return L!==-1&&(H=Q.length-L-1),H},w=(I,Q=1)=>Pt(I)?I>=Number.MAX_SAFE_INTEGER&&Q===1||I<=Number.MIN_SAFE_INTEGER&&Q===-1?I:m(I+r.step*Q):s.currentValue,O=I=>{var Q;const L=I;if(r.disabledScientific&&["e","E"].includes(L.key)){L.preventDefault();return}const H={[st.up]:()=>{L.preventDefault(),S()},[st.down]:()=>{L.preventDefault(),x()}};(Q=H[L.key])==null||Q.call(H)},S=()=>{if(r.readonly||g.value||c.value)return;const I=Number(v.value)||0,Q=w(I);E(Q),n(Lo,s.currentValue),F()},x=()=>{if(r.readonly||g.value||u.value)return;const I=Number(v.value)||0,Q=w(I,-1);E(Q),n(Lo,s.currentValue),F()},C=(I,Q)=>{const{max:L,min:H,step:re,precision:U,stepStrictly:J,valueOnClear:ie}=r;LL||teL?L:H,Q&&n(zt,te)),te},E=(I,Q=!0)=>{var L;const H=s.currentValue,re=C(I);if(!Q){n(zt,re);return}H===re&&I||(s.userInput=null,n(zt,re),H!==re&&n(ln,re,H),r.validateEvent&&((L=l==null?void 0:l.validate)==null||L.call(l,"change").catch(U=>void 0)),s.currentValue=re)},T=I=>{s.userInput=I;const Q=I===""?null:Number(I);n(Lo,Q),E(Q,!1)},M=I=>{const Q=I!==""?Number(I):"";(Pt(Q)&&!Number.isNaN(Q)||I==="")&&E(Q),F(),s.userInput=null},k=()=>{var I,Q;(Q=(I=a.value)==null?void 0:I.focus)==null||Q.call(I)},P=()=>{var I,Q;(Q=(I=a.value)==null?void 0:I.blur)==null||Q.call(I)},R=I=>{n("focus",I)},D=I=>{var Q,L;s.userInput=null,s.currentValue===null&&((Q=a.value)==null?void 0:Q.input)&&(a.value.input.value=""),n("blur",I),r.validateEvent&&((L=l==null?void 0:l.validate)==null||L.call(l,"blur").catch(H=>void 0))},F=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},W=I=>{document.activeElement===I.target&&I.preventDefault()};return Le(()=>r.modelValue,(I,Q)=>{const L=C(I,!0);s.userInput===null&&L!==Q&&(s.currentValue=L)},{immediate:!0}),Le(()=>r.precision,()=>{s.currentValue=C(r.modelValue)}),jt(()=>{var I;const{min:Q,max:L,modelValue:H}=r,re=(I=a.value)==null?void 0:I.input;if(re.setAttribute("role","spinbutton"),Number.isFinite(L)?re.setAttribute("aria-valuemax",String(L)):re.removeAttribute("aria-valuemax"),Number.isFinite(Q)?re.setAttribute("aria-valuemin",String(Q)):re.removeAttribute("aria-valuemin"),re.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),re.setAttribute("aria-disabled",String(g.value)),!Pt(H)&&H!=null){let U=Number(H);Number.isNaN(U)&&(U=null),n(zt,U)}re.addEventListener("wheel",W,{passive:!1})}),_u(()=>{var I,Q;const L=(I=a.value)==null?void 0:I.input;L==null||L.setAttribute("aria-valuenow",`${(Q=s.currentValue)!=null?Q:""}`)}),e({focus:k,blur:P}),(I,Q)=>(N(),Z("div",{class:j([p(i).b(),p(i).m(p(h)),p(i).is("disabled",p(g)),p(i).is("without-controls",!I.controls),p(i).is("controls-right",p(f)),p(i).is(I.align,!!I.align)]),onDragstart:Rt(()=>{},["prevent"])},[I.controls?Yt((N(),Z("span",{key:0,role:"button","aria-label":p(o)("el.inputNumber.decrease"),class:j([p(i).e("decrease"),p(i).is("disabled",p(u))]),onKeydown:yr(x,["enter"])},[ke(I.$slots,"decrease-icon",{},()=>[B(p(Ot),null,{default:V(()=>[p(f)?(N(),me(p(wc),{key:0})):(N(),me(p(KEe),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(zw),x]]):ge("v-if",!0),I.controls?Yt((N(),Z("span",{key:1,role:"button","aria-label":p(o)("el.inputNumber.increase"),class:j([p(i).e("increase"),p(i).is("disabled",p(c))]),onKeydown:yr(S,["enter"])},[ke(I.$slots,"increase-icon",{},()=>[B(p(Ot),null,{default:V(()=>[p(f)?(N(),me(p(pC),{key:0})):(N(),me(p(Lw),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(zw),S]]):ge("v-if",!0),B(p(ao),{id:I.id,ref_key:"input",ref:a,type:"number",step:I.step,"model-value":p(v),placeholder:I.placeholder,readonly:I.readonly,disabled:p(g),size:p(h),max:I.max,min:I.min,name:I.name,"aria-label":I.ariaLabel,"validate-event":!1,inputmode:I.inputmode,onKeydown:O,onBlur:D,onFocus:R,onInput:T,onChange:M},ha({_:2},[I.$slots.prefix?{name:"prefix",fn:V(()=>[ke(I.$slots,"prefix")])}:void 0,I.$slots.suffix?{name:"suffix",fn:V(()=>[ke(I.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],42,["onDragstart"]))}});var f3e=Ge(d3e,[["__file","input-number.vue"]]);const dR=Wt(f3e),h3e=Ze({modelValue:{type:we(Array)},max:Number,tagType:{...ad.type,default:"info"},tagEffect:ad.effect,trigger:{type:we(String),default:st.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Fo,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},saveOnBlur:{type:Boolean,default:!0},ariaLabel:String}),p3e={[zt]:t=>Ye(t)||Sn(t),[ln]:t=>Ye(t)||Sn(t),[Lo]:t=>St(t),"add-tag":t=>St(t)||Ye(t),"remove-tag":t=>St(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function g3e({props:t,emit:e,formItem:n}){const r=Zi(),o=$o(),i=wr(),a=z(),s=$(()=>["small"].includes(o.value)?"small":"default"),l=$(()=>{var P;return(P=t.modelValue)!=null&&P.length?void 0:t.placeholder}),u=$(()=>!(t.readonly||r.value)),c=$(()=>{var P,R;return Sn(t.max)?!1:((R=(P=t.modelValue)==null?void 0:P.length)!=null?R:0)>=t.max}),d=P=>{var R;const D=[...(R=t.modelValue)!=null?R:[],...Jo(P)];e(zt,D),e(ln,D),e("add-tag",P),a.value=void 0},f=P=>{var R,D;const F=P.split(t.delimiter).filter(W=>W&&W!==P);if(t.max){const W=t.max-((D=(R=t.modelValue)==null?void 0:R.length)!=null?D:0);F.splice(W)}return F.length===1?F[0]:F},h=P=>{if(c.value){a.value=void 0;return}if(!E.value){if(t.delimiter&&a.value){const R=f(a.value);R.length&&d(R)}e(Lo,P.target.value)}},g=P=>{var R;if(!E.value)switch(P.code){case t.trigger:P.preventDefault(),P.stopPropagation(),v();break;case st.numpadEnter:t.trigger===st.enter&&(P.preventDefault(),P.stopPropagation(),v());break;case st.backspace:!a.value&&((R=t.modelValue)==null?void 0:R.length)&&(P.preventDefault(),P.stopPropagation(),m(t.modelValue.length-1));break}},v=()=>{var P;const R=(P=a.value)==null?void 0:P.trim();!R||c.value||d(R)},m=P=>{var R;const D=((R=t.modelValue)!=null?R:[]).slice(),[F]=D.splice(P,1);e(zt,D),e(ln,D),e("remove-tag",F)},b=()=>{a.value=void 0,e(zt,void 0),e(ln,void 0),e("clear")},w=(P,R,D)=>{var F;const W=((F=t.modelValue)!=null?F:[]).slice(),[I]=W.splice(P,1),Q=R>P&&D==="before"?-1:R{var P;(P=i.value)==null||P.focus()},S=()=>{var P;(P=i.value)==null||P.blur()},{wrapperRef:x,isFocused:C}=qf(i,{disabled:r,afterBlur(){var P;t.saveOnBlur?v():a.value=void 0,t.validateEvent&&((P=n==null?void 0:n.validate)==null||P.call(n,"blur").catch(R=>void 0))}}),{isComposing:E,handleCompositionStart:T,handleCompositionUpdate:M,handleCompositionEnd:k}=Zb({afterComposition:h});return Le(()=>t.modelValue,()=>{var P;t.validateEvent&&((P=n==null?void 0:n.validate)==null||P.call(n,ln).catch(R=>void 0))}),{inputRef:i,wrapperRef:x,isFocused:C,isComposing:E,inputValue:a,size:o,tagSize:s,placeholder:l,closable:u,disabled:r,inputLimit:c,handleDragged:w,handleInput:h,handleKeydown:g,handleAddTag:v,handleRemoveTag:m,handleClear:b,handleCompositionStart:T,handleCompositionUpdate:M,handleCompositionEnd:k,focus:O,blur:S}}function v3e(){const t=z(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function fR(){const t=wr(),e=z(0),n=11,r=$(()=>({minWidth:`${Math.max(e.value,n)}px`}));return Wr(t,()=>{var i,a;e.value=(a=(i=t.value)==null?void 0:i.getBoundingClientRect().width)!=null?a:0}),{calculatorRef:t,calculatorWidth:e,inputStyle:r}}function m3e({wrapperRef:t,handleDragged:e,afterDragged:n}){const r=je("input-tag"),o=wr(),i=z(!1);let a,s,l,u;function c(g){return`.${r.e("inner")} .${r.namespace.value}-tag:nth-child(${g+1})`}function d(g,v){a=v,s=t.value.querySelector(c(v)),s&&(s.style.opacity="0.5"),g.dataTransfer.effectAllowed="move"}function f(g,v){if(l=v,g.preventDefault(),g.dataTransfer.dropEffect="move",Sn(a)||a===v){i.value=!1;return}const m=t.value.querySelector(c(v)).getBoundingClientRect(),b=a+1!==v,w=a-1!==v,O=g.clientX-m.left,S=b?w?.5:1:-1,x=w?b?.5:0:1;O<=m.width*S?u="before":O>m.width*x?u="after":u=void 0;const C=t.value.querySelector(`.${r.e("inner")}`),E=C.getBoundingClientRect(),T=Number.parseFloat(Yc(C,"gap"))/2,M=m.top-E.top;let k=-9999;if(u==="before")k=Math.max(m.left-E.left-T,Math.floor(-T/2));else if(u==="after"){const P=m.right-E.left;k=P+(E.width===P?Math.floor(T/2):T)}$Q(o.value,{top:`${M}px`,left:`${k}px`}),i.value=!!u}function h(g){g.preventDefault(),s&&(s.style.opacity=""),u&&!Sn(a)&&!Sn(l)&&a!==l&&e(a,l,u),i.value=!1,a=void 0,s=null,l=void 0,u=void 0,n==null||n()}return{dropIndicatorRef:o,showDropIndicator:i,handleDragStart:d,handleDragOver:f,handleDragEnd:h}}function y3e({props:t,isFocused:e,hovering:n,disabled:r,inputValue:o,size:i,validateState:a,validateIcon:s,needStatusIcon:l}){const u=vd(),c=Ro(),d=je("input-tag"),f=je("input"),h=$(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",r.value),d.m(i.value),d.e("wrapper"),u.class]),g=$(()=>[u.style]),v=$(()=>{var w,O;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((w=t.modelValue)!=null&&w.length)&&!c.prefix),d.is("right-space",!((O=t.modelValue)!=null&&O.length)&&!b.value)]}),m=$(()=>{var w;return t.clearable&&!r.value&&!t.readonly&&(((w=t.modelValue)==null?void 0:w.length)||o.value)&&(e.value||n.value)}),b=$(()=>c.suffix||m.value||a.value&&s.value&&l.value);return{ns:d,nsInput:f,containerKls:h,containerStyle:g,innerKls:v,showClear:m,showSuffix:b}}const b3e=de({name:"ElInputTag",inheritAttrs:!1}),_3e=de({...b3e,props:h3e,emits:p3e,setup(t,{expose:e,emit:n}){const r=t,o=yC(),i=Ro(),{form:a,formItem:s}=Xi(),{inputId:l}=Bl(r,{formItemContext:s}),u=$(()=>{var G;return(G=a==null?void 0:a.statusIcon)!=null?G:!1}),c=$(()=>(s==null?void 0:s.validateState)||""),d=$(()=>c.value&&mC[c.value]),{inputRef:f,wrapperRef:h,isFocused:g,inputValue:v,size:m,tagSize:b,placeholder:w,closable:O,disabled:S,handleDragged:x,handleInput:C,handleKeydown:E,handleRemoveTag:T,handleClear:M,handleCompositionStart:k,handleCompositionUpdate:P,handleCompositionEnd:R,focus:D,blur:F}=g3e({props:r,emit:n,formItem:s}),{hovering:W,handleMouseEnter:I,handleMouseLeave:Q}=v3e(),{calculatorRef:L,inputStyle:H}=fR(),{dropIndicatorRef:re,showDropIndicator:U,handleDragStart:J,handleDragOver:ie,handleDragEnd:te}=m3e({wrapperRef:h,handleDragged:x,afterDragged:D}),{ns:he,nsInput:K,containerKls:ne,containerStyle:fe,innerKls:Ne,showClear:$e,showSuffix:ue}=y3e({props:r,hovering:W,isFocused:g,inputValue:v,disabled:S,size:m,validateState:c,validateIcon:d,needStatusIcon:u});return e({focus:D,blur:F}),(G,ve)=>(N(),Z("div",{ref_key:"wrapperRef",ref:h,class:j(p(ne)),style:bt(p(fe)),onMouseenter:p(I),onMouseleave:p(Q)},[p(i).prefix?(N(),Z("div",{key:0,class:j(p(he).e("prefix"))},[ke(G.$slots,"prefix")],2)):ge("v-if",!0),ee("div",{class:j(p(Ne))},[(N(!0),Z(ut,null,Xt(G.modelValue,(q,Ie)=>(N(),me(p(Zs),{key:Ie,size:p(b),closable:p(O),type:G.tagType,effect:G.tagEffect,draggable:p(O)&&G.draggable,"disable-transitions":"",onClose:Ee=>p(T)(Ie),onDragstart:Ee=>p(J)(Ee,Ie),onDragover:Ee=>p(ie)(Ee,Ie),onDragend:p(te),onDrop:Rt(()=>{},["stop"])},{default:V(()=>[ke(G.$slots,"tag",{value:q,index:Ie},()=>[We(ze(q),1)])]),_:2},1032,["size","closable","type","effect","draggable","onClose","onDragstart","onDragover","onDragend","onDrop"]))),128)),ee("div",{class:j(p(he).e("input-wrapper"))},[Yt(ee("input",rn({id:p(l),ref_key:"inputRef",ref:f,"onUpdate:modelValue":q=>Pr(v)?v.value=q:null},p(o),{type:"text",minlength:G.minlength,maxlength:G.maxlength,disabled:p(S),readonly:G.readonly,autocomplete:G.autocomplete,tabindex:G.tabindex,placeholder:p(w),autofocus:G.autofocus,ariaLabel:G.ariaLabel,class:p(he).e("input"),style:p(H),onCompositionstart:p(k),onCompositionupdate:p(P),onCompositionend:p(R),onInput:p(C),onKeydown:p(E)}),null,16,["id","onUpdate:modelValue","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onKeydown"]),[[Ux,p(v)]]),ee("span",{ref_key:"calculatorRef",ref:L,"aria-hidden":"true",class:j(p(he).e("input-calculator")),textContent:ze(p(v))},null,10,["textContent"])],2),Yt(ee("div",{ref_key:"dropIndicatorRef",ref:re,class:j(p(he).e("drop-indicator"))},null,2),[[Bn,p(U)]])],2),p(ue)?(N(),Z("div",{key:1,class:j(p(he).e("suffix"))},[ke(G.$slots,"suffix"),p($e)?(N(),me(p(Ot),{key:0,class:j([p(he).e("icon"),p(he).e("clear")]),onMousedown:Rt(p(or),["prevent"]),onClick:p(M)},{default:V(()=>[B(p(Cd))]),_:1},8,["class","onMousedown","onClick"])):ge("v-if",!0),p(c)&&p(d)&&p(u)?(N(),me(p(Ot),{key:1,class:j([p(K).e("icon"),p(K).e("validateIcon"),p(K).is("loading",p(c)==="validating")])},{default:V(()=>[(N(),me(Jt(p(d))))]),_:1},8,["class"])):ge("v-if",!0)],2)):ge("v-if",!0)],46,["onMouseenter","onMouseleave"]))}});var O3e=Ge(_3e,[["__file","input-tag.vue"]]);const w3e=Wt(O3e),S3e=Ze({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:cr}}),x3e={click:t=>t instanceof MouseEvent},C3e=de({name:"ElLink"}),E3e=de({...C3e,props:S3e,emits:x3e,setup(t,{emit:e}){const n=t,r=cm("link");Kc({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},$(()=>ir(n.underline)));const o=je("link"),i=$(()=>{var l,u,c;return[o.b(),o.m((c=(u=n.type)!=null?u:(l=r.value)==null?void 0:l.type)!=null?c:"default"),o.is("disabled",n.disabled),o.is("underline",a.value==="always"),o.is("hover-underline",a.value==="hover"&&!n.disabled)]}),a=$(()=>{var l,u,c;return ir(n.underline)?n.underline?"hover":"never":(c=(u=n.underline)!=null?u:(l=r.value)==null?void 0:l.underline)!=null?c:"hover"});function s(l){n.disabled||e("click",l)}return(l,u)=>(N(),Z("a",{class:j(p(i)),href:l.disabled||!l.href?void 0:l.href,target:l.disabled||!l.href?void 0:l.target,onClick:s},[l.icon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(l.icon)))]),_:1})):ge("v-if",!0),l.$slots.default?(N(),Z("span",{key:1,class:j(p(o).e("inner"))},[ke(l.$slots,"default")],2)):ge("v-if",!0),l.$slots.icon?ke(l.$slots,"icon",{key:2}):ge("v-if",!0)],10,["href","target"]))}});var T3e=Ge(E3e,[["__file","link.vue"]]);const k3e=Wt(T3e);class A3e{constructor(e,n){this.parent=e,this.domNode=n,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",r=>{let o=!1;switch(r.code){case st.down:{this.gotoSubIndex(this.subIndex+1),o=!0;break}case st.up:{this.gotoSubIndex(this.subIndex-1),o=!0;break}case st.tab:{z1(e,"mouseleave");break}case st.enter:case st.numpadEnter:case st.space:{o=!0,r.currentTarget.click();break}}return o&&(r.preventDefault(),r.stopPropagation()),!1})})}}class P3e{constructor(e,n){this.domNode=e,this.submenu=null,this.submenu=null,this.init(n)}init(e){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(`.${e}-menu`);n&&(this.submenu=new A3e(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let n=!1;switch(e.code){case st.down:{z1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case st.up:{z1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case st.tab:{z1(e.currentTarget,"mouseleave");break}case st.enter:case st.numpadEnter:case st.space:{n=!0,e.currentTarget.click();break}}n&&e.preventDefault()})}}class N3e{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(r=>{r.nodeType===1&&new P3e(r,e)})}}const M3e=de({name:"ElMenuCollapseTransition"}),$3e=de({...M3e,setup(t){const e=je("menu"),n={onBeforeEnter:r=>r.style.opacity="0.2",onEnter(r,o){pl(r,`${e.namespace.value}-opacity-transition`),r.style.opacity="1",o()},onAfterEnter(r){ca(r,`${e.namespace.value}-opacity-transition`),r.style.opacity=""},onBeforeLeave(r){r.dataset||(r.dataset={}),Ka(r,e.m("collapse"))?(ca(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),pl(r,e.m("collapse"))):(pl(r,e.m("collapse")),r.dataset.oldOverflow=r.style.overflow,r.dataset.scrollWidth=r.clientWidth.toString(),ca(r,e.m("collapse"))),r.style.width=`${r.scrollWidth}px`,r.style.overflow="hidden"},onLeave(r){pl(r,"horizontal-collapse-transition"),r.style.width=`${r.dataset.scrollWidth}px`}};return(r,o)=>(N(),me(Xo,rn({mode:"out-in"},p(n)),{default:V(()=>[ke(r.$slots,"default")]),_:3},16))}});var R3e=Ge($3e,[["__file","menu-collapse-transition.vue"]]);function GU(t,e){const n=$(()=>{let o=t.parent;const i=[e.value];for(;o.type.name!=="ElMenu";)o.props.index&&i.unshift(o.props.index),o=o.parent;return i});return{parentMenu:$(()=>{let o=t.parent;for(;o&&!["ElMenu","ElSubMenu"].includes(o.type.name);)o=o.parent;return o}),indexPath:n}}function D3e(t){return $(()=>{const n=t.backgroundColor;return n?new Pg(n).shade(20).toString():""})}const qU=(t,e)=>{const n=je("menu");return $(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":D3e(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},hR="rootMenu",Hw="subMenu:",I3e=Ze({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:cr},expandOpenIcon:{type:cr},collapseCloseIcon:{type:cr},collapseOpenIcon:{type:cr}}),l2="ElSubMenu";var pR=de({name:l2,props:I3e,setup(t,{slots:e,expose:n}){const r=Kt(),{indexPath:o,parentMenu:i}=GU(r,$(()=>t.index)),a=je("menu"),s=je("sub-menu"),l=gt(hR);l||Ao(l2,"can not inject root menu");const u=gt(`${Hw}${i.value.uid}`);u||Ao(l2,"can not inject sub menu");const c=z({}),d=z({});let f;const h=z(!1),g=z(),v=z(),m=$(()=>T.value==="horizontal"&&w.value?"bottom-start":"right-start"),b=$(()=>T.value==="horizontal"&&w.value||T.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?C.value?t.expandOpenIcon:t.expandCloseIcon:wc:t.collapseCloseIcon&&t.collapseOpenIcon?C.value?t.collapseOpenIcon:t.collapseCloseIcon:da),w=$(()=>u.level===0),O=$(()=>{const U=t.teleported;return Sn(U)?w.value:U}),S=$(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),x=$(()=>T.value==="horizontal"&&w.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),C=$(()=>l.openedMenus.includes(t.index)),E=$(()=>[...Object.values(c.value),...Object.values(d.value)].some(({active:U})=>U)),T=$(()=>l.props.mode),M=$(()=>l.props.persistent),k=pn({index:t.index,indexPath:o,active:E}),P=qU(l.props,u.level+1),R=$(()=>{var U;return(U=t.popperOffset)!=null?U:l.props.popperOffset}),D=$(()=>{var U;return(U=t.popperClass)!=null?U:l.props.popperClass}),F=$(()=>{var U;return(U=t.showTimeout)!=null?U:l.props.showTimeout}),W=$(()=>{var U;return(U=t.hideTimeout)!=null?U:l.props.hideTimeout}),I=()=>{var U,J,ie;return(ie=(J=(U=v.value)==null?void 0:U.popperRef)==null?void 0:J.popperInstanceRef)==null?void 0:ie.destroy()},Q=U=>{U||I()},L=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:o.value,active:E.value})},H=(U,J=F.value)=>{var ie;if(U.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||t.disabled){u.mouseInChild.value=!0;return}u.mouseInChild.value=!0,f==null||f(),{stop:f}=vp(()=>{l.openMenu(t.index,o.value)},J),O.value&&((ie=i.value.vnode.el)==null||ie.dispatchEvent(new MouseEvent("mouseenter")))}},re=(U=!1)=>{var J;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){u.mouseInChild.value=!1;return}f==null||f(),u.mouseInChild.value=!1,{stop:f}=vp(()=>!h.value&&l.closeMenu(t.index,o.value),W.value),O.value&&U&&((J=u.handleMouseleave)==null||J.call(u,!0))};Le(()=>l.props.collapse,U=>Q(Boolean(U)));{const U=ie=>{d.value[ie.index]=ie},J=ie=>{delete d.value[ie.index]};mn(`${Hw}${r.uid}`,{addSubMenu:U,removeSubMenu:J,handleMouseleave:re,mouseInChild:h,level:u.level+1})}return n({opened:C}),jt(()=>{l.addSubMenu(k),u.addSubMenu(k)}),Yn(()=>{u.removeSubMenu(k),l.removeSubMenu(k)}),()=>{var U;const J=[(U=e.title)==null?void 0:U.call(e),At(Ot,{class:s.e("icon-arrow"),style:{transform:C.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>St(b.value)?At(r.appContext.components[b.value]):At(b.value)})],ie=l.isMenuPopup?At(Zo,{ref:v,visible:C.value,effect:"light",pure:!0,offset:R.value,showArrow:!1,persistent:M.value,popperClass:D.value,placement:m.value,teleported:O.value,fallbackPlacements:x.value,transition:S.value,gpuAcceleration:!1},{content:()=>{var te;return At("div",{class:[a.m(T.value),a.m("popup-container"),D.value],onMouseenter:he=>H(he,100),onMouseleave:()=>re(!0),onFocus:he=>H(he,100)},[At("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${m.value}`)],style:P.value},[(te=e.default)==null?void 0:te.call(e)])])},default:()=>At("div",{class:s.e("title"),onClick:L},J)}):At(ut,{},[At("div",{class:s.e("title"),ref:g,onClick:L},J),At(CC,{},{default:()=>{var te;return Yt(At("ul",{role:"menu",class:[a.b(),a.m("inline")],style:P.value},[(te=e.default)==null?void 0:te.call(e)]),[[Bn,C.value]])}})]);return At("li",{class:[s.b(),s.is("active",E.value),s.is("opened",C.value),s.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:C.value,onMouseenter:H,onMouseleave:()=>re(),onFocus:H},[ie])}}});const L3e=Ze({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:we(Array),default:()=>Gr([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:cr,default:()=>tTe},popperEffect:{type:we(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),u2=t=>Ye(t)&&t.every(e=>St(e)),B3e={close:(t,e)=>St(t)&&u2(e),open:(t,e)=>St(t)&&u2(e),select:(t,e,n,r)=>St(t)&&u2(e)&&Zt(n)&&(Sn(r)||r instanceof Promise)};var F3e=de({name:"ElMenu",props:L3e,emits:B3e,setup(t,{emit:e,slots:n,expose:r}){const o=Kt(),i=o.appContext.config.globalProperties.$router,a=z(),s=z(),l=je("menu"),u=je("sub-menu");let c=64;const d=z(-1),f=z(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),h=z(t.defaultActive),g=z({}),v=z({}),m=$(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),b=()=>{const Q=h.value&&g.value[h.value];if(!Q||t.mode==="horizontal"||t.collapse)return;Q.indexPath.forEach(H=>{const re=v.value[H];re&&w(H,re.indexPath)})},w=(Q,L)=>{f.value.includes(Q)||(t.uniqueOpened&&(f.value=f.value.filter(H=>L.includes(H))),f.value.push(Q),e("open",Q,L))},O=Q=>{const L=f.value.indexOf(Q);L!==-1&&f.value.splice(L,1)},S=(Q,L)=>{O(Q),e("close",Q,L)},x=({index:Q,indexPath:L})=>{f.value.includes(Q)?S(Q,L):w(Q,L)},C=Q=>{(t.mode==="horizontal"||t.collapse)&&(f.value=[]);const{index:L,indexPath:H}=Q;if(!(gr(L)||gr(H)))if(t.router&&i){const re=Q.route||L,U=i.push(re).then(J=>(J||(h.value=L),J));e("select",L,H,{index:L,indexPath:H,route:re},U)}else h.value=L,e("select",L,H,{index:L,indexPath:H})},E=Q=>{var L;const H=g.value,re=H[Q]||h.value&&H[h.value]||H[t.defaultActive];h.value=(L=re==null?void 0:re.index)!=null?L:Q},T=Q=>{const L=getComputedStyle(Q),H=Number.parseInt(L.marginLeft,10),re=Number.parseInt(L.marginRight,10);return Q.offsetWidth+H+re||0},M=()=>{var Q,L;if(!a.value)return-1;const H=Array.from((L=(Q=a.value)==null?void 0:Q.childNodes)!=null?L:[]).filter(K=>K.nodeName!=="#text"||K.nodeValue),re=getComputedStyle(a.value),U=Number.parseInt(re.paddingLeft,10),J=Number.parseInt(re.paddingRight,10),ie=a.value.clientWidth-U-J;let te=0,he=0;return H.forEach((K,ne)=>{K.nodeName!=="#comment"&&(te+=T(K),te<=ie-c&&(he=ne+1))}),he===H.length?-1:he},k=Q=>v.value[Q].indexPath,P=(Q,L=33.34)=>{let H;return()=>{H&&clearTimeout(H),H=setTimeout(()=>{Q()},L)}};let R=!0;const D=()=>{const Q=pi(s);if(Q&&(c=T(Q)||64),d.value===M())return;const L=()=>{d.value=-1,wt(()=>{d.value=M()})};R?L():P(L)(),R=!1};Le(()=>t.defaultActive,Q=>{g.value[Q]||(h.value=""),E(Q)}),Le(()=>t.collapse,Q=>{Q&&(f.value=[])}),Le(g.value,b);let F;ua(()=>{t.mode==="horizontal"&&t.ellipsis?F=Wr(a,D).stop:F==null||F()});const W=z(!1);{const Q=U=>{v.value[U.index]=U},L=U=>{delete v.value[U.index]};mn(hR,pn({props:t,openedMenus:f,items:g,subMenus:v,activeIndex:h,isMenuPopup:m,addMenuItem:U=>{g.value[U.index]=U},removeMenuItem:U=>{delete g.value[U.index]},addSubMenu:Q,removeSubMenu:L,openMenu:w,closeMenu:S,handleMenuItemClick:C,handleSubMenuClick:x})),mn(`${Hw}${o.uid}`,{addSubMenu:Q,removeSubMenu:L,mouseInChild:W,level:0})}jt(()=>{t.mode==="horizontal"&&new N3e(o.vnode.el,l.namespace.value)}),r({open:L=>{const{indexPath:H}=v.value[L];H.forEach(re=>w(re,H))},close:O,updateActiveIndex:E,handleResize:D});const I=qU(t,0);return()=>{var Q,L;let H=(L=(Q=n.default)==null?void 0:Q.call(n))!=null?L:[];const re=[];if(t.mode==="horizontal"&&a.value){const ie=Zu(H),te=d.value===-1?ie:ie.slice(0,d.value),he=d.value===-1?[]:ie.slice(d.value);(he==null?void 0:he.length)&&t.ellipsis&&(H=te,re.push(At(pR,{ref:s,index:"sub-menu-more",class:u.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>At(Ot,{class:u.e("icon-more")},{default:()=>At(t.ellipsisIcon)}),default:()=>he})))}const U=t.closeOnClickOutside?[[sd,()=>{!f.value.length||W.value||(f.value.forEach(ie=>e("close",ie,k(ie))),f.value=[])}]]:[],J=Yt(At("ul",{key:String(t.collapse),role:"menubar",ref:a,style:I.value,class:{[l.b()]:!0,[l.m(t.mode)]:!0,[l.m("collapse")]:t.collapse}},[...H,...re]),U);return t.collapseTransition&&t.mode==="vertical"?At(R3e,()=>J):J}}});const V3e=Ze({index:{type:we([String,null]),default:null},route:{type:we([String,Object])},disabled:Boolean}),z3e={click:t=>St(t.index)&&Ye(t.indexPath)},hA="ElMenuItem",j3e=de({name:hA}),W3e=de({...j3e,props:V3e,emits:z3e,setup(t,{expose:e,emit:n}){const r=t;ts(r.index)&&void 0;const o=Kt(),i=gt(hR),a=je("menu"),s=je("menu-item");i||Ao(hA,"can not inject root menu");const{parentMenu:l,indexPath:u}=GU(o,jn(r,"index")),c=gt(`${Hw}${l.value.uid}`);c||Ao(hA,"can not inject sub menu");const d=$(()=>r.index===i.activeIndex),f=pn({index:r.index,indexPath:u,active:d}),h=()=>{r.disabled||(i.handleMenuItemClick({index:r.index,indexPath:u.value,route:r.route}),n("click",f))};return jt(()=>{c.addSubMenu(f),i.addMenuItem(f)}),Yn(()=>{c.removeSubMenu(f),i.removeMenuItem(f)}),e({parentMenu:l,rootMenu:i,active:d,nsMenu:a,nsMenuItem:s,handleClick:h}),(g,v)=>(N(),Z("li",{class:j([p(s).b(),p(s).is("active",p(d)),p(s).is("disabled",g.disabled)]),role:"menuitem",tabindex:"-1",onClick:h},[p(l).type.name==="ElMenu"&&p(i).props.collapse&&g.$slots.title?(N(),me(p(Zo),{key:0,effect:p(i).props.popperEffect,placement:"right","fallback-placements":["left"],persistent:p(i).props.persistent},{content:V(()=>[ke(g.$slots,"title")]),default:V(()=>[ee("div",{class:j(p(a).be("tooltip","trigger"))},[ke(g.$slots,"default")],2)]),_:3},8,["effect","persistent"])):(N(),Z(ut,{key:1},[ke(g.$slots,"default"),ke(g.$slots,"title")],64))],2))}});var KU=Ge(W3e,[["__file","menu-item.vue"]]);const Q3e={title:String},H3e=de({name:"ElMenuItemGroup"}),U3e=de({...H3e,props:Q3e,setup(t){const e=je("menu-item-group");return(n,r)=>(N(),Z("li",{class:j(p(e).b())},[ee("div",{class:j(p(e).e("title"))},[n.$slots.title?ke(n.$slots,"title",{key:1}):(N(),Z(ut,{key:0},[We(ze(n.title),1)],64))],2),ee("ul",null,[ke(n.$slots,"default")])],2))}});var JU=Ge(U3e,[["__file","menu-item-group.vue"]]);const Y3e=Wt(F3e,{MenuItem:KU,MenuItemGroup:JU,SubMenu:pR}),X3e=qr(KU),Z3e=qr(JU),G3e=qr(pR),q3e=Ze({icon:{type:cr,default:()=>bEe},title:String,content:{type:String,default:""}}),K3e={back:()=>!0},J3e=de({name:"ElPageHeader"}),eLe=de({...J3e,props:q3e,emits:K3e,setup(t,{emit:e}){const{t:n}=En(),r=je("page-header");function o(){e("back")}return(i,a)=>(N(),Z("div",{class:j([p(r).b(),{[p(r).m("has-breadcrumb")]:!!i.$slots.breadcrumb,[p(r).m("has-extra")]:!!i.$slots.extra,[p(r).is("contentful")]:!!i.$slots.default}])},[i.$slots.breadcrumb?(N(),Z("div",{key:0,class:j(p(r).e("breadcrumb"))},[ke(i.$slots,"breadcrumb")],2)):ge("v-if",!0),ee("div",{class:j(p(r).e("header"))},[ee("div",{class:j(p(r).e("left"))},[ee("div",{class:j(p(r).e("back")),role:"button",tabindex:"0",onClick:o},[i.icon||i.$slots.icon?(N(),Z("div",{key:0,"aria-label":i.title||p(n)("el.pageHeader.title"),class:j(p(r).e("icon"))},[ke(i.$slots,"icon",{},()=>[i.icon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(i.icon)))]),_:1})):ge("v-if",!0)])],10,["aria-label"])):ge("v-if",!0),ee("div",{class:j(p(r).e("title"))},[ke(i.$slots,"title",{},()=>[We(ze(i.title||p(n)("el.pageHeader.title")),1)])],2)],2),B(p(MU),{direction:"vertical"}),ee("div",{class:j(p(r).e("content"))},[ke(i.$slots,"content",{},()=>[We(ze(i.content),1)])],2)],2),i.$slots.extra?(N(),Z("div",{key:0,class:j(p(r).e("extra"))},[ke(i.$slots,"extra")],2)):ge("v-if",!0)],2),i.$slots.default?(N(),Z("div",{key:1,class:j(p(r).e("main"))},[ke(i.$slots,"default")],2)):ge("v-if",!0)],2))}});var tLe=Ge(eLe,[["__file","page-header.vue"]]);const nLe=Wt(tLe),eY=Symbol("elPaginationKey"),rLe=Ze({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:cr}}),oLe={click:t=>t instanceof MouseEvent},iLe=de({name:"ElPaginationPrev"}),aLe=de({...iLe,props:rLe,emits:oLe,setup(t){const e=t,{t:n}=En(),r=$(()=>e.disabled||e.currentPage<=1);return(o,i)=>(N(),Z("button",{type:"button",class:"btn-prev",disabled:p(r),"aria-label":o.prevText||p(n)("el.pagination.prev"),"aria-disabled":p(r),onClick:a=>o.$emit("click",a)},[o.prevText?(N(),Z("span",{key:0},ze(o.prevText),1)):(N(),me(p(Ot),{key:1},{default:V(()=>[(N(),me(Jt(o.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var sLe=Ge(aLe,[["__file","prev.vue"]]);const lLe=Ze({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:cr}}),uLe=de({name:"ElPaginationNext"}),cLe=de({...uLe,props:lLe,emits:["click"],setup(t){const e=t,{t:n}=En(),r=$(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(o,i)=>(N(),Z("button",{type:"button",class:"btn-next",disabled:p(r),"aria-label":o.nextText||p(n)("el.pagination.next"),"aria-disabled":p(r),onClick:a=>o.$emit("click",a)},[o.nextText?(N(),Z("span",{key:0},ze(o.nextText),1)):(N(),me(p(Ot),{key:1},{default:V(()=>[(N(),me(Jt(o.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var dLe=Ge(cLe,[["__file","next.vue"]]);const tY=Symbol("ElSelectGroup"),pm=Symbol("ElSelect"),pA="ElOption",fLe=Ze({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean}),gR=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),ef=t=>Mb(t);function hLe(t,e){const n=gt(pm);n||Ao(pA,"usage: ");const r=gt(tY,{disabled:!1}),o=$(()=>c(Jo(n.props.modelValue),t.value)),i=$(()=>{var h;if(n.props.multiple){const g=Jo((h=n.props.modelValue)!=null?h:[]);return!o.value&&g.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=$(()=>{var h;return(h=t.label)!=null?h:Zt(t.value)?"":t.value}),s=$(()=>t.value||t.label||""),l=$(()=>t.disabled||e.groupDisabled||i.value),u=Kt(),c=(h=[],g)=>{if(Zt(t.value)){const v=n.props.valueKey;return h&&h.some(m=>Mn(Vr(m,v))===Vr(g,v))}else return h&&h.includes(g)},d=()=>{!t.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=h=>{const g=new RegExp(gR(h),"i");e.visible=g.test(String(a.value))||t.created};return Le(()=>a.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Le(()=>t.value,(h,g)=>{const{remote:v,valueKey:m}=n.props;if((v?h!==g:!Oo(h,g))&&(n.onOptionDestroy(g,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!v){if(m&&Zt(h)&&Zt(g)&&h[m]===g[m])return;n.setSelected()}}),Le(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:a,currentValue:s,itemSelected:o,isDisabled:l,hoverItem:d,updateOption:f}}const pLe=de({name:pA,componentName:pA,props:fLe,setup(t){const e=je("select"),n=Si(),r=$(()=>[e.be("dropdown","item"),e.is("disabled",p(s)),e.is("selected",p(a)),e.is("hovering",p(f))]),o=pn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:i,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c}=hLe(t,o),{visible:d,hover:f}=Mo(o),h=Kt().proxy;l.onOptionCreate(h),Yn(()=>{const v=h.value;wt(()=>{const{selected:m}=l.states,b=m.some(w=>w.value===h.value);l.states.cachedOptions.get(v)===h&&!b&&l.states.cachedOptions.delete(v)}),l.onOptionDestroy(v,h)});function g(){s.value||l.handleOptionSelect(h)}return{ns:e,id:n,containerKls:r,currentLabel:i,itemSelected:a,isDisabled:s,select:l,visible:d,hover:f,states:o,hoverItem:u,updateOption:c,selectOptionClick:g}}});function gLe(t,e){return Yt((N(),Z("li",{id:t.id,class:j(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:t.hoverItem,onClick:Rt(t.selectOptionClick,["stop"])},[ke(t.$slots,"default",{},()=>[ee("span",null,ze(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[Bn,t.visible]])}var vR=Ge(pLe,[["render",gLe],["__file","option.vue"]]);const vLe=de({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=gt(pm),e=je("select"),n=$(()=>t.props.popperClass),r=$(()=>t.props.multiple),o=$(()=>t.props.fitInputWidth),i=z("");function a(){var s;i.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return jt(()=>{a(),Wr(t.selectRef,a)}),{ns:e,minWidth:i,popperClass:n,isMultiple:r,isFitInputWidth:o}}});function mLe(t,e,n,r,o,i){return N(),Z("div",{class:j([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:bt({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(N(),Z("div",{key:0,class:j(t.ns.be("dropdown","header"))},[ke(t.$slots,"header")],2)):ge("v-if",!0),ke(t.$slots,"default"),t.$slots.footer?(N(),Z("div",{key:1,class:j(t.ns.be("dropdown","footer"))},[ke(t.$slots,"footer")],2)):ge("v-if",!0)],6)}var yLe=Ge(vLe,[["render",mLe],["__file","select-dropdown.vue"]]);const bLe=(t,e)=>{const{t:n}=En(),r=Si(),o=je("select"),i=je("input"),a=pn({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),s=z(),l=z(),u=z(),c=z(),d=z(),f=z(),h=z(),g=z(),v=z(),m=z(),b=z(),w=z(!1),O=z(),{form:S,formItem:x}=Xi(),{inputId:C}=Bl(t,{formItemContext:x}),{valueOnClear:E,isEmptyValue:T}=Hb(t),{isComposing:M,handleCompositionStart:k,handleCompositionUpdate:P,handleCompositionEnd:R}=Zb({afterComposition:tt=>nt(tt)}),D=$(()=>t.disabled||!!(S!=null&&S.disabled)),{wrapperRef:F,isFocused:W,handleBlur:I}=qf(d,{disabled:D,afterFocus(){t.automaticDropdown&&!w.value&&(w.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(tt){var Lt,Ft;return((Lt=u.value)==null?void 0:Lt.isFocusInsideContent(tt))||((Ft=c.value)==null?void 0:Ft.isFocusInsideContent(tt))},afterBlur(){var tt;w.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((tt=x==null?void 0:x.validate)==null||tt.call(x,"blur").catch(Lt=>void 0))}}),Q=$(()=>Ye(t.modelValue)?t.modelValue.length>0:!T(t.modelValue)),L=$(()=>{var tt;return(tt=S==null?void 0:S.statusIcon)!=null?tt:!1}),H=$(()=>t.clearable&&!D.value&&a.inputHovering&&Q.value),re=$(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),U=$(()=>o.is("reverse",!!(re.value&&w.value))),J=$(()=>(x==null?void 0:x.validateState)||""),ie=$(()=>J.value&&mC[J.value]),te=$(()=>t.remote?300:0),he=$(()=>t.remote&&!a.inputValue&&a.options.size===0),K=$(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&a.inputValue&&a.options.size>0&&ne.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),ne=$(()=>fe.value.filter(tt=>tt.visible).length),fe=$(()=>{const tt=Array.from(a.options.values()),Lt=[];return a.optionValues.forEach(Ft=>{const Br=tt.findIndex(xo=>xo.value===Ft);Br>-1&&Lt.push(tt[Br])}),Lt.length>=tt.length?Lt:tt}),Ne=$(()=>Array.from(a.cachedOptions.values())),$e=$(()=>{const tt=fe.value.filter(Lt=>!Lt.created).some(Lt=>Lt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!tt}),ue=()=>{t.filterable&&kt(t.filterMethod)||t.filterable&&t.remote&&kt(t.remoteMethod)||fe.value.forEach(tt=>{var Lt;(Lt=tt.updateOption)==null||Lt.call(tt,a.inputValue)})},G=$o(),ve=$(()=>["small"].includes(G.value)?"small":"default"),q=$({get(){return w.value&&!he.value},set(tt){w.value=tt}}),Ie=$(()=>{if(t.multiple&&!Sn(t.modelValue))return Jo(t.modelValue).length===0&&!a.inputValue;const tt=Ye(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||Sn(tt)?!a.inputValue:!0}),Ee=$(()=>{var tt;const Lt=(tt=t.placeholder)!=null?tt:n("el.select.placeholder");return t.multiple||!Q.value?Lt:a.selectedLabel}),Oe=$(()=>Xk?null:"mouseenter");Le(()=>t.modelValue,(tt,Lt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",se("")),oe(),!Oo(tt,Lt)&&t.validateEvent&&(x==null||x.validate("change").catch(Ft=>void 0))},{flush:"post",deep:!0}),Le(()=>w.value,tt=>{tt?se(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",tt)}),Le(()=>a.options.entries(),()=>{!kn||(oe(),t.defaultFirstOption&&(t.filterable||t.remote)&&ne.value&&X())},{flush:"post"}),Le([()=>a.hoveringIndex,fe],([tt])=>{Pt(tt)&&tt>-1?O.value=fe.value[tt]||{}:O.value={},fe.value.forEach(Lt=>{Lt.hover=O.value===Lt})}),ua(()=>{a.isBeforeHide||ue()});const se=tt=>{a.previousQuery===tt||M.value||(a.previousQuery=tt,t.filterable&&kt(t.filterMethod)?t.filterMethod(tt):t.filterable&&t.remote&&kt(t.remoteMethod)&&t.remoteMethod(tt),t.defaultFirstOption&&(t.filterable||t.remote)&&ne.value?wt(X):wt(Ae))},X=()=>{const tt=fe.value.filter(xo=>xo.visible&&!xo.disabled&&!xo.states.groupDisabled),Lt=tt.find(xo=>xo.created),Ft=tt[0],Br=fe.value.map(xo=>xo.value);a.hoveringIndex=pe(Br,Lt||Ft)},oe=()=>{if(t.multiple)a.selectedLabel="";else{const Lt=Ye(t.modelValue)?t.modelValue[0]:t.modelValue,Ft=ce(Lt);a.selectedLabel=Ft.currentLabel,a.selected=[Ft];return}const tt=[];Sn(t.modelValue)||Jo(t.modelValue).forEach(Lt=>{tt.push(ce(Lt))}),a.selected=tt},ce=tt=>{let Lt;const Ft=m0(tt);for(let ii=a.cachedOptions.size-1;ii>=0;ii--){const Pi=Ne.value[ii];if(Ft?Vr(Pi.value,t.valueKey)===Vr(tt,t.valueKey):Pi.value===tt){Lt={value:tt,currentLabel:Pi.currentLabel,get isDisabled(){return Pi.isDisabled}};break}}if(Lt)return Lt;const Br=Ft?tt.label:tt!=null?tt:"";return{value:tt,currentLabel:Br}},Ae=()=>{a.hoveringIndex=fe.value.findIndex(tt=>a.selected.some(Lt=>Dt(Lt)===Dt(tt)))},ye=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(l.value).width)},Te=()=>{a.collapseItemWidth=m.value.getBoundingClientRect().width},Me=()=>{var tt,Lt;(Lt=(tt=u.value)==null?void 0:tt.updatePopper)==null||Lt.call(tt)},Fe=()=>{var tt,Lt;(Lt=(tt=c.value)==null?void 0:tt.updatePopper)==null||Lt.call(tt)},at=()=>{a.inputValue.length>0&&!w.value&&(w.value=!0),se(a.inputValue)},nt=tt=>{if(a.inputValue=tt.target.value,t.remote)ct();else return at()},ct=Hi(()=>{at()},te.value),ht=tt=>{Oo(t.modelValue,tt)||e(ln,tt)},Je=tt=>aC(tt,Lt=>{const Ft=a.cachedOptions.get(Lt);return Ft&&!Ft.disabled&&!Ft.states.groupDisabled}),ft=tt=>{if(!!t.multiple&&tt.code!==st.delete&&tt.target.value.length<=0){const Lt=Jo(t.modelValue).slice(),Ft=Je(Lt);if(Ft<0)return;const Br=Lt[Ft];Lt.splice(Ft,1),e(zt,Lt),ht(Lt),e("remove-tag",Br)}},Mt=(tt,Lt)=>{const Ft=a.selected.indexOf(Lt);if(Ft>-1&&!D.value){const Br=Jo(t.modelValue).slice();Br.splice(Ft,1),e(zt,Br),ht(Br),e("remove-tag",Lt.value)}tt.stopPropagation(),dr()},Pe=tt=>{tt.stopPropagation();const Lt=t.multiple?[]:E.value;if(t.multiple)for(const Ft of a.selected)Ft.isDisabled&&Lt.push(Ft.value);e(zt,Lt),ht(Lt),a.hoveringIndex=-1,w.value=!1,e("clear"),dr()},Ce=tt=>{var Lt;if(t.multiple){const Ft=Jo((Lt=t.modelValue)!=null?Lt:[]).slice(),Br=pe(Ft,tt);Br>-1?Ft.splice(Br,1):(t.multipleLimit<=0||Ft.length{Be(tt)})},pe=(tt,Lt)=>Sn(Lt)?-1:Zt(Lt.value)?tt.findIndex(Ft=>Oo(Vr(Ft,t.valueKey),Dt(Lt))):tt.indexOf(Lt.value),Be=tt=>{var Lt,Ft,Br,xo,ii;const Pi=Ye(tt)?tt[0]:tt;let Ni=null;if(Pi!=null&&Pi.value){const ai=fe.value.filter(Gs=>Gs.value===Pi.value);ai.length>0&&(Ni=ai[0].$el)}if(u.value&&Ni){const ai=(xo=(Br=(Ft=(Lt=u.value)==null?void 0:Lt.popperRef)==null?void 0:Ft.contentRef)==null?void 0:Br.querySelector)==null?void 0:xo.call(Br,`.${o.be("dropdown","wrap")}`);ai&&x$(ai,Ni)}(ii=b.value)==null||ii.handleScroll()},_t=tt=>{a.options.set(tt.value,tt),a.cachedOptions.set(tt.value,tt)},en=(tt,Lt)=>{a.options.get(tt)===Lt&&a.options.delete(tt)},On=$(()=>{var tt,Lt;return(Lt=(tt=u.value)==null?void 0:tt.popperRef)==null?void 0:Lt.contentRef}),yn=()=>{a.isBeforeHide=!1,wt(()=>{var tt;(tt=b.value)==null||tt.update(),Be(a.selected)})},dr=()=>{var tt;(tt=d.value)==null||tt.focus()},to=()=>{var tt;if(w.value){w.value=!1,wt(()=>{var Lt;return(Lt=d.value)==null?void 0:Lt.blur()});return}(tt=d.value)==null||tt.blur()},Kr=tt=>{Pe(tt)},qe=tt=>{if(w.value=!1,W.value){const Lt=new FocusEvent("blur",tt);wt(()=>I(Lt))}},vt=()=>{a.inputValue.length>0?a.inputValue="":w.value=!1},dt=()=>{D.value||(Xk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:w.value=!w.value)},$t=()=>{if(!w.value)dt();else{const tt=fe.value[a.hoveringIndex];tt&&!tt.isDisabled&&Ce(tt)}},Dt=tt=>Zt(tt.value)?Vr(tt.value,t.valueKey):tt.value,Vn=$(()=>fe.value.filter(tt=>tt.visible).every(tt=>tt.isDisabled)),no=$(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),lo=$(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),So=tt=>{if(!w.value){w.value=!0;return}if(!(a.options.size===0||ne.value===0||M.value)&&!Vn.value){tt==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):tt==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Lt=fe.value[a.hoveringIndex];(Lt.isDisabled||!Lt.visible)&&So(tt),wt(()=>Be(O.value))}},za=()=>{if(!l.value)return 0;const tt=window.getComputedStyle(l.value);return Number.parseFloat(tt.gap||"6px")},vs=$(()=>{const tt=za();return{maxWidth:`${m.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-tt:a.selectionWidth}px`}}),Sr=$(()=>({maxWidth:`${a.selectionWidth}px`})),Ql=tt=>{e("popup-scroll",tt)};Wr(l,ye),Wr(F,Me),Wr(v,Fe),Wr(m,Te);let bi;return Le(()=>q.value,tt=>{tt?bi=Wr(g,Me).stop:(bi==null||bi(),bi=void 0)}),jt(()=>{oe()}),{inputId:C,contentId:r,nsSelect:o,nsInput:i,states:a,isFocused:W,expanded:w,optionsArray:fe,hoverOption:O,selectSize:G,filteredOptionsCount:ne,updateTooltip:Me,updateTagTooltip:Fe,debouncedOnInputChange:ct,onInput:nt,deletePrevTag:ft,deleteTag:Mt,deleteSelected:Pe,handleOptionSelect:Ce,scrollToOption:Be,hasModelValue:Q,shouldShowPlaceholder:Ie,currentPlaceholder:Ee,mouseEnterEventName:Oe,needStatusIcon:L,showClose:H,iconComponent:re,iconReverse:U,validateState:J,validateIcon:ie,showNewOption:$e,updateOptions:ue,collapseTagSize:ve,setSelected:oe,selectDisabled:D,emptyText:K,handleCompositionStart:k,handleCompositionUpdate:P,handleCompositionEnd:R,onOptionCreate:_t,onOptionDestroy:en,handleMenuEnter:yn,focus:dr,blur:to,handleClearClick:Kr,handleClickOutside:qe,handleEsc:vt,toggleMenu:dt,selectOption:$t,getValueKey:Dt,navigateOptions:So,dropdownMenuVisible:q,showTagList:no,collapseTagList:lo,popupScroll:Ql,tagStyle:vs,collapseTagStyle:Sr,popperRef:On,inputRef:d,tooltipRef:u,tagTooltipRef:c,prefixRef:f,suffixRef:h,selectRef:s,wrapperRef:F,selectionRef:l,scrollbarRef:b,menuRef:g,tagMenuRef:v,collapseItemRef:m}};var _Le=de({name:"ElOptions",setup(t,{slots:e}){const n=gt(pm);let r=[];return()=>{var o,i;const a=(o=e.default)==null?void 0:o.call(e),s=[];function l(u){!Ye(u)||u.forEach(c=>{var d,f,h,g;const v=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;v==="ElOptionGroup"?l(!St(c.children)&&!Ye(c.children)&&kt((f=c.children)==null?void 0:f.default)?(h=c.children)==null?void 0:h.default():c.children):v==="ElOption"?s.push((g=c.props)==null?void 0:g.value):Ye(c.children)&&l(c.children)})}return a.length&&l((i=a[0])==null?void 0:i.children),Oo(s,r)||(r=s,n&&(n.states.optionValues=s)),a}}});const OLe=Ze({name:String,id:String,modelValue:{type:we([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Fo,effect:{type:we(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:we(Function)},filterMethod:{type:we(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:yo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:cr,default:Cd},fitInputWidth:Boolean,suffixIcon:{type:cr,default:wc},tagType:{...ad.type,default:"info"},tagEffect:{...ad.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:we(String),values:Ed,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:yo.appendTo,options:{type:we(Array)},props:{type:we(Object)},...Dp,...Yi(["ariaLabel"])});zt+"",ln+"",qQ.scroll;const U5="ElSelect",wLe=de({name:U5,componentName:U5,components:{ElSelectMenu:yLe,ElOption:vR,ElOptions:_Le,ElTag:Zs,ElScrollbar:Al,ElTooltip:Zo,ElIcon:Ot},directives:{ClickOutside:sd},props:OLe,emits:[zt,ln,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const r=Kt();r.appContext.config.warnHandler=(...f)=>{!f[0]||f[0].includes('Slot "default" invoked outside of the render function')||console.warn(...f)};const o=$(()=>{const{modelValue:f,multiple:h}=t,g=h?[]:void 0;return Ye(f)?h?f:g:h?g:f}),i=pn({...Mo(t),modelValue:o}),a=bLe(i,e),{calculatorRef:s,inputStyle:l}=fR(),u=f=>f.reduce((h,g)=>(h.push(g),g.children&&g.children.length>0&&h.push(...u(g.children)),h),[]),c=f=>{Zu(f||[]).forEach(g=>{var v;if(Zt(g)&&(g.type.name==="ElOption"||g.type.name==="ElTree")){const m=g.type.name;if(m==="ElTree"){const b=((v=g.props)==null?void 0:v.data)||[];u(b).forEach(O=>{O.currentLabel=O.label||(Zt(O.value)?"":O.value),a.onOptionCreate(O)})}else if(m==="ElOption"){const b={...g.props};b.currentLabel=b.label||(Zt(b.value)?"":b.value),a.onOptionCreate(b)}}})};Le(()=>{var f;return(f=n.default)==null?void 0:f.call(n)},f=>{t.persistent||c(f)},{immediate:!0}),mn(pm,pn({props:i,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const d=$(()=>t.multiple?a.states.selected.map(f=>f.currentLabel):a.states.selectedLabel);return Yn(()=>{r.appContext.config.warnHandler=void 0}),{...a,modelValue:o,selectedLabel:d,calculatorRef:s,inputStyle:l}}});function SLe(t,e){const n=Nn("el-tag"),r=Nn("el-tooltip"),o=Nn("el-icon"),i=Nn("el-option"),a=Nn("el-options"),s=Nn("el-scrollbar"),l=Nn("el-select-menu"),u=Wx("click-outside");return Yt((N(),Z("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[Iy(t.mouseEnterEventName)]:c=>t.states.inputHovering=!0,onMouseleave:c=>t.states.inputHovering=!1},[B(r,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:c=>t.states.isBeforeHide=!1},{default:V(()=>{var c;return[ee("div",{ref:"wrapperRef",class:j([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:Rt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(N(),Z("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[ke(t.$slots,"prefix")],2)):ge("v-if",!0),ee("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?ke(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>[(N(!0),Z(ut,null,Xt(t.showTagList,d=>(N(),Z("div",{key:t.getValueKey(d),class:j(t.nsSelect.e("selected-item"))},[B(n,{closable:!t.selectDisabled&&!d.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:bt(t.tagStyle),onClose:f=>t.deleteTag(f,d)},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))},[ke(t.$slots,"label",{label:d.currentLabel,value:d.value},()=>[We(ze(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(N(),me(r,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom","popper-class":t.popperClass,teleported:t.teleported},{default:V(()=>[ee("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(n,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:bt(t.collapseTagStyle)},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))}," + "+ze(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:V(()=>[ee("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(N(!0),Z(ut,null,Xt(t.collapseTagList,d=>(N(),Z("div",{key:t.getValueKey(d),class:j(t.nsSelect.e("selected-item"))},[B(n,{class:"in-tooltip",closable:!t.selectDisabled&&!d.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:f=>t.deleteTag(f,d)},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))},[ke(t.$slots,"label",{label:d.currentLabel,value:d.value},()=>[We(ze(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):ge("v-if",!0)]):ge("v-if",!0),ee("div",{class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Yt(ee("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":d=>t.states.inputValue=d,type:"text",name:t.name,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:bt(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((c=t.hoverOption)==null?void 0:c.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[yr(Rt(d=>t.navigateOptions("next"),["stop","prevent"]),["down"]),yr(Rt(d=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),yr(Rt(t.handleEsc,["stop","prevent"]),["esc"]),yr(Rt(t.selectOption,["stop","prevent"]),["enter"]),yr(Rt(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:Rt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ux,t.states.inputValue]]),t.filterable?(N(),Z("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:ze(t.states.inputValue)},null,10,["textContent"])):ge("v-if",!0)],2),t.shouldShowPlaceholder?(N(),Z("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?ke(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[ee("span",null,ze(t.currentPlaceholder),1)]):(N(),Z("span",{key:1},ze(t.currentPlaceholder),1))],2)):ge("v-if",!0)],2),ee("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(N(),me(o,{key:0,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:V(()=>[(N(),me(Jt(t.iconComponent)))]),_:1},8,["class"])):ge("v-if",!0),t.showClose&&t.clearIcon?(N(),me(o,{key:1,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:V(()=>[(N(),me(Jt(t.clearIcon)))]),_:1},8,["class","onClick"])):ge("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(N(),me(o,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:V(()=>[(N(),me(Jt(t.validateIcon)))]),_:1},8,["class"])):ge("v-if",!0)],2)],10,["onClick"])]}),content:V(()=>[B(l,{ref:"menuRef"},{default:V(()=>[t.$slots.header?(N(),Z("div",{key:0,class:j(t.nsSelect.be("dropdown","header")),onClick:Rt(()=>{},["stop"])},[ke(t.$slots,"header")],10,["onClick"])):ge("v-if",!0),Yt(B(s,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:j([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical",onScroll:t.popupScroll},{default:V(()=>[t.showNewOption?(N(),me(i,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):ge("v-if",!0),B(a,null,{default:V(()=>[ke(t.$slots,"default",{},()=>[(N(!0),Z(ut,null,Xt(t.options,(c,d)=>{var f,h,g,v,m,b;return N(),me(i,{key:d,label:c[(h=(f=t.props)==null?void 0:f.label)!=null?h:"label"],value:c[(v=(g=t.props)==null?void 0:g.value)!=null?v:"value"],disabled:c[(b=(m=t.props)==null?void 0:m.disabled)!=null?b:"disabled"]},null,8,["label","value","disabled"])}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[Bn,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(N(),Z("div",{key:1,class:j(t.nsSelect.be("dropdown","loading"))},[ke(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(N(),Z("div",{key:2,class:j(t.nsSelect.be("dropdown","empty"))},[ke(t.$slots,"empty",{},()=>[ee("span",null,ze(t.emptyText),1)])],2)):ge("v-if",!0),t.$slots.footer?(N(),Z("div",{key:3,class:j(t.nsSelect.be("dropdown","footer")),onClick:Rt(()=>{},["stop"])},[ke(t.$slots,"footer")],10,["onClick"])):ge("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[u,t.handleClickOutside,t.popperRef]])}var xLe=Ge(wLe,[["render",SLe],["__file","select.vue"]]);const CLe=de({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=je("select"),n=z(),r=Kt(),o=z([]);mn(tY,pn({...Mo(t)}));const i=$(()=>o.value.some(u=>u.visible===!0)),a=u=>{var c;return u.type.name==="ElOption"&&!!((c=u.component)!=null&&c.proxy)},s=u=>{const c=Jo(u),d=[];return c.forEach(f=>{var h;!Mr(f)||(a(f)?d.push(f.component.proxy):Ye(f.children)&&f.children.length?d.push(...s(f.children)):(h=f.component)!=null&&h.subTree&&d.push(...s(f.component.subTree)))}),d},l=()=>{o.value=s(r.subTree)};return jt(()=>{l()}),wQ(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:i,ns:e}}});function ELe(t,e,n,r,o,i){return Yt((N(),Z("ul",{ref:"groupRef",class:j(t.ns.be("group","wrap"))},[ee("li",{class:j(t.ns.be("group","title"))},ze(t.label),3),ee("li",null,[ee("ul",{class:j(t.ns.b("group"))},[ke(t.$slots,"default")],2)])],2)),[[Bn,t.visible]])}var nY=Ge(CLe,[["render",ELe],["__file","option-group.vue"]]);const Ml=Wt(xLe,{Option:vR,OptionGroup:nY}),ld=qr(vR),TLe=qr(nY),mR=()=>gt(eY,{}),kLe=Ze({pageSize:{type:Number,required:!0},pageSizes:{type:we(Array),default:()=>Gr([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Oc},appendSizeTo:String}),ALe=de({name:"ElPaginationSizes"}),PLe=de({...ALe,props:kLe,emits:["page-size-change"],setup(t,{emit:e}){const n=t,{t:r}=En(),o=je("pagination"),i=mR(),a=z(n.pageSize);Le(()=>n.pageSizes,(u,c)=>{if(!Oo(u,c)&&Ye(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];e("page-size-change",d)}}),Le(()=>n.pageSize,u=>{a.value=u});const s=$(()=>n.pageSizes);function l(u){var c;u!==a.value&&(a.value=u,(c=i.handleSizeChange)==null||c.call(i,Number(u)))}return(u,c)=>(N(),Z("span",{class:j(p(o).e("sizes"))},[B(p(Ml),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:l},{default:V(()=>[(N(!0),Z(ut,null,Xt(p(s),d=>(N(),me(p(ld),{key:d,value:d,label:d+p(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var NLe=Ge(PLe,[["__file","sizes.vue"]]);const MLe=Ze({size:{type:String,values:Oc}}),$Le=de({name:"ElPaginationJumper"}),RLe=de({...$Le,props:MLe,setup(t){const{t:e}=En(),n=je("pagination"),{pageCount:r,disabled:o,currentPage:i,changeEvent:a}=mR(),s=z(),l=$(()=>{var d;return(d=s.value)!=null?d:i==null?void 0:i.value});function u(d){s.value=d?+d:""}function c(d){d=Math.trunc(+d),a==null||a(d),s.value=void 0}return(d,f)=>(N(),Z("span",{class:j(p(n).e("jump")),disabled:p(o)},[ee("span",{class:j([p(n).e("goto")])},ze(p(e)("el.pagination.goto")),3),B(p(ao),{size:d.size,class:j([p(n).e("editor"),p(n).is("in-pagination")]),min:1,max:p(r),disabled:p(o),"model-value":p(l),"validate-event":!1,"aria-label":p(e)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),ee("span",{class:j([p(n).e("classifier")])},ze(p(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var DLe=Ge(RLe,[["__file","jumper.vue"]]);const ILe=Ze({total:{type:Number,default:1e3}}),LLe=de({name:"ElPaginationTotal"}),BLe=de({...LLe,props:ILe,setup(t){const{t:e}=En(),n=je("pagination"),{disabled:r}=mR();return(o,i)=>(N(),Z("span",{class:j(p(n).e("total")),disabled:p(r)},ze(p(e)("el.pagination.total",{total:o.total})),11,["disabled"]))}});var FLe=Ge(BLe,[["__file","total.vue"]]);const VLe=Ze({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),zLe=de({name:"ElPaginationPager"}),jLe=de({...zLe,props:VLe,emits:[ln],setup(t,{emit:e}){const n=t,r=je("pager"),o=je("icon"),{t:i}=En(),a=z(!1),s=z(!1),l=z(!1),u=z(!1),c=z(!1),d=z(!1),f=$(()=>{const S=n.pagerCount,x=(S-1)/2,C=Number(n.currentPage),E=Number(n.pageCount);let T=!1,M=!1;E>S&&(C>S-x&&(T=!0),C["more","btn-quickprev",o.b(),r.is("disabled",n.disabled)]),g=$(()=>["more","btn-quicknext",o.b(),r.is("disabled",n.disabled)]),v=$(()=>n.disabled?-1:0);Le(()=>[n.pageCount,n.pagerCount,n.currentPage],([S,x,C])=>{const E=(x-1)/2;let T=!1,M=!1;S>x&&(T=C>x-E,M=CE&&(C=E)),C!==T&&e(ln,C)}return(S,x)=>(N(),Z("ul",{class:j(p(r).b()),onClick:O,onKeyup:yr(w,["enter"])},[S.pageCount>0?(N(),Z("li",{key:0,class:j([[p(r).is("active",S.currentPage===1),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":p(i)("el.pagination.currentPage",{pager:1}),tabindex:p(v)}," 1 ",10,["aria-current","aria-label","tabindex"])):ge("v-if",!0),a.value?(N(),Z("li",{key:1,class:j(p(h)),tabindex:p(v),"aria-label":p(i)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:C=>m(!0),onMouseleave:C=>l.value=!1,onFocus:C=>b(!0),onBlur:C=>c.value=!1},[(l.value||c.value)&&!S.disabled?(N(),me(p(Af),{key:0})):(N(),me(p(Qy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):ge("v-if",!0),(N(!0),Z(ut,null,Xt(p(f),C=>(N(),Z("li",{key:C,class:j([[p(r).is("active",S.currentPage===C),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===C,"aria-label":p(i)("el.pagination.currentPage",{pager:C}),tabindex:p(v)},ze(C),11,["aria-current","aria-label","tabindex"]))),128)),s.value?(N(),Z("li",{key:2,class:j(p(g)),tabindex:p(v),"aria-label":p(i)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:C=>m(),onMouseleave:C=>u.value=!1,onFocus:C=>b(),onBlur:C=>d.value=!1},[(u.value||d.value)&&!S.disabled?(N(),me(p(Pf),{key:0})):(N(),me(p(Qy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):ge("v-if",!0),S.pageCount>1?(N(),Z("li",{key:3,class:j([[p(r).is("active",S.currentPage===S.pageCount),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":p(i)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:p(v)},ze(S.pageCount),11,["aria-current","aria-label","tabindex"])):ge("v-if",!0)],42,["onKeyup"]))}});var WLe=Ge(jLe,[["__file","pager.vue"]]);const wa=t=>typeof t!="number",QLe=Ze({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>Pt(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:we(Array),default:()=>Gr([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:cr,default:()=>rd},nextText:{type:String,default:""},nextIcon:{type:cr,default:()=>da},teleported:{type:Boolean,default:!0},small:Boolean,size:Fo,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),HLe={"update:current-page":t=>Pt(t),"update:page-size":t=>Pt(t),"size-change":t=>Pt(t),change:(t,e)=>Pt(t)&&Pt(e),"current-change":t=>Pt(t),"prev-click":t=>Pt(t),"next-click":t=>Pt(t)},Y5="ElPagination";var ULe=de({name:Y5,props:QLe,emits:HLe,setup(t,{emit:e,slots:n}){const{t:r}=En(),o=je("pagination"),i=Kt().vnode.props||{},a=AQ(),s=$(()=>{var x;return t.small?"small":(x=t.size)!=null?x:a.value});Kc({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},$(()=>!!t.small));const l="onUpdate:currentPage"in i||"onUpdate:current-page"in i||"onCurrentChange"in i,u="onUpdate:pageSize"in i||"onUpdate:page-size"in i||"onSizeChange"in i,c=$(()=>{if(wa(t.total)&&wa(t.pageCount)||!wa(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(wa(t.pageCount)){if(!wa(t.total)&&!wa(t.pageSize)&&!u)return!1}else if(!u)return!1}return!0}),d=z(wa(t.defaultPageSize)?10:t.defaultPageSize),f=z(wa(t.defaultCurrentPage)?1:t.defaultCurrentPage),h=$({get(){return wa(t.pageSize)?d.value:t.pageSize},set(x){wa(t.pageSize)&&(d.value=x),u&&(e("update:page-size",x),e("size-change",x))}}),g=$(()=>{let x=0;return wa(t.pageCount)?wa(t.total)||(x=Math.max(1,Math.ceil(t.total/h.value))):x=t.pageCount,x}),v=$({get(){return wa(t.currentPage)?f.value:t.currentPage},set(x){let C=x;x<1?C=1:x>g.value&&(C=g.value),wa(t.currentPage)&&(f.value=C),l&&(e("update:current-page",C),e("current-change",C))}});Le(g,x=>{v.value>x&&(v.value=x)}),Le([v,h],x=>{e(ln,...x)},{flush:"post"});function m(x){v.value=x}function b(x){h.value=x;const C=g.value;v.value>C&&(v.value=C)}function w(){t.disabled||(v.value-=1,e("prev-click",v.value))}function O(){t.disabled||(v.value+=1,e("next-click",v.value))}function S(x,C){x&&(x.props||(x.props={}),x.props.class=[x.props.class,C].join(" "))}return mn(eY,{pageCount:g,disabled:$(()=>t.disabled),currentPage:v,changeEvent:m,handleSizeChange:b}),()=>{var x,C;if(!c.value)return r("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&g.value<=1)return null;const E=[],T=[],M=At("div",{class:o.e("rightwrapper")},T),k={prev:At(sLe,{disabled:t.disabled,currentPage:v.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:w}),jumper:At(DLe,{size:s.value}),pager:At(WLe,{currentPage:v.value,pageCount:g.value,pagerCount:t.pagerCount,onChange:m,disabled:t.disabled}),next:At(dLe,{disabled:t.disabled,currentPage:v.value,pageCount:g.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:O}),sizes:At(NLe,{pageSize:h.value,pageSizes:t.pageSizes,popperClass:t.popperClass,disabled:t.disabled,teleported:t.teleported,size:s.value,appendSizeTo:t.appendSizeTo}),slot:(C=(x=n==null?void 0:n.default)==null?void 0:x.call(n))!=null?C:null,total:At(FLe,{total:wa(t.total)?0:t.total})},P=t.layout.split(",").map(D=>D.trim());let R=!1;return P.forEach(D=>{if(D==="->"){R=!0;return}R?T.push(k[D]):E.push(k[D])}),S(E[0],o.is("first")),S(E[E.length-1],o.is("last")),R&&T.length>0&&(S(T[0],o.is("first")),S(T[T.length-1],o.is("last")),E.push(M)),At("div",{class:[o.b(),o.is("background",t.background),o.m(s.value)]},E)}}});const AC=Wt(ULe),YLe=Ze({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Kk,default:"primary"},cancelButtonType:{type:String,values:Kk,default:"text"},icon:{type:cr,default:()=>lTe},iconColor:{type:String,default:"#f90"},hideIcon:Boolean,hideAfter:{type:Number,default:200},teleported:yo.teleported,persistent:yo.persistent,width:{type:[String,Number],default:150}}),XLe={confirm:t=>t instanceof MouseEvent,cancel:t=>t instanceof MouseEvent},ZLe=de({name:"ElPopconfirm"}),GLe=de({...ZLe,props:YLe,emits:XLe,setup(t,{expose:e,emit:n}){const r=t,{t:o}=En(),i=je("popconfirm"),a=z(),s=$(()=>{var g;return(g=p(a))==null?void 0:g.popperRef}),l=()=>{var g,v;(v=(g=a.value)==null?void 0:g.onClose)==null||v.call(g)},u=$(()=>({width:so(r.width)})),c=g=>{n("confirm",g),l()},d=g=>{n("cancel",g),l()},f=$(()=>r.confirmButtonText||o("el.popconfirm.confirmButtonText")),h=$(()=>r.cancelButtonText||o("el.popconfirm.cancelButtonText"));return e({popperRef:s,hide:l}),(g,v)=>(N(),me(p(Zo),rn({ref_key:"tooltipRef",ref:a,trigger:"click",effect:"light"},g.$attrs,{"popper-class":`${p(i).namespace.value}-popover`,"popper-style":p(u),teleported:g.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":g.hideAfter,persistent:g.persistent}),{content:V(()=>[ee("div",{class:j(p(i).b())},[ee("div",{class:j(p(i).e("main"))},[!g.hideIcon&&g.icon?(N(),me(p(Ot),{key:0,class:j(p(i).e("icon")),style:bt({color:g.iconColor})},{default:V(()=>[(N(),me(Jt(g.icon)))]),_:1},8,["class","style"])):ge("v-if",!0),We(" "+ze(g.title),1)],2),ee("div",{class:j(p(i).e("action"))},[ke(g.$slots,"actions",{confirm:c,cancel:d},()=>[B(p(Kn),{size:"small",type:g.cancelButtonType==="text"?"":g.cancelButtonType,text:g.cancelButtonType==="text",onClick:d},{default:V(()=>[We(ze(p(h)),1)]),_:1},8,["type","text"]),B(p(Kn),{size:"small",type:g.confirmButtonType==="text"?"":g.confirmButtonType,text:g.confirmButtonType==="text",onClick:c},{default:V(()=>[We(ze(p(f)),1)]),_:1},8,["type","text"])])],2)],2)]),default:V(()=>[g.$slots.reference?ke(g.$slots,"reference",{key:0}):ge("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var qLe=Ge(GLe,[["__file","popconfirm.vue"]]);const KLe=Wt(qLe),JLe=Ze({trigger:Xg.trigger,triggerKeys:Xg.triggerKeys,placement:Q1.placement,disabled:Xg.disabled,visible:yo.visible,transition:yo.transition,popperOptions:Q1.popperOptions,tabindex:Q1.tabindex,content:yo.content,popperStyle:yo.popperStyle,popperClass:yo.popperClass,enterable:{...yo.enterable,default:!0},effect:{...yo.effect,default:"light"},teleported:yo.teleported,appendTo:yo.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),e4e={"update:visible":t=>ir(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},t4e="onUpdate:visible",n4e=de({name:"ElPopover"}),r4e=de({...n4e,props:JLe,emits:e4e,setup(t,{expose:e,emit:n}){const r=t,o=$(()=>r[t4e]),i=je("popover"),a=z(),s=$(()=>{var m;return(m=p(a))==null?void 0:m.popperRef}),l=$(()=>[{width:so(r.width)},r.popperStyle]),u=$(()=>[i.b(),r.popperClass,{[i.m("plain")]:!!r.content}]),c=$(()=>r.transition===`${i.namespace.value}-fade-in-linear`),d=()=>{var m;(m=a.value)==null||m.hide()},f=()=>{n("before-enter")},h=()=>{n("before-leave")},g=()=>{n("after-enter")},v=()=>{n("update:visible",!1),n("after-leave")};return e({popperRef:s,hide:d}),(m,b)=>(N(),me(p(Zo),rn({ref_key:"tooltipRef",ref:a},m.$attrs,{trigger:m.trigger,"trigger-keys":m.triggerKeys,placement:m.placement,disabled:m.disabled,visible:m.visible,transition:m.transition,"popper-options":m.popperOptions,tabindex:m.tabindex,content:m.content,offset:m.offset,"show-after":m.showAfter,"hide-after":m.hideAfter,"auto-close":m.autoClose,"show-arrow":m.showArrow,"aria-label":m.title,effect:m.effect,enterable:m.enterable,"popper-class":p(u),"popper-style":p(l),teleported:m.teleported,"append-to":m.appendTo,persistent:m.persistent,"gpu-acceleration":p(c),"onUpdate:visible":p(o),onBeforeShow:f,onBeforeHide:h,onShow:g,onHide:v}),{content:V(()=>[m.title?(N(),Z("div",{key:0,class:j(p(i).e("title")),role:"title"},ze(m.title),3)):ge("v-if",!0),ke(m.$slots,"default",{},()=>[We(ze(m.content),1)])]),default:V(()=>[m.$slots.reference?ke(m.$slots,"reference",{key:0}):ge("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}});var o4e=Ge(r4e,[["__file","popover.vue"]]);const X5=(t,e)=>{const n=e.arg||e.value,r=n==null?void 0:n.popperRef;r&&(r.triggerRef=t)};var i4e={mounted(t,e){X5(t,e)},updated(t,e){X5(t,e)}};const a4e="popover",rY=lEe(i4e,a4e),s4e=Wt(o4e,{directive:rY}),l4e=Ze({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:we(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:we([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:we(Function),default:t=>`${t}%`}}),u4e=de({name:"ElProgress"}),c4e=de({...u4e,props:l4e,setup(t){const e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=je("progress"),o=$(()=>{const O={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},S=w(e.percentage);return S.includes("gradient")?O.background=S:O.backgroundColor=S,O}),i=$(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=$(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(i.value)/2}`,10):0),s=$(()=>{const O=a.value,S=e.type==="dashboard";return` M 50 50 m 0 ${S?"":"-"}${O} a ${O} ${O} 0 1 1 0 ${S?"-":""}${O*2} a ${O} ${O} 0 1 1 0 ${S?"":"-"}${O*2} `}),l=$(()=>2*Math.PI*a.value),u=$(()=>e.type==="dashboard"?.75:1),c=$(()=>`${-1*l.value*(1-u.value)/2}px`),d=$(()=>({strokeDasharray:`${l.value*u.value}px, ${l.value}px`,strokeDashoffset:c.value})),f=$(()=>({strokeDasharray:`${l.value*u.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),h=$(()=>{let O;return e.color?O=w(e.percentage):O=n[e.status]||n.default,O}),g=$(()=>e.status==="warning"?vC:e.type==="line"?e.status==="success"?C$:Cd:e.status==="success"?Yb:fa),v=$(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),m=$(()=>e.format(e.percentage));function b(O){const S=100/O.length;return O.map((C,E)=>St(C)?{color:C,percentage:(E+1)*S}:C).sort((C,E)=>C.percentage-E.percentage)}const w=O=>{var S;const{color:x}=e;if(kt(x))return x(O);if(St(x))return x;{const C=b(x);for(const E of C)if(E.percentage>O)return E.color;return(S=C[C.length-1])==null?void 0:S.color}};return(O,S)=>(N(),Z("div",{class:j([p(r).b(),p(r).m(O.type),p(r).is(O.status),{[p(r).m("without-text")]:!O.showText,[p(r).m("text-inside")]:O.textInside}]),role:"progressbar","aria-valuenow":O.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[O.type==="line"?(N(),Z("div",{key:0,class:j(p(r).b("bar"))},[ee("div",{class:j(p(r).be("bar","outer")),style:bt({height:`${O.strokeWidth}px`})},[ee("div",{class:j([p(r).be("bar","inner"),{[p(r).bem("bar","inner","indeterminate")]:O.indeterminate},{[p(r).bem("bar","inner","striped")]:O.striped},{[p(r).bem("bar","inner","striped-flow")]:O.stripedFlow}]),style:bt(p(o))},[(O.showText||O.$slots.default)&&O.textInside?(N(),Z("div",{key:0,class:j(p(r).be("bar","innerText"))},[ke(O.$slots,"default",{percentage:O.percentage},()=>[ee("span",null,ze(p(m)),1)])],2)):ge("v-if",!0)],6)],6)],2)):(N(),Z("div",{key:1,class:j(p(r).b("circle")),style:bt({height:`${O.width}px`,width:`${O.width}px`})},[(N(),Z("svg",{viewBox:"0 0 100 100"},[ee("path",{class:j(p(r).be("circle","track")),d:p(s),stroke:`var(${p(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":O.strokeLinecap,"stroke-width":p(i),fill:"none",style:bt(p(d))},null,14,["d","stroke","stroke-linecap","stroke-width"]),ee("path",{class:j(p(r).be("circle","path")),d:p(s),stroke:p(h),fill:"none",opacity:O.percentage?1:0,"stroke-linecap":O.strokeLinecap,"stroke-width":p(i),style:bt(p(f))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(O.showText||O.$slots.default)&&!O.textInside?(N(),Z("div",{key:2,class:j(p(r).e("text")),style:bt({fontSize:`${p(v)}px`})},[ke(O.$slots,"default",{percentage:O.percentage},()=>[O.status?(N(),me(p(Ot),{key:1},{default:V(()=>[(N(),me(Jt(p(g))))]),_:1})):(N(),Z("span",{key:0},ze(p(m)),1))])],6)):ge("v-if",!0)],10,["aria-valuenow"]))}});var d4e=Ge(c4e,[["__file","progress.vue"]]);const oY=Wt(d4e),f4e=Ze({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:we([Array,Object]),default:()=>Gr(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:we([Array,Object]),default:()=>[OO,OO,OO]},voidIcon:{type:cr,default:()=>WQ},disabledVoidIcon:{type:cr,default:()=>OO},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:we(Array),default:()=>Gr(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Fo,clearable:Boolean,...Yi(["ariaLabel"])}),h4e={[ln]:t=>Pt(t),[zt]:t=>Pt(t)},p4e=de({name:"ElRate"}),g4e=de({...p4e,props:f4e,emits:h4e,setup(t,{expose:e,emit:n}){const r=t;function o(I,Q){const L=U=>Zt(U),H=Object.keys(Q).map(U=>+U).filter(U=>{const J=Q[U];return(L(J)?J.excluded:!1)?IU-J),re=Q[H[0]];return L(re)&&re.value||re}const i=gt(Ip,void 0),a=gt(uc,void 0),s=$o(),l=je("rate"),{inputId:u,isLabeledByFormItem:c}=Bl(r,{formItemContext:a}),d=z(r.modelValue),f=z(-1),h=z(!0),g=$(()=>[l.b(),l.m(s.value)]),v=$(()=>r.disabled||(i==null?void 0:i.disabled)),m=$(()=>l.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":S.value})),b=$(()=>{let I="";return r.showScore?I=r.scoreTemplate.replace(/\{\s*value\s*\}/,v.value?`${r.modelValue}`:`${d.value}`):r.showText&&(I=r.texts[Math.ceil(d.value)-1]),I}),w=$(()=>r.modelValue*100-Math.floor(r.modelValue)*100),O=$(()=>Ye(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),S=$(()=>{const I=o(d.value,O.value);return Zt(I)?"":I}),x=$(()=>{let I="";return v.value?I=`${w.value}%`:r.allowHalf&&(I="50%"),{color:S.value,width:I}}),C=$(()=>{let I=Ye(r.icons)?[...r.icons]:{...r.icons};return I=uu(I),Ye(I)?{[r.lowThreshold]:I[0],[r.highThreshold]:{value:I[1],excluded:!0},[r.max]:I[2]}:I}),E=$(()=>o(r.modelValue,C.value)),T=$(()=>v.value?St(r.disabledVoidIcon)?r.disabledVoidIcon:uu(r.disabledVoidIcon):St(r.voidIcon)?r.voidIcon:uu(r.voidIcon)),M=$(()=>o(d.value,C.value));function k(I){const Q=v.value&&w.value>0&&I-1r.modelValue,L=r.allowHalf&&h.value&&I-.5<=d.value&&I>d.value;return Q||L}function P(I){r.clearable&&I===r.modelValue&&(I=0),n(zt,I),r.modelValue!==I&&n(ln,I)}function R(I){v.value||(r.allowHalf&&h.value?P(d.value):P(I))}function D(I){if(v.value)return;let Q=d.value;const L=I.code;return L===st.up||L===st.right?(r.allowHalf?Q+=.5:Q+=1,I.stopPropagation(),I.preventDefault()):(L===st.left||L===st.down)&&(r.allowHalf?Q-=.5:Q-=1,I.stopPropagation(),I.preventDefault()),Q=Q<0?0:Q,Q=Q>r.max?r.max:Q,n(zt,Q),n(ln,Q),Q}function F(I,Q){if(!v.value){if(r.allowHalf&&Q){let L=Q.target;Ka(L,l.e("item"))&&(L=L.querySelector(`.${l.e("icon")}`)),(L.clientWidth===0||Ka(L,l.e("decimal")))&&(L=L.parentNode),h.value=Q.offsetX*2<=L.clientWidth,d.value=h.value?I-.5:I}else d.value=I;f.value=I}}function W(){v.value||(r.allowHalf&&(h.value=r.modelValue!==Math.floor(r.modelValue)),d.value=r.modelValue,f.value=-1)}return Le(()=>r.modelValue,I=>{d.value=I,h.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||n(zt,0),e({setCurrentValue:F,resetCurrentValue:W}),(I,Q)=>{var L;return N(),Z("div",{id:p(u),class:j([p(g),p(l).is("disabled",p(v))]),role:"slider","aria-label":p(c)?void 0:I.ariaLabel||"rating","aria-labelledby":p(c)?(L=p(a))==null?void 0:L.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":p(b)||void 0,"aria-valuemin":"0","aria-valuemax":I.max,tabindex:"0",style:bt(p(m)),onKeydown:D},[(N(!0),Z(ut,null,Xt(I.max,(H,re)=>(N(),Z("span",{key:re,class:j(p(l).e("item")),onMousemove:U=>F(H,U),onMouseleave:W,onClick:U=>R(H)},[B(p(Ot),{class:j([p(l).e("icon"),{hover:f.value===H},p(l).is("active",H<=d.value)])},{default:V(()=>[k(H)?ge("v-if",!0):(N(),Z(ut,{key:0},[Yt((N(),me(Jt(p(M)),null,null,512)),[[Bn,H<=d.value]]),Yt((N(),me(Jt(p(T)),null,null,512)),[[Bn,!(H<=d.value)]])],64)),k(H)?(N(),Z(ut,{key:1},[(N(),me(Jt(p(T)),{class:j([p(l).em("decimal","box")])},null,8,["class"])),B(p(Ot),{style:bt(p(x)),class:j([p(l).e("icon"),p(l).e("decimal")])},{default:V(()=>[(N(),me(Jt(p(E))))]),_:1},8,["style","class"])],64)):ge("v-if",!0)]),_:2},1032,["class"])],42,["onMousemove","onClick"]))),128)),I.showText||I.showScore?(N(),Z("span",{key:0,class:j(p(l).e("text")),style:bt({color:I.textColor})},ze(p(b)),7)):ge("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});var v4e=Ge(g4e,[["__file","rate.vue"]]);const m4e=Wt(v4e),Mh={primary:"icon-primary",success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Z5={[Mh.primary]:N0,[Mh.success]:kEe,[Mh.warning]:vC,[Mh.error]:E$,[Mh.info]:N0},y4e=Ze({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["primary","success","warning","info","error"],default:"info"}}),b4e=de({name:"ElResult"}),_4e=de({...b4e,props:y4e,setup(t){const e=t,n=je("result"),r=$(()=>{const o=e.icon,i=o&&Mh[o]?Mh[o]:"icon-info",a=Z5[i]||Z5["icon-info"];return{class:i,component:a}});return(o,i)=>(N(),Z("div",{class:j(p(n).b())},[ee("div",{class:j(p(n).e("icon"))},[ke(o.$slots,"icon",{},()=>[p(r).component?(N(),me(Jt(p(r).component),{key:0,class:j(p(r).class)},null,8,["class"])):ge("v-if",!0)])],2),o.title||o.$slots.title?(N(),Z("div",{key:0,class:j(p(n).e("title"))},[ke(o.$slots,"title",{},()=>[ee("p",null,ze(o.title),1)])],2)):ge("v-if",!0),o.subTitle||o.$slots["sub-title"]?(N(),Z("div",{key:1,class:j(p(n).e("subtitle"))},[ke(o.$slots,"sub-title",{},()=>[ee("p",null,ze(o.subTitle),1)])],2)):ge("v-if",!0),o.$slots.extra?(N(),Z("div",{key:2,class:j(p(n).e("extra"))},[ke(o.$slots,"extra")],2)):ge("v-if",!0)],2))}});var O4e=Ge(_4e,[["__file","result.vue"]]);const w4e=Wt(O4e),S4e=["start","center","end","space-around","space-between","space-evenly"],x4e=["top","middle","bottom"],C4e=Ze({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:S4e,default:"start"},align:{type:String,values:x4e}}),E4e=de({name:"ElRow"}),T4e=de({...E4e,props:C4e,setup(t){const e=t,n=je("row"),r=$(()=>e.gutter);mn(KH,{gutter:r});const o=$(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),i=$(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(N(),me(Jt(a.tag),{class:j(p(i)),style:bt(p(o))},{default:V(()=>[ke(a.$slots,"default")]),_:3},8,["class","style"]))}});var k4e=Ge(T4e,[["__file","row.vue"]]);const oi=Wt(k4e),A4e=de({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:je("select")}}});function P4e(t,e,n,r,o,i){return N(),Z("div",{class:j(t.ns.be("group","title")),style:bt({...t.style,lineHeight:`${t.height}px`})},ze(t.item.label),7)}var N4e=Ge(A4e,[["render",P4e],["__file","group-item.vue"]]);function M4e(t,{emit:e}){return{hoverItem:()=>{t.disabled||e("hover",t.index)},selectOptionClick:()=>{t.disabled||e("select",t.item,t.index)}}}const iY={label:"label",value:"value",disabled:"disabled",options:"options"};function PC(t){const e=$(()=>({...iY,...t.props}));return{aliasProps:e,getLabel:a=>Vr(a,e.value.label),getValue:a=>Vr(a,e.value.value),getDisabled:a=>Vr(a,e.value.disabled),getOptions:a=>Vr(a,e.value.options)}}const $4e=Ze({allowCreate:Boolean,autocomplete:{type:we(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:cr,default:Cd},effect:{type:we(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:{type:we(Function)},height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:we([Array,String,Number,Boolean,Object]),default:void 0},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:{type:we(Function)},reserveKeyword:{type:Boolean,default:!0},options:{type:we(Array),required:!0},placeholder:{type:String},teleported:yo.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},remote:Boolean,size:Fo,props:{type:we(Object),default:()=>iY},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:we(String),values:Ed,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},tagType:{...ad.type,default:"info"},tagEffect:{...ad.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:yo.appendTo,fitInputWidth:{type:[Boolean,Number],default:!0,validator(t){return ir(t)||Pt(t)}},suffixIcon:{type:cr,default:wc},...Dp,...Yi(["ariaLabel"])}),R4e=Ze({data:Array,disabled:Boolean,hovering:Boolean,item:{type:we(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),D4e={[zt]:t=>!0,[ln]:t=>!0,"remove-tag":t=>!0,"visible-change":t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},I4e={hover:t=>Pt(t),select:(t,e)=>!0},yR=Symbol("ElSelectV2Injection"),L4e=de({props:R4e,emits:I4e,setup(t,{emit:e}){const n=gt(yR),r=je("select"),{hoverItem:o,selectOptionClick:i}=M4e(t,{emit:e}),{getLabel:a}=PC(n.props);return{ns:r,hoverItem:o,selectOptionClick:i,getLabel:a}}});function B4e(t,e,n,r,o,i){return N(),Z("li",{"aria-selected":t.selected,style:bt(t.style),class:j([t.ns.be("dropdown","item"),t.ns.is("selected",t.selected),t.ns.is("disabled",t.disabled),t.ns.is("created",t.created),t.ns.is("hovering",t.hovering)]),onMousemove:t.hoverItem,onClick:Rt(t.selectOptionClick,["stop"])},[ke(t.$slots,"default",{item:t.item,index:t.index,disabled:t.disabled},()=>[ee("span",null,ze(t.getLabel(t.item)),1)])],46,["aria-selected","onMousemove","onClick"])}var F4e=Ge(L4e,[["render",B4e],["__file","option-item.vue"]]),G5=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function V4e(t,e){return!!(t===e||G5(t)&&G5(e))}function z4e(t,e){if(t.length!==e.length)return!1;for(var n=0;n{const e=Kt().proxy.$props;return $(()=>{const n=(r,o,i)=>({});return e.perfMode?Ib(n):j4e(n)})},gA=50,Uw="itemRendered",Yw="scroll",Ng="forward",Xw="backward",gl="auto",NC="smart",V0="start",Gu="center",z0="end",xv="horizontal",bR="vertical",W4e="ltr",Zg="rtl",j0="negative",_R="positive-ascending",OR="positive-descending",Q4e={[xv]:"left",[bR]:"top"},H4e=20,U4e={[xv]:"deltaX",[bR]:"deltaY"},Y4e=({atEndEdge:t,atStartEdge:e,layout:n},r)=>{let o,i=0;const a=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:a,onWheel:l=>{mp(o);const u=l[U4e[n.value]];a(i)&&a(i+u)||(i+=u,A$()||l.preventDefault(),o=kf(()=>{r(i),i=0}))}}},vA=wu({type:we([Number,Function]),required:!0}),mA=wu({type:Number}),yA=wu({type:Number,default:2}),X4e=wu({type:String,values:["ltr","rtl"],default:"ltr"}),bA=wu({type:Number,default:0}),Zw=wu({type:Number,required:!0}),sY=wu({type:String,values:["horizontal","vertical"],default:bR}),lY=Ze({className:{type:String,default:""},containerElement:{type:we([String,Object]),default:"div"},data:{type:we(Array),default:()=>Gr([])},direction:X4e,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:we([Object,String,Array])},useIsScrolling:Boolean,width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),uY=Ze({cache:yA,estimatedItemSize:mA,layout:sY,initScrollOffset:bA,total:Zw,itemSize:vA,...lY}),_A={type:Number,default:6},cY={type:Number,default:0},dY={type:Number,default:2},np=Ze({columnCache:yA,columnWidth:vA,estimatedColumnWidth:mA,estimatedRowHeight:mA,initScrollLeft:bA,initScrollTop:bA,itemKey:{type:we(Function),default:({columnIndex:t,rowIndex:e})=>`${e}:${t}`},rowCache:yA,rowHeight:vA,totalColumn:Zw,totalRow:Zw,hScrollbarSize:_A,vScrollbarSize:_A,scrollbarStartGap:cY,scrollbarEndGap:dY,role:String,...lY}),fY=Ze({alwaysOn:Boolean,class:String,layout:sY,total:Zw,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:_A,startGap:cY,endGap:dY,visible:Boolean}),Yh=(t,e)=>tt===W4e||t===Zg||t===xv,q5=t=>t===Zg;let sg=null;function Gw(t=!1){if(sg===null||t){const e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?sg=OR:(e.scrollLeft=1,e.scrollLeft===0?sg=j0:sg=_R),document.body.removeChild(e),sg}return sg}function Z4e({move:t,size:e,bar:n},r){const o={},i=`translate${n.axis}(${t}px)`;return o[n.size]=e,o.transform=i,r==="horizontal"?o.height="100%":o.width="100%",o}const OA=de({name:"ElVirtualScrollBar",props:fY,emits:["scroll","start-move","stop-move"],setup(t,{emit:e}){const n=$(()=>t.startGap+t.endGap),r=je("virtual-scrollbar"),o=je("scrollbar"),i=z(),a=z();let s=null,l=null;const u=pn({isDragging:!1,traveled:0}),c=$(()=>GQ[t.layout]),d=$(()=>t.clientSize-p(n)),f=$(()=>({position:"absolute",width:`${xv===t.layout?d.value:t.scrollbarSize}px`,height:`${xv===t.layout?t.scrollbarSize:d.value}px`,[Q4e[t.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),h=$(()=>{const C=t.ratio;if(C>=100)return Number.POSITIVE_INFINITY;if(C>=50)return C*d.value/100;const E=d.value/3;return Math.floor(Math.min(Math.max(C*d.value,H4e),E))}),g=$(()=>{if(!Number.isFinite(h.value))return{display:"none"};const C=`${h.value}px`;return Z4e({bar:c.value,size:C,move:u.traveled},t.layout)}),v=$(()=>Math.ceil(t.clientSize-h.value-p(n))),m=()=>{window.addEventListener("mousemove",S),window.addEventListener("mouseup",O);const C=p(a);!C||(l=document.onselectstart,document.onselectstart=()=>!1,C.addEventListener("touchmove",S,{passive:!0}),C.addEventListener("touchend",O))},b=()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",O),document.onselectstart=l,l=null;const C=p(a);!C||(C.removeEventListener("touchmove",S),C.removeEventListener("touchend",O))},w=C=>{C.stopImmediatePropagation(),!(C.ctrlKey||[1,2].includes(C.button))&&(u.isDragging=!0,u[c.value.axis]=C.currentTarget[c.value.offset]-(C[c.value.client]-C.currentTarget.getBoundingClientRect()[c.value.direction]),e("start-move"),m())},O=()=>{u.isDragging=!1,u[c.value.axis]=0,e("stop-move"),b()},S=C=>{const{isDragging:E}=u;if(!E||!a.value||!i.value)return;const T=u[c.value.axis];if(!T)return;mp(s);const M=(i.value.getBoundingClientRect()[c.value.direction]-C[c.value.client])*-1,k=a.value[c.value.offset]-T,P=M-k;s=kf(()=>{u.traveled=Math.max(0,Math.min(P,v.value)),e("scroll",P,v.value)})},x=C=>{const E=Math.abs(C.target.getBoundingClientRect()[c.value.direction]-C[c.value.client]),T=a.value[c.value.offset]/2,M=E-T;u.traveled=Math.max(0,Math.min(M,v.value)),e("scroll",M,v.value)};return Le(()=>t.scrollFrom,C=>{u.isDragging||(u.traveled=Math.ceil(C*v.value))}),Yn(()=>{b()}),()=>At("div",{role:"presentation",ref:i,class:[r.b(),t.class,(t.alwaysOn||u.isDragging)&&"always-on"],style:f.value,onMousedown:Rt(x,["stop","prevent"]),onTouchstartPrevent:w},At("div",{ref:a,class:o.e("thumb"),style:g.value,onMousedown:w},[]))}}),hY=({name:t,getOffset:e,getItemSize:n,getItemOffset:r,getEstimatedTotalSize:o,getStartIndexForOffset:i,getStopIndexForStartIndex:a,initCache:s,clearCache:l,validateProps:u})=>de({name:t!=null?t:"ElVirtualList",props:uY,emits:[Uw,Yw],setup(c,{emit:d,expose:f}){u(c);const h=Kt(),g=je("vl"),v=z(s(c,h)),m=aY(),b=z(),w=z(),O=z(),S=z({isScrolling:!1,scrollDir:"forward",scrollOffset:Pt(c.initScrollOffset)?c.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:c.scrollbarAlwaysOn}),x=$(()=>{const{total:ie,cache:te}=c,{isScrolling:he,scrollDir:K,scrollOffset:ne}=p(S);if(ie===0)return[0,0,0,0];const fe=i(c,ne,p(v)),Ne=a(c,fe,ne,p(v)),$e=!he||K===Xw?Math.max(1,te):1,ue=!he||K===Ng?Math.max(1,te):1;return[Math.max(0,fe-$e),Math.max(0,Math.min(ie-1,Ne+ue)),fe,Ne]}),C=$(()=>o(c,p(v))),E=$(()=>W0(c.layout)),T=$(()=>[{position:"relative",[`overflow-${E.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:c.direction,height:Pt(c.height)?`${c.height}px`:c.height,width:Pt(c.width)?`${c.width}px`:c.width},c.style]),M=$(()=>{const ie=p(C),te=p(E);return{height:te?"100%":`${ie}px`,pointerEvents:p(S).isScrolling?"none":void 0,width:te?`${ie}px`:"100%"}}),k=$(()=>E.value?c.width:c.height),{onWheel:P}=Y4e({atStartEdge:$(()=>S.value.scrollOffset<=0),atEndEdge:$(()=>S.value.scrollOffset>=C.value),layout:$(()=>c.layout)},ie=>{var te,he;(he=(te=O.value).onMouseUp)==null||he.call(te),Q(Math.min(S.value.scrollOffset+ie,C.value-k.value))});pr(b,"wheel",P,{passive:!1});const R=()=>{const{total:ie}=c;if(ie>0){const[ne,fe,Ne,$e]=p(x);d(Uw,ne,fe,Ne,$e)}const{scrollDir:te,scrollOffset:he,updateRequested:K}=p(S);d(Yw,te,he,K)},D=ie=>{const{clientHeight:te,scrollHeight:he,scrollTop:K}=ie.currentTarget,ne=p(S);if(ne.scrollOffset===K)return;const fe=Math.max(0,Math.min(K,he-te));S.value={...ne,isScrolling:!0,scrollDir:Yh(ne.scrollOffset,fe),scrollOffset:fe,updateRequested:!1},wt(re)},F=ie=>{const{clientWidth:te,scrollLeft:he,scrollWidth:K}=ie.currentTarget,ne=p(S);if(ne.scrollOffset===he)return;const{direction:fe}=c;let Ne=he;if(fe===Zg)switch(Gw()){case j0:{Ne=-he;break}case OR:{Ne=K-te-he;break}}Ne=Math.max(0,Math.min(Ne,K-te)),S.value={...ne,isScrolling:!0,scrollDir:Yh(ne.scrollOffset,Ne),scrollOffset:Ne,updateRequested:!1},wt(re)},W=ie=>{p(E)?F(ie):D(ie),R()},I=(ie,te)=>{const he=(C.value-k.value)/te*ie;Q(Math.min(C.value-k.value,he))},Q=ie=>{ie=Math.max(ie,0),ie!==p(S).scrollOffset&&(S.value={...p(S),scrollOffset:ie,scrollDir:Yh(p(S).scrollOffset,ie),updateRequested:!0},wt(re))},L=(ie,te=gl)=>{const{scrollOffset:he}=p(S);ie=Math.max(0,Math.min(ie,c.total-1)),Q(e(c,ie,te,he,p(v)))},H=ie=>{const{direction:te,itemSize:he,layout:K}=c,ne=m.value(l&&he,l&&K,l&&te);let fe;if(Dn(ne,String(ie)))fe=ne[ie];else{const Ne=r(c,ie,p(v)),$e=n(c,ie,p(v)),ue=p(E),G=te===Zg,ve=ue?Ne:0;ne[ie]=fe={position:"absolute",left:G?void 0:`${ve}px`,right:G?`${ve}px`:void 0,top:ue?0:`${Ne}px`,height:ue?"100%":`${$e}px`,width:ue?`${$e}px`:"100%"}}return fe},re=()=>{S.value.isScrolling=!1,wt(()=>{m.value(-1,null,null)})},U=()=>{const ie=b.value;ie&&(ie.scrollTop=0)};jt(()=>{if(!kn)return;const{initScrollOffset:ie}=c,te=p(b);Pt(ie)&&te&&(p(E)?te.scrollLeft=ie:te.scrollTop=ie),R()}),_u(()=>{const{direction:ie,layout:te}=c,{scrollOffset:he,updateRequested:K}=p(S),ne=p(b);if(K&&ne)if(te===xv)if(ie===Zg)switch(Gw()){case j0:{ne.scrollLeft=-he;break}case _R:{ne.scrollLeft=he;break}default:{const{clientWidth:fe,scrollWidth:Ne}=ne;ne.scrollLeft=Ne-fe-he;break}}else ne.scrollLeft=he;else ne.scrollTop=he}),Vx(()=>{p(b).scrollTop=p(S).scrollOffset});const J={ns:g,clientSize:k,estimatedTotalSize:C,windowStyle:T,windowRef:b,innerRef:w,innerStyle:M,itemsToRender:x,scrollbarRef:O,states:S,getItemStyle:H,onScroll:W,onScrollbarScroll:I,onWheel:P,scrollTo:Q,scrollToItem:L,resetScrollTop:U};return f({windowRef:b,innerRef:w,getItemStyleCache:m,scrollTo:Q,scrollToItem:L,resetScrollTop:U,states:S}),J},render(c){var d;const{$slots:f,className:h,clientSize:g,containerElement:v,data:m,getItemStyle:b,innerElement:w,itemsToRender:O,innerStyle:S,layout:x,total:C,onScroll:E,onScrollbarScroll:T,states:M,useIsScrolling:k,windowStyle:P,ns:R}=c,[D,F]=O,W=Jt(v),I=Jt(w),Q=[];if(C>0)for(let U=D;U<=F;U++)Q.push(At(ut,{key:U},(d=f.default)==null?void 0:d.call(f,{data:m,index:U,isScrolling:k?M.isScrolling:void 0,style:b(U)})));const L=[At(I,{style:S,ref:"innerRef"},St(I)?Q:{default:()=>Q})],H=At(OA,{ref:"scrollbarRef",clientSize:g,layout:x,onScroll:T,ratio:g*100/this.estimatedTotalSize,scrollFrom:M.scrollOffset/(this.estimatedTotalSize-g),total:C,alwaysOn:M.scrollbarAlwaysOn}),re=At(W,{class:[R.e("window"),h],style:P,onScroll:E,ref:"windowRef",key:0},St(W)?[L]:{default:()=>[L]});return At("div",{key:0,class:[R.e("wrapper"),M.scrollbarAlwaysOn?"always-on":""]},[re,H])}}),pY=hY({name:"ElFixedSizeList",getItemOffset:({itemSize:t},e)=>e*t,getItemSize:({itemSize:t})=>t,getEstimatedTotalSize:({total:t,itemSize:e})=>e*t,getOffset:({height:t,total:e,itemSize:n,layout:r,width:o},i,a,s)=>{const l=W0(r)?o:t,u=Math.max(0,e*n-l),c=Math.min(u,i*n),d=Math.max(0,(i+1)*n-l);switch(a===NC&&(s>=d-l&&s<=c+l?a=gl:a=Gu),a){case V0:return c;case z0:return d;case Gu:{const f=Math.round(d+(c-d)/2);return fu+Math.floor(l/2)?u:f}case gl:default:return s>=d&&s<=c?s:sMath.max(0,Math.min(t-1,Math.floor(n/e))),getStopIndexForStartIndex:({height:t,total:e,itemSize:n,layout:r,width:o},i,a)=>{const s=i*n,l=W0(r)?o:t,u=Math.ceil((l+a-s)/n);return Math.max(0,Math.min(e-1,i+u-1))},initCache(){},clearCache:!0,validateProps(){}}),Mg=(t,e,n)=>{const{itemSize:r}=t,{items:o,lastVisitedIndex:i}=n;if(e>i){let a=0;if(i>=0){const s=o[i];a=s.offset+s.size}for(let s=i+1;s<=e;s++){const l=r(s);o[s]={offset:a,size:l},a+=l}n.lastVisitedIndex=e}return o[e]},G4e=(t,e,n)=>{const{items:r,lastVisitedIndex:o}=e;return(o>0?r[o].offset:0)>=n?gY(t,e,0,o,n):q4e(t,e,Math.max(0,o),n)},gY=(t,e,n,r,o)=>{for(;n<=r;){const i=n+Math.floor((r-n)/2),a=Mg(t,i,e).offset;if(a===o)return i;ao&&(r=i-1)}return Math.max(0,n-1)},q4e=(t,e,n,r)=>{const{total:o}=t;let i=1;for(;n{let o=0;if(r>=t&&(r=t-1),r>=0){const s=e[r];o=s.offset+s.size}const a=(t-r-1)*n;return o+a},K4e=hY({name:"ElDynamicSizeList",getItemOffset:(t,e,n)=>Mg(t,e,n).offset,getItemSize:(t,e,{items:n})=>n[e].size,getEstimatedTotalSize:K5,getOffset:(t,e,n,r,o)=>{const{height:i,layout:a,width:s}=t,l=W0(a)?s:i,u=Mg(t,e,o),c=K5(t,o),d=Math.max(0,Math.min(c-l,u.offset)),f=Math.max(0,u.offset-l+u.size);switch(n===NC&&(r>=f-l&&r<=d+l?n=gl:n=Gu),n){case V0:return d;case z0:return f;case Gu:return Math.round(f+(d-f)/2);case gl:default:return r>=f&&r<=d?r:rG4e(t,n,e),getStopIndexForStartIndex:(t,e,n,r)=>{const{height:o,total:i,layout:a,width:s}=t,l=W0(a)?s:o,u=Mg(t,e,r),c=n+l;let d=u.offset+u.size,f=e;for(;f{var i,a;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,r-1),(i=e.exposed)==null||i.getItemStyleCache(-1),o&&((a=e.proxy)==null||a.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:t})=>{}}),J4e={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number};var e8e=de({name:"ElSelectDropdown",props:J4e,setup(t,{slots:e,expose:n}){const r=gt(yR),o=je("select"),{getLabel:i,getValue:a,getDisabled:s}=PC(r.props),l=z([]),u=z(),c=$(()=>t.data.length);Le(()=>c.value,()=>{var P,R;(R=(P=r.tooltipRef.value)==null?void 0:P.updatePopper)==null||R.call(P)});const d=$(()=>Sn(r.props.estimatedOptionHeight)),f=$(()=>d.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:P=>l.value[P]}),h=(P=[],R)=>{const{props:{valueKey:D}}=r;return Zt(R)?P&&P.some(F=>Mn(Vr(F,D))===Vr(R,D)):P.includes(R)},g=(P,R)=>{if(Zt(R)){const{valueKey:D}=r.props;return Vr(P,D)===Vr(R,D)}else return P===R},v=(P,R)=>r.props.multiple?h(P,a(R)):g(P,a(R)),m=(P,R)=>{const{disabled:D,multiple:F,multipleLimit:W}=r.props;return D||!R&&(F?W>0&&P.length>=W:!1)},b=P=>t.hoveringIndex===P;n({listRef:u,isSized:d,isItemDisabled:m,isItemHovering:b,isItemSelected:v,scrollToItem:P=>{const R=u.value;R&&R.scrollToItem(P)},resetScrollTop:()=>{const P=u.value;P&&P.resetScrollTop()}});const x=P=>{const{index:R,data:D,style:F}=P,W=p(d),{itemSize:I,estimatedSize:Q}=p(f),{modelValue:L}=r.props,{onSelect:H,onHover:re}=r,U=D[R];if(U.type==="Group")return B(N4e,{item:U,style:F,height:W?I:Q},null);const J=v(L,U),ie=m(L,J),te=b(R);return B(F4e,rn(P,{selected:J,disabled:s(U)||ie,created:!!U.created,hovering:te,item:U,onSelect:H,onHover:re}),{default:he=>{var K;return((K=e.default)==null?void 0:K.call(e,he))||B("span",null,[i(U)])}})},{onKeyboardNavigate:C,onKeyboardSelect:E}=r,T=()=>{C("forward")},M=()=>{C("backward")},k=P=>{const{code:R}=P,{tab:D,esc:F,down:W,up:I,enter:Q,numpadEnter:L}=st;switch([F,W,I,Q,L].includes(R)&&(P.preventDefault(),P.stopPropagation()),R){case D:case F:break;case W:T();break;case I:M();break;case Q:case L:E();break}};return()=>{var P,R,D,F;const{data:W,width:I}=t,{height:Q,multiple:L,scrollbarAlwaysOn:H}=r.props,re=$(()=>Xk?!0:H),U=p(d)?pY:K4e;return B("div",{class:[o.b("dropdown"),o.is("multiple",L)],style:{width:`${I}px`}},[(P=e.header)==null?void 0:P.call(e),((R=e.loading)==null?void 0:R.call(e))||((D=e.empty)==null?void 0:D.call(e))||B(U,rn({ref:u},p(f),{className:o.be("dropdown","list"),scrollbarAlwaysOn:re.value,data:W,height:Q,width:I,total:W.length,onKeydown:k}),{default:J=>B(x,J,null)}),(F=e.footer)==null?void 0:F.call(e)])}}});function t8e(t,e){const{aliasProps:n,getLabel:r,getValue:o}=PC(t),i=z(0),a=z(),s=$(()=>t.allowCreate&&t.filterable);Le(()=>t.options,h=>{const g=new Set(h.map(v=>r(v)));e.createdOptions=e.createdOptions.filter(v=>!g.has(r(v)))});function l(h){const g=v=>r(v)===h;return t.options&&t.options.some(g)||e.createdOptions.some(g)}function u(h){!s.value||(t.multiple&&h.created?i.value++:a.value=h)}function c(h){if(s.value)if(h&&h.length>0){if(l(h)){e.createdOptions=e.createdOptions.filter(v=>r(v)!==e.previousQuery);return}const g={[n.value.value]:h,[n.value.label]:h,created:!0,[n.value.disabled]:!1};e.createdOptions.length>=i.value?e.createdOptions[i.value]=g:e.createdOptions.push(g)}else if(t.multiple)e.createdOptions.length=i.value;else{const g=a.value;e.createdOptions.length=0,g&&g.created&&e.createdOptions.push(g)}}function d(h){if(!s.value||!h||!h.created||h.created&&t.reserveKeyword&&e.inputValue===r(h))return;const g=e.createdOptions.findIndex(v=>o(v)===o(h));~g&&(e.createdOptions.splice(g,1),i.value--)}function f(){s.value&&(e.createdOptions.length=0,i.value=0)}return{createNewOption:c,removeNewOption:d,selectNewOption:u,clearAllNewOption:f}}const n8e=(t,e)=>{const{t:n}=En(),r=je("select"),o=je("input"),{form:i,formItem:a}=Xi(),{inputId:s}=Bl(t,{formItemContext:a}),{aliasProps:l,getLabel:u,getValue:c,getDisabled:d,getOptions:f}=PC(t),{valueOnClear:h,isEmptyValue:g}=Hb(t),v=pn({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),m=z(-1),b=z(),w=z(),O=z(),S=z(),x=z(),C=z(),E=z(),T=z(),M=z(),k=z(),{isComposing:P,handleCompositionStart:R,handleCompositionEnd:D,handleCompositionUpdate:F}=Zb({afterComposition:et=>ii(et)}),W=$(()=>t.disabled||!!(i!=null&&i.disabled)),{wrapperRef:I,isFocused:Q,handleBlur:L}=qf(x,{disabled:W,afterFocus(){t.automaticDropdown&&!J.value&&(J.value=!0,v.menuVisibleOnFocus=!0)},beforeBlur(et){var ae,De;return((ae=O.value)==null?void 0:ae.isFocusInsideContent(et))||((De=S.value)==null?void 0:De.isFocusInsideContent(et))},afterBlur(){var et;J.value=!1,v.menuVisibleOnFocus=!1,t.validateEvent&&((et=a==null?void 0:a.validate)==null||et.call(a,"blur").catch(ae=>void 0))}}),H=$(()=>Ie("")),re=$(()=>t.loading?!1:t.options.length>0||v.createdOptions.length>0),U=z([]),J=z(!1),ie=$(()=>{var et;return(et=i==null?void 0:i.statusIcon)!=null?et:!1}),te=$(()=>{const et=U.value.length*t.itemHeight;return et>t.height?t.height:et}),he=$(()=>t.multiple?Ye(t.modelValue)&&t.modelValue.length>0:!g(t.modelValue)),K=$(()=>t.clearable&&!W.value&&v.inputHovering&&he.value),ne=$(()=>t.remote&&t.filterable?"":t.suffixIcon),fe=$(()=>ne.value&&r.is("reverse",J.value)),Ne=$(()=>(a==null?void 0:a.validateState)||""),$e=$(()=>{if(!!Ne.value)return mC[Ne.value]}),ue=$(()=>t.remote?300:0),G=$(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!v.inputValue&&!re.value?!1:t.filterable&&v.inputValue&&re.value&&U.value.length===0?t.noMatchText||n("el.select.noMatch"):re.value?null:t.noDataText||n("el.select.noData")),ve=$(()=>t.filterable&&kt(t.filterMethod)),q=$(()=>t.filterable&&t.remote&&kt(t.remoteMethod)),Ie=et=>{const ae=new RegExp(gR(et),"i"),De=Ke=>ve.value||q.value?!0:et?ae.test(u(Ke)||""):!0;return t.loading?[]:[...v.createdOptions,...t.options].reduce((Ke,Bt)=>{const hn=f(Bt);if(Ye(hn)){const Xn=hn.filter(De);Xn.length>0&&Ke.push({label:u(Bt),type:"Group"},...Xn)}else(t.remote||De(Bt))&&Ke.push(Bt);return Ke},[])},Ee=()=>{U.value=Ie(v.inputValue)},Oe=$(()=>{const et=new Map;return H.value.forEach((ae,De)=>{et.set(vt(c(ae)),{option:ae,index:De})}),et}),se=$(()=>{const et=new Map;return U.value.forEach((ae,De)=>{et.set(vt(c(ae)),{option:ae,index:De})}),et}),X=$(()=>U.value.every(et=>d(et))),oe=$o(),ce=$(()=>oe.value==="small"?"small":"default"),Ae=()=>{var et;if(Pt(t.fitInputWidth)){m.value=t.fitInputWidth;return}const ae=((et=b.value)==null?void 0:et.offsetWidth)||200;!t.fitInputWidth&&re.value?wt(()=>{m.value=Math.max(ae,ye())}):m.value=ae},ye=()=>{var et,ae;const Ke=document.createElement("canvas").getContext("2d"),Bt=r.be("dropdown","item"),Xn=(((ae=(et=T.value)==null?void 0:et.listRef)==null?void 0:ae.innerRef)||document).querySelector(`.${Bt}`);if(Xn===null||Ke===null)return 0;const Jr=getComputedStyle(Xn),Se=Number.parseFloat(Jr.paddingLeft)+Number.parseFloat(Jr.paddingRight);return Ke.font=`bold ${Jr.font.replace(new RegExp(`\\b${Jr.fontWeight}\\b`),"")}`,U.value.reduce((Et,Vt)=>{const fn=Ke.measureText(u(Vt));return Math.max(fn.width,Et)},0)+Se},Te=()=>{if(!w.value)return 0;const et=window.getComputedStyle(w.value);return Number.parseFloat(et.gap||"6px")},Me=$(()=>{const et=Te();return{maxWidth:`${k.value&&t.maxCollapseTags===1?v.selectionWidth-v.collapseItemWidth-et:v.selectionWidth}px`}}),Fe=$(()=>({maxWidth:`${v.selectionWidth}px`})),at=$(()=>Ye(t.modelValue)?t.modelValue.length===0&&!v.inputValue:t.filterable?!v.inputValue:!0),nt=$(()=>{var et;const ae=(et=t.placeholder)!=null?et:n("el.select.placeholder");return t.multiple||!he.value?ae:v.selectedLabel}),ct=$(()=>{var et,ae;return(ae=(et=O.value)==null?void 0:et.popperRef)==null?void 0:ae.contentRef}),ht=$(()=>{if(t.multiple){const et=t.modelValue.length;if(t.modelValue.length>0&&se.value.has(t.modelValue[et-1])){const{index:ae}=se.value.get(t.modelValue[et-1]);return ae}}else if(!g(t.modelValue)&&se.value.has(t.modelValue)){const{index:et}=se.value.get(t.modelValue);return et}return-1}),Je=$({get(){return J.value&&G.value!==!1},set(et){J.value=et}}),ft=$(()=>t.multiple?t.collapseTags?v.cachedOptions.slice(0,t.maxCollapseTags):v.cachedOptions:[]),Mt=$(()=>t.multiple?t.collapseTags?v.cachedOptions.slice(t.maxCollapseTags):[]:[]),{createNewOption:Pe,removeNewOption:Ce,selectNewOption:pe,clearAllNewOption:Be}=t8e(t,v),_t=()=>{W.value||(v.menuVisibleOnFocus?v.menuVisibleOnFocus=!1:J.value=!J.value)},en=()=>{v.inputValue.length>0&&!J.value&&(J.value=!0),Pe(v.inputValue),wt(()=>{yn(v.inputValue)})},On=Hi(en,ue.value),yn=et=>{v.previousQuery===et||P.value||(v.previousQuery=et,t.filterable&&kt(t.filterMethod)?t.filterMethod(et):t.filterable&&t.remote&&kt(t.remoteMethod)&&t.remoteMethod(et),t.defaultFirstOption&&(t.filterable||t.remote)&&U.value.length?wt(dr):wt(xo))},dr=()=>{const et=U.value.filter(Ke=>!Ke.disabled&&Ke.type!=="Group"),ae=et.find(Ke=>Ke.created),De=et[0];v.hoveringIndex=qe(U.value,ae||De)},to=et=>{Oo(t.modelValue,et)||e(ln,et)},Kr=et=>{e(zt,et),to(et),v.previousValue=t.multiple?String(et):et,wt(()=>{if(t.multiple&&Ye(t.modelValue)){const ae=v.cachedOptions.slice(),De=t.modelValue.map(Ke=>Gs(Ke,ae));Oo(v.cachedOptions,De)||(v.cachedOptions=De)}else ma(!0)})},qe=(et=[],ae)=>{if(!Zt(ae))return et.indexOf(ae);const De=t.valueKey;let Ke=-1;return et.some((Bt,hn)=>Vr(Bt,De)===Vr(ae,De)?(Ke=hn,!0):!1),Ke},vt=et=>Zt(et)?Vr(et,t.valueKey):et,dt=()=>{Ae()},$t=()=>{v.selectionWidth=Number.parseFloat(window.getComputedStyle(w.value).width)},Dt=()=>{v.collapseItemWidth=k.value.getBoundingClientRect().width},Vn=()=>{var et,ae;(ae=(et=O.value)==null?void 0:et.updatePopper)==null||ae.call(et)},no=()=>{var et,ae;(ae=(et=S.value)==null?void 0:et.updatePopper)==null||ae.call(et)},lo=et=>{if(t.multiple){let ae=t.modelValue.slice();const De=qe(ae,c(et));De>-1?(ae=[...ae.slice(0,De),...ae.slice(De+1)],v.cachedOptions.splice(De,1),Ce(et)):(t.multipleLimit<=0||ae.length{let De=t.modelValue.slice();const Ke=qe(De,c(ae));Ke>-1&&!W.value&&(De=[...t.modelValue.slice(0,Ke),...t.modelValue.slice(Ke+1)],v.cachedOptions.splice(Ke,1),Kr(De),e("remove-tag",c(ae)),Ce(ae)),et.stopPropagation(),za()},za=()=>{var et;(et=x.value)==null||et.focus()},vs=()=>{var et;if(J.value){J.value=!1,wt(()=>{var ae;return(ae=x.value)==null?void 0:ae.blur()});return}(et=x.value)==null||et.blur()},Sr=()=>{v.inputValue.length>0?v.inputValue="":J.value=!1},Ql=et=>aC(et,ae=>!v.cachedOptions.some(De=>c(De)===ae&&d(De))),bi=et=>{if(!!t.multiple&&et.code!==st.delete&&v.inputValue.length===0){et.preventDefault();const ae=t.modelValue.slice(),De=Ql(ae);if(De<0)return;const Ke=ae[De];ae.splice(De,1);const Bt=v.cachedOptions[De];v.cachedOptions.splice(De,1),Ce(Bt),Kr(ae),e("remove-tag",Ke)}},tt=()=>{let et;Ye(t.modelValue)?et=[]:et=h.value,v.selectedLabel="",J.value=!1,Kr(et),e("clear"),Be(),za()},Lt=(et,ae=void 0)=>{const De=U.value;if(!["forward","backward"].includes(et)||W.value||De.length<=0||X.value||P.value)return;if(!J.value)return _t();Sn(ae)&&(ae=v.hoveringIndex);let Ke=-1;et==="forward"?(Ke=ae+1,Ke>=De.length&&(Ke=0)):et==="backward"&&(Ke=ae-1,(Ke<0||Ke>=De.length)&&(Ke=De.length-1));const Bt=De[Ke];if(d(Bt)||Bt.type==="Group")return Lt(et,Ke);v.hoveringIndex=Ke,ai(Ke)},Ft=()=>{if(J.value)~v.hoveringIndex&&U.value[v.hoveringIndex]&&lo(U.value[v.hoveringIndex]);else return _t()},Br=et=>{v.hoveringIndex=et!=null?et:-1},xo=()=>{t.multiple?v.hoveringIndex=U.value.findIndex(et=>t.modelValue.some(ae=>vt(ae)===vt(c(et)))):v.hoveringIndex=U.value.findIndex(et=>vt(c(et))===vt(t.modelValue))},ii=et=>{if(v.inputValue=et.target.value,t.remote)On();else return en()},Pi=et=>{if(J.value=!1,Q.value){const ae=new FocusEvent("blur",et);L(ae)}},Ni=()=>(v.isBeforeHide=!1,wt(()=>{~ht.value&&ai(v.hoveringIndex)})),ai=et=>{T.value.scrollToItem(et)},Gs=(et,ae)=>{const De=vt(et);if(Oe.value.has(De)){const{option:Ke}=Oe.value.get(De);return Ke}if(ae&&ae.length){const Ke=ae.find(Bt=>vt(c(Bt))===De);if(Ke)return Ke}return{[l.value.value]:et,[l.value.label]:et}},ma=(et=!1)=>{if(t.multiple)if(t.modelValue.length>0){const ae=v.cachedOptions.slice();v.cachedOptions.length=0,v.previousValue=t.modelValue.toString();for(const De of t.modelValue){const Ke=Gs(De,ae);v.cachedOptions.push(Ke)}}else v.cachedOptions=[],v.previousValue=void 0;else if(he.value){v.previousValue=t.modelValue;const ae=U.value,De=ae.findIndex(Ke=>vt(c(Ke))===vt(t.modelValue));~De?v.selectedLabel=u(ae[De]):(!v.selectedLabel||et)&&(v.selectedLabel=vt(t.modelValue))}else v.selectedLabel="",v.previousValue=void 0;Be(),Ae()};return Le(()=>t.fitInputWidth,()=>{Ae()}),Le(J,et=>{et?(t.persistent||Ae(),yn("")):(v.inputValue="",v.previousQuery=null,v.isBeforeHide=!0,Pe("")),e("visible-change",et)}),Le(()=>t.modelValue,(et,ae)=>{var De;(!et||Ye(et)&&et.length===0||t.multiple&&!Oo(et.toString(),v.previousValue)||!t.multiple&&vt(et)!==vt(v.previousValue))&&ma(!0),!Oo(et,ae)&&t.validateEvent&&((De=a==null?void 0:a.validate)==null||De.call(a,"change").catch(Bt=>void 0))},{deep:!0}),Le(()=>t.options,()=>{const et=x.value;(!et||et&&document.activeElement!==et)&&ma()},{deep:!0,flush:"post"}),Le(()=>U.value,()=>(Ae(),T.value&&wt(T.value.resetScrollTop))),ua(()=>{v.isBeforeHide||Ee()}),ua(()=>{const{valueKey:et,options:ae}=t,De=new Map;for(const Ke of ae){const Bt=c(Ke);let hn=Bt;if(Zt(hn)&&(hn=Vr(Bt,et)),De.get(hn))break;De.set(hn,!0)}}),jt(()=>{ma()}),Wr(b,dt),Wr(w,$t),Wr(T,Vn),Wr(I,Vn),Wr(M,no),Wr(k,Dt),{inputId:s,collapseTagSize:ce,currentPlaceholder:nt,expanded:J,emptyText:G,popupHeight:te,debounce:ue,allOptions:H,filteredOptions:U,iconComponent:ne,iconReverse:fe,tagStyle:Me,collapseTagStyle:Fe,popperSize:m,dropdownMenuVisible:Je,hasModelValue:he,shouldShowPlaceholder:at,selectDisabled:W,selectSize:oe,needStatusIcon:ie,showClearBtn:K,states:v,isFocused:Q,nsSelect:r,nsInput:o,inputRef:x,menuRef:T,tagMenuRef:M,tooltipRef:O,tagTooltipRef:S,selectRef:b,wrapperRef:I,selectionRef:w,prefixRef:C,suffixRef:E,collapseItemRef:k,popperRef:ct,validateState:Ne,validateIcon:$e,showTagList:ft,collapseTagList:Mt,debouncedOnInputChange:On,deleteTag:So,getLabel:u,getValue:c,getDisabled:d,getValueKey:vt,handleClear:tt,handleClickOutside:Pi,handleDel:bi,handleEsc:Sr,focus:za,blur:vs,handleMenuEnter:Ni,handleResize:dt,resetSelectionWidth:$t,updateTooltip:Vn,updateTagTooltip:no,updateOptions:Ee,toggleMenu:_t,scrollTo:ai,onInput:ii,onKeyboardNavigate:Lt,onKeyboardSelect:Ft,onSelect:lo,onHover:Br,handleCompositionStart:R,handleCompositionEnd:D,handleCompositionUpdate:F}},r8e=de({name:"ElSelectV2",components:{ElSelectMenu:e8e,ElTag:Zs,ElTooltip:Zo,ElIcon:Ot},directives:{ClickOutside:sd},props:$4e,emits:D4e,setup(t,{emit:e}){const n=$(()=>{const{modelValue:s,multiple:l}=t,u=l?[]:void 0;return Ye(s)?l?s:u:l?u:s}),r=n8e(pn({...Mo(t),modelValue:n}),e),{calculatorRef:o,inputStyle:i}=fR();mn(yR,{props:pn({...Mo(t),height:r.popupHeight,modelValue:n}),expanded:r.expanded,tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect});const a=$(()=>t.multiple?r.states.cachedOptions.map(s=>s.label):r.states.selectedLabel);return{...r,modelValue:n,selectedLabel:a,calculatorRef:o,inputStyle:i}}});function o8e(t,e,n,r,o,i){const a=Nn("el-tag"),s=Nn("el-tooltip"),l=Nn("el-icon"),u=Nn("el-select-menu"),c=Wx("click-outside");return Yt((N(),Z("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:d=>t.states.inputHovering=!0,onMouseleave:d=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,placement:t.placement,pure:"",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:d=>t.states.isBeforeHide=!1},{default:V(()=>[ee("div",{ref:"wrapperRef",class:j([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:Rt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(N(),Z("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[ke(t.$slots,"prefix")],2)):ge("v-if",!0),ee("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.modelValue.length)])},[t.multiple?ke(t.$slots,"tag",{key:0,data:t.states.cachedOptions,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>[(N(!0),Z(ut,null,Xt(t.showTagList,d=>(N(),Z("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:bt(t.tagStyle),onClose:f=>t.deleteTag(f,d)},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))},[ke(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[We(ze(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.modelValue.length>t.maxCollapseTags?(N(),me(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom","popper-class":t.popperClass,teleported:t.teleported},{default:V(()=>[ee("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,style:bt(t.collapseTagStyle),"disable-transitions":""},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))}," + "+ze(t.modelValue.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:V(()=>[ee("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(N(!0),Z(ut,null,Xt(t.collapseTagList,d=>(N(),Z("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:f=>t.deleteTag(f,d)},{default:V(()=>[ee("span",{class:j(t.nsSelect.e("tags-text"))},[ke(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[We(ze(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):ge("v-if",!0)]):ge("v-if",!0),ee("div",{class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Yt(ee("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":d=>t.states.inputValue=d,style:bt(t.inputStyle),autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":t.expanded,"aria-label":t.ariaLabel,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,role:"combobox",readonly:!t.filterable,spellcheck:"false",type:"text",name:t.name,onInput:t.onInput,onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onKeydown:[yr(Rt(d=>t.onKeyboardNavigate("backward"),["stop","prevent"]),["up"]),yr(Rt(d=>t.onKeyboardNavigate("forward"),["stop","prevent"]),["down"]),yr(Rt(t.onKeyboardSelect,["stop","prevent"]),["enter"]),yr(Rt(t.handleEsc,["stop","prevent"]),["esc"]),yr(Rt(t.handleDel,["stop"]),["delete"])],onClick:Rt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","tabindex","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[Ux,t.states.inputValue]]),t.filterable?(N(),Z("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:ze(t.states.inputValue)},null,10,["textContent"])):ge("v-if",!0)],2),t.shouldShowPlaceholder?(N(),Z("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?ke(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[ee("span",null,ze(t.currentPlaceholder),1)]):(N(),Z("span",{key:1},ze(t.currentPlaceholder),1))],2)):ge("v-if",!0)],2),ee("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent?Yt((N(),me(l,{key:0,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.iconReverse])},{default:V(()=>[(N(),me(Jt(t.iconComponent)))]),_:1},8,["class"])),[[Bn,!t.showClearBtn]]):ge("v-if",!0),t.showClearBtn&&t.clearIcon?(N(),me(l,{key:1,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.nsSelect.e("clear")]),onClick:Rt(t.handleClear,["prevent","stop"])},{default:V(()=>[(N(),me(Jt(t.clearIcon)))]),_:1},8,["class","onClick"])):ge("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(N(),me(l,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:V(()=>[(N(),me(Jt(t.validateIcon)))]),_:1},8,["class"])):ge("v-if",!0)],2)],10,["onClick"])]),content:V(()=>[B(u,{ref:"menuRef",data:t.filteredOptions,width:t.popperSize,"hovering-index":t.states.hoveringIndex,"scrollbar-always-on":t.scrollbarAlwaysOn},ha({default:V(d=>[ke(t.$slots,"default",Is(ic(d)))]),_:2},[t.$slots.header?{name:"header",fn:V(()=>[ee("div",{class:j(t.nsSelect.be("dropdown","header")),onClick:Rt(()=>{},["stop"])},[ke(t.$slots,"header")],10,["onClick"])])}:void 0,t.$slots.loading&&t.loading?{name:"loading",fn:V(()=>[ee("div",{class:j(t.nsSelect.be("dropdown","loading"))},[ke(t.$slots,"loading")],2)])}:t.loading||t.filteredOptions.length===0?{name:"empty",fn:V(()=>[ee("div",{class:j(t.nsSelect.be("dropdown","empty"))},[ke(t.$slots,"empty",{},()=>[ee("span",null,ze(t.emptyText),1)])],2)])}:void 0,t.$slots.footer?{name:"footer",fn:V(()=>[ee("div",{class:j(t.nsSelect.be("dropdown","footer")),onClick:Rt(()=>{},["stop"])},[ke(t.$slots,"footer")],10,["onClick"])])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[c,t.handleClickOutside,t.popperRef]])}var i8e=Ge(r8e,[["render",o8e],["__file","select.vue"]]);const a8e=Wt(i8e),s8e=Ze({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:we([Number,Object])}}),l8e=Ze({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),u8e=de({name:"ElSkeletonItem"}),c8e=de({...u8e,props:l8e,setup(t){const e=je("skeleton");return(n,r)=>(N(),Z("div",{class:j([p(e).e("item"),p(e).e(n.variant)])},[n.variant==="image"?(N(),me(p(rTe),{key:0})):ge("v-if",!0)],2))}});var qw=Ge(c8e,[["__file","skeleton-item.vue"]]);const d8e=(t,e=0)=>{if(e===0)return t;const n=Zt(e)&&Boolean(e.initVal),r=z(n);let o=null;const i=s=>{if(Sn(s)){r.value=t.value;return}o&&clearTimeout(o),o=setTimeout(()=>{r.value=t.value},s)},a=s=>{s==="leading"?Pt(e)?i(e):i(e.leading):Zt(e)?i(e.trailing):r.value=!1};return jt(()=>a("leading")),Le(()=>t.value,s=>{a(s?"leading":"trailing")}),r},f8e=de({name:"ElSkeleton"}),h8e=de({...f8e,props:s8e,setup(t,{expose:e}){const n=t,r=je("skeleton"),o=d8e(jn(n,"loading"),n.throttle);return e({uiLoading:o}),(i,a)=>p(o)?(N(),Z("div",rn({key:0,class:[p(r).b(),p(r).is("animated",i.animated)]},i.$attrs),[(N(!0),Z(ut,null,Xt(i.count,s=>(N(),Z(ut,{key:s},[p(o)?ke(i.$slots,"template",{key:s},()=>[B(qw,{class:j(p(r).is("first")),variant:"p"},null,8,["class"]),(N(!0),Z(ut,null,Xt(i.rows,l=>(N(),me(qw,{key:l,class:j([p(r).e("paragraph"),p(r).is("last",l===i.rows&&i.rows>1)]),variant:"p"},null,8,["class"]))),128))]):ge("v-if",!0)],64))),128))],16)):ke(i.$slots,"default",Is(rn({key:1},i.$attrs)))}});var p8e=Ge(h8e,[["__file","skeleton.vue"]]);const g8e=Wt(p8e,{SkeletonItem:qw}),v8e=qr(qw),vY=Symbol("sliderContextKey"),m8e=Ze({modelValue:{type:we([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Fo,inputSize:Fo,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:we(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:we(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Ed,default:"top"},marks:{type:we(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Yi(["ariaLabel"])}),c2=t=>Pt(t)||Ye(t)&&t.every(Pt),y8e={[zt]:c2,[Lo]:c2,[ln]:c2},b8e=Ze({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Ed,default:"top"}}),_8e={[zt]:t=>Pt(t)},O8e=(t,e,n)=>{const r=z(),o=z(!1),i=$(()=>e.value instanceof Function),a=$(()=>i.value&&e.value(t.modelValue)||t.modelValue),s=Hi(()=>{n.value&&(o.value=!0)},50),l=Hi(()=>{n.value&&(o.value=!1)},50);return{tooltip:r,tooltipVisible:o,formatValue:a,displayTooltip:s,hideTooltip:l}},w8e=(t,e,n)=>{const{disabled:r,min:o,max:i,step:a,showTooltip:s,persistent:l,precision:u,sliderSize:c,formatTooltip:d,emitChange:f,resetSize:h,updateDragging:g}=gt(vY),{tooltip:v,tooltipVisible:m,formatValue:b,displayTooltip:w,hideTooltip:O}=O8e(t,d,s),S=z(),x=$(()=>`${(t.modelValue-o.value)/(i.value-o.value)*100}%`),C=$(()=>t.vertical?{bottom:x.value}:{left:x.value}),E=()=>{e.hovering=!0,w()},T=()=>{e.hovering=!1,e.dragging||O()},M=ie=>{r.value||(ie.preventDefault(),H(ie),window.addEventListener("mousemove",re),window.addEventListener("touchmove",re),window.addEventListener("mouseup",U),window.addEventListener("touchend",U),window.addEventListener("contextmenu",U),S.value.focus())},k=ie=>{r.value||(e.newPosition=Number.parseFloat(x.value)+ie/(i.value-o.value)*100,J(e.newPosition),f())},P=()=>{k(-a.value)},R=()=>{k(a.value)},D=()=>{k(-a.value*4)},F=()=>{k(a.value*4)},W=()=>{r.value||(J(0),f())},I=()=>{r.value||(J(100),f())},Q=ie=>{let te=!0;switch(ie.code){case st.left:case st.down:P();break;case st.right:case st.up:R();break;case st.home:W();break;case st.end:I();break;case st.pageDown:D();break;case st.pageUp:F();break;default:te=!1;break}te&&ie.preventDefault()},L=ie=>{let te,he;return ie.type.startsWith("touch")?(he=ie.touches[0].clientY,te=ie.touches[0].clientX):(he=ie.clientY,te=ie.clientX),{clientX:te,clientY:he}},H=ie=>{e.dragging=!0,e.isClick=!0;const{clientX:te,clientY:he}=L(ie);t.vertical?e.startY=he:e.startX=te,e.startPosition=Number.parseFloat(x.value),e.newPosition=e.startPosition},re=ie=>{if(e.dragging){e.isClick=!1,w(),h();let te;const{clientX:he,clientY:K}=L(ie);t.vertical?(e.currentY=K,te=(e.startY-e.currentY)/c.value*100):(e.currentX=he,te=(e.currentX-e.startX)/c.value*100),e.newPosition=e.startPosition+te,J(e.newPosition)}},U=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||O(),e.isClick||J(e.newPosition),f()},0),window.removeEventListener("mousemove",re),window.removeEventListener("touchmove",re),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),window.removeEventListener("contextmenu",U))},J=async ie=>{if(ie===null||Number.isNaN(+ie))return;ie<0?ie=0:ie>100&&(ie=100);const te=100/((i.value-o.value)/a.value);let K=Math.round(ie/te)*te*(i.value-o.value)*.01+o.value;K=Number.parseFloat(K.toFixed(u.value)),K!==t.modelValue&&n(zt,K),!e.dragging&&t.modelValue!==e.oldValue&&(e.oldValue=t.modelValue),await wt(),e.dragging&&w(),v.value.updatePopper()};return Le(()=>e.dragging,ie=>{g(ie)}),pr(S,"touchstart",M,{passive:!1}),{disabled:r,button:S,tooltip:v,tooltipVisible:m,showTooltip:s,persistent:l,wrapperStyle:C,formatValue:b,handleMouseEnter:E,handleMouseLeave:T,onButtonDown:M,onKeyDown:Q,setPosition:J}},S8e=de({name:"ElSliderButton"}),x8e=de({...S8e,props:b8e,emits:_8e,setup(t,{expose:e,emit:n}){const r=t,o=je("slider"),i=pn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),a=$(()=>c.value?d.value:!1),{disabled:s,button:l,tooltip:u,showTooltip:c,persistent:d,tooltipVisible:f,wrapperStyle:h,formatValue:g,handleMouseEnter:v,handleMouseLeave:m,onButtonDown:b,onKeyDown:w,setPosition:O}=w8e(r,i,n),{hovering:S,dragging:x}=Mo(i);return e({onButtonDown:b,onKeyDown:w,setPosition:O,hovering:S,dragging:x}),(C,E)=>(N(),Z("div",{ref_key:"button",ref:l,class:j([p(o).e("button-wrapper"),{hover:p(S),dragging:p(x)}]),style:bt(p(h)),tabindex:p(s)?-1:0,onMouseenter:p(v),onMouseleave:p(m),onMousedown:p(b),onFocus:p(v),onBlur:p(m),onKeydown:p(w)},[B(p(Zo),{ref_key:"tooltip",ref:u,visible:p(f),placement:C.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":C.tooltipClass,disabled:!p(c),persistent:p(a)},{content:V(()=>[ee("span",null,ze(p(g)),1)]),default:V(()=>[ee("div",{class:j([p(o).e("button"),{hover:p(S),dragging:p(x)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var J5=Ge(x8e,[["__file","button.vue"]]);const C8e=Ze({mark:{type:we([String,Object]),default:void 0}});var E8e=de({name:"ElSliderMarker",props:C8e,setup(t){const e=je("slider"),n=$(()=>St(t.mark)?t.mark:t.mark.label),r=$(()=>St(t.mark)?void 0:t.mark.style);return()=>At("div",{class:e.e("marks-text"),style:r.value},n.value)}});const T8e=(t,e,n)=>{const{form:r,formItem:o}=Xi(),i=wr(),a=z(),s=z(),l={firstButton:a,secondButton:s},u=$(()=>t.disabled||(r==null?void 0:r.disabled)||!1),c=$(()=>Math.min(e.firstValue,e.secondValue)),d=$(()=>Math.max(e.firstValue,e.secondValue)),f=$(()=>t.range?`${100*(d.value-c.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),h=$(()=>t.range?`${100*(c.value-t.min)/(t.max-t.min)}%`:"0%"),g=$(()=>t.vertical?{height:t.height}:{}),v=$(()=>t.vertical?{height:f.value,bottom:h.value}:{width:f.value,left:h.value}),m=()=>{i.value&&(e.sliderSize=i.value[`client${t.vertical?"Height":"Width"}`])},b=R=>{const D=t.min+R*(t.max-t.min)/100;if(!t.range)return a;let F;return Math.abs(c.value-D)e.secondValue?"firstButton":"secondButton",l[F]},w=R=>{const D=b(R);return D.value.setPosition(R),D},O=R=>{e.firstValue=R!=null?R:t.min,x(t.range?[c.value,d.value]:R!=null?R:t.min)},S=R=>{e.secondValue=R,t.range&&x([c.value,d.value])},x=R=>{n(zt,R),n(Lo,R)},C=async()=>{await wt(),n(ln,t.range?[c.value,d.value]:t.modelValue)},E=R=>{var D,F,W,I,Q,L;if(u.value||e.dragging)return;m();let H=0;if(t.vertical){const re=(W=(F=(D=R.touches)==null?void 0:D.item(0))==null?void 0:F.clientY)!=null?W:R.clientY;H=(i.value.getBoundingClientRect().bottom-re)/e.sliderSize*100}else{const re=(L=(Q=(I=R.touches)==null?void 0:I.item(0))==null?void 0:Q.clientX)!=null?L:R.clientX,U=i.value.getBoundingClientRect().left;H=(re-U)/e.sliderSize*100}if(!(H<0||H>100))return w(H)};return{elFormItem:o,slider:i,firstButton:a,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:v,resetSize:m,setPosition:w,emitChange:C,onSliderWrapperPrevent:R=>{var D,F;(((D=l.firstButton.value)==null?void 0:D.dragging)||((F=l.secondButton.value)==null?void 0:F.dragging))&&R.preventDefault()},onSliderClick:R=>{E(R)&&C()},onSliderDown:async R=>{const D=E(R);D&&(await wt(),D.value.onButtonDown(R))},onSliderMarkerDown:R=>{if(u.value||e.dragging)return;w(R)&&C()},setFirstValue:O,setSecondValue:S}},k8e=(t,e,n,r)=>({stops:$(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const a=(t.max-t.min)/t.step,s=100*t.step/(t.max-t.min),l=Array.from({length:a-1}).map((u,c)=>(c+1)*s);return t.range?l.filter(u=>u<100*(n.value-t.min)/(t.max-t.min)||u>100*(r.value-t.min)/(t.max-t.min)):l.filter(u=>u>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:a=>t.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),A8e=t=>$(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,r)=>n-r).filter(n=>n<=t.max&&n>=t.min).map(n=>({point:n,position:(n-t.min)*100/(t.max-t.min),mark:t.marks[n]})):[]),P8e=(t,e,n,r,o,i)=>{const a=u=>{o(zt,u),o(Lo,u)},s=()=>t.range?![n.value,r.value].every((u,c)=>u===e.oldValue[c]):t.modelValue!==e.oldValue,l=()=>{var u,c;t.min>t.max&&Ao("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&Ye(d)?d[1]t.max?a([t.max,t.max]):d[0]t.max?a([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],s()&&(t.validateEvent&&((u=i==null?void 0:i.validate)==null||u.call(i,"change").catch(f=>void 0)),e.oldValue=d.slice())):!t.range&&Pt(d)&&!Number.isNaN(d)&&(dt.max?a(t.max):(e.firstValue=d,s()&&(t.validateEvent&&((c=i==null?void 0:i.validate)==null||c.call(i,"change").catch(f=>void 0)),e.oldValue=d)))};l(),Le(()=>e.dragging,u=>{u||l()}),Le(()=>t.modelValue,(u,c)=>{e.dragging||Ye(u)&&Ye(c)&&u.every((d,f)=>d===c[f])&&e.firstValue===u[0]&&e.secondValue===u[1]||l()},{deep:!0}),Le(()=>[t.min,t.max],()=>{l()})},N8e=(t,e,n)=>{const r=z();return jt(async()=>{t.range?(Ye(t.modelValue)?(e.firstValue=Math.max(t.min,t.modelValue[0]),e.secondValue=Math.min(t.max,t.modelValue[1])):(e.firstValue=t.min,e.secondValue=t.max),e.oldValue=[e.firstValue,e.secondValue]):(!Pt(t.modelValue)||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),pr(window,"resize",n),await wt(),n()}),{sliderWrapper:r}},M8e=de({name:"ElSlider"}),$8e=de({...M8e,props:m8e,emits:y8e,setup(t,{expose:e,emit:n}){const r=t,o=je("slider"),{t:i}=En(),a=pn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:l,firstButton:u,secondButton:c,sliderDisabled:d,minValue:f,maxValue:h,runwayStyle:g,barStyle:v,resetSize:m,emitChange:b,onSliderWrapperPrevent:w,onSliderClick:O,onSliderDown:S,onSliderMarkerDown:x,setFirstValue:C,setSecondValue:E}=T8e(r,a,n),{stops:T,getStopStyle:M}=k8e(r,a,f,h),{inputId:k,isLabeledByFormItem:P}=Bl(r,{formItemContext:s}),R=$o(),D=$(()=>r.inputSize||R.value),F=$(()=>r.ariaLabel||i("el.slider.defaultLabel",{min:r.min,max:r.max})),W=$(()=>r.range?r.rangeStartLabel||i("el.slider.defaultRangeStartLabel"):F.value),I=$(()=>r.formatValueText?r.formatValueText(ie.value):`${ie.value}`),Q=$(()=>r.rangeEndLabel||i("el.slider.defaultRangeEndLabel")),L=$(()=>r.formatValueText?r.formatValueText(te.value):`${te.value}`),H=$(()=>[o.b(),o.m(R.value),o.is("vertical",r.vertical),{[o.m("with-input")]:r.showInput}]),re=A8e(r);P8e(r,a,f,h,n,s);const U=$(()=>{const ne=[r.min,r.max,r.step].map(fe=>{const Ne=`${fe}`.split(".")[1];return Ne?Ne.length:0});return Math.max.apply(null,ne)}),{sliderWrapper:J}=N8e(r,a,m),{firstValue:ie,secondValue:te,sliderSize:he}=Mo(a),K=ne=>{a.dragging=ne};return pr(J,"touchstart",w,{passive:!1}),pr(J,"touchmove",w,{passive:!1}),mn(vY,{...Mo(r),sliderSize:he,disabled:d,precision:U,emitChange:b,resetSize:m,updateDragging:K}),e({onSliderClick:O}),(ne,fe)=>{var Ne,$e;return N(),Z("div",{id:ne.range?p(k):void 0,ref_key:"sliderWrapper",ref:J,class:j(p(H)),role:ne.range?"group":void 0,"aria-label":ne.range&&!p(P)?p(F):void 0,"aria-labelledby":ne.range&&p(P)?(Ne=p(s))==null?void 0:Ne.labelId:void 0},[ee("div",{ref_key:"slider",ref:l,class:j([p(o).e("runway"),{"show-input":ne.showInput&&!ne.range},p(o).is("disabled",p(d))]),style:bt(p(g)),onMousedown:p(S),onTouchstartPassive:p(S)},[ee("div",{class:j(p(o).e("bar")),style:bt(p(v))},null,6),B(J5,{id:ne.range?void 0:p(k),ref_key:"firstButton",ref:u,"model-value":p(ie),vertical:ne.vertical,"tooltip-class":ne.tooltipClass,placement:ne.placement,role:"slider","aria-label":ne.range||!p(P)?p(W):void 0,"aria-labelledby":!ne.range&&p(P)?($e=p(s))==null?void 0:$e.labelId:void 0,"aria-valuemin":ne.min,"aria-valuemax":ne.range?p(te):ne.max,"aria-valuenow":p(ie),"aria-valuetext":p(I),"aria-orientation":ne.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(C)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),ne.range?(N(),me(J5,{key:0,ref_key:"secondButton",ref:c,"model-value":p(te),vertical:ne.vertical,"tooltip-class":ne.tooltipClass,placement:ne.placement,role:"slider","aria-label":p(Q),"aria-valuemin":p(ie),"aria-valuemax":ne.max,"aria-valuenow":p(te),"aria-valuetext":p(L),"aria-orientation":ne.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):ge("v-if",!0),ne.showStops?(N(),Z("div",{key:1},[(N(!0),Z(ut,null,Xt(p(T),(ue,G)=>(N(),Z("div",{key:G,class:j(p(o).e("stop")),style:bt(p(M)(ue))},null,6))),128))])):ge("v-if",!0),p(re).length>0?(N(),Z(ut,{key:2},[ee("div",null,[(N(!0),Z(ut,null,Xt(p(re),(ue,G)=>(N(),Z("div",{key:G,style:bt(p(M)(ue.position)),class:j([p(o).e("stop"),p(o).e("marks-stop")])},null,6))),128))]),ee("div",{class:j(p(o).e("marks"))},[(N(!0),Z(ut,null,Xt(p(re),(ue,G)=>(N(),me(p(E8e),{key:G,mark:ue.mark,style:bt(p(M)(ue.position)),onMousedown:Rt(ve=>p(x)(ue.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):ge("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),ne.showInput&&!ne.range?(N(),me(p(dR),{key:0,ref:"input","model-value":p(ie),class:j(p(o).e("input")),step:ne.step,disabled:p(d),controls:ne.showInputControls,min:ne.min,max:ne.max,precision:p(U),debounce:ne.debounce,size:p(D),"onUpdate:modelValue":p(C),onChange:p(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):ge("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var R8e=Ge($8e,[["__file","slider.vue"]]);const mY=Wt(R8e),D8e=Ze({prefixCls:{type:String}}),eB=de({name:"ElSpaceItem",props:D8e,setup(t,{slots:e}){const n=je("space"),r=$(()=>`${t.prefixCls||n.b()}__item`);return()=>At("div",{class:r.value},ke(e,"default"))}}),tB={small:8,default:12,large:16};function I8e(t){const e=je("space"),n=$(()=>[e.b(),e.m(t.direction),t.class]),r=z(0),o=z(0),i=$(()=>{const s=t.wrap||t.fill?{flexWrap:"wrap"}:{},l={alignItems:t.alignment},u={rowGap:`${o.value}px`,columnGap:`${r.value}px`};return[s,l,u,t.style]}),a=$(()=>t.fill?{flexGrow:1,minWidth:`${t.fillRatio}%`}:{});return ua(()=>{const{size:s="small",wrap:l,direction:u,fill:c}=t;if(Ye(s)){const[d=0,f=0]=s;r.value=d,o.value=f}else{let d;Pt(s)?d=s:d=tB[s||"small"]||tB.small,(l||c)&&u==="horizontal"?r.value=o.value=d:u==="horizontal"?(r.value=d,o.value=0):(o.value=d,r.value=0)}}),{classes:n,containerStyle:i,itemStyle:a}}const L8e=Ze({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:we([String,Object,Array]),default:""},style:{type:we([String,Array,Object]),default:""},alignment:{type:we(String),default:"center"},prefixCls:{type:String},spacer:{type:we([Object,String,Number,Array]),default:null,validator:t=>Mr(t)||Pt(t)||St(t)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Oc,validator:t=>Pt(t)||Ye(t)&&t.length===2&&t.every(Pt)}}),B8e=de({name:"ElSpace",props:L8e,setup(t,{slots:e}){const{classes:n,containerStyle:r,itemStyle:o}=I8e(t);function i(a,s="",l=[]){const{prefixCls:u}=t;return a.forEach((c,d)=>{nA(c)?Ye(c.children)&&c.children.forEach((f,h)=>{nA(f)&&Ye(f.children)?i(f.children,`${s+h}-`,l):Mr(f)&&(f==null?void 0:f.type)===vi?l.push(f):l.push(B(eB,{style:o.value,prefixCls:u,key:`nested-${s+h}`},{default:()=>[f]},ul.PROPS|ul.STYLE,["style","prefixCls"]))}):tNe(c)&&l.push(B(eB,{style:o.value,prefixCls:u,key:`LoopKey${s+d}`},{default:()=>[c]},ul.PROPS|ul.STYLE,["style","prefixCls"]))}),l}return()=>{var a;const{spacer:s,direction:l}=t,u=ke(e,"default",{key:0},()=>[]);if(((a=u.children)!=null?a:[]).length===0)return null;if(Ye(u.children)){let c=i(u.children);if(s){const d=c.length-1;c=c.reduce((f,h,g)=>{const v=[...f,h];return g!==d&&v.push(B("span",{style:[o.value,l==="vertical"?"width: 100%":null],key:g},[Mr(s)?s:We(s,ul.TEXT)],ul.STYLE)),v},[])}return B("div",{class:n.value,style:r.value},c,ul.STYLE|ul.CLASS)}return u.children}}}),F8e=Wt(B8e),V8e=Ze({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:we([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:we([String,Object,Array])}}),z8e=de({name:"ElStatistic"}),j8e=de({...z8e,props:V8e,setup(t,{expose:e}){const n=t,r=je("statistic"),o=$(()=>{const{value:i,formatter:a,precision:s,decimalSeparator:l,groupSeparator:u}=n;if(kt(a))return a(i);if(!Pt(i)||Number.isNaN(i))return i;let[c,d=""]=String(i).split(".");return d=d.padEnd(s,"0").slice(0,s>0?s:0),c=c.replace(/\B(?=(\d{3})+(?!\d))/g,u),[c,d].join(d?l:"")});return e({displayValue:o}),(i,a)=>(N(),Z("div",{class:j(p(r).b())},[i.$slots.title||i.title?(N(),Z("div",{key:0,class:j(p(r).e("head"))},[ke(i.$slots,"title",{},()=>[We(ze(i.title),1)])],2)):ge("v-if",!0),ee("div",{class:j(p(r).e("content"))},[i.$slots.prefix||i.prefix?(N(),Z("div",{key:0,class:j(p(r).e("prefix"))},[ke(i.$slots,"prefix",{},()=>[ee("span",null,ze(i.prefix),1)])],2)):ge("v-if",!0),ee("span",{class:j(p(r).e("number")),style:bt(i.valueStyle)},ze(p(o)),7),i.$slots.suffix||i.suffix?(N(),Z("div",{key:1,class:j(p(r).e("suffix"))},[ke(i.$slots,"suffix",{},()=>[ee("span",null,ze(i.suffix),1)])],2)):ge("v-if",!0)],2)],2))}});var W8e=Ge(j8e,[["__file","statistic.vue"]]);const yY=Wt(W8e),Q8e=Ze({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:we([Number,Object]),default:0},valueStyle:{type:we([String,Object,Array])}}),H8e={finish:()=>!0,[ln]:t=>Pt(t)},U8e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],nB=t=>Pt(t)?new Date(t).getTime():t.valueOf(),rB=(t,e)=>{let n=t;const r=/\[([^\]]*)]/g;return U8e.reduce((i,[a,s])=>{const l=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(l.test(i)){const u=Math.floor(n/s);return n-=u*s,i.replace(l,c=>String(u).padStart(c.length,"0"))}return i},e).replace(r,"$1")},Y8e=de({name:"ElCountdown"}),X8e=de({...Y8e,props:Q8e,emits:H8e,setup(t,{expose:e,emit:n}){const r=t;let o;const i=z(0),a=$(()=>rB(i.value,r.format)),s=c=>rB(c,r.format),l=()=>{o&&(mp(o),o=void 0)},u=()=>{const c=nB(r.value),d=()=>{let f=c-Date.now();n(ln,f),f<=0?(f=0,l(),n("finish")):o=kf(d),i.value=f};o=kf(d)};return jt(()=>{i.value=nB(r.value)-Date.now(),Le(()=>[r.value,r.format],()=>{l(),u()},{immediate:!0})}),Yn(()=>{l()}),e({displayValue:a}),(c,d)=>(N(),me(p(yY),{value:i.value,title:c.title,prefix:c.prefix,suffix:c.suffix,"value-style":c.valueStyle,formatter:s},ha({_:2},[Xt(c.$slots,(f,h)=>({name:h,fn:V(()=>[ke(c.$slots,h)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var Z8e=Ge(X8e,[["__file","countdown.vue"]]);const G8e=Wt(Z8e),q8e=Ze({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),K8e={[ln]:(t,e)=>[t,e].every(Pt)},bY="ElSteps",J8e=de({name:"ElSteps"}),e5e=de({...J8e,props:q8e,emits:K8e,setup(t,{emit:e}){const n=t,r=je("steps"),{children:o,addChild:i,removeChild:a,ChildrenSorter:s}=SC(Kt(),"ElStep");return Le(o,()=>{o.value.forEach((l,u)=>{l.setIndex(u)})}),mn(bY,{props:n,steps:o,addStep:i,removeStep:a}),Le(()=>n.active,(l,u)=>{e(ln,l,u)}),(l,u)=>(N(),Z("div",{class:j([p(r).b(),p(r).m(l.simple?"simple":l.direction)])},[ke(l.$slots,"default"),B(p(s))],2))}});var t5e=Ge(e5e,[["__file","steps.vue"]]);const n5e=Ze({title:{type:String,default:""},icon:{type:cr},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),r5e=de({name:"ElStep"}),o5e=de({...r5e,props:n5e,setup(t){const e=t,n=je("step"),r=z(-1),o=z({}),i=z(""),a=gt(bY),s=Kt();jt(()=>{Le([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([C])=>{S(C)},{immediate:!0})});const l=$(()=>e.status||i.value),u=$(()=>{const C=a.steps.value[r.value-1];return C?C.currentStatus:"wait"}),c=$(()=>a.props.alignCenter),d=$(()=>a.props.direction==="vertical"),f=$(()=>a.props.simple),h=$(()=>a.steps.value.length),g=$(()=>{var C;return((C=a.steps.value[h.value-1])==null?void 0:C.uid)===s.uid}),v=$(()=>f.value?"":a.props.space),m=$(()=>[n.b(),n.is(f.value?"simple":a.props.direction),n.is("flex",g.value&&!v.value&&!c.value),n.is("center",c.value&&!d.value&&!f.value)]),b=$(()=>{const C={flexBasis:Pt(v.value)?`${v.value}px`:v.value?v.value:`${100/(h.value-(c.value?0:1))}%`};return d.value||g.value&&(C.maxWidth=`${100/h.value}%`),C}),w=C=>{r.value=C},O=C=>{const E=C==="wait",T={transitionDelay:`${E?"-":""}${150*r.value}ms`},M=C===a.props.processStatus||E?0:100;T.borderWidth=M&&!f.value?"1px":0,T[a.props.direction==="vertical"?"height":"width"]=`${M}%`,o.value=T},S=C=>{C>r.value?i.value=a.props.finishStatus:C===r.value&&u.value!=="error"?i.value=a.props.processStatus:i.value="wait";const E=a.steps.value[r.value-1];E&&E.calcProgress(i.value)},x=pn({uid:s.uid,getVnode:()=>s.vnode,currentStatus:l,setIndex:w,calcProgress:O});return a.addStep(x),Yn(()=>{a.removeStep(x)}),(C,E)=>(N(),Z("div",{style:bt(p(b)),class:j(p(m))},[ge(" icon & line "),ee("div",{class:j([p(n).e("head"),p(n).is(p(l))])},[p(f)?ge("v-if",!0):(N(),Z("div",{key:0,class:j(p(n).e("line"))},[ee("i",{class:j(p(n).e("line-inner")),style:bt(o.value)},null,6)],2)),ee("div",{class:j([p(n).e("icon"),p(n).is(C.icon||C.$slots.icon?"icon":"text")])},[ke(C.$slots,"icon",{},()=>[C.icon?(N(),me(p(Ot),{key:0,class:j(p(n).e("icon-inner"))},{default:V(()=>[(N(),me(Jt(C.icon)))]),_:1},8,["class"])):p(l)==="success"?(N(),me(p(Ot),{key:1,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:V(()=>[B(p(Yb))]),_:1},8,["class"])):p(l)==="error"?(N(),me(p(Ot),{key:2,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:V(()=>[B(p(fa))]),_:1},8,["class"])):p(f)?ge("v-if",!0):(N(),Z("div",{key:3,class:j(p(n).e("icon-inner"))},ze(r.value+1),3))])],2)],2),ge(" title & description "),ee("div",{class:j(p(n).e("main"))},[ee("div",{class:j([p(n).e("title"),p(n).is(p(l))])},[ke(C.$slots,"title",{},()=>[We(ze(C.title),1)])],2),p(f)?(N(),Z("div",{key:0,class:j(p(n).e("arrow"))},null,2)):(N(),Z("div",{key:1,class:j([p(n).e("description"),p(n).is(p(l))])},[ke(C.$slots,"description",{},()=>[We(ze(C.description),1)])],2))],2)],6))}});var _Y=Ge(o5e,[["__file","item.vue"]]);const i5e=Wt(t5e,{Step:_Y}),a5e=qr(_Y),OY=t=>["",...Oc].includes(t),s5e=Ze({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:OY},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:cr},activeActionIcon:{type:cr},activeIcon:{type:cr},inactiveIcon:{type:cr},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:we(Function)},id:String,tabindex:{type:[String,Number]},...Yi(["ariaLabel"])}),l5e={[zt]:t=>ir(t)||St(t)||Pt(t),[ln]:t=>ir(t)||St(t)||Pt(t),[Lo]:t=>ir(t)||St(t)||Pt(t)},wY="ElSwitch",u5e=de({name:wY}),c5e=de({...u5e,props:s5e,emits:l5e,setup(t,{expose:e,emit:n}){const r=t,{formItem:o}=Xi(),i=$o(),a=je("switch"),{inputId:s}=Bl(r,{formItemContext:o}),l=Zi($(()=>r.loading)),u=z(r.modelValue!==!1),c=z(),d=z(),f=$(()=>[a.b(),a.m(i.value),a.is("disabled",l.value),a.is("checked",b.value)]),h=$(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),g=$(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),v=$(()=>({width:so(r.width)}));Le(()=>r.modelValue,()=>{u.value=!0});const m=$(()=>u.value?r.modelValue:!1),b=$(()=>m.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(m.value)||(n(zt,r.inactiveValue),n(ln,r.inactiveValue),n(Lo,r.inactiveValue)),Le(b,x=>{var C;c.value.checked=x,r.validateEvent&&((C=o==null?void 0:o.validate)==null||C.call(o,"change").catch(E=>void 0))});const w=()=>{const x=b.value?r.inactiveValue:r.activeValue;n(zt,x),n(ln,x),n(Lo,x),wt(()=>{c.value.checked=b.value})},O=()=>{if(l.value)return;const{beforeChange:x}=r;if(!x){w();return}const C=x();[dp(C),ir(C)].includes(!0)||Ao(wY,"beforeChange must return type `Promise` or `boolean`"),dp(C)?C.then(T=>{T&&w()}).catch(T=>{}):C&&w()},S=()=>{var x,C;(C=(x=c.value)==null?void 0:x.focus)==null||C.call(x)};return jt(()=>{c.value.checked=b.value}),e({focus:S,checked:b}),(x,C)=>(N(),Z("div",{class:j(p(f)),onClick:Rt(O,["prevent"])},[ee("input",{id:p(s),ref_key:"input",ref:c,class:j(p(a).e("input")),type:"checkbox",role:"switch","aria-checked":p(b),"aria-disabled":p(l),"aria-label":x.ariaLabel,name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:p(l),tabindex:x.tabindex,onChange:w,onKeydown:yr(O,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(N(),Z("span",{key:0,class:j(p(h))},[x.inactiveIcon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(x.inactiveIcon)))]),_:1})):ge("v-if",!0),!x.inactiveIcon&&x.inactiveText?(N(),Z("span",{key:1,"aria-hidden":p(b)},ze(x.inactiveText),9,["aria-hidden"])):ge("v-if",!0)],2)):ge("v-if",!0),ee("span",{ref_key:"core",ref:d,class:j(p(a).e("core")),style:bt(p(v))},[x.inlinePrompt?(N(),Z("div",{key:0,class:j(p(a).e("inner"))},[x.activeIcon||x.inactiveIcon?(N(),me(p(Ot),{key:0,class:j(p(a).is("icon"))},{default:V(()=>[(N(),me(Jt(p(b)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(N(),Z("span",{key:1,class:j(p(a).is("text")),"aria-hidden":!p(b)},ze(p(b)?x.activeText:x.inactiveText),11,["aria-hidden"])):ge("v-if",!0)],2)):ge("v-if",!0),ee("div",{class:j(p(a).e("action"))},[x.loading?(N(),me(p(Ot),{key:0,class:j(p(a).is("loading"))},{default:V(()=>[B(p(lc))]),_:1},8,["class"])):p(b)?ke(x.$slots,"active-action",{key:1},()=>[x.activeActionIcon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(x.activeActionIcon)))]),_:1})):ge("v-if",!0)]):p(b)?ge("v-if",!0):ke(x.$slots,"inactive-action",{key:2},()=>[x.inactiveActionIcon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(x.inactiveActionIcon)))]),_:1})):ge("v-if",!0)])],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(N(),Z("span",{key:1,class:j(p(g))},[x.activeIcon?(N(),me(p(Ot),{key:0},{default:V(()=>[(N(),me(Jt(x.activeIcon)))]),_:1})):ge("v-if",!0),!x.activeIcon&&x.activeText?(N(),Z("span",{key:1,"aria-hidden":!p(b)},ze(x.activeText),9,["aria-hidden"])):ge("v-if",!0)],2)):ge("v-if",!0)],10,["onClick"]))}});var d5e=Ge(c5e,[["__file","switch.vue"]]);const gm=Wt(d5e),d2=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},f5e=function(t,e,n,r,o){if(!e&&!r&&(!o||Ye(o)&&!o.length))return t;St(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const i=r?null:function(s,l){return o?KM(Jo(o),u=>St(u)?Vr(s,u):u(s,l,t)):(e!=="$key"&&Zt(s)&&"$value"in s&&(s=s.$value),[Zt(s)?e?Vr(s,e):null:s])},a=function(s,l){var u,c,d,f,h,g;if(r)return r(s.value,l.value);for(let v=0,m=(c=(u=s.key)==null?void 0:u.length)!=null?c:0;v((g=l.key)==null?void 0:g[v]))return 1}return 0};return t.map((s,l)=>({value:s,index:l,key:i?i(s,l):null})).sort((s,l)=>{let u=a(s,l);return u||(u=s.index-l.index),u*+n}).map(s=>s.value)},SY=function(t,e){let n=null;return t.columns.forEach(r=>{r.id===e&&(n=r)}),n},h5e=function(t,e){let n=null;for(let r=0;r{if(!t)throw new Error("Row is required when get row identity");if(St(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let r=t;for(const o of n)r=r[o];return`${r}`}else if(kt(e))return e.call(null,t);return""},Gg=function(t,e,n=!1,r="children"){const o=t||[],i={};return o.forEach((a,s)=>{if(i[Vi(a,e)]={row:a,index:s},n){const l=a[r];Ye(l)&&Object.assign(i,Gg(l,e,!0,r))}}),i};function p5e(t,e){const n={};let r;for(r in t)n[r]=t[r];for(r in e)if(Dn(e,r)){const o=e[r];Sn(o)||(n[r]=o)}return n}function wR(t){return t===""||Sn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function xY(t){return t===""||Sn(t)||(t=wR(t),Number.isNaN(t)&&(t=80)),t}function g5e(t){return Pt(t)?t:St(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function v5e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Kw(t,e,n,r,o,i,a){let s=i!=null?i:0,l=!1;const c=(()=>{if(!a)return t.indexOf(e);const v=Vi(e,a);return t.findIndex(m=>Vi(m,a)===v)})(),d=c!==-1,f=o==null?void 0:o.call(null,e,s),h=v=>{v==="add"?t.push(e):t.splice(c,1),l=!0},g=v=>{let m=0;const b=(r==null?void 0:r.children)&&v[r.children];return b&&Ye(b)&&(m+=b.length,b.forEach(w=>{m+=g(w)})),m};return(!o||f)&&(ir(n)?n&&!d?h("add"):!n&&d&&h("remove"):h(d?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r==null?void 0:r.children)&&Ye(e[r.children])&&e[r.children].forEach(v=>{const m=Kw(t,v,n!=null?n:!d,r,o,s+1,a);s+=g(v)+1,m&&(l=m)}),l}function m5e(t,e,n="children",r="hasChildren",o=!1){const i=s=>!(Ye(s)&&s.length);function a(s,l,u){e(s,l,u),l.forEach(c=>{if(c[r]&&o){e(c,null,u+1);return}const d=c[n];i(d)||a(c,d,u+1)})}t.forEach(s=>{if(s[r]&&o){e(s,null,0);return}const l=s[n];i(l)||a(s,l,0)})}const y5e=(t,e,n,r)=>{const o={strategy:"fixed",...t.popperOptions},i=kt(r==null?void 0:r.tooltipFormatter)?r.tooltipFormatter({row:n,column:r,cellValue:Wy(n,r.property).value}):void 0;return Mr(i)?{slotContent:i,content:null,...t,popperOptions:o}:{slotContent:null,content:i!=null?i:e,...t,popperOptions:o}};let Za=null;function b5e(t,e,n,r,o,i){var a;const s=y5e(t,e,n,r),l={...s,slotContent:void 0};if((Za==null?void 0:Za.trigger)===o){const g=(a=Za.vm)==null?void 0:a.component;nd(g==null?void 0:g.props,l),g&&s.slotContent&&(g.slots.content=()=>[s.slotContent]);return}Za==null||Za();const u=i==null?void 0:i.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=B(Zo,{virtualTriggering:!0,virtualRef:o,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...l},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...i.appContext,...i};const f=document.createElement("div");wf(d,f),d.component.exposed.onOpen();const h=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);Za=()=>{wf(null,f),h==null||h.removeEventListener("scroll",Za),Za=null},Za.trigger=o!=null?o:void 0,Za.vm=d,h==null||h.addEventListener("scroll",Za)}function CY(t){return t.children?KM(t.children,CY):[t]}function iB(t,e){return t+e.colSpan}const EY=(t,e,n,r)=>{let o=0,i=t;const a=n.states.columns.value;if(r){const l=CY(r[t]);o=a.slice(0,a.indexOf(l[0])).reduce(iB,0),i=o+l.reduce(iB,0)-1}else o=t;let s;switch(e){case"left":i=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:i=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:o,after:i}:{}},SR=(t,e,n,r,o,i=0)=>{const a=[],{direction:s,start:l,after:u}=EY(e,n,r,o);if(s){const c=s==="left";a.push(`${t}-fixed-column--${s}`),c&&u+i===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!c&&l-i===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function aB(t,e){return t+(am(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const xR=(t,e,n,r)=>{const{direction:o,start:i=0,after:a=0}=EY(t,e,n,r);if(!o)return;const s={},l=o==="left",u=n.states.columns.value;return l?s.left=u.slice(0,i).reduce(aB,0):s.right=u.slice(a+1).reverse().reduce(aB,0),s},Cv=(t,e)=>{!t||Number.isNaN(t[e])||(t[e]=`${t[e]}px`)};function _5e(t){const e=Kt(),n=z(!1),r=z([]);return{updateExpandRows:()=>{const l=t.data.value||[],u=t.rowKey.value;if(n.value)r.value=l.slice();else if(u){const c=Gg(r.value,u);r.value=l.reduce((d,f)=>{const h=Vi(f,u);return c[h]&&d.push(f),d},[])}else r.value=[]},toggleRowExpansion:(l,u)=>{Kw(r.value,l,u,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",l,r.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const u=t.data.value||[],c=t.rowKey.value,d=Gg(u,c);r.value=l.reduce((f,h)=>{const g=d[h];return g&&f.push(g.row),f},[])},isRowExpanded:l=>{const u=t.rowKey.value;return u?!!Gg(r.value,u)[Vi(l,u)]:r.value.includes(l)},states:{expandRows:r,defaultExpandAll:n}}}function O5e(t){const e=Kt(),n=z(null),r=z(null),o=u=>{e.store.assertRowKey(),n.value=u,a(u)},i=()=>{n.value=null},a=u=>{var c;const{data:d,rowKey:f}=t;let h=null;f.value&&(h=(c=(p(d)||[]).find(g=>Vi(g,f.value)===u))!=null?c:null),r.value=h!=null?h:null,e.emit("current-change",r.value,null)};return{setCurrentRowKey:o,restoreCurrentRowKey:i,setCurrentRowByKey:a,updateCurrentRow:u=>{const c=r.value;if(u&&u!==c){r.value=u,e.emit("current-change",r.value,c);return}!u&&c&&(r.value=null,e.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=t.rowKey.value,c=t.data.value||[],d=r.value;if(d&&!c.includes(d)){if(u){const f=Vi(d,u);a(f)}else r.value=null;am(r.value)&&e.emit("current-change",null,d)}else n.value&&(a(n.value),i())},states:{_currentRowKey:n,currentRow:r}}}function w5e(t){const e=z([]),n=z({}),r=z(16),o=z(!1),i=z({}),a=z("hasChildren"),s=z("children"),l=z(!1),u=Kt(),c=$(()=>{if(!t.rowKey.value)return{};const S=t.data.value||[];return f(S)}),d=$(()=>{const S=t.rowKey.value,x=Object.keys(i.value),C={};return x.length&&x.forEach(E=>{if(i.value[E].length){const T={children:[]};i.value[E].forEach(M=>{const k=Vi(M,S);T.children.push(k),M[a.value]&&!C[k]&&(C[k]={children:[]})}),C[E]=T}}),C}),f=S=>{const x=t.rowKey.value,C={};return m5e(S,(E,T,M)=>{const k=Vi(E,x);Ye(T)?C[k]={children:T.map(P=>Vi(P,x)),level:M}:o.value&&(C[k]={children:[],lazy:!0,level:M})},s.value,a.value,o.value),C},h=(S=!1,x)=>{var C,E;x||(x=(C=u.store)==null?void 0:C.states.defaultExpandAll.value);const T=c.value,M=d.value,k=Object.keys(T),P={};if(k.length){const R=p(n),D=[],F=(I,Q)=>{if(S)return e.value?x||e.value.includes(Q):!!(x||(I==null?void 0:I.expanded));{const L=x||e.value&&e.value.includes(Q);return!!((I==null?void 0:I.expanded)||L)}};k.forEach(I=>{const Q=R[I],L={...T[I]};if(L.expanded=F(Q,I),L.lazy){const{loaded:H=!1,loading:re=!1}=Q||{};L.loaded=!!H,L.loading=!!re,D.push(I)}P[I]=L});const W=Object.keys(M);o.value&&W.length&&D.length&&W.forEach(I=>{var Q;const L=R[I],H=M[I].children;if(D.includes(I)){if(((Q=P[I].children)==null?void 0:Q.length)!==0)throw new Error("[ElTable]children must be an empty array.");P[I].children=H}else{const{loaded:re=!1,loading:U=!1}=L||{};P[I]={lazy:!0,loaded:!!re,loading:!!U,expanded:F(L,I),children:H,level:void 0}}})}n.value=P,(E=u.store)==null||E.updateTableScrollY()};Le(()=>e.value,()=>{h(!0)}),Le(()=>c.value,()=>{h()}),Le(()=>d.value,()=>{h()});const g=S=>{e.value=S,h()},v=S=>o.value&&S&&"loaded"in S&&!S.loaded,m=(S,x)=>{u.store.assertRowKey();const C=t.rowKey.value,E=Vi(S,C),T=E&&n.value[E];if(E&&T&&"expanded"in T){const M=T.expanded;x=Sn(x)?!T.expanded:x,n.value[E].expanded=x,M!==x&&u.emit("expand-change",S,x),v(T)&&w(S,E,T),u.store.updateTableScrollY()}},b=S=>{u.store.assertRowKey();const x=t.rowKey.value,C=Vi(S,x),E=n.value[C];v(E)?w(S,C,E):m(S,void 0)},w=(S,x,C)=>{const{load:E}=u.props;E&&!n.value[x].loaded&&(n.value[x].loading=!0,E(S,C,T=>{if(!Ye(T))throw new TypeError("[ElTable] data must be an array");n.value[x].loading=!1,n.value[x].loaded=!0,n.value[x].expanded=!0,T.length&&(i.value[x]=T),u.emit("expand-change",S,!0)}))};return{loadData:w,loadOrToggle:b,toggleTreeExpansion:m,updateTreeExpandKeys:g,updateTreeData:h,updateKeyChildren:(S,x)=>{const{lazy:C,rowKey:E}=u.props;if(!!C){if(!E)throw new Error("[Table] rowKey is required in updateKeyChild");i.value[S]&&(i.value[S]=x)}},normalize:f,states:{expandRowKeys:e,treeData:n,indent:r,lazy:o,lazyTreeNodeMap:i,lazyColumnIdentifier:a,childrenColumnName:s,checkStrictly:l}}}const S5e=(t,e)=>{const n=e.sortingColumn;return!n||St(n.sortable)?t:f5e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},U1=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,U1(n.children)):e.push(n)}),e};function x5e(){var t;const e=Kt(),{size:n}=Mo((t=e.proxy)==null?void 0:t.$props),r=z(null),o=z([]),i=z([]),a=z(!1),s=z([]),l=z([]),u=z([]),c=z([]),d=z([]),f=z([]),h=z([]),g=z([]),v=[],m=z(0),b=z(0),w=z(0),O=z(!1),S=z([]),x=z(!1),C=z(!1),E=z(null),T=z({}),M=z(null),k=z(null),P=z(null),R=z(null),D=z(null),F=$(()=>r.value?Gg(S.value,r.value):void 0);Le(o,()=>{var Je;e.state&&(L(!1),e.props.tableLayout==="auto"&&((Je=e.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const W=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},I=Je=>{var ft;(ft=Je.children)==null||ft.forEach(Mt=>{Mt.fixed=Je.fixed,I(Mt)})},Q=()=>{s.value.forEach(Be=>{I(Be)}),c.value=s.value.filter(Be=>[!0,"left"].includes(Be.fixed));const Je=s.value.find(Be=>Be.type==="selection");let ft;Je&&Je.fixed!=="right"&&!c.value.includes(Je)&&s.value.indexOf(Je)===0&&c.value.length&&(c.value.unshift(Je),ft=!0),d.value=s.value.filter(Be=>Be.fixed==="right");const Mt=s.value.filter(Be=>(ft?Be.type!=="selection":!0)&&!Be.fixed);l.value=Array.from(c.value).concat(Mt).concat(d.value);const Pe=U1(Mt),Ce=U1(c.value),pe=U1(d.value);m.value=Pe.length,b.value=Ce.length,w.value=pe.length,u.value=Array.from(Ce).concat(Pe).concat(pe),a.value=c.value.length>0||d.value.length>0},L=(Je,ft=!1)=>{Je&&Q(),ft?e.state.doLayout():e.state.debouncedUpdateLayout()},H=Je=>F.value?!!F.value[Vi(Je,r.value)]:S.value.includes(Je),re=()=>{O.value=!1;const Je=S.value;S.value=[],Je.length&&e.emit("selection-change",[])},U=()=>{var Je,ft;let Mt;if(r.value){Mt=[];const Pe=(ft=(Je=e==null?void 0:e.store)==null?void 0:Je.states)==null?void 0:ft.childrenColumnName.value,Ce=Gg(o.value,r.value,!0,Pe);for(const pe in F.value)Dn(F.value,pe)&&!Ce[pe]&&Mt.push(F.value[pe].row)}else Mt=S.value.filter(Pe=>!o.value.includes(Pe));if(Mt.length){const Pe=S.value.filter(Ce=>!Mt.includes(Ce));S.value=Pe,e.emit("selection-change",Pe.slice())}},J=()=>(S.value||[]).slice(),ie=(Je,ft,Mt=!0,Pe=!1)=>{var Ce,pe,Be,_t;const en={children:(pe=(Ce=e==null?void 0:e.store)==null?void 0:Ce.states)==null?void 0:pe.childrenColumnName.value,checkStrictly:(_t=(Be=e==null?void 0:e.store)==null?void 0:Be.states)==null?void 0:_t.checkStrictly.value};if(Kw(S.value,Je,ft,en,Pe?void 0:E.value,o.value.indexOf(Je),r.value)){const yn=(S.value||[]).slice();Mt&&e.emit("select",yn,Je),e.emit("selection-change",yn)}},te=()=>{var Je,ft;const Mt=C.value?!O.value:!(O.value||S.value.length);O.value=Mt;let Pe=!1,Ce=0;const pe=(ft=(Je=e==null?void 0:e.store)==null?void 0:Je.states)==null?void 0:ft.rowKey.value,{childrenColumnName:Be}=e.store.states,_t={children:Be.value,checkStrictly:!1};o.value.forEach((en,On)=>{const yn=On+Ce;Kw(S.value,en,Mt,_t,E.value,yn,pe)&&(Pe=!0),Ce+=K(Vi(en,pe))}),Pe&&e.emit("selection-change",S.value?S.value.slice():[]),e.emit("select-all",(S.value||[]).slice())},he=()=>{var Je;if(((Je=o.value)==null?void 0:Je.length)===0){O.value=!1;return}const{childrenColumnName:ft}=e.store.states;let Mt=0,Pe=0;const Ce=Be=>{var _t;for(const en of Be){const On=E.value&&E.value.call(null,en,Mt);if(H(en))Pe++;else if(!E.value||On)return!1;if(Mt++,((_t=en[ft.value])==null?void 0:_t.length)&&!Ce(en[ft.value]))return!1}return!0},pe=Ce(o.value||[]);O.value=Pe===0?!1:pe},K=Je=>{var ft;if(!e||!e.store)return 0;const{treeData:Mt}=e.store.states;let Pe=0;const Ce=(ft=Mt.value[Je])==null?void 0:ft.children;return Ce&&(Pe+=Ce.length,Ce.forEach(pe=>{Pe+=K(pe)})),Pe},ne=(Je,ft)=>{const Mt={};return Jo(Je).forEach(Pe=>{T.value[Pe.id]=ft,Mt[Pe.columnKey||Pe.id]=ft}),Mt},fe=(Je,ft,Mt)=>{k.value&&k.value!==Je&&(k.value.order=null),k.value=Je,P.value=ft,R.value=Mt},Ne=()=>{let Je=p(i);Object.keys(T.value).forEach(ft=>{const Mt=T.value[ft];if(!Mt||Mt.length===0)return;const Pe=SY({columns:u.value},ft);Pe&&Pe.filterMethod&&(Je=Je.filter(Ce=>Mt.some(pe=>Pe.filterMethod.call(null,pe,Ce,Pe))))}),M.value=Je},$e=()=>{var Je;o.value=S5e((Je=M.value)!=null?Je:[],{sortingColumn:k.value,sortProp:P.value,sortOrder:R.value})},ue=(Je=void 0)=>{Je!=null&&Je.filter||Ne(),$e()},G=Je=>{const{tableHeaderRef:ft}=e.refs;if(!ft)return;const Mt=Object.assign({},ft.filterPanels),Pe=Object.keys(Mt);if(!!Pe.length)if(St(Je)&&(Je=[Je]),Ye(Je)){const Ce=Je.map(pe=>h5e({columns:u.value},pe));Pe.forEach(pe=>{const Be=Ce.find(_t=>_t.id===pe);Be&&(Be.filteredValue=[])}),e.store.commit("filterChange",{column:Ce,values:[],silent:!0,multi:!0})}else Pe.forEach(Ce=>{const pe=u.value.find(Be=>Be.id===Ce);pe&&(pe.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},ve=()=>{!k.value||(fe(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:q,toggleRowExpansion:Ie,updateExpandRows:Ee,states:Oe,isRowExpanded:se}=_5e({data:o,rowKey:r}),{updateTreeExpandKeys:X,toggleTreeExpansion:oe,updateTreeData:ce,updateKeyChildren:Ae,loadOrToggle:ye,states:Te}=w5e({data:o,rowKey:r}),{updateCurrentRowData:Me,updateCurrentRow:Fe,setCurrentRowKey:at,states:nt}=O5e({data:o,rowKey:r});return{assertRowKey:W,updateColumns:Q,scheduleLayout:L,isSelected:H,clearSelection:re,cleanSelection:U,getSelectionRows:J,toggleRowSelection:ie,_toggleAllSelection:te,toggleAllSelection:null,updateAllSelected:he,updateFilters:ne,updateCurrentRow:Fe,updateSort:fe,execFilter:Ne,execSort:$e,execQuery:ue,clearFilter:G,clearSort:ve,toggleRowExpansion:Ie,setExpandRowKeysAdapter:Je=>{q(Je),X(Je)},setCurrentRowKey:at,toggleRowExpansionAdapter:(Je,ft)=>{u.value.some(({type:Pe})=>Pe==="expand")?Ie(Je,ft):oe(Je,ft)},isRowExpanded:se,updateExpandRows:Ee,updateCurrentRowData:Me,loadOrToggle:ye,updateTreeData:ce,updateKeyChildren:Ae,states:{tableSize:n,rowKey:r,data:o,_data:i,isComplex:a,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:g,updateOrderFns:v,leafColumnsLength:m,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:w,isAllSelected:O,selection:S,reserveSelection:x,selectOnIndeterminate:C,selectable:E,filters:T,filteredData:M,sortingColumn:k,sortProp:P,sortOrder:R,hoverRow:D,...Oe,...Te,...nt}}}function wA(t,e){return t.map(n=>{var r;return n.id===e.id?e:((r=n.children)!=null&&r.length&&(n.children=wA(n.children,e)),n)})}function SA(t){t.forEach(e=>{var n,r;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(r=e.children)!=null&&r.length&&SA(e.children)}),t.sort((e,n)=>e.no-n.no)}function C5e(){const t=Kt(),e=x5e();return{ns:je("table"),...e,mutations:{setData(a,s){const l=p(a._data)!==s;a.data.value=s,a._data.value=s,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),p(a.reserveSelection)?t.store.assertRowKey():l?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,s,l,u){var c;const d=p(a._columns);let f=[];l?(l&&!l.children&&(l.children=[]),(c=l.children)==null||c.push(s),f=wA(d,l)):(d.push(s),f=d),SA(f),a._columns.value=f,a.updateOrderFns.push(u),s.type==="selection"&&(a.selectable.value=s.selectable,a.reserveSelection.value=s.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(SA(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,s,l,u){var c;const d=p(a._columns)||[];if(l)(c=l.children)==null||c.splice(l.children.findIndex(h=>h.id===s.id),1),wt(()=>{var h;((h=l.children)==null?void 0:h.length)===0&&delete l.children}),a._columns.value=wA(d,l);else{const h=d.indexOf(s);h>-1&&(d.splice(h,1),a._columns.value=d)}const f=a.updateOrderFns.indexOf(u);f>-1&&a.updateOrderFns.splice(f,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,s){const{prop:l,order:u,init:c}=s;if(l){const d=p(a.columns).find(f=>f.property===l);d&&(d.order=u,t.store.updateSort(d,l,u),t.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(a,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=a,d=p(l),f=p(u),h=p(c);am(h)&&(a.sortingColumn.value=null,a.sortProp.value=null);const g={filter:!0};t.store.execQuery(g),(!s||!(s.silent||s.init))&&t.emit("sort-change",{column:d,prop:f,order:h}),t.store.updateTableScrollY()},filterChange(a,s){const{column:l,values:u,silent:c}=s,d=t.store.updateFilters(l,u);t.store.execQuery(),c||t.emit("filter-change",d),t.store.updateTableScrollY()},toggleAllSelection(){var a,s;(s=(a=t.store).toggleAllSelection)==null||s.call(a)},rowSelectedChanged(a,s){t.store.toggleRowSelection(s),t.store.updateAllSelected()},setHoverRow(a,s){a.hoverRow.value=s},setCurrentRow(a,s){t.store.updateCurrentRow(s)}},commit:function(a,...s){const l=t.store.mutations;if(l[a])l[a].apply(t,[t.store.states,...s]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){wt(()=>t.layout.updateScrollY.apply(t.layout))}}}const CR={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"},["treeProps.checkStrictly"]:{key:"checkStrictly",default:!1}};function E5e(t,e){if(!t)throw new Error("Table is required.");const n=C5e();return n.toggleAllSelection=Hi(n._toggleAllSelection,10),Object.keys(CR).forEach(r=>{TY(kY(e,r),r,n)}),T5e(n,e),n}function T5e(t,e){Object.keys(CR).forEach(n=>{Le(()=>kY(e,n),r=>{TY(r,n,t)})})}function TY(t,e,n){let r=t,o=CR[e];Zt(o)&&(r=r||o.default,o=o.key),n.states[o].value=r}function kY(t,e){if(e.includes(".")){const n=e.split(".");let r=t;return n.forEach(o=>{r=r[o]}),r}else return t[e]}class k5e{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=z(null),this.scrollX=z(!1),this.scrollY=z(!1),this.bodyWidth=z(null),this.fixedWidth=z(null),this.rightFixedWidth=z(null),this.gutterWidth=0;for(const n in e)Dn(e,n)&&(Pr(this[n])?this[n].value=e[n]:this[n]=e[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(am(e))return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n==null?void 0:n.wrapRef)){let r=!0;const o=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,o!==r}return!1}setHeight(e,n="height"){if(!kn)return;const r=this.table.vnode.el;if(e=g5e(e),this.height.value=Number(e),!r&&(e||e===0)){wt(()=>this.setHeight(e,n));return}r&&Pt(e)?(r.style[n]=`${e}px`,this.updateElsHeight()):r&&St(e)&&(r.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?e.push.apply(e,r.columns):e.push(r)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){var e;if(!kn)return;const n=this.fit,r=(e=this.table.vnode.el)==null?void 0:e.clientWidth;let o=0;const i=this.getFlattenColumns(),a=i.filter(u=>!Pt(u.width));if(i.forEach(u=>{Pt(u.width)&&u.realWidth&&(u.realWidth=null)}),a.length>0&&n){if(i.forEach(u=>{o+=Number(u.width||u.minWidth||80)}),o<=r){this.scrollX.value=!1;const u=r-o;if(a.length===1)a[0].realWidth=Number(a[0].minWidth||80)+u;else{const c=a.reduce((h,g)=>h+Number(g.minWidth||80),0),d=u/c;let f=0;a.forEach((h,g)=>{if(g===0)return;const v=Math.floor(Number(h.minWidth||80)*d);f+=v,h.realWidth=Number(h.minWidth||80)+v}),a[0].realWidth=Number(a[0].minWidth||80)+u-f}}else this.scrollX.value=!0,a.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(o,r),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),o+=u.realWidth}),this.scrollX.value=o>r,this.bodyWidth.value=o;const s=this.store.states.fixedColumns.value;if(s.length>0){let u=0;s.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let u=0;l.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(r=>{var o,i;switch(e){case"columns":(o=r.state)==null||o.onColumnsChange(this);break;case"scrollable":(i=r.state)==null||i.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const{CheckboxGroup:A5e}=Xs,P5e=de({name:"ElTableFilterPanel",components:{ElCheckbox:Xs,ElCheckboxGroup:A5e,ElScrollbar:Al,ElTooltip:Zo,ElIcon:Ot,ArrowDown:wc,ArrowUp:pC},directives:{ClickOutside:sd},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:yo.appendTo},setup(t){const e=Kt(),{t:n}=En(),r=je("table-filter"),o=e==null?void 0:e.parent;t.column&&!o.filterPanels.value[t.column.id]&&(o.filterPanels.value[t.column.id]=e);const i=z(!1),a=z(null),s=$(()=>t.column&&t.column.filters),l=$(()=>t.column&&t.column.filterClassName?`${r.b()} ${t.column.filterClassName}`:r.b()),u=$({get:()=>{var x;return(((x=t.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{c.value&&(ts(x)?c.value.splice(0,1):c.value.splice(0,1,x))}}),c=$({get(){return t.column?t.column.filteredValue||[]:[]},set(x){var C;t.column&&((C=t.upDataColumn)==null||C.call(t,"filteredValue",x))}}),d=$(()=>t.column?t.column.filterMultiple:!0),f=x=>x.value===u.value,h=()=>{i.value=!1},g=x=>{x.stopPropagation(),i.value=!i.value},v=()=>{i.value=!1},m=()=>{O(c.value),h()},b=()=>{c.value=[],O(c.value),h()},w=x=>{u.value=x,ts(x)?O([]):O(c.value),h()},O=x=>{var C,E;(C=t.store)==null||C.commit("filterChange",{column:t.column,values:x}),(E=t.store)==null||E.updateAllSelected()};Le(i,x=>{var C;t.column&&((C=t.upDataColumn)==null||C.call(t,"filterOpened",x))},{immediate:!0});const S=$(()=>{var x,C;return(C=(x=a.value)==null?void 0:x.popperRef)==null?void 0:C.contentRef});return{tooltipVisible:i,multiple:d,filterClassName:l,filteredValue:c,filterValue:u,filters:s,handleConfirm:m,handleReset:b,handleSelect:w,isPropAbsent:ts,isActive:f,t:n,ns:r,showFilterPanel:g,hideFilterPanel:v,popperPaneRef:S,tooltip:a}}});function N5e(t,e,n,r,o,i){const a=Nn("el-checkbox"),s=Nn("el-checkbox-group"),l=Nn("el-scrollbar"),u=Nn("arrow-up"),c=Nn("arrow-down"),d=Nn("el-icon"),f=Nn("el-tooltip"),h=Wx("click-outside");return N(),me(f,{ref:"tooltip",visible:t.tooltipVisible,offset:0,placement:t.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo},{content:V(()=>[t.multiple?(N(),Z("div",{key:0},[ee("div",{class:j(t.ns.e("content"))},[B(l,{"wrap-class":t.ns.e("wrap")},{default:V(()=>[B(s,{modelValue:t.filteredValue,"onUpdate:modelValue":g=>t.filteredValue=g,class:j(t.ns.e("checkbox-group"))},{default:V(()=>[(N(!0),Z(ut,null,Xt(t.filters,g=>(N(),me(a,{key:g.value,value:g.value},{default:V(()=>[We(ze(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),ee("div",{class:j(t.ns.e("bottom"))},[ee("button",{class:j({[t.ns.is("disabled")]:t.filteredValue.length===0}),disabled:t.filteredValue.length===0,type:"button",onClick:t.handleConfirm},ze(t.t("el.table.confirmFilter")),11,["disabled","onClick"]),ee("button",{type:"button",onClick:t.handleReset},ze(t.t("el.table.resetFilter")),9,["onClick"])],2)])):(N(),Z("ul",{key:1,class:j(t.ns.e("list"))},[ee("li",{class:j([t.ns.e("list-item"),{[t.ns.is("active")]:t.isPropAbsent(t.filterValue)}]),onClick:g=>t.handleSelect(null)},ze(t.t("el.table.clearFilter")),11,["onClick"]),(N(!0),Z(ut,null,Xt(t.filters,g=>(N(),Z("li",{key:g.value,class:j([t.ns.e("list-item"),t.ns.is("active",t.isActive(g))]),label:g.value,onClick:v=>t.handleSelect(g.value)},ze(g.text),11,["label","onClick"]))),128))],2))]),default:V(()=>[Yt((N(),Z("span",{class:j([`${t.ns.namespace.value}-table__column-filter-trigger`,`${t.ns.namespace.value}-none-outline`]),onClick:t.showFilterPanel},[B(d,null,{default:V(()=>[ke(t.$slots,"filter-icon",{},()=>{var g;return[(g=t.column)!=null&&g.filterOpened?(N(),me(u,{key:0})):(N(),me(c,{key:1}))]})]),_:3})],10,["onClick"])),[[h,t.hideFilterPanel,t.popperPaneRef]])]),_:3},8,["visible","placement","popper-class","append-to"])}var M5e=Ge(P5e,[["render",N5e],["__file","filter-panel.vue"]]);function ER(t){const e=Kt();jx(()=>{n.value.addObserver(e)}),jt(()=>{r(n.value),o(n.value)}),_u(()=>{r(n.value),o(n.value)}),Hf(()=>{n.value.removeObserver(e)});const n=$(()=>{const i=t.layout;if(!i)throw new Error("Can not find table layout.");return i}),r=i=>{var a;const s=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=i.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,d=s.length;c{var a,s;const l=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=l.length;c{v.stopPropagation()},i=(v,m)=>{!m.filters&&m.sortable?g(v,m,!1):m.filterable&&!m.sortable&&o(v),r==null||r.emit("header-click",m,v)},a=(v,m)=>{r==null||r.emit("header-contextmenu",m,v)},s=z(null),l=z(!1),u=z(),c=(v,m)=>{var b,w;if(!!kn&&!(m.children&&m.children.length>0)&&s.value&&t.border){l.value=!0;const O=r;e("set-drag-visible",!0);const S=O==null?void 0:O.vnode.el,x=S==null?void 0:S.getBoundingClientRect().left,C=(w=(b=n==null?void 0:n.vnode)==null?void 0:b.el)==null?void 0:w.querySelector(`th.${m.id}`),E=C.getBoundingClientRect(),T=E.left-x+30;pl(C,"noclick"),u.value={startMouseLeft:v.clientX,startLeft:E.right-x,startColumnLeft:E.left-x,tableLeft:x};const M=O==null?void 0:O.refs.resizeProxy;M.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const k=R=>{const D=R.clientX-u.value.startMouseLeft,F=u.value.startLeft+D;M.style.left=`${Math.max(T,F)}px`},P=()=>{if(l.value){const{startColumnLeft:R,startLeft:D}=u.value,W=Number.parseInt(M.style.left,10)-R;m.width=m.realWidth=W,O==null||O.emit("header-dragend",m.width,D-R,m,v),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ca(C,"noclick")},0)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",P)}},d=(v,m)=>{var b;if(m.children&&m.children.length>0)return;const w=v.target;if(!Aa(w))return;const O=w==null?void 0:w.closest("th");if(!(!m||!m.resizable||!O)&&!l.value&&t.border){const S=O.getBoundingClientRect(),x=document.body.style,C=((b=O.parentNode)==null?void 0:b.lastElementChild)===O,E=t.allowDragLastColumn||!C;S.width>12&&S.right-v.clientX<8&&E?(x.cursor="col-resize",Ka(O,"is-sortable")&&(O.style.cursor="col-resize"),s.value=m):l.value||(x.cursor="",Ka(O,"is-sortable")&&(O.style.cursor="pointer"),s.value=null)}},f=()=>{!kn||(document.body.style.cursor="")},h=({order:v,sortOrders:m})=>{if(v==="")return m[0];const b=m.indexOf(v||null);return m[b>m.length-2?0:b+1]},g=(v,m,b)=>{var w;v.stopPropagation();const O=m.order===b?null:b||h(m),S=(w=v.target)==null?void 0:w.closest("th");if(S&&Ka(S,"noclick")){ca(S,"noclick");return}if(!m.sortable)return;const x=v.currentTarget;if(["ascending","descending"].some(k=>Ka(x,k)&&!m.sortOrders.includes(k)))return;const C=t.store.states;let E=C.sortProp.value,T;const M=C.sortingColumn.value;(M!==m||M===m&&am(M.order))&&(M&&(M.order=null),C.sortingColumn.value=m,E=m.property),O?T=m.order=O:T=m.order=null,C.sortProp.value=E,C.sortOrder.value=T,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:i,handleHeaderContextMenu:a,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:g,handleFilterClick:o}}function R5e(t){const e=gt(xu),n=je("table");return{getHeaderRowStyle:s=>{const l=e==null?void 0:e.props.headerRowStyle;return kt(l)?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=e==null?void 0:e.props.headerRowClassName;return St(u)?l.push(u):kt(u)&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var d;let f=(d=e==null?void 0:e.props.headerCellStyle)!=null?d:{};kt(f)&&(f=f.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=xR(l,c.fixed,t.store,u);return Cv(h,"left"),Cv(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(s,l,u,c)=>{const d=SR(n.b(),l,c.fixed,t.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const h=e==null?void 0:e.props.headerCellClassName;return St(h)?f.push(h):kt(h)&&f.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),f.push(n.e("cell")),f.filter(g=>Boolean(g)).join(" ")}}}const AY=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,AY(n.children))):e.push(n)}),e},PY=t=>{let e=1;const n=(i,a)=>{if(a&&(i.level=a.level+1,e{n(l,i),s+=l.colSpan}),i.colSpan=s}else i.colSpan=1};t.forEach(i=>{i.level=1,n(i,void 0)});const r=[];for(let i=0;i{i.children?(i.rowSpan=1,i.children.forEach(a=>a.isSubColumn=!0)):i.rowSpan=e-i.level+1,r[i.level-1].push(i)}),r};function D5e(t){const e=gt(xu),n=$(()=>PY(t.store.states.originColumns.value));return{isGroup:$(()=>{const i=n.value.length>1;return i&&e&&(e.state.isGroup.value=!0),i}),toggleAllSelection:i=>{i.stopPropagation(),e==null||e.store.commit("toggleAllSelection")},columnRows:n}}var I5e=de({name:"ElTableHeader",components:{ElCheckbox:Xs},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=Kt(),r=gt(xu),o=je("table"),i=z({}),{onColumnsChange:a,onScrollableChange:s}=ER(r),l=(r==null?void 0:r.props.tableLayout)==="auto",u=pn(new Map),c=z();let d;const f=()=>{d=setTimeout(()=>{u.size>0&&(u.forEach((P,R)=>{const D=c.value.querySelector(`.${R.replace(/\s/g,".")}`);if(D){const F=D.getBoundingClientRect().width;P.width=F||P.width}}),u.clear())})};Le(u,f),Yn(()=>{d&&(clearTimeout(d),d=void 0)}),jt(async()=>{await wt(),await wt();const{prop:P,order:R}=t.defaultSort;r==null||r.store.commit("sort",{prop:P,order:R,init:!0}),f()});const{handleHeaderClick:h,handleHeaderContextMenu:g,handleMouseDown:v,handleMouseMove:m,handleMouseOut:b,handleSortClick:w,handleFilterClick:O}=$5e(t,e),{getHeaderRowStyle:S,getHeaderRowClass:x,getHeaderCellStyle:C,getHeaderCellClass:E}=R5e(t),{isGroup:T,toggleAllSelection:M,columnRows:k}=D5e(t);return n.state={onColumnsChange:a,onScrollableChange:s},n.filterPanels=i,{ns:o,filterPanels:i,onColumnsChange:a,onScrollableChange:s,columnRows:k,getHeaderRowClass:x,getHeaderRowStyle:S,getHeaderCellClass:E,getHeaderCellStyle:C,handleHeaderClick:h,handleHeaderContextMenu:g,handleMouseDown:v,handleMouseMove:m,handleMouseOut:b,handleSortClick:w,handleFilterClick:O,isGroup:T,toggleAllSelection:M,saveIndexSelection:u,isTableLayoutAuto:l,theadRef:c,updateFixedColumnStyle:f}},render(){const{ns:t,isGroup:e,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:o,getHeaderRowClass:i,getHeaderRowStyle:a,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:h,$parent:g,saveIndexSelection:v,isTableLayoutAuto:m}=this;let b=1;return At("thead",{ref:"theadRef",class:{[t.is("group")]:e}},n.map((w,O)=>At("tr",{class:i(O),key:O,style:a(O)},w.map((S,x)=>{S.rowSpan>b&&(b=S.rowSpan);const C=o(O,x,w,S);return m&&S.fixed&&v.set(C,S),At("th",{class:C,colspan:S.colSpan,key:`${S.id}-thead`,rowspan:S.rowSpan,style:r(O,x,w,S),onClick:E=>{var T;(T=E.currentTarget)!=null&&T.classList.contains("noclick")||s(E,S)},onContextmenu:E=>l(E,S),onMousedown:E=>u(E,S),onMousemove:E=>c(E,S),onMouseout:f},[At("div",{class:["cell",S.filteredValue&&S.filteredValue.length>0?"highlight":""]},[S.renderHeader?S.renderHeader({column:S,$index:x,store:h,_self:g}):S.label,S.sortable&&At("span",{onClick:E=>d(E,S),class:"caret-wrapper"},[At("i",{onClick:E=>d(E,S,"ascending"),class:"sort-caret ascending"}),At("i",{onClick:E=>d(E,S,"descending"),class:"sort-caret descending"})]),S.filterable&&At(M5e,{store:h,placement:S.filterPlacement||"bottom-start",appendTo:g==null?void 0:g.appendFilterPanelTo,column:S,upDataColumn:(E,T)=>{S[E]=T}},{"filter-icon":()=>S.renderFilterIcon?S.renderFilterIcon({filterOpened:S.filterOpened}):null})])])}))))}});function f2(t,e,n=.03){return t-e>n}function L5e(t){const e=gt(xu),n=z(""),r=z(At("div")),o=(g,v,m)=>{var b,w,O;const S=e,x=d2(g);let C=null;const E=(b=S==null?void 0:S.vnode.el)==null?void 0:b.dataset.prefix;x&&(C=oB({columns:(O=(w=t.store)==null?void 0:w.states.columns.value)!=null?O:[]},x,E),C&&(S==null||S.emit(`cell-${m}`,v,C,x,g))),S==null||S.emit(`row-${m}`,v,C,g)},i=(g,v)=>{o(g,v,"dblclick")},a=(g,v)=>{var m;(m=t.store)==null||m.commit("setCurrentRow",v),o(g,v,"click")},s=(g,v)=>{o(g,v,"contextmenu")},l=Hi(g=>{var v;(v=t.store)==null||v.commit("setHoverRow",g)},30),u=Hi(()=>{var g;(g=t.store)==null||g.commit("setHoverRow",null)},30),c=g=>{const v=window.getComputedStyle(g,null),m=Number.parseInt(v.paddingLeft,10)||0,b=Number.parseInt(v.paddingRight,10)||0,w=Number.parseInt(v.paddingTop,10)||0,O=Number.parseInt(v.paddingBottom,10)||0;return{left:m,right:b,top:w,bottom:O}},d=(g,v,m)=>{var b;let w=(b=v==null?void 0:v.target)==null?void 0:b.parentNode;for(;g>1&&(w=w==null?void 0:w.nextSibling,!(!w||w.nodeName!=="TR"));)m(w,"hover-row hover-fixed-row"),g--};return{handleDoubleClick:i,handleClick:a,handleContextMenu:s,handleMouseEnter:l,handleMouseLeave:u,handleCellMouseEnter:(g,v,m)=>{var b,w,O,S,x,C;if(!e)return;const E=e,T=d2(g),M=(b=E==null?void 0:E.vnode.el)==null?void 0:b.dataset.prefix;let k=null;if(T){if(k=oB({columns:(O=(w=t.store)==null?void 0:w.states.columns.value)!=null?O:[]},T,M),!k)return;T.rowSpan>1&&d(T.rowSpan,g,pl);const ie=E.hoverState={cell:T,column:k,row:v};E==null||E.emit("cell-mouse-enter",ie.row,ie.column,ie.cell,g)}if(!m)return;const P=g.target.querySelector(".cell");if(!(Ka(P,`${M}-tooltip`)&&P.childNodes.length))return;const R=document.createRange();R.setStart(P,0),R.setEnd(P,P.childNodes.length);const{width:D,height:F}=R.getBoundingClientRect(),{width:W,height:I}=P.getBoundingClientRect(),{top:Q,left:L,right:H,bottom:re}=c(P),U=L+H,J=Q+re;f2(D+U,W)||f2(F+J,I)||f2(P.scrollWidth,W)?b5e(m,(S=(T==null?void 0:T.innerText)||(T==null?void 0:T.textContent))!=null?S:"",v,k,T,E):((x=Za)==null?void 0:x.trigger)===T&&((C=Za)==null||C())},handleCellMouseLeave:g=>{const v=d2(g);if(!v)return;v.rowSpan>1&&d(v.rowSpan,g,ca);const m=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",m==null?void 0:m.row,m==null?void 0:m.column,m==null?void 0:m.cell,g)},tooltipContent:n,tooltipTrigger:r}}function B5e(t){const e=gt(xu),n=je("table");return{getRowStyle:(u,c)=>{const d=e==null?void 0:e.props.rowStyle;return kt(d)?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{var d;const f=[n.e("row")];(e==null?void 0:e.props.highlightCurrentRow)&&u===((d=t.store)==null?void 0:d.states.currentRow.value)&&f.push("current-row"),t.stripe&&c%2===1&&f.push(n.em("row","striped"));const h=e==null?void 0:e.props.rowClassName;return St(h)?f.push(h):kt(h)&&f.push(h.call(null,{row:u,rowIndex:c})),f},getCellStyle:(u,c,d,f)=>{const h=e==null?void 0:e.props.cellStyle;let g=h!=null?h:{};kt(h)&&(g=h.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const v=xR(c,t==null?void 0:t.fixed,t.store);return Cv(v,"left"),Cv(v,"right"),Object.assign({},g,v)},getCellClass:(u,c,d,f,h)=>{const g=SR(n.b(),c,t==null?void 0:t.fixed,t.store,void 0,h),v=[f.id,f.align,f.className,...g],m=e==null?void 0:e.props.cellClassName;return St(m)?v.push(m):kt(m)&&v.push(m.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),v.push(n.e("cell")),v.filter(b=>Boolean(b)).join(" ")},getSpan:(u,c,d,f)=>{let h=1,g=1;const v=e==null?void 0:e.props.spanMethod;if(kt(v)){const m=v({row:u,column:c,rowIndex:d,columnIndex:f});Ye(m)?(h=m[0],g=m[1]):Zt(m)&&(h=m.rowspan,g=m.colspan)}return{rowspan:h,colspan:g}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:h,width:g})=>h||g).slice(d,d+c);return Number(f.reduce((h,g)=>Number(h)+Number(g),-1))}}}const F5e=de({name:"TableTdWrapper"}),V5e=de({...F5e,props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(N(),Z("td",{colspan:t.colspan,rowspan:t.rowspan},[ke(e.$slots,"default")],8,["colspan","rowspan"]))}});var z5e=Ge(V5e,[["__file","td-wrapper.vue"]]);function j5e(t){const e=gt(xu),n=je("table"),{handleDoubleClick:r,handleClick:o,handleContextMenu:i,handleMouseEnter:a,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=L5e(t),{getRowStyle:f,getRowClass:h,getCellStyle:g,getCellClass:v,getSpan:m,getColspanRealWidth:b}=B5e(t),w=$(()=>{var E;return(E=t.store)==null?void 0:E.states.columns.value.findIndex(({type:T})=>T==="default")}),O=(E,T)=>{var M;const k=(M=e==null?void 0:e.props)==null?void 0:M.rowKey;return k?Vi(E,k):T},S=(E,T,M,k=!1)=>{const{tooltipEffect:P,tooltipOptions:R,store:D}=t,{indent:F,columns:W}=D.states,I=h(E,T);let Q=!0;return M&&(I.push(n.em("row",`level-${M.level}`)),Q=!!M.display),At("tr",{style:[Q?null:{display:"none"},f(E,T)],class:I,key:O(E,T),onDblclick:H=>r(H,E),onClick:H=>o(H,E),onContextmenu:H=>i(H,E),onMouseenter:()=>a(T),onMouseleave:s},W.value.map((H,re)=>{const{rowspan:U,colspan:J}=m(E,H,T,re);if(!U||!J)return null;const ie=Object.assign({},H);ie.realWidth=b(W.value,J,re);const te={store:D,_self:t.context||e,column:ie,row:E,$index:T,cellIndex:re,expanded:k};re===w.value&&M&&(te.treeNode={indent:M.level&&M.level*F.value,level:M.level},ir(M.expanded)&&(te.treeNode.expanded=M.expanded,"loading"in M&&(te.treeNode.loading=M.loading),"noLazyChildren"in M&&(te.treeNode.noLazyChildren=M.noLazyChildren)));const he=`${O(E,T)},${re}`,K=ie.columnKey||ie.rawColumnKey||"",ne=H.showOverflowTooltip&&nd({effect:P},R,H.showOverflowTooltip);return At(z5e,{style:g(T,re,E,H),class:v(T,re,E,H,J-1),key:`${K}${he}`,rowspan:U,colspan:J,onMouseenter:fe=>l(fe,E,ne),onMouseleave:u},{default:()=>x(re,H,te)})}))},x=(E,T,M)=>T.renderCell(M);return{wrappedRowRender:(E,T)=>{const M=t.store,{isRowExpanded:k,assertRowKey:P}=M,{treeData:R,lazyTreeNodeMap:D,childrenColumnName:F,rowKey:W}=M.states,I=M.states.columns.value;if(I.some(({type:L})=>L==="expand")){const L=k(E),H=S(E,T,void 0,L),re=e==null?void 0:e.renderExpanded;if(!re)return console.error("[Element Error]renderExpanded is required."),H;const U=[[H]];return(e.props.preserveExpandedContent||L)&&U[0].push(At("tr",{key:`expanded-row__${H.key}`,style:{display:L?"":"none"}},[At("td",{colspan:I.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[re({row:E,$index:T,store:M,expanded:L})])])),U}else if(Object.keys(R.value).length){P();const L=Vi(E,W.value);let H=R.value[L],re=null;H&&(re={expanded:H.expanded,level:H.level,display:!0,noLazyChildren:void 0,loading:void 0},ir(H.lazy)&&(re&&ir(H.loaded)&&H.loaded&&(re.noLazyChildren=!(H.children&&H.children.length)),re.loading=H.loading));const U=[S(E,T,re!=null?re:void 0)];if(H){let J=0;const ie=(he,K)=>{!(he&&he.length&&K)||he.forEach(ne=>{const fe={display:K.display&&K.expanded,level:K.level+1,expanded:!1,noLazyChildren:!1,loading:!1},Ne=Vi(ne,W.value);if(ts(Ne))throw new Error("For nested data item, row-key is required.");if(H={...R.value[Ne]},H&&(fe.expanded=H.expanded,H.level=H.level||fe.level,H.display=!!(H.expanded&&fe.display),ir(H.lazy)&&(ir(H.loaded)&&H.loaded&&(fe.noLazyChildren=!(H.children&&H.children.length)),fe.loading=H.loading)),J++,U.push(S(ne,T+J,fe)),H){const $e=D.value[Ne]||ne[F.value];ie($e,H)}})};H.display=!0;const te=D.value[L]||E[F.value];ie(te,H)}return U}else return S(E,T,void 0)},tooltipContent:c,tooltipTrigger:d}}const W5e={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Q5e=de({name:"ElTableBody",props:W5e,setup(t){var e;const n=Kt(),r=gt(xu),o=je("table"),{wrappedRowRender:i,tooltipContent:a,tooltipTrigger:s}=j5e(t),{onColumnsChange:l,onScrollableChange:u}=ER(r),c=[];return Le((e=t.store)==null?void 0:e.states.hoverRow,(d,f)=>{var h,g;const v=n==null?void 0:n.vnode.el,m=Array.from((v==null?void 0:v.children)||[]).filter(O=>O==null?void 0:O.classList.contains(`${o.e("row")}`));let b=d;const w=(h=m[b])==null?void 0:h.childNodes;if(w!=null&&w.length){let O=0;Array.from(w).reduce((x,C,E)=>{var T,M;return((T=w[E])==null?void 0:T.colSpan)>1&&(O=(M=w[E])==null?void 0:M.colSpan),C.nodeName!=="TD"&&O===0&&x.push(E),O>0&&O--,x},[]).forEach(x=>{var C;for(b=d;b>0;){const E=(C=m[b-1])==null?void 0:C.childNodes;if(E[x]&&E[x].nodeName==="TD"&&E[x].rowSpan>1){pl(E[x],"hover-cell"),c.push(E[x]);break}b--}})}else c.forEach(O=>ca(O,"hover-cell")),c.length=0;!((g=t.store)!=null&&g.states.isComplex.value)||!kn||kf(()=>{const O=m[f],S=m[d];O&&!O.classList.contains("hover-fixed-row")&&ca(O,"hover-row"),S&&pl(S,"hover-row")})}),Hf(()=>{var d;(d=Za)==null||d()}),{ns:o,onColumnsChange:l,onScrollableChange:u,wrappedRowRender:i,tooltipContent:a,tooltipTrigger:s}},render(){const{wrappedRowRender:t,store:e}=this,n=(e==null?void 0:e.states.data.value)||[];return At("tbody",{tabIndex:-1},[n.reduce((r,o)=>r.concat(t(o,r.length)),[])])}});function H5e(){const t=gt(xu),e=t==null?void 0:t.store,n=$(()=>{var s;return(s=e==null?void 0:e.states.fixedLeafColumnsLength.value)!=null?s:0}),r=$(()=>{var s;return(s=e==null?void 0:e.states.rightFixedColumns.value.length)!=null?s:0}),o=$(()=>{var s;return(s=e==null?void 0:e.states.columns.value.length)!=null?s:0}),i=$(()=>{var s;return(s=e==null?void 0:e.states.fixedColumns.value.length)!=null?s:0}),a=$(()=>{var s;return(s=e==null?void 0:e.states.rightFixedColumns.value.length)!=null?s:0});return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:o,leftFixedCount:i,rightFixedCount:a,columns:$(()=>{var s;return(s=e==null?void 0:e.states.columns.value)!=null?s:[]})}}function U5e(t){const{columns:e}=H5e(),n=je("table");return{getCellClasses:(i,a)=>{const s=i[a],l=[n.e("cell"),s.id,s.align,s.labelClassName,...SR(n.b(),a,s.fixed,t.store)];return s.className&&l.push(s.className),s.children||l.push(n.is("leaf")),l},getCellStyles:(i,a)=>{const s=xR(a,i.fixed,t.store);return Cv(s,"left"),Cv(s,"right"),s},columns:e}}var Y5e=de({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const e=gt(xu),n=je("table"),{getCellClasses:r,getCellStyles:o,columns:i}=U5e(t),{onScrollableChange:a,onColumnsChange:s}=ER(e);return{ns:n,onScrollableChange:a,onColumnsChange:s,getCellClasses:r,getCellStyles:o,columns:i}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:r,sumText:o}=this,i=this.store.states.data.value;let a=[];return r?a=r({columns:t,data:i}):t.forEach((s,l)=>{if(l===0){a[l]=o;return}const u=i.map(h=>Number(h[s.property])),c=[];let d=!0;u.forEach(h=>{if(!Number.isNaN(+h)){d=!1;const g=`${h}`.split(".")[1];c.push(g?g.length:0)}});const f=Math.max.apply(null,c);d?a[l]="":a[l]=u.reduce((h,g)=>{const v=Number(g);return Number.isNaN(+v)?h:Number.parseFloat((h+g).toFixed(Math.min(f,20)))},0)}),At(At("tfoot",[At("tr",{},[...t.map((s,l)=>At("td",{key:l,colspan:s.colSpan,rowspan:s.rowSpan,class:n(t,l),style:e(s,l)},[At("div",{class:["cell",s.labelClassName]},[a[l]])]))])]))}});function X5e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,f,h=!0)=>{t.toggleRowSelection(d,f,!1,h),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,f)=>{t.toggleRowExpansionAdapter(d,f)},clearSort:()=>{t.clearSort()},sort:(d,f)=>{t.commit("sort",{prop:d,order:f})},updateKeyChildren:(d,f)=>{t.updateKeyChildren(d,f)}}}function Z5e(t,e,n,r){const o=z(!1),i=z(null),a=z(!1),s=Q=>{a.value=Q},l=z({width:null,height:null,headerHeight:null}),u=z(!1),c={display:"inline-block",verticalAlign:"middle"},d=z(),f=z(0),h=z(0),g=z(0),v=z(0),m=z(0);ua(()=>{var Q;e.setHeight((Q=t.height)!=null?Q:null)}),ua(()=>{var Q;e.setMaxHeight((Q=t.maxHeight)!=null?Q:null)}),Le(()=>[t.currentRowKey,n.states.rowKey],([Q,L])=>{!p(L)||!p(Q)||n.setCurrentRowKey(`${Q}`)},{immediate:!0}),Le(()=>t.data,Q=>{r.store.commit("setData",Q)},{immediate:!0,deep:!0}),ua(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},w=(Q,L)=>{const{pixelX:H,pixelY:re}=L;Math.abs(H)>=Math.abs(re)&&(r.refs.bodyWrapper.scrollLeft+=L.pixelX/5)},O=$(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=$(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),x=()=>{O.value&&e.updateElsHeight(),e.updateColumnsWidth(),typeof window!="undefined"&&requestAnimationFrame(M)};jt(async()=>{await wt(),n.updateColumns(),k(),requestAnimationFrame(x);const Q=r.vnode.el,L=r.refs.headerWrapper;t.flexible&&Q&&Q.parentElement&&(Q.parentElement.style.minWidth="0"),l.value={width:d.value=Q.offsetWidth,height:Q.offsetHeight,headerHeight:t.showHeader&&L?L.offsetHeight:null},n.states.columns.value.forEach(H=>{H.filteredValue&&H.filteredValue.length&&r.store.commit("filterChange",{column:H,values:H.filteredValue,silent:!0})}),r.$ready=!0});const C=(Q,L)=>{if(!Q)return;const H=Array.from(Q.classList).filter(re=>!re.startsWith("is-scrolling-"));H.push(e.scrollX.value?L:"is-scrolling-none"),Q.className=H.join(" ")},E=Q=>{const{tableWrapper:L}=r.refs;C(L,Q)},T=Q=>{const{tableWrapper:L}=r.refs;return!!(L&&L.classList.contains(Q))},M=function(){if(!r.refs.scrollBarRef)return;if(!e.scrollX.value){const te="is-scrolling-none";T(te)||E(te);return}const Q=r.refs.scrollBarRef.wrapRef;if(!Q)return;const{scrollLeft:L,offsetWidth:H,scrollWidth:re}=Q,{headerWrapper:U,footerWrapper:J}=r.refs;U&&(U.scrollLeft=L),J&&(J.scrollLeft=L);const ie=re-H-1;L>=ie?E("is-scrolling-right"):E(L===0?"is-scrolling-left":"is-scrolling-middle")},k=()=>{!r.refs.scrollBarRef||(r.refs.scrollBarRef.wrapRef&&pr(r.refs.scrollBarRef.wrapRef,"scroll",M,{passive:!0}),t.fit?Wr(r.vnode.el,P):pr(window,"resize",P),Wr(r.refs.bodyWrapper,()=>{var Q,L;P(),(L=(Q=r.refs)==null?void 0:Q.scrollBarRef)==null||L.update()}))},P=()=>{var Q,L,H,re;const U=r.vnode.el;if(!r.$ready||!U)return;let J=!1;const{width:ie,height:te,headerHeight:he}=l.value,K=d.value=U.offsetWidth;ie!==K&&(J=!0);const ne=U.offsetHeight;(t.height||O.value)&&te!==ne&&(J=!0);const fe=t.tableLayout==="fixed"?r.refs.headerWrapper:(Q=r.refs.tableHeaderRef)==null?void 0:Q.$el;t.showHeader&&(fe==null?void 0:fe.offsetHeight)!==he&&(J=!0),f.value=((L=r.refs.tableWrapper)==null?void 0:L.scrollHeight)||0,g.value=(fe==null?void 0:fe.scrollHeight)||0,v.value=((H=r.refs.footerWrapper)==null?void 0:H.offsetHeight)||0,m.value=((re=r.refs.appendWrapper)==null?void 0:re.offsetHeight)||0,h.value=f.value-g.value-v.value-m.value,J&&(l.value={width:K,height:ne,headerHeight:t.showHeader&&(fe==null?void 0:fe.offsetHeight)||0},x())},R=$o(),D=$(()=>{const{bodyWidth:Q,scrollY:L,gutterWidth:H}=e;return Q.value?`${Q.value-(L.value?H:0)}px`:""}),F=$(()=>t.maxHeight?"fixed":t.tableLayout),W=$(()=>{if(t.data&&t.data.length)return;let Q="100%";t.height&&h.value&&(Q=`${h.value}px`);const L=d.value;return{width:L?`${L}px`:"",height:Q}}),I=$(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${g.value+v.value}px)`}:{maxHeight:`${+t.maxHeight-g.value-v.value}px`}:{});return{isHidden:o,renderExpanded:i,setDragVisible:s,isGroup:u,handleMouseLeave:b,handleHeaderFooterMousewheel:w,tableSize:R,emptyBlockStyle:W,resizeProxyVisible:a,bodyWidth:D,resizeState:l,doLayout:x,tableBodyStyles:S,tableLayout:F,scrollbarViewStyle:c,scrollbarStyle:I}}function G5e(t){const e=z(),n=()=>{const o=t.vnode.el.querySelector(".hidden-columns"),i={childList:!0,subtree:!0},a=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{a.forEach(s=>s())}),e.value.observe(o,i)};jt(()=>{n()}),Hf(()=>{var r;(r=e.value)==null||r.disconnect()})}var q5e={data:{type:Array,default:()=>[]},size:Fo,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function NY(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:o})=>Sn(o))&&(n=[]);const r=o=>{const i={key:`${t.tableLayout}_${o.id}`,style:{},name:void 0};return e?i.style={width:`${o.width}px`}:i.name=o.id,i};return At("colgroup",{},n.map(o=>At("col",r(o))))}NY.props=["columns","tableLayout"];const K5e=()=>{const t=z(),e=(i,a)=>{const s=t.value;s&&s.scrollTo(i,a)},n=(i,a)=>{const s=t.value;s&&Pt(a)&&["Top","Left"].includes(i)&&s[`setScroll${i}`](a)};return{scrollBarRef:t,scrollTo:e,setScrollTop:i=>n("Top",i),setScrollLeft:i=>n("Left",i)}};var sB=!1,$h,xA,CA,Y1,X1,MY,Z1,EA,TA,kA,$Y,AA,PA,RY,DY;function Ya(){if(!sB){sB=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(AA=/\b(iPhone|iP[ao]d)/.exec(t),PA=/\b(iP[ao]d)/.exec(t),kA=/Android/i.exec(t),RY=/FBAN\/\w+;/i.exec(t),DY=/Mobile/i.exec(t),$Y=!!/Win64/.exec(t),e){$h=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,$h&&document&&document.documentMode&&($h=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);MY=r?parseFloat(r[1])+4:$h,xA=e[2]?parseFloat(e[2]):NaN,CA=e[3]?parseFloat(e[3]):NaN,Y1=e[4]?parseFloat(e[4]):NaN,Y1?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),X1=e&&e[1]?parseFloat(e[1]):NaN):X1=NaN}else $h=xA=CA=X1=Y1=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Z1=o?parseFloat(o[1].replace("_",".")):!0}else Z1=!1;EA=!!n[2],TA=!!n[3]}else Z1=EA=TA=!1}}var NA={ie:function(){return Ya()||$h},ieCompatibilityMode:function(){return Ya()||MY>$h},ie64:function(){return NA.ie()&&$Y},firefox:function(){return Ya()||xA},opera:function(){return Ya()||CA},webkit:function(){return Ya()||Y1},safari:function(){return NA.webkit()},chrome:function(){return Ya()||X1},windows:function(){return Ya()||EA},osx:function(){return Ya()||Z1},linux:function(){return Ya()||TA},iphone:function(){return Ya()||AA},mobile:function(){return Ya()||AA||PA||kA||DY},nativeApp:function(){return Ya()||RY},android:function(){return Ya()||kA},ipad:function(){return Ya()||PA}},J5e=NA,$O=!!(typeof window<"u"&&window.document&&window.document.createElement),eBe={canUseDOM:$O,canUseWorkers:typeof Worker<"u",canUseEventListeners:$O&&!!(window.addEventListener||window.attachEvent),canUseViewport:$O&&!!window.screen,isInWorker:!$O},IY=eBe,LY;IY.canUseDOM&&(LY=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function tBe(t,e){if(!IY.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r=typeof o[n]=="function"}return!r&&LY&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var nBe=tBe,lB=10,uB=40,cB=800;function BY(t){var e=0,n=0,r=0,o=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),r=e*lB,o=n*lB,"deltaY"in t&&(o=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||o)&&t.deltaMode&&(t.deltaMode==1?(r*=uB,o*=uB):(r*=cB,o*=cB)),r&&!e&&(e=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:o}}BY.getEventType=function(){return J5e.firefox()?"DOMMouseScroll":nBe("wheel")?"wheel":"mousewheel"};var rBe=BY;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */const oBe=function(t,e){if(t&&t.addEventListener){const n=function(r){const o=rBe(r);e&&Reflect.apply(e,this,[r,o])};t.addEventListener("wheel",n,{passive:!0})}},iBe={beforeMount(t,e){oBe(t,e.value)}};let aBe=1;const sBe=de({name:"ElTable",directives:{Mousewheel:iBe},components:{TableHeader:I5e,TableBody:Q5e,TableFooter:Y5e,ElScrollbar:Al,hColgroup:NY},props:q5e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=En(),n=je("table"),r=Kt();mn(xu,r);const o=E5e(r,t);r.store=o;const i=new k5e({store:r.store,table:r,fit:t.fit,showHeader:t.showHeader});r.layout=i;const a=$(()=>(o.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:g,sort:v,updateKeyChildren:m}=X5e(o),{isHidden:b,renderExpanded:w,setDragVisible:O,isGroup:S,handleMouseLeave:x,handleHeaderFooterMousewheel:C,tableSize:E,emptyBlockStyle:T,resizeProxyVisible:M,bodyWidth:k,resizeState:P,doLayout:R,tableBodyStyles:D,tableLayout:F,scrollbarViewStyle:W,scrollbarStyle:I}=Z5e(t,i,o,r),{scrollBarRef:Q,scrollTo:L,setScrollLeft:H,setScrollTop:re}=K5e(),U=Hi(R,50),J=`${n.namespace.value}-table_${aBe++}`;r.tableId=J,r.state={isGroup:S,resizeState:P,doLayout:R,debouncedUpdateLayout:U};const ie=$(()=>{var K;return(K=t.sumText)!=null?K:e("el.table.sumText")}),te=$(()=>{var K;return(K=t.emptyText)!=null?K:e("el.table.emptyText")}),he=$(()=>PY(o.states.originColumns.value)[0]);return G5e(r),Yn(()=>{U.cancel()}),{ns:n,layout:i,store:o,columns:he,handleHeaderFooterMousewheel:C,handleMouseLeave:x,tableId:J,tableSize:E,isHidden:b,isEmpty:a,renderExpanded:w,resizeProxyVisible:M,resizeState:P,isGroup:S,bodyWidth:k,tableBodyStyles:D,emptyBlockStyle:T,debouncedUpdateLayout:U,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:g,doLayout:R,sort:v,updateKeyChildren:m,t:e,setDragVisible:O,context:r,computedSumText:ie,computedEmptyText:te,tableLayout:F,scrollbarViewStyle:W,scrollbarStyle:I,scrollBarRef:Q,scrollTo:L,setScrollLeft:H,setScrollTop:re,allowDragLastColumn:t.allowDragLastColumn}}});function lBe(t,e,n,r,o,i){const a=Nn("hColgroup"),s=Nn("table-header"),l=Nn("table-body"),u=Nn("table-footer"),c=Nn("el-scrollbar"),d=Wx("mousewheel");return N(),Z("div",{ref:"tableWrapper",class:j([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:bt(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[ee("div",{class:j(t.ns.e("inner-wrapper"))},[ee("div",{ref:"hiddenColumns",class:"hidden-columns"},[ke(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Yt((N(),Z("div",{key:0,ref:"headerWrapper",class:j(t.ns.e("header-wrapper"))},[ee("table",{ref:"tableHeader",class:j(t.ns.e("header")),style:bt(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(s,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):ge("v-if",!0),ee("div",{ref:"bodyWrapper",class:j(t.ns.e("body-wrapper"))},[B(c,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:f=>t.$emit("scroll",f)},{default:V(()=>[ee("table",{ref:"tableBody",class:j(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:bt({width:t.bodyWidth,tableLayout:t.tableLayout})},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(N(),me(s,{key:0,ref:"tableHeaderRef",class:j(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):ge("v-if",!0),B(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(N(),me(u,{key:1,class:j(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):ge("v-if",!0)],6),t.isEmpty?(N(),Z("div",{key:0,ref:"emptyBlock",style:bt(t.emptyBlockStyle),class:j(t.ns.e("empty-block"))},[ee("span",{class:j(t.ns.e("empty-text"))},[ke(t.$slots,"empty",{},()=>[We(ze(t.computedEmptyText),1)])],2)],6)):ge("v-if",!0),t.$slots.append?(N(),Z("div",{key:1,ref:"appendWrapper",class:j(t.ns.e("append-wrapper"))},[ke(t.$slots,"append")],2)):ge("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native","onScroll"])],2),t.showSummary&&t.tableLayout==="fixed"?Yt((N(),Z("div",{key:1,ref:"footerWrapper",class:j(t.ns.e("footer-wrapper"))},[ee("table",{class:j(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:bt(t.tableBodyStyles)},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(u,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Bn,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):ge("v-if",!0),t.border||t.isGroup?(N(),Z("div",{key:2,class:j(t.ns.e("border-left-patch"))},null,2)):ge("v-if",!0)],2),Yt(ee("div",{ref:"resizeProxy",class:j(t.ns.e("column-resize-proxy"))},null,2),[[Bn,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var uBe=Ge(sBe,[["render",lBe],["__file","table.vue"]]);const cBe={selection:"table-column--selection",expand:"table__expand-column"},dBe={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},fBe=t=>cBe[t]||"",hBe={selection:{renderHeader({store:t,column:e}){var n;function r(){return t.states.data.value&&t.states.data.value.length===0}return At(Xs,{disabled:r(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":(n=t.toggleAllSelection)!=null?n:void 0,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:n,$index:r}){return At(Xs,{disabled:e.selectable?!e.selectable.call(null,t,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:o=>o.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const r=t.index;return Pt(r)?n=e+r:kt(r)&&(n=r(e)),At("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:r}){const{ns:o}=n,i=[o.e("expand-icon")];return!t.renderExpand&&r&&i.push(o.em("expand-icon","expanded")),At("div",{class:i,onClick:function(s){s.stopPropagation(),n.toggleRowExpansion(e)}},{default:()=>t.renderExpand?[t.renderExpand({expanded:r})]:[At(Ot,null,{default:()=>[At(da)]})]})},sortable:!1,resizable:!1}};function pBe({row:t,column:e,$index:n}){var r;const o=e.property,i=o&&Wy(t,o).value;return e&&e.formatter?e.formatter(t,e,i,n):((r=i==null?void 0:i.toString)==null?void 0:r.call(i))||""}function gBe({row:t,treeNode:e,store:n},r=!1){const{ns:o}=n;if(!e)return r?[At("span",{class:o.e("placeholder")})]:null;const i=[],a=function(s){s.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&i.push(At("span",{class:o.e("indent"),style:{"padding-left":`${e.indent}px`}})),ir(e.expanded)&&!e.noLazyChildren){const s=[o.e("expand-icon"),e.expanded?o.em("expand-icon","expanded"):""];let l=da;e.loading&&(l=lc),i.push(At("div",{class:s,onClick:a},{default:()=>[At(Ot,{class:{[o.is("loading")]:e.loading}},{default:()=>[At(l)]})]}))}else i.push(At("span",{class:o.e("placeholder")}));return i}function dB(t,e){return t.reduce((n,r)=>(n[r]=r,n),e)}function vBe(t,e){const n=Kt();return{registerComplexWatchers:()=>{const i=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},s=dB(i,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Le(()=>e[u],c=>{let d=c;u==="width"&&l==="realWidth"&&(d=wR(c)),u==="minWidth"&&l==="realMinWidth"&&(d=xY(c)),n.columnConfig.value[u]=d,n.columnConfig.value[l]=d;const f=u==="fixed";t.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const i=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=dB(i,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Le(()=>e[u],c=>{n.columnConfig.value[l]=c})})}}}function mBe(t,e,n){const r=Kt(),o=z(""),i=z(!1),a=z(),s=z(),l=je("table");ua(()=>{a.value=t.align?`is-${t.align}`:null,a.value}),ua(()=>{s.value=t.headerAlign?`is-${t.headerAlign}`:a.value,s.value});const u=$(()=>{let S=r.vnode.vParent||r.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),c=$(()=>{const{store:S}=r.parent;if(!S)return!1;const{treeData:x}=S.states,C=x.value;return C&&Object.keys(C).length>0}),d=z(wR(t.width)),f=z(xY(t.minWidth)),h=S=>(d.value&&(S.width=d.value),f.value&&(S.minWidth=f.value),!d.value&&f.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(Sn(S.width)?S.minWidth:S.width),S),g=S=>{const x=S.type,C=hBe[x]||{};Object.keys(C).forEach(T=>{const M=C[T];T!=="className"&&!Sn(M)&&(S[T]=M)});const E=fBe(x);if(E){const T=`${p(l.namespace)}-${E}`;S.className=S.className?`${S.className} ${T}`:T}return S},v=S=>{Ye(S)?S.forEach(C=>x(C)):x(S);function x(C){var E;((E=C==null?void 0:C.type)==null?void 0:E.name)==="ElTableColumn"&&(C.vParent=r)}};return{columnId:o,realAlign:a,isSubColumn:i,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:g,setColumnRenders:S=>{t.renderHeader||S.type!=="selection"&&(S.renderHeader=C=>(r.columnConfig.value.label,ke(e,"header",C,()=>[S.label]))),e["filter-icon"]&&(S.renderFilterIcon=C=>ke(e,"filter-icon",C)),e.expand&&(S.renderExpand=C=>ke(e,"expand",C));let x=S.renderCell;return S.type==="expand"?(S.renderCell=C=>At("div",{class:"cell"},[x(C)]),n.value.renderExpanded=C=>e.default?e.default(C):e.default):(x=x||pBe,S.renderCell=C=>{let E=null;if(e.default){const D=e.default(C);E=DH(D)?D:x(C)}else E=x(C);const{columns:T}=n.value.store.states,M=T.value.findIndex(D=>D.type==="default"),k=c.value&&C.cellIndex===M,P=gBe(C,k),R={class:"cell",style:{}};return S.showOverflowTooltip&&(R.class=`${R.class} ${p(l.namespace)}-tooltip`,R.style={width:`${(C.column.realWidth||Number(C.column.width))-1}px`}),v(E),At("div",R,[P,E])}),S},getPropsData:(...S)=>S.reduce((x,C)=>(Ye(C)&&C.forEach(E=>{x[E]=t[E]}),x),{}),getColumnElIndex:(S,x)=>Array.prototype.indexOf.call(S,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var yBe={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let bBe=1;var FY=de({name:"ElTableColumn",components:{ElCheckbox:Xs},props:yBe,setup(t,{slots:e}){const n=Kt(),r=z({}),o=$(()=>{let O=n.parent;for(;O&&!O.tableId;)O=O.parent;return O}),{registerNormalWatchers:i,registerComplexWatchers:a}=vBe(o,t),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:g,getColumnElIndex:v,realAlign:m,updateColumnOrder:b}=mBe(t,e,o),w=c.value;s.value=`${"tableId"in w&&w.tableId||"columnId"in w&&w.columnId}_column_${bBe++}`,jx(()=>{l.value=o.value!==w;const O=t.type||"default",S=t.sortable===""?!0:t.sortable,x=O==="selection"?!1:Sn(t.showOverflowTooltip)?w.props.showOverflowTooltip:t.showOverflowTooltip,C=Sn(t.tooltipFormatter)?w.props.tooltipFormatter:t.tooltipFormatter,E={...dBe[O],id:s.value,type:O,property:t.prop||t.property,align:m,headerAlign:u,showOverflowTooltip:x,tooltipFormatter:C,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:t.index,rawColumnKey:n.vnode.key};let R=g(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);R=p5e(E,R),R=v5e(h,d,f)(R),r.value=R,i(),a()}),jt(()=>{var O,S;const x=c.value,C=l.value?(O=x.vnode.el)==null?void 0:O.children:(S=x.refs.hiddenColumns)==null?void 0:S.children,E=()=>v(C||[],n.vnode.el);r.value.getColumnIndex=E,E()>-1&&o.value.store.commit("insertColumn",r.value,l.value?"columnConfig"in x&&x.columnConfig.value:null,b)}),Yn(()=>{const O=r.value.getColumnIndex;(O?O():-1)>-1&&o.value.store.commit("removeColumn",r.value,l.value?"columnConfig"in w&&w.columnConfig.value:null,b)}),n.columnId=s.value,n.columnConfig=r},render(){var t,e,n;try{const r=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),o=[];if(Ye(r))for(const a of r)((n=a.type)==null?void 0:n.name)==="ElTableColumn"||a.shapeFlag&2?o.push(a):a.type===ut&&Ye(a.children)&&a.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!St(s==null?void 0:s.children)&&o.push(s)});return At("div",o)}catch{return At("div",[])}}});const vm=Wt(uBe,{TableColumn:FY}),mm=qr(FY);var Q0=(t=>(t.ASC="asc",t.DESC="desc",t))(Q0||{}),H0=(t=>(t.CENTER="center",t.RIGHT="right",t))(H0||{}),VY=(t=>(t.LEFT="left",t.RIGHT="right",t))(VY||{});const MA={asc:"desc",desc:"asc"},U0=Symbol("placeholder"),_Be=(t,e,n)=>{var r;const o={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};n||(o.flexShrink=1);const i={...(r=t.style)!=null?r:{},...o,flexBasis:"auto",width:t.width};return e||(t.maxWidth&&(i.maxWidth=t.maxWidth),t.minWidth&&(i.minWidth=t.minWidth)),i};function OBe(t,e,n){const r=$(()=>p(e).map((m,b)=>{var w,O;return{...m,key:(O=(w=m.key)!=null?w:m.dataKey)!=null?O:b}})),o=$(()=>p(r).filter(m=>!m.hidden)),i=$(()=>p(o).filter(m=>m.fixed==="left"||m.fixed===!0)),a=$(()=>p(o).filter(m=>m.fixed==="right")),s=$(()=>p(o).filter(m=>!m.fixed)),l=$(()=>{const m=[];return p(i).forEach(b=>{m.push({...b,placeholderSign:U0})}),p(s).forEach(b=>{m.push(b)}),p(a).forEach(b=>{m.push({...b,placeholderSign:U0})}),m}),u=$(()=>p(i).length||p(a).length),c=$(()=>p(r).reduce((m,b)=>(m[b.key]=_Be(b,p(n),t.fixed),m),{})),d=$(()=>p(o).reduce((m,b)=>m+b.width,0)),f=m=>p(r).find(b=>b.key===m),h=m=>p(c)[m],g=(m,b)=>{m.width=b};function v(m){var b;const{key:w}=m.currentTarget.dataset;if(!w)return;const{sortState:O,sortBy:S}=t;let x=Q0.ASC;Zt(O)?x=MA[O[w]]:x=MA[S.order],(b=t.onColumnSort)==null||b.call(t,{column:f(w),key:w,order:x})}return{columns:r,columnsStyles:c,columnsTotalWidth:d,fixedColumnsOnLeft:i,fixedColumnsOnRight:a,hasFixedColumns:u,mainColumns:l,normalColumns:s,visibleColumns:o,getColumn:f,getColumnStyle:h,updateColumnWidth:g,onColumnSorted:v}}const wBe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:o})=>{const i=z({scrollLeft:0,scrollTop:0});function a(h){var g,v,m;const{scrollTop:b}=h;(g=e.value)==null||g.scrollTo(h),(v=n.value)==null||v.scrollToTop(b),(m=r.value)==null||m.scrollToTop(b)}function s(h){i.value=h,a(h)}function l(h){i.value.scrollTop=h,a(p(i))}function u(h){var g,v;i.value.scrollLeft=h,(v=(g=e.value)==null?void 0:g.scrollTo)==null||v.call(g,p(i))}function c(h){var g;s(h),(g=t.onScroll)==null||g.call(t,h)}function d({scrollTop:h}){const{scrollTop:g}=p(i);h!==g&&l(h)}function f(h,g="auto"){var v;(v=e.value)==null||v.scrollToRow(h,g)}return Le(()=>p(i).scrollTop,(h,g)=>{h>g&&o()}),{scrollPos:i,scrollTo:s,scrollToLeft:u,scrollToTop:l,scrollToRow:f,onScroll:c,onVerticalScroll:d}},SBe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:o,ns:i,isScrolling:a})=>{const s=Kt(),{emit:l}=s,u=wr(!1),c=z(t.defaultExpandedRowKeys||[]),d=z(-1),f=wr(null),h=z({}),g=z({}),v=wr({}),m=wr({}),b=wr({}),w=$(()=>Pt(t.estimatedRowHeight));function O(k){var P;(P=t.onRowsRendered)==null||P.call(t,k),k.rowCacheEnd>p(d)&&(d.value=k.rowCacheEnd)}function S({hovered:k,rowKey:P}){if(a.value)return;o.vnode.el.querySelectorAll(`[rowkey="${String(P)}"]`).forEach(F=>{k?F.classList.add(i.is("hovered")):F.classList.remove(i.is("hovered"))})}function x({expanded:k,rowData:P,rowIndex:R,rowKey:D}){var F,W;const I=[...p(c)],Q=I.indexOf(D);k?Q===-1&&I.push(D):Q>-1&&I.splice(Q,1),c.value=I,l("update:expandedRowKeys",I),(F=t.onRowExpand)==null||F.call(t,{expanded:k,rowData:P,rowIndex:R,rowKey:D}),(W=t.onExpandedRowsChange)==null||W.call(t,I),o.vnode.el.querySelector(`.${i.is("hovered")}[rowkey="${String(D)}"]`)&&wt(()=>S({hovered:!0,rowKey:D}))}const C=Hi(()=>{var k,P,R,D;u.value=!0,h.value={...p(h),...p(g)},E(p(f),!1),g.value={},f.value=null,(k=e.value)==null||k.forceUpdate(),(P=n.value)==null||P.forceUpdate(),(R=r.value)==null||R.forceUpdate(),(D=s.proxy)==null||D.$forceUpdate(),u.value=!1},0);function E(k,P=!1){!p(w)||[e,n,r].forEach(R=>{const D=p(R);D&&D.resetAfterRowIndex(k,P)})}function T(k,P,R){const D=p(f);(D===null||D>R)&&(f.value=R),g.value[k]=P}function M({rowKey:k,height:P,rowIndex:R},D){D?D===VY.RIGHT?b.value[k]=P:v.value[k]=P:m.value[k]=P;const F=Math.max(...[v,b,m].map(W=>W.value[k]||0));p(h)[k]!==F&&(T(k,F,R),C())}return{expandedRowKeys:c,lastRenderedRowIndex:d,isDynamic:w,isResetting:u,rowHeights:h,resetAfterIndex:E,onRowExpanded:x,onRowHovered:S,onRowsRendered:O,onRowHeightChange:M}},xBe=(t,{expandedRowKeys:e,lastRenderedRowIndex:n,resetAfterIndex:r})=>{const o=z({}),i=$(()=>{const s={},{data:l,rowKey:u}=t,c=p(e);if(!c||!c.length)return l;const d=[],f=new Set;c.forEach(g=>f.add(g));let h=l.slice();for(h.forEach(g=>s[g[u]]=0);h.length>0;){const g=h.shift();d.push(g),f.has(g[u])&&Ye(g.children)&&g.children.length>0&&(h=[...g.children,...h],g.children.forEach(v=>s[v[u]]=s[g[u]]+1))}return o.value=s,d}),a=$(()=>{const{data:s,expandColumnKey:l}=t;return l?p(i):s});return Le(a,(s,l)=>{s!==l&&(n.value=-1,r(0,!0))}),{data:a,depthMap:o}},CBe=(t,e)=>t+e,G1=t=>Ye(t)?t.reduce(CBe,0):t,yp=(t,e,n={})=>kt(t)?t(e):t!=null?t:n,rf=t=>(["width","maxWidth","minWidth","height"].forEach(e=>{t[e]=so(t[e])}),t),zY=t=>Mr(t)?e=>At(t,e):t,EBe=(t,{columnsTotalWidth:e,rowsHeight:n,fixedColumnsOnLeft:r,fixedColumnsOnRight:o})=>{const i=$(()=>{const{fixed:b,width:w,vScrollbarSize:O}=t,S=w-O;return b?Math.max(Math.round(p(e)),S):S}),a=$(()=>{const{height:b=0,maxHeight:w=0,footerHeight:O,hScrollbarSize:S}=t;if(w>0){const x=p(f),C=p(n),T=p(d)+x+C+S;return Math.min(T,w-O)}return b-O}),s=$(()=>{const{maxHeight:b}=t,w=p(a);if(Pt(b)&&b>0)return w;const O=p(n)+p(d)+p(f);return Math.min(w,O)}),l=b=>b.width,u=$(()=>G1(p(r).map(l))),c=$(()=>G1(p(o).map(l))),d=$(()=>G1(t.headerHeight)),f=$(()=>{var b;return(((b=t.fixedData)==null?void 0:b.length)||0)*t.rowHeight}),h=$(()=>p(a)-p(d)-p(f)),g=$(()=>{const{style:b={},height:w,width:O}=t;return rf({...b,height:w,width:O})}),v=$(()=>rf({height:t.footerHeight})),m=$(()=>({top:so(p(d)),bottom:so(t.footerHeight),width:so(t.width)}));return{bodyWidth:i,fixedTableHeight:s,mainTableHeight:a,leftTableWidth:u,rightTableWidth:c,windowHeight:h,footerHeight:v,emptyStyle:m,rootStyle:g,headerHeight:d}};function TBe(t){const e=z(),n=z(),r=z(),{columns:o,columnsStyles:i,columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,hasFixedColumns:u,mainColumns:c,onColumnSorted:d}=OBe(t,jn(t,"columns"),jn(t,"fixed")),{scrollTo:f,scrollToLeft:h,scrollToTop:g,scrollToRow:v,onScroll:m,onVerticalScroll:b,scrollPos:w}=wBe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:ve}),O=je("table-v2"),S=Kt(),x=wr(!1),{expandedRowKeys:C,lastRenderedRowIndex:E,isDynamic:T,isResetting:M,rowHeights:k,resetAfterIndex:P,onRowExpanded:R,onRowHeightChange:D,onRowHovered:F,onRowsRendered:W}=SBe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:S,ns:O,isScrolling:x}),{data:I,depthMap:Q}=xBe(t,{expandedRowKeys:C,lastRenderedRowIndex:E,resetAfterIndex:P}),L=$(()=>{const{estimatedRowHeight:q,rowHeight:Ie}=t,Ee=p(I);return Pt(q)?Object.values(p(k)).reduce((Oe,se)=>Oe+se,0):Ee.length*Ie}),{bodyWidth:H,fixedTableHeight:re,mainTableHeight:U,leftTableWidth:J,rightTableWidth:ie,windowHeight:te,footerHeight:he,emptyStyle:K,rootStyle:ne,headerHeight:fe}=EBe(t,{columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,rowsHeight:L}),Ne=z(),$e=$(()=>{const q=p(I).length===0;return Ye(t.fixedData)?t.fixedData.length===0&&q:q});function ue(q){const{estimatedRowHeight:Ie,rowHeight:Ee,rowKey:Oe}=t;return Ie?p(k)[p(I)[q][Oe]]||Ie:Ee}const G=z(!1);function ve(){const{onEndReached:q}=t;if(!q)return;const{scrollTop:Ie}=p(w),Ee=p(L),Oe=p(te),se=Ee-(Ie+Oe)+t.hScrollbarSize;!G.value&&p(E)>=0&&Ee<=Ie+p(U)-p(fe)?(G.value=!0,q(se)):G.value=!1}return Le(()=>p(L),()=>G.value=!1),Le(()=>t.expandedRowKeys,q=>C.value=q,{deep:!0}),{columns:o,containerRef:Ne,mainTableRef:e,leftTableRef:n,rightTableRef:r,isDynamic:T,isResetting:M,isScrolling:x,hasFixedColumns:u,columnsStyles:i,columnsTotalWidth:a,data:I,expandedRowKeys:C,depthMap:Q,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,mainColumns:c,bodyWidth:H,emptyStyle:K,rootStyle:ne,footerHeight:he,mainTableHeight:U,fixedTableHeight:re,leftTableWidth:J,rightTableWidth:ie,showEmpty:$e,getRowHeight:ue,onColumnSorted:d,onRowHovered:F,onRowExpanded:R,onRowsRendered:W,onRowHeightChange:D,scrollTo:f,scrollToLeft:h,scrollToTop:g,scrollToRow:v,onScroll:m,onVerticalScroll:b}}const TR=Symbol("tableV2"),jY="tableV2GridScrollLeft",WY=String,e_={type:we(Array),required:!0},kR={type:we(Array)},QY={...kR,required:!0},kBe=String,fB={type:we(Array),default:()=>Gr([])},Rh={type:Number,required:!0},HY={type:we([String,Number,Symbol]),default:"id"},hB={type:we(Object)},Xh=Ze({class:String,columns:e_,columnsStyles:{type:we(Object),required:!0},depth:Number,expandColumnKey:kBe,estimatedRowHeight:{...np.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:we(Function)},onRowHover:{type:we(Function)},onRowHeightChange:{type:we(Function)},rowData:{type:we(Object),required:!0},rowEventHandlers:{type:we(Object)},rowIndex:{type:Number,required:!0},rowKey:HY,style:{type:we(Object)}}),h2={type:Number,required:!0},AR=Ze({class:String,columns:e_,fixedHeaderData:{type:we(Array)},headerData:{type:we(Array),required:!0},headerHeight:{type:we([Number,Array]),default:50},rowWidth:h2,rowHeight:{type:Number,default:50},height:h2,width:h2}),q1=Ze({columns:e_,data:QY,fixedData:kR,estimatedRowHeight:Xh.estimatedRowHeight,width:Rh,height:Rh,headerWidth:Rh,headerHeight:AR.headerHeight,bodyWidth:Rh,rowHeight:Rh,cache:uY.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:np.scrollbarAlwaysOn,scrollbarStartGap:np.scrollbarStartGap,scrollbarEndGap:np.scrollbarEndGap,class:WY,style:hB,containerStyle:hB,getRowHeight:{type:we(Function),required:!0},rowKey:Xh.rowKey,onRowsRendered:{type:we(Function)},onScroll:{type:we(Function)}}),ABe=Ze({cache:q1.cache,estimatedRowHeight:Xh.estimatedRowHeight,rowKey:HY,headerClass:{type:we([String,Function])},headerProps:{type:we([Object,Function])},headerCellProps:{type:we([Object,Function])},headerHeight:AR.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:we([String,Function])},rowProps:{type:we([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:we([Object,Function])},columns:e_,data:QY,dataGetter:{type:we(Function)},fixedData:kR,expandColumnKey:Xh.expandColumnKey,expandedRowKeys:fB,defaultExpandedRowKeys:fB,class:WY,fixed:Boolean,style:{type:we(Object)},width:Rh,height:Rh,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:np.hScrollbarSize,vScrollbarSize:np.vScrollbarSize,scrollbarAlwaysOn:fY.alwaysOn,sortBy:{type:we(Object),default:()=>({})},sortState:{type:we(Object),default:void 0},onColumnSort:{type:we(Function)},onExpandedRowsChange:{type:we(Function)},onEndReached:{type:we(Function)},onRowExpand:Xh.onRowExpand,onScroll:q1.onScroll,onRowsRendered:q1.onRowsRendered,rowEventHandlers:Xh.rowEventHandlers}),PBe="ElTableV2Header",NBe=de({name:PBe,props:AR,setup(t,{slots:e,expose:n}){const r=je("table-v2"),o=gt(jY),i=z(),a=$(()=>rf({width:t.width,height:t.height})),s=$(()=>rf({width:t.rowWidth,height:t.height})),l=$(()=>Jo(p(t.headerHeight))),u=f=>{const h=p(i);wt(()=>{h!=null&&h.scroll&&h.scroll({left:f})})},c=()=>{const f=r.e("fixed-header-row"),{columns:h,fixedHeaderData:g,rowHeight:v}=t;return g==null?void 0:g.map((m,b)=>{var w;const O=rf({height:v,width:"100%"});return(w=e.fixed)==null?void 0:w.call(e,{class:f,columns:h,rowData:m,rowIndex:-(b+1),style:O})})},d=()=>{const f=r.e("dynamic-header-row"),{columns:h}=t;return p(l).map((g,v)=>{var m;const b=rf({width:"100%",height:g});return(m=e.dynamic)==null?void 0:m.call(e,{class:f,columns:h,headerIndex:v,style:b})})};return _u(()=>{o!=null&&o.value&&u(o.value)}),n({scrollToLeft:u}),()=>{if(!(t.height<=0))return B("div",{ref:i,class:t.class,style:p(a),role:"rowgroup"},[B("div",{style:p(s),class:r.e("header")},[d(),c()])])}}});var MBe=NBe;const $Be=({atXEndEdge:t,atXStartEdge:e,atYEndEdge:n,atYStartEdge:r},o)=>{let i=null,a=0,s=0;const l=(c,d)=>{const f=c<=0&&e.value||c>=0&&t.value,h=d<=0&&r.value||d>=0&&n.value;return f&&h};return{hasReachedEdge:l,onWheel:c=>{mp(i);let d=c.deltaX,f=c.deltaY;Math.abs(d)>Math.abs(f)?f=0:d=0,c.shiftKey&&f!==0&&(d=f,f=0),!(l(a,s)&&l(a+d,s+f))&&(a+=d,s+=f,c.preventDefault(),i=kf(()=>{o(a,s),a=0,s=0}))}}},UY=({name:t,clearCache:e,getColumnPosition:n,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:i,getEstimatedTotalWidth:a,getColumnOffset:s,getRowOffset:l,getRowPosition:u,getRowStartIndexForOffset:c,getRowStopIndexForStartIndex:d,initCache:f,injectToInstance:h,validateProps:g})=>de({name:t!=null?t:"ElVirtualList",props:np,emits:[Uw,Yw],setup(v,{emit:m,expose:b,slots:w}){const O=je("vl");g(v);const S=Kt(),x=z(f(v,S));h==null||h(S,x);const C=z(),E=z(),T=z(),M=z(null),k=z({isScrolling:!1,scrollLeft:Pt(v.initScrollLeft)?v.initScrollLeft:0,scrollTop:Pt(v.initScrollTop)?v.initScrollTop:0,updateRequested:!1,xAxisScrollDir:Ng,yAxisScrollDir:Ng}),P=aY(),R=$(()=>Number.parseInt(`${v.height}`,10)),D=$(()=>Number.parseInt(`${v.width}`,10)),F=$(()=>{const{totalColumn:Oe,totalRow:se,columnCache:X}=v,{isScrolling:oe,xAxisScrollDir:ce,scrollLeft:Ae}=p(k);if(Oe===0||se===0)return[0,0,0,0];const ye=r(v,Ae,p(x)),Te=o(v,ye,Ae,p(x)),Me=!oe||ce===Xw?Math.max(1,X):1,Fe=!oe||ce===Ng?Math.max(1,X):1;return[Math.max(0,ye-Me),Math.max(0,Math.min(Oe-1,Te+Fe)),ye,Te]}),W=$(()=>{const{totalColumn:Oe,totalRow:se,rowCache:X}=v,{isScrolling:oe,yAxisScrollDir:ce,scrollTop:Ae}=p(k);if(Oe===0||se===0)return[0,0,0,0];const ye=c(v,Ae,p(x)),Te=d(v,ye,Ae,p(x)),Me=!oe||ce===Xw?Math.max(1,X):1,Fe=!oe||ce===Ng?Math.max(1,X):1;return[Math.max(0,ye-Me),Math.max(0,Math.min(se-1,Te+Fe)),ye,Te]}),I=$(()=>i(v,p(x))),Q=$(()=>a(v,p(x))),L=$(()=>{var Oe;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:v.direction,height:Pt(v.height)?`${v.height}px`:v.height,width:Pt(v.width)?`${v.width}px`:v.width},(Oe=v.style)!=null?Oe:{}]}),H=$(()=>{const Oe=`${p(Q)}px`;return{height:`${p(I)}px`,pointerEvents:p(k).isScrolling?"none":void 0,width:Oe}}),re=()=>{const{totalColumn:Oe,totalRow:se}=v;if(Oe>0&&se>0){const[Te,Me,Fe,at]=p(F),[nt,ct,ht,Je]=p(W);m(Uw,{columnCacheStart:Te,columnCacheEnd:Me,rowCacheStart:nt,rowCacheEnd:ct,columnVisibleStart:Fe,columnVisibleEnd:at,rowVisibleStart:ht,rowVisibleEnd:Je})}const{scrollLeft:X,scrollTop:oe,updateRequested:ce,xAxisScrollDir:Ae,yAxisScrollDir:ye}=p(k);m(Yw,{xAxisScrollDir:Ae,scrollLeft:X,yAxisScrollDir:ye,scrollTop:oe,updateRequested:ce})},U=Oe=>{const{clientHeight:se,clientWidth:X,scrollHeight:oe,scrollLeft:ce,scrollTop:Ae,scrollWidth:ye}=Oe.currentTarget,Te=p(k);if(Te.scrollTop===Ae&&Te.scrollLeft===ce)return;let Me=ce;if(q5(v.direction))switch(Gw()){case j0:Me=-ce;break;case OR:Me=ye-X-ce;break}k.value={...Te,isScrolling:!0,scrollLeft:Me,scrollTop:Math.max(0,Math.min(Ae,oe-se)),updateRequested:!0,xAxisScrollDir:Yh(Te.scrollLeft,Me),yAxisScrollDir:Yh(Te.scrollTop,Ae)},wt(()=>fe()),Ne(),re()},J=(Oe,se)=>{const X=p(R),oe=(I.value-X)/se*Oe;he({scrollTop:Math.min(I.value-X,oe)})},ie=(Oe,se)=>{const X=p(D),oe=(Q.value-X)/se*Oe;he({scrollLeft:Math.min(Q.value-X,oe)})},{onWheel:te}=$Be({atXStartEdge:$(()=>k.value.scrollLeft<=0),atXEndEdge:$(()=>k.value.scrollLeft>=Q.value-p(D)),atYStartEdge:$(()=>k.value.scrollTop<=0),atYEndEdge:$(()=>k.value.scrollTop>=I.value-p(R))},(Oe,se)=>{var X,oe,ce,Ae;(oe=(X=E.value)==null?void 0:X.onMouseUp)==null||oe.call(X),(Ae=(ce=T.value)==null?void 0:ce.onMouseUp)==null||Ae.call(ce);const ye=p(D),Te=p(R);he({scrollLeft:Math.min(k.value.scrollLeft+Oe,Q.value-ye),scrollTop:Math.min(k.value.scrollTop+se,I.value-Te)})});pr(C,"wheel",te,{passive:!1});const he=({scrollLeft:Oe=k.value.scrollLeft,scrollTop:se=k.value.scrollTop})=>{Oe=Math.max(Oe,0),se=Math.max(se,0);const X=p(k);se===X.scrollTop&&Oe===X.scrollLeft||(k.value={...X,xAxisScrollDir:Yh(X.scrollLeft,Oe),yAxisScrollDir:Yh(X.scrollTop,se),scrollLeft:Oe,scrollTop:se,updateRequested:!0},wt(()=>fe()),Ne(),re())},K=(Oe=0,se=0,X=gl)=>{const oe=p(k);se=Math.max(0,Math.min(se,v.totalColumn-1)),Oe=Math.max(0,Math.min(Oe,v.totalRow-1));const ce=RQ(O.namespace.value),Ae=p(x),ye=i(v,Ae),Te=a(v,Ae);he({scrollLeft:s(v,se,X,oe.scrollLeft,Ae,Te>v.width?ce:0),scrollTop:l(v,Oe,X,oe.scrollTop,Ae,ye>v.height?ce:0)})},ne=(Oe,se)=>{const{columnWidth:X,direction:oe,rowHeight:ce}=v,Ae=P.value(e&&X,e&&ce,e&&oe),ye=`${Oe},${se}`;if(Dn(Ae,ye))return Ae[ye];{const[,Te]=n(v,se,p(x)),Me=p(x),Fe=q5(oe),[at,nt]=u(v,Oe,Me),[ct]=n(v,se,Me);return Ae[ye]={position:"absolute",left:Fe?void 0:`${Te}px`,right:Fe?`${Te}px`:void 0,top:`${nt}px`,height:`${at}px`,width:`${ct}px`},Ae[ye]}},fe=()=>{k.value.isScrolling=!1,wt(()=>{P.value(-1,null,null)})};jt(()=>{if(!kn)return;const{initScrollLeft:Oe,initScrollTop:se}=v,X=p(C);X&&(Pt(Oe)&&(X.scrollLeft=Oe),Pt(se)&&(X.scrollTop=se)),re()});const Ne=()=>{const{direction:Oe}=v,{scrollLeft:se,scrollTop:X,updateRequested:oe}=p(k),ce=p(C);if(oe&&ce){if(Oe===Zg)switch(Gw()){case j0:{ce.scrollLeft=-se;break}case _R:{ce.scrollLeft=se;break}default:{const{clientWidth:Ae,scrollWidth:ye}=ce;ce.scrollLeft=ye-Ae-se;break}}else ce.scrollLeft=Math.max(0,se);ce.scrollTop=Math.max(0,X)}},{resetAfterColumnIndex:$e,resetAfterRowIndex:ue,resetAfter:G}=S.proxy;b({windowRef:C,innerRef:M,getItemStyleCache:P,scrollTo:he,scrollToItem:K,states:k,resetAfterColumnIndex:$e,resetAfterRowIndex:ue,resetAfter:G});const ve=()=>{const{scrollbarAlwaysOn:Oe,scrollbarStartGap:se,scrollbarEndGap:X,totalColumn:oe,totalRow:ce}=v,Ae=p(D),ye=p(R),Te=p(Q),Me=p(I),{scrollLeft:Fe,scrollTop:at}=p(k),nt=At(OA,{ref:E,alwaysOn:Oe,startGap:se,endGap:X,class:O.e("horizontal"),clientSize:Ae,layout:"horizontal",onScroll:ie,ratio:Ae*100/Te,scrollFrom:Fe/(Te-Ae),total:ce,visible:!0}),ct=At(OA,{ref:T,alwaysOn:Oe,startGap:se,endGap:X,class:O.e("vertical"),clientSize:ye,layout:"vertical",onScroll:J,ratio:ye*100/Me,scrollFrom:at/(Me-ye),total:oe,visible:!0});return{horizontalScrollbar:nt,verticalScrollbar:ct}},q=()=>{var Oe;const[se,X]=p(F),[oe,ce]=p(W),{data:Ae,totalColumn:ye,totalRow:Te,useIsScrolling:Me,itemKey:Fe}=v,at=[];if(Te>0&&ye>0)for(let nt=oe;nt<=ce;nt++)for(let ct=se;ct<=X;ct++){const ht=Fe({columnIndex:ct,data:Ae,rowIndex:nt});at.push(At(ut,{key:ht},(Oe=w.default)==null?void 0:Oe.call(w,{columnIndex:ct,data:Ae,isScrolling:Me?p(k).isScrolling:void 0,style:ne(nt,ct),rowIndex:nt})))}return at},Ie=()=>{const Oe=Jt(v.innerElement),se=q();return[At(Oe,{style:p(H),ref:M},St(Oe)?se:{default:()=>se})]};return()=>{const Oe=Jt(v.containerElement),{horizontalScrollbar:se,verticalScrollbar:X}=ve(),oe=Ie();return At("div",{key:0,class:O.e("wrapper"),role:v.role},[At(Oe,{class:v.className,style:p(L),onScroll:U,ref:C},St(Oe)?oe:{default:()=>oe}),se,X])}}}),{max:Jw,min:YY,floor:XY}=Math,RBe={column:"columnWidth",row:"rowHeight"},$A={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Qc=(t,e,n,r)=>{const[o,i,a]=[n[r],t[RBe[r]],n[$A[r]]];if(e>a){let s=0;if(a>=0){const l=o[a];s=l.offset+l.size}for(let l=a+1;l<=e;l++){const u=i(l);o[l]={offset:s,size:u},s+=u}n[$A[r]]=e}return o[e]},ZY=(t,e,n,r,o,i)=>{for(;n<=r;){const a=n+XY((r-n)/2),s=Qc(t,a,e,i).offset;if(s===o)return a;s{const i=o==="column"?t.totalColumn:t.totalRow;let a=1;for(;n{const[o,i]=[e[r],e[$A[r]]];return(i>0?o[i].offset:0)>=n?ZY(t,e,0,i,n,r):DBe(t,e,Jw(0,i),n,r)},GY=({totalRow:t},{estimatedRowHeight:e,lastVisitedRowIndex:n,row:r})=>{let o=0;if(n>=t&&(n=t-1),n>=0){const s=r[n];o=s.offset+s.size}const a=(t-n-1)*e;return o+a},qY=({totalColumn:t},{column:e,estimatedColumnWidth:n,lastVisitedColumnIndex:r})=>{let o=0;if(r>t&&(r=t-1),r>=0){const s=e[r];o=s.offset+s.size}const a=(t-r-1)*n;return o+a},IBe={column:qY,row:GY},gB=(t,e,n,r,o,i,a)=>{const[s,l]=[i==="row"?t.height:t.width,IBe[i]],u=Qc(t,e,o,i),c=l(t,o),d=Jw(0,YY(c-s,u.offset)),f=Jw(0,u.offset-s+a+u.size);switch(n===NC&&(r>=f-s&&r<=d+s?n=gl:n=Gu),n){case V0:return d;case z0:return f;case Gu:return Math.round(f+(d-f)/2);case gl:default:return r>=f&&r<=d?r:f>d||r{const r=Qc(t,e,n,"column");return[r.size,r.offset]},getRowPosition:(t,e,n)=>{const r=Qc(t,e,n,"row");return[r.size,r.offset]},getColumnOffset:(t,e,n,r,o,i)=>gB(t,e,n,r,o,"column",i),getRowOffset:(t,e,n,r,o,i)=>gB(t,e,n,r,o,"row",i),getColumnStartIndexForOffset:(t,e,n)=>pB(t,n,e,"column"),getColumnStopIndexForStartIndex:(t,e,n,r)=>{const o=Qc(t,e,r,"column"),i=n+t.width;let a=o.offset+o.size,s=e;for(;spB(t,n,e,"row"),getRowStopIndexForStartIndex:(t,e,n,r)=>{const{totalRow:o,height:i}=t,a=Qc(t,e,r,"row"),s=n+i;let l=a.size+a.offset,u=e;for(;u{const n=({columnIndex:i,rowIndex:a},s)=>{var l,u;s=Sn(s)?!0:s,Pt(i)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,i-1)),Pt(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=t.exposed)==null||l.getItemStyleCache.value(-1,null,null),s&&((u=t.proxy)==null||u.$forceUpdate())},r=(i,a)=>{n({columnIndex:i},a)},o=(i,a)=>{n({rowIndex:i},a)};Object.assign(t.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:o,resetAfter:n})},initCache:({estimatedColumnWidth:t=gA,estimatedRowHeight:e=gA})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:e})=>{}}),BBe=UY({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},e)=>[t,e*t],getRowPosition:({rowHeight:t},e)=>[t,e*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:e})=>e*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:e})=>e*t,getColumnOffset:({totalColumn:t,columnWidth:e,width:n},r,o,i,a,s)=>{n=Number(n);const l=Math.max(0,t*e-n),u=Math.min(l,r*e),c=Math.max(0,r*e-n+s+e);switch(o==="smart"&&(i>=c-n&&i<=u+n?o=gl:o=Gu),o){case V0:return u;case z0:return c;case Gu:{const d=Math.round(c+(u-c)/2);return dl+Math.floor(n/2)?l:d}case gl:default:return i>=c&&i<=u?i:c>u||i{e=Number(e);const l=Math.max(0,n*t-e),u=Math.min(l,r*t),c=Math.max(0,r*t-e+s+t);switch(o===NC&&(i>=c-e&&i<=u+e?o=gl:o=Gu),o){case V0:return u;case z0:return c;case Gu:{const d=Math.round(c+(u-c)/2);return dl+Math.floor(e/2)?l:d}case gl:default:return i>=c&&i<=u?i:c>u||iMath.max(0,Math.min(e-1,Math.floor(n/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:e,width:n},r,o)=>{const i=r*t,a=Math.ceil((n+o-i)/t);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:e,height:n},r,o)=>{const i=r*t,a=Math.ceil((n+o-i)/t);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:e})=>{}}),FBe="ElTableV2Grid",VBe=t=>{const e=z(),n=z(),r=z(0),o=$(()=>{const{data:m,rowHeight:b,estimatedRowHeight:w}=t;if(!w)return m.length*b}),i=$(()=>{const{fixedData:m,rowHeight:b}=t;return((m==null?void 0:m.length)||0)*b}),a=$(()=>G1(t.headerHeight)),s=$(()=>{const{height:m}=t;return Math.max(0,m-p(a)-p(i))}),l=$(()=>p(a)+p(i)>0),u=({data:m,rowIndex:b})=>m[b][t.rowKey];function c({rowCacheStart:m,rowCacheEnd:b,rowVisibleStart:w,rowVisibleEnd:O}){var S;(S=t.onRowsRendered)==null||S.call(t,{rowCacheStart:m,rowCacheEnd:b,rowVisibleStart:w,rowVisibleEnd:O})}function d(m,b){var w;(w=n.value)==null||w.resetAfterRowIndex(m,b)}function f(m,b){const w=p(e),O=p(n);Zt(m)?(w==null||w.scrollToLeft(m.scrollLeft),r.value=m.scrollLeft,O==null||O.scrollTo(m)):(w==null||w.scrollToLeft(m),r.value=m,O==null||O.scrollTo({scrollLeft:m,scrollTop:b}))}function h(m){var b;(b=p(n))==null||b.scrollTo({scrollTop:m})}function g(m,b){var w;(w=p(n))==null||w.scrollToItem(m,1,b)}function v(){var m,b;(m=p(n))==null||m.$forceUpdate(),(b=p(e))==null||b.$forceUpdate()}return Le(()=>t.bodyWidth,()=>{var m;Pt(t.estimatedRowHeight)&&((m=n.value)==null||m.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:v,fixedRowHeight:i,gridHeight:s,hasHeader:l,headerHeight:a,headerRef:e,totalHeight:o,itemKey:u,onItemRendered:c,resetAfterRowIndex:d,scrollTo:f,scrollToTop:h,scrollToRow:g,scrollLeft:r}},zBe=de({name:FBe,props:q1,setup(t,{slots:e,expose:n}){const{ns:r}=gt(TR),{bodyRef:o,fixedRowHeight:i,gridHeight:a,hasHeader:s,headerRef:l,headerHeight:u,totalHeight:c,forceUpdate:d,itemKey:f,onItemRendered:h,resetAfterRowIndex:g,scrollTo:v,scrollToTop:m,scrollToRow:b,scrollLeft:w}=VBe(t);mn(jY,w),Vx(async()=>{var S;await wt();const x=(S=o.value)==null?void 0:S.states.scrollTop;x&&m(Math.round(x)+1)}),n({forceUpdate:d,totalHeight:c,scrollTo:v,scrollToTop:m,scrollToRow:b,resetAfterRowIndex:g});const O=()=>t.bodyWidth;return()=>{const{cache:S,columns:x,data:C,fixedData:E,useIsScrolling:T,scrollbarAlwaysOn:M,scrollbarEndGap:k,scrollbarStartGap:P,style:R,rowHeight:D,bodyWidth:F,estimatedRowHeight:W,headerWidth:I,height:Q,width:L,getRowHeight:H,onScroll:re}=t,U=Pt(W),J=U?LBe:BBe,ie=p(u);return B("div",{role:"table",class:[r.e("table"),t.class],style:R},[B(J,{ref:o,data:C,useIsScrolling:T,itemKey:f,columnCache:0,columnWidth:U?O:F,totalColumn:1,totalRow:C.length,rowCache:S,rowHeight:U?H:D,width:L,height:p(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:P,scrollbarEndGap:k,scrollbarAlwaysOn:M,onScroll:re,onItemRendered:h,perfMode:!1},{default:te=>{var he;const K=C[te.rowIndex];return(he=e.row)==null?void 0:he.call(e,{...te,columns:x,rowData:K})}}),p(s)&&B(MBe,{ref:l,class:r.e("header-wrapper"),columns:x,headerData:C,headerHeight:t.headerHeight,fixedHeaderData:E,rowWidth:I,rowHeight:D,width:L,height:Math.min(ie+p(i),Q)},{dynamic:e.header,fixed:e.row})])}}});var PR=zBe;function jBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const WBe=(t,{slots:e})=>{const{mainTableRef:n,...r}=t;return B(PR,rn({ref:n},r),jBe(e)?e:{default:()=>[e]})};var QBe=WBe;function HBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const UBe=(t,{slots:e})=>{if(!t.columns.length)return;const{leftTableRef:n,...r}=t;return B(PR,rn({ref:n},r),HBe(e)?e:{default:()=>[e]})};var YBe=UBe;function XBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const ZBe=(t,{slots:e})=>{if(!t.columns.length)return;const{rightTableRef:n,...r}=t;return B(PR,rn({ref:n},r),XBe(e)?e:{default:()=>[e]})};var GBe=ZBe;const qBe=t=>{const{isScrolling:e}=gt(TR),n=z(!1),r=z(),o=$(()=>Pt(t.estimatedRowHeight)&&t.rowIndex>=0),i=(l=!1)=>{const u=p(r);if(!u)return;const{columns:c,onRowHeightChange:d,rowKey:f,rowIndex:h,style:g}=t,{height:v}=u.getBoundingClientRect();n.value=!0,wt(()=>{if(l||v!==Number.parseInt(g.height)){const m=c[0],b=(m==null?void 0:m.placeholderSign)===U0;d==null||d({rowKey:f,height:v,rowIndex:h},m&&!b&&m.fixed)}})},a=$(()=>{const{rowData:l,rowIndex:u,rowKey:c,onRowHover:d}=t,f=t.rowEventHandlers||{},h={};return Object.entries(f).forEach(([g,v])=>{kt(v)&&(h[g]=m=>{v({event:m,rowData:l,rowIndex:u,rowKey:c})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:g,hovered:v})=>{const m=h[g];h[g]=b=>{d({event:b,hovered:v,rowData:l,rowIndex:u,rowKey:c}),m==null||m(b)}}),h}),s=l=>{const{onRowExpand:u,rowData:c,rowIndex:d,rowKey:f}=t;u==null||u({expanded:l,rowData:c,rowIndex:d,rowKey:f})};return jt(()=>{p(o)&&i(!0)}),{isScrolling:e,measurable:o,measured:n,rowRef:r,eventHandlers:a,onExpand:s}},KBe="ElTableV2TableRow",JBe=de({name:KBe,props:Xh,setup(t,{expose:e,slots:n,attrs:r}){const{eventHandlers:o,isScrolling:i,measurable:a,measured:s,rowRef:l,onExpand:u}=qBe(t);return e({onExpand:u}),()=>{const{columns:c,columnsStyles:d,expandColumnKey:f,depth:h,rowData:g,rowIndex:v,style:m}=t;let b=c.map((w,O)=>{const S=Ye(g.children)&&g.children.length>0&&w.key===f;return n.cell({column:w,columns:c,columnIndex:O,depth:h,style:d[w.key],rowData:g,rowIndex:v,isScrolling:p(i),expandIconProps:S?{rowData:g,rowIndex:v,onExpand:u}:void 0})});if(n.row&&(b=n.row({cells:b.map(w=>Ye(w)&&w.length===1?w[0]:w),style:m,columns:c,depth:h,rowData:g,rowIndex:v,isScrolling:p(i)})),p(a)){const{height:w,...O}=m||{},S=p(s);return B("div",rn({ref:l,class:t.class,style:S?m:O,role:"row"},r,p(o)),[b])}return B("div",rn(r,{ref:l,class:t.class,style:m,role:"row"},p(o)),[b])}}});var e6e=JBe;function t6e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const n6e=(t,{slots:e})=>{const{columns:n,columnsStyles:r,depthMap:o,expandColumnKey:i,expandedRowKeys:a,estimatedRowHeight:s,hasFixedColumns:l,rowData:u,rowIndex:c,style:d,isScrolling:f,rowProps:h,rowClass:g,rowKey:v,rowEventHandlers:m,ns:b,onRowHovered:w,onRowExpanded:O}=t,S=yp(g,{columns:n,rowData:u,rowIndex:c},""),x=yp(h,{columns:n,rowData:u,rowIndex:c}),C=u[v],E=o[C]||0,T=Boolean(i),M=c<0,k=[b.e("row"),S,{[b.e(`row-depth-${E}`)]:T&&c>=0,[b.is("expanded")]:T&&a.includes(C),[b.is("fixed")]:!E&&M,[b.is("customized")]:Boolean(e.row)}],P=l?w:void 0,R={...x,columns:n,columnsStyles:r,class:k,depth:E,expandColumnKey:i,estimatedRowHeight:M?void 0:s,isScrolling:f,rowIndex:c,rowData:u,rowKey:C,rowEventHandlers:m,style:d};return B(e6e,rn(R,{onRowExpand:O,onMouseenter:W=>{P==null||P({hovered:!0,rowKey:C,event:W,rowData:u,rowIndex:c})},onMouseleave:W=>{P==null||P({hovered:!1,rowKey:C,event:W,rowData:u,rowIndex:c})},rowkey:C}),t6e(e)?e:{default:()=>[e]})};var r6e=n6e;const NR=(t,{slots:e})=>{var n;const{cellData:r,style:o}=t,i=((n=r==null?void 0:r.toString)==null?void 0:n.call(r))||"",a=ke(e,"default",t,()=>[i]);return B("div",{class:t.class,title:i,style:o},[a])};NR.displayName="ElTableV2Cell";NR.inheritAttrs=!1;var o6e=NR;const i6e=t=>{const{expanded:e,expandable:n,onExpand:r,style:o,size:i}=t,a={onClick:n?()=>r(!e):void 0,class:t.class};return B(Ot,rn(a,{size:i,style:o}),{default:()=>[B(da,null,null)]})};var a6e=i6e;const KY=({columns:t,column:e,columnIndex:n,depth:r,expandIconProps:o,isScrolling:i,rowData:a,rowIndex:s,style:l,expandedRowKeys:u,ns:c,cellProps:d,expandColumnKey:f,indentSize:h,iconSize:g,rowKey:v},{slots:m})=>{const b=rf(l);if(e.placeholderSign===U0)return B("div",{class:c.em("row-cell","placeholder"),style:b},null);const{cellRenderer:w,dataKey:O,dataGetter:S}=e,x=kt(S)?S({columns:t,column:e,columnIndex:n,rowData:a,rowIndex:s}):Vr(a,O!=null?O:""),C=yp(d,{cellData:x,columns:t,column:e,columnIndex:n,rowIndex:s,rowData:a}),E={class:c.e("cell-text"),columns:t,column:e,columnIndex:n,cellData:x,isScrolling:i,rowData:a,rowIndex:s},T=zY(w),M=T?T(E):ke(m,"default",E,()=>[B(o6e,E,null)]),k=[c.e("row-cell"),e.class,e.align===H0.CENTER&&c.is("align-center"),e.align===H0.RIGHT&&c.is("align-right")],P=s>=0&&f&&e.key===f,R=s>=0&&u.includes(a[v]);let D;const F=`margin-inline-start: ${r*h}px;`;return P&&(Zt(o)?D=B(a6e,rn(o,{class:[c.e("expand-icon"),c.is("expanded",R)],size:g,expanded:R,style:F,expandable:!0}),null):D=B("div",{style:[F,`width: ${g}px; height: ${g}px;`].join(" ")},null)),B("div",rn({class:k,style:b},C,{role:"cell"}),[D,M])};KY.inheritAttrs=!1;var vB=KY;const s6e=Ze({class:String,columns:e_,columnsStyles:{type:we(Object),required:!0},headerIndex:Number,style:{type:we(Object)}}),l6e=de({name:"ElTableV2HeaderRow",props:s6e,setup(t,{slots:e}){return()=>{const{columns:n,columnsStyles:r,headerIndex:o,style:i}=t;let a=n.map((s,l)=>e.cell({columns:n,column:s,columnIndex:l,headerIndex:o,style:r[s.key]}));return e.header&&(a=e.header({cells:a.map(s=>Ye(s)&&s.length===1?s[0]:s),columns:n,headerIndex:o})),B("div",{class:t.class,style:i,role:"row"},[a])}}});var u6e=l6e;function c6e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const d6e=({columns:t,columnsStyles:e,headerIndex:n,style:r,headerClass:o,headerProps:i,ns:a},{slots:s})=>{const l={columns:t,headerIndex:n},u=[a.e("header-row"),yp(o,l,""),{[a.is("customized")]:Boolean(s.header)}],c={...yp(i,l),columnsStyles:e,class:u,columns:t,headerIndex:n,style:r};return B(u6e,c,c6e(s)?s:{default:()=>[s]})};var f6e=d6e;const MR=(t,{slots:e})=>ke(e,"default",t,()=>{var n,r;return[B("div",{class:t.class,title:(n=t.column)==null?void 0:n.title},[(r=t.column)==null?void 0:r.title])]});MR.displayName="ElTableV2HeaderCell";MR.inheritAttrs=!1;var h6e=MR;const p6e=t=>{const{sortOrder:e}=t;return B(Ot,{size:14,class:t.class},{default:()=>[e===Q0.ASC?B(xTe,null,null):B(wTe,null,null)]})};var g6e=p6e;const v6e=(t,{slots:e})=>{const{column:n,ns:r,style:o,onColumnSorted:i}=t,a=rf(o);if(n.placeholderSign===U0)return B("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:s,headerClass:l,sortable:u}=n,c={...t,class:r.e("header-cell-text")},d=zY(s),f=d?d(c):ke(e,"default",c,()=>[B(h6e,c,null)]),{sortBy:h,sortState:g,headerCellProps:v}=t;let m,b;if(g){const S=g[n.key];m=Boolean(MA[S]),b=m?S:Q0.ASC}else m=n.key===h.key,b=m?h.order:Q0.ASC;const w=[r.e("header-cell"),yp(l,t,""),n.align===H0.CENTER&&r.is("align-center"),n.align===H0.RIGHT&&r.is("align-right"),u&&r.is("sortable")],O={...yp(v,t),onClick:n.sortable?i:void 0,class:w,style:a,["data-key"]:n.key};return B("div",rn(O,{role:"columnheader"}),[f,u&&B(g6e,{class:[r.e("sort-icon"),m&&r.is("sorting")],sortOrder:b},null)])};var mB=v6e;const JY=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};JY.displayName="ElTableV2Footer";var m6e=JY;const eX=(t,{slots:e})=>{const n=ke(e,"default",{},()=>[B(HU,null,null)]);return B("div",{class:t.class,style:t.style},[n])};eX.displayName="ElTableV2Empty";var y6e=eX;const tX=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};tX.displayName="ElTableV2Overlay";var b6e=tX;function oy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Mr(t)}const _6e="ElTableV2",O6e=de({name:_6e,props:ABe,setup(t,{slots:e,expose:n}){const r=je("table-v2"),{columnsStyles:o,fixedColumnsOnLeft:i,fixedColumnsOnRight:a,mainColumns:s,mainTableHeight:l,fixedTableHeight:u,leftTableWidth:c,rightTableWidth:d,data:f,depthMap:h,expandedRowKeys:g,hasFixedColumns:v,mainTableRef:m,leftTableRef:b,rightTableRef:w,isDynamic:O,isResetting:S,isScrolling:x,bodyWidth:C,emptyStyle:E,rootStyle:T,footerHeight:M,showEmpty:k,scrollTo:P,scrollToLeft:R,scrollToTop:D,scrollToRow:F,getRowHeight:W,onColumnSorted:I,onRowHeightChange:Q,onRowHovered:L,onRowExpanded:H,onRowsRendered:re,onScroll:U,onVerticalScroll:J}=TBe(t);return n({scrollTo:P,scrollToLeft:R,scrollToTop:D,scrollToRow:F}),mn(TR,{ns:r,isResetting:S,isScrolling:x}),()=>{const{cache:ie,cellProps:te,estimatedRowHeight:he,expandColumnKey:K,fixedData:ne,headerHeight:fe,headerClass:Ne,headerProps:$e,headerCellProps:ue,sortBy:G,sortState:ve,rowHeight:q,rowClass:Ie,rowEventHandlers:Ee,rowKey:Oe,rowProps:se,scrollbarAlwaysOn:X,indentSize:oe,iconSize:ce,useIsScrolling:Ae,vScrollbarSize:ye,width:Te}=t,Me=p(f),Fe={cache:ie,class:r.e("main"),columns:p(s),data:Me,fixedData:ne,estimatedRowHeight:he,bodyWidth:p(C),headerHeight:fe,headerWidth:p(C),height:p(l),mainTableRef:m,rowKey:Oe,rowHeight:q,scrollbarAlwaysOn:X,scrollbarStartGap:2,scrollbarEndGap:ye,useIsScrolling:Ae,width:Te,getRowHeight:W,onRowsRendered:re,onScroll:U},at=p(c),nt=p(u),ct={cache:ie,class:r.e("left"),columns:p(i),data:Me,fixedData:ne,estimatedRowHeight:he,leftTableRef:b,rowHeight:q,bodyWidth:at,headerWidth:at,headerHeight:fe,height:nt,rowKey:Oe,scrollbarAlwaysOn:X,scrollbarStartGap:2,scrollbarEndGap:ye,useIsScrolling:Ae,width:at,getRowHeight:W,onScroll:J},ht=p(d),Je={cache:ie,class:r.e("right"),columns:p(a),data:Me,fixedData:ne,estimatedRowHeight:he,rightTableRef:w,rowHeight:q,bodyWidth:ht,headerWidth:ht,headerHeight:fe,height:nt,rowKey:Oe,scrollbarAlwaysOn:X,scrollbarStartGap:2,scrollbarEndGap:ye,width:ht,style:`--${p(r.namespace)}-table-scrollbar-size: ${ye}px`,useIsScrolling:Ae,getRowHeight:W,onScroll:J},ft=p(o),Mt={ns:r,depthMap:p(h),columnsStyles:ft,expandColumnKey:K,expandedRowKeys:p(g),estimatedRowHeight:he,hasFixedColumns:p(v),rowProps:se,rowClass:Ie,rowKey:Oe,rowEventHandlers:Ee,onRowHovered:L,onRowExpanded:H,onRowHeightChange:Q},Pe={cellProps:te,expandColumnKey:K,indentSize:oe,iconSize:ce,rowKey:Oe,expandedRowKeys:p(g),ns:r},Ce={ns:r,headerClass:Ne,headerProps:$e,columnsStyles:ft},pe={ns:r,sortBy:G,sortState:ve,headerCellProps:ue,onColumnSorted:I},Be={row:On=>B(r6e,rn(On,Mt),{row:e.row,cell:yn=>{let dr;return e.cell?B(vB,rn(yn,Pe,{style:ft[yn.column.key]}),oy(dr=e.cell(yn))?dr:{default:()=>[dr]}):B(vB,rn(yn,Pe,{style:ft[yn.column.key]}),null)}}),header:On=>B(f6e,rn(On,Ce),{header:e.header,cell:yn=>{let dr;return e["header-cell"]?B(mB,rn(yn,pe,{style:ft[yn.column.key]}),oy(dr=e["header-cell"](yn))?dr:{default:()=>[dr]}):B(mB,rn(yn,pe,{style:ft[yn.column.key]}),null)}})},_t=[t.class,r.b(),r.e("root"),{[r.is("dynamic")]:p(O)}],en={class:r.e("footer"),style:p(M)};return B("div",{class:_t,style:p(T)},[B(QBe,Fe,oy(Be)?Be:{default:()=>[Be]}),B(YBe,ct,oy(Be)?Be:{default:()=>[Be]}),B(GBe,Je,oy(Be)?Be:{default:()=>[Be]}),e.footer&&B(m6e,en,{default:e.footer}),p(k)&&B(y6e,{class:r.e("empty"),style:p(E)},{default:e.empty}),e.overlay&&B(b6e,{class:r.e("overlay")},{default:e.overlay})])}}});var w6e=O6e;const S6e=Ze({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:we(Function)}}),x6e=t=>{const e=z(),n=z(0),r=z(0);let o;return jt(()=>{o=Wr(e,([i])=>{const{width:a,height:s}=i.contentRect,{paddingLeft:l,paddingRight:u,paddingTop:c,paddingBottom:d}=getComputedStyle(i.target),f=Number.parseInt(l)||0,h=Number.parseInt(u)||0,g=Number.parseInt(c)||0,v=Number.parseInt(d)||0;n.value=a-f-h,r.value=s-g-v}).stop}),Yn(()=>{o==null||o()}),Le([n,r],([i,a])=>{var s;(s=t.onResize)==null||s.call(t,{width:i,height:a})}),{sizer:e,width:n,height:r}},C6e=de({name:"ElAutoResizer",props:S6e,setup(t,{slots:e}){const n=je("auto-resizer"),{height:r,width:o,sizer:i}=x6e(t),a={width:"100%",height:"100%"};return()=>{var s;return B("div",{ref:i,class:n.b(),style:a},[(s=e.default)==null?void 0:s.call(e,{height:r.value,width:o.value})])}}});var E6e=C6e;const T6e=Wt(w6e),k6e=Wt(E6e),MC=Symbol("tabsRootContextKey"),A6e=Ze({tabs:{type:we(Array),default:()=>Gr([])},tabRefs:{type:we(Object),default:()=>Gr({})}}),nX="ElTabBar",P6e=de({name:nX}),N6e=de({...P6e,props:A6e,setup(t,{expose:e}){const n=t,r=gt(MC);r||Ao(nX,"");const o=je("tabs"),i=z(),a=z(),s=()=>{let f=0,h=0;const g=["top","bottom"].includes(r.props.tabPosition)?"width":"height",v=g==="width"?"x":"y",m=v==="x"?"left":"top";return n.tabs.every(b=>{if(Sn(b.paneName))return!1;const w=n.tabRefs[b.paneName];if(!w)return!1;if(!b.active)return!0;f=w[`offset${ef(m)}`],h=w[`client${ef(g)}`];const O=window.getComputedStyle(w);return g==="width"&&(h-=Number.parseFloat(O.paddingLeft)+Number.parseFloat(O.paddingRight),f+=Number.parseFloat(O.paddingLeft)),!1}),{[g]:`${h}px`,transform:`translate${ef(v)}(${f}px)`}},l=()=>a.value=s(),u=[],c=()=>{u.forEach(f=>f.stop()),u.length=0,Object.values(n.tabRefs).forEach(f=>{u.push(Wr(f,l))})};Le(()=>n.tabs,async()=>{await wt(),l(),c()},{immediate:!0});const d=Wr(i,()=>l());return Yn(()=>{u.forEach(f=>f.stop()),u.length=0,d.stop()}),e({ref:i,update:l}),(f,h)=>(N(),Z("div",{ref_key:"barRef",ref:i,class:j([p(o).e("active-bar"),p(o).is(p(r).props.tabPosition)]),style:bt(a.value)},null,6))}});var M6e=Ge(N6e,[["__file","tab-bar.vue"]]);const $6e=Ze({panes:{type:we(Array),default:()=>Gr([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),R6e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},yB="ElTabNav",D6e=de({name:yB,props:$6e,emits:R6e,setup(t,{expose:e,emit:n}){const r=gt(MC);r||Ao(yB,"");const o=je("tabs"),i=kCe(),a=jCe(),s=z(),l=z(),u=z(),c=z({}),d=z(),f=z(!1),h=z(0),g=z(!1),v=z(!0),m=wr(),b=$(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),w=$(()=>({transform:`translate${b.value==="width"?"X":"Y"}(-${h.value}px)`})),O=()=>{if(!s.value)return;const R=s.value[`offset${ef(b.value)}`],D=h.value;if(!D)return;const F=D>R?D-R:0;h.value=F},S=()=>{if(!s.value||!l.value)return;const R=l.value[`offset${ef(b.value)}`],D=s.value[`offset${ef(b.value)}`],F=h.value;if(R-F<=D)return;const W=R-F>D*2?F+D:R-D;h.value=W},x=async()=>{const R=l.value;if(!f.value||!u.value||!s.value||!R)return;await wt();const D=c.value[t.currentName];if(!D)return;const F=s.value,W=["top","bottom"].includes(r.props.tabPosition),I=D.getBoundingClientRect(),Q=F.getBoundingClientRect(),L=W?R.offsetWidth-Q.width:R.offsetHeight-Q.height,H=h.value;let re=H;W?(I.leftQ.right&&(re=H+I.right-Q.right)):(I.topQ.bottom&&(re=H+(I.bottom-Q.bottom))),re=Math.max(re,0),h.value=Math.min(re,L)},C=()=>{var R;if(!l.value||!s.value)return;t.stretch&&((R=d.value)==null||R.update());const D=l.value[`offset${ef(b.value)}`],F=s.value[`offset${ef(b.value)}`],W=h.value;F0&&(h.value=0))},E=R=>{let D=0;switch(R.code){case st.left:case st.up:D=-1;break;case st.right:case st.down:D=1;break;default:return}const F=Array.from(R.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let I=F.indexOf(R.target)+D;I<0?I=F.length-1:I>=F.length&&(I=0),F[I].focus({preventScroll:!0}),F[I].click(),T()},T=()=>{v.value&&(g.value=!0)},M=()=>g.value=!1,k=(R,D)=>{c.value[D]=R},P=async()=>{await wt();const R=c.value[t.currentName];R==null||R.focus({preventScroll:!0})};return Le(i,R=>{R==="hidden"?v.value=!1:R==="visible"&&setTimeout(()=>v.value=!0,50)}),Le(a,R=>{R?setTimeout(()=>v.value=!0,50):v.value=!1}),Wr(u,C),jt(()=>setTimeout(()=>x(),0)),_u(()=>C()),e({scrollToActiveTab:x,removeFocus:M,focusActiveTab:P,tabListRef:l,tabBarRef:d,scheduleRender:()=>D1(m)}),()=>{const R=f.value?[B("span",{class:[o.e("nav-prev"),o.is("disabled",!f.value.prev)],onClick:O},[B(Ot,null,{default:()=>[B(rd,null,null)]})]),B("span",{class:[o.e("nav-next"),o.is("disabled",!f.value.next)],onClick:S},[B(Ot,null,{default:()=>[B(da,null,null)]})])]:null,D=t.panes.map((F,W)=>{var I,Q,L,H;const re=F.uid,U=F.props.disabled,J=(Q=(I=F.props.name)!=null?I:F.index)!=null?Q:`${W}`,ie=!U&&(F.isClosable||t.editable);F.index=`${W}`;const te=ie?B(Ot,{class:"is-icon-close",onClick:ne=>n("tabRemove",F,ne)},{default:()=>[B(fa,null,null)]}):null,he=((H=(L=F.slots).label)==null?void 0:H.call(L))||F.props.label,K=!U&&F.active?0:-1;return B("div",{ref:ne=>k(ne,J),class:[o.e("item"),o.is(r.props.tabPosition),o.is("active",F.active),o.is("disabled",U),o.is("closable",ie),o.is("focus",g.value)],id:`tab-${J}`,key:`tab-${re}`,"aria-controls":`pane-${J}`,role:"tab","aria-selected":F.active,tabindex:K,onFocus:()=>T(),onBlur:()=>M(),onClick:ne=>{M(),n("tabClick",F,J,ne)},onKeydown:ne=>{ie&&(ne.code===st.delete||ne.code===st.backspace)&&n("tabRemove",F,ne)}},[he,te])});return m.value,B("div",{ref:u,class:[o.e("nav-wrap"),o.is("scrollable",!!f.value),o.is(r.props.tabPosition)]},[R,B("div",{class:o.e("nav-scroll"),ref:s},[t.panes.length>0?B("div",{class:[o.e("nav"),o.is(r.props.tabPosition),o.is("stretch",t.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:w.value,role:"tablist",onKeydown:E},[t.type?null:B(M6e,{ref:d,tabs:[...t.panes],tabRefs:c.value},null),D]):null])])}}}),I6e=Ze({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:we(Function),default:()=>!0},stretch:Boolean}),p2=t=>St(t)||Pt(t),L6e={[zt]:t=>p2(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>p2(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>p2(t),tabAdd:()=>!0},B6e=de({name:"ElTabs",props:I6e,emits:L6e,setup(t,{emit:e,slots:n,expose:r}){var o;const i=je("tabs"),a=$(()=>["left","right"].includes(t.tabPosition)),{children:s,addChild:l,removeChild:u,ChildrenSorter:c}=SC(Kt(),"ElTabPane"),d=z(),f=z((o=t.modelValue)!=null?o:"0"),h=async(w,O=!1)=>{var S,x,C,E;if(!(f.value===w||Sn(w)))try{let T;if(t.beforeLeave){const M=t.beforeLeave(w,f.value);T=M instanceof Promise?await M:M}else T=!0;if(T!==!1){const M=(S=s.value.find(k=>k.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=w,O&&(e(zt,w),e("tabChange",w)),(C=(x=d.value)==null?void 0:x.removeFocus)==null||C.call(x),M&&((E=d.value)==null||E.focusActiveTab())}}catch{}},g=(w,O,S)=>{w.props.disabled||(e("tabClick",w,S),h(O,!0))},v=(w,O)=>{w.props.disabled||Sn(w.props.name)||(O.stopPropagation(),e("edit",w.props.name,"remove"),e("tabRemove",w.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},b=w=>{const O=w.el.firstChild,S=["bottom","right"].includes(t.tabPosition)?w.children[0].el:w.children[1].el;O!==S&&O.before(S)};return Le(()=>t.modelValue,w=>h(w)),Le(f,async()=>{var w;await wt(),(w=d.value)==null||w.scrollToActiveTab()}),mn(MC,{props:t,currentName:f,registerPane:l,unregisterPane:u,nav$:d}),r({currentName:f,get tabNavRef(){return s$(d.value,["scheduleRender"])}}),()=>{const w=n["add-icon"],O=t.editable||t.addable?B("div",{class:[i.e("new-tab"),a.value&&i.e("new-tab-vertical")],tabindex:"0",onClick:m,onKeydown:E=>{[st.enter,st.numpadEnter].includes(E.code)&&m()}},[w?ke(n,"add-icon"):B(Ot,{class:i.is("icon-plus")},{default:()=>[B(Lw,null,null)]})]):null,S=()=>B(D6e,{ref:d,currentName:f.value,editable:t.editable,type:t.type,panes:s.value,stretch:t.stretch,onTabClick:g,onTabRemove:v},null),x=B("div",{class:[i.e("header"),a.value&&i.e("header-vertical"),i.is(t.tabPosition)]},[B(c,null,{default:S,$stable:!0}),O]),C=B("div",{class:i.e("content")},[ke(n,"default")]);return B("div",{class:[i.b(),i.m(t.tabPosition),{[i.m("card")]:t.type==="card",[i.m("border-card")]:t.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[C,x])}}});var F6e=B6e;const V6e=Ze({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),rX="ElTabPane",z6e=de({name:rX}),j6e=de({...z6e,props:V6e,setup(t){const e=t,n=Kt(),r=Ro(),o=gt(MC);o||Ao(rX,"usage: ");const i=je("tab-pane"),a=z(),s=z(),l=$(()=>e.closable||o.props.closable),u=Dw(()=>{var v;return o.currentName.value===((v=e.name)!=null?v:s.value)}),c=z(u.value),d=$(()=>{var v;return(v=e.name)!=null?v:s.value}),f=Dw(()=>!e.lazy||c.value||u.value),h=()=>{var v;return(v=a.value)==null?void 0:v.contains(document.activeElement)};Le(u,v=>{v&&(c.value=!0)});const g=pn({uid:n.uid,getVnode:()=>n.vnode,slots:r,props:e,paneName:d,active:u,index:s,isClosable:l,isFocusInsidePane:h});return o.registerPane(g),Yn(()=>{o.unregisterPane(g)}),fM(()=>{var v;r.label&&((v=o.nav$.value)==null||v.scheduleRender())}),(v,m)=>p(f)?Yt((N(),Z("div",{key:0,id:`pane-${p(d)}`,ref_key:"paneRef",ref:a,class:j(p(i).b()),role:"tabpanel","aria-hidden":!p(u),"aria-labelledby":`tab-${p(d)}`},[ke(v.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Bn,p(u)]]):ge("v-if",!0)}});var oX=Ge(j6e,[["__file","tab-pane.vue"]]);const Sc=Wt(F6e,{TabPane:oX}),xc=qr(oX),W6e=Ze({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Oc,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),Q6e=de({name:"ElText"}),H6e=de({...Q6e,props:W6e,setup(t){const e=t,n=z(),r=$o(),o=je("text"),i=$(()=>[o.b(),o.m(e.type),o.m(r.value),o.is("truncated",e.truncated),o.is("line-clamp",!Sn(e.lineClamp))]),a=()=>{var s,l,u,c,d,f,h;if(vd().title)return;let v=!1;const m=((s=n.value)==null?void 0:s.textContent)||"";if(e.truncated){const b=(l=n.value)==null?void 0:l.offsetWidth,w=(u=n.value)==null?void 0:u.scrollWidth;b&&w&&w>b&&(v=!0)}else if(!Sn(e.lineClamp)){const b=(c=n.value)==null?void 0:c.offsetHeight,w=(d=n.value)==null?void 0:d.scrollHeight;b&&w&&w>b&&(v=!0)}v?(f=n.value)==null||f.setAttribute("title",m):(h=n.value)==null||h.removeAttribute("title")};return jt(a),_u(a),(s,l)=>(N(),me(Jt(s.tag),{ref_key:"textRef",ref:n,class:j(p(i)),style:bt({"-webkit-line-clamp":s.lineClamp})},{default:V(()=>[ke(s.$slots,"default")]),_:3},8,["class","style"]))}});var U6e=Ge(H6e,[["__file","text.vue"]]);const Cu=Wt(U6e),Y6e=Ze({format:{type:String,default:"HH:mm"},modelValue:{type:we(String)},disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:we(String),default:"light"},clearable:{type:Boolean,default:!0},size:Fo,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:{type:we(String)},maxTime:{type:we(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:we([String,Object]),default:()=>VQ},clearIcon:{type:we([String,Object]),default:()=>Cd},...Dp}),Xc=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const r=Number.parseInt(e[1],10),o=t.toUpperCase();return o.includes("AM")&&n===12?n=0:o.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:r}}return null},g2=(t,e)=>{const n=Xc(t);if(!n)return-1;const r=Xc(e);if(!r)return-1;const o=n.minutes+n.hours*60,i=r.minutes+r.hours*60;return o===i?0:o>i?1:-1},bB=t=>`${t}`.padStart(2,"0"),xg=t=>`${bB(t.hours)}:${bB(t.minutes)}`,X6e=(t,e)=>{const n=Xc(t);if(!n)return"";const r=Xc(e);if(!r)return"";const o={hours:n.hours,minutes:n.minutes};return o.minutes+=r.minutes,o.hours+=r.hours,o.hours+=Math.floor(o.minutes/60),o.minutes=o.minutes%60,xg(o)},Z6e=de({name:"ElTimeSelect"}),G6e=de({...Z6e,props:Y6e,emits:[ln,"blur","focus","clear",zt],setup(t,{expose:e}){const n=t;Ht.extend(X$);const{Option:r}=Ml,o=je("input"),i=z(),a=Zi(),{lang:s}=En(),l=$(()=>n.modelValue),u=$(()=>{const b=Xc(n.start);return b?xg(b):null}),c=$(()=>{const b=Xc(n.end);return b?xg(b):null}),d=$(()=>{const b=Xc(n.step);return b?xg(b):null}),f=$(()=>{const b=Xc(n.minTime||"");return b?xg(b):null}),h=$(()=>{const b=Xc(n.maxTime||"");return b?xg(b):null}),g=$(()=>{var b;const w=[],O=(S,x)=>{w.push({value:S,disabled:g2(x,f.value||"-1:-1")<=0||g2(x,h.value||"100:100")>=0})};if(n.start&&n.end&&n.step){let S=u.value,x;for(;S&&c.value&&g2(S,c.value)<=0;)x=Ht(S,"HH:mm").locale(s.value).format(n.format),O(x,S),S=X6e(S,d.value);if(n.includeEndTime&&c.value&&((b=w[w.length-1])==null?void 0:b.value)!==c.value){const C=Ht(c.value,"HH:mm").locale(s.value).format(n.format);O(C,c.value)}}return w});return e({blur:()=>{var b,w;(w=(b=i.value)==null?void 0:b.blur)==null||w.call(b)},focus:()=>{var b,w;(w=(b=i.value)==null?void 0:b.focus)==null||w.call(b)}}),(b,w)=>(N(),me(p(Ml),{ref_key:"select",ref:i,"model-value":p(l),disabled:p(a),clearable:b.clearable,"clear-icon":b.clearIcon,size:b.size,effect:b.effect,placeholder:b.placeholder,"default-first-option":"",filterable:b.editable,"empty-values":b.emptyValues,"value-on-clear":b.valueOnClear,"onUpdate:modelValue":O=>b.$emit(p(zt),O),onChange:O=>b.$emit(p(ln),O),onBlur:O=>b.$emit("blur",O),onFocus:O=>b.$emit("focus",O),onClear:()=>b.$emit("clear")},{prefix:V(()=>[b.prefixIcon?(N(),me(p(Ot),{key:0,class:j(p(o).e("prefix-icon"))},{default:V(()=>[(N(),me(Jt(b.prefixIcon)))]),_:1},8,["class"])):ge("v-if",!0)]),default:V(()=>[(N(!0),Z(ut,null,Xt(p(g),O=>(N(),me(p(r),{key:O.value,label:O.value,value:O.value,disabled:O.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var q6e=Ge(G6e,[["__file","time-select.vue"]]);const K6e=Wt(q6e),J6e="timeline",eFe=de({name:"ElTimeline",setup(t,{slots:e}){const n=je("timeline");return mn(J6e,e),()=>At("ul",{class:[n.b()]},[ke(e,"default")])}}),tFe=Ze({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:cr},hollow:Boolean}),nFe=de({name:"ElTimelineItem"}),rFe=de({...nFe,props:tFe,setup(t){const e=t,n=je("timeline-item"),r=$(()=>[n.e("node"),n.em("node",e.size||""),n.em("node",e.type||""),n.is("hollow",e.hollow)]);return(o,i)=>(N(),Z("li",{class:j([p(n).b(),{[p(n).e("center")]:o.center}])},[ee("div",{class:j(p(n).e("tail"))},null,2),o.$slots.dot?ge("v-if",!0):(N(),Z("div",{key:0,class:j(p(r)),style:bt({backgroundColor:o.color})},[o.icon?(N(),me(p(Ot),{key:0,class:j(p(n).e("icon"))},{default:V(()=>[(N(),me(Jt(o.icon)))]),_:1},8,["class"])):ge("v-if",!0)],6)),o.$slots.dot?(N(),Z("div",{key:1,class:j(p(n).e("dot"))},[ke(o.$slots,"dot")],2)):ge("v-if",!0),ee("div",{class:j(p(n).e("wrapper"))},[!o.hideTimestamp&&o.placement==="top"?(N(),Z("div",{key:0,class:j([p(n).e("timestamp"),p(n).is("top")])},ze(o.timestamp),3)):ge("v-if",!0),ee("div",{class:j(p(n).e("content"))},[ke(o.$slots,"default")],2),!o.hideTimestamp&&o.placement==="bottom"?(N(),Z("div",{key:1,class:j([p(n).e("timestamp"),p(n).is("bottom")])},ze(o.timestamp),3)):ge("v-if",!0)],2)],2))}});var iX=Ge(rFe,[["__file","timeline-item.vue"]]);const oFe=Wt(eFe,{TimelineItem:iX}),iFe=qr(iX),aX=Ze({nowrap:Boolean});var sX=(t=>(t.top="top",t.bottom="bottom",t.left="left",t.right="right",t))(sX||{});const aFe=Object.values(sX),$R=Ze({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:we(Object),default:null}}),sFe=Ze({side:{type:we(String),values:aFe,required:!0}}),lFe=["absolute","fixed"],uFe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],RR=Ze({arrowPadding:{type:we(Number),default:5},effect:{type:we(String),default:"light"},contentClass:String,placement:{type:we(String),values:uFe,default:"bottom"},reference:{type:we(Object),default:null},offset:{type:Number,default:8},strategy:{type:we(String),values:lFe,default:"absolute"},showArrow:Boolean,...Yi(["ariaLabel"])}),DR=Ze({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:we(Function)},"onUpdate:open":{type:we(Function)}}),lg={type:we(Function)},IR=Ze({onBlur:lg,onClick:lg,onFocus:lg,onMouseDown:lg,onMouseEnter:lg,onMouseLeave:lg}),cFe=Ze({...DR,...$R,...IR,...RR,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:we(Object),default:null},teleported:Boolean,to:{type:we([String,Object]),default:"body"}}),$C=Symbol("tooltipV2"),lX=Symbol("tooltipV2Content"),v2="tooltip_v2.open",dFe=de({name:"ElTooltipV2Root"}),fFe=de({...dFe,props:DR,setup(t,{expose:e}){const n=t,r=z(n.defaultOpen),o=z(null),i=$({get:()=>ts(n.open)?r.value:n.open,set:m=>{var b;r.value=m,(b=n["onUpdate:open"])==null||b.call(n,m)}}),a=$(()=>Pt(n.delayDuration)&&n.delayDuration>0),{start:s,stop:l}=vp(()=>{i.value=!0},$(()=>n.delayDuration),{immediate:!1}),u=je("tooltip-v2"),c=Si(),d=()=>{l(),i.value=!0},f=()=>{p(a)?s():d()},h=d,g=()=>{l(),i.value=!1};return Le(i,m=>{var b;m&&(document.dispatchEvent(new CustomEvent(v2)),h()),(b=n.onOpenChange)==null||b.call(n,m)}),jt(()=>{document.addEventListener(v2,g)}),Yn(()=>{l(),document.removeEventListener(v2,g)}),mn($C,{contentId:c,triggerRef:o,ns:u,onClose:g,onDelayOpen:f,onOpen:h}),e({onOpen:h,onClose:g}),(m,b)=>ke(m.$slots,"default",{open:p(i)})}});var hFe=Ge(fFe,[["__file","root.vue"]]);const pFe=de({name:"ElTooltipV2Arrow"}),gFe=de({...pFe,props:{...$R,...sFe},setup(t){const e=t,{ns:n}=gt($C),{arrowRef:r}=gt(lX),o=$(()=>{const{style:i,width:a,height:s}=e,l=n.namespace.value;return{[`--${l}-tooltip-v2-arrow-width`]:`${a}px`,[`--${l}-tooltip-v2-arrow-height`]:`${s}px`,[`--${l}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${l}-tooltip-v2-arrow-cover-width`]:a/2-1,...i||{}}});return(i,a)=>(N(),Z("span",{ref_key:"arrowRef",ref:r,style:bt(p(o)),class:j(p(n).e("arrow"))},null,6))}});var _B=Ge(gFe,[["__file","arrow.vue"]]);const Ev=Math.min,rp=Math.max,eS=Math.round,RO=Math.floor,Mf=t=>({x:t,y:t}),vFe={left:"right",right:"left",bottom:"top",top:"bottom"},mFe={start:"end",end:"start"};function RA(t,e,n){return rp(t,Ev(e,n))}function t_(t,e){return typeof t=="function"?t(e):t}function bp(t){return t.split("-")[0]}function n_(t){return t.split("-")[1]}function uX(t){return t==="x"?"y":"x"}function LR(t){return t==="y"?"height":"width"}function RC(t){return["top","bottom"].includes(bp(t))?"y":"x"}function BR(t){return uX(RC(t))}function yFe(t,e,n){n===void 0&&(n=!1);const r=n_(t),o=BR(t),i=LR(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=tS(a)),[a,tS(a)]}function bFe(t){const e=tS(t);return[DA(t),e,DA(e)]}function DA(t){return t.replace(/start|end/g,e=>mFe[e])}function _Fe(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:a;default:return[]}}function OFe(t,e,n,r){const o=n_(t);let i=_Fe(bp(t),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),e&&(i=i.concat(i.map(DA)))),i}function tS(t){return t.replace(/left|right|bottom|top/g,e=>vFe[e])}function wFe(t){return{top:0,right:0,bottom:0,left:0,...t}}function cX(t){return typeof t!="number"?wFe(t):{top:t,right:t,bottom:t,left:t}}function nS(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function OB(t,e,n){let{reference:r,floating:o}=t;const i=RC(e),a=BR(e),s=LR(a),l=bp(e),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(n_(e)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const SFe=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:d}=OB(u,r,l),f=r,h={},g=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=t_(t,e)||{};if(u==null)return{};const d=cX(c),f={x:n,y:r},h=BR(o),g=LR(h),v=await a.getDimensions(u),m=h==="y",b=m?"top":"left",w=m?"bottom":"right",O=m?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[h]-f[h]-i.floating[g],x=f[h]-i.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[O]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[O]||i.floating[g]);const T=S/2-x/2,M=E/2-v[g]/2-1,k=Ev(d[b],M),P=Ev(d[w],M),R=k,D=E-v[g]-P,F=E/2-v[g]/2+T,W=RA(R,F,D),I=!l.arrow&&n_(o)!=null&&F!=W&&i.reference[g]/2-(FR<=0)){var M,k;const R=(((M=i.flip)==null?void 0:M.index)||0)+1,D=x[R];if(D)return{data:{index:R,overflows:T},reset:{placement:D}};let F=(k=T.filter(W=>W.overflows[0]<=0).sort((W,I)=>W.overflows[1]-I.overflows[1])[0])==null?void 0:k.placement;if(!F)switch(h){case"bestFit":{var P;const W=(P=T.map(I=>[I.placement,I.overflows.filter(Q=>Q>0).reduce((Q,L)=>Q+L,0)]).sort((I,Q)=>I[1]-Q[1])[0])==null?void 0:P[0];W&&(F=W);break}case"initialPlacement":F=s;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function CFe(t,e){const{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=bp(n),s=n_(n),l=RC(n)==="y",u=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,d=t_(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const fX=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:r}=e,o=await CFe(e,t);return{x:n+o.x,y:r+o.y,data:o}}}},EFe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:b,y:w}=m;return{x:b,y:w}}},...l}=t_(t,e),u={x:n,y:r},c=await FR(e,l),d=RC(bp(o)),f=uX(d);let h=u[f],g=u[d];if(i){const m=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+c[m],O=h-c[b];h=RA(w,h,O)}if(a){const m=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=g+c[m],O=g-c[b];g=RA(w,g,O)}const v=s.fn({...e,[f]:h,[d]:g});return{...v,data:{x:v.x-n,y:v.y-r}}}}};function $f(t){return hX(t)?(t.nodeName||"").toLowerCase():"#document"}function zs(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function kd(t){var e;return(e=(hX(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hX(t){return t instanceof Node||t instanceof zs(t).Node}function ud(t){return t instanceof Element||t instanceof zs(t).Element}function dc(t){return t instanceof HTMLElement||t instanceof zs(t).HTMLElement}function wB(t){return typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof zs(t).ShadowRoot}function r_(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=$l(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function TFe(t){return["table","td","th"].includes($f(t))}function VR(t){const e=zR(),n=$l(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function kFe(t){let e=Tv(t);for(;dc(e)&&!DC(e);){if(VR(e))return e;e=Tv(e)}return null}function zR(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function DC(t){return["html","body","#document"].includes($f(t))}function $l(t){return zs(t).getComputedStyle(t)}function IC(t){return ud(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Tv(t){if($f(t)==="html")return t;const e=t.assignedSlot||t.parentNode||wB(t)&&t.host||kd(t);return wB(e)?e.host:e}function pX(t){const e=Tv(t);return DC(e)?t.ownerDocument?t.ownerDocument.body:t.body:dc(e)&&r_(e)?e:pX(e)}function Y0(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=pX(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),a=zs(o);return i?e.concat(a,a.visualViewport||[],r_(o)?o:[],a.frameElement&&n?Y0(a.frameElement):[]):e.concat(o,Y0(o,[],n))}function gX(t){const e=$l(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=dc(t),i=o?t.offsetWidth:n,a=o?t.offsetHeight:r,s=eS(n)!==i||eS(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function jR(t){return ud(t)?t:t.contextElement}function qg(t){const e=jR(t);if(!dc(e))return Mf(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=gX(e);let a=(i?eS(n.width):n.width)/r,s=(i?eS(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const AFe=Mf(0);function vX(t){const e=zs(t);return!zR()||!e.visualViewport?AFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function PFe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==zs(t)?!1:e}function _p(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=jR(t);let a=Mf(1);e&&(r?ud(r)&&(a=qg(r)):a=qg(t));const s=PFe(i,n,r)?vX(i):Mf(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const f=zs(i),h=r&&ud(r)?zs(r):r;let g=f.frameElement;for(;g&&r&&h!==f;){const v=qg(g),m=g.getBoundingClientRect(),b=$l(g),w=m.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,O=m.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=w,u+=O,g=zs(g).frameElement}}return nS({width:c,height:d,x:l,y:u})}function NFe(t){let{rect:e,offsetParent:n,strategy:r}=t;const o=dc(n),i=kd(n);if(n===i)return e;let a={scrollLeft:0,scrollTop:0},s=Mf(1);const l=Mf(0);if((o||!o&&r!=="fixed")&&(($f(n)!=="body"||r_(i))&&(a=IC(n)),dc(n))){const u=_p(n);s=qg(n),l.x=u.x+n.clientLeft,l.y=u.y+n.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+l.x,y:e.y*s.y-a.scrollTop*s.y+l.y}}function MFe(t){return Array.from(t.getClientRects())}function mX(t){return _p(kd(t)).left+IC(t).scrollLeft}function $Fe(t){const e=kd(t),n=IC(t),r=t.ownerDocument.body,o=rp(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=rp(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+mX(t);const s=-n.scrollTop;return $l(r).direction==="rtl"&&(a+=rp(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function RFe(t,e){const n=zs(t),r=kd(t),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=zR();(!u||u&&e==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function DFe(t,e){const n=_p(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=dc(t)?qg(t):Mf(1),a=t.clientWidth*i.x,s=t.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:a,height:s,x:l,y:u}}function SB(t,e,n){let r;if(e==="viewport")r=RFe(t,n);else if(e==="document")r=$Fe(kd(t));else if(ud(e))r=DFe(e,n);else{const o=vX(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return nS(r)}function yX(t,e){const n=Tv(t);return n===e||!ud(n)||DC(n)?!1:$l(n).position==="fixed"||yX(n,e)}function IFe(t,e){const n=e.get(t);if(n)return n;let r=Y0(t,[],!1).filter(s=>ud(s)&&$f(s)!=="body"),o=null;const i=$l(t).position==="fixed";let a=i?Tv(t):t;for(;ud(a)&&!DC(a);){const s=$l(a),l=VR(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||r_(a)&&!l&&yX(t,a))?r=r.filter(c=>c!==a):o=s,a=Tv(a)}return e.set(t,r),r}function LFe(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const a=[...n==="clippingAncestors"?IFe(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=SB(e,c,o);return u.top=rp(d.top,u.top),u.right=Ev(d.right,u.right),u.bottom=Ev(d.bottom,u.bottom),u.left=rp(d.left,u.left),u},SB(e,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function BFe(t){return gX(t)}function FFe(t,e,n){const r=dc(e),o=kd(e),i=n==="fixed",a=_p(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=Mf(0);if(r||!r&&!i)if(($f(e)!=="body"||r_(o))&&(s=IC(e)),r){const u=_p(e,!0,i,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else o&&(l.x=mX(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function xB(t,e){return!dc(t)||$l(t).position==="fixed"?null:e?e(t):t.offsetParent}function bX(t,e){const n=zs(t);if(!dc(t))return n;let r=xB(t,e);for(;r&&TFe(r)&&$l(r).position==="static";)r=xB(r,e);return r&&($f(r)==="html"||$f(r)==="body"&&$l(r).position==="static"&&!VR(r))?n:r||kFe(t)||n}const VFe=async function(t){let{reference:e,floating:n,strategy:r}=t;const o=this.getOffsetParent||bX,i=this.getDimensions;return{reference:FFe(e,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function zFe(t){return $l(t).direction==="rtl"}const jFe={convertOffsetParentRelativeRectToViewportRelativeRect:NFe,getDocumentElement:kd,getClippingRect:LFe,getOffsetParent:bX,getElementRects:VFe,getClientRects:MFe,getDimensions:BFe,getScale:qg,isElement:ud,isRTL:zFe};function WFe(t,e){let n=null,r;const o=kd(t);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(s||e(),!d||!f)return;const h=RO(c),g=RO(o.clientWidth-(u+d)),v=RO(o.clientHeight-(c+f)),m=RO(u),w={rootMargin:-h+"px "+-g+"px "+-v+"px "+-m+"px",threshold:rp(0,Ev(1,l))||1};let O=!0;function S(x){const C=x[0].intersectionRatio;if(C!==l){if(!O)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}O=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(t)}return a(!0),i}function QFe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=jR(t),c=o||i?[...u?Y0(u):[],...Y0(e)]:[];c.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const d=u&&s?WFe(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let g,v=l?_p(t):null;l&&m();function m(){const b=_p(t);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&n(),v=b,g=requestAnimationFrame(m)}return n(),()=>{c.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const _X=(t,e,n)=>{const r=new Map,o={platform:jFe,...n},i={...o.platform,_c:r};return SFe(t,e,{...o,platform:i})},HFe=Ze({style:{type:we([String,Object,Array]),default:()=>({})}}),UFe=de({name:"ElVisuallyHidden"}),YFe=de({...UFe,props:HFe,setup(t){const e=t,n=$(()=>[e.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,o)=>(N(),Z("span",rn(r.$attrs,{style:p(n)}),[ke(r.$slots,"default")],16))}});var XFe=Ge(YFe,[["__file","visual-hidden.vue"]]);Ze({});const ZFe=t=>{if(!kn)return;if(!t)return t;const e=pi(t);return e||(Pr(t)?e:t)},GFe=({middleware:t,placement:e,strategy:n})=>{const r=z(),o=z(),i=z(),a=z(),s=z({}),l={x:i,y:a,placement:e,strategy:n,middlewareData:s},u=async()=>{if(!kn)return;const c=ZFe(r),d=pi(o);if(!c||!d)return;const f=await _X(c,d,{placement:p(e),strategy:p(n),middleware:p(t)});gv(l).forEach(h=>{l[h].value=f[h]})};return jt(()=>{ua(()=>{u()})}),{...l,update:u,referenceRef:r,contentRef:o}},qFe=({arrowRef:t,padding:e})=>({name:"arrow",options:{element:t,padding:e},fn(n){const r=p(t);return r?dX({element:r,padding:e}).fn(n):{}}}),KFe=de({name:"ElTooltipV2Content"}),JFe=de({...KFe,props:{...RR,...aX},setup(t){const e=t,{triggerRef:n,contentId:r}=gt($C),o=z(e.placement),i=z(e.strategy),a=z(null),{referenceRef:s,contentRef:l,middlewareData:u,x:c,y:d,update:f}=GFe({placement:o,strategy:i,middleware:$(()=>{const O=[fX(e.offset)];return e.showArrow&&O.push(qFe({arrowRef:a})),O})}),h=um().nextZIndex(),g=je("tooltip-v2"),v=$(()=>o.value.split("-")[0]),m=$(()=>({position:p(i),top:`${p(d)||0}px`,left:`${p(c)||0}px`,zIndex:h})),b=$(()=>{if(!e.showArrow)return{};const{arrow:O}=p(u);return{[`--${g.namespace.value}-tooltip-v2-arrow-x`]:`${O==null?void 0:O.x}px`||"",[`--${g.namespace.value}-tooltip-v2-arrow-y`]:`${O==null?void 0:O.y}px`||""}}),w=$(()=>[g.e("content"),g.is("dark",e.effect==="dark"),g.is(p(i)),e.contentClass]);return Le(a,()=>f()),Le(()=>e.placement,O=>o.value=O),jt(()=>{Le(()=>e.reference||n.value,O=>{s.value=O||void 0},{immediate:!0})}),mn(lX,{arrowRef:a}),(O,S)=>(N(),Z("div",{ref_key:"contentRef",ref:l,style:bt(p(m)),"data-tooltip-v2-root":""},[O.nowrap?ge("v-if",!0):(N(),Z("div",{key:0,"data-side":p(v),class:j(p(w))},[ke(O.$slots,"default",{contentStyle:p(m),contentClass:p(w)}),B(p(XFe),{id:p(r),role:"tooltip"},{default:V(()=>[O.ariaLabel?(N(),Z(ut,{key:0},[We(ze(O.ariaLabel),1)],64)):ke(O.$slots,"default",{key:1})]),_:3},8,["id"]),ke(O.$slots,"arrow",{style:bt(p(b)),side:p(v)})],10,["data-side"]))],4))}});var CB=Ge(JFe,[["__file","content.vue"]]);const eVe=Ze({setRef:{type:we(Function),required:!0},onlyChild:Boolean});var tVe=de({props:eVe,setup(t,{slots:e}){const n=z(),r=TC(n,o=>{o?t.setRef(o.nextElementSibling):t.setRef(null)});return()=>{var o;const[i]=((o=e.default)==null?void 0:o.call(e))||[],a=t.onlyChild?rNe(i.children):i.children;return B(ut,{ref:r},[a])}}});const nVe=de({name:"ElTooltipV2Trigger"}),rVe=de({...nVe,props:{...aX,...IR},setup(t){const e=t,{onClose:n,onOpen:r,onDelayOpen:o,triggerRef:i,contentId:a}=gt($C);let s=!1;const l=w=>{i.value=w},u=()=>{s=!1},c=po(e.onMouseEnter,o),d=po(e.onMouseLeave,n),f=po(e.onMouseDown,()=>{n(),s=!0,document.addEventListener("mouseup",u,{once:!0})}),h=po(e.onFocus,()=>{s||r()}),g=po(e.onBlur,n),v=po(e.onClick,w=>{w.detail===0&&n()}),m={blur:g,click:v,focus:h,mousedown:f,mouseenter:c,mouseleave:d},b=(w,O,S)=>{w&&Object.entries(O).forEach(([x,C])=>{w[S](x,C)})};return Le(i,(w,O)=>{b(w,m,"addEventListener"),b(O,m,"removeEventListener"),w&&w.setAttribute("aria-describedby",a.value)}),Yn(()=>{b(i.value,m,"removeEventListener"),document.removeEventListener("mouseup",u)}),(w,O)=>w.nowrap?(N(),me(p(tVe),{key:0,"set-ref":l,"only-child":""},{default:V(()=>[ke(w.$slots,"default")]),_:3})):(N(),Z("button",rn({key:1,ref_key:"triggerRef",ref:i},w.$attrs),[ke(w.$slots,"default")],16))}});var oVe=Ge(rVe,[["__file","trigger.vue"]]);const iVe=de({name:"ElTooltipV2"}),aVe=de({...iVe,props:cFe,setup(t){const n=Mo(t),r=pn(hi(n,Object.keys($R))),o=pn(hi(n,Object.keys(RR))),i=pn(hi(n,Object.keys(DR))),a=pn(hi(n,Object.keys(IR)));return(s,l)=>(N(),me(hFe,Is(ic(i)),{default:V(({open:u})=>[B(oVe,rn(a,{nowrap:""}),{default:V(()=>[ke(s.$slots,"trigger")]),_:3},16),B(p(fm),{to:s.to,disabled:!s.teleported},{default:V(()=>[s.fullTransition?(N(),me(Xo,Is(rn({key:0},s.transitionProps)),{default:V(()=>[s.alwaysOn||u?(N(),me(CB,Is(rn({key:0},o)),{arrow:V(({style:c,side:d})=>[s.showArrow?(N(),me(_B,rn({key:0},r,{style:c,side:d}),null,16,["style","side"])):ge("v-if",!0)]),default:V(()=>[ke(s.$slots,"default")]),_:3},16)):ge("v-if",!0)]),_:2},1040)):(N(),Z(ut,{key:1},[s.alwaysOn||u?(N(),me(CB,Is(rn({key:0},o)),{arrow:V(({style:c,side:d})=>[s.showArrow?(N(),me(_B,rn({key:0},r,{style:c,side:d}),null,16,["style","side"])):ge("v-if",!0)]),default:V(()=>[ke(s.$slots,"default")]),_:3},16)):ge("v-if",!0)],64))]),_:2},1032,["to","disabled"])]),_:3},16))}});var sVe=Ge(aVe,[["__file","tooltip.vue"]]);const lVe=Wt(sVe),OX="left-check-change",wX="right-check-change",Cg=Ze({data:{type:we(Array),default:()=>[]},titles:{type:we(Array),default:()=>[]},buttonTexts:{type:we(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:we(Function)},leftDefaultChecked:{type:we(Array),default:()=>[]},rightDefaultChecked:{type:we(Array),default:()=>[]},renderContent:{type:we(Function)},modelValue:{type:we(Array),default:()=>[]},format:{type:we(Object),default:()=>({})},filterable:Boolean,props:{type:we(Object),default:()=>Gr({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),IA=(t,e)=>[t,e].every(Ye)||Ye(t)&&gr(e),uVe={[ln]:(t,e,n)=>[t,n].every(Ye)&&["left","right"].includes(e),[zt]:t=>Ye(t),[OX]:IA,[wX]:IA},LA="checked-change",cVe=Ze({data:Cg.data,optionRender:{type:we(Function)},placeholder:String,title:String,filterable:Boolean,format:Cg.format,filterMethod:Cg.filterMethod,defaultChecked:Cg.leftDefaultChecked,props:Cg.props}),dVe={[LA]:IA},o_=t=>{const e={label:"label",key:"key",disabled:"disabled"};return $(()=>({...e,...t.props}))},fVe=(t,e,n)=>{const r=o_(t),o=$(()=>t.data.filter(c=>kt(t.filterMethod)?t.filterMethod(e.query,c):String(c[r.value.label]||c[r.value.key]).toLowerCase().includes(e.query.toLowerCase()))),i=$(()=>o.value.filter(c=>!c[r.value.disabled])),a=$(()=>{const c=e.checked.length,d=t.data.length,{noChecked:f,hasChecked:h}=t.format;return f&&h?c>0?h.replace(/\${checked}/g,c.toString()).replace(/\${total}/g,d.toString()):f.replace(/\${total}/g,d.toString()):`${c}/${d}`}),s=$(()=>{const c=e.checked.length;return c>0&&c{const c=i.value.map(d=>d[r.value.key]);e.allChecked=c.length>0&&c.every(d=>e.checked.includes(d))},u=c=>{e.checked=c?i.value.map(d=>d[r.value.key]):[]};return Le(()=>e.checked,(c,d)=>{if(l(),e.checkChangeByUser){const f=c.concat(d).filter(h=>!c.includes(h)||!d.includes(h));n(LA,c,f)}else n(LA,c),e.checkChangeByUser=!0}),Le(i,()=>{l()}),Le(()=>t.data,()=>{const c=[],d=o.value.map(f=>f[r.value.key]);e.checked.forEach(f=>{d.includes(f)&&c.push(f)}),e.checkChangeByUser=!1,e.checked=c}),Le(()=>t.defaultChecked,(c,d)=>{if(d&&c.length===d.length&&c.every(g=>d.includes(g)))return;const f=[],h=i.value.map(g=>g[r.value.key]);c.forEach(g=>{h.includes(g)&&f.push(g)}),e.checkChangeByUser=!1,e.checked=f},{immediate:!0}),{filteredData:o,checkableData:i,checkedSummary:a,isIndeterminate:s,updateAllChecked:l,handleAllCheckedChange:u}},hVe=de({name:"ElTransferPanel"}),pVe=de({...hVe,props:cVe,emits:dVe,setup(t,{expose:e,emit:n}){const r=t,o=Ro(),i=({option:O})=>O,{t:a}=En(),s=je("transfer"),l=pn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=o_(r),{filteredData:c,checkedSummary:d,isIndeterminate:f,handleAllCheckedChange:h}=fVe(r,l,n),g=$(()=>!$s(l.query)&&$s(c.value)),v=$(()=>!$s(o.default()[0].children)),{checked:m,allChecked:b,query:w}=Mo(l);return e({query:w}),(O,S)=>(N(),Z("div",{class:j(p(s).b("panel"))},[ee("p",{class:j(p(s).be("panel","header"))},[B(p(Xs),{modelValue:p(b),"onUpdate:modelValue":x=>Pr(b)?b.value=x:null,indeterminate:p(f),"validate-event":!1,onChange:p(h)},{default:V(()=>[We(ze(O.title)+" ",1),ee("span",null,ze(p(d)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),ee("div",{class:j([p(s).be("panel","body"),p(s).is("with-footer",p(v))])},[O.filterable?(N(),me(p(ao),{key:0,modelValue:p(w),"onUpdate:modelValue":x=>Pr(w)?w.value=x:null,class:j(p(s).be("panel","filter")),size:"default",placeholder:O.placeholder,"prefix-icon":p(T$),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):ge("v-if",!0),Yt(B(p(jH),{modelValue:p(m),"onUpdate:modelValue":x=>Pr(m)?m.value=x:null,"validate-event":!1,class:j([p(s).is("filterable",O.filterable),p(s).be("panel","list")])},{default:V(()=>[(N(!0),Z(ut,null,Xt(p(c),x=>(N(),me(p(Xs),{key:x[p(u).key],class:j(p(s).be("panel","item")),value:x[p(u).key],disabled:x[p(u).disabled],"validate-event":!1},{default:V(()=>{var C;return[B(i,{option:(C=O.optionRender)==null?void 0:C.call(O,x)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[Bn,!p(g)&&!p($s)(O.data)]]),Yt(ee("div",{class:j(p(s).be("panel","empty"))},[ke(O.$slots,"empty",{},()=>[We(ze(p(g)?p(a)("el.transfer.noMatch"):p(a)("el.transfer.noData")),1)])],2),[[Bn,p(g)||p($s)(O.data)]])],2),p(v)?(N(),Z("p",{key:0,class:j(p(s).be("panel","footer"))},[ke(O.$slots,"default")],2)):ge("v-if",!0)],2))}});var EB=Ge(pVe,[["__file","transfer-panel.vue"]]);const gVe=t=>{const e=o_(t),n=$(()=>t.data.reduce((i,a)=>(i[a[e.value.key]]=a)&&i,{})),r=$(()=>t.data.filter(i=>!t.modelValue.includes(i[e.value.key]))),o=$(()=>t.targetOrder==="original"?t.data.filter(i=>t.modelValue.includes(i[e.value.key])):t.modelValue.reduce((i,a)=>{const s=n.value[a];return s&&i.push(s),i},[]));return{sourceData:r,targetData:o}},vVe=(t,e,n)=>{const r=o_(t),o=(s,l,u)=>{n(zt,s),n(ln,s,l,u)};return{addToLeft:()=>{const s=t.modelValue.slice();e.rightChecked.forEach(l=>{const u=s.indexOf(l);u>-1&&s.splice(u,1)}),o(s,"left",e.rightChecked)},addToRight:()=>{let s=t.modelValue.slice();const l=t.data.filter(u=>{const c=u[r.value.key];return e.leftChecked.includes(c)&&!t.modelValue.includes(c)}).map(u=>u[r.value.key]);s=t.targetOrder==="unshift"?l.concat(s):s.concat(l),t.targetOrder==="original"&&(s=t.data.filter(u=>s.includes(u[r.value.key])).map(u=>u[r.value.key])),o(s,"right",e.leftChecked)}}},mVe=(t,e)=>({onSourceCheckedChange:(o,i)=>{t.leftChecked=o,i&&e(OX,o,i)},onTargetCheckedChange:(o,i)=>{t.rightChecked=o,i&&e(wX,o,i)}}),yVe=de({name:"ElTransfer"}),bVe=de({...yVe,props:Cg,emits:uVe,setup(t,{expose:e,emit:n}){const r=t,o=Ro(),{t:i}=En(),a=je("transfer"),{formItem:s}=Xi(),l=pn({leftChecked:[],rightChecked:[]}),u=o_(r),{sourceData:c,targetData:d}=gVe(r),{onSourceCheckedChange:f,onTargetCheckedChange:h}=mVe(l,n),{addToLeft:g,addToRight:v}=vVe(r,l,n),m=z(),b=z(),w=T=>{switch(T){case"left":m.value.query="";break;case"right":b.value.query="";break}},O=$(()=>r.buttonTexts.length===2),S=$(()=>r.titles[0]||i("el.transfer.titles.0")),x=$(()=>r.titles[1]||i("el.transfer.titles.1")),C=$(()=>r.filterPlaceholder||i("el.transfer.filterPlaceholder"));Le(()=>r.modelValue,()=>{var T;r.validateEvent&&((T=s==null?void 0:s.validate)==null||T.call(s,"change").catch(M=>void 0))});const E=$(()=>T=>{var M;if(r.renderContent)return r.renderContent(At,T);const k=(((M=o.default)==null?void 0:M.call(o,{option:T}))||[]).filter(P=>P.type!==vi);return k.length?k:At("span",T[u.value.label]||T[u.value.key])});return e({clearQuery:w,leftPanel:m,rightPanel:b}),(T,M)=>(N(),Z("div",{class:j(p(a).b())},[B(EB,{ref_key:"leftPanel",ref:m,data:p(c),"option-render":p(E),placeholder:p(C),title:p(S),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,"default-checked":T.leftDefaultChecked,props:r.props,onCheckedChange:p(f)},{empty:V(()=>[ke(T.$slots,"left-empty")]),default:V(()=>[ke(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),ee("div",{class:j(p(a).e("buttons"))},[B(p(Kn),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p($s)(l.rightChecked),onClick:p(g)},{default:V(()=>[B(p(Ot),null,{default:V(()=>[B(p(rd))]),_:1}),p(Sn)(T.buttonTexts[0])?ge("v-if",!0):(N(),Z("span",{key:0},ze(T.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),B(p(Kn),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p($s)(l.leftChecked),onClick:p(v)},{default:V(()=>[p(Sn)(T.buttonTexts[1])?ge("v-if",!0):(N(),Z("span",{key:0},ze(T.buttonTexts[1]),1)),B(p(Ot),null,{default:V(()=>[B(p(da))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),B(EB,{ref_key:"rightPanel",ref:b,data:p(d),"option-render":p(E),placeholder:p(C),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,title:p(x),"default-checked":T.rightDefaultChecked,props:r.props,onCheckedChange:p(h)},{empty:V(()=>[ke(T.$slots,"right-empty")]),default:V(()=>[ke(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var _Ve=Ge(bVe,[["__file","transfer.vue"]]);const OVe=Wt(_Ve),Kg="$treeNodeId",TB=function(t,e){!e||e[Kg]||Object.defineProperty(e,Kg,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},WR=(t,e)=>e==null?void 0:e[t||Kg],BA=(t,e,n)=>{const r=t.value.currentNode;n();const o=t.value.currentNode;r!==o&&e("current-change",o?o.data:null,o)},FA=t=>{let e=!0,n=!0,r=!0;for(let o=0,i=t.length;o{n.canFocus=e,VA(n.childNodes,e)})};let wVe=0;class op{constructor(e){this.isLeafByUser=void 0,this.isLeaf=void 0,this.id=wVe++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in e)Dn(e,n)&&(this[n]=e[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var e;const n=this.store;if(!n)throw new Error("[Node]store is required!");n.registerNode(this);const r=n.props;if(r&&typeof r.isLeaf!="undefined"){const a=DO(this,"isLeaf");ir(a)&&(this.isLeafByUser=a)}if(n.lazy!==!0&&this.data?(this.setData(this.data),n.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&n.lazy&&n.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Ye(this.data)||TB(this,this.data),!this.data)return;const o=n.defaultExpandedKeys,i=n.key;i&&!gr(this.key)&&o&&o.includes(this.key)&&this.expand(null,n.autoExpandParent),i&&n.currentNodeKey!==void 0&&this.key===n.currentNodeKey&&(n.currentNode=this,n.currentNode.isCurrent=!0),n.lazy&&n._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((e=this.parent)==null?void 0:e.expanded)===!0)&&(this.canFocus=!0)}setData(e){Ye(e)||TB(this,e),this.data=e,this.childNodes=[];let n;this.level===0&&Ye(this.data)?n=this.data:n=DO(this,"children")||[];for(let r=0,o=n.length;r-1)return e.childNodes[n+1]}return null}get previousSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return n>0?e.childNodes[n-1]:null}return null}contains(e,n=!0){return(this.childNodes||[]).some(r=>r===e||n&&r.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,n,r){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof op)){if(!r){const o=this.getChildren(!0);o!=null&&o.includes(e.data)||(Sn(n)||n<0?o==null||o.push(e.data):o==null||o.splice(n,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=pn(new op(e)),e instanceof op&&e.initialize()}e.level=this.level+1,Sn(n)||n<0?this.childNodes.push(e):this.childNodes.splice(n,0,e),this.updateLeafState()}insertBefore(e,n){let r;n&&(r=this.childNodes.indexOf(n)),this.insertChild(e,r)}insertAfter(e,n){let r;n&&(r=this.childNodes.indexOf(n),r!==-1&&(r+=1)),this.insertChild(e,r)}removeChild(e){const n=this.getChildren()||[],r=n.indexOf(e.data);r>-1&&n.splice(r,1);const o=this.childNodes.indexOf(e);o>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(o,1)),this.updateLeafState()}removeChildByData(e){let n=null;for(let r=0;r{if(n){let o=this.parent;for(;o&&o.level>0;)o.expanded=!0,o=o.parent}this.expanded=!0,e&&e(),VA(this.childNodes,!0)};this.shouldLoadData()?this.loadData(o=>{Ye(o)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Oy(this),r())}):r()}doCreateChildren(e,n={}){e.forEach(r=>{this.insertChild(Object.assign({data:r},n),void 0,!0)})}collapse(){this.expanded=!1,VA(this.childNodes,!1)}shouldLoadData(){return Boolean(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser!="undefined"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,n,r,o){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=FA(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const l=()=>{if(n){const u=this.childNodes;for(let f=0,h=u.length;f{l(),Oy(this)},{checked:e!==!1});return}else l()}const i=this.parent;!i||i.level===0||r||Oy(i)}getChildren(e=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let o="children";return r&&(o=r.children||"children"),Sn(n[o])&&(n[o]=null),e&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const e=this.getChildren()||[],n=this.childNodes.map(i=>i.data),r={},o=[];e.forEach((i,a)=>{const s=i[Kg];!!s&&n.findIndex(u=>(u==null?void 0:u[Kg])===s)>=0?r[s]={index:a,data:i}:o.push({index:a,data:i})}),this.store.lazy||n.forEach(i=>{r[i==null?void 0:i[Kg]]||this.removeChildByData(i)}),o.forEach(({index:i,data:a})=>{this.insertChild({data:a},i)}),this.updateLeafState()}loadData(e,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const r=i=>{this.childNodes=[],this.doCreateChildren(i,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,i)},o=()=>{this.loading=!1};this.store.load(this,r,o)}else e&&e.call(this)}eachNode(e){const n=[this];for(;n.length;){const r=n.shift();n.unshift(...r.childNodes),e(r)}}reInitChecked(){this.store.checkStrictly||Oy(this)}}class SVe{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const n in e)Dn(e,n)&&(this[n]=e[n]);this.nodesMap={}}initialize(){if(this.root=new op({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()},or)}else this._initDefaultCheckedNodes()}filter(e){const n=this.filterNodeMethod,r=this.lazy,o=async function(i){const a=i.root?i.root.childNodes:i.childNodes;for(const[s,l]of a.entries())l.visible=!!(n!=null&&n.call(l,e,l.data,l)),s%80===0&&s>0&&await wt(),await o(l);if(!i.visible&&a.length){let s=!0;s=!a.some(l=>l.visible),i.root?i.root.visible=s===!1:i.visible=s===!1}!e||i.visible&&!i.isLeaf&&(!r||i.loaded)&&i.expand()};o(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof op)return e;const n=Zt(e)?WR(this.key,e):e;return this.nodesMap[n]||null}insertBefore(e,n){var r;const o=this.getNode(n);(r=o.parent)==null||r.insertBefore({data:e},o)}insertAfter(e,n){var r;const o=this.getNode(n);(r=o.parent)==null||r.insertAfter({data:e},o)}remove(e){const n=this.getNode(e);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(e,n){const r=ts(n)?this.root:this.getNode(n);r&&r.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],n=this.nodesMap;e.forEach(r=>{const o=n[r];o&&o.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const n=this.defaultCheckedKeys||[];!gr(e.key)&&n.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const n=this.key;if(!(!e||!e.data))if(!n)this.nodesMap[e.id]=e;else{const r=e.key;gr(r)||(this.nodesMap[r]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,n=!1){const r=[],o=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(s=>{(s.checked||n&&s.indeterminate)&&(!e||e&&s.isLeaf)&&r.push(s.data),o(s)})};return o(this),r}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const e=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(i=>{i.indeterminate&&e.push(i.data),n(i)})};return n(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],n=this.nodesMap;for(const r in n)Dn(n,r)&&e.push(n[r]);return e}updateChildren(e,n){const r=this.nodesMap[e];if(!r)return;const o=r.childNodes;for(let i=o.length-1;i>=0;i--){const a=o[i];this.remove(a.data)}for(let i=0,a=n.length;il.level-u.level),i=Object.create(null),a=Object.keys(r);o.forEach(l=>l.setChecked(!1,!1));const s=l=>{l.childNodes.forEach(u=>{var c;i[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let l=0,u=o.length;l{m.isLeaf||m.setChecked(!1,!1),h(m)})};h(c)}}}setCheckedNodes(e,n=!1){const r=this.key,o={};e.forEach(i=>{o[(i||{})[r]]=!0}),this._setCheckedKeys(r,n,o)}setCheckedKeys(e,n=!1){this.defaultCheckedKeys=e;const r=this.key,o={};e.forEach(i=>{o[i]=!0}),this._setCheckedKeys(r,n,o)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(e,n,r){const o=this.getNode(e);o&&o.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,n=!0){var r;const o=e[this.key],i=this.nodesMap[o];this.setCurrentNode(i),n&&this.currentNode&&this.currentNode.level>1&&((r=this.currentNode.parent)==null||r.expand(null,!0))}setCurrentNodeKey(e,n=!0){var r;if(this.currentNodeKey=e,ts(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const o=this.getNode(e);o&&(this.setCurrentNode(o),n&&this.currentNode&&this.currentNode.level>1&&((r=this.currentNode.parent)==null||r.expand(null,!0)))}}const QR="RootTree",SX="NodeInstance",kB="TreeNodeMap",xVe=de({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=je("tree"),n=gt(SX),r=gt(QR);return()=>{const o=t.node,{data:i,store:a}=o;return t.renderContent?t.renderContent(At,{_self:n,node:o,data:i,store:a}):ke(r.ctx.slots,"default",{node:o,data:i},()=>[At(Cu,{tag:"span",truncated:!0,class:e.be("node","label")},()=>[o.label])])}}});var CVe=Ge(xVe,[["__file","tree-node-content.vue"]]);function xX(t){const e=gt(kB,null),n={treeNodeExpand:r=>{var o;t.node!==r&&((o=t.node)==null||o.collapse())},children:[]};return e&&e.children.push(n),mn(kB,n),{broadcastExpanded:r=>{if(!!t.accordion)for(const o of n.children)o.treeNodeExpand(r)}}}const CX=Symbol("dragEvents");function EVe({props:t,ctx:e,el$:n,dropIndicator$:r,store:o}){const i=je("tree"),a=z({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return mn(CX,{treeNodeDragStart:({event:c,treeNode:d})=>{if(!!c.dataTransfer){if(kt(t.allowDrag)&&!t.allowDrag(d.node))return c.preventDefault(),!1;c.dataTransfer.effectAllowed="move";try{c.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,e.emit("node-drag-start",d.node,c)}},treeNodeDragOver:({event:c,treeNode:d})=>{if(!c.dataTransfer)return;const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&ca(h.$el,i.is("drop-inner"));const g=a.value.draggingNode;if(!g||!f)return;let v=!0,m=!0,b=!0,w=!0;kt(t.allowDrop)&&(v=t.allowDrop(g.node,f.node,"prev"),w=m=t.allowDrop(g.node,f.node,"inner"),b=t.allowDrop(g.node,f.node,"next")),c.dataTransfer.dropEffect=m||v||b?"move":"none",(v||m||b)&&(h==null?void 0:h.node.id)!==f.node.id&&(h&&e.emit("node-drag-leave",g.node,h.node,c),e.emit("node-drag-enter",g.node,f.node,c)),v||m||b?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===g.node&&(b=!1),f.node.previousSibling===g.node&&(v=!1),f.node.contains(g.node,!1)&&(m=!1),(g.node===f.node||g.node.contains(f.node))&&(v=!1,m=!1,b=!1);const O=f.$el,S=O.querySelector(`.${i.be("node","content")}`).getBoundingClientRect(),x=n.value.getBoundingClientRect();let C;const E=v?m?.25:b?.45:1:-1,T=b?m?.75:v?.55:0:1;let M=-9999;const k=c.clientY-S.top;kS.height*T?C="after":m?C="inner":C="none";const P=O.querySelector(`.${i.be("node","expand-icon")}`).getBoundingClientRect(),R=r.value;C==="before"?M=P.top-x.top:C==="after"&&(M=P.bottom-x.top),R.style.top=`${M}px`,R.style.left=`${P.right-x.left}px`,C==="inner"?pl(O,i.is("drop-inner")):ca(O,i.is("drop-inner")),a.value.showDropIndicator=C==="before"||C==="after",a.value.allowDrop=a.value.showDropIndicator||w,a.value.dropType=C,e.emit("node-drag-over",g.node,f.node,c)},treeNodeDragEnd:c=>{var d,f;const{draggingNode:h,dropType:g,dropNode:v}=a.value;if(c.preventDefault(),c.dataTransfer&&(c.dataTransfer.dropEffect="move"),(h==null?void 0:h.node.data)&&v){const m={data:h.node.data};g!=="none"&&h.node.remove(),g==="before"?(d=v.node.parent)==null||d.insertBefore(m,v.node):g==="after"?(f=v.node.parent)==null||f.insertAfter(m,v.node):g==="inner"&&v.node.insertChild(m),g!=="none"&&(o.value.registerNode(m),o.value.key&&h.node.eachNode(b=>{var w;(w=o.value.nodesMap[b.data[o.value.key]])==null||w.setChecked(b.checked,!o.value.checkStrictly)})),ca(v.$el,i.is("drop-inner")),e.emit("node-drag-end",h.node,v.node,g,c),g!=="none"&&e.emit("node-drop",h.node,v.node,g,c)}h&&!v&&e.emit("node-drag-end",h.node,null,g,c),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const TVe=de({name:"ElTreeNode",components:{ElCollapseTransition:CC,ElCheckbox:Xs,NodeContent:CVe,ElIcon:Ot,Loading:lc},props:{node:{type:op,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(t,e){const n=je("tree"),{broadcastExpanded:r}=xX(t),o=gt(QR),i=z(!1),a=z(!1),s=z(),l=z(),u=z(),c=gt(CX),d=Kt();mn(SX,d),t.node.expanded&&(i.value=!0,a.value=!0);const f=o.props.props.children||"children";Le(()=>{var M;const k=(M=t.node.data)==null?void 0:M[f];return k&&[...k]},()=>{t.node.updateChildren()}),Le(()=>t.node.indeterminate,M=>{v(t.node.checked,M)}),Le(()=>t.node.checked,M=>{v(M,t.node.indeterminate)}),Le(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),Le(()=>t.node.expanded,M=>{wt(()=>i.value=M),M&&(a.value=!0)});const h=M=>WR(o.props.nodeKey,M.data),g=M=>{const k=t.props.class;if(!k)return{};let P;if(kt(k)){const{data:R}=M;P=k(R,M)}else P=k;return St(P)?{[P]:!0}:P},v=(M,k)=>{(s.value!==M||l.value!==k)&&o.ctx.emit("check-change",t.node.data,M,k),s.value=M,l.value=k},m=M=>{BA(o.store,o.ctx.emit,()=>{var k;if((k=o==null?void 0:o.props)==null?void 0:k.nodeKey){const R=h(t.node);o.store.value.setCurrentNodeKey(R)}else o.store.value.setCurrentNode(t.node)}),o.currentNode.value=t.node,o.props.expandOnClickNode&&w(),(o.props.checkOnClickNode||t.node.isLeaf&&o.props.checkOnClickLeaf&&t.showCheckbox)&&!t.node.disabled&&O(!t.node.checked),o.ctx.emit("node-click",t.node.data,t.node,d,M)},b=M=>{var k;(k=o.instance.vnode.props)!=null&&k.onNodeContextmenu&&(M.stopPropagation(),M.preventDefault()),o.ctx.emit("node-contextmenu",M,t.node.data,t.node,d)},w=()=>{t.node.isLeaf||(i.value?(o.ctx.emit("node-collapse",t.node.data,t.node,d),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,d)}))},O=M=>{t.node.setChecked(M,!(o!=null&&o.props.checkStrictly)),wt(()=>{const k=o.store.value;o.ctx.emit("check",t.node.data,{checkedNodes:k.getCheckedNodes(),checkedKeys:k.getCheckedKeys(),halfCheckedNodes:k.getHalfCheckedNodes(),halfCheckedKeys:k.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:o,expanded:i,childNodeRendered:a,oldChecked:s,oldIndeterminate:l,getNodeKey:h,getNodeClass:g,handleSelectChange:v,handleClick:m,handleContextMenu:b,handleExpandIconClick:w,handleCheckChange:O,handleChildNodeExpand:(M,k,P)=>{r(k),o.ctx.emit("node-expand",M,k,P)},handleDragStart:M=>{!o.props.draggable||c.treeNodeDragStart({event:M,treeNode:t})},handleDragOver:M=>{M.preventDefault(),o.props.draggable&&c.treeNodeDragOver({event:M,treeNode:{$el:u.value,node:t.node}})},handleDrop:M=>{M.preventDefault()},handleDragEnd:M=>{!o.props.draggable||c.treeNodeDragEnd(M)},CaretRight:FQ}}});function kVe(t,e,n,r,o,i){const a=Nn("el-icon"),s=Nn("el-checkbox"),l=Nn("loading"),u=Nn("node-content"),c=Nn("el-tree-node"),d=Nn("el-collapse-transition");return Yt((N(),Z("div",{ref:"node$",class:j([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:Rt(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:Rt(t.handleDragStart,["stop"]),onDragover:Rt(t.handleDragOver,["stop"]),onDragend:Rt(t.handleDragEnd,["stop"]),onDrop:Rt(t.handleDrop,["stop"])},[ee("div",{class:j(t.ns.be("node","content")),style:bt({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(N(),me(a,{key:0,class:j([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:Rt(t.handleExpandIconClick,["stop"])},{default:V(()=>[(N(),me(Jt(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):ge("v-if",!0),t.showCheckbox?(N(),me(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:Rt(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):ge("v-if",!0),t.node.loading?(N(),me(a,{key:2,class:j([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:V(()=>[B(l)]),_:1},8,["class"])):ge("v-if",!0),B(u,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),B(d,null,{default:V(()=>[!t.renderAfterExpand||t.childNodeRendered?Yt((N(),Z("div",{key:0,class:j(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded,onClick:Rt(()=>{},["stop"])},[(N(!0),Z(ut,null,Xt(t.node.childNodes,f=>(N(),me(c,{key:t.getNodeKey(f),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:f,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded","onClick"])),[[Bn,t.expanded]]):ge("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[Bn,t.node.visible]])}var AVe=Ge(TVe,[["render",kVe],["__file","tree-node.vue"]]);function PVe({el$:t},e){const n=je("tree");jt(()=>{i()}),_u(()=>{Array.from(t.value.querySelectorAll("input[type=checkbox]")).forEach(s=>{s.setAttribute("tabindex","-1")})});function r(a,s){var l,u;const c=e.value.getNode(a[s].dataset.key);return c.canFocus&&c.visible&&(((l=c.parent)==null?void 0:l.expanded)||((u=c.parent)==null?void 0:u.level)===0)}pr(t,"keydown",a=>{const s=a.target;if(!s.className.includes(n.b("node")))return;const l=a.code,u=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),c=u.indexOf(s);let d;if([st.up,st.down].includes(l)){if(a.preventDefault(),l===st.up){d=c===-1?0:c!==0?c-1:u.length-1;const h=d;for(;!r(u,d);){if(d--,d===h){d=-1;break}d<0&&(d=u.length-1)}}else{d=c===-1?0:c=u.length&&(d=0)}}d!==-1&&u[d].focus()}[st.left,st.right].includes(l)&&(a.preventDefault(),s.click());const f=s.querySelector('[type="checkbox"]');[st.enter,st.numpadEnter,st.space].includes(l)&&f&&(a.preventDefault(),f.click())});const i=()=>{var a;if(!t.value)return;const s=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(t.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")});const u=t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(u.length){u[0].setAttribute("tabindex","0");return}(a=s[0])==null||a.setAttribute("tabindex","0")}}const NVe=de({name:"ElTree",components:{ElTreeNode:AVe},props:{data:{type:we(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:{type:we(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:we(Function)},allowDrop:{type:we(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:cr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:n}=En(),r=je("tree"),o=gt(pm,null),i=z(new SVe({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const a=z(i.value.root),s=z(null),l=z(null),u=z(null),{broadcastExpanded:c}=xX(t),{dragState:d}=EVe({props:t,ctx:e,el$:l,dropIndicator$:u,store:i});PVe({el$:l},i);const f=$(()=>{const{childNodes:L}=a.value,H=o?o.hasFilteredOptions!==0:!1;return(!L||L.length===0||L.every(({visible:re})=>!re))&&!H});Le(()=>t.currentNodeKey,L=>{i.value.setCurrentNodeKey(L!=null?L:null)}),Le(()=>t.defaultCheckedKeys,(L,H)=>{Oo(L,H)||i.value.setDefaultCheckedKey(L!=null?L:[])}),Le(()=>t.defaultExpandedKeys,L=>{i.value.setDefaultExpandedKeys(L!=null?L:[])}),Le(()=>t.data,L=>{i.value.setData(L)},{deep:!0}),Le(()=>t.checkStrictly,L=>{i.value.checkStrictly=L});const h=L=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(L)},g=L=>WR(t.nodeKey,L.data),v=L=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const H=i.value.getNode(L);if(!H)return[];const re=[H.data];let U=H.parent;for(;U&&U!==a.value;)re.push(U.data),U=U.parent;return re.reverse()},m=(L,H)=>i.value.getCheckedNodes(L,H),b=L=>i.value.getCheckedKeys(L),w=()=>{const L=i.value.getCurrentNode();return L?L.data:null},O=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const L=w();return L?L[t.nodeKey]:null},S=(L,H)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(L,H)},x=(L,H)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(L,H)},C=(L,H,re)=>{i.value.setChecked(L,H,re)},E=()=>i.value.getHalfCheckedNodes(),T=()=>i.value.getHalfCheckedKeys(),M=(L,H=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");BA(i,e.emit,()=>{c(L),i.value.setUserCurrentNode(L,H)})},k=(L,H=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");BA(i,e.emit,()=>{c(),i.value.setCurrentNodeKey(L!=null?L:null,H)})},P=L=>i.value.getNode(L),R=L=>{i.value.remove(L)},D=(L,H)=>{i.value.append(L,H)},F=(L,H)=>{i.value.insertBefore(L,H)},W=(L,H)=>{i.value.insertAfter(L,H)},I=(L,H,re)=>{c(H),e.emit("node-expand",L,H,re)},Q=(L,H)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(L,H)};return mn(QR,{ctx:e,props:t,store:i,root:a,currentNode:s,instance:Kt()}),mn(uc,void 0),{ns:r,store:i,root:a,currentNode:s,dragState:d,el$:l,dropIndicator$:u,isEmpty:f,filter:h,getNodeKey:g,getNodePath:v,getCheckedNodes:m,getCheckedKeys:b,getCurrentNode:w,getCurrentKey:O,setCheckedNodes:S,setCheckedKeys:x,setChecked:C,getHalfCheckedNodes:E,getHalfCheckedKeys:T,setCurrentNode:M,setCurrentKey:k,t:n,getNode:P,remove:R,append:D,insertBefore:F,insertAfter:W,handleNodeExpand:I,updateKeyChildren:Q}}});function MVe(t,e,n,r,o,i){const a=Nn("el-tree-node");return N(),Z("div",{ref:"el$",class:j([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(N(!0),Z(ut,null,Xt(t.root.childNodes,s=>(N(),me(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(N(),Z("div",{key:0,class:j(t.ns.e("empty-block"))},[ke(t.$slots,"empty",{},()=>{var s;return[ee("span",{class:j(t.ns.e("empty-text"))},ze((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):ge("v-if",!0),Yt(ee("div",{ref:"dropIndicator$",class:j(t.ns.e("drop-indicator"))},null,2),[[Bn,t.dragState.showDropIndicator]])],2)}var $Ve=Ge(NVe,[["render",MVe],["__file","tree.vue"]]);const X0=Wt($Ve),RVe=(t,{attrs:e,emit:n},{select:r,tree:o,key:i})=>{const a=je("tree-select");return Le(()=>t.data,()=>{t.filterable&&wt(()=>{var l,u;(u=o.value)==null||u.filter((l=r.value)==null?void 0:l.states.inputValue)})},{flush:"post"}),{...hi(Mo(t),Object.keys(Ml.props)),...e,class:$(()=>e.class),style:$(()=>e.style),"onUpdate:modelValue":l=>n(zt,l),valueKey:i,popperClass:$(()=>{const l=[a.e("popper")];return t.popperClass&&l.push(t.popperClass),l.join(" ")}),filterMethod:(l="")=>{var u;t.filterMethod?t.filterMethod(l):t.remoteMethod?t.remoteMethod(l):(u=o.value)==null||u.filter(l)}}},DVe=de({extends:ld,setup(t,e){const n=ld.setup(t,e);delete n.selectOptionClick;const r=Kt().proxy;return wt(()=>{n.select.states.cachedOptions.get(r.value)||n.select.onOptionCreate(r)}),Le(()=>e.attrs.visible,o=>{wt(()=>{n.states.visible=o})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function zA(t){return t||t===0}function HR(t){return Ye(t)&&t.length}function ug(t){return Ye(t)?t:zA(t)?[t]:[]}function K1(t,e,n,r,o){for(let i=0;i{Le([()=>t.modelValue,i],()=>{t.showCheckbox&&wt(()=>{const f=i.value;f&&!Oo(f.getCheckedKeys(),ug(t.modelValue))&&f.setCheckedKeys(ug(t.modelValue))})},{immediate:!0,deep:!0});const s=$(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),l=(f,h)=>{var g;const v=s.value[f];return kt(v)?v(h,(g=i.value)==null?void 0:g.getNode(l("value",h))):h[v]},u=ug(t.modelValue).map(f=>K1(t.data||[],h=>l("value",h)===f,h=>l("children",h),(h,g,v,m)=>m&&l("value",m))).filter(f=>zA(f)),c=$(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const f=[];return J1(t.data.concat(t.cacheData),h=>{const g=l("value",h);f.push({value:g,currentLabel:l("label",h),isDisabled:l("disabled",h)})},h=>l("children",h)),f}),d=()=>{var f;return(f=i.value)==null?void 0:f.getCheckedKeys().filter(h=>{var g;const v=(g=i.value)==null?void 0:g.getNode(h);return!gr(v)&&$s(v.childNodes)})};return{...hi(Mo(t),Object.keys(X0.props)),...e,nodeKey:a,expandOnClickNode:$(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:$(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(u):u),renderContent:(f,{node:h,data:g,store:v})=>f(DVe,{value:l("value",g),label:l("label",g),disabled:l("disabled",g),visible:h.visible},t.renderContent?()=>t.renderContent(f,{node:h,data:g,store:v}):n.default?()=>n.default({node:h,data:g,store:v}):void 0),filterNodeMethod:(f,h,g)=>t.filterNodeMethod?t.filterNodeMethod(f,h,g):f?new RegExp(gR(f),"i").test(l("label",h)||""):!0,onNodeClick:(f,h,g)=>{var v,m,b,w;if((v=e.onNodeClick)==null||v.call(e,f,h,g),!(t.showCheckbox&&t.checkOnClickNode)){if(!t.showCheckbox&&(t.checkStrictly||h.isLeaf)){if(!l("disabled",f)){const O=(m=o.value)==null?void 0:m.states.options.get(l("value",f));(b=o.value)==null||b.handleOptionSelect(O)}}else t.expandOnClickNode&&g.proxy.handleExpandIconClick();(w=o.value)==null||w.focus()}},onCheck:(f,h)=>{var g;if(!t.showCheckbox)return;const v=l("value",f),m={};J1([i.value.store.root],S=>m[S.key]=S,S=>S.childNodes);const b=h.checkedKeys,w=t.multiple?ug(t.modelValue).filter(S=>!(S in m)&&!b.includes(S)):[],O=w.concat(b);if(t.checkStrictly)r(zt,t.multiple?O:O.includes(v)?v:void 0);else if(t.multiple){const S=d();r(zt,w.concat(S))}else{const S=K1([f],E=>!HR(l("children",E))&&!l("disabled",E),E=>l("children",E)),x=S?l("value",S):void 0,C=zA(t.modelValue)&&!!K1([f],E=>l("value",E)===t.modelValue,E=>l("children",E));r(zt,x===t.modelValue||C?void 0:x)}wt(()=>{var S;const x=ug(t.modelValue);i.value.setCheckedKeys(x),(S=e.onCheck)==null||S.call(e,f,{checkedKeys:i.value.getCheckedKeys(),checkedNodes:i.value.getCheckedNodes(),halfCheckedKeys:i.value.getHalfCheckedKeys(),halfCheckedNodes:i.value.getHalfCheckedNodes()})}),(g=o.value)==null||g.focus()},onNodeExpand:(f,h,g)=>{var v;(v=e.onNodeExpand)==null||v.call(e,f,h,g),wt(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&h.checked){const m={},b=i.value.getCheckedKeys();J1([i.value.store.root],S=>m[S.key]=S,S=>S.childNodes);const w=ug(t.modelValue).filter(S=>!(S in m)&&!b.includes(S)),O=d();r(zt,w.concat(O))}})},cacheOptions:c}};var LVe=de({props:{data:{type:Array,default:()=>[]}},setup(t){const e=gt(pm);return Le(()=>t.data,()=>{var n;t.data.forEach(o=>{e.states.cachedOptions.has(o.value)||e.states.cachedOptions.set(o.value,o)});const r=((n=e.selectRef)==null?void 0:n.querySelectorAll("input"))||[];kn&&!Array.from(r).includes(document.activeElement)&&e.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const BVe=de({name:"ElTreeSelect",inheritAttrs:!1,props:{...Ml.props,...X0.props,cacheData:{type:Array,default:()=>[]}},setup(t,e){const{slots:n,expose:r}=e,o=z(),i=z(),a=$(()=>t.nodeKey||t.valueKey||"value"),s=RVe(t,e,{select:o,tree:i,key:a}),{cacheOptions:l,...u}=IVe(t,e,{select:o,tree:i,key:a}),c=pn({});return r(c),jt(()=>{Object.assign(c,{...hi(i.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...hi(o.value,["focus","blur","selectedLabel"])})}),()=>At(Ml,pn({...s,ref:d=>o.value=d}),{...n,default:()=>[At(LVe,{data:l.value}),At(X0,pn({...u,ref:d=>i.value=d}))]})}});var FVe=Ge(BVe,[["__file","tree-select.vue"]]);const VVe=Wt(FVe),UR=Symbol(),zVe={key:-1,level:-1,data:{}};var wy=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t.CLASS="",t))(wy||{}),jA=(t=>(t.ADD="add",t.DELETE="delete",t))(jA||{});const EX={type:Number,default:26},jVe=Ze({data:{type:we(Array),default:()=>Gr([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:we(Object),default:()=>Gr({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:we(Array),default:()=>Gr([])},checkStrictly:Boolean,defaultExpandedKeys:{type:we(Array),default:()=>Gr([])},indent:{type:Number,default:16},itemSize:EX,icon:{type:cr},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:we([String,Number])},accordion:Boolean,filterMethod:{type:we(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),WVe=Ze({node:{type:we(Object),default:()=>Gr(zVe)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:EX}),QVe=Ze({node:{type:we(Object),required:!0}}),TX="node-click",kX="node-drop",AX="node-expand",PX="node-collapse",NX="current-change",MX="check",$X="check-change",RX="node-contextmenu",HVe={[TX]:(t,e,n)=>t&&e&&n,[kX]:(t,e,n)=>t&&e&&n,[AX]:(t,e)=>t&&e,[PX]:(t,e)=>t&&e,[NX]:(t,e)=>t&&e,[MX]:(t,e)=>t&&e,[$X]:(t,e)=>t&&ir(e),[RX]:(t,e,n)=>t&&e&&n},UVe={click:(t,e)=>!!(t&&e),drop:(t,e)=>!!(t&&e),toggle:t=>!!t,check:(t,e)=>t&&ir(e)};function YVe(t,e){const n=z(new Set),r=z(new Set),{emit:o}=Kt();Le([()=>e.value,()=>t.defaultCheckedKeys],()=>wt(()=>{w(t.defaultCheckedKeys)}),{immediate:!0});const i=()=>{if(!e.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:O,maxLevel:S}=e.value,x=n.value,C=new Set;for(let E=S-1;E>=1;--E){const T=O.get(E);!T||T.forEach(M=>{const k=M.children;if(k){let P=!0,R=!1;for(const D of k){const F=D.key;if(x.has(F))R=!0;else if(C.has(F)){P=!1,R=!0;break}else P=!1}P?x.add(M.key):R?(C.add(M.key),x.delete(M.key)):(x.delete(M.key),C.delete(M.key))}})}r.value=C},a=O=>n.value.has(O.key),s=O=>r.value.has(O.key),l=(O,S,x=!0,C=!0)=>{const E=n.value,T=(M,k)=>{E[k?jA.ADD:jA.DELETE](M.key);const P=M.children;!t.checkStrictly&&P&&P.forEach(R=>{R.disabled||T(R,k)})};T(O,S),C&&i(),x&&u(O,S)},u=(O,S)=>{const{checkedNodes:x,checkedKeys:C}=g(),{halfCheckedNodes:E,halfCheckedKeys:T}=v();o(MX,O.data,{checkedKeys:C,checkedNodes:x,halfCheckedKeys:T,halfCheckedNodes:E}),o($X,O.data,S)};function c(O=!1){return g(O).checkedKeys}function d(O=!1){return g(O).checkedNodes}function f(){return v().halfCheckedKeys}function h(){return v().halfCheckedNodes}function g(O=!1){const S=[],x=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:C}=e.value;n.value.forEach(E=>{const T=C.get(E);T&&(!O||O&&T.isLeaf)&&(x.push(E),S.push(T.data))})}return{checkedKeys:x,checkedNodes:S}}function v(){const O=[],S=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:x}=e.value;r.value.forEach(C=>{const E=x.get(C);E&&(S.push(C),O.push(E.data))})}return{halfCheckedNodes:O,halfCheckedKeys:S}}function m(O){n.value.clear(),r.value.clear(),wt(()=>{w(O)})}function b(O,S){if((e==null?void 0:e.value)&&t.showCheckbox){const x=e.value.treeNodeMap.get(O);x&&l(x,S,!1)}}function w(O){if(e!=null&&e.value){const{treeNodeMap:S}=e.value;if(t.showCheckbox&&S&&(O==null?void 0:O.length)>0){for(const x of O){const C=S.get(x);C&&!a(C)&&l(C,!0,!1,!1)}i()}}}return{updateCheckedKeys:i,toggleCheckbox:l,isChecked:a,isIndeterminate:s,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:b,setCheckedKeys:m}}function XVe(t,e){const n=z(new Set([])),r=z(new Set([])),o=$(()=>kt(t.filterMethod));function i(s){var l;if(!o.value)return;const u=new Set,c=r.value,d=n.value,f=[],h=((l=e.value)==null?void 0:l.treeNodes)||[],g=t.filterMethod;d.clear();function v(m){m.forEach(b=>{f.push(b),g!=null&&g(s,b.data,b)?f.forEach(O=>{u.add(O.key)}):b.isLeaf&&d.add(b.key);const w=b.children;if(w&&v(w),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(w){let O=!0;for(const S of w)if(!d.has(S.key)){O=!1;break}O?c.add(b.key):c.delete(b.key)}}f.pop()})}return v(h),u}function a(s){return r.value.has(s.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:n,doFilter:i,isForceHiddenExpandIcon:a}}function ZVe(t,e){const n=z(new Set),r=z(),o=wr(),i=z(),{isIndeterminate:a,isChecked:s,toggleCheckbox:l,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:g}=YVe(t,o),{doFilter:v,hiddenNodeKeySet:m,isForceHiddenExpandIcon:b}=XVe(t,o),w=$(()=>{var ue;return((ue=t.props)==null?void 0:ue.value)||wy.KEY}),O=$(()=>{var ue;return((ue=t.props)==null?void 0:ue.children)||wy.CHILDREN}),S=$(()=>{var ue;return((ue=t.props)==null?void 0:ue.disabled)||wy.DISABLED}),x=$(()=>{var ue;return((ue=t.props)==null?void 0:ue.label)||wy.LABEL}),C=$(()=>{var ue;const G=n.value,ve=m.value,q=[],Ie=((ue=o.value)==null?void 0:ue.treeNodes)||[],Ee=[];for(let Oe=Ie.length-1;Oe>=0;--Oe)Ee.push(Ie[Oe]);for(;Ee.length;){const Oe=Ee.pop();if(!ve.has(Oe.key)&&(q.push(Oe),Oe.children&&G.has(Oe.key)))for(let se=Oe.children.length-1;se>=0;--se)Ee.push(Oe.children[se])}return q}),E=$(()=>C.value.length>0);function T(ue){const G=new Map,ve=new Map;let q=1;function Ie(Oe,se=1,X=void 0){var oe;const ce=[];for(const Ae of Oe){const ye=P(Ae),Te={level:se,key:ye,data:Ae};Te.label=D(Ae),Te.parent=X;const Me=k(Ae);Te.disabled=R(Ae),Te.isLeaf=!Me||Me.length===0,Te.expanded=n.value.has(ye),Me&&Me.length&&(Te.children=Ie(Me,se+1,Te)),ce.push(Te),G.set(ye,Te),ve.has(se)||ve.set(se,[]),(oe=ve.get(se))==null||oe.push(Te)}return se>q&&(q=se),ce}const Ee=Ie(ue);return{treeNodeMap:G,levelTreeNodeMap:ve,maxLevel:q,treeNodes:Ee}}function M(ue){const G=v(ue);G&&(n.value=G)}function k(ue){return ue[O.value]}function P(ue){return ue?ue[w.value]:""}function R(ue){return ue[S.value]}function D(ue){return ue[x.value]}function F(ue){n.value.has(ue.key)?U(ue):re(ue)}function W(ue){const G=new Set,ve=o.value.treeNodeMap;ue.forEach(q=>{let Ie=ve.get(q);for(;Ie&&!G.has(Ie.key);)G.add(Ie.key),Ie.expanded=!0,Ie=Ie.parent}),n.value=G}function I(ue,G){e(TX,ue.data,ue,G),L(ue),t.expandOnClickNode&&F(ue),t.showCheckbox&&(t.checkOnClickNode||ue.isLeaf&&t.checkOnClickLeaf)&&!ue.disabled&&l(ue,!s(ue),!0)}function Q(ue,G){e(kX,ue.data,ue,G)}function L(ue){ie(ue)||(r.value=ue.key,e(NX,ue.data,ue))}function H(ue,G){l(ue,G)}function re(ue){const G=n.value;if(o.value&&t.accordion){const{treeNodeMap:ve}=o.value;G.forEach(q=>{const Ie=ve.get(q);ue&&ue.level===(Ie==null?void 0:Ie.level)&&(G.delete(q),Ie.expanded=!1)})}G.add(ue.key),ue.expanded=!0,e(AX,ue.data,ue)}function U(ue){n.value.delete(ue.key),ue.expanded=!1,e(PX,ue.data,ue)}function J(ue){return!!ue.disabled}function ie(ue){const G=r.value;return G!==void 0&&G===ue.key}function te(){var ue,G;if(!!r.value)return(G=(ue=o.value)==null?void 0:ue.treeNodeMap.get(r.value))==null?void 0:G.data}function he(){return r.value}function K(ue){r.value=ue}function ne(ue){o.value=T(ue)}function fe(ue){var G;const ve=Zt(ue)?P(ue):ue;return(G=o.value)==null?void 0:G.treeNodeMap.get(ve)}function Ne(ue,G="auto"){const ve=fe(ue);ve&&i.value&&i.value.scrollToItem(C.value.indexOf(ve),G)}function $e(ue){var G;(G=i.value)==null||G.scrollTo(ue)}return Le(()=>t.currentNodeKey,ue=>{r.value=ue},{immediate:!0}),Le(()=>t.defaultExpandedKeys,ue=>{n.value=new Set(ue)},{immediate:!0}),Le(()=>t.data,ue=>{ne(ue)},{immediate:!0}),{tree:o,flattenTree:C,isNotEmpty:E,listRef:i,getKey:P,getChildren:k,toggleExpand:F,toggleCheckbox:l,isChecked:s,isIndeterminate:a,isDisabled:J,isCurrent:ie,isForceHiddenExpandIcon:b,handleNodeClick:I,handleNodeDrop:Q,handleNodeCheck:H,getCurrentNode:te,getCurrentKey:he,setCurrentKey:K,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:g,filter:M,setData:ne,getNode:fe,expandNode:re,collapseNode:U,setExpandedKeys:W,scrollToNode:Ne,scrollTo:$e}}var GVe=de({name:"ElTreeNodeContent",props:QVe,setup(t){const e=gt(UR),n=je("tree");return()=>{const r=t.node,{data:o}=r;return e!=null&&e.ctx.slots.default?e.ctx.slots.default({node:r,data:o}):At(Cu,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[r==null?void 0:r.label])}}});const qVe=de({name:"ElTreeNode"}),KVe=de({...qVe,props:WVe,emits:UVe,setup(t,{emit:e}){const n=t,r=gt(UR),o=je("tree"),i=$(()=>{var h;return(h=r==null?void 0:r.props.indent)!=null?h:16}),a=$(()=>{var h;return(h=r==null?void 0:r.props.icon)!=null?h:FQ}),s=h=>{const g=r==null?void 0:r.props.props.class;if(!g)return{};let v;if(kt(g)){const{data:m}=h;v=g(m,h)}else v=g;return St(v)?{[v]:!0}:v},l=h=>{e("click",n.node,h)},u=h=>{e("drop",n.node,h)},c=()=>{e("toggle",n.node)},d=h=>{e("check",n.node,h)},f=h=>{var g,v,m,b;(m=(v=(g=r==null?void 0:r.instance)==null?void 0:g.vnode)==null?void 0:v.props)!=null&&m.onNodeContextmenu&&(h.stopPropagation(),h.preventDefault()),r==null||r.ctx.emit(RX,h,(b=n.node)==null?void 0:b.data,n.node)};return(h,g)=>{var v,m,b;return N(),Z("div",{ref:"node$",class:j([p(o).b("node"),p(o).is("expanded",h.expanded),p(o).is("current",h.current),p(o).is("focusable",!h.disabled),p(o).is("checked",!h.disabled&&h.checked),s(h.node)]),role:"treeitem",tabindex:"-1","aria-expanded":h.expanded,"aria-disabled":h.disabled,"aria-checked":h.checked,"data-key":(v=h.node)==null?void 0:v.key,onClick:Rt(l,["stop"]),onContextmenu:f,onDragover:Rt(()=>{},["prevent"]),onDragenter:Rt(()=>{},["prevent"]),onDrop:Rt(u,["stop"])},[ee("div",{class:j(p(o).be("node","content")),style:bt({paddingLeft:`${(h.node.level-1)*p(i)}px`,height:h.itemSize+"px"})},[p(a)?(N(),me(p(Ot),{key:0,class:j([p(o).is("leaf",!!((m=h.node)!=null&&m.isLeaf)),p(o).is("hidden",h.hiddenExpandIcon),{expanded:!((b=h.node)!=null&&b.isLeaf)&&h.expanded},p(o).be("node","expand-icon")]),onClick:Rt(c,["stop"])},{default:V(()=>[(N(),me(Jt(p(a))))]),_:1},8,["class","onClick"])):ge("v-if",!0),h.showCheckbox?(N(),me(p(Xs),{key:1,"model-value":h.checked,indeterminate:h.indeterminate,disabled:h.disabled,onChange:d,onClick:Rt(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):ge("v-if",!0),B(p(GVe),{node:{...h.node,expanded:h.expanded}},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var JVe=Ge(KVe,[["__file","tree-node.vue"]]);const e9e=de({name:"ElTreeV2"}),t9e=de({...e9e,props:jVe,emits:HVe,setup(t,{expose:e,emit:n}){const r=t,o=Ro(),i=$(()=>r.itemSize);mn(UR,{ctx:{emit:n,slots:o},props:r,instance:Kt()}),mn(uc,void 0);const{t:a}=En(),s=je("tree"),{flattenTree:l,isNotEmpty:u,listRef:c,toggleExpand:d,isIndeterminate:f,isChecked:h,isDisabled:g,isCurrent:v,isForceHiddenExpandIcon:m,handleNodeClick:b,handleNodeDrop:w,handleNodeCheck:O,toggleCheckbox:S,getCurrentNode:x,getCurrentKey:C,setCurrentKey:E,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:k,getHalfCheckedNodes:P,setChecked:R,setCheckedKeys:D,filter:F,setData:W,getNode:I,expandNode:Q,collapseNode:L,setExpandedKeys:H,scrollToNode:re,scrollTo:U}=ZVe(r,n);return e({toggleCheckbox:S,getCurrentNode:x,getCurrentKey:C,setCurrentKey:E,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:k,getHalfCheckedNodes:P,setChecked:R,setCheckedKeys:D,filter:F,setData:W,getNode:I,expandNode:Q,collapseNode:L,setExpandedKeys:H,scrollToNode:re,scrollTo:U}),(J,ie)=>(N(),Z("div",{class:j([p(s).b(),{[p(s).m("highlight-current")]:J.highlightCurrent}]),role:"tree"},[p(u)?(N(),me(p(pY),{key:0,ref_key:"listRef",ref:c,"class-name":p(s).b("virtual-list"),data:p(l),total:p(l).length,height:J.height,"item-size":p(i),"perf-mode":J.perfMode,"scrollbar-always-on":J.scrollbarAlwaysOn},{default:V(({data:te,index:he,style:K})=>[(N(),me(JVe,{key:te[he].key,style:bt(K),node:te[he],expanded:te[he].expanded,"show-checkbox":J.showCheckbox,checked:p(h)(te[he]),indeterminate:p(f)(te[he]),"item-size":p(i),disabled:p(g)(te[he]),current:p(v)(te[he]),"hidden-expand-icon":p(m)(te[he]),onClick:p(b),onToggle:p(d),onCheck:p(O),onDrop:p(w)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(N(),Z("div",{key:1,class:j(p(s).e("empty-block"))},[ke(J.$slots,"empty",{},()=>{var te;return[ee("span",{class:j(p(s).e("empty-text"))},ze((te=J.emptyText)!=null?te:p(a)("el.tree.emptyText")),3)]})],2))],2))}});var n9e=Ge(t9e,[["__file","tree.vue"]]);const r9e=Wt(n9e),DX=Symbol("uploadContextKey"),o9e="ElUpload";class i9e extends Error{constructor(e,n,r,o){super(e),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=o}}function AB(t,e,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${e.method} ${t} ${n.status}`,new i9e(r,n.status,e.method,t)}function a9e(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const s9e=t=>{typeof XMLHttpRequest=="undefined"&&Ao(o9e,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",i=>{const a=i;a.percent=i.total>0?i.loaded/i.total*100:0,t.onProgress(a)});const r=new FormData;if(t.data)for(const[i,a]of Object.entries(t.data))Ye(a)&&a.length?r.append(i,...a):r.append(i,a);r.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(AB(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(AB(n,t,e));t.onSuccess(a9e(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const o=t.headers||{};if(o instanceof Headers)o.forEach((i,a)=>e.setRequestHeader(a,i));else for(const[i,a]of Object.entries(o))gr(a)||e.setRequestHeader(i,String(a));return e.send(r),e},IX=["text","picture","picture-card"];let l9e=1;const WA=()=>Date.now()+l9e++,LX=Ze({action:{type:String,default:"#"},headers:{type:we(Object)},method:{type:String,default:"post"},data:{type:we([Object,Function,Promise]),default:()=>Gr({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:we(Array),default:()=>Gr([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:IX,default:"text"},httpRequest:{type:we(Function),default:s9e},disabled:Boolean,limit:Number}),u9e=Ze({...LX,beforeUpload:{type:we(Function),default:or},beforeRemove:{type:we(Function)},onRemove:{type:we(Function),default:or},onChange:{type:we(Function),default:or},onPreview:{type:we(Function),default:or},onSuccess:{type:we(Function),default:or},onProgress:{type:we(Function),default:or},onError:{type:we(Function),default:or},onExceed:{type:we(Function),default:or},crossorigin:{type:we(String)}}),c9e=Ze({files:{type:we(Array),default:()=>Gr([])},disabled:Boolean,handlePreview:{type:we(Function),default:or},listType:{type:String,values:IX,default:"text"},crossorigin:{type:we(String)}}),d9e={remove:t=>!!t},f9e=de({name:"ElUploadList"}),h9e=de({...f9e,props:c9e,emits:d9e,setup(t,{emit:e}){const n=t,{t:r}=En(),o=je("upload"),i=je("icon"),a=je("list"),s=Zi(),l=z(!1),u=$(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",n.disabled)]),c=d=>{e("remove",d)};return(d,f)=>(N(),me(Wz,{tag:"ul",class:j(p(u)),name:p(a).b()},{default:V(()=>[(N(!0),Z(ut,null,Xt(d.files,(h,g)=>(N(),Z("li",{key:h.uid||h.name,class:j([p(o).be("list","item"),p(o).is(h.status),{focusing:l.value}]),tabindex:"0",onKeydown:yr(v=>!p(s)&&c(h),["delete"]),onFocus:v=>l.value=!0,onBlur:v=>l.value=!1,onClick:v=>l.value=!1},[ke(d.$slots,"default",{file:h,index:g},()=>[d.listType==="picture"||h.status!=="uploading"&&d.listType==="picture-card"?(N(),Z("img",{key:0,class:j(p(o).be("list","item-thumbnail")),src:h.url,crossorigin:d.crossorigin,alt:""},null,10,["src","crossorigin"])):ge("v-if",!0),h.status==="uploading"||d.listType!=="picture-card"?(N(),Z("div",{key:1,class:j(p(o).be("list","item-info"))},[ee("a",{class:j(p(o).be("list","item-name")),onClick:Rt(v=>d.handlePreview(h),["prevent"])},[B(p(Ot),{class:j(p(i).m("document"))},{default:V(()=>[B(p(BEe))]),_:1},8,["class"]),ee("span",{class:j(p(o).be("list","item-file-name")),title:h.name},ze(h.name),11,["title"])],10,["onClick"]),h.status==="uploading"?(N(),me(p(oY),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(h.percentage),style:bt(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):ge("v-if",!0)],2)):ge("v-if",!0),ee("label",{class:j(p(o).be("list","item-status-label"))},[d.listType==="text"?(N(),me(p(Ot),{key:0,class:j([p(i).m("upload-success"),p(i).m("circle-check")])},{default:V(()=>[B(p(C$))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(N(),me(p(Ot),{key:1,class:j([p(i).m("upload-success"),p(i).m("check")])},{default:V(()=>[B(p(Yb))]),_:1},8,["class"])):ge("v-if",!0)],2),p(s)?ge("v-if",!0):(N(),me(p(Ot),{key:2,class:j(p(i).m("close")),onClick:v=>c(h)},{default:V(()=>[B(p(fa))]),_:2},1032,["class","onClick"])),ge(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),ge(" This is a bug which needs to be fixed "),ge(" TODO: Fix the incorrect navigation interaction "),p(s)?ge("v-if",!0):(N(),Z("i",{key:3,class:j(p(i).m("close-tip"))},ze(p(r)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(N(),Z("span",{key:4,class:j(p(o).be("list","item-actions"))},[ee("span",{class:j(p(o).be("list","item-preview")),onClick:v=>d.handlePreview(h)},[B(p(Ot),{class:j(p(i).m("zoom-in"))},{default:V(()=>[B(p(HQ))]),_:1},8,["class"])],10,["onClick"]),p(s)?ge("v-if",!0):(N(),Z("span",{key:0,class:j(p(o).be("list","item-delete")),onClick:v=>c(h)},[B(p(Ot),{class:j(p(i).m("delete"))},{default:V(()=>[B(p(gC))]),_:1},8,["class"])],10,["onClick"]))],2)):ge("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),ke(d.$slots,"append")]),_:3},8,["class","name"]))}});var PB=Ge(h9e,[["__file","upload-list.vue"]]);const p9e=Ze({disabled:Boolean}),g9e={file:t=>Ye(t)},BX="ElUploadDrag",v9e=de({name:BX}),m9e=de({...v9e,props:p9e,emits:g9e,setup(t,{emit:e}){gt(DX)||Ao(BX,"usage: ");const r=je("upload"),o=z(!1),i=Zi(),a=u=>{if(i.value)return;o.value=!1,u.stopPropagation();const c=Array.from(u.dataTransfer.files),d=u.dataTransfer.items||[];c.forEach((f,h)=>{var g;const v=d[h],m=(g=v==null?void 0:v.webkitGetAsEntry)==null?void 0:g.call(v);m&&(f.isDirectory=m.isDirectory)}),e("file",c)},s=()=>{i.value||(o.value=!0)},l=u=>{u.currentTarget.contains(u.relatedTarget)||(o.value=!1)};return(u,c)=>(N(),Z("div",{class:j([p(r).b("dragger"),p(r).is("dragover",o.value)]),onDrop:Rt(a,["prevent"]),onDragover:Rt(s,["prevent"]),onDragleave:Rt(l,["prevent"])},[ke(u.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var y9e=Ge(m9e,[["__file","upload-dragger.vue"]]);const b9e=Ze({...LX,beforeUpload:{type:we(Function),default:or},onRemove:{type:we(Function),default:or},onStart:{type:we(Function),default:or},onSuccess:{type:we(Function),default:or},onProgress:{type:we(Function),default:or},onError:{type:we(Function),default:or},onExceed:{type:we(Function),default:or}}),_9e=de({name:"ElUploadContent",inheritAttrs:!1}),O9e=de({..._9e,props:b9e,setup(t,{expose:e}){const n=t,r=je("upload"),o=Zi(),i=wr({}),a=wr(),s=v=>{if(v.length===0)return;const{autoUpload:m,limit:b,fileList:w,multiple:O,onStart:S,onExceed:x}=n;if(b&&w.length+v.length>b){x(v,w);return}O||(v=v.slice(0,1));for(const C of v){const E=C;E.uid=WA(),S(E),m&&l(E)}},l=async v=>{if(a.value.value="",!n.beforeUpload)return c(v);let m,b={};try{const O=n.data,S=n.beforeUpload(v);b=m0(n.data)?bn(n.data):n.data,m=await S,m0(n.data)&&Oo(O,b)&&(b=bn(n.data))}catch{m=!1}if(m===!1){n.onRemove(v);return}let w=v;m instanceof Blob&&(m instanceof File?w=m:w=new File([m],v.name,{type:v.type})),c(Object.assign(w,{uid:v.uid}),b)},u=async(v,m)=>kt(v)?v(m):v,c=async(v,m)=>{const{headers:b,data:w,method:O,withCredentials:S,name:x,action:C,onProgress:E,onSuccess:T,onError:M,httpRequest:k}=n;try{m=await u(m!=null?m:w,v)}catch{n.onRemove(v);return}const{uid:P}=v,R={headers:b||{},withCredentials:S,file:v,data:m,method:O,filename:x,action:C,onProgress:F=>{E(F,v)},onSuccess:F=>{T(F,v),delete i.value[P]},onError:F=>{M(F,v),delete i.value[P]}},D=k(R);i.value[P]=D,D instanceof Promise&&D.then(R.onSuccess,R.onError)},d=v=>{const m=v.target.files;!m||s(Array.from(m))},f=()=>{o.value||(a.value.value="",a.value.click())},h=()=>{f()};return e({abort:v=>{NQ(i.value).filter(v?([b])=>String(v.uid)===b:()=>!0).forEach(([b,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete i.value[b]})},upload:l}),(v,m)=>(N(),Z("div",{class:j([p(r).b(),p(r).m(v.listType),p(r).is("drag",v.drag),p(r).is("disabled",p(o))]),tabindex:p(o)?"-1":"0",onClick:f,onKeydown:yr(Rt(h,["self"]),["enter","space"])},[v.drag?(N(),me(y9e,{key:0,disabled:p(o),onFile:s},{default:V(()=>[ke(v.$slots,"default")]),_:3},8,["disabled"])):ke(v.$slots,"default",{key:1}),ee("input",{ref_key:"inputRef",ref:a,class:j(p(r).e("input")),name:v.name,disabled:p(o),multiple:v.multiple,accept:v.accept,type:"file",onChange:d,onClick:Rt(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var NB=Ge(O9e,[["__file","upload-content.vue"]]);const MB="ElUpload",$B=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},w9e=(t,e)=>{const n=SQ(t,"fileList",void 0,{passive:!0}),r=h=>n.value.find(g=>g.uid===h.uid);function o(h){var g;(g=e.value)==null||g.abort(h)}function i(h=["ready","uploading","success","fail"]){n.value=n.value.filter(g=>!h.includes(g.status))}function a(h){n.value=n.value.filter(g=>g.uid!==h.uid)}const s=(h,g)=>{const v=r(g);!v||(console.error(h),v.status="fail",a(v),t.onError(h,v,n.value),t.onChange(v,n.value))},l=(h,g)=>{const v=r(g);!v||(t.onProgress(h,v,n.value),v.status="uploading",v.percentage=Math.round(h.percent))},u=(h,g)=>{const v=r(g);!v||(v.status="success",v.response=h,t.onSuccess(h,v,n.value),t.onChange(v,n.value))},c=h=>{gr(h.uid)&&(h.uid=WA());const g={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(t.listType==="picture-card"||t.listType==="picture")try{g.url=URL.createObjectURL(h)}catch(v){v.message,t.onError(v,g,n.value)}n.value=[...n.value,g],t.onChange(g,n.value)},d=async h=>{const g=h instanceof File?r(h):h;g||Ao(MB,"file to be removed not found");const v=m=>{o(m),a(m),t.onRemove(m,n.value),$B(m)};t.beforeRemove?await t.beforeRemove(g,n.value)!==!1&&v(g):v(g)};function f(){n.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var g;return h&&((g=e.value)==null?void 0:g.upload(h))})}return Le(()=>t.listType,h=>{h!=="picture-card"&&h!=="picture"||(n.value=n.value.map(g=>{const{raw:v,url:m}=g;if(!m&&v)try{g.url=URL.createObjectURL(v)}catch(b){t.onError(b,g,n.value)}return g}))}),Le(n,h=>{for(const g of h)g.uid||(g.uid=WA()),g.status||(g.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:o,clearFiles:i,handleError:s,handleProgress:l,handleStart:c,handleSuccess:u,handleRemove:d,submit:f,revokeFileObjectURL:$B}},S9e=de({name:"ElUpload"}),x9e=de({...S9e,props:u9e,setup(t,{expose:e}){const n=t,r=Zi(),o=wr(),{abort:i,submit:a,clearFiles:s,uploadFiles:l,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:g}=w9e(n,o),v=$(()=>n.listType==="picture-card"),m=$(()=>({...n,fileList:l.value,onStart:u,onProgress:h,onSuccess:f,onError:c,onRemove:d}));return Yn(()=>{l.value.forEach(g)}),mn(DX,{accept:jn(n,"accept")}),e({abort:i,submit:a,clearFiles:s,handleStart:u,handleRemove:d}),(b,w)=>(N(),Z("div",null,[p(v)&&b.showFileList?(N(),me(PB,{key:0,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ha({append:V(()=>[B(NB,rn({ref_key:"uploadRef",ref:o},p(m)),{default:V(()=>[b.$slots.trigger?ke(b.$slots,"trigger",{key:0}):ge("v-if",!0),!b.$slots.trigger&&b.$slots.default?ke(b.$slots,"default",{key:1}):ge("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:V(({file:O,index:S})=>[ke(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ge("v-if",!0),!p(v)||p(v)&&!b.showFileList?(N(),me(NB,rn({key:1,ref_key:"uploadRef",ref:o},p(m)),{default:V(()=>[b.$slots.trigger?ke(b.$slots,"trigger",{key:0}):ge("v-if",!0),!b.$slots.trigger&&b.$slots.default?ke(b.$slots,"default",{key:1}):ge("v-if",!0)]),_:3},16)):ge("v-if",!0),b.$slots.trigger?ke(b.$slots,"default",{key:2}):ge("v-if",!0),ke(b.$slots,"tip"),!p(v)&&b.showFileList?(N(),me(PB,{key:3,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ha({_:2},[b.$slots.file?{name:"default",fn:V(({file:O,index:S})=>[ke(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ge("v-if",!0)]))}});var C9e=Ge(x9e,[["__file","upload.vue"]]);const YR=Wt(C9e),E9e=Ze({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:we([String,Array]),default:"Element Plus"},font:{type:we(Object)},gap:{type:we(Array),default:()=>[100,100]},offset:{type:we(Array)}});function T9e(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function k9e(t){return Object.keys(t).map(e=>`${T9e(e)}: ${t[e]};`).join(" ")}function A9e(){return window.devicePixelRatio||1}const P9e=(t,e)=>{let n=!1;return t.removedNodes.length&&e&&(n=Array.from(t.removedNodes).includes(e)),t.type==="attributes"&&t.target===e&&(n=!0),n},FX=3,N9e={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function m2(t,e,n=1){const r=document.createElement("canvas"),o=r.getContext("2d"),i=t*n,a=e*n;return r.setAttribute("width",`${i}px`),r.setAttribute("height",`${a}px`),o.save(),[o,r,i,a]}function M9e(){function t(e,n,r,o,i,a,s,l,u){const[c,d,f,h]=m2(o,i,r);if(e instanceof HTMLImageElement)c.drawImage(e,0,0,f,h);else{const{color:J,fontSize:ie,fontStyle:te,fontWeight:he,fontFamily:K,textAlign:ne,textBaseline:fe}=a,Ne=Number(ie)*r;c.font=`${te} normal ${he} ${Ne}px/${i}px ${K}`,c.fillStyle=J,c.textAlign=ne,c.textBaseline=fe;const $e=Ye(e)?e:[e];$e==null||$e.forEach((ue,G)=>{const[ve,q]=N9e[ne];c.fillText(ue!=null?ue:"",f*ve+u*q,G*(Ne+FX*r))})}const g=Math.PI/180*Number(n),v=Math.max(o,i),[m,b,w]=m2(v,v,r);m.translate(w/2,w/2),m.rotate(g),f>0&&h>0&&m.drawImage(d,-f/2,-h/2);function O(J,ie){const te=J*Math.cos(g)-ie*Math.sin(g),he=J*Math.sin(g)+ie*Math.cos(g);return[te,he]}let S=0,x=0,C=0,E=0;const T=f/2,M=h/2;[[0-T,0-M],[0+T,0-M],[0+T,0+M],[0-T,0+M]].forEach(([J,ie])=>{const[te,he]=O(J,ie);S=Math.min(S,te),x=Math.max(x,te),C=Math.min(C,he),E=Math.max(E,he)});const P=S+w/2,R=C+w/2,D=x-S,F=E-C,W=s*r,I=l*r,Q=(D+W)*2,L=F+I,[H,re]=m2(Q,L);function U(J=0,ie=0){H.drawImage(b,P,R,D,F,J,ie,D,F)}return U(),U(D+W,-F/2-I/2),U(D+W,+F/2+I/2),[re.toDataURL(),Q/r,L/r]}return t}const $9e=de({name:"ElWatermark"}),R9e=de({...$9e,props:E9e,setup(t){const e=t,n={position:"relative"},r=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.color)!=null?P:"rgba(0,0,0,.15)"}),o=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.fontSize)!=null?P:16}),i=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.fontWeight)!=null?P:"normal"}),a=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.fontStyle)!=null?P:"normal"}),s=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.fontFamily)!=null?P:"sans-serif"}),l=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.textAlign)!=null?P:"center"}),u=$(()=>{var k,P;return(P=(k=e.font)==null?void 0:k.textBaseline)!=null?P:"hanging"}),c=$(()=>e.gap[0]),d=$(()=>e.gap[1]),f=$(()=>c.value/2),h=$(()=>d.value/2),g=$(()=>{var k,P;return(P=(k=e.offset)==null?void 0:k[0])!=null?P:f.value}),v=$(()=>{var k,P;return(P=(k=e.offset)==null?void 0:k[1])!=null?P:h.value}),m=()=>{const k={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let P=g.value-f.value,R=v.value-h.value;return P>0&&(k.left=`${P}px`,k.width=`calc(100% - ${P}px)`,P=0),R>0&&(k.top=`${R}px`,k.height=`calc(100% - ${R}px)`,R=0),k.backgroundPosition=`${P}px ${R}px`,k},b=wr(null),w=wr(),O=z(!1),S=()=>{w.value&&(w.value.remove(),w.value=void 0)},x=(k,P)=>{var R;b.value&&w.value&&(O.value=!0,w.value.setAttribute("style",k9e({...m(),backgroundImage:`url('${k}')`,backgroundSize:`${Math.floor(P)}px`})),(R=b.value)==null||R.append(w.value),setTimeout(()=>{O.value=!1}))},C=k=>{let P=120,R=64,D=0;const{image:F,content:W,width:I,height:Q,rotate:L}=e;if(!F&&k.measureText){k.font=`${Number(o.value)}px ${s.value}`;const H=Ye(W)?W:[W];let re=0,U=0;H.forEach(ie=>{const{width:te,fontBoundingBoxAscent:he,fontBoundingBoxDescent:K,actualBoundingBoxAscent:ne,actualBoundingBoxDescent:fe}=k.measureText(ie),Ne=Sn(he)?ne+fe:he+K;te>re&&(re=Math.ceil(te)),Ne>U&&(U=Math.ceil(Ne))}),P=re,R=U*H.length+(H.length-1)*FX;const J=Math.PI/180*Number(L);D=Math.ceil(Math.abs(Math.sin(J)*R)/2),P+=D}return[I!=null?I:P,Q!=null?Q:R,D]},E=M9e(),T=()=>{const P=document.createElement("canvas").getContext("2d"),R=e.image,D=e.content,F=e.rotate;if(P){w.value||(w.value=document.createElement("div"));const W=A9e(),[I,Q,L]=C(P),H=re=>{const[U,J]=E(re||"",F,W,I,Q,{color:r.value,fontSize:o.value,fontStyle:a.value,fontWeight:i.value,fontFamily:s.value,textAlign:l.value,textBaseline:u.value},c.value,d.value,L);x(U,J)};if(R){const re=new Image;re.onload=()=>{H(re)},re.onerror=()=>{H(D)},re.crossOrigin="anonymous",re.referrerPolicy="no-referrer",re.src=R}else H(D)}};return jt(()=>{T()}),Le(()=>e,()=>{T()},{deep:!0,flush:"post"}),Yn(()=>{S()}),wQ(b,k=>{O.value||k.forEach(P=>{P9e(P,w.value)&&(S(),T())})},{attributes:!0,subtree:!0,childList:!0}),(k,P)=>(N(),Z("div",{ref_key:"containerRef",ref:b,style:bt([n])},[ke(k.$slots,"default")],4))}});var D9e=Ge(R9e,[["__file","watermark.vue"]]);const I9e=Wt(D9e),L9e=Ze({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:we(Object)},targetAreaClickable:{type:Boolean,default:!0}}),B9e=(t,e,n,r,o)=>{const i=z(null),a=()=>{let d;return St(t.value)?d=document.querySelector(t.value):kt(t.value)?d=t.value():d=t.value,d},s=()=>{const d=a();if(!d||!e.value){i.value=null;return}F9e(d)||d.scrollIntoView(o.value);const{left:f,top:h,width:g,height:v}=d.getBoundingClientRect();i.value={left:f,top:h,width:g,height:v,radius:0}};jt(()=>{Le([e,t],()=>{s()},{immediate:!0}),window.addEventListener("resize",s)}),Yn(()=>{window.removeEventListener("resize",s)});const l=d=>{var f;return(f=Ye(n.value.offset)?n.value.offset[d]:n.value.offset)!=null?f:6},u=$(()=>{var d;if(!i.value)return i.value;const f=l(0),h=l(1),g=((d=n.value)==null?void 0:d.radius)||2;return{left:i.value.left-f,top:i.value.top-h,width:i.value.width+f*2,height:i.value.height+h*2,radius:g}}),c=$(()=>{const d=a();return!r.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,h,g,v;return window.DOMRect.fromRect({width:((f=u.value)==null?void 0:f.width)||0,height:((h=u.value)==null?void 0:h.height)||0,x:((g=u.value)==null?void 0:g.left)||0,y:((v=u.value)==null?void 0:v.top)||0})}}});return{mergedPosInfo:u,triggerTarget:c}},LC=Symbol("ElTour");function F9e(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:o,bottom:i,left:a}=t.getBoundingClientRect();return r>=0&&a>=0&&o<=e&&i<=n}const V9e=(t,e,n,r,o,i,a,s)=>{const l=z(),u=z(),c=z({}),d={x:l,y:u,placement:r,strategy:o,middlewareData:c},f=$(()=>{const b=[fX(p(i)),xFe(),EFe(),z9e()];return p(s)&&p(n)&&b.push(dX({element:p(n)})),b}),h=async()=>{if(!kn)return;const b=p(t),w=p(e);if(!b||!w)return;const O=await _X(b,w,{placement:p(r),strategy:p(o),middleware:p(f)});gv(d).forEach(S=>{d[S].value=O[S]})},g=$(()=>{if(!p(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:p(a)};const{overflow:b}=p(c);return{position:p(o),zIndex:p(a),top:p(u)!=null?`${p(u)}px`:"",left:p(l)!=null?`${p(l)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),v=$(()=>{if(!p(s))return{};const{arrow:b}=p(c);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let m;return jt(()=>{const b=p(t),w=p(e);b&&w&&(m=QFe(b,w,h)),ua(()=>{h()})}),Yn(()=>{m&&m()}),{update:h,contentStyle:g,arrowStyle:v}},z9e=()=>({name:"overflow",async fn(t){const e=await FR(t);let n=0;return e.left>0&&(n=e.left),e.right>0&&(n=e.right),{data:{maxWidth:t.rects.floating.width-n}}}}),j9e=de({name:"ElTourMask",inheritAttrs:!1}),W9e=de({...j9e,props:L9e,setup(t){const e=t,{ns:n}=gt(LC),r=$(()=>{var l,u;return(u=(l=e.pos)==null?void 0:l.radius)!=null?u:2}),o=$(()=>{const l=r.value,u=`a${l},${l} 0 0 1`;return{topRight:`${u} ${l},${l}`,bottomRight:`${u} ${-l},${l}`,bottomLeft:`${u} ${-l},${-l}`,topLeft:`${u} ${l},${-l}`}}),i=$(()=>{const l=window.innerWidth,u=window.innerHeight,c=o.value,d=`M${l},0 L0,0 L0,${u} L${l},${u} L${l},0 Z`,f=r.value;return e.pos?`${d} M${e.pos.left+f},${e.pos.top} h${e.pos.width-f*2} ${c.topRight} v${e.pos.height-f*2} ${c.bottomRight} h${-e.pos.width+f*2} ${c.bottomLeft} v${-e.pos.height+f*2} ${c.topLeft} z`:d}),a=$(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:e.zIndex,pointerEvents:e.pos&&e.targetAreaClickable?"none":"auto"})),s=$(()=>({fill:e.fill,pointerEvents:"auto",cursor:"auto"}));return aR(jn(e,"visible"),{ns:n}),(l,u)=>l.visible?(N(),Z("div",rn({key:0,class:p(n).e("mask"),style:p(a)},l.$attrs),[(N(),Z("svg",{style:{width:"100%",height:"100%"}},[ee("path",{class:j(p(n).e("hollow")),style:bt(p(s)),d:p(i)},null,14,["d"])]))],16)):ge("v-if",!0)}});var Q9e=Ge(W9e,[["__file","mask.vue"]]);const H9e=["absolute","fixed"],U9e=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],XR=Ze({placement:{type:we(String),values:U9e,default:"bottom"},reference:{type:we(Object),default:null},strategy:{type:we(String),values:H9e,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),Y9e={close:()=>!0},X9e=de({name:"ElTourContent"}),Z9e=de({...X9e,props:XR,emits:Y9e,setup(t,{emit:e}){const n=t,r=z(n.placement),o=z(n.strategy),i=z(null),a=z(null);Le(()=>n.placement,()=>{r.value=n.placement});const{contentStyle:s,arrowStyle:l}=V9e(jn(n,"reference"),i,a,r,o,jn(n,"offset"),jn(n,"zIndex"),jn(n,"showArrow")),u=$(()=>r.value.split("-")[0]),{ns:c}=gt(LC),d=()=>{e("close")},f=h=>{h.detail.focusReason==="pointer"&&h.preventDefault()};return(h,g)=>(N(),Z("div",{ref_key:"contentRef",ref:i,style:bt(p(s)),class:j(p(c).e("content")),"data-side":p(u),tabindex:"-1"},[B(p(dm),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":i.value||void 0,onReleaseRequested:d,onFocusoutPrevented:f},{default:V(()=>[ke(h.$slots,"default")]),_:3},8,["focus-trap-el"]),h.showArrow?(N(),Z("span",{key:0,ref_key:"arrowRef",ref:a,style:bt(p(l)),class:j(p(c).e("arrow"))},null,6)):ge("v-if",!0)],14,["data-side"]))}});var G9e=Ge(Z9e,[["__file","content.vue"]]),q9e=de({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:e,emit:n}){let r=0;return()=>{var o,i;const a=(o=e.default)==null?void 0:o.call(e),s=[];let l=0;function u(c){!Ye(c)||c.forEach(d=>{var f;((f=(d==null?void 0:d.type)||{})==null?void 0:f.name)==="ElTourStep"&&(s.push(d),l+=1)})}return a.length&&u(Zu((i=a[0])==null?void 0:i.children)),r!==l&&(r=l,n("update-total",l)),s.length?s[t.current]:null}}});const K9e=Ze({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:cr},placement:XR.placement,contentStyle:{type:we([Object])},mask:{type:we([Boolean,Object]),default:!0},gap:{type:we(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:we([Boolean,Object]),default:()=>({block:"center"})},type:{type:we(String)},appendTo:{type:wC.to.type,default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),J9e={[zt]:t=>ir(t),["update:current"]:t=>Pt(t),close:t=>Pt(t),finish:()=>!0,change:t=>Pt(t)},e7e=de({name:"ElTour"}),t7e=de({...e7e,props:K9e,emits:J9e,setup(t,{emit:e}){const n=t,r=je("tour"),o=z(0),i=z(),a=SQ(n,"current",e,{passive:!0}),s=$(()=>{var M;return(M=i.value)==null?void 0:M.target}),l=$(()=>[r.b(),m.value==="primary"?r.m("primary"):""]),u=$(()=>{var M;return((M=i.value)==null?void 0:M.placement)||n.placement}),c=$(()=>{var M,k;return(k=(M=i.value)==null?void 0:M.contentStyle)!=null?k:n.contentStyle}),d=$(()=>{var M,k;return(k=(M=i.value)==null?void 0:M.mask)!=null?k:n.mask}),f=$(()=>!!d.value&&n.modelValue),h=$(()=>ir(d.value)?void 0:d.value),g=$(()=>{var M,k;return!!s.value&&((k=(M=i.value)==null?void 0:M.showArrow)!=null?k:n.showArrow)}),v=$(()=>{var M,k;return(k=(M=i.value)==null?void 0:M.scrollIntoViewOptions)!=null?k:n.scrollIntoViewOptions}),m=$(()=>{var M,k;return(k=(M=i.value)==null?void 0:M.type)!=null?k:n.type}),{nextZIndex:b}=um(),w=b(),O=$(()=>{var M;return(M=n.zIndex)!=null?M:w}),{mergedPosInfo:S,triggerTarget:x}=B9e(s,jn(n,"modelValue"),jn(n,"gap"),d,v);Le(()=>n.modelValue,M=>{M||(a.value=0)});const C=()=>{n.closeOnPressEscape&&(e(zt,!1),e("close",a.value))},E=M=>{o.value=M},T=Ro();return mn(LC,{currentStep:i,current:a,total:o,showClose:jn(n,"showClose"),closeIcon:jn(n,"closeIcon"),mergedType:m,ns:r,slots:T,updateModelValue(M){e(zt,M)},onClose(){e("close",a.value)},onFinish(){e("finish")},onChange(){e(ln,a.value)}}),(M,k)=>(N(),Z(ut,null,[B(p(fm),{to:M.appendTo},{default:V(()=>{var P,R;return[ee("div",rn({class:p(l)},M.$attrs),[B(Q9e,{visible:p(f),fill:(P=p(h))==null?void 0:P.color,style:bt((R=p(h))==null?void 0:R.style),pos:p(S),"z-index":p(O),"target-area-clickable":M.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),M.modelValue?(N(),me(G9e,{key:p(a),reference:p(x),placement:p(u),"show-arrow":p(g),"z-index":p(O),style:bt(p(c)),onClose:C},{default:V(()=>[B(p(q9e),{current:p(a),onUpdateTotal:E},{default:V(()=>[ke(M.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):ge("v-if",!0)],16)]}),_:3},8,["to"]),ge(" just for IDE "),ge("v-if",!0)],64))}});var n7e=Ge(t7e,[["__file","tour.vue"]]);const r7e=Ze({target:{type:we([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:cr},showArrow:{type:Boolean,default:void 0},placement:XR.placement,mask:{type:we([Boolean,Object]),default:void 0},contentStyle:{type:we([Object])},prevButtonProps:{type:we(Object)},nextButtonProps:{type:we(Object)},scrollIntoViewOptions:{type:we([Boolean,Object]),default:void 0},type:{type:we(String)}}),o7e={close:()=>!0},i7e=de({name:"ElTourStep"}),a7e=de({...i7e,props:r7e,emits:o7e,setup(t,{emit:e}){const n=t,{Close:r}=UQ,{t:o}=En(),{currentStep:i,current:a,total:s,showClose:l,closeIcon:u,mergedType:c,ns:d,slots:f,updateModelValue:h,onClose:g,onFinish:v,onChange:m}=gt(LC);Le(n,T=>{i.value=T},{immediate:!0});const b=$(()=>{var T;return(T=n.showClose)!=null?T:l.value}),w=$(()=>{var T,M;return(M=(T=n.closeIcon)!=null?T:u.value)!=null?M:r}),O=T=>{if(!!T)return s$(T,["children","onClick"])},S=()=>{var T,M;a.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((M=n.prevButtonProps)==null||M.onClick()),m()},x=()=>{var T;a.value>=s.value-1?C():a.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick(),m()},C=()=>{E(),v()},E=()=>{h(!1),g(),e("close")};return(T,M)=>(N(),Z(ut,null,[p(b)?(N(),Z("button",{key:0,"aria-label":"Close",class:j(p(d).e("closebtn")),type:"button",onClick:E},[B(p(Ot),{class:j(p(d).e("close"))},{default:V(()=>[(N(),me(Jt(p(w))))]),_:1},8,["class"])],2)):ge("v-if",!0),ee("header",{class:j([p(d).e("header"),{"show-close":p(l)}])},[ke(T.$slots,"header",{},()=>[ee("span",{role:"heading",class:j(p(d).e("title"))},ze(T.title),3)])],2),ee("div",{class:j(p(d).e("body"))},[ke(T.$slots,"default",{},()=>[ee("span",null,ze(T.description),1)])],2),ee("footer",{class:j(p(d).e("footer"))},[ee("div",{class:j(p(d).b("indicators"))},[p(f).indicators?(N(),me(Jt(p(f).indicators),{key:0,current:p(a),total:p(s)},null,8,["current","total"])):(N(!0),Z(ut,{key:1},Xt(p(s),(k,P)=>(N(),Z("span",{key:k,class:j([p(d).b("indicator"),P===p(a)?"is-active":""])},null,2))),128))],2),ee("div",{class:j(p(d).b("buttons"))},[p(a)>0?(N(),me(p(Kn),rn({key:0,size:"small",type:p(c)},O(T.prevButtonProps),{onClick:S}),{default:V(()=>{var k,P;return[We(ze((P=(k=T.prevButtonProps)==null?void 0:k.children)!=null?P:p(o)("el.tour.previous")),1)]}),_:1},16,["type"])):ge("v-if",!0),p(a)<=p(s)-1?(N(),me(p(Kn),rn({key:1,size:"small",type:p(c)==="primary"?"default":"primary"},O(T.nextButtonProps),{onClick:x}),{default:V(()=>{var k,P;return[We(ze((P=(k=T.nextButtonProps)==null?void 0:k.children)!=null?P:p(a)===p(s)-1?p(o)("el.tour.finish"):p(o)("el.tour.next")),1)]}),_:1},16,["type"])):ge("v-if",!0)],2)],2)],64))}});var VX=Ge(a7e,[["__file","step.vue"]]);const s7e=Wt(n7e,{TourStep:VX}),l7e=qr(VX),u7e=Ze({container:{type:we([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:we(String),default:"default"},direction:{type:we(String),default:"vertical"},selectScrollTop:Boolean}),c7e={change:t=>St(t),click:(t,e)=>t instanceof MouseEvent&&(St(e)||Sn(e))},zX=Symbol("anchor"),IO=t=>{if(!kn||t==="")return null;if(St(t))try{return document.querySelector(t)}catch{return null}return t};function d7e(t){let e=0;const n=(...r)=>{e&&mp(e),e=kf(()=>{t(...r),e=0})};return n.cancel=()=>{mp(e),e=0},n}const f7e=de({name:"ElAnchor"}),h7e=de({...f7e,props:u7e,emits:c7e,setup(t,{expose:e,emit:n}){const r=t,o=Ro(),i=z(""),a=z({}),s=z(null),l=z(null),u=z(),c={};let d=!1,f=0;const h=je("anchor"),g=$(()=>[h.b(),r.type==="underline"?h.m("underline"):"",h.m(r.direction)]),v=k=>{c[k.href]=k.el},m=k=>{delete c[k]},b=k=>{i.value!==k&&(i.value=k,n(ln,k))};let w=null;const O=k=>{if(!u.value)return;const P=IO(k);if(!P)return;w&&w(),d=!0;const R=H8(P,u.value),D=oA(P,R),F=R.scrollHeight-R.clientHeight,W=Math.min(D-r.offset,F);w=rEe(u.value,f,W,r.duration,()=>{setTimeout(()=>{d=!1},20)})},S=k=>{k&&(b(k),O(k))},x=(k,P)=>{n("click",k,P),S(P)},C=d7e(()=>{u.value&&(f=U8(u.value));const k=E();d||Sn(k)||b(k)}),E=()=>{if(!u.value)return;const k=U8(u.value),P=[];for(const R of Object.keys(c)){const D=IO(R);if(!D)continue;const F=H8(D,u.value),W=oA(D,F);P.push({top:W-r.offset-r.bound,href:R})}P.sort((R,D)=>R.top-D.top);for(let R=0;Rk))return D.href}},T=()=>{const k=IO(r.container);!k||Qb(k)?u.value=window:u.value=k};pr(u,"scroll",C);const M=()=>{wt(()=>{if(!s.value||!l.value||!i.value){a.value={};return}const k=c[i.value];if(!k){a.value={};return}const P=s.value.getBoundingClientRect(),R=l.value.getBoundingClientRect(),D=k.getBoundingClientRect();if(r.direction==="horizontal"){const F=D.left-P.left;a.value={left:`${F}px`,width:`${D.width}px`,opacity:1}}else{const F=D.top-P.top+(D.height-R.height)/2;a.value={top:`${F}px`,opacity:1}}})};return Le(i,M),Le(()=>{var k;return(k=o.default)==null?void 0:k.call(o)},M),jt(()=>{T();const k=decodeURIComponent(window.location.hash);IO(k)?S(k):C()}),Le(()=>r.container,()=>{T()}),mn(zX,{ns:h,direction:r.direction,currentAnchor:i,addLink:v,removeLink:m,handleClick:x}),e({scrollTo:S}),(k,P)=>(N(),Z("div",{ref_key:"anchorRef",ref:s,class:j(p(g))},[k.marker?(N(),Z("div",{key:0,ref_key:"markerRef",ref:l,class:j(p(h).e("marker")),style:bt(a.value)},null,6)):ge("v-if",!0),ee("div",{class:j(p(h).e("list"))},[ke(k.$slots,"default")],2)],2))}});var p7e=Ge(h7e,[["__file","anchor.vue"]]);const g7e=Ze({title:String,href:String}),v7e=de({name:"ElAnchorLink"}),m7e=de({...v7e,props:g7e,setup(t){const e=t,n=z(null),{ns:r,direction:o,currentAnchor:i,addLink:a,removeLink:s,handleClick:l}=gt(zX),u=$(()=>[r.e("link"),r.is("active",i.value===e.href)]),c=d=>{l(d,e.href)};return Le(()=>e.href,(d,f)=>{wt(()=>{f&&s(f),d&&a({href:d,el:n.value})})}),jt(()=>{const{href:d}=e;d&&a({href:d,el:n.value})}),Yn(()=>{const{href:d}=e;d&&s(d)}),(d,f)=>(N(),Z("div",{class:j(p(r).e("item"))},[ee("a",{ref_key:"linkRef",ref:n,class:j(p(u)),href:d.href,onClick:c},[ke(d.$slots,"default",{},()=>[We(ze(d.title),1)])],10,["href"]),d.$slots["sub-link"]&&p(o)==="vertical"?(N(),Z("div",{key:0,class:j(p(r).e("list"))},[ke(d.$slots,"sub-link")],2)):ge("v-if",!0)],2))}});var jX=Ge(m7e,[["__file","anchor-link.vue"]]);const y7e=Wt(p7e,{AnchorLink:jX}),b7e=qr(jX),WX={label:"label",value:"value",disabled:"disabled"},_7e=Ze({direction:{type:we(String),default:"horizontal"},options:{type:we(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:we(Object),default:()=>WX},block:Boolean,size:Fo,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...Yi(["ariaLabel"])}),O7e={[zt]:t=>St(t)||Pt(t)||ir(t),[ln]:t=>St(t)||Pt(t)||ir(t)},w7e=de({name:"ElSegmented"}),S7e=de({...w7e,props:_7e,emits:O7e,setup(t,{emit:e}){const n=t,r=je("segmented"),o=Si(),i=$o(),a=Zi(),{formItem:s}=Xi(),{inputId:l,isLabeledByFormItem:u}=Bl(n,{formItemContext:s}),c=z(null),d=ECe(),f=pn({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),h=k=>{const P=v(k);e(zt,P),e(ln,P)},g=$(()=>({...WX,...n.props})),v=k=>Zt(k)?k[g.value.value]:k,m=k=>Zt(k)?k[g.value.label]:k,b=k=>!!(a.value||(Zt(k)?k[g.value.disabled]:!1)),w=k=>n.modelValue===v(k),O=k=>n.options.find(P=>v(P)===k),S=k=>[r.e("item"),r.is("selected",w(k)),r.is("disabled",b(k))],x=()=>{if(!c.value)return;const k=c.value.querySelector(".is-selected"),P=c.value.querySelector(".is-selected input");if(!k||!P){f.width=0,f.height=0,f.translateX=0,f.translateY=0,f.focusVisible=!1;return}f.isInit=!0,n.direction==="vertical"?(f.height=k.offsetHeight,f.translateY=k.offsetTop):(f.width=k.offsetWidth,f.translateX=k.offsetLeft);try{f.focusVisible=P.matches(":focus-visible")}catch{}},C=$(()=>[r.b(),r.m(i.value),r.is("block",n.block)]),E=$(()=>({width:n.direction==="vertical"?"100%":`${f.width}px`,height:n.direction==="vertical"?`${f.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${f.translateY}px)`:`translateX(${f.translateX}px)`,display:f.isInit?"block":"none"})),T=$(()=>[r.e("item-selected"),r.is("disabled",b(O(n.modelValue))),r.is("focus-visible",f.focusVisible)]),M=$(()=>n.name||o.value);return Wr(c,x),Le(d,x),Le(()=>n.modelValue,()=>{var k;x(),n.validateEvent&&((k=s==null?void 0:s.validate)==null||k.call(s,"change").catch(P=>void 0))},{flush:"post"}),(k,P)=>k.options.length?(N(),Z("div",{key:0,id:p(l),ref_key:"segmentedRef",ref:c,class:j(p(C)),role:"radiogroup","aria-label":p(u)?void 0:k.ariaLabel||"segmented","aria-labelledby":p(u)?p(s).labelId:void 0},[ee("div",{class:j([p(r).e("group"),p(r).m(n.direction)])},[ee("div",{style:bt(p(E)),class:j(p(T))},null,6),(N(!0),Z(ut,null,Xt(k.options,(R,D)=>(N(),Z("label",{key:D,class:j(S(R))},[ee("input",{class:j(p(r).e("item-input")),type:"radio",name:p(M),disabled:b(R),checked:w(R),onChange:F=>h(R)},null,42,["name","disabled","checked","onChange"]),ee("div",{class:j(p(r).e("item-label"))},[ke(k.$slots,"default",{item:R},()=>[We(ze(m(R)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):ge("v-if",!0)}});var x7e=Ge(S7e,[["__file","segmented.vue"]]);const C7e=Wt(x7e),E7e=(t,e)=>{const n=t.toLowerCase();return(e.label||e.value).toLowerCase().includes(n)},T7e=(t,e,n)=>{const{selectionEnd:r}=t;if(r===null)return;const o=t.value,i=Jo(e);let a=-1,s;for(let l=r-1;l>=0;--l){const u=o[l];if(u===n||u===` `||u==="\r"){a=l;continue}if(i.includes(u)){const c=a===-1?r:a;s={pattern:o.slice(l+1,c),start:l+1,end:c,prefix:u,prefixIndex:l,splitIndex:a,selectionEnd:r};break}}return s},k7e=(t,e={debug:!1,useSelectionEnd:!1})=>{const n=t.selectionStart!==null?t.selectionStart:0,r=t.selectionEnd!==null?t.selectionEnd:0,o=e.useSelectionEnd?r:n,i=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(e.debug){const f=document.querySelector("#input-textarea-caret-position-mirror-div");f!=null&&f.parentNode&&f.parentNode.removeChild(f)}const a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);const s=a.style,l=window.getComputedStyle(t),u=t.nodeName==="INPUT";s.whiteSpace=u?"nowrap":"pre-wrap",u||(s.wordWrap="break-word"),s.position="absolute",e.debug||(s.visibility="hidden"),i.forEach(f=>{if(u&&f==="lineHeight")if(l.boxSizing==="border-box"){const h=Number.parseInt(l.height),g=Number.parseInt(l.paddingTop)+Number.parseInt(l.paddingBottom)+Number.parseInt(l.borderTopWidth)+Number.parseInt(l.borderBottomWidth),v=g+Number.parseInt(l.lineHeight);h>v?s.lineHeight=`${h-g}px`:h===v?s.lineHeight=l.lineHeight:s.lineHeight="0"}else s.lineHeight=l.height;else s[f]=l[f]}),A$()?t.scrollHeight>Number.parseInt(l.height)&&(s.overflowY="scroll"):s.overflow="hidden",a.textContent=t.value.slice(0,Math.max(0,o)),u&&a.textContent&&(a.textContent=a.textContent.replace(/\s/g,"\xA0"));const c=document.createElement("span");c.textContent=t.value.slice(Math.max(0,o))||".",c.style.position="relative",c.style.left=`${-t.scrollLeft}px`,c.style.top=`${-t.scrollTop}px`,a.appendChild(c);const d={top:c.offsetTop+Number.parseInt(l.borderTopWidth),left:c.offsetLeft+Number.parseInt(l.borderLeftWidth),height:Number.parseInt(l.fontSize)*1.5};return e.debug?c.style.backgroundColor="#aaa":document.body.removeChild(a),d.left>=t.clientWidth&&(d.left=t.clientWidth),d},A7e=Ze({...Xb,options:{type:we(Array),default:()=>[]},prefix:{type:we([String,Array]),default:"@",validator:t=>St(t)?t.length===1:t.every(e=>St(e)&&e.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:we([Boolean,Function]),default:()=>E7e,validator:t=>t===!1?!0:kt(t)},placement:{type:we(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:we(Function)},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})}}),P7e={[zt]:t=>St(t),"whole-remove":(t,e)=>St(t)&&St(e),input:t=>St(t),search:(t,e)=>St(t)&&St(e),select:(t,e)=>St(t.value)&&St(e),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},N7e=Ze({options:{type:we(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),M7e={select:t=>St(t.value)},$7e=de({name:"ElMentionDropdown"}),R7e=de({...$7e,props:N7e,emits:M7e,setup(t,{expose:e,emit:n}){const r=t,o=je("mention"),{t:i}=En(),a=z(-1),s=z(),l=z(),u=z(),c=(O,S)=>[o.be("dropdown","item"),o.is("hovering",a.value===S),o.is("disabled",O.disabled||r.disabled)],d=O=>{O.disabled||r.disabled||n("select",O)},f=O=>{a.value=O},h=$(()=>r.disabled||r.options.every(O=>O.disabled)),g=$(()=>r.options[a.value]),v=()=>{!g.value||n("select",g.value)},m=O=>{const{options:S}=r;if(S.length===0||h.value)return;O==="next"?(a.value++,a.value===S.length&&(a.value=0)):O==="prev"&&(a.value--,a.value<0&&(a.value=S.length-1));const x=S[a.value];if(x.disabled){m(O);return}wt(()=>b(x))},b=O=>{var S,x,C,E;const{options:T}=r,M=T.findIndex(P=>P.value===O.value),k=(S=l.value)==null?void 0:S[M];if(k){const P=(C=(x=u.value)==null?void 0:x.querySelector)==null?void 0:C.call(x,`.${o.be("dropdown","wrap")}`);P&&x$(P,k)}(E=s.value)==null||E.handleScroll()};return Le(()=>r.options,()=>{h.value||r.options.length===0?a.value=-1:a.value=0},{immediate:!0}),e({hoveringIndex:a,navigateOptions:m,selectHoverOption:v,hoverOption:g}),(O,S)=>(N(),Z("div",{ref_key:"dropdownRef",ref:u,class:j(p(o).b("dropdown"))},[O.$slots.header?(N(),Z("div",{key:0,class:j(p(o).be("dropdown","header"))},[ke(O.$slots,"header")],2)):ge("v-if",!0),Yt(B(p(Al),{id:O.contentId,ref_key:"scrollbarRef",ref:s,tag:"ul","wrap-class":p(o).be("dropdown","wrap"),"view-class":p(o).be("dropdown","list"),role:"listbox","aria-label":O.ariaLabel,"aria-orientation":"vertical"},{default:V(()=>[(N(!0),Z(ut,null,Xt(O.options,(x,C)=>(N(),Z("li",{id:`${O.contentId}-${C}`,ref_for:!0,ref_key:"optionRefs",ref:l,key:C,class:j(c(x,C)),role:"option","aria-disabled":x.disabled||O.disabled||void 0,"aria-selected":a.value===C,onMousemove:E=>f(C),onClick:Rt(E=>d(x),["stop"])},[ke(O.$slots,"label",{item:x,index:C},()=>{var E;return[ee("span",null,ze((E=x.label)!=null?E:x.value),1)]})],42,["id","aria-disabled","aria-selected","onMousemove","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[Bn,O.options.length>0&&!O.loading]]),O.loading?(N(),Z("div",{key:1,class:j(p(o).be("dropdown","loading"))},[ke(O.$slots,"loading",{},()=>[We(ze(p(i)("el.mention.loading")),1)])],2)):ge("v-if",!0),O.$slots.footer?(N(),Z("div",{key:2,class:j(p(o).be("dropdown","footer"))},[ke(O.$slots,"footer")],2)):ge("v-if",!0)],2))}});var D7e=Ge(R7e,[["__file","mention-dropdown.vue"]]);const I7e=de({name:"ElMention",inheritAttrs:!1}),L7e=de({...I7e,props:A7e,emits:P7e,setup(t,{expose:e,emit:n}){const r=t,o=$(()=>hi(r,Object.keys(Xb))),i=je("mention"),a=Zi(),s=Si(),l=z(),u=z(),c=z(),d=z(!1),f=z(),h=z(),g=$(()=>r.showArrow?r.placement:`${r.placement}-start`),v=$(()=>r.showArrow?["bottom","top"]:["bottom-start","top-start"]),m=$(()=>{const{filterOption:R,options:D}=r;return!h.value||!R?D:D.filter(F=>R(h.value.pattern,F))}),b=$(()=>d.value&&(!!m.value.length||r.loading)),w=$(()=>{var R;return`${s.value}-${(R=c.value)==null?void 0:R.hoveringIndex}`}),O=R=>{n(zt,R),n(Lo,R),M()},S=R=>{var D,F,W,I;if(!(!("code"in R)||((D=l.value)==null?void 0:D.isComposing)))switch(R.code){case st.left:case st.right:M();break;case st.up:case st.down:if(!d.value)return;R.preventDefault(),(F=c.value)==null||F.navigateOptions(R.code===st.up?"prev":"next");break;case st.enter:case st.numpadEnter:if(!d.value)return;R.preventDefault(),(W=c.value)!=null&&W.hoverOption?(I=c.value)==null||I.selectHoverOption():d.value=!1;break;case st.esc:if(!d.value)return;R.preventDefault(),d.value=!1;break;case st.backspace:if(r.whole&&h.value){const{splitIndex:Q,selectionEnd:L,pattern:H,prefixIndex:re,prefix:U}=h.value,J=T();if(!J)return;const ie=J.value,te=r.options.find(K=>K.value===H);if((kt(r.checkIsWhole)?r.checkIsWhole(H,U):te)&&Q!==-1&&Q+1===L){R.preventDefault();const K=ie.slice(0,re)+ie.slice(Q+1);n(zt,K),n(Lo,K),n("whole-remove",H,U);const ne=re;wt(()=>{J.selectionStart=ne,J.selectionEnd=ne,P()})}}}},{wrapperRef:x}=qf(l,{disabled:a,afterFocus(){M()},beforeBlur(R){var D;return(D=u.value)==null?void 0:D.isFocusInsideContent(R)},afterBlur(){d.value=!1}}),C=()=>{M()},E=R=>{if(!h.value)return;const D=T();if(!D)return;const F=D.value,{split:W}=r,I=F.slice(h.value.end),Q=I.startsWith(W),L=`${R.value}${Q?"":W}`,H=F.slice(0,h.value.start)+L+I;n(zt,H),n(Lo,H),n("select",R,h.value.prefix);const re=h.value.start+L.length+(Q?1:0);wt(()=>{D.selectionStart=re,D.selectionEnd=re,D.focus(),P()})},T=()=>{var R,D;return r.type==="textarea"?(R=l.value)==null?void 0:R.textarea:(D=l.value)==null?void 0:D.input},M=()=>{setTimeout(()=>{k(),P(),wt(()=>{var R;return(R=u.value)==null?void 0:R.updatePopper()})},0)},k=()=>{const R=T();if(!R)return;const D=k7e(R),F=R.getBoundingClientRect(),W=l.value.$el.getBoundingClientRect();f.value={position:"absolute",width:0,height:`${D.height}px`,left:`${D.left+F.left-W.left}px`,top:`${D.top+F.top-W.top}px`}},P=()=>{const R=T();if(document.activeElement!==R){d.value=!1;return}const{prefix:D,split:F}=r;if(h.value=T7e(R,D,F),h.value&&h.value.splitIndex===-1){d.value=!0,n("search",h.value.pattern,h.value.prefix);return}d.value=!1};return e({input:l,tooltip:u,dropdownVisible:b}),(R,D)=>(N(),Z("div",{ref_key:"wrapperRef",ref:x,class:j(p(i).b())},[B(p(ao),rn(rn(p(o),R.$attrs),{ref_key:"elInputRef",ref:l,"model-value":R.modelValue,disabled:p(a),role:p(b)?"combobox":void 0,"aria-activedescendant":p(b)?p(w)||"":void 0,"aria-controls":p(b)?p(s):void 0,"aria-expanded":p(b)||void 0,"aria-label":R.ariaLabel,"aria-autocomplete":p(b)?"none":void 0,"aria-haspopup":p(b)?"listbox":void 0,onInput:O,onKeydown:S,onMousedown:C}),ha({_:2},[Xt(R.$slots,(F,W)=>({name:W,fn:V(I=>[ke(R.$slots,W,Is(ic(I)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),B(p(Zo),{ref_key:"tooltipRef",ref:u,visible:p(b),"popper-class":[p(i).e("popper"),R.popperClass],"popper-options":R.popperOptions,placement:p(g),"fallback-placements":p(v),effect:"light",pure:"",offset:R.offset,"show-arrow":R.showArrow},{default:V(()=>[ee("div",{style:bt(f.value)},null,4)]),content:V(()=>{var F;return[B(D7e,{ref_key:"dropdownRef",ref:c,options:p(m),disabled:p(a),loading:R.loading,"content-id":p(s),"aria-label":R.ariaLabel,onSelect:E,onClick:Rt((F=l.value)==null?void 0:F.focus,["stop"])},ha({_:2},[Xt(R.$slots,(W,I)=>({name:I,fn:V(Q=>[ke(R.$slots,I,Is(ic(Q)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var B7e=Ge(L7e,[["__file","mention.vue"]]);const F7e=Wt(B7e),V7e=Ze({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]}}),QX=Symbol("splitterRootContextKey");function z7e(t){const e=z(),{width:n,height:r}=MCe(e),o=$(()=>t.value==="horizontal"?n.value:r.value);return{containerEl:e,containerSize:o}}function ZR(t){return Number(t.slice(0,-1))/100}function GR(t){return Number(t.slice(0,-2))}function qR(t){return St(t)&&t.endsWith("%")}function KR(t){return St(t)&&t.endsWith("px")}function j7e(t,e){const n=$(()=>t.value.map(s=>s.size)),r=$(()=>t.value.length),o=z([]);Le([n,r,e],()=>{var s;let l=[],u=0;for(let d=0;dd+(f||0),0);if(c>1||!u){const d=1/c;l=l.map(f=>f===void 0?0:f*d)}else{const d=(1-c)/u;l=l.map(f=>f===void 0?d:f)}o.value=l});const i=s=>s*e.value,a=$(()=>o.value.map(i));return{percentSizes:o,pxSizes:a}}function W7e(t,e,n){const r=h=>h*e.value||0;function o(h,g){return qR(h)?r(ZR(h)):KR(h)?GR(h):h!=null?h:g}const i=z(null);let a=[];const s=$(()=>t.value.map(h=>[h.min,h.max])),l=h=>{i.value={index:h,confirmed:!1},a=n.value},u=(h,g)=>{var v,m;let b=null;if((!i.value||!i.value.confirmed)&&g!==0){if(g>0)b=h,i.value={index:h,confirmed:!0};else for(let k=h;k>=0;k-=1)if(a[k]>0){b=k,i.value={index:k,confirmed:!0};break}}const w=(m=b!=null?b:(v=i.value)==null?void 0:v.index)!=null?m:h,O=[...a],S=w+1,x=o(s.value[w][0],0),C=o(s.value[S][0],0),E=o(s.value[w][1],e.value||0),T=o(s.value[S][1],e.value||0);let M=g;O[w]+ME&&(M=E-O[w]),O[S]-M>T&&(M=O[S]-T),O[w]+=M,O[S]-=M,t.value.forEach((k,P)=>{k.size=O[P]})},c=()=>{i.value=null,a=[]},d=[];return{onMoveStart:l,onMoving:u,onMoveEnd:c,movingIndex:i,onCollapse:(h,g)=>{d.length||d.push(...n.value);const v=n.value,m=g==="start"?h:h+1,b=g==="start"?h+1:h,w=v[m],O=v[b];if(w!==0&&O!==0)v[m]=0,v[b]+=w,d[h]=w;else{const S=w+O,x=d[h],C=S-x;v[b]=x,v[m]=C}t.value.forEach((S,x)=>{S.size=v[x]})}}}const Q7e=de({name:"ElSplitter"}),H7e=de({...Q7e,props:V7e,emits:["resizeStart","resize","resizeEnd","collapse"],setup(t,{emit:e}){const n=t,r=je("splitter"),o=jn(n,"layout"),{containerEl:i,containerSize:a}=z7e(o),{removeChild:s,children:l,addChild:u,ChildrenSorter:c}=SC(Kt(),"ElSplitterPanel");Le(l,()=>{l.value.forEach((C,E)=>{C.setIndex(E)})});const{percentSizes:d,pxSizes:f}=j7e(l,a),{onMoveStart:h,onMoving:g,onMoveEnd:v,onCollapse:m,movingIndex:b}=W7e(l,a,f);return mn(QX,pn({panels:l,percentSizes:d,pxSizes:f,layout:o,movingIndex:b,containerSize:a,onMoveStart:C=>{h(C),e("resizeStart",C,f.value)},onMoving:(C,E)=>{g(C,E),e("resize",C,f.value)},onMoveEnd:C=>{v(),e("resizeEnd",C,f.value)},onCollapse:(C,E)=>{m(C,E),e("collapse",C,E,f.value)},registerPanel:u,unregisterPanel:s})),(C,E)=>(N(),Z("div",{ref_key:"containerEl",ref:i,class:j([p(r).b(),p(r).e(p(o))])},[ke(C.$slots,"default"),B(p(c)),ge(" Prevent iframe touch events from breaking "),p(b)?(N(),Z("div",{key:0,class:j([p(r).e("mask"),p(r).e(`mask-${p(o)}`)])},null,2)):ge("v-if",!0)],2))}});var U7e=Ge(H7e,[["__file","splitter.vue"]]);function Y7e(t){return t&&Zt(t)?t:{start:!!t,end:!!t}}function RB(t,e,n,r){return!!((t==null?void 0:t.collapsible.end)&&e>0||(n==null?void 0:n.collapsible.start)&&r===0&&e>0)}const X7e=de({name:"ElSplitterBar"}),Z7e=de({...X7e,props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},startCollapsible:{type:Boolean},endCollapsible:{type:Boolean}},emits:["moveStart","moving","moveEnd","collapse"],setup(t,{emit:e}){const n=t,r=je("splitter-bar"),o=$(()=>n.layout==="horizontal"),i=$(()=>o.value?{width:0}:{height:0}),a=$(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:o.value?"col-resize":"row-resize",touchAction:"none"})),s=$(()=>{const b=r.e("dragger");return{[`${b}-horizontal`]:o.value,[`${b}-vertical`]:!o.value,[`${b}-active`]:!!l.value}}),l=z(null),u=b=>{!n.resizable||(l.value=[b.pageX,b.pageY],e("moveStart",n.index),window.addEventListener("mouseup",h),window.addEventListener("mousemove",d))},c=b=>{if(n.resizable&&b.touches.length===1){b.preventDefault();const w=b.touches[0];l.value=[w.pageX,w.pageY],e("moveStart",n.index),window.addEventListener("touchend",g),window.addEventListener("touchmove",f)}},d=b=>{const{pageX:w,pageY:O}=b,S=w-l.value[0],x=O-l.value[1],C=o.value?S:x;e("moving",n.index,C)},f=b=>{if(b.touches.length===1){b.preventDefault();const w=b.touches[0],O=w.pageX-l.value[0],S=w.pageY-l.value[1],x=o.value?O:S;e("moving",n.index,x)}},h=()=>{l.value=null,window.removeEventListener("mouseup",h),window.removeEventListener("mousemove",d),e("moveEnd",n.index)},g=()=>{l.value=null,window.removeEventListener("touchend",g),window.removeEventListener("touchmove",f),e("moveEnd",n.index)},v=$(()=>o.value?rd:pC),m=$(()=>o.value?da:wc);return(b,w)=>(N(),Z("div",{class:j([p(r).b()]),style:bt(p(i))},[t.startCollapsible?(N(),Z("div",{key:0,class:j([p(r).e("collapse-icon"),p(r).e(`${t.layout}-collapse-icon-start`)]),onClick:O=>e("collapse",t.index,"start")},[ke(b.$slots,"start-collapsible",{},()=>[(N(),me(Jt(p(v)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):ge("v-if",!0),ee("div",{class:j([p(r).e("dragger"),p(s),t.resizable?"":p(r).e("disable")]),style:bt(p(a)),onMousedown:u,onTouchstart:c},null,38),t.endCollapsible?(N(),Z("div",{key:1,class:j([p(r).e("collapse-icon"),p(r).e(`${t.layout}-collapse-icon-end`)]),onClick:O=>e("collapse",t.index,"end")},[ke(b.$slots,"end-collapsible",{},()=>[(N(),me(Jt(p(m)),{style:{width:"12px",height:"12px"}}))])],10,["onClick"])):ge("v-if",!0)],6))}});var G7e=Ge(Z7e,[["__file","split-bar.vue"]]);const q7e=Ze({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),HX="ElSplitterPanel",K7e=de({name:HX}),J7e=de({...K7e,props:q7e,emits:["update:size"],setup(t,{emit:e}){const n=t,r=je("splitter-panel"),o=gt(QX);o||Ao(HX,"usage: ");const{panels:i,layout:a,containerSize:s,pxSizes:l}=Mo(o),{registerPanel:u,unregisterPanel:c,onCollapse:d,onMoveEnd:f,onMoveStart:h,onMoving:g}=o,v=z(),m=Kt(),b=m.uid,w=z(0),O=$(()=>i.value[w.value]),S=W=>{w.value=W},x=$(()=>{var W;return O.value&&(W=l.value[w.value])!=null?W:0}),C=$(()=>{var W;return O.value&&(W=l.value[w.value+1])!=null?W:0}),E=$(()=>O.value?i.value[w.value+1]:null),T=$(()=>{var W;return E.value?n.resizable&&((W=E.value)==null?void 0:W.resizable)&&(x.value!==0||!n.min)&&(C.value!==0||!E.value.min):!1}),M=$(()=>O.value?w.value!==i.value.length-1:!1),k=$(()=>RB(O.value,x.value,E.value,C.value)),P=$(()=>RB(E.value,C.value,O.value,x.value));function R(W){return qR(W)?ZR(W)*s.value||0:KR(W)?GR(W):W!=null?W:0}let D=!1;Le(()=>n.size,()=>{if(O.value){const W=R(n.size),I=R(n.max),Q=R(n.min),L=Math.min(Math.max(W,Q||0),I||W);L!==W&&(D=!0,e("update:size",L)),O.value.size=L,wt(()=>D=!1)}}),Le(()=>{var W;return(W=O.value)==null?void 0:W.size},W=>{!D&&W!==n.size&&e("update:size",W)}),Le(()=>n.resizable,W=>{O.value&&(O.value.resizable=W)});const F=pn({el:v.value,uid:b,getVnode:()=>m.vnode,setIndex:S,...n,collapsible:Y7e(n.collapsible)});return u(F),Yn(()=>c(F)),(W,I)=>(N(),Z(ut,null,[ee("div",rn({ref_key:"panelEl",ref:v,class:[p(r).b()],style:{flexBasis:`${p(x)}px`}},W.$attrs),[ke(W.$slots,"default")],16),p(M)?(N(),me(G7e,{key:0,index:w.value,layout:p(a),resizable:p(T),"start-collapsible":p(k),"end-collapsible":p(P),onMoveStart:p(h),onMoving:p(g),onMoveEnd:p(f),onCollapse:p(d)},{"start-collapsible":V(()=>[ke(W.$slots,"start-collapsible")]),"end-collapsible":V(()=>[ke(W.$slots,"end-collapsible")]),_:3},8,["index","layout","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):ge("v-if",!0)],64))}});var UX=Ge(J7e,[["__file","split-panel.vue"]]);const eze=Wt(U7e,{SplitPanel:UX}),tze=qr(UX);var nze=[uEe,jTe,MAe,k6e,BAe,HAe,Q$,rPe,oPe,Kn,kH,UPe,qPe,pNe,gNe,yMe,qH,xMe,Xs,ANe,jH,ri,H$,U$,CC,f$e,nU,E$e,T$e,k$e,A$e,P$e,IRe,xU,CU,Ei,MU,sR,jU,WU,QU,HU,fs,hs,Ot,ZU,XU,ao,dR,w3e,k3e,Y3e,X3e,Z3e,G3e,nLe,AC,KLe,s4e,bH,oY,ZH,jNe,zNe,m4e,w4e,oi,Al,Ml,ld,TLe,a8e,g8e,v8e,mY,F8e,yY,G8e,i5e,a5e,gm,vm,mm,T6e,Sc,xc,Zs,Cu,eRe,K6e,oFe,iFe,Zo,lVe,OVe,X0,VVe,r9e,YR,I9e,s7e,l7e,y7e,b7e,C7e,F7e,eze,tze];const cl="ElInfiniteScroll",rze=50,oze=200,ize=0,aze={delay:{type:Number,default:oze},distance:{type:Number,default:ize},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},JR=(t,e)=>Object.entries(aze).reduce((n,[r,o])=>{var i,a;const{type:s,default:l}=o,u=t.getAttribute(`infinite-scroll-${r}`);let c=(a=(i=e[u])!=null?i:u)!=null?a:l;return c=c==="false"?!1:c,c=s(c),n[r]=Number.isNaN(c)?l:c,n},{}),YX=t=>{const{observer:e}=t[cl];e&&(e.disconnect(),delete t[cl].observer)},sze=(t,e)=>{const{container:n,containerEl:r,instance:o,observer:i,lastScrollTop:a}=t[cl],{disabled:s,distance:l}=JR(t,o),{clientHeight:u,scrollHeight:c,scrollTop:d}=r,f=d-a;if(t[cl].lastScrollTop=d,i||s||f<0)return;let h=!1;if(n===t)h=c-(u+d)<=l;else{const{clientTop:g,scrollHeight:v}=t,m=oA(t,r);h=d+u>=m+g+v-l}h&&e.call(o)};function y2(t,e){const{containerEl:n,instance:r}=t[cl],{disabled:o}=JR(t,r);o||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?e.call(r):YX(t))}const lze={async mounted(t,e){const{instance:n,value:r}=e;kt(r)||Ao(cl,"'v-infinite-scroll' binding value must be a function"),await wt();const{delay:o,immediate:i}=JR(t,n),a=S$(t,!0),s=a===window?document.documentElement:a,l=qc(sze.bind(null,t,r),o);if(!!a){if(t[cl]={instance:n,container:a,containerEl:s,delay:o,cb:r,onScroll:l,lastScrollTop:s.scrollTop},i){const u=new MutationObserver(qc(y2.bind(null,t,r),rze));t[cl].observer=u,u.observe(t,{childList:!0,subtree:!0}),y2(t,r)}a.addEventListener("scroll",l)}},unmounted(t){if(!t[cl])return;const{container:e,onScroll:n}=t[cl];e==null||e.removeEventListener("scroll",n),YX(t)},async updated(t){if(!t[cl])await wt();else{const{containerEl:e,cb:n,observer:r}=t[cl];e.clientHeight&&r&&y2(t,n)}}},QA=lze;QA.install=t=>{t.directive("InfiniteScroll",QA)};const uze=QA;function cze(t,e){let n;const r=z(!1),o=pn({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(h){o.text=h}function a(){const h=o.parent,g=f.ns;if(!h.vLoadingAddClassList){let v=h.getAttribute("loading-number");v=Number.parseInt(v)-1,v?h.setAttribute("loading-number",v.toString()):(ca(h,g.bm("parent","relative")),h.removeAttribute("loading-number")),ca(h,g.bm("parent","hidden"))}s(),d.unmount()}function s(){var h,g;(g=(h=f.$el)==null?void 0:h.parentNode)==null||g.removeChild(f.$el)}function l(){var h;t.beforeClose&&!t.beforeClose()||(r.value=!0,clearTimeout(n),n=setTimeout(u,400),o.visible=!1,(h=t.closed)==null||h.call(t))}function u(){if(!r.value)return;const h=o.parent;r.value=!1,h.vLoadingAddClassList=void 0,a()}const c=de({name:"ElLoading",setup(h,{expose:g}){const{ns:v,zIndex:m}=hC("loading");return g({ns:v,zIndex:m}),()=>{const b=o.spinner||o.svg,w=At("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...b?{innerHTML:b}:{}},[At("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),O=o.text?At("p",{class:v.b("text")},[o.text]):void 0;return At(Xo,{name:v.b("fade"),onAfterLeave:u},{default:V(()=>[Yt(B("div",{style:{backgroundColor:o.background||""},class:[v.b("mask"),o.customClass,o.fullscreen?"is-fullscreen":""]},[At("div",{class:v.b("spinner")},[w,O])]),[[Bn,o.visible]])])})}}}),d=qv(c);Object.assign(d._context,e!=null?e:{});const f=d.mount(document.createElement("div"));return{...Mo(o),setText:i,removeElLoadingChild:s,close:l,handleAfterLeave:u,vm:f,get $el(){return f.$el}}}let LO;const Jg=function(t={}){if(!kn)return;const e=dze(t);if(e.fullscreen&&LO)return LO;const n=cze({...e,closed:()=>{var o;(o=e.closed)==null||o.call(e),e.fullscreen&&(LO=void 0)}},Jg._context);fze(e,e.parent,n),DB(e,e.parent,n),e.parent.vLoadingAddClassList=()=>DB(e,e.parent,n);let r=e.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",e.parent.setAttribute("loading-number",r),e.parent.appendChild(n.$el),wt(()=>n.visible.value=e.visible),e.fullscreen&&(LO=n),n},dze=t=>{var e,n,r,o;let i;return St(t.target)?i=(e=document.querySelector(t.target))!=null?e:document.body:i=t.target||document.body,{parent:i===document.body||t.body?document.body:i,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:i===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(r=t.lock)!=null?r:!1,customClass:t.customClass||"",visible:(o=t.visible)!=null?o:!0,beforeClose:t.beforeClose,closed:t.closed,target:i}},fze=async(t,e,n)=>{const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,o={};if(t.fullscreen)n.originalPosition.value=Yc(document.body,"position"),n.originalOverflow.value=Yc(document.body,"overflow"),o.zIndex=r();else if(t.parent===document.body){n.originalPosition.value=Yc(document.body,"position"),await wt();for(const i of["top","left"]){const a=i==="top"?"scrollTop":"scrollLeft";o[i]=`${t.target.getBoundingClientRect()[i]+document.body[a]+document.documentElement[a]-Number.parseInt(Yc(document.body,`margin-${i}`),10)}px`}for(const i of["height","width"])o[i]=`${t.target.getBoundingClientRect()[i]}px`}else n.originalPosition.value=Yc(e,"position");for(const[i,a]of Object.entries(o))n.$el.style[i]=a},DB=(t,e,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?ca(e,r.bm("parent","relative")):pl(e,r.bm("parent","relative")),t.fullscreen&&t.lock?pl(e,r.bm("parent","hidden")):ca(e,r.bm("parent","hidden"))};Jg._context=null;const Sy=Symbol("ElLoading"),Th=t=>`element-loading-${Qf(t)}`,IB=(t,e)=>{var n,r,o,i;const a=e.instance,s=h=>Zt(e.value)?e.value[h]:void 0,l=h=>{const g=St(h)&&(a==null?void 0:a[h])||h;return z(g)},u=h=>l(s(h)||t.getAttribute(Th(h))),c=(n=s("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(r=s("target"))!=null?r:c?void 0:t,body:(o=s("body"))!=null?o:e.modifiers.body,lock:(i=s("lock"))!=null?i:e.modifiers.lock},f=Jg(d);f._context=ev._context,t[Sy]={options:d,instance:f}},hze=(t,e)=>{for(const n of Object.keys(t))Pr(t[n])&&(t[n].value=e[n])},ev={mounted(t,e){e.value&&IB(t,e)},updated(t,e){const n=t[Sy];if(!e.value){n==null||n.instance.close(),t[Sy]=null;return}n?hze(n.options,Zt(e.value)?e.value:{text:t.getAttribute(Th("text")),svg:t.getAttribute(Th("svg")),svgViewBox:t.getAttribute(Th("svgViewBox")),spinner:t.getAttribute(Th("spinner")),background:t.getAttribute(Th("background")),customClass:t.getAttribute(Th("customClass"))}):IB(t,e)},unmounted(t){var e;(e=t[Sy])==null||e.instance.close(),t[Sy]=null}};ev._context=null;const pze={install(t){Jg._context=t._context,ev._context=t._context,t.directive("loading",ev),t.config.globalProperties.$loading=Jg},directive:ev,service:Jg},XX=["primary","success","info","warning","error"],Ea=Gr({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:kn?document.body:void 0}),gze=Ze({customClass:{type:String,default:Ea.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Ea.dangerouslyUseHTMLString},duration:{type:Number,default:Ea.duration},icon:{type:cr,default:Ea.icon},id:{type:String,default:Ea.id},message:{type:we([String,Object,Function]),default:Ea.message},onClose:{type:we(Function),default:Ea.onClose},showClose:{type:Boolean,default:Ea.showClose},type:{type:String,values:XX,default:Ea.type},plain:{type:Boolean,default:Ea.plain},offset:{type:Number,default:Ea.offset},zIndex:{type:Number,default:Ea.zIndex},grouping:{type:Boolean,default:Ea.grouping},repeatNum:{type:Number,default:Ea.repeatNum}}),vze={destroy:()=>!0},au=nz([]),mze=t=>{const e=au.findIndex(o=>o.id===t),n=au[e];let r;return e>0&&(r=au[e-1]),{current:n,prev:r}},yze=t=>{const{prev:e}=mze(t);return e?e.vm.exposed.bottom.value:0},bze=(t,e)=>au.findIndex(r=>r.id===t)>0?16:e,_ze=de({name:"ElMessage"}),Oze=de({..._ze,props:gze,emits:vze,setup(t,{expose:e,emit:n}){const r=t,{Close:o}=k$,i=z(!1),{ns:a,zIndex:s}=hC("message"),{currentZIndex:l,nextZIndex:u}=s,c=z(),d=z(!1),f=z(0);let h;const g=$(()=>r.type?r.type==="error"?"danger":r.type:"info"),v=$(()=>{const M=r.type;return{[a.bm("icon",M)]:M&&Nf[M]}}),m=$(()=>r.icon||Nf[r.type]||""),b=$(()=>yze(r.id)),w=$(()=>bze(r.id,r.offset)+b.value),O=$(()=>f.value+w.value),S=$(()=>({top:`${w.value}px`,zIndex:l.value}));function x(){r.duration!==0&&({stop:h}=vp(()=>{E()},r.duration))}function C(){h==null||h()}function E(){d.value=!1,wt(()=>{var M;i.value||((M=r.onClose)==null||M.call(r),n("destroy"))})}function T({code:M}){M===st.esc&&E()}return jt(()=>{x(),u(),d.value=!0}),Le(()=>r.repeatNum,()=>{C(),x()}),pr(document,"keydown",T),Wr(c,()=>{f.value=c.value.getBoundingClientRect().height}),e({visible:d,bottom:O,close:E}),(M,k)=>(N(),me(Xo,{name:p(a).b("fade"),onBeforeEnter:P=>i.value=!0,onBeforeLeave:M.onClose,onAfterLeave:P=>M.$emit("destroy"),persisted:""},{default:V(()=>[Yt(ee("div",{id:M.id,ref_key:"messageRef",ref:c,class:j([p(a).b(),{[p(a).m(M.type)]:M.type},p(a).is("closable",M.showClose),p(a).is("plain",M.plain),M.customClass]),style:bt(p(S)),role:"alert",onMouseenter:C,onMouseleave:x},[M.repeatNum>1?(N(),me(p(Q$),{key:0,value:M.repeatNum,type:p(g),class:j(p(a).e("badge"))},null,8,["value","type","class"])):ge("v-if",!0),p(m)?(N(),me(p(Ot),{key:1,class:j([p(a).e("icon"),p(v)])},{default:V(()=>[(N(),me(Jt(p(m))))]),_:1},8,["class"])):ge("v-if",!0),ke(M.$slots,"default",{},()=>[M.dangerouslyUseHTMLString?(N(),Z(ut,{key:1},[ge(" Caution here, message could've been compromised, never use user's input as message "),ee("p",{class:j(p(a).e("content")),innerHTML:M.message},null,10,["innerHTML"])],2112)):(N(),Z("p",{key:0,class:j(p(a).e("content"))},ze(M.message),3))]),M.showClose?(N(),me(p(Ot),{key:2,class:j(p(a).e("closeBtn")),onClick:Rt(E,["stop"])},{default:V(()=>[B(p(o))]),_:1},8,["class","onClick"])):ge("v-if",!0)],46,["id"]),[[Bn,d.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var wze=Ge(Oze,[["__file","message.vue"]]);let Sze=1;const ZX=t=>{const e=!t||St(t)||Mr(t)||kt(t)?{message:t}:t,n={...Ea,...e};if(!n.appendTo)n.appendTo=document.body;else if(St(n.appendTo)){let r=document.querySelector(n.appendTo);Aa(r)||(r=document.body),n.appendTo=r}return ir(Ts.grouping)&&!n.grouping&&(n.grouping=Ts.grouping),Pt(Ts.duration)&&n.duration===3e3&&(n.duration=Ts.duration),Pt(Ts.offset)&&n.offset===16&&(n.offset=Ts.offset),ir(Ts.showClose)&&!n.showClose&&(n.showClose=Ts.showClose),ir(Ts.plain)&&!n.plain&&(n.plain=Ts.plain),n},xze=t=>{const e=au.indexOf(t);if(e===-1)return;au.splice(e,1);const{handler:n}=t;n.close()},Cze=({appendTo:t,...e},n)=>{const r=`message_${Sze++}`,o=e.onClose,i=document.createElement("div"),a={...e,id:r,onClose:()=>{o==null||o(),xze(c)},onDestroy:()=>{wf(null,i)}},s=B(wze,a,kt(a.message)||Mr(a.message)?{default:kt(a.message)?a.message:()=>a.message}:null);s.appContext=n||kv._context,wf(s,i),t.appendChild(i.firstElementChild);const l=s.component,c={id:r,vnode:s,vm:l,handler:{close:()=>{l.exposed.close()}},props:s.component.props};return c},kv=(t={},e)=>{if(!kn)return{close:()=>{}};const n=ZX(t);if(n.grouping&&au.length){const o=au.find(({vnode:i})=>{var a;return((a=i.props)==null?void 0:a.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(Pt(Ts.max)&&au.length>=Ts.max)return{close:()=>{}};const r=Cze(n,e);return au.push(r),r.handler};XX.forEach(t=>{kv[t]=(e={},n)=>{const r=ZX(e);return kv({...r,type:t},n)}});function Eze(t){const e=[...au];for(const n of e)(!t||t===n.props.type)&&n.handler.close()}kv.closeAll=Eze;kv._context=null;const hr=IQ(kv,"$message"),HA="_trap-focus-children",Zh=[],LB=t=>{if(Zh.length===0)return;const e=Zh[Zh.length-1][HA];if(e.length>0&&t.code===st.tab){if(e.length===1){t.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const n=t.shiftKey,r=t.target===e[0],o=t.target===e[e.length-1];r&&n&&(t.preventDefault(),e[e.length-1].focus()),o&&!n&&(t.preventDefault(),e[0].focus())}},Tze={beforeMount(t){t[HA]=G8(t),Zh.push(t),Zh.length<=1&&document.addEventListener("keydown",LB)},updated(t){wt(()=>{t[HA]=G8(t)})},unmounted(){Zh.shift(),Zh.length===0&&document.removeEventListener("keydown",LB)}},kze=de({name:"ElMessageBox",directives:{TrapFocus:Tze},components:{ElButton:Kn,ElFocusTrap:dm,ElInput:ao,ElOverlay:iR,ElIcon:Ot,...k$},inheritAttrs:!1,props:{buttonSize:{type:String,validator:OY},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:r,ns:o,size:i}=hC("message-box",$(()=>t.buttonSize)),{t:a}=n,{nextZIndex:s}=r,l=z(!1),u=pn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:uu(lc),cancelButtonLoadingIcon:uu(lc),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),c=$(()=>{const I=u.type;return{[o.bm("icon",I)]:I&&Nf[I]}}),d=Si(),f=Si(),h=$(()=>{const I=u.type;return u.icon||I&&Nf[I]||""}),g=$(()=>!!u.message),v=z(),m=z(),b=z(),w=z(),O=z(),S=$(()=>u.confirmButtonClass);Le(()=>u.inputValue,async I=>{await wt(),t.boxType==="prompt"&&I&&R()},{immediate:!0}),Le(()=>l.value,I=>{var Q,L;I&&(t.boxType!=="prompt"&&(u.autofocus?b.value=(L=(Q=O.value)==null?void 0:Q.$el)!=null?L:v.value:b.value=v.value),u.zIndex=s()),t.boxType==="prompt"&&(I?wt().then(()=>{var H;w.value&&w.value.$el&&(u.autofocus?b.value=(H=D())!=null?H:v.value:b.value=v.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=$(()=>t.draggable),C=$(()=>t.overflow);kU(v,m,x,C),jt(async()=>{await wt(),t.closeOnHashChange&&window.addEventListener("hashchange",E)}),Yn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){!l.value||(l.value=!1,wt(()=>{u.action&&e("action",u.action)}))}const T=()=>{t.closeOnClickModal&&P(u.distinguishCancelAndClose?"close":"cancel")},M=oR(T),k=I=>{if(u.inputType!=="textarea")return I.preventDefault(),P("confirm")},P=I=>{var Q;t.boxType==="prompt"&&I==="confirm"&&!R()||(u.action=I,u.beforeClose?(Q=u.beforeClose)==null||Q.call(u,I,u,E):E())},R=()=>{if(t.boxType==="prompt"){const I=u.inputPattern;if(I&&!I.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const Q=u.inputValidator;if(kt(Q)){const L=Q(u.inputValue);if(L===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(St(L))return u.editorErrorMessage=L,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},D=()=>{var I,Q;const L=(I=w.value)==null?void 0:I.$refs;return(Q=L==null?void 0:L.input)!=null?Q:L==null?void 0:L.textarea},F=()=>{P("close")},W=()=>{t.closeOnPressEscape&&F()};return t.lockScroll&&aR(l),{...Mo(u),ns:o,overlayEvent:M,visible:l,hasMessage:g,typeClass:c,contentId:d,inputId:f,btnSize:i,iconComponent:h,confirmButtonClasses:S,rootRef:v,focusStartRef:b,headerRef:m,inputRef:w,confirmRef:O,doClose:E,handleClose:F,onCloseRequested:W,handleWrapperClick:T,handleInputEnter:k,handleAction:P,t:a}}});function Aze(t,e,n,r,o,i){const a=Nn("el-icon"),s=Nn("el-input"),l=Nn("el-button"),u=Nn("el-focus-trap"),c=Nn("el-overlay");return N(),me(Xo,{name:"fade-in-linear",onAfterLeave:d=>t.$emit("vanish"),persisted:""},{default:V(()=>[Yt(B(c,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:V(()=>[ee("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:j(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[B(u,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:V(()=>[ee("div",{ref:"rootRef",class:j([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:bt(t.customStyle),tabindex:"-1",onClick:Rt(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(N(),Z("div",{key:0,ref:"headerRef",class:j([t.ns.e("header"),{"show-close":t.showClose}])},[ee("div",{class:j(t.ns.e("title"))},[t.iconComponent&&t.center?(N(),me(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:V(()=>[(N(),me(Jt(t.iconComponent)))]),_:1},8,["class"])):ge("v-if",!0),ee("span",null,ze(t.title),1)],2),t.showClose?(N(),Z("button",{key:0,type:"button",class:j(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:yr(Rt(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[B(a,{class:j(t.ns.e("close"))},{default:V(()=>[(N(),me(Jt(t.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):ge("v-if",!0)],2)):ge("v-if",!0),ee("div",{id:t.contentId,class:j(t.ns.e("content"))},[ee("div",{class:j(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(N(),me(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:V(()=>[(N(),me(Jt(t.iconComponent)))]),_:1},8,["class"])):ge("v-if",!0),t.hasMessage?(N(),Z("div",{key:1,class:j(t.ns.e("message"))},[ke(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(N(),me(Jt(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(N(),me(Jt(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:ze(t.message)},null,8,["for","textContent"]))])],2)):ge("v-if",!0)],2),Yt(ee("div",{class:j(t.ns.e("input"))},[B(s,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":d=>t.inputValue=d,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:j({invalid:t.validateError}),onKeydown:yr(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),ee("div",{class:j(t.ns.e("errormsg")),style:bt({visibility:t.editorErrorMessage?"visible":"hidden"})},ze(t.editorErrorMessage),7)],2),[[Bn,t.showInput]])],10,["id"]),ee("div",{class:j(t.ns.e("btns"))},[t.showCancelButton?(N(),me(l,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:j([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:d=>t.handleAction("cancel"),onKeydown:yr(Rt(d=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:V(()=>[We(ze(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):ge("v-if",!0),Yt(B(l,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:j([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:d=>t.handleAction("confirm"),onKeydown:yr(Rt(d=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:V(()=>[We(ze(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[Bn,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[Bn,t.visible]])]),_:3},8,["onAfterLeave"])}var Pze=Ge(kze,[["render",Aze],["__file","index.vue"]]);const Z0=new Map,Nze=t=>{let e=document.body;return t.appendTo&&(St(t.appendTo)&&(e=document.querySelector(t.appendTo)),Aa(t.appendTo)&&(e=t.appendTo),Aa(e)||(e=document.body)),e},Mze=(t,e,n=null)=>{const r=B(Pze,t,kt(t.message)||Mr(t.message)?{default:kt(t.message)?t.message:()=>t.message}:null);return r.appContext=n,wf(r,e),Nze(t).appendChild(e.firstElementChild),r.component},$ze=()=>document.createElement("div"),Rze=(t,e)=>{const n=$ze();t.onVanish=()=>{wf(null,n),Z0.delete(o)},t.onAction=i=>{const a=Z0.get(o);let s;t.showInput?s={value:o.inputValue,action:i}:s=i,t.callback?t.callback(s,r.proxy):i==="cancel"||i==="close"?t.distinguishCancelAndClose&&i!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=Mze(t,n,e),o=r.proxy;for(const i in t)Dn(t,i)&&!Dn(o.$props,i)&&(i==="closeIcon"&&Zt(t[i])?o[i]=uu(t[i]):o[i]=t[i]);return o.visible=!0,o};function ym(t,e=null){if(!kn)return Promise.reject();let n;return St(t)||Mr(t)?t={message:t}:n=t.callback,new Promise((r,o)=>{const i=Rze(t,e!=null?e:ym._context);Z0.set(i,{options:t,callback:n,resolve:r,reject:o})})}const Dze=["alert","confirm","prompt"],Ize={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Dze.forEach(t=>{ym[t]=Lze(t)});function Lze(t){return(e,n,r,o)=>{let i="";return Zt(n)?(r=n,i=""):Sn(n)?i="":i=n,ym(Object.assign({title:i,message:e,type:"",...Ize[t]},r,{boxType:t}),o)}}ym.close=()=>{Z0.forEach((t,e)=>{e.doClose()}),Z0.clear()};ym._context=null;const Hd=ym;Hd.install=t=>{Hd._context=t._context,t.config.globalProperties.$msgbox=Hd,t.config.globalProperties.$messageBox=Hd,t.config.globalProperties.$alert=Hd.alert,t.config.globalProperties.$confirm=Hd.confirm,t.config.globalProperties.$prompt=Hd.prompt};const ip=Hd,GX=["primary","success","info","warning","error"],Bze=Ze({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:cr},id:{type:String,default:""},message:{type:we([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:we(Function),default:()=>{}},onClose:{type:we(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...GX,""],default:""},zIndex:Number,closeIcon:{type:cr,default:fa}}),Fze={destroy:()=>!0},Vze=de({name:"ElNotification"}),zze=de({...Vze,props:Bze,emits:Fze,setup(t,{expose:e}){const n=t,{ns:r,zIndex:o}=hC("notification"),{nextZIndex:i,currentZIndex:a}=o,s=z(!1);let l;const u=$(()=>{const w=n.type;return w&&Nf[n.type]?r.m(w):""}),c=$(()=>n.type&&Nf[n.type]||n.icon),d=$(()=>n.position.endsWith("right")?"right":"left"),f=$(()=>n.position.startsWith("top")?"top":"bottom"),h=$(()=>{var w;return{[f.value]:`${n.offset}px`,zIndex:(w=n.zIndex)!=null?w:a.value}});function g(){n.duration>0&&({stop:l}=vp(()=>{s.value&&m()},n.duration))}function v(){l==null||l()}function m(){s.value=!1}function b({code:w}){w===st.delete||w===st.backspace?v():w===st.esc?s.value&&m():g()}return jt(()=>{g(),i(),s.value=!0}),pr(document,"keydown",b),e({visible:s,close:m}),(w,O)=>(N(),me(Xo,{name:p(r).b("fade"),onBeforeLeave:w.onClose,onAfterLeave:S=>w.$emit("destroy"),persisted:""},{default:V(()=>[Yt(ee("div",{id:w.id,class:j([p(r).b(),w.customClass,p(d)]),style:bt(p(h)),role:"alert",onMouseenter:v,onMouseleave:g,onClick:w.onClick},[p(c)?(N(),me(p(Ot),{key:0,class:j([p(r).e("icon"),p(u)])},{default:V(()=>[(N(),me(Jt(p(c))))]),_:1},8,["class"])):ge("v-if",!0),ee("div",{class:j(p(r).e("group"))},[ee("h2",{class:j(p(r).e("title")),textContent:ze(w.title)},null,10,["textContent"]),Yt(ee("div",{class:j(p(r).e("content")),style:bt(w.title?void 0:{margin:0})},[ke(w.$slots,"default",{},()=>[w.dangerouslyUseHTMLString?(N(),Z(ut,{key:1},[ge(" Caution here, message could've been compromised, never use user's input as message "),ee("p",{innerHTML:w.message},null,8,["innerHTML"])],2112)):(N(),Z("p",{key:0},ze(w.message),1))])],6),[[Bn,w.message]]),w.showClose?(N(),me(p(Ot),{key:0,class:j(p(r).e("closeBtn")),onClick:Rt(m,["stop"])},{default:V(()=>[(N(),me(Jt(w.closeIcon)))]),_:1},8,["class","onClick"])):ge("v-if",!0)],2)],46,["id","onClick"]),[[Bn,s.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var jze=Ge(zze,[["__file","notification.vue"]]);const Av={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},rS=16;let Wze=1;const Op=function(t={},e){if(!kn)return{close:()=>{}};(St(t)||Mr(t))&&(t={message:t});const n=t.position||"top-right";let r=t.offset||0;Av[n].forEach(({vm:c})=>{var d;r+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+rS}),r+=rS;const o=`notification_${Wze++}`,i=t.onClose,a={...t,offset:r,id:o,onClose:()=>{Qze(o,n,i)}};let s=document.body;Aa(t.appendTo)?s=t.appendTo:St(t.appendTo)&&(s=document.querySelector(t.appendTo)),Aa(s)||(s=document.body);const l=document.createElement("div"),u=B(jze,a,kt(a.message)?a.message:Mr(a.message)?()=>a.message:null);return u.appContext=Sn(e)?Op._context:e,u.props.onDestroy=()=>{wf(null,l)},wf(u,l),Av[n].push({vm:u}),s.appendChild(l.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};GX.forEach(t=>{Op[t]=(e={},n)=>((St(e)||Mr(e))&&(e={message:e}),Op({...e,type:t},n))});function Qze(t,e,n){const r=Av[e],o=r.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===t});if(o===-1)return;const{vm:i}=r[o];if(!i)return;n==null||n(i);const a=i.el.offsetHeight,s=e.split("-")[0];r.splice(o,1);const l=r.length;if(!(l<1))for(let u=o;u{e.component.exposed.visible.value=!1})}function Uze(t="top-right"){var e,n,r;let o=((n=(e=Av[t][0])==null?void 0:e.vm.props)==null?void 0:n.offset)||0;for(const{vm:i}of Av[t])i.component.props.offset=o,o+=(((r=i.el)==null?void 0:r.offsetHeight)||0)+rS}Op.closeAll=Hze;Op.updateOffsets=Uze;Op._context=null;const Yze=IQ(Op,"$notify");var Xze=[uze,pze,hr,ip,Yze,rY],Zze=KCe([...nze,...Xze]),qX={name:"zh-cn",el:{breadcrumb:{label:"\u9762\u5305\u5C51"},colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A",defaultLabel:"\u989C\u8272\u9009\u62E9\u5668",description:"\u5F53\u524D\u989C\u8272 {color}\uFF0C\u6309 Enter \u952E\u9009\u62E9\u65B0\u989C\u8272",alphaLabel:"\u9009\u62E9\u900F\u660E\u5EA6\u7684\u503C"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",dateTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u65E5\u671F",monthTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u6708\u4EFD",yearTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u5E74\u4EFD",selectedDate:"\u5DF2\u9009\u65E5\u671F",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},weeksFull:{sun:"\u661F\u671F\u65E5",mon:"\u661F\u671F\u4E00",tue:"\u661F\u671F\u4E8C",wed:"\u661F\u671F\u4E09",thu:"\u661F\u671F\u56DB",fri:"\u661F\u671F\u4E94",sat:"\u661F\u671F\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},inputNumber:{decrease:"\u51CF\u5C11\u6570\u503C",increase:"\u589E\u52A0\u6570\u503C"},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},dropdown:{toggleDropdown:"\u5207\u6362\u4E0B\u62C9\u9009\u9879"},mention:{loading:"\u52A0\u8F7D\u4E2D"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},dialog:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},drawer:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!",close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},upload:{deleteTip:"\u6309 Delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},slider:{defaultLabel:"\u6ED1\u5757\u4ECB\u4E8E {min} \u81F3 {max}",defaultRangeStartLabel:"\u9009\u62E9\u8D77\u59CB\u503C",defaultRangeEndLabel:"\u9009\u62E9\u7ED3\u675F\u503C"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tour:{next:"\u4E0B\u4E00\u6B65",previous:"\u4E0A\u4E00\u6B65",finish:"\u7ED3\u675F\u5BFC\u89C8"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"},carousel:{leftArrow:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",rightArrow:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247",indicator:"\u5E7B\u706F\u7247\u5207\u6362\u81F3\u7D22\u5F15 {index}"}}},BC,ar,KX,Dh,BB,JX,UA,eD,YA,XA,G0={},eZ=[],Gze=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,FC=Array.isArray;function of(t,e){for(var n in e)t[n]=e[n];return t}function tZ(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function qt(t,e,n){var r,o,i,a={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:a[i]=e[i];if(arguments.length>2&&(a.children=arguments.length>3?BC.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)a[i]===void 0&&(a[i]=t.defaultProps[i]);return ew(t,a,r,o,null)}function ew(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o==null?++KX:o,__i:-1,__u:0};return o==null&&ar.vnode!=null&&ar.vnode(i),i}function VC(){return{current:null}}function Pv(t){return t.children}function vr(t,e){this.props=t,this.context=e}function Nv(t,e){if(e==null)return t.__?Nv(t.__,t.__i+1):null;for(var n;ee&&Dh.sort(UA));oS.__r=0}function rZ(t,e,n,r,o,i,a,s,l,u,c){var d,f,h,g,v,m=r&&r.__k||eZ,b=e.length;for(n.__d=l,qze(n,e,m),l=n.__d,d=0;d0?ew(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,i=null,(s=o.__i=Kze(o,n,a,c))!==-1&&(c--,(i=n[s])&&(i.__u|=131072)),i==null||i.__v===null?(s==-1&&d--,typeof o.type!="function"&&(o.__u|=65536)):s!==a&&(s==a-1?d--:s==a+1?d++:(s>a?d--:d++,o.__u|=65536))):o=t.__k[r]=null;if(c)for(r=0;r(l!=null&&(131072&l.__u)==0?1:0))for(;a>=0||s=0){if((l=e[a])&&(131072&l.__u)==0&&o==l.key&&i===l.type)return a;a--}if(s=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function $g(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function sD(){for(var t=[],e=0;e2&&iy("box");var n=Eg(e);return new lp(t,VO(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&iy("array");var n=Eg(e);return aWe(t,VO(n),n.name)},map:function(t,e){arguments.length>2&&iy("map");var n=Eg(e);return new dD(t,VO(n),n.name)},set:function(t,e){arguments.length>2&&iy("set");var n=Eg(e);return new RZ(t,VO(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&iy("object");var r=Eg(n);if(r.proxy===!1)return tP({},t,e,r);var o=kZ(r),i=tP({},void 0,void 0,r),a=rWe(i);return AZ(a,t,e,o),a},ref:fZ,shallow:bje,deep:lD,struct:_je},it=Oje;Object.keys(jB).forEach(function(t){return it[t]=jB[t]});function iy(t){Rr("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var uS=cZ(!1,function(t,e,n,r,o){var i=n.get,a=n.set,s=o[0]||{};fD(t).addComputedProp(t,e,sS({get:i,set:a,context:t},s))}),wje=uS({equals:Mv.structural}),Zr=function(e,n,r){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return uS.apply(null,arguments);var o=typeof n=="object"?n:{};return o.get=e,o.set=typeof n=="function"?n:o.set,o.name=o.name||e.name||"",new Rv(o)};Zr.struct=wje;var Dr;(function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"})(Dr||(Dr={}));var tc;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(tc||(tc={}));var cS=function(){function t(e){this.cause=e}return t}();function Cy(t){return t instanceof cS}function GA(t){switch(t.dependenciesState){case Dr.UP_TO_DATE:return!1;case Dr.NOT_TRACKING:case Dr.STALE:return!0;case Dr.POSSIBLY_STALE:{for(var e=uD(!0),n=Sm(),r=t.observing,o=r.length,i=0;i0;dn.computationDepth>0&&e&&Rr(!1),!dn.allowStateChanges&&(e||dn.enforceActions==="strict")&&Rr(!1)}function hZ(t,e,n){var r=uD(!0);gZ(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++dn.runId;var o=dn.trackingDerivation;dn.trackingDerivation=t;var i;if(dn.disableErrorBoundaries===!0)i=e.call(n);else try{i=e.call(n)}catch(a){i=new cS(a)}return dn.trackingDerivation=o,Sje(t),Xy(r),i}function Sje(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Dr.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;ar&&(r=s.dependenciesState)}for(n.length=o,t.newObserving=null,i=e.length;i--;){var s=e[i];s.diffValue===0&&yZ(s,t),s.diffValue=0}for(;o--;){var s=n[o];s.diffValue===1&&(s.diffValue=0,Pje(s,t))}r!==Dr.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}function qA(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)yZ(e[n],t);t.dependenciesState=Dr.NOT_TRACKING}function pZ(t){var e=Sm();try{return t()}finally{gf(e)}}function Sm(){var t=dn.trackingDerivation;return dn.trackingDerivation=null,t}function gf(t){dn.trackingDerivation=t}function uD(t){var e=dn.allowStateReads;return dn.allowStateReads=t,e}function Xy(t){dn.allowStateReads=t}function gZ(t){if(t.dependenciesState!==Dr.UP_TO_DATE){t.dependenciesState=Dr.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Dr.UP_TO_DATE}}var dS=0,xje=1,WB=Object.getOwnPropertyDescriptor(function(){},"name");WB&&WB.configurable;function sp(t,e,n){var r=function(){return vZ(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function vZ(t,e,n,r){var o=Cje();try{return e.apply(n,r)}catch(i){throw o.error=i,i}finally{Eje(o)}}function Cje(t,e,n){var r=os(),o=0,i=Sm();du();var a=WC(!0),s=uD(!0),l={prevDerivation:i,prevAllowStateChanges:a,prevAllowStateReads:s,notifySpy:r,startTime:o,actionId:xje++,parentActionId:dS};return dS=l.actionId,l}function Eje(t){dS!==t.actionId&&Rr("invalid action stack. did you forget to finish an action?"),dS=t.parentActionId,t.error!==void 0&&(dn.suppressReactionErrors=!0),QC(t.prevAllowStateChanges),Xy(t.prevAllowStateReads),fu(),gf(t.prevDerivation),t.notifySpy,dn.suppressReactionErrors=!1}function WC(t){var e=dn.allowStateChanges;return dn.allowStateChanges=t,e}function QC(t){dn.allowStateChanges=t}var lp=function(t){fje(e,t);function e(n,r,o,i,a){o===void 0&&(o="ObservableValue@"+ls()),i===void 0&&(i=!0),a===void 0&&(a=Mv.default);var s=t.call(this,o)||this;return s.enhancer=r,s.name=o,s.equals=a,s.hasUnreportedChange=!1,s.value=r(n,void 0,o),i&&os(),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var r=this.value;if(n=this.prepareNewValue(n),n!==dn.UNCHANGED){var o=os();this.setNewValue(n)}},e.prototype.prepareNewValue=function(n){if($v(this),nc(this)){var r=rc(this,{object:this,type:"update",newValue:n});if(!r)return dn.UNCHANGED;n=r.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?dn.UNCHANGED:n},e.prototype.setNewValue=function(n){var r=this.value;this.value=n,this.reportChanged(),hu(this)&&pu(this,{type:"update",object:this,newValue:n,oldValue:r})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return s_(this,n)},e.prototype.observe=function(n,r){return r&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),l_(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return uZ(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(wm),Tje=Jf("ObservableValue",lp),Rv=function(){function t(e){this.dependenciesState=Dr.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Dr.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ls(),this.value=new cS(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=tc.NONE,ap(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+ls(),e.set&&(this.setter=sp(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?Mv.structural:Mv.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){$je(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&Rr("Cycle detected in computation "+this.name+": "+this.derivation),dn.inBatch===0&&this.observers.size===0&&!this.keepAlive?GA(this)&&(this.warnAboutUntrackedRead(),du(),this.value=this.computeValue(!1),fu()):(_Z(this),GA(this)&&this.trackAndCompute()&&Mje(this));var e=this.value;if(Cy(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Cy(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){ap(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else ap(!1,!1)},t.prototype.trackAndCompute=function(){var e=this.value,n=this.dependenciesState===Dr.NOT_TRACKING,r=this.computeValue(!0),o=n||Cy(e)||Cy(r)||!this.equals(e,r);return o&&(this.value=r),o},t.prototype.computeValue=function(e){this.isComputing=!0,dn.computationDepth++;var n;if(e)n=hZ(this,this.derivation,this.scope);else if(dn.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(r){n=new cS(r)}return dn.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(qA(this),this.value=void 0)},t.prototype.observe=function(e,n){var r=this,o=!0,i=void 0;return zje(function(){var a=r.get();if(!o||n){var s=Sm();e({type:"update",object:r,newValue:a,oldValue:i}),gf(s)}o=!1,i=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return uZ(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Dv=Jf("ComputedValue",Rv),tw=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),kje={};function KA(){return typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:kje}var nw=!0,mZ=!1,dn=function(){var t=KA();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(nw=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new tw().version&&(nw=!1),nw?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new tw):(setTimeout(function(){mZ||Rr("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new tw)}();function Aje(){(dn.pendingReactions.length||dn.inBatch||dn.isRunningReactions)&&Rr("isolateGlobalState should be called before MobX is running any reactions"),mZ=!0,nw&&(--KA().__mobxInstanceCount===0&&(KA().__mobxGlobals=void 0),dn=new tw)}function JA(){return dn}function Pje(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function yZ(t,e){t.observers.delete(e),t.observers.size===0&&bZ(t)}function bZ(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,dn.pendingUnobservations.push(t))}function du(){dn.inBatch++}function fu(){if(--dn.inBatch===0){SZ();for(var t=dn.pendingUnobservations,e=0;e0&&bZ(t),!1)}function Nje(t){t.lowestObserverState!==Dr.STALE&&(t.lowestObserverState=Dr.STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.UP_TO_DATE&&(e.isTracing!==tc.NONE&&OZ(e,t),e.onBecomeStale()),e.dependenciesState=Dr.STALE}))}function Mje(t){t.lowestObserverState!==Dr.STALE&&(t.lowestObserverState=Dr.STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.POSSIBLY_STALE?e.dependenciesState=Dr.STALE:e.dependenciesState===Dr.UP_TO_DATE&&(t.lowestObserverState=Dr.UP_TO_DATE)}))}function $je(t){t.lowestObserverState===Dr.UP_TO_DATE&&(t.lowestObserverState=Dr.POSSIBLY_STALE,t.observers.forEach(function(e){e.dependenciesState===Dr.UP_TO_DATE&&(e.dependenciesState=Dr.POSSIBLY_STALE,e.isTracing!==tc.NONE&&OZ(e,t),e.onBecomeStale())}))}function OZ(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===tc.BREAK){var n=[];wZ(Uje(t),n,1),new Function(`debugger; /* Tracing '`+t.name+`' You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update The stackframe you are looking for is at least ~6-8 stack-frames up. `+(t instanceof Rv?t.derivation.toString().replace(/[*]\//g,"/"):"")+` The dependencies for this derivation are: `+n.join(` `)+` */ `)()}}function wZ(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(r){return wZ(r,e,n+1)})}var q0=function(){function t(e,n,r,o){e===void 0&&(e="Reaction@"+ls()),o===void 0&&(o=!1),this.name=e,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=o,this.observing=[],this.newObserving=[],this.dependenciesState=Dr.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ls(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=tc.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,dn.pendingReactions.push(this),SZ())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(du(),this._isScheduled=!1,GA(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&os()}catch(e){this.reportExceptionInDerivation(e)}}fu()}},t.prototype.track=function(e){if(!this.isDisposed){du(),this._isRunning=!0;var n=hZ(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&qA(this),Cy(n)&&this.reportExceptionInDerivation(n.cause),fu()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(dn.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";dn.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),dn.globalReactionErrorHandlers.forEach(function(o){return o(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(du(),qA(this),fu()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[In]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),eWe(this,e)},t}(),QB=100,eP=function(t){return t()};function SZ(){dn.inBatch>0||dn.isRunningReactions||eP(Rje)}function Rje(){dn.isRunningReactions=!0;for(var t=dn.pendingReactions,e=0;t.length>0;){++e===QB&&(console.error("Reaction doesn't converge to a stable state after "+QB+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),r=0,o=n.length;r",e);if(arguments.length===2&&typeof n=="function")return sp(e,n);if(arguments.length===1&&typeof e=="string")return HB(e);if(o===!0)_m(e,n,sp(e.name||n,r.value,this));else return HB(n).apply(null,arguments)};rt.bound=Fje;function Vje(t,e){var n=typeof t=="string"?t:t.name||"",r=typeof t=="function"?t:e;return vZ(n,r,this,void 0)}function b2(t,e,n){_m(t,e,sp(e,n.bind(t)))}function zje(t,e){e===void 0&&(e=rD);var n=e&&e.name||t.name||"Autorun@"+ls(),r=!e.scheduler&&!e.delay,o;if(r)o=new q0(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var i=xZ(e),a=!1;o=new q0(n,function(){a||(a=!0,i(function(){a=!1,o.isDisposed||o.track(s)}))},e.onError,e.requiresObservable)}function s(){t(o)}return o.schedule(),o.getDisposer()}var jje=function(t){return t()};function xZ(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:jje}function CZ(t,e,n){n===void 0&&(n=rD);var r=n.name||"Reaction@"+ls(),o=rt(r,n.onError?Wje(n.onError,e):e),i=!n.scheduler&&!n.delay,a=xZ(n),s=!0,l=!1,u,c=n.compareStructural?Mv.structural:n.equals||Mv.default,d=new q0(r,function(){s||i?f():l||(l=!0,a(f))},n.onError,n.requiresObservable);function f(){if(l=!1,!d.isDisposed){var h=!1;d.track(function(){var g=t(d);h=s||!c(u,g),u=g}),s&&n.fireImmediately&&o(u,d),!s&&h===!0&&o(u,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function Wje(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function Qje(t,e,n){return TZ("onBecomeObserved",t,e,n)}function EZ(t,e,n){return TZ("onBecomeUnobserved",t,e,n)}function TZ(t,e,n,r){var o=typeof r=="function"?cd(e,n):cd(e),i=typeof r=="function"?r:n,a=t+"Listeners";o[a]?o[a].add(i):o[a]=new Set([i]);var s=o[t];return typeof s!="function"?Rr(!1):function(){var l=o[a];l&&(l.delete(i),l.size===0&&delete o[a])}}function Hje(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,a=t.reactionRequiresObservable,s=t.observableRequiresReaction;if(t.isolateGlobalState===!0&&Aje(),e!==void 0){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:Rr("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}dn.enforceActions=l,dn.allowStateChanges=!(l===!0||l==="strict")}n!==void 0&&(dn.computedRequiresReaction=!!n),a!==void 0&&(dn.reactionRequiresObservable=!!a),s!==void 0&&(dn.observableRequiresReaction=!!s,dn.allowStateReads=!dn.observableRequiresReaction),r!==void 0&&(dn.computedConfigurable=!!r),o!==void 0&&(o===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),dn.disableErrorBoundaries=!!o),i&&Dje(i)}function tP(t,e,n,r){r=Eg(r);var o=kZ(r);return wp(t),fD(t,r.name,o.enhancer),e&&AZ(t,e,n,o),t}function kZ(t){return t.defaultDecorator||(t.deep===!1?fZ:lD)}function AZ(t,e,n,r){var o,i,a,s;du();try{var a=sje(e);try{for(var l=Hu(a),u=l.next();!u.done;u=l.next()){var s=u.value,c=Object.getOwnPropertyDescriptor(e,s),d=n&&s in n?n[s]:c.get?uS:r,f=d(t,s,c,!0);f&&Object.defineProperty(t,s,f)}}catch(g){o={error:g}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}finally{fu()}}function Uje(t,e){return PZ(cd(t,e))}function PZ(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=rje(t.observing).map(PZ)),e}function NZ(t,e){if(t==null)return!1;if(e!==void 0){if(Dl(t)===!1||!t[In].values.has(e))return!1;var n=cd(t,e);return Dv(n)}return Dv(t)}function Yje(t){return arguments.length>1?Rr(!1):NZ(t)}function UB(t,e){return typeof e!="string"?Rr(!1):NZ(t,e)}function Xje(t,e){return t==null?!1:e!==void 0?Dl(t)?t[In].values.has(e):!1:Dl(t)||!!t[In]||iD(t)||fS(t)||Dv(t)}function Iv(t){return arguments.length!==1&&Rr(!1),Xje(t)}function Lv(t){return Dl(t)?t[In].getKeys():ps(t)||Rl(t)?Array.from(t.keys()):Cc(t)?t.map(function(e,n){return n}):Rr(!1)}function Zje(t){return Dl(t)?Lv(t).map(function(e){return t[e]}):ps(t)?Lv(t).map(function(e){return t.get(e)}):Rl(t)?Array.from(t.values()):Cc(t)?t.slice():Rr(!1)}function Gje(t){return Dl(t)?Lv(t).map(function(e){return[e,t[e]]}):ps(t)?Lv(t).map(function(e){return[e,t.get(e)]}):Rl(t)?Array.from(t.entries()):Cc(t)?t.map(function(e,n){return[n,e]}):Rr(!1)}function cD(t,e,n){if(arguments.length===2&&!Rl(t)){du();var r=e;try{for(var o in r)cD(t,o,r[o])}finally{fu()}return}if(Dl(t)){var i=t[In],a=i.values.get(e);a?i.write(e,n):i.addObservableProp(e,n,i.defaultEnhancer)}else if(ps(t))t.set(e,n);else if(Rl(t))t.add(e);else if(Cc(t))typeof e!="number"&&(e=parseInt(e,10)),ap(e>=0,"Not a valid index: '"+e+"'"),du(),e>=t.length&&(t.length=e+1),t[e]=n,fu();else return Rr(!1)}function MZ(t,e,n,r){return typeof n=="function"?Kje(t,e,n,r):qje(t,e,n)}function qje(t,e,n){return u_(t).observe(e,n)}function Kje(t,e,n,r){return u_(t,e).observe(n,r)}var Jje={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function cg(t,e,n,r){return r.detectCycles&&t.set(e,n),n}function Ud(t,e,n){if(!e.recurseEverything&&!Iv(t)||typeof t!="object")return t;if(t===null)return null;if(t instanceof Date)return t;if(Tje(t))return Ud(t.get(),e,n);Iv(t)&&Lv(t);var r=e.detectCycles===!0;if(r&&t!==null&&n.has(t))return n.get(t);if(Cc(t)||Array.isArray(t)){var o=cg(n,t,[],e),i=t.map(function(h){return Ud(h,e,n)});o.length=i.length;for(var a=0,s=i.length;a0}function s_(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),sZ(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function rc(t,e){var n=Sm();try{for(var r=sD(t.interceptors||[]),o=0,i=r.length;o0}function l_(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),sZ(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function pu(t,e){var n=Sm(),r=t.changeListeners;if(!!r){r=r.slice();for(var o=0,i=r.length;o0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return s_(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),l_(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var r=new Array(e-n),o=0;oi?e=i:e<0&&(e=Math.max(0,i+e)),arguments.length===1?n=i-e:n==null?n=0:n=Math.max(0,Math.min(n,i-e)),r===void 0&&(r=aS),nc(this)){var a=rc(this,{object:this.proxy,type:"splice",index:e,removedCount:n,added:r});if(!a)return aS;n=a.removedCount,r=a.added}r=r.length===0?r:r.map(function(l){return o.enhancer(l,void 0)});var s=this.spliceItemsIntoValues(e,n,r);return(n!==0||r.length!==0)&&this.notifyArraySplice(e,r,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(e,n,r){var o;if(r.length-1?(this.splice(n,1),!0):!1},get:function(t){var e=this[In];if(e){if(t=0&&n++;break}t=JB(t),e=JB(e);var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(typeof l=="function"&&l instanceof l&&typeof u=="function"&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],o=o||[];for(var c=r.length;c--;)if(r[c]===t)return o[c]===e;if(r.push(t),o.push(e),s){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!nP(t[c],e[c],n-1,r,o))return!1}else{var d=Object.keys(t),f=void 0;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(pWe(e,f)&&nP(t[f],e[f],n-1,r,o)))return!1}return r.pop(),o.pop(),!0}function JB(t){return Cc(t)?t.slice():Om(t)||ps(t)||i_(t)||Rl(t)?Array.from(t.entries()):t}function pWe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function hS(t){return t[Symbol.iterator]=gWe,t}function gWe(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Ije,extras:{getDebugName:hWe},$mobx:In});function vWe(t){return!(t.prototype&&t.prototype.render)&&!vr.isPrototypeOf(t)}function IZ(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.prefix,r=n===void 0?"":n,o=e.suffix,i=o===void 0?"":o,a=t.displayName||t.name||t.constructor&&t.constructor.name||"";return r+a+i}var e6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},LZ=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},BZ=function(){function t(e,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=t[e],o=zZ[e],i=r?n===!0?function(){o.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),o.apply(this,arguments)}:o;t[e]=i}function r6(t,e){if(t==null||e==null||(typeof t=="undefined"?"undefined":e6(t))!=="object"||(typeof e=="undefined"?"undefined":e6(e))!=="object")return t!==e;var n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(var r=void 0,o=n.length-1;r=n[o];o--)if(e[r]!==t[r])return!0;return!1}var zZ={componentWillMount:function(){var e=this,n=IZ(this),r=!1,o=!1;function i(d){var f=this[d],h=aD("reactive "+d);Object.defineProperty(this,d,{configurable:!0,enumerable:!0,get:function(){return h.reportObserved(),f},set:function(v){!o&&r6(f,v)?(f=v,r=!0,h.reportChanged(),r=!1):f=v}})}i.call(this,"props"),i.call(this,"state");var a=this.render.bind(this),s=null,l=!1,u=function(){return s=new q0(n+".render()",function(){if(!l&&(l=!0,typeof e.componentWillReact=="function"&&e.componentWillReact(),e.__$mobxIsUnmounted!==!0)){var f=!0;try{o=!0,r||vr.prototype.forceUpdate.call(e),f=!1}finally{o=!1,f&&s.dispose()}}}),s.reactComponent=e,c.$mobx=s,e.render=c,c(e.props,e.state,e.context)},c=function(f,h,g){l=!1;var v=void 0,m=void 0;if(s.track(function(){try{m=bWe(!1,a,f,h,g)}catch(b){v=b}}),v)throw v;return m};this.render=u},componentWillUnmount:function(){this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0},componentDidMount:function(){},componentDidUpdate:function(){},shouldComponentUpdate:function(e,n){return this.state!==n?!0:r6(this.props,e)}};function pD(t){if(arguments.length>1&&t6.warn('Mobx observer: Using observer to inject stores is not supported. Use `@connect(["store1", "store2"]) ComponentClass instead or preferably, use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))``'),t.isMobxInjector===!0&&t6.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),vWe(t)){var e,n;return pD((n=e=function(o){FZ(i,o);function i(){return LZ(this,i),VZ(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return BZ(i,[{key:"render",value:function(){return t.call(this,this.props,this.context)}}]),i}(vr),e.displayName=IZ(t),n))}if(!t)throw new Error("Please pass a valid component to 'observer'");var r=t.prototype||t;return _We(r),t.isMobXReactObserver=!0,t}function _We(t){n6(t,"componentWillMount",!0),n6(t,"componentDidMount"),t.shouldComponentUpdate||(t.shouldComponentUpdate=zZ.shouldComponentUpdate)}var OWe=pD(function(t){var e=t.children;return e[0]()});OWe.displayName="Observer";var wWe=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function SWe(t,e){return e={exports:{}},t(e,e.exports),e.exports}SWe(function(t,e){(function(n,r){t.exports=r()})(wWe,function(){var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);return function c(d,f,h){if(typeof f!="string"){if(u){var g=l(f);g&&g!==u&&c(d,g,h)}var v=i(f);a&&(v=v.concat(a(f)));for(var m=0;m1?qt("div",null," ",o," "):o[0]}},{key:"getChildContext",value:function(){var r={},o=this.context.mobxStores;if(o)for(var i in o)r[i]=o[i];for(var a in this.props)!o6[a]&&a!=="suppressChangedStoreWarning"&&(r[a]=this.props[a]);return{mobxStores:r}}},{key:"componentWillReceiveProps",value:function(r){if(Object.keys(r).length!==Object.keys(this.props).length&&i6.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!r.suppressChangedStoreWarning)for(var o in r)!o6[o]&&this.props[o]!==r[o]&&i6.warn("MobX Provider: Provided store '"+o+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),e})(vr);if(!vr)throw new Error("mobx-preact requires Preact to be available");var zu,_2,a6,jZ=[],Ii=ar,s6=Ii.__b,l6=Ii.__r,u6=Ii.diffed,c6=Ii.__c,d6=Ii.unmount,f6=Ii.__;function xWe(){for(var t;t=jZ.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rw),t.__H.__h.forEach(rP),t.__H.__h=[]}catch(e){t.__H.__h=[],Ii.__e(e,t.__v)}}Ii.__b=function(t){zu=null,s6&&s6(t)},Ii.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),f6&&f6(t,e)},Ii.__r=function(t){l6&&l6(t);var e=(zu=t.__c).__H;e&&(_2===zu?(e.__h=[],zu.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(rw),e.__h.forEach(rP),e.__h=[])),_2=zu},Ii.diffed=function(t){u6&&u6(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(jZ.push(e)!==1&&a6===Ii.requestAnimationFrame||((a6=Ii.requestAnimationFrame)||CWe)(xWe)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),_2=zu=null},Ii.__c=function(t,e){e.some(function(n){try{n.__h.forEach(rw),n.__h=n.__h.filter(function(r){return!r.__||rP(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Ii.__e(r,n.__v)}}),c6&&c6(t,e)},Ii.unmount=function(t){d6&&d6(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{rw(r)}catch(o){e=o}}),n.__H=void 0,e&&Ii.__e(e,n.__v))};var h6=typeof requestAnimationFrame=="function";function CWe(t){var e,n=function(){clearTimeout(r),h6&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);h6&&(e=requestAnimationFrame(n))}function rw(t){var e=zu,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),zu=e}function rP(t){var e=zu;t.__c=t.__(),zu=e}function p6(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function g6(t,e){this.props=t,this.context=e}(g6.prototype=new vr).isPureReactComponent=!0,g6.prototype.shouldComponentUpdate=function(t,e){return p6(this.props,t)||p6(this.state,e)};var v6=ar.__b;ar.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),v6&&v6(t)};var EWe=ar.__e;ar.__e=function(t,e,n,r){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e)}EWe(t,e,n,r)};var m6=ar.unmount;function WZ(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=function(r,o){for(var i in o)r[i]=o[i];return r}({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return WZ(r,e,n)})),t}function QZ(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return QZ(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function O2(){this.__u=0,this.t=null,this.__b=null}function HZ(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function WO(){this.u=null,this.o=null}ar.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),m6&&m6(t)},(O2.prototype=new vr).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=HZ(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=QZ(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},O2.prototype.componentWillUnmount=function(){this.t=[]},O2.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=WZ(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&qt(Pv,null,t.fallback);return o&&(o.__u&=-33),[qt(Pv,null,e.__a?null:t.children),o]};var y6=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]b.step||Math.abs(b.sumDeltaY)>b.step)){var x=b.sumDeltaX%b.step,C=b.sumDeltaY%b.step,E=b.sumDeltaX-x,T=b.sumDeltaY-C;b.sumDeltaX=x,b.sumDeltaY=C;var M=(O=b.model)===null||O===void 0?void 0:O.getData();b.isDragging||((S=b.eventCenter)===null||S===void 0||S.emit(on["".concat(b.eventType,"_DRAGSTART")],{e:w,data:b.data||M}),b.onDragStart({event:w})),b.isDragging=!0,Promise.resolve().then(function(){var k,P;b.onDragging({deltaX:E,deltaY:T,event:w}),(k=b.eventCenter)===null||k===void 0||k.emit(on["".concat(b.eventType,"_MOUSEMOVE")],{deltaX:E,deltaY:T,e:w,data:b.data||M}),(P=b.eventCenter)===null||P===void 0||P.emit(on["".concat(b.eventType,"_DRAG")],{e:w,data:b.data||M})})}},this.handleMouseUp=function(w){var O=window.document;b.isStartDragging=!1,b.isStopPropagation&&w.stopPropagation(),Promise.resolve().then(function(){var S,x,C;O.removeEventListener("mousemove",b.handleMouseMove,!1),O.removeEventListener("mouseup",b.handleMouseUp,!1);var E=(S=b.model)===null||S===void 0?void 0:S.getData();(x=b.eventCenter)===null||x===void 0||x.emit(on["".concat(b.eventType,"_MOUSEUP")],{e:w,data:b.data||E}),b.isDragging&&(b.isDragging=!1,b.onDragEnd({event:w}),(C=b.eventCenter)===null||C===void 0||C.emit(on["".concat(b.eventType,"_DROP")],{e:w,data:b.data||E}))})},this.cancelDrag=function(){var w=window==null?void 0:window.document;w.removeEventListener("mousemove",b.handleMouseMove,!1),w.removeEventListener("mouseup",b.handleMouseUp,!1),b.onDragEnd({event:void 0}),b.isDragging=!1},this.destroy=function(){b.isStartDragging&&b.cancelDrag()},this.onDragStart=r,this.onDragging=i,this.onDragEnd=s,this.step=f,this.isStopPropagation=g,this.eventType=u,this.eventCenter=c,this.model=v,this.data=m}return t.prototype.setStep=function(e){this.step=e},t.prototype.setModel=function(e){this.model=e},t}(),HWe=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{x:e-r/2,y:n-o/2,x1:e+r/2,y1:n+o/2}},UWe=function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,o=(e.y+n.y)/2,i=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-i/2,y:o-a/2,x1:r+i/2,y1:o+a/2}},YWe=function(t){var e=t.points,n=Sp(e),r=tb(n,8),o=r.x,i=r.y,a=r.width,s=r.height;return{x:o-a/2,y:i-s/2,x1:o+a/2,y1:i+s/2}},XWe=function(t){var e=t.path,n=gD(e),r=tb(n,8),o=r.x,i=r.y,a=r.width,s=r.height;return{x:o-a/2,y:i-s/2,x1:o+a/2,y1:i+s/2}},ZWe=function(t){if(t.modelType===er.LINE_EDGE)return UWe(t);if(t.modelType===er.POLYLINE_EDGE)return YWe(t);if(t.modelType===er.BEZIER_EDGE)return XWe(t)},GWe=function(t,e,n,r){var o=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(o===0)return!1;var i=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/o,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-n.x)*(i-r.x)<=0&&(a-n.y)*(a-r.y)<=0?{x:i,y:a}:!1},J0=function(t,e,n){var r=t.x,o=t.y,i=e.x,a=e.y,s=n.x,l=n.y,u=(l-a)/(s-i),c=a-u*i;return(r>=i&&r<=s||r<=i&&r>=s)&&(o>=a&&o<=l||o<=a&&o>=l)&&Math.abs(o-u*r-c)=e.x?(a.leftX=e.x+u*Math.sin(s+l),a.leftY=e.y-u*Math.cos(s+l),a.rightX=e.x-u*Math.sin(s-l),a.rightY=e.y+u*Math.cos(s-l)):(a.leftX=e.x-u*Math.sin(s+l),a.leftY=e.y+u*Math.cos(s+l),a.rightX=e.x+u*Math.sin(s-l),a.rightY=e.y-u*Math.cos(s-l)):i==="end"&&(n.x>=e.x?(a.leftX=n.x+u*Math.sin(s-l),a.leftY=n.y-u*Math.cos(s-l),a.rightX=n.x-u*Math.sin(s+l),a.rightY=n.y+u*Math.cos(s+l)):(a.leftX=n.x-u*Math.sin(s-l),a.leftY=n.y+u*Math.cos(s-l),a.rightX=n.x+u*Math.sin(s+l),a.rightY=n.y-u*Math.cos(s+l))),a},Rg=globalThis&&globalThis.__assign||function(){return Rg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},sf=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;rr/e.height?ho.HORIZONTAL:ho.VERTICAL},gS=function(t,e,n){var r=KWe(n,e);return r===ho.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},C6=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{x:(n+o)/2,y:(r+i)/2,centerX:(n+o)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:o,maxY:i,height:i-r,width:o-n}},tb=function(t,e){t===void 0&&(t=[]);var n=[],r=[];t.forEach(function(c){n.push(c.x),r.push(c.y)});var o=Math.min.apply(Math,sf([],vl(n),!1)),i=Math.max.apply(Math,sf([],vl(n),!1)),a=Math.min.apply(Math,sf([],vl(r),!1)),s=Math.max.apply(Math,sf([],vl(r),!1)),l=i-o,u=s-a;return e&&(l+=e,u+=e),{centerX:(o+i)/2,centerY:(a+s)/2,maxX:i,maxY:s,minX:o,minY:a,x:(o+i)/2,y:(a+s)/2,height:u,width:l}},vS=function(t){var e=t.minX,n=t.minY,r=t.maxX,o=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:o},{x:e,y:o}]},HO=function(t,e){var n=t.x,r=t.y;return ne.maxX||re.maxY},JWe=function(t,e){return et.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},eQe=function(t,e){return et.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},tQe=function(t,e){return sf(sf([],vl(JWe(t,e.x)),!1),vl(eQe(t,e.y)),!1)},iP=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},nQe=function(t,e){var n=-2,r=0;return e.forEach(function(o){o&&(t.x===o.x&&(r+=n),t.y===o.y&&(r+=n))}),r},E6=function(t,e,n,r,o){return iP(t,e)+iP(t,n)+nQe(t,[e,n,r,o])},UZ=function(t,e,n,r,o){o||(o=0),t.unshift(e[r]),n[r]&&n[r]!==r&&o<=100&&UZ(t,e,n,n[r],o+1)},rQe=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},Ey=function(t,e,n,r){var o=e.x-t.x,i=e.y-t.y,a=r.x-n.x,s=r.y-n.y,l=(-i*(t.x-n.x)+o*(t.y-n.y))/(-a*i+o*s),u=(a*(t.y-n.y)-s*(t.x-n.x))/(-a*i+o*s);return l>=0&&l<=1&&u>=0&&u<=1},T6=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=vl(vS(n),4),o=r[0],i=r[1],a=r[2],s=r[3];return Ey(t,e,o,i)||Ey(t,e,o,s)||Ey(t,e,i,a)||Ey(t,e,a,s)},oQe=function(t,e,n,r){var o=[];return t.forEach(function(i){i!==e&&(i.x===e.x||i.y===e.y)&&!T6(i,e,n)&&!T6(i,e,r)&&o.push(i)}),oP(o)},iQe=function(t,e,n,r,o,i,a){var s=[],l=[e],u={},c={},d={};e.id&&(c[e.id]=0,d[e.id]=E6(e,n,e));var f={};t.forEach(function(v){v.id&&(f[v.id]=v)});for(var h=function(){var v,m=1/0;if(l.forEach(function(w){w.id&&d[w.id]=c[w.id])return;u[w.id]=v.id,c[w.id]=O,d[w.id]=c[w.id]+E6(w,n,e,i,a)}})};l.length;){var g=h();if(typeof g=="object")return g.value}return[e,n]},k6=function(t){return Ns(t)},YZ=function(t){for(var e=1;e2&&(b=YZ(b)),oP(b)},aQe=function(t){if(t.length===1){var e=vl(t,1),n=e[0];return[n,n]}else{for(var r=t[0],o=t[1],i=su(r.x,r.y,o.x,o.y),a=1;ai&&(i=u,r=s,o=l)}return[r,o]}},P6=function(t,e,n){var r=Zc(t,n),o=Zc(e,n);return r&&o},N6=function(t,e,n){var r=Zc(t,n),o=Zc(e,n),i=r&&o,a=r||o;return!i&&a},M6=function(t,e,n){for(var r=void 0,o=Ns(n),i=vS(o),a=0;a=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=2}return e},lQe=function(t){var e=t.start,n=t.end,r;if(e.x===n.x&&e.y===n.y)r="";else{var o={start:e,end:n,offset:10,verticalLength:5},i=eb(Rg(Rg({},o),{type:"start"})),a=eb(Rg(Rg({},o),{type:"end"}));r="M".concat(i.leftX," ").concat(i.leftY,` L`).concat(i.rightX," ").concat(i.rightY,` L`).concat(a.rightX," ").concat(a.rightY,` L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:r,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},R6=function(t){var e=t.start,n=t.end,r=t.sourceNode,o=t.targetNode,i=t.offset,a=Ns(r),s=Ns(o),l=pS(a,i),u=pS(s,i),c=gS(l,a,e),d=gS(u,s,n);return{sNext:c,ePre:d}},gD=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=UO(e[0]),r=UO(e[1]),o=UO(e[2]),i=UO(e[3]);return[n,r,o,i]},UO=function(t){var e=vl(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],r=e[1];return{x:+n,y:+r}},D6=function(t,e){var n=vl(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=qQe(r,o,i,a,e);return[s,t[3]]},ZZ=function(t,e){for(var n=t.x,r=t.y,o=Sp(e),i=Number.MAX_SAFE_INTEGER,a,s=[],l=0;lo?a:o}),{width:Math.ceil(o/2)*r+r/4,height:n*(r+2)+r/4}},dg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},YO=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},S2=function(t,e,n){var r=w2(t,2),o=r[0],i=r[1],a=w2(e,2),s=a[0],l=a[1],u=w2(n,2),c=u[0],d=u[1];return o>s&&ol&&i=0?o:-o},e}(qZ),aP=function(t){vD(e,t);function e(n,r){var o=t.call(this,n,r,1)||this;return Object.setPrototypeOf(o,e.prototype),o}return e.prototype.toString=function(){return"Point"},e}(qZ),HC=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},x2=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},sP=function(t){var e=t.anchors;return e},_S=function(t,e){for(var n=e.nodes,r,o=n.length-1;o>=0;o--){var i=n[o],a=yQe(t,i);if(a){var s=i.getTargetAnchor(t);if(s){var l={node:i,anchorIndex:s.index,anchor:s.anchor};(!r||vQe(i,r.node,e))&&(r=l)}}}return r},vQe=function(t,e,n){return t.zIndex>e.zIndex?!0:n.nodesMap[t.id].index>n.nodesMap[e.id].index},mQe=function(t,e){for(var n=sP(e),r,o=Number.MAX_SAFE_INTEGER,i=0;i=o.minX-n&&l.x<=o.maxX+n&&l.y>=o.minY-n&&l.y<=o.maxY+n&&(r=!0),r},yQe=function(t,e){return Zc(t,e,5)},Ns=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{minX:e-r/2,minY:n-o/2,maxX:e+r/2,maxY:n+o/2,x:e,y:n,width:r,height:o,centerX:e,centerY:n}},bQe=function(t){var e=t,n=e.x,r=e.y,o=e.width,i=e.height,a=e.radius;return[{x:n-o/2+a,y:r-i/2+a,r:a},{x:n+o/2-a,y:r-i/2+a,r:a},{x:n-o/2+a,y:r+i/2-a,r:a},{x:n+o/2-a,y:r+i/2-a,r:a}]},B6=function(t,e,n){var r=bQe(n),o,i=Number.MAX_SAFE_INTEGER;return r.forEach(function(a){var s=su(t.x,t.y,a.x,a.y);su.minX&&t.xu.minY&&t.yc.x&&(d=c,f=u);var h={x:t.x,y:t.y};if(d.x===f.x&&e===ho.HORIZONTAL&&(h={x:d.x,y:t.y}),d.y===f.y&&e===ho.VERTICAL&&(h={x:t.x,y:d.y}),d.x!==f.x&&d.y!==f.y){var g=(f.y-d.y)/(f.x-d.x),v=(d.x*f.y-f.x*d.y)/(d.x-f.x);e===ho.HORIZONTAL?h={x:(t.y-v)/g,y:t.y}:e===ho.VERTICAL&&(h={x:t.x,y:g*t.x+v})}var m=J0(h,u,c);if(m){var b=su(h.x,h.y,t.x,t.y);bt.x?o=t.x+n/2:e.xt.y?i=t.y+r/2:e.y1?e.forEach(function(s){var l=document.createElement("div");l.textContent=s,i.appendChild(l)}):i.textContent=e[0],document.body.appendChild(i);var a=i.clientHeight;return document.body.removeChild(i),a},j6=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,o=0;return e&&e.forEach(function(i){var a=XZ(i);o=a>o?a:o}),{width:Math.ceil(o/2)*r+r/4,height:n*(r+2)+r/4}},OS=function(t){return typeof t!="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t};let ZO;const OQe=new Uint8Array(16);function wQe(){if(!ZO&&(ZO=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ZO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ZO(OQe)}const Di=[];for(let t=0;t<256;++t)Di.push((t+256).toString(16).slice(1));function SQe(t,e=0){return Di[t[e+0]]+Di[t[e+1]]+Di[t[e+2]]+Di[t[e+3]]+"-"+Di[t[e+4]]+Di[t[e+5]]+"-"+Di[t[e+6]]+Di[t[e+7]]+"-"+Di[t[e+8]]+Di[t[e+9]]+"-"+Di[t[e+10]]+Di[t[e+11]]+Di[t[e+12]]+Di[t[e+13]]+Di[t[e+14]]+Di[t[e+15]]}const xQe=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var W6={randomUUID:xQe};function JZ(t,e,n){if(W6.randomUUID&&!e&&!t)return W6.randomUUID();t=t||{};const r=t.random||(t.rng||wQe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return SQe(r)}var vf=function(){return JZ()},Zy=new Map,eG=function(t){var e=vf();function n(){t();var o=Zy.get(e);if(o){var i=window.requestAnimationFrame(n);Zy.set(e,i)}}var r=window.requestAnimationFrame(n);return Zy.set(e,r),e},wS=function(t){var e=Zy.get(t);e&&(window.cancelAnimationFrame(e),Zy.delete(t))},nb=globalThis&&globalThis.__assign||function(){return nb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function tG(t){var e=t.x,n=e===void 0?0:e,r=t.y,o=r===void 0?0:r,i=t.value,a=t.fontSize,s=a===void 0?12:a,l=t.fill,u=l===void 0?"currentColor":l,c=t.overflowMode,d=c===void 0?"default":c,f=t.textWidth,h=f===void 0?void 0:f,g=t.model,v={x:n,y:o,fill:u,fontSize:s,textAnchor:"middle",dominantBaseline:"central"};if(zn(sc(t),function(x){var C=CQe(x,2),E=C[0],T=C[1];typeof T!="object"&&(v[E]=T)}),i){var m=String(i).split(/[\r\n]/g),b=m.length;if(d!=="default"){var w=g.BaseType,O=g.modelType;if(w===Eo.NODE&&O!==er.TEXT_NODE||w===Eo.EDGE&&h)return EQe(t)}if(b>1){var S=m.map(function(x,C){var E=s+2,T=(C-(b-1)/2)*E;return ot("tspan",{className:"lf-text-tspan",x:n,y:o+T,children:x})});return ot("text",nb({},v,{children:S}))}return ot("text",nb({},v,{children:i}))}return null}function EQe(t){var e=t.x,n=t.y,r=t.value,o=t.model,i=t.textWidth,a=t.fontSize,s=a===void 0?12:a,l=t.lineHeight,u=t.fontFamily,c=u===void 0?"":u,d=t.wrapPadding,f=d===void 0?"0, 0":d,h=t.overflowMode,g=o.width,v=o.height,m=o.textHeight,b=i||g,w=String(r).split(/[\r\n]/g),O=w.length,S=KZ({rows:w,style:{fontSize:"".concat(s,"px"),width:"".concat(b,"px"),fontFamily:c,lineHeight:l,padding:f},rowsLength:O,className:"lf-get-text-height"}),x=v>S?v:S;m&&(x=m);var C=h==="ellipsis";return C&&(x=s+2),ot("g",{children:ot("foreignObject",{width:b,height:x,x:e-b/2,y:n-x/2,style:{overflow:"visible",textAlign:"left"},children:ot("div",{className:"lf-node-text-auto-wrap",style:{minHeight:x,width:b,padding:f},children:ot("div",{className:C?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:C?w.join(""):"",style:nb({},t),children:w.map(function(E){return ot("div",{className:"lf-node-text--auto-wrap-inner",children:E})})})})})})}var uP=globalThis&&globalThis.__assign||function(){return uP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function Fv(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return zn(sc(t),function(n){var r=TQe(n,2),o=r[0],i=r[1];(o==="style"||typeof i!="object")&&(e[o]=i)}),ot("line",uP({},e))}var cP=globalThis&&globalThis.__assign||function(){return cP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function ml(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=t.className,a=t.strokeWidth,s=t.radius,l=s===void 0?0:s,u=e-r/2,c=n-o/2,d={};return d["stroke-width"]=a,zn(sc(t),function(f){var h=kQe(f,2),g=h[0],v=h[1];typeof v!="object"&&(d[g]=v)}),i?d.className="lf-basic-shape ".concat(i):d.className="lf-basic-shape",l&&(d.rx=l,d.ry=l),d.x=u,d.y=c,ot("rect",cP({},d))}var dP=globalThis&&globalThis.__assign||function(){return dP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function rb(t){var e={d:""};return zn(sc(t),function(n){var r=AQe(n,2),o=r[0],i=r[1];(o==="style"||typeof i!="object")&&(e[o]=i)}),ot("path",dP({},e))}var fP=globalThis&&globalThis.__assign||function(){return fP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function Vv(t){var e=t.x,n=e===void 0?0:e,r=t.y,o=r===void 0?0:r,i=t.r,a=i===void 0?4:i,s=t.className,l={cx:n,cy:o,r:a,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return zn(sc(t),function(u){var c=PQe(u,2),d=c[0],f=c[1];typeof f!="object"&&(l[d]=f)}),s?l.className="lf-basic-shape ".concat(s):l.className="lf-basic-shape",ot("circle",fP({},l))}var hP=globalThis&&globalThis.__assign||function(){return hP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function MQe(t){var e=t.x,n=e===void 0?0:e,r=t.y,o=r===void 0?0:r,i=t.rx,a=i===void 0?4:i,s=t.ry,l=s===void 0?4:s,u=t.className,c={cx:n,cy:o,rx:a,ry:l,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return zn(sc(t),function(d){var f=NQe(d,2),h=f[0],g=f[1];typeof g!="object"&&(c[h]=g)}),u?c.className="lf-basic-shape ".concat(u):c.className="lf-basic-shape",ot("ellipse",hP({},c))}var SS=globalThis&&globalThis.__assign||function(){return SS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function RQe(t,e){var n=t.map(function(w){return{x:w[0],y:w[1]}}),r=n.length;if(r<3)return"";for(var o=Math.abs(e),i="",a=0;a0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function IQe(t){var e=t.className,n={points:"",fill:"none"};return zn(sc(t),function(r){var o=DQe(r,2),i=o[0],a=o[1];(i==="style"||typeof a!="object")&&(n[i]=a)}),e&&(n.className="".concat(e)),ot("polyline",pP({},n))}var nG=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ob=globalThis&&globalThis.__assign||function(){return ob=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Nr;(function(t){t[t.LEFT_TOP=0]="LEFT_TOP",t[t.RIGHT_TOP=1]="RIGHT_TOP",t[t.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",t[t.LEFT_BOTTOM=3]="LEFT_BOTTOM"})(Nr||(Nr={}));var FQe=function(t){nG(e,t);function e(n){var r=t.call(this)||this;r.isShiftPressed=!1,r.bindKeyboardEvents=function(){document.addEventListener("keydown",r.handleKeyDown),document.addEventListener("keyup",r.handleKeyUp)},r.handleKeyDown=function(s){s.key==="Shift"&&(r.isShiftPressed=!0)},r.handleKeyUp=function(s){s.key==="Shift"&&(r.isShiftPressed=!1)},r.updateEdgePointByAnchors=function(){var s=r.nodeModel,l=s.id,u=s.anchors,c=r.graphModel.getNodeEdges(l);zn(c,function(d){if(d.sourceNodeId===l){var f=Cf(u,function(h){return h.id===d.sourceAnchorId});f&&d.updateStartPoint({x:f.x,y:f.y})}else if(d.targetNodeId===l){var f=Cf(u,function(g){return g.id===d.targetAnchorId});f&&d.updateEndPoint({x:f.x,y:f.y})}})},r.triggerResizeEvent=function(s,l,u,c,d,f){r.graphModel.eventCenter.emit(on.NODE_RESIZE,{preData:s,data:l,deltaX:u,deltaY:c,index:d,model:f})},r.recalcResizeInfo=function(s,l,u,c,d){u===void 0&&(u=1),c===void 0&&(c=!1),d===void 0&&(d=!1);var f=bn(l),h=f.deltaX,g=f.deltaY,v=f.width,m=f.height,b=f.PCTResizeInfo;if(b){var w=4,O=0,S=0;switch(s){case Nr.LEFT_TOP:S=(h*-1-g)/w;break;case Nr.RIGHT_TOP:S=(h-g)/w;break;case Nr.RIGHT_BOTTOM:S=(h+g)/w;break;case Nr.LEFT_BOTTOM:S=(h*-1+g)/w;break}S!==0&&(O=Math.round(S/b.ResizeBasis.basisHeight*1e5)/1e3),b.ResizePCT.widthPCT=Math.max(Math.min(b.ResizePCT.widthPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit),b.ResizePCT.heightPCT=Math.max(Math.min(b.ResizePCT.heightPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit);var x=Math.round(b.ResizePCT.widthPCT*b.ResizeBasis.basisWidth/100),C=Math.round(b.ResizePCT.heightPCT*b.ResizeBasis.basisHeight/100);switch(s){case Nr.LEFT_TOP:h=v-x,g=m-C;break;case Nr.RIGHT_TOP:h=x-v,g=m-C;break;case Nr.RIGHT_BOTTOM:h=x-v,g=C-m;break;case Nr.LEFT_BOTTOM:h=v-x,g=C-m;break}return f}switch(s){case Nr.LEFT_TOP:f.width=c?v:v-h*u,f.height=d?m:m-g*u;break;case Nr.RIGHT_TOP:f.width=c?v:v+h*u,f.height=d?m:m-g*u;break;case Nr.RIGHT_BOTTOM:f.width=c?v:v+h*u,f.height=d?m:m+g*u;break;case Nr.LEFT_BOTTOM:f.width=c?v:v-h*u,f.height=d?m:m+g*u;break}return f},r.resizeNode=function(s){var l=s.deltaX,u=s.deltaY,c=r.index,d=r.props,f=d.model,h=d.graphModel,g=d.x,v=d.y;rG({x:g,y:v,deltaX:l,deltaY:u,index:c,nodeModel:f,graphModel:h,forceProportional:r.isShiftPressed,cancelCallback:function(){r.dragHandler.cancelDrag()}})},r.onDragStart=function(){r.graphModel.selectNodeById(r.nodeModel.id)},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.graphModel.transformModel,d=BQe(c.fixDeltaXY(l,u),2),f=d[0],h=d[1];r.resizeNode({deltaX:f,deltaY:h})},r.onDragEnd=function(){var s=r.nodeModel.x,l=r.nodeModel.y;r.nodeModel.moveTo(s,l),r.updateEdgePointByAnchors()};var o=n.index,i=n.model,a=n.graphModel;return r.index=o,r.nodeModel=i,r.graphModel=a,r.dragHandler=new Fl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:a.gridSize}),r.bindKeyboardEvents(),r}return e.prototype.componentWillUnmount=function(){this.dragHandler.destroy(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},e.prototype.render=function(){var n=this.props,r=n.x,o=n.y,i=n.direction,a=n.model,s=a.getResizeControlStyle(),l=s.width,u=s.height,c=LQe(s,["width","height"]);return ot("g",{className:"lf-resize-control lf-resize-control-".concat(i),children:[ot(ml,ob({className:"lf-resize-control-content",x:r,y:o,width:l!=null?l:7,height:u!=null?u:7},c)),ot(ml,{className:"lf-resize-control-content",x:r,y:o,width:25,height:25,fill:"transparent",stroke:"transparent",onMouseDown:this.dragHandler.handleMouseDown})]})},e}(vr),VQe=function(t){nG(e,t);function e(){return t.call(this)||this}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,o=n.graphModel,i=Ns(r),a=i.minX,s=i.minY,l=i.maxX,u=i.maxY,c=[{index:Nr.LEFT_TOP,direction:"nw",x:a,y:s},{index:Nr.RIGHT_TOP,direction:"ne",x:l,y:s},{index:Nr.RIGHT_BOTTOM,direction:"se",x:l,y:u},{index:Nr.LEFT_BOTTOM,direction:"sw",x:a,y:u}];return $a(c,function(d){return ot(FQe,ob({},d,{model:r,graphModel:o}))})},e.prototype.getResizeOutline=function(){var n=this.props.model,r=n.x,o=n.y,i=n.width,a=n.height,s=n.getResizeOutlineStyle();return ot(ml,ob({},s,{x:r,y:o,width:i,height:a}))},e.prototype.render=function(){return ot("g",{className:"lf-resize-control-group",children:[this.getResizeOutline(),this.getResizeControl()]})},e}(vr);function zQe(t,e){var n=t.x,r=t.y,o=e.x,i=e.y,a={x:n+(o-n)/2,y:r+(i-r)/2};return a}function Ty(t,e,n){var r=jQe(n),o=t.x-e.x,i=t.y-e.y,a=o*Math.cos(r)-i*Math.sin(r)+e.x,s=o*Math.sin(r)+i*Math.cos(r)+e.y;return{x:a,y:s}}function jQe(t){return t*Math.PI/180}function WQe(t){return t/Math.PI*180}function QQe(t,e,n,r,o,i,a,s){o===void 0&&(o=!1),i===void 0&&(i=!1);var l={x:n.x-(t.x-n.x),y:n.y-(t.y-n.y)},u=zQe(l,e),c=Ty(e,u,-r),d=Ty(l,u,-r);if(o){var f=Math.abs(c.x-d.x),h=f-a;u.x>c.x?u.x=u.x+h/2:u.x=u.x-h/2}if(i){var g=Math.abs(c.y-d.y),v=g-s;u.y>c.y?u.y=u.y+v/2:u.y=u.y-v/2}if(o||i){var m=Ty(d,u,r),b=m.x-l.x,w=m.y-l.y;u.x=u.x-b,u.y=u.y-w,d=Ty(l,u,-r),c={x:u.x-(d.x-u.x),y:u.y-(d.y-u.y)}}var O=Math.abs(c.x-d.x),S=Math.abs(c.y-d.y);return o&&(O=a),i&&(S=s),{width:O,height:S,center:u}}function HQe(t,e,n,r,o,i,a,s,l){s===void 0&&(s=!1),l===void 0&&(l=!1);var u=e.deltaX,c=e.deltaY,d=e.width,f=e.height,h=WQe(n),g={x:r,y:o},v={x:i,y:a},m=Ty(g,v,h),b={x:m.x+u,y:m.y+c},w=QQe(m,b,v,h,s,l,d,f),O=w.width,S=w.height,x=w.center;return e.width=O*t,e.height=S*t,e.deltaX=(x.x-v.x)*2,e.deltaY=(x.y-v.y)*2,e}var UQe=function(t,e,n,r,o,i,a,s,l,u,c){n===void 0&&(n=1),r===void 0&&(r=!1),o===void 0&&(o=!1),i===void 0&&(i=0),c===void 0&&(c=!1);var d=bn(e),f=d.deltaX,h=d.deltaY,g=d.width,v=d.height,m=d.PCTResizeInfo;if(m){var b=4,w=0,O=0;switch(t){case Nr.LEFT_TOP:O=(f*-1-h)/b;break;case Nr.RIGHT_TOP:O=(f-h)/b;break;case Nr.RIGHT_BOTTOM:O=(f+h)/b;break;case Nr.LEFT_BOTTOM:O=(f*-1+h)/b;break}O!==0&&(w=Math.round(O/m.ResizeBasis.basisHeight*1e5)/1e3),m.ResizePCT.widthPCT=Math.max(Math.min(m.ResizePCT.widthPCT+w,m.ScaleLimit.maxScaleLimit),m.ScaleLimit.minScaleLimit),m.ResizePCT.heightPCT=Math.max(Math.min(m.ResizePCT.heightPCT+w,m.ScaleLimit.maxScaleLimit),m.ScaleLimit.minScaleLimit);var S=Math.round(m.ResizePCT.widthPCT*m.ResizeBasis.basisWidth/100),x=Math.round(m.ResizePCT.heightPCT*m.ResizeBasis.basisHeight/100);switch(t){case Nr.LEFT_TOP:f=g-S,h=v-x;break;case Nr.RIGHT_TOP:f=S-g,h=v-x;break;case Nr.RIGHT_BOTTOM:f=S-g,h=x-v;break;case Nr.LEFT_BOTTOM:f=g-S,h=x-v;break}return d}if(i%(2*Math.PI)!==0&&a!==void 0&&s!==void 0)return HQe(n,d,i,a,s,l,u,r,o);if(c){var C=g/v,E=0,T=g,M=v;switch(t){case Nr.LEFT_TOP:E=Math.abs(f)>Math.abs(h)?-f:-h,C>=1?(T=g+E,M=T/C):(M=v+E,T=M*C),d.width=T,d.height=M,d.deltaX=g-T,d.deltaY=v-M;break;case Nr.RIGHT_TOP:E=Math.abs(f)>Math.abs(h)?f:-h,C>=1?(T=g+E,M=T/C):(M=v-E,T=M*C),d.width=T,d.height=M,d.deltaX=T-g,d.deltaY=v-M;break;case Nr.RIGHT_BOTTOM:E=Math.abs(f)>Math.abs(h)?f:h,C>=1?(T=g+E,M=T/C):(M=v+E,T=M*C),d.width=T,d.height=M,d.deltaX=T-g,d.deltaY=M-v;break;case Nr.LEFT_BOTTOM:E=Math.abs(f)>Math.abs(h)?-f:h,C>=1?(T=g-E,M=T/C):(M=v+E,T=M*C),d.width=T,d.height=M,d.deltaX=g-T,d.deltaY=M-v;break}return d}switch(t){case Nr.LEFT_TOP:d.width=r?g:g-f*n,d.height=o?v:v-h*n;break;case Nr.RIGHT_TOP:d.width=r?g:g+f*n,d.height=o?v:v-h*n;break;case Nr.RIGHT_BOTTOM:d.width=r?g:g+f*n,d.height=o?v:v+h*n;break;case Nr.LEFT_BOTTOM:d.width=r?g:g-f*n,d.height=o?v:v+h*n;break}return d},YQe=function(t,e){var n=t.id,r=t.anchors,o=e.getNodeEdges(n);zn(o,function(i){if(i.sourceNodeId===n){var a=Cf(r,function(s){return s.id===i.sourceAnchorId});a&&i.updateStartPoint({x:a.x,y:a.y})}else if(i.targetNodeId===n){var a=Cf(r,function(l){return l.id===i.targetAnchorId});a&&i.updateEndPoint({x:a.x,y:a.y})}})},XQe=function(t,e,n,r,o,i,a){a.eventCenter.emit(on.NODE_RESIZE,{preData:t,data:e,deltaX:n,deltaY:r,index:o,model:i})},rG=function(t){var e=t.x,n=t.y,r=t.deltaX,o=t.deltaY,i=t.index,a=t.nodeModel,s=t.graphModel,l=t.cancelCallback,u=t.forceProportional,c=u===void 0?!1:u,d=a.r,f=a.rx,h=a.ry,g=a.width,v=a.height,m=a.PCTResizeInfo,b=a.minWidth,w=a.minHeight,O=a.maxWidth,S=a.maxHeight,x=a.rotate,C=a.x,E=a.y,T=b===O,M=w===S,k={width:d||f||g,height:d||h||v,deltaX:r,deltaY:o,PCTResizeInfo:m},P=d||f&&h?1/2:1,R=e,D=n,F=UQe(i,k,P,T,M,x,R,D,C,E,c);if(F.widthO||F.heightS){l==null||l();return}(x%(2*Math.PI)==0||m||R===void 0||D===void 0)&&(F.deltaX=T?0:F.deltaX,F.deltaY=M?0:F.deltaY);var W=a.getData(),I=a.resize(F);W.x===I.x&&W.y===I.y||(YQe(a,s),XQe(W,I,r,o,i,a,s))},ZQe=100,GQe={x:1,y:0,z:0};function qQe(t,e,n,r,o){for(var i=function(h){if(h<0||h>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-h,3)+3*e.x*h*Math.pow(1-h,2)+3*n.x*Math.pow(h,2)*(1-h)+r.x*Math.pow(h,3),y:t.y*Math.pow(1-h,3)+3*e.y*h*Math.pow(1-h,2)+3*n.y*Math.pow(h,2)*(1-h)+r.y*Math.pow(h,3)}},a=0,s=2,l=r.x,u=r.y,c=r;a=0?r:-r}function Q6(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function tHe(t){return eHe(GQe,t)}function nHe(t){return t*(180/Math.PI)}var oG={baseNode:{fill:"#fff",stroke:"#000",strokeWidth:2},baseEdge:{stroke:"#000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#000",overflowMode:"default",fontSize:12,lineHeight:1.2},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#fff"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},rHe={rect:{radius:8},diamond:{radius:8},polygon:{radius:8},polyline:{radius:8},arrow:{strokeLinecap:"round",strokeLinejoin:"round",offset:10,verticalLength:5},snapline:{strokeLinecap:"round",strokeLinejoin:"round",stroke:"#949494",strokeWidth:1},outline:{radius:8,fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},resizeOutline:{radius:8,fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},oHe={baseNode:{fill:"#23272e",stroke:"#fefeff"},baseEdge:{stroke:"#fefeff"},rect:{radius:8},diamond:{radius:8},polygon:{radius:8},polyline:{radius:8},nodeText:{color:"#fefeff",overflowMode:"default",fontSize:12,lineHeight:1.2},arrow:{strokeLinecap:"round",strokeLinejoin:"round",offset:10,verticalLength:5},snapline:{strokeLinecap:"round",strokeLinejoin:"round",stroke:"#949494",strokeWidth:1},outline:{radius:8,fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},resizeOutline:{radius:8,fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},iHe={rect:{fill:"#72CBFF",stroke:"#3ABDF9",radius:8},circle:{fill:"#FFE075",stroke:"#F9CE3A",radius:8},ellipse:{fill:"#FFA8A8",stroke:"#FF6B66",radius:8},text:{fill:"#72CBFF",radius:8},diamond:{fill:"#96F7AF",stroke:"#40EF7E",radius:8},polygon:{fill:"#E0A8FF",stroke:"#C271FF",radius:8},polyline:{radius:8},arrow:{strokeLinecap:"round",strokeLinejoin:"round",offset:10,verticalLength:5},snapline:{strokeLinecap:"round",strokeLinejoin:"round",stroke:"#949494",strokeWidth:1},outline:{radius:8,fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},resizeOutline:{radius:8,fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},ib={colorful:iHe,dark:oHe,radius:rHe,default:oG},aHe={background:"#23272e"},sHe={background:"#fefeff"},gP={background:"#ffffff"},ab={colorful:sHe,dark:aHe,radius:gP,default:gP},lHe={color:"#66676a",thickness:1},uHe={color:"#dadada",thickness:1},vP={color:"#acacac",thickness:1},sb={colorful:uHe,dark:lHe,radius:vP,default:vP},iG=function(t,e){var n=bn(oG);return e&&(n=nd(n,ib[e])),t&&(n=nd(n,t)),n},cHe=function(t,e){if(ib[t]){console.warn("theme mode ".concat(t," already exists"));return}ib[t]=e,ab[t]=e.background||gP,sb[t]=e.grid||vP},dHe=function(t){delete ib[t],delete ab[t],delete sb[t]},H6=function(){var t={colorful:{},dark:{},radius:{},default:{}};kr(ib,t),kr(ab,t),kr(sb,t)},fHe=iG,hHe=1e3,pHe=999,yD=function(){return++hHe},gHe=function(){return--pHe},Wo=globalThis&&globalThis.__assign||function(){return Wo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},UC=function(){function t(e,n){var r;this.BaseType=Eo.EDGE,this.id="",this.type="",this.sourceNodeId="",this.targetNodeId="",this.textMode=xl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this.points="",this.pointsList=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.isAnimation=!1,this.isShowAdjustPoint=!1,this.zIndex=0,this.state=Ar.DEFAULT,this.modelType=er.EDGE,this.customTextPosition=!1,this.style={},this.arrowConfig={markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")},this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initEdgeData(e),this.setAttributes()}return t.prototype.initEdgeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),o=this.createId();e.id=o||r||vf()}this.arrowConfig.markerEnd="url(#marker-end-".concat(e.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(e.id,")");var i=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=i,kr(this,uQe(e));var a=this.graphModel.overlapMode;a===ou.INCREASE&&(this.zIndex=e.zIndex||yD()),this.setAnchors(),this.initPoints(),this.formatText(e)},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.getEdgeStyle=function(){return Wo(Wo({},this.graphModel.theme.baseEdge),this.style)},t.prototype.getAdjustPointStyle=function(){return Wo({},this.graphModel.theme.edgeAdjust)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.edgeText;return bn(e)},t.prototype.getEdgeAnimationStyle=function(){var e=this.graphModel.theme.edgeAnimation;return bn(e)},t.prototype.getArrowStyle=function(){var e=this.getEdgeStyle(),n=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,o=this.isAnimation?n.stroke:e.stroke;return Wo(Wo(Wo({},e),{fill:o,stroke:o}),r)},t.prototype.getOutlineStyle=function(){var e=this.graphModel,n=e.theme.outline;return bn(n)},t.prototype.getTextPosition=function(){return{x:0,y:0}},Object.defineProperty(t.prototype,"sourceNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textPosition",{get:function(){return this.getTextPosition()},enumerable:!1,configurable:!0}),t.prototype.getBeginAnchor=function(e,n,r){var o,i,a=sP(e);if(r){if(o=Cf(a,function(s){return s.id===r}),o)return o;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u8D77\u70B9\u951A\u70B9".concat(r,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u8D77\u70B9"))}return a.forEach(function(s){var l=I6(s,n);(i===void 0||l=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},C2=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},mP=function(t){vHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.BEZIER_EDGE,o.path="",o.initEdgeData(n),o.setAttributes(),o}return e.prototype.initEdgeData=function(n){this.offset=Vr(n,"properties.offset",100),t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.bezier,r=t.prototype.getEdgeStyle.call(this),o=this.properties.style,i=o===void 0?{}:o;return Ih(Ih(Ih({},r),bn(n)),bn(i))},e.prototype.getTextPosition=function(){if(this.pointsList&&this.pointsList.length>0){var n=0,r=0;return this.pointsList.forEach(function(o){var i=o.x,a=o.y;n+=i,r+=a}),{x:n/this.pointsList.length,y:r/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(o){var i=o.x,a=o.y;return{x:i,y:a}});return Ih(Ih({},n),{pointsList:r})},e.prototype.getControls=function(){var n=this.startPoint,r=this.endPoint,o=R6({start:n,end:r,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return o},e.prototype.getPath=function(n){var r=C2(n,4),o=r[0],i=r[1],a=r[2],s=r[3];return"M ".concat(o.x," ").concat(o.y,` C `).concat(i.x," ").concat(i.y,`, `).concat(a.x," ").concat(a.y,`, `).concat(s.x," ").concat(s.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),r=n.sNext,o=n.ePre;this.updatePath(r,o)},e.prototype.updatePath=function(n,r){n=bn(n),r=bn(r);var o={x:this.startPoint.x,y:this.startPoint.y},i={x:this.endPoint.x,y:this.endPoint.y};if(!n||!r){var a=this.getControls();n=a.sNext,r=a.ePre}this.pointsList=[o,n,r,i],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r;var o=C2(this.pointsList,3),i=o[1],a=o[2];i.x+=n,i.y+=r,this.updatePath(i,a)},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r;var o=C2(this.pointsList,3),i=o[1],a=o[2];a.x+=n,a.y+=r,this.updatePath(i,a)},e.prototype.updateAdjustAnchor=function(n,r){var o;r==="sNext"?this.pointsList[1]=n:r==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((o=this.text)===null||o===void 0)&&o.value&&this.setText(kr({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,o=n.endPoint,i=n.sourceNode,a=n.targetNode,s=R6({start:r,end:o,sourceNode:i,targetNode:a,offset:this.offset}),l=s.sNext,u=s.ePre;this.pointsList=[r,l,u,o],this.initPoints()},al([it],e.prototype,"offset",void 0),al([it],e.prototype,"path",void 0),al([rt],e.prototype,"initPoints",null),al([rt],e.prototype,"updatePoints",null),al([rt],e.prototype,"updateStartPoint",null),al([rt],e.prototype,"updateEndPoint",null),al([rt],e.prototype,"moveStartPoint",null),al([rt],e.prototype,"moveEndPoint",null),al([rt],e.prototype,"updateAdjustAnchor",null),al([rt],e.prototype,"getAdjustStart",null),al([rt],e.prototype,"getAdjustEnd",null),al([rt],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(UC),mHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gy=globalThis&&globalThis.__assign||function(){return Gy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},yHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},X6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},_He=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;rl)&&(a=l,i=s)}),i},e.prototype.getCrossPoint=function(n,r,o){var i;return n===ho.HORIZONTAL?i={x:o.x,y:r.y}:n===ho.VERTICAL&&(i={x:r.x,y:o.y}),i},e.prototype.removeCrossPoints=function(n,r,o){var i=o.map(function(b){return b});if(n===1){var a=i[n],s=i[r],l=i[n-1],u=P6(l,a,this.sourceNode);if(u){var c=N6(a,s,this.sourceNode);if(c){var d=M6(a,s,this.sourceNode);d&&(i[n]=d,i.splice(n-1,1),n--,r--)}}else{var f=this.sourceNode.anchors;f.forEach(function(b){if(b.x===l.x&&b.x===a.x||b.y===l.y&&b.y===a.y){var w=su(b.x,b.y,a.x,a.y),O=su(l.x,l.y,a.x,a.y);w0?this.points=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=A6({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=n,this.points=n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r,this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r,this.updatePoints()},e.prototype.updatePointsList=function(n,r){this.pointsList.forEach(function(a){a.x+=n,a.y+=r});var o=this.pointsList[0];this.startPoint=Object.assign({},o);var i=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},i),this.initPoints()},e.prototype.dragAppendStart=function(){this.draggingPointList=this.pointsList.map(function(n){return n})},e.prototype.dragAppendSimple=function(n,r){var o;this.isDragging=!0;var i=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList,d=c;return u===ho.HORIZONTAL?(c[s]={x:i.x,y:i.y+r.y},c[l]={x:a.x,y:a.y+r.y},d=this.pointsList.map(function(f){return f})):u===ho.VERTICAL&&(c[s]={x:i.x+r.x,y:i.y},c[l]={x:a.x+r.x,y:a.y},d=this.pointsList.map(function(f){return f})),this.updatePointsAfterDrag(d),this.draggingPointList=d,!((o=this.text)===null||o===void 0)&&o.value&&this.setText(kr({},this.text,this.textPosition)),{start:kr({},c[s]),end:kr({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppend=function(n,r){var o;this.isDragging=!0;var i=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList;if(u===ho.HORIZONTAL){c[s]={x:i.x,y:i.y+r.y},c[l]={x:a.x,y:a.y+r.y};var d=this.pointsList.map(function(m){return m});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:i.x,y:i.y+r.y},h=Zc(f,this.sourceNode);if(!h){var g=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,g,d)}}if(l===this.pointsList.length-1){var v={x:a.x,y:a.y+r.y},h=Zc(v,this.targetNode);if(!h){var g=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",v,g,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}else if(u===ho.VERTICAL){c[s]={x:i.x+r.x,y:i.y},c[l]={x:a.x+r.x,y:a.y};var d=this.pointsList.map(function(b){return b});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:i.x+r.x,y:i.y},h=Zc(f,this.sourceNode);if(!h){var g=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,g,d)}}if(l===this.pointsList.length-1){var v={x:a.x+r.x,y:a.y},h=Zc(v,this.targetNode);if(!h){var g=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",v,g,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}return!((o=this.text)===null||o===void 0)&&o.value&&this.setText(kr({},this.text,this.textPosition)),{start:kr({},c[s]),end:kr({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppendEnd=function(){if(this.draggingPointList){var n=YZ(Sp(this.points));this.pointsList=n.map(function(i){return i}),this.draggingPointList=[];var r=n[0];this.startPoint=kr({},r);var o=n[n.length-1];this.endPoint=kr({},o)}this.isDragging=!1},e.prototype.updatePointsAfterDrag=function(n){var r=this.updateCrossPoints(n);this.points=r.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" ")},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,o=n.endPoint,i=n.sourceNode,a=n.targetNode;this.pointsList=A6({x:r.x,y:r.y},{x:o.x,y:o.y},i,a,this.offset||0),this.initPoints()},Ri([it],e.prototype,"offset",void 0),Ri([it],e.prototype,"dbClickPosition",void 0),Ri([rt],e.prototype,"initPoints",null),Ri([rt],e.prototype,"updatePoints",null),Ri([rt],e.prototype,"updateStartPoint",null),Ri([rt],e.prototype,"moveStartPoint",null),Ri([rt],e.prototype,"updateEndPoint",null),Ri([rt],e.prototype,"moveEndPoint",null),Ri([rt],e.prototype,"updatePointsList",null),Ri([rt],e.prototype,"dragAppendStart",null),Ri([rt],e.prototype,"dragAppendSimple",null),Ri([rt],e.prototype,"dragAppend",null),Ri([rt],e.prototype,"dragAppendEnd",null),Ri([rt],e.prototype,"updatePointsAfterDrag",null),Ri([rt],e.prototype,"getAdjustStart",null),Ri([rt],e.prototype,"getAdjustEnd",null),Ri([rt],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(UC),ui=globalThis&&globalThis.__assign||function(){return ui=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},Z6=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},OHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},eh=function(){function t(e,n){var r;this.BaseType=Eo.NODE,this.id="",this.type="",this.x=0,this.y=0,this.textMode=xl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this._width=100,this._height=80,this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.anchorsOffset=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isShowAnchor=!1,this.isDragging=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.rotatable=!0,this.resizable=!0,this.zIndex=1,this.state=Ar.DEFAULT,this.autoToFront=!0,this.style={},this._rotate=0,this.modelType=er.NODE,this.additionStateData={},this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.resizeRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initNodeData(e),this.setAttributes()}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e;var n=this,r=n.x,o=r===void 0?0:r,i=n.y,a=i===void 0?0:i;this.transform=new yS(-o,-a).rotate(e).translate(o,a).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"incoming",{get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoing",{get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}},enumerable:!1,configurable:!0}),t.prototype.initNodeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),o=this.createId();e.id=o||r||vf()}this.formatText(e),kr(this,_Qe(e));var i=this.graphModel.overlapMode;i===ou.INCREASE&&(this.zIndex=e.zIndex||yD())},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,o,i=this.graphModel.editConfigModel,a=i.nodeTextDraggable,s=i.nodeTextEdit,l=e.x,u=e.y,c=e.text,d={value:"",x:l,y:u,draggable:a,editable:s};c&&(typeof c=="string"?d.value=c:(d=ui(ui({},d),{x:(n=c.x)!==null&&n!==void 0?n:l,y:(r=c.y)!==null&&r!==void 0?r:u,value:(o=c.value)!==null&&o!==void 0?o:""}),Ef(c.draggable)||(d.draggable=c.draggable),Ef(c.editable)||(d.editable=c.editable))),e.text=d},t.prototype.resize=function(e){var n=e.width,r=e.height,o=e.deltaX,i=e.deltaY,a=this.isAllowResizeNode(o,i,n,r);return a?(this.move(o/2,i/2),this.width=n,this.height=r,this.setProperties({width:n,height:r}),this.getData()):this.getData()},t.prototype.proportionalResize=function(){},t.prototype.getData=function(){var e=this.text,n=e.x,r=e.y,o=e.value,i=this.properties;Iv(i)&&(i=eu(i)),gr(i.width)&&(i.width=this.width),gr(i.height)&&(i.height=this.height);var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.rotate&&(a.rotate=this.rotate),this.graphModel.overlapMode===ou.INCREASE&&(a.zIndex=this.zIndex),o&&(a.text={x:n,y:r,value:o}),a},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.getProperties=function(){return eu(this.properties)},t.prototype.getOuterGAttributes=function(){return{className:""}},t.prototype.getNodeStyle=function(){return ui(ui({},this.graphModel.theme.baseNode),this.style)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.nodeText,n=this.properties.textStyle,r=n===void 0?{}:n;return ui(ui({},bn(e)),bn(r))},t.prototype.getRotateControlStyle=function(){var e=this.graphModel.theme.rotateControl;return bn(e)},t.prototype.getResizeControlStyle=function(){var e=this.graphModel.theme.resizeControl;return bn(e)},t.prototype.getResizeOutlineStyle=function(){var e=this.graphModel.theme.resizeOutline;return bn(e)},t.prototype.getAnchorStyle=function(e){var n=this.graphModel.theme.anchor;return bn(n)},t.prototype.getAnchorLineStyle=function(e){var n=this.graphModel.theme.anchorLine;return bn(n)},t.prototype.getOutlineStyle=function(){var e=this.graphModel.theme.outline;return bn(e)},t.prototype.isAllowConnectedAsSource=function(e,n,r,o){var i=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var a=!0,s="",l=0;l0?n.map(function(a,s){return a.length?(a=a,{id:"".concat(r,"_").concat(s),x:o+a[0],y:i+a[1]}):(a=a,ui(ui({},a),{x:o+a.x,y:i+a.y,id:a.id||"".concat(r,"_").concat(s)}))}):this.getDefaultAnchor()},t.prototype.getDefaultAnchor=function(){return[]},t.prototype.getTargetAnchor=function(e){return mQe(e,this)},t.prototype.getBounds=function(){return{minX:this.x-this.width/2,minY:this.y-this.height/2,maxX:this.x+this.width/2,maxY:this.y+this.height/2}},Object.defineProperty(t.prototype,"anchors",{get:function(){var e=this.getAnchorsByOffset(),n=this,r=n.x,o=n.y,i=n.rotate;return e.forEach(function(a){var s=a.x,l=a.y,u=OHe(new c_([s,l,1]).translate(-r,-o).rotate(i).translate(r,o)[0],2),c=u[0],d=u[1];a.x=c,a.y=d}),e},enumerable:!1,configurable:!0}),t.prototype.getAnchorInfo=function(e){if(!gr(e))for(var n=0;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},xS=function(t){wHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.CIRCLE_NODE,o.r=50,o.initNodeData(n),o.setAttributes(),o}return Object.defineProperty(e.prototype,"width",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties.r;n&&(this.r=n)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.circle,o=this.properties.style,i=o===void 0?{}:o;return Ky(Ky(Ky({},n),bn(r)),bn(i))},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,o=n.y,i=n.r;return[{x:r,y:o-i,id:"".concat(this.id,"_0")},{x:r+i,y:o,id:"".concat(this.id,"_1")},{x:r,y:o+i,id:"".concat(this.id,"_2")},{x:r-i,y:o,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,o=n.deltaX,i=n.deltaY;return this.move(o/2,i/2),this.r=r,this.setProperties({r}),this.getData()},E2([it],e.prototype,"r",void 0),E2([Zr],e.prototype,"width",null),E2([Zr],e.prototype,"height",null),e}(eh),SHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jy=globalThis&&globalThis.__assign||function(){return Jy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},GO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},yP=function(t){SHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.DIAMOND_NODE,o.rx=30,o.ry=50,o.initNodeData(n),o.setAttributes(),o}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,o=n.ry;r&&(this.rx=r),o&&(this.ry=o)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.diamond,o=this.properties.style,i=o===void 0?{}:o;return Jy(Jy(Jy({},n),bn(r)),bn(i))},Object.defineProperty(e.prototype,"points",{get:function(){var n=this,r=n.x,o=n.y,i=n.rx,a=n.ry;return[[r,o-a],[r+i,o],[r,o+a],[r-i,o]]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pointsPosition",{get:function(){return $a(this.points,function(n){var r=GO(n,2),o=r[0],i=r[1];return{x:o,y:i}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return zn(this.points,function(o){var i=GO(o,1),a=i[0];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return zn(this.points,function(o){var i=GO(o,2),a=i[1];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this;return $a(this.points,function(r,o){var i=GO(r,2),a=i[0],s=i[1];return{x:a,y:s,id:"".concat(n.id,"_").concat(o)}})},e.prototype.resize=function(n){var r=n.width,o=n.height,i=n.deltaX,a=n.deltaY;return this.move(i/2,a/2),this.rx=r,this.ry=o,this.setProperties({rx:r,ry:o}),this.getData()},hg([it],e.prototype,"rx",void 0),hg([it],e.prototype,"ry",void 0),hg([Zr],e.prototype,"points",null),hg([Zr],e.prototype,"pointsPosition",null),hg([Zr],e.prototype,"width",null),hg([Zr],e.prototype,"height",null),e}(eh),xHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),e0=globalThis&&globalThis.__assign||function(){return e0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},bP=function(t){xHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.ELLIPSE_NODE,o.rx=30,o.ry=45,o.initNodeData(n),o.setAttributes(),o}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,o=n.ry;r&&(this.rx=r),o&&(this.ry=o)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.ellipse,o=this.properties.style,i=o===void 0?{}:o;return e0(e0(e0({},n),bn(r)),bn(i))},Object.defineProperty(e.prototype,"width",{get:function(){return this.rx*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.ry*2},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,o=n.y,i=n.rx,a=n.ry;return[{x:r,y:o-a,id:"".concat(this.id,"_0")},{x:r+i,y:o,id:"".concat(this.id,"_1")},{x:r,y:o+a,id:"".concat(this.id,"_2")},{x:r-i,y:o,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,o=n.height,i=n.deltaX,a=n.deltaY;return this.move(i/2,a/2),this.rx=r,this.ry=o,this.setProperties({rx:r,ry:o}),this.getData()},qO([it],e.prototype,"rx",void 0),qO([it],e.prototype,"ry",void 0),qO([Zr],e.prototype,"width",null),qO([Zr],e.prototype,"height",null),e}(eh),CHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),t0=globalThis&&globalThis.__assign||function(){return t0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},JO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},CS=function(t){CHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.POLYGON_NODE,o.points=[[50,0],[100,50],[50,100],[0,50]],o.initNodeData(n),o.setAttributes(),o}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.points,o=n.width,i=n.height,a=r||this.points;this.points=fQe(a,o,i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.polygon,o=this.properties.style,i=o===void 0?{}:o;return t0(t0(t0({},n),bn(r)),bn(i))},Object.defineProperty(e.prototype,"pointsPosition",{get:function(){var n=this,r=n.x,o=n.y,i=n.width,a=n.height;return this.points.map(function(s){return{x:s[0]+r-i/2,y:s[1]+o-a/2}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(o){var i=JO(o,1),a=i[0];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(o){var i=JO(o,2),a=i[1];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=this,o=r.x,i=r.y,a=r.width,s=r.height,l=r.points;return l.map(function(u,c){var d=JO(u,2),f=d[0],h=d[1];return{x:o+f-a/2,y:i+h-s/2,id:"".concat(n.id,"_").concat(c)}})},e.prototype.resize=function(n){var r=this,o=n.width,i=n.height,a=n.deltaX,s=n.deltaY;this.move(a/2,s/2);var l=$a(this.points,function(u){var c=JO(u,2),d=c[0],f=c[1];return[d*o/r.width,f*i/r.height]});return this.points=l,this.properties.points=l,this.getData()},KO([it],e.prototype,"points",void 0),KO([Zr],e.prototype,"pointsPosition",null),KO([Zr],e.prototype,"width",null),KO([Zr],e.prototype,"height",null),e}(eh),EHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),n0=globalThis&&globalThis.__assign||function(){return n0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},xp=function(t){EHe(e,t);function e(n,r){var o=t.call(this,n,r)||this;return o.modelType=er.RECT_NODE,o.radius=0,o.initNodeData(n),o.setAttributes(),o}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,o=n.height,i=n.radius,a=this.getNodeStyle().radius;gr(r)||(this.width=r),gr(o)||(this.height=o),gr(i)||(this.radius=i),gr(a)||(this.radius=a)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,o=n.y,i=n.width,a=n.height;return[{x:r,y:o-a/2,id:"".concat(this.id,"_0")},{x:r+i/2,y:o,id:"".concat(this.id,"_1")},{x:r,y:o+a/2,id:"".concat(this.id,"_2")},{x:r-i/2,y:o,id:"".concat(this.id,"_3")}]},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.rect,o=this.properties.style,i=o===void 0?{}:o;return n0(n0(n0({},n),bn(r)),bn(i))},THe([it],e.prototype,"radius",void 0),e}(eh),kHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),r0=globalThis&&globalThis.__assign||function(){return r0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},AHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},PHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},MHe={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotate:!1,allowResize:!1,nodeSelectedOutline:!0,textEdit:!1,nodeTextEdit:!1,edgeTextEdit:!1,textDraggable:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},e1=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","snapGrid","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustEdgeStart","adjustEdgeEnd","adjustNodePosition","hideAnchors","allowRotate","allowResize","autoExpand","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","textEdit","nodeTextEdit","edgeTextEdit","textDraggable","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","textMode","nodeTextMode","edgeTextMode","nodeTextMultiple","edgeTextMultiple","nodeTextVertical","edgeTextVertical"],$He=function(){function t(e){this.isSilentMode=!1,this.stopZoomGraph=!1,this.stopMoveGraph=!1,this.stopScrollGraph=!1,this.snapGrid=!1,this.textMode=xl.TEXT,this.textEdit=!0,this.textDraggable=!1,this.nodeTextEdit=!0,this.nodeTextDraggable=!1,this.nodeTextMultiple=!1,this.nodeTextVertical=!1,this.nodeTextMode=xl.TEXT,this.edgeTextMode=xl.TEXT,this.edgeTextEdit=!0,this.edgeTextDraggable=!1,this.edgeTextMultiple=!1,this.edgeTextVertical=!1,this.hideAnchors=!1,this.allowRotate=!1,this.allowResize=!1,this.hoverOutline=!0,this.nodeSelectedOutline=!0,this.adjustNodePosition=!0,this.autoExpand=!1,this.adjustEdge=!0,this.adjustEdgeMiddle=!1,this.adjustEdgeStartAndEnd=!1,this.adjustEdgeStart=!1,this.adjustEdgeEnd=!1,this.edgeSelectedOutline=!0,this.multipleSelectKey="",kr(this,this.computeConfig(e))}return t.prototype.updateEditConfig=function(e){var n=this.computeConfig(e);kr(this,n)},t.prototype.computeConfig=function(e){var n=e.isSilentMode,r=e.textDraggable,o=e.textMode,i=e.textEdit,a=e.adjustEdgeStartAndEnd,s={};if(n===!1&&kr(s,this.stagedConfig),n===!0&&n!==this.isSilentMode){var l=hi(MHe,e1);this.stagedConfig=hi(this,e1),kr(s,l)}Ef(i)||kr(s,{nodeTextEdit:i,edgeTextEdit:i}),Ef(r)||kr(s,{nodeTextDraggable:r,edgeTextDraggable:r}),o&&kr(s,{nodeTextMode:o,edgeTextMode:o}),Mw(a)&&kr(s,{adjustEdgeStart:a,adjustEdgeEnd:a});var u=hi(e,e1);return kr(s,u)},t.prototype.updateTextMode=function(e){this.textMode=e,this.edgeTextMode=e,this.nodeTextMode=e},t.prototype.getConfig=function(){return hi(this,e1)},$r([it],t.prototype,"isSilentMode",void 0),$r([it],t.prototype,"stopZoomGraph",void 0),$r([it],t.prototype,"stopMoveGraph",void 0),$r([it],t.prototype,"stopScrollGraph",void 0),$r([it],t.prototype,"snapGrid",void 0),$r([it],t.prototype,"textMode",void 0),$r([it],t.prototype,"textEdit",void 0),$r([it],t.prototype,"textDraggable",void 0),$r([it],t.prototype,"nodeTextEdit",void 0),$r([it],t.prototype,"nodeTextDraggable",void 0),$r([it],t.prototype,"nodeTextMultiple",void 0),$r([it],t.prototype,"nodeTextVertical",void 0),$r([it],t.prototype,"nodeTextMode",void 0),$r([it],t.prototype,"edgeTextMode",void 0),$r([it],t.prototype,"edgeTextEdit",void 0),$r([it],t.prototype,"edgeTextDraggable",void 0),$r([it],t.prototype,"edgeTextMultiple",void 0),$r([it],t.prototype,"edgeTextVertical",void 0),$r([it],t.prototype,"hideAnchors",void 0),$r([it],t.prototype,"allowRotate",void 0),$r([it],t.prototype,"allowResize",void 0),$r([it],t.prototype,"hoverOutline",void 0),$r([it],t.prototype,"nodeSelectedOutline",void 0),$r([it],t.prototype,"adjustNodePosition",void 0),$r([it],t.prototype,"autoExpand",void 0),$r([it],t.prototype,"adjustEdge",void 0),$r([it],t.prototype,"adjustEdgeMiddle",void 0),$r([it],t.prototype,"adjustEdgeStartAndEnd",void 0),$r([it],t.prototype,"adjustEdgeStart",void 0),$r([it],t.prototype,"adjustEdgeEnd",void 0),$r([it],t.prototype,"edgeSelectedOutline",void 0),$r([rt],t.prototype,"updateEditConfig",null),$r([rt],t.prototype,"updateTextMode",null),t}(),RHe="*",DHe=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){var o=this;e==null||e.split(",").forEach(function(i){i=i.trim(),o._events[i]||(o._events[i]=[]),o._events[i].push({callback:n,once:!!r})})},t.prototype.once=function(e,n){var r=this;e==null||e.split(",").forEach(function(o){o=o.trim(),r.on(o,n,!0)})},t.prototype.emit=function(e,n){var r=this;e==null||e.split(",").forEach(function(o){var i=r._events[o]||[],a=r._events[RHe]||[],s=function(l){for(var u=l.length,c=0;c=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},BHe=function(t){IHe(e,t);function e(n){var r=t.call(this)||this;r.stepScrollX=0,r.stepScrollY=0,r.onDragging=function(s){var l=s.deltaX,u=s.deltaY;r.setState({isDragging:!0});var c=r.props.graphModel,d=c.transformModel,f=c.editConfigModel;f.stopMoveGraph!==!0&&d.translate(l,u)},r.onDragEnd=function(){r.setState({isDragging:!1})},r.zoomHandler=function(s){var l=r.props,u=l.graphModel,c=u.editConfigModel,d=u.transformModel,f=u.gridSize,h=l.graphModel,g=s.deltaX,v=s.deltaY,m=c.stopScrollGraph,b=c.stopZoomGraph;if(!m&&!s.ctrlKey&&!s.metaKey){if(s.preventDefault(),r.stepScrollX+=g,r.stepScrollY+=v,Math.abs(r.stepScrollX)>=f){var w=r.stepScrollX%f,O=r.stepScrollX-w;d.translate(-O*d.SCALE_X,0),r.stepScrollX=w}if(Math.abs(r.stepScrollY)>=f){var S=r.stepScrollY%f,x=r.stepScrollY-S;d.translate(0,-x*d.SCALE_Y),r.stepScrollY=S}return}if(!b){s.preventDefault();var C=h.getPointByClient({x:s.clientX,y:s.clientY}),E=C.canvasOverlayPosition,T=E.x,M=E.y;d.zoom(s.deltaY<0,[T,M])}},r.clickHandler=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){var u=r.props.graphModel,c=u.selectElements;c.size>0&&u.clearSelectElements(),u.eventCenter.emit(on.BLANK_CLICK,{e:s})}},r.handleContextMenu=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){s.preventDefault();var u=r.props.graphModel,c=u.getPointByClient({x:s.clientX,y:s.clientY});u.eventCenter.emit(on.BLANK_CONTEXTMENU,{e:s,position:c})}},r.mouseDownHandler=function(s){var l=r.props.graphModel,u=l.eventCenter,c=l.editConfigModel,d=l.transformModel.SCALE_X,f=l.gridSize,h=c.adjustEdge,g=c.adjustNodePosition,v=c.stopMoveGraph,m=s.target,b=!h&&!g;(m.getAttribute("name")==="canvas-overlay"||b)&&(v!==!0?(r.stepDrag.setStep(f*d),r.stepDrag.handleMouseDown(s)):u.emit(on.BLANK_MOUSEDOWN,{e:s}),r.clickHandler(s))};var o=n.graphModel,i=o.gridSize,a=o.eventCenter;return r.stepDrag=new Fl({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:i,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:void 0}),r.state={isDragging:!1},r}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,o=this.props,i=o.children,a=o.dnd,s=this.state.isDragging;return ot("svg",_P({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:s?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},a.eventMap(),{children:ot("g",{transform:r,children:i})}))},e=LHe([Ra],e),e}(vr),aG=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ub=globalThis&&globalThis.__assign||function(){return ub=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},VHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},K6=function(t){aG(e,t);function e(){var n=t.call(this)||this;return n.onDragging=function(r){var o=r.event,i=n.props,a=i.graphModel,s=i.bezierModel,l=i.type,u=a.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,c=u.x,d=u.y;s.updateAdjustAnchor({x:c,y:d},l),a.eventCenter.emit(on.EDGE_ADJUST,{data:s.getData()})},n.onDragEnd=function(){var r=n.props.bezierModel;r.isDragging=!1},n.dragHandler=new Fl({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.render=function(){var n=this,r=this.props.position,o=r.x,i=r.y,a=this.props.bezierModel,s=a.getEdgeStyle().adjustAnchor;return ot(Vv,ub({className:"lf-bezier-adjust-anchor",x:o,y:i},s,{onMouseDown:function(l){n.dragHandler.handleMouseDown(l)}}))},e}(vr),zHe=function(t){aG(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBezierAdjust=function(n,r){var o=n.path,i=n.id,a=gD(o),s=VHe(a,4),l=s[0],u=s[1],c=s[2],d=s[3],f=n.getEdgeStyle().adjustLine,h=[];return h.push(ot(Fv,ub({x1:l.x,y1:l.y,x2:u.x,y2:u.y},f))),h.push(ot(K6,{position:u,bezierModel:n,graphModel:r,type:"sNext"},"".concat(i,"_ePre"))),h.push(ot(Fv,ub({x1:d.x,y1:d.y,x2:c.x,y2:c.y},f))),h.push(ot(K6,{position:c,bezierModel:n,graphModel:r,type:"ePre"},"".concat(i,"_sNext"))),h},e.prototype.selectedBezierEdge=function(){for(var n=this.props.graphModel,r=n.edges,o=[],i=0;i=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},QHe=function(t){jHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.background;return ot("div",{className:"lf-background",children:ot("div",{style:wo(n)?n:{},className:"lf-background-area"})})},e=WHe([Ra],e),e}(vr),HHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),UHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},tv=function(t){HHe(e,t);function e(n){var r=t.call(this,n)||this;return r.id=vf(),r.gridOptions=r.props.graphModel.grid,r}return e.prototype.renderDot=function(){var n=this.gridOptions,r=n.config,o=n.size,i=o===void 0?1:o,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?2:u,d=Math.min(Math.max(2,c),i/4),f=a?1:0;return ot("g",{fill:l,opacity:f,children:[ot("circle",{cx:0,cy:0,r:d/2}),ot("circle",{cx:0,cy:i,r:d/2}),ot("circle",{cx:i,cy:0,r:d/2}),ot("circle",{cx:i,cy:i,r:d/2})]})},e.prototype.renderMesh=function(){var n=this.gridOptions,r=n.config,o=n.size,i=o===void 0?1:o,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?1:u,d=Math.min(Math.max(1,c),i/2),f="M 0 0 H ".concat(i," V ").concat(i," H 0 Z"),h=a?1:0;return ot("path",{d:f,stroke:l,strokeWidth:d/2,opacity:h,fill:"transparent"})},e.prototype.render=function(){var n=this.props.graphModel,r=n.transformModel,o=n.grid;this.gridOptions=o;var i=this.gridOptions,a=i.type,s=i.size,l=s===void 0?1:s,u=r.SCALE_X,c=r.SKEW_Y,d=r.SKEW_X,f=r.SCALE_Y,h=r.TRANSLATE_X,g=r.TRANSLATE_Y,v=[u,c,d,f,h,g].join(","),m="matrix(".concat(v,")");return ot("div",{className:"lf-grid",children:ot("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",children:[ot("defs",{children:ot("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:m,x:"0",y:"0",width:l,height:l,children:[a==="dot"&&this.renderDot(),a==="mesh"&&this.renderMesh()]})}),ot("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})]})})},e=UHe([Ra],e),e}(vr);(function(t){t.defaultProps={size:WWe,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};function e(n){var r=bn(t.defaultProps);return typeof n=="number"?kr(r,{size:n}):typeof n=="boolean"?kr(r,{visible:n}):kr(r,n)}t.getGridOptions=e})(tv||(tv={}));var YHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),XHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},ZHe=function(t){YHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,o=this.props.children;return ot("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay",children:ot("g",{transform:r,children:o})})},e=XHe([Ra],e),e}(vr),GHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xd=globalThis&&globalThis.__assign||function(){return Xd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},KHe=function(t){GHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getNodesOutline=function(){var n=this.props.graphModel,r=n.nodes,o=n.editConfigModel,i=o.hoverOutline,a=o.nodeSelectedOutline,s=[];return r.forEach(function(l){if(l.isHovered||l.isSelected){var u=l.isHovered,c=l.isSelected,d=l.x,f=l.y,h=l.width,g=l.height;if(a&&c||i&&u){var v=l.getOutlineStyle(),m={};if(Object.keys(v).forEach(function(w){w!=="hover"&&(m[w]=v[w])}),u){var b=v.hover;m=Xd(Xd({},m),b)}s.push(ot(ml,Xd({transform:l.transform,className:"lf-outline-node",x:d,y:f,width:h+10,height:g+10},m)))}}}),s},e.prototype.getEdgeOutline=function(){for(var n=this.props.graphModel,r=n.edges,o=n.editConfigModel,i=o.edgeSelectedOutline,a=o.hoverOutline,s=[],l=0;l=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},tUe=function(t){JHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.snaplineModel,r=n!=null?n:{},o=r.position,i=r.isShowHorizontal,a=r.isShowVertical,s=n==null?void 0:n.getStyle(),l=o!=null?o:{},u=l.x,c=u===void 0?0:u,d=l.y,f=d===void 0?0:d,h=Zd(Zd({x1:-1e5,y1:f,x2:1e5,y2:f},s),{stroke:i?s==null?void 0:s.stroke:"none"}),g=Zd(Zd({x1:c,y1:-1e5,x2:c,y2:1e5},s),{stroke:a?s==null?void 0:s.stroke:"none"});return ot("g",{className:"lf-snapline",children:[ot(Fv,Zd({},h)),ot(Fv,Zd({},g))]})},e=eUe([Ra],e),e}(vr),nUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},oUe=function(t){nUe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){this.triggerToolRender()},e.prototype.componentDidUpdate=function(){this.triggerToolRender()},e.prototype.getTools=function(){var n=this.props,r=n.tool,o=n.graphModel,i=o.textEditElement,a=r.getTools(),s=a.map(function(l){return qt(l,{textEditElement:i,graphModel:o,lf:r.instance})});return r.components=s,s},e.prototype.triggerToolRender=function(){var n=this.props,r=n.tool,o=n.graphModel,i=document.querySelector("#ToolOverlay_".concat(o.flowId)),a=r.getInstance();a.components.forEach(function(s){return s(a,i)}),a.components=[]},e.prototype.render=function(){var n=this.props.graphModel;return ot("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(n.flowId),children:this.getTools()})},e=rUe([Ra],e),e}(vr),ea=globalThis&&globalThis.__assign||function(){return ea=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},iUe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oi=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},sl=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},sUe=function(){function t(e,n){n===void 0&&(n=1),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e,this.epsilon=n}return t.prototype.getStyle=function(){return Lh({},this.graphModel.theme.snapline)},t.prototype.getCenterSnapLine=function(e,n){for(var r=e.x,o=e.y,i=!1,a=!1,s=0;s=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},pg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},lUe={false:[-1/0,-1/0,1/0,1/0],true:[-1/0,-1/0,1/0,1/0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},uUe=function(){function t(e,n){this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,this.SCALE_X=1,this.SKEW_Y=0,this.SKEW_X=0,this.SCALE_Y=1,this.TRANSLATE_X=0,this.TRANSLATE_Y=0,this.ZOOM_SIZE=.04,this.translateLimitMinX=-1/0,this.translateLimitMinY=-1/0,this.translateLimitMaxX=1/0,this.translateLimitMaxY=1/0,this.eventCenter=e;var r=n.stopMoveGraph,o=r===void 0?!1:r;this.updateTranslateLimits(o)}return t.prototype.setZoomMiniSize=function(e){this.MINI_SCALE_SIZE=e},t.prototype.setZoomMaxSize=function(e){this.MAX_SCALE_SIZE=e},t.prototype.HtmlPointToCanvasPoint=function(e){var n=pg(e,2),r=n[0],o=n[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(o-this.TRANSLATE_Y)/this.SCALE_Y]},t.prototype.CanvasPointToHtmlPoint=function(e){var n=pg(e,2),r=n[0],o=n[1];return[r*this.SCALE_X+this.TRANSLATE_X,o*this.SCALE_Y+this.TRANSLATE_Y]},t.prototype.moveCanvasPointByHtml=function(e,n,r){var o=pg(e,2),i=o[0],a=o[1];return[i+n/this.SCALE_X,a+r/this.SCALE_Y]},t.prototype.fixDeltaXY=function(e,n){return[e/this.SCALE_X,n/this.SCALE_Y]},t.prototype.getTransformStyle=function(){var e=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(e,")")}},t.prototype.zoom=function(e,n){e===void 0&&(e=!1);var r=this.SCALE_X,o=this.SCALE_Y;return typeof e=="number"?(r=e,o=e):e?(r+=this.ZOOM_SIZE,o+=this.ZOOM_SIZE):(r-=this.ZOOM_SIZE,o-=this.ZOOM_SIZE),rthis.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(r-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(o-this.SCALE_Y)*n[1]),this.SCALE_X=r,this.SCALE_Y=o,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))},t.prototype.emitGraphTransform=function(e){this.eventCenter.emit(on.GRAPH_TRANSFORM,{type:e,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})},t.prototype.resetZoom=function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")},t.prototype.translate=function(e,n){this.TRANSLATE_X+e<=this.translateLimitMaxX&&this.TRANSLATE_X+e>=this.translateLimitMinX&&(this.TRANSLATE_X+=e),this.TRANSLATE_Y+n<=this.translateLimitMaxY&&this.TRANSLATE_Y+n>=this.translateLimitMinY&&(this.TRANSLATE_Y+=n),this.emitGraphTransform("translate")},t.prototype.focusOn=function(e,n,r,o){var i=pg(this.CanvasPointToHtmlPoint([e,n]),2),a=i[0],s=i[1],l=pg([r/2-a,o/2-s],2),u=l[0],c=l[1];this.TRANSLATE_X+=u,this.TRANSLATE_Y+=c,this.emitGraphTransform("focusOn")},t.prototype.updateTranslateLimits=function(e){var n;n=pg(Array.isArray(e)&&e.length===4?e:lUe[e.toString()],4),this.translateLimitMinX=n[0],this.translateLimitMinY=n[1],this.translateLimitMaxX=n[2],this.translateLimitMaxY=n[3]},Gl([it],t.prototype,"SCALE_X",void 0),Gl([it],t.prototype,"SKEW_Y",void 0),Gl([it],t.prototype,"SKEW_X",void 0),Gl([it],t.prototype,"SCALE_Y",void 0),Gl([it],t.prototype,"TRANSLATE_X",void 0),Gl([it],t.prototype,"TRANSLATE_Y",void 0),Gl([it],t.prototype,"ZOOM_SIZE",void 0),Gl([rt],t.prototype,"zoom",null),Gl([rt],t.prototype,"resetZoom",null),Gl([rt],t.prototype,"translate",null),Gl([rt],t.prototype,"focusOn",null),t}(),cUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},fUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},hUe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},mUe=function(t){gUe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(r){var o=r.event,i=n.props,a=i.anchorData,s=i.nodeModel,l=i.graphModel;l.selectNodeById(s.id),s.autoToFront&&l.toFront(s.id),l.eventCenter.emit(on.ANCHOR_DRAGSTART,{data:a,e:o,nodeModel:s}),n.setState({startX:a.x,startY:a.y,endX:a.x,endY:a.y})},n.onDragging=function(r){var o=r.event,i=n.props,a=i.graphModel,s=i.nodeModel,l=i.anchorData,u=a.transformModel,c=a.eventCenter,d=a.width,f=a.height,h=a.editConfigModel,g=h.autoExpand,v=h.stopMoveGraph;if(!!o){var m=o.clientX,b=o.clientY,w=a.getPointByClient({x:m,y:b}),O=w.domOverlayPosition,S=O.x,x=O.y,C=w.canvasOverlayPosition,E=C.x,T=C.y;n.t&&wS(n.t);var M=[],k=10;S<10?M=[k,0]:S+10>d?M=[-k,0]:x<10?M=[0,k]:x+10>f&&(M=[0,-k]),n.setState({endX:E,endY:T,dragging:!0}),n.moveAnchorEnd(E,T),M.length>0&&!v&&g&&(n.t=eG(function(){var P=vUe(M,2),R=P[0],D=P[1];u.translate(R,D);var F=n.state,W=F.endX,I=F.endY;n.setState({endX:W-R,endY:I-D}),n.moveAnchorEnd(W-R,I-D)})),c.emit(on.ANCHOR_DRAG,{data:l,e:o,nodeModel:s})}},n.onDragEnd=function(r){var o=r.event;n.t&&wS(n.t);var i=n.checkEnd(o);n.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var a=n.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData;s.eventCenter.emit(on.ANCHOR_DRAGEND,{data:u,e:o,nodeModel:l,edgeModel:i!=null?i:void 0})},n.checkEnd=function(r){var o,i=n.props,a=i.graphModel,s=i.nodeModel,l=i.anchorData,u=l.x,c=l.y,d=l.id,f=n.state,h=f.endX,g=f.endY,v=f.dragging,m=_S({x:h,y:g},a);if(n.preTargetNode&&n.preTargetNode.state!==Ar.DEFAULT&&n.preTargetNode.setElementState(Ar.DEFAULT),!!v&&m&&m.node){var b=m.node,w=m.anchor.id,O="".concat(s.id,"_").concat(b.id,"_").concat(w,"_").concat(d),S=n.sourceRuleResults.get(O)||{},x=S.isAllPass,C=S.msg,E=n.targetRuleResults.get(O)||{},T=E.isAllPass,M=E.msg;if(x&&T){b.setElementState(Ar.DEFAULT);var k=a.getNodeModelById(m.node.id),P=(o=a.edgeGenerator)===null||o===void 0?void 0:o.call(a,s.getData(),k==null?void 0:k.getData()),R=a.addEdge(Fu(Fu({},P),{sourceNodeId:s.id,sourceAnchorId:d,startPoint:{x:u,y:c},targetNodeId:m.node.id,targetAnchorId:m.anchor.id,endPoint:{x:m.anchor.x,y:m.anchor.y}})),D=n.props.anchorData;return a.eventCenter.emit(on.ANCHOR_DROP,{data:D,e:r,nodeModel:s,edgeModel:R}),R}var F=b.getData();return a.eventCenter.emit(on.CONNECTION_NOT_ALLOWED,{data:F,msg:M||C||"\u4E0D\u5141\u8BB8\u6DFB\u52A0\u8FDE\u7EBF"}),null}},n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},n.dragHandler=new Fl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.getAnchorShape=function(){var n=this.props,r=n.anchorData,o=n.style,i=n.node,a=i.getAnchorShape(r);if(a)return a;var s=r.x,l=r.y,u=Fu(Fu({},o),o==null?void 0:o.hover);return ot("g",{children:[ot(Vv,Fu({className:"lf-node-anchor-hover"},u,{x:s,y:l})),ot(Vv,Fu({className:"lf-node-anchor"},o,{x:s,y:l}))]})},Object.defineProperty(e.prototype,"customTrajectory",{get:function(){var n=this.props.graphModel.customTrajectory;return n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"relateEdges",{get:function(){var n=this.props,r=n.graphModel,o=r.getAnchorIncomingEdge,i=r.getAnchorOutgoingEdge,a=n.anchorData.id;return{incomingEdgeList:o(a),outgoingEdgeList:i(a)}},enumerable:!1,configurable:!0}),e.prototype.moveAnchorEnd=function(n,r){var o,i,a=this.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData,c=_S({x:n,y:r},s);if(c){var d=c.node,f=c.anchor.id;if(this.preTargetNode&&this.preTargetNode!==c.node&&this.preTargetNode.setElementState(Ar.DEFAULT),u.id===f)return;this.preTargetNode=d;var h="".concat(l.id,"_").concat(d.id,"_").concat(f,"_").concat(u.id);if(!this.targetRuleResults.has(h)){var g=c.anchor,v=l.isAllowConnectedAsSource(d,u,g),m=d.isAllowConnectedAsTarget(l,u,g);this.sourceRuleResults.set(h,OS(v)),this.targetRuleResults.set(h,OS(m))}var b=((o=this.sourceRuleResults.get(h))!==null&&o!==void 0?o:{}).isAllPass,w=((i=this.targetRuleResults.get(h))!==null&&i!==void 0?i:{}).isAllPass;b&&w?d.setElementState(Ar.ALLOW_CONNECT):d.setElementState(Ar.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Ar.DEFAULT&&this.preTargetNode.setElementState(Ar.DEFAULT)},e.prototype.isShowLine=function(){var n=this.state,r=n.startX,o=n.startY,i=n.endX,a=n.endY,s=su(r,o,i,a);return s>10},e.prototype.render=function(){var n=this,r=this.state,o=r.startX,i=r.startY,a=r.endX,s=r.endY,l=this.props,u=l.anchorData,c=l.edgeStyle,d=l.nodeModel,f=l.graphModel,h=u.edgeAddable;return ot("g",{className:"lf-anchor",children:[ot("g",{onClick:function(g){g.stopPropagation(),f.eventCenter.emit(on.ANCHOR_CLICK,{data:u,e:g,nodeModel:d})},onMouseDown:function(g){f.eventCenter.emit(on.ANCHOR_MOUSEDOWN,{data:u,e:g,nodeModel:d}),h!==!1&&n.dragHandler.handleMouseDown(g)},children:this.getAnchorShape()}),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Fu({sourcePoint:{x:o,y:i},targetPoint:{x:a,y:s}},c)):ot(Fv,Fu({x1:o,y1:i,x2:a,y2:s},c,{"pointer-events":"none"})))]})},e}(vr),yUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),OP=globalThis&&globalThis.__assign||function(){return OP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},lG=function(t){_Ue(e,t);function e(n){var r=t.call(this)||this;r.mouseDownHandler=function(i){var a=r.props,s=a.draggable,l=a.model,u=a.graphModel,c=u.editConfigModel.nodeTextDraggable;(s!=null?s:c)&&(i.stopPropagation(),r.stepperDrag.model=l,r.stepperDrag.handleMouseDown(i))},r.onDragging=function(i){var a=i.deltaX,s=i.deltaY,l=r.props,u=l.model,c=l.graphModel.transformModel;if(a||s){var d=OUe(c.fixDeltaXY(a,s),2),f=d[0],h=d[1];u.moveText(f,h)}},r.dbClickHandler=function(){var i=r.props,a=i.editable,s=i.graphModel.eventCenter,l=i.model;a&&l.setElementState(Ar.TEXT_EDIT),s.emit(on.TEXT_DBCLICK,{data:l.text,model:l})};var o=n.draggable;return r.stepperDrag=new Fl({onDragging:r.onDragging,step:1,eventType:"TEXT",isStopPropagation:o}),r}return e.prototype.getShape=function(){var n=this.props,r=n.model,o=n.graphModel,i=o.editConfigModel,a=r.text,s=a.value,l=a.x,u=a.y,c=a.editable,d=a.draggable,f={x:l,y:u,className:"",value:s},h=r.getTextStyle(),g=i.nodeTextDraggable||d;return ot(tG,SP({},f,h,{className:wP({"lf-element-text":c,"lf-text-draggable":!c&&g,"lf-text-disabled":!c&&!g}),model:r}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return ot("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e}(vr),wUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kl=globalThis&&globalThis.__assign||function(){return Kl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},SUe=function(t){wUe(e,t);function e(n){var r=t.call(this,n)||this;return r.setHoverOn=function(){r.setState({isHovered:!0})},r.setHoverOff=function(){r.setState({isHovered:!1})},r.state={isHovered:!1},r}return e.prototype.getBackground=function(){var n=this.state.isHovered,r=this.props.model,o=r.text,i=r.getTextStyle(),a=i.background||{};if(n&&i.hover&&i.hover.background&&(a=Kl(Kl({},a),i.hover.background)),(o==null?void 0:o.value)&&(a==null?void 0:a.fill)!=="transparent"){var s=i.fontSize,l=i.textWidth,u=i.lineHeight,c=i.overflowMode,d=a.wrapPadding,f=o==null?void 0:o.value.split(/[\r\n]/g),h=f.length,g=o.x,v=o.y,m={};if(c==="autoWrap"&&l){var b=KZ({rows:f,style:{fontSize:"".concat(s,"px"),width:"".concat(l,"px"),lineHeight:u,padding:d},rowsLength:h,className:"lf-get-text-height"});m=Kl(Kl({},a),{x:g,y:v,width:l,height:b})}else{var w=dQe({rows:f,rowsLength:h,fontSize:s}),O=w.width,S=w.height;if(c==="ellipsis"&&(O=l,S=s+2),typeof a.wrapPadding=="string"){var x=a.wrapPadding.split(",").filter(function(H){return H.trim()}).map(function(H){return parseFloat(H.trim())});if(x.length>0&&x.length<=4){if(x.length===1){var C=t1(x,1),E=C[0];x=[E,E,E,E]}else if(x.length===2){var T=t1(x,2),M=T[0],k=T[1];x=[M,k,M,k]}else if(x.length===3){var P=t1(x,3),R=P[0],k=P[1],D=P[2];x=[R,k,D,k]}var F=t1(x,4),W=F[0],I=F[1],Q=F[2],L=F[3];O+=I+L,S+=W+Q,g=g+(I-L)/2,v=v+(Q-W)/2}}m=Kl(Kl({},a),{x:g-1,y:v-1,width:O,height:S})}return ot(ml,Kl({},m))}return null},e.prototype.getShape=function(){var n=this.props.model,r=n.text,o=r.x,i=r.y,a=r.value;if(!a)return null;var s=n.getTextStyle(),l=Kl({x:o,y:i,value:a,model:n,className:"lf-element-text"},s);return ot("g",{className:"lf-line-text",onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,children:[this.getBackground(),ot(tG,Kl({},l))]})},e}(lG),xUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),TS=globalThis&&globalThis.__assign||function(){return TS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},th=function(t){xUe(e,t);function e(n){var r=t.call(this)||this;r.onDragStart=function(l){var u=l.event,c=r.props,d=c.model,f=c.graphModel;if(u){var h=f.getPointByClient({x:u.clientX,y:u.clientY}).canvasOverlayPosition,g=h.x,v=h.y;r.moveOffset={dx:d.x-g,dy:d.y-v}}},r.onDragging=function(l){var u,c,d,f,h=l.event,g=r.props,v=g.model,m=g.graphModel,b=m.editConfigModel,w=b.stopMoveGraph,O=b.autoExpand,S=b.snapGrid,x=m.transformModel,C=m.selectNodes,E=m.width,T=m.height,M=m.gridSize;v.isDragging=!0;var k=h,P=k.clientX,R=k.clientY,D=m.getPointByClient({x:P,y:R}).canvasOverlayPosition,F=D.x,W=D.y,I=n1(x.CanvasPointToHtmlPoint([F,W]),2),Q=I[0],L=I[1];if(F=F+((c=(u=r.moveOffset)===null||u===void 0?void 0:u.dx)!==null&&c!==void 0?c:0),W=W+((f=(d=r.moveOffset)===null||d===void 0?void 0:d.dy)!==null&&f!==void 0?f:0),F=Bv(F,M,S),W=Bv(W,M,S),!E||!T){m.moveNode2Coordinate(v.id,F,W);return}var H=Q<0||L<0||Q>E||L>T;if(!(O&&!w&&H)){var re=n1(x.CanvasPointToHtmlPoint([F-v.width/2,W-v.height/2]),2),U=re[0],J=re[1],ie=n1(x.CanvasPointToHtmlPoint([F+v.width/2,W+v.height/2]),2),te=ie[0],he=ie[1],K=Math.max(M,20),ne=[];U<0?ne=[K,0]:te>m.width?ne=[-K,0]:J<0?ne=[0,K]:he>m.height&&(ne=[0,-K]),r.t&&wS(r.t);var fe=C.map(function(Ne){return Ne.id});fe.indexOf(v.id)===-1&&(fe=[v.id]),ne.length>0&&!w&&O?r.t=eG(function(){var Ne=n1(ne,2),$e=Ne[0],ue=Ne[1];x.translate($e!=null?$e:0,ue!=null?ue:0);var G=-($e!=null?$e:0)/x.SCALE_X,ve=-(ue!=null?ue:0)/x.SCALE_X;m.moveNodes(fe,G,ve)}):m.moveNodes(fe,F-v.x,W-v.y)}},r.onDragEnd=function(){r.t&&wS(r.t);var l=r.props.model;l.isDragging=!1},r.onMouseOut=function(l){zWe()&&r.setHoverOff(l)},r.handleMouseUp=function(){var l=r.props.model;r.mouseUpDrag=l.isDragging},r.handleClick=function(l){var u=r.mouseUpDrag===!1;if(!!r.startTime){var c=r.props,d=c.model,f=c.graphModel;if(!!u){var h=d.getData(),g=f.getPointByClient({x:l.clientX,y:l.clientY}),v={data:h,e:l,position:g,isSelected:!1,isMultiple:!1},m=l.button===2,b=l.detail===2;if(!m){var w=f.editConfigModel,O=GZ(l,w);v.isMultiple=O,d.isSelected&&!b&&O?(v.isSelected=!1,d.setSelected(!1)):(f.selectNodeById(d.id,O),v.isSelected=!0,w.isSilentMode||r.toFront()),b?(w.nodeTextEdit&&d.text.editable&&w.textMode===xl.TEXT&&(d.setSelected(!1),f.setElementStateById(d.id,Ar.TEXT_EDIT)),f.eventCenter.emit(on.NODE_DBCLICK,v)):(f.eventCenter.emit(on.ELEMENT_CLICK,v),f.eventCenter.emit(on.NODE_CLICK,v))}}}},r.handleContextMenu=function(l){l.preventDefault();var u=r.props,c=u.model,d=u.graphModel,f=d.editConfigModel,h=c.getData(),g=d.getPointByClient({x:l.clientX,y:l.clientY});d.setElementStateById(c.id,Ar.SHOW_MENU,g.domOverlayPosition),c.isSelected||d.selectNodeById(c.id),d.eventCenter.emit(on.NODE_CONTEXTMENU,{data:h,e:l,position:g}),f.isSilentMode||r.toFront()},r.handleMouseDown=function(l){var u=r.props,c=u.model,d=u.graphModel;r.startTime=new Date().getTime();var f=d.editConfigModel;f.adjustNodePosition&&c.draggable&&r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.handleFocus=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(on.NODE_FOCUS,{data:u.getData()})},r.handleBlur=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(on.NODE_BLUR,{data:u.getData()})},r.setHoverOn=function(l){var u=r.props,c=u.model,d=u.graphModel;if(!c.isHovered){var f=c.getData();c.setHovered(!0),d.eventCenter.emit(on.NODE_MOUSEENTER,{data:f,e:l})}},r.setHoverOff=function(l){var u=r.props,c=u.model,d=u.graphModel,f=c.getData();!c.isHovered||(c.setHovered(!1),d.eventCenter.emit(on.NODE_MOUSELEAVE,{data:f,e:l}))};var o=n.graphModel,i=o.gridSize,a=o.eventCenter,s=n.model;return r.stepDrag=new Fl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:i,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:s}),r.modelDisposer=CZ(function(){return r.props},function(l){l&&l.model&&r.stepDrag.setModel(l.model)}),r}return e.prototype.componentWillUnmount=function(){this.modelDisposer&&this.modelDisposer(),this.render.$mobx&&this.render.$mobx.dispose()},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getAnchorShape=function(n){return null},e.prototype.getAnchors=function(){var n=this,r=this.props,o=r.model,i=r.graphModel,a=o.isSelected,s=o.isHitable,l=o.isDragging,u=o.isShowAnchor;return s&&(a||u)&&!l?$a(o.anchors,function(c,d){var f=o.getAnchorLineStyle(c),h=o.getAnchorStyle(c);return ot(mUe,{anchorData:c,node:n,style:h,edgeStyle:f,anchorIndex:d,nodeModel:o,graphModel:i,setHoverOff:n.setHoverOff})}):[]},e.prototype.getRotateControl=function(){var n=this.props,r=n.model,o=n.graphModel,i=o.editConfigModel,a=i.isSilentMode,s=i.allowRotate,l=r.isSelected,u=r.isHitable,c=r.rotatable,d=r.isHovered,f=s&&c,h=r.getRotateControlStyle();if(!a&&u&&(l||d)&&f)return ot(bUe,{graphModel:o,nodeModel:r,eventCenter:o.eventCenter,style:h})},e.prototype.getResizeControl=function(){var n=this.props,r=n.model,o=n.graphModel,i=o.editConfigModel,a=i.isSilentMode,s=i.allowResize,l=r.isSelected,u=r.isHitable,c=r.resizable,d=r.isHovered,f=s&&c,h=r.getResizeControlStyle();return!a&&u&&(l||d)&&f?ot(VQe,{style:h,model:r,graphModel:o}):null},e.prototype.getText=function(){var n,r=this.props,o=r.model,i=r.graphModel,a=i.editConfigModel;if(a.nodeTextMode!==xl.TEXT||o.state===Ar.TEXT_EDIT)return null;if(o.text){var s=!1;return a.nodeTextDraggable&&o.text.draggable&&(s=!0),ot(lG,{editable:a.nodeTextEdit&&((n=o.text.editable)!==null&&n!==void 0?n:!0),model:o,graphModel:i,draggable:s})}return null},e.prototype.getStateClassName=function(){var n=this.props.model,r=n.state,o=n.isDragging,i=n.isSelected,a="lf-node";switch(r){case Ar.ALLOW_CONNECT:a+=" lf-node-allow";break;case Ar.NOT_ALLOW_CONNECT:a+=" lf-node-not-allow";break;default:a+=" lf-node-default";break}return o&&(a+=" lf-dragging"),i&&(a+=" lf-node-selected"),a},e.prototype.toFront=function(){var n=this.props,r=n.model,o=n.graphModel;r.autoToFront&&o.toFront(r.id)},e.prototype.render=function(){var n=this.props,r=n.model,o=n.graphModel,i=o.editConfigModel,a=i.hideAnchors,s=i.adjustNodePosition,l=i.allowRotate,u=i.allowResize,c=o.gridSize,d=o.transformModel.SCALE_X,f=r.isHitable,h=r.draggable,g=r.transform,v=r.getOuterGAttributes(),m=v.className,b=m===void 0?"":m,w=CUe(v,["className"]),O=ot("g",{className:"lf-node-content",children:[ot("g",{transform:g,children:[this.getShape(),this.getText(),l&&this.getRotateControl(),u&&this.getResizeControl()]}),!a&&this.getAnchors()]}),S;return f?(s&&h&&this.stepDrag.setStep(c*d),S=ot("g",TS({className:"".concat(this.getStateClassName()," ").concat(b),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu,onFocus:this.handleFocus,onBlur:this.handleBlur},w,{children:O}))):S=ot("g",TS({className:"".concat(this.getStateClassName()," ").concat(b)},w,{children:O})),S},e.isObserved=!1,e}(vr),EUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xP=globalThis&&globalThis.__assign||function(){return xP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},RUe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},ju;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ju||(ju={}));var eF=function(t){DUe(e,t);function e(n){var r=t.call(this)||this;r.handleMouseDown=function(l){r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.onDragStart=function(){var l=r.props,u=l.x,c=l.y,d=l.edgeModel,f=d.startPoint,h=d.endPoint,g=d.pointsList;r.oldEdge={startPoint:f,endPoint:h,pointsList:g},r.setState({endX:u,endY:c,dragging:!0})},r.onDragging=function(l){var u=l.deltaX,c=l.deltaY,d=r.state,f=d.endX,h=d.endY,g=r.props,v=g.graphModel,m=g.type,b=v.transformModel,w=v.editConfigModel,O=LUe(b.moveCanvasPointByHtml([f,h],u,c),2),S=O[0],x=O[1];r.setState({endX:S,endY:x,dragging:!0});var C=r.props.edgeModel,E=_S({x:f,y:h},v);if(E&&E.node&&r.isAllowAdjust(E).pass){var T=C.startPoint,M=C.endPoint,k=C.sourceNode,P=C.targetNode,R=m===ju.SOURCE?{startPoint:{x:E.anchor.x,y:E.anchor.y},endPoint:{x:M.x,y:M.y},sourceNode:E.node,targetNode:P}:{startPoint:{x:T.x,y:T.y},endPoint:{x:E.anchor.x,y:E.anchor.y},sourceNode:k,targetNode:E.node};C.updateAfterAdjustStartAndEnd(R)}else m===ju.SOURCE?C.updateStartPoint({x:S,y:x}):C.updateEndPoint({x:S,y:x});C.text.value&&w.adjustEdge&&C.setText(Object.assign({},C.text,C.textPosition))},r.onDragEnd=function(l){var u,c,d,f=l.event;try{r.setState({dragging:!1});var h=r.props,g=h.graphModel,v=h.edgeModel,m=h.type,b=r.state,w=b.endX,O=b.endY,S=b.dragging,x=_S({x:w,y:O},g);if(!S)return;var C=!1,E=void 0;if(x&&x.node){var T=r.isAllowAdjust(x),M=T.pass,k=T.msg,P=T.newTargetNode;if(M){var R=v.getData(),D=R.text,F=R.sourceAnchorId,W=F===void 0?"":F,I=R.targetAnchorId,Q=I===void 0?"":I,L=IUe(R,["text","sourceAnchorId","targetAnchorId"]);if(E=Jl(Jl({sourceAnchorId:W,targetAnchorId:Q},L),{text:(D==null?void 0:D.value)||""}),m===ju.SOURCE){var H=g.getNodeModelById(x.node.id),re=g.getNodeModelById(v.targetNodeId),U=(u=g.edgeGenerator)===null||u===void 0?void 0:u.call(g,H==null?void 0:H.getData(),re==null?void 0:re.getData(),E);E=Jl(Jl({},U),{sourceNodeId:x.node.id,sourceAnchorId:x.anchor.id,startPoint:{x:x.anchor.x,y:x.anchor.y},targetNodeId:v.targetNodeId,endPoint:Jl({},v.endPoint)}),v.sourceNodeId===x.node.id&&v.sourceAnchorId===x.anchor.id&&(C=!0)}else if(m===ju.TARGET){var H=g.getNodeModelById(v.sourceNodeId),re=g.getNodeModelById(x.node.id),U=(c=g.edgeGenerator)===null||c===void 0?void 0:c.call(g,H==null?void 0:H.getData(),re==null?void 0:re.getData(),E);E=Jl(Jl({},U),{sourceNodeId:v.sourceNodeId,startPoint:Jl({},v.startPoint),targetNodeId:x.node.id,targetAnchorId:x.anchor.id,endPoint:{x:x.anchor.x,y:x.anchor.y}}),v.targetNodeId===x.node.id&&v.targetAnchorId===x.anchor.id&&(C=!0)}}else{C=!0;var J=P.getData();g.eventCenter.emit(on.CONNECTION_NOT_ALLOWED,{data:J,msg:k})}}else C=!0;if(C)r.recoveryEdge();else{var ie=v.getData();g.deleteEdgeById(v.id);var te=g.addEdge(Jl({},E));g.eventCenter.emit(on.EDGE_EXCHANGE_NODE,{data:{newEdge:te.getData(),oldEdge:ie}})}(d=r.preTargetNode)===null||d===void 0||d.setElementState(Ar.DEFAULT)}finally{var g=r.props.graphModel;g.eventCenter.emit(on.ADJUST_POINT_DRAGEND,{e:f,data:r.stepDragData})}},r.recoveryEdge=function(){var l=r.props.edgeModel,u=r.oldEdge,c=u.startPoint,d=u.endPoint,f=u.pointsList;l.updateStartPoint(c),l.updateEndPoint(d),l.modelType!==er.LINE_EDGE&&(l.pointsList=f!=null?f:[],l.initPoints())},r.getAdjustPointStyle=function(){var l=r.props.graphModel.theme,u=l.edgeAdjust;return u},r.state={dragging:!1,endX:0,endY:0},r.targetRuleResults=new Map,r.sourceRuleResults=new Map;var o=n.type,i=n.edgeModel,a=n.graphModel,s=a.eventCenter;return r.stepDragData={type:o,edgeData:i.getData()},r.stepDrag=new Fl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:s,data:r.stepDragData}),r}return e.prototype.isAllowAdjust=function(n){var r=this.props,o=r.edgeModel,i=o.id,a=o.sourceNode,s=o.targetNode,l=o.sourceAnchorId,u=o.targetAnchorId,c=r.type,d,f,h,g;if(c===ju.SOURCE?(d=n.node,f=s,h=n.anchor,g=s.getAnchorInfo(u)):(d=a,f=n.node,g=n.anchor,h=a.getAnchorInfo(l)),this.preTargetNode&&this.preTargetNode!==n.node&&this.preTargetNode.setElementState(Ar.DEFAULT),this.preTargetNode=n.node,g.id===h.id)return{pass:!1,msg:"",newTargetNode:f};var v="".concat(d.id,"_").concat(f.id,"_").concat(h.id,"_").concat(g.id);if(!this.targetRuleResults.has(v)){var m=d.isAllowConnectedAsSource(f,h,g,i),b=f.isAllowConnectedAsTarget(d,h,g,i);this.sourceRuleResults.set(v,OS(m)),this.targetRuleResults.set(v,OS(b))}var w=this.sourceRuleResults.get(v),O=w.isAllPass,S=w.msg,x=this.targetRuleResults.get(v),C=x.isAllPass,E=x.msg,T=O&&C?Ar.ALLOW_CONNECT:Ar.NOT_ALLOW_CONNECT;return c===ju.SOURCE?d.setElementState(T):f.setElementState(T),{pass:O&&C,msg:E||S,newTargetNode:f}},e.prototype.render=function(){var n=this.props,r=n.x,o=n.y,i=n.getAdjustPointShape,a=n.edgeModel,s=this.state.dragging;return ot("g",{pointerEvents:s?"none":"",onMouseDown:this.handleMouseDown,children:s?"":i(r,o,a)})},e}(vr),BUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),NP=globalThis&&globalThis.__assign||function(){return NP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},YC=function(t){FUe(e,t);function e(){var n=t.call(this)||this;return n.textRef=VC(),n.handleHover=function(r,o){var i=n.props,a=i.model,s=i.graphModel.eventCenter;a.setHovered(r);var l=r?on.EDGE_MOUSEENTER:on.EDGE_MOUSELEAVE,u=a.getData();s.emit(l,{data:u,e:o})},n.setHoverOn=function(r){var o=n.props.model.isHovered;o||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOn(),n.handleHover(!0,r))},n.setHoverOff=function(r){var o=n.props.model.isHovered;!o||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOff(),n.handleHover(!1,r))},n.handleContextMenu=function(r){r.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var o=n.props,i=o.model,a=o.graphModel,s=a.editConfigModel,l=a.getPointByClient({x:r.clientX,y:r.clientY});a.setElementStateById(i.id,Ar.SHOW_MENU,l.domOverlayPosition),s.isSilentMode||n.toFront(),i.isSelected||a.selectEdgeById(i.id);var u=i==null?void 0:i.getData();a.eventCenter.emit(on.EDGE_CONTEXTMENU,{data:u,e:r,position:l})},n.handleMouseDown=function(r){r.stopPropagation(),n.startTime=new Date().getTime()},n.handleMouseUp=function(){var r=n.props.model;n.mouseUpDrag=r.isDragging},n.handleClick=function(r){if(!!n.startTime&&!n.mouseUpDrag){var o=r.button===2;if(!o){var i=r.detail===2,a=n.props,s=a.model,l=a.graphModel,u=s==null?void 0:s.getData(),c=l.getPointByClient({x:r.clientX,y:r.clientY});if(i){var d=l.editConfigModel,f=l.textEditElement,h=s.id,g=s.text,v=s.modelType;if(f&&f.id===h&&l.setElementStateById(h,Ar.DEFAULT),d.edgeTextEdit&&g.editable&&(s.setSelected(!1),l.setElementStateById(h,Ar.TEXT_EDIT)),v===er.POLYLINE_EDGE){var m=s,b=l.getPointByClient({x:r.x,y:r.y}).canvasOverlayPosition,w=b.x,O=b.y;m.dbClickPosition=ZZ({x:w,y:O},m.points)}l.eventCenter.emit(on.EDGE_DBCLICK,{data:u,e:r,position:c})}else l.eventCenter.emit(on.ELEMENT_CLICK,{data:u,e:r,position:c}),l.eventCenter.emit(on.EDGE_CLICK,{data:u,e:r,position:c});var S=l.editConfigModel;l.selectEdgeById(s.id,GZ(r,S)),S.isSilentMode||n.toFront()}}},n.handleFocus=function(){var r=n.props,o=r.model,i=r.graphModel;i.eventCenter.emit(on.EDGE_FOCUS,{data:o.getData()})},n.handleBlur=function(){var r=n.props,o=r.model,i=r.graphModel;i.eventCenter.emit(on.EDGE_BLUR,{data:o.getData()})},n}return e.prototype.getShape=function(){return ot("g",{children:this.getEdge()})},e.prototype.getTextStyle=function(){},e.prototype.getText=function(){var n,r=this.props,o=r.model,i=r.graphModel,a=i.editConfigModel;if(a.edgeTextMode!==xl.TEXT||o.state===Ar.TEXT_EDIT)return null;if(o.text){var s=!1;return a.edgeTextDraggable&&o.text.draggable&&(s=!0),ot(SUe,{ref:this.textRef,editable:a.edgeTextEdit&&((n=o.text.editable)!==null&&n!==void 0?n:!0),model:o,graphModel:i,draggable:s})}return null},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.startPoint,o=n.endPoint,i=n.isSelected,a=this.state.hover;return{start:r,end:o,hover:a,isSelected:i}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.startPoint,o=n.endPoint;return[r,o]},e.prototype.getArrowStyle=function(){return console.error("getArrowStyle is deprecated in 1.2.0, please use model.getArrowStyle"),null},e.prototype.getArrow=function(){var n=this.props.model,r=n.id,o=n.getArrowStyle(),i=o.refY,a=i===void 0?0:i,s=o.refX,l=s===void 0?2:s,u=VUe(this.getLastTwoPoints(),2),c=u[0],d=u[1],f="auto";return c!==null&&d!==null&&(f=nHe(tHe({x:d.x-c.x,y:d.y-c.y,z:0}))),ot("g",{children:ot("defs",{children:[ot("marker",{id:"marker-start-".concat(r),refX:-l,refY:a,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse",children:this.getStartArrow()}),ot("marker",{id:"marker-end-".concat(r),refX:l,refY:a,overflow:"visible",orient:f,markerUnits:"userSpaceOnUse",children:this.getEndArrow()})]})})},e.prototype.getArrowPath=function(n,r){var o=r.stroke,i=r.fill,a=i===void 0?o:i,s=r.strokeWidth,l=r.offset,u=l===void 0?10:l,c=r.verticalLength,d=r.strokeLinecap,f=r.strokeLinejoin,h=r.transform,g="";switch(n){case"solid":g="M".concat(-u/4,",0 L").concat(3*u/4,",").concat(c," L").concat(3*u/4,",-").concat(c," Z");break;case"hollow":g="M".concat(-u/4,",0 L").concat(3*u/4,",").concat(c," L").concat(-u/4,",0 L").concat(3*u/4,",-").concat(c," L").concat(-u/4,",0 Z");break;case"diamond":g="M".concat(-u/2,",0 L0,").concat(c," L").concat(u/2,",0 L0,-").concat(c," L").concat(-u/2,",0 Z");break;case"circle":g="M".concat(-u/2,",0 A").concat(u/4,",").concat(u/4," 0 1,0 ").concat(u/2,",0 A").concat(u/4,",").concat(u/4," 0 1,0 ").concat(-u/2,",0 Z");break;default:g="";break}return ot("path",{d:g,stroke:o,fill:a,strokeWidth:s,strokeLinecap:d,strokeLinejoin:f,transform:h})},e.prototype.getStartArrow=function(){var n=this.props.model,r=n.getArrowStyle(),o=r.stroke,i=r.strokeWidth,a=r.offset,s=r.verticalLength,l=r.startArrowType,u=l===void 0?"none":l,c=r.strokeLinecap,d=r.strokeLinejoin;return this.getArrowPath(u,{stroke:o,strokeWidth:i,offset:a,verticalLength:s,strokeLinecap:c,strokeLinejoin:d})},e.prototype.getEndArrow=function(){var n=this.props.model,r=n.getArrowStyle(),o=r.stroke,i=r.strokeWidth,a=r.offset,s=r.verticalLength,l=r.endArrowType,u=l===void 0?"solid":l,c=r.strokeLinecap,d=r.strokeLinejoin;return this.getArrowPath(u,{stroke:o,strokeWidth:i,offset:a,verticalLength:s,strokeLinecap:c,strokeLinejoin:d,transform:"rotate(180)"})},e.prototype.getAdjustPointShape=function(n,r,o){var i=o.getAdjustPointStyle();return ot(Vv,i0({className:"lf-edge-adjust-point"},i,{x:n,y:r}))},e.prototype.getAdjustPoints=function(){var n=this.props,r=n.model,o=n.graphModel,i=o.editConfigModel,a=i.adjustEdgeStartAndEnd,s=i.adjustEdgeStart,l=i.adjustEdgeEnd,u=r.getAdjustStart(),c=r.getAdjustEnd();return ot("g",{children:[a&&s&&ot(eF,i0({type:ju.SOURCE},u,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:o})),a&&l&&ot(eF,i0({type:ju.TARGET},c,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:o}))]})},e.prototype.getAnimation=function(){console.error("getAnimation is deprecated in 1.2.0, please use model.getEdgeAnimationStyle")},e.prototype.getAppendWidth=function(){return ot("g",{})},e.prototype.getAppend=function(){return ot("g",{className:"lf-edge-append",children:this.getAppendWidth()})},e.prototype.getEdge=function(){return null},e.prototype.toFront=function(){var n=this.props,r=n.graphModel,o=n.model;r.toFront(o.id)},e.prototype.render=function(){var n=this.props.model,r=n.isSelected,o=n.isHitable,i=n.isShowAdjustPoint;return ot("g",{children:[ot("g",{className:["lf-edge",!o&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverOn,onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,onFocus:this.handleFocus,onBlur:this.handleBlur,children:[this.getShape(),this.getAppend(),this.getText(),this.getArrow()]}),i&&r?this.getAdjustPoints():""]})},e.isObserved=!1,e}(vr),zUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),MP=globalThis&&globalThis.__assign||function(){return MP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},$P=function(t){zUe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.getEdgeStyle(),o=n,i=o.path,a=o.isAnimation,s=o.arrowConfig,l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,g=l.animationIterationCount,v=l.animationTimingFunction,m=l.animationDirection;return ot(rb,MP({d:i},r,s,a?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:g,animationTimingFunction:v,animationDirection:m}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model.path;return ot(rb,{d:n,strokeWidth:10,stroke:"transparent",fill:"none"})},e.prototype.getArrowInfo=function(){var n=this.props.model,r=this.state.hover,o=n.isSelected,i=n.getArrowStyle().offset,a=n.pointsList.map(function(d){return{x:d.x,y:d.y}}),s=jUe(D6(a,i),2),l=s[0],u=s[1],c={start:l,end:u,hover:r,isSelected:o};return c},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.getArrowStyle().offset,o=n.pointsList.map(function(i){return{x:i.x,y:i.y}});return D6(o,r)},e}(YC),WUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),RP=globalThis&&globalThis.__assign||function(){return RP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},cb=function(t){QUe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(){var r=n.props.model;r.dragAppendStart(),n.isShowAdjustPointTemp=r.isShowAdjustPoint,r.isShowAdjustPoint=!1},n.onDragging=function(r){var o=r.deltaX,i=r.deltaY,a=n.props,s=a.model,l=a.graphModel;n.isDragging=!0;var u=l.transformModel,c=l.editConfigModel,d=HUe(u.fixDeltaXY(o,i),2),f=d[0],h=d[1],g=s,v=c.adjustEdgeMiddle;v?n.appendInfo=g.dragAppendSimple(n.appendInfo,{x:f,y:h}):n.appendInfo=g.dragAppend(n.appendInfo,{x:f,y:h})},n.onDragEnd=function(){var r,o=n.props,i=o.model,a=o.graphModel.eventCenter,s=i;s.dragAppendEnd(),n.isDragging=!1,s.isShowAdjustPoint=(r=n.isShowAdjustPointTemp)!==null&&r!==void 0?r:!1,n.appendInfo=void 0,a.emit(on.EDGE_ADJUST,{data:s.getData()})},n.beforeDragStart=function(r,o){o.draggable&&n.drag.handleMouseDown(r),n.appendInfo=o},n.drag=new Fl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,o=n.isAnimation,i=n.arrowConfig,a=n.getEdgeStyle(),s=n.getEdgeAnimationStyle(),l=s.strokeDasharray,u=s.stroke,c=s.strokeDashoffset,d=s.animationName,f=s.animationDuration,h=s.animationIterationCount,g=s.animationTimingFunction,v=s.animationDirection;return ot(IQe,Bh({points:r},a,i,o?{strokeDasharray:l,stroke:u,style:{strokeDashoffset:c,animationName:d,animationDuration:f,animationIterationCount:h,animationTimingFunction:g,animationDirection:v}}:{}))},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.points,o=n.isSelected,i=this.state.hover,a=Sp(r),s=a[0],l=a[0];return a.length>=2&&(s=a[a.length-2],l=a[a.length-1]),{start:s,end:l,hover:i,isSelected:o}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.points,o=Sp(r),i=o[0],a=o[0];return o.length>=2&&(i=o[o.length-2],a=o[o.length-1]),[i,a]},e.prototype.getAppendAttributes=function(n){var r=n.start,o=n.end,i;if(r.x===o.x&&r.y===o.y)i="";else{var a={start:r,end:o,offset:10,verticalLength:5},s=eb(Bh(Bh({},a),{type:"start"})),l=eb(Bh(Bh({},a),{type:"end"}));i="M".concat(s.leftX," ").concat(s.leftY,` L`).concat(s.rightX," ").concat(s.rightY,` L`).concat(l.rightX," ").concat(l.rightY,` L`).concat(l.leftX," ").concat(l.leftY," z")}return{d:i,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var r=this.getAppendAttributes(n),o=r.d,i=r.strokeWidth,a=r.fill,s=r.strokeDasharray,l=r.stroke;return ot(rb,{d:o,fill:a,strokeWidth:i,stroke:l,strokeDasharray:s})},e.prototype.getAppendWidth=function(){for(var n=this,r=this.props,o=r.model,i=r.graphModel,a=o.pointsList,s=o.draggable,l=[],u=a.length,c=function(h){var g="lf-polyline-append",v={start:{x:a[h].x,y:a[h].y},end:{x:a[h+1].x,y:a[h+1].y},startIndex:h,endIndex:h+1,direction:ho.HORIZONTAL,draggable:!0},m=ot("g",{className:g,children:d.getAppendShape(v)}),b=i.editConfigModel,w=b.adjustEdge,O=b.adjustEdgeMiddle;if(w&&s){var S=v.startIndex,x=v.endIndex,C=O&&(S===0||x===u-1);v.draggable=!C,v.start.x===v.end.x?(v.draggable&&(g+="-ew-resize"),v.direction=ho.VERTICAL):v.start.y===v.end.y&&(v.draggable&&(g+="-ns-resize"),v.direction=ho.HORIZONTAL),m=ot("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(E){return n.beforeDragStart(E,v)},children:ot("g",{className:g,children:d.getAppendShape(v)})})}l.push(m)},d=this,f=0;f=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},GUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},qUe=function(t){XUe(e,t);function e(n){var r=t.call(this,n)||this;return r.ref=VC(),r.__prevText={type:"",text:"",id:""},r.keyupHandler=function(o){var i=r.props.graphModel.textEditElement;o.key==="Enter"&&o.altKey&&(i==null||i.setElementState(Ar.DEFAULT))},r.inputHandler=function(o){var i=o.target.innerText,a=r.props.graphModel.textEditElement;a&&(r.__prevText={type:a.type,text:i.replace(/(\r\n)+$|(\n)+$/,""),id:a.id})},r.keydownHandler=function(o){o.stopPropagation()},r.state={style:{left:0,top:0}},r}return e.getDerivedStateFromProps=function(n){var r,o=n.textEditElement,i=n.graphModel,a=i.transformModel,s=i.theme,l=s.inputText,u;if(o){if(!(!((r=o.text)===null||r===void 0)&&r.value)&&o.BaseType===Eo.EDGE){var c=o.text,d=o.textPosition,f=d.x,h=d.y;c.x=f,c.y=h,o.setText(c)}var g={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(o.BaseType===Eo.EDGE){var v=s.edgeText,m=v.overflowMode,b=v.lineHeight,w=v.wrapPadding,O=v.textWidth;O&&m==="autoWrap"&&(u=Wc(Wc({},g),{width:O,minWidth:O,lineHeight:b,padding:w}))}else if(o.BaseType===Eo.NODE){var S=s.nodeText,m=S.overflowMode,b=S.lineHeight,w=S.wrapPadding,O=S.textWidth,x=o.width,C=o.modelType,E=o.textWidth,T=E||O||x;(C!==er.TEXT_NODE&&m==="autoWrap"||C===er.TEXT_NODE&&O)&&(u=Wc(Wc({},g),{width:T,minWidth:T,lineHeight:b,padding:w}))}var M=o.text,k=M.x,P=M.y,R=GUe(a.CanvasPointToHtmlPoint([k,P]),2),D=R[0],F=R[1];return{style:Wc(Wc({left:D,top:F},u),l)}}return null},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var r=this.__prevText,o=r.text,i=r.id;n.updateText(i,o),n.eventCenter.emit(on.TEXT_UPDATE,{data:Wc({},this.__prevText)}),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}},e.prototype.placeCaretAtEnd=function(n){if(window.getSelection!==void 0&&document.createRange!==void 0){var r=document.createRange();r.selectNodeContents(n),r.collapse(!1);var o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(r)}},e.prototype.render=function(){var n,r=this.props.graphModel.textEditElement,o=this.state.style;return r?ot("div",{contentEditable:!0,className:"lf-text-input",style:o,ref:this.ref,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler,children:(n=r.text)===null||n===void 0?void 0:n.value},r.id):null},e.toolName="text-edit-tool",e=ZUe([Ra],e),e}(vr),KUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JUe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},T2=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},eYe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},nYe=[qUe,tYe],rYe=function(){function t(e){var n=this;this.toolMap=new Map,this.disabledToolMap=new Map,this.instance=e,zn(nYe,function(i){n.isDisabled(i.toolName)||n.registerTool(i.toolName,i)});var r=e.graphModel,o=r.eventCenter;o.on("".concat(on.GRAPH_TRANSFORM,",").concat(on.NODE_CLICK,",").concat(on.BLANK_CLICK," "),function(){var i,a=r.textEditElement,s=r.editConfigModel,l=s.edgeTextEdit,u=s.nodeTextEdit;(l||u)&&a&&((i=r.textEditElement)===null||i===void 0||i.setElementState(Ar.DEFAULT))})}return t.prototype.isDisabled=function(e){var n;return((n=this.instance.options.disabledTools)===null||n===void 0?void 0:n.indexOf(e))!==-1},t.prototype.registerTool=function(e,n){this.toolMap.set(e,n)},t.prototype.disableTool=function(e){var n=this.toolMap.get(e);if(n)return this.disabledToolMap.set(e,n),this.toolMap.delete(e),!0;throw new Error("\u7981\u7528\u5931\u8D25\uFF0C\u4E0D\u5B58\u5728\u540D\u4E3A ".concat(n," \u7684\u5DE5\u5177"))},t.prototype.enableTool=function(e){var n=this.disabledToolMap.get(e);if(n)return this.toolMap.set(e,n),this.disabledToolMap.delete(e),!0;throw new Error("\u4E0D\u5B58\u5728\u540D\u4E3A ".concat(n," \u7684\u5DE5\u5177"))},t.prototype.getTools=function(){return Array.from(this.toolMap.values())},t.prototype.getInstance=function(){return this.instance},t.prototype.destroy=function(){this.toolMap.clear(),this.disabledToolMap.clear()},k2([it],t.prototype,"toolMap",void 0),k2([rt],t.prototype,"disableTool",null),k2([rt],t.prototype,"enableTool",null),t}();function oYe(t){throw new Error("[mobx-utils] "+t)}function MS(t,e){e===void 0&&(e="Illegal state"),t||oYe(e)}var uG=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(uG(Object.getPrototypeOf(t))||[])},iYe=function(t){var e=uG(t),n=e.filter(function(r,o){return e.indexOf(r)===o});return n},aYe=function(t){return iYe(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},cG="pending",$S="fulfilled",bD="rejected";function sYe(t){switch(this.state){case cG:return t.pending&&t.pending(this.value);case bD:return t.rejected&&t.rejected(this.value);case $S:return t.fulfilled?t.fulfilled(this.value):this.value}}function nF(t,e){if(MS(arguments.length<=2,"fromPromise expects up to two arguments"),MS(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var n=t;t.then(rt("observableFromPromise-resolve",function(o){n.value=o,n.state=$S}),rt("observableFromPromise-reject",function(o){n.value=o,n.state=bD})),n.isPromiseBasedObservable=!0,n.case=sYe;var r=e&&e.state===$S?e.value:void 0;return tP(n,{value:r,state:cG},{},{deep:!1}),n}(function(t){t.reject=rt("fromPromise.reject",function(n){var r=t(Promise.reject(n));return r.state=bD,r.value=n,r});function e(n){n===void 0&&(n=void 0);var r=t(Promise.resolve(n));return r.state=$S,r.value=n,r}t.resolve=rt("fromPromise.resolve",e)})(nF||(nF={}));var r1=function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i};(function(){function t(e,n){var r=this;Vje(function(){r.current=n,r.subscription=e.subscribe(r)})}return t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(e){this.current=e},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(e){this.current=e,this.dispose()},r1([it.ref],t.prototype,"current",void 0),r1([rt.bound],t.prototype,"next",null),r1([rt.bound],t.prototype,"complete",null),r1([rt.bound],t.prototype,"error",null),t})();var RS=function(){return RS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},lYe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function t(e){var n=this;this.model=e,this.localValues=it.map({}),this.localComputedValues=it.map({}),this.isPropertyDirty=function(r){return n.localValues.has(r)},MS(Dl(e),"createViewModel expects an observable object"),aYe(e).forEach(function(r){if(!(r===In||r==="__mobxDidRunLazyInitializers")){if(MS(lYe.indexOf(r)===-1,"The propertyname "+r+" is reserved and cannot be used with viewModels"),UB(e,r)){var o=u_(e,r).derivation;n.localComputedValues.set(r,Zr(o.bind(n)))}var i=Object.getOwnPropertyDescriptor(e,r),a=i?{enumerable:i.enumerable}:{};Object.defineProperty(n,r,RS(RS({},a),{configurable:!0,get:function(){return UB(e,r)?n.localComputedValues.get(r).get():n.isPropertyDirty(r)?n.localValues.get(r):n.model[r]},set:rt(function(s){s!==n.model[r]?n.localValues.set(r,s):n.localValues.delete(r)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this;Lv(this.localValues).forEach(function(n){var r=e.localValues.get(n),o=e.model[n];Cc(o)?o.replace(r):ps(o)?(o.clear(),o.merge(r)):Yje(r)||(e.model[n]=r)}),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(e){this.localValues.delete(e)},sy([Zr],t.prototype,"isDirty",null),sy([Zr],t.prototype,"changedValues",null),sy([rt.bound],t.prototype,"submit",null),sy([rt.bound],t.prototype,"reset",null),sy([rt.bound],t.prototype,"resetProperty",null),t})();function A2(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function P2(t){return Dl(t)||Cc(t)||ps(t)}function uYe(t,e){var n=new WeakMap;function r(s){var l=n.get(s.object);o(s,l),e(s,A2(l),t)}function o(s,l){switch(s.type){case"add":i(s.newValue,l,s.name);break;case"update":a(s.oldValue),i(s.newValue,l,s.name||""+s.index);break;case"remove":case"delete":a(s.oldValue);break;case"splice":s.removed.map(a),s.added.forEach(function(d,f){return i(d,l,""+(s.index+f))});for(var u=s.index+s.addedCount;uthis.maxSize&&this.undos.shift())},t.prototype.undoAble=function(){return this.undos.length>1},t.prototype.undo=function(){if(!!this.undoAble()){var e=this.undos.pop();this.redos.push(e);var n=this.undos.pop();return this.curData=bn(n),n}},t.prototype.redoAble=function(){return this.redos.length>0},t.prototype.redo=function(){if(!!this.redoAble()){var e=this.redos.pop();return this.curData=bn(e),e}},t.prototype.watch=function(e){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(e.modelToGraphData()),this.stopWatch=uYe(e,Hi(function(){var r=e.modelToHistoryData();r&&n.add(DP({},r))},this.waitTime))},t.prototype.destroy=function(){this.undos=[],this.redos=[],this.curData=null,this.stopWatch&&this.stopWatch()},t}(),dG={exports:{}};(function(t){(function(e,n,r){if(!e)return;for(var o={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},i={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},l,u=1;u<20;++u)o[111+u]="f"+u;for(u=0;u<=9;++u)o[u+96]=u.toString();function c(E,T,M){if(E.addEventListener){E.addEventListener(T,M,!1);return}E.attachEvent("on"+T,M)}function d(E){if(E.type=="keypress"){var T=String.fromCharCode(E.which);return E.shiftKey||(T=T.toLowerCase()),T}return o[E.which]?o[E.which]:i[E.which]?i[E.which]:String.fromCharCode(E.which).toLowerCase()}function f(E,T){return E.sort().join(",")===T.sort().join(",")}function h(E){var T=[];return E.shiftKey&&T.push("shift"),E.altKey&&T.push("alt"),E.ctrlKey&&T.push("ctrl"),E.metaKey&&T.push("meta"),T}function g(E){if(E.preventDefault){E.preventDefault();return}E.returnValue=!1}function v(E){if(E.stopPropagation){E.stopPropagation();return}E.cancelBubble=!0}function m(E){return E=="shift"||E=="ctrl"||E=="alt"||E=="meta"}function b(){if(!l){l={};for(var E in o)E>95&&E<112||o.hasOwnProperty(E)&&(l[o[E]]=E)}return l}function w(E,T,M){return M||(M=b()[E]?"keydown":"keypress"),M=="keypress"&&T.length&&(M="keydown"),M}function O(E){return E==="+"?["+"]:(E=E.replace(/\+{2}/g,"+plus"),E.split("+"))}function S(E,T){var M,k,P,R=[];for(M=O(E),P=0;P1){H(U,K,J,ie);return}ne=S(U,ie),T._callbacks[ne.key]=T._callbacks[ne.key]||[],W(ne.key,ne.modifiers,{type:ne.action},te,U,he),T._callbacks[ne.key][te?"unshift":"push"]({callback:J,modifiers:ne.modifiers,action:ne.action,seq:te,level:he,combo:U})}T._bindMultiple=function(U,J,ie){for(var te=0;te-1||x(T,M.target))return!1;if("composedPath"in E&&typeof E.composedPath=="function"){var k=E.composedPath()[0];k!==E.target&&(T=k)}return T.tagName=="INPUT"||T.tagName=="SELECT"||T.tagName=="TEXTAREA"||T.isContentEditable},C.prototype.handleKey=function(){var E=this;return E._handleKey.apply(E,arguments)},C.addKeycodes=function(E){for(var T in E)E.hasOwnProperty(T)&&(o[T]=E[T]);l=null},C.init=function(){var E=C(n);for(var T in E)T.charAt(0)!=="_"&&(C[T]=function(M){return function(){return E[M].apply(E,arguments)}}(T))},C.init(),e.Mousetrap=C,t.exports&&(t.exports=C),typeof r=="function"&&r.amd&&r(function(){return C})})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)})(dG);var fYe=dG.exports,lf=globalThis&&globalThis.__assign||function(){return lf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),$w(t.text)||(t.text.x+=e,t.text.y+=e),t}function pYe(t,e){var n=t.x,r=t.y,o=t.text,i=o?{x:o.x+e,y:o.y+e,value:o.value}:void 0;return lf(lf({},t),{id:"",x:n+e,y:r+e,text:i})}function gYe(t,e){var n=t.startPoint,r=t.endPoint,o=t.pointsList,i=t.text,a=hYe(t,["startPoint","endPoint","pointsList","text"]);a.id="";var s={x:n.x+e,y:n.y+e},l={x:r.x+e,y:r.y+e},u=$a(o,function(d){return{x:d.x+e,y:d.y+e}}),c=i?lf(lf({},i),{x:i.x+e,y:i.y+e}):void 0;return lf(lf({},a),{startPoint:s,endPoint:l,pointsList:u,text:c})}var gg=40,o1=40;function vYe(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],function(){if(o1=gg,!(r!=null&&r.enabled)||e.textEditElement)return!0;var o=t.options.guards,i=e.getSelectElements(!1),a=o&&o.beforeClone?o.beforeClone(i):!0;return!a||i.nodes.length===0&&i.edges.length===0?(Mu=null,!0):(Mu=i,Mu.nodes.forEach(function(s){return rF(s,gg)}),Mu.edges.forEach(function(s){return oF(s,gg)}),!1)}),n.on(["cmd + v","ctrl + v"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;if(Mu&&(Mu.nodes||Mu.edges)){t.clearSelectElements();var o=t.addElements(Mu,o1);if(!o)return!0;o.nodes.forEach(function(i){return t.selectElementById(i.id,!0)}),o.edges.forEach(function(i){return t.selectElementById(i.id,!0)}),Mu.nodes.forEach(function(i){return rF(i,gg)}),Mu.edges.forEach(function(i){return oF(i,gg)}),o1=o1+gg}return!1}),n.on(["cmd + z","ctrl + z"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.undo(),!1)}),n.on(["cmd + y","ctrl + y"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.redo(),!1)}),n.on(["backspace"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;var o=e.getSelectElements(!0);return t.clearSelectElements(),o.edges.forEach(function(i){return i.id&&t.deleteEdge(i.id)}),o.nodes.forEach(function(i){return i.id&&t.deleteNode(i.id)}),!1})}var mYe=function(){function t(e){e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new fYe(this.target),e.keyboard.enabled&&!n.options.isSilentMode&&this.enable(!0)}return t.prototype.initShortcuts=function(){var e=this,n,r=((n=this.options.keyboard)!==null&&n!==void 0?n:{}).shortcuts;if(r)if(Wn(r))r.forEach(function(s){var l=s.keys,u=s.callback,c=s.action;return e.on(l,u,c)});else{var o=r.keys,i=r.callback,a=r.action;this.on(o,i,a)}},t.prototype.on=function(e,n,r){this.mousetrap.bind(this.getKeys(e),n,r)},Object.defineProperty(t.prototype,"disabled",{get:function(){var e,n;return((n=(e=this.options)===null||e===void 0?void 0:e.keyboard)===null||n===void 0?void 0:n.enabled)!==!0},enumerable:!1,configurable:!0}),t.prototype.off=function(e,n){this.mousetrap.unbind(this.getKeys(e),n)},t.prototype.enable=function(e){(this.disabled||e)&&(this.options.keyboard&&(this.options.keyboard.enabled=!0),this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))},t.prototype.disable=function(){this.disabled||(this.options.keyboard&&(this.options.keyboard.enabled=!1),this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))},t.prototype.destroy=function(){this.mousetrap.reset()},t.prototype.getKeys=function(e){var n=this;return(Array.isArray(e)?e:[e]).map(function(r){return n.formatKey(r)})},t.prototype.formatKey=function(e){return e.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")},t}(),Gd=globalThis&&globalThis.__assign||function(){return Gd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},N2=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r");var o="";if(e==="#text")return _h+r+t;if(e==="#cdata-section")return _h+r+"";if(e==="#comment")return _h+r+"";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+SYe(t)+'"';if(Array.isArray(t))t.forEach(function(l){o+=ow(l,e,n+1)});else if(bG(t)==="[object Object]"){var i=Object.keys(t),a="",s="";o+=(n===0?"":_h+r)+"<"+e,i.forEach(function(l){l.charAt(0)==="-"?a+=ow(t[l],l,n+1):s+=ow(t[l],l,n+1)}),o+=a+(s!==""?">".concat(s).concat(_h+r,""):" />")}else o+=_h+r+"<".concat(e,">").concat(t.toString(),"");return o}function xYe(t){var e="";for(var n in t)e+=ow(t[n],n,0);return e}var Fa=function(){};Fa.ObjTree=function(){return this};Fa.ObjTree.VERSION="0.23";Fa.ObjTree.prototype.xmlDecl=` `;Fa.ObjTree.prototype.attr_prefix="-";Fa.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e)return this.parseDOM(e)};Fa.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var o in e)r[o]=e[o];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var i=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=i.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Fa.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(o,i):typeof i=="object"?n[n.length]=this.hash_to_xml(o,i):n[n.length]=this.scalar_to_xml(o,i):r[r.length]=" "+o.substring(1)+'="'+this.xml_escape(i)+'"'}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<"+t+a+`> `+s+" `:s="<"+t+a+">"+s+" `:s="<"+t+a+` /> `),s};Fa.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r":typeof o=="object"&&o.constructor==Array?n[n.length]=this.array_to_xml(t,o):typeof o=="object"?n[n.length]=this.hash_to_xml(t,o):n[n.length]=this.scalar_to_xml(t,o)}return n.join("")};Fa.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+" `};Fa.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,'"')};var CYe=function(t){return new Fa.ObjTree().parseXML(t)},EYe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),BP=globalThis&&globalThis.__assign||function(){return BP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},fc;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(fc||(fc={}));var _G=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],dF=["properties","startPoint","endPoint","pointsList"];function fF(t){var e=t?dF.concat(t):dF;return function(n){function r(o){var i={};return typeof o=="string"?o:Array.isArray(o)?o.map(function(a){return r(a)}):(Object.entries(o).forEach(function(a){var s=XC(a,2),l=s[0],u=s[1];typeof u!="object"?l.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(l)?i[l]=u:i["-".concat(l)]=u:e.includes(l)?i["-".concat(l)]=r(u):i[l]=r(u)}),i)}return r(n)}}function BS(t){var e={};return Object.entries(t).forEach(function(n){var r=XC(n,2),o=r[0],i=r[1];o.indexOf("-")===0?e[o.substring(1)]=LS(i):typeof i=="string"?e[o]=i:Object.prototype.toString.call(i)==="[object Object]"?e[o]=BS(i):Array.isArray(i)?e[o]=i.map(function(a){return BS(a)}):e[o]=i}),e}function TYe(t,e,n){var r=new Map;e.nodes.forEach(function(i){var a,s={"-id":i.id};if(!((a=i.text)===null||a===void 0)&&a.value&&(s["-name"]=i.text.value),i.properties){var l=fF(n)(i.properties);Object.assign(s,l)}r.set(i.id,s),t[i.type]?Array.isArray(t[i.type])?t[i.type].push(s):t[i.type]=[t[i.type],s]:t[i.type]=s});var o=e.edges.map(function(i){var a,s,l=r.get(i.targetNodeId);l["bpmn:incoming"]?Array.isArray(l["bpmn:incoming"])?l["bpmn:incoming"].push(i.id):l["bpmn:incoming"]=[l["bpmn:incoming"],i.id]:l["bpmn:incoming"]=i.id;var u={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((a=i.text)===null||a===void 0)&&a.value&&(u["-name"]=(s=i.text)===null||s===void 0?void 0:s.value),i.properties){var c=fF(n)(i.properties);Object.assign(u,c)}return u});e.edges.forEach(function(i){var a=r.get(i.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(i.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],i.id]:a["bpmn:outgoing"]=i.id}),t[fc.FLOW]=o}function kYe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,o=n.id,i=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(o,"_di"),"-bpmnElement":o,"di:waypoint":i};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,o=n.id,i=100,a=80,s=n.x,l=n.y,u=nh.shapeConfigMap.get(n.type);u&&(i=u.width,a=u.height),s-=i/2,l-=a/2;var c={"-id":"".concat(o,"_di"),"-bpmnElement":o,"dc:Bounds":{"-x":s,"-y":l,"-width":i,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}function AYe(t){var e=[],n=[],r=t["bpmn:definitions"];if(r){var o=r["bpmn:process"];Object.keys(o).forEach(function(i){if(i.indexOf("bpmn:")===0){var a=o[i];if(i===fc.FLOW){var s=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];n=NYe(a,s)}else{var l=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];e=e.concat(PYe(a,l,i))}}})}return{nodes:e,edges:n}}function PYe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=hF(s,n,a);r.push(l)});else{var o=void 0;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):o=e;var i=hF(o,n,t);r.push(i)}return r}function hF(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),o=Number(t["dc:Bounds"]["-y"]),i=n["-name"],a=nh.shapeConfigMap.get(e);a&&(r+=a.width/2,o+=a.height/2);var s;Object.entries(n).forEach(function(d){var f=XC(d,2),h=f[0],g=f[1];_G.indexOf(h)===-1&&(s||(s={}),s[h]=g)}),s&&(s=BS(s));var l;if(i&&(l={x:r,y:o,value:i},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var u=t["bpmndi:BPMNLabel"]["dc:Bounds"];l.x=Number(u["-x"])+Number(u["-width"])/2,l.y=Number(u["-y"])+Number(u["-height"])/2}var c={id:t["-bpmnElement"],type:e,x:r,y:o,properties:s};return l&&(c.text=l),c}function NYe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(o){var i;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===o["-id"]}):i=e,n.push(pF(i,o))});else{var r=void 0;Array.isArray(e)?r=e.find(function(o){return o["-bpmnElement"]===t["-id"]}):r=e,n.push(pF(r,t))}return n}function pF(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var o=t["bpmndi:BPMNLabel"]["dc:Bounds"],i=0;r.split(` `).forEach(function(l){i0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},LYe=Fl,BYe=function(t){DYe(e,t);function e(n){var r=t.call(this)||this;return r.updatePosition=function(o){var i=o.deltaX,a=o.deltaY,s=r.nodeModel,l=s.x,u=s.y;r.nodeModel.x=l+i/2,r.nodeModel.y=u+a/2,r.nodeModel.moveText(i/2,a/2)},r.getResize=function(o){var i=o.index,a=o.deltaX,s=o.deltaY,l=o.width,u=o.height,c=o.PCTResizeInfo,d=o.pct,f=d===void 0?1:d,h=o.freezeWidth,g=h===void 0?!1:h,v=o.freezeHeight,m=v===void 0?!1:v,b={width:l,height:u,deltaX:a,deltaY:s};if(c){var w=4,O=0,S=0;switch(i){case 0:S=(a*-1-s)/w;break;case 1:S=(a-s)/w;break;case 2:S=(a+s)/w;break;case 3:S=(a*-1+s)/w;break}S!==0&&(O=Math.round(S/c.ResizeBasis.basisHeight*1e5)/1e3),c.ResizePCT.widthPCT=Math.max(Math.min(c.ResizePCT.widthPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit),c.ResizePCT.heightPCT=Math.max(Math.min(c.ResizePCT.heightPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit);var x=Math.round(c.ResizePCT.widthPCT*c.ResizeBasis.basisWidth/100),C=Math.round(c.ResizePCT.heightPCT*c.ResizeBasis.basisHeight/100);switch(i){case 0:a=l-x,s=u-C;break;case 1:a=x-l,s=u-C;break;case 2:a=x-l,s=C-u;break;case 3:a=l-x,s=C-u;break}return b.width=x,b.height=C,b.deltaX=a/f,b.deltaY=s/f,b}switch(i){case 0:b.width=g?l:l-a*f,b.height=m?u:u-s*f;break;case 1:b.width=g?l:l+a*f,b.height=m?u:u-s*f;break;case 2:b.width=g?l:l+a*f,b.height=m?u:u+s*f;break;case 3:b.width=g?l:l-a*f,b.height=m?u:u+s*f;break}return b},r.updateEdgePointByAnchors=function(){var o=r.nodeModel,i=o.id,a=o.anchors,s=r.getNodeEdges(i);s.sourceEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.sourceAnchorId});u&&l.updateStartPoint({x:u.x,y:u.y})}),s.targetEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.targetAnchorId});u&&l.updateEndPoint({x:u.x,y:u.y})})},r.updateRect=function(o){var i=o.deltaX,a=o.deltaY,s=r.nodeModel,l=s.x,u=s.y,c=s.width,d=s.height,f=s.radius,h=s.PCTResizeInfo,g=r.nodeModel,v=g.minWidth,m=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=r.index,S=v===b,x=m===w,C=r.getResize({index:O,deltaX:i,deltaY:a,width:c,height:d,PCTResizeInfo:h,pct:1,freezeWidth:S,freezeHeight:x});if(C.widthb||C.heightw){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:S?0:C.deltaX,deltaY:x?0:C.deltaY}),r.nodeModel.width=C.width,r.nodeModel.height=C.height,r.nodeModel.setProperties({nodeSize:{width:C.width,height:C.height}});var E={x:l,y:u,width:c,height:d,radius:f},T={x:r.nodeModel.x,y:r.nodeModel.y,width:r.nodeModel.width,height:r.nodeModel.height,radius:f};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:i,deltaY:a,beforeNode:E,afterNode:T})},r.updateEllipse=function(o){var i=o.deltaX,a=o.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,g=r.nodeModel,v=g.minWidth,m=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=v===b,S=m===w,x=l,C=u,E=r.getResize({index:h,deltaX:i,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.widthb/2||E.heightw/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d},M={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:i,deltaY:a,beforeNode:Fh(Fh({},T),{rx:l,ry:u}),afterNode:M})},r.updateDiamond=function(o){var i=o.deltaX,a=o.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,g=r.nodeModel,v=g.minWidth,m=g.minHeight,b=g.maxWidth,w=g.maxHeight,O=v===b,S=m===w,x=l,C=u,E=r.getResize({index:h,deltaX:i,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.widthb/2||E.heightw/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d,rx:l,ry:u},M={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:i,deltaY:a,beforeNode:T,afterNode:M})},r.eventEmit=function(o){var i=o.deltaX,a=o.deltaY,s=o.beforeNode,l=o.afterNode,u=r.nodeModel,c=u.id,d=u.modelType,f=u.type,h=Fh({id:c,modelType:d,type:f},s),g=Fh({id:c,modelType:d,type:f},l);r.graphModel.eventCenter.emit("node:resize",{preData:h,data:g,deltaX:i,deltaY:a,index:r.index,model:r.nodeModel})},r.onDragging=function(o){var i,a=o.deltaX,s=o.deltaY,l=r.graphModel.transformModel,u=r.nodeModel.modelType;i=IYe(l.fixDeltaXY(a,s),2),a=i[0],s=i[1],u===er.RECT_NODE||u===er.HTML_NODE?r.updateRect({deltaX:a,deltaY:s}):u===er.ELLIPSE_NODE?r.updateEllipse({deltaX:a,deltaY:s}):u===er.DIAMOND_NODE&&r.updateDiamond({deltaX:a,deltaY:s})},r.onDragEnd=function(){var o=r.graphModel.gridSize,i=o===void 0?1:o,a=i*Math.round(r.nodeModel.x/i),s=i*Math.round(r.nodeModel.y/i);r.nodeModel.moveTo(a,s),r.updateEdgePointByAnchors()},r.index=n.index,r.nodeModel=n.model,r.graphModel=n.graphModel,r.dragHandler=new LYe({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:1}),r}return e.prototype.getNodeEdges=function(n){for(var r=this.graphModel,o=r.edges,i=[],a=[],s=0;s0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},wh=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=this.x-this.width/2&&i<=this.x+this.width/2&&o>=this.y-this.height/2&&a<=this.y+this.height/2},e.prototype.isAllowMoveTo=function(n){var r=n.minX,o=n.minY,i=n.maxX,a=n.maxY;return{x:r>=this.x-this.width/2&&i<=this.x+this.width/2,y:o>=this.y-this.height/2&&a<=this.y+this.height/2}},e.prototype.setAllowAppendChild=function(n){this.setProperty("groupAddable",n)},e.prototype.addChild=function(n){this.children.add(n),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},e.prototype.removeChild=function(n){this.children.delete(n),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this);r.children=[],this.children.forEach(function(i){var a=n.graphModel.getNodeModelById(i);a&&!a.virtual&&r.children.push(i)});var o=r.properties;return o==null||delete o.groupAddable,o==null||delete o.isFolded,r},e.prototype.getHistoryData=function(){var n=t.prototype.getData.call(this);n.children=wh([],Oh(this.children),!1),n.isGroup=!0;var r=n.properties;return r==null||delete r.groupAddable,r!=null&&r.isFolded&&(n.x=n.x+this.unfoldedWidth/2-this.foldedWidth/2,n.y=n.y+this.unfoldedHeight/2-this.foldedHeight/2),n},e.prototype.isAllowAppendIn=function(n){return console.info("_nodeData",n),!0},e.prototype.toBack=function(){this.zIndex--},e})(VYe);(function(t){CG(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props.model,r=n.resizable,o=n.properties;return r&&!o.isFolded?t.prototype.getControlGroup.call(this):null},e.prototype.getAddableShape=function(){var n=this.props.model,r=n.width,o=n.height,i=n.x,a=n.y,s=n.radius,l=n.properties,u=n.getAddableOutlineStyle;if(!l.groupAddable)return null;var c=this.props.model.getNodeStyle().strokeWidth,d=c===void 0?0:c,f=u(),h=r+d+8,g=o+d+8;return qt("rect",VS(VS({},f),{width:h,height:g,x:i-h/2,y:a-g/2,rx:s,ry:s}))},e.prototype.getFoldIcon=function(){var n=this.props.model,r=n.x-n.width/2+5,o=n.y-n.height/2+5;if(!n.foldable)return null;var i=qt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:n.properties.isFolded?"M ".concat(r+3,",").concat(o+6," ").concat(r+11,",").concat(o+6," M").concat(r+7,",").concat(o+2," ").concat(r+7,",").concat(o+10):"M ".concat(r+3,",").concat(o+6," ").concat(r+11,",").concat(o+6," ")});return qt("g",{},[qt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:n.x-n.width/2+5,y:n.y-n.height/2+5,onClick:function(){n.foldGroup(!n.properties.isFolded)}}),i])},e.prototype.getResizeShape=function(){return qt("g",{},[this.getAddableShape(),t.prototype.getResizeShape.call(this),this.getFoldIcon()])},e})(zYe);var xF=globalThis&&globalThis.__assign||function(){return xF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n `;Va.ObjTree.prototype.attr_prefix="-";Va.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e){var o=this.parseDOM(e);return o}};Va.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var o in e)r[o]=e[o];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var i=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=i.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Va.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(o,i):typeof i=="object"?n[n.length]=this.hash_to_xml(o,i):n[n.length]=this.scalar_to_xml(o,i):r[r.length]=" ".concat(o.substring(1),'="').concat(this.xml_escape(i),'"')}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<".concat(t).concat(a,`> `).concat(s," `):s="<".concat(t).concat(a,">").concat(s," `):s="<".concat(t).concat(a,` /> `)),s};Va.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r"):typeof o=="object"&&o.constructor===Array?n[n.length]=this.array_to_xml(t,o):typeof o=="object"?n[n.length]=this.hash_to_xml(t,o):n[n.length]=this.scalar_to_xml(t,o)}return n.join("")};Va.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e)," `)};Va.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,'"')};var QYe=function(t){return new Va.ObjTree().parseXML(t)};function EG(t){return Object.prototype.toString.call(t)}function IF(t){return" ".repeat(t)}function jS(t){return EG(t)==="[object Object]"?Object.keys(t).reduce(function(e,n){var r=n;return n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=jS(t[n]),e},{}):Array.isArray(t)?t.map(function(e){return jS(e)}):t}function HYe(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(jS(t)).replace(/"/g,"'")}return e}var LF=` `;function iw(t,e,n){var r=IF(n),o="",i=LF+r;if(e==="-json")return"";if(e==="#text")return i+t;if(e==="#cdata-section")return"".concat(i,"");if(e==="#comment")return"".concat(i,"");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat(HYe(t),'"');if(Array.isArray(t))o+=t.map(function(u){return iw(u,e,n+1)}).join("");else if(EG(t)==="[object Object]"){var a=Object.keys(t),s="",l=t["-json"]?LF+IF(n+1)+t["-json"]:"";o+="".concat(n===0?"":i,"<").concat(e),a.forEach(function(u){u.charAt(0)==="-"?s+=iw(t[u],u,n+1):l+=iw(t[u],u,n+1)}),o+=s+(l!==""?">".concat(l).concat(i,""):" />")}else o+="".concat(i,"<").concat(e,">").concat(t.toString(),"");return o}function UYe(t){var e="";for(var n in t)e+=iw(t[n],n,0);return e}var YYe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),VP=globalThis&&globalThis.__assign||function(){return VP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ta=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},tu=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r")}:{json:''.concat(r,"")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,r=e.timerValue,o=e.definitionId,i=function(){return"').concat(r,"")};return{json:'".concat(i(),""):"/>")}},in:function(t,e){var n,r,o,i,a=t,s=e["-id"],l="",u="";try{for(var c=_D(Object.keys(e)),d=c.next();!d.done;d=c.next()){var f=d.value;f.includes("bpmn:")&&(o=ta(f.split(":"),2),l=o[1],u=(i=e[f])===null||i===void 0?void 0:i["#text"])}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return{"-definitionId":s,"-definitionType":a,"-timerType":l,"-timerValue":u}}},"bpmn:conditionExpression":{in:function(t,e){var n,r="",o="";return e["#cdata-section"]?(o="cdata",r=((n=/^\$\{(.*)\}$/g.exec(e["#cdata-section"]))===null||n===void 0?void 0:n[1])||""):e["#text"]&&(o="normal",r=e["#text"]),{"-condition":r,"-expressionType":o}}}};function ZYe(t){var e=t!=null?t:{},n=e.retainedAttrsFields,r=e.excludeFields,o=e.transformer,i=new Set(tu(tu([],ta(XYe),!1),ta(n||[]),!1)),a={in:new Set(tu(tu([],ta(WS.in),!1),ta((r==null?void 0:r.in)||[]),!1)),out:new Set(tu(tu([],ta(WS.out),!1),ta((r==null?void 0:r.out)||[]),!1))};return fl=kG(fl,o),function(s){var l=s.nodes,u=s.edges;function c(d,f){var h,g;if((d==null?void 0:d.flag)!==1){var v;if((v=fl[d.type])&&v.out){var m=v.out(d),b=Object.keys(m);b.length>0&&b.forEach(function(M){d[M]=m[M]})}d!=null&&d.children&&(d.children=d.children.map(function(M){var k=l.find(function(P){return P.id===M})||u.find(function(P){return P.id===M});return k||{}}));var w={};if(typeof d=="string")return d;if(Array.isArray(d))return d.map(function(M){return c(M,"")}).filter(function(M){return M!=null});try{for(var O=_D(Object.entries(d)),S=O.next();!S.done;S=O.next()){var x=ta(S.value,2),C=x[0],E=x[1];if((E==null?void 0:E.flag)===1)return;var T=[f,C].filter(function(M){return M}).join(".");a.out.has(T)||(typeof E!="object"?C.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(C)?w[C]=E:w["-".concat(C)]=E:i.has(T)?w["-".concat(C)]=c(E,T):w[C]=c(E,T))}}catch(M){h={error:M}}finally{try{S&&!S.done&&(g=O.return)&&g.call(O)}finally{if(h)throw h.error}}return w}}return c(s,"")}}function QS(t){var e,n,r={};try{for(var o=_D(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ta(i.value,2),s=a[0],l=a[1];s.indexOf("-")===0?r[s.substring(1)]=jS(l):typeof l=="string"?r[s]=l:Object.prototype.toString.call(l)==="[object Object]"?r[s]=QS(l):Array.isArray(l)?r[s]=l.map(function(u){return QS(u)}):r[s]=l}}catch(u){e={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}function GYe(t,e,n){var r,o=new Map,i=ZYe(n)(e);i.nodes.forEach(function(s){var l=s["-id"],u=s["-type"],c=s.text,d=s.children,f=BF(s,["-id","-type","text","children"]),h={"-id":l};c!=null&&c["-value"]&&(h["-name"]=c["-value"]),f["-json"]&&(h["-json"]=f["-json"]),f["-properties"]&&Object.assign(h,f["-properties"]),d&&(h.children=d),t[u]||(t[u]=[]),t[u].push(h),o.set(l,h)});var a=i.edges.map(function(s){var l=s["-id"],u=s["-sourceNodeId"],c=s["-targetNodeId"],d=s.text,f=BF(s,["-id","-sourceNodeId","-targetNodeId","text"]),h=o.get(c);h["bpmn:incoming"]||(h["bpmn:incoming"]=[]),h["bpmn:incoming"].push(l);var g={"-id":l,"-sourceRef":u,"-targetRef":c};return d!=null&&d["-value"]&&(g["-name"]=d["-value"]),f["-json"]&&(g["-json"]=f["-json"]),f["-properties"]&&Object.assign(g,f["-properties"]),g});return e.edges.forEach(function(s){var l=s.sourceNodeId,u=s.id,c=o.get(l);c["bpmn:outgoing"]||(c["bpmn:outgoing"]=[]),c["bpmn:outgoing"].push(u)}),(r=t["bpmn:subProcess"])===null||r===void 0||r.forEach(function(s){var l={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},u=[];s.children.forEach(function(v){var m,b=o.get(v["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(O){b[O]&&b[O].forEach(function(S){l[O].add(S)})});var w=(m=t[v["-type"]])===null||m===void 0?void 0:m.findIndex(function(O){return O["-id"]===v["-id"]});w>=0&&t[v["-type"]].splice(w,1),o.delete(v["-id"]),s[v["-type"]]||(s[v["-type"]]=[]),s[v["-type"]].push(b)});var c=l["bpmn:incoming"],d=l["bpmn:outgoing"];d.forEach(function(v){c.has(v)&&u.push(v)});for(var f=function(v){var m=a.findIndex(function(b){return b["-id"]===u[v]});m>=0?(s["bpmn:sequenceFlow"]||(s["bpmn:sequenceFlow"]=[]),s["bpmn:sequenceFlow"].push(a[m]),a.splice(m,1)):v++,h=v},h,g=0;g0&&S.forEach(function(x){Reflect.set(v,x,O[x])})}})};function g(v){o.set(v["-id"],v),Array.isArray(v)?v.forEach(function(m){g(m)}):typeof v=="object"&&h(v)}g(c[f])},function(f){if(f.indexOf("bpmn:")===0){var h=c[f];if(f==="bpmn:sequenceFlow"){var g=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];r=tXe(h,g)}else{var v=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(f==="bpmn:boundaryEvent"){var m=c[f],b=function(w){var O=w["-attachedToRef"],S=o.get(O);S["-boundaryEvents"]||(S["-boundaryEvents"]=[]),S["-boundaryEvents"].push(w["-id"])};Array.isArray(m)?m.forEach(function(w){b(w)}):b(m)}n=n.concat(eXe(h,v,f))}}}])}var d=function(f,h,g){Object.keys(f).forEach(function(v){var m=g?"".concat(g,".").concat(v):v;h.has(m)?delete f[v]:typeof f[v]=="object"&&d(f[v],h,m)})};return n.forEach(function(f){var h,g;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var v=(g=e==null?void 0:e.mapping)===null||g===void 0?void 0:g.in,m=f.type;v[m]&&(f.type=v[m])}d(f,l.in,"")}),r.forEach(function(f){var h,g;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var v=(g=e==null?void 0:e.mapping)===null||g===void 0?void 0:g.in,m=f.type;v[m]&&(f.type=v[m])}d(f,l.in,"")}),{nodes:n,edges:r}}function eXe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=FF(s,n,a);r.push(l)});else{var o=void 0;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):o=e;var i=FF(o,n,t);r.push(i)}return r}function FF(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),o=Number(t["dc:Bounds"]["-y"]),i=n["-children"],a=n["-name"],s=gs.shapeConfigMap.get(e);s&&(r+=s.width/2,o+=s.height/2);var l={};Object.entries(n).forEach(function(f){var h=ta(f,2),g=h[0],v=h[1];TG.includes(g)||(l[g]=v)}),l=QS(l);var u;if(a&&(u={x:r,y:o,value:a},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var c=t["bpmndi:BPMNLabel"]["dc:Bounds"];u.x=Number(c["-x"])+Number(c["-width"])/2,u.y=Number(c["-y"])+Number(c["-height"])/2}var d={id:t["-bpmnElement"],type:e,x:r,y:o,properties:l};return i&&(d.children=i),u&&(d.text=u),d}function tXe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(o){var i;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===o["-id"]}):i=e,n.push(VF(i,o))});else{var r=void 0;Array.isArray(e)?r=e.find(function(o){return o["-bpmnElement"]===t["-id"]}):r=e,n.push(VF(r,t))}return n}function VF(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var o=t["bpmndi:BPMNLabel"]["dc:Bounds"],i=0;r.split(` `).forEach(function(u){i0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},iXe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},vg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},ly=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r=a-l/2&&o<=a+l/2&&r>=s-u/2&&i<=s+u/2}function gXe(t,e,n,r){var o=t.minX,i=t.minY,a=t.maxX,s=t.maxY,l=e.x,u=e.y,c=e.width,d=e.height,f=o+c/2,h=i+d/2,g=a-c/2,v=s-d/2;return{x:l+n>=f&&l+n<=g,y:u+r>=h&&u+r<=v}}var YS=globalThis&&globalThis.__assign||function(){return YS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},yg=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;rvXe){var c=o.lf.graphModel.nodes;o.topGroupZIndex=a1;var d=sQ(by(c,function(m){return!!m.isGroup}),"zIndex"),f=0;zn(d,function(m){m.zIndex!==f&&(o.topGroupZIndex++,f=m.zIndex),m.setZIndex(o.topGroupZIndex)})}if(s&&l)if(u!=null&&u.isGroup){var h=u.children;zn(Array.from(h),function(m){var b=o.lf.getNodeModelById(m);b==null||b.setSelected(!1)})}else{var g=o.nodeGroupMap.get(a.id);if(g){var v=o.lf.getNodeModelById(g);v!=null&&v.isSelected&&(u==null||u.setSelected(!1))}}},this.onNodeMove=function(i){var a=i.deltaX,s=i.deltaY,l=i.data,u=l.id,c=l.x,d=l.y,f=l.properties;if(!!f){var h=f.width,g=f.height,v=o.nodeGroupMap.get(u);if(!!v){var m=o.lf.getNodeModelById(v);if(!(!m||!m.isRestrict||!m.autoResize)){var b=c+a/2,w=d+s/2,O=b-h/2,S=w-g/2,x=b+h/2,C=w+g/2,E=!1,T=m.getBounds(),M=Object.assign({},T);if(OM.maxX&&(M.maxX=x,E=!0),C>M.maxY&&(M.maxY=C,E=!0),!!E){var k=M.minX+(M.maxX-M.minX)/2,P=M.minY+(M.maxY-M.minY)/2,R=M.maxX-M.minX,D=M.maxY-M.minY;m.moveTo(k,P),m.width=R,m.height=D}}}}},this.onGraphRendered=function(i){var a=i.data;zn(a.nodes,function(s){s.children&&zn(s.children,function(l){o.nodeGroupMap.set(l,s.id)})}),o.calibrateTopGroupZIndex(a.nodes)},n.register(OD),this.lf=n,kr(this,r),this.init()}return t.prototype.getGroupByNodeId=function(e){var n=this.nodeGroupMap.get(e);if(n)return this.lf.getNodeModelById(n)},t.prototype.getGroupByBounds=function(e,n){var r=this.lf.graphModel.nodes,o=by(r,function(l){return!!l.isGroup&&pXe(e,l)&&l.id!==n.id}),i=o.length;if(i<=1)return o[0];for(var a=o[i-1],s=i-2;s>=0;s--)o[s].zIndex>a.zIndex&&(a=o[s]);return a},t.prototype.sendNodeToFront=function(e){var n=this;if(!(!e||!e.isGroup)&&(this.topGroupZIndex++,e.setZIndex(this.topGroupZIndex),e.children)){var r=e.children;zn(Array.from(r),function(o){var i=n.lf.getNodeModelById(o);n.sendNodeToFront(i)})}},t.prototype.getMaxZIndex=function(e){var n=this,r=a1;if(e.isGroup&&(r=Math.max(r,e.zIndex)),e.children){var o=e.children;zn(Array.from(o),function(i){var a=n.lf.getNodeModelById(i);if(a!=null&&a.isGroup){var s=n.getMaxZIndex(a);r=Math.max(r,s)}})}return r},t.prototype.calibrateTopGroupZIndex=function(e){var n=this,r=a1;if(zn(e,function(s){var l=n.lf.getNodeModelById(s.id);if(l){var u=n.getMaxZIndex(l);u>r&&(r=u)}}),!(this.topGroupZIndex>=r)){var o=this.lf.graphModel.nodes,i=by(o,function(s){return!!s.isGroup}),a=this.topGroupZIndex;zn(i,function(s){s.zIndex>a&&(a=s.zIndex)}),this.topGroupZIndex=a}},t.prototype.removeChildrenInGroupNodeData=function(e){var n,r=bn(e);return delete r.children,!((n=r.properties)===null||n===void 0)&&n.children&&delete r.properties.children,r},t.prototype.initGroupChildNodes=function(e,n,r,o){var i=this,a=[],s=[],l=[];zn(Array.from(n),function(d){var f=i.lf.getNodeModelById(d);if(f){var h=f.children,g=f.getData(),v=on.NODE_GROUP_COPY||"node:group-copy-add",m=pYe(i.removeChildrenInGroupNodeData(g),o),b=i.lf.addNode(m,v);if(r.addChild(b.id),e[d]=b.id,a.push(b),l.push.apply(l,yg([],mg(yg(yg([],mg(b.incoming.edges),!1),mg(b.outgoing.edges),!1)),!1)),h instanceof Set){var w=i.initGroupChildNodes(e,h,b,o),O=w.childNodes,S=w.edgesData;a.push.apply(a,yg([],mg(O),!1)),s.push.apply(s,yg([],mg(S),!1))}}});var u=by(l,function(d){return pv(e,d.sourceNodeId)&&pv(e,d.targetNodeId)}),c=$a(u,function(d){return d.getData()});return{childNodes:a,edgesData:s.concat(c)}},t.prototype.createEdge=function(e,n,r){var o,i,a=e.sourceNodeId,s=e.targetNodeId,l=(o=n[a])!==null&&o!==void 0?o:a,u=(i=n[s])!==null&&i!==void 0?i:s,c=bn(e);return e.id&&typeof e.text=="object"&&e.text!==null&&(c=gYe(e,r)),this.lf.graphModel.addEdge(YS(YS({},c),{sourceNodeId:l,targetNodeId:u}))},t.prototype.checkGroupBoundsWithChildren=function(e,n,r,o,i){if(e.children)for(var a=e.children,s=e.x,l=e.y,u=s+n/2,c=l+r/2,d=u-o/2,f=c-i/2,h=u+o/2,g=c+i/2,v=Array.from(a),m=0;m=C&&g>=E;if(!T)return!1}}return!0},t.prototype.init=function(){var e=this,n=this.lf,r=n.graphModel;r.addNodeMoveRules(function(o,i,a){if(o.isGroup)return!0;var s=e.nodeGroupMap.get(o.id),l=e.lf.getNodeModelById(s);if(l&&l.isRestrict){if(l.autoResize)return!0;var u=l.getBounds();return gXe(u,o,i,a)}return!0}),r.addNodeResizeRules(function(o,i,a,s,l){return o.isGroup&&o.isRestrict?e.checkGroupBoundsWithChildren(o,i,a,s,l):!0}),r.dynamicGroup=this,n.on("node:add,node:drop,node:dnd-add",this.onNodeAddOrDrop),n.on("selection:drop",this.onSelectionDrop),n.on("node:delete",this.removeNodeFromGroup),n.on("node:drag,node:dnd-drag",this.onNodeDrag),n.on("selection:drag",this.onSelectionDrag),n.on("node:click",this.onNodeSelect),n.on("node:mousemove",this.onNodeMove),n.on("graph:rendered",this.onGraphRendered),n.on("group:add-node",this.onGroupAddNode),n.addElements=function(o,i){var a=o.nodes,s=o.edges;i===void 0&&(i=40);var l={},u={nodes:[],edges:[]},c=[];return zn(a,function(d){var f,h,g=d.id,v=(h=(f=d.properties)===null||f===void 0?void 0:f.children)!==null&&h!==void 0?h:d.children,m=n.addNode(e.removeChildrenInGroupNodeData(d));if(g&&(l[g]=m.id),u.nodes.push(m),m.isGroup){var b=e.initGroupChildNodes(l,v,m,i).edgesData;c.push.apply(c,yg([],mg(b),!1))}}),zn(c,function(d){e.createEdge(d,l,i)}),zn(s,function(d){u.edges.push(e.createEdge(d,l,i))}),u},this.render()},t.prototype.render=function(){},t.prototype.destroy=function(){this.lf.off("node:add,node:drop,node:dnd-add",this.onNodeAddOrDrop),this.lf.off("selection:drop",this.onSelectionDrop),this.lf.off("node:delete",this.removeNodeFromGroup),this.lf.off("node:drag,node:dnd-drag",this.onNodeDrag),this.lf.off("selection:drag",this.onSelectionDrag),this.lf.off("node:click",this.onNodeSelect),this.lf.off("node:mousemove",this.onNodeMove),this.lf.off("graph:rendered",this.onGraphRendered),this.lf.off("group:add-node",this.onGroupAddNode)},t.pluginName="dynamicGroup",t}(),jF;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(jF||(jF={}));globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var yXe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),l0=globalThis&&globalThis.__assign||function(){return l0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},_Xe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},OXe=function(t){yXe(e,t);function e(n){var r=t.call(this,n)||this;r.textRef=VC(),r.setHoverOn=function(){var l=r.props.element;l.isDragging||r.state.isHovered||(r.setState({isHovered:!0}),l.setHovered(!0))},r.setHoverOff=function(){var l=r.props.element;!r.state.isHovered||(r.setState({isHovered:!1}),l.setHovered(!1))},r.handleMouseDown=function(l){var u,c=r.props,d=c.label,f=c.graphModel,h=f.editConfigModel.nodeTextDraggable;((u=d.draggable)!==null&&u!==void 0?u:h)&&!r.state.isDragging&&!r.state.isEditing&&r.stepDrag.handleMouseDown(l)},r.handleMouseUp=function(l){r.state.isDragging&&r.stepDrag.handleMouseUp(l)},r.handleDragging=function(l){var u=l.deltaX,c=l.deltaY;r.state.isDragging||r.setState({isDragging:!0});var d=r.props,f=d.label,h=d.graphModel,g=h.transformModel,v=_Xe(g.fixDeltaXY(u,c),2),m=v[0],b=v[1];r.setElementModelLabelInfo({x:f.x+m,y:f.y+b}),h.eventCenter.emit("label:drag",{data:f.getData(),model:f})},r.handleDragEnd=function(){r.setState({isDragging:!1})},r.handleClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;d.setSelected(!r.state.isSelected),r.setState({isSelected:!r.state.isSelected}),r.setElementModelLabelInfo({isSelected:!0}),f.eventCenter.emit("label:click",{data:c.getData(),e:l,model:d})},r.handleDbClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;if(f.eventCenter.emit("label:dblclick",{data:c.getData(),e:l,model:d}),!c.editable){d.setSelected(!0);return}if(d.setSelected(),d.setElementState(Ar.TEXT_EDIT),r.setState({isEditing:!0}),r.textRef.current){r.textRef.current.contentEditable="true",r.textRef.current.focus();var h=document.createRange(),g=window.getSelection();h.selectNodeContents(r.textRef.current),h.collapse(!1),g==null||g.removeAllRanges(),g==null||g.addRange(h)}},r.handleBlur=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel.eventCenter;f.emit("label:blur",{e:l,model:d,data:c.getData(),element:r.textRef.current}),r.setState({isDragging:!1,isHovered:!1,isSelected:!1})},r.handleInput=function(l){var u=r.props,c=u.label,d=u.graphModel;d.eventCenter.emit("label:input",{e:l,data:c.getData()})},r.reCalcLabelSize=function(){};var o=n.label,i=n.graphModel,a=i.gridSize,s=i.eventCenter;return r.stepDrag=new Fl({onDragging:r.handleDragging,onDragEnd:r.handleDragEnd,step:a,eventType:"LABEL",model:o,eventCenter:s}),r.state={isEditing:!1,isHovered:!1,isDragging:!1,isSelected:!1},r}return e.prototype.setElementModelLabelInfo=function(n){var r=this.props,o=r.label,i=r.element,a=r.graphModel,s=i.properties._label,l=s,u=qM(l,function(f){return f.id===o.id}),c=l[u];l[u]=l0(l0({},c),n);var d=a.getElement(i.id);d==null||d.setProperty("_label",l)},e.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.label,i=r.element,a=r.graphModel;a.eventCenter.on("blank:click,node:click,edge:click,label:click",function(s){var l,u,c,d,f=s.data;if(((f==null?void 0:f.type)!=="label"||f.type==="label"&&f.id!==o.id||n.state.isSelected)&&n.setState({isSelected:!1}),((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==o.id)&&n.state.isEditing){n.setState({isEditing:!1});var h=(u=(l=n.textRef.current)===null||l===void 0?void 0:l.innerText)!==null&&u!==void 0?u:"",g=(d=(c=n.textRef.current)===null||c===void 0?void 0:c.innerHTML)!==null&&d!==void 0?d:"";n.setElementModelLabelInfo({value:h,content:g,isSelected:!1}),i.setElementState(Ar.DEFAULT)}((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==o.id)&&n.textRef.current&&(n.textRef.current.contentEditable="false")})},e.prototype.componentDidUpdate=function(){},e.prototype.componentWillUnmount=function(){var n=this.props.graphModel;n.eventCenter.off("blank:click,node:click,edge:click")},e.prototype.render=function(){var n,r=this.props,o=r.label,i=r.element,a=r.graphModel,s=this.state,l=s.isDragging,u=s.isHovered,c=s.isSelected,d=s.isEditing,f=a.transformModel,h=f.getTransformStyle().transform,g=o.id,v=o.x,m=o.y,b=o.zIndex,w=o.vertical,O=o.style,S=o.rotate,x=o.content,C=o.labelWidth,E=o.textOverflowMode,T=C!=null?C:i.BaseType==="node"?i.width-20:80,M={left:"".concat(v-T/2,"px"),top:"".concat(m-10,"px"),width:"".concat(T,"px"),height:"20px",zIndex:b!=null?b:1,transform:S?"".concat(h," rotate(").concat(S,"deg)"):"".concat(h," rotate(").concat(w?-.25:0,"turn)")};return ot("div",{id:"element-container-".concat(g),className:wP("lf-label-editor-container"),style:M,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onDblClick:this.handleDbClick,onBlur:this.handleBlur,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,children:ot("div",{ref:this.textRef,id:"editor-container-".concat(g),className:wP("lf-label-editor",(n={"lf-label-editor-dragging":l,"lf-label-editor-editing":d,"lf-label-editor-hover":!d&&(u||c)},n["lf-label-editor-".concat(E)]=!d,n)),onInput:this.handleInput,style:l0({maxWidth:"".concat(T,"px"),boxSizing:"border-box",display:"inline-block",background:d||i.BaseType==="edge"?"#fff":"transparent"},O),dangerouslySetInnerHTML:{__html:x}})})},e=bXe([Ra],e),e}(vr),ll=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},wXe=vf,SXe=function(){function t(e,n,r){var o;this.type="label",this.content="",this.value="",this.style={},this.vertical=!1,this.editable=!0,this.draggable=!0,this.textOverflowMode="default",this.element=n,this.graphModel=r,this.id=(o=e.id)!==null&&o!==void 0?o:wXe(),this.initLabelData(e)}return t.prototype.initLabelData=function(e){kr(this,e)},t.prototype.getData=function(){return{id:this.id,x:this.x,y:this.y,type:"label",content:this.content,value:this.value,rotate:this.rotate,style:eu(this.style),draggable:this.draggable,editable:this.editable,labelWidth:this.labelWidth,textOverflowMode:this.textOverflowMode,vertical:this.vertical}},ll([it],t.prototype,"x",void 0),ll([it],t.prototype,"y",void 0),ll([it],t.prototype,"content",void 0),ll([it],t.prototype,"value",void 0),ll([it],t.prototype,"rotate",void 0),ll([it],t.prototype,"style",void 0),ll([it],t.prototype,"zIndex",void 0),ll([it],t.prototype,"vertical",void 0),ll([it],t.prototype,"editable",void 0),ll([it],t.prototype,"draggable",void 0),ll([it],t.prototype,"labelWidth",void 0),ll([it],t.prototype,"textOverflowMode",void 0),t}(),AG={exports:{}};(function(t){/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"classList"in document.createElement("_")||function(e){if("Element"in e){var n="classList",r="prototype",o=e.Element[r],i=Object,a=String[r].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[r].indexOf||function(g){for(var v=0,m=this.length;v1?T:this.data.length),M,this.encoding)},u.toString=function(){return"[object Blob]"},u.close=function(){this.size=0,delete this.data},a}(e);e.Blob=function(o,i){var a=i&&i.type||"",s=new n;if(o)for(var l=0,u=o.length;l-1,isMac:n.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(l){return!!(s.isMac&&l.metaKey||!s.isMac&&l.ctrlKey)},isKey:function(l,u){var c=s.getKeyCode(l);return Array.isArray(u)===!1?c===u:u.indexOf(c)!==-1},getKeyCode:function(l){var u=l.which;return u===null&&(u=l.charCode!==null?l.charCode:l.keyCode),u},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var u=[!0].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},defaults:function(){var u=[!1].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},createLink:function(l,u,c,d){var f=l.createElement("a");return s.moveTextRangeIntoElement(u[0],u[u.length-1],f),f.setAttribute("href",c),d&&(d==="_blank"&&f.setAttribute("rel","noopener noreferrer"),f.setAttribute("target",d)),f},findOrCreateMatchingTextNodes:function(l,u,c){for(var d=l.createTreeWalker(u,NodeFilter.SHOW_ALL,null,!1),f=[],h=0,g=!1,v=null,m=null;(v=d.nextNode())!==null;)if(!(v.nodeType>3))if(v.nodeType===3){if(!g&&c.startc.end+1)throw new Error("PerformLinking overshot the target!");g&&f.push(m||v),h+=v.nodeValue.length,m!==null&&(h+=m.nodeValue.length,d.nextNode()),m=null}else v.tagName.toLowerCase()==="img"&&(!g&&c.start<=h&&(g=!0),g&&f.push(v));return f},splitStartNodeIfNeeded:function(l,u,c){return u!==c?l.splitText(u-c):null},splitEndNodeIfNeeded:function(l,u,c,d){var f,h;f=d+l.nodeValue.length+(u?u.nodeValue.length:0)-1,h=c-d-(u?l.nodeValue.length:0),f>=c&&d!==f&&h!==0&&(u||l).splitText(h)},splitByBlockElements:function(l){if(l.nodeType!==3&&l.nodeType!==1)return[];var u=[],c=e.util.blockContainerElementNames.join(",");if(l.nodeType===3||l.querySelectorAll(c).length===0)return[l];for(var d=0;d0)break;h=g.nextNode()}return h},findPreviousSibling:function(l){if(!l||s.isMediumEditorElement(l))return!1;for(var u=l.previousSibling;!u&&!s.isMediumEditorElement(l.parentNode);)l=l.parentNode,u=l.previousSibling;return u},isDescendant:function(u,c,d){if(!u||!c)return!1;if(u===c)return!!d;if(u.nodeType!==1)return!1;if(o||c.nodeType!==3)return u.contains(c);for(var f=c.parentNode;f!==null;){if(f===u)return!0;f=f.parentNode}return!1},isElement:function(u){return!!(u&&u.nodeType===1)},throttle:function(l,u){var c=50,d,f,h,g=null,v=0,m=function(){v=Date.now(),g=null,h=l.apply(d,f),g||(d=f=null)};return!u&&u!==0&&(u=c),function(){var b=Date.now(),w=u-(b-v);return d=this,f=arguments,w<=0||w>u?(g&&(clearTimeout(g),g=null),v=b,h=l.apply(d,f),g||(d=f=null)):g||(g=setTimeout(m,w)),h}},traverseUp:function(l,u){if(!l)return!1;do{if(l.nodeType===1){if(u(l))return l;if(s.isMediumEditorElement(l))return!1}l=l.parentNode}while(l);return!1},htmlEntities:function(l){return String(l).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(l,u){var c,d,f,h,g,v,m,b=!1,w=["insertHTML",!1,u];if(!e.util.isEdge&&l.queryCommandSupported("insertHTML"))try{return l.execCommand.apply(l,w)}catch{}if(c=l.getSelection(),c.rangeCount){if(d=c.getRangeAt(0),m=d.commonAncestorContainer,s.isMediumEditorElement(m)&&!m.firstChild)d.selectNode(m.appendChild(l.createTextNode("")));else if(m.nodeType===3&&d.startOffset===0&&d.endOffset===m.nodeValue.length||m.nodeType!==3&&m.innerHTML===d.toString()){for(;!s.isMediumEditorElement(m)&&m.parentNode&&m.parentNode.childNodes.length===1&&!s.isMediumEditorElement(m.parentNode);)m=m.parentNode;d.selectNode(m)}for(d.deleteContents(),f=l.createElement("div"),f.innerHTML=u,h=l.createDocumentFragment();f.firstChild;)g=f.firstChild,v=h.appendChild(g);d.insertNode(h),v&&(d=d.cloneRange(),d.setStartAfter(v),d.collapse(!0),e.selection.selectRange(l,d)),b=!0}return l.execCommand.callListeners&&l.execCommand.callListeners(w,b),b},execFormatBlock:function(l,u){var c=s.getTopBlockContainer(e.selection.getSelectionStart(l)),d;if(u==="blockquote"){if(c&&(d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return s.isBlockContainer(f)})))return l.execCommand("outdent",!1,null);if(s.isIE)return l.execCommand("indent",!1,u)}if(c&&u===c.nodeName.toLowerCase()&&(u="p"),s.isIE&&(u="<"+u+">"),c&&c.nodeName.toLowerCase()==="blockquote"){if(s.isIE&&u==="

")return l.execCommand("outdent",!1,u);if((s.isFF||s.isEdge)&&u==="p")return d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return!s.isBlockContainer(f)})&&l.execCommand("formatBlock",!1,u),l.execCommand("outdent",!1,u)}return l.execCommand("formatBlock",!1,u)},setTargetBlank:function(l,u){var c,d=u||!1;if(l.nodeName.toLowerCase()==="a")l.target="_blank",l.rel="noopener noreferrer";else for(l=l.getElementsByTagName("a"),c=0;cd?(f=f.parentNode,c-=1):(h=h.parentNode,d-=1);for(;f!==h;)f=f.parentNode,h=h.parentNode;return f},isElementAtBeginningOfBlock:function(l){for(var u,c;!s.isBlockContainer(l)&&!s.isMediumEditorElement(l);){for(c=l;c=c.previousSibling;)if(u=c.nodeType===3?c.nodeValue:c.textContent,u.length>0)return!1;l=l.parentNode}return!0},isMediumEditorElement:function(l){return l&&l.getAttribute&&!!l.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(l){return s.traverseUp(l,function(u){return s.isMediumEditorElement(u)})},isBlockContainer:function(l){return l&&l.nodeType!==3&&s.blockContainerElementNames.indexOf(l.nodeName.toLowerCase())!==-1},getClosestBlockContainer:function(l){return s.traverseUp(l,function(u){return s.isBlockContainer(u)||s.isMediumEditorElement(u)})},getTopBlockContainer:function(l){var u=s.isBlockContainer(l)?l:!1;return s.traverseUp(l,function(c){return s.isBlockContainer(c)&&(u=c),!u&&s.isMediumEditorElement(c)?(u=c,!0):!1}),u},getFirstSelectableLeafNode:function(l){for(;l&&l.firstChild;)l=l.firstChild;if(l=s.traverseUp(l,function(c){return s.emptyElementNames.indexOf(c.nodeName.toLowerCase())===-1}),l.nodeName.toLowerCase()==="table"){var u=l.querySelector("th, td");u&&(l=u)}return l},getFirstTextNode:function(l){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(l)},_getFirstTextNode:function(l){if(l.nodeType===3)return l;for(var u=0;u0){var l=s.getRangeAt(0),u=l.cloneRange(),c;u.selectNodeContents(o),u.setEnd(l.startContainer,l.startOffset),c=u.toString().length,a={start:c,end:c+l.toString().length},this.doesRangeStartWithImages(l,i)&&(a.startsWithImage=!0);var d=this.getTrailingImageCount(o,a,l.endContainer,l.endOffset);if(d&&(a.trailingImageCount=d),c!==0){var f=this.getIndexRelativeToAdjacentEmptyBlocks(i,o,l.startContainer,l.startOffset);f!==-1&&(a.emptyBlocksIndex=f)}}return a},importSelection:function(o,i,a,s){if(!(!o||!i)){var l=a.createRange();l.setStart(i,0),l.collapse(!0);var u=i,c=[],d=0,f=!1,h=!1,g=0,v=!1,m,b=!1,w=null;for((s||o.startsWithImage||typeof o.emptyBlocksIndex!="undefined")&&(b=!0);!v&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)m=d+u.length,!f&&o.start>=d&&o.start<=m&&(b||o.start=d&&o.end<=m&&(o.trailingImageCount?h=!0:(l.setEnd(u,o.end-d),v=!0)),d=m;else{if(o.trailingImageCount&&h&&(u.nodeName.toLowerCase()==="img"&&g++,g===o.trailingImageCount)){for(var O=0;u.parentNode.childNodes[O]!==u;)O++;l.setEnd(u.parentNode,O+1),v=!0}if(!v&&u.nodeType===1)for(var S=u.childNodes.length-1;S>=0;)c.push(u.childNodes[S]),S-=1}v||(u=c.pop())}!f&&w&&(l.setStart(w,w.length),l.setEnd(w,w.length)),typeof o.emptyBlocksIndex!="undefined"&&(l=this.importSelectionMoveCursorPastBlocks(a,i,o.emptyBlocksIndex,l)),s&&(l=this.importSelectionMoveCursorPastAnchor(o,l)),this.selectRange(a,l)}},importSelectionMoveCursorPastAnchor:function(o,i){var a=function(d){return d.nodeName.toLowerCase()==="a"};if(o.start===o.end&&i.startContainer.nodeType===3&&i.startOffset===i.startContainer.nodeValue.length&&e.util.traverseUp(i.startContainer,a)){for(var s=i.startContainer,l=i.startContainer.parentNode;l!==null&&l.nodeName.toLowerCase()!=="a";)l.childNodes[l.childNodes.length-1]!==s?l=null:(s=l,l=l.parentNode);if(l!==null&&l.nodeName.toLowerCase()==="a"){for(var u=null,c=0;u===null&&c0)break;return d||(d=c),s.setStart(e.util.getFirstSelectableLeafNode(d),0),s},getIndexRelativeToAdjacentEmptyBlocks:function(o,i,a,s){if(a.textContent.length>0&&s>0)return-1;var l=a;if(l.nodeType!==3&&(l=a.childNodes[s]),l){if(!e.util.isElementAtBeginningOfBlock(l))return-1;var u=e.util.findPreviousSibling(l);if(u){if(u.nodeValue)return-1}else return-1}for(var c=e.util.getClosestBlockContainer(a),d=o.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,n,!1),f=0;d.nextNode();){var h=d.currentNode.textContent==="";if((h||f>0)&&(f+=1),d.currentNode===c)return f;h||(f=0)}return f},doesRangeStartWithImages:function(o,i){if(o.startOffset!==0||o.startContainer.nodeType!==1)return!1;if(o.startContainer.nodeName.toLowerCase()==="img")return!0;var a=o.startContainer.querySelector("img");if(!a)return!1;for(var s=i.createTreeWalker(o.startContainer,NodeFilter.SHOW_ALL,null,!1);s.nextNode();){var l=s.currentNode;if(l===a)break;if(l.nodeValue)return!1}return!0},getTrailingImageCount:function(o,i,a,s){if(s===0||a.nodeType!==1||a.nodeName.toLowerCase()!=="img"&&!a.querySelector("img"))return 0;for(var l=a.childNodes[s-1];l.hasChildNodes();)l=l.lastChild;for(var u=o,c=[],d=0,f=!1,h=!1,g=!1,v,m=0;!g&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)m=0,v=d+u.length,!f&&i.start>=d&&i.start<=v&&(f=!0),f&&i.end>=d&&i.end<=v&&(h=!0),d=v;else if(u.nodeName.toLowerCase()==="img"&&m++,u===l)g=!0;else if(u.nodeType===1)for(var b=u.childNodes.length-1;b>=0;)c.push(u.childNodes[b]),b-=1;g||(u=c.pop())}return m},selectionContainsContent:function(o){var i=o.getSelection();if(!i||i.isCollapsed||!i.rangeCount)return!1;if(i.toString().trim()!=="")return!0;var a=this.getSelectedParentElement(i.getRangeAt(0));return!!(a&&(a.nodeName.toLowerCase()==="img"||a.nodeType===1&&a.querySelector("img")))},selectionInContentEditableFalse:function(o){var i,a=this.findMatchingSelectionParent(function(s){var l=s&&s.getAttribute("contenteditable");return l==="true"&&(i=!0),s.nodeName!=="#text"&&l==="false"},o);return!i&&a},getSelectionHtml:function(i){var a,s="",l=i.getSelection(),u,c;if(l.rangeCount){for(c=i.createElement("div"),a=0,u=l.rangeCount;a-1?[o]:o,Array.prototype.forEach.call(o,function(c){c.addEventListener(i,a,s),this.events.push([c,i,a,s])}.bind(this))},detachDOMEvent:function(o,i,a,s){var l,u,c=this.base.options.contentWindow,d=this.base.options.ownerDocument;o&&(o=e.util.isElement(o)||[c,d].indexOf(o)>-1?[o]:o,Array.prototype.forEach.call(o,function(f){l=this.indexOfListener(f,i,a,s),l!==-1&&(u=this.events.splice(l,1)[0],u[0].removeEventListener(u[1],u[2],u[3]))}.bind(this)))},indexOfListener:function(o,i,a,s){var l,u,c;for(l=0,u=this.events.length;l0&&(o=i.indexOf(r.nodeName.toLowerCase())!==-1),!o&&this.style&&(a=this.style.value.split("|"),s=this.window.getComputedStyle(r,null).getPropertyValue(this.style.prop),a.forEach(function(l){this.knownState||(o=s.indexOf(l)!==-1,(o||this.style.prop!=="text-decoration")&&(this.knownState=o))},this)),o)}});n.isBuiltInButton=function(r){return typeof r=="string"&&e.extensions.button.prototype.defaults.hasOwnProperty(r)},e.extensions.button=n}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"html",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}}}(),function(){var n=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return this.hasForm?this.getForm().classList.contains(this.activeClass):!1},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.hideToolbarDefaultActions()},setToolbarPosition:function(){var r=this.base.getExtensionByName("toolbar");r&&r.setToolbarPosition()}});e.extensions.form=n}(),function(){var n=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(r){r.preventDefault(),r.stopPropagation();var o=e.selection.getSelectionRange(this.document);return o.startContainer.nodeName.toLowerCase()==="a"||o.endContainer.nodeName.toLowerCase()==="a"||e.util.getClosestTag(e.selection.getSelectedParentElement(o),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(r){e.util.isKey(r,e.util.keyCode.K)&&e.util.isMetaCtrlKey(r)&&!r.shiftKey&&this.handleClick(r)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var r=[''];return r.push('',this.getEditorOption("buttonLabels")==="fontawesome"?'':this.formSaveLabel,""),r.push('',this.getEditorOption("buttonLabels")==="fontawesome"?'':this.formCloseLabel,""),this.targetCheckbox&&r.push('

','','","
"),this.customClassOption&&r.push('
','',"","
"),r.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(r){var o=this.getInput(),i=this.getAnchorTargetCheckbox(),a=this.getAnchorButtonCheckbox();if(r=r||{value:""},typeof r=="string"&&(r={value:r}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),o.value=r.value,o.focus(),i&&(i.checked=r.target==="_blank"),a){var s=r.buttonClass?r.buttonClass.split(" "):[];a.checked=s.indexOf(this.customClassOption)!==-1}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var r=this.getAnchorTargetCheckbox(),o=this.getAnchorButtonCheckbox(),i={value:this.getInput().value.trim()};return this.linkValidation&&(i.value=this.checkLinkFormat(i.value)),i.target="_self",r&&r.checked&&(i.target="_blank"),o&&o.checked&&(i.buttonClass=this.customClassOption),i},doFormSave:function(){var r=this.getFormOpts();this.completeFormSave(r)},completeFormSave:function(r){this.base.restoreSelection(),this.execAction(this.action,r),this.base.checkSelection()},ensureEncodedUri:function(r){return r===decodeURI(r)?encodeURI(r):r},ensureEncodedUriComponent:function(r){return r===decodeURIComponent(r)?encodeURIComponent(r):r},ensureEncodedParam:function(r){var o=r.split("="),i=o[0],a=o[1];return i+(a===void 0?"":"="+this.ensureEncodedUriComponent(a))},ensureEncodedQuery:function(r){return r.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(r){var o=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,i=o.test(r),a="",s=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,l=r.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),u=l[1],c=l[2],d=l[3];if(s.test(r))return"tel:"+r;if(!i){var f=u.split("/")[0];(f.match(/.+(\.|:).+/)||f==="localhost")&&(a="http://")}return a+this.ensureEncodedUri(u)+(c===void 0?"":"?"+this.ensureEncodedQuery(c))+(d===void 0?"":"#"+d)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(r){var o=r.querySelector(".medium-editor-toolbar-close"),i=r.querySelector(".medium-editor-toolbar-save"),a=r.querySelector(".medium-editor-toolbar-input");this.on(r,"click",this.handleFormClick.bind(this)),this.on(a,"keyup",this.handleTextboxKeyup.bind(this)),this.on(o,"click",this.handleCloseClick.bind(this)),this.on(i,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var r=this.document,o=r.createElement("div");return o.className="medium-editor-toolbar-form",o.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),o.innerHTML=this.getTemplate(),this.attachFormEvents(o),o},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(r){if(r.keyCode===e.util.keyCode.ENTER){r.preventDefault(),this.doFormSave();return}r.keyCode===e.util.keyCode.ESCAPE&&(r.preventDefault(),this.doFormCancel())},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.anchor=n}(),function(){var n=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var r=this.document.createElement("div");return r.id="medium-editor-anchor-preview-"+this.getEditorId(),r.className="medium-editor-anchor-preview",r.innerHTML=this.getTemplate(),this.on(r,"click",this.handleClick.bind(this)),r},getTemplate:function(){return'
'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(r){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||r.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=r.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=r.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=r,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(r){r=r||this.activeAnchor;var o=this.window.innerWidth,i=this.anchorPreview.offsetHeight,a=r.getBoundingClientRect(),s=this.diffLeft,l=this.diffTop,u=this.getEditorOption("elementsContainer"),c=["absolute","fixed"].indexOf(window.getComputedStyle(u).getPropertyValue("position"))>-1,d={},f,h,g,v,m;f=this.anchorPreview.offsetWidth/2;var b=this.base.getExtensionByName("toolbar");b&&(s=b.diffLeft,l=b.diffTop),h=s-f,c?(v=u.getBoundingClientRect(),["top","left"].forEach(function(w){d[w]=a[w]-v[w]}),d.width=a.width,d.height=a.height,a=d,o=v.width,m=u.scrollTop):m=this.window.pageYOffset,g=a.left+a.width/2,m+=i+a.top+a.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(m)+"px",this.anchorPreview.style.right="initial",gthis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=new Date().getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=n}(),function(){var n,r,o,i,a;n=[" "," ",` `,"\r","\xA0","\u2000","\u2001","\u2002","\u2003","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",o="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?\xAB\xBB\u201C\u201D\u2018\u2019])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",i=new RegExp("^("+r+")$","i"),a=new RegExp(o,"gi");function s(u){return!e.util.getClosestTag(u,"a")}var l=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var u=0,c=0;c0&&v!==null;)h=d.currentNode,g=h.nodeValue,g.length>c?(v=h.splitText(g.length-c),c=0):(v=d.previousNode(),c-=g.length);return v},performLinkingWithinElement:function(u){for(var c=this.findLinkableText(u),d=!1,f=0;f1;)f.appendChild(d.childNodes[1])}});e.extensions.autoLink=l}(),function(){var n="medium-editor-dragover";function r(i){var a=e.util.getContainerEditorElement(i),s=Array.prototype.slice.call(a.parentElement.querySelectorAll("."+n));s.forEach(function(l){l.classList.remove(n)})}var o=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(i){i.preventDefault(),i.dataTransfer.dropEffect="copy";var a=i.target.classList?i.target:i.target.parentElement;r(a),i.type==="dragover"&&a.classList.add(n)},handleDrop:function(i){i.preventDefault(),i.stopPropagation(),this.base.selectElement(i.target);var a=this.base.exportSelection();a.start=a.end,this.base.importSelection(a),i.dataTransfer.files&&Array.prototype.slice.call(i.dataTransfer.files).forEach(function(s){this.isAllowedFile(s)&&s.type.match("image")&&this.insertImageFile(s)},this),r(i.target)},isAllowedFile:function(i){return this.allowedTypes.some(function(a){return!!i.type.match(a)})},insertImageFile:function(i){if(typeof FileReader=="function"){var a=new FileReader;a.readAsDataURL(i),a.addEventListener("load",function(s){var l=this.document.createElement("img");l.src=s.target.result,e.util.insertHTMLCommand(this.document,l.outerHTML)}.bind(this))}}});e.extensions.fileDragging=o}(),function(){var n=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(r){var o=r.key.charCodeAt(0);this.keys[o]||(this.keys[o]=[]),this.keys[o].push(r)},this)},handleKeydown:function(r){var o=e.util.getKeyCode(r);if(!!this.keys[o]){var i=e.util.isMetaCtrlKey(r),a=!!r.shiftKey,s=!!r.altKey;this.keys[o].forEach(function(l){l.meta===i&&l.shift===a&&(l.alt===s||l.alt===void 0)&&(r.preventDefault(),r.stopPropagation(),typeof l.command=="function"?l.command.apply(this):l.command!==!1&&this.execAction(l.command))},this)}}});e.extensions.keyboardCommands=n}(),function(){var n=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var o=this.document.queryCommandValue("fontName")+"";this.showForm(o)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(r){var o=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),o.value=r||"",o.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var r=this.document,o=r.createElement("div"),i=r.createElement("select"),a=r.createElement("a"),s=r.createElement("a"),l;o.className="medium-editor-toolbar-form",o.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(o,"click",this.handleFormClick.bind(this));for(var u=0;u
':"✓",o.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"×",o.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),o},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("face")&&r.removeAttribute("face")})},handleFontChange:function(){var r=this.getSelect().value;r===""?this.clearFontName():this.execAction("fontName",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontName=n}(),function(){var n=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var o=this.document.queryCommandValue("fontSize")+"";this.showForm(o)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(r){var o=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),o.value=r||"",o.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var r=this.document,o=r.createElement("div"),i=r.createElement("input"),a=r.createElement("a"),s=r.createElement("a");return o.className="medium-editor-toolbar-form",o.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(o,"click",this.handleFormClick.bind(this)),i.setAttribute("type","range"),i.setAttribute("min","1"),i.setAttribute("max","7"),i.className="medium-editor-toolbar-input",o.appendChild(i),this.on(i,"change",this.handleSliderChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"✓",o.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"×",o.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),o},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("size")&&r.removeAttribute("size")})},handleSliderChange:function(){var r=this.getInput().value;r==="4"?this.clearFontSize():this.execAction("fontSize",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=n}(),function(){var n="%ME_PASTEBIN%",r=null,o=null,i=function(u){u.stopPropagation()};function a(){return[[new RegExp(/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/|/g),""],[new RegExp(/
$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
/g),"
"],[new RegExp(/]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:(bold|700)[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

"],[new RegExp(/\n+

/gi),""],[new RegExp(/(((?!/gi),"$1"]]}function s(u,c,d){var f=u.clipboardData||c.clipboardData||d.dataTransfer,h={};if(!f)return h;if(f.getData){var g=f.getData("Text");g&&g.length>0&&(h["text/plain"]=g)}if(f.types)for(var v=0;v1)for(g=0;g"+e.util.htmlEntities(f[g])+"

");else h=e.util.htmlEntities(f[0]);e.util.insertHTMLCommand(this.document,h)}},handlePasteBinPaste:function(u){if(u.defaultPrevented){this.removePasteBin();return}var c=s(u,this.window,this.document),d=c["text/html"],f=c["text/plain"],h=o;if(!this.cleanPastedHTML||d){u.preventDefault(),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h);return}setTimeout(function(){this.cleanPastedHTML&&(d=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h)}.bind(this),0)},handleKeydown:function(u,c){!(e.util.isKey(u,e.util.keyCode.V)&&e.util.isMetaCtrlKey(u))||(u.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(c))},createPasteBin:function(u){var c,d=e.selection.getSelectionRange(this.document),f=this.window.pageYOffset;o=u,d&&(c=d.getClientRects(),c.length?f+=c[0].top:d.startContainer.getBoundingClientRect!==void 0?f+=d.startContainer.getBoundingClientRect().top:f+=d.getBoundingClientRect().top),r=d;var h=this.document.createElement("div");h.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),h.setAttribute("style","border: 1px red solid; position: absolute; top: "+f+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),h.setAttribute("contentEditable",!0),h.innerHTML=n,this.document.body.appendChild(h),this.on(h,"focus",i),this.on(h,"focusin",i),this.on(h,"focusout",i),h.focus(),e.selection.selectNode(h,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(h,"paste",this.boundHandlePaste)},removePasteBin:function(){r!==null&&(e.selection.selectRange(this.document,r),r=null),o!==null&&(o=null);var u=this.getPasteBin();!u||u&&(this.off(u,"focus",i),this.off(u,"focusin",i),this.off(u,"focusout",i),this.off(u,"paste",this.boundHandlePaste),u.parentElement.removeChild(u))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var u=this.getPasteBin();if(!u||u.firstChild&&u.firstChild.id==="mcepastebin")return!1;var c=u.innerHTML;return!c||c===n?!1:c},cleanPaste:function(u){var c,d,f,h,g=/"+u.split("

").join("

")+"

",d=f.querySelectorAll("a,p,div,br"),c=0;c"+d.innerHTML+"
":f.innerHTML=d.innerHTML,d.parentNode.replaceChild(f,d);for(h=u.querySelectorAll("span"),c=0;c0&&(a[0].classList.add(this.firstButtonClass),a[a.length-1].classList.add(this.lastButtonClass)),r},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(r){if(r&&r.target&&e.util.isDescendant(this.getToolbarElement(),r.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return this.getToolbarActionsElement().style.display==="block"},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(r){r.hasForm&&r.isDisplayed()&&r.hideForm()})},multipleBlockElementsSelected:function(){var r=/<[^\/>][^>]*><\/[^>]+>/gim,o=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),i=e.selection.getSelectionHtml(this.document).replace(r,""),a=i.match(o);return!!a&&a.length>1},modifySelection:function(){var r=this.window.getSelection(),o=r.getRangeAt(0);if(this.standardizeSelectionStart&&o.startContainer.nodeValue&&o.startOffset===o.startContainer.nodeValue.length){var i=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),o.startContainer,this.document);if(i){for(var a=0;i.nodeValue.substr(a,1).trim().length===0;)a=a+1;o=e.selection.select(this.document,i,a,o.endContainer,o.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var r=e.selection.getSelectionElement(this.window);if(!r||this.getEditorElements().indexOf(r)===-1||r.getAttribute("data-disable-toolbar"))return this.hideToolbar();if(this.updateOnEmptySelection&&this.static)return this.showAndUpdateToolbar();if(!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected())return this.hideToolbar();this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(r){typeof r.isActive=="function"&&typeof r.setInactive=="function"&&r.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var r=[],o=null,i=e.selection.getSelectionRange(this.document),a,s=function(l){typeof l.checkState=="function"?l.checkState(a):typeof l.isActive=="function"&&typeof l.isAlreadyApplied=="function"&&typeof l.setActive=="function"&&!l.isActive()&&l.isAlreadyApplied(a)&&l.setActive()};if(!!i&&(this.forEachExtension(function(l){if(typeof l.queryCommandState=="function"&&(o=l.queryCommandState(),o!==null)){o&&typeof l.setActive=="function"&&l.setActive();return}r.push(l)}),a=e.selection.getSelectedParentElement(i),!!this.getEditorElements().some(function(l){return e.util.isDescendant(l,a,!0)})))for(;a&&(r.forEach(s),!e.util.isMediumEditorElement(a));)a=a.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var r=this.base.getFocusedElement(),o=this.window.getSelection();if(!r)return this;(this.static||!o.isCollapsed)&&(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(r):this.positionToolbar(o)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(r){this.getToolbarElement().style.left="0";var o=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,i=this.window.innerWidth,a=this.getToolbarElement(),s=r.getBoundingClientRect(),l=s.top+o,u=s.left+s.width/2,c=a.offsetHeight,d=a.offsetWidth,f=d/2,h;switch(this.sticky?o>l+r.offsetHeight-c-this.stickyTopOffset?(a.style.top=l+r.offsetHeight-c+"px",a.classList.remove("medium-editor-sticky-toolbar")):o>l-c-this.stickyTopOffset?(a.classList.add("medium-editor-sticky-toolbar"),a.style.top=this.stickyTopOffset+"px"):(a.classList.remove("medium-editor-sticky-toolbar"),a.style.top=l-c+"px"):a.style.top=l-c+"px",this.align){case"left":h=s.left;break;case"right":h=s.right-d;break;case"center":h=u-f;break}h<0?h=0:h+d>i&&(h=i-Math.ceil(d)-1),a.style.left=h+"px"},positionToolbar:function(r){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var o=r.getRangeAt(0),i=o.getBoundingClientRect();(!i||i.height===0&&i.width===0&&o.startContainer===o.endContainer)&&(o.startContainer.nodeType===1&&o.startContainer.querySelector("img")?i=o.startContainer.querySelector("img").getBoundingClientRect():i=o.startContainer.getBoundingClientRect());var a=this.window.innerWidth,s=this.getToolbarElement(),l=s.offsetHeight,u=s.offsetWidth,c=u/2,d=50,f=this.diffLeft-c,h=this.getEditorOption("elementsContainer"),g=["absolute","fixed"].indexOf(window.getComputedStyle(h).getPropertyValue("position"))>-1,v={},m={},b,w;g?(w=h.getBoundingClientRect(),["top","left"].forEach(function(O){m[O]=i[O]-w[O]}),m.width=i.width,m.height=i.height,i=m,a=w.width,v.top=h.scrollTop):v.top=this.window.pageYOffset,b=i.left+i.width/2,v.top+=i.top-l,i.top'),s.onload=function(){var u=this.document.getElementById(l);u&&(u.removeAttribute("id"),u.removeAttribute("class"),u.src=s.result)}.bind(this)}}.bind(this))),r.target.classList.remove(o)}});e.extensions.imageDragging=n}(),function(){function n(D){var F=e.selection.getSelectionStart(this.options.ownerDocument),W=F.textContent,I=e.selection.getCaretOffsets(F);(W[I.left-1]===void 0||W[I.left-1].trim()===""||W[I.left]!==void 0&&W[I.left].trim()==="")&&D.preventDefault()}function r(D,F){if(this.options.disableReturn||F.getAttribute("data-disable-return"))D.preventDefault();else if(this.options.disableDoubleReturn||F.getAttribute("data-disable-double-return")){var W=e.selection.getSelectionStart(this.options.ownerDocument);(W&&W.textContent.trim()===""&&W.nodeName.toLowerCase()!=="li"||W.previousElementSibling&&W.previousElementSibling.nodeName.toLowerCase()!=="br"&&W.previousElementSibling.textContent.trim()==="")&&D.preventDefault()}}function o(D){var F=e.selection.getSelectionStart(this.options.ownerDocument),W=F&&F.nodeName.toLowerCase();W==="pre"&&(D.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(F)&&(D.preventDefault(),D.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(D){var F,W=e.selection.getSelectionStart(this.options.ownerDocument),I=W.nodeName.toLowerCase(),Q=/^(\s+|)?$/i,L=/h\d/i;e.util.isKey(D,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&W.previousElementSibling&&L.test(I)&&e.selection.getCaretOffsets(W).left===0?e.util.isKey(D,e.util.keyCode.BACKSPACE)&&Q.test(W.previousElementSibling.innerHTML)?(W.previousElementSibling.parentNode.removeChild(W.previousElementSibling),D.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(D,e.util.keyCode.ENTER)&&(F=this.options.ownerDocument.createElement("p"),F.innerHTML="
",W.previousElementSibling.parentNode.insertBefore(F,W),D.preventDefault()):e.util.isKey(D,e.util.keyCode.DELETE)&&W.nextElementSibling&&W.previousElementSibling&&!L.test(I)&&Q.test(W.innerHTML)&&L.test(W.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,W.nextElementSibling),W.previousElementSibling.parentNode.removeChild(W),D.preventDefault()):e.util.isKey(D,e.util.keyCode.BACKSPACE)&&I==="li"&&Q.test(W.innerHTML)&&!W.previousElementSibling&&!W.parentElement.previousElementSibling&&W.nextElementSibling&&W.nextElementSibling.nodeName.toLowerCase()==="li"?(F=this.options.ownerDocument.createElement("p"),F.innerHTML="
",W.parentElement.parentElement.insertBefore(F,W.parentElement),e.selection.moveCursor(this.options.ownerDocument,F),W.parentElement.removeChild(W),D.preventDefault()):e.util.isKey(D,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(W,"blockquote")!==!1&&e.selection.getCaretOffsets(W).left===0?(D.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey(D,e.util.keyCode.ENTER)&&e.util.getClosestTag(W,"blockquote")!==!1&&e.selection.getCaretOffsets(W).right===0?(F=this.options.ownerDocument.createElement("p"),F.innerHTML="
",W.parentElement.insertBefore(F,W.nextSibling),e.selection.moveCursor(this.options.ownerDocument,F),D.preventDefault()):e.util.isKey(D,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(W.parentElement)&&!W.previousElementSibling&&W.nextElementSibling&&Q.test(W.innerHTML)&&(D.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,W.nextSibling),W.parentElement.removeChild(W))}function a(D){var F=e.selection.getSelectionStart(this.options.ownerDocument),W;!F||(e.util.isMediumEditorElement(F)&&F.children.length===0&&!e.util.isBlockContainer(F)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey(D,e.util.keyCode.ENTER)&&!e.util.isListItem(F)&&!e.util.isBlockContainer(F)&&(W=F.nodeName.toLowerCase(),W==="a"?this.options.ownerDocument.execCommand("unlink",!1,null):!D.shiftKey&&!D.ctrlKey&&this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function s(D,F){var W=F.parentNode.querySelector('textarea[medium-editor-textarea-id="'+F.getAttribute("medium-editor-textarea-id")+'"]');W&&(W.value=F.innerHTML.trim())}function l(D){D._mediumEditors||(D._mediumEditors=[null]),this.id||(this.id=D._mediumEditors.length),D._mediumEditors[this.id]=this}function u(D){!D._mediumEditors||!D._mediumEditors[this.id]||(D._mediumEditors[this.id]=null)}function c(D,F,W){var I=[];if(D||(D=[]),typeof D=="string"&&(D=F.querySelectorAll(D)),e.util.isElement(D)&&(D=[D]),W)for(var Q=0;Q=0&&(W=e.selection.exportSelection(D,this.options.ownerDocument)),W!==null&&F!==0&&(W.editableElementIndex=F),W},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(D,F){if(!!D){var W=this.elements[D.editableElementIndex||0];e.selection.importSelection(D,W,this.options.ownerDocument,F)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(D){var F=e.selection.getSelectionElement(this.options.contentWindow),W={},I;if(this.elements.indexOf(F)!==-1){try{if(this.events.disableCustomEvent("editableInput"),D.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),I=D.url||D.value,I&&I.trim().length>0){var Q=this.options.contentWindow.getSelection();if(Q){var L=Q.getRangeAt(0),H=L.commonAncestorContainer,re,U,J,ie;if(L.endContainer.nodeType===3&&L.startContainer.nodeType!==3&&L.startOffset===0&&L.startContainer.firstChild===L.endContainer&&(H=L.endContainer),U=e.util.getClosestBlockContainer(L.startContainer),J=e.util.getClosestBlockContainer(L.endContainer),H.nodeType!==3&&H.textContent.length!==0&&U===J){var te=U||F,he=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),re=this.exportSelection(),he.appendChild(te.cloneNode(!0)),F===te?e.selection.select(this.options.ownerDocument,te.firstChild,0,te.lastChild,te.lastChild.nodeType===3?te.lastChild.nodeValue.length:te.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,te,0,te,te.childNodes.length);var K=this.exportSelection();ie=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,he,{start:re.start-K.start,end:re.end-K.start,editableElementIndex:re.editableElementIndex}),ie.length===0&&(he=this.options.ownerDocument.createDocumentFragment(),he.appendChild(H.cloneNode(!0)),ie=[he.firstChild.firstChild,he.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,ie,I.trim());var ne=(he.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,he.firstChild.innerHTML.replace(/^\s+/,"")),re.start-=ne,re.end-=ne,this.importSelection(re)}else this.options.ownerDocument.execCommand("createLink",!1,I);this.options.targetBlank||D.target==="_blank"?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I),D.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),D.buttonClass)}}if(this.options.targetBlank||D.target==="_blank"||D.buttonClass){W=this.options.ownerDocument.createEvent("HTMLEvents"),W.initEvent("input",!0,!0,this.options.contentWindow);for(var fe=0,Ne=this.elements.length;fe1?r[1]:"";return{major:parseInt(o[0],10),minor:parseInt(o[1],10),revision:parseInt(o[2],10),preRelease:i,toString:function(){return[o[0],o[1],o[2]].join(".")+(i?"-"+i:"")}}},e.version=e.parseVersionString.call(this,"5.23.3"),e}())})(AG);var XS=AG.exports;/*! * vanilla-picker v2.12.3 * https://vanilla-picker.js.org * * Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate) * Released under the ISC license. */var wD=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},SD=function(){function t(e,n){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var CXe=function(){function t(e,n,r,o){wD(this,t);var i=this;function a(l){if(l.startsWith("hsl")){var u=l.match(/([\-\d\.e]+)/g).map(Number),c=s1(u,4),d=c[0],f=c[1],h=c[2],g=c[3];g===void 0&&(g=1),d/=360,f/=100,h/=100,i.hsla=[d,f,h,g]}else if(l.startsWith("rgb")){var v=l.match(/([\-\d\.e]+)/g).map(Number),m=s1(v,4),b=m[0],w=m[1],O=m[2],S=m[3];S===void 0&&(S=1),i.rgba=[b,w,O,S]}else l.startsWith("#")?i.rgba=t.hexToRgb(l):i.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(r===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,r,o===void 0?1:o]}return SD(t,[{key:"printRGB",value:function(n){var r=n?this.rgba:this.rgba.slice(0,3),o=r.map(function(i,a){return WF(i,a===3?3:0)});return n?"rgba("+o+")":"rgb("+o+")"}},{key:"printHSL",value:function(n){var r=[360,100,100,1],o=["","%","%",""],i=n?this.hsla:this.hsla.slice(0,3),a=i.map(function(s,l){return WF(s*r[l],l===3?3:1)+o[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var r=this.hex;return n?r:r.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,r=n.map(function(o,i){return i<3?o.toString(16):Math.round(o*255).toString(16)});return"#"+r.map(function(o){return o.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var r=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!r.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var o=r.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(i){return parseInt(i,16)});return o[3]=o[3]/255,o}},{key:"nameToRgb",value:function(n){var r=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),o=xXe[r];return o===void 0?o:t.hexToRgb(o.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var r=s1(n,4),o=r[0],i=r[1],a=r[2],s=r[3];o/=255,i/=255,a/=255;var l=Math.max(o,i,a),u=Math.min(o,i,a),c=void 0,d=void 0,f=(l+u)/2;if(l===u)c=d=0;else{var h=l-u;switch(d=f>.5?h/(2-l-u):h/(l+u),l){case o:c=(i-a)/h+(i1&&(w-=1),w<.16666666666666666?m+(b-m)*6*w:w<.5?b:w<.6666666666666666?m+(b-m)*(.6666666666666666-w)*6:m},f=a<.5?a*(1+i):a+i-a*i,h=2*a-f;l=d(h,f,o+1/3),u=d(h,f,o),c=d(h,f,o-1/3)}var g=[l*255,u*255,c*255].map(Math.round);return g[3]=s,g}}]),t}(),EXe=function(){function t(){wD(this,t),this._events=[]}return SD(t,[{key:"add",value:function(n,r,o){n.addEventListener(r,o,!1),this._events.push({target:n,type:r,handler:o})}},{key:"remove",value:function(n,r,o){this._events=this._events.filter(function(i){var a=!0;return n&&n!==i.target&&(a=!1),r&&r!==i.type&&(a=!1),o&&o!==i.handler&&(a=!1),a&&t._doRemove(i.target,i.type,i.handler),!a})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,r,o){n.removeEventListener(r,o,!1)}}]),t}();function TXe(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function R2(t,e,n){var r=!1;function o(l,u,c){return Math.max(u,Math.min(l,c))}function i(l,u,c){if(c&&(r=!0),!!r){l.preventDefault();var d=e.getBoundingClientRect(),f=d.width,h=d.height,g=u.clientX,v=u.clientY,m=o(g-d.left,0,f),b=o(v-d.top,0,h);n(m/f,b/h)}}function a(l,u){var c=l.buttons===void 0?l.which:l.buttons;c===1?i(l,l,u):r=!1}function s(l,u){l.touches.length===1?i(l,l.touches[0],u):r=!1}t.add(e,"mousedown",function(l){a(l,!0)}),t.add(e,"touchstart",function(l){s(l,!0)}),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",function(l){r=!1}),t.add(e,"touchend",function(l){r=!1}),t.add(e,"touchcancel",function(l){r=!1})}var kXe=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em, linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,AXe=360,PG="keydown",l1="mousedown",D2="focusin";function $u(t,e){return(e||document).querySelector(t)}function NG(t){t.preventDefault(),t.stopPropagation()}function I2(t,e,n,r,o){t.add(e,PG,function(i){n.indexOf(i.key)>=0&&(o&&NG(i),r(i))})}var MG=function(){function t(e){wD(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new EXe,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return SD(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var o=this.settings;function i(u,c,d){for(var f in u)d&&d.indexOf(f)>=0||(c[f]=u[f])}if(n instanceof HTMLElement)o.parent=n;else{o.parent&&n.parent&&o.parent!==n.parent&&(this._events.remove(o.parent),this._popupInited=!1),i(n,o),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=o.parent;if(s&&o.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),I2(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!o.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===PG?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,o=!1;if(!n)o=!0;else if(r===l1||r===D2){var i=(this.__containedEvent||0)+100;n.timeStamp>i&&(o=!0)}else NG(n),o=!0;o&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==l1&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var o=void 0;try{o=new CXe(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var i=o.hsla;i[3]=1,o.hsla=i}this.colour=this.color=o,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var o=this.settings.template||'
',i=TXe(o);return this.domElement=i,this._domH=$u(".picker_hue",i),this._domSL=$u(".picker_sl",i),this._domA=$u(".picker_alpha",i),this._domEdit=$u(".picker_editor input",i),this._domSample=$u(".picker_sample",i),this._domOkay=$u(".picker_done button",i),this._domCancel=$u(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup(function(){return i.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,o=this.domElement,i=this._events;function a(u,c,d){i.add(u,c,d)}a(o,"click",function(u){return u.preventDefault()}),R2(i,this._domH,function(u,c){return r._setHSLA(u)}),R2(i,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&R2(i,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,l1,u),a(window,D2,u),I2(i,o,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(o,l1,c),a(o,D2,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),I2(i,o,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(o){getComputedStyle(n).position==="static"&&(n.style.position="relative");var i=o===!0?"popup_right":"popup_"+o;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===i?r.classList.add(a):r.classList.remove(a)}),r.classList.add(i)})}},{key:"_setHSLA",value:function(n,r,o,i,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,o,i].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,o=r.hsla,i="hsl("+o[0]*AXe+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=$u(".picker_selector",l),f=$u(".picker_selector",u),h=$u(".picker_selector",c);function g(C,E,T){E.style.left=T*100+"%"}function v(C,E,T){E.style.top=T*100+"%"}g(l,d,o[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,g(u,f,o[1]),v(u,f,1-o[2]),u.style.color=a,v(c,h,1-o[3]);var m=a,b=m.replace("hsl","hsla").replace(")",", 0)"),w="linear-gradient("+[m,b]+")";if(this._domA.style.background=w+", "+kXe,!n.fromEditor){var O=this.settings.editorFormat,S=this.settings.alpha,x=void 0;switch(O){case"rgb":x=r.printRGB(S);break;case"hsl":x=r.printHSL(S);break;default:x=r.printHex(S)}this._domEdit.value=x}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var o=n?"":"none",i=r.style.display!==o;return i&&(r.style.display=o),i}}]),t}();{var L2=document.createElement("style");L2.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(L2),MG.StyleElement=L2}var xD={exports:{}};(function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",o="undefined",i=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(K,ne){var fe=typeof K[ne];return fe==r||!!(fe==n&&K[ne])||fe=="unknown"}function c(K,ne){return!!(typeof K[ne]==n&&K[ne])}function d(K,ne){return typeof K[ne]!=o}function f(K){return function(ne,fe){for(var Ne=fe.length;Ne--;)if(!K(ne,fe[Ne]))return!1;return!0}}var h=f(u),g=f(c),v=f(d);function m(K){return K&&h(K,l)&&v(K,s)}function b(K){return c(K,"body")?K.body:K.getElementsByTagName("body")[0]}var w=[].forEach?function(K,ne){K.forEach(ne)}:function(K,ne){for(var fe=0,Ne=K.length;fevt?(Vn.node=$t,Vn.offset-=vt):Vn.node==qe.parentNode&&Vn.offset>Ee(qe)&&++Vn.offset;return $t}function Fe(qe){if(qe.nodeType==9)return qe;if(typeof qe.ownerDocument!=fe)return qe.ownerDocument;if(typeof qe.document!=fe)return qe.document;if(qe.parentNode)return Fe(qe.parentNode);throw ne.createError("getDocument: no document found for node")}function at(qe){var vt=Fe(qe);if(typeof vt.defaultView!=fe)return vt.defaultView;if(typeof vt.parentWindow!=fe)return vt.parentWindow;throw ne.createError("Cannot get a window object for node")}function nt(qe){if(typeof qe.contentDocument!=fe)return qe.contentDocument;if(typeof qe.contentWindow!=fe)return qe.contentWindow.document;throw ne.createError("getIframeDocument: No Document object found for iframe element")}function ct(qe){if(typeof qe.contentWindow!=fe)return qe.contentWindow;if(typeof qe.contentDocument!=fe)return qe.contentDocument.defaultView;throw ne.createError("getIframeWindow: No Window object found for iframe element")}function ht(qe){return qe&&Ne.isHostMethod(qe,"setTimeout")&&Ne.isHostObject(qe,"document")}function Je(qe,vt,dt){var $t;if(qe?Ne.isHostProperty(qe,"nodeType")?$t=qe.nodeType==1&&qe.tagName.toLowerCase()=="iframe"?nt(qe):Fe(qe):ht(qe)&&($t=qe.document):$t=document,!$t)throw vt.createError(dt+"(): Parameter must be a Window object or DOM node");return $t}function ft(qe){for(var vt;vt=qe.parentNode;)qe=vt;return qe}function Mt(qe,vt,dt,$t){var Dt,Vn,no,lo,So;if(qe==dt)return vt===$t?0:vt<$t?-1:1;if(Dt=ce(dt,qe,!0))return vt<=Ee(Dt)?-1:1;if(Dt=ce(qe,dt,!0))return Ee(Dt)<$t?-1:1;if(Vn=se(qe,dt),!Vn)throw new Error("comparePoints error: nodes have no common ancestor");if(no=qe===Vn?Vn:ce(qe,Vn,!0),lo=dt===Vn?Vn:ce(dt,Vn,!0),no===lo)throw ne.createError("comparePoints got to case 4 and childA and childB are the same!");for(So=Vn.firstChild;So;){if(So===no)return-1;if(So===lo)return 1;So=So.nextSibling}}var Pe=!1;function Ce(qe){var vt;try{return vt=qe.parentNode,!1}catch{return!0}}(function(){var qe=document.createElement("b");qe.innerHTML="1";var vt=qe.firstChild;qe.innerHTML="
",Pe=Ce(vt),K.features.crashyTextNodes=Pe})();function pe(qe){if(!qe)return"[No node]";if(Pe&&Ce(qe))return"[Broken node]";if(Ae(qe))return'"'+qe.data+'"';if(qe.nodeType==1){var vt=qe.id?' id="'+qe.id+'"':"";return"<"+qe.nodeName+vt+">[index:"+Ee(qe)+",length:"+qe.childNodes.length+"]["+(qe.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return qe.nodeName}function Be(qe){for(var vt=Fe(qe).createDocumentFragment(),dt;dt=qe.firstChild;)vt.appendChild(dt);return vt}var _t;typeof window.getComputedStyle!=fe?_t=function(qe,vt){return at(qe).getComputedStyle(qe,null)[vt]}:typeof document.documentElement.currentStyle!=fe?_t=function(qe,vt){return qe.currentStyle?qe.currentStyle[vt]:""}:ne.fail("No means of obtaining computed style properties found");function en(qe,vt,dt){var $t=$e(qe),Dt=qe.createElement("div");Dt.contentEditable=""+!!dt,vt&&(Dt.innerHTML=vt);var Vn=$t.firstChild;return Vn?$t.insertBefore(Dt,Vn):$t.appendChild(Dt),Dt}function On(qe){return qe.parentNode.removeChild(qe)}function yn(qe){this.root=qe,this._next=qe}yn.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var qe=this._current=this._next,vt,dt;if(this._current)if(vt=qe.firstChild,vt)this._next=vt;else{for(dt=null;qe!==this.root&&!(dt=qe.nextSibling);)qe=qe.parentNode;this._next=dt}return this._current},detach:function(){this._current=this._next=this.root=null}};function dr(qe){return new yn(qe)}function to(qe,vt){this.node=qe,this.offset=vt}to.prototype={equals:function(qe){return!!qe&&this.node===qe.node&&this.offset==qe.offset},inspect:function(){return"[DomPosition("+pe(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function Kr(qe){this.code=this[qe],this.codeName=qe,this.message="DOMException: "+this.codeName}Kr.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},Kr.prototype.toString=function(){return this.message},K.dom={arrayContains:ve,isHtmlNamespace:q,parentElement:Ie,getNodeIndex:Ee,getNodeLength:Oe,getCommonAncestor:se,isAncestorOf:X,isOrIsAncestorOf:oe,getClosestAncestorIn:ce,isCharacterDataNode:Ae,isTextOrCommentNode:ye,insertAfter:Te,splitDataNode:Me,getDocument:Fe,getWindow:at,getIframeWindow:ct,getIframeDocument:nt,getBody:$e,isWindow:ht,getContentDocument:Je,getRootContainer:ft,comparePoints:Mt,isBrokenNode:Ce,inspectNode:pe,getComputedStyleProperty:_t,createTestElement:en,removeNode:On,fragmentFromNodeChildren:Be,createIterator:dr,DomPosition:to},K.DOMException=Kr}),C.createCoreModule("DomRange",["DomUtil"],function(K,ne){var fe=K.dom,Ne=K.util,$e=fe.DomPosition,ue=K.DOMException,G=fe.isCharacterDataNode,ve=fe.getNodeIndex,q=fe.isOrIsAncestorOf,Ie=fe.getDocument,Ee=fe.comparePoints,Oe=fe.splitDataNode,se=fe.getClosestAncestorIn,X=fe.getNodeLength,oe=fe.arrayContains,ce=fe.getRootContainer,Ae=K.features.crashyTextNodes,ye=fe.removeNode;function Te(Se,He){return Se.nodeType!=3&&(q(Se,He.startContainer)||q(Se,He.endContainer))}function Me(Se){return Se.document||Ie(Se.startContainer)}function Fe(Se){return ce(Se.startContainer)}function at(Se){return new $e(Se.parentNode,ve(Se))}function nt(Se){return new $e(Se.parentNode,ve(Se)+1)}function ct(Se,He,Et){var Vt=Se.nodeType==11?Se.firstChild:Se;return G(He)?Et==He.length?fe.insertAfter(Se,He):He.parentNode.insertBefore(Se,Et==0?He:Oe(He,Et)):Et>=He.childNodes.length?He.appendChild(Se):He.insertBefore(Se,He.childNodes[Et]),Vt}function ht(Se,He,Et){if(Sr(Se),Sr(He),Me(He)!=Me(Se))throw new ue("WRONG_DOCUMENT_ERR");var Vt=Ee(Se.startContainer,Se.startOffset,He.endContainer,He.endOffset),fn=Ee(Se.endContainer,Se.endOffset,He.startContainer,He.startOffset);return Et?Vt<=0&&fn>=0:Vt<0&&fn>0}function Je(Se){for(var He,Et,Vt=Me(Se.range).createDocumentFragment(),fn;Et=Se.next();){if(He=Se.isPartiallySelectedSubtree(),Et=Et.cloneNode(!He),He&&(fn=Se.getSubtreeIterator(),Et.appendChild(Je(fn)),fn.detach()),Et.nodeType==10)throw new ue("HIERARCHY_REQUEST_ERR");Vt.appendChild(Et)}return Vt}function ft(Se,He,Et){var Vt,fn;Et=Et||{stop:!1};for(var sr,It;sr=Se.next();)if(Se.isPartiallySelectedSubtree()){if(He(sr)===!1){Et.stop=!0;return}else if(It=Se.getSubtreeIterator(),ft(It,He,Et),It.detach(),Et.stop)return}else for(Vt=fe.createIterator(sr);fn=Vt.next();)if(He(fn)===!1){Et.stop=!0;return}}function Mt(Se){for(var He;Se.next();)Se.isPartiallySelectedSubtree()?(He=Se.getSubtreeIterator(),Mt(He),He.detach()):Se.remove()}function Pe(Se){for(var He,Et=Me(Se.range).createDocumentFragment(),Vt;He=Se.next();){if(Se.isPartiallySelectedSubtree()?(He=He.cloneNode(!1),Vt=Se.getSubtreeIterator(),He.appendChild(Pe(Vt)),Vt.detach()):Se.remove(),He.nodeType==10)throw new ue("HIERARCHY_REQUEST_ERR");Et.appendChild(He)}return Et}function Ce(Se,He,Et){var Vt=!!(He&&He.length),fn,sr=!!Et;Vt&&(fn=new RegExp("^("+He.join("|")+")$"));var It=[];return ft(new Be(Se,!1),function(an){if(!(Vt&&!fn.test(an.nodeType))&&!(sr&&!Et(an))){var wn=Se.startContainer;if(!(an==wn&&G(wn)&&Se.startOffset==wn.length)){var Jn=Se.endContainer;an==Jn&&G(Jn)&&Se.endOffset==0||It.push(an)}}}),It}function pe(Se){var He=typeof Se.getName=="undefined"?"Range":Se.getName();return"["+He+"("+fe.inspectNode(Se.startContainer)+":"+Se.startOffset+", "+fe.inspectNode(Se.endContainer)+":"+Se.endOffset+")]"}function Be(Se,He){if(this.range=Se,this.clonePartiallySelectedTextNodes=He,!Se.collapsed){this.sc=Se.startContainer,this.so=Se.startOffset,this.ec=Se.endContainer,this.eo=Se.endOffset;var Et=Se.commonAncestorContainer;this.sc===this.ec&&G(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===Et&&!G(this.sc)?this.sc.childNodes[this.so]:se(this.sc,Et,!0),this._last=this.ec===Et&&!G(this.ec)?this.ec.childNodes[this.eo-1]:se(this.ec,Et,!0))}}Be.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var Se=this._current=this._next;return Se&&(this._next=Se!==this._last?Se.nextSibling:null,G(Se)&&this.clonePartiallySelectedTextNodes&&(Se===this.ec&&(Se=Se.cloneNode(!0)).deleteData(this.eo,Se.length-this.eo),this._current===this.sc&&(Se=Se.cloneNode(!0)).deleteData(0,this.so))),Se},remove:function(){var Se=this._current,He,Et;G(Se)&&(Se===this.sc||Se===this.ec)?(He=Se===this.sc?this.so:0,Et=Se===this.ec?this.eo:Se.length,He!=Et&&Se.deleteData(He,Et-He)):Se.parentNode&&ye(Se)},isPartiallySelectedSubtree:function(){var Se=this._current;return Te(Se,this.range)},getSubtreeIterator:function(){var Se;if(this.isSingleCharacterDataNode)Se=this.range.cloneRange(),Se.collapse(!1);else{Se=new Jr(Me(this.range));var He=this._current,Et=He,Vt=0,fn=He,sr=X(He);q(He,this.sc)&&(Et=this.sc,Vt=this.so),q(He,this.ec)&&(fn=this.ec,sr=this.eo),Xn(Se,Et,Vt,fn,sr)}return new Be(Se,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var _t=[1,3,4,5,7,8,10],en=[2,9,11],On=[5,6,10,12],yn=[1,3,4,5,7,8,10,11],dr=[1,3,4,5,7,8];function to(Se){return function(He,Et){for(var Vt,fn=Et?He:He.parentNode;fn;){if(Vt=fn.nodeType,oe(Se,Vt))return fn;fn=fn.parentNode}return null}}var Kr=to([9,11]),qe=to(On),vt=to([6,10,12]),dt=to([1]);function $t(Se,He){if(vt(Se,He))throw new ue("INVALID_NODE_TYPE_ERR")}function Dt(Se,He){if(!oe(He,Se.nodeType))throw new ue("INVALID_NODE_TYPE_ERR")}function Vn(Se,He){if(He<0||He>(G(Se)?Se.length:Se.childNodes.length))throw new ue("INDEX_SIZE_ERR")}function no(Se,He){if(Kr(Se,!0)!==Kr(He,!0))throw new ue("WRONG_DOCUMENT_ERR")}function lo(Se){if(qe(Se,!0))throw new ue("NO_MODIFICATION_ALLOWED_ERR")}function So(Se,He){if(!Se)throw new ue(He)}function za(Se,He){return He<=(G(Se)?Se.length:Se.childNodes.length)}function vs(Se){return!!Se.startContainer&&!!Se.endContainer&&!(Ae&&(fe.isBrokenNode(Se.startContainer)||fe.isBrokenNode(Se.endContainer)))&&ce(Se.startContainer)==ce(Se.endContainer)&&za(Se.startContainer,Se.startOffset)&&za(Se.endContainer,Se.endOffset)}function Sr(Se){if(!vs(Se))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+Se.inspect()+")")}var Ql=document.createElement("style"),bi=!1;try{Ql.innerHTML="x",bi=Ql.firstChild.nodeType==3}catch{}K.features.htmlParsingConforms=bi;var tt=bi?function(Se){var He=this.startContainer,Et=Ie(He);if(!He)throw new ue("INVALID_STATE_ERR");var Vt=null;return He.nodeType==1?Vt=He:G(He)&&(Vt=fe.parentElement(He)),Vt===null||Vt.nodeName=="HTML"&&fe.isHtmlNamespace(Ie(Vt).documentElement)&&fe.isHtmlNamespace(Vt)?Vt=Et.createElement("body"):Vt=Vt.cloneNode(!1),Vt.innerHTML=Se,fe.fragmentFromNodeChildren(Vt)}:function(Se){var He=Me(this),Et=He.createElement("body");return Et.innerHTML=Se,fe.fragmentFromNodeChildren(Et)};function Lt(Se,He){Sr(Se);var Et=Se.startContainer,Vt=Se.startOffset,fn=Se.endContainer,sr=Se.endOffset,It=Et===fn;G(fn)&&sr>0&&sr0&&Vt=ve(Et)&&sr++,Vt=0),Se.setStartAndEnd(Et,Vt,fn,sr)}function Ft(Se){Sr(Se);var He=Se.commonAncestorContainer.parentNode.cloneNode(!1);return He.appendChild(Se.cloneContents()),He.innerHTML}var Br=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],xo=0,ii=1,Pi=2,Ni=3,ai=0,Gs=1,ma=2,et=3;Ne.extend(K.rangePrototype,{compareBoundaryPoints:function(Se,He){Sr(this),no(this.startContainer,He.startContainer);var Et,Vt,fn,sr,It=Se==Ni||Se==xo?"start":"end",an=Se==ii||Se==xo?"start":"end";return Et=this[It+"Container"],Vt=this[It+"Offset"],fn=He[an+"Container"],sr=He[an+"Offset"],Ee(Et,Vt,fn,sr)},insertNode:function(Se){if(Sr(this),Dt(Se,yn),lo(this.startContainer),q(Se,this.startContainer))throw new ue("HIERARCHY_REQUEST_ERR");var He=ct(Se,this.startContainer,this.startOffset);this.setStartBefore(He)},cloneContents:function(){Sr(this);var Se,He;if(this.collapsed)return Me(this).createDocumentFragment();if(this.startContainer===this.endContainer&&G(this.startContainer))return Se=this.startContainer.cloneNode(!0),Se.data=Se.data.slice(this.startOffset,this.endOffset),He=Me(this).createDocumentFragment(),He.appendChild(Se),He;var Et=new Be(this,!0);return Se=Je(Et),Et.detach(),Se},canSurroundContents:function(){Sr(this),lo(this.startContainer),lo(this.endContainer);var Se=new Be(this,!0),He=Se._first&&Te(Se._first,this)||Se._last&&Te(Se._last,this);return Se.detach(),!He},surroundContents:function(Se){if(Dt(Se,dr),!this.canSurroundContents())throw new ue("INVALID_STATE_ERR");var He=this.extractContents();if(Se.hasChildNodes())for(;Se.lastChild;)Se.removeChild(Se.lastChild);ct(Se,this.startContainer,this.startOffset),Se.appendChild(He),this.selectNode(Se)},cloneRange:function(){Sr(this);for(var Se=new Jr(Me(this)),He=Br.length,Et;He--;)Et=Br[He],Se[Et]=this[Et];return Se},toString:function(){Sr(this);var Se=this.startContainer;if(Se===this.endContainer&&G(Se))return Se.nodeType==3||Se.nodeType==4?Se.data.slice(this.startOffset,this.endOffset):"";var He=[],Et=new Be(this,!0);return ft(Et,function(Vt){(Vt.nodeType==3||Vt.nodeType==4)&&He.push(Vt.data)}),Et.detach(),He.join("")},compareNode:function(Se){Sr(this);var He=Se.parentNode,Et=ve(Se);if(!He)throw new ue("NOT_FOUND_ERR");var Vt=this.comparePoint(He,Et),fn=this.comparePoint(He,Et+1);return Vt<0?fn>0?ma:ai:fn>0?Gs:et},comparePoint:function(Se,He){return Sr(this),So(Se,"HIERARCHY_REQUEST_ERR"),no(Se,this.startContainer),Ee(Se,He,this.startContainer,this.startOffset)<0?-1:Ee(Se,He,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:tt,toHtml:function(){return Ft(this)},intersectsNode:function(Se,He){if(Sr(this),ce(Se)!=Fe(this))return!1;var Et=Se.parentNode,Vt=ve(Se);if(!Et)return!0;var fn=Ee(Et,Vt,this.endContainer,this.endOffset),sr=Ee(Et,Vt+1,this.startContainer,this.startOffset);return He?fn<=0&&sr>=0:fn<0&&sr>0},isPointInRange:function(Se,He){return Sr(this),So(Se,"HIERARCHY_REQUEST_ERR"),no(Se,this.startContainer),Ee(Se,He,this.startContainer,this.startOffset)>=0&&Ee(Se,He,this.endContainer,this.endOffset)<=0},intersectsRange:function(Se){return ht(this,Se,!1)},intersectsOrTouchesRange:function(Se){return ht(this,Se,!0)},intersection:function(Se){if(this.intersectsRange(Se)){var He=Ee(this.startContainer,this.startOffset,Se.startContainer,Se.startOffset),Et=Ee(this.endContainer,this.endOffset,Se.endContainer,Se.endOffset),Vt=this.cloneRange();return He==-1&&Vt.setStart(Se.startContainer,Se.startOffset),Et==1&&Vt.setEnd(Se.endContainer,Se.endOffset),Vt}return null},union:function(Se){if(this.intersectsOrTouchesRange(Se)){var He=this.cloneRange();return Ee(Se.startContainer,Se.startOffset,this.startContainer,this.startOffset)==-1&&He.setStart(Se.startContainer,Se.startOffset),Ee(Se.endContainer,Se.endOffset,this.endContainer,this.endOffset)==1&&He.setEnd(Se.endContainer,Se.endOffset),He}else throw new ue("Ranges do not intersect")},containsNode:function(Se,He){return He?this.intersectsNode(Se,!1):this.compareNode(Se)==et},containsNodeContents:function(Se){return this.comparePoint(Se,0)>=0&&this.comparePoint(Se,X(Se))<=0},containsRange:function(Se){var He=this.intersection(Se);return He!==null&&Se.equals(He)},containsNodeText:function(Se){var He=this.cloneRange();He.selectNode(Se);var Et=He.getNodes([3]);if(Et.length>0){He.setStart(Et[0],0);var Vt=Et.pop();return He.setEnd(Vt,Vt.length),this.containsRange(He)}else return this.containsNodeContents(Se)},getNodes:function(Se,He){return Sr(this),Ce(this,Se,He)},getDocument:function(){return Me(this)},collapseBefore:function(Se){this.setEndBefore(Se),this.collapse(!1)},collapseAfter:function(Se){this.setStartAfter(Se),this.collapse(!0)},getBookmark:function(Se){var He=Me(this),Et=K.createRange(He);Se=Se||fe.getBody(He),Et.selectNodeContents(Se);var Vt=this.intersection(Et),fn=0,sr=0;return Vt&&(Et.setEnd(Vt.startContainer,Vt.startOffset),fn=Et.toString().length,sr=fn+Vt.toString().length),{start:fn,end:sr,containerNode:Se}},moveToBookmark:function(Se){var He=Se.containerNode,Et=0;this.setStart(He,0),this.collapse(!0);for(var Vt=[He],fn,sr=!1,It=!1,an,wn,Jn;!It&&(fn=Vt.pop());)if(fn.nodeType==3)an=Et+fn.length,!sr&&Se.start>=Et&&Se.start<=an&&(this.setStart(fn,Se.start-Et),sr=!0),sr&&Se.end>=Et&&Se.end<=an&&(this.setEnd(fn,Se.end-Et),It=!0),Et=an;else for(Jn=fn.childNodes,wn=Jn.length;wn--;)Vt.push(Jn[wn])},getName:function(){return"DomRange"},equals:function(Se){return Jr.rangesEqual(this,Se)},isValid:function(){return vs(this)},inspect:function(){return pe(this)},detach:function(){}});function ae(Se){Se.START_TO_START=xo,Se.START_TO_END=ii,Se.END_TO_END=Pi,Se.END_TO_START=Ni,Se.NODE_BEFORE=ai,Se.NODE_AFTER=Gs,Se.NODE_BEFORE_AND_AFTER=ma,Se.NODE_INSIDE=et}function De(Se){ae(Se),ae(Se.prototype)}function Ke(Se,He){return function(){Sr(this);var Et=this.startContainer,Vt=this.startOffset,fn=this.commonAncestorContainer,sr=new Be(this,!0),It,an;Et!==fn&&(It=se(Et,fn,!0),an=nt(It),Et=an.node,Vt=an.offset),ft(sr,lo),sr.reset();var wn=Se(sr);return sr.detach(),He(this,Et,Vt,Et,Vt),wn}}function Bt(Se,He){function Et(It,an){return function(wn){Dt(wn,_t),Dt(ce(wn),en);var Jn=(It?at:nt)(wn);(an?Vt:fn)(this,Jn.node,Jn.offset)}}function Vt(It,an,wn){var Jn=It.endContainer,Ko=It.endOffset;(an!==It.startContainer||wn!==It.startOffset)&&((ce(an)!=ce(Jn)||Ee(an,wn,Jn,Ko)==1)&&(Jn=an,Ko=wn),He(It,an,wn,Jn,Ko))}function fn(It,an,wn){var Jn=It.startContainer,Ko=It.startOffset;(an!==It.endContainer||wn!==It.endOffset)&&((ce(an)!=ce(Jn)||Ee(an,wn,Jn,Ko)==-1)&&(Jn=an,Ko=wn),He(It,Jn,Ko,an,wn))}var sr=function(){};sr.prototype=K.rangePrototype,Se.prototype=new sr,Ne.extend(Se.prototype,{setStart:function(It,an){$t(It,!0),Vn(It,an),Vt(this,It,an)},setEnd:function(It,an){$t(It,!0),Vn(It,an),fn(this,It,an)},setStartAndEnd:function(){var It=arguments,an=It[0],wn=It[1],Jn=an,Ko=wn;switch(It.length){case 3:Ko=It[2];break;case 4:Jn=It[2],Ko=It[3];break}$t(an,!0),Vn(an,wn),$t(Jn,!0),Vn(Jn,Ko),He(this,an,wn,Jn,Ko)},setBoundary:function(It,an,wn){this["set"+(wn?"Start":"End")](It,an)},setStartBefore:Et(!0,!0),setStartAfter:Et(!1,!0),setEndBefore:Et(!0,!1),setEndAfter:Et(!1,!1),collapse:function(It){Sr(this),It?He(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):He(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(It){$t(It,!0),He(this,It,0,It,X(It))},selectNode:function(It){$t(It,!1),Dt(It,_t);var an=at(It),wn=nt(It);He(this,an.node,an.offset,wn.node,wn.offset)},extractContents:Ke(Pe,He),deleteContents:Ke(Mt,He),canSurroundContents:function(){Sr(this),lo(this.startContainer),lo(this.endContainer);var It=new Be(this,!0),an=It._first&&Te(It._first,this)||It._last&&Te(It._last,this);return It.detach(),!an},splitBoundaries:function(){Lt(this)},splitBoundariesPreservingPositions:function(It){Lt(this,It)},normalizeBoundaries:function(){Sr(this);var It=this.startContainer,an=this.startOffset,wn=this.endContainer,Jn=this.endOffset,Ko=function(qi){var ms=qi.nextSibling;ms&&ms.nodeType==qi.nodeType&&(wn=qi,Jn=qi.length,qi.appendData(ms.data),ye(ms))},$m=function(qi){var ms=qi.previousSibling;if(ms&&ms.nodeType==qi.nodeType){It=qi;var Dm=qi.length;if(an=ms.length,qi.insertData(0,ms.data),ye(ms),It==wn)Jn+=an,wn=It;else if(wn==qi.parentNode){var jp=ve(qi);Jn==jp?(wn=qi,Jn=Dm):Jn>jp&&Jn--}}},Rm=!0,ya;if(G(wn))Jn==wn.length?Ko(wn):Jn==0&&(ya=wn.previousSibling,ya&&ya.nodeType==wn.nodeType&&(Jn=ya.length,It==wn&&(Rm=!1),ya.appendData(wn.data),ye(wn),wn=ya));else{if(Jn>0){var zp=wn.childNodes[Jn-1];zp&&G(zp)&&Ko(zp)}Rm=!this.collapsed}if(Rm){if(G(It))an==0?$m(It):an==It.length&&(ya=It.nextSibling,ya&&ya.nodeType==It.nodeType&&(wn==ya&&(wn=It,Jn+=It.length),It.appendData(ya.data),ye(ya)));else if(an1,Bt=[],hn=nt(ae),Xn=0;Xn=36)en=!1;else{var Vt=He.cloneRange();He.setStart(Se,0),Vt.setEnd(Se,3),Vt.setStart(Se,2),ae.addRange(He),ae.addRange(Vt),en=ae.rangeCount==2}}for($e.removeNode(Jr),ae.removeAllRanges(),Xn=0;Xn1)Br(this,ae);else{this.removeAllRanges();for(var De=0,Ke=ae.length;De1?Br(this,ae):De&&this.addRange(ae[0])};else return ne.fail("No means of selecting a Range or TextRange was found"),!1;Ft.getRangeAt=function(ae){if(ae<0||ae>=this.rangeCount)throw new Ie("INDEX_SIZE_ERR");return this._ranges[ae].cloneRange()};var ii;if(Je)ii=function(ae){var De;K.isSelectionValid(ae.win)?De=ae.docSelection.createRange():(De=Ae(ae.win.document).createTextRange(),De.collapse(!0)),ae.docSelection.type==oe?So(ae):no(De)?lo(ae,De):vt(ae)};else if(G(ft,"getRangeAt")&&typeof ft.rangeCount==Ne)ii=function(ae){if(dr&&ht&&ae.docSelection.type==oe)So(ae);else if(ae._ranges.length=ae.rangeCount=ae.nativeSelection.rangeCount,ae.rangeCount){for(var De=0,Ke=ae.rangeCount;De($e.isCharacterDataNode(ae)?ae.length:ae.childNodes.length))throw new Ie("INDEX_SIZE_ERR")}Ft.collapse=function(ae,De){ai(this,ae);var Ke=K.createRange(ae);Ke.collapseToPoint(ae,De),this.setSingleRange(Ke),this.isCollapsed=!0},Ft.collapseToStart=function(){if(this.rangeCount){var ae=this._ranges[0];this.collapse(ae.startContainer,ae.startOffset)}else throw new Ie("INVALID_STATE_ERR")},Ft.collapseToEnd=function(){if(this.rangeCount){var ae=this._ranges[this.rangeCount-1];this.collapse(ae.endContainer,ae.endOffset)}else throw new Ie("INVALID_STATE_ERR")},Ft.selectAllChildren=function(ae){ai(this,ae);var De=K.createRange(ae);De.selectNodeContents(ae),this.setSingleRange(De)},Be?Ft.setBaseAndExtent=function(ae,De,Ke,Bt){this.nativeSelection.setBaseAndExtent(ae,De,Ke,Bt),this.refresh()}:pe&&(Ft.setBaseAndExtent=function(ae,De,Ke,Bt){Gs(ae,De),Gs(Ke,Bt),ai(this,ae),ai(this,Ke);var hn=K.createRange(node),Xn=$e.comparePoints(ae,De,Ke,Bt)==-1;Xn?hn.setStartAndEnd(Ke,Bt,ae,De):hn.setStartAndEnd(ae,De,Ke,Bt),this.setSingleRange(hn,Xn)}),Ft.deleteFromDocument=function(){if(dr&&ht&&this.docSelection.type==oe){for(var ae=this.docSelection.createRange(),De;ae.length;)De=ae.item(0),ae.remove(De),$e.removeNode(De);this.refresh()}else if(this.rangeCount){var Ke=this.getAllRanges();if(Ke.length){this.removeAllRanges();for(var Bt=0,hn=Ke.length;Bt0)return K.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw ne.createError("getNativeTextRange: selection contains no range")}});function et(ae){var De=[],Ke=new Ee(ae.anchorNode,ae.anchorOffset),Bt=new Ee(ae.focusNode,ae.focusOffset),hn=typeof ae.getName=="function"?ae.getName():"Selection";if(typeof ae.rangeCount!="undefined")for(var Xn=0,Jr=ae.rangeCount;Xnye&&++at,Te==oe&&(Me==ce||Me==ce+1)&&(Fe=Ae,at+=ye-ce),Te==oe&&Me>ce+1&&--at,X.node=Fe,X.offset=at}function M(X,oe,ce){X.node==oe&&X.offset>ce&&--X.offset}function k(X,oe,ce,Ae){ce==-1&&(ce=oe.childNodes.length);var ye=X.parentNode,Te=i.getNodeIndex(X);u(Ae,function(Me){T(Me,ye,Te,oe,ce)}),oe.childNodes.length==ce?oe.appendChild(X):oe.insertBefore(X,oe.childNodes[ce])}function P(X,oe){var ce=X.parentNode,Ae=i.getNodeIndex(X);u(oe,function(ye){M(ye,ce,Ae)}),i.removeNode(X)}function R(X,oe,ce,Ae,ye){for(var Te,Me=[];Te=X.firstChild;)k(Te,oe,ce++,ye),Me.push(Te);return Ae&&P(X,ye),Me}function D(X,oe){return R(X,X.parentNode,i.getNodeIndex(X),!0,oe)}function F(X,oe){var ce=X.cloneRange();ce.selectNodeContents(oe);var Ae=ce.intersection(X),ye=Ae?Ae.toString():"";return ye!=""}function W(X){for(var oe=X.getNodes([3]),ce=0,Ae;(Ae=oe[ce])&&!F(X,Ae);)++ce;for(var ye=oe.length-1;(Ae=oe[ye])&&!F(X,Ae);)--ye;return oe.slice(ce,ye+1)}function I(X,oe){if(X.attributes.length!=oe.attributes.length)return!1;for(var ce=0,Ae=X.attributes.length,ye,Te,Me;ce0&&oe1){var Ae=i.getNodeIndex(ce),ye=[],Te=0,Me;u(oe,function(Fe,at){Me=Fe.parentNode,at>0&&(Me.removeChild(Fe),Me.hasChildNodes()||i.removeNode(Me),X&&u(X,function(nt){nt.node==Fe&&(nt.node=ce,nt.offset+=Te),nt.node==Me&&nt.offset>Ae&&(--nt.offset,nt.offset==Ae+1&&atColor",aria:"Color Picker",action:"colorPicker",init:function(){var t=this;QF.init(),XS.extensions.button.prototype.init.call(this),this.colorPicker=new MG({parent:this.button,color:"#000",onDone:function(e){t.coloredText&&t.coloredText.isAppliedToSelection()&&t.coloredText.undoToSelection(),t.coloredText=QF.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:e.hex}},normalize:!0}),t.coloredText.toggleSelection(),t.base.checkContentChanged(),t.setInactive()}})},getButton:function(){return this.button},handleClick:function(){this.setActive(),this.colorPicker.show()},isAlreadyApplied:function(t){return t.nodeName.toLowerCase()==="mark"},isActive:function(){return this.button.classList.contains("medium-editor-button-active")},setInactive:function(){this.button.classList.remove("medium-editor-button-active")},setActive:function(){this.button.classList.add("medium-editor-button-active")}}),NXe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),MXe=globalThis&&globalThis.__decorate||function(t,e,n,r){var o=arguments.length,i=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,n,i):a(e,n))||i);return o>3&&i&&Object.defineProperty(e,n,i),i},YF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},XF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new XS(".lf-label-editor",nd(HF,{autoLink:!0,extensions:{colorPicker:new UF}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,o=r.lf.extension,i=r.graphModel,a=XF(XF([],YF(i.nodes),!1),YF(i.edges),!1),s=o.label;if(s){var l=[];return zn(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];zn(h,function(g){var v=n.labelMap,m=new SXe(g,u,i);v.set(m.id,m),l.push(ot(OXe,{label:m,element:u,graphModel:i},m.id))})}),l}return null},e.prototype.render=function(){return ot("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=MXe([Ra],e),e})(vr);var ZF=globalThis&&globalThis.__assign||function(){return ZF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},RXe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]-1&&(e.removeChild(e.childNodes[o]),r--,o--)}},t.prototype.removeRotateControl=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,o=0;o-1&&(e.removeChild(e.childNodes[o]),r--,o--)}},t.prototype.convertImageToBase64=function(e){return Sa(this,void 0,void 0,function(){return xa(this,function(n){return[2,new Promise(function(r,o){var i=new Image;i.crossOrigin="anonymous",i.onload=function(){var a=document.createElement("canvas");a.width=i.width,a.height=i.height;var s=a.getContext("2d");s==null||s.drawImage(i,0,0);var l=a.toDataURL("image/png");r(l)},i.onerror=function(){o(new Error("Failed to load image: ".concat(e)))},i.src=e})]})})},t.prototype.isRelativePath=function(e){return!e.startsWith("data:")&&!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("//")},t.prototype.processImages=function(e){return Sa(this,void 0,void 0,function(){var n,a,c,r,f,o,i,a,s,l,u,c,d,f,h;return xa(this,function(g){switch(g.label){case 0:n=e.getElementsByTagName("image"),a=0,g.label=1;case 1:if(!(aI&&H>Q?(re=I/L,U=Q/H):L>Q&&H>I?(re=Q/L,U=I/H):L>I&&HI&&(U=re=I/H),(re<1||U<1)&&(L=Math.floor(L*re),H=Math.floor(H*U)),l.lastChild.style.transform="matrix(".concat(re,", 0, 0, ").concat(U,", ").concat((-g+S)*(1/w)*re+s/u,", ").concat((-v+x)*(1/O)*U+s/u,")"),P.width=L,P.height=H,J=P.getContext("2d"),J&&(J.clearRect(0,0,P.width,P.height),J.scale(u*re,u*U),i?(J.fillStyle=i,J.fillRect(0,0,P.width,P.height)):J.clearRect(0,0,P.width,P.height)),ie=new Image,te=document.createElement("style"),te.innerHTML=this.getClassRules(),he=document.createElement("foreignObject"),he.appendChild(te),l.appendChild(he),[2,new Promise(function(ne){ie.onload=function(){var $e=navigator.userAgent.indexOf("Firefox")>-1;try{$e?createImageBitmap(ie,{resizeWidth:r&&o?cy(P,r,o).width:P.width,resizeHeight:r&&o?cy(P,r,o).height:P.height}).then(function(ue){J==null||J.drawImage(ue,0,0),ne(r&&o?cy(P,r,o):P)}):(J==null||J.drawImage(ie,0,0),ne(r&&o?cy(P,r,o):P))}catch{J==null||J.drawImage(ie,0,0),ne(r&&o?cy(P,r,o):P)}};var fe="data:image/svg+xml;charset=utf-8,".concat(new XMLSerializer().serializeToString(l)),Ne=fe.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");ie.src=Ne})]}})})},t.prototype.withExportPreparation=function(e,n){return Sa(this,void 0,void 0,function(){var r,o,i,a,s,l=this;return xa(this,function(u){switch(u.label){case 0:r=this.lf.graphModel.getPartial(),o=(n!=null?n:{}).partial,i=o===void 0?r:o,a=this.lf.getEditConfig(),this.lf.updateEditConfig({isSilentMode:!0,stopScrollGraph:!0,stopMoveGraph:!0}),u.label=1;case 1:return u.trys.push([1,,6,7]),r===i?[3,3]:(this.lf.graphModel.setPartial(i),[4,new Promise(function(c){l.lf.graphModel.eventCenter.once("graph:updated",function(){return Sa(l,void 0,void 0,function(){var d;return xa(this,function(f){switch(f.label){case 0:return[4,e()];case 1:return d=f.sent(),this.lf.graphModel.setPartial(r),c(d),[2]}})})})})]);case 2:return s=u.sent(),[3,5];case 3:return[4,e()];case 4:s=u.sent(),u.label=5;case 5:return[3,7];case 6:return this.lf.updateEditConfig(a),[7];case 7:return[2,s]}})})},t.prototype.getSnapshot=function(e,n){return Sa(this,void 0,void 0,function(){var r=this;return xa(this,function(o){switch(o.label){case 0:return[4,this.withExportPreparation(function(){return r.snapshot(e,n)},n)];case 1:return o.sent(),[2]}})})},t.prototype.snapshot=function(e,n){return Sa(this,void 0,void 0,function(){var r,o,i,a,s,l,u,c,d,f=this;return xa(this,function(h){switch(h.label){case 0:return r=n!=null?n:{},o=r.fileType,i=o===void 0?"png":o,a=r.quality,this.fileName="".concat(e!=null?e:"logic-flow.".concat(Date.now()),".").concat(i),s=this.getSvgRootElement(this.lf),[4,B2(s)];case 1:return h.sent(),i!=="svg"?[3,3]:[4,this.cloneSvg(s)];case 2:return l=h.sent(),u=new XMLSerializer().serializeToString(l),c=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(c),this.triggerDownload(d),[3,4];case 3:this.getCanvasData(s,n!=null?n:{}).then(function(g){var v=g.toDataURL("image/".concat(i),a).replace("image/".concat(i),"image/octet-stream");f.triggerDownload(v)}),h.label=4;case 4:return[2]}})})},t.prototype.getSnapshotBlob=function(e,n,r){return Sa(this,void 0,void 0,function(){var o=this;return xa(this,function(i){switch(i.label){case 0:return[4,this.withExportPreparation(function(){return o.snapshotBlob(r,n,e)},r)];case 1:return[2,i.sent()]}})})},t.prototype.snapshotBlob=function(e,n,r){return Sa(this,void 0,void 0,function(){var o,i,a,s=this;return xa(this,function(l){switch(l.label){case 0:return o=(e!=null?e:{}).fileType,i=o===void 0?n:o,a=this.getSvgRootElement(this.lf),[4,B2(a)];case 1:return l.sent(),[2,new Promise(function(u){s.getCanvasData(a,ZS({backgroundColor:r},e!=null?e:{})).then(function(c){c.toBlob(function(d){u({data:d,width:c.width,height:c.height})},"image/".concat(i!=null?i:"png"))})})]}})})},t.prototype.getSnapshotBase64=function(e,n,r){return Sa(this,void 0,void 0,function(){var o=this;return xa(this,function(i){switch(i.label){case 0:return console.log("getSnapshotBase64---------------",e,n,r),[4,this.withExportPreparation(function(){return o._getSnapshotBase64(e,n,r)},r)];case 1:return[2,i.sent()]}})})},t.prototype._getSnapshotBase64=function(e,n,r){return Sa(this,void 0,void 0,function(){var o,i,a,s=this;return xa(this,function(l){switch(l.label){case 0:return o=(r!=null?r:{}).fileType,i=o===void 0?n:o,a=this.getSvgRootElement(this.lf),[4,B2(a)];case 1:return l.sent(),[2,new Promise(function(u){s.getCanvasData(a,ZS({backgroundColor:e},r!=null?r:{})).then(function(c){var d=c.toDataURL("image/".concat(i!=null?i:"png"));u({data:d,width:c.width,height:c.height})})})]}})})},t.pluginName="snapshot",t}();globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var KF=globalThis&&globalThis.__assign||function(){return KF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},QXe=function(){function t(e){var n=e.lf,r=e.LogicFlow,o=e.options,i=this;this.width=200,this.height=150,this.scale=1,this.translateX=0,this.translateY=0,this.showEdge=!1,this.viewPortTop=0,this.viewPortLeft=0,this.viewPortWidth=150,this.viewPortHeight=75,this.isShow=!1,this.isShowHeader=!1,this.isShowCloseIcon=!1,this.headerTitle="\u5BFC\u822A",this.disabledPlugins=["miniMap","control","selectionSelect"],this.onGraphResize=function(){i.updateViewPortBounds(),i.isShow&&i.updateViewPort()},this.render=function(s,l){i.container=l,i.lf.on("history:change",function(){i.isShow&&i.setView()}),i.lf.on("graph:transform",function(){i.isShow&&i.setView(!1)})},this.show=function(s,l){i.isShow||(i.createMiniMap(s,l),i.setView()),i.isShow=!0},this.hide=function(){i.isShow&&(i.removeMiniMap(),i.lf.emit("miniMap:close",{})),i.isShow=!1},this.updatePosition=function(s){if(typeof s=="object")(s.left!==void 0||s.right!==void 0)&&(i.leftPosition=s.left,i.rightPosition=s.right),(s.top!==void 0||s.bottom!==void 0)&&(i.topPosition=s.top,i.bottomPosition=s.bottom);else switch(s){case"left-top":i.leftPosition=0,i.rightPosition=void 0,i.topPosition=0,i.bottomPosition=void 0;break;case"right-top":i.leftPosition=void 0,i.rightPosition=0,i.topPosition=0,i.bottomPosition=void 0;break;case"left-bottom":i.leftPosition=0,i.rightPosition=void 0,i.topPosition=void 0,i.bottomPosition=0;break;case"right-bottom":i.leftPosition=void 0,i.rightPosition=0,i.topPosition=void 0,i.bottomPosition=0;break}i.updateMiniMapPosition()},this.reset=function(){i.lf.resetTranslate(),i.lf.resetZoom()},this.setShowEdge=function(s){i.showEdge!==s&&(i.showEdge=s,i.setView())},this.startDrag=function(s){document.addEventListener("mousemove",i.drag),document.addEventListener("mouseup",i.drop);var l=s.x,u=s.y;i.startPosition={x:l,y:u}},this.drag=function(s){var l=s.x,u=s.y,c=(l-i.startPosition.x)/i.scale,d=(u-i.startPosition.y)/i.scale,f=i.viewPortLeft+c+i.viewPortWidth/i.scale/2,h=i.viewPortTop+d+i.viewPortHeight/i.scale/2;i.startPosition={x:l,y:u},i.lf.focusOn({coordinate:{x:f,y:h}})},this.drop=function(){document.removeEventListener("mousemove",i.drag),document.removeEventListener("mouseup",i.drop)},this.mapClick=function(s){var l=s.offsetX,u=s.offsetY,c=i.translateX+l/i.scale,d=i.translateY+u/i.scale;i.lf.focusOn({coordinate:{x:c,y:d}})},this.lf=n,this.LFCtor=r,o&&this.setOption(o),this.viewPortWidth=n.graphModel.width,this.viewPortHeight=n.graphModel.height;var a={left:0,right:this.viewPortWidth,top:0,bottom:this.viewPortHeight};this.bounds=a,this.elementAreaBounds=a,this.viewPortBounds=a,this.initMiniMap(),n.on("graph:resize",this.onGraphResize)}return t.prototype.setOption=function(e){var n=e.width,r=n===void 0?150:n,o=e.height,i=o===void 0?220:o,a=e.showEdge,s=a===void 0?!1:a,l=e.isShowHeader,u=l===void 0?!1:l,c=e.isShowCloseIcon,d=c===void 0?!1:c,f=e.leftPosition,h=e.topPosition,g=e.rightPosition,v=g===void 0?0:g,m=e.bottomPosition,b=m===void 0?0:m,w=e.headerTitle,O=w===void 0?"\u5BFC\u822A":w;this.width=r,this.height=i,this.showEdge=s,this.isShowHeader=u,this.isShowCloseIcon=d,this.leftPosition=f,this.rightPosition=f!==void 0?void 0:v,this.topPosition=h,this.bottomPosition=h!==void 0?void 0:b,this.headerTitle=O},t.prototype.initMiniMap=function(){var e=document.createElement("div");e.className="lf-mini-map-graph",e.style.width="".concat(this.width,"px"),e.style.height="".concat(this.height,"px"),this.lfMap=new this.LFCtor({container:e,grid:!1,isSilentMode:!0,stopZoomGraph:!0,stopScrollGraph:!0,stopMoveGraph:!1,history:!1,snapline:!1,disabledPlugins:this.disabledPlugins}),zXe(e,this.lfMap.graphModel.flowId),this.miniMapWrap=e,this.createViewPort(),e.addEventListener("click",this.mapClick)},t.prototype.createMiniMap=function(e,n){var r,o=document.createElement("div");this.miniMapContainer=o,o.appendChild(this.miniMapWrap),o.style.position="absolute",(e!==void 0||n!==void 0)&&(this.leftPosition=e||0,this.topPosition=n||0,this.rightPosition=void 0,this.bottomPosition=void 0),this.updateMiniMapPosition(),o.className="lf-mini-map",this.isShowCloseIcon||o.classList.add("lf-mini-map-no-close-icon"),this.isShowHeader||o.classList.add("lf-mini-map-no-header"),(r=this.container)===null||r===void 0||r.appendChild(o),this.miniMapWrap.appendChild(this.viewport);var i=document.createElement("div");i.className="lf-mini-map-header",i.innerText=this.headerTitle,o.appendChild(i);var a=document.createElement("span");a.className="lf-mini-map-close",a.addEventListener("click",this.hide),o.appendChild(a)},t.prototype.updateMiniMapPosition=function(){if(this.miniMapContainer){var e=this.miniMapContainer.style;this.rightPosition!==void 0?(e.right="".concat(this.rightPosition,"px"),e.left=""):(e.left="".concat(this.leftPosition,"px"),e.right=""),this.bottomPosition!==void 0?(e.bottom="".concat(this.bottomPosition,"px"),e.top=""):(e.top="".concat(this.topPosition,"px"),e.bottom="")}},t.prototype.removeMiniMap=function(){var e;this.miniMapContainer&&((e=this.container)===null||e===void 0||e.removeChild(this.miniMapContainer))},t.prototype.updateBounds=function(e){e&&this.updateElementAreaBounds(e),this.updateViewPortBounds(),this.bounds={left:Math.min(this.elementAreaBounds.left,this.viewPortBounds.left),right:Math.max(this.elementAreaBounds.right,this.viewPortBounds.right),top:Math.min(this.elementAreaBounds.top,this.viewPortBounds.top),bottom:Math.max(this.elementAreaBounds.bottom,this.viewPortBounds.bottom)}},t.prototype.updateElementAreaBounds=function(e){var n={left:0,right:0,top:0,bottom:0},r=e.nodes;r&&r.length>0&&r.forEach(function(o){var i,a,s=o.x,l=o.y,u=(i=o.width)!==null&&i!==void 0?i:200,c=(a=o.height)!==null&&a!==void 0?a:200,d=s-u/2,f=s+u/2,h=l-c/2,g=l+c/2;n.left=Math.min(d,n.left),n.right=Math.max(f,n.right),n.top=Math.min(h,n.top),n.bottom=Math.max(g,n.bottom)}),this.elementAreaBounds=n},t.prototype.updateViewPortBounds=function(){var e=this.lf.getTransform(),n=e.TRANSLATE_X,r=e.TRANSLATE_Y,o=e.SCALE_X,i=e.SCALE_Y,a=this.lf.graphModel,s=a.width,l=a.height;this.viewPortBounds={left:-n/o,right:(-n+s)/o,top:-r/i,bottom:(-r+l)/i}},t.prototype.resetData=function(e){var n=e.nodes,r=e.edges;return n.forEach(function(o){o.text=void 0}),this.showEdge&&r.forEach(function(o){o.text=void 0}),{nodes:n,edges:this.showEdge?r:[]}},t.prototype.setView=function(e){var n,r;if(e===void 0&&(e=!0),e){var o=this.lf.getGraphRawData(),i=this.resetData(o),a=this.lf.viewMap,s=this.lf.graphModel.modelMap,l=this.lfMap.viewMap;try{for(var u=WXe(a.keys()),c=u.next();!c.done;c=u.next()){var d=c.value;l.has(d)||this.lfMap.register({type:d,view:a.get(d),model:s.get(d)})}}catch(M){n={error:M}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.lfMap.render(i),this.updateBounds(i)}else this.updateBounds();var f=this.bounds,h=f.left,g=f.top,v=f.right,m=f.bottom,b=v-h,w=m-g,O=this.width/b,S=this.height/w,x=Math.min(O,S);this.scale=x;var C=h-(this.width/x-b)/2,E=g-(this.height/x-w)/2;if(this.lfMap.graphModel.transformModel.translate(-C+this.translateX,-E+this.translateY),this.translateX=C,this.translateY=E,this.miniMapWrap.firstChild){var T=this.miniMapWrap.firstChild.style;T.pointerEvents="none",T.transform="matrix(".concat(x,", 0, 0, ").concat(x,", 0, 0)"),T.transformOrigin="left top",T.height="".concat(this.height/x,"px"),T.width="".concat(this.width/x,"px"),this.updateViewPort()}},t.prototype.updateViewPort=function(){var e=this.viewport.style,n=this.lf.getTransform(),r=n.TRANSLATE_X,o=n.TRANSLATE_Y,i=n.SCALE_X,a=n.SCALE_Y,s=this.lf.graphModel,l=s.width,u=s.height;this.viewPortLeft=-r/i,this.viewPortTop=-o/a,this.viewPortWidth=l/i*this.scale,this.viewPortHeight=u/a*this.scale,e.width="".concat(this.viewPortWidth,"px"),e.height="".concat(this.viewPortHeight,"px"),e.left="".concat((this.viewPortLeft-this.translateX)*this.scale,"px"),e.top="".concat((this.viewPortTop-this.translateY)*this.scale,"px")},t.prototype.createViewPort=function(){var e=document.createElement("div");e.className="lf-minimap-viewport",e.addEventListener("mousedown",this.startDrag),e.addEventListener("click",function(n){n.stopPropagation()}),this.viewport=e},t.prototype.destroy=function(){this.lf.off("graph:resize",this.onGraphResize)},t.pluginName="miniMap",t}(),nV=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],a;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},rV=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r0&&o.lf.emit("selection:drop",{e:a}),o.lf.emit("selection:selected",{elements:C,leftTopPoint:m,rightBottomPoint:b})}o.wrapper&&(o.wrapper.oncontextmenu=null,o.container&&o.wrapper.parentNode===o.container&&o.container.removeChild(o.wrapper),o.wrapper=void 0)},this.lf=n,this.exclusiveMode=(i=r==null?void 0:r.exclusiveMode)!==null&&i!==void 0?i:!1,n.openSelectionSelect=function(){o.openSelectionSelect()},n.closeSelectionSelect=function(){o.closeSelectionSelect()},n.setSelectionSelectMode=function(a){o.setExclusiveMode(a)},this.handleMouseDown=this.handleMouseDown.bind(this),this.draw=this.draw.bind(this),this.drawOff=this.drawOff.bind(this)}return t.prototype.render=function(e,n){this.container=n},t.prototype.cleanupSelectionState=function(){this.wrapper&&(this.wrapper.oncontextmenu=null,this.container&&this.wrapper.parentNode===this.container&&this.container.removeChild(this.wrapper),this.wrapper=void 0),this.startPoint=void 0,this.endPoint=void 0,this.mouseDownInfo=null,document.removeEventListener("mousemove",this.draw),document.removeEventListener("mouseup",this.drawOff)},t.prototype.setExclusiveMode=function(e){e===void 0&&(e=!1),this.exclusiveMode!==e&&(this.cleanupSelectionState(),this.exclusiveMode=e,this.container&&!this.disabled&&(this.removeEventListeners(),this.addEventListeners()))},t.prototype.addEventListeners=function(){!this.container||(this.exclusiveMode?(this.container.style.pointerEvents="auto",this.container.addEventListener("mousedown",this.handleMouseDown)):(this.container.style.pointerEvents="none",this.lf.on("blank:mousedown",this.handleBlankMouseDown)))},t.prototype.removeEventListeners=function(){this.container&&(this.container.style.pointerEvents="none",this.container.removeEventListener("mousedown",this.handleMouseDown)),this.lf.off("blank:mousedown",this.handleBlankMouseDown)},t.prototype.handleMouseDown=function(e){var n;if(!(!this.container||this.disabled)){var r=e.button===2;if(!r){this.cleanupSelectionState(),this.mouseDownInfo={x:e.clientX,y:e.clientY,time:Date.now()},this.originalStopMoveGraph=this.lf.getEditConfig().stopMoveGraph,this.lf.updateEditConfig({stopMoveGraph:!0});var o=this.lf.getPointByClient(e.clientX,e.clientY).domOverlayPosition,i=o.x,a=o.y;this.startPoint={x:i,y:a},this.endPoint={x:i,y:a};var s=document.createElement("div");s.className="lf-selection-select",s.oncontextmenu=function(u){u.preventDefault()},s.style.top="".concat(this.startPoint.y,"px"),s.style.left="".concat(this.startPoint.x,"px"),(n=this.container)===null||n===void 0||n.appendChild(s),this.wrapper=s,document.addEventListener("mousemove",this.draw),document.addEventListener("mouseup",this.drawOff)}}},t.prototype.setSelectionSense=function(e,n){e===void 0&&(e=!0),n===void 0&&(n=!0),this.isWholeEdge=e,this.isWholeNode=n},t.prototype.openSelectionSelect=function(){this.disabled||this.closeSelectionSelect(),this.container&&(this.cleanupSelectionState(),this.addEventListeners(),this.open())},t.prototype.closeSelectionSelect=function(){if(!!this.container){if(this.wrapper&&this.startPoint&&this.endPoint){var e=bn(this.endPoint),n=new MouseEvent("mouseup",{clientX:e.x,clientY:e.y});this.drawOff(n)}this.cleanupSelectionState(),this.removeEventListeners(),this.close()}},t.prototype.open=function(){this.disabled=!1},t.prototype.close=function(){this.disabled=!0},t.pluginName="selectionSelect",t}(),oV=globalThis&&globalThis.__assign||function(){return oV=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},UXe={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function YXe(t){for(var e=t,n=1;ne[1]?"t":"b":t[1]===e[1]&&(i=t[0]>e[0]?"l":"r"),e[0]===n[0]?a=e[1]>n[1]?"t":"b":e[1]===n[1]&&(a=e[0]>n[0]?"l":"r");var s=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,l="".concat(i).concat(a),u=UXe[l]||"-",c="L ".concat(t[0]," ").concat(t[1]);if(u==="-")c+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var d=u0(XXe(e,l,u,s),2),f=d[0],h=d[1];f&&h&&(c+="L ".concat(f[0]," ").concat(f[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(h[0]," ").concat(h[1]),o=u0(h,2),e[0]=o[0],e[1]=o[1])}return c}function GXe(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+10)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},aV=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r1&&setTimeout(function(){var o;n.updatePointsByNodes(((o=n.properties)===null||o===void 0?void 0:o.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,o=n.y;this.x=r,this.y=o},e.prototype.updatePointsByNodes=function(n){var r=this,o=[],i=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(!!c){var d=c.width,f=c.height,h=c.x,g=c.y;i=Math.min(i,h-d/2-r.d),a=Math.min(a,g-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,g+f/2+r.d)}}),o.push([i,a],[s,a],[s,l],[i,l]),![i,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(o),this.updateCoordinate({x:(s+i)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var o=n.width,i=n.height,a={x:o/this.width,y:i/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(!!d){if(!aw(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,aV([],iV(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),g={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(v){v.width=v.width*a.x,v.height=v.height*a.y;var m=(v.x-f.x)*a.x+g.x-v.x,b=(v.y-f.y)*a.y+g.y-v.y;v.move(m,b,!0)}),this.isResize=!1,h},e}(CS),zP="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:zP,view:qXe,model:KXe})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();!n||(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),o=n.filter(function(i){return i!==e.currentClickNode.id});return r.nodes.find(function(i){if(i.type==="node-selection"){var a=Vr(i,"properties.node_selection_ids",[]);return o.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(o){if(!aw(o))return!1;var i=o.properties.node_selection_ids||[];return i.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(o){o.updatePointsByNodes(o.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var o;if(!(!r.e.shiftKey||r.data.type===zP)){n.currentClickNode=r.data;var i=!1;n.selectNodesIds.includes(r.data.id)&&((o=n.lf.getNodeModelById(r.data.id))===null||o===void 0||o.setSelected(!1),i=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?i?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,o,i){if(n.onNodeChange(e,r),aw(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,o,i,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return aw(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var aw=function(t){return!!(t&&t.type===zP)},JXe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JS=globalThis&&globalThis.__assign||function(){return JS=Object.assign||function(t){for(var e,n=1,r=arguments.length;ne=>{const n=eZe.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Eu=t=>(t=t.toLowerCase(),e=>KC(e)===t),JC=t=>e=>typeof e===t,{isArray:Cm}=Array,db=JC("undefined");function tZe(t){return t!==null&&!db(t)&&t.constructor!==null&&!db(t.constructor)&&js(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const BG=Eu("ArrayBuffer");function nZe(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&BG(t.buffer),e}const rZe=JC("string"),js=JC("function"),FG=JC("number"),eE=t=>t!==null&&typeof t=="object",oZe=t=>t===!0||t===!1,sw=t=>{if(KC(t)!=="object")return!1;const e=CD(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},iZe=Eu("Date"),aZe=Eu("File"),sZe=Eu("Blob"),lZe=Eu("FileList"),uZe=t=>eE(t)&&js(t.pipe),cZe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||js(t.append)&&((e=KC(t))==="formdata"||e==="object"&&js(t.toString)&&t.toString()==="[object FormData]"))},dZe=Eu("URLSearchParams"),[fZe,hZe,pZe,gZe]=["ReadableStream","Request","Response","Headers"].map(Eu),vZe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function f_(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,o;if(typeof t!="object"&&(t=[t]),Cm(t))for(r=0,o=t.length;r0;)if(o=n[r],e===o.toLowerCase())return o;return null}const Gh=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),zG=t=>!db(t)&&t!==Gh;function jP(){const{caseless:t}=zG(this)&&this||{},e={},n=(r,o)=>{const i=t&&VG(e,o)||o;sw(e[i])&&sw(r)?e[i]=jP(e[i],r):sw(r)?e[i]=jP({},r):Cm(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r(f_(e,(o,i)=>{n&&js(o)?t[i]=LG(o,n):t[i]=o},{allOwnKeys:r}),t),yZe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),bZe=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},_Ze=(t,e,n,r)=>{let o,i,a;const s={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&CD(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},OZe=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},wZe=t=>{if(!t)return null;if(Cm(t))return t;let e=t.length;if(!FG(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},SZe=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&CD(Uint8Array)),xZe=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},CZe=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},EZe=Eu("HTMLFormElement"),TZe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),sV=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),kZe=Eu("RegExp"),jG=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};f_(n,(o,i)=>{let a;(a=e(o,i,t))!==!1&&(r[i]=a||o)}),Object.defineProperties(t,r)},AZe=t=>{jG(t,(e,n)=>{if(js(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!js(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},PZe=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Cm(t)?r(t):r(String(t).split(e)),n},NZe=()=>{},MZe=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,F2="abcdefghijklmnopqrstuvwxyz",lV="0123456789",WG={DIGIT:lV,ALPHA:F2,ALPHA_DIGIT:F2+F2.toUpperCase()+lV},$Ze=(t=16,e=WG.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function RZe(t){return!!(t&&js(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const DZe=t=>{const e=new Array(10),n=(r,o)=>{if(eE(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=Cm(r)?[]:{};return f_(r,(a,s)=>{const l=n(a,o+1);!db(l)&&(i[s]=l)}),e[o]=void 0,i}}return r};return n(t,0)},IZe=Eu("AsyncFunction"),LZe=t=>t&&(eE(t)||js(t))&&js(t.then)&&js(t.catch),QG=((t,e)=>t?setImmediate:e?((n,r)=>(Gh.addEventListener("message",({source:o,data:i})=>{o===Gh&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Gh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",js(Gh.postMessage)),BZe=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Gh):typeof process!="undefined"&&process.nextTick||QG;var pt={isArray:Cm,isArrayBuffer:BG,isBuffer:tZe,isFormData:cZe,isArrayBufferView:nZe,isString:rZe,isNumber:FG,isBoolean:oZe,isObject:eE,isPlainObject:sw,isReadableStream:fZe,isRequest:hZe,isResponse:pZe,isHeaders:gZe,isUndefined:db,isDate:iZe,isFile:aZe,isBlob:sZe,isRegExp:kZe,isFunction:js,isStream:uZe,isURLSearchParams:dZe,isTypedArray:SZe,isFileList:lZe,forEach:f_,merge:jP,extend:mZe,trim:vZe,stripBOM:yZe,inherits:bZe,toFlatObject:_Ze,kindOf:KC,kindOfTest:Eu,endsWith:OZe,toArray:wZe,forEachEntry:xZe,matchAll:CZe,isHTMLForm:EZe,hasOwnProperty:sV,hasOwnProp:sV,reduceDescriptors:jG,freezeMethods:AZe,toObjectSet:PZe,toCamelCase:TZe,noop:NZe,toFiniteNumber:MZe,findKey:VG,global:Gh,isContextDefined:zG,ALPHABET:WG,generateString:$Ze,isSpecCompliantForm:RZe,toJSONObject:DZe,isAsyncFn:IZe,isThenable:LZe,setImmediate:QG,asap:BZe};function tr(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}pt.inherits(tr,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:pt.toJSONObject(this.config),code:this.code,status:this.status}}});const HG=tr.prototype,UG={};["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(t=>{UG[t]={value:t}});Object.defineProperties(tr,UG);Object.defineProperty(HG,"isAxiosError",{value:!0});tr.from=(t,e,n,r,o,i)=>{const a=Object.create(HG);return pt.toFlatObject(t,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),tr.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};var FZe=null;function WP(t){return pt.isPlainObject(t)||pt.isArray(t)}function YG(t){return pt.endsWith(t,"[]")?t.slice(0,-2):t}function uV(t,e,n){return t?t.concat(e).map(function(o,i){return o=YG(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function VZe(t){return pt.isArray(t)&&!t.some(WP)}const zZe=pt.toFlatObject(pt,{},null,function(e){return/^is[A-Z]/.test(e)});function tE(t,e,n){if(!pt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=pt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!pt.isUndefined(m[v])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&pt.isSpecCompliantForm(e);if(!pt.isFunction(o))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(pt.isDate(g))return g.toISOString();if(!l&&pt.isBlob(g))throw new tr("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(g)||pt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,v,m){let b=g;if(g&&!m&&typeof g=="object"){if(pt.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(pt.isArray(g)&&VZe(g)||(pt.isFileList(g)||pt.endsWith(v,"[]"))&&(b=pt.toArray(g)))return v=YG(v),b.forEach(function(O,S){!(pt.isUndefined(O)||O===null)&&e.append(a===!0?uV([v],S,i):a===null?v:v+"[]",u(O))}),!1}return WP(g)?!0:(e.append(uV(m,v,i),u(g)),!1)}const d=[],f=Object.assign(zZe,{defaultVisitor:c,convertValue:u,isVisitable:WP});function h(g,v){if(!pt.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(g),pt.forEach(g,function(b,w){(!(pt.isUndefined(b)||b===null)&&o.call(e,b,pt.isString(w)?w.trim():w,v,f))===!0&&h(b,v?v.concat(w):[w])}),d.pop()}}if(!pt.isObject(t))throw new TypeError("data must be an object");return h(t),e}function cV(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function ED(t,e){this._pairs=[],t&&tE(t,this,e)}const XG=ED.prototype;XG.append=function(e,n){this._pairs.push([e,n])};XG.toString=function(e){const n=e?function(r){return e.call(this,r,cV)}:cV;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function jZe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ZG(t,e,n){if(!e)return t;const r=n&&n.encode||jZe;pt.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(e,n):i=pt.isURLSearchParams(e)?e.toString():new ED(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class WZe{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,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){pt.forEach(this.handlers,function(r){r!==null&&e(r)})}}var dV=WZe,GG={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QZe=typeof URLSearchParams!="undefined"?URLSearchParams:ED,HZe=typeof FormData!="undefined"?FormData:null,UZe=typeof Blob!="undefined"?Blob:null,YZe={isBrowser:!0,classes:{URLSearchParams:QZe,FormData:HZe,Blob:UZe},protocols:["http","https","file","blob","url","data"]};const TD=typeof window!="undefined"&&typeof document!="undefined",QP=typeof navigator=="object"&&navigator||void 0,XZe=TD&&(!QP||["ReactNative","NativeScript","NS"].indexOf(QP.product)<0),ZZe=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),GZe=TD&&window.location.href||"http://localhost";var qZe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:TD,hasStandardBrowserWebWorkerEnv:ZZe,hasStandardBrowserEnv:XZe,navigator:QP,origin:GZe},Symbol.toStringTag,{value:"Module"})),ia={...qZe,...YZe};function KZe(t,e){return tE(t,new ia.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return ia.isNode&&pt.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function JZe(t){return pt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function eGe(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&pt.isArray(o)?o.length:a,l?(pt.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!pt.isObject(o[a]))&&(o[a]=[]),e(n,r,o[a],i)&&pt.isArray(o[a])&&(o[a]=eGe(o[a])),!s)}if(pt.isFormData(t)&&pt.isFunction(t.entries)){const n={};return pt.forEachEntry(t,(r,o)=>{e(JZe(r),o,n,0)}),n}return null}function tGe(t,e,n){if(pt.isString(t))try{return(e||JSON.parse)(t),pt.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const kD={transitional:GG,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=pt.isObject(e);if(i&&pt.isHTMLForm(e)&&(e=new FormData(e)),pt.isFormData(e))return o?JSON.stringify(qG(e)):e;if(pt.isArrayBuffer(e)||pt.isBuffer(e)||pt.isStream(e)||pt.isFile(e)||pt.isBlob(e)||pt.isReadableStream(e))return e;if(pt.isArrayBufferView(e))return e.buffer;if(pt.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return KZe(e,this.formSerializer).toString();if((s=pt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return tE(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),tGe(e)):e}],transformResponse:[function(e){const n=this.transitional||kD.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(pt.isResponse(e)||pt.isReadableStream(e))return e;if(e&&pt.isString(e)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?tr.from(s,tr.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ia.classes.FormData,Blob:ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch"],t=>{kD.headers[t]={}});var AD=kD;const nGe=pt.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"]);var rGe=t=>{const e={};let n,r,o;return t&&t.split(` `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||e[n]&&nGe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};const fV=Symbol("internals");function dy(t){return t&&String(t).trim().toLowerCase()}function lw(t){return t===!1||t==null?t:pt.isArray(t)?t.map(lw):String(t)}function oGe(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const iGe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function V2(t,e,n,r,o){if(pt.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!pt.isString(e)){if(pt.isString(r))return e.indexOf(r)!==-1;if(pt.isRegExp(r))return r.test(e)}}function aGe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function sGe(t,e){const n=pt.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,a){return this[r].call(this,e,o,i,a)},configurable:!0})})}class nE{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(s,l,u){const c=dy(l);if(!c)throw new Error("header name must be a non-empty string");const d=pt.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=lw(s))}const a=(s,l)=>pt.forEach(s,(u,c)=>i(u,c,l));if(pt.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(pt.isString(e)&&(e=e.trim())&&!iGe(e))a(rGe(e),n);else if(pt.isHeaders(e))for(const[s,l]of e.entries())i(l,s,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=dy(e),e){const r=pt.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return oGe(o);if(pt.isFunction(n))return n.call(this,o,r);if(pt.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=dy(e),e){const r=pt.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||V2(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(a){if(a=dy(a),a){const s=pt.findKey(r,a);s&&(!n||V2(r,r[s],s,n))&&(delete r[s],o=!0)}}return pt.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||V2(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return pt.forEach(this,(o,i)=>{const a=pt.findKey(r,i);if(a){n[a]=lw(o),delete n[i];return}const s=e?aGe(i):String(i).trim();s!==i&&delete n[i],n[s]=lw(o),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return pt.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&pt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[fV]=this[fV]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=dy(a);r[s]||(sGe(o,a),r[s]=!0)}return pt.isArray(e)?e.forEach(i):i(e),this}}nE.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);pt.reduceDescriptors(nE.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});pt.freezeMethods(nE);var gu=nE;function z2(t,e){const n=this||AD,r=e||n,o=gu.from(r.headers);let i=r.data;return pt.forEach(t,function(s){i=s.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function KG(t){return!!(t&&t.__CANCEL__)}function Em(t,e,n){tr.call(this,t==null?"canceled":t,tr.ERR_CANCELED,e,n),this.name="CanceledError"}pt.inherits(Em,tr,{__CANCEL__:!0});function JG(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new tr("Request failed with status code "+n.status,[tr.ERR_BAD_REQUEST,tr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function lGe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function uGe(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[i];a||(a=u),n[o]=l,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-a{n=c,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(o=u,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const ex=(t,e,n=3)=>{let r=0;const o=uGe(50,250);return cGe(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,u=o(l),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-a)/u:void 0,event:i,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},n)},hV=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},pV=t=>(...e)=>pt.asap(()=>t(...e));var dGe=ia.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ia.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ia.origin),ia.navigator&&/(msie|trident)/i.test(ia.navigator.userAgent)):()=>!0,fGe=ia.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];pt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),pt.isString(r)&&a.push("path="+r),pt.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hGe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function pGe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eq(t,e){return t&&!hGe(e)?pGe(t,e):e}const gV=t=>t instanceof gu?{...t}:t;function Cp(t,e){e=e||{};const n={};function r(u,c,d,f){return pt.isPlainObject(u)&&pt.isPlainObject(c)?pt.merge.call({caseless:f},u,c):pt.isPlainObject(c)?pt.merge({},c):pt.isArray(c)?c.slice():c}function o(u,c,d,f){if(pt.isUndefined(c)){if(!pt.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!pt.isUndefined(c))return r(void 0,c)}function a(u,c){if(pt.isUndefined(c)){if(!pt.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in e)return r(u,c);if(d in t)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>o(gV(u),gV(c),d,!0)};return pt.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||o,f=d(t[c],e[c],c);pt.isUndefined(f)&&d!==s||(n[c]=f)}),n}var tq=t=>{const e=Cp({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=e;e.headers=a=gu.from(a),e.url=ZG(eq(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(pt.isFormData(n)){if(ia.hasStandardBrowserEnv||ia.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(ia.hasStandardBrowserEnv&&(r&&pt.isFunction(r)&&(r=r(e)),r||r!==!1&&dGe(e.url))){const u=o&&i&&fGe.read(i);u&&a.set(o,u)}return e};const gGe=typeof XMLHttpRequest!="undefined";var vGe=gGe&&function(t){return new Promise(function(n,r){const o=tq(t);let i=o.data;const a=gu.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=o,c,d,f,h,g;function v(){h&&h(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function b(){if(!m)return;const O=gu.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:O,config:t,request:m};JG(function(E){n(E),v()},function(E){r(E),v()},x),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){!m||(r(new tr("Request aborted",tr.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new tr("Network Error",tr.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||GG;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new tr(S,x.clarifyTimeoutError?tr.ETIMEDOUT:tr.ECONNABORTED,t,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&pt.forEach(a.toJSON(),function(S,x){m.setRequestHeader(x,S)}),pt.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),s&&s!=="json"&&(m.responseType=o.responseType),u&&([f,g]=ex(u,!0),m.addEventListener("progress",f)),l&&m.upload&&([d,h]=ex(l),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(c=O=>{!m||(r(!O||O.type?new Em(null,t,m):O),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const w=lGe(o.url);if(w&&ia.protocols.indexOf(w)===-1){r(new tr("Unsupported protocol "+w+":",tr.ERR_BAD_REQUEST,t));return}m.send(i||null)})};const mGe=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof tr?c:new Em(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,i(new tr(`timeout ${e} of ms exceeded`,tr.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>pt.asap(s),l}};var yGe=mGe;const bGe=function*(t,e){let n=t.byteLength;if(!e||n{const o=_Ge(t,e);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},rE=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nq=rE&&typeof ReadableStream=="function",wGe=rE&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),rq=(t,...e)=>{try{return!!t(...e)}catch{return!1}},SGe=nq&&rq(()=>{let t=!1;const e=new Request(ia.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),mV=64*1024,HP=nq&&rq(()=>pt.isReadableStream(new Response("").body)),tx={stream:HP&&(t=>t.body)};rE&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!tx[e]&&(tx[e]=pt.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new tr(`Response type '${e}' is not supported`,tr.ERR_NOT_SUPPORT,r)})})})(new Response);const xGe=async t=>{if(t==null)return 0;if(pt.isBlob(t))return t.size;if(pt.isSpecCompliantForm(t))return(await new Request(ia.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(pt.isArrayBufferView(t)||pt.isArrayBuffer(t))return t.byteLength;if(pt.isURLSearchParams(t)&&(t=t+""),pt.isString(t))return(await wGe(t)).byteLength},CGe=async(t,e)=>{const n=pt.toFiniteNumber(t.getContentLength());return n==null?xGe(e):n};var EGe=rE&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=tq(t);u=u?(u+"").toLowerCase():"text";let h=yGe([o,i&&i.toAbortSignal()],a),g;const v=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(l&&SGe&&n!=="get"&&n!=="head"&&(m=await CGe(c,r))!==0){let x=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(pt.isFormData(r)&&(C=x.headers.get("content-type"))&&c.setContentType(C),x.body){const[E,T]=hV(m,ex(pV(l)));r=vV(x.body,mV,E,T)}}pt.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;g=new Request(e,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(g);const O=HP&&(u==="stream"||u==="response");if(HP&&(s||O&&v)){const x={};["status","statusText","headers"].forEach(M=>{x[M]=w[M]});const C=pt.toFiniteNumber(w.headers.get("content-length")),[E,T]=s&&hV(C,ex(pV(s),!0))||[];w=new Response(vV(w.body,mV,E,()=>{T&&T(),v&&v()}),x)}u=u||"text";let S=await tx[pt.findKey(tx,u)||"text"](w,t);return!O&&v&&v(),await new Promise((x,C)=>{JG(x,C,{data:S,headers:gu.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(b){throw v&&v(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new tr("Network Error",tr.ERR_NETWORK,t,g),{cause:b.cause||b}):tr.from(b,b&&b.code,t,g)}});const UP={http:FZe,xhr:vGe,fetch:EGe};pt.forEach(UP,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const yV=t=>`- ${t}`,TGe=t=>pt.isFunction(t)||t===null||t===!1;var oq={getAdapter:t=>{t=pt.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since : `+i.map(yV).join(` `):" "+yV(i[0]):"as no adapter specified";throw new tr("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:UP};function j2(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Em(null,t)}function bV(t){return j2(t),t.headers=gu.from(t.headers),t.data=z2.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),oq.getAdapter(t.adapter||AD.adapter)(t).then(function(r){return j2(t),r.data=z2.call(t,t.transformResponse,r),r.headers=gu.from(r.headers),r},function(r){return KG(r)||(j2(t),r&&r.response&&(r.response.data=z2.call(t,t.transformResponse,r.response),r.response.headers=gu.from(r.response.headers))),Promise.reject(r)})}const iq="1.7.9",oE={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oE[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const _V={};oE.transitional=function(e,n,r){function o(i,a){return"[Axios v"+iq+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(e===!1)throw new tr(o(a," has been removed"+(n?" in "+n:"")),tr.ERR_DEPRECATED);return n&&!_V[a]&&(_V[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,s):!0}};oE.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function kGe(t,e,n){if(typeof t!="object")throw new tr("options must be an object",tr.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const s=t[i],l=s===void 0||a(s,i,t);if(l!==!0)throw new tr("option "+i+" must be "+l,tr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new tr("Unknown option "+i,tr.ERR_BAD_OPTION)}}var uw={assertOptions:kGe,validators:oE};const Ru=uw.validators;class nx{constructor(e){this.defaults=e,this.interceptors={request:new dV,response:new dV}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Cp(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&uw.assertOptions(r,{silentJSONParsing:Ru.transitional(Ru.boolean),forcedJSONParsing:Ru.transitional(Ru.boolean),clarifyTimeoutError:Ru.transitional(Ru.boolean)},!1),o!=null&&(pt.isFunction(o)?n.paramsSerializer={serialize:o}:uw.assertOptions(o,{encode:Ru.function,serialize:Ru.function},!0)),uw.assertOptions(n,{baseUrl:Ru.spelling("baseURL"),withXsrfToken:Ru.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&pt.merge(i.common,i[n.method]);i&&pt.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=gu.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,f;if(!l){const g=[bV.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,s){r.reason||(r.reason=new Em(i,a,s),n(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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new PD(function(o){e=o}),cancel:e}}}var AGe=PD;function PGe(t){return function(n){return t.apply(null,n)}}function NGe(t){return pt.isObject(t)&&t.isAxiosError===!0}const YP={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(YP).forEach(([t,e])=>{YP[e]=t});var MGe=YP;function aq(t){const e=new cw(t),n=LG(cw.prototype.request,e);return pt.extend(n,cw.prototype,e,{allOwnKeys:!0}),pt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return aq(Cp(t,o))},n}const ti=aq(AD);ti.Axios=cw;ti.CanceledError=Em;ti.CancelToken=AGe;ti.isCancel=KG;ti.VERSION=iq;ti.toFormData=tE;ti.AxiosError=tr;ti.Cancel=ti.CanceledError;ti.all=function(e){return Promise.all(e)};ti.spread=PGe;ti.isAxiosError=NGe;ti.mergeConfig=Cp;ti.AxiosHeaders=gu;ti.formToJSON=t=>qG(pt.isHTMLForm(t)?new FormData(t):t);ti.getAdapter=oq.getAdapter;ti.HttpStatusCode=MGe;ti.default=ti;var sq=ti;const lq="rulego-editor-config",ND=function(){try{const t=localStorage.getItem(lq);t&&(window.rulegoEditorConfig=JSON.parse(t))}catch(t){console.error("\u4FDD\u5B58\u6570\u636E\u51FA\u9519:",t)}return{...window.rulegoEditorConfig,baseUrl:window.allEnv.rule.server.startsWith(":")?`${window.location.protocol}//${window.location.hostname}${window.allEnv.rule.server}`:window.allEnv.rule.server}},uq=t=>{try{localStorage.setItem(lq,JSON.stringify(t)),window.rulegoEditorConfig=t}catch(e){console.error("\u66F4\u65B0\u6570\u636E\u51FA\u9519:",e)}},$Ge=t=>{if(t==="")return;let e=ND();e||(e={}),e.baseUrl=window.allEnv.rule.server.startsWith(":")?`${window.location.protocol}//${window.location.hostname}${window.allEnv.rule.server}`:window.allEnv.rule.server,uq(e)},Go=sq.create({baseURL:ND().baseUrl,headers:{"Content-Type":"application/json"},timeout:12e4}),RGe=()=>localStorage.getItem("token")||localStorage.getItem("access_token"),DGe=()=>{localStorage.removeItem("username"),localStorage.removeItem("token"),localStorage.removeItem("access_token")};Go.interceptors.request.use(t=>{const e=RGe();return e&&(t.headers.Authorization=`Bearer ${e}`),t},t=>Promise.reject(t));Go.interceptors.response.use(t=>t,t=>(console.error(t),t.response&&t.response.status===401&&DGe(),Promise.reject(t)));const hc="rules",cq=(t,e,n,r,o)=>Go.get("/api/v1/"+hc,{params:{root:t,keywords:e,page:n,size:r,disabled:o}}),IGe=(t,e)=>Go.post(`/api/v1/${hc}/`+t,e),dq=t=>t==="get/latest"?Go.get(`/api/v1/${hc}/get/latest`):Go.get(`/api/v1/${hc}/`+t),LGe=t=>Go.delete(`/api/v1/${hc}/`+t),BGe=(t,e)=>Go.post(`/api/v1/${hc}/`+t+"/base",e),FGe=(t,e,n)=>Go.post(`/api/v1/${hc}/`+t+"/config/"+e,n),VGe=(t,e,n,r,o,i)=>{let a=`/api/v1/${hc}/`+t+"/execute/"+n+"?msgId="+e+"&"+r;return i?Go.post(a,o,i):Go.post(a,o)},zGe=(t,e,n,r,o,i)=>{let a=`/api/v1/${hc}/`+t+"/notify/"+n+"?msgId="+e+"&"+r;return i?Go.post(a,o,i):Go.post(a,o)},fq=(t,e)=>{let n=`/api/v1/${hc}/`+t+"/operate/"+e;return Go.post(n)},jGe=()=>Go.get("/api/v1/components"),WGe=()=>Go.get("/api/v1/locales"),Qt="/plugin/rule";function u1(t,e,n,r){var i;let o=[];try{let a=t.getGraphData();(i=a==null?void 0:a.metadata)==null||i.nodes.forEach(s=>{s.id&&s.id!==e.id&&o.push({value:s.id,label:s.name})})}catch{}finally{n.component.options=o}return o}const Df={category:{endpoints:{label:"\u8F93\u5165\u7AEF",background:"#A6BBCFFF",nodeType:"endpoint-node"},common:{label:"\u516C\u5171",background:"#eec38d",nodeType:"simple-node"},filter:{label:"\u8FC7\u6EE4\u5668",background:"#f1e861",nodeType:"simple-node"},transform:{label:"\u8F6C\u6362\u5668",background:"#79cef1",nodeType:"simple-node"},action:{label:"\u52A8\u4F5C",background:"#f1928f",nodeType:"simple-node"},external:{label:"\u5916\u90E8\u7684",background:"#fbc766",nodeType:"simple-node"},ai:{label:"AI",background:"#7cbaf8",nodeType:"simple-node"},ci:{label:"CI/CD",background:"#9ec9c9",nodeType:"simple-node"},iot:{label:"\u7269\u8054\u534F\u8BAE",background:"#FFA500",nodeType:"simple-node"},flow:{label:"\u5B50\u89C4\u5219\u94FE",background:"#E6E0F8FF",nodeType:"simple-node"},stats:{label:"\u6D41\u5F0F\u8BA1\u7B97",background:"#f1cfbd",nodeType:"simple-node"},custom:{label:"\u81EA\u5B9A\u4E49",background:"#C6EFCB",nodeType:"simple-node"}},component:{endpoints:{"endpoint/beanstalkdTubeset":{notInput:!0,label:"Beanstalkd",icon:Qt+"/images/endpoint/beanstalkd.svg",desc:"
  • Beanstalkd\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u8FDE\u63A5Beanstalkd Server\uFF0C\u8BA2\u9605\u6D88\u606F\uFF0C\u83B7\u53D6\u6D88\u606F\u4FE1\u4F20\u9012\u4E0B\u4E2A\u8282\u70B9\u5904\u7406,
",server:{label:"Beanstalkd Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B\uFF1A127.0.0.1:11300\uFF0C\u5982\u679C\u6D41\u7A0B\u4E2D\u5B58\u5728\u591A\u8282\u70B9\u64CD\u4F5C\u6D88\u606F\u5E76\u6539\u53D8\u72B6\u6001\u65F6\uFF0C\u5E94\u4F7F\u7528\u590D\u7528\u8FDE\u63A5\uFF08ref://\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},tubesets:{label:"tube\u5217\u8868",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},timeout:{label:"\u8BA2\u9605Job\u8D85\u65F6\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2",desc:""},router:{hide:!0}},"endpoint/mqtt":{notInput:!0,label:"MQTT",icon:Qt+"/images/endpoint/mqtt.svg",desc:'
',server:{label:"MQTT Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QOS"},cleanSession:{label:"\u6E05\u9664\u4F1A\u8BDD"},clientID:{label:"\u5BA2\u6237\u7AEFID",desc:"\u7A7A\u5219\u968F\u673A\u751F\u6210"},cAFile:{label:"CA\u8BC1\u4E66\u6587\u4EF6",desc:"\u586B\u6587\u4EF6\u8DEF\u5F84"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6",desc:"\u586B\u6587\u4EF6\u8DEF\u5F84"},certKeyFile:{label:"\u8BC1\u4E66\u5BC6\u94A5\u6587\u4EF6",desc:"\u586B\u6587\u4EF6\u8DEF\u5F84"},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}},defaultValue:[{params:[],from:{path:"devices/msg",configuration:null,processors:[]}}]}},"endpoint/net":{notInput:!0,label:"TCP/UDP",icon:Qt+"/images/endpoint/net.svg",desc:"
  • TCP/UDP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
  • \u542F\u52A8TCP/UPD\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u8DEF\u7531\u6570\u636E\u89E6\u53D1\u89C4\u5219\u94FE\u3002
  • ",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335"},readTimeout:{label:"\u8BFB\u8D85\u65F6\uFF0C\u5355\u4F4D\uFF1A\u79D2",desc:""},encode:{label:"\u7F16\u7801",desc:"\u628A\u5B57\u8282\u6D41\u8F6C\u6362\u6210hex/base64\uFF0C\u9ED8\u8BA4\u4E0D\u8F6C\u6362",rules:[],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,clearable:!0,options:[{label:"\u65E0",value:"none"},{label:"hex",value:"hex"},{label:"base64",value:"base64"}]}},packetMode:{label:"\u6570\u636E\u5305\u5206\u5272\u6A21\u5F0F",desc:"",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,clearable:!0,options:[{label:"\u6309\u884C\u5206\u5272",value:"line"},{label:"\u56FA\u5B9A\u957F\u5EA6\u5206\u5272",value:"fixed"},{label:"\u81EA\u5B9A\u4E49\u5206\u9694\u7B26\u5206\u5272",value:"delimiter"},{label:"\u957F\u5EA6\u524D\u7F00\u5C0F\u7AEF\u5E8F\uFF0C\u957F\u5EA6\u4E0D\u5305\u542B\u524D\u7F00",value:"length_prefix_le"},{label:"\u957F\u5EA6\u524D\u7F00\u5927\u7AEF\u5E8F\uFF0C\u957F\u5EA6\u4E0D\u5305\u542B\u524D\u7F00",value:"length_prefix_be"},{label:"\u957F\u5EA6\u524D\u7F00\u5C0F\u7AEF\u5E8F\uFF0C\u957F\u5EA6\u5305\u542B\u524D\u7F00",value:"length_prefix_le_inc"},{label:"\u957F\u5EA6\u524D\u7F00\u5927\u7AEF\u5E8F\uFF0C\u957F\u5EA6\u5305\u542B\u524D\u7F00 ",value:"length_prefix_be_inc"}]}},packetSize:{label:"\u5305\u5927\u5C0F",desc:"\u56FA\u5B9A\u957F\u5EA6\u5206\u5272\u6A21\u5F0F\uFF1A\u56FA\u5B9A\u6570\u636E\u5305\u7684\u5B57\u8282\u6570\u3002\u957F\u5EA6\u524D\u7F00\u6A21\u5F0F\uFF1A\u957F\u5EA6\u5B57\u8282\u6570\uFF081-4\u5B57\u8282\uFF09"},delimiter:{label:"\u5206\u9694\u7B26",desc:`\u81EA\u5B9A\u4E49\u5206\u9694\u7B26\u6A21\u5F0F\uFF0C\u6709\u6548\u3002\uFF08\u652F\u6301\u5341\u516D\u8FDB\u5236\u683C\u5F0F\u5982"0x0A"\u8868\u793A \uFF09`},maxPacketSize:{label:"\u6700\u5927\u6570\u636E\u5305\u5927\u5C0F\uFF0C\u5355\u4F4D:\u5B57\u8282",desc:"\u9ED8\u8BA465536 (64KB)"},router:{from:{path:{label:"\u8DEF\u7531\u6B63\u5219\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u6EE1\u8DB3\u6761\u4EF6\u7684\u6570\u636E\u89E6\u53D1\uFF0C*\u8868\u793A\u5339\u914D\u6240\u6709"}}}},"endpoint/http":{notInput:!0,label:"HTTP",icon:Qt+"/images/endpoint/http.svg",desc:'
    • HTTP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
    • \u542F\u52A8HTTP\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},readTimeout:{label:"\u8BFB\u8D85\u65F6(\u5355\u4F4D:\u79D2)",desc:""},writeTimeout:{label:"\u5199\u8D85\u65F6(\u5355\u4F4D:\u79D2)",desc:""},idleTimeout:{label:"\u7A7A\u95F2\u8D85\u65F6(\u5355\u4F4D:\u79D2)",desc:""},concurrency:{label:"\u5E76\u53D1\u6570",desc:""},disableKeepalive:{label:"\u7981\u7528keepalive",desc:""},maxRequestSize:{label:"\u6700\u5927\u8BF7\u6C42\u5927\u5C0F",desc:"\u793A\u4F8B:10M 10K"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/v1/msg"}}}},"endpoint/ws":{notInput:!0,label:"Websocket",icon:Qt+"/images/endpoint/websocket.svg",desc:'
    • Websocket\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
    • \u542F\u52A8Websocket\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/ms/ws "}}}},"endpoint/schedule":{notInput:!0,label:"\u5B9A\u65F6\u8C03\u5EA6",icon:Qt+"/images/endpoint/schedule.svg",desc:'
    • \u5B9A\u65F6\u8C03\u5EA6\u63A5\u5165\u7AEF
    • \u901A\u8FC7\u8DEF\u7531\u7ED9\u5B9ACron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',router:{from:{path:{label:"cron\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BF7\u8F93\u5165cron\u8868\u8FBE\u5F0F\u5982: */10 * * * * *"}],desc:"\u901A\u8FC7cron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\uFF0C\u5982: */10 * * * * *"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/kafka":{notInput:!0,label:"Kafka",icon:Qt+"/images/endpoint/kafka.svg",desc:'
    • Kafka\u8BA2\u9605\u63A5\u5165\u7AEF
    • \u8FDE\u63A5Kafka\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4rulego"},sasl:{label:"\u8BA4\u8BC1\u914D\u7F6E",desc:"",enable:{label:"\u542F\u7528SASL\u8BA4\u8BC1"},mechanism:{label:"\u8BA4\u8BC1\u673A\u5236",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"PLAIN",value:"PLAIN"},{label:"SCRAM-SHA-256",value:"SCRAM-SHA-256"},{label:"SCRAM-SHA-512",value:"SCRAM-SHA-512"}]}},username:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801"}},tls:{label:"TLS\u914D\u7F6E",desc:"",enable:{label:"\u542F\u7528TLS"},insecureSkipVerify:{label:"\u8DF3\u8FC7\u8BC1\u4E66\u9A8C\u8BC1"}},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/nats":{notInput:!0,label:"Nats",icon:Qt+"/images/endpoint/nats.svg",desc:'
    • Nats\u8BA2\u9605\u63A5\u5165\u7AEF
    • \u8FDE\u63A5Nats\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/redis":{notInput:!0,label:"Redis",icon:Qt+"/images/endpoint/redis.svg",desc:'
    • Redis\u8BA2\u9605\u63A5\u5165\u7AEF
    • \u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8BA2\u9605\u901A\u9053\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},router:{from:{path:{label:"\u8BA2\u9605Redis\u901A\u9053",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u901A\u9053\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/redis/stream":{notInput:!0,label:"Redis\u6D41",icon:Qt+"/images/endpoint/redis_stream.svg",desc:'
    • Redis Steam\u63A5\u5165\u7AEF
    • \u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u6D41\u540D\u79F0\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4rulego"},router:{from:{path:{label:"\u8BA2\u9605\u6D41\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u6D41\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/rabbitmq":{notInput:!0,label:"RabbitMQ",icon:Qt+"/images/endpoint/rabbitmq.svg",desc:'
    • rabbitmq\u8BA2\u9605\u63A5\u5165\u7AEF
    • \u652F\u6301AMQP\u534F\u8BAE
    • \u8FDE\u63A5rabbitmq\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8DEF\u7531\u952E\u89E6\u53D1\u89C4\u5219\u94FE
    • \u5982\u679C\u4EA4\u6362\u673A\u4E0D\u5B58\u5728\u5219\u81EA\u52A8\u58F0\u660E
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"direct/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""},router:{from:{path:{label:"\u8DEF\u7531\u952E",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""}}}},"endpoint/mysql_cdc":{notInput:!0,label:"MYSQL CDC",icon:Qt+"/images/endpoint/mysql_cdc.svg",desc:"
    • \u76D1\u542Cmysql\u8868\u6570\u636E\u53D8\u5316\u89E6\u53D1\u3002
    ",server:{label:"MYSQL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:3306"},user:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801",desc:""},fromOldest:{label:"\u662F\u5426\u5168\u91CF\u540C\u6B65",desc:"\u5F00\u542F\u540E\uFF0C\u6BCF\u6B21\u91CD\u542F\u670D\u52A1\u90FD\u4F1A\u4ECE\u7B2C\u4E00\u884C\u5F00\u59CB\u540C\u6B65\u6570\u636E\uFF0C\u5426\u5219\u53EA\u540C\u6B65\u589E\u91CF\u6570\u636E"},dbs:{label:"\u76D1\u542C\u6570\u636E\u5E93\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest"},includeTables:{label:"\u5305\u542B\u8868\u540D\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest.users\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1A.*\\.canal\u6216test.*"},excludeTables:{label:"\u6392\u9664\u8868\u540D",desc:"\u5982\uFF1Amysql.component\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1Amysql\\..*"},executionPath:{label:"mysqldump\u6267\u884C\u8DEF\u5F84",desc:"\u5982\uFF1Amysqldump\u6216\u8005/usr/bin/mysqldump"},charset:{label:"\u5B57\u7B26\u96C6",desc:"\u5982\uFF1Autf8"},flavor:{label:"\u6570\u636E\u5E93\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"mariadb",value:"mariadb"}]}},heartbeat:{label:"\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2"},readTimeout:{label:"\u8BFB\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2"},limit:{label:"\u9650\u5236\u540C\u6B65\u6761\u6570",desc:"\u7528\u4E8E\u6279\u91CF\u64CD\u4F5C\uFF0C\u4E0D\u5904\u7406\u8D85\u8FC7\u9650\u5236\u6570\u636E\u30020:\u4E0D\u9650\u5236\u3002\u5176\u4ED6:\u8D85\u8FC7\u8BE5\u503C\u5219\u4E0D\u5904\u7406"},router:{from:{path:{label:"\u8DEF\u7531\u8868\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u6839\u636E\u8868\u540D\u8DEF\u7531\uFF0C\u8868\u540D\u683C\u5F0F\uFF1AdbName.tableName\uFF0C\u5982:test.users\u3002*\u8868\u793A\u6240\u6709\u8868"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/opcua":{category:"iot",notInput:!0,nodeType:"endpoint-node",label:"OPC_UA\u8BA2\u9605",icon:Qt+"/images/endpoint/opcua.svg",desc:'',server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"endpoint/grpc/stream":{label:"gRPC\u6D41\u5BA2\u6237\u7AEF",icon:Qt+"/images/grpc.svg",desc:"
    • \u63A5\u6536gRPC\u670D\u52A1\u5668\u63A8\u9001\u6570\u636E\uFF0C\u5E76\u8F6C\u53D1\u5230\u89C4\u5219\u94FE\u5904\u7406
    ",server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9(\u5141\u8BB8\u7A7A)",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}',component:{type:"textarea"}},headers:{label:"\u8BF7\u6C42\u5934",desc:""},checkInterval:{label:"\u670D\u52A1\u68C0\u67E5\u95F4\u9694,\u5355\u4F4D:\u6BEB\u79D2",desc:""},router:{hide:!0}},"endpoint/wukongim":{label:"WuKongIM\u6536",icon:Qt+"/images/endpoint/wukongim.svg",desc:"
    • \u63A5\u6536WuKongIM\u63A8\u9001\u6570\u636E\uFF0C\u5E76\u8F6C\u53D1\u5230\u89C4\u5219\u94FE\u5904\u7406
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: tcp://175.27.245.108:15100",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},uID:{label:"\u7528\u6237ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},token:{label:"\u767B\u5F55\u5BC6\u7801",desc:""},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2",desc:""},protoVersion:{label:"\u534F\u8BAE\u7248\u672C",desc:"\u793A\u4F8B:3"},pingInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:"\u793A\u4F8B:30"},reconnect:{label:"\u662F\u5426\u81EA\u52A8\u91CD\u8FDE",desc:""},autoAck:{label:"\u662F\u5426\u81EA\u52A8\u786E\u8BA4\u6D88\u606F",desc:""},router:{hide:!0}},"endpoint/mcpServer":{notInput:!0,label:"MCP\u670D\u52A1\u5668",icon:Qt+"/images/endpoint/mcp.svg",desc:"
    • \u542F\u52A8MCP\u670D\u52A1\u5668\u3002
    • \u628A\u89C4\u5219\u94FE\u8F6C\u6210MCP\u5DE5\u5177\u63D0\u4F9B\u7ED9AI\u667A\u80FD\u4F53\u8C03\u7528\u3002
    ",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},name:{label:"MCP\u670D\u52A1\u5668\u540D\u79F0",desc:"\u5982\u679C\u7A7A\uFF0C\u5219\u4ECE\u89C4\u5219\u94FE\u540D\u79F0\u83B7\u53D6"},version:{label:"MCP\u670D\u52A1\u5668\u7248\u672C",desc:"\u5982\u679C\u7A7A\uFF0C\u5219\u4ECE\u89C4\u5219\u94FE\u7248\u672C\u83B7\u53D6"},basePath:{label:"MCP\u670D\u52A1\u5668\u6839\u8DEF\u5F84",desc:"\u5982\u679C\u7A7A\uFF0C\u5219\u4F7F\u7528:/api/v1/rules/{\u89C4\u5219\u94FEID}/mcp\u3002MCP\u670D\u52A1\u5668\u914D\u7F6EURL\uFF1Ahttp://{ip}:{port}/api/v1/rules/{\u89C4\u5219\u94FEID}/mcp/sse"},router:{from:{path:{label:"\u5DE5\u5177\u6807\u8BC6",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",unique:!0},desc:{label:"\u5DE5\u5177\u63CF\u8FF0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},inputSchema:{label:"\u5DE5\u5177\u5165\u53C2JsonSchema"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/sagoo/devicein":{notInput:!0,label:"\u8BBE\u5907\u6570\u636E",icon:Qt+"/images/endpoint/devicein.svg",desc:'',productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},antiShake:{label:"\u542F\u7528\u9632\u6296",desc:""},antiShakeMs:{label:"\u9632\u6296\u65F6\u95F4",desc:"\u5355\u4F4D\uFF1A\u79D2"},antiShakeNum:{label:"\u9632\u6296\u6B21\u6570",desc:""},processFirstItem:{label:"\u9996\u6761\u6570\u636E\u7ACB\u5373\u5904\u7406",desc:""},router:{from:{path:{label:"\u89E6\u53D1\u7C7B\u578B",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",options:[{label:"\u5C5E\u6027\u4E0A\u62A5",value:"reportAttribute"},{label:"\u4E8B\u4EF6\u4E0A\u62A5",value:"reportEvent"}]}}}},"endpoint/nsq":{notInput:!0,label:"NSQ",icon:Qt+"/images/endpoint/nsq_blue.png",desc:"
    • NSQ\u8BA2\u9605\u63A5\u5165\u7AEF
    • \u8FDE\u63A5NSQ\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
    • ",server:{label:"NSQ\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"NSQ\u670D\u52A1\u5668\u5730\u5740\uFF0C\u591A\u4E2A\u5730\u5740\u7528\u9017\u53F7\u5206\u9694"},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices_msg"}}}},"endpoint/pulsar":{notInput:!0,label:"Pulsar",icon:Qt+"/images/endpoint/pulsar.svg",desc:"
      • pulsar\u8BA2\u9605\u63A5\u5165\u7AEF
      • \u8FDE\u63A5pulsar\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
      • ",subType:{label:"\u8BA2\u9605\u7C7B\u578B",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"Exclusive",value:"Exclusive"},{label:"Shared",value:"Shared"},{label:"Failover",value:"Failover"},{label:"KeyShared",value:"KeyShared"}]}},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}}},nodes:{comment:{notInput:!0,notOutput:!0,label:"\u6CE8\u91CA",icon:Qt+"/images/comment.svg",desc:"\u628A\u8282\u70B9\u540D\u79F0\u4F5C\u4E3A\u6CE8\u91CA\u5185\u5BB9\u663E\u793A\u5728\u753B\u5E03\u4E0A",nodeType:"comment-node"},end:{notOutput:!0,label:"\u7ED3\u675F",icon:Qt+"/images/end.svg",desc:"\u63A7\u5236\u6D41\u7A0B\u7ED3\u675F",nodeType:"end-node"},delay:{label:"\u5EF6\u8FDF",icon:Qt+"/images/delay.svg",desc:'\u5E2E\u52A9\u6587\u6863',periodInSeconds:{label:"\u5EF6\u8FDF\u65F6\u95F4(\u79D2)",desc:""},maxPendingMsgs:{label:"\u6700\u5927\u5141\u8BB8\u6302\u8D77\u6D88\u606F\u7684\u6570\u91CF",desc:"\u5982\u679C\u542F\u7528\u8986\u76D6\u6A21\u5F0F\uFF0C\u8BE5\u53C2\u6570\u5931\u6548"},periodInSecondsPattern:{label:"\u5EF6\u8FDF\u65F6\u95F4\u8868\u8FBE\u5F0F(\u79D2)",desc:"\u901A\u8FC7 ${metadata.key} \u4ECE\u5143\u6570\u636E\u53D8\u91CF\u4E2D\u83B7\u53D6\u6216\u8005\u901A\u8FC7 ${msg.key} \u4ECE\u6D88\u606F\u8D1F\u8377\u4E2D\u83B7\u53D6\uFF0C\u5EF6\u8FDF\u65F6\u95F4\uFF0C\u5982\u679C\u8BE5\u503C\u6709\u503C\uFF0C\u4F18\u5148\u53D6\u8BE5\u503C\u3002"},overwrite:{label:"\u8986\u76D6\u6A21\u5F0F",desc:"\u5982\u679C\u542F\u7528\uFF0C\u5468\u671F\u5185\u53EA\u5141\u8BB8\u6302\u8D77\u4E00\u6761\u6D88\u606F\uFF0C\u65B0\u6D88\u606F\u4F1A\u8986\u76D6\u4E0A\u4E00\u6761\u6D88\u606F"}},log:{label:"\u65E5\u5FD7",icon:Qt+"/images/log.svg",desc:'\u5E2E\u52A9\u6587\u6863',jsScript:{label:"function String(msg, metadata, msgType, dataType) {",desc:"}"}},for:{label:"\u5FAA\u73AF",icon:Qt+"/images/for.svg",desc:'\u5E2E\u52A9\u6587\u6863',range:{label:"\u8FED\u4EE3\u503C\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.items;1..3;\u5982\u679C\u7A7A\u5219\u904D\u5386\u6574\u4E2Amsg"},do:{label:"\u5904\u7406\u8282\u70B9ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5904\u7406\u94FE\u7684\u8D77\u59CB\u8282\u70B9ID",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,loadData:u1,strategy:"firstAvailable"}},mode:{label:"\u6267\u884C\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u540C\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:0},{label:"\u540C\u6B65\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:1},{label:"\u540C\u6B65\u8986\u76D6\u6267\u884C\u7ED3\u679C",value:2},{label:"\u5F02\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:3}]}},nodeType:"group-node"},functions:{label:"\u51FD\u6570",desc:"",functionName:{label:"\u51FD\u6570\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,placeholder:"\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u51FD\u6570\u540D"}}},cacheSet:{label:"\u7F13\u5B58\u8BBE\u7F6E",icon:Qt+"/images/cache_set.svg",desc:'\u5E2E\u52A9\u6587\u6863',items:{label:"\u7F13\u5B58\u9879",component:{type:"table",options:[{name:"level",label:"\u7F13\u5B58\u7EA7\u522B",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u89C4\u5219\u94FE",value:"chain"},{label:"\u5168\u5C40",value:"global"}]}},{name:"key",label:"\u952E",type:"string",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},{name:"value",label:"\u503C",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",component:{type:"textarea"}},{name:"ttl",label:"\u8FC7\u671F\u65F6\u95F4",type:"string",desc:"\u793A\u4F8B\uFF1A1h(1\u5C0F\u65F6) 1h30m(1\u5C0F\u65F630\u5206\u949F) 10m(10\u5206\u949F) 10s(10\u79D2)\uFF0C\u5982\u679C\u4E3A\u7A7A\u6216\u80050\uFF0C\u5219\u8868\u793A\u6C38\u4E0D\u8FC7\u671F"}]}}},cacheGet:{label:"\u7F13\u5B58\u83B7\u53D6",icon:Qt+"/images/cache_get.svg",desc:'\u5E2E\u52A9\u6587\u6863',keys:{label:"\u7F13\u5B58\u952E\u5217\u8868",component:{type:"table",options:[{name:"level",label:"\u7F13\u5B58\u7EA7\u522B",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u89C4\u5219\u94FE",value:"chain"},{label:"\u5168\u5C40",value:"global"}]}},{name:"key",label:"\u952E",type:"string",desc:"\u652F\u6301\u901A\u914D\u7B26\uFF0C\u4F8B\u5982\uFF1Atest*\uFF0C\u5220\u9664\u4EE5 test \u5F00\u5934\u7684\u9879\u3002\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]}]}},outputMode:{label:"\u8F93\u51FA\u6A21\u5F0F",desc:"\u67E5\u8BE2\u7ED3\u679C\u7684\u8F93\u51FA\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u5408\u5E76\u5230\u5F53\u524D\u6D88\u606F\u5143\u6570\u636E",value:0},{label:"\u5408\u5E76\u5230\u5F53\u524D\u6D88\u606F\u8D1F\u8377",value:1},{label:"\u8986\u76D6\u539F\u6D88\u606F\u8D1F\u8377",value:2}]}}},cacheDelete:{label:"\u7F13\u5B58\u5220\u9664",icon:Qt+"/images/cache_delete.svg",desc:'\u5E2E\u52A9\u6587\u6863',keys:{label:"\u7F13\u5B58\u952E\u5217\u8868",component:{type:"table",options:[{name:"level",label:"\u7F13\u5B58\u7EA7\u522B",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u89C4\u5219\u94FE",value:"chain"},{label:"\u5168\u5C40",value:"global"}]}},{name:"key",label:"\u952E",type:"string",desc:"\u652F\u6301\u901A\u914D\u7B26\uFF0C\u4F8B\u5982\uFF1Atest*\uFF0C\u5220\u9664\u4EE5 test \u5F00\u5934\u7684\u9879\u3002\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]}]}}},"x/beanstalkdWorker":{label:"Beanstalkd Worker",icon:Qt+"/images/beanstalkd_worker.svg",category:"external",desc:"
        • Beanstalkd\u6D88\u8D39\u7AEF\uFF0C\u652F\u6301\u4EE5\u4E0B\u64CD\u4F5CDelete\u3001Release\u3001Bury\u3001KickJob\u3001Touch\u3001Peek\u3001ReserveJob\u3001StatsJob\u3001Stats\u3001ListTubes\u3002
        ",server:{label:"Beanstalkd Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B\uFF1A127.0.0.1:11300\uFF0C\u5982\u679C\u6D41\u7A0B\u4E2D\u5B58\u5728\u591A\u8282\u70B9\u64CD\u4F5C\u6D88\u606F\u5E76\u6539\u53D8\u72B6\u6001\u65F6\uFF0C\u5E94\u4F7F\u7528\u590D\u7528\u8FDE\u63A5\uFF08ref://\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},tube:{label:"Tube\u540D\u79F0",desc:"Tube\u540D\u79F0 \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},cmd:{label:"\u547D\u4EE4\u540D\u79F0",desc:"\u547D\u4EE4\u540D\u79F0\uFF0C\u652F\u6301Delete Release Bury KickJob Touch Peek ReserveJob StatsJob Stats ListTubes",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Delete",value:"Delete"},{label:"Release",value:"Release"},{label:"Bury",value:"Bury"},{label:"KickJob",value:"KickJob"},{label:"Touch",value:"Touch"},{label:"Peek",value:"Peek"},{label:"ReserveJob",value:"ReserveJob"},{label:"StatsJob",value:"StatsJob"},{label:"Stats",value:"Stats"},{label:"ListTubes",value:"ListTubes"}]}},jobId:{label:"JobId",desc:"JobId\u6839\u636E\u547D\u4EE4\u9009\u586B\uFF0C\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Delete\u3001Release\u3001Bury\u3001KickJob\u3001Touch\u3001Peek\u3001ReserveJob\u3001StatsJob\u547D\u4EE4\u53C2\u6570"},pri:{label:"\u4F18\u5148\u7EA7",desc:"\u4F18\u5148\u7EA7: pri \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Release\u3001Bury\u547D\u4EE4\u53C2\u6570"},delay:{label:"\u5EF6\u8FDF\u65F6\u95F4",desc:"\u5EF6\u8FDF\u65F6\u95F4: delay \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Release\u547D\u4EE4\u53C2\u6570\uFF0C\u683C\u5F0F\u5982\uFF1A\u201C30s\u201D\u3001\u201C5m\u201D"}},"x/beanstalkdTube":{label:"Beanstalkd Tube",icon:Qt+"/images/beanstalkd_tube.svg",category:"external",desc:"
        • Beanstalkd Tube\uFF0C\u652F\u6301\u4EE5\u4E0B\u64CD\u4F5CPut\u3001PeekReady\u3001PeekDelayed\u3001PeekBuried\u3001Kick\u3001Stat\u3001Pause\u3002
        ",server:{label:"Beanstalkd Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B\uFF1A127.0.0.1:11300\uFF0C\u5982\u679C\u6D41\u7A0B\u4E2D\u5B58\u5728\u591A\u8282\u70B9\u64CD\u4F5C\u6D88\u606F\u5E76\u6539\u53D8\u72B6\u6001\u65F6\uFF0C\u5E94\u4F7F\u7528\u590D\u7528\u8FDE\u63A5\uFF08ref://\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},tube:{label:"Tube\u540D\u79F0",desc:"Tube\u540D\u79F0 \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},cmd:{label:"\u547D\u4EE4\u540D\u79F0",desc:"\u547D\u4EE4\u540D\u79F0\uFF0C\u652F\u6301Put\u3001PeekReady\u3001PeekDelayed\u3001PeekBuried\u3001Kick\u3001Stat\u3001Pause",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Put",value:"Put"},{label:"PeekReady",value:"PeekReady"},{label:"PeekDelayed",value:"PeekDelayed"},{label:"PeekBuried",value:"PeekBuried"},{label:"Kick",value:"Kick"},{label:"Stat",value:"Stat"},{label:"Pause",value:"Pause"}]}},body:{label:"body",desc:"body\u6839\u636E\u547D\u4EE4\u9009\u586B\uFF0C\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Put\u547D\u4EE4\u53C2\u6570"},pri:{label:"\u4F18\u5148\u7EA7",desc:"\u4F18\u5148\u7EA7: pri \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Put\u547D\u4EE4\u53C2\u6570"},delay:{label:"\u5EF6\u8FDF\u65F6\u95F4",desc:"\u5EF6\u8FDF\u65F6\u95F4: delay \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Put\u547D\u4EE4\u53C2\u6570\uFF0C\u683C\u5F0F\u5982\uFF1A\u201C30s\u201D\u3001\u201C5m\u201D"},ttr:{label:"Job\u6700\u5927\u6267\u884C\u79D2\u6570",desc:"\u6700\u5927\u6267\u884C\u79D2\u6570:ttr \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF,Put\u547D\u4EE4\u53C2\u6570"},kickBound:{label:"\u5524\u9192\u7684Job\u6570\u91CF\u4E0A\u9650",desc:"Kick\u547D\u4EE4\u53C2\u6570bound \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF"},pauseTime:{label:"\u6682\u505C\u65F6\u95F4",desc:"Pause\u547D\u4EE4\u53C2\u6570time \u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u683C\u5F0F\u5982\uFF1A\u201C30s\u201D\u3001\u201C5m\u201D"}},dbClient:{label:"\u6570\u636E\u5E93",icon:Qt+"/images/db.svg",desc:'
        • \u7528\u4E8E\u6267\u884CSQL\u64CD\u4F5C\u7684\u7EC4\u4EF6\uFF0C\u652F\u6301\u591A\u79CD\u6570\u636E\u5E93\u7C7B\u578B\u3002
        • \u5E2E\u52A9\u6587\u6863
        ',sql:{label:"SQL\u8BED\u53E5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u6216\u8005 ${msg.key}\u53D8\u91CF\uFF0CSQL\u53C2\u6570\u5141\u8BB8\u4F7F\u7528 ? \u5360\u4F4D\u7B26",component:{type:"textarea",rows:4}},params:{label:"\u5360\u4F4D\u7B26\u53C2\u6570\u5217\u8868",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},getOne:{label:"\u8FD4\u56DE\u4E00\u6761\u8BB0\u5F55",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},driverName:{label:"\u6570\u636E\u5E93\u9A71\u52A8\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"mysql\u6216postgres\uFF0C\u5982\u9700\u5176\u4ED6\u6570\u636E\u5E93\u7C7B\u578B\u9700\u5F15\u5165\u5BF9\u5E94\u6570\u636E\u5E93\u9A71\u52A8",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"postgres",value:"postgres"}]}},dsn:{label:"\u6570\u636E\u5E93\u8FDE\u63A5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"Mysql\u914D\u7F6E\u793A\u4F8B: username:password@tcp(127.0.0.1:3306)/db Postgres\u914D\u7F6E\u793A\u4F8B\uFF1Apostgres://username:password@127.0.0.1:5432/db?sslmode=disable",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}}},mqttClient:{label:"MQTT\u53D1\u5E03\u8005",icon:Qt+"/images/mqtt.svg",desc:'',topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"MQTT \u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:1883 \u3002\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QoS",desc:""},clientID:{label:"\u5BA2\u6237\u7AEFID",desc:""},cleanSession:{label:"\u6E05\u9664\u4F1A\u8BDD",desc:""},cAFile:{label:"\u8BC1\u4E66\u9881\u53D1\u673A\u6784(CA)\u6587\u4EF6",desc:""},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6",desc:""},certKeyFile:{label:"\u8BC1\u4E66\u5BC6\u94A5\u6587\u4EF6",desc:""}},restApiCall:{label:"HTTP\u5BA2\u6237\u7AEF",icon:Qt+"/images/rest.svg",desc:'',restEndpointUrlPattern:{label:"HTTP URL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},requestMethod:{label:"\u8BF7\u6C42\u65B9\u6CD5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"HEAD",value:"HEAD"}]},desc:"POST/GET/DELETE/PUT/PATCH/HEAD"},withoutRequestBody:{label:"\u4E0D\u4F20\u8F93\u8BF7\u6C42\u4F53",desc:""},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},body:{label:"\u8BF7\u6C42\u4F53",desc:'\u652F\u6301\u8868\u8FBE\u5F0F\u53D6\u503C\u8FDB\u884C\u66FF\u6362\uFF0C\u793A\u4F8B\uFF1A${msg.value}\u3001{"name":"${msg.name}","type":"admin"}\u3002\u5982\u679C\u7A7A\uFF0C\u5219\u4F20\u8F93\u5F53\u524D\u8282\u70B9\u6D88\u606F',component:{type:"codeEditor"}},readTimeoutMs:{label:"\u8D85\u65F6\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u9ED8\u8BA4:0",desc:"0\u4EE3\u8868\u4E0D\u8D85\u65F6"},insecureSkipVerify:{label:"\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1",desc:"\u81EA\u7B7E\u8BC1\u4E66\u9700\u8981\u6253\u5F00\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1"},maxParallelRequestsCount:{label:"\u6700\u5927\u5E76\u53D1\u5927\u5C0F",desc:"0\u4EE3\u8868\u4E0D\u9650\u5236"},enableProxy:{label:"\u5F00\u542F\u4EE3\u7406",desc:""},useSystemProxyProperties:{label:"\u4F7F\u7528\u7CFB\u7EDF\u4EE3\u7406\u914D\u7F6E",desc:""},proxyScheme:{label:"\u4EE3\u7406\u534F\u8BAE",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"socks5",value:"socks5"},{label:"http",value:"http"},{label:"https",value:"https"}]},desc:""},proxyHost:{label:"\u4EE3\u7406\u4E3B\u673A",desc:""},proxyPort:{label:"\u4EE3\u7406\u7AEF\u53E3",desc:""},proxyUser:{label:"\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u5BC6\u7801",desc:""}},sendEmail:{label:"\u53D1\u90AE\u4EF6",icon:Qt+"/images/email.svg",desc:'',smtpHost:{label:"SMTP \u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},smtpPort:{label:"SMTP \u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"\u7528\u6237\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},password:{label:"\u6388\u6743\u7801",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},enableTls:{label:"\u662F\u5426\u5F00\u542FTLS",desc:""},email:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"",from:{label:"\u53D1\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},to:{label:"\u6536\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},cc:{label:"\u6284\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},bcc:{label:"\u5BC6\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},subject:{label:"\u90AE\u4EF6\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},body:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6,\u5355\u4F4D\u79D2\u3002\u9ED8\u8BA4:10",desc:""}},ssh:{label:"SSH",icon:Qt+"/images/ssh.svg",desc:'',host:{label:"ssh\u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},port:{label:"ssh\u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"ssh\u767B\u5F55\u7528\u6237\u540D",desc:""},password:{label:"ssh\u767B\u5F55\u5BC6\u7801",desc:""},cmd:{label:"shell\u547D\u4EE4",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},fieldFilter:{label:"\u5B57\u6BB5\u8FC7\u6EE4",desc:'
        • \u7528\u4E8E\u68C0\u67E5\u6D88\u606F\u4F53\u548C\u5143\u6570\u636E\u4E2D\u662F\u5426\u5305\u542B\u6307\u5B9A\u7684\u5B57\u6BB5\u7EC4\u4EF6
        • \u5E2E\u52A9\u6587\u6863
        ',checkAllKeys:{label:"\u662F\u5426\u6EE1\u8DB3\u9700\u8981\u6240\u6709\u5B57\u6BB5key\u5B58\u5728",desc:""},dataNames:{label:"msg data\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"},metadataNames:{label:"metadata\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"}},jsFilter:{label:"js\u8FC7\u6EE4",icon:Qt+"/images/jsFilter.svg",desc:'\u5E2E\u52A9\u6587\u6863',jsScript:{label:"function Filter(msg, metadata, msgType, dataType) {",desc:"}"}},jsSwitch:{label:"js\u8DEF\u7531",desc:'\u5E2E\u52A9\u6587\u6863',jsScript:{label:"function Switch(msg, metadata, msgType, dataType) {",desc:"}"}},msgTypeSwitch:{label:"\u6D88\u606F\u8DEF\u7531",icon:Qt+"/images/msgTypeSwitch.svg",desc:'\u5E2E\u52A9\u6587\u6863'},exprFilter:{label:"\u8868\u8FBE\u5F0F\u8FC7\u6EE4",icon:Qt+"/images/exp.svg",desc:'
        • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u6D88\u606F
        • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
        • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
        • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
        • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
        • \u5E2E\u52A9\u6587\u6863
        ',expr:{label:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.temperature>50\uFF0C\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5E03\u5C14\u7C7B\u578B",rules:[{required:!0,message:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F\u662F\u5FC5\u987B\u7684"}]}},switch:{label:"\u6761\u4EF6\u5206\u652F",icon:Qt+"/images/msgTypeSwitch.svg",desc:'\u5E2E\u52A9\u6587\u6863',cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprTransform:{label:"\u8868\u8FBE\u5F0F\u8F6C\u6362",icon:Qt+"/images/exp.svg",desc:'
        • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684msg
        • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
        • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
        • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
        • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
        • \u5E2E\u52A9\u6587\u6863
        ',expr:{label:"\u8F6C\u6362\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.name\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\u5219\u4F18\u5148\u4F7F\u7528\u8BE5\u5B57\u6BB5\u3002"},mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868\uFF08\u521B\u5EFA\u65B0\u7684Msg\uFF09",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\uFF0C\u6839\u636E\u6307\u5B9A\u7684\u5B57\u6BB5\u548C\u8F6C\u6362\u8868\u8FBE\u5F0F\u521B\u5EFA\u65B0\u7684Msg"}},metadataTransform:{label:"\u5143\u6570\u636E\u8F6C\u6362",icon:Qt+"/images/metadata.svg",desc:'
        • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E
        • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
        • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
        • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
        • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
        • \u5E2E\u52A9\u6587\u6863
        ',mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8F6C\u6362\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u4E0D\u662F\u8868\u8FBE\u5F0F\uFF0C\u4F7F\u7528\u5355\u5F15\u53F7\uFF0C\u5982\uFF1A'xx'"},isNew:{label:"\u662F\u5426\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868",desc:"true:\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868,false:\u66F4\u65B0\u5BF9\u5E94\u7684\u5143\u6570\u636Ekey"}},jsTransform:{label:"js\u8F6C\u6362",desc:'\u5E2E\u52A9\u6587\u6863',jsScript:{label:"function Transform(msg, metadata, msgType, dataType) {",desc:"}"}},net:{label:"TCP/UDP",icon:Qt+"/images/net.svg",desc:'\u5E2E\u52A9\u6587\u6863',protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B:127.0.0.1:6335"},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA460"},heartbeatInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2\uFF0C0\u4E0D\u53D1\u9001\u5FC3\u8DF3"}},flow:{label:"\u5B50\u89C4\u5219\u94FE",desc:"
        • \u5B50\u89C4\u5219\u94FE\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u89C4\u5219\u94FE\u5D4C\u5957\u3002
        ",targetId:{label:"\u5B50\u89C4\u5219\u94FEID",desc:"",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:async function(t,e,n,r){if(!r){let o=[];try{const{data:i}=await cq(!1,"",1,500,!1);i==null||i.items.forEach(a=>{o.push({value:a.ruleChain.id,label:a.ruleChain.name})})}catch{}finally{n.component.options=o}}}}},extend:{label:"\u7EE7\u627F\u6A21\u5F0F",desc:"\u5982\u679C\u5F00\u542F\uFF0C\u4E0D\u5408\u5E76\u5B50\u89C4\u5219\u94FE\u8F93\u51FA\u5173\u7CFB\u548C\u6D88\u606F",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}]}},ref:{label:"\u8282\u70B9\u5F15\u7528",icon:Qt+"/images/ref.svg",relationTypeAllowCreate:!0,relationTypes:[{label:"\u6210\u529F",value:"Success"},{label:"\u5931\u8D25",value:"Failure"},{label:"\u771F",value:"True"},{label:"\u5047",value:"False"}],desc:"
        • \u5F15\u7528\u6307\u5B9A\u89C4\u5219\u94FE\u6216\u8005\u5F53\u524D\u89C4\u5219\u94FE\u8282\u70B9\uFF0C\u7528\u4E8E\u8282\u70B9\u590D\u7528\u3002
        ",targetId:{label:"\u8282\u70B9ID",desc:"\u5F15\u7528\u672C\u89C4\u5219\u94FE\u4E2D\u7684\u5176\u4ED6\u8282\u70B9",rules:[{required:!0,message:"\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:u1}}},groupFilter:{label:"\u8FC7\u6EE4\u5668\u7EC4",icon:Qt+"/images/groupFilter.svg",desc:'\u5E2E\u52A9\u6587\u6863',allMatches:{label:"\u662F\u5426\u9700\u8981\u5168\u5339\u914D",desc:""},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:u1,strategy:"allNodes"}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"},nodeType:"group-node"},groupAction:{label:"\u8282\u70B9\u7EC4",desc:'
        • \u5F02\u6B65\u6267\u884C\u591A\u4E2A\u8282\u70B9\uFF0C\u628A\u6240\u6709\u8282\u70B9\u7ED3\u679C\u5408\u5E76\uFF0C\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
        • \u5982\u679C\u5339\u914D\u5230\u6307\u5B9A\u6570\u91CF\u8282\u70B9\u90FD\u662F\u6307\u5B9A\u5173\u7CFB\u7C7B\u578B\uFF0C\u5219\u628A\u6570\u636E\u5230`Success`\u94FE, \u5426\u5219\u53D1\u5230`Failure`\u94FE
        • \u5E2E\u52A9\u6587\u6863
        ',icon:Qt+"/images/groupAction.svg",matchRelationType:{label:"\u5339\u914D\u5173\u7CFB\uFF0C\u9ED8\u8BA4Success",desc:""},matchNum:{label:"\u5339\u914D\u6EE1\u8DB3\u8282\u70B9\u6570\u91CF\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u8868\u793A\u6240\u6709\u8282\u70B9\u90FD\u6EE1\u8DB3\u6307\u5B9A\u5173\u7CFB"},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:u1,strategy:"allNodes"}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"},nodeType:"group-node"},iterator:{label:"\u8FED\u4EE3\u5668",desc:"
        • \u5F03\u7528\uFF0C\u4F7F\u7528for\u7EC4\u4EF6\u4EE3\u66FF
        • \u904D\u5386msg\u6216\u8005msg\u4E2D\u6307\u5B9A\u5B57\u6BB5item\u503C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u904D\u5386\u5B57\u6BB5\u503C\u5FC5\u987B\u662F`\u6570\u7EC4`\u6216\u8005`{key:value}`\u7C7B\u578B
        • \u5982\u679Citem\u6EE1\u8DB3jsScript\uFF0C\u5219\u4F1A\u628Aitem\u6570\u636E\u901A\u8FC7`True`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u5426\u5219\u901A\u8FC7`False`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
        • \u5982\u679C\u627E\u4E0D\u5230\u6307\u5B9A\u5B57\u6BB5\u3001js\u811A\u672C\u6267\u884C\u5931\u8D25\u6216\u8005\u904D\u5386\u7684\u5BF9\u8C61\u4E0D\u662F `\u6570\u7EC4`\u6216\u8005`{key:value}`\uFF0C\u5219\u4F1A\u628A\u9519\u8BEF\u4FE1\u606F\u901A\u8FC7`Failure`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
        • \u904D\u5386\u7ED3\u675F\u540E\uFF0C\u901A\u8FC7`Success`\u94FE\u628A\u539F\u59CBmsg\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
        ",icon:Qt+"/images/iterator.svg",fieldName:{label:"\u904D\u5386\u5B57\u6BB5",desc:"\u5982\u679C\u7A7A\uFF0C\u904D\u5386\u6574\u4E2Amsg\uFF0C\u652F\u6301\u5D4C\u5957\u65B9\u5F0F\u83B7\u53D6msg\u5B57\u6BB5\u503C\uFF0C\u4F8B\u5982items.value\u3001items"},jsScript:{label:"function Filter(item,index,metadata) {",desc:"} \u5339\u914Ditem\u7684js\u811A\u672C\uFF0C\u53EF\u9009\uFF0C\u5982\u679C\u7A7A\u5219\u904D\u5386\u6240\u6709item"}},join:{label:"\u5408\u5E76",desc:'',icon:Qt+"/images/join.svg",timeout:{label:"\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},fork:{label:"\u5E76\u884C\u7F51\u5173",desc:'',icon:Qt+"/images/fork.svg"},"text/template":{label:"\u6A21\u677F\u8F6C\u6362",icon:Qt+"/images/template.svg",desc:'\u5E2E\u52A9\u6587\u6863',template:{label:"\u6A21\u677F\u5185\u5BB9\u6216\u8005\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u662F\u6A21\u677F\u6587\u4EF6\u8DEF\u5F84\u4F7F\u7528file:\u5F00\u5934",component:{type:"codeEditor"}}},exec:{label:"\u547D\u4EE4\u884C",icon:Qt+"/images/ssh.svg",desc:"
        • \u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4
        ",cmd:{label:"\u6267\u884C\u547D\u4EE4",desc:"",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"x/redisClient":{label:"Redis",icon:Qt+"/images/redis.svg",desc:'\u5E2E\u52A9\u6587\u6863',server:{label:"redis\u670D\u52A1\u5668\u5730\u5740",desc:"",rules:[{required:!0,message:"redis\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},cmd:{label:"\u6267\u884C\u547D\u4EE4\uFF0C\u4F8B\u5982SET/GET/DEL/HMSET/HMGET",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},paramsExpr:{label:"\u547D\u4EE4\u52A8\u6001\u53C2\u6570",desc:'\u652F\u6301Expr\u8868\u8FBE\u5F0F\u3002\u5982:["myhash2", "field1", "value1"]\uFF0C\u6216\u8005\u901A\u8FC7\u53D8\u91CF\u53D6\u503C\u5982:msg\u8868\u793A\u53D6\u6D88\u606F\u8D1F\u8377\u3002\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u548C\u547D\u4EE4\u9759\u6001\u53C2\u6570\uFF0C\u4F18\u5148\u53D6\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u503C\u3002'},params:{label:"\u547D\u4EE4\u9759\u6001\u53C2\u6570",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377"}},"x/redisPub":{label:"Redis\u53D1\u5E03\u8005",icon:Qt+"/images/redis.svg",desc:'\u5E2E\u52A9\u6587\u6863',server:{label:"redis\u670D\u52A1\u5668\u5730\u5740",desc:"",rules:[{required:!0,message:"redis\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},channel:{label:"\u53D1\u5E03\u901A\u9053",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E",rules:[{required:!0,message:"\u53D1\u5E03\u901A\u9053\u662F\u5FC5\u987B\u7684"}]}},"x/kafkaProducer":{label:"Kafka\u53D1\u5E03\u8005",icon:Qt+"/images/kafka.svg",desc:'\u5E2E\u52A9\u6587\u6863',server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u670D\u52A1\u5668\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},topic:{label:"\u53D1\u5E03\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u4E3B\u9898\u662F\u5FC5\u987B\u7684"}]},key:{label:"\u5206\u533A\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},partition:{label:"\u5206\u533A\u7F16\u53F7",desc:""},sasl:{label:"\u8BA4\u8BC1\u914D\u7F6E",desc:"",enable:{label:"\u542F\u7528SASL\u8BA4\u8BC1"},mechanism:{label:"\u8BA4\u8BC1\u673A\u5236",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"PLAIN",value:"PLAIN"},{label:"SCRAM-SHA-256",value:"SCRAM-SHA-256"},{label:"SCRAM-SHA-512",value:"SCRAM-SHA-512"}]}},username:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801"}},tls:{label:"TLS\u914D\u7F6E",desc:"",enable:{label:"\u542F\u7528TLS"},insecureSkipVerify:{label:"\u8DF3\u8FC7\u8BC1\u4E66\u9A8C\u8BC1"}}},"x/pulsarClient":{label:"Pulsar\u53D1\u5E03\u8005",icon:Qt+"/images/pulsar.svg",desc:'\u5E2E\u52A9\u6587\u6863'},"x/nsqClient":{label:"NSQ\u53D1\u5E03\u8005",icon:Qt+"/images/nsq.png",desc:'\u5E2E\u52A9\u6587\u6863'},"x/luaFilter":{label:"Lua\u811A\u672C\u8FC7\u6EE4",icon:Qt+"/images/lua.svg",desc:'
        • \u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4\u3002\u6839\u636E\u811A\u672C\u8FD4\u56DE\u503C\u8DEF\u7531\u5230True\u6216\u8005False\u94FE\u3002
        • \u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C
        • \u5E2E\u52A9\u6587\u6863
        ',script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/luaTransform":{label:"Lua\u811A\u672C\u8F6C\u6362",icon:Qt+"/images/lua.svg",desc:'
        • lua\u811A\u672C\u8F6C\u6362\u5668\u3002\u53EF\u4EE5\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A\u3002
        • \u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C
        • \u5E2E\u52A9\u6587\u6863
        ',script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/natsClient":{label:"NATS",icon:Qt+"/images/nats.svg",desc:"
        • NATS\u5BA2\u6237\u7AEF\u7EC4\u4EF6\u3002\u7528\u4E8E\u5C06\u6D88\u606F\u53D1\u5E03\u5230NATS\u6D88\u606F\u670D\u52A1\u5668\u7684\u6307\u5B9A\u4E3B\u9898\u3002
        ",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""}},"x/rabbitmqClient":{label:"RabbitMQ",icon:Qt+"/images/rabbitmq.svg",desc:"
        • \u53D1\u6D88\u606F\u8D1F\u8377\u53D1\u9001\u5230rabbitmq\u961F\u5217
        • \u652F\u6301AMQP\u534F\u8BAE
        ",server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},key:{label:"\u8DEF\u7531\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"\u53EF\u9009\u7C7B\u578B\uFF1Adirect/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""}},"x/opengeminiWrite":{label:"opengemini\u5199",icon:Qt+"/images/opengemini-write.svg",desc:"OpenGemini\u5199\u5165\u5BA2\u6237\u7AEF\u3002\u7528\u4E8E\u5C06\u6D88\u606F\u6570\u636E\u5199\u5165OpenGemini\u65F6\u5E8F\u6570\u636E\u5E93\u670D\u52A1\u5668",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"}},"x/opengeminiQuery":{label:"opengemini\u8BFB",icon:Qt+"/images/opengemini.svg",desc:"OpenGemini\u67E5\u8BE2\u5BA2\u6237\u7AEF\u3002\u7528\u4E8E\u4ECEOpenGemini\u65F6\u5E8F\u6570\u636E\u5E93\u670D\u52A1\u5668\u67E5\u8BE2\u548C\u8BFB\u53D6\u6570\u636E",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"},command:{label:"\u67E5\u8BE2\u8BED\u53E5",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]}},"x/grpcClient":{label:"gRPC \u5BA2\u6237\u7AEF",icon:Qt+"/images/grpc.svg",desc:"
        • \u52A8\u6001\u8C03\u7528gRPC\u670D\u52A1
        ",server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}\u3002\u5982\u679C\u7A7A\uFF0C\u5219\u4F7F\u7528\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u3002\u53C2\u6570\u4F7F\u7528JSON\u7F16\u7801\uFF0C\u5FC5\u987B\u548Cservice/method\u8981\u6C42\u4E00\u81F4\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF',component:{type:"textarea"}},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF"}},"x/mongodbClient":{label:"MongoDB",icon:Qt+"/images/mongodb.svg",desc:"
        • MongoDB \u5BA2\u6237\u7AEF
        ",server:{label:"MongoDB\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},collection:{label:"\u96C6\u5408",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},opType:{label:"\u64CD\u4F5C\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u63D2\u5165",value:"INSERT"},{label:"\u67E5\u8BE2",value:"QUERY"},{label:"\u66F4\u65B0",value:"UPDATE"},{label:"\u5220\u9664",value:"DELETE"}]},rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},filter:{label:"\u8FC7\u6EE4\u6761\u4EF6",desc:'\u67E5\u8BE2\u662F\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"age"": {"$gte": 18 }\u3002'},doc:{label:"\u66F4\u65B0/\u63D2\u5165\u6587\u6863",desc:'\u67E5\u8BE2\u6216\u8005\u5220\u9664\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"name":"test","age":18}\u3002'},one:{label:"\u662F\u5426\u64CD\u4F5C1\u6761\u8BB0\u5F55",desc:""}},"ai/createImage":{label:"AI\u56FE\u50CF\u751F\u6210",icon:Qt+"/images/generate-image.svg",desc:"
        • \u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u56FE\u7247
        ",url:{label:"API\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"dall-e-3",value:"dall-e-3"},{label:"dall-e-2",value:"dall-e-2"}]}},prompt:{label:"\u56FE\u50CF\u751F\u6210\u7684\u63D0\u793A",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"textarea"}},n:{label:"\u751F\u6210\u56FE\u50CF\u7684\u6570\u91CF",desc:"",component:{type:"slider",showInput:!0,showTooltip:!0,min:1,max:10,step:1}},responseFormat:{label:"\u54CD\u5E94\u683C\u5F0F",desc:"\u9ED8\u8BA4:url",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"url",value:"url"},{label:"b64_json",value:"b64_json"}]}},quality:{label:"\u56FE\u50CF\u8D28\u91CF",desc:"\u9ED8\u8BA4:standard",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"standard",value:"standard"},{label:"hd",value:"hd"}]}},size:{label:"\u56FE\u50CF\u5C3A\u5BF8",desc:"\u9ED8\u8BA4:1024x1024",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"256x256",value:"256x256"},{label:"512x512",value:"512x512"},{label:"1024x1024",value:"1024x1024"},{label:"1792x1024",value:"1792x1024"},{label:"1024x1792",value:"1024x1792"}]}},style:{label:"\u56FE\u50CF\u98CE\u683C",desc:"\u9ED8\u8BA4:vivid",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"vivid",value:"vivid"},{label:"natural",value:"natural"}]}}},"ai/llm":{label:"AI\u6587\u672C\u751F\u6210",icon:Qt+"/images/generate-text.svg",desc:"
        • \u901A\u8FC7\u63D0\u793A\u8BCD\u751F\u6210\u6587\u672C
        ",url:{label:"API\u5730\u5740",desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"DeepSeek-R1-Distill-Qwen-32B",value:"DeepSeek-R1-Distill-Qwen-32B"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"Qwen2-7B-Instruct",value:"Qwen2-7B-Instruct"},{label:"Qwen2-VL-72B",value:"Qwen2-VL-72B"},{label:"o1-mini",value:"o1-mini"},{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]}},systemPrompt:{label:"\u7CFB\u7EDF\u63D0\u793A",desc:"\u7528\u4E8E\u9884\u5148\u5B9A\u4E49\u6A21\u578B\u7684\u57FA\u7840\u884C\u4E3A\u6846\u67B6\u548C\u54CD\u5E94\u98CE\u683C\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF",component:{type:"textarea"}},messages:{label:"\u4E0A\u4E0B\u6587/\u7528\u6237\u6D88\u606F\u5217\u8868",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"table",options:[{name:"role",label:"\u89D2\u8272",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",multiple:!1,options:[{label:"USER",value:"user"},{label:"ASSISTANT",value:"assistant"}]}},{name:"content",label:"\u6D88\u606F\u5185\u5BB9",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"USER\u89D2\u8272\uFF1A\u5411\u6A21\u578B\u63D0\u4F9B\u6307\u4EE4\u3001\u67E5\u8BE2\u6216\u4EFB\u4F55\u57FA\u4E8E\u6587\u672C\u7684\u8F93\u5165\u3002 ASSISTANT\u89D2\u8272\uFF1A\u57FA\u4E8E\u7528\u6237\u6D88\u606F\u7684\u6A21\u578B\u56DE\u590D",component:{type:"textarea"}}]}},images:{label:"\u89C6\u89C9",desc:"\u56FE\u50CFURL\u5217\u8868\uFF0C\u5927\u6A21\u578B\u5C06\u6839\u636E\u56FE\u50CF\u5185\u5BB9\u7684\u7406\u89E3\u56DE\u7B54\u7528\u6237\u95EE\u9898\u3002\u8BE5\u529F\u80FD\u9700\u8981\u5927\u6A21\u578Bapi\u652F\u6301(Qwen2-VL-72B\u652F\u6301\u89C6\u89C9)\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF"},params:{label:"\u5927\u6A21\u578B\u53C2\u6570",desc:"",temperature:{label:"\u6E29\u5EA6",desc:"\u91C7\u6837\u6E29\u5EA6\u63A7\u5236\u8F93\u51FA\u7684\u968F\u673A\u6027\u3002\u6E29\u5EA6\u503C\u5728 [0.0, 2.0] \u8303\u56F4\u5185\uFF0C\u503C\u8D8A\u9AD8\uFF0C\u8F93\u51FA\u8D8A\u968F\u673A\u548C\u521B\u9020\u6027\uFF1B\u503C\u8D8A\u4F4E\uFF0C\u8F93\u51FA\u8D8A\u7A33\u5B9A\u3002",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:2,step:.1}},topP:{label:"Top P",desc:"\u901A\u8FC7\u6838\u5FC3\u91C7\u6837\u63A7\u5236\u591A\u6837\u6027\uFF1A0.5\u8868\u793A\u8003\u8651\u4E86\u4E00\u534A\u7684\u6240\u6709\u53EF\u80FD\u6027\u52A0\u6743\u9009\u9879\u3002\u53D6\u503C\u8303\u56F4\uFF1A[0.0, 1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},presencePenalty:{label:"\u5B58\u5728\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u5DF2\u6709\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},frequencyPenalty:{label:"\u9891\u7387\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u51FA\u73B0\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A\u3002\u53D6\u503C\u8303\u56F4[0.0,1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},maxTokens:{label:"\u6700\u5927\u8F93\u51FA\u957F\u5EA6",desc:"",component:{type:"input-number",min:0,max:1e6,step:10}},stop:{label:"\u6A21\u578B\u505C\u6B62\u8F93\u51FA\u7684\u6807\u8BB0",desc:""},responseFormat:{label:"\u8F93\u51FA\u7ED3\u679C\u7684\u683C\u5F0F",desc:"\u53D6\u503C\uFF1Atext\u3001json_object\u3001json_schema\u3002\u9ED8\u8BA4\u4E3A text\u3002",component:{type:"select",multiple:!1,options:[{label:"text",value:"text"},{label:"json_object",value:"json_object"},{label:"json_schema",value:"json_schema"}]}},jsonSchema:{label:"JSON Schema",desc:"",component:{type:"codeEditor"}},keepThink:{label:"\u662F\u5426\u4FDD\u7559\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B",desc:"\u53EA\u5BF9text\u54CD\u5E94\u683C\u5F0F\u751F\u6548"}}},"ci/exec":{label:"\u547D\u4EE4\u884C",icon:Qt+"/images/ssh.svg",desc:"
        • \u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4
        ",command:{label:"\u6267\u884C\u547D\u4EE4",desc:""},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"ci/gitClone":{label:"Git\u62C9\u53D6",icon:Qt+"/images/git.svg",desc:"
        • git\u514B\u9686\u6216\u8005\u62C9\u53D6\u4ED3\u5E93\u4EE3\u7801
        ",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/rulego/rulego.git"},directory:{label:"\u514B\u9686\u5230\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},reference:{label:"\u5F15\u7528\u540D\u79F0",desc:"\u53EF\u4EE5\u662F\u5206\u652F\u540D\u3001\u6807\u7B7E\u540D\u5B8C\u6574\u5F15\u7528\u540D\u3002\u4F8B\u5982\uFF1Arefs/heads/main\u3002\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2Dref\u503C"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406URL",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitPush":{label:"Git\u63A8\u9001",icon:Qt+"/images/git-push.svg",desc:"
        • git\u63A8\u9001
        • ",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/rulego/rulego.git"},directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},refSpecs:{label:"\u672C\u5730\u5206\u652F\u4E0E\u8FDC\u7A0B\u5206\u652F\u6620\u5C04\u5173\u7CFB",desc:"\u4F8B\u5982\uFF1Arefs/heads/your-branch:refs/heads/your-branch\uFF0C\u591A\u4E2A\u6620\u5C04\u5173\u7CFB\u4E0E\u9017\u53F7\u9694\u5F00"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406\u5730\u5740",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitCommit":{label:"Git\u63D0\u4EA4",icon:Qt+"/images/git-commit.svg",desc:"
          • git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE
          • ",directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},pattern:{label:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F",desc:"\u5FC5\u987B\u5F53\u524D\u5DE5\u4F5C\u533A\u76F8\u5BF9\u76EE\u5F55\u3002\u4F8B\u5982\uFF1A/example/*.go",rules:[{required:!0,message:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F\u662F\u5FC5\u987B\u7684"}]},message:{label:"Git\u63D0\u4EA4",desc:"",rules:[{required:!0,message:"\u63D0\u4EA4\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/gitCreateTag":{label:"Git\u521B\u5EFA\u6807\u7B7E",icon:Qt+"/images/git-tag.svg",desc:"
            • git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE
            ",directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},tag:{label:"\u6807\u7B7E\u540D\u79F0",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},message:{label:"\u6807\u7B7E\u6D88\u606F",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/gitLog":{label:"\u83B7\u53D6Git\u65E5\u5FD7",icon:Qt+"/images/git-log.svg",desc:"
            • \u83B7\u53D6git\u63D0\u4EA4\u65E5\u5FD7
            ",directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u5141\u8BB8\u901A\u8FC7\u53D8\u91CF${msg.xx}\u83B7\u53D6\u3002\u9ED8\u8BA4\u53D6${metadata.workDir}\u503C"},limit:{label:"\u6700\u5927\u65E5\u5FD7\u6570\u91CF",desc:"",rules:[]},startTime:{label:"\u8D77\u59CB\u63D0\u4EA4\u65F6\u95F4",desc:"\u5141\u8BB8\u901A\u8FC7\u53D8\u91CF${msg.xx}\u83B7\u53D6\u3002yyyy-MM-dd\u6216\u8005yyyy-MM-dd HH:mm:ss \u683C\u5F0F\u793A\u4F8B\uFF1A2006-01-02 15:04:05"},endTime:{label:"\u7ED3\u675F\u63D0\u4EA4\u65F6\u95F4",desc:"\u5141\u8BB8\u901A\u8FC7\u53D8\u91CF${msg.xx}\u83B7\u53D6\u3002yyyy-MM-dd\u6216\u8005yyyy-MM-dd HH:mm:ss \u683C\u5F0F\u793A\u4F8B\uFF1A2006-01-02 15:04:05"}},"ci/ps":{label:"\u670D\u52A1\u5668\u6307\u6807",icon:Qt+"/images/ps.svg",desc:"\u7528\u4E8E\u76D1\u63A7\u670D\u52A1\u5668CPU\u3001\u5185\u5B58\u3001\u78C1\u76D8\u7B49\u6307\u6807\u3002",options:{label:"\u6307\u6807\u5217\u8868",desc:"\u5982\u679C\u4E3A\u7A7A\uFF0C\u5219\u67E5\u8BE2\u6240\u6709\u6307\u6807",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!0,options:[{label:"\u4E3B\u673A\u4FE1\u606F",value:"host/info"},{label:"CPU\u4FE1\u606F",value:"cpu/info"},{label:"\u865A\u62DF\u5185\u5B58\u4FE1\u606F",value:"mem/virtualMemory"},{label:"\u4EA4\u6362\u5185\u5B58\u4FE1\u606F",value:"mem/swapMemory"},{label:"\u78C1\u76D8\u4F7F\u7528\u60C5\u51B5",value:"disk/usage"},{label:"\u78C1\u76D8IO\u8BA1\u6570\u5668\u4FE1\u606F",value:"disk/ioCounters"},{label:"\u7F51\u7EDCIO\u8BA1\u6570\u5668\u4FE1\u606F",value:"net/ioCounters"},{label:"\u7F51\u7EDC\u63A5\u53E3\u4FE1\u606F",value:"net/interfaces"}],placeholder:"\u8BF7\u9009\u62E9\u67E5\u8BE2\u6307\u6807"}}},"action/sagoo/deviceaction":{label:"\u8BBE\u5907\u52A8\u4F5C",icon:Qt+"/images/deviceaction.svg",desc:"
            • \u7528\u4E8E\u6267\u884C\u8BBE\u5907\u7684\u64CD\u4F5C
            ",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},triggerType:{label:"\u64CD\u4F5C\u7C7B\u578B",desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u8BBE\u5907\u529F\u80FD\u8C03\u7528",value:"functionCall"},{label:"\u83B7\u53D6\u8BBE\u5907\u5C5E\u6027",value:"getProperties"},{label:"\u8BBE\u7F6E\u8BBE\u5907\u5C5E\u6027",value:"setProperties"}],placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"}},funcKey:{label:"\u529F\u80FD\u6807\u8BC6",desc:"\u5E73\u53F0\u8BBE\u7F6E\u7684\u529F\u80FD\u7684Key"},parameter:{label:"\u8BF7\u6C42\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},"x/opcuaRead":{label:"OPC_UA\u8BFB",icon:Qt+"/images/opcua_read.svg",category:"iot",desc:"
            • \u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002
            • ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcuaWrite":{label:"OPC_UA\u5199",icon:Qt+"/images/opcua_write.svg",category:"iot",desc:"
              • \u628A\u6D88\u606F\u8D1F\u8377\u70B9\u4F4D\u6570\u636E\u5217\u8868\uFF0C\u5199\u5165OPCUA\u670D\u52A1\u5668\u3002
              ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/otel":{label:"OpenTelemetry",icon:Qt+"/images/otel.svg",desc:"
              • \u901A\u8FC7OTLP\u534F\u8BAE\u628A\u6307\u6807\u53D1\u9001\u5230\u540E\u7AEF\u7CFB\u7EDF\uFF0C\u5982\uFF1APrometheus\u3001Datadog\u3001InfluxDB\u7B49
              ",server:{label:"OTLP\u540E\u7AEF\u7CFB\u7EDF\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: localhost:4318",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},protocol:{label:"\u4F20\u8F93\u534F\u8BAE",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"HTTP",value:"HTTP"},{label:"gRPC",value:"GRPC"}]}},metricExpr:{label:"\u6307\u6807\u914D\u7F6E\u8868\u8FBE\u5F0F",desc:"\u793A\u4F8B: ${msg.metrics} \u6307\u6807\u914D\u7F6E\u8868\u8FBE\u5F0F \u548C \u6307\u6807\u914D\u7F6E \u53EF\u4EE5\u540C\u65F6\u5B58\u5728"},metrics:{label:"\u6307\u6807\u914D\u7F6E",rules:[],component:{type:"table",options:[{name:"metricName",label:"\u6307\u6807\u540D\u79F0",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},{name:"unit",label:"\u5355\u4F4D",type:"string",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"ms",value:"ms"},{label:"s",value:"s"},{label:"B",value:"B"},{label:"KB",value:"KB"},{label:"MB",value:"MB"},{label:"G",value:"G"},{label:"1",value:"1"},{label:"%",value:"%"}]}},{name:"opType",label:"\u64CD\u4F5C\u7C7B\u578B",type:"string",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u8BA1\u6570\u5668",value:"COUNTER"},{label:"\u4EEA\u8868\u76D8",value:"GAUGE"},{label:"\u76F4\u65B9\u56FE",value:"HISTOGRAM"}]}},{name:"description",label:"\u6307\u6807\u63CF\u8FF0",type:"string",component:{type:"textarea"}},{name:"value",label:"\u503C\u8868\u8FBE\u5F0F",desc:"\u5982\uFF1A${msg.ipCount}",type:"string"},{name:"labels",label:"\u6807\u7B7E\u8868\u8FBE\u5F0F",desc:"\u5982\uFF1A${msg.labels}",type:"string"}]}}},"x/wukongimSender":{label:"WuKongIM\u53D1",icon:Qt+"/images/wukongim.svg",desc:"
              • \u628A\u6D88\u606F\u8D1F\u8377\u53D1\u9001\u5230WuKongIM\u6307\u5B9A\u9891\u9053\u6216\u7528\u6237
              ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: tcp://172.22.245.108:15100",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},uID:{label:"\u7528\u6237ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},token:{label:"\u767B\u5F55\u5BC6\u7801",desc:""},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2",desc:""},protoVersion:{label:"\u534F\u8BAE\u7248\u672C",desc:"\u793A\u4F8B:3"},pingInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:"\u793A\u4F8B:30"},reconnect:{label:"\u662F\u5426\u81EA\u52A8\u91CD\u8FDE",desc:""},autoAck:{label:"\u662F\u5426\u81EA\u52A8\u786E\u8BA4\u6D88\u606F",desc:""},channelType:{label:"\u9891\u9053\u7C7B\u578B",desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u4E2A\u4EBA\u9891\u9053",value:"1"},{label:"\u7FA4\u7EC4\u9891\u9053",value:"2"},{label:"\u5BA2\u670D\u9891\u9053",value:"3"},{label:"\u793E\u533A\u9891\u9053",value:"4"},{label:"\u793E\u533A\u8BDD\u9898\u9891\u9053",value:"5"},{label:"\u8D44\u8BAF\u9891\u9053",value:"6"},{label:"\u6570\u636E\u9891\u9053",value:"7"}]}},channelID:{label:"\u9891\u9053ID",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\u3002\u5982\u679C\u662F\u4E2A\u4EBA\u9891\u9053\u586B\u7528\u6237ID"},noPersist:{label:"\u662F\u5426\u4E0D\u5B58\u50A8",desc:""},syncOnce:{label:"\u662F\u5426\u540C\u6B65\u4E00\u6B21",desc:""},redDot:{label:"\u662F\u5426\u663E\u793A\u7EA2\u70B9",desc:""},noEncrypt:{label:"\u662F\u5426\u4E0D\u9700\u8981\u52A0\u5BC6",desc:""}},"x/modbus":{label:"Modbus\u8BFB\u5199",icon:Qt+"/images/modbus.svg",category:"iot",desc:"
              • \u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002
              • \u5E2E\u52A9\u6587\u6863
              ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u670D\u52A1\u5668\u5730\u5740\uFF0C\u683C\u5F0F\u4E3A\uFF1A:// \u793A\u4F8B: tcp://hostname-or-ip-address:502; rtu:///dev/ttyUSB0",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},cmd:{label:"Modbus\u65B9\u6CD5\u540D\u79F0",desc:"Modbus\u547D\u4EE4\u540D\u79F0",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u8BFB\u53D6\u7EBF\u5708\u72B6\u6001",value:"ReadCoils"},{label:"\u8BFB\u53D6\u5355\u4E2A\u7EBF\u5708\u72B6\u6001",value:"ReadCoil"},{label:"\u8BFB\u53D6\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInputs"},{label:"\u8BFB\u53D6\u5355\u4E2A\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInput"},{label:"\u8BFB\u53D6\u5BC4\u5B58\u5668",value:"ReadRegisters"},{label:"\u8BFB\u53D6\u5355\u4E2A\u5BC4\u5B58\u5668",value:"ReadRegister"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64"},{label:"\u8BFB\u53D6\u5B57\u8282\u6570\u636E",value:"ReadBytes"},{label:"\u8BFB\u53D6\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"ReadRawBytes"},{label:"\u5199\u5165\u7EBF\u5708\u72B6\u6001",value:"WriteCoil"},{label:"\u5199\u5165\u591A\u4E2A\u7EBF\u5708\u72B6\u6001",value:"WriteCoils"},{label:"\u5199\u5165\u5BC4\u5B58\u5668",value:"WriteRegister"},{label:"\u5199\u5165\u591A\u4E2A\u5BC4\u5B58\u5668",value:"WriteRegisters"},{label:"\u5199\u5165\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32s"},{label:"\u5199\u5165\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32s"},{label:"\u5199\u5165\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64s"},{label:"\u5199\u5165\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64s"},{label:"\u5199\u5165\u5B57\u8282\u6570\u636E",value:"WriteBytes"},{label:"\u5199\u5165\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"WriteRawBytes"}]}},unitId:{label:"\u4ECE\u673A\u7F16\u53F7",desc:"\u4F7F\u7528\u7684\u5355\u5143\u7F16\u53F7\uFF08\u4ECE\u673A\u7F16\u53F7\uFF09\uFF0C\u683C\u5F0F\uFF1Auint8\uFF0C\u793A\u4F8B\uFF1A1",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},address:{label:"\u5BC4\u5B58\u5668\u5730\u5740",desc:"\u5BC4\u5B58\u5668\u5730\u5740\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u683C\u5F0F\uFF1Auint16\uFF0C\u793A\u4F8B\uFF1A50\u6216\u80050x32"},quantity:{label:"\u5BC4\u5B58\u5668\u6570\u91CF",desc:"\u5BC4\u5B58\u5668\u6570\u91CF\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u793A\u4F8B\uFF1A1"},value:{label:"\u5BC4\u5B58\u5668\u503C",desc:"\u5BC4\u5B58\u5668\u503C\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\u3002\u8BFB\u5219\u4E0D\u9700\u8981\u63D0\u4F9B\uFF0C\u5982\u679C\u5199\u5165\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00\uFF0C\u4F8B\u5982\uFF1A0x01,0x01 true 51,52"},regType:{label:"\u5BC4\u5B58\u5668\u7C7B\u578B",desc:"\u5BC4\u5B58\u5668\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u4FDD\u6301\u5BC4\u5B58\u56680x3",value:"0"},{label:"\u8F93\u5165\u5BC4\u5B58\u56680x4",value:"1"}]}},encodingConfig:{label:"\u7F16\u7801\u914D\u7F6E",desc:"",endianness:{label:"\u5B57\u8282\u5E8F",desc:"\u5BC4\u5B58\u5668\u7684\u5B57\u8282\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u5927\u7AEF\u5E8F",value:1},{label:"\u5C0F\u7AEF\u5E8F",value:2}]}},wordOrder:{label:"\u5B57\u5E8F",desc:"32\u4F4D\u5BC4\u5B58\u5668\u7684\u5B57\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u9AD8\u5B57\u5728\u524D",value:1},{label:"\u4F4E\u5B57\u5728\u524D",value:2}]}}},rtuConfig:{label:"RTU\u914D\u7F6E",desc:"",parity:{label:"\u6821\u9A8C\u4F4D",desc:"\u4E32\u884C\u94FE\u8DEF\u7684\u6821\u9A8C\u6A21\u5F0F\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u65E0\u6821\u9A8C",value:0},{label:"\u5076\u6821\u9A8C",value:1},{label:"\u5947\u6821\u9A8C",value:2}]}},speed:{label:"\u4E32\u884C\u6CE2\u7279\u7387",desc:"\u8BBE\u7F6E\u4E32\u884C\u94FE\u8DEF\u6CE2\u7279\u7387\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"38400",value:38400},{label:"19200",value:19200},{label:"9600",value:9600},{label:"4800",value:4800}]}},dataBits:{label:"\u6570\u636E\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u5B57\u7B26\u7684\u6570\u636E\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"},stopBits:{label:"\u505C\u6B62\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u505C\u6B62\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"}},tcpConfig:{label:"TCP\u914D\u7F6E",desc:"",timeout:{label:"\u8D85\u65F6\u65F6\u95F4",desc:"\u8BBE\u7F6E\u8BF7\u6C42\u8D85\u65F6\u503C\uFF0C\u5355\u4F4D\u4E3A\u79D2"},certPath:{label:"\u8BC1\u4E66\u8DEF\u5F84",desc:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"},keyPath:{label:"\u5BC6\u94A5\u8DEF\u5F84",desc:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84"},caPath:{label:"CA\u8BC1\u4E66\u8DEF\u5F84",desc:"CA\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"}}},"x/streamTransform":{label:"\u6D41\u8F6C\u6362\u5668",icon:Qt+"/images/stream-transform.svg",desc:"\u901A\u8FC7sql\u8BED\u53E5\u8F6C\u6362\u548C\u8FC7\u6EE4\u8F93\u5165\u6570\u636E",sql:{label:"\u8F6C\u6362SQL",desc:"\u793A\u4F8B:SELECT temperature, humidity, temperature * 1.8 + 32 as temp_fahrenheit FROM stream WHERE temperature > 20",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"sql"}}},"x/streamAggregator":{label:"\u6D41\u805A\u5408\u5668",icon:Qt+"/images/stream-aggregator.svg",relationTypes:[{label:"\u6210\u529F",value:"Success"},{label:"\u5931\u8D25",value:"Failure"},{label:"\u7A97\u53E3\u4E8B\u4EF6",value:"window_event"}],desc:"\u901A\u8FC7sql\u8BED\u53E5\u8F6C\u6362\u548C\u8FC7\u6EE4\u8F93\u5165\u6570\u636E",sql:{label:"\u805A\u5408SQL",desc:"\u793A\u4F8B:SELECT deviceId, AVG(temperature) as avg_temp, MAX(temperature) as max_temp, COUNT(*) as count FROM stream GROUP BY deviceId, TumblingWindow('2s')",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"sql"}}}}},Input:"\u8F93\u5165",relationTypes:{Success:"\u6210\u529F",Failure:"\u5931\u8D25",True:"\u771F",False:"\u5047",window_event:"\u7A97\u53E3\u4E8B\u4EF6"}};function hq(t){if(!t)return null;const{ruleChain:e,metadata:n}=t,{endpoints:r}=n||{};return!e.root&&Array.isArray(r)&&r.length>0?new Error("\u5B50\u89C4\u5219\u94FE\u4E0D\u5141\u8BB8\u6709\u8F93\u5165\u7AEF\u7EC4\u4EF6"):null}function pq(t){var l;const{metadata:e}=t,{nodes:n,connections:r}=e||{};if(!n||!r)return null;const o=new Map,i=new Map;n.forEach(u=>{o.set(u.id,[]),i.set(u.id,0)}),r.forEach(u=>{const{fromId:c,toId:d}=u;o.has(c)&&o.has(d)&&(o.get(c).push(d),i.set(d,i.get(d)+1))});const a=[];i.forEach((u,c)=>{u===0&&a.push(c)});let s=0;for(;a.length>0;){const u=a.shift();s++,(l=o.get(u))==null||l.forEach(c=>{const d=i.get(c)-1;i.set(c,d),d===0&&a.push(c)})}return s{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=UGe[n[t]&63];return e};const Uu=(t,e)=>{if(t&&e){let n=Df[e];if(n)return n[t]||t}else if(t)return Df[t]||t;return t},gq=t=>{if(!t)return 0;let e=0;for(let n=0;n=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=1.8}return e},YGe=(t,e)=>{MD(Df,e);let n=JSON.parse(JSON.stringify(Df.category));t.endpoints&&t.endpoints.forEach(r=>{OV(t.builtins,n,r,!0)}),t.nodes||(t.nodes=t),t.nodes.forEach(r=>{OV(t.builtins,n,r,!1)});for(let r in n){let o=n[r];(!o.components||Array.isArray(o.components)&&o.components.length===0)&&delete n[r]}try{const r=n.endpoints;r&&(r.components=r.components||[],r.components.some(i=>i.type==="start-node")||r.components.unshift({type:"start-node",label:Uu("Input"),desc:Uu("Input"),icon:"/images/start.svg",background:r.background||"#a6bbcf",nodeType:"start-node",notInput:!0,category:"endpoints"}))}catch{}return n},OV=(t,e,n,r)=>{XGe(n,r);let o="";if(r&&!e[n.category])o="endpoints";else{o=n.category.split("/")[0];let a=n.type.split("/")[0];e[a]&&(o=a)}let i=e[o];i?(n.background=n.background||i.background,i.components?i.components.push(n):i.components=[n]):e[o]={label:o,background:"#86B4E5FF",components:[n]},n.category=o,iqe(t,n,o),ZGe(n),n.nodeType=n.nodeType||i&&i.nodeType||"simple-node"},XGe=(t,e)=>{let n={};e?n=Df.component.endpoints[t.type]:n=Df.component.nodes[t.type],n?(Object.assign(t,n),t.relationTypes=n.relationTypes||wV(t.relationTypes),"disabled"in n&&(t.disabled=n.disabled),vq(t,n),e&&(t.router=n.router||t.router)):t.relationTypes=wV(t.relationTypes),e&&(t.router=t.router||{},t.hasOwnProperty("notInput")||(t.notInput=!0))},wV=t=>{if(t){let e=[];return t.forEach(n=>{let r=n.value!==void 0&&n.value!==null?n.value:n,o=n.label!==void 0&&n.label!==null?n.label:n;e.push({value:r,label:Uu(o,"relationTypes")})}),e}return t},vq=(t,e)=>{t.fields&&t.fields.forEach(n=>{let r=e[n.name];r&&MD(n,r),n.fields&&r&&vq(n,r)})},ZGe=t=>{t.fields&&t.fields.forEach(e=>{e.type.indexOf("int")>-1&&!e.rules?e.rules=[{type:"number",message:"\u5FC5\u987B\u662F\u6570\u503C\u7C7B\u578B"}]:e.type.indexOf("float")>-1&&!e.rules&&(e.rules=[{pattern:/^-?\d+(\.\d+)?$/,message:"\u5FC5\u987B\u662F\u6D6E\u70B9\u7C7B\u578B"}])})},XP=(t,e)=>{let n={};return t&&t.forEach(r=>{r.id===e&&(n=r)}),n},GGe=(t,e,n)=>{let r=null;return t&&t.forEach(o=>{o.sourceNodeId===e&&o.targetNodeId===n&&(r=o)}),r},qGe=(t,e,n)=>{let r={id:"edge_"+t.edgeCount,type:"flow-link",sourceNodeId:n.fromId,targetNodeId:n.toId,sourceAnchorId:void 0,targetAnchorId:void 0,text:Uu(n.type,"relationTypes")||"",properties:{model:{...n}}};const o=XP(e,r.sourceNodeId),i=XP(e,r.targetNodeId);return o&&(r.sourceAnchorId=o.id+"_right"),i&&i.type!=="start-node"&&i.type!=="endpoint-node"&&(r.targetAnchorId=i.id+"_left"),r},KGe=t=>{let e=t.split("_");if(e.length>0){let n=parseInt(e[e.length-1]);return isNaN(n)?0:n}},JGe=(t,e,n)=>{let r={};t.forEach(i=>{let a=i.properties.model||{};a.routerId&&(r[a.routerId]=i.id)});let o=[];if(e.routers){let i=e.type==="endpoint/mcpServer";e.routers.forEach(a=>{if(!r[a.id]||r[a.id]===n){let s=h_(a,i);o.push({label:s,value:a.id||s})}})}return o},eqe=(t,e)=>{let n=[];return t.type==="switch"&&(e.configuration&&e.configuration.cases&&e.configuration.cases.forEach(r=>{n.push({label:r.then,value:r.then})}),n.push({label:"Default",value:"Default"}),n.push({label:"\u5931\u8D25",value:"Failure"})),n},tqe=(t,e)=>{let n=[];if(t.routers){let r=t.type==="endpoint/mcpServer";t.routers.forEach(o=>{if(o.id===e){let i=h_(o,r);n.push({label:i,value:e})}})}return n},nqe=(t,e,n)=>{let r=[];if(e.routers&&e.routers.length>0){let o=e.type==="endpoint/mcpServer";e.routers.forEach(i=>{if(i.to&&i.to.path){let a=i.to.path.split(":"),s=h_(i,o);if(a.length<=1)n&&r.push({fromId:t,toId:n.id,routerId:i.id,nodeType:"endpoint-node",type:s});else for(let l=1;l{t.routers=t.routers||[],t.routers.forEach(r=>{r.to||(r.to={}),r.to.path=e}),n.forEach(r=>{if(r.fromId===t.id){let o=t.type==="endpoint/mcpServer";t.routers&&t.routers.forEach(i=>{let a=h_(i,o);(i.id===r.type||a===r.type)&&(i.to.path=i.to.path+":"+r.toId)})}})},h_=(t,e)=>{var n;return t.from?e?(n=t==null?void 0:t.from)==null?void 0:n.path:(t.params?t.params.join(" "):"")+" "+(t.from&&t.from.path):""},oqe=t=>rx(t||12),iqe=(t,e,n)=>{if(n==="endpoints"){let o=t.endpoints;o&&e.router&&(e.router.options={},Object.keys(o).forEach(i=>{e.router.options[i]=o[i]}))}let r=t.nodePool&&t.nodePool[e.type];if(!r&&(e.type==="endpoint/mcpServer"||e.type==="endpoint/ws")&&(r=t.nodePool&&t.nodePool["endpoint/http"]),r&&e.fields){let o=aqe(r);e.fields.forEach(i=>{i.component&&!i.component.options&&(i.component.options=o)})}Object.keys(t).forEach(o=>{e.type===o&&e.fields&&e.fields.forEach(i=>{t[o][i.name]&&(i.component=i.component||{},i.component.options=t[o][i.name])})})};function aqe(t){let e=[];return t&&t.forEach(n=>{e.push({label:n.name,value:`ref://${n.id}`})}),e}function MD(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n=r=>r&&typeof r=="object"&&!Array.isArray(r);for(const r of e)if(n(r))for(const o in r)n(r[o])&&n(t[o])?MD(t[o],r[o]):t[o]=r[o];return t}const sqe=(t,e,n)=>e.map(r=>{const o=t.find(i=>i.value!==void 0&&i.value!==null?i.value===r:i===r);return o&&o.label?o.label:Uu(r,n)}).filter(r=>r!==void 0),lqe=t=>new Promise((e,n)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>e(!0)).catch(r=>n(r));else{const r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?e(!0):n("execCommand copy failed")}catch(o){n(o)}finally{document.body.removeChild(r)}}}),uqe=()=>new Promise((t,e)=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.readText().then(n=>t(n)).catch(n=>{SV().then(t,e)}):SV().then(t,e)});function SV(){return new Promise((t,e)=>{let n="";const r=document.createElement("textarea");r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("paste")?(n=r.value,t(n)):e("execCommand paste failed")}catch(o){e(o)}finally{document.body.removeChild(r)}})}const Fn={};Fn.getNodeSeq=KGe;Fn.adapterComponents=YGe;Fn.getNodeByID=XP;Fn.getEdgeBySourceNodeIdAndTargetNodeId=GGe;Fn.createEdge=qGe;Fn.getRelationTypeOptionsFromRouters=JGe;Fn.getEndpointConnections=nqe;Fn.updateEndpointRouterToPath=rqe;Fn.toFromPath=h_;Fn.getRouterRelationTypeLabel=tqe;Fn.genId=oqe;Fn.getSelectedLabels=sqe;Fn.copyToClipboard=lqe;Fn.readFromClipboard=uqe;Fn.getRelationTypeOptionsFromNode=eqe;Fn.validator=HGe;class cqe extends xp{initNodeData(e){super.initNodeData(e),this.width=120,this.height=30,this.resizable=!1,this.radius=5,this.text.x=this.x+10,this.iconPosition="",this.defaultFill="#a6bbcf";const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(s,l,u,c)=>{let d=s.graphModel.getNodeEdges(s.id);return d&&d.length>0&&d.filter(h=>h.sourceNode.id===s.id&&h.targetNode.id===l.id).length>0?!1:u.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(s,l,u,c)=>{let d=s.graphModel.getNodeEdges(s.id);return!(d&&d.length>1&&s.type==="start-node"||l.type==="start-node"||l.type==="endpoint-node")}},o={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(s,l,u,c)=>{let d=s.graphModel.getNodeEdges(s.id);return!(d&&d.length>0&&d.filter(h=>h.sourceNode.id==s.id&&h.targetNode.id==l.id).length>0)}},i={message:"\u5916\u90E8\u8282\u70B9\u4E0D\u5141\u8BB8\u8FDE\u63A5\u7EC4\u5185\u8282\u70B9",validate:(s,l,u,c)=>{var h,g,v,m,b,w;if(l.type==="group-node")return!0;const d=(v=(g=(h=s==null?void 0:s.properties)==null?void 0:h.model)==null?void 0:g.additionalInfo)==null?void 0:v.parentGroupId,f=(w=(b=(m=l==null?void 0:l.properties)==null?void 0:m.model)==null?void 0:b.additionalInfo)==null?void 0:w.parentGroupId;return!(!d&&!!f)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(o),this.sourceRules.push(i);const a={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(s,l,u,c)=>c.type==="left"};this.targetRules.push(a)}getData(){const e=super.getData();return e.properties.ui="rulego-editor",e}setAttributes(){if(this.text.value){let e=30+gq(this.text.value)*9;e=Math.ceil(e/20)*20;let n=Math.ceil((e-this.width)/20);if(n>0){let r=this.text.value.length-n;r>0&&(this.text.value=this.text.value.substring(0,r)+"...")}}}updateText(e){super.updateText(e),this.setAttributes()}getNodeStyle(){const e=super.getNodeStyle(),n=this.properties.view||{};return this.isSelected?(e.strokeWidth=Number(n.borderWidth)||2,e.stroke=n.borderColor||"#ff7f0e"):(e.strokeWidth=Number(n.borderWidth)||1,e.stroke=n.borderColor||"#999"),e.fill=n.background||this.defaultFill||"rgb(230, 224, 248)",this.icon=n.icon||"/plugin/rule/images/"+n.category+".svg"||"images/fetch.svg",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:o,height:i}=this;return[{x:e+o/2,y:n,id:`${r}_right`,type:"right"},{x:e-o/2,y:n,id:`${r}_left`,type:"left"}]}getOutlineStyle(){const e=super.getOutlineStyle();return e.stroke="transparent",e.hover.stroke="transparent",e}}class dqe extends Rf{getAnchorShape(e){const{x:n,y:r,type:o}=e;return qt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}getIcon(){return null}getShape(){const{text:e,x:n,y:r,width:o,height:i,radius:a}=this.props.model,s=this.props.model.getNodeStyle();return qt("g",{className:"lf-red-node"},[qt("rect",{...s,x:n-o/2,y:r-i/2,width:o,height:i,rx:a,ry:a}),qt("g",{style:"pointer-events: none;",transform:`translate(${n}, ${r})`},[qt("rect",{x:-o/2,y:-i/2,width:30,height:30,fill:"#000",fillOpacity:.05,stroke:"none"}),this.getIcon(),qt("path",{d:`M ${30-o/2} ${1-i/2} l 0 28`,stroke:"#000",strokeOpacity:.1,strokeWidth:1})])])}}var Vl={type:"red-node",model:cqe,view:dqe};class fqe extends Vl.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let o=r||"/plugin/rule/images/comment.svg";return qt("image",{width:30,height:30,x:-e/2,y:-n/2,href:o})}}class hqe extends Vl.model{getDefaultAnchor(){return[]}initNodeData(e){super.initNodeData(e)}getTextStyle(){const e=super.getTextStyle();return e.fontStyle="italic",e}setAttributes(){this.width=15+gq(this.text.value)*8,this.width<120&&(this.width=120)}updateText(e){super.updateText(e),this.setAttributes()}}var pqe={type:"comment-node",model:hqe,view:fqe};class gqe extends Vl.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let o=r||"/plugin/rule/images/start.svg";return qt("image",{width:30,height:30,x:-e/2,y:-n/2,href:o})}}class vqe extends Vl.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:o}=this;return[{x:e+o/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e)}}var mqe={type:"endpoint-node",model:vqe,view:gqe};class yqe extends Vl.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let o=r||"/plugin/rule/images/fetch.svg";return qt("image",{width:30,height:30,x:-e/2,y:-n/2,href:o})}}class bqe extends Vl.model{initNodeData(e){super.initNodeData(e)}}var _qe={type:"simple-node",model:bqe,view:yqe};class Oqe extends Vl.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:o,icon:i}=e;let a=i||"/plugin/rule/images/fetch.svg";return qt("image",{width:30,height:30,x:-r/2,y:-o/2,href:a})}}class wqe extends Vl.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:o}=this;return[{x:e-o/2,y:n,id:`${r}_left`,type:"left"}]}initNodeData(e){super.initNodeData(e)}}var Sqe={type:"chain-node",model:wqe,view:Oqe};class xqe extends Vl.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:o}=e;return qt("image",{width:30,height:30,x:-r/2,y:-o/2,className:"rulego-editor-start",href:"/plugin/rule/images/start.svg",onClick:()=>{n.eventCenter.emit("rulego-editor:start")}})}}class Cqe extends Vl.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:o}=this;return[{x:e+o/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e),this.defaultFill="rgb(166, 187, 207)",e.moveRules&&(this.moveRules=e.moveRules)}}var Eqe={type:"start-node",model:Cqe,view:xqe};class Tqe extends Vl.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:o}=e;return qt("image",{width:30,height:30,x:-r/2,y:-o/2,className:"rulego-editor-end",href:"/images/end.svg",onClick:()=>{}})}}class kqe extends Vl.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:o}=this;return[{x:e-o/2,y:n,id:`${r}_left`,type:"left"}]}initNodeData(e){super.initNodeData(e),this.defaultFill="rgb(166, 187, 207)",e.moveRules&&(this.moveRules=e.moveRules)}}var Aqe={type:"end-node",model:kqe,view:Tqe};class Pqe extends OD.view{getAnchorShape(e){const{x:n,y:r,type:o}=e;return qt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}getText(){const e=this.props.model,{x:n,y:r,width:o,height:i,isCollapsed:a}=e,s=e.text&&e.text.value||"";if(!s)return null;const l=16;return qt("text",{x:n,y:r-(i||0)/2+l,textAnchor:"middle",dominantBaseline:"middle",fill:"#606266",fontSize:12,style:"pointer-events:none;"},s)}}class Nqe extends OD.model{initNodeData(e){this.width=300,this.height=200,super.initNodeData(e),this.resizable=!0,this.collapsible=!0,this.isRestrict=!0,this.autoResize=!0,this.nodeTextDraggable=!1,this.foldable=!0,this.autoToFront=!0,this.isCollapsed=!1,this.collapsedWidth=120,this.collapsedHeight=30,this.updateAnchorsOffset(),this.graphModel&&this.graphModel.eventCenter&&(this.graphModel.eventCenter.on("node:resize",i=>{i.data&&i.data.id===this.id&&this.updateAnchorsOffset()}),this.graphModel.eventCenter.on("node:properties-change",i=>{i.id===this.id&&setTimeout(()=>{this.updateAnchorsOffset()},5)}));const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(i,a,s,l)=>{try{const{right:u}=this._getLeftRightAnchors();if(u&&s&&u.id&&s.id!==u.id)return!1;const c=i.graphModel.getNodeEdges(i.id);return!(c&&c.length>0&&c.some(f=>f.sourceNode.id===i.id&&f.targetNode.id===a.id))}catch{return!0}}},r={message:"\u7981\u6B62\u8FDE\u5230\u8F93\u5165\u7C7B\u8282\u70B9",validate:(i,a)=>!(a.type==="start-node"||a.type==="endpoint-node")};this.sourceRules.push(n),this.sourceRules.push(r);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(i,a,s,l)=>{try{const{left:u}=this._getLeftRightAnchors();return!(u&&l&&u.id&&l.id!==u.id)}catch{return!0}}};this.targetRules.push(o)}isAllowAppendIn(e){try{return e&&e.type!=="endpoint-node"&&e.type!=="start-node"}catch{return!0}}getNodeStyle(){const e=super.getNodeStyle();return this.isSelected?(e.strokeWidth=2,e.stroke="#ff7f0e"):(e.stroke="#BFBFBF",e.strokeDasharray="4 3",e.strokeWidth=1),e.fill="rgba(240,240,240,0.25)",e.pointerEvents="auto",e}getAddableOutlineStyle(){const e=super.getAddableOutlineStyle();if(this.isCollapsed){try{e.stroke="none"}catch{}try{e.strokeDasharray=""}catch{}try{e.fill="transparent"}catch{}try{e.pointerEvents="none"}catch{}return e}return e.stroke="#BFBFBF",e.strokeDasharray="4 3",e.pointerEvents="auto",e}updateAnchorsOffset(){try{const e=this.isCollapsed?120:this.originalWidth||this.width||300,n=this.isCollapsed?30:this.originalHeight||this.height||200,r=-e/2,o=e/2;this.anchorsOffset=[[r,0],[o,0]],this.refreshConnectedEdges();try{this.isCollapsed?this._retargetEdgesOnCollapse():this._retargetEdgesOnExpand()}catch{}}catch(e){console.error("Error updating anchors offset:",e)}}refreshConnectedEdges(){try{if(!this.graphModel)return;const e=this.graphModel.getNodeEdges?this.graphModel.getNodeEdges(this.id):[];if(!e)return;const{left:n,right:r}=this._getLeftRightAnchors(),o={deltaX:0,deltaY:0,width:this.isCollapsed?120:this.width||300,height:this.isCollapsed?30:this.height||200,x:this.x,y:this.y};e.sourceEdges&&Array.isArray(e.sourceEdges)&&e.sourceEdges.forEach(i=>{try{if(i&&typeof i.updateStartPoint=="function"){const a={x:r.x,y:r.y};i.updateStartPoint(a)}}catch(a){console.warn("Error updating source edge start point:",i==null?void 0:i.id,a)}}),e.targetEdges&&Array.isArray(e.targetEdges)&&e.targetEdges.forEach(i=>{try{if(i&&typeof i.updateEndPoint=="function"){const a={x:n.x,y:n.y};i.updateEndPoint(a)}}catch(a){console.warn("Error updating target edge end point:",i==null?void 0:i.id,a)}}),Array.isArray(e)&&!e.sourceEdges&&!e.targetEdges&&e.forEach(i=>{try{if(i){if(i.sourceNodeId===this.id&&typeof i.updateStartPoint=="function"){const a={x:r.x,y:r.y};i.updateStartPoint(a)}if(i.targetNodeId===this.id&&typeof i.updateEndPoint=="function"){const a={x:n.x,y:n.y};i.updateEndPoint(a)}}}catch(a){console.warn("Error refreshing edge:",i==null?void 0:i.id,a)}})}catch(e){console.error("Error refreshing connected edges:",e)}}_getLeftRightAnchors(){try{const e=this.x,n=this.y,r=this.isCollapsed?60:(this.width||300)/2,o=this.isCollapsed?15:(this.height||200)/2,i={x:e-r,y:n},a={x:e+r,y:n},s=this.anchors&&this.anchors.length>0?this.anchors:[],l=d=>{if(!s||s.length===0)return;let f=s[0],h=Math.abs(f.x-d.x)+Math.abs(f.y-d.y);return s.forEach(g=>{const v=Math.abs(g.x-d.x)+Math.abs(g.y-d.y);v{try{if(o.sourceNodeId===this.id){o.sourceAnchorId=void 0;const i={x:r.x,y:r.y};typeof o.updateStartPoint=="function"&&o.updateStartPoint(i)}if(o.targetNodeId===this.id){o.targetAnchorId=void 0;const i={x:n.x,y:n.y};typeof o.updateEndPoint=="function"&&o.updateEndPoint(i)}try{Array.isArray(o.draggingPointList)&&(o.draggingPointList=[])}catch{}try{Array.isArray(o.pointsList)&&(o.pointsList=[])}catch{}try{o.points=""}catch{}typeof o.initPoints=="function"&&o.initPoints(),typeof o.updatePath=="function"&&o.updatePath()}catch{}})}catch{}}_retargetEdgesOnExpand(){try{if(!this.graphModel)return;const e=this.graphModel.getNodeEdges?this.graphModel.getNodeEdges(this.id):[];if(!e||e.length===0)return;const{left:n,right:r}=this._getLeftRightAnchors();e.forEach(o=>{try{if(o.sourceNodeId===this.id){o.sourceAnchorId=void 0;const i={x:r.x,y:r.y};typeof o.updateStartPoint=="function"&&o.updateStartPoint(i)}if(o.targetNodeId===this.id){o.targetAnchorId=void 0;const i={x:n.x,y:n.y};typeof o.updateEndPoint=="function"&&o.updateEndPoint(i)}try{Array.isArray(o.draggingPointList)&&(o.draggingPointList=[])}catch{}try{Array.isArray(o.pointsList)&&(o.pointsList=[])}catch{}try{o.points=""}catch{}typeof o.initPoints=="function"&&o.initPoints(),typeof o.updatePath=="function"&&o.updatePath()}catch{}})}catch{}}getAnchorStyle(){return{...super.getAnchorStyle(),r:4,stroke:"#1890ff",strokeWidth:2,fill:"#fff",fillOpacity:1,hover:{r:6,fill:"#1890ff",fillOpacity:.8,stroke:"#1890ff",strokeWidth:2}}}}var Mqe={type:"group-node",model:Nqe,view:Pqe};class $qe extends mP{getEdgeStyle(){const e=super.getEdgeStyle();return e.strokeWidth=this.isHovered?4:3,e.stroke=this.isSelected||this.isHovered?"#ff7f0e":"#999",e}getTextStyle(){const e=super.getTextStyle();e.color="#003a79",e.textWidth=200,e.overflowMode="autoWrap",e.fontSize=16;let n="0px,0px";return this.text.value&&(e.textWidth=Math.ceil(this.text.value.length/2)*e.fontSize+e.fontSize/4+30,e.textWidth>200&&(e.textWidth=200)),e.background={wrapPadding:n,fill:"#FFF",strokeWidth:2,stroke:"#003a79",x:0,y:0,rx:10,ry:10},e}setAttributes(e){super.setAttributes(e),this.offset=20}}class Rqe extends $P{}var Dqe={type:"flow-link",view:Rqe,model:$qe};const xV=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Jc=(()=>{if(typeof document=="undefined")return!1;const t=xV[0],e={};for(const n of xV)if((n==null?void 0:n[1])in document){for(const[o,i]of n.entries())e[t[o]]=i;return e}return!1})(),CV={change:Jc.fullscreenchange,error:Jc.fullscreenerror};let ks={request(t=document.documentElement,e){return new Promise((n,r)=>{const o=()=>{ks.off("change",o),n()};ks.on("change",o);const i=t[Jc.requestFullscreen](e);i instanceof Promise&&i.then(o).catch(r)})},exit(){return new Promise((t,e)=>{if(!ks.isFullscreen){t();return}const n=()=>{ks.off("change",n),t()};ks.on("change",n);const r=document[Jc.exitFullscreen]();r instanceof Promise&&r.then(n).catch(e)})},toggle(t,e){return ks.isFullscreen?ks.exit():ks.request(t,e)},onchange(t){ks.on("change",t)},onerror(t){ks.on("error",t)},on(t,e){const n=CV[t];n&&document.addEventListener(n,e,!1)},off(t,e){const n=CV[t];n&&document.removeEventListener(n,e,!1)},raw:Jc};Object.defineProperties(ks,{isFullscreen:{get:()=>Boolean(document[Jc.fullscreenElement])},element:{enumerable:!0,get:()=>{var t;return(t=document[Jc.fullscreenElement])!=null?t:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[Jc.fullscreenEnabled])}});Jc||(ks={isEnabled:!1});var Gn=ks,zl=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n};const Iqe={class:"sidebar-collapse"},Lqe={class:"classify-title"},Bqe=["onMousedown"],Fqe={class:"rulego-editor-palette-label"},Vqe={class:"rulego-editor-palette-icon-container"},zqe={key:0,class:"rulego-editor-palette-port rulego-editor-palette-port-input"},jqe={key:1,class:"rulego-editor-palette-port rulego-editor-palette-port-output"},Wqe=de({__name:"Sidebar",props:{lf:{type:fG,required:!0},topOffset:{type:Number,default:50}},setup(t){const e=t,n=z("500px"),r=z(!1),o=z(!0),i=z(""),a=z(["endpoints","stats","common","action","filter","transform","external","flow","ai","ci","iot","custom"]);function s(){n.value=window.innerHeight-e.topOffset+"px"}Gn.on("change",()=>{s()}),window.addEventListener("resize",s);function l(){o.value=!o.value}const u=v=>{const{lf:m}=e;m.dnd.startDrag({type:v.nodeType,text:v.label||v.type,properties:{model:{type:v.type,debugMode:!1},view:v}})},c=z(null),d=z(null),{lf:f}=e;f.on("rulego-editor:componentOk",v=>{d.value=v,c.value=v}),jt(()=>{const{lf:v}=e;v.graphModel.eventCenter.emit("rulego-editor:sidebarOk"),s()}),Hf(()=>{window.removeEventListener("resize",s)});const h=()=>{let v=i.value.toLowerCase(),m={};if(v=="")m=d.value;else for(let b in d.value)m[b]||(m[b]=[]),m[b]=JSON.parse(JSON.stringify(d.value[b])),m[b].components&&(m[b].components=m[b].components.filter(w=>w.label.toLowerCase().indexOf(v)>-1||w.type.toLowerCase().indexOf(v)>-1));c.value=m};function g(v){return v.filter(m=>!m.disabled)}return(v,m)=>{const b=ao,w=ri,O=oi,S=Zo,x=U$,C=H$,E=Al,T=Ot;return N(),me(O,{class:j(o.value?"expanded":"collapsed"),onMouseenter:m[2]||(m[2]=M=>r.value=!0),onMouseleave:m[3]||(m[3]=M=>o.value?r.value=!1:r.value=!0)},{default:V(()=>[B(w,{span:20},{default:V(()=>[ee("div",Iqe,[B(b,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=M=>i.value=M),"prefix-icon":p(T$),onInput:h,placeholder:"\u641C\u7D22\u7EC4\u4EF6"},null,8,["modelValue","prefix-icon"]),B(E,{"max-height":n.value},{default:V(()=>[(N(!0),Z(ut,null,Xt(c.value,(M,k,P)=>(N(),me(C,{modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=R=>a.value=R)},{default:V(()=>[M.disabled?ge("",!0):(N(),me(x,{key:0,name:k},{title:V(()=>[B(O,null,{default:V(()=>[B(w,{span:3},{default:V(()=>[ee("span",{class:"rulego-editor-palette-icon",style:bt({backgroundImage:`url(${"/images/"+k+"-dark.svg"})`})},null,4)]),_:2},1024),B(w,{span:18,offset:2},{default:V(()=>[ee("span",Lqe,ze(M.label),1)]),_:2},1024)]),_:2},1024)]),default:V(()=>[(N(!0),Z(ut,null,Xt(g(M.components),(R,D)=>(N(),Z("div",{class:"rulego-editor-palette-node ui-draggable ui-draggable-handle",onMousedown:F=>u(R),key:D,style:bt({backgroundColor:R.background||"#a6bbcf"})},[B(S,{class:"box-item",effect:"light","show-after":1e3,content:R.desc,placement:"right-start","raw-content":""},{default:V(()=>[ee("div",Fqe,ze(R.label||R.type),1)]),_:2},1032,["content"]),ee("div",Vqe,[R.icon?(N(),Z("div",{key:0,class:"rulego-editor-palette-icon",style:bt({backgroundImage:`url(${R.icon})`})},null,4)):(N(),Z("div",{key:1,class:"rulego-editor-palette-icon",style:bt({backgroundImage:`url(${"/images/"+k+".svg"})`})},null,4))]),R.notInput?ge("",!0):(N(),Z("div",zqe)),R.notOutput?ge("",!0):(N(),Z("div",jqe))],44,Bqe))),128))]),_:2},1032,["name"]))]),_:2},1032,["modelValue"]))),256))]),_:1},8,["max-height"])])]),_:1}),B(w,{span:4},{default:V(()=>[r.value?(N(),Z("div",{key:0,class:"sidebar-toggle",onClick:l},[o.value?(N(),me(T,{key:0},{default:V(()=>[B(p(WEe))]),_:1})):ge("",!0),o.value?ge("",!0):(N(),me(T,{key:1},{default:V(()=>[B(p(zEe))]),_:1}))])):ge("",!0)]),_:1})]),_:1},8,["class"])}}});var Qqe=zl(Wqe,[["__scopeId","data-v-641b2450"]]);class mq{constructor({lf:e}){var n;this.topOffset=((n=e.options)==null?void 0:n.topOffset)||100,e.register(Eqe),e.register(Aqe),e.register(mqe),e.register(pqe),e.register(_qe),e.register(Sqe),e.register(Mqe),e.register(Dqe),e.setDefaultEdgeType("flow-link")}render(e,n){this.app=qv(Qqe,{lf:e,topOffset:this.topOffset});const r=document.createElement("div");r.className="rulego-editor-palette",n.appendChild(r),this.app.mount(r)}getNodeList(){let e={};for(let n in this.nodeGroups)this.nodeGroups[n].components.forEach(r=>{e[r.type]=r});return e}}RT(mq,"pluginName","NodeRedExtension");const Hqe={style:{flex:"auto"}},yq={__name:"NewFlowDialog",props:["show"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{show:r}=t,o=z();z(r);const i=pn({id:"default",name:"",root:!0,debugMode:!0,additionalInfo:{description:""}});z(!1);const a=u=>{u.validate(async c=>{c&&n("submit",Mn(i))})},s=()=>{n("close")};return e({updateDefault:u=>{var c;i.id=(u==null?void 0:u.id)||rx(12),i.name=(u==null?void 0:u.name)||"",i.root=(c=u==null?void 0:u.root)!=null?c:!0,u&&"disabled"in u&&(i.disabled=u.disabled),i.additionalInfo=(u==null?void 0:u.additionalInfo)||{description:""},i.configuration=(u==null?void 0:u.configuration)||{}}}),(u,c)=>{const d=ri,f=oi,h=ao,g=hs,v=gm,m=Cu,b=fs,w=Kn,O=Ei;return N(),me(O,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show},{header:V(()=>[B(f,null,{default:V(()=>[B(d,{span:12},{default:V(()=>[We("\u521B\u5EFA\u89C4\u5219\u94FE")]),_:1})]),_:1})]),footer:V(()=>[ee("div",Hqe,[B(w,{type:"primary",onClick:c[5]||(c[5]=S=>a(o.value))},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(w,{onClick:s},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[B(b,{model:i,ref_key:"formRef",ref:o,"label-position":"top","label-width":"auto"},{default:V(()=>[B(g,{label:"ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:V(()=>[B(h,{modelValue:i.id,"onUpdate:modelValue":c[0]||(c[0]=S=>i.id=S),placeholder:"\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u81EA\u52A8\u521B\u5EFA"},null,8,["modelValue"])]),_:1}),B(g,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:V(()=>[B(h,{modelValue:i.name,"onUpdate:modelValue":c[1]||(c[1]=S=>i.name=S),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(g,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:V(()=>[B(v,{class:"ml-2",modelValue:i.root,"onUpdate:modelValue":c[2]||(c[2]=S=>i.root=S),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(m,{class:"mx-2",size:"small"},{default:V(()=>[We(" \u5F00\u542F\uFF1A\u521B\u5EFA\u6839\u89C4\u5219\u94FE\u3002\u5173\u95ED\uFF1A\u521B\u5EFA\u5B50\u89C4\u5219\u94FE ")]),_:1})]),_:1}),B(g,{label:"\u8C03\u8BD5\u6A21\u5F0F",prop:"debugMode"},{default:V(()=>[B(v,{class:"ml-2",modelValue:i.debugMode,"onUpdate:modelValue":c[3]||(c[3]=S=>i.debugMode=S),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(m,{class:"mx-2",size:"small"},{default:V(()=>[We(" \u5F00\u542F\u540E\u4F1A\u8986\u76D6\u8282\u70B9\u7684\u8C03\u8BD5\u6A21\u5F0F\u914D\u7F6E\uFF0C\u6240\u6709\u8282\u70B9\u4F1A\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7 ")]),_:1})]),_:1}),B(g,{label:"\u63CF\u8FF0",prop:"description"},{default:V(()=>[B(h,{modelValue:i.additionalInfo.description,"onUpdate:modelValue":c[4]||(c[4]=S=>i.additionalInfo.description=S),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}};var ZP={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(t,e){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,g=1,v=2,m=1,b=2,w=4,O=8,S=16,x=32,C=64,E=128,T=256,M=512,k=30,P="...",R=800,D=16,F=1,W=2,I=3,Q=1/0,L=9007199254740991,H=17976931348623157e292,re=0/0,U=4294967295,J=U-1,ie=U>>>1,te=[["ary",E],["bind",m],["bindKey",b],["curry",O],["curryRight",S],["flip",M],["partial",x],["partialRight",C],["rearg",T]],he="[object Arguments]",K="[object Array]",ne="[object AsyncFunction]",fe="[object Boolean]",Ne="[object Date]",$e="[object DOMException]",ue="[object Error]",G="[object Function]",ve="[object GeneratorFunction]",q="[object Map]",Ie="[object Number]",Ee="[object Null]",Oe="[object Object]",se="[object Promise]",X="[object Proxy]",oe="[object RegExp]",ce="[object Set]",Ae="[object String]",ye="[object Symbol]",Te="[object Undefined]",Me="[object WeakMap]",Fe="[object WeakSet]",at="[object ArrayBuffer]",nt="[object DataView]",ct="[object Float32Array]",ht="[object Float64Array]",Je="[object Int8Array]",ft="[object Int16Array]",Mt="[object Int32Array]",Pe="[object Uint8Array]",Ce="[object Uint8ClampedArray]",pe="[object Uint16Array]",Be="[object Uint32Array]",_t=/\b__p \+= '';/g,en=/\b(__p \+=) '' \+/g,On=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yn=/&(?:amp|lt|gt|quot|#39);/g,dr=/[&<>"']/g,to=RegExp(yn.source),Kr=RegExp(dr.source),qe=/<%-([\s\S]+?)%>/g,vt=/<%([\s\S]+?)%>/g,dt=/<%=([\s\S]+?)%>/g,$t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/,Vn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,no=/[\\^$.*+?()[\]{}|]/g,lo=RegExp(no.source),So=/^\s+/,za=/\s/,vs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sr=/\{\n\/\* \[wrapped with (.+)\] \*/,Ql=/,? & /,bi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,Lt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Br=/\w*$/,xo=/^[-+]0x[0-9a-f]+$/i,ii=/^0b[01]+$/i,Pi=/^\[object .+?Constructor\]$/,Ni=/^0o[0-7]+$/i,ai=/^(?:0|[1-9]\d*)$/,Gs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ma=/($^)/,et=/['\n\r\u2028\u2029\\]/g,ae="\\ud800-\\udfff",De="\\u0300-\\u036f",Ke="\\ufe20-\\ufe2f",Bt="\\u20d0-\\u20ff",hn=De+Ke+Bt,Xn="\\u2700-\\u27bf",Jr="a-z\\xdf-\\xf6\\xf8-\\xff",Se="\\xac\\xb1\\xd7\\xf7",He="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Et="\\u2000-\\u206f",Vt=" \\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",fn="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",It=Se+He+Et+Vt,an="['\u2019]",wn="["+ae+"]",Jn="["+It+"]",Ko="["+hn+"]",$m="\\d+",Rm="["+Xn+"]",ya="["+Jr+"]",zp="[^"+ae+It+$m+Xn+Jr+fn+"]",ah="\\ud83c[\\udffb-\\udfff]",qi="(?:"+Ko+"|"+ah+")",ms="[^"+ae+"]",Dm="(?:\\ud83c[\\udde6-\\uddff]){2}",jp="[\\ud800-\\udbff][\\udc00-\\udfff]",Wp="["+fn+"]",PI="\\u200d",NI="(?:"+ya+"|"+zp+")",fte="(?:"+Wp+"|"+zp+")",MI="(?:"+an+"(?:d|ll|m|re|s|t|ve))?",$I="(?:"+an+"(?:D|LL|M|RE|S|T|VE))?",RI=qi+"?",DI="["+sr+"]?",hte="(?:"+PI+"(?:"+[ms,Dm,jp].join("|")+")"+DI+RI+")*",pte="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gte="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",II=DI+RI+hte,vte="(?:"+[Rm,Dm,jp].join("|")+")"+II,mte="(?:"+[ms+Ko+"?",Ko,Dm,jp,wn].join("|")+")",yte=RegExp(an,"g"),bte=RegExp(Ko,"g"),kE=RegExp(ah+"(?="+ah+")|"+mte+II,"g"),_te=RegExp([Wp+"?"+ya+"+"+MI+"(?="+[Jn,Wp,"$"].join("|")+")",fte+"+"+$I+"(?="+[Jn,Wp+NI,"$"].join("|")+")",Wp+"?"+NI+"+"+MI,Wp+"+"+$I,gte,pte,$m,vte].join("|"),"g"),Ote=RegExp("["+PI+ae+hn+sr+"]"),wte=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ste=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xte=-1,go={};go[ct]=go[ht]=go[Je]=go[ft]=go[Mt]=go[Pe]=go[Ce]=go[pe]=go[Be]=!0,go[he]=go[K]=go[at]=go[fe]=go[nt]=go[Ne]=go[ue]=go[G]=go[q]=go[Ie]=go[Oe]=go[oe]=go[ce]=go[Ae]=go[Me]=!1;var uo={};uo[he]=uo[K]=uo[at]=uo[nt]=uo[fe]=uo[Ne]=uo[ct]=uo[ht]=uo[Je]=uo[ft]=uo[Mt]=uo[q]=uo[Ie]=uo[Oe]=uo[oe]=uo[ce]=uo[Ae]=uo[ye]=uo[Pe]=uo[Ce]=uo[pe]=uo[Be]=!0,uo[ue]=uo[G]=uo[Me]=!1;var Cte={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ete={"&":"&","<":"<",">":">",'"':""","'":"'"},Tte={"&":"&","<":"<",">":">",""":'"',"'":"'"},kte={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ate=parseFloat,Pte=parseInt,LI=typeof Io=="object"&&Io&&Io.Object===Object&&Io,Nte=typeof self=="object"&&self&&self.Object===Object&&self,Mi=LI||Nte||Function("return this")(),AE=e&&!e.nodeType&&e,sh=AE&&!0&&t&&!t.nodeType&&t,BI=sh&&sh.exports===AE,PE=BI&&LI.process,qs=function(){try{var Qe=sh&&sh.require&&sh.require("util").types;return Qe||PE&&PE.binding&&PE.binding("util")}catch{}}(),FI=qs&&qs.isArrayBuffer,VI=qs&&qs.isDate,zI=qs&&qs.isMap,jI=qs&&qs.isRegExp,WI=qs&&qs.isSet,QI=qs&&qs.isTypedArray;function ys(Qe,yt,lt){switch(lt.length){case 0:return Qe.call(yt);case 1:return Qe.call(yt,lt[0]);case 2:return Qe.call(yt,lt[0],lt[1]);case 3:return Qe.call(yt,lt[0],lt[1],lt[2])}return Qe.apply(yt,lt)}function Mte(Qe,yt,lt,nn){for(var Un=-1,Fr=Qe==null?0:Qe.length;++Un-1}function NE(Qe,yt,lt){for(var nn=-1,Un=Qe==null?0:Qe.length;++nn-1;);return lt}function KI(Qe,yt){for(var lt=Qe.length;lt--&&Qp(yt,Qe[lt],0)>-1;);return lt}function zte(Qe,yt){for(var lt=Qe.length,nn=0;lt--;)Qe[lt]===yt&&++nn;return nn}var jte=DE(Cte),Wte=DE(Ete);function Qte(Qe){return"\\"+kte[Qe]}function Hte(Qe,yt){return Qe==null?n:Qe[yt]}function Hp(Qe){return Ote.test(Qe)}function Ute(Qe){return wte.test(Qe)}function Yte(Qe){for(var yt,lt=[];!(yt=Qe.next()).done;)lt.push(yt.value);return lt}function FE(Qe){var yt=-1,lt=Array(Qe.size);return Qe.forEach(function(nn,Un){lt[++yt]=[Un,nn]}),lt}function JI(Qe,yt){return function(lt){return Qe(yt(lt))}}function $d(Qe,yt){for(var lt=-1,nn=Qe.length,Un=0,Fr=[];++lt-1}function Rne(y,_){var A=this.__data__,Y=W_(A,y);return Y<0?(++this.size,A.push([y,_])):A[Y][1]=_,this}Pc.prototype.clear=Pne,Pc.prototype.delete=Nne,Pc.prototype.get=Mne,Pc.prototype.has=$ne,Pc.prototype.set=Rne;function Nc(y){var _=-1,A=y==null?0:y.length;for(this.clear();++_=_?y:_)),y}function tl(y,_,A,Y,le,xe){var Re,Ve=_&d,Ue=_&f,xt=_&h;if(A&&(Re=le?A(y,Y,le,xe):A(y)),Re!==n)return Re;if(!Po(y))return y;var Tt=Zn(y);if(Tt){if(Re=Bre(y),!Ve)return ja(y,Re)}else{var Nt=Ji(y),Gt=Nt==G||Nt==ve;if(Fd(y))return D3(y,Ve);if(Nt==Oe||Nt==he||Gt&&!le){if(Re=Ue||Gt?{}:eL(y),!Ve)return Ue?Tre(y,Gne(Re,y)):Ere(y,d3(Re,y))}else{if(!uo[Nt])return le?y:{};Re=Fre(y,Nt,Ve)}}xe||(xe=new Ul);var gn=xe.get(y);if(gn)return gn;xe.set(y,Re),AL(y)?y.forEach(function(Rn){Re.add(tl(Rn,_,A,Rn,y,xe))}):TL(y)&&y.forEach(function(Rn,_r){Re.set(_r,tl(Rn,_,A,_r,y,xe))});var $n=xt?Ue?dT:cT:Ue?Qa:_i,lr=Tt?n:$n(y);return Ks(lr||y,function(Rn,_r){lr&&(_r=Rn,Rn=y[_r]),jm(Re,_r,tl(Rn,_,A,_r,y,xe))}),Re}function qne(y){var _=_i(y);return function(A){return f3(A,y,_)}}function f3(y,_,A){var Y=A.length;if(y==null)return!Y;for(y=ro(y);Y--;){var le=A[Y],xe=_[le],Re=y[le];if(Re===n&&!(le in y)||!xe(Re))return!1}return!0}function h3(y,_,A){if(typeof y!="function")throw new Js(a);return Zm(function(){y.apply(n,A)},_)}function Wm(y,_,A,Y){var le=-1,xe=E_,Re=!0,Ve=y.length,Ue=[],xt=_.length;if(!Ve)return Ue;A&&(_=Co(_,bs(A))),Y?(xe=NE,Re=!1):_.length>=o&&(xe=Im,Re=!1,_=new ch(_));e:for(;++lele?0:le+A),Y=Y===n||Y>le?le:rr(Y),Y<0&&(Y+=le),Y=A>Y?0:NL(Y);A0&&A(Ve)?_>1?$i(Ve,_-1,A,Y,le):Md(le,Ve):Y||(le[le.length]=Ve)}return le}var UE=z3(),v3=z3(!0);function ku(y,_){return y&&UE(y,_,_i)}function YE(y,_){return y&&v3(y,_,_i)}function H_(y,_){return Nd(_,function(A){return Ic(y[A])})}function fh(y,_){_=Ld(_,y);for(var A=0,Y=_.length;y!=null&&A_}function ere(y,_){return y!=null&&Yr.call(y,_)}function tre(y,_){return y!=null&&_ in ro(y)}function nre(y,_,A){return y>=Ki(_,A)&&y=120&&Tt.length>=120)?new ch(Re&&Tt):n}Tt=y[0];var Nt=-1,Gt=Ve[0];e:for(;++Nt-1;)Ve!==y&&I_.call(Ve,Ue,1),I_.call(y,Ue,1);return y}function T3(y,_){for(var A=y?_.length:0,Y=A-1;A--;){var le=_[A];if(A==Y||le!==xe){var xe=le;Dc(le)?I_.call(y,le,1):rT(y,le)}}return y}function eT(y,_){return y+F_(s3()*(_-y+1))}function gre(y,_,A,Y){for(var le=-1,xe=li(B_((_-y)/(A||1)),0),Re=lt(xe);xe--;)Re[Y?xe:++le]=y,y+=A;return Re}function tT(y,_){var A="";if(!y||_<1||_>L)return A;do _%2&&(A+=y),_=F_(_/2),_&&(y+=y);while(_);return A}function fr(y,_){return yT(rL(y,_,Ha),y+"")}function vre(y){return c3(ng(y))}function mre(y,_){var A=ng(y);return nO(A,dh(_,0,A.length))}function Um(y,_,A,Y){if(!Po(y))return y;_=Ld(_,y);for(var le=-1,xe=_.length,Re=xe-1,Ve=y;Ve!=null&&++lele?0:le+_),A=A>le?le:A,A<0&&(A+=le),le=_>A?0:A-_>>>0,_>>>=0;for(var xe=lt(le);++Y>>1,Re=y[xe];Re!==null&&!Os(Re)&&(A?Re<=_:Re<_)?Y=xe+1:le=xe}return le}return nT(y,_,Ha,A)}function nT(y,_,A,Y){var le=0,xe=y==null?0:y.length;if(xe===0)return 0;_=A(_);for(var Re=_!==_,Ve=_===null,Ue=Os(_),xt=_===n;le=o){var xt=_?null:Nre(y);if(xt)return k_(xt);Re=!1,le=Im,Ue=new ch}else Ue=_?[]:Ve;e:for(;++Y=Y?y:nl(y,_,A)}var R3=lne||function(y){return Mi.clearTimeout(y)};function D3(y,_){if(_)return y.slice();var A=y.length,Y=n3?n3(A):new y.constructor(A);return y.copy(Y),Y}function sT(y){var _=new y.constructor(y.byteLength);return new R_(_).set(new R_(y)),_}function wre(y,_){var A=_?sT(y.buffer):y.buffer;return new y.constructor(A,y.byteOffset,y.byteLength)}function Sre(y){var _=new y.constructor(y.source,Br.exec(y));return _.lastIndex=y.lastIndex,_}function xre(y){return zm?ro(zm.call(y)):{}}function I3(y,_){var A=_?sT(y.buffer):y.buffer;return new y.constructor(A,y.byteOffset,y.length)}function L3(y,_){if(y!==_){var A=y!==n,Y=y===null,le=y===y,xe=Os(y),Re=_!==n,Ve=_===null,Ue=_===_,xt=Os(_);if(!Ve&&!xt&&!xe&&y>_||xe&&Re&&Ue&&!Ve&&!xt||Y&&Re&&Ue||!A&&Ue||!le)return 1;if(!Y&&!xe&&!xt&&y<_||xt&&A&&le&&!Y&&!xe||Ve&&A&&le||!Re&&le||!Ue)return-1}return 0}function Cre(y,_,A){for(var Y=-1,le=y.criteria,xe=_.criteria,Re=le.length,Ve=A.length;++Y=Ve)return Ue;var xt=A[Y];return Ue*(xt=="desc"?-1:1)}}return y.index-_.index}function B3(y,_,A,Y){for(var le=-1,xe=y.length,Re=A.length,Ve=-1,Ue=_.length,xt=li(xe-Re,0),Tt=lt(Ue+xt),Nt=!Y;++Ve1?A[le-1]:n,Re=le>2?A[2]:n;for(xe=y.length>3&&typeof xe=="function"?(le--,xe):n,Re&&_a(A[0],A[1],Re)&&(xe=le<3?n:xe,le=1),_=ro(_);++Y-1?le[xe?_[Re]:Re]:n}}function Q3(y){return Rc(function(_){var A=_.length,Y=A,le=el.prototype.thru;for(y&&_.reverse();Y--;){var xe=_[Y];if(typeof xe!="function")throw new Js(a);if(le&&!Re&&eO(xe)=="wrapper")var Re=new el([],!0)}for(Y=Re?Y:A;++Y1&&Tr.reverse(),Tt&&Ue<_r&&(Tr.length=Ue),this&&this!==Mi&&this instanceof Rn&&(Bc=lr||Ym(Bc)),Bc.apply(Xl,Tr)}return Rn}function H3(y,_){return function(A,Y){return rre(A,y,_(Y),{})}}function q_(y,_){return function(A,Y){var le;if(A===n&&Y===n)return _;if(A!==n&&(le=A),Y!==n){if(le===n)return Y;typeof A=="string"||typeof Y=="string"?(A=_s(A),Y=_s(Y)):(A=P3(A),Y=P3(Y)),le=y(A,Y)}return le}}function lT(y){return Rc(function(_){return _=Co(_,bs(An())),fr(function(A){var Y=this;return y(_,function(le){return ys(le,Y,A)})})})}function K_(y,_){_=_===n?" ":_s(_);var A=_.length;if(A<2)return A?tT(_,y):_;var Y=tT(_,B_(y/Up(_)));return Hp(_)?Bd(Hl(Y),0,y).join(""):Y.slice(0,y)}function Pre(y,_,A,Y){var le=_&m,xe=Ym(y);function Re(){for(var Ve=-1,Ue=arguments.length,xt=-1,Tt=Y.length,Nt=lt(Tt+Ue),Gt=this&&this!==Mi&&this instanceof Re?xe:y;++xtVe))return!1;var xt=xe.get(y),Tt=xe.get(_);if(xt&&Tt)return xt==_&&Tt==y;var Nt=-1,Gt=!0,gn=A&v?new ch:n;for(xe.set(y,_),xe.set(_,y);++Nt1?"& ":"")+_[Y],_=_.join(A>2?", ":" "),y.replace(vs,`{ /* [wrapped with `+_+`] */ `)}function zre(y){return Zn(y)||gh(y)||!!(i3&&y&&y[i3])}function Dc(y,_){var A=typeof y;return _=_==null?L:_,!!_&&(A=="number"||A!="symbol"&&ai.test(y))&&y>-1&&y%1==0&&y<_}function _a(y,_,A){if(!Po(A))return!1;var Y=typeof _;return(Y=="number"?Wa(A)&&Dc(_,A.length):Y=="string"&&_ in A)?Yl(A[_],y):!1}function gT(y,_){if(Zn(y))return!1;var A=typeof y;return A=="number"||A=="symbol"||A=="boolean"||y==null||Os(y)?!0:Dt.test(y)||!$t.test(y)||_!=null&&y in ro(_)}function jre(y){var _=typeof y;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?y!=="__proto__":y===null}function vT(y){var _=eO(y),A=be[_];if(typeof A!="function"||!(_ in xr.prototype))return!1;if(y===A)return!0;var Y=fT(A);return!!Y&&y===Y[0]}function Wre(y){return!!t3&&t3 in y}var Qre=P_?Ic:$T;function Xm(y){var _=y&&y.constructor,A=typeof _=="function"&&_.prototype||Xp;return y===A}function tL(y){return y===y&&!Po(y)}function nL(y,_){return function(A){return A==null?!1:A[y]===_&&(_!==n||y in ro(A))}}function Hre(y){var _=aO(y,function(Y){return A.size===u&&A.clear(),Y}),A=_.cache;return _}function Ure(y,_){var A=y[1],Y=_[1],le=A|Y,xe=le<(m|b|E),Re=Y==E&&A==O||Y==E&&A==T&&y[7].length<=_[8]||Y==(E|T)&&_[7].length<=_[8]&&A==O;if(!(xe||Re))return y;Y&m&&(y[2]=_[2],le|=A&m?0:w);var Ve=_[3];if(Ve){var Ue=y[3];y[3]=Ue?B3(Ue,Ve,_[4]):Ve,y[4]=Ue?$d(y[3],c):_[4]}return Ve=_[5],Ve&&(Ue=y[5],y[5]=Ue?F3(Ue,Ve,_[6]):Ve,y[6]=Ue?$d(y[5],c):_[6]),Ve=_[7],Ve&&(y[7]=Ve),Y&E&&(y[8]=y[8]==null?_[8]:Ki(y[8],_[8])),y[9]==null&&(y[9]=_[9]),y[0]=_[0],y[1]=le,y}function Yre(y){var _=[];if(y!=null)for(var A in ro(y))_.push(A);return _}function Xre(y){return M_.call(y)}function rL(y,_,A){return _=li(_===n?y.length-1:_,0),function(){for(var Y=arguments,le=-1,xe=li(Y.length-_,0),Re=lt(xe);++le0){if(++_>=R)return arguments[0]}else _=0;return y.apply(n,arguments)}}function nO(y,_){var A=-1,Y=y.length,le=Y-1;for(_=_===n?Y:_;++A<_;){var xe=eT(A,le),Re=y[xe];y[xe]=y[A],y[A]=Re}return y.length=_,y}var lL=Hre(function(y){var _=[];return y.charCodeAt(0)===46&&_.push(""),y.replace(Vn,function(A,Y,le,xe){_.push(le?xe.replace(Lt,"$1"):Y||A)}),_});function Pu(y){if(typeof y=="string"||Os(y))return y;var _=y+"";return _=="0"&&1/y==-Q?"-0":_}function ph(y){if(y!=null){try{return N_.call(y)}catch{}try{return y+""}catch{}}return""}function Gre(y,_){return Ks(te,function(A){var Y="_."+A[0];_&A[1]&&!E_(y,Y)&&y.push(Y)}),y.sort()}function uL(y){if(y instanceof xr)return y.clone();var _=new el(y.__wrapped__,y.__chain__);return _.__actions__=ja(y.__actions__),_.__index__=y.__index__,_.__values__=y.__values__,_}function qre(y,_,A){(A?_a(y,_,A):_===n)?_=1:_=li(rr(_),0);var Y=y==null?0:y.length;if(!Y||_<1)return[];for(var le=0,xe=0,Re=lt(B_(Y/_));le1?y[_-1]:n;return A=typeof A=="function"?(y.pop(),A):n,gL(y,A)});function vL(y){var _=be(y);return _.__chain__=!0,_}function Koe(y,_){return _(y),y}function rO(y,_){return _(y)}var Joe=Rc(function(y){var _=y.length,A=_?y[0]:0,Y=this.__wrapped__,le=function(xe){return HE(xe,y)};return _>1||this.__actions__.length||!(Y instanceof xr)||!Dc(A)?this.thru(le):(Y=Y.slice(A,+A+(_?1:0)),Y.__actions__.push({func:rO,args:[le],thisArg:n}),new el(Y,this.__chain__).thru(function(xe){return _&&!xe.length&&xe.push(n),xe}))});function eie(){return vL(this)}function tie(){return new el(this.value(),this.__chain__)}function nie(){this.__values__===n&&(this.__values__=PL(this.value()));var y=this.__index__>=this.__values__.length,_=y?n:this.__values__[this.__index__++];return{done:y,value:_}}function rie(){return this}function oie(y){for(var _,A=this;A instanceof j_;){var Y=uL(A);Y.__index__=0,Y.__values__=n,_?le.__wrapped__=Y:_=Y;var le=Y;A=A.__wrapped__}return le.__wrapped__=y,_}function iie(){var y=this.__wrapped__;if(y instanceof xr){var _=y;return this.__actions__.length&&(_=new xr(this)),_=_.reverse(),_.__actions__.push({func:rO,args:[bT],thisArg:n}),new el(_,this.__chain__)}return this.thru(bT)}function aie(){return M3(this.__wrapped__,this.__actions__)}var sie=Z_(function(y,_,A){Yr.call(y,A)?++y[A]:Mc(y,A,1)});function lie(y,_,A){var Y=Zn(y)?HI:Kne;return A&&_a(y,_,A)&&(_=n),Y(y,An(_,3))}function uie(y,_){var A=Zn(y)?Nd:g3;return A(y,An(_,3))}var cie=W3(cL),die=W3(dL);function fie(y,_){return $i(oO(y,_),1)}function hie(y,_){return $i(oO(y,_),Q)}function pie(y,_,A){return A=A===n?1:rr(A),$i(oO(y,_),A)}function mL(y,_){var A=Zn(y)?Ks:Dd;return A(y,An(_,3))}function yL(y,_){var A=Zn(y)?$te:p3;return A(y,An(_,3))}var gie=Z_(function(y,_,A){Yr.call(y,A)?y[A].push(_):Mc(y,A,[_])});function vie(y,_,A,Y){y=Wa(y)?y:ng(y),A=A&&!Y?rr(A):0;var le=y.length;return A<0&&(A=li(le+A,0)),uO(y)?A<=le&&y.indexOf(_,A)>-1:!!le&&Qp(y,_,A)>-1}var mie=fr(function(y,_,A){var Y=-1,le=typeof _=="function",xe=Wa(y)?lt(y.length):[];return Dd(y,function(Re){xe[++Y]=le?ys(_,Re,A):Qm(Re,_,A)}),xe}),yie=Z_(function(y,_,A){Mc(y,A,_)});function oO(y,_){var A=Zn(y)?Co:O3;return A(y,An(_,3))}function bie(y,_,A,Y){return y==null?[]:(Zn(_)||(_=_==null?[]:[_]),A=Y?n:A,Zn(A)||(A=A==null?[]:[A]),C3(y,_,A))}var _ie=Z_(function(y,_,A){y[A?0:1].push(_)},function(){return[[],[]]});function Oie(y,_,A){var Y=Zn(y)?ME:ZI,le=arguments.length<3;return Y(y,An(_,4),A,le,Dd)}function wie(y,_,A){var Y=Zn(y)?Rte:ZI,le=arguments.length<3;return Y(y,An(_,4),A,le,p3)}function Sie(y,_){var A=Zn(y)?Nd:g3;return A(y,sO(An(_,3)))}function xie(y){var _=Zn(y)?c3:vre;return _(y)}function Cie(y,_,A){(A?_a(y,_,A):_===n)?_=1:_=rr(_);var Y=Zn(y)?Yne:mre;return Y(y,_)}function Eie(y){var _=Zn(y)?Xne:bre;return _(y)}function Tie(y){if(y==null)return 0;if(Wa(y))return uO(y)?Up(y):y.length;var _=Ji(y);return _==q||_==ce?y.size:qE(y).length}function kie(y,_,A){var Y=Zn(y)?$E:_re;return A&&_a(y,_,A)&&(_=n),Y(y,An(_,3))}var Aie=fr(function(y,_){if(y==null)return[];var A=_.length;return A>1&&_a(y,_[0],_[1])?_=[]:A>2&&_a(_[0],_[1],_[2])&&(_=[_[0]]),C3(y,$i(_,1),[])}),iO=une||function(){return Mi.Date.now()};function Pie(y,_){if(typeof _!="function")throw new Js(a);return y=rr(y),function(){if(--y<1)return _.apply(this,arguments)}}function bL(y,_,A){return _=A?n:_,_=y&&_==null?y.length:_,$c(y,E,n,n,n,n,_)}function _L(y,_){var A;if(typeof _!="function")throw new Js(a);return y=rr(y),function(){return--y>0&&(A=_.apply(this,arguments)),y<=1&&(_=n),A}}var OT=fr(function(y,_,A){var Y=m;if(A.length){var le=$d(A,eg(OT));Y|=x}return $c(y,Y,_,A,le)}),OL=fr(function(y,_,A){var Y=m|b;if(A.length){var le=$d(A,eg(OL));Y|=x}return $c(_,Y,y,A,le)});function wL(y,_,A){_=A?n:_;var Y=$c(y,O,n,n,n,n,n,_);return Y.placeholder=wL.placeholder,Y}function SL(y,_,A){_=A?n:_;var Y=$c(y,S,n,n,n,n,n,_);return Y.placeholder=SL.placeholder,Y}function xL(y,_,A){var Y,le,xe,Re,Ve,Ue,xt=0,Tt=!1,Nt=!1,Gt=!0;if(typeof y!="function")throw new Js(a);_=ol(_)||0,Po(A)&&(Tt=!!A.leading,Nt="maxWait"in A,xe=Nt?li(ol(A.maxWait)||0,_):xe,Gt="trailing"in A?!!A.trailing:Gt);function gn(jo){var Xl=Y,Bc=le;return Y=le=n,xt=jo,Re=y.apply(Bc,Xl),Re}function $n(jo){return xt=jo,Ve=Zm(_r,_),Tt?gn(jo):Re}function lr(jo){var Xl=jo-Ue,Bc=jo-xt,WL=_-Xl;return Nt?Ki(WL,xe-Bc):WL}function Rn(jo){var Xl=jo-Ue,Bc=jo-xt;return Ue===n||Xl>=_||Xl<0||Nt&&Bc>=xe}function _r(){var jo=iO();if(Rn(jo))return Tr(jo);Ve=Zm(_r,lr(jo))}function Tr(jo){return Ve=n,Gt&&Y?gn(jo):(Y=le=n,Re)}function ws(){Ve!==n&&R3(Ve),xt=0,Y=Ue=le=Ve=n}function Oa(){return Ve===n?Re:Tr(iO())}function Ss(){var jo=iO(),Xl=Rn(jo);if(Y=arguments,le=this,Ue=jo,Xl){if(Ve===n)return $n(Ue);if(Nt)return R3(Ve),Ve=Zm(_r,_),gn(Ue)}return Ve===n&&(Ve=Zm(_r,_)),Re}return Ss.cancel=ws,Ss.flush=Oa,Ss}var Nie=fr(function(y,_){return h3(y,1,_)}),Mie=fr(function(y,_,A){return h3(y,ol(_)||0,A)});function $ie(y){return $c(y,M)}function aO(y,_){if(typeof y!="function"||_!=null&&typeof _!="function")throw new Js(a);var A=function(){var Y=arguments,le=_?_.apply(this,Y):Y[0],xe=A.cache;if(xe.has(le))return xe.get(le);var Re=y.apply(this,Y);return A.cache=xe.set(le,Re)||xe,Re};return A.cache=new(aO.Cache||Nc),A}aO.Cache=Nc;function sO(y){if(typeof y!="function")throw new Js(a);return function(){var _=arguments;switch(_.length){case 0:return!y.call(this);case 1:return!y.call(this,_[0]);case 2:return!y.call(this,_[0],_[1]);case 3:return!y.call(this,_[0],_[1],_[2])}return!y.apply(this,_)}}function Rie(y){return _L(2,y)}var Die=Ore(function(y,_){_=_.length==1&&Zn(_[0])?Co(_[0],bs(An())):Co($i(_,1),bs(An()));var A=_.length;return fr(function(Y){for(var le=-1,xe=Ki(Y.length,A);++le=_}),gh=y3(function(){return arguments}())?y3:function(y){return Do(y)&&Yr.call(y,"callee")&&!o3.call(y,"callee")},Zn=lt.isArray,Gie=FI?bs(FI):ore;function Wa(y){return y!=null&&lO(y.length)&&!Ic(y)}function zo(y){return Do(y)&&Wa(y)}function qie(y){return y===!0||y===!1||Do(y)&&ba(y)==fe}var Fd=dne||$T,Kie=VI?bs(VI):ire;function Jie(y){return Do(y)&&y.nodeType===1&&!Gm(y)}function eae(y){if(y==null)return!0;if(Wa(y)&&(Zn(y)||typeof y=="string"||typeof y.splice=="function"||Fd(y)||tg(y)||gh(y)))return!y.length;var _=Ji(y);if(_==q||_==ce)return!y.size;if(Xm(y))return!qE(y).length;for(var A in y)if(Yr.call(y,A))return!1;return!0}function tae(y,_){return Hm(y,_)}function nae(y,_,A){A=typeof A=="function"?A:n;var Y=A?A(y,_):n;return Y===n?Hm(y,_,n,A):!!Y}function ST(y){if(!Do(y))return!1;var _=ba(y);return _==ue||_==$e||typeof y.message=="string"&&typeof y.name=="string"&&!Gm(y)}function rae(y){return typeof y=="number"&&a3(y)}function Ic(y){if(!Po(y))return!1;var _=ba(y);return _==G||_==ve||_==ne||_==X}function EL(y){return typeof y=="number"&&y==rr(y)}function lO(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=L}function Po(y){var _=typeof y;return y!=null&&(_=="object"||_=="function")}function Do(y){return y!=null&&typeof y=="object"}var TL=zI?bs(zI):sre;function oae(y,_){return y===_||GE(y,_,hT(_))}function iae(y,_,A){return A=typeof A=="function"?A:n,GE(y,_,hT(_),A)}function aae(y){return kL(y)&&y!=+y}function sae(y){if(Qre(y))throw new Un(i);return b3(y)}function lae(y){return y===null}function uae(y){return y==null}function kL(y){return typeof y=="number"||Do(y)&&ba(y)==Ie}function Gm(y){if(!Do(y)||ba(y)!=Oe)return!1;var _=D_(y);if(_===null)return!0;var A=Yr.call(_,"constructor")&&_.constructor;return typeof A=="function"&&A instanceof A&&N_.call(A)==ine}var xT=jI?bs(jI):lre;function cae(y){return EL(y)&&y>=-L&&y<=L}var AL=WI?bs(WI):ure;function uO(y){return typeof y=="string"||!Zn(y)&&Do(y)&&ba(y)==Ae}function Os(y){return typeof y=="symbol"||Do(y)&&ba(y)==ye}var tg=QI?bs(QI):cre;function dae(y){return y===n}function fae(y){return Do(y)&&Ji(y)==Me}function hae(y){return Do(y)&&ba(y)==Fe}var pae=J_(KE),gae=J_(function(y,_){return y<=_});function PL(y){if(!y)return[];if(Wa(y))return uO(y)?Hl(y):ja(y);if(Lm&&y[Lm])return Yte(y[Lm]());var _=Ji(y),A=_==q?FE:_==ce?k_:ng;return A(y)}function Lc(y){if(!y)return y===0?y:0;if(y=ol(y),y===Q||y===-Q){var _=y<0?-1:1;return _*H}return y===y?y:0}function rr(y){var _=Lc(y),A=_%1;return _===_?A?_-A:_:0}function NL(y){return y?dh(rr(y),0,U):0}function ol(y){if(typeof y=="number")return y;if(Os(y))return re;if(Po(y)){var _=typeof y.valueOf=="function"?y.valueOf():y;y=Po(_)?_+"":_}if(typeof y!="string")return y===0?y:+y;y=GI(y);var A=ii.test(y);return A||Ni.test(y)?Pte(y.slice(2),A?2:8):xo.test(y)?re:+y}function ML(y){return Au(y,Qa(y))}function vae(y){return y?dh(rr(y),-L,L):y===0?y:0}function jr(y){return y==null?"":_s(y)}var mae=Kp(function(y,_){if(Xm(_)||Wa(_)){Au(_,_i(_),y);return}for(var A in _)Yr.call(_,A)&&jm(y,A,_[A])}),$L=Kp(function(y,_){Au(_,Qa(_),y)}),cO=Kp(function(y,_,A,Y){Au(_,Qa(_),y,Y)}),yae=Kp(function(y,_,A,Y){Au(_,_i(_),y,Y)}),bae=Rc(HE);function _ae(y,_){var A=qp(y);return _==null?A:d3(A,_)}var Oae=fr(function(y,_){y=ro(y);var A=-1,Y=_.length,le=Y>2?_[2]:n;for(le&&_a(_[0],_[1],le)&&(Y=1);++A1),xe}),Au(y,dT(y),A),Y&&(A=tl(A,d|f|h,Mre));for(var le=_.length;le--;)rT(A,_[le]);return A});function Fae(y,_){return DL(y,sO(An(_)))}var Vae=Rc(function(y,_){return y==null?{}:hre(y,_)});function DL(y,_){if(y==null)return{};var A=Co(dT(y),function(Y){return[Y]});return _=An(_),E3(y,A,function(Y,le){return _(Y,le[0])})}function zae(y,_,A){_=Ld(_,y);var Y=-1,le=_.length;for(le||(le=1,y=n);++Y_){var Y=y;y=_,_=Y}if(A||y%1||_%1){var le=s3();return Ki(y+le*(_-y+Ate("1e-"+((le+"").length-1))),_)}return eT(y,_)}var Kae=Jp(function(y,_,A){return _=_.toLowerCase(),y+(A?BL(_):_)});function BL(y){return TT(jr(y).toLowerCase())}function FL(y){return y=jr(y),y&&y.replace(Gs,jte).replace(bte,"")}function Jae(y,_,A){y=jr(y),_=_s(_);var Y=y.length;A=A===n?Y:dh(rr(A),0,Y);var le=A;return A-=_.length,A>=0&&y.slice(A,le)==_}function ese(y){return y=jr(y),y&&Kr.test(y)?y.replace(dr,Wte):y}function tse(y){return y=jr(y),y&&lo.test(y)?y.replace(no,"\\$&"):y}var nse=Jp(function(y,_,A){return y+(A?"-":"")+_.toLowerCase()}),rse=Jp(function(y,_,A){return y+(A?" ":"")+_.toLowerCase()}),ose=j3("toLowerCase");function ise(y,_,A){y=jr(y),_=rr(_);var Y=_?Up(y):0;if(!_||Y>=_)return y;var le=(_-Y)/2;return K_(F_(le),A)+y+K_(B_(le),A)}function ase(y,_,A){y=jr(y),_=rr(_);var Y=_?Up(y):0;return _&&Y<_?y+K_(_-Y,A):y}function sse(y,_,A){y=jr(y),_=rr(_);var Y=_?Up(y):0;return _&&Y<_?K_(_-Y,A)+y:y}function lse(y,_,A){return A||_==null?_=0:_&&(_=+_),gne(jr(y).replace(So,""),_||0)}function use(y,_,A){return(A?_a(y,_,A):_===n)?_=1:_=rr(_),tT(jr(y),_)}function cse(){var y=arguments,_=jr(y[0]);return y.length<3?_:_.replace(y[1],y[2])}var dse=Jp(function(y,_,A){return y+(A?"_":"")+_.toLowerCase()});function fse(y,_,A){return A&&typeof A!="number"&&_a(y,_,A)&&(_=A=n),A=A===n?U:A>>>0,A?(y=jr(y),y&&(typeof _=="string"||_!=null&&!xT(_))&&(_=_s(_),!_&&Hp(y))?Bd(Hl(y),0,A):y.split(_,A)):[]}var hse=Jp(function(y,_,A){return y+(A?" ":"")+TT(_)});function pse(y,_,A){return y=jr(y),A=A==null?0:dh(rr(A),0,y.length),_=_s(_),y.slice(A,A+_.length)==_}function gse(y,_,A){var Y=be.templateSettings;A&&_a(y,_,A)&&(_=n),y=jr(y),_=cO({},_,Y,Z3);var le=cO({},_.imports,Y.imports,Z3),xe=_i(le),Re=BE(le,xe),Ve,Ue,xt=0,Tt=_.interpolate||ma,Nt="__p += '",Gt=VE((_.escape||ma).source+"|"+Tt.source+"|"+(Tt===dt?Ft:ma).source+"|"+(_.evaluate||ma).source+"|$","g"),gn="//# sourceURL="+(Yr.call(_,"sourceURL")?(_.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xte+"]")+` `;y.replace(Gt,function(Rn,_r,Tr,ws,Oa,Ss){return Tr||(Tr=ws),Nt+=y.slice(xt,Ss).replace(et,Qte),_r&&(Ve=!0,Nt+=`' + __e(`+_r+`) + '`),Oa&&(Ue=!0,Nt+=`'; `+Oa+`; __p += '`),Tr&&(Nt+=`' + ((__t = (`+Tr+`)) == null ? '' : __t) + '`),xt=Ss+Rn.length,Rn}),Nt+=`'; `;var $n=Yr.call(_,"variable")&&_.variable;if(!$n)Nt=`with (obj) { `+Nt+` } `;else if(tt.test($n))throw new Un(s);Nt=(Ue?Nt.replace(_t,""):Nt).replace(en,"$1").replace(On,"$1;"),Nt="function("+($n||"obj")+`) { `+($n?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Ve?", __e = _.escape":"")+(Ue?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Nt+`return __p }`;var lr=zL(function(){return Fr(xe,gn+"return "+Nt).apply(n,Re)});if(lr.source=Nt,ST(lr))throw lr;return lr}function vse(y){return jr(y).toLowerCase()}function mse(y){return jr(y).toUpperCase()}function yse(y,_,A){if(y=jr(y),y&&(A||_===n))return GI(y);if(!y||!(_=_s(_)))return y;var Y=Hl(y),le=Hl(_),xe=qI(Y,le),Re=KI(Y,le)+1;return Bd(Y,xe,Re).join("")}function bse(y,_,A){if(y=jr(y),y&&(A||_===n))return y.slice(0,e3(y)+1);if(!y||!(_=_s(_)))return y;var Y=Hl(y),le=KI(Y,Hl(_))+1;return Bd(Y,0,le).join("")}function _se(y,_,A){if(y=jr(y),y&&(A||_===n))return y.replace(So,"");if(!y||!(_=_s(_)))return y;var Y=Hl(y),le=qI(Y,Hl(_));return Bd(Y,le).join("")}function Ose(y,_){var A=k,Y=P;if(Po(_)){var le="separator"in _?_.separator:le;A="length"in _?rr(_.length):A,Y="omission"in _?_s(_.omission):Y}y=jr(y);var xe=y.length;if(Hp(y)){var Re=Hl(y);xe=Re.length}if(A>=xe)return y;var Ve=A-Up(Y);if(Ve<1)return Y;var Ue=Re?Bd(Re,0,Ve).join(""):y.slice(0,Ve);if(le===n)return Ue+Y;if(Re&&(Ve+=Ue.length-Ve),xT(le)){if(y.slice(Ve).search(le)){var xt,Tt=Ue;for(le.global||(le=VE(le.source,jr(Br.exec(le))+"g")),le.lastIndex=0;xt=le.exec(Tt);)var Nt=xt.index;Ue=Ue.slice(0,Nt===n?Ve:Nt)}}else if(y.indexOf(_s(le),Ve)!=Ve){var Gt=Ue.lastIndexOf(le);Gt>-1&&(Ue=Ue.slice(0,Gt))}return Ue+Y}function wse(y){return y=jr(y),y&&to.test(y)?y.replace(yn,qte):y}var Sse=Jp(function(y,_,A){return y+(A?" ":"")+_.toUpperCase()}),TT=j3("toUpperCase");function VL(y,_,A){return y=jr(y),_=A?n:_,_===n?Ute(y)?ene(y):Lte(y):y.match(_)||[]}var zL=fr(function(y,_){try{return ys(y,n,_)}catch(A){return ST(A)?A:new Un(A)}}),xse=Rc(function(y,_){return Ks(_,function(A){A=Pu(A),Mc(y,A,OT(y[A],y))}),y});function Cse(y){var _=y==null?0:y.length,A=An();return y=_?Co(y,function(Y){if(typeof Y[1]!="function")throw new Js(a);return[A(Y[0]),Y[1]]}):[],fr(function(Y){for(var le=-1;++le<_;){var xe=y[le];if(ys(xe[0],this,Y))return ys(xe[1],this,Y)}})}function Ese(y){return qne(tl(y,d))}function kT(y){return function(){return y}}function Tse(y,_){return y==null||y!==y?_:y}var kse=Q3(),Ase=Q3(!0);function Ha(y){return y}function AT(y){return _3(typeof y=="function"?y:tl(y,d))}function Pse(y){return w3(tl(y,d))}function Nse(y,_){return S3(y,tl(_,d))}var Mse=fr(function(y,_){return function(A){return Qm(A,y,_)}}),$se=fr(function(y,_){return function(A){return Qm(y,A,_)}});function PT(y,_,A){var Y=_i(_),le=H_(_,Y);A==null&&!(Po(_)&&(le.length||!Y.length))&&(A=_,_=y,y=this,le=H_(_,_i(_)));var xe=!(Po(A)&&"chain"in A)||!!A.chain,Re=Ic(y);return Ks(le,function(Ve){var Ue=_[Ve];y[Ve]=Ue,Re&&(y.prototype[Ve]=function(){var xt=this.__chain__;if(xe||xt){var Tt=y(this.__wrapped__),Nt=Tt.__actions__=ja(this.__actions__);return Nt.push({func:Ue,args:arguments,thisArg:y}),Tt.__chain__=xt,Tt}return Ue.apply(y,Md([this.value()],arguments))})}),y}function Rse(){return Mi._===this&&(Mi._=ane),this}function NT(){}function Dse(y){return y=rr(y),fr(function(_){return x3(_,y)})}var Ise=lT(Co),Lse=lT(HI),Bse=lT($E);function jL(y){return gT(y)?RE(Pu(y)):pre(y)}function Fse(y){return function(_){return y==null?n:fh(y,_)}}var Vse=U3(),zse=U3(!0);function MT(){return[]}function $T(){return!1}function jse(){return{}}function Wse(){return""}function Qse(){return!0}function Hse(y,_){if(y=rr(y),y<1||y>L)return[];var A=U,Y=Ki(y,U);_=An(_),y-=U;for(var le=LE(Y,_);++A0||_<0)?new xr(A):(y<0?A=A.takeRight(-y):y&&(A=A.drop(y)),_!==n&&(_=rr(_),A=_<0?A.dropRight(-_):A.take(_-y)),A)},xr.prototype.takeRightWhile=function(y){return this.reverse().takeWhile(y).reverse()},xr.prototype.toArray=function(){return this.take(U)},ku(xr.prototype,function(y,_){var A=/^(?:filter|find|map|reject)|While$/.test(_),Y=/^(?:head|last)$/.test(_),le=be[Y?"take"+(_=="last"?"Right":""):_],xe=Y||/^find/.test(_);!le||(be.prototype[_]=function(){var Re=this.__wrapped__,Ve=Y?[1]:arguments,Ue=Re instanceof xr,xt=Ve[0],Tt=Ue||Zn(Re),Nt=function(_r){var Tr=le.apply(be,Md([_r],Ve));return Y&&Gt?Tr[0]:Tr};Tt&&A&&typeof xt=="function"&&xt.length!=1&&(Ue=Tt=!1);var Gt=this.__chain__,gn=!!this.__actions__.length,$n=xe&&!Gt,lr=Ue&&!gn;if(!xe&&Tt){Re=lr?Re:new xr(this);var Rn=y.apply(Re,Ve);return Rn.__actions__.push({func:rO,args:[Nt],thisArg:n}),new el(Rn,Gt)}return $n&&lr?y.apply(this,Ve):(Rn=this.thru(Nt),$n?Y?Rn.value()[0]:Rn.value():Rn)})}),Ks(["pop","push","shift","sort","splice","unshift"],function(y){var _=A_[y],A=/^(?:push|sort|unshift)$/.test(y)?"tap":"thru",Y=/^(?:pop|shift)$/.test(y);be.prototype[y]=function(){var le=arguments;if(Y&&!this.__chain__){var xe=this.value();return _.apply(Zn(xe)?xe:[],le)}return this[A](function(Re){return _.apply(Zn(Re)?Re:[],le)})}}),ku(xr.prototype,function(y,_){var A=be[_];if(A){var Y=A.name+"";Yr.call(Gp,Y)||(Gp[Y]=[]),Gp[Y].push({name:_,func:A})}}),Gp[G_(n,b).name]=[{name:"wrapper",func:n}],xr.prototype.clone=wne,xr.prototype.reverse=Sne,xr.prototype.value=xne,be.prototype.at=Joe,be.prototype.chain=eie,be.prototype.commit=tie,be.prototype.next=nie,be.prototype.plant=oie,be.prototype.reverse=iie,be.prototype.toJSON=be.prototype.valueOf=be.prototype.value=aie,be.prototype.first=be.prototype.head,Lm&&(be.prototype[Lm]=rie),be},Yp=tne();sh?((sh.exports=Yp)._=Yp,AE._=Yp):Mi._=Yp}).call(Io)})(ZP,ZP.exports);var Uqe=ZP.exports;const $D="dynamic-components",bq=(t,e)=>Go.post(`/api/v1/${$D}/`+t,e),Yqe=t=>Go.delete(`/api/v1/${$D}/`+t),Xqe=t=>Go.get(`/api/v1/${$D}/`+t),Zqe={style:{display:"flex","align-items":"center"}},Gqe={__name:"FlowTable",props:["lf","root"],emits:["new","close","open","operate"],setup(t,{expose:e,emit:n}){const{lf:r,root:o}=t,i=z(""),a=z(""),s=z([]),l=z(!1),u=z({}),c=z({page:1,size:20,total:0}),d=k=>{c.value.size=k,c.value.page=1,h()},f=k=>{c.value.page=k,h()},h=async()=>{var k;try{const{data:P}=await cq(o,i.value,c.value.page,c.value.size,a.value);s.value=(P==null?void 0:P.items)||[],c.value.total=P.total||20}catch(P){hr.error(((k=P.response)==null?void 0:k.data)||P.toString())}finally{}},g=Uqe.debounce(()=>{h()},300),v=()=>{h()};jt(()=>{h()});const m=(k,P)=>{var R,D;return((D=(R=k.ruleChain)==null?void 0:R.additionalInfo)==null?void 0:D.updateTime)||""},b=k=>{var R,D;let P=(R=k==null?void 0:k.metadata)==null?void 0:R.endpoints;if(P&&P.length>0){let F=P[0].type||"";return((D=r.rulegoEditor.nodeComponents()[F])==null?void 0:D.icon)||"/images/endpoint/endpoints.svg"}return"/images/endpoint/endpoints.svg"},w=k=>{var R,D;let P=(R=k==null?void 0:k.metadata)==null?void 0:R.endpoints;if(P&&P.length>0){let F=P[0].type||"";return((D=r.rulegoEditor.nodeComponents()[F])==null?void 0:D.label)||F}return""},O=()=>{let k={id:rx(12),name:(o?"\u89C4\u5219\u94FE":"\u5B50\u89C4\u5219\u94FE")+c.value.total||1,root:o,additionalInfo:{description:""}};u.value.updateDefault(k),l.value=!0},S=k=>{l.value=!1,n("new",k)},x=()=>{l.value=!1},C=k=>{n("open",k)},E=k=>{ip.confirm(`\u786E\u5B9A${k.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"} ${k.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{var P;try{await fq(k.id,k.disabled?"start":"stop"),hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),n("operate",k.id,k.disabled?"start":"stop"),await h()}catch(R){hr.error(`${k.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"}\u5931\u8D25: ${((P=R.response)==null?void 0:P.data)||R.toString()}`)}})},T=k=>{ip.confirm(`\u786E\u5B9A\u5220\u9664 ${k.ruleChain.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{var P;try{await LGe(k.ruleChain.id),hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),n("operate","delete"),await h()}catch(R){hr.error(`\u5220\u9664\u5931\u8D25: ${((P=R.response)==null?void 0:P.data)||R.toString()}`)}})},M=k=>{k.ruleChain.disabled=!1,k.ruleChain.root=!1,ip.confirm(`\u786E\u5B9A\u628A ${k.ruleChain.name} \u53D1\u5E03\u6210\u7EC4\u4EF6\u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{var P;try{await bq(k.ruleChain.id,k),hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),r.rulegoEditor.reloadComponents()}catch(R){hr.error(`\u53D1\u5E03\u5931\u8D25: ${((P=R.response)==null?void 0:P.data)||R.toString()}`)}})};return e({reloadData:h}),(k,P)=>{const R=Kn,D=ri,F=ld,W=Ml,I=ao,Q=oi,L=mm,H=ZU,re=Zo,U=Zs,J=vm,ie=AC;return N(),Z(ut,null,[B(p(nU),{locale:p(qX)},{default:V(()=>[B(Q,null,{default:V(()=>[B(D,{span:4},{default:V(()=>[B(R,{type:"primary",onClick:O},{default:V(()=>[We(ze(t.root?"\u65B0\u5EFA\u89C4\u5219\u94FE":"\u65B0\u5EFA\u5B50\u89C4\u5219\u94FE"),1)]),_:1})]),_:1}),B(D,{span:8,offset:12,style:{display:"flex","justify-content":"space-between"}},{default:V(()=>[B(W,{modelValue:a.value,"onUpdate:modelValue":P[0]||(P[0]=te=>a.value=te),clearable:"",placeholder:"\u72B6\u6001",style:{width:"50%"},onChange:v},{default:V(()=>[B(F,{label:"\u505C\u7528\u4E2D",value:"true"}),B(F,{label:"\u8FD0\u884C\u4E2D",value:"false"})]),_:1},8,["modelValue"]),B(I,{"prefix-icon":p(T$),modelValue:i.value,"onUpdate:modelValue":P[1]||(P[1]=te=>i.value=te),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57",onInput:p(g)},null,8,["prefix-icon","modelValue","onInput"])]),_:1})]),_:1}),B(J,{data:s.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:V(()=>[B(L,{prop:"ruleChain.id",label:"ID"}),B(L,{prop:"ruleChain.name",label:"\u540D\u79F0"},{default:V(te=>[ee("div",Zqe,[We(ze(te.row.ruleChain.name||te.row.ruleChain.id)+" ",1),t.root&&w(te.row)?(N(),me(re,{key:0,class:"box-item",effect:"dark",content:`\u89E6\u53D1\u5668:${w(te.row)||"\u624B\u52A8\u89E6\u53D1"}`,placement:"bottom-start"},{default:V(()=>[t.root?(N(),me(H,{key:0,style:{"margin-left":"8px",width:"20px",height:"20px"},src:b(te.row),fit:"cover"},null,8,["src"])):ge("",!0)]),_:2},1032,["content"])):ge("",!0)])]),_:1}),B(L,{prop:"ruleChain.disabled",label:"\u72B6\u6001"},{default:V(te=>{var he,K,ne,fe;return[B(U,{type:te.row.ruleChain.disabled?"info":"success"},{default:V(()=>[We(ze(te.row.ruleChain.disabled?"\u505C\u7528\u4E2D":"\u8FD0\u884C\u4E2D"),1)]),_:2},1032,["type"]),(K=(he=te.row.ruleChain)==null?void 0:he.additionalInfo)!=null&&K.message?(N(),me(re,{key:0,class:"box-item",effect:"dark",content:(fe=(ne=te.row.ruleChain)==null?void 0:ne.additionalInfo)==null?void 0:fe.message,placement:"bottom-start"},{default:V(()=>[B(R,{link:"",size:"small"},{default:V(()=>[We("\u67E5\u770B\u4FE1\u606F")]),_:1})]),_:2},1032,["content"])):ge("",!0)]}),_:1}),B(L,{formatter:m,label:"\u66F4\u65B0\u65F6\u95F4"}),B(L,{fixed:"right",label:"\u64CD\u4F5C","min-width":"150"},{default:V(te=>[B(R,{link:"",icon:p(zQ),type:"primary",size:"small",onClick:he=>C(te.row)},{default:V(()=>[We(" \u8BBE\u8BA1 ")]),_:2},1032,["icon","onClick"]),B(R,{link:"",icon:te.row.ruleChain.disabled?p(ATe):p(hTe),type:te.row.ruleChain.disabled?"success":"danger",size:"small",onClick:he=>E(te.row.ruleChain)},{default:V(()=>[We(ze(te.row.ruleChain.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"),1)]),_:2},1032,["icon","type","onClick"]),B(R,{link:"",icon:p(gC),type:"danger",size:"small",onClick:he=>T(te.row)},{default:V(()=>[We("\u5220\u9664")]),_:2},1032,["icon","onClick"]),t.root?ge("",!0):(N(),me(R,{key:0,link:"",icon:p(WQ),type:"default",size:"small",onClick:he=>M(te.row)},{default:V(()=>[We("\u53D1\u5E03\u6210\u7EC4\u4EF6")]),_:2},1032,["icon","onClick"]))]),_:1})]),_:1},8,["data"]),B(ie,{currentPage:c.value.page,"onUpdate:currentPage":P[2]||(P[2]=te=>c.value.page=te),style:{"margin-top":"10px"},class:"float-right","page-size":c.value.size,total:c.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:d,onCurrentChange:f},null,8,["currentPage","page-size","total"])]),_:1},8,["locale"]),B(yq,{ref_key:"newFlowDialogRef",ref:u,lf:t.lf,show:l.value,onSubmit:S,onClose:x},null,8,["lf","show"])],64)}}};var EV=zl(Gqe,[["__scopeId","data-v-d4b2d698"]]);const qqe={__name:"NewOrOpenFlowDialog",props:["show","lf"],emits:["new","open","close"],setup(t,{emit:e}){const n=z("flows");z(!1);const r=z(),o=z(),i=()=>{n.value==="flows"?r.value.reloadData():o.value.reloadData()},a=c=>{e("new",c)},s=c=>{e("open",c)},l=(c,d)=>{e("operate",c,d)},u=()=>{e("close")};return(c,d)=>{const f=ri,h=oi,g=xc,v=Sc,m=Ei;return N(),me(m,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px",width:"80%",class:"custom-dialog","before-close":u,modelValue:t.show},{header:V(()=>[B(h,null,{default:V(()=>[B(f,{span:12},{default:V(()=>[We("\u89C4\u5219\u94FE")]),_:1})]),_:1})]),default:V(()=>[B(v,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=b=>n.value=b),onTabChange:i},{default:V(()=>[B(g,{label:"\u89C4\u5219\u94FE\u5217\u8868",name:"flows"},{default:V(()=>[B(EV,{ref_key:"flowsRef",ref:r,lf:t.lf,root:!0,onNew:a,onOpen:s,onClose:u,onOperate:l},null,8,["lf"])]),_:1}),B(g,{label:"\u5B50\u89C4\u5219\u94FE\u5217\u8868",name:"subFlows"},{default:V(()=>[B(EV,{ref_key:"subFlowsRef",ref:o,lf:t.lf,root:!1,onNew:a,onOpen:s,onClose:u,onOperate:l},null,8,["lf"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}};var RD={exports:{}};(function(t,e){(function(n,r){r()})(Io,function(){function n(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,d){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,c,d)},f.onerror=function(){console.error("could not download file")},f.send()}function o(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Io=="object"&&Io.global===Io?Io:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,d){var f=a.URL||a.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?i(h):o(h.href)?r(u,c,d):i(h,h.target="_blank")):(h.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(h.href)},4e4),setTimeout(function(){i(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,d),c);else if(o(u))r(u,c,d);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){i(f)})}}:function(u,c,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,d);var h=u.type==="application/octet-stream",g=/constructor/i.test(a.HTMLElement)||a.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||h&&g||s)&&typeof FileReader!="undefined"){var m=new FileReader;m.onloadend=function(){var O=m.result;O=v?O:O.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=O:location=O,f=null},m.readAsDataURL(u)}else{var b=a.URL||a.webkitURL,w=b.createObjectURL(u);f?f.location=w:location.href=w,f=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});a.saveAs=l.saveAs=l,t.exports=l})})(RD);class Ir{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){let o=[];return this.decompose(0,e,o,2),r.length&&r.decompose(0,r.length,o,3),this.decompose(n,this.length,o,1),Yu.from(o,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let r=[];return this.decompose(e,n,r,0),Yu.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),o=new c0(this),i=new c0(e);for(let a=n,s=n;;){if(o.next(a),i.next(a),a=0,o.lineBreak!=i.lineBreak||o.done!=i.done||o.value!=i.value)return!1;if(s+=o.value.length,o.done||s>=r)return!0}}iter(e=1){return new c0(this,e)}iterRange(e,n=this.length){return new _q(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let o=this.line(e).from;r=this.iterRange(o,Math.max(o,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Oq(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ir.empty:e.length<=32?new Qo(e):Yu.from(Qo.split(e,[]))}}class Qo extends Ir{constructor(e,n=Kqe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,o){for(let i=0;;i++){let a=this.text[i],s=o+a.length;if((n?r:s)>=e)return new Jqe(o,s,r,a);o=s+1,r++}}decompose(e,n,r,o){let i=e<=0&&n>=this.length?this:new Qo(TV(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(o&1){let a=r.pop(),s=dw(i.text,a.text.slice(),0,i.length);if(s.length<=32)r.push(new Qo(s,a.length+i.length));else{let l=s.length>>1;r.push(new Qo(s.slice(0,l)),new Qo(s.slice(l)))}}else r.push(i)}replace(e,n,r){if(!(r instanceof Qo))return super.replace(e,n,r);let o=dw(this.text,dw(r.text,TV(this.text,0,e)),n),i=this.length+r.length-(n-e);return o.length<=32?new Qo(o,i):Yu.from(Qo.split(o,[]),i)}sliceString(e,n=this.length,r=` `){let o="";for(let i=0,a=0;i<=n&&ae&&a&&(o+=r),ei&&(o+=s.slice(Math.max(0,e-i),n-i)),i=l+1}return o}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],o=-1;for(let i of e)r.push(i),o+=i.length+1,r.length==32&&(n.push(new Qo(r,o)),r=[],o=-1);return o>-1&&n.push(new Qo(r,o)),n}}class Yu extends Ir{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,o){for(let i=0;;i++){let a=this.children[i],s=o+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,o);o=s+1,r=l+1}}decompose(e,n,r,o){for(let i=0,a=0;a<=n&&i=a){let u=o&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!u?r.push(s):s.decompose(e-a,n-a,r,u)}a=l+1}}replace(e,n,r){if(r.lines=i&&n<=s){let l=a.replace(e-i,n-i,r),u=this.lines-a.lines+l.lines;if(l.lines>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[o]=l,new Yu(c,this.length-(n-e)+r.length)}return super.replace(i,s,l)}i=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` `){let o="";for(let i=0,a=0;ie&&i&&(o+=r),ea&&(o+=s.sliceString(e-a,n-a,r)),a=l+1}return o}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Yu))return 0;let r=0,[o,i,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;o+=n,i+=n){if(o==a||i==s)return r;let l=this.children[o],u=e.children[i];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,o)=>r+o.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let g of e)g.flatten(h);return new Qo(h,n)}let o=Math.max(32,r>>5),i=o<<1,a=o>>1,s=[],l=0,u=-1,c=[];function d(h){let g;if(h.lines>i&&h instanceof Yu)for(let v of h.children)d(v);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Qo&&l&&(g=c[c.length-1])instanceof Qo&&h.lines+g.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new Qo(g.text.concat(h.text),g.length+1+h.length)):(l+h.lines>o&&f(),l+=h.lines,u+=h.length+1,c.push(h))}function f(){l!=0&&(s.push(c.length==1?c[0]:Yu.from(c,u)),u=-1,l=c.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new Yu(s,n)}}Ir.empty=new Qo([""],0);function Kqe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function dw(t,e,n=0,r=1e9){for(let o=0,i=0,a=!0;i=n&&(l>r&&(s=s.slice(0,r-o)),o0?1:(e instanceof Qo?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,o=this.nodes[r],i=this.offsets[r],a=i>>1,s=o instanceof Qo?o.text.length:o.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(o instanceof Qo){let l=o.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=o.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Qo?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class _q{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new c0(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*n,this.value=o.length<=r?o:n<0?o.slice(o.length-r):o.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Oq{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:o}=this.inner.next(e);return n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(Ir.prototype[Symbol.iterator]=function(){return this.iter()},c0.prototype[Symbol.iterator]=_q.prototype[Symbol.iterator]=Oq.prototype[Symbol.iterator]=function(){return this});class Jqe{constructor(e,n,r,o){this.from=e,this.to=n,this.number=r,this.text=o}get length(){return this.to-this.from}}let nv="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return nv[e-1]<=t;return!1}function kV(t){return t>=127462&&t<=127487}const AV=8205;function la(t,e,n=!0,r=!0){return(n?wq:tKe)(t,e,r)}function wq(t,e,n){if(e==t.length)return e;e&&Sq(t.charCodeAt(e))&&xq(t.charCodeAt(e-1))&&e--;let r=Bi(t,e);for(e+=hl(r);e=0&&kV(Bi(t,a));)i++,a-=2;if(i%2==0)break;e+=2}else break}return e}function tKe(t,e,n){for(;e>0;){let r=wq(t,e-2,n);if(r=56320&&t<57344}function xq(t){return t>=55296&&t<56320}function Bi(t,e){let n=t.charCodeAt(e);if(!xq(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Sq(r)?(n-55296<<10)+(r-56320)+65536:n}function DD(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function hl(t){return t<65536?1:2}const GP=/\r\n?|\n/;var zi=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(zi||(zi={}));class oc{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return i+(e-o);i+=s}else{if(r!=zi.Simple&&u>=e&&(r==zi.TrackDel&&oe||r==zi.TrackBefore&&oe))return null;if(u>e||u==e&&n<0&&!s)return e==o||n<0?i:i+l;i+=l}o=u}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return i}touchesRange(e,n=e){for(let r=0,o=0;r=0&&o<=n&&s>=e)return on?"cover":!0;o=s}return!1}toString(){let e="";for(let n=0;n=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new oc(e)}static create(e){return new oc(e)}}class di extends oc{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return qP(this,(n,r,o,i,a)=>e=e.replace(o,o+(r-n),a),!1),e}mapDesc(e,n=!1){return KP(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let o=0,i=0;o=0){n[o]=s,n[o+1]=a;let l=o>>1;for(;r.length0&&uf(r,n,i.text),i.forward(c),s+=c}let u=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let o=[],i=[],a=0,s=null;function l(c=!1){if(!c&&!o.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let g=h?typeof h=="string"?Ir.of(h.split(r||GP)):h:Ir.empty,v=g.length;if(d==f&&v==0)return;da&&na(o,d-a,-1),na(o,f-d,v),uf(i,o,g),a=f}}return u(e),l(!s),s}static empty(e){return new di(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let o=0;os&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(i.length==1)n.push(i[0],0);else{for(;r.length=0&&n<=0&&n==t[o+1]?t[o]+=e:e==0&&t[o]==0?t[o+1]+=n:r?(t[o]+=e,t[o+1]+=n):t.push(e,n)}function uf(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(o,u,i,c,d),o=u,i=c}}}function KP(t,e,n,r=!1){let o=[],i=r?[]:null,a=new fb(t),s=new fb(e);for(let l=-1;;)if(a.ins==-1&&s.ins==-1){let u=Math.min(a.len,s.len);na(o,u,-1),a.forward(u),s.forward(u)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let u=0,c=a.len;for(;c;)if(s.ins==-1){let d=Math.min(c,s.len);u+=d,c-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>u),i.forward2(l),a.forward(l)}}}}class fb{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Ir.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ir.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class qh{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,o;return this.empty?r=o=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),r==this.from&&o==this.to?this:new qh(r,o,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Ct.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Ct.range(this.anchor,r)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ct.range(e.anchor,e.head)}static create(e,n,r){return new qh(e,n,r)}}class Ct{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Ct.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ct(e.ranges.map(n=>qh.fromJSON(n)),e.main)}static single(e,n=e){return new Ct([Ct.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,o=0;oe?8:0)|i)}static normalized(e,n=0){let r=e[n];e.sort((o,i)=>o.from-i.from),n=e.indexOf(r);for(let o=1;oi.head?Ct.range(l,s):Ct.range(s,l))}}return new Ct(e,n)}}function Eq(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let ID=0;class cn{constructor(e,n,r,o,i){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=o,this.id=ID++,this.default=e([]),this.extensions=typeof i=="function"?i(this):i}get reader(){return this}static define(e={}){return new cn(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:LD),!!e.static,e.enables)}of(e){return new fw([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fw(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new fw(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function LD(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class fw{constructor(e,n,r,o){this.dependencies=e,this.facet=n,this.type=r,this.value=o,this.id=ID++}dynamicSlot(e){var n;let r=this.value,o=this.facet.compareInput,i=this.id,a=e[i]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:(((n=e[d.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||JP(d,c)){let h=r(d);if(s?!PV(h,d.values[a],o):!o(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,g=f.config.address[i];if(g!=null){let v=ix(f,g);if(this.dependencies.every(m=>m instanceof cn?f.facet(m)===d.facet(m):m instanceof Ti?f.field(m,!1)==d.field(m,!1):!0)||(s?PV(h=r(d),v,o):o(h=r(d),v)))return d.values[a]=v,0}else h=r(d);return d.values[a]=h,1}}}}function PV(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),o=n.map(l=>l.type),i=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let u=[];for(let c=0;cr===o),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(NV).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,o)=>{let i=r.values[n],a=this.updateF(i,o);return this.compareF(i,a)?0:(r.values[n]=a,1)},reconfigure:(r,o)=>o.config.address[this.id]!=null?(r.values[n]=o.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,NV.of({field:this,create:e})]}get extension(){return this}}const zh={lowest:4,low:3,default:2,high:1,highest:0};function fy(t){return e=>new Tq(e,t)}const Lp={highest:fy(zh.highest),high:fy(zh.high),default:fy(zh.default),low:fy(zh.low),lowest:fy(zh.lowest)};class Tq{constructor(e,n){this.inner=e,this.prec=n}}class p_{of(e){return new eN(this,e)}reconfigure(e){return p_.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class eN{constructor(e,n){this.compartment=e,this.inner=n}}class ox{constructor(e,n,r,o,i,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=o,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let o=[],i=Object.create(null),a=new Map;for(let f of rKe(e,n,a))f instanceof Ti?o.push(f):(i[f.facet.id]||(i[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],u=[];for(let f of o)s[f.id]=u.length<<1,u.push(h=>f.slot(h));let c=r==null?void 0:r.config.facets;for(let f in i){let h=i[f],g=h[0].facet,v=c&&c[f]||[];if(h.every(m=>m.type==0))if(s[g.id]=l.length<<1|1,LD(v,h))l.push(r.facet(g));else{let m=g.combine(h.map(b=>b.value));l.push(r&&g.compare(m,r.facet(g))?r.facet(g):m)}else{for(let m of h)m.type==0?(s[m.id]=l.length<<1|1,l.push(m.value)):(s[m.id]=u.length<<1,u.push(b=>m.dynamicSlot(b)));s[g.id]=u.length<<1,u.push(m=>nKe(m,g,h))}}let d=u.map(f=>f(s));return new ox(e,a,d,s,l,i)}}function rKe(t,e,n){let r=[[],[],[],[],[]],o=new Map;function i(a,s){let l=o.get(a);if(l!=null){if(l<=s)return;let u=r[l].indexOf(a);u>-1&&r[l].splice(u,1),a instanceof eN&&n.delete(a.compartment)}if(o.set(a,s),Array.isArray(a))for(let u of a)i(u,s);else if(a instanceof eN){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(a.compartment)||a.inner;n.set(a.compartment,u),i(u,s)}else if(a instanceof Tq)i(a.inner,a.prec);else if(a instanceof Ti)r[s].push(a),a.provides&&i(a.provides,s);else if(a instanceof fw)r[s].push(a),a.facet.extensions&&i(a.facet.extensions,zh.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(u,s)}}return i(t,zh.default),r.reduce((a,s)=>a.concat(s))}function d0(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let o=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|o}function ix(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const kq=cn.define(),Aq=cn.define({combine:t=>t.some(e=>e),static:!0}),Pq=cn.define({combine:t=>t.length?t[0]:void 0,static:!0}),Nq=cn.define(),Mq=cn.define(),$q=cn.define(),Rq=cn.define({combine:t=>t.length?t[0]:!1});class Ad{constructor(e,n){this.type=e,this.value=n}static define(){return new oKe}}class oKe{of(e){return new Ad(this,e)}}class iKe{constructor(e){this.map=e}of(e){return new qn(this,e)}}class qn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new qn(this.type,n)}is(e){return this.type==e}static define(e={}){return new iKe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let o of e){let i=o.map(n);i&&r.push(i)}return r}}qn.reconfigure=qn.define();qn.appendConfig=qn.define();class gi{constructor(e,n,r,o,i,a){this.startState=e,this.changes=n,this.selection=r,this.effects=o,this.annotations=i,this.scrollIntoView=a,this._doc=null,this._state=null,r&&Eq(r,n.newLength),i.some(s=>s.type==gi.time)||(this.annotations=i.concat(gi.time.of(Date.now())))}static create(e,n,r,o,i,a){return new gi(e,n,r,o,i,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(gi.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}gi.time=Ad.define();gi.userEvent=Ad.define();gi.addToHistory=Ad.define();gi.remote=Ad.define();function aKe(t,e){let n=[];for(let r=0,o=0;;){let i,a;if(r=t[r]))i=t[r++],a=t[r++];else if(o=0;o--){let i=r[o](t);i instanceof gi?t=i:Array.isArray(i)&&i.length==1&&i[0]instanceof gi?t=i[0]:t=Iq(e,rv(i),!1)}return t}function lKe(t){let e=t.startState,n=e.facet($q),r=t;for(let o=n.length-1;o>=0;o--){let i=n[o](t);i&&Object.keys(i).length&&(r=Dq(r,tN(e,i,t.changes.newLength),!0))}return r==t?t:gi.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const uKe=[];function rv(t){return t==null?uKe:Array.isArray(t)?t:[t]}var To=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(To||(To={}));const cKe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let nN;try{nN=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function dKe(t){if(nN)return nN.test(t);for(let e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||cKe.test(n)))return!0}return!1}function fKe(t){return e=>{if(!/\S/.test(e))return To.Space;if(dKe(e))return To.Word;for(let n=0;n-1)return To.Word;return To.Other}}class Or{constructor(e,n,r,o,i,a){this.config=e,this.doc=n,this.selection=r,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let s=0;so.set(l,s)),n=null),o.set(a.value.compartment,a.value.extension)):a.is(qn.reconfigure)?(n=null,r=a.value):a.is(qn.appendConfig)&&(n=null,r=rv(r).concat(a.value));let i;n?i=e.startState.values.slice():(n=ox.resolve(r,o,this),i=new Or(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(s,l)=>l.reconfigure(s,this),null).values),new Or(n,e.newDoc,e.newSelection,i,(a,s)=>s.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Ct.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),o=this.changes(r.changes),i=[r.range],a=rv(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return Or.create({doc:e.doc,selection:Ct.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=ox.resolve(e.extensions||[],new Map),r=e.doc instanceof Ir?e.doc:Ir.of((e.doc||"").split(n.staticFacet(Or.lineSeparator)||GP)),o=e.selection?e.selection instanceof Ct?e.selection:Ct.single(e.selection.anchor,e.selection.head):Ct.single(0);return Eq(o,r.length),n.staticFacet(Aq)||(o=o.asSingle()),new Or(n,r,o,n.dynamicSlots.map(()=>null),(i,a)=>a.create(i),null)}get tabSize(){return this.facet(Or.tabSize)}get lineBreak(){return this.facet(Or.lineSeparator)||` `}get readOnly(){return this.facet(Rq)}phrase(e,...n){for(let r of this.facet(Or.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,o)=>{if(o=="$")return"$";let i=+(o||1);return!i||i>n.length?r:n[i-1]})),e}languageDataAt(e,n,r=-1){let o=[];for(let i of this.facet(kq))for(let a of i(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&o.push(a[e]);return o}charCategorizer(e){return fKe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:o}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=la(n,a,!1);if(i(n.slice(l,a))!=To.Word)break;a=l}for(;st.length?t[0]:4});Or.lineSeparator=Pq;Or.readOnly=Rq;Or.phrases=cn.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(o=>t[o]==e[o])}});Or.languageData=kq;Or.changeFilter=Nq;Or.transactionFilter=Mq;Or.transactionExtender=$q;p_.reconfigure=qn.define();function Ec(t,e,n={}){let r={};for(let o of t)for(let i of Object.keys(o)){let a=o[i],s=r[i];if(s===void 0)r[i]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,i))r[i]=n[i](s,a);else throw new Error("Config merge conflict for field "+i)}for(let o in e)r[o]===void 0&&(r[o]=e[o]);return r}class Ep{eq(e){return this==e}range(e,n=e){return hb.create(e,n,this)}}Ep.prototype.startSide=Ep.prototype.endSide=0;Ep.prototype.point=!1;Ep.prototype.mapMode=zi.TrackDel;class hb{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new hb(e,n,r)}}function rN(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class BD{constructor(e,n,r,o){this.from=e,this.to=n,this.value=r,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,o=0){let i=r?this.to:this.from;for(let a=o,s=i.length;;){if(a==s)return a;let l=a+s>>1,u=i[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return u>=0?a:s;u>=0?s=l:a=l+1}}between(e,n,r,o){for(let i=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,i);ih||f==h&&u.startSide>0&&u.endSide<=0)continue;(h-f||u.endSide-u.startSide)<0||(a<0&&(a=f),u.point&&(s=Math.max(s,h-f)),r.push(u),o.push(f-a),i.push(h-a))}return{mapped:r.length?new BD(o,i,r,s):null,pos:a}}}class Qr{constructor(e,n,r,o){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=o}static create(e,n,r,o){return new Qr(e,n,r,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:o=0,filterTo:i=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(rN)),this.isEmpty)return n.length?Qr.of(n):this;let s=new Lq(this,null,-1).goto(0),l=0,u=[],c=new If;for(;s.value||l=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||is.to||i=i&&e<=i+a.length&&a.between(i,e-i,n-i,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return pb.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return pb.from(e).goto(n)}static compare(e,n,r,o,i=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=i),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=i),l=MV(a,s,r),u=new hy(a,l,i),c=new hy(s,l,i);r.iterGaps((d,f,h)=>$V(u,d,c,f,h,o)),r.empty&&r.length==0&&$V(u,0,c,0,0,o)}static eq(e,n,r=0,o){o==null&&(o=1e9-1);let i=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),a=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let s=MV(i,a),l=new hy(i,s,0).goto(r),u=new hy(a,s,0).goto(r);for(;;){if(l.to!=u.to||!oN(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>o)return!0;l.next(),u.next()}}static spans(e,n,r,o,i=-1){let a=new hy(e,null,i).goto(n),s=n,l=a.openStart;for(;;){let u=Math.min(a.to,r);if(a.point){let c=a.activeForPoint(a.to),d=a.pointFroms&&(o.span(s,u,a.active,l),l=a.openEnd(u));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new If;for(let o of e instanceof hb?[e]:n?hKe(e):e)r.add(o.from,o.to,o.value);return r.finish()}}Qr.empty=new Qr([],[],null,-1);function hKe(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(rN);e=r}return t}Qr.empty.nextLayer=Qr.empty;class If{finishChunk(e){this.chunks.push(new BD(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new If)).add(e,n,r)}addInner(e,n,r){let o=e-this.lastTo||r.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Qr.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Qr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function MV(t,e,n){let r=new Map;for(let i of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&o.push(new Lq(a,n,r,i));return o.length==1?o[0]:new pb(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)W2(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)W2(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),W2(this.heap,0)}}}function W2(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let o=t[r];if(r+1=0&&(o=t[r+1],r++),n.compare(o)<0)break;t[r]=n,t[e]=o,e=r}}class hy{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=pb.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){c1(this.active,e),c1(this.activeTo,e),c1(this.activeRank,e),this.minActive=RV(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:o,rank:i}=this.cursor;for(;n-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),r&&c1(r,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let i=this.cursor.value;if(!i.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[o]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function $V(t,e,n,r,o,i){t.goto(e),n.goto(r);let a=r+o,s=r,l=r-e;for(;;){let u=t.to+l-n.to||t.endSide-n.endSide,c=u<0?t.to+l:n.to,d=Math.min(c,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&oN(t.activeForPoint(t.to),n.activeForPoint(n.to))||i.comparePoint(s,d,t.point,n.point):d>s&&!oN(t.active,n.active)&&i.compareRange(s,d,t.active,n.active),c>a)break;s=c,u<=0&&t.next(),u>=0&&n.next()}}function oN(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function RV(t,e){let n=-1,r=1e9;for(let o=0;o=e)return o;if(o==t.length)break;i+=t.charCodeAt(o)==9?n-i%n:1,o=la(t,o)}return r===!0?-1:t.length}const aN="\u037C",DV=typeof Symbol=="undefined"?"__"+aN:Symbol.for(aN),sN=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),IV=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class Lf{constructor(e,n){this.rules=[];let{finish:r}=n||{};function o(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function i(a,s,l,u){let c=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let g=s[h];if(/&/.test(h))i(h.split(/,\s*/).map(v=>a.map(m=>v.replace(/&/,m))).reduce((v,m)=>v.concat(m)),g,l);else if(g&&typeof g=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");i(o(h),g,c,f)}else g!=null&&c.push(h.replace(/_.*/,"").replace(/[A-Z]/g,v=>"-"+v.toLowerCase())+": "+g+";")}(c.length||f)&&l.push((r&&!d&&!u?a.map(r):a).join(", ")+" {"+c.join(" ")+"}")}for(let a in e)i(o(a),e[a],this.rules)}getRules(){return this.rules.join(` `)}static newName(){let e=IV[DV]||1;return IV[DV]=e+1,aN+e.toString(36)}static mount(e,n,r){let o=e[sN],i=r&&r.nonce;o?i&&o.setNonce(i):o=new pKe(e,i),o.mount(Array.isArray(n)?n:[n])}}let LV=new Map;class pKe{constructor(e,n){let r=e.ownerDocument||e,o=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let i=LV.get(r);if(i)return e.adoptedStyleSheets=[i.sheet,...e.adoptedStyleSheets],e[sN]=i;this.sheet=new o.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],LV.set(r,this)}else{this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let i=e.head||e;i.insertBefore(this.styleTag,i.firstChild)}this.modules=[],e[sN]=this}mount(e){let n=this.sheet,r=0,o=0;for(let i=0;i-1&&(this.modules.splice(s,1),o--,s=-1),s==-1){if(this.modules.splice(o++,0,a),n)for(let l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},gKe=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),vKe=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Fi=0;Fi<10;Fi++)Bf[48+Fi]=Bf[96+Fi]=String(Fi);for(var Fi=1;Fi<=24;Fi++)Bf[Fi+111]="F"+Fi;for(var Fi=65;Fi<=90;Fi++)Bf[Fi]=String.fromCharCode(Fi+32),gb[Fi]=String.fromCharCode(Fi);for(var Q2 in Bf)gb.hasOwnProperty(Q2)||(gb[Q2]=Bf[Q2]);function mKe(t){var e=gKe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||vKe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?gb:Bf)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function ax(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function lN(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function yKe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function hw(t,e){if(!e.anchorNode)return!1;try{return lN(t,e.anchorNode)}catch{return!1}}function zv(t){return t.nodeType==3?Tp(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function sx(t,e,n,r){return n?BV(t,e,n,r,-1)||BV(t,e,n,r,1):!1}function vb(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function BV(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:dd(t))){if(t.nodeName=="DIV")return!1;let i=t.parentNode;if(!i||i.nodeType!=1)return!1;e=vb(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=o<0?dd(t):0}else return!1}}function dd(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function iE(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function bKe(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function _Ke(t,e,n,r,o,i,a,s){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let f,h=c==l.body,g=1,v=1;if(h)f=bKe(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();g=w.width/c.offsetWidth,v=w.height/c.offsetHeight,f={left:w.left,right:w.left+c.clientWidth*g,top:w.top,bottom:w.top+c.clientHeight*v}}let m=0,b=0;if(o=="nearest")e.top0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+a)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+a,n<0&&e.top-b0&&e.right>f.right+m&&(m=e.right-f.right+m+i)):e.right>f.right&&(m=e.right-f.right+i,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class wKe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?dd(n):0),r,Math.min(e.focusOffset,r?dd(r):0))}set(e,n,r,o){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=o}}let bg=null;function Bq(t){if(t.setActive)return t.setActive();if(bg)return t.focus(bg);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(bg==null?{get preventScroll(){return bg={preventScroll:!0},!0}}:void 0),!bg){bg=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}class aa{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new aa(e.parentNode,vb(e),n)}static after(e,n){return new aa(e.parentNode,vb(e)+1,n)}}const FD=[];class _o{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,o=null,i;for(let a of this.children){if(a.flags&7){if(!a.dom&&(i=o?o.nextSibling:r.firstChild)){let s=_o.get(i);(!s||!s.parent&&s.canReuseDOM(a))&&a.reuseDOM(i)}a.sync(e,n),a.flags&=-8}if(i=o?o.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&i!=a.dom&&(n.written=!0),a.dom.parentNode==r)for(;i&&i!=a.dom;)i=VV(i);else r.insertBefore(a.dom,i);o=a.dom}for(i=o?o.nextSibling:r.firstChild,i&&n&&n.node==r&&(n.written=!0);i;)i=VV(i)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let o=dd(e)==0?0:n==0?-1:1;for(;;){let i=e.parentNode;if(i==this.dom)break;o==0&&i.firstChild!=i.lastChild&&(e==i.firstChild?o=-1:o=1),e=i}o<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!_o.get(r);)r=r.nextSibling;if(!r)return this.length;for(let o=0,i=0;;o++){let a=this.children[o];if(a.dom==r)return i;i+=a.length+a.breakAfter}}domBoundsAround(e,n,r=0){let o=-1,i=-1,a=-1,s=-1;for(let l=0,u=r,c=r;ln)return d.domBoundsAround(e,n,u);if(f>=e&&o==-1&&(o=l,i=u),u>n&&d.dom.parentNode==this.dom){a=l,s=c;break}c=f,u=f+d.breakAfter}return{from:i,to:s<0?r+this.length:s,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=FD){this.markDirty();for(let o=e;othis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function jq(t,e,n,r,o,i,a,s,l){let{children:u}=t,c=u.length?u[e]:null,d=i.length?i[i.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&c&&!a&&!f&&i.length<2&&c.merge(n,o,i.length?d:null,n==0,s,l))){if(r0&&(!a&&i.length&&c.merge(n,c.length,i[0],!1,s,0)?c.breakAfter=i.shift().breakAfter:(n2);var vn={mac:WV||/Mac/.test(Rs.platform),windows:/Win/.test(Rs.platform),linux:/Linux|X11/.test(Rs.platform),ie:aE,ie_version:Qq?uN.documentMode||6:dN?+dN[1]:cN?+cN[1]:0,gecko:zV,gecko_version:zV?+(/Firefox\/(\d+)/.exec(Rs.userAgent)||[0,0])[1]:0,chrome:!!H2,chrome_version:H2?+H2[1]:0,ios:WV,android:/Android\b/.test(Rs.userAgent),webkit:jV,safari:Hq,webkit_version:jV?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:uN.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const CKe=256;class fd extends _o{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof fd)||this.length-(n-e)+r.length>CKe||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new fd(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new aa(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return EKe(this.dom,e,n)}}class hd extends _o{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let o of n)o.setParent(this)}setAttrs(e){if(Fq(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,o,i,a){return r&&(!(r instanceof hd&&r.mark.eq(this.mark))||e&&i<=0||ne&&n.push(r=e&&(o=i),r=l,i++}let a=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new hd(this.mark,n,a)}domAtPos(e){return Uq(this,e)}coordsAt(e,n){return Xq(this,e,n)}}function EKe(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let o=e,i=e,a=0;e==0&&n<0||e==r&&n>=0?vn.chrome||vn.gecko||(e?(o--,a=1):i=0)?0:s.length-1];return vn.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),a?iE(l,a<0):l||null}class cf extends _o{static create(e,n,r){return new cf(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=cf.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,r,o,i,a){return r&&(!(r instanceof cf)||!this.widget.compare(r.widget)||e>0&&i<=0||n0)?aa.before(this.dom):aa.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let o=this.dom.getClientRects(),i=null;if(!o.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?o.length-1:0;i=o[s],!(e>0?s==0:s==o.length-1||i.top0?aa.before(this.dom):aa.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ir.empty}get isHidden(){return!0}}fd.prototype.children=cf.prototype.children=jv.prototype.children=FD;function Uq(t,e){let n=t.dom,{children:r}=t,o=0;for(let i=0;oi&&e0;i--){let a=r[i-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let i=o;i0&&e instanceof hd&&o.length&&(r=o[o.length-1])instanceof hd&&r.mark.eq(e.mark)?Yq(r,e.children[0],n-1):(o.push(e),e.setParent(t)),t.length+=e.length}function Xq(t,e,n){let r=null,o=-1,i=null,a=-1;function s(u,c){for(let d=0,f=0;d=c&&(h.children.length?s(h,c-f):(!i||i.isHidden&&n>0)&&(g>c||f==g&&h.getSide()>0)?(i=h,a=c-f):(f-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(o.indexOf(i)==-1||t[i]!==e[i]))return!1;return!0}function hN(t,e,n){let r=!1;if(e)for(let o in e)n&&o in n||(r=!0,o=="style"?t.style.cssText="":t.removeAttribute(o));if(n)for(let o in n)e&&e[o]==n[o]||(r=!0,o=="style"?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r}function kKe(t){let e=Object.create(null);for(let n=0;n0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){!this.dom||(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){VD(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){Yq(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=fN(n,this.attrs||{})),r&&(this.attrs=fN({class:r},this.attrs||{}))}domAtPos(e){return Uq(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(Fq(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(hN(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let o=this.dom.lastChild;for(;o&&_o.get(o)instanceof hd;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((r=_o.get(o))===null||r===void 0?void 0:r.isEditable)==!1&&(!vn.ios||!this.children.some(i=>i instanceof fd))){let i=document.createElement("BR");i.cmIgnore=!0,this.dom.appendChild(i)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof fd)||/[^ -~]/.test(r.text))return null;let o=zv(r.dom);if(o.length!=1)return null;e+=o[0].width,n=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=Xq(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:o}=this.parent.view.viewState,i=r.bottom-r.top;if(Math.abs(i-o.lineHeight)<2&&o.textHeight=n){if(i instanceof ci)return i;if(a>n)break}o=a+i.breakAfter}return null}}class mf extends _o{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,o,i,a){return r&&(!(r instanceof mf)||!this.widget.compare(r.widget)||e>0&&i<=0||n0}}class Tc{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}destroy(e){}}var Pa=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Pa||(Pa={}));class xn extends Ep{constructor(e,n,r,o){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=o}get heightRelevant(){return!1}static mark(e){return new g_(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Ff(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,o;if(e.isBlockGap)r=-5e8,o=4e8;else{let{start:i,end:a}=Zq(e,n);r=(i?n?-3e8:-1:5e8)-1,o=(a?n?2e8:1:-6e8)+1}return new Ff(e,r,o,n,e.widget||null,!0)}static line(e){return new v_(e)}static set(e,n=!1){return Qr.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xn.none=Qr.empty;class g_ extends xn{constructor(e){let{start:n,end:r}=Zq(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof g_&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&VD(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}g_.prototype.point=!1;class v_ extends xn{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof v_&&this.spec.class==e.spec.class&&VD(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}v_.prototype.mapMode=zi.TrackBefore;v_.prototype.point=!0;class Ff extends xn{constructor(e,n,r,o,i,a){super(n,r,i,e),this.block=o,this.isReplace=a,this.mapMode=o?n<=0?zi.TrackBefore:zi.TrackAfter:zi.TrackDel}get type(){return this.startSide!=this.endSide?Pa.WidgetRange:this.startSide<=0?Pa.WidgetBefore:Pa.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ff&&AKe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ff.prototype.point=!0;function Zq(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n!=null?n:e,end:r!=null?r:e}}function AKe(t,e){return t==e||!!(t&&e&&t.compare(e))}function pN(t,e,n,r=0){let o=n.length-1;o>=0&&n[o]+r>=t?n[o]=Math.max(n[o],e):n.push(t,e)}class f0{constructor(e,n,r,o){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof mf&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ci),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(f1(new jv(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof mf)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:i,lineBreak:a,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=i,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(f1(new fd(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=0}}span(e,n,r,o){this.buildText(n-e,r,o),this.pos=n,this.openStart<0&&(this.openStart=o)}point(e,n,r,o,i,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Ff){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Ff)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mf(r.widget||new HV("div"),s,r));else{let l=cf.create(r.widget||new HV("span"),s,s?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&i<=o.length&&(e0),c=!l.isEditable&&(eo.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),u&&(d.append(f1(new jv(1),o),i),i=o.length+Math.max(0,i-o.length)),d.append(f1(l,o),i),this.atCursorPos=c,this.pendingBuffer=c?eo.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=i)}static build(e,n,r,o,i){let a=new f0(e,n,r,i);return a.openEnd=Qr.spans(o,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function f1(t,e){for(let n of e)t=new hd(n,[t],t.length);return t}class HV extends Tc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Gq=cn.define(),qq=cn.define(),Kq=cn.define(),Jq=cn.define(),gN=cn.define(),eK=cn.define(),tK=cn.define(),nK=cn.define({combine:t=>t.some(e=>e)}),rK=cn.define({combine:t=>t.some(e=>e)});class lx{constructor(e,n="nearest",r="nearest",o=5,i=5){this.range=e,this.y=n,this.x=r,this.yMargin=o,this.xMargin=i}map(e){return e.empty?this:new lx(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const UV=qn.define({map:(t,e)=>t.map(e)});function vu(t,e,n){let r=t.facet(Jq);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const sE=cn.define({combine:t=>t.length?t[0]:!0});let PKe=0;const ky=cn.define();class qo{constructor(e,n,r,o,i){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=o,this.extension=i(this)}static define(e,n){const{eventHandlers:r,eventObservers:o,provide:i,decorations:a}=n||{};return new qo(PKe++,e,r,o,s=>{let l=[ky.of(s)];return a&&l.push(mb.of(u=>{let c=u.plugin(s);return c?a(c):xn.none})),i&&l.push(i(s)),l})}static fromClass(e,n){return qo.define(r=>new e(r),n)}}class U2{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(vu(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){vu(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){vu(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const oK=cn.define(),zD=cn.define(),mb=cn.define(),jD=cn.define(),iK=cn.define();function YV(t,e,n){let r=t.state.facet(iK);if(!r.length)return r;let o=r.map(a=>a instanceof Function?a(t):a),i=[];return Qr.spans(o,e,n,{point(){},span(a,s,l,u){let c=i;for(let d=l.length-1;d>=0;d--,u--){let f=l[d].spec.bidiIsolate,h;if(f!=null)if(u>0&&c.length&&(h=c[c.length-1]).to==a&&h.direction==f)h.to=s,c=h.inner;else{let g={from:a,to:s,direction:f,inner:[]};c.push(g),c=g.inner}}}}),i}const aK=cn.define();function sK(t){let e=0,n=0,r=0,o=0;for(let i of t.state.facet(aK)){let a=i(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(o=Math.max(o,a.bottom)))}return{left:e,right:n,top:r,bottom:o}}const Ay=cn.define();class Cl{constructor(e,n,r,o){this.fromA=e,this.toA=n,this.fromB=r,this.toB=o}join(e){return new Cl(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let o=e[n-1];if(!(o.fromA>r.toA)){if(o.toAc)break;i+=2}if(!l)return r;new Cl(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class ux{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=di.empty(this.startState.doc.length);for(let i of r)this.changes=this.changes.compose(i.changes);let o=[];this.changes.iterChangedRanges((i,a,s,l)=>o.push(new Cl(i,a,s,l))),this.changedRanges=o}static create(e,n,r){return new ux(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var No=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(No||(No={}));const yb=No.LTR,lK=No.RTL;function uK(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(i<0||(o!=0?o<0?s.fromn:e[i].level>s.level))&&(i=a)}}if(i<0)throw new RangeError("Index out of range");return i}}function cK(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;v-=3)if(Du[v+1]==-h){let m=Du[v+2],b=m&2?o:m&4?m&1?i:o:0;b&&(io[d]=io[Du[v]]=b),s=v;break}}else{if(Du.length==189)break;Du[s++]=d,Du[s++]=f,Du[s++]=l}else if((g=io[d])==2||g==1){let v=g==o;l=v?0:1;for(let m=s-3;m>=0;m-=3){let b=Du[m+2];if(b&2)break;if(v)Du[m+2]|=2;else{if(b&4)break;Du[m+2]|=4}}}}}function LKe(t,e,n,r){for(let o=0,i=r;o<=n.length;o++){let a=o?n[o-1].to:t,s=ol;)g==m&&(g=n[--v].from,m=v?n[v-1].to:t),io[--g]=h;l=c}else i=u,l++}}}function mN(t,e,n,r,o,i,a){let s=r%2?2:1;if(r%2==o%2)for(let l=e,u=0;ll&&a.push(new df(l,v.from,h));let m=v.direction==yb!=!(h%2);yN(t,m?r+1:r,o,v.inner,v.from,v.to,a),l=v.to}g=v.to}else{if(g==n||(c?io[g]!=s:io[g]==s))break;g++}f?mN(t,l,g,r+1,o,f,a):le;){let c=!0,d=!1;if(!u||l>i[u-1].to){let v=io[l-1];v!=s&&(c=!1,d=v==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,g=l;e:for(;;)if(u&&g==i[u-1].to){if(d)break e;let v=i[--u];if(!c)for(let m=v.from,b=u;;){if(m==e)break e;if(b&&i[b-1].to==m)m=i[--b].from;else{if(io[m-1]==s)break e;break}}if(f)f.push(v);else{v.toio.length;)io[io.length]=256;let r=[],o=e==yb?0:1;return yN(t,o,o,n,0,t.length,r),r}function dK(t){return[new df(0,t,0)]}let fK="";function FKe(t,e,n,r,o){var i;let a=r.head-t.from,s=-1;if(a==0){if(!o||!t.length)return null;e[0].level!=n&&(a=e[0].side(!1,n),s=0)}else if(a==t.length){if(o)return null;let f=e[e.length-1];f.level!=n&&(a=f.side(!0,n),s=e.length-1)}s<0&&(s=df.find(e,a,(i=r.bidiLevel)!==null&&i!==void 0?i:-1,r.assoc));let l=e[s];a==l.side(o,n)&&(l=e[s+=o?1:-1],a=l.side(!o,n));let u=o==(l.dir==n),c=la(t.text,a,u);if(fK=t.text.slice(Math.min(a,c),Math.max(a,c)),c!=l.side(o,n))return Ct.cursor(c+t.from,u?-1:1,l.level);let d=s==(o?e.length-1:0)?null:e[s+(o?1:-1)];return!d&&l.level!=n?Ct.cursor(o?t.to:t.from,o?-1:1,n):d&&d.level0&&r.length&&(r.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let o=-1;this.view.inputState.composing>=0&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?o=this.domChanged.newSel.head:!UKe(e.changes,this.hasComposition)&&!e.selectionSet&&(o=e.state.selection.main.head));let i=o>-1?zKe(this.view,e.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new Cl(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(vn.ie||vn.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=QKe(a,s,e.changes);return r=Cl.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=vn.chrome||vn.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||o.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to=0?o[a]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:d}=s,f,h,g,v;if(r&&r.range.fromBc){let S=f0.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),x=f0.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,g=S.openStart,v=x.openEnd;let C=this.compositionView(r);x.breakAtStart?C.breakAfter=1:x.content.length&&C.merge(C.length,C.length,x.content[0],!1,x.openStart,0)&&(C.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&C.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(C).concat(x.content)}else({content:f,breakAtStart:h,openStart:g,openEnd:v}=f0.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:m,off:b}=i.findPos(u,1),{i:w,off:O}=i.findPos(l,-1);jq(this,w,O,m,b,f,h,g,v)}r&&this.fixCompositionDOM(r)}compositionView(e){let n=new fd(e.text.nodeValue);n.flags|=8;for(let{deco:o}of e.marks)n=new hd(o,[n],n.length);let r=new ci;return r.append(n,0),r}fixCompositionDOM(e){let n=(i,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=_o.get(i);s&&s!=a&&(s.dom=null),a.setDOM(i)},r=this.childPos(e.range.fromB,1),o=this.children[r.i];n(e.line,o);for(let i=e.marks.length-1;i>=-1;i--)r=o.childPos(r.off,1),o=o.children[r.i],n(i>=0?e.marks[i].node:e.text,o)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,o=r==this.dom,i=!o&&hw(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(o||n||i))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(vn.gecko&&s.empty&&!this.hasComposition&&VKe(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new aa(d,0),a=!0}let c=this.view.observer.selectionRange;(a||!c.focusNode||!sx(l.node,l.offset,c.anchorNode,c.anchorOffset)||!sx(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{vn.android&&vn.chrome&&this.dom.contains(c.focusNode)&&HKe(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=ax(this.view.root);if(d)if(s.empty){if(vn.gecko){let f=jKe(l.node,l.offset);if(f&&f!=3){let h=pK(l.node,l.offset,f==1?1:-1);h&&(l=new aa(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new aa(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new aa(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=ax(e.root),{anchorNode:o,anchorOffset:i}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=ci.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(o,i)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let o=e.offset;!r&&o=0;o--){let i=_o.get(n.childNodes[o]);i instanceof ci&&(r=i.domAtPos(i.length))}return r?new aa(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=_o.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=i-s.breakAfter,u=l-s.length;if(le||s.covers(1))&&(!r||s instanceof ci&&!(r instanceof ci&&n>=0))&&(r=s,o=u),i=u}return r?r.coordsAt(e-o,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),o=this.children[n];if(!(o instanceof ci))return null;for(;o.children.length;){let{i:s,off:l}=o.childPos(r,1);for(;;s++){if(s==o.children.length)return null;if((o=o.children[s]).length)break}r=l}if(!(o instanceof fd))return null;let i=la(o.text,r);if(i==r)return null;let a=Tp(o.dom,r,i).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==No.LTR;for(let u=0,c=0;co)break;if(u>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let g=d.dom.lastChild,v=g?zv(g):[];if(v.length){let m=v[v.length-1],b=l?m.right-h.left:h.right-m.left;b>s&&(s=b,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?No.RTL:No.LTR}measureTextSize(){for(let i of this.children)if(i instanceof ci){let a=i.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let i=zv(e.firstChild)[0];n=e.getBoundingClientRect().height,r=i?i.width/27:7,o=i?i.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:o}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new zq(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,o=0;;o++){let i=o==n.viewports.length?null:n.viewports[o],a=i?i.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(xn.replace({widget:new ZV(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!i)break;r=i.to+1}return xn.set(e)}updateDeco(){let e=this.view.state.facet(mb).map((n,r)=>(this.dynamicDecorationMap[r]=typeof n=="function")?n(this.view):n);for(let n=e.length;nn.anchor?-1:1),o;if(!r)return;!n.empty&&(o=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,o.left),top:Math.min(r.top,o.top),right:Math.max(r.right,o.right),bottom:Math.max(r.bottom,o.bottom)});let i=sK(this.view),a={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom};_Ke(this.view.scrollDOM,a,n.head0)r=r.childNodes[o-1],o=dd(r);else break}if(n>=0)for(let r=t,o=e;;){if(r.nodeType==3)return{node:r,offset:o};if(r.nodeType==1&&o=0)r=r.childNodes[o],o=0;else break}return null}function jKe(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e{re.from&&(n=!0)}),n}function YKe(t,e,n=1){let r=t.charCategorizer(e),o=t.doc.lineAt(e),i=e-o.from;if(o.length==0)return Ct.cursor(e);i==0?n=1:i==o.length&&(n=-1);let a=i,s=i;n<0?a=la(o.text,i,!1):s=la(o.text,i);let l=r(o.text.slice(a,s));for(;a>0;){let u=la(o.text,a,!1);if(r(o.text.slice(u,a))!=l)break;a=u}for(;st?e.left-t:Math.max(0,t-e.right)}function ZKe(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Y2(t,e){return t.tope.top+1}function GV(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function bN(t,e,n){let r,o,i,a,s=!1,l,u,c,d;for(let g=t.firstChild;g;g=g.nextSibling){let v=zv(g);for(let m=0;mO||a==O&&i>w){r=g,o=b,i=w,a=O;let S=O?n0?m0)}w==0?n>b.bottom&&(!c||c.bottomb.top)&&(u=g,d=b):c&&Y2(c,b)?c=qV(c,b.bottom):d&&Y2(d,b)&&(d=GV(d,b.top))}}if(c&&c.bottom>=n?(r=l,o=c):d&&d.top<=n&&(r=u,o=d),!r)return{node:t,offset:0};let f=Math.max(o.left,Math.min(o.right,e));if(r.nodeType==3)return KV(r,f,n);if(s&&r.contentEditable!="false")return bN(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(o.left+o.right)/2?1:0);return{node:t,offset:h}}function KV(t,e,n){let r=t.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;sn?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,h=f;if((vn.chrome||vn.gecko)&&Tp(t,s).getBoundingClientRect().left==c.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};o=s+(h?1:0),i=d}}}return{node:t,offset:o>-1?o:a>0?t.nodeValue.length:0}}function gK(t,e,n,r=-1){var o,i;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,f=d-s;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(f),l.type!=Pa.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=u);){if(x)return n?null:0;x=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:JV(t,a,l,c,d);let g=t.dom.ownerDocument,v=t.root.elementFromPoint?t.root:g,m=v.elementFromPoint(c,d);m&&!t.contentDOM.contains(m)&&(m=null),m||(c=Math.max(a.left+1,Math.min(a.right-1,c)),m=v.elementFromPoint(c,d),m&&!t.contentDOM.contains(m)&&(m=null));let b,w=-1;if(m&&((o=t.docView.nearest(m))===null||o===void 0?void 0:o.isEditable)!=!1){if(g.caretPositionFromPoint){let S=g.caretPositionFromPoint(c,d);S&&({offsetNode:b,offset:w}=S)}else if(g.caretRangeFromPoint){let S=g.caretRangeFromPoint(c,d);S&&({startContainer:b,startOffset:w}=S,(!t.contentDOM.contains(b)||vn.safari&&GKe(b,w,c)||vn.chrome&&qKe(b,w,c))&&(b=void 0))}}if(!b||!t.docView.dom.contains(b)){let S=ci.find(t.docView,h);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:w}=bN(S.dom,c,d))}let O=t.docView.nearest(b);if(!O)return null;if(O.isWidget&&((i=O.dom)===null||i===void 0?void 0:i.nodeType)==1){let S=O.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-(t.defaultLineHeight-s)*.5)/s)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+iN(a,i,t.state.tabSize)}function GKe(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let o=t.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return Tp(t,r-1,r).getBoundingClientRect().left>n}function qKe(t,e,n){if(e!=0)return!1;for(let o=t;;){let i=o.parentNode;if(!i||i.nodeType!=1||i.firstChild!=o)return!1;if(i.classList.contains("cm-line"))break;o=i}let r=t.nodeType==1?t.getBoundingClientRect():Tp(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function _N(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==Pa.Text))return r}return n}function KKe(t,e,n,r){let o=_N(t,e.head),i=!r||o.type!=Pa.Text||!(t.lineWrapping||o.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(i){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(o.from),l=t.posAtCoords({x:n==(s==No.LTR)?a.right-1:a.left+1,y:(i.top+i.bottom)/2});if(l!=null)return Ct.cursor(l,n?-1:1)}return Ct.cursor(n?o.to:o.from,n?-1:1)}function e9(t,e,n,r){let o=t.state.doc.lineAt(e.head),i=t.bidiSpans(o),a=t.textDirectionAt(o.from);for(let s=e,l=null;;){let u=FKe(o,i,a,s,n),c=fK;if(!u){if(o.number==(n?t.state.doc.lines:1))return s;c=` `,o=t.state.doc.line(o.number+(n?1:-1)),i=t.bidiSpans(o),u=Ct.cursor(n?o.from:o.to)}if(l){if(!l(c))return s}else{if(!r)return u;l=r(c)}s=u}}function JKe(t,e,n){let r=t.state.charCategorizer(e),o=r(n);return i=>{let a=r(i);return o==To.Space&&(o=a),o==a}}function eJe(t,e,n,r){let o=e.head,i=n?1:-1;if(o==(n?t.state.doc.length:0))return Ct.cursor(o,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(o,e.assoc||-1),c=t.documentTop;if(u)a==null&&(a=u.left-l.left),s=i<0?u.top:u.bottom;else{let h=t.viewState.lineBlockAt(o);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(o-h.from))),s=(i<0?h.top:h.bottom)+c}let d=l.left+a,f=r!=null?r:t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let g=s+(f+h)*i,v=gK(t,{x:d,y:g},!1,i);if(gl.bottom||(i<0?vo)){let m=t.docView.coordsForChar(v),b=!m||g{if(e>i&&eo(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Ct.cursor(r,rnull),vn.gecko&&mJe(e.contentDOM.ownerDocument)}handleEvent(e){!uJe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let o of r.observers)o(this.view,n);for(let o of r.handlers){if(n.defaultPrevented)break;if(o(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=nJe(e),r=this.handlers,o=this.view.contentDOM;for(let i in n)if(i!="scroll"){let a=!n[i].handlers.length,s=r[i];s&&a!=!s.handlers.length&&(o.removeEventListener(i,this.handleEvent),s=null),s||o.addEventListener(i,this.handleEvent,{passive:a})}for(let i in r)i!="scroll"&&!n[i]&&o.removeEventListener(i,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()r.keyCode==e.keyCode))&&!e.ctrlKey||rJe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(){let e=this.pendingIOSKey;return e?(this.pendingIOSKey=void 0,ov(this.view.contentDOM,e.key,e.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:vn.safari&&!vn.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function t9(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(o){vu(n.state,o)}}}function nJe(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let o=r.spec;if(o&&o.domEventHandlers)for(let i in o.domEventHandlers){let a=o.domEventHandlers[i];a&&n(i).handlers.push(t9(r.value,a))}if(o&&o.domEventObservers)for(let i in o.domEventObservers){let a=o.domEventObservers[i];a&&n(i).observers.push(t9(r.value,a))}}for(let r in pc)n(r).handlers.push(pc[r]);for(let r in yu)n(r).observers.push(yu[r]);return e}const vK=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],rJe="dthko",mK=[16,17,18,20,91,92,224,225],h1=6;function p1(t){return Math.max(0,t)*.7+8}function oJe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class iJe{constructor(e,n,r,o){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=OKe(e.contentDOM),this.atoms=e.state.facet(jD).map(a=>a(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Or.allowMultipleSelections)&&aJe(e,n),this.dragging=lJe(e,n)&&OK(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&oJe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let r=0,o=0,i=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=sK(this.view);e.clientX-a.left<=i.left+h1?r=-p1(i.left-e.clientX):e.clientX+a.right>=i.right-h1&&(r=p1(e.clientX-i.right)),e.clientY-a.top<=i.top+h1?o=-p1(i.top-e.clientY):e.clientY+a.bottom>=i.bottom-h1&&(o=p1(e.clientY-i.bottom)),this.setScrollSpeed(r,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;rthis.select(this.lastEvent),20)}}function aJe(t,e){let n=t.state.facet(Gq);return n.length?n[0](e):vn.mac?e.metaKey:e.ctrlKey}function sJe(t,e){let n=t.state.facet(qq);return n.length?n[0](e):vn.mac?!e.altKey:!e.ctrlKey}function lJe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=ax(t.root);if(!r||r.rangeCount==0)return!0;let o=r.getRangeAt(0).getClientRects();for(let i=0;i=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function uJe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=_o.get(n))&&r.ignoreEvent(e))return!1;return!0}const pc=Object.create(null),yu=Object.create(null),yK=vn.ie&&vn.ie_version<15||vn.ios&&vn.webkit_version<604;function cJe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),bK(t,n.value)},50)}function bK(t,e){let{state:n}=t,r,o=1,i=n.toText(e),a=i.lines==n.selection.ranges.length;if(ON!=null&&n.selection.ranges.every(l=>l.empty)&&ON==i.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((a?i.line(o++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:Ct.cursor(u.from+d.length)}})}else a?r=n.changeByRange(l=>{let u=i.line(o++);return{changes:{from:l.from,to:l.to,insert:u.text},range:Ct.cursor(l.from+u.length)}}):r=n.replaceSelection(i);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}yu.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};pc.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now()),!1);yu.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};yu.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};pc.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(Kq))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=hJe(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new iJe(t,e,n,r)),r&&t.observer.ignore(()=>Bq(t.contentDOM));let o=t.inputState.mouseSelection;if(o)return o.start(e),o.dragging===!1}return!1};function n9(t,e,n,r){if(r==1)return Ct.cursor(e,n);if(r==2)return YKe(t.state,e,n);{let o=ci.find(t.docView,e),i=t.state.doc.lineAt(o?o.posAtEnd:e),a=o?o.posAtStart:i.from,s=o?o.posAtEnd:i.to;return st>=e.top&&t<=e.bottom,r9=(t,e,n)=>_K(e,n)&&t>=n.left&&t<=n.right;function dJe(t,e,n,r){let o=ci.find(t.docView,e);if(!o)return 1;let i=e-o.posAtStart;if(i==0)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&r9(n,r,a))return-1;let s=o.coordsAt(i,1);return s&&r9(n,r,s)?1:a&&_K(r,a)?-1:1}function o9(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:dJe(t,n,e.clientX,e.clientY)}}const fJe=vn.ie&&vn.ie_version<=11;let i9=null,a9=0,s9=0;function OK(t){if(!fJe)return t.detail;let e=i9,n=s9;return i9=t,s9=Date.now(),a9=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(a9+1)%3:1}function hJe(t,e){let n=o9(t,e),r=OK(e),o=t.state.selection;return{update(i){i.docChanged&&(n.pos=i.changes.mapPos(n.pos),o=o.map(i.changes))},get(i,a,s){let l=o9(t,i),u,c=n9(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=n9(t,n.pos,n.bias,r),f=Math.min(d.from,c.from),h=Math.max(d.to,c.to);c=f1&&(u=pJe(o,l.pos))?u:s?o.addRange(c):Ct.create([c])}}}function pJe(t,e){for(let n=0;n=e)return Ct.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}pc.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:r}=t.inputState;return r&&(r.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1};function l9(t,e,n,r){if(!n)return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{mouseSelection:i}=t.inputState,a=r&&i&&i.dragging&&sJe(t,e)?{from:i.dragging.from,to:i.dragging.to}:null,s={from:o,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"})}pc.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{++o==n.length&&l9(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),i()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return l9(t,e,r,!0),!0}return!1};pc.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=yK?null:e.clipboardData;return n?(bK(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(cJe(t),!1)};function gJe(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function vJe(t){let e=[],n=[],r=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),n.push(o));if(!e.length){let o=-1;for(let{from:i}of t.selection.ranges){let a=t.doc.lineAt(i);a.number>o&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),o=a.number}r=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:r}}let ON=null;pc.copy=pc.cut=(t,e)=>{let{text:n,ranges:r,linewise:o}=vJe(t.state);if(!n&&!o)return!1;ON=o?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=yK?null:e.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(gJe(t,n),!1)};const wK=Ad.define();function SK(t,e){let n=[];for(let r of t.facet(tK)){let o=r(t,e);o&&n.push(o)}return n?t.update({effects:n,annotations:wK.of(!0)}):null}function xK(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=SK(t.state,e);n?t.dispatch(n):t.update([])}},10)}yu.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),xK(t)};yu.blur=t=>{t.observer.clearSelectionRange(),xK(t)};yu.compositionstart=yu.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};yu.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,vn.chrome&&vn.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};yu.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};pc.beforeinput=(t,e)=>{var n;let r;if(vn.chrome&&vn.android&&(r=vK.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let o=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var i;(((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return!1};const u9=new Set;function mJe(t){u9.has(t)||(u9.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const c9=["pre-wrap","normal","pre-line","break-spaces"];class yJe{constructor(e){this.lineWrapping=e,this.doc=Ir.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return c9.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=o,this.lineLength=i,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>gw&&(e.heightChanged=!0),this.height=n)}replace(e,n,r){return Na.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,o){let i=this,a=r.doc;for(let s=o.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:d}=o[s],f=i.lineAt(l,mo.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=u?f:i.lineAt(u,mo.ByPosNoHeight,r,0,0);for(d+=h.to-u,u=h.to;s>0&&f.from<=o[s-1].toA;)l=o[s-1].fromA,c=o[s-1].fromB,s--,li*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,o-=s.size}else if(i>o*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,i-=s.size}else break;else if(o=i&&a(this.blockAt(0,r,o,i))}updateHeight(e,n=0,r=!1,o){return o&&o.from<=n&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ps extends CK{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,o){return new Xu(o,this.length,r,this.height,this.breaks)}replace(e,n,r){let o=r[0];return r.length==1&&(o instanceof Ps||o instanceof Li&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof Li?o=new Ps(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):Na.of(r)}updateHeight(e,n=0,r=!1,o){return o&&o.from<=n&&o.more?this.setHeight(e,o.heights[o.index++]):(r||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Li extends Na{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,o=e.doc.lineAt(n+this.length).number,i=o-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*i);a=l/i,this.length>i+1&&(s=(this.height-l)/(this.length-i-1))}else a=this.height/i;return{firstLine:r,lastLine:o,perLine:a,perChar:s}}blockAt(e,n,r,o){let{firstLine:i,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,o);if(n.lineWrapping){let u=o+Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length),c=n.doc.lineAt(u),d=s+c.length*l,f=Math.max(r,e-d/2);return new Xu(c.from,c.length,f,d,0)}else{let u=Math.max(0,Math.min(a-i,Math.floor((e-r)/s))),{from:c,length:d}=n.doc.line(i+u);return new Xu(c,d,r+s*u,s,0)}}lineAt(e,n,r,o,i){if(n==mo.ByHeight)return this.blockAt(e,r,o,i);if(n==mo.ByPosNoHeight){let{from:h,to:g}=r.doc.lineAt(e);return new Xu(h,g-h,0,0,0)}let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(r,i),u=r.doc.lineAt(e),c=s+u.length*l,d=u.number-a,f=o+s*d+l*(u.from-i-d);return new Xu(u.from,u.length,Math.max(o,Math.min(f,o+this.height-c)),c,0)}forEachLine(e,n,r,o,i,a){e=Math.max(e,i),n=Math.min(n,i+this.length);let{firstLine:s,perLine:l,perChar:u}=this.heightMetrics(r,i);for(let c=e,d=o;c<=n;){let f=r.doc.lineAt(c);if(c==e){let g=f.number-s;d+=l*g+u*(e-i-g)}let h=l+u*f.length;a(new Xu(f.from,f.length,d,h,0)),d+=h,c=f.to+1}}replace(e,n,r){let o=this.length-n;if(o>0){let i=r[r.length-1];i instanceof Li?r[r.length-1]=new Li(i.length+o):r.push(null,new Li(o-1))}if(e>0){let i=r[0];i instanceof Li?r[0]=new Li(e+i.length):r.unshift(new Li(e-1),null)}return Na.of(r)}decomposeLeft(e,n){n.push(new Li(e-1),null)}decomposeRight(e,n){n.push(null,new Li(this.length-e-1))}updateHeight(e,n=0,r=!1,o){let i=n+this.length;if(o&&o.from<=n+this.length&&o.more){let a=[],s=Math.max(n,o.from),l=-1;for(o.from>n&&a.push(new Li(o.from-n-1).updateHeight(e,n));s<=i&&o.more;){let c=e.doc.lineAt(s).length;a.length&&a.push(null);let d=o.heights[o.index++];l==-1?l=d:Math.abs(d-l)>=gw&&(l=-2);let f=new Ps(c,d);f.outdated=!1,a.push(f),s+=c+1}s<=i&&a.push(null,new Li(i-s).updateHeight(e,s));let u=Na.of(a);return(l<0||Math.abs(u.height-this.height)>=gw||Math.abs(l-this.heightMetrics(e,n).perLine)>=gw)&&(e.heightChanged=!0),u}else(r||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class _Je extends Na{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,o){let i=r+this.left.height;return es))return u;let c=n==mo.ByPosNoHeight?mo.ByPosNoHeight:mo.ByPos;return l?u.join(this.right.lineAt(s,c,r,a,s)):this.left.lineAt(s,c,r,o,i).join(u)}forEachLine(e,n,r,o,i,a){let s=o+this.left.height,l=i+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let u=this.lineAt(l,mo.ByPos,r,o,i);e=e&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,s,l,a)}}replace(e,n,r){let o=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-o,n-o,r));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let s of r)i.push(s);if(e>0&&d9(i,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,o=r+this.break;if(e>=o)return this.right.decomposeRight(e-o,n);e2*n.size||n.size>2*e.size?Na.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,o){let{left:i,right:a}=this,s=n+i.length+this.break,l=null;return o&&o.from<=n+i.length&&o.more?l=i=i.updateHeight(e,n,r,o):i.updateHeight(e,n,r),o&&o.from<=s+a.length&&o.more?l=a=a.updateHeight(e,s,r,o):a.updateHeight(e,s,r),l?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function d9(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Li&&(r=t[e+1])instanceof Li&&t.splice(e-1,3,new Li(n.length+1+r.length))}const OJe=5;class WD{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof Ps?o.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ps(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=OJe)&&this.addLineDeco(o,i,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ps(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Li(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ps)return e;let n=new Ps(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let o=this.ensureLine();o.length+=r,o.collapsed+=r,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ps)&&!this.isCovered?this.nodes.push(new Ps(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let f=c.getBoundingClientRect();i=Math.max(i,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=u==t.parentNode?f.bottom:Math.min(l,f.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function CJe(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Z2{constructor(e,n,r){this.from=e,this.to=n,this.size=r}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new yJe(n),this.stateDeco=e.facet(mb).filter(r=>typeof r!="function"),this.heightMap=Na.empty().applyChanges(this.stateDeco,Ir.empty,this.heightOracle.setDoc(e.doc),[new Cl(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let o=r?n.head:n.anchor;if(!e.some(({from:i,to:a})=>o>=i&&o<=a)){let{from:i,to:a}=this.lineBlockAt(o);e.push(new g1(i,a))}}this.viewports=e.sort((r,o)=>r.from-o.from),this.scaler=this.heightMap.height<=7e6?h9:new AJe(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Py(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(mb).filter(c=>typeof c!="function");let o=e.changedRanges,i=Cl.extendWithRanges(o,wJe(r,this.stateDeco,e?e.changes:di.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=a&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(rK)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),o=this.heightOracle,i=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?No.RTL:No.LTR;let a=this.heightOracle.mustRefreshForWrapping(i),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let S=s.width/n.offsetWidth,x=s.height/n.offsetHeight;(S>.995&&S<1.005||!isFinite(S)||Math.abs(s.width-n.offsetWidth)<1)&&(S=1),(x>.995&&x<1.005||!isFinite(x)||Math.abs(s.height-n.offsetHeight)<1)&&(x=1),(this.scaleX!=S||this.scaleY!=x)&&(this.scaleX=S,this.scaleY=x,u|=8,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=Vq(e.scrollDOM);let g=(this.printing?CJe:xJe)(n,this.paddingTop),v=g.top-this.pixelViewport.top,m=g.bottom-this.pixelViewport.bottom;this.pixelViewport=g;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let w=s.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(S)&&(a=!0),a||o.lineWrapping&&Math.abs(w-this.contentDOMWidth)>o.charWidth){let{lineHeight:x,charWidth:C,textHeight:E}=e.docView.measureTextSize();a=x>0&&o.refresh(i,x,C,E,w/C,S),a&&(e.docView.minWidth=0,u|=8)}v>0&&m>0?c=Math.max(v,m):v<0&&m<0&&(c=Math.min(v,m)),o.heightChanged=!1;for(let x of this.viewports){let C=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?Na.empty().applyChanges(this.stateDeco,Ir.empty,this.heightOracle,[new Cl(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,a,new bJe(x.from,C))}o.heightChanged&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return O&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new g1(o.lineAt(a-r*1e3,mo.ByHeight,i,0,0).from,o.lineAt(s+(1-r)*1e3,mo.ByHeight,i,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=o.lineAt(u,mo.ByPos,i,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=s+Math.max(10,Math.min(r,250)))&&o>a-2*1e3&&i>1,a=o<<1;if(this.defaultTextDirection!=No.LTR&&!r)return[];let s=[],l=(u,c,d,f)=>{if(c-uu&&mm.from>=d.from&&m.to<=d.to&&Math.abs(m.from-u)m.fromb));if(!v){if(cm.from<=c&&m.to>=c)){let m=n.moveToLineBoundary(Ct.cursor(c),!1,!0).head;m>u&&(c=m)}v=new Z2(u,c,this.gapSize(d,u,c,f))}s.push(v)};for(let u of this.viewportLines){if(u.lengthu.from&&l(u.from,f,u,c),hn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Qr.spans(e,this.viewport.from,this.viewport.to,{span(o,i){n.push({from:o,to:i})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((o,i)=>o.from!=n[i].from||o.to!=n[i].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Py(this.heightMap.lineAt(e,mo.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Py(this.heightMap.lineAt(this.scaler.fromDOM(e),mo.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Py(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class g1{constructor(e,n){this.from=e,this.to=n}}function TJe(t,e,n){let r=[],o=t,i=0;return Qr.spans(n,t,e,{span(){},point(a,s){a>o&&(r.push({from:o,to:a}),i+=a-o),o=s}},20),o=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let o=0;;o++){let{from:i,to:a}=e[o],s=a-i;if(r<=s)return i+r;r-=s}}function m1(t,e){let n=0;for(let{from:r,to:o}of t.ranges){if(e<=o){n+=e-r;break}n+=o-r}return n/t.total}function kJe(t,e){for(let n of t)if(e(n))return n}const h9={toDOM(t){return t},fromDOM(t){return t},scale:1};class AJe{constructor(e,n,r){let o=0,i=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let u=n.lineAt(s,mo.ByPos,e,0,0).top,c=n.lineAt(l,mo.ByPos,e,0,0).bottom;return o+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(n.height-o);for(let s of this.viewports)s.domTop=a+(s.top-i)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),i=s.bottom}toDOM(e){for(let n=0,r=0,o=0;;n++){let i=nPy(o,e)):t._content)}const y1=cn.define({combine:t=>t.join(" ")}),wN=cn.define({combine:t=>t.indexOf(!0)>-1}),SN=Lf.newName(),EK=Lf.newName(),TK=Lf.newName(),kK={"&light":"."+EK,"&dark":"."+TK};function xN(t,e,n){return new Lf(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,o=>{if(o=="&")return t;if(!n||!n[o])throw new RangeError(`Unsupported selector: ${o}`);return n[o]}):t+" "+r}})}const PJe=xN("."+SN,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},kK),Ny="\uFFFF";class NJe{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Or.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ny}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let o=e;;){this.findPointBefore(r,o);let i=this.text.length;this.readNode(o);let a=o.nextSibling;if(a==n)break;let s=_o.get(o),l=_o.get(a);(s&&l?s.breakAfter:(s?s.breakAfter:p9(o))||p9(a)&&(o.nodeName!="BR"||o.cmIgnore)&&this.text.length>i)&&this.lineBreak(),o=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,s;if(this.lineSeparator?(i=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=o.exec(n))&&(i=s.index,a=s[0].length),this.append(n.slice(r,i<0?n.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=i+a}}readNode(e){if(e.cmIgnore)return;let n=_o.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let o=r.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(MJe(e,r.node,r.offset)?n:0))}}function MJe(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=i||a?[]:IJe(e),l=new NJe(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=LJe(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=i&&i.node==s.focusNode&&i.offset==s.focusOffset||!lN(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!lN(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset);this.newSel=Ct.single(u,l)}}}function AK(t,e){let n,{newSel:r}=e,o=t.state.selection.main,i=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=o.from,u=null;(i===8||vn.android&&e.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,o.to))}:(vn.mac||vn.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Ct.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:Ir.of([" "])}):vn.chrome&&n&&n.from==n.to&&n.from==o.head&&n.insert.toString()==` `&&t.lineWrapping&&(r&&(r=Ct.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:Ir.of([" "])}),n){if(vn.ios&&t.inputState.flushIOSKey()||vn.android&&(n.from==o.from&&n.to==o.to&&n.insert.length==1&&n.insert.lines==2&&ov(t.contentDOM,"Enter",13)||(n.from==o.from-1&&n.to==o.to&&n.insert.length==0||i==8&&n.insert.lengtho.head)&&ov(t.contentDOM,"Backspace",8)||n.from==o.from&&n.to==o.to+1&&n.insert.length==0&&ov(t.contentDOM,"Delete",46)))return!0;let a=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,l=()=>s||(s=RJe(t,n,r));return t.state.facet(eK).some(u=>u(t,n.from,n.to,a,l))||t.dispatch(l()),!0}else if(r&&!r.main.eq(o)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function RJe(t,e,n){let r,o=t.state,i=o.selection.main;if(e.from>=i.from&&e.to<=i.to&&e.to-e.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=i.frome.to?o.sliceDoc(e.to,i.to):"";r=o.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=o.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=i.to&&e.to>=i.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&hK(t,n.main.head);if(d){let g=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-g}}else c=t.state.doc.lineAt(i.head);let f=i.to-e.to,h=i.to-i.from;r=o.changeByRange(g=>{if(g.from==i.from&&g.to==i.to)return{changes:s,range:l||g.map(s)};let v=g.to-f,m=v-u.length;if(g.to-g.from!=h||t.state.sliceDoc(m,v)!=u||g.to>=c.from&&g.from<=c.to)return{range:g};let b=o.changes({from:m,to:v,insert:e.insert}),w=g.to-i.to;return{changes:b,range:l?Ct.range(Math.max(0,l.anchor+w),Math.max(0,l.head+w)):g.map(b)}})}else r={changes:s,selection:l&&o.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),o.update(r,{userEvent:a,scrollIntoView:!0})}function DJe(t,e,n,r){let o=Math.min(t.length,e.length),i=0;for(;i0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,i-Math.min(a,s));n-=a+l-i}return a=a?i-n:0,s=i+(s-a),a=i):s=s?i-n:0,a=i+(a-s),s=i),{from:i,toA:a,toB:s}}function IJe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=t.observer.selectionRange;return n&&(e.push(new g9(n,r)),(o!=n||i!=r)&&e.push(new g9(o,i))),e}function LJe(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Ct.single(n+e,r+e):null}const BJe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},G2=vn.ie&&vn.ie_version<=11;class FJe{constructor(e){this.view=e,this.active=!1,this.selectionRange=new wKe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(vn.ie&&vn.ie_version<=11||vn.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),G2&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,o=this.selectionRange;if(r.state.facet(sE)?r.root.activeElement!=this.dom:!hw(r.dom,o))return;let i=o.anchorNode&&r.docView.nearest(o.anchorNode);if(i&&i.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(vn.ie&&vn.ie_version<=11||vn.android&&vn.chrome)&&!r.state.selection.main.empty&&o.focusNode&&sx(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=vn.safari&&e.root.nodeType==11&&yKe(this.dom.ownerDocument)==this.dom&&VJe(this.view)||ax(e.root);if(!n||this.selectionRange.eq(n))return!1;let r=hw(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let i=this.delayedAndroidKey;i&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=i.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&i.force&&ov(this.dom,i.key,i.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,o=!1;for(let i of e){let a=this.readMutation(i);!a||(a.typeOver&&(o=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:o}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),o=this.selectionChanged&&hw(this.dom,this.selectionRange);if(e<0&&!o)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new $Je(this.view,e,n,r);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,o=AK(this.view,n);return this.view.state==r&&this.view.update([]),o}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=v9(n,e.previousSibling||e.target.previousSibling,-1),o=v9(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:o?n.posBefore(o):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,r,o;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect(),(o=this.resizeContent)===null||o===void 0||o.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function v9(t,e,n){for(;e;){let r=_o.get(e);if(r&&r.parent==t)return r;let o=e.parentNode;e=o!=t.dom?o:n>0?e.nextSibling:e.previousSibling}return null}function VJe(t){let e=null;function n(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return sx(s.node,s.offset,i,a)&&([r,o,i,a]=[i,a,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}}class tn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(r=>r.forEach(o=>n(o,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||SKe(e.parent)||document,this.viewState=new f9(e.state||Or.create(e)),this.plugins=this.state.facet(ky).map(r=>new U2(r));for(let r of this.plugins)r.update(this);this.observer=new FJe(this),this.inputState=new tJe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new XV(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof gi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,o,i=this.state;for(let f of e){if(f.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=f.state}if(this.destroyed){this.viewState.state=i;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(wK))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=SK(i,a),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(Or.phrases)!=this.state.facet(Or.phrases))return this.setState(i);o=ux.create(this,i,e),o.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new lx(h.empty?h:Ct.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(UV)&&(d=h.value)}this.viewState.update(o,d),this.bidiCache=cx.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),n=this.docView.update(o),this.state.facet(Ay)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(y1)!=o.state.facet(y1)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let f of this.state.facet(gN))f(o);(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!AK(this,c)&&u.force&&ov(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new f9(e),this.plugins=e.facet(ky).map(r=>new U2(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView=new XV(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(ky),r=e.state.facet(ky);if(n!=r){let o=[];for(let i of r){let a=n.indexOf(i);if(a<0)o.push(new U2(i));else{let s=this.plugins[a];s.mustUpdate=e,o.push(s)}}for(let i of this.plugins)i.mustUpdate!=e&&i.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,o=r.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(Vq(r))i=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(o);i=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(h=>{try{return h.read(this)}catch(g){return vu(this.state,g),m9}}),d=ux.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d));for(let h=0;h1||g<-1){o=o+g,r.scrollTop=o/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(gN))s(n)}get themeClasses(){return SN+" "+(this.state.facet(wN)?TK:EK)+" "+this.state.facet(y1)}updateAttrs(){let e=y9(this,oK,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(sE)?"true":"false",class:"cm-content",style:`${vn.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),y9(this,zD,n);let r=this.observer.ignore(()=>{let o=hN(this.contentDOM,this.contentAttrs,n),i=hN(this.dom,this.editorAttrs,e);return o||i});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let o of r.effects)if(o.is(tn.announce)){n&&(this.announceDOM.textContent=""),n=!1;let i=this.announceDOM.appendChild(document.createElement("div"));i.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Ay);let e=this.state.facet(tn.cspNonce);Lf.mount(this.root,this.styleModules.concat(PJe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return X2(this,e,e9(this,e,n,r))}moveByGroup(e,n){return X2(this,e,e9(this,e,n,r=>JKe(this,e.head,r)))}moveToLineBoundary(e,n,r=!0){return KKe(this,e,n,r)}moveVertically(e,n,r){return X2(this,e,eJe(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),gK(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let o=this.state.doc.lineAt(e),i=this.bidiSpans(o),a=i[df.find(i,e-o.from,-1,n)];return iE(r,a.dir==No.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(nK)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>zJe)return dK(e.length);let n=this.textDirectionAt(e.from),r;for(let i of this.bidiCache)if(i.from==e.from&&i.dir==n&&(i.fresh||cK(i.isolates,r=YV(this,e.from,e.to))))return i.order;r||(r=YV(this,e.from,e.to));let o=BKe(e.text,n,r);return this.bidiCache.push(new cx(e.from,e.to,n,r,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||vn.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Bq(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return UV.of(new lx(typeof e=="number"?Ct.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return qo.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qo.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Lf.newName(),o=[y1.of(r),Ay.of(xN(`.${r}`,e))];return n&&n.dark&&o.push(wN.of(!0)),o}static baseTheme(e){return Lp.lowest(Ay.of(xN("."+SN,e,kK)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),o=r&&_o.get(r)||_o.get(e);return((n=o==null?void 0:o.rootView)===null||n===void 0?void 0:n.view)||null}}tn.styleModule=Ay;tn.inputHandler=eK;tn.focusChangeEffect=tK;tn.perLineTextDirection=nK;tn.exceptionSink=Jq;tn.updateListener=gN;tn.editable=sE;tn.mouseSelectionStyle=Kq;tn.dragMovesSelection=qq;tn.clickAddsSelectionRange=Gq;tn.decorations=mb;tn.atomicRanges=jD;tn.bidiIsolatedRanges=iK;tn.scrollMargins=aK;tn.darkTheme=wN;tn.cspNonce=cn.define({combine:t=>t.length?t[0]:""});tn.contentAttributes=zD;tn.editorAttributes=oK;tn.lineWrapping=tn.contentAttributes.of({class:"cm-lineWrapping"});tn.announce=qn.define();const zJe=4096,m9={};class cx{constructor(e,n,r,o,i,a){this.from=e,this.to=n,this.dir=r,this.isolates=o,this.fresh=i,this.order=a}static update(e,n){if(n.empty&&!e.some(i=>i.fresh))return e;let r=[],o=e.length?e[e.length-1].dir:No.LTR;for(let i=Math.max(0,e.length-10);i=0;o--){let i=r[o],a=typeof i=="function"?i(t):i;a&&fN(a,n)}return n}const jJe=vn.mac?"mac":vn.windows?"win":vn.linux?"linux":"key";function WJe(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let o,i,a,s;for(let l=0;lr.concat(o),[]))),n}function HJe(t,e,n){return NK(PK(t.state),e,t,n)}let tf=null;const UJe=4e3;function YJe(t,e=jJe){let n=Object.create(null),r=Object.create(null),o=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},i=(a,s,l,u,c)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),g=s.split(/ (?!$)/).map(b=>WJe(b,e));for(let b=1;b{let S=tf={view:O,prefix:w,scope:a};return setTimeout(()=>{tf==S&&(tf=null)},UJe),!0}]})}let v=g.join(" ");o(v,!1);let m=h[v]||(h[v]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&m.run.push(l),u&&(m.preventDefault=!0),c&&(m.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of s){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let d in c)c[d].run.push(a.any)}let l=a[e]||a.key;if(!!l)for(let u of s)i(u,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&i(u,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}function NK(t,e,n,r){let o=mKe(e),i=Bi(o,0),a=hl(i)==o.length&&o!=" ",s="",l=!1,u=!1,c=!1;tf&&tf.view==n&&tf.scope==r&&(s=tf.prefix+" ",mK.indexOf(e.keyCode)<0&&(u=!0,tf=null));let d=new Set,f=m=>{if(m){for(let b of m.run)if(!d.has(b)&&(d.add(b),b(n,e)))return m.stopPropagation&&(c=!0),!0;m.preventDefault&&(m.stopPropagation&&(c=!0),u=!0)}return!1},h=t[r],g,v;return h&&(f(h[s+b1(o,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(vn.windows&&e.ctrlKey&&e.altKey)&&(g=Bf[e.keyCode])&&g!=o?(f(h[s+b1(g,e,!0)])||e.shiftKey&&(v=gb[e.keyCode])!=o&&v!=g&&f(h[s+b1(v,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+b1(o,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),l}class y_{constructor(e,n,r,o,i){this.className=e,this.left=n,this.top=r,this.width=o,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let o=e.coordsAtPos(r.head,r.assoc||1);if(!o)return[];let i=MK(e);return[new y_(n,o.left-i.left,o.top-i.top,null,o.bottom-o.top)]}else return XJe(e,n,r)}}function MK(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==No.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function _9(t,e,n){let r=Ct.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(r,!0,!0).from),type:Pa.Text}}function XJe(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),o=Math.min(n.to,t.viewport.to),i=t.textDirection==No.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=MK(t),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=s.right-(c?parseInt(c.paddingRight):0),h=_N(t,r),g=_N(t,o),v=h.type==Pa.Text?h:null,m=g.type==Pa.Text?g:null;if(v&&(t.lineWrapping||h.widgetLineBreaks)&&(v=_9(t,r,v)),m&&(t.lineWrapping||g.widgetLineBreaks)&&(m=_9(t,o,m)),v&&m&&v.from==m.from)return w(O(n.from,n.to,v));{let x=v?O(n.from,null,v):S(h,!1),C=m?O(null,n.to,m):S(g,!0),E=[];return(v||h).to<(m||g).from-(v&&m?1:0)||h.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2R&&F.from=I)break;re>W&&P(Math.max(H,W),x==null&&H<=R,Math.min(re,I),C==null&&re>=D,L.dir)}if(W=Q.to+1,W>=I)break}return k.length==0&&P(R,x==null,D,C==null,t.textDirection),{top:T,bottom:M,horizontal:k}}function S(x,C){let E=s.top+(C?x.top:x.bottom);return{top:E,bottom:E,horizontal:[]}}}function ZJe(t,e){return t.constructor==e.constructor&&t.eq(e)}class GJe{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(vw)!=e.state.facet(vw)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let n=0,r=e.facet(vw);for(;n!ZJe(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let o of e)o.update&&n&&o.constructor&&this.drawn[r].constructor&&o.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(o.draw(),n);for(;n;){let o=n.nextSibling;n.remove(),n=o}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const vw=cn.define();function $K(t){return[qo.define(e=>new GJe(e,t)),vw.of(t)]}const RK=!vn.ios,bb=cn.define({combine(t){return Ec(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function qJe(t={}){return[bb.of(t),KJe,JJe,eet,rK.of(!0)]}function DK(t){return t.startState.facet(bb)!=t.state.facet(bb)}const KJe=$K({above:!0,markers(t){let{state:e}=t,n=e.facet(bb),r=[];for(let o of e.selection.ranges){let i=o==e.selection.main;if(o.empty?!i||RK:n.drawRangeCursor){let a=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=o.empty?o:Ct.cursor(o.head,o.head>o.anchor?-1:1);for(let l of y_.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=DK(t);return n&&O9(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){O9(e.state,t)},class:"cm-cursorLayer"});function O9(t,e){e.style.animationDuration=t.facet(bb).cursorBlinkRate+"ms"}const JJe=$K({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:y_.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||DK(t)},class:"cm-selectionLayer"}),IK={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};RK&&(IK[".cm-line"].caretColor="transparent !important");const eet=Lp.highest(tn.theme(IK)),LK=qn.define({map(t,e){return t==null?null:e.mapPos(t)}}),My=Ti.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(LK)?r.value:n,t)}}),tet=qo.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(My);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(My)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(My),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(My)!=t&&this.view.dispatch({effects:LK.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function net(){return[My,tet]}function w9(t,e,n,r,o){e.lastIndex=0;for(let i=t.iterRange(n,r),a=n,s;!i.next().done;a+=i.value.length)if(!i.lineBreak)for(;s=e.exec(i.value);)o(a+s.index,s)}function ret(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:o,to:i}of n)o=Math.max(t.state.doc.lineAt(o).from,o-e),i=Math.min(t.state.doc.lineAt(i).to,i+e),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}class oet{constructor(e){const{regexp:n,decoration:r,decorate:o,boundary:i,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,o)this.addMatch=(s,l,u,c)=>o(c,u,u+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,u,c)=>{let d=r(s,l,u);d&&c(u,u+s[0].length,d)};else if(r)this.addMatch=(s,l,u,c)=>c(u,u+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=i,this.maxLength=a}createDeco(e){let n=new If,r=n.add.bind(n);for(let{from:o,to:i}of ret(e,this.maxLength))w9(e.state.doc,this.regexp,o,i,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((i,a,s,l)=>{l>e.view.viewport.from&&s1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,n.map(e.changes),r,o):n}updateRange(e,n,r,o){for(let i of e.visibleRanges){let a=Math.max(i.from,r),s=Math.min(i.to,o);if(s>a){let l=e.state.doc.lineAt(a),u=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){c=a;break}for(;sf.push(b.range(v,m));if(l==u)for(this.regexp.lastIndex=c-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(m,e,v,g));n=n.update({filterFrom:c,filterTo:d,filter:(v,m)=>vd,add:f})}}return n}}const CN=/x/.unicode!=null?"gu":"g",iet=new RegExp(`[\0-\b -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,CN),aet={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let q2=null;function set(){var t;if(q2==null&&typeof document!="undefined"&&document.body){let e=document.body.style;q2=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return q2||!1}const mw=cn.define({combine(t){let e=Ec(t,{render:null,specialChars:iet,addSpecialChars:null});return(e.replaceTabs=!set())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,CN)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,CN)),e}});function uet(t={}){return[mw.of(t),cet()]}let S9=null;function cet(){return S9||(S9=qo.fromClass(class{constructor(t){this.view=t,this.decorations=xn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(mw)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new oet({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:o}=n.state,i=Bi(e[0],0);if(i==9){let a=o.lineAt(r),s=n.state.tabSize,l=Tm(a.text,s,r-a.from);return xn.replace({widget:new pet((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=xn.replace({widget:new het(t,i)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(mw);t.startState.facet(mw)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const det="\u2022";function fet(t){return t>=32?det:t==10?"\u2424":String.fromCharCode(9216+t)}class het extends Tc{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=fet(this.code),r=e.state.phrase("Control character")+" "+(aet[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,r,n);if(o)return o;let i=document.createElement("span");return i.textContent=n,i.title=r,i.setAttribute("aria-label",r),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class pet extends Tc{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function get(){return met}const vet=xn.line({class:"cm-activeLine"}),met=qo.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let o=t.lineBlockAt(r.head);o.from>e&&(n.push(vet.range(o.from)),e=o.from)}return xn.set(n)}},{decorations:t=>t.decorations});class yet extends Tc{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?zv(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),o=iE(n[0],r.direction!="rtl"),i=parseInt(r.lineHeight);return o.bottom-o.top>i*1.5?{left:o.left,right:o.right,top:o.top,bottom:o.top+i}:o}ignoreEvent(){return!1}}function bet(t){return qo.fromClass(class{constructor(e){this.view=e,this.placeholder=t?xn.set([xn.widget({widget:new yet(t),side:1}).range(0)]):xn.none}get decorations(){return this.view.state.doc.length?xn.none:this.placeholder}},{decorations:e=>e.decorations})}const EN=2e3;function _et(t,e,n){let r=Math.min(e.line,n.line),o=Math.max(e.line,n.line),i=[];if(e.off>EN||n.off>EN||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=o;l++){let u=t.doc.line(l);u.length<=s&&i.push(Ct.range(u.from+a,u.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=o;l++){let u=t.doc.line(l),c=iN(u.text,a,t.tabSize,!0);if(c<0)i.push(Ct.cursor(u.to));else{let d=iN(u.text,s,t.tabSize);i.push(Ct.range(u.from+c,u.from+d))}}}return i}function Oet(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function x9(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),o=n-r.from,i=o>EN?-1:o==r.length?Oet(t,e.clientX):Tm(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function wet(t,e){let n=x9(t,e),r=t.state.selection;return n?{update(o){if(o.docChanged){let i=o.changes.mapPos(o.startState.doc.line(n.line).from),a=o.state.doc.lineAt(i);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(o.changes)}},get(o,i,a){let s=x9(t,o);if(!s)return r;let l=_et(t.state,n,s);return l.length?a?Ct.create(l.concat(r.ranges)):Ct.create(l):r}}:null}function xet(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return tn.mouseSelectionStyle.of((n,r)=>e(r)?wet(n,r):null)}const Cet={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Eet={style:"cursor: crosshair"};function Tet(t={}){let[e,n]=Cet[t.key||"Alt"],r=qo.fromClass(class{constructor(o){this.view=o,this.isDown=!1}set(o){this.isDown!=o&&(this.isDown=o,this.view.update([]))}},{eventObservers:{keydown(o){this.set(o.keyCode==e||n(o))},keyup(o){(o.keyCode==e||!n(o))&&this.set(!1)},mousemove(o){this.set(n(o))}}});return[r,tn.contentAttributes.of(o=>{var i;return!((i=o.plugin(r))===null||i===void 0)&&i.isDown?Eet:null})]}const _1="-10000px";class BK{constructor(e,n,r){this.facet=n,this.createTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o),this.tooltipViews=this.tooltips.map(r)}update(e,n){var r;let o=e.state.facet(this.facet),i=o.filter(l=>l);if(o===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[u]=l),n.length=s.length),this.input=o,this.tooltips=i,this.tooltipViews=a,!0}}function ket(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const K2=cn.define({combine:t=>{var e,n,r;return{position:vn.ios?"absolute":((e=t.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(o=>o.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(o=>o.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||ket}}}),C9=new WeakMap,FK=qo.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(K2);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new BK(t,QD,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(K2);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=_1,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{offsetParent:o}=this.manager.tooltipViews[0].dom;r=!!(o&&o!=this.container.ownerDocument.body)}if(r||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(e=o.width/this.parent.offsetWidth,n=o.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((o,i)=>{let a=this.manager.tooltipViews[i];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(K2).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{editor:n,space:r,scaleX:o,scaleY:i}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1){c.style.top=_1;continue}let h=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=h?7:0,v=f.right-f.left,m=(e=C9.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||Pet,w=this.view.textDirection==No.LTR,O=f.width>r.right-r.left?w?r.left:r.right-f.width:w?Math.min(d.left-(h?14:0)+b.x,r.right-v):Math.max(r.left,d.left-v+(h?14:0)-b.x),S=this.above[s];!l.strictSide&&(S?d.top-(f.bottom-f.top)-b.yr.bottom)&&S==r.bottom-d.bottom>d.top-r.top&&(S=this.above[s]=!S);let x=(S?d.top-r.top:r.bottom-d.bottom)-g;if(xO&&T.topC&&(C=S?T.top-m-2-g:T.bottom+g+2);if(this.position=="absolute"?(c.style.top=(C-t.parent.top)/i+"px",c.style.left=(O-t.parent.left)/o+"px"):(c.style.top=C/i+"px",c.style.left=O/o+"px"),h){let T=d.left+(w?b.x:-b.x)-(O+14-7);h.style.left=T/o+"px"}u.overlap!==!0&&a.push({left:O,top:C,right:E,bottom:C+m}),c.classList.toggle("cm-tooltip-above",S),c.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=_1}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Aet=tn.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Pet={x:0,y:0},QD=cn.define({enables:[FK,Aet]}),dx=cn.define();class HD{static create(e){return new HD(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new BK(e,dx,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}}const Net=QD.compute([dx],t=>{let e=t.facet(dx).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:HD.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class Met{constructor(e,n,r,o,i){this.view=e,this.source=n,this.field=r,this.setHover=o,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(o)).find(c=>c.from<=o&&c.to>=o),u=l&&l.dir==No.RTL?-1:1;i=n.x{this.pending==s&&(this.pending=null,l&&e.dispatch({effects:this.setHover.of(l)}))},l=>vu(e.state,l,"hover tooltip"))}else a&&e.dispatch({effects:this.setHover.of(a)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let r=this.active;if(r&&!E9(this.lastMove.target)||this.pending){let{pos:o}=r||this.pending,i=(n=r==null?void 0:r.end)!==null&&n!==void 0?n:o;(o==i?this.view.posAtCoords(this.lastMove)!=o:!$et(this.view,o,i,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!E9(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function E9(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function $et(t,e,n,r,o,i){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righto||Math.min(a.bottom,s)=e&&l<=n}function Ret(t,e={}){let n=qn.define(),r=Ti.define({create(){return null},update(o,i){if(o&&(e.hideOnChange&&(i.docChanged||i.selection)||e.hideOn&&e.hideOn(i,o)))return null;if(o&&i.docChanged){let a=i.changes.mapPos(o.pos,-1,zi.TrackDel);if(a==null)return null;let s=Object.assign(Object.create(null),o);s.pos=a,o.end!=null&&(s.end=i.changes.mapPos(o.end)),o=s}for(let a of i.effects)a.is(n)&&(o=a.value),a.is(Det)&&(o=null);return o},provide:o=>dx.from(o)});return[r,qo.define(o=>new Met(o,t,r,n,e.hoverTime||300)),Net]}function VK(t,e){let n=t.plugin(FK);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const Det=qn.define(),T9=cn.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function _b(t,e){let n=t.plugin(zK),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const zK=qo.fromClass(class{constructor(t){this.input=t.state.facet(Ob),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(T9);this.top=new O1(t,!0,e.topContainer),this.bottom=new O1(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(T9);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new O1(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new O1(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Ob);if(n!=this.input){let r=n.filter(l=>l),o=[],i=[],a=[],s=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),s.push(c)):(c=this.panels[u],c.update&&c.update(t)),o.push(c),(c.top?i:a).push(c)}this.specs=r,this.panels=o,this.top.sync(i),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>tn.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class O1{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=k9(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=k9(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function k9(t){let e=t.nextSibling;return t.remove(),e}const Ob=cn.define({enables:zK});class pd extends Ep{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}pd.prototype.elementClass="";pd.prototype.toDOM=void 0;pd.prototype.mapMode=zi.TrackBefore;pd.prototype.startSide=pd.prototype.endSide=-1;pd.prototype.point=!0;const yw=cn.define(),Iet={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Qr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},h0=cn.define();function Let(t){return[jK(),h0.of(Object.assign(Object.assign({},Iet),t))]}const TN=cn.define({combine:t=>t.some(e=>e)});function jK(t){let e=[Bet];return t&&t.fixed===!1&&e.push(TN.of(!0)),e}const Bet=qo.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(h0).map(e=>new P9(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(TN),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(TN)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Qr.iter(this.view.state.facet(yw),this.view.viewport.from),r=[],o=this.gutters.map(i=>new Fet(i,this.view.viewport,-this.view.documentPadding.top));for(let i of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(i.type)){let a=!0;for(let s of i.type)if(s.type==Pa.Text&&a){kN(n,r,s.from);for(let l of o)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of o)l.widget(this.view,s)}else if(i.type==Pa.Text){kN(n,r,i.from);for(let a of o)a.line(this.view,i,r)}else if(i.widget)for(let a of o)a.widget(this.view,i);for(let i of o)i.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(h0),n=t.state.facet(h0),r=t.docChanged||t.heightChanged||t.viewportChanged||!Qr.eq(t.startState.facet(yw),t.state.facet(yw),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let o of this.gutters)o.update(t)&&(r=!0);else{r=!0;let o=[];for(let i of n){let a=e.indexOf(i);a<0?o.push(new P9(this.view,i)):(this.gutters[a].update(t),o.push(this.gutters[a]))}for(let i of this.gutters)i.dom.remove(),o.indexOf(i)<0&&i.destroy();for(let i of o)this.dom.appendChild(i.dom);this.gutters=o}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>tn.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==No.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function A9(t){return Array.isArray(t)?t:[t]}function kN(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class Fet{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Qr.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:o}=this,i=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==o.elements.length){let s=new WK(e,a,i,r);o.elements.push(s),o.dom.appendChild(s.dom)}else o.elements[this.i].update(e,a,i,r);this.height=n.bottom,this.i++}line(e,n,r){let o=[];kN(this.cursor,o,n.from),r.length&&(o=o.concat(r));let i=this.gutter.config.lineMarker(e,n,o);i&&o.unshift(i);let a=this.gutter;o.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,o)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n);r&&this.addElement(e,n,[r])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class P9{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,o=>{let i=o.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let l=i.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=o.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,o)&&o.preventDefault()});this.markers=A9(n.markers(e)),n.initialSpacer&&(this.spacer=new WK(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=A9(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let r=e.view.viewport;return!Qr.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class WK{constructor(e,n,r,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,o)}update(e,n,r,o){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),Vet(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,n){let r="cm-gutterElement",o=this.dom.firstChild;for(let i=0,a=0;;){let s=a,l=ii(s,l,u)||a(s,l,u):a}return r}})}});class J2 extends pd{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ek(t,e){return t.state.facet(Lg).formatNumber(e,t.state)}const jet=h0.compute([Lg],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(zet)},lineMarker(e,n,r){return r.some(o=>o.toDOM)?null:new J2(ek(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Lg)!=e.state.facet(Lg),initialSpacer(e){return new J2(ek(e,N9(e.state.doc.lines)))},updateSpacer(e,n){let r=ek(n.view,N9(n.view.state.doc.lines));return r==e.number?e:new J2(r)},domEventHandlers:t.facet(Lg).domEventHandlers}));function Wet(t={}){return[Lg.of(t),jK(),jet]}function N9(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.head).from;o>n&&(n=o,e.push(Qet.range(o)))}return Qr.of(e)});function Uet(){return Het}const QK=1024;let Yet=0;class tk{constructor(e,n){this.from=e,this.to=n}}class br{constructor(e={}){this.id=Yet++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=us.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}br.closedBy=new br({deserialize:t=>t.split(" ")});br.openedBy=new br({deserialize:t=>t.split(" ")});br.group=new br({deserialize:t=>t.split(" ")});br.isolate=new br({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});br.contextHash=new br({perNode:!0});br.lookAhead=new br({perNode:!0});br.mounted=new br({perNode:!0});class fx{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[br.mounted.id]}}const Xet=Object.create(null);class us{constructor(e,n,r,o=0){this.name=e,this.props=n,this.id=r,this.flags=o}static define(e){let n=e.props&&e.props.length?Object.create(null):Xet,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new us(e.name||"",n,e.id,r);if(e.props){for(let i of e.props)if(Array.isArray(i)||(i=i(o)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[i[0].id]=i[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(br.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let o of r.split(" "))n[o]=e[r];return r=>{for(let o=r.prop(br.group),i=-1;i<(o?o.length:0);i++){let a=n[i<0?r.name:o[i]];if(a)return a}}}}us.none=new us("",Object.create(null),0,8);class UD{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|fi.IncludeAnonymous);;){let u=!1;if(l.from<=i&&l.to>=o&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:ZD(us.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,o)=>new ei(this.type,n,r,o,this.propValues),e.makeTree||((n,r,o)=>new ei(us.none,n,r,o)))}static build(e){return Ket(e)}}ei.empty=new ei(us.none,[],[],0);class YD{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new YD(this.buffer,this.index)}}class Vf{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return us.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let o=this.buffer,i=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function wb(t,e,n,r){for(var o;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=u;e+=n){let c=s[e],d=l[e]+a.from;if(!!HK(o,r,d,d+c.length)){if(c instanceof Vf){if(i&fi.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-d,o);if(f>-1)return new qu(new Zet(a,c,e,d),null,f)}else if(i&fi.IncludeAnonymous||!c.type.isAnonymous||XD(c)){let f;if(!(i&fi.IgnoreMounts)&&(f=fx.get(c))&&!f.overlay)return new is(f.tree,d,e,a);let h=new is(c,d,e,a);return i&fi.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?c.children.length-1:0,n,r,o)}}}if(i&fi.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let o;if(!(r&fi.IgnoreOverlays)&&(o=fx.get(this._tree))&&o.overlay){let i=e-this.from;for(let{from:a,to:s}of o.overlay)if((n>0?a<=i:a=i:s>i))return new is(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function $9(t,e,n,r){let o=t.cursor(),i=[];if(!o.firstChild())return i;if(n!=null){for(let a=!1;!a;)if(a=o.type.is(n),!o.nextSibling())return i}for(;;){if(r!=null&&o.type.is(r))return i;if(o.type.is(e)&&i.push(o.node),!o.nextSibling())return r==null?i:[]}}function AN(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class Zet{constructor(e,n,r,o){this.parent=e,this.buffer=n,this.index=r,this.start=o}}class qu extends UK{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.context.start,r);return i<0?null:new qu(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&fi.ExcludeBuffers)return null;let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return i<0?null:new qu(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new qu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new qu(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,o=this.index+4,i=r.buffer[this.index+3];if(i>o){let a=r.buffer[this.index+1];e.push(r.slice(o,i,a)),n.push(0)}return new ei(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function YK(t){if(!t.length)return null;let e=0,n=t[0];for(let i=1;in.from||a.to=e){let s=new is(a.tree,a.overlay[0].from+i.from,-1,i);(o||(o=[r])).push(wb(s,e,n,!1))}}return o?YK(o):r}class PN{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof is)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:o}=this.buffer;return this.type=n||o.set.types[o.buffer[e]],this.from=r+o.buffer[e+1],this.to=r+o.buffer[e+2],!0}yield(e){return e?e instanceof is?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:o}=this.buffer,i=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.buffer.start,r);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&fi.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&fi.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&fi.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let o=r<0?0:this.stack[r]+4;if(this.index!=o)return this.yieldBuf(n.findChild(o,this.index,-1,0,4))}else{let o=n.buffer[this.index+3];if(o<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(o)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:o}=this;if(o){if(e>0){if(this.index-1)for(let i=n+e,a=e<0?-1:r._tree.children.length;i!=a;i+=e){let s=r._tree.children[i];if(this.mode&fi.IncludeAnonymous||s instanceof Vf||!s.type.isAnonymous||XD(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==o){if(o==this.index)return a;n=a,r=i+1;break e}o=this.stack[--i]}}for(let o=r;o=0;i--){if(i<0)return AN(this._tree,e,o);let a=r[n.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[o]&&e[o]!=a.name)return!1;o--}}return!0}}function XD(t){return t.children.some(e=>e instanceof Vf||!e.type.isAnonymous||XD(e))}function Ket(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:o=QK,reused:i=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new YD(n,n.length):n,l=r.types,u=0,c=0;function d(x,C,E,T,M,k){let{id:P,start:R,end:D,size:F}=s,W=c,I=u;for(;F<0;)if(s.next(),F==-1){let U=i[P];E.push(U),T.push(R-x);return}else if(F==-3){u=P;return}else if(F==-4){c=P;return}else throw new RangeError(`Unrecognized record size: ${F}`);let Q=l[P],L,H,re=R-x;if(D-R<=o&&(H=m(s.pos-C,M))){let U=new Uint16Array(H.size-H.skip),J=s.pos-H.size,ie=U.length;for(;s.pos>J;)ie=b(H.start,U,ie);L=new Vf(U,D-H.start,r),re=H.start-x}else{let U=s.pos-F;s.next();let J=[],ie=[],te=P>=a?P:-1,he=0,K=D;for(;s.pos>U;)te>=0&&s.id==te&&s.size>=0?(s.end<=K-o&&(g(J,ie,R,he,s.end,K,te,W,I),he=J.length,K=s.end),s.next()):k>2500?f(R,U,J,ie):d(R,U,J,ie,te,k+1);if(te>=0&&he>0&&he-1&&he>0){let ne=h(Q,I);L=ZD(Q,J,ie,0,J.length,0,D-R,ne,ne)}else L=v(Q,J,ie,D-R,W-D,I)}E.push(L),T.push(re)}function f(x,C,E,T){let M=[],k=0,P=-1;for(;s.pos>C;){let{id:R,start:D,end:F,size:W}=s;if(W>4)s.next();else{if(P>-1&&D=0;F-=3)R[W++]=M[F],R[W++]=M[F+1]-D,R[W++]=M[F+2]-D,R[W++]=W;E.push(new Vf(R,M[2]-D,r)),T.push(D-x)}}function h(x,C){return(E,T,M)=>{let k=0,P=E.length-1,R,D;if(P>=0&&(R=E[P])instanceof ei){if(!P&&R.type==x&&R.length==M)return R;(D=R.prop(br.lookAhead))&&(k=T[P]+R.length+D)}return v(x,E,T,M,k,C)}}function g(x,C,E,T,M,k,P,R,D){let F=[],W=[];for(;x.length>T;)F.push(x.pop()),W.push(C.pop()+E-M);x.push(v(r.types[P],F,W,k-M,R-k,D)),C.push(M-E)}function v(x,C,E,T,M,k,P){if(k){let R=[br.contextHash,k];P=P?[R].concat(P):[R]}if(M>25){let R=[br.lookAhead,M];P=P?[R].concat(P):[R]}return new ei(x,C,E,T,P)}function m(x,C){let E=s.fork(),T=0,M=0,k=0,P=E.end-o,R={size:0,start:0,skip:0};e:for(let D=E.pos-x;E.pos>D;){let F=E.size;if(E.id==C&&F>=0){R.size=T,R.start=M,R.skip=k,k+=4,T+=4,E.next();continue}let W=E.pos-F;if(F<0||W=a?4:0,Q=E.start;for(E.next();E.pos>W;){if(E.size<0)if(E.size==-3)I+=4;else break e;else E.id>=a&&(I+=4);E.next()}M=Q,T+=F,k+=I}return(C<0||T==x)&&(R.size=T,R.start=M,R.skip=k),R.size>4?R:void 0}function b(x,C,E){let{id:T,start:M,end:k,size:P}=s;if(s.next(),P>=0&&T4){let D=s.pos-(P-4);for(;s.pos>D;)E=b(x,C,E)}C[--E]=R,C[--E]=k-x,C[--E]=M-x,C[--E]=T}else P==-3?u=T:P==-4&&(c=T);return E}let w=[],O=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,w,O,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:w.length?O[0]+w[0].length:0;return new ei(l[t.topID],w.reverse(),O.reverse(),S)}const R9=new WeakMap;function bw(t,e){if(!t.isAnonymous||e instanceof Vf||e.type!=t)return 1;let n=R9.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof ei)){n=1;break}n+=bw(t,r)}R9.set(e,n)}return n}function ZD(t,e,n,r,o,i,a,s,l){let u=0;for(let g=r;g=c)break;C+=E}if(O==S+1){if(C>c){let E=g[S];h(E.children,E.positions,0,E.children.length,v[S]+w);continue}d.push(g[S])}else{let E=v[O-1]+g[O-1].length-x;d.push(ZD(t,g,v,S,O,x,E,null,l))}f.push(x+w-i)}}return h(e,n,r,o,0),(s||l)(d,f,a)}class Jet{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof qu?this.setBuffer(e.context.buffer,e.index,n):e instanceof is&&this.map.set(e.tree,n)}get(e){return e instanceof qu?this.getBuffer(e.context.buffer,e.index):e instanceof is?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class up{constructor(e,n,r,o,i=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=o,this.open=(i?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let o=[new up(0,e.length,e,0,!1,r)];for(let i of n)i.to>e.length&&o.push(i);return o}static applyChanges(e,n,r=128){if(!n.length)return e;let o=[],i=1,a=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s=r)for(;a&&a.from=f.from||d<=f.to||u){let h=Math.max(f.from,l)-u,g=Math.min(f.to,d)-u;f=h>=g?null:new up(h,g,f.tree,f.offset+u,s>0,!!c)}if(f&&o.push(f),a.to>d)break;a=inew tk(o.from,o.to)):[new tk(0,0)]:[new tk(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let o=this.startParse(e,n,r);for(;;){let i=o.advance();if(i)return i}}}class ett{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new br({perNode:!0});let ttt=0;class Wu{constructor(e,n,r){this.set=e,this.base=n,this.modified=r,this.id=ttt++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new Wu([],null,[]);if(n.set.push(n),e)for(let r of e.set)n.set.push(r);return n}static defineModifier(){let e=new hx;return n=>n.modified.indexOf(e)>-1?n:hx.get(n.base||n,n.modified.concat(e).sort((r,o)=>r.id-o.id))}}let ntt=0;class hx{constructor(){this.instances=[],this.id=ntt++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&rtt(n,s.modified));if(r)return r;let o=[],i=new Wu(o,e,n);for(let s of n)s.instances.push(i);let a=ott(n);for(let s of e.set)if(!s.modified.length)for(let l of a)o.push(hx.get(s,l));return i}}function rtt(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function ott(t){let e=[[]];for(let n=0;nr.length-n.length)}function lE(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let o of n.split(" "))if(o){let i=[],a=2,s=o;for(let d=0;;){if(s=="..."&&d>0&&d+3==o.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+o);if(i.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==o.length)break;let h=o[d++];if(d==o.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+o);s=o.slice(d)}let l=i.length-1,u=i[l];if(!u)throw new RangeError("Invalid path: "+o);let c=new px(r,a,l>0?i.slice(0,l):null);e[u]=c.sort(e[u])}}return ZK.add(e)}const ZK=new br;class px{constructor(e,n,r,o){this.tags=e,this.mode=n,this.context=r,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=o;for(let s of i)for(let l of s.set){let u=n[l.id];if(u){a=a?a+" "+u:u;break}}return a},scope:r}}function itt(t,e){let n=null;for(let r of t){let o=r.style(e);o&&(n=n?n+" "+o:o)}return n}function att(t,e,n,r=0,o=t.length){let i=new stt(r,Array.isArray(e)?e:[e],n);i.highlightRange(t.cursor(),r,o,"",i.highlighters),i.flush(o)}class stt{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,o,i){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(i=this.highlighters.filter(h=>!h.scope||h.scope(a)));let u=o,c=ltt(e)||px.empty,d=itt(i,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(o+=(o?" ":"")+d)),this.startSpan(Math.max(n,s),u),c.opaque)return;let f=e.tree&&e.tree.prop(br.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),g=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),v=e.firstChild();for(let m=0,b=s;;m++){let w=m=O||!e.nextSibling())););if(!w||O>r)break;b=w.to+s,b>n&&(this.highlightRange(h.cursor(),Math.max(n,w.from+s),Math.min(r,b),"",g),this.startSpan(Math.min(r,b),u))}v&&e.parent()}else if(e.firstChild()){f&&(o="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,o,i),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function ltt(t){let e=t.type.prop(ZK);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ut=Wu.define,S1=Ut(),qd=Ut(),D9=Ut(qd),I9=Ut(qd),Kd=Ut(),x1=Ut(Kd),nk=Ut(Kd),Bu=Ut(),Sh=Ut(Bu),Iu=Ut(),Lu=Ut(),NN=Ut(),py=Ut(NN),C1=Ut(),Xe={comment:S1,lineComment:Ut(S1),blockComment:Ut(S1),docComment:Ut(S1),name:qd,variableName:Ut(qd),typeName:D9,tagName:Ut(D9),propertyName:I9,attributeName:Ut(I9),className:Ut(qd),labelName:Ut(qd),namespace:Ut(qd),macroName:Ut(qd),literal:Kd,string:x1,docString:Ut(x1),character:Ut(x1),attributeValue:Ut(x1),number:nk,integer:Ut(nk),float:Ut(nk),bool:Ut(Kd),regexp:Ut(Kd),escape:Ut(Kd),color:Ut(Kd),url:Ut(Kd),keyword:Iu,self:Ut(Iu),null:Ut(Iu),atom:Ut(Iu),unit:Ut(Iu),modifier:Ut(Iu),operatorKeyword:Ut(Iu),controlKeyword:Ut(Iu),definitionKeyword:Ut(Iu),moduleKeyword:Ut(Iu),operator:Lu,derefOperator:Ut(Lu),arithmeticOperator:Ut(Lu),logicOperator:Ut(Lu),bitwiseOperator:Ut(Lu),compareOperator:Ut(Lu),updateOperator:Ut(Lu),definitionOperator:Ut(Lu),typeOperator:Ut(Lu),controlOperator:Ut(Lu),punctuation:NN,separator:Ut(NN),bracket:py,angleBracket:Ut(py),squareBracket:Ut(py),paren:Ut(py),brace:Ut(py),content:Bu,heading:Sh,heading1:Ut(Sh),heading2:Ut(Sh),heading3:Ut(Sh),heading4:Ut(Sh),heading5:Ut(Sh),heading6:Ut(Sh),contentSeparator:Ut(Bu),list:Ut(Bu),quote:Ut(Bu),emphasis:Ut(Bu),strong:Ut(Bu),link:Ut(Bu),monospace:Ut(Bu),strikethrough:Ut(Bu),inserted:Ut(),deleted:Ut(),changed:Ut(),invalid:Ut(),meta:C1,documentMeta:Ut(C1),annotation:Ut(C1),processingInstruction:Ut(C1),definition:Wu.defineModifier(),constant:Wu.defineModifier(),function:Wu.defineModifier(),standard:Wu.defineModifier(),local:Wu.defineModifier(),special:Wu.defineModifier()};GK([{tag:Xe.link,class:"tok-link"},{tag:Xe.heading,class:"tok-heading"},{tag:Xe.emphasis,class:"tok-emphasis"},{tag:Xe.strong,class:"tok-strong"},{tag:Xe.keyword,class:"tok-keyword"},{tag:Xe.atom,class:"tok-atom"},{tag:Xe.bool,class:"tok-bool"},{tag:Xe.url,class:"tok-url"},{tag:Xe.labelName,class:"tok-labelName"},{tag:Xe.inserted,class:"tok-inserted"},{tag:Xe.deleted,class:"tok-deleted"},{tag:Xe.literal,class:"tok-literal"},{tag:Xe.string,class:"tok-string"},{tag:Xe.number,class:"tok-number"},{tag:[Xe.regexp,Xe.escape,Xe.special(Xe.string)],class:"tok-string2"},{tag:Xe.variableName,class:"tok-variableName"},{tag:Xe.local(Xe.variableName),class:"tok-variableName tok-local"},{tag:Xe.definition(Xe.variableName),class:"tok-variableName tok-definition"},{tag:Xe.special(Xe.variableName),class:"tok-variableName2"},{tag:Xe.definition(Xe.propertyName),class:"tok-propertyName tok-definition"},{tag:Xe.typeName,class:"tok-typeName"},{tag:Xe.namespace,class:"tok-namespace"},{tag:Xe.className,class:"tok-className"},{tag:Xe.macroName,class:"tok-macroName"},{tag:Xe.propertyName,class:"tok-propertyName"},{tag:Xe.operator,class:"tok-operator"},{tag:Xe.comment,class:"tok-comment"},{tag:Xe.meta,class:"tok-meta"},{tag:Xe.invalid,class:"tok-invalid"},{tag:Xe.punctuation,class:"tok-punctuation"}]);var rk;const Bg=new br;function qK(t){return cn.define({combine:t?e=>e.concat(t):void 0})}const GD=new br;class lu{constructor(e,n,r=[],o=""){this.data=e,this.name=o,Or.prototype.hasOwnProperty("tree")||Object.defineProperty(Or.prototype,"tree",{get(){return ni(this)}}),this.parser=n,this.extension=[zf.of(this),Or.languageData.of((i,a,s)=>{let l=L9(i,a,s),u=l.type.prop(Bg);if(!u)return[];let c=i.facet(u),d=l.type.prop(GD);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,i)){let g=i.facet(h.facet);return h.type=="replace"?g:g.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return L9(e,n,r).type.prop(Bg)==this.data}findRegions(e){let n=e.facet(zf);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],o=(i,a)=>{if(i.prop(Bg)==this.data){r.push({from:a,to:a+i.length});return}let s=i.prop(br.mounted);if(s){if(s.tree.prop(Bg)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+i.length});return}else if(s.overlay){let l=r.length;if(o(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new Wv(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ni(t){let e=t.field(lu.state,!1);return e?e.tree:ei.empty}class utt{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let gy=null;class gx{constructor(e,n,r=[],o,i,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=o,this.treeLen=i,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new gx(e,n,[],ei.empty,0,r,[],null)}startParse(){return this.parser.startParse(new utt(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ei.empty&&this.isDone(n!=null?n:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(up.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=gy;gy=this;try{return e()}finally{gy=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=B9(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:o,treeLen:i,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,f)=>l.push({fromA:u,toA:c,fromB:d,toB:f})),r=up.applyChanges(r,l),o=ei.empty,i=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=B9(this.fragments,o,i),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends XK{createParse(n,r,o){let i=o[0].from,a=o[o.length-1].to;return{parsedPos:i,advance(){let l=gy;if(l){for(let u of o)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new ei(us.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return gy}}function B9(t,e,n){return up.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Qv{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Qv(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=gx.create(e.facet(zf).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Qv(r)}}lu.state=Ti.define({create:Qv.init,update(t,e){for(let n of e.effects)if(n.is(lu.setState))return n.value;return e.startState.facet(zf)!=e.state.facet(zf)?Qv.init(e.state):t.apply(e)}});let KK=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(KK=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const ok=typeof navigator!="undefined"&&((rk=navigator.scheduling)===null||rk===void 0?void 0:rk.isInputPending)?()=>navigator.scheduling.isInputPending():null,ctt=qo.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(lu.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(lu.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=KK(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndo+1e3,l=i.context.work(()=>ok&&ok()||Date.now()>a,o+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:lu.setState.of(new Qv(i.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>vu(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),zf=cn.define({combine(t){return t.length?t[0]:null},enables:t=>[lu.state,ctt,tn.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class qD{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const dtt=cn.define(),b_=cn.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function vx(t){let e=t.facet(b_);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Sb(t,e){let n="",r=t.tabSize,o=t.facet(b_)[0];if(o==" "){for(;e>=r;)n+=" ",e-=r;o=" "}for(let i=0;i=e?ftt(t,n,e):null}class uE{constructor(e,n={}){this.state=e,this.options=n,this.unit=vx(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:i}=this.options;return o!=null&&o>=r.from&&o<=r.to?i&&o==e?{text:"",from:e}:(n<0?o-1&&(i+=a-this.countColumn(r,r.search(/\S|$/))),i}countColumn(e,n=e.length){return Tm(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:o}=this.lineAt(e,n),i=this.options.overrideIndentation;if(i){let a=i(o);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const cE=new br;function ftt(t,e,n){let r=e.resolveStack(n),o=r.node.enterUnfinishedNodesBefore(n);if(o!=r.node){let i=[];for(let a=o;a!=r.node;a=a.parent)i.push(a);for(let a=i.length-1;a>=0;a--)r={node:i[a],next:r}}return JK(r,t,n)}function JK(t,e,n){for(let r=t;r;r=r.next){let o=ptt(r.node);if(o)return o(JD.create(e,n,r))}return 0}function htt(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function ptt(t){let e=t.type.prop(cE);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(br.closedBy))){let o=t.lastChild,i=o&&r.indexOf(o.name)>-1;return a=>eJ(a,!0,1,void 0,i&&!htt(a)?o.from:void 0)}return t.parent==null?gtt:null}function gtt(){return 0}class JD extends uE{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new JD(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(vtt(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return JK(this.context.next,this.base,this.pos)}}function vtt(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function mtt(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let o=t.options.simulateBreak,i=t.state.doc.lineAt(n.from),a=o==null||o<=i.from?i.to:Math.min(i.to,o);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped)return l.fromeJ(r,e,n,t)}function eJ(t,e,n,r,o){let i=t.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==t.pos+a,l=e?mtt(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const btt=t=>t.baseIndent;function iv({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const _tt=200;function Ott(){return Or.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,o=n.lineAt(r);if(r>o.from+_tt)return t;let i=n.sliceString(o.from,r);if(!e.some(u=>u.test(i)))return t;let{state:a}=t,s=-1,l=[];for(let{head:u}of a.selection.ranges){let c=a.doc.lineAt(u);if(c.from==s)continue;s=c.from;let d=KD(a,c.from);if(d==null)continue;let f=/^\s*/.exec(c.text)[0],h=Sb(a,d);f!=h&&l.push({from:c.from,to:c.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const wtt=cn.define(),dE=new br;function tJ(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(i&&s.from=e&&u.to>n&&(i=u)}}return i}function xtt(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function mx(t,e,n){for(let r of t.facet(wtt)){let o=r(t,e,n);if(o)return o}return Stt(t,e,n)}function nJ(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const fE=qn.define({map:nJ}),__=qn.define({map:nJ});function rJ(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const kp=Ti.define({create(){return xn.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(fE)&&!Ctt(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(eI),o=r?xn.replace({widget:new Mtt(r(e.state,n.value))}):F9;t=t.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(__)&&(t=t.update({filter:(r,o)=>n.value.from!=r||n.value.to!=o,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(o,i)=>{or&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(o,i)=>i<=r||o>=r}))}return t},provide:t=>tn.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,o)=>{n.push(r,o)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!o||o.from>i)&&(o={from:i,to:a})}),o}function Ctt(t,e,n){let r=!1;return t.between(e,e,(o,i)=>{o==e&&i==n&&(r=!0)}),r}function oJ(t,e){return t.field(kp,!1)?e:e.concat(qn.appendConfig.of(aJ()))}const Ett=t=>{for(let e of rJ(t)){let n=mx(t.state,e.from,e.to);if(n)return t.dispatch({effects:oJ(t.state,[fE.of(n),iJ(t,n)])}),!0}return!1},Ttt=t=>{if(!t.state.field(kp,!1))return!1;let e=[];for(let n of rJ(t)){let r=yx(t.state,n.from,n.to);r&&e.push(__.of(r),iJ(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function iJ(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return tn.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${o}.`)}const ktt=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(kp,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,o)=>{n.push(__.of({from:r,to:o}))}),t.dispatch({effects:n}),!0},Ptt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Ett},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Ttt},{key:"Ctrl-Alt-[",run:ktt},{key:"Ctrl-Alt-]",run:Att}],Ntt={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},eI=cn.define({combine(t){return Ec(t,Ntt)}});function aJ(t){let e=[kp,Dtt];return t&&e.push(eI.of(t)),e}function sJ(t,e){let{state:n}=t,r=n.facet(eI),o=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=yx(t.state,s.from,s.to);l&&t.dispatch({effects:__.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,o,e);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const F9=xn.replace({widget:new class extends Tc{toDOM(t){return sJ(t,null)}}});class Mtt extends Tc{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return sJ(e,this.value)}}const $tt={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class ik extends pd{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function Rtt(t={}){let e=Object.assign(Object.assign({},$tt),t),n=new ik(e,!0),r=new ik(e,!1),o=qo.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(zf)!=a.state.facet(zf)||a.startState.field(kp,!1)!=a.state.field(kp,!1)||ni(a.startState)!=ni(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new If;for(let l of a.viewportLineBlocks){let u=yx(a.state,l.from,l.to)?r:mx(a.state,l.from,l.to)?n:null;u&&s.add(l.from,l.from,u)}return s.finish()}}),{domEventHandlers:i}=e;return[o,Let({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(o))===null||s===void 0?void 0:s.markers)||Qr.empty},initialSpacer(){return new ik(e,!1)},domEventHandlers:Object.assign(Object.assign({},i),{click:(a,s,l)=>{if(i.click&&i.click(a,s,l))return!0;let u=yx(a.state,s.from,s.to);if(u)return a.dispatch({effects:__.of(u)}),!0;let c=mx(a.state,s.from,s.to);return c?(a.dispatch({effects:fE.of(c)}),!0):!1}})}),aJ()]}const Dtt=tn.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class hE{constructor(e,n){this.specs=e;let r;function o(s){let l=Lf.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const i=typeof n.all=="string"?n.all:n.all?o(n.all):void 0,a=n.scope;this.scope=a instanceof lu?s=>s.prop(Bg)==a.data:a?s=>s==a:void 0,this.style=GK(e.map(s=>({tag:s.tag,class:s.class||o(Object.assign({},s,{tag:null}))})),{all:i}).style,this.module=r?new Lf(r):null,this.themeType=n.themeType}static define(e,n){return new hE(e,n||{})}}const MN=cn.define(),lJ=cn.define({combine(t){return t.length?[t[0]]:null}});function ak(t){let e=t.facet(MN);return e.length?e:t.facet(lJ)}function Itt(t,e){let n=[Btt],r;return t instanceof hE&&(t.module&&n.push(tn.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(lJ.of(t)):r?n.push(MN.computeN([tn.darkTheme],o=>o.facet(tn.darkTheme)==(r=="dark")?[t]:[])):n.push(MN.of(t)),n}class Ltt{constructor(e){this.markCache=Object.create(null),this.tree=ni(e.state),this.decorations=this.buildDeco(e,ak(e.state))}update(e){let n=ni(e.state),r=ak(e.state),o=r!=ak(e.startState);n.length{r.add(a,s,this.markCache[l]||(this.markCache[l]=xn.mark({class:l})))},o,i);return r.finish()}}const Btt=Lp.high(qo.fromClass(Ltt,{decorations:t=>t.decorations})),Ftt=hE.define([{tag:Xe.meta,color:"#404740"},{tag:Xe.link,textDecoration:"underline"},{tag:Xe.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Xe.emphasis,fontStyle:"italic"},{tag:Xe.strong,fontWeight:"bold"},{tag:Xe.strikethrough,textDecoration:"line-through"},{tag:Xe.keyword,color:"#708"},{tag:[Xe.atom,Xe.bool,Xe.url,Xe.contentSeparator,Xe.labelName],color:"#219"},{tag:[Xe.literal,Xe.inserted],color:"#164"},{tag:[Xe.string,Xe.deleted],color:"#a11"},{tag:[Xe.regexp,Xe.escape,Xe.special(Xe.string)],color:"#e40"},{tag:Xe.definition(Xe.variableName),color:"#00f"},{tag:Xe.local(Xe.variableName),color:"#30a"},{tag:[Xe.typeName,Xe.namespace],color:"#085"},{tag:Xe.className,color:"#167"},{tag:[Xe.special(Xe.variableName),Xe.macroName],color:"#256"},{tag:Xe.definition(Xe.propertyName),color:"#00c"},{tag:Xe.comment,color:"#940"},{tag:Xe.invalid,color:"#f00"}]),Vtt=tn.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),uJ=1e4,cJ="()[]{}",dJ=cn.define({combine(t){return Ec(t,{afterCursor:!0,brackets:cJ,maxScanDistance:uJ,renderMatch:Wtt})}}),ztt=xn.mark({class:"cm-matchingBracket"}),jtt=xn.mark({class:"cm-nonmatchingBracket"});function Wtt(t){let e=[],n=t.matched?ztt:jtt;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Qtt=Ti.define({create(){return xn.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(dJ);for(let o of e.state.selection.ranges){if(!o.empty)continue;let i=Ku(e.state,o.head,-1,r)||o.head>0&&Ku(e.state,o.head-1,1,r)||r.afterCursor&&(Ku(e.state,o.head,1,r)||o.headtn.decorations.from(t)}),Htt=[Qtt,Vtt];function Utt(t={}){return[dJ.of(t),Htt]}const Ytt=new br;function $N(t,e,n){let r=t.prop(e<0?br.openedBy:br.closedBy);if(r)return r;if(t.name.length==1){let o=n.indexOf(t.name);if(o>-1&&o%2==(e<0?1:0))return[n[o+e]]}return null}function RN(t){let e=t.type.prop(Ytt);return e?e(t.node):t}function Ku(t,e,n,r={}){let o=r.maxScanDistance||uJ,i=r.brackets||cJ,a=ni(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let u=$N(l.type,n,i);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return Xtt(t,e,n,l,c,u,i)}}return Ztt(t,e,n,a,s.type,o,i)}function Xtt(t,e,n,r,o,i,a){let s=r.parent,l={from:o.from,to:o.to},u=0,c=s==null?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&i.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!c.next().done&&f<=i;){let h=c.value;n<0&&(f+=h.length);let g=e+f*n;for(let v=n>0?0:h.length-1,m=n>0?h.length:-1;v!=m;v+=n){let b=a.indexOf(h[v]);if(!(b<0||r.resolveInner(g+v,1).type!=o))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:g+v,to:g+v+1},matched:b>>1==l>>1};d--}}n>0&&(f+=h.length)}return c.done?{start:u,matched:!1}:null}const Gtt=Object.create(null),V9=[us.none],z9=[],qtt=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])qtt[t]=Ktt(Gtt,e);function sk(t,e){z9.indexOf(t)>-1||(z9.push(t),console.warn(e))}function Ktt(t,e){let n=null;for(let i of e.split(".")){let a=t[i]||Xe[i];a?typeof a=="function"?n?n=a(n):sk(i,`Modifier ${i} used at start of tag`):n?sk(i,`Tag ${i} used as modifier`):n=a:sk(i,`Unknown highlighting tag ${i}`)}if(!n)return 0;let r=e.replace(/ /g,"_"),o=us.define({id:V9.length,name:r,props:[lE({[r]:n})]});return V9.push(o),o.id}const Jtt=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=nI(t.state,n.from);return r.line?ent(t):r.block?nnt(t):!1};function tI(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=t(e,n);return o?(r(n.update(o)),!0):!1}}const ent=tI(int,0),tnt=tI(fJ,0),nnt=tI((t,e)=>fJ(t,e,ont(e)),0);function nI(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const vy=50;function rnt(t,{open:e,close:n},r,o){let i=t.sliceDoc(r-vy,r),a=t.sliceDoc(o,o+vy),s=/\s*$/.exec(i)[0].length,l=/^\s*/.exec(a)[0].length,u=i.length-s;if(i.slice(u-e.length,u)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:o+l,margin:l&&1}};let c,d;o-r<=2*vy?c=d=t.sliceDoc(r,o):(c=t.sliceDoc(r,r+vy),d=t.sliceDoc(o-vy,o));let f=/^\s*/.exec(c)[0].length,h=/\s*$/.exec(d)[0].length,g=d.length-h-n.length;return c.slice(f,f+e.length)==e&&d.slice(g,g+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:o-h-n.length,margin:/\s/.test(d.charAt(g-1))?1:0}}:null}function ont(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),o=n.to<=r.to?r:t.doc.lineAt(n.to),i=e.length-1;i>=0&&e[i].to>r.from?e[i].to=o.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return e}function fJ(t,e,n=e.selection.ranges){let r=n.map(i=>nI(e,i.from).block);if(!r.every(i=>i))return null;let o=n.map((i,a)=>rnt(e,r[a],i.from,i.to));if(t!=2&&!o.every(i=>i))return{changes:e.changes(n.map((i,a)=>o[a]?[]:[{from:i.from,insert:r[a].open+" "},{from:i.to,insert:" "+r[a].close}]))};if(t!=1&&o.some(i=>i)){let i=[];for(let a=0,s;ao&&(i==a||a>d.from)){o=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,g=d.text.slice(f,f+u.length)==u?f:-1;fi.comment<0&&(!i.empty||i.single))){let i=[];for(let{line:s,token:l,indent:u,empty:c,single:d}of r)(d||!c)&&i.push({from:s.from+u,insert:l+" "});let a=e.changes(i);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(i=>i.comment>=0)){let i=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let u=a.from+s,c=u+l.length;a.text[c-a.from]==" "&&c++,i.push({from:u,to:c})}return{changes:i}}return null}const DN=Ad.define(),ant=Ad.define(),snt=cn.define(),hJ=cn.define({combine(t){return Ec(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,o)=>e(r,o)||n(r,o)})}});function lnt(t){let e=0;return t.iterChangedRanges((n,r)=>e=r),e}const pJ=Ti.define({create(){return Ju.empty},update(t,e){let n=e.state.facet(hJ),r=e.annotation(DN);if(r){let l=e.docChanged?Ct.single(lnt(e.changes)):void 0,u=Ja.fromTransaction(e,l),c=r.side,d=c==0?t.undone:t.done;return u?d=bx(d,d.length,n.minDepth,u):d=mJ(d,e.startState.selection),new Ju(c==0?r.rest:d,c==0?d:r.rest)}let o=e.annotation(ant);if((o=="full"||o=="before")&&(t=t.isolate()),e.annotation(gi.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let i=Ja.fromTransaction(e),a=e.annotation(gi.time),s=e.annotation(gi.userEvent);return i?t=t.addChanges(i,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(o=="full"||o=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Ju(t.done.map(Ja.fromJSON),t.undone.map(Ja.fromJSON))}});function unt(t={}){return[pJ,hJ.of(t),tn.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?gJ:e.inputType=="historyRedo"?IN:null;return r?(e.preventDefault(),r(n)):!1}})]}function pE(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let o=n.field(pJ,!1);if(!o)return!1;let i=o.pop(t,n,e);return i?(r(i),!0):!1}}const gJ=pE(0,!1),IN=pE(1,!1),cnt=pE(0,!0),dnt=pE(1,!0);class Ja{constructor(e,n,r,o,i){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=o,this.selectionsAfter=i}setSelAfter(e){return new Ja(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(o=>o.toJSON())}}static fromJSON(e){return new Ja(e.changes&&di.fromJSON(e.changes),[],e.mapped&&oc.fromJSON(e.mapped),e.startSelection&&Ct.fromJSON(e.startSelection),e.selectionsAfter.map(Ct.fromJSON))}static fromTransaction(e,n){let r=yl;for(let o of e.startState.facet(snt)){let i=o(e);i.length&&(r=r.concat(i))}return!r.length&&e.changes.empty?null:new Ja(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,yl)}static selection(e){return new Ja(void 0,yl,void 0,void 0,e)}}function bx(t,e,n,r){let o=e+1>n+20?e-n-1:0,i=t.slice(o,e);return i.push(r),i}function fnt(t,e){let n=[],r=!1;return t.iterChangedRanges((o,i)=>n.push(o,i)),e.iterChangedRanges((o,i,a,s)=>{for(let l=0;l=u&&a<=c&&(r=!0)}}),r}function hnt(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function vJ(t,e){return t.length?e.length?t.concat(e):t:e}const yl=[],pnt=200;function mJ(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-pnt));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),bx(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Ja.selection([e])]}function gnt(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function lk(t,e){if(!t.length)return t;let n=t.length,r=yl;for(;n;){let o=vnt(t[n-1],e,r);if(o.changes&&!o.changes.empty||o.effects.length){let i=t.slice(0,n);return i[n-1]=o,i}else e=o.mapped,n--,r=o.selectionsAfter}return r.length?[Ja.selection(r)]:yl}function vnt(t,e,n){let r=vJ(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):yl,n);if(!t.changes)return Ja.selection(r);let o=t.changes.map(e),i=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(i):i;return new Ja(o,qn.mapEffects(t.effects,e),a,t.startSelection.map(i),r)}const mnt=/^(input\.type|delete)($|\.)/;class Ju{constructor(e,n,r=0,o=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=o}isolate(){return this.prevTime?new Ju(this.done,this.undone):this}addChanges(e,n,r,o,i){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||mnt.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):gE(n,e))}function ga(t){return t.textDirectionAt(t.state.selection.main.head)==No.LTR}const bJ=t=>yJ(t,!ga(t)),_J=t=>yJ(t,ga(t));function OJ(t,e){return Tu(t,n=>n.empty?t.moveByGroup(n,e):gE(n,e))}const bnt=t=>OJ(t,!ga(t)),_nt=t=>OJ(t,ga(t));function Ont(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function vE(t,e,n){let r=ni(t).resolveInner(e.head),o=n?br.closedBy:br.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;Ont(t,u,o)?r=u:l=n?u.to:u.from}let i=r.type.prop(o),a,s;return i&&(a=n?Ku(t,r.from,1):Ku(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,Ct.cursor(s,n?-1:1)}const wnt=t=>Tu(t,e=>vE(t.state,e,!ga(t))),Snt=t=>Tu(t,e=>vE(t.state,e,ga(t)));function wJ(t,e){return Tu(t,n=>{if(!n.empty)return gE(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const SJ=t=>wJ(t,!1),xJ=t=>wJ(t,!0);function CJ(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):gE(a,e));if(o.eq(r.selection))return!1;let i;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,u=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomEJ(t,!1),LN=t=>EJ(t,!0);function rh(t,e,n){let r=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?r.to:r.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==r.from&&r.length){let i=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;i&&e.head!=r.from+i&&(o=Ct.cursor(r.from+i))}return o}const xnt=t=>Tu(t,e=>rh(t,e,!0)),Cnt=t=>Tu(t,e=>rh(t,e,!1)),Ent=t=>Tu(t,e=>rh(t,e,!ga(t))),Tnt=t=>Tu(t,e=>rh(t,e,ga(t))),knt=t=>Tu(t,e=>Ct.cursor(t.lineBlockAt(e.head).from,1)),Ant=t=>Tu(t,e=>Ct.cursor(t.lineBlockAt(e.head).to,-1));function Pnt(t,e,n){let r=!1,o=km(t.selection,i=>{let a=Ku(t,i.head,-1)||Ku(t,i.head,1)||i.head>0&&Ku(t,i.head-1,1)||i.headPnt(t,e,!1);function jl(t,e){let n=km(t.state.selection,r=>{let o=e(r);return Ct.range(r.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(kc(t.state,n)),!0)}function TJ(t,e){return jl(t,n=>t.moveByChar(n,e))}const kJ=t=>TJ(t,!ga(t)),AJ=t=>TJ(t,ga(t));function PJ(t,e){return jl(t,n=>t.moveByGroup(n,e))}const Mnt=t=>PJ(t,!ga(t)),$nt=t=>PJ(t,ga(t)),Rnt=t=>jl(t,e=>vE(t.state,e,!ga(t))),Dnt=t=>jl(t,e=>vE(t.state,e,ga(t)));function NJ(t,e){return jl(t,n=>t.moveVertically(n,e))}const MJ=t=>NJ(t,!1),$J=t=>NJ(t,!0);function RJ(t,e){return jl(t,n=>t.moveVertically(n,e,CJ(t).height))}const W9=t=>RJ(t,!1),Q9=t=>RJ(t,!0),Int=t=>jl(t,e=>rh(t,e,!0)),Lnt=t=>jl(t,e=>rh(t,e,!1)),Bnt=t=>jl(t,e=>rh(t,e,!ga(t))),Fnt=t=>jl(t,e=>rh(t,e,ga(t))),Vnt=t=>jl(t,e=>Ct.cursor(t.lineBlockAt(e.head).from)),znt=t=>jl(t,e=>Ct.cursor(t.lineBlockAt(e.head).to)),H9=({state:t,dispatch:e})=>(e(kc(t,{anchor:0})),!0),U9=({state:t,dispatch:e})=>(e(kc(t,{anchor:t.doc.length})),!0),Y9=({state:t,dispatch:e})=>(e(kc(t,{anchor:t.selection.main.anchor,head:0})),!0),X9=({state:t,dispatch:e})=>(e(kc(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),jnt=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Wnt=({state:t,dispatch:e})=>{let n=mE(t).map(({from:r,to:o})=>Ct.range(r,Math.min(o+1,t.doc.length)));return e(t.update({selection:Ct.create(n),userEvent:"select"})),!0},Qnt=({state:t,dispatch:e})=>{let n=km(t.selection,r=>{var o;let i=ni(t).resolveStack(r.from,1);for(let a=i;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&((o=s.parent)===null||o===void 0?void 0:o.parent))return Ct.range(s.to,s.from)}return r});return e(kc(t,n)),!0},Hnt=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Ct.create([n.main]):n.main.empty||(r=Ct.create([Ct.cursor(n.main.head)])),r?(e(kc(t,r)),!0):!1};function O_(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,o=r.changeByRange(i=>{let{from:a,to:s}=i;if(a==s){let l=e(i);la&&(n="delete.forward",l=E1(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=E1(t,a,!1),s=E1(t,s,!0);return a==s?{range:i}:{changes:{from:a,to:s},range:Ct.cursor(a,ao(t)))r.between(e,e,(o,i)=>{oe&&(e=n?i:o)});return e}const DJ=(t,e)=>O_(t,n=>{let r=n.from,{state:o}=t,i=o.doc.lineAt(r),a,s;if(!e&&r>i.from&&rDJ(t,!1),IJ=t=>DJ(t,!0),LJ=(t,e)=>O_(t,n=>{let r=n.head,{state:o}=t,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let s=null;;){if(r==(e?i.to:i.from)){r==n.head&&i.number!=(e?o.doc.lines:1)&&(r+=e?1:-1);break}let l=la(i.text,r-i.from,e)+i.from,u=i.text.slice(Math.min(r,l)-i.from,Math.max(r,l)-i.from),c=a(u);if(s!=null&&c!=s)break;(u!=" "||r!=n.head)&&(s=c),r=l}return r}),BJ=t=>LJ(t,!1),Unt=t=>LJ(t,!0),Ynt=t=>O_(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headO_(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Znt=t=>O_(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ir.of(["",""])},range:Ct.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},qnt=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let o=r.from,i=t.doc.lineAt(o),a=o==i.from?o-1:la(i.text,o-i.from,!1)+i.from,s=o==i.to?o+1:la(i.text,o-i.from,!0)+i.from;return{changes:{from:a,to:s,insert:t.doc.slice(o,s).append(t.doc.slice(a,o))},range:Ct.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function mE(t){let e=[],n=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.from),i=t.doc.lineAt(r.to);if(!r.empty&&r.to==i.from&&(i=t.doc.lineAt(r.to-1)),n>=o.number){let a=e[e.length-1];a.to=i.to,a.ranges.push(r)}else e.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return e}function FJ(t,e,n){if(t.readOnly)return!1;let r=[],o=[];for(let i of mE(t)){if(n?i.to==t.doc.length:i.from==0)continue;let a=t.doc.lineAt(n?i.to+1:i.from-1),s=a.length+1;if(n){r.push({from:i.to,to:a.to},{from:i.from,insert:a.text+t.lineBreak});for(let l of i.ranges)o.push(Ct.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:i.from},{from:i.to,insert:t.lineBreak+a.text});for(let l of i.ranges)o.push(Ct.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Ct.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Knt=({state:t,dispatch:e})=>FJ(t,e,!1),Jnt=({state:t,dispatch:e})=>FJ(t,e,!0);function VJ(t,e,n){if(t.readOnly)return!1;let r=[];for(let o of mE(t))n?r.push({from:o.from,insert:t.doc.slice(o.from,o.to)+t.lineBreak}):r.push({from:o.to,insert:t.lineBreak+t.doc.slice(o.from,o.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const ert=({state:t,dispatch:e})=>VJ(t,e,!1),trt=({state:t,dispatch:e})=>VJ(t,e,!0),nrt=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(mE(e).map(({from:o,to:i})=>(o>0?o--:it.moveVertically(o,!0)).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function rrt(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=ni(t).resolveInner(e),r=n.childBefore(e),o=n.childAfter(e),i;return r&&o&&r.to<=e&&o.from>=e&&(i=r.type.prop(br.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(r.to,o.from))?{from:r.to,to:o.from}:null}const ort=zJ(!1),irt=zJ(!0);function zJ(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(o=>{let{from:i,to:a}=o,s=e.doc.lineAt(i),l=!t&&i==a&&rrt(e,i);t&&(i=a=(a<=s.to?s:e.doc.lineAt(a)).to);let u=new uE(e,{simulateBreak:i,simulateDoubleBreak:!!l}),c=KD(u,i);for(c==null&&(c=Tm(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));as.from&&i{let o=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,o,r),n=s.number),a=s.to+1}let i=t.changes(o);return{changes:o,range:Ct.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}})}const art=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new uE(t,{overrideIndentation:i=>{let a=n[i];return a==null?-1:a}}),o=rI(t,(i,a,s)=>{let l=KD(r,i.from);if(l==null)return;/\S/.test(i.text)||(l=0);let u=/^\s*/.exec(i.text)[0],c=Sb(t,l);(u!=c||s.fromt.readOnly?!1:(e(t.update(rI(t,(n,r)=>{r.push({from:n.from,insert:t.facet(b_)})}),{userEvent:"input.indent"})),!0),WJ=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(rI(t,(n,r)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let i=Tm(o,t.tabSize),a=0,s=Sb(t,Math.max(0,i-vx(t)));for(;a({mac:t.key,run:t.run,shift:t.shift}))),urt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:wnt,shift:Rnt},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Snt,shift:Dnt},{key:"Alt-ArrowUp",run:Knt},{key:"Shift-Alt-ArrowUp",run:ert},{key:"Alt-ArrowDown",run:Jnt},{key:"Shift-Alt-ArrowDown",run:trt},{key:"Escape",run:Hnt},{key:"Mod-Enter",run:irt},{key:"Alt-l",mac:"Ctrl-l",run:Wnt},{key:"Mod-i",run:Qnt,preventDefault:!0},{key:"Mod-[",run:WJ},{key:"Mod-]",run:jJ},{key:"Mod-Alt-\\",run:art},{key:"Shift-Mod-k",run:nrt},{key:"Shift-Mod-\\",run:Nnt},{key:"Mod-/",run:Jtt},{key:"Alt-A",run:tnt}].concat(lrt),crt={key:"Tab",run:jJ,shift:WJ};function fo(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];typeof o=="string"?t.setAttribute(r,o):o!=null&&(t[r]=o)}e++}for(;et.normalize("NFKD"):t=>t;class Hv{constructor(e,n,r=0,o=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,o),this.bufferStart=r,this.normalize=i?s=>i(Z9(s)):Z9,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Bi(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=DD(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=hl(e);let o=this.normalize(n);for(let i=0,a=r;;i++){let s=o.charCodeAt(i),l=this.match(s,a);if(i==o.length-1){if(l)return this.value=l,this;break}a==r&&ithis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,o=r+n[0].length;if(this.matchPos=_x(this.text,o+(r==o?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,o,n)))return this.value={from:r,to:o,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||o.to<=n){let s=new av(n,e.sliceString(n,r));return uk.set(e,s),s}if(o.from==n&&o.to==r)return o;let{text:i,from:a}=o;return a>n&&(i=e.sliceString(n,a)+i,a=n),o.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,o=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,o,n)))return this.value={from:r,to:o,match:n},this.matchPos=_x(this.text,o+(r==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=av.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(UJ.prototype[Symbol.iterator]=YJ.prototype[Symbol.iterator]=function(){return this});function drt(t){try{return new RegExp(t,oI),!0}catch{return!1}}function _x(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function FN(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=fo("input",{class:"cm-textfield",name:"line",value:e}),r=fo("form",{class:"cm-gotoLine",onkeydown:i=>{i.keyCode==27?(i.preventDefault(),t.dispatch({effects:Ox.of(!1)}),t.focus()):i.keyCode==13&&(i.preventDefault(),o())},onsubmit:i=>{i.preventDefault(),o()}},fo("label",t.state.phrase("Go to line"),": ",n)," ",fo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function o(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!i)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,u,c,d]=i,f=c?+c.slice(1):0,h=u?+u:s.number;if(u&&d){let m=h/100;l&&(m=m*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*m)}else u&&l&&(h=h*(l=="-"?-1:1)+s.number);let g=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),v=Ct.cursor(g.from+Math.max(0,Math.min(f,g.length)));t.dispatch({effects:[Ox.of(!1),tn.scrollIntoView(v.from,{y:"center"})],selection:v}),t.focus()}return{dom:r}}const Ox=qn.define(),G9=Ti.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ox)&&(t=n.value);return t},provide:t=>Ob.from(t,e=>e?FN:null)}),frt=t=>{let e=_b(t,FN);if(!e){let n=[Ox.of(!0)];t.state.field(G9,!1)==null&&n.push(qn.appendConfig.of([G9,hrt])),t.dispatch({effects:n}),e=_b(t,FN)}return e&&e.dom.querySelector("input").select(),!0},hrt=tn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),prt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},XJ=cn.define({combine(t){return Ec(t,prt,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function grt(t){let e=[_rt,brt];return t&&e.push(XJ.of(t)),e}const vrt=xn.mark({class:"cm-selectionMatch"}),mrt=xn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function q9(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=To.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=To.Word)}function yrt(t,e,n,r){return t(e.sliceDoc(n,n+1))==To.Word&&t(e.sliceDoc(r-1,r))==To.Word}const brt=qo.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(XJ),{state:n}=t,r=n.selection;if(r.ranges.length>1)return xn.none;let o=r.main,i,a=null;if(o.empty){if(!e.highlightWordAroundCursor)return xn.none;let l=n.wordAt(o.head);if(!l)return xn.none;a=n.charCategorizer(o.head),i=n.sliceDoc(l.from,l.to)}else{let l=o.to-o.from;if(l200)return xn.none;if(e.wholeWords){if(i=n.sliceDoc(o.from,o.to),a=n.charCategorizer(o.head),!(q9(a,n,o.from,o.to)&&yrt(a,n,o.from,o.to)))return xn.none}else if(i=n.sliceDoc(o.from,o.to).trim(),!i)return xn.none}let s=[];for(let l of t.visibleRanges){let u=new Hv(n.doc,i,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!a||q9(a,n,c,d))&&(o.empty&&c<=o.from&&d>=o.to?s.push(mrt.range(c,d)):(c>=o.to||d<=o.from)&&s.push(vrt.range(c,d)),s.length>e.maxMatches))return xn.none}}return xn.set(s)}},{decorations:t=>t.decorations}),_rt=tn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ort=({state:t,dispatch:e})=>{let{selection:n}=t,r=Ct.create(n.ranges.map(o=>t.wordAt(o.head)||Ct.cursor(o.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function wrt(t,e){let{main:n,ranges:r}=t.selection,o=t.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let a=!1,s=new Hv(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new Hv(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(i){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const Srt=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(i=>i.from===i.to))return Ort({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(i=>t.sliceDoc(i.from,i.to)!=r))return!1;let o=wrt(t,r);return o?(e(t.update({selection:t.selection.addRange(Ct.range(o.from,o.to),!1),effects:tn.scrollIntoView(o.to)})),!0):!1},Am=cn.define({combine(t){return Ec(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Drt(e),scrollToMatch:e=>tn.scrollIntoView(e)})}});class ZJ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||drt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Trt(this):new Crt(this)}getCursor(e,n=0,r){let o=e.doc?e:Or.create({doc:e});return r==null&&(r=o.doc.length),this.regexp?kg(this,o,n,r):Tg(this,o,n,r)}}class GJ{constructor(e){this.spec=e}}function Tg(t,e,n,r){return new Hv(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:o=>o.toLowerCase(),t.wholeWord?xrt(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function xrt(t,e){return(n,r,o,i)=>((i>n||i+o.length=n)return null;o.push(r.value)}return o}highlight(e,n,r,o){let i=Tg(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}function kg(t,e,n,r){return new UJ(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Ert(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function wx(t,e){return t.slice(la(t,e,!1),e)}function Sx(t,e){return t.slice(e,la(t,e))}function Ert(t){return(e,n,r)=>!r[0].length||(t(wx(r.input,r.index))!=To.Word||t(Sx(r.input,r.index))!=To.Word)&&(t(Sx(r.input,r.index+r[0].length))!=To.Word||t(wx(r.input,r.index+r[0].length))!=To.Word)}class Trt extends GJ{nextMatch(e,n,r){let o=kg(this.spec,e,r,e.doc.length).next();return o.done&&(o=kg(this.spec,e,0,n).next()),o.done?null:o.value}prevMatchInRange(e,n,r){for(let o=1;;o++){let i=Math.max(n,r-o*1e4),a=kg(this.spec,e,i,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(i==n||s.from>i+10))return s;if(i==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=n)return null;o.push(r.value)}return o}highlight(e,n,r,o){let i=kg(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}const xb=qn.define(),iI=qn.define(),yf=Ti.define({create(t){return new ck(VN(t).create(),null)},update(t,e){for(let n of e.effects)n.is(xb)?t=new ck(n.value.create(),t.panel):n.is(iI)&&(t=new ck(t.query,n.value?aI:null));return t},provide:t=>Ob.from(t,e=>e.panel)});class ck{constructor(e,n){this.query=e,this.panel=n}}const krt=xn.mark({class:"cm-searchMatch"}),Art=xn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Prt=qo.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(yf))}update(t){let e=t.state.field(yf);(e!=t.startState.field(yf)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xn.none;let{view:n}=this,r=new If;for(let o=0,i=n.visibleRanges,a=i.length;oi[o+1].from-2*250;)l=i[++o].to;t.highlight(n.state,s,l,(u,c)=>{let d=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,d?Art:krt)})}return r.finish()}},{decorations:t=>t.decorations});function w_(t){return e=>{let n=e.state.field(yf,!1);return n&&n.query.spec.valid?t(e,n):JJ(e)}}const xx=w_((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let o=Ct.single(r.from,r.to),i=t.state.facet(Am);return t.dispatch({selection:o,effects:[sI(t,r),i.scrollToMatch(o.main,t)],userEvent:"select.search"}),KJ(t),!0}),Cx=w_((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,o=e.prevMatch(n,r,r);if(!o)return!1;let i=Ct.single(o.from,o.to),a=t.state.facet(Am);return t.dispatch({selection:i,effects:[sI(t,o),a.scrollToMatch(i.main,t)],userEvent:"select.search"}),KJ(t),!0}),Nrt=w_((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Ct.create(n.map(r=>Ct.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),Mrt=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:o}=n.main,i=[],a=0;for(let s=new Hv(t.doc,t.sliceDoc(r,o));!s.next().done;){if(i.length>1e3)return!1;s.value.from==r&&(a=i.length),i.push(Ct.range(s.value.from,s.value.to))}return e(t.update({selection:Ct.create(i,a),userEvent:"select.search.matches"})),!0},K9=w_((t,{query:e})=>{let{state:n}=t,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=e.nextMatch(n,r,r);if(!i)return!1;let a=[],s,l,u=[];if(i.from==r&&i.to==o&&(l=n.toText(e.getReplacement(i)),a.push({from:i.from,to:i.to,insert:l}),i=e.nextMatch(n,i.from,i.to),u.push(tn.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),i){let c=a.length==0||a[0].from>=i.to?0:i.to-i.from-l.length;s=Ct.single(i.from-c,i.to-c),u.push(sI(t,i)),u.push(n.facet(Am).scrollToMatch(s.main,t))}return t.dispatch({changes:a,selection:s,effects:u,userEvent:"input.replace"}),!0}),$rt=w_((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(o=>{let{from:i,to:a}=o;return{from:i,to:a,insert:e.getReplacement(o)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:tn.announce.of(r),userEvent:"input.replace.all"}),!0});function aI(t){return t.state.facet(Am).createPanel(t)}function VN(t,e){var n,r,o,i,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=t.facet(Am);return new ZJ({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(o=e==null?void 0:e.literal)!==null&&o!==void 0?o:u.literal,regexp:(i=e==null?void 0:e.regexp)!==null&&i!==void 0?i:u.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function qJ(t){let e=_b(t,aI);return e&&e.dom.querySelector("[main-field]")}function KJ(t){let e=qJ(t);e&&e==t.root.activeElement&&e.select()}const JJ=t=>{let e=t.state.field(yf,!1);if(e&&e.panel){let n=qJ(t);if(n&&n!=t.root.activeElement){let r=VN(t.state,e.query.spec);r.valid&&t.dispatch({effects:xb.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[iI.of(!0),e?xb.of(VN(t.state,e.query.spec)):qn.appendConfig.of(Lrt)]});return!0},eee=t=>{let e=t.state.field(yf,!1);if(!e||!e.panel)return!1;let n=_b(t,aI);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:iI.of(!1)}),!0},Rrt=[{key:"Mod-f",run:JJ,scope:"editor search-panel"},{key:"F3",run:xx,shift:Cx,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:xx,shift:Cx,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:eee,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Mrt},{key:"Alt-g",run:frt},{key:"Mod-d",run:Srt,preventDefault:!0}];class Drt{constructor(e){this.view=e;let n=this.query=e.state.field(yf).query.spec;this.commit=this.commit.bind(this),this.searchField=fo("input",{value:n.search,placeholder:xs(e,"Find"),"aria-label":xs(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=fo("input",{value:n.replace,placeholder:xs(e,"Replace"),"aria-label":xs(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=fo("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=fo("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=fo("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(o,i,a){return fo("button",{class:"cm-button",name:o,onclick:i,type:"button"},a)}this.dom=fo("div",{onkeydown:o=>this.keydown(o),class:"cm-search"},[this.searchField,r("next",()=>xx(e),[xs(e,"next")]),r("prev",()=>Cx(e),[xs(e,"previous")]),r("select",()=>Nrt(e),[xs(e,"all")]),fo("label",null,[this.caseField,xs(e,"match case")]),fo("label",null,[this.reField,xs(e,"regexp")]),fo("label",null,[this.wordField,xs(e,"by word")]),...e.state.readOnly?[]:[fo("br"),this.replaceField,r("replace",()=>K9(e),[xs(e,"replace")]),r("replaceAll",()=>$rt(e),[xs(e,"replace all")])],fo("button",{name:"close",onclick:()=>eee(e),"aria-label":xs(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new ZJ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:xb.of(e)}))}keydown(e){HJe(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Cx:xx)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),K9(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(xb)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Am).top}}function xs(t,e){return t.state.phrase(e)}const T1=30,k1=/[\s\.,:;?!]/;function sI(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(n).to,i=Math.max(r.from,e-T1),a=Math.min(o,n+T1),s=t.state.sliceDoc(i,a);if(i!=r.from){for(let l=0;ls.length-T1;l--)if(!k1.test(s[l-1])&&k1.test(s[l])){s=s.slice(0,l);break}}return tn.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Irt=tn.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Lrt=[yf,Lp.low(Prt),Irt];class tee{constructor(e,n,r){this.state=e,this.pos=n,this.explicit=r,this.abortListeners=[]}tokenBefore(e){let n=ni(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),o=n.text.slice(r-n.from,this.pos-n.from),i=o.search(ree(e,!1));return i<0?null:{from:r+i,to:this.pos,text:o.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function J9(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Brt(t){let e=Object.create(null),n=Object.create(null);for(let{label:o}of t){e[o[0]]=!0;for(let i=1;itypeof o=="string"?{label:o}:o),[n,r]=e.every(o=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:Brt(e);return o=>{let i=o.matchBefore(r);return i||o.explicit?{from:i?i.from:o.pos,options:e,validFor:n}:null}}function nee(t,e){return n=>{for(let r=ni(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class e7{constructor(e,n,r,o){this.completion=e,this.source=n,this.match=r,this.score=o}}function bf(t){return t.selection.main.from}function ree(t,e){var n;let{source:r}=t,o=e&&r[0]!="^",i=r[r.length-1]!="$";return!o&&!i?t:new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const oee=Ad.define();function Frt(t,e,n,r){let{main:o}=t.selection,i=n-o.from,a=r-o.from;return Object.assign(Object.assign({},t.changeByRange(s=>s!=o&&n!=r&&t.sliceDoc(s.from+i,s.from+a)!=t.sliceDoc(n,r)?{range:s}:{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:e},range:Ct.cursor(s.from+i+e.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const t7=new WeakMap;function Vrt(t){if(!Array.isArray(t))return t;let e=t7.get(t);return e||t7.set(t,e=lI(t)),e}const uI=qn.define(),Cb=qn.define();class zrt{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(C=DD(x))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!w||E==1&&m||S==0&&E!=0)&&(n[d]==x||r[d]==x&&(f=!0)?a[d++]=w:a.length&&(b=!1)),S=E,w+=hl(x)}return d==l&&a[0]==0&&b?this.result(-100+(f?-200:0),a,e):h==l&&g==0?this.ret(-200-e.length+(v==e.length?0:-100),[0,v]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-200+-700-e.length,[g,v]):d==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),a,e):n.length==2?!1:this.result((o[0]?-700:0)+-200+-1100,o,e)}result(e,n,r){let o=[],i=0;for(let a of n){let s=a+(this.astral?hl(Bi(r,a)):1);i&&o[i-1]==a?o[i-1]=s:(o[i++]=a,o[i++]=s)}return this.ret(e-r.length,o)}}const sa=cn.define({combine(t){return Ec(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:jrt,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>n7(e(r),n(r)),optionClass:(e,n)=>r=>n7(e(r),n(r)),addToOptions:(e,n)=>e.concat(n)})}});function n7(t,e){return t?e?t+" "+e:t:e}function jrt(t,e,n,r,o,i){let a=t.textDirection==No.RTL,s=a,l=!1,u="top",c,d,f=e.left-o.left,h=o.right-e.right,g=r.right-r.left,v=r.bottom-r.top;if(s&&f=v||w>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let m=(e.bottom-e.top)/i.offsetHeight,b=(e.right-e.left)/i.offsetWidth;return{style:`${u}: ${c/m}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function Wrt(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(o=>"cm-completionIcon-"+o)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,o){let i=document.createElement("span");i.className="cm-completionLabel";let a=n.displayLabel||n.label,s=0;for(let l=0;ls&&i.appendChild(document.createTextNode(a.slice(s,u)));let d=i.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,c))),d.className="cm-completionMatchedText",s=c}return sn.position-r.position).map(n=>n.render)}function dk(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let o=Math.floor(e/n);return{from:o*n,to:(o+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Qrt{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let o=e.state.field(n),{options:i,selected:a}=o.open,s=e.state.facet(sa);this.optionContent=Wrt(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=dk(i.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(sa).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Cb.of(null)})}),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=o){let{options:i,selected:a,disabled:s}=r.open;(!o.open||o.open.options!=i)&&(this.range=dk(i.length,a,e.state.facet(sa).maxRenderedOptions),this.showOptions(i,r.id)),this.updateSel(),s!=((n=o.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=dk(n.options.length,n.selected,this.view.state.facet(sa).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:o}=r;if(!o)return;let i=typeof o=="string"?document.createTextNode(o):o(r);if(!i)return;"then"in i?i.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>vu(this.view.state,a,"completion info")):this.addInfoPane(i,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:o,destroy:i}=e;r.appendChild(o),this.infoDestroy=i||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,o=this.range.from;r;r=r.nextSibling,o++)r.nodeName!="LI"||!r.id?o--:o==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&Urt(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),i=this.space;if(!i){let a=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return o.top>Math.min(i.bottom,n.bottom)-10||o.bottomr.from||r.from==0))if(i=f,typeof u!="string"&&u.header)o.appendChild(u.header(u));else{let h=o.appendChild(document.createElement("completion-section"));h.textContent=f}}const c=o.appendChild(document.createElement("li"));c.id=n+"-"+a,c.setAttribute("role","option");let d=this.optionClass(s);d&&(c.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,l);h&&c.appendChild(h)}}return r.from&&o.classList.add("cm-completionListIncompleteTop"),r.tonew Qrt(n,t,e)}function Urt(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/o)}function r7(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Yrt(t,e){let n=[],r=null,o=l=>{n.push(l);let{section:u}=l.completion;if(u){r||(r=[]);let c=typeof u=="string"?u:u.name;r.some(d=>d.name==c)||r.push(typeof u=="string"?{name:c}:u)}};for(let l of t)if(l.hasResult()){let u=l.result.getMatch;if(l.result.filter===!1)for(let c of l.result.options)o(new e7(c,l.source,u?u(c):[],1e9-n.length));else{let c=new zrt(e.sliceDoc(l.from,l.to));for(let d of l.result.options)if(c.match(d.label)){let f=d.displayLabel?u?u(d,c.matched):[]:c.matched;o(new e7(d,l.source,f,c.score+(d.boost||0)))}}}if(r){let l=Object.create(null),u=0,c=(d,f)=>{var h,g;return((h=d.rank)!==null&&h!==void 0?h:1e9)-((g=f.rank)!==null&&g!==void 0?g:1e9)||(d.namec.score-u.score||s(u.completion,c.completion))){let u=l.completion;!a||a.label!=u.label||a.detail!=u.detail||a.type!=null&&u.type!=null&&a.type!=u.type||a.apply!=u.apply||a.boost!=u.boost?i.push(l):r7(l.completion)>r7(a)&&(i[i.length-1]=l),a=l.completion}return i}class Fg{constructor(e,n,r,o,i,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=o,this.selected=i,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Fg(this.options,o7(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,o,i){let a=Yrt(e,n);if(!a.length)return o&&e.some(l=>l.state==1)?new Fg(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let s=n.facet(sa).selectOnOpen?0:-1;if(o&&o.selected!=s&&o.selected!=-1){let l=o.options[o.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:Krt,above:i.aboveCursor},o?o.timestamp:Date.now(),s,!1)}map(e){return new Fg(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Ex{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Ex(Grt,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(sa),i=(r.override||n.languageDataAt("autocomplete",bf(n)).map(Vrt)).map(s=>(this.active.find(u=>u.source==s)||new qa(s,this.active.some(u=>u.state!=0)?1:0)).update(e,r));i.length==this.active.length&&i.every((s,l)=>s==this.active[l])&&(i=this.active);let a=this.open;a&&e.docChanged&&(a=a.map(e.changes)),e.selection||i.some(s=>s.hasResult()&&e.changes.touchesRange(s.from,s.to))||!Xrt(i,this.active)?a=Fg.build(i,n,this.id,a,r):a&&a.disabled&&!i.some(s=>s.state==1)&&(a=null),!a&&i.every(s=>s.state!=1)&&i.some(s=>s.hasResult())&&(i=i.map(s=>s.hasResult()?new qa(s.source,0):s));for(let s of e.effects)s.is(aee)&&(a=a&&a.setSelected(s.value,this.id));return i==this.active&&a==this.open?this:new Ex(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Zrt}}function Xrt(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Grt=[];function zN(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class qa{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=zN(e),o=this;r?o=o.handleUserEvent(e,r,n):e.docChanged?o=o.handleChange(e):e.selection&&o.state!=0&&(o=new qa(o.source,0));for(let i of e.effects)if(i.is(uI))o=new qa(o.source,1,i.value?bf(e.state):-1);else if(i.is(Cb))o=new qa(o.source,0);else if(i.is(iee))for(let a of i.value)a.source==o.source&&(o=a);return o}handleUserEvent(e,n,r){return n=="delete"||!r.activateOnTyping?this.map(e.changes):new qa(this.source,1)}handleChange(e){return e.changes.touchesRange(bf(e.startState))?new qa(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new qa(this.source,this.state,e.mapPos(this.explicitPos))}}class sv extends qa{constructor(e,n,r,o,i){super(e,2,n),this.result=r,this.from=o,this.to=i}hasResult(){return!0}handleUserEvent(e,n,r){var o;let i=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=bf(e.state);if((this.explicitPos<0?s<=i:sa||n=="delete"&&bf(e.startState)==this.from)return new qa(this.source,n=="input"&&r.activateOnTyping?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return qrt(this.result.validFor,e.state,i,a)?new sv(this.source,l,this.result,i,a):this.result.update&&(u=this.result.update(this.result,i,a,new tee(e.state,s,l>=0)))?new sv(this.source,l,u,u.from,(o=u.to)!==null&&o!==void 0?o:bf(e.state)):new qa(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new qa(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new sv(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function qrt(t,e,n,r){if(!t)return!1;let o=e.sliceDoc(n,r);return typeof t=="function"?t(o,n,r,e):ree(t,!0).test(o)}const iee=qn.define({map(t,e){return t.map(n=>n.map(e))}}),aee=qn.define(),Ms=Ti.define({create(){return Ex.start()},update(t,e){return t.update(e)},provide:t=>[QD.from(t,e=>e.tooltip),tn.contentAttributes.from(t,e=>e.attrs)]});function see(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Ms).active.find(o=>o.source==e.source);return r instanceof sv?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},Frt(t.state,n,r.from,r.to)),{annotations:oee.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const Krt=Hrt(Ms,see);function A1(t,e="option"){return n=>{let r=n.state.field(Ms,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+o*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:aee.of(s)}),!0}}const Jrt=t=>{let e=t.state.field(Ms,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Ms,!1)?(t.dispatch({effects:uI.of(!0)}),!0):!1,tot=t=>{let e=t.state.field(Ms,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Cb.of(null)}),!0)};class not{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const rot=50,oot=1e3,iot=qo.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(Ms).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Ms);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Ms)==e)return;let n=t.transactions.some(r=>(r.selection||r.docChanged)&&!zN(r));for(let r=0;rrot&&Date.now()-o.time>oot){for(let i of o.context.abortListeners)try{i()}catch(a){vu(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(r=>r.state==1&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),50):-1,this.composing!=0)for(let r of t.transactions)zN(r)=="input"?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(Ms);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=bf(e),r=new tee(e,n,t.explicitPos==n),o=new not(t,r);this.running.push(o),Promise.resolve(t.source(r)).then(i=>{o.context.aborted||(o.done=i||null,this.scheduleAccept())},i=>{this.view.dispatch({effects:Cb.of(null)}),vu(this.view.state,i)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(sa).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(sa);for(let r=0;ra.source==o.active.source);if(i&&i.state==1)if(o.done==null){let a=new qa(o.active.source,0);for(let s of o.updates)a=a.update(s,n);a.state!=1&&e.push(a)}else this.startQuery(i)}e.length&&this.view.dispatch({effects:iee.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Ms,!1);if(e&&e.tooltip&&this.view.state.facet(sa).closeOnBlur){let n=e.open&&VK(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:Cb.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:uI.of(!1)}),20),this.composing=0}}}),lee=tn.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class aot{constructor(e,n,r,o){this.field=e,this.line=n,this.from=r,this.to=o}}class cI{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,zi.TrackDel),r=e.mapPos(this.to,1,zi.TrackDel);return n==null||r==null?null:new cI(this.field,n,r)}}class dI{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],o=[n],i=e.doc.lineAt(n),a=/^\s*/.exec(i.text)[0];for(let l of this.lines){if(r.length){let u=a,c=/^\t*/.exec(l)[0].length;for(let d=0;dnew cI(l.field,o[l.line]+l.from,o[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],o=[],i;for(let a of e.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(a);){let s=i[1]?+i[1]:null,l=i[2]||i[3]||"",u=-1;for(let c=0;c=u&&d.field++}o.push(new aot(u,r.length,i.index,i.index+l.length)),a=a.slice(0,i.index)+l+a.slice(i.index+i[0].length)}for(let s;s=/\\([{}])/.exec(a);){a=a.slice(0,s.index)+s[1]+a.slice(s.index+s[0].length);for(let l of o)l.line==r.length&&l.from>s.index&&(l.from--,l.to--)}r.push(a)}return new dI(r,o)}}let sot=xn.widget({widget:new class extends Tc{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),lot=xn.mark({class:"cm-snippetField"});class Pm{constructor(e,n){this.ranges=e,this.active=n,this.deco=xn.set(e.map(r=>(r.from==r.to?sot:lot).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let o=r.map(e);if(!o)return null;n.push(o)}return new Pm(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const S_=qn.define({map(t,e){return t&&t.map(e)}}),uot=qn.define(),Eb=Ti.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(S_))return n.value;if(n.is(uot)&&t)return new Pm(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>tn.decorations.from(t,e=>e?e.deco:xn.none)});function fI(t,e){return Ct.create(t.filter(n=>n.field==e).map(n=>Ct.range(n.from,n.to)))}function cot(t){let e=dI.parse(t);return(n,r,o,i)=>{let{text:a,ranges:s}=e.instantiate(n.state,o),l={changes:{from:o,to:i,insert:Ir.of(a)},scrollIntoView:!0,annotations:r?oee.of(r):void 0};if(s.length&&(l.selection=fI(s,0)),s.length>1){let u=new Pm(s,0),c=l.effects=[S_.of(u)];n.state.field(Eb,!1)===void 0&&c.push(qn.appendConfig.of([Eb,got,vot,lee]))}n.dispatch(n.state.update(l))}}function uee(t){return({state:e,dispatch:n})=>{let r=e.field(Eb,!1);if(!r||t<0&&r.active==0)return!1;let o=r.active+t,i=t>0&&!r.ranges.some(a=>a.field==o+t);return n(e.update({selection:fI(r.ranges,o),effects:S_.of(i?null:new Pm(r.ranges,o)),scrollIntoView:!0})),!0}}const dot=({state:t,dispatch:e})=>t.field(Eb,!1)?(e(t.update({effects:S_.of(null)})),!0):!1,fot=uee(1),hot=uee(-1),pot=[{key:"Tab",run:fot,shift:hot},{key:"Escape",run:dot}],i7=cn.define({combine(t){return t.length?t[0]:pot}}),got=Lp.highest(m_.compute([i7],t=>t.facet(i7)));function Ga(t,e){return Object.assign(Object.assign({},e),{apply:cot(t)})}const vot=tn.domEventHandlers({mousedown(t,e){let n=e.state.field(Eb,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let o=n.ranges.find(i=>i.from<=r&&i.to>=r);return!o||o.field==n.active?!1:(e.dispatch({selection:fI(n.ranges,o.field),effects:S_.of(n.ranges.some(i=>i.field>o.field)?new Pm(n.ranges,o.field):null),scrollIntoView:!0}),!0)}}),Tb={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Kh=qn.define({map(t,e){let n=e.mapPos(t,-1,zi.TrackAfter);return n==null?void 0:n}}),hI=new class extends Ep{};hI.startSide=1;hI.endSide=-1;const cee=Ti.define({create(){return Qr.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,r=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(r,-1)&&(t=Qr.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(Kh)&&(t=t.update({add:[hI.range(n.value,n.value+1)]}));return t}});function mot(){return[bot,cee]}const fk="()[]{}<>";function dee(t){for(let e=0;e{if((yot?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||r.length==2&&hl(Bi(r,0))==1||e!=o.from||n!=o.to)return!1;let i=wot(t.state,r);return i?(t.dispatch(i),!0):!1}),_ot=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=fee(t,t.selection.main.head).brackets||Tb.brackets,o=null,i=t.changeByRange(a=>{if(a.empty){let s=Sot(t.doc,a.head);for(let l of r)if(l==s&&yE(t.doc,a.head)==dee(Bi(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Ct.cursor(a.head-l.length)}}return{range:o=a}});return o||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!o},Oot=[{key:"Backspace",run:_ot}];function wot(t,e){let n=fee(t,t.selection.main.head),r=n.brackets||Tb.brackets;for(let o of r){let i=dee(Bi(o,0));if(e==o)return i==o?Eot(t,o,r.indexOf(o+o+o)>-1,n):xot(t,o,i,n.before||Tb.before);if(e==i&&hee(t,t.selection.main.from))return Cot(t,o,i)}return null}function hee(t,e){let n=!1;return t.field(cee).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function yE(t,e){let n=t.sliceString(e,e+2);return n.slice(0,hl(Bi(n,0)))}function Sot(t,e){let n=t.sliceString(e-2,e);return hl(Bi(n,0))==n.length?n:n.slice(1)}function xot(t,e,n,r){let o=null,i=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Kh.of(a.to+e.length),range:Ct.range(a.anchor+e.length,a.head+e.length)};let s=yE(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Kh.of(a.head+e.length),range:Ct.cursor(a.head+e.length)}:{range:o=a}});return o?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function Cot(t,e,n){let r=null,o=t.changeByRange(i=>i.empty&&yE(t.doc,i.head)==n?{changes:{from:i.head,to:i.head+n.length,insert:n},range:Ct.cursor(i.head+n.length)}:r={range:i});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Eot(t,e,n,r){let o=r.stringPrefixes||Tb.stringPrefixes,i=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Kh.of(s.to+e.length),range:Ct.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=yE(t.doc,l),c;if(u==e){if(a7(t,l))return{changes:{insert:e+e,from:l},effects:Kh.of(l+e.length),range:Ct.cursor(l+e.length)};if(hee(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:Ct.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=s7(t,l-2*e.length,o))>-1&&a7(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Kh.of(l+e.length),range:Ct.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=To.Word&&s7(t,l,o)>-1&&!Tot(t,l,e,o))return{changes:{insert:e+e,from:l},effects:Kh.of(l+e.length),range:Ct.cursor(l+e.length)}}return{range:i=s}});return i?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function a7(t,e){let n=ni(t).resolveInner(e+1);return n.parent&&n.from==e}function Tot(t,e,n,r){let o=ni(t).resolveInner(e,-1),i=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let c=o.firstChild;for(;c&&c.from==o.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=o.to==e&&o.parent;if(!u)break;o=u}return!1}function s7(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=To.Word)return e;for(let o of n){let i=e-o.length;if(t.sliceDoc(i,e)==o&&r(t.sliceDoc(i-1,i))!=To.Word)return i}return-1}function pee(t={}){return[Ms,sa.of(t),iot,kot,lee]}const gee=[{key:"Ctrl-Space",run:eot},{key:"Escape",run:tot},{key:"ArrowDown",run:A1(!0)},{key:"ArrowUp",run:A1(!1)},{key:"PageDown",run:A1(!0,"page")},{key:"PageUp",run:A1(!1,"page")},{key:"Enter",run:Jrt}],kot=Lp.highest(m_.computeN([sa],t=>t.facet(sa).defaultKeymap?[gee]:[]));class Aot{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class jh{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let o=e,i=r.facet(yee).markerFilter;i&&(o=i(o));let a=xn.set(o.map(s=>s.from==s.to||s.from==s.to-1&&r.doc.lineAt(s.from).to==s.from?xn.widget({widget:new Bot(s),diagnostic:s}).range(s.from):xn.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new jh(a,n,Uv(a))}}function Uv(t,e=null,n=0){let r=null;return t.between(n,1e9,(o,i,{spec:a})=>{if(!(e&&a.diagnostic!=e))return r=new Aot(o,i,a.diagnostic),!1}),r}function Pot(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(r=>r.is(vee))||t.changes.touchesRange(n.from,n.to))}function Not(t,e){return t.field(Bs,!1)?e:e.concat(qn.appendConfig.of(zot))}const vee=qn.define(),pI=qn.define(),mee=qn.define(),Bs=Ti.define({create(){return new jh(xn.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),r=null;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Uv(n,t.selected.diagnostic,o)||Uv(n,null,o)}t=new jh(n,t.panel,r)}for(let n of e.effects)n.is(vee)?t=jh.init(n.value,t.panel,e.state):n.is(pI)?t=new jh(t.diagnostics,n.value?bE.open:null,t.selected):n.is(mee)&&(t=new jh(t.diagnostics,t.panel,n.value));return t},provide:t=>[Ob.from(t,e=>e.panel),tn.decorations.from(t,e=>e.diagnostics)]}),Mot=xn.mark({class:"cm-lintRange cm-lintRange-active"});function $ot(t,e,n){let{diagnostics:r}=t.state.field(Bs),o=[],i=2e8,a=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(e_ee(t,n,!1)))}const Dot=t=>{let e=t.state.field(Bs,!1);(!e||!e.panel)&&t.dispatch({effects:Not(t.state,[pI.of(!0)])});let n=_b(t,bE.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},l7=t=>{let e=t.state.field(Bs,!1);return!e||!e.panel?!1:(t.dispatch({effects:pI.of(!1)}),!0)},Iot=t=>{let e=t.state.field(Bs,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Lot=[{key:"Mod-Shift-m",run:Dot,preventDefault:!0},{key:"F8",run:Iot}],yee=cn.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},Ec(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function bee(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ri.toLowerCase()==o.toLowerCase())){e.push(o);continue e}}e.push("")}return e}function _ee(t,e,n){var r;let o=n?bee(e.actions):[];return fo("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},fo("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(r=e.actions)===null||r===void 0?void 0:r.map((i,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=Uv(t.state.field(Bs).diagnostics,e);h&&i.apply(t,h.from,h.to)},{name:u}=i,c=o[a]?u.indexOf(o[a]):-1,d=c<0?u:[u.slice(0,c),fo("u",u.slice(c,c+1)),u.slice(c+1)];return fo("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${o[a]})"`}.`},d)}),e.source&&fo("div",{class:"cm-diagnosticSource"},e.source))}class Bot extends Tc{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return fo("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class u7{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=_ee(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class bE{constructor(e){this.view=e,this.items=[];let n=o=>{if(o.keyCode==27)l7(this.view),this.view.focus();else if(o.keyCode==38||o.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(o.keyCode==40||o.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(o.keyCode==36)this.moveSelection(0);else if(o.keyCode==35)this.moveSelection(this.items.length-1);else if(o.keyCode==13)this.view.focus();else if(o.keyCode>=65&&o.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:i}=this.items[this.selectedIndex],a=bee(i.actions);for(let s=0;s{for(let i=0;il7(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Bs).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=r;dr&&(this.items.splice(r,u-r),o=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),i=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:s})=>{let l=s.height/this.list.offsetHeight;a.tops.bottom&&(this.list.scrollTop+=(a.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Bs),r=Uv(n.diagnostics,this.items[e].diagnostic);!r||this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:mee.of(r)})}static open(e){return new bE(e)}}function Fot(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function P1(t){return Fot(``,'width="6" height="3"')}const Vot=tn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:P1("#d11")},".cm-lintRange-warning":{backgroundImage:P1("orange")},".cm-lintRange-info":{backgroundImage:P1("#999")},".cm-lintRange-hint":{backgroundImage:P1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),zot=[Bs,tn.decorations.compute([Bs],t=>{let{selected:e,panel:n}=t.field(Bs);return!e||!n||e.from==e.to?xn.none:xn.set([Mot.range(e.from,e.to)])}),Ret($ot,{hideOn:Pot}),Vot],jot=(()=>[Wet(),Uet(),uet(),unt(),Rtt(),qJe(),net(),Or.allowMultipleSelections.of(!0),Ott(),Itt(Ftt,{fallback:!0}),Utt(),mot(),pee(),xet(),Tet(),get(),grt(),m_.of([...Oot,...urt,...Rrt,...ynt,...Ptt,...gee,...Lot])])();/*! * VueCodemirror v6.1.1 * Copyright (c) Surmon. All rights reserved. * Released under the MIT License. * Surmon */var Wot=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[jot]}),Qot=Symbol("vue-codemirror-global-config"),Ta,Hot=function(t){var e=t.onUpdate,n=t.onChange,r=t.onFocus,o=t.onBlur,i=function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(a);cn%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let o=e.parser.context;return new Tx(e,[],n,r,r,0,[],0,o?new d7(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,o=e&65535,{parser:i}=this.p,a=i.dynamicPrecedence(o);if(a&&(this.score+=a),r==0){this.pushState(i.getGoto(this.state,o,!0),this.reducePos),o=2e3&&!(!((n=this.p.parser.nodeSet.types[o])===null||n===void 0)&&n.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(o,l)}storeNode(e,n,r,o=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!i||this.pos==r)this.buffer.push(e,n,r,o);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,o>4&&(o-=4);this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=o}}shift(e,n,r,o){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let i=e,{parser:a}=this.p;(o>this.pos||n<=a.maxNode)&&(this.pos=o,a.stateFlag(i,1)||(this.reducePos=o)),this.pushState(i,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,o,4)}else this.pos=o,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,o,4)}apply(e,n,r,o){e&65536?this.reduce(e):this.shift(e,n,r,o)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let o=this.pos;this.reducePos=this.pos=o+e.length,this.pushState(n,o),this.buffer.push(r,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),o=e.bufferBase+n;for(;e&&o==e.bufferBase;)e=e.parent;return new Tx(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,o,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new qot(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>4<<1||this.stack.length>=120){let o=[];for(let i=0,a;il&1&&s==a)||o.push(n[i],a)}n=o}let r=[];for(let o=0;o>19,o=n&65535,i=this.stack.length-r*3;if(i<0||e.getGoto(this.stack[i],o,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(o,i)=>{if(!n.includes(o))return n.push(o),e.allActions(o,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-i;if(s>1){let l=a&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,i+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class d7{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class qot{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let o=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=o}}class kx{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new kx(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new kx(this.stack,this.pos,this.index)}}function $y(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,o=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),i+=l,s)break;i*=46}n?n[o++]=i:n=new e(i)}return n}class _w{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const f7=new _w;class Kot{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=f7,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,o=this.rangeIndex,i=this.pos+e;for(;ir.to:i>=r.to;){if(o==this.ranges.length-1)return null;let a=this.ranges[++o];i+=a.from-r.to,r=a}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,o;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),o=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),o}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=f7,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let o of this.ranges){if(o.from>=n)break;o.to>e&&(r+=this.input.read(Math.max(o.from,e),Math.min(o.to,n)))}return r}}class lv{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;wee(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}lv.prototype.contextual=lv.prototype.fallback=lv.prototype.extend=!1;class jN{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?$y(e):e}token(e,n){let r=e.pos,o=0;for(;;){let i=e.next<0,a=e.resolveOffset(1,1);if(wee(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(i||o++,a==null)break;e.reset(a,e.token)}o&&(e.reset(r,e.token),e.acceptToken(this.elseToken,o))}}jN.prototype.contextual=lv.prototype.fallback=lv.prototype.extend=!1;class _E{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function wee(t,e,n,r,o,i){let a=0,s=1<0){let g=t[h];if(l.allows(g)&&(e.token.value==-1||e.token.value==g||Jot(g,e.token.value,o,i))){e.acceptToken(g);break}}let c=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[u+f*3-3]==65535&&t[u+f*3-3]==65535){a=t[u+f*3-1];continue e}for(;d>1,g=u+h+(h<<1),v=t[g],m=t[g+1]||65536;if(c=m)d=h+1;else{a=t[g+2],e.advance();continue e}}break}}function h7(t,e,n){for(let r=e,o;(o=t[r])!=65535;r++)if(o==n)return r-e;return-1}function Jot(t,e,n,r){let o=h7(n,r,e);return o<0||h7(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class eit{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?p7(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?p7(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(i instanceof ei){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+i.length}}}class tit{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new _w)}getActions(e){let n=0,r=null,{parser:o}=e.p,{tokenizers:i}=o,a=o.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;ud.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new _w,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new _w,{pos:r,p:o}=e;return n.start=r,n.end=Math.min(r+1,o.stream.end),n.value=r==o.stream.end?o.parser.eofTerm:0,n}updateCachedToken(e,n,r){let o=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(o,e),r),e.value>-1){let{parser:i}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(o+1)}putAction(e,n,r,o){for(let i=0;ie.bufferLength*4?new eit(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],o,i;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{o||(o=[],i=[]),o.push(s);let l=this.tokens.getMainToken(s);i.push(l.value,l.end)}}break}}if(!r.length){let a=o&&iit(o);if(a)return Cs&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Cs&&o&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&o){let a=this.stoppedAt!=null&&o[0].pos>this.stoppedAt?o[0]:this.runRecovery(o,i,r);if(a)return Cs&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&o>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(o);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?i.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!u||(d.prop(br.contextHash)||0)==c))return e.useNode(d,f),Cs&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(d.type.id)})`),!0;if(!(d instanceof ei)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof ei&&d.positions[0]==0)d=h;else break}}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),Cs&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(s&65535)})`),!0;if(e.stack.length>=9e3)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;uo?n.push(g):r.push(g)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return g7(e,n),!0}}runRecovery(e,n,r){let o=null,i=!1;for(let a=0;a ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),Cs&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=c;for(let h=0;d.forceReduce()&&h<10&&(Cs&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)Cs&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))Cs&&console.log(c+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),Cs&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),g7(s,r)):(!o||o.scoret;class oit{constructor(e){this.start=e.start,this.shift=e.shift||pk,this.reduce=e.reduce||pk,this.reuse=e.reuse||pk,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Yv extends XK{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),o=[];for(let s=0;s=0)i(c,l,s[u++]);else{let d=s[u+-c];for(let f=-c;f>0;f--)i(s[u++],l,d);u++}}}this.nodeSet=new UD(n.map((s,l)=>us.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:o[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=QK;let a=$y(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new lv(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let o=new nit(this,e,n,r);for(let i of this.wrappers)o=i(o,e,n,r);return o}getGoto(e,n,r=!1){let o=this.goto;if(n>=o[0])return-1;for(let i=o[n+1];;){let a=o[i++],s=a&1,l=o[i++];if(s&&r)return l;for(let u=i+(a>>1);i0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),o=r?n(r):void 0;for(let i=this.stateSlot(e,1);o==null;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Uc(this.data,i+2);else break;o=n(Uc(this.data,i+1))}return o}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Uc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let o=this.data[r+1];n.some((i,a)=>a&1&&i==o)||n.push(this.data[r],o)}}return n}configure(e){let n=Object.assign(Object.create(Yv.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let o=e.tokenizers.find(i=>i.from==r);return o?o.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,o)=>{let i=e.specializers.find(s=>s.from==r.external);if(!i)return r;let a=Object.assign(Object.assign({},r),{external:i.to});return n.specializers[o]=v7(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let i of e.split(" ")){let a=n.indexOf(i);a>=0&&(r[a]=!0)}let o=null;for(let i=0;ir)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const ait=lE({String:Xe.string,Number:Xe.number,"True False":Xe.bool,PropertyName:Xe.propertyName,Null:Xe.null,",":Xe.separator,"[ ]":Xe.squareBracket,"{ }":Xe.brace}),sit=Yv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[ait],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),lit=Wv.define({name:"json",parser:sit.configure({props:[cE.add({Object:iv({except:/^\s*\}/}),Array:iv({except:/^\s*\]/})}),dE.add({"Object Array":tJ})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function Bp(){return new qD(lit)}var See={exports:{}},OE={},gI={exports:{}},xee={},wE={};function xi(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}xi.prototype.clone_empty=function(){var t=new xi(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t};xi.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]};xi.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1};xi.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};xi.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};xi.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};xi.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1};xi.prototype.is_empty=function(){return this.__items.length===0};xi.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};xi.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(` `);e!==-1?this.__character_count=t.length-e:this.__character_count+=t.length};xi.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t};xi.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};xi.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};xi.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};xi.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function x_(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}x_.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n};x_.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n};x_.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()};x_.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)};function ki(t,e){this.__indent_cache=new x_(t,e),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new xi(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}ki.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};ki.prototype.get_line_number=function(){return this.__lines.length};ki.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)};ki.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)};ki.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};ki.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};ki.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&(e[e.length-1]===` `&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(` `);return t!==` `&&(n=n.replace(/[\n]/g,t)),n};ki.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};ki.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)};ki.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};ki.prototype.just_added_newline=function(){return this.current_line.is_empty()};ki.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};ki.prototype.ensure_empty_line_above=function(t,e){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==e){this.__lines.splice(n+1,0,new xi(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}};wE.Output=ki;var vI={};function uit(t,e,n,r){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}vI.Token=uit;var mI={};(function(t){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",o="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+e+r+"])",a="(?:\\\\u[0-9a-fA-F]{4}|["+n+r+o+"])*";t.identifier=new RegExp(i+a,"g"),t.identifierStart=new RegExp(i),t.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+n+r+o+"])+"),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp(`\r |`+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")})(mI);var yI={},Nm={};function oh(t,e){this.raw_options=Cee(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}oh.prototype._get_array=function(t,e){var n=this.raw_options[t],r=e||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(r=n.concat()):typeof n=="string"&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r};oh.prototype._get_boolean=function(t,e){var n=this.raw_options[t],r=n===void 0?!!e:!!n;return r};oh.prototype._get_characters=function(t,e){var n=this.raw_options[t],r=e||"";return typeof n=="string"&&(r=n.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),r};oh.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var r=parseInt(n,10);return isNaN(r)&&(r=e),r};oh.prototype._get_selection=function(t,e,n){var r=this._get_selection_list(t,e,n);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values: `+e+` You passed in: '`+this.raw_options[t]+"'");return r[0]};oh.prototype._get_selection_list=function(t,e,n){if(!e||e.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var r=this._get_array(t,n);if(!this._is_valid_selection(r,e))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values: `+e+` You passed in: '`+this.raw_options[t]+"'");return r};oh.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some(function(n){return e.indexOf(n)===-1})};function Cee(t,e){var n={};t=Eee(t);var r;for(r in t)r!==e&&(n[r]=t[r]);if(e&&t[e])for(r in t[e])n[r]=t[e][r];return n}function Eee(t){var e={},n;for(n in t){var r=n.replace(/-/g,"_");e[r]=t[n]}return e}Nm.Options=oh;Nm.normalizeOpts=Eee;Nm.mergeOpts=Cee;var Tee=Nm.Options,cit=["before-newline","after-newline","preserve-newline"];function kee(t){Tee.call(this,t,"js");var e=this.raw_options.brace_style||null;e==="expand-strict"?this.raw_options.brace_style="expand":e==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r0&&(this.__position-=1)};Gi.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t};SE.InputScanner=Gi;var Mm={},Pee={};function Fp(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}Fp.prototype.restart=function(){this.__position=0};Fp.prototype.isEmpty=function(){return this.__tokens_length===0};Fp.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}bu.prototype=new WN;bu.prototype._create=function(){return new bu(this._input,this)};bu.prototype._update=function(){this.__set_templated_pattern()};bu.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e};bu.prototype.read_options=function(t){var e=this._create();for(var n in QN)e._disabled[n]=t.templating.indexOf(n)===-1;return e._update(),e};bu.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e};bu.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t};bu.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")};bu.prototype._read_template=function(){var t="",e=this._input.peek();if(e==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(t=t||this.__patterns.erb.read())}else e==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t};_I.TemplatablePattern=bu;var hit=SE.InputScanner,Ree=Mm.Tokenizer,vk=Mm.TOKEN,pit=xE.Directives,bl=mI,git=C_.Pattern,vit=_I.TemplatablePattern;function mk(t,e){return e.indexOf(t)!==-1}var Tn={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:vk.START,RAW:vk.RAW,EOF:vk.EOF},m7=new pit(/\/\*/,/\*\//),mit=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,yit=/[0-9]/,bit=/[^\d\.]/,_it=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),Ap=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";Ap=Ap.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");Ap="\\?\\.(?!\\d) "+Ap;Ap=Ap.replace(/ /g,"|");var Oit=new RegExp(Ap),Dee="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),wit=Dee.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Sit=new RegExp("^(?:"+wit.join("|")+")$"),Ow,Ai=function(t,e){Ree.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new git(this._input),r=new vit(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(bl.identifier).matching(bl.identifierMatch),number:n.matching(mit),punct:n.matching(Oit),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(bl.lineBreak),shebang:n.starting_with(/#!/).until_after(bl.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};Ai.prototype=new Ree;Ai.prototype._is_comment=function(t){return t.type===Tn.COMMENT||t.type===Tn.BLOCK_COMMENT||t.type===Tn.UNKNOWN};Ai.prototype._is_opening=function(t){return t.type===Tn.START_BLOCK||t.type===Tn.START_EXPR};Ai.prototype._is_closing=function(t,e){return(t.type===Tn.END_BLOCK||t.type===Tn.END_EXPR)&&e&&(t.text==="]"&&e.text==="["||t.text===")"&&e.text==="("||t.text==="}"&&e.text==="{")};Ai.prototype._reset=function(){Ow=!1};Ai.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(Tn.EOF,""):(n=n||this._read_non_javascript(r),n=n||this._read_string(r),n=n||this._read_pair(r,this._input.peek(1)),n=n||this._read_word(t),n=n||this._read_singles(r),n=n||this._read_comment(r),n=n||this._read_regexp(r,t),n=n||this._read_xml(r,t),n=n||this._read_punctuation(),n=n||this._create_token(Tn.UNKNOWN,this._input.next()),n)};Ai.prototype._read_word=function(t){var e;if(e=this.__patterns.identifier.read(),e!=="")return e=e.replace(bl.allLineBreaks,` `),!(t.type===Tn.DOT||t.type===Tn.RESERVED&&(t.text==="set"||t.text==="get"))&&Sit.test(e)?(e==="in"||e==="of")&&(t.type===Tn.WORD||t.type===Tn.STRING)?this._create_token(Tn.OPERATOR,e):this._create_token(Tn.RESERVED,e):this._create_token(Tn.WORD,e);if(e=this.__patterns.number.read(),e!=="")return this._create_token(Tn.WORD,e)};Ai.prototype._read_singles=function(t){var e=null;return t==="("||t==="["?e=this._create_token(Tn.START_EXPR,t):t===")"||t==="]"?e=this._create_token(Tn.END_EXPR,t):t==="{"?e=this._create_token(Tn.START_BLOCK,t):t==="}"?e=this._create_token(Tn.END_BLOCK,t):t===";"?e=this._create_token(Tn.SEMICOLON,t):t==="."&&bit.test(this._input.peek(1))?e=this._create_token(Tn.DOT,t):t===","&&(e=this._create_token(Tn.COMMA,t)),e&&this._input.next(),e};Ai.prototype._read_pair=function(t,e){var n=null;return t==="#"&&e==="{"&&(n=this._create_token(Tn.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n};Ai.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(t!=="")return t==="="?this._create_token(Tn.EQUALS,t):t==="?."?this._create_token(Tn.DOT,t):this._create_token(Tn.OPERATOR,t)};Ai.prototype._read_non_javascript=function(t){var e="";if(t==="#"){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(Tn.UNKNOWN,e.trim()+` `);if(e=this.__patterns.include.read(),e)return this._create_token(Tn.UNKNOWN,e.trim()+` `);t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(yit)){do t=this._input.next(),n+=t;while(this._input.hasNext()&&t!=="#"&&t!=="=");return t==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(n+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(n+="{}",this._input.next(),this._input.next())),this._create_token(Tn.WORD,n)}this._input.back()}else if(t==="<"&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){for(;this._input.hasNext()&&!this._input.testChar(bl.newline);)e+=this._input.next();return Ow=!0,this._create_token(Tn.COMMENT,e)}}else if(Ow&&t==="-"&&(e=this.__patterns.html_comment_end.read(),e))return Ow=!1,this._create_token(Tn.COMMENT,e);return null};Ai.prototype._read_comment=function(t){var e=null;if(t==="/"){var n="";if(this._input.peek(1)==="*"){n=this.__patterns.block_comment.read();var r=m7.get_directives(n);r&&r.ignore==="start"&&(n+=m7.readIgnored(this._input)),n=n.replace(bl.allLineBreaks,` `),e=this._create_token(Tn.BLOCK_COMMENT,n),e.directives=r}else this._input.peek(1)==="/"&&(n=this.__patterns.comment.read(),e=this._create_token(Tn.COMMENT,n))}return e};Ai.prototype._read_string=function(t){if(t==="`"||t==="'"||t==='"'){var e=this._input.next();return this.has_char_escapes=!1,t==="`"?e+=this._read_string_recursive("`",!0,"${"):e+=this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=xit(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(bl.allLineBreaks,` `),this._create_token(Tn.STRING,e)}return null};Ai.prototype._allow_regexp_or_xml=function(t){return t.type===Tn.RESERVED&&mk(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===Tn.END_EXPR&&t.text===")"&&t.opened.previous.type===Tn.RESERVED&&mk(t.opened.previous.text,["if","while","for"])||mk(t.type,[Tn.COMMENT,Tn.START_EXPR,Tn.START_BLOCK,Tn.START,Tn.END_BLOCK,Tn.OPERATOR,Tn.EQUALS,Tn.EOF,Tn.SEMICOLON,Tn.COMMA])};Ai.prototype._read_regexp=function(t,e){if(t==="/"&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),r=!1,o=!1;this._input.hasNext()&&(r||o||this._input.peek()!==t)&&!this._input.testChar(bl.newline);)n+=this._input.peek(),r?r=!1:(r=this._input.peek()==="\\",this._input.peek()==="["?o=!0:this._input.peek()==="]"&&(o=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(bl.identifier)),this._create_token(Tn.STRING,n)}return null};Ai.prototype._read_xml=function(t,e){if(this._options.e4x&&t==="<"&&this._allow_regexp_or_xml(e)){var n="",r=this.__patterns.xml.read_match();if(r){for(var o=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),i=o.indexOf("{")===0,a=0;r;){var s=!!r[1],l=r[2],u=!!r[r.length-1]||l.slice(0,8)==="![CDATA[";if(!u&&(l===o||i&&l.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--a:++a),n+=r[0],a<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(bl.allLineBreaks,` `),this._create_token(Tn.STRING,n)}}return null};function xit(t){for(var e="",n=0,r=new hit(t),o=null;r.hasNext();)if(o=r.match(/([\s]|[^\\]|\\\\)+/g),o&&(e+=o[0]),r.peek()==="\\"){if(r.next(),r.peek()==="x")o=r.match(/x([0-9A-Fa-f]{2})/g);else if(r.peek()==="u")o=r.match(/u([0-9A-Fa-f]{4})/g);else{e+="\\",r.hasNext()&&(e+=r.next());continue}if(!o||(n=parseInt(o[1],16),n>126&&n<=255&&o[0].indexOf("x")===0))return t;if(n>=0&&n<32){e+="\\"+o[0];continue}else n===34||n===39||n===92?e+="\\"+String.fromCharCode(n):e+=String.fromCharCode(n)}return e}Ai.prototype._read_string_recursive=function(t,e,n){var r,o;t==="'"?o=this.__patterns.single_quote:t==='"'?o=this.__patterns.double_quote:t==="`"?o=this.__patterns.template_text:t==="}"&&(o=this.__patterns.template_expression);for(var i=o.read(),a="";this._input.hasNext();){if(a=this._input.next(),a===t||!e&&bl.newline.test(a)){this._input.back();break}else a==="\\"&&this._input.hasNext()?(r=this._input.peek(),r==="x"||r==="u"?this.has_char_escapes=!0:r==="\r"&&this._input.peek(1)===` `&&this._input.next(),a+=this._input.next()):n&&(n==="${"&&a==="$"&&this._input.peek()==="{"&&(a+=this._input.next()),n===a&&(t==="`"?a+=this._read_string_recursive("}",e,"`"):a+=this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(a+=this._input.next())));a+=o.read(),i+=a}return i};ih.Tokenizer=Ai;ih.TOKEN=Tn;ih.positionable_operators=_it.slice();ih.line_starters=Dee.slice();var Cit=wE.Output,Eit=vI.Token,Ax=mI,Tit=yI.Options,kit=ih.Tokenizer,Ab=ih.line_starters,Ry=ih.positionable_operators,mt=ih.TOKEN;function ur(t,e){return e.indexOf(t)!==-1}function Ait(t){return t.replace(/^\s+/g,"")}function Pit(t){for(var e={},n=0;nn&&(n=t.line_indent_level));var r={mode:e,parent:t,last_token:t?t.last_token:new Eit(mt.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return r};Lr.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new Cit(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Ln.BlockStatement);var n=new kit(t,this._options);return this._tokens=n.tokenize(),t};Lr.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t,e=this._reset(this._source_text),n=this._options.eol;this._options.eol==="auto"&&(n=` `,e&&Ax.lineBreak.test(e||"")&&(n=e.match(Ax.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return t=this._output.get_code(n),t};Lr.prototype.handle_token=function(t,e){t.type===mt.START_EXPR?this.handle_start_expr(t):t.type===mt.END_EXPR?this.handle_end_expr(t):t.type===mt.START_BLOCK?this.handle_start_block(t):t.type===mt.END_BLOCK?this.handle_end_block(t):t.type===mt.WORD?this.handle_word(t):t.type===mt.RESERVED?this.handle_word(t):t.type===mt.SEMICOLON?this.handle_semicolon(t):t.type===mt.STRING?this.handle_string(t):t.type===mt.EQUALS?this.handle_equals(t):t.type===mt.OPERATOR?this.handle_operator(t):t.type===mt.COMMA?this.handle_comma(t):t.type===mt.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===mt.COMMENT?this.handle_comment(t,e):t.type===mt.DOT?this.handle_dot(t):t.type===mt.EOF?this.handle_eof(t):t.type===mt.UNKNOWN?this.handle_unknown(t,e):this.handle_unknown(t,e)};Lr.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,r=this._options.keep_array_indentation&&Wf(this._flags.mode);if(t.comments_before)for(var o=t.comments_before.next();o;)this.handle_whitespace_and_comments(o,e),this.handle_token(o,e),o=t.comments_before.next();if(r)for(var i=0;i0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var a=1;a0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Lr.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Lr.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Ln.Statement&&Lee(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Lr.prototype.start_of_object_property=function(){return this._flags.parent.mode===Ln.ObjectLiteral&&this._flags.mode===Ln.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oo(this._flags.last_token,["get","set"]))};Lr.prototype.start_of_statement=function(t){var e=!1;return e=e||oo(this._flags.last_token,["var","let","const"])&&t.type===mt.WORD,e=e||dl(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===Ln.ObjectLiteral&&this._flags.mode===Ln.Statement)&&oo(this._flags.last_token,OI)&&!t.newlines,e=e||dl(this._flags.last_token,"else")&&!(dl(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===mt.END_EXPR&&(this._previous_flags.mode===Ln.ForInitializer||this._previous_flags.mode===Ln.Conditional),e=e||this._flags.last_token.type===mt.WORD&&this._flags.mode===Ln.BlockStatement&&!this._flags.in_case&&!(t.text==="--"||t.text==="++")&&this._last_last_text!=="function"&&t.type!==mt.WORD&&t.type!==mt.RESERVED,e=e||this._flags.mode===Ln.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oo(this._flags.last_token,["get","set"])),e?(this.set_mode(Ln.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,oo(t,["do","for","if","while"])),!0):!1};Lr.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=Ln.Expression;if(t.text==="["){if(this._flags.last_token.type===mt.WORD||this._flags.last_token.text===")"){oo(this._flags.last_token,Ab)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}e=Ln.ArrayLiteral,Wf(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),ur(this._flags.last_token.type,[mt.START_EXPR,mt.END_EXPR,mt.WORD,mt.OPERATOR,mt.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===mt.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,e=Ln.ForInitializer):ur(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=Ln.Conditional):ur(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&t.whitespace_before===""?this._output.space_before_token=!1:(ur(this._flags.last_token.text,Ab)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===mt.EQUALS||this._flags.last_token.type===mt.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===mt.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);oo(n,["async","function"])||n.text==="*"&&oo(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Ln.ObjectLiteral?(n.text==="{"||n.text===","||n.text==="*"&&(r.text==="{"||r.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===mt.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(ur(this._last_last_text,["function","yield"])||this._flags.mode===Ln.ObjectLiteral&&ur(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===mt.START_BLOCK?this.print_newline():(this._flags.last_token.type===mt.END_EXPR||this._flags.last_token.type===mt.START_EXPR||this._flags.last_token.type===mt.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===mt.COMMA)&&this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};Lr.prototype.handle_end_expr=function(t){for(;this._flags.mode===Ln.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,t.text==="]"&&Wf(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===mt.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(t),this.restore_mode(),Lee(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Ln.Conditional&&(this._previous_flags.mode=Ln.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};Lr.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===mt.END_EXPR?(this.set_mode(Ln.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Ln.BlockStatement):n&&(ur(n.text,[":",","])&&ur(e.type,[mt.STRING,mt.WORD,mt.RESERVED])||ur(e.text,["get","set","..."])&&ur(n.type,[mt.WORD,mt.RESERVED]))?ur(this._last_last_text,["class","interface"])&&!ur(n.text,[":",","])?this.set_mode(Ln.BlockStatement):this.set_mode(Ln.ObjectLiteral):this._flags.last_token.type===mt.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Ln.BlockStatement):ur(this._flags.last_token.type,[mt.EQUALS,mt.START_EXPR,mt.COMMA,mt.OPERATOR])||oo(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Ln.ObjectLiteral):this.set_mode(Ln.BlockStatement),this._flags.last_token&&oo(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!e.comments_before&&e.text==="}",o=r&&this._flags.last_word==="function"&&this._flags.last_token.type===mt.END_EXPR;if(this._options.brace_preserve_inline){var i=0,a=null;this._flags.inline_frame=!0;do if(i+=1,a=this._tokens.peek(i-1),a.newlines){this._flags.inline_frame=!1;break}while(a.type!==mt.EOF&&!(a.type===mt.END_BLOCK&&a.opened===t))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==mt.OPERATOR&&(o||this._flags.last_token.type===mt.EQUALS||oo(this._flags.last_token,CE)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Wf(this._previous_flags.mode)&&(this._flags.last_token.type===mt.START_EXPR||this._flags.last_token.type===mt.COMMA)&&((this._flags.last_token.type===mt.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===mt.COMMA||this._flags.last_token.type===mt.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==mt.OPERATOR&&this._flags.last_token.type!==mt.START_EXPR&&(ur(this._flags.last_token.type,[mt.START_BLOCK,mt.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),!r&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};Lr.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===Ln.Statement;)this.restore_mode();var e=this._flags.last_token.type===mt.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:this._options.brace_style==="expand"?e||this.print_newline():e||(Wf(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)};Lr.prototype.handle_word=function(t){if(t.type===mt.RESERVED){if(ur(t.text,["set","get"])&&this._flags.mode!==Ln.ObjectLiteral)t.type=mt.WORD;else if(t.text==="import"&&ur(this._tokens.peek().text,["(","."]))t.type=mt.WORD;else if(ur(t.text,["as","from"])&&!this._flags.import_block)t.type=mt.WORD;else if(this._flags.mode===Ln.ObjectLiteral){var e=this._tokens.peek();e.text===":"&&(t.type=mt.WORD)}}if(this.start_of_statement(t)?oo(this._flags.last_token,["var","let","const"])&&t.type===mt.WORD&&(this._flags.declaration_statement=!0):t.newlines&&!g0(this._flags.mode)&&(this._flags.last_token.type!==mt.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==mt.EQUALS&&(this._options.preserve_newlines||!oo(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(t),this.print_newline()):this.handle_whitespace_and_comments(t),this._flags.do_block&&!this._flags.do_while)if(dl(t,"while")){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&dl(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Ln.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&oo(t,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(t),this._flags.in_case=!0;return}if((this._flags.last_token.type===mt.COMMA||this._flags.last_token.type===mt.START_EXPR||this._flags.last_token.type===mt.EQUALS||this._flags.last_token.type===mt.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t)),dl(t,"function")){(ur(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(ur(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===mt.OPERATOR))&&!this._output.just_added_blankline()&&!t.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===mt.RESERVED||this._flags.last_token.type===mt.WORD?oo(this._flags.last_token,["get","set","new","export"])||oo(this._flags.last_token,OI)?this._output.space_before_token=!0:dl(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===mt.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(g0(this._flags.mode)||Wf(this._flags.mode))||this.print_newline(),this.print_token(t),this._flags.last_word=t.text;return}var n="NONE";if(this._flags.last_token.type===mt.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":oo(t,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===mt.SEMICOLON&&this._flags.mode===Ln.BlockStatement?n="NEWLINE":this._flags.last_token.type===mt.SEMICOLON&&g0(this._flags.mode)?n="SPACE":this._flags.last_token.type===mt.STRING?n="NEWLINE":this._flags.last_token.type===mt.RESERVED||this._flags.last_token.type===mt.WORD||this._flags.last_token.text==="*"&&(ur(this._last_last_text,["function","yield"])||this._flags.mode===Ln.ObjectLiteral&&ur(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===mt.START_BLOCK?this._flags.inline_frame?n="SPACE":n="NEWLINE":this._flags.last_token.type===mt.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),oo(t,Ab)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?n="SPACE":n="NEWLINE"),oo(t,["else","catch","finally"]))if((!(this._flags.last_token.type===mt.END_BLOCK&&this._previous_flags.mode===Ln.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var r=this._output.current_line;r.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else n==="NEWLINE"?oo(this._flags.last_token,CE)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&oo(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==mt.END_EXPR?(this._flags.last_token.type!==mt.START_EXPR||!oo(t,["var","let","const"]))&&this._flags.last_token.text!==":"&&(dl(t,"if")&&dl(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):oo(t,Ab)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Wf(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():n==="SPACE"&&(this._output.space_before_token=!0);t.previous&&(t.previous.type===mt.WORD||t.previous.type===mt.RESERVED)&&(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===mt.RESERVED&&(t.text==="do"?this._flags.do_block=!0:t.text==="if"?this._flags.if_block=!0:t.text==="import"?this._flags.import_block=!0:this._flags.import_block&&dl(t,"from")&&(this._flags.import_block=!1))};Lr.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();this._flags.mode===Ln.Statement&&!(this._flags.if_block&&dl(e,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)};Lr.prototype.handle_string=function(t){t.text.startsWith("`")&&t.newlines===0&&t.whitespace_before===""&&(t.previous.text===")"||this._flags.last_token.type===mt.WORD)||(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===mt.RESERVED||this._flags.last_token.type===mt.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===mt.COMMA||this._flags.last_token.type===mt.START_EXPR||this._flags.last_token.type===mt.EQUALS||this._flags.last_token.type===mt.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):t.text.startsWith("`")&&this._flags.last_token.type===mt.END_EXPR&&(t.previous.text==="]"||t.previous.text===")")&&t.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(t)};Lr.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0};Lr.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(g0(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===Ln.ObjectLiteral||this._flags.mode===Ln.Statement&&this._flags.parent.mode===Ln.ObjectLiteral?(this._flags.mode===Ln.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)};Lr.prototype.handle_operator=function(t){var e=t.text==="*"&&(oo(this._flags.last_token,["function","yield"])||ur(this._flags.last_token.type,[mt.START_BLOCK,mt.COMMA,mt.END_BLOCK,mt.SEMICOLON])),n=ur(t.text,["-","+"])&&(ur(this._flags.last_token.type,[mt.START_BLOCK,mt.START_EXPR,mt.EQUALS,mt.OPERATOR])||ur(this._flags.last_token.text,Ab)||this._flags.last_token.text===",");if(!this.start_of_statement(t)){var r=!e;this.handle_whitespace_and_comments(t,r)}if(t.text==="*"&&this._flags.last_token.type===mt.DOT){this.print_token(t);return}if(t.text==="::"){this.print_token(t);return}if(this._flags.last_token.type===mt.OPERATOR&&ur(this._options.operator_position,Iee)&&this.allow_wrap_or_preserved_newline(t),t.text===":"&&this._flags.in_case){this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==mt.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var o=!0,i=!0,a=!1;if(t.text===":"?this._flags.ternary_depth===0?o=!1:(this._flags.ternary_depth-=1,a=!0):t.text==="?"&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&ur(t.text,Ry)){var s=t.text===":",l=s&&a,u=s&&!a;switch(this._options.operator_position){case p0.before_newline:this._output.space_before_token=!u,this.print_token(t),(!s||l)&&this.allow_wrap_or_preserved_newline(t),this._output.space_before_token=!0;return;case p0.after_newline:this._output.space_before_token=!0,!s||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),this._output.space_before_token=!0;return;case p0.preserve_newline:u||this.allow_wrap_or_preserved_newline(t),o=!(this._output.just_added_newline()||u),this._output.space_before_token=o,this.print_token(t),this._output.space_before_token=!0;return}}if(e){this.allow_wrap_or_preserved_newline(t),o=!1;var c=this._tokens.peek();i=c&&ur(c.type,[mt.WORD,mt.RESERVED])}else if(t.text==="...")this.allow_wrap_or_preserved_newline(t),o=this._flags.last_token.type===mt.START_BLOCK,i=!1;else if(ur(t.text,["--","++","!","~"])||n){if((this._flags.last_token.type===mt.COMMA||this._flags.last_token.type===mt.START_EXPR)&&this.allow_wrap_or_preserved_newline(t),o=!1,i=!1,t.newlines&&(t.text==="--"||t.text==="++"||t.text==="~")){var d=oo(this._flags.last_token,CE)&&t.newlines;d&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(d,!0)}this._flags.last_token.text===";"&&g0(this._flags.mode)&&(o=!0),this._flags.last_token.type===mt.RESERVED?o=!0:this._flags.last_token.type===mt.END_EXPR?o=!(this._flags.last_token.text==="]"&&(t.text==="--"||t.text==="++")):this._flags.last_token.type===mt.OPERATOR&&(o=ur(t.text,["--","-","++","+"])&&ur(this._flags.last_token.text,["--","-","++","+"]),ur(t.text,["+","-"])&&ur(this._flags.last_token.text,["--","++"])&&(i=!0)),(this._flags.mode===Ln.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Ln.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||o,this.print_token(t),this._output.space_before_token=i};Lr.prototype.handle_block_comment=function(t,e){if(this._output.raw){this._output.add_raw_token(t),t.directives&&t.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(t.directives){this.print_newline(!1,e),this.print_token(t),t.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!Ax.newline.test(t.text)&&!t.newlines){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0;return}else this.print_block_commment(t,e)};Lr.prototype.print_block_commment=function(t,e){var n=Mit(t.text),r,o=!1,i=!1,a=t.whitespace_before,s=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(n[0]),this.print_newline(!1,e),n.length>1){for(n=n.slice(1),o=$it(n,"*"),i=Rit(n,a),o&&(this._flags.alignment=1),r=0;r0&&this._indentLevel--};Pd.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;e==="auto"&&(e=` `,t&&b7.test(t||"")&&(e=t.match(b7)[0])),t=t.replace(jit,` `);var n=t.match(/^[\t ]*/)[0];this._output=new Fit(this._options,n),this._input=new Vit(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r=0,o=!1,i=!1,a=!1,s=!1,l=!1,u=this._ch,c=!1,d,f,h;d=this._input.read(Wit),f=d!=="",h=u,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),u=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var g=this._input.read(Qit),v=y7.get_directives(g);v&&v.ignore==="start"&&(g+=y7.readIgnored(this._input)),this.print_string(g),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(Hit)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(f),this.print_string(this._ch);var m=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);m.match(/[ :]$/)&&(m=this.eatString(": ").replace(/\s$/,""),this.print_string(m),this._output.space_before_token=!0),m=m.replace(/\s$/,""),r===0&&m.indexOf(":")!==-1&&(i=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(f),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var b=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);b.match(/[ :]$/)&&(b=this.eatString(": ").replace(/\s$/,""),this.print_string(b),this._output.space_before_token=!0),b=b.replace(/\s$/,""),r===0&&b.indexOf(":")!==-1?(i=!0,this.indent()):b in this.NESTED_AT_RULE?(this._nestedLevel+=1,b in this.CONDITIONAL_GROUP_RULE&&(a=!0)):r===0&&!i&&(s=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")i&&(i=!1,this.outdent()),s=!1,a?(a=!1,o=this._indentLevel>=this._nestedLevel):o=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&o&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(h==="("?this._output.space_before_token=!1:h!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),h==="{"&&this._output.trim(!0),i&&(this.outdent(),i=!1),this.print_string(this._ch),o=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var w=0;w"||this._ch==="+"||this._ch==="~")&&!i&&r===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&Px.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(f),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),Px.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var x=h==='"'||h==="'";this.preserveSingleSpace(x||f),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&c&&this._output.add_new_line()}var C=this._output.get_code(e);return C};Bee.Beautifier=Pd;var Uit=Bee.Beautifier,Yit=SI.Options;function Xit(t,e){var n=new Uit(t,e);return n.beautify()}wI.exports=Xit;wI.exports.defaultOptions=function(){return new Yit};var xI={exports:{}},zee={},CI={},jee=Nm.Options;function Wee(t){jee.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}Wee.prototype=new jee;CI.Options=Wee;var EE={},Qee=Mm.Tokenizer,yk=Mm.TOKEN,Zit=xE.Directives,Git=_I.TemplatablePattern,qit=C_.Pattern,Uo={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:yk.START,RAW:yk.RAW,EOF:yk.EOF},_7=new Zit(/<\!--/,/-->/),va=function(t,e){Qee.call(this,t,e),this._current_tag_name="";var n=new Git(this._input).read_options(this._options),r=new qit(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(//),cdata:r.starting_with(//),conditional_comment:r.starting_with(//),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var o=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(o).until_after(o)}};va.prototype=new Qee;va.prototype._is_comment=function(t){return!1};va.prototype._is_opening=function(t){return t.type===Uo.TAG_OPEN};va.prototype._is_closing=function(t,e){return t.type===Uo.TAG_CLOSE&&e&&((t.text===">"||t.text==="/>")&&e.text[0]==="<"||t.text==="}}"&&e.text[0]==="{"&&e.text[1]==="{")};va.prototype._reset=function(){this._current_tag_name=""};va.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(Uo.EOF,""):(n=n||this._read_open_handlebars(r,e),n=n||this._read_attribute(r,t,e),n=n||this._read_close(r,e),n=n||this._read_raw_content(r,t,e),n=n||this._read_content_word(r),n=n||this._read_comment_or_cdata(r),n=n||this._read_processing(r),n=n||this._read_open(r,e),n=n||this._create_token(Uo.UNKNOWN,this._input.next()),n)};va.prototype._read_comment_or_cdata=function(t){var e=null,n=null,r=null;if(t==="<"){var o=this._input.peek(1);o==="!"&&(n=this.__patterns.comment.read(),n?(r=_7.get_directives(n),r&&r.ignore==="start"&&(n+=_7.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(Uo.COMMENT,n),e.directives=r)}return e};va.prototype._read_processing=function(t){var e=null,n=null,r=null;if(t==="<"){var o=this._input.peek(1);(o==="!"||o==="?")&&(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(Uo.COMMENT,n),e.directives=r)}return e};va.prototype._read_open=function(t,e){var n=null,r=null;return e||t==="<"&&(n=this._input.next(),this._input.peek()==="/"&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(Uo.TAG_OPEN,n)),r};va.prototype._read_open_handlebars=function(t,e){var n=null,r=null;return e||this._options.indent_handlebars&&t==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(n=this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars.read(),r=this._create_token(Uo.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(Uo.TAG_OPEN,n))),r};va.prototype._read_close=function(t,e){var n=null,r=null;return e&&(e.text[0]==="<"&&(t===">"||t==="/"&&this._input.peek(1)===">")?(n=this._input.next(),t==="/"&&(n+=this._input.next()),r=this._create_token(Uo.TAG_CLOSE,n)):e.text[0]==="{"&&t==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),r=this._create_token(Uo.TAG_CLOSE,"}}"))),r};va.prototype._read_attribute=function(t,e,n){var r=null,o="";if(n&&n.text[0]==="<")if(t==="=")r=this._create_token(Uo.EQUALS,this._input.next());else if(t==='"'||t==="'"){var i=this._input.next();t==='"'?i+=this.__patterns.double_quote.read():i+=this.__patterns.single_quote.read(),r=this._create_token(Uo.VALUE,i)}else o=this.__patterns.attribute.read(),o&&(e.type===Uo.EQUALS?r=this._create_token(Uo.VALUE,o):r=this._create_token(Uo.ATTRIBUTE,o));return r};va.prototype._is_content_unformatted=function(t){return this._options.void_elements.indexOf(t)===-1&&(this._options.content_unformatted.indexOf(t)!==-1||this._options.unformatted.indexOf(t)!==-1)};va.prototype._read_raw_content=function(t,e,n){var r="";if(n&&n.text[0]==="{")r=this.__patterns.handlebars_raw_close.read();else if(e.type===Uo.TAG_CLOSE&&e.opened.text[0]==="<"&&e.text[0]!=="/"){var o=e.opened.text.substr(1).toLowerCase();if(o==="script"||o==="style"){var i=this._read_comment_or_cdata(t);if(i)return i.type=Uo.TEXT,i;r=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(o)&&(r=this._input.readUntil(new RegExp("","ig")))}return r?this._create_token(Uo.TEXT,r):null};va.prototype._read_content_word=function(t){var e="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e||(e=this.__patterns.word.read()),e)return this._create_token(Uo.TEXT,e)};EE.Tokenizer=va;EE.TOKEN=Uo;var Kit=CI.Options,Jit=wE.Output,eat=EE.Tokenizer,Xr=EE.TOKEN,O7=/\r\n|[\r\n]/,tat=/\r\n|[\r\n]/g,Wl=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new Jit(t,e)};Wl.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)};Wl.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e};Wl.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};Wl.prototype.add_raw_token=function(t){this._output.add_raw_token(t)};Wl.prototype.print_preserved_newlines=function(t){var e=0;t.type!==Xr.TEXT&&t.previous.type!==Xr.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines0);return e!==0};Wl.prototype.traverse_whitespace=function(t){return t.whitespace_before||t.newlines?(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0):!1};Wl.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};Wl.prototype.print_newline=function(t){this._output.add_new_line(t)};Wl.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))};Wl.prototype.indent=function(){this.indent_level++};Wl.prototype.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var nat=function(t){for(var e=null,n=t.next;n.type!==Xr.EOF&&t.closed!==n;){if(n.type===Xr.ATTRIBUTE&&n.text==="type"){n.next&&n.next.type===Xr.EQUALS&&n.next.next&&n.next.next.type===Xr.VALUE&&(e=n.next.next.text);break}n=n.next}return e},rat=function(t,e){var n=null,r=null;return e.closed?(t==="script"?n="text/javascript":t==="style"&&(n="text/css"),n=nat(e)||n,n.search("text/css")>-1?r="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?r="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?r="html":n.search(/test\/null/)>-1&&(r="null"),r):null};function Dy(t,e){return e.indexOf(t)!==-1}function oat(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function Vp(t){this._printer=t,this._current_frame=null}Vp.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};Vp.prototype.record_tag=function(t){var e=new oat(this._current_frame,t,this._printer.indent_level);this._current_frame=e};Vp.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e};Vp.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&t.indexOf(n.tag)===-1;){if(e&&e.indexOf(n.tag)!==-1){n=null;break}n=n.parent}return n};Vp.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)};Vp.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)};function Il(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var o=new Kit(e,"html");this._options=o,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}Il.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;this._options.eol==="auto"&&(e=` `,t&&O7.test(t)&&(e=t.match(O7)[0])),t=t.replace(tat,` `);var n=t.match(/^[\t ]*/)[0],r={text:"",type:""},o=new Hee,i=new Wl(this._options,n),a=new eat(t,this._options).tokenize();this._tag_stack=new Vp(i);for(var s=null,l=a.next();l.type!==Xr.EOF;)l.type===Xr.TAG_OPEN||l.type===Xr.COMMENT?(s=this._handle_tag_open(i,l,o,r,a),o=s):l.type===Xr.ATTRIBUTE||l.type===Xr.EQUALS||l.type===Xr.VALUE||l.type===Xr.TEXT&&!o.tag_complete?s=this._handle_inside_tag(i,l,o,r):l.type===Xr.TAG_CLOSE?s=this._handle_tag_close(i,l,o):l.type===Xr.TEXT?s=this._handle_text(i,l,o):i.add_raw_token(l),r=s,l=a.next();var u=i._output.get_code(e);return u};Il.prototype._handle_tag_close=function(t,e,n){var r={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):(n.tag_start_char==="<"&&(t.set_space_before_token(e.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),n.indent_content&&!(n.is_unformatted||n.is_content_unformatted)&&(t.indent(),n.indent_content=!1),!n.is_inline_element&&!(n.is_unformatted||n.is_content_unformatted)&&t.set_wrap_point(),r};Il.prototype._handle_inside_tag=function(t,e,n,r){var o=n.has_wrapped_attrs,i={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):n.tag_start_char==="{"&&e.type===Xr.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===Xr.ATTRIBUTE?t.set_space_before_token(!0):(e.type===Xr.EQUALS||e.type===Xr.VALUE&&e.previous.type===Xr.EQUALS)&&t.set_space_before_token(!1),e.type===Xr.ATTRIBUTE&&n.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),o=o||e.newlines!==0),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(r.type!==Xr.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),o=!0)),t.print_token(e),o=o||t.previous_token_wrapped(),n.has_wrapped_attrs=o),i};Il.prototype._handle_text=function(t,e,n){var r={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),r};Il.prototype._print_custom_beatifier_text=function(t,e,n){var r=this;if(e.text!==""){var o=e.text,i,a=1,s="",l="";n.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?i=this._js_beautify:n.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?i=this._css_beautify:n.custom_beautifier_name==="html"&&(i=function(g,v){var m=new Il(g,v,r._js_beautify,r._css_beautify);return m.beautify()}),this._options.indent_scripts==="keep"?a=0:this._options.indent_scripts==="separate"&&(a=-t.indent_level);var u=t.get_full_indent(a);if(o=o.replace(/\n[ \t]*$/,""),n.custom_beautifier_name!=="html"&&o[0]==="<"&&o.match(/^(|]]>)$/.exec(o);if(!c){t.add_raw_token(e);return}s=u+c[1]+` `,o=c[4],c[5]&&(l=u+c[5]),o=o.replace(/\n[ \t]*$/,""),(c[2]||c[3].indexOf(` `)!==-1)&&(c=c[3].match(/[ \t]+$/),c&&(e.whitespace_before=c[0]))}if(o)if(i){var d=function(){this.eol=` `};d.prototype=this._options.raw_options;var f=new d;o=i(u+o,f)}else{var h=e.whitespace_before;h&&(o=o.replace(new RegExp(` (`+h+")?","g"),` `)),o=u+o.replace(/\n/g,` `+u)}s&&(o?o=s+o+` `+l:o=s+l),t.print_newline(!1),o&&(e.text=o,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}};Il.prototype._handle_tag_open=function(t,e,n,r,o){var i=this._get_tag_open_token(e);if((n.is_unformatted||n.is_content_unformatted)&&!n.is_empty_element&&e.type===Xr.TAG_OPEN&&!i.is_start_tag?(t.add_raw_token(e),i.start_tag_token=this._tag_stack.try_pop(i.tag_name)):(t.traverse_whitespace(e),this._set_tag_position(t,e,i,n,r),i.is_inline_element||t.set_wrap_point(),t.print_token(e)),i.is_start_tag&&this._is_wrap_attributes_force){var a=0,s;do s=o.peek(a),s.type===Xr.ATTRIBUTE&&(i.attr_count+=1),a+=1;while(s.type!==Xr.EOF&&s.type!==Xr.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(i.alignment_size=e.text.length+1),!i.tag_complete&&!i.is_unformatted&&(t.alignment_size=i.alignment_size),i};var Hee=function(t,e){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!e)this.tag_complete=!0;else{var n;this.tag_start_char=e.text[0],this.text=e.text,this.tag_start_char==="<"?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&e.next!==null?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===Xr.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&e.closed.text==="/>";var r=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(r=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}};Il.prototype._get_tag_open_token=function(t){var e=new Hee(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||Dy(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&Dy(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&Dy(e.tag_check,this._options.content_unformatted),e.is_inline_element=Dy(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||e.tag_start_char==="{",e};Il.prototype._set_tag_position=function(t,e,n,r,o){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),(n.tag_name==="script"||n.tag_name==="style")&&!(n.is_unformatted||n.is_content_unformatted)&&(n.custom_beautifier_name=rat(n.tag_check,e)))),Dy(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if(n.tag_start_char==="{"&&n.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0;var i=t.current_line_has_match(/{{#if/);i||t.print_newline(!1)}n.tag_name==="!--"&&o.type===Xr.TAG_CLOSE&&r.is_end_tag&&n.text.indexOf(` `)===-1||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(r.is_inline_element||r.is_unformatted)&&!(o.type===Xr.TAG_CLOSE&&n.start_tag_token===r)&&o.type!=="TK_CONTENT",(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,n.tag_start_char==="<"&&(n.tag_name==="html"?n.indent_content=this._options.indent_inner_html:n.tag_name==="head"?n.indent_content=this._options.indent_head_inner_html:n.tag_name==="body"&&(n.indent_content=this._options.indent_body_inner_html)),!(n.is_inline_element||n.is_unformatted)&&(o.type!=="TK_CONTENT"||n.is_content_unformatted)&&t.print_newline(!1),this._calcluate_parent_multiline(t,n)};Il.prototype._calcluate_parent_multiline=function(t,e){e.parent&&t._output.just_added_newline()&&!((e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element)&&(e.parent.multiline_content=!0)};var iat=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],aat=["a","audio","del","ins","map","noscript","video"];Il.prototype._do_optional_end_element=function(t){var e=null;if(!(t.is_empty_element||!t.is_start_tag||!t.parent)){if(t.tag_name==="body")e=e||this._tag_stack.try_pop("head");else if(t.tag_name==="li")e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(t.tag_name==="dd"||t.tag_name==="dt")e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if(t.parent.tag_name==="p"&&iat.indexOf(t.tag_name)!==-1){var n=t.parent.parent;(!n||aat.indexOf(n.tag_name)===-1)&&(e=e||this._tag_stack.try_pop("p"))}else t.tag_name==="rp"||t.tag_name==="rt"?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||this._tag_stack.try_pop("rp",["ruby","rtc"])):t.tag_name==="optgroup"?e=e||this._tag_stack.try_pop("optgroup",["select"]):t.tag_name==="option"?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):t.tag_name==="colgroup"?e=e||this._tag_stack.try_pop("caption",["table"]):t.tag_name==="thead"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):t.tag_name==="tbody"||t.tag_name==="tfoot"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):t.tag_name==="tr"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(t.tag_name==="th"||t.tag_name==="td")&&(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}};zee.Beautifier=Il;var sat=zee.Beautifier,lat=CI.Options;function uat(t,e,n,r){var o=new sat(t,e,n,r);return o.beautify()}xI.exports=uat;xI.exports.defaultOptions=function(){return new lat};var Uee=gI.exports,Yee=wI.exports,Xee=xI.exports;function Zee(t,e,n,r){return n=n||Uee,r=r||Yee,Xee(t,e,n,r)}Zee.defaultOptions=Xee.defaultOptions;OE.js=Uee;OE.css=Yee;OE.html=Zee;(function(t){function e(n,r,o){var i=function(a,s){return n.js_beautify(a,s)};return i.js=n.js_beautify,i.css=r.css_beautify,i.html=o.html_beautify,i.js_beautify=n.js_beautify,i.css_beautify=r.css_beautify,i.html_beautify=o.html_beautify,i}(function(n){var r=OE;r.js_beautify=r.js,r.css_beautify=r.css,r.html_beautify=r.html,n.exports=e(r,r,r)})(t)})(See);var Pp=See.exports;const cat={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},dat={style:{flex:"auto"}},fat={__name:"ExportDialog",props:["show","data","ruleChainId","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=t,r=[Bp()],{show:o,data:i,ruleChainId:a}=Mo(n),s=z(!1),l=z(null),u=z("450px"),c=()=>{let g=new Blob([i.value],{type:"text/plain;charset=utf-8"});RD.exports.saveAs(g,a.value+".json")},d=()=>{n.lf.getSnapshot(a.value+".png","#FFF")},f=()=>{e("close")},h=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():Gn.request(l.value[0]))};return Gn.on("change",()=>{Gn.isFullscreen?(u.value="100%",s.value=!0):(u.value="450px",s.value=!1)}),(g,v)=>{const m=ri,b=oi,w=Kn,O=Ei;return N(),me(O,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:p(o)},{header:V(()=>[B(b,null,{default:V(()=>[B(m,{span:12},{default:V(()=>[We("\u5BFC\u51FA\u89C4\u5219\u94FEDSL")]),_:1})]),_:1})]),footer:V(()=>[ee("div",dat,[B(w,{type:"primary",onClick:d},{default:V(()=>[We("\u4E0B\u8F7D\u56FE\u7247")]),_:1}),B(w,{type:"primary",onClick:c},{default:V(()=>[We("\u4E0B\u8F7D\u6570\u636E")]),_:1}),B(w,{onClick:f},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[ee("div",cat,[B(w,{icon:s.value?p(Ub):p(od),size:"small",onClick:h,circle:""},null,8,["icon"])]),B(p(Ds),{modelValue:p(i),"onUpdate:modelValue":v[0]||(v[0]=S=>Pr(i)?i.value=S:null),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u5B9A\u4E49JSON\u5185\u5BB9...",ref_key:"codeEditorRef",ref:l,style:bt({height:u.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:r},null,8,["modelValue","style"])]),_:1},8,["modelValue"])}}},hat=ee("label",null,"\u5728\u4E0B\u65B9\u7C98\u8D34\u89C4\u5219\u94FEDSL",-1),pat={style:{float:"right"}},gat={__name:"ImportDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=[Bp()],r=z("dsl"),o=z(),i=z(),a=z(!1),s=z(null),l=z("400px");z();const u=pn({data:""});function c(m,b){b.value=b;const w=new FileReader;w.onload=O=>{try{u.data=O.target.result}catch(S){hr.error("Invalid JSON format:"+S)}},w.readAsText(m.raw)}function d(m){return!1}const f=()=>{e("submit",u.data,"from-import")},h=()=>{e("close")},g=function(){u.data=Pp.js(u.data,{indent_size:2})},v=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():Gn.request(s.value[0]))};return Gn.on("change",()=>{Gn.isFullscreen?(l.value=window.innerHeight+"px",a.value=!0):(l.value="400px",a.value=!1)}),(m,b)=>{const w=Kn,O=YR,S=hs,x=ri,C=oi,E=fs,T=xc,M=Sc,k=Ei;return N(),me(k,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":h,modelValue:t.show},{default:V(()=>[B(M,{modelValue:r.value,"onUpdate:modelValue":b[2]||(b[2]=P=>r.value=P)},{default:V(()=>[B(T,{label:"\u4ECEDSL\u5BFC\u5165",name:"dsl"},{default:V(()=>[B(E,{model:u,ref_key:"formRef",ref:o,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:V(()=>[B(S,null,{default:V(()=>[B(O,{"file-list":i.value,"onUpdate:fileList":b[0]||(b[0]=P=>i.value=P),class:"upload-demo",action:null,"on-change":c,"before-upload":d,limit:1,accept:".json"},{default:V(()=>[B(w,{type:"default"},{default:V(()=>[We("\u5BFC\u5165\u89C4\u5219\u94FEDSL\u6587\u4EF6")]),_:1})]),_:1},8,["file-list"])]),_:1}),B(S,{label:"\u5728\u4E0B\u65B9\u7C98\u8D34\u89C4\u5219\u94FEDSL",prop:"data"},{label:V(()=>[B(C,null,{default:V(()=>[B(x,{span:20},{default:V(()=>[hat]),_:1}),B(x,{span:4,style:{"text-align":"right"}},{default:V(()=>[B(w,{type:"info",size:"small",round:"",onClick:g},{default:V(()=>[We("\u6574\u7406")]),_:1}),B(w,{icon:a.value?p(Ub):p(od),size:"small",onClick:v,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:V(()=>[ee("div",{ref_key:"codeEditorRef",ref:s,style:{width:"100%"}},[B(p(Ds),{modelValue:u.data,"onUpdate:modelValue":b[1]||(b[1]=P=>u.data=P),placeholder:"\u8BF7\u7C98\u8D34\u89C4\u5219\u94FEDSL",style:bt({height:l.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:n},null,8,["modelValue","style"])],512)]),_:1}),ee("div",pat,[B(w,{type:"primary",size:"large",onClick:f},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(w,{size:"large",onClick:h},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},vat={__name:"NodeOperate",props:["currentElementPosition"],emits:["edit","delete"],setup(t,{emit:e}){const n=()=>{e("edit")},r=()=>{e("delete")};return(o,i)=>{const a=Kn;return N(),Z("div",{style:bt({position:"absolute",top:t.currentElementPosition.y+"px",left:t.currentElementPosition.x+"px"})},[B(a,{type:"danger",size:"small",icon:p(zQ),onClick:n,circle:""},null,8,["icon"]),B(a,{type:"danger",size:"small",icon:p(gC),onClick:r,circle:"",style:{"margin-left":"3px"}},null,8,["icon"])],4)}}},mat={style:{float:"right"}},yat={__name:"RunPanel",props:["lf","ruleChainId","executeApi","notifyApi"],emits:["submit","close","operate"],setup(t,{emit:e}){const{lf:n,ruleChainId:r,executeApi:o,notifyApi:i}=t,a=[Bp()],s=z(!1),l=z("metadata"),u=z("response"),c=pn({data:"",headers:""}),d=z(""),f=z(),h=pn({wait:!0,msgType:"testMsgType",dataType:"JSON",headers:`{ "Content-Type": "application/json" }`,metadata:"key1=value1&key2=value2",body:`{ "temperature":68 }`});jt(()=>{}),Hf(()=>{});const g=async S=>{var x;await fq(S.id,S.disabled?"start":"stop");try{hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate",S.id,S.disabled?"start":"stop")}catch(C){hr.error(`${S.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"}\u5931\u8D25: ${((x=C.response)==null?void 0:x.data)||C.toString()}`)}},v=async(S,x,C,E,T,M)=>{var R;let k=n.getEditorSetting();k.url+k.executeApi,k.url+k.notifyApi;let P=S.id;d.value=JZ();try{let D={};x?D=await VGe(P,d.value,C,E,T,M):D=await zGe(P,d.value,C,E,T,M),c.headers=JSON.stringify(D.headers,null," "),c.data=JSON.stringify(D.data,null," ")}catch(D){c.data=((R=D.response)==null?void 0:R.data)||D.toString()}finally{s.value=!1}},m=async(S,x,C,E,T)=>{u.value==="response"&&(s.value=!0),c.data="",c.headers="";let M=n.getRuleChain();M.disabled?(s.value=!1,ip.confirm(`\u8BF7\u5148\u90E8\u7F72\u89C4\u5219\u94FE\u518D\u8FD0\u884C\uFF0C\u662F\u5426\u90E8\u7F72 ${M.name} \uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{g(M)}).finally(()=>{s.value=!1})):await v(M,S,x,C,E,T)},b=S=>{!S||S.validate(x=>{if(x){let C={headers:JSON.parse(h.headers)};m(h.wait,h.msgType,h.metadata,h.body,C)}else return!1})},w=()=>{},O=()=>{e("close")};return(S,x)=>{const C=ao,E=hs,T=xc,M=Sc,k=Xs,P=Kn,R=fs,D=ri,F=oi,W=ev;return Yt((N(),Z("div",null,[B(F,{gutter:20},{default:V(()=>[B(D,{span:10,class:"send-form"},{default:V(()=>[B(R,{model:h,ref_key:"formRef",ref:f,"label-position":"top","label-width":"auto"},{default:V(()=>[B(E,{label:"\u6D88\u606F\u7C7B\u578B",rules:[{required:!0,message:"\u6D88\u606F\u7C7B\u578B\u662F\u5FC5\u987B\u7684"}],prop:"msgType"},{default:V(()=>[B(C,{modelValue:h.msgType,"onUpdate:modelValue":x[0]||(x[0]=I=>h.msgType=I),placeholder:"\u8BF7\u8F93\u5165\u6D88\u606F\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),B(M,{modelValue:l.value,"onUpdate:modelValue":x[3]||(x[3]=I=>l.value=I)},{default:V(()=>[B(T,{label:"\u5143\u6570\u636E",name:"metadata"},{default:V(()=>[B(p(Ds),{modelValue:h.metadata,"onUpdate:modelValue":x[1]||(x[1]=I=>h.metadata=I),placeholder:"\u8BF7\u8F93\u5165\u5143\u6570\uFF0C\u636E\u683C\u5F0F\uFF1Akey1=value1&key2=value2",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:a},null,8,["modelValue"])]),_:1}),B(T,{label:"\u8BF7\u6C42\u5934",name:"headers"},{default:V(()=>[B(p(Ds),{modelValue:h.headers,"onUpdate:modelValue":x[2]||(x[2]=I=>h.headers=I),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u5934\u6570\u636E",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:a},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),B(E,{label:"\u8BF7\u6C42\u4F53",prop:"body"},{default:V(()=>[B(p(Ds),{modelValue:h.body,"onUpdate:modelValue":x[4]||(x[4]=I=>h.body=I),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u4F53\u6570\u636E",style:{height:"200px",width:"100%"},autofocus:!0,tabSize:2,extensions:a},null,8,["modelValue"])]),_:1}),B(E,null,{default:V(()=>[B(k,{modelValue:h.wait,"onUpdate:modelValue":x[5]||(x[5]=I=>h.wait=I),label:"\u8F93\u51FA\u7ED3\u679C"},null,8,["modelValue"])]),_:1}),ee("div",mat,[B(P,{type:"default",onClick:x[6]||(x[6]=I=>O())},{default:V(()=>[We("\u5173\u95ED")]),_:1}),B(P,{type:"primary",loading:s.value,onClick:x[7]||(x[7]=I=>b(f.value))},{default:V(()=>[We("\u53D1\u9001")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1}),B(D,{span:14},{default:V(()=>[B(M,{type:"card",modelValue:u.value,"onUpdate:modelValue":x[10]||(x[10]=I=>u.value=I),onTabChange:w},{default:V(()=>[B(T,{label:"\u8F93\u51FA",name:"response"},{default:V(()=>[B(R,{"label-position":"top","label-width":"auto"},{default:V(()=>[B(E,{label:"\u54CD\u5E94\u5934"},{default:V(()=>[B(p(Ds),{modelValue:c.headers,"onUpdate:modelValue":x[8]||(x[8]=I=>c.headers=I),editable:!1,style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:a},null,8,["modelValue"])]),_:1}),B(E,{label:"\u54CD\u5E94\u4F53"},{default:V(()=>[B(p(Ds),{modelValue:c.data,"onUpdate:modelValue":x[9]||(x[9]=I=>c.data=I),placeholder:"",editable:!1,style:{height:"300px",width:"100%"},autofocus:!0,tabSize:2,extensions:a},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})])),[[W,s.value]])}}};var bat=zl(yat,[["__scopeId","data-v-ac63049a"]]);const _at={__name:"RunDialog",props:["show","lf"],emits:["submit","close",'"operate"'],setup(t,{emit:e}){const{show:n,lf:r}=t,o=z(""),i=z(""),a=z(""),s=()=>{e("close")},l=(c,d)=>{e("operate",c,d)},u=()=>{o.value=r.getRuleChain().id;let c=r.getEditorSetting();i.value=c.url+c.executeApi,a.value=c.url+c.notifyApi};return(c,d)=>{const f=Ei;return N(),me(f,{"append-to-body":!0,"destroy-on-close":!1,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u},{header:V(()=>[We(" \u8FD0\u884C\u89C4\u5219\u94FE ")]),default:V(()=>[B(bat,{lf:t.lf,onClose:s,onOperate:l},null,8,["lf"])]),_:1},8,["modelValue"])}}},Oat={style:{flex:"auto","text-align":"right"}},wat={__name:"FlowForm",props:["show","lf","ruleChain","flowStatus"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r,ruleChain:o,flowStatus:i}=t,a=z(),s=async u=>{u.validate(async c=>{var d;if(!!c){if(i===0){e("submit",o);return}try{await BGe(o.id,o),hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("submit",o)}catch(f){hr.error(((d=f.response)==null?void 0:d.data)||f.toString())}}})},l=()=>{e("close")};return(u,c)=>{const d=ao,f=hs,h=gm,g=Cu,v=Kn,m=fs;return N(),me(m,{model:t.ruleChain,ref_key:"formRef",ref:a,"label-position":"top","label-width":"auto"},{default:V(()=>[B(f,{label:"ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:V(()=>[B(d,{modelValue:t.ruleChain.id,"onUpdate:modelValue":c[0]||(c[0]=b=>t.ruleChain.id=b),disabled:""},null,8,["modelValue"])]),_:1}),B(f,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:V(()=>[B(d,{modelValue:t.ruleChain.name,"onUpdate:modelValue":c[1]||(c[1]=b=>t.ruleChain.name=b),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(f,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:V(()=>[B(h,{class:"ml-2",disabled:"",modelValue:t.ruleChain.root,"onUpdate:modelValue":c[2]||(c[2]=b=>t.ruleChain.root=b),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(g,{class:"mx-2",size:"small"},{default:V(()=>[We(" \u5F00\u542F\uFF1A\u521B\u5EFA\u6839\u89C4\u5219\u94FE\u3002\u5173\u95ED\uFF1A\u521B\u5EFA\u5B50\u89C4\u5219\u94FE ")]),_:1})]),_:1}),B(f,{label:"\u8C03\u8BD5\u6A21\u5F0F",prop:"debugMode"},{default:V(()=>[B(h,{class:"ml-2",modelValue:t.ruleChain.debugMode,"onUpdate:modelValue":c[3]||(c[3]=b=>t.ruleChain.debugMode=b),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(g,{class:"mx-2",size:"small"},{default:V(()=>[We(" \u5F00\u542F\u540E\u4F1A\u8986\u76D6\u8282\u70B9\u7684\u8C03\u8BD5\u6A21\u5F0F\u914D\u7F6E\uFF0C\u6240\u6709\u8282\u70B9\u4F1A\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7 ")]),_:1})]),_:1}),B(f,{label:"\u63CF\u8FF0",prop:"description"},{default:V(()=>[B(d,{modelValue:t.ruleChain.additionalInfo.description,"onUpdate:modelValue":c[4]||(c[4]=b=>t.ruleChain.additionalInfo.description=b),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),ee("div",Oat,[B(v,{type:"primary",onClick:c[5]||(c[5]=b=>s(a.value))},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(v,{onClick:l},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])}}},Sat={style:{flex:"auto","text-align":"right"}},xat={__name:"VarsForm",props:{show:Boolean,data:{type:Object,default:()=>z({key:"",value:""})},isNew:{type:Boolean,default:()=>!1}},emits:["submit","close"],setup(t,{emit:e}){const{show:n,data:r,isNew:o}=t,i=z(),a=r,s=u=>{!u||u.validate(c=>{if(c)e("submit",Mn(a));else return!1})},l=()=>{e("close")};return(u,c)=>{const d=ao,f=hs,h=Kn,g=fs,v=Ei;return N(),me(v,{modelValue:t.show,"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":l},{default:V(()=>[B(g,{model:p(a),ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:V(()=>[B(f,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"key"},{default:V(()=>[B(d,{modelValue:p(a).key,"onUpdate:modelValue":c[0]||(c[0]=m=>p(a).key=m),disabled:!t.isNew,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","disabled"])]),_:1}),B(f,{label:"\u503C",rules:[{required:!0,message:"\u503C\u662F\u5FC5\u987B\u7684"}],prop:"value"},{default:V(()=>[B(d,{modelValue:p(a).value,"onUpdate:modelValue":c[1]||(c[1]=m=>p(a).value=m),type:"textarea",rows:"4",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),ee("div",Sat,[B(h,{type:"default",onClick:l},{default:V(()=>[We("\u53D6\u6D88")]),_:1}),B(h,{type:"primary",onClick:c[2]||(c[2]=m=>s(i.value))},{default:V(()=>[We("\u4FDD\u5B58")]),_:1})])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Cat={__name:"VarsTable",props:["ruleChain","varType","lf","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{ruleChain:r,varType:o,lf:i,flowStatus:a}=t,s=z(!1),l=z({}),u=z(!1),c=z([]),d=()=>{l.value={key:"",value:""},u.value=!0,s.value=!0},f=O=>{l.value=O,u.value=!0,s.value=!1},h=O=>{l.value=O;const S=c.value.findIndex(C=>C.key===O.key);S!==-1&&c.value.splice(S,1);const x=r.id;w(x,o,c.value)},g=()=>{u.value=!1},v=O=>{b(O)},m=O=>{const S=c.value.findIndex(C=>C.key===O.key);S!==-1?c.value[S].value=O.value:c.value.push(O);const x=r.id;w(x,o,c.value)},b=O=>{if(!O||!O.configuration||!O.configuration[o])return c.value=[],[];const S=Object.keys(O.configuration[o]).map(x=>({key:x,value:O.configuration[o][x]}));return c.value=S,S},w=async(O,S,x)=>{var E;const C={};if(x.forEach(T=>{C[T.key]=T.value}),a===0){const T=Mn(r);T.configuration||(T.configuration={}),T.configuration[S]=C,g(),n("submit",T,"config");return}try{await FGe(r.id,S,C),hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),g();const T=Mn(r);T.configuration||(T.configuration={}),T.configuration[S]=C,n("submit",T,"config")}catch(T){hr.error(`\u4FDD\u5B58\u5931\u8D25: ${((E=T.response)==null?void 0:E.data)||T.toString()}`)}};return e({updateData:v}),(O,S)=>{const x=Kn,C=mm,E=vm;return N(),Z(ut,null,[B(x,{style:{float:"right"},onClick:d},{default:V(()=>[We(ze(t.varType==="vars"?"\u65B0\u5EFA\u53D8\u91CF":"\u65B0\u5EFA\u79D8\u94A5"),1)]),_:1}),B(E,{data:b(t.ruleChain),stripe:"",style:{width:"100%"}},{default:V(()=>[B(C,{prop:"key",label:"\u540D\u79F0"}),t.varType==="vars"?(N(),me(C,{key:0,prop:"value",label:"\u503C"})):ge("",!0),B(C,{fixed:"right",label:"\u64CD\u4F5C"},{default:V(({row:T})=>[t.varType==="vars"?(N(),me(x,{key:0,link:"",type:"primary",size:"small",onClick:M=>f(T)},{default:V(()=>[We("\u7F16\u8F91")]),_:2},1032,["onClick"])):ge("",!0),B(x,{link:"",type:"primary",size:"small",onClick:M=>h(T)},{default:V(()=>[We("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u.value?(N(),me(xat,{key:0,isNew:s.value,data:l.value,show:u.value,varType:t.varType,onSubmit:m,onClose:g},null,8,["isNew","data","show","varType"])):ge("",!0)],64)}}},Eat={__name:"FlowInfoDialog",props:["show","lf","ruleChain","fromActiveName","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:o,lf:i,ruleChain:a,fromActiveName:s,flowStatus:l}=Mo(r),u=z("info");z();const c=z(),d=async m=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(m),hr({showClose:!0,message:"\u590D\u5236\u6210\u529F",type:"success"});else{const b=document.createElement("textarea");b.value=m,document.body.appendChild(b),b.focus(),b.select();const w=document.execCommand("copy");hr({showClose:!0,message:w?"\u590D\u5236\u6210\u529F":"\u590D\u5236\u5931\u8D25",type:w?"success":"error"}),document.body.removeChild(b)}}catch(b){console.error("Failed to copy: ",b)}},f=(m,b)=>{n("submit",m,b||"base")},h=()=>{n("close")},g=()=>{};return e({changeActiveName:m=>{u.value=m}}),(m,b)=>{const w=ri,O=oi,S=xc,x=Zs,C=CU,E=xU,T=Sc,M=Ei;return N(),me(M,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"70%",draggable:"",top:"10px","before-close":h,modelValue:p(o)},{header:V(()=>[B(O,null,{default:V(()=>[B(w,{span:12},{default:V(()=>[We(ze(p(a).name),1)]),_:1})]),_:1})]),default:V(()=>[B(T,{modelValue:u.value,"onUpdate:modelValue":b[2]||(b[2]=k=>u.value=k),"tab-position":"left",onTabChange:g},{default:V(()=>[B(S,{label:"\u57FA\u7840\u4FE1\u606F",name:"info"},{default:V(()=>[B(wat,{lf:p(i),flowStatus:p(l),ruleChain:p(a),onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u53D8\u91CF",name:"vars"},{default:V(()=>[B(Cat,{lf:p(i),ref_key:"varsRef",ref:c,flowStatus:p(l),ruleChain:p(a),varType:"vars",onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u5E94\u7528\u96C6\u6210",name:"app"},{default:V(()=>[B(x,{style:{"margin-bottom":"20px"},size:"small",type:"info"},{default:V(()=>[We("\u5E94\u7528\u901A\u8FC7\u8C03\u7528\u4EE5\u4E0B\u63A5\u53E3\u6267\u884C\u89C4\u5219\u94FE")]),_:1}),B(E,{column:"1",border:"",title:""},{default:V(()=>[B(C,{label:"\u540C\u6B65\u63A5\u53E3"},{default:V(()=>[ee("span",{onClick:b[0]||(b[0]=k=>d("/api/v1/rules/"+p(a).id+"/execute/{msgType}"))}," POST /api/v1/rules/"+ze(p(a).id)+"/execute/{msgType}",1),B(x,{size:"small",type:"info"},{default:V(()=>[We("\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1}),B(C,{label:"\u5F02\u6B65\u63A5\u53E3"},{default:V(()=>[ee("span",{onClick:b[1]||(b[1]=k=>d("/api/v1/rules/"+p(a).id+"/notify/{msgType}"))}," POST /api/v1/rules/"+ze(p(a).id)+"/notify/{msgType}",1),B(x,{size:"small",type:"info"},{default:V(()=>[We("\u4E0D\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},Tat=ee("label",null,"\u5728\u4E0B\u65B9\u7C98\u7EC4\u4EF6DSL",-1),kat={style:{flex:"auto","text-align":"right"}},Aat={__name:"ImportComponentDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=[Bp()],r=z(),o=z(),i=z(!1),a=z(null),s=z("400px"),l=pn({data:""});function u(v,m){m.value=m;const b=new FileReader;b.onload=w=>{try{l.data=w.target.result}catch(O){hr.error("Invalid JSON format:"+O)}},b.readAsText(v.raw)}function c(v){return!1}const d=()=>{e("submit",l.data)},f=()=>{e("close")},h=function(){l.data=Pp.js(l.data,{indent_size:2})},g=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():Gn.request(a.value[0]))};return Gn.on("change",()=>{Gn.isFullscreen?(s.value=window.innerHeight+"px",i.value=!0):(s.value="400px",i.value=!1)}),(v,m)=>{const b=Kn,w=YR,O=hs,S=ri,x=oi,C=fs,E=Ei;return N(),me(E,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{footer:V(()=>[ee("div",kat,[B(b,{type:"primary",size:"large",onClick:d},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(b,{size:"large",onClick:f},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[B(C,{model:l,ref_key:"formRef",ref:r,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:V(()=>[B(O,null,{default:V(()=>[B(w,{"file-list":o.value,"onUpdate:fileList":m[0]||(m[0]=T=>o.value=T),class:"upload-demo",action:null,"on-change":u,"before-upload":c,limit:1,accept:".json"},{default:V(()=>[B(b,{type:"default"},{default:V(()=>[We("\u5BFC\u5165\u7EC4\u4EF6DSL\u6587\u4EF6")]),_:1})]),_:1},8,["file-list"])]),_:1}),B(O,{label:"\u5728\u4E0B\u65B9\u7C98\u7EC4\u4EF6DSL",prop:"data"},{label:V(()=>[B(x,null,{default:V(()=>[B(S,{span:20},{default:V(()=>[Tat]),_:1}),B(S,{span:4,style:{"text-align":"right"}},{default:V(()=>[B(b,{type:"info",size:"small",round:"",onClick:h},{default:V(()=>[We("\u6574\u7406")]),_:1}),B(b,{icon:i.value?p(Ub):p(od),size:"small",onClick:g,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:V(()=>[ee("div",{ref_key:"codeEditorRef",ref:a,style:{width:"100%"}},[B(p(Ds),{modelValue:l.data,"onUpdate:modelValue":m[1]||(m[1]=T=>l.data=T),placeholder:"\u8BF7\u7C98\u8D34\u7EC4\u4EF6DSL",style:bt({height:s.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:n},null,8,["modelValue","style"])],512)]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Pat={class:"mt-2",style:{"padding-bottom":"10px"}},Nat={__name:"NodeMgtNodeTree",props:["show","lf"],emits:["updateNodeState","reloadComponents","activeMarket"],setup(t,{expose:e,emit:n}){const{show:r,lf:o}=t;Bp();const i="/plugin/rule",a=z([{id:1,label:"Level one 1",children:[{id:4,label:"Level two 1-1",children:[{id:9,label:"Level three 1-1-1"},{id:10,label:"Level three 1-1-2"}]}]}]),s=z(!1);jt(()=>{let m=o.rulegoEditor.getOptions();a.value=c(m.components)});const l=m=>{let b=a.value,w=[];b.forEach(O=>{O.type===m.type?(O.disabled=!O.disabled,w.push({type:O.type,disabled:O.disabled,category:O.category}),O.children&&O.children.length>0&&O.children.forEach(S=>{S.disabled=O.disabled,w.push({type:S.type,disabled:S.disabled,category:S.category})})):O.children&&O.children.length>0&&O.children.forEach(S=>{S.type===m.type&&(S.disabled=!S.disabled,w.push({type:S.type,disabled:S.disabled,category:S.category}))})}),n("updateNodeState",w),a.value=b},u=m=>m.map(b=>{var w;return{type:b.type,label:b.label,category:b.type,isTop:!0,background:b.background,disabled:(w=b.disabled)!=null?w:!1,children:b.components.map(O=>{var S;return{type:O.type,label:O.label,category:b.type,disabled:(S=O.disabled)!=null?S:!1,componentKind:O.componentKind,children:[]}})}}),c=m=>{let b=[];return Object.keys(m).forEach(w=>{let O=m[w];b.push({label:O.label,components:O.components,type:w})}),u(b)},d=m=>{a.value=c(m)},f=async m=>{ip.confirm(`\u786E\u5B9A\u5378\u8F7D ${m.label} \u7EC4\u4EF6\u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{var b;try{await Yqe(m.type),h(m),n("reloadComponents")}catch(w){hr.error(`\u5220\u9664\u5931\u8D25: ${((b=w.response)==null?void 0:b.data)||w.toString()}`)}})},h=m=>{let b=a.value;const w=O=>{O.forEach((S,x)=>{S.type===m.type?(O.splice(x,1),w(O)):S.children&&S.children.length>0&&(w(S.children),S.children.length===0&&delete S.children)})};w(b),a.value=b},g=async m=>{const{data:b}=await Xqe(m.type);let w=new Blob([JSON.stringify(b,null,2)],{type:"text/plain;charset=utf-8"});RD.exports.saveAs(w,m.type+".json")},v=async m=>{var w;let b=JSON.parse(m);await bq((w=b==null?void 0:b.ruleChain)==null?void 0:w.id,m),n("reloadComponents"),s.value=!1};return e({renderData:d}),(m,b)=>{const w=Kn,O=Ot,S=X0;return N(),Z(ut,null,[ee("div",Pat,[B(w,{size:"small",onClick:b[0]||(b[0]=x=>s.value=!0)},{default:V(()=>[We("\u4ECEDSL\u5B89\u88C5")]),_:1})]),B(S,{style:{"max-width":"600px"},data:a.value,"node-key":"type","default-expand-all":"","expand-on-click-node":!0},{default:V(({node:x,data:C})=>[ee("span",{class:j({"item-is-disabled":C.disabled,"custom-tree-node":!0})},[ee("span",null,[We(ze(C.label)+" ",1),B(O,null,{default:V(()=>[C.isTop?(N(),Z("span",{key:0,class:"tree-node-icon",style:bt({backgroundImage:`url(${C.icon?C.icon:p(i)+"/images/"+C.category+"-dark.svg"})`})},null,4)):ge("",!0)]),_:2},1024)]),ee("span",null,[C.componentKind==="dc"?(N(),me(w,{key:0,size:"small",onClick:E=>g(C)},{default:V(()=>[We("\u4E0B\u8F7D")]),_:2},1032,["onClick"])):ge("",!0),C.componentKind==="dc"?(N(),me(w,{key:1,size:"small",onClick:E=>f(C),type:"danger"},{default:V(()=>[We("\u5378\u88C5")]),_:2},1032,["onClick"])):ge("",!0),B(w,{size:"small",type:C.disabled?"success":"danger",onClick:E=>l(C)},{default:V(()=>[We(ze(C.disabled?"\u542F\u7528":"\u7981\u7528"),1)]),_:2},1032,["type","onClick"])])],2)]),_:1},8,["data"]),B(Aat,{show:s.value,onSubmit:v,onClose:b[1]||(b[1]=x=>s.value=!1)},null,8,["show"])],64)}}};var Mat=zl(Nat,[["__scopeId","data-v-734c7407"]]);const $at={__name:"NodeMgt",props:["show","lf"],emits:["updateLocales","updateNodeState","close","reloadComponents"],setup(t,{emit:e}){const{show:n,lf:r}=t,o=z("installed"),i=z(),a=z(),s=()=>{if(o.value==="installed"){let c=r.rulegoEditor.getOptions();i.value.renderData(c.components)}else o.value==="market"&&a.value.fetchData()},l=()=>{e("reloadComponents"),setTimeout(()=>{let c=r.rulegoEditor.getOptions();i.value.renderData(c.components)},1e3)},u=c=>{e("updateNodeState",c)};return(c,d)=>{const f=xc,h=Sc;return N(),me(h,{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=g=>o.value=g),onTabChange:s},{default:V(()=>[B(f,{label:"\u5DF2\u5B89\u88C5",name:"installed"},{default:V(()=>[B(Mat,{ref_key:"nodeTreeRef",ref:i,lf:t.lf,onUpdateNodeState:u,onReloadComponents:l,onActiveMarket:d[0]||(d[0]=g=>o.value="market")},null,8,["lf"])]),_:1})]),_:1},8,["modelValue"])}}},Rat={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},Dat={__name:"NodeMgtDialog",props:["show","lf"],emits:["updateLocales","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,o=[Bp()],i=z("installed"),a=z(),s=z("{}"),l=z(!1),u=z(null),c=z("450px"),d=()=>{if(i.value==="installed"){let C=r.rulegoEditor.getOptions();a.value&&a.value.renderData&&a.value.renderData(C.components)}},f=()=>{w()},h=()=>{b()},g=()=>{e("close")},v=()=>{r.rulegoEditor.reloadComponents()},m=C=>{let E=JSON.parse(s.value);E.component||(E.component={}),E.component.endpoints||(E.component.endpoints={}),E.component.nodes||(E.component.nodes={}),C&&C.forEach(T=>{T.category==="endpoints"?E.component.endpoints[T.type]?E.component.endpoints[T.type].disabled=T.disabled:E.component.endpoints[T.type]={type:T.type,disabled:T.disabled}:E.component.nodes[T.type]?E.component.nodes[T.type].disabled=T.disabled:E.component.nodes[T.type]={type:T.type,disabled:T.disabled}}),s.value=JSON.stringify(E,null,2),w()},b=async()=>{let C=r.getEditorSetting().url+"/api/v1/locales";fetch(C+"?&lang=zh_cn",{method:"GET",headers:{"Content-Type":"application/json"}}).then(E=>E.text()).then(E=>{s.value=E}).catch(E=>{s.value=E.message})},w=()=>{if(!O(s.value)){hr.error("\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E");return}let E=r.getEditorSetting().url+"/api/v1/locales";fetch(E+"?&lang=zh_cn",{method:"POST",headers:{"Content-Type":"application/json"},body:s.value}).then(T=>{if(T.ok){hr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"});let M=JSON.parse(s.value);r.rulegoEditor.setLocales(M),e("updateLocales")}else hr.error("\u4FDD\u5B58\u5931\u8D25");return T}).catch(T=>{hr.error(T.message)})},O=C=>{try{const E=JSON.parse(C);return!(typeof E!="object"||E===null)}catch{return!1}},S=function(){s.value=Pp.js(s.value,{indent_size:2})},x=()=>{Gn.isEnabled&&(Gn.isFullscreen?(Gn.exit(),l.value=!1):(c.value="100%",Gn.request(u.value[0]),l.value=!0))};return Gn.on("change",()=>{Gn.isFullscreen?c.value="100%":c.value="450px"}),(C,E)=>{const T=ri,M=oi,k=xc,P=Zs,R=Kn,D=Sc,F=Ei;return N(),me(F,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px",width:"80%",class:"custom-dialog","before-close":g,modelValue:t.show,onOpen:h},{header:V(()=>[B(M,null,{default:V(()=>[B(T,{span:12},{default:V(()=>[We("\u7EC4\u4EF6\u7BA1\u7406")]),_:1})]),_:1})]),default:V(()=>[B(D,{modelValue:i.value,"onUpdate:modelValue":E[2]||(E[2]=W=>i.value=W),"tab-position":"left",onTabChange:d},{default:V(()=>[B(k,{label:"\u7EC4\u4EF6\u7BA1\u7406",name:"installed"},{default:V(()=>[B($at,{ref_key:"nodeTreeRef",ref:a,lf:t.lf,onUpdateNodeState:m,onReloadComponents:v},null,8,["lf"])]),_:1}),B(k,{label:"\u56FD\u9645\u5316\u914D\u7F6E",name:"locals"},{default:V(()=>[B(M,{style:{"margin-bottom":"10px"}},{default:V(()=>[B(T,{span:20},{default:V(()=>[B(P,{type:"info"},{default:V(()=>[We("\u652F\u6301\u589E\u91CF\u914D\u7F6E\u7EC4\u4EF6\u8868\u5355\u914D\u7F6E")]),_:1})]),_:1}),B(T,{span:4,style:{float:"right","text-align":"right"}},{default:V(()=>[B(R,{type:"info",size:"small",round:"",onClick:E[0]||(E[0]=W=>S())},{default:V(()=>[We("\u6574\u7406")]),_:1}),B(R,{icon:l.value?p(Ub):p(od),size:"small",onClick:x,circle:""},null,8,["icon"])]),_:1})]),_:1}),B(p(Ds),{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=W=>s.value=W),placeholder:"\u8BF7\u8F93\u5165\u8BED\u8A00\u5305\u914D\u7F6E",ref_key:"codeEditorRef",ref:u,style:bt({height:c.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue","style"]),ee("div",Rat,[B(R,{type:"primary",onClick:f},{default:V(()=>[We("\u4FDD\u5B58")]),_:1}),B(R,{onClick:g},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},Iat=(t,e)=>Go.post("/api/v1/login",{username:t,password:e}),Lat={style:{flex:"auto","text-align":"right"}},Bat={__name:"LoginForm",props:{show:Boolean},emits:["submit","close"],setup(t,{emit:e}){const n=z(),r=z(!1),o=pn({username:"",password:""}),i=async(l,u)=>{try{r.value=!0;const{data:c}=await Iat(l,u);c&&c.token&&(localStorage.setItem("token",c.token),localStorage.setItem("username",o.username)),e("submit",o.username,c)}catch(c){c.response&&c.response.status===401?hr({showClose:!0,message:"\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF",type:"error"}):hr.error(c.message||"\u767B\u5F55\u5931\u8D25")}finally{r.value=!1}},a=l=>{!l||l.validate(async u=>{u&&await i(o.username,o.password)})},s=()=>{o.username="",o.password="",e("close")};return(l,u)=>{const c=ao,d=Cu,f=hs,h=Kn,g=fs,v=Ei;return N(),me(v,{modelValue:t.show,"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":s},{default:V(()=>[B(g,{model:o,ref_key:"formRef",ref:n,"label-position":"top","label-width":"auto"},{default:V(()=>[B(f,{label:"\u7528\u6237\u540D",rules:[{required:!0,message:"\u7528\u6237\u540D\u662F\u5FC5\u987B\u7684"}],prop:"username"},{default:V(()=>[B(c,{modelValue:o.username,"onUpdate:modelValue":u[0]||(u[0]=m=>o.username=m),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"},null,8,["modelValue"]),B(d,{size:"small",type:"info"},{default:V(()=>[We("\u793A\u4F8B\u8D26\u53F7\uFF1Aadmin/admin user01/user01")]),_:1})]),_:1}),B(f,{label:"\u5BC6\u7801",rules:[{required:!0,message:"\u5BC6\u7801\u662F\u5FC5\u987B\u7684"}],prop:"password"},{default:V(()=>[B(c,{modelValue:o.password,"onUpdate:modelValue":u[1]||(u[1]=m=>o.password=m),type:"password",placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801"},null,8,["modelValue"])]),_:1}),ee("div",Lat,[B(h,{type:"default",onClick:s},{default:V(()=>[We("\u53D6\u6D88")]),_:1}),B(h,{type:"primary",loading:r.value,onClick:u[2]||(u[2]=m=>a(n.value))},{default:V(()=>[We("\u767B\u5F55")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Fat={style:{"padding-top":"20px"}},Vat=ee("a",{href:"https://github.com/rulego/rulego/tree/main/examples/server",target:"_blank"},"examples/server",-1),zat={style:{float:"right"}},jat={__name:"SettingDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,o=z("user"),i=z(""),a=z(),s=pn({baseUrl:r.getEditorSetting().url,toolbar:r.getEditorSetting().toolbar}),l=z(!1),u=()=>{l.value=!0},c=()=>{localStorage.removeItem("username"),localStorage.removeItem("token"),localStorage.removeItem("access_token"),i.value=""},d=()=>{l.value=!1},f=(w,O)=>{l.value=!1,i.value=w},h=()=>{b()},g=()=>{let w=Mn(s);e("submit",w),uq(w)},v=()=>{e("close")},m=()=>{s.baseUrl=r.getEditorSetting().url,s.toolbar=r.getEditorSetting().toolbar,b()},b=()=>{i.value=localStorage.getItem("username")||""};return(w,O)=>{const S=ri,x=oi,C=Zs,E=Cu,T=Kn,M=xc,k=ao,P=hs,R=fs,D=Sc,F=Ei;return N(),Z(ut,null,[B(F,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":v,modelValue:t.show,onOpen:m},{header:V(()=>[B(x,null,{default:V(()=>[B(S,{span:12},{default:V(()=>[We("\u8BBE\u7F6E")]),_:1})]),_:1})]),footer:V(()=>[]),default:V(()=>[B(D,{modelValue:o.value,"onUpdate:modelValue":O[1]||(O[1]=W=>o.value=W),"tab-position":"left",onTabChange:h},{default:V(()=>[B(M,{label:"\u8D26\u53F7\u8BBE\u7F6E",name:"user"},{default:V(()=>[i.value!==""?(N(),me(E,{key:0},{default:V(()=>[We("\u5F53\u524D\u7528\u6237: "),B(C,{type:"primary"},{default:V(()=>[We(ze(i.value),1)]),_:1})]),_:1})):ge("",!0),ee("div",Fat,[i.value===""?(N(),me(T,{key:0,type:"primary",onClick:u},{default:V(()=>[We("\u767B\u5F55")]),_:1})):ge("",!0),i.value!==""?(N(),me(T,{key:1,onClick:c},{default:V(()=>[We("\u9000\u51FA\u767B\u5F55")]),_:1})):ge("",!0)])]),_:1}),B(M,{label:"\u7CFB\u7EDF\u8BBE\u7F6E",name:"setting"},{default:V(()=>[B(R,{model:s,ref_key:"formRef",ref:a,"label-position":"top","label-width":"auto"},{default:V(()=>[B(P,{label:"RuleGo\u540E\u53F0URL",prop:"url"},{default:V(()=>[B(k,{modelValue:s.baseUrl,"onUpdate:modelValue":O[0]||(O[0]=W=>s.baseUrl=W),placeholder:"\u793A\u4F8B:http://127.0.0.1:9090"},null,8,["modelValue"]),B(E,{size:"small",type:"info"},{default:V(()=>[We(" \u5982\u679C\u9700\u8981\u5BF9\u63A5\u540E\u53F0API\u3002\u8BF7\u5148\u8FD0\u884C\uFF1A"),Vat]),_:1})]),_:1}),ee("div",zat,[B(T,{type:"primary",onClick:g},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(T,{onClick:v},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),l.value?(N(),me(Bat,{key:0,show:l.value,lf:t.lf,onClose:d,onSubmit:f},null,8,["show","lf"])):ge("",!0)],64)}}},Wat=ee("p",{class:"text item"},"RuleGo-Editor \u4EC5\u4F9B\u5B66\u4E60\u4EA4\u6D41\u4F7F\u7528\uFF0C\u8BF7\u52FF\u7528\u4E8E\u5546\u4E1A\u7528\u9014\u3002",-1),Qat=ee("p",{class:"text item"},[We("\u5546\u7528\u6388\u6743\u8BF7\u8054\u7CFB\u4F5C\u8005\u83B7\u53D6\u6388\u6743\uFF0C\u8BE6\u60C5\uFF1A"),ee("a",{href:"https://app.rulego.cc",target:"_blank"},"https://app.rulego.cco")],-1),Hat=ee("p",{class:"text item"},"Email:rulego@outlook.com",-1),Uat=ee("p",{class:"text item"},"\u5FAE\u4FE1:rulegoteam",-1),Yat={__name:"AboutDialog",props:["show","lf","ruleChain","fromActiveName"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:o,lf:i,ruleChain:a,fromActiveName:s}=Mo(r),l=z("info");z(),Le(s,d=>{});const u=()=>{n("close")};return e({changeActiveName:d=>{l.value=d}}),(d,f)=>{const h=Ei;return N(),me(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"50%",draggable:"",top:"10px","before-close":u,modelValue:p(o)},{header:V(()=>[We(" RuleGo-Editor v0.27.0 ")]),default:V(()=>[Wat,Qat,Hat,Uat]),_:1},8,["modelValue"])}}},Xat={},Zat={t:"1733454332806",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1484",width:"200",height:"200"},Gat=ee("path",{d:"M385.47911111 902.59911111h83.74044444v41.41511111h-83.74044444zM217.99822222 902.59911111h83.74044445v41.41511111h-83.74044445zM113.55022222 881.89155555h-41.41511111v62.12266667H134.25777778v-41.41511111h-20.70755556zM72.13511111 546.816h41.41511111v83.74044445h-41.41511111zM72.13511111 211.85422222h41.41511111v83.74044445h-41.41511111zM72.13511111 714.41066667h41.41511111v83.74044444h-41.41511111zM72.13511111 379.33511111h41.41511111V463.07555555h-41.41511111zM72.13511111 128.11377778h41.41511111v-20.70755556H134.25777778V65.99111111h-62.12266667zM553.07377778 65.99111111h83.74044444v41.41511111h-83.74044444zM720.55466667 65.99111111h83.74044444v41.41511111h-83.74044444zM385.47911111 65.99111111h83.74044444v41.41511111h-83.74044444zM217.99822222 65.99111111h83.74044445v41.41511111h-83.74044445zM888.03555555 65.99111111v41.41511111h20.70755556v20.70755556h41.41511111V65.99111111zM908.74311111 379.33511111h41.41511111V463.07555555h-41.41511111zM908.74311111 211.85422222h41.41511111v83.74044445h-41.41511111zM738.75911111 637.26933333l70.08711111-54.272c5.23377778-4.096 8.07822222-10.46755555 7.50933333-17.06666666-0.56888889-6.59911111-4.43733333-12.51555555-10.24-15.58755556L451.47022222 359.424c-6.82666667-3.64088889-15.13244445-2.95822222-21.27644444 1.70666667-6.144 4.77866667-8.87466667 12.62933333-7.05422223 20.13866666l95.91466667 391.168c1.59288889 6.48533333 6.25777778 11.60533333 12.51555556 13.76711112 6.25777778 2.16177778 13.19822222 1.024 18.432-2.95822223l70.08711111-54.272 151.552 195.69777778c3.86844445 5.00622222 9.67111111 7.62311111 15.47377778 7.62311111 4.20977778 0 8.41955555-1.36533333 11.94666666-4.096l87.60888889-67.81155556c4.096-3.18577778 6.82666667-7.85066667 7.39555556-12.97066666 0.68266667-5.12-0.79644445-10.35377778-3.98222223-14.44977778l-151.32444444-195.69777778z","p-id":"1485",fill:"#2c2c2c"},null,-1),qat=[Gat];function Kat(t,e){return N(),Z("svg",Zat,qat)}var Jat=zl(Xat,[["render",Kat]]);const est={},tst={t:"1733456794249",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3806",width:"200",height:"200"},nst=ee("path",{d:"M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z",fill:"#555555","p-id":"3807"},null,-1),rst=[nst];function ost(t,e){return N(),Z("svg",tst,rst)}var ist=zl(est,[["render",ost]]);const ast={name:"Undo"},sst={t:"1733456780307",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2833",width:"200",height:"200"},lst=ee("path",{d:"M426.053024 331.626933l0-169.619142-331.490833 300.725132 331.490833 300.789601L426.053024 581.63394c92.097558 0 376.594077 0 499.373425 281.257755l0-31.251771C925.426449 706.636932 802.629705 305.014832 426.053024 331.626933z",fill:"#3D3B4F","p-id":"2834"},null,-1),ust=[lst];function cst(t,e,n,r,o,i){return N(),Z("svg",sst,ust)}var dst=zl(ast,[["render",cst]]);const fst={key:0,class:"flow-title"},hst={class:"up-toolbar"},pst={class:"down-toolbar"},gst={__name:"Toolbar",props:["lf"],setup(t){const{lf:e}=t,n=z(null),r=z(null),o=z(!1),i=z(!1),a=z(!1),s=z(null),l=z(),u=z(),c=z(""),d=z(0),f=z(!1);let h=!1,g=z(!1);const v=z(!1),m=z(!1),b=z({}),w=z(""),O=z("info"),S=z({});let x=z({x:0,y:0}),C=z({x:0,y:0,targetNodeId:""});const E=z(!0),T=z(!1),M=z({toolbar:e.getEditorSetting().toolbar});e.on("history:change",$e=>{a.value=!0,m.value=$e.data.undoAble,v.value=$e.data.redoAble}),e.on("rulego-editor:saveOk",()=>{a.value=!1,d.value===0&&(d.value=1)}),e.on("selection:selected,node:click,edge:click,blank:click",()=>{const{nodes:$e,edges:ue}=e.getSelectElements();let G=$e.filter(ve=>ve.type!=="start-node");i.value=G.length>0||ue.length>0}),e.on("node:drag",({data:$e,e:ue})=>{if($e.type!=="start-node"&&n.value&&$e.id===n.value.id){let G=e.getPointByClient(ue.clientX,ue.clientY);x.value.x=G.domOverlayPosition.x+40,x.value.y=G.domOverlayPosition.y-45}else if(r.value){let G=e.getEdgeDataById(r.value.id);if($e.id!==G.sourceNodeId&&$e.id!==G.targetNodeId)return;let ve=e.getPointByClient(ue.clientX,ue.clientY);C.value.x!==0&&C.value.y!==0&&C.value.targetNodeId===$e.id&&(x.value.x=x.value.x-(C.value.x-ve.domOverlayPosition.x),x.value.y=x.value.y-(C.value.y-ve.domOverlayPosition.y)),C.value.x=ve.domOverlayPosition.x,C.value.y=ve.domOverlayPosition.y,C.value.targetNodeId=$e.id}}),e.on("node:click",({data:$e,position:ue})=>{$e.type!=="start-node"?(n.value=$e,r.value=null,x.value.x=ue.domOverlayPosition.x+40,x.value.y=ue.domOverlayPosition.y-45,C.value.x=0,C.value.y=0,C.value.targetNodeId=$e.id,o.value=!0):o.value=!1}),e.on("edge:click",({data:$e,position:ue})=>{n.value=null,r.value=$e,x.value.x=ue.domOverlayPosition.x+10,x.value.y=ue.domOverlayPosition.y,C.value.x=0,C.value.y=0,C.value.targetNodeId="",o.value=!0}),e.on("blank:click",()=>{n.value=null,r.value=null,o.value=!1}),e.on("graph:updated",()=>{Q()}),e.on("graph:rendered",()=>{Q()}),e.on("rulego-editor:deleted",$e=>{n.value=null,r.value=null,o.value=!1,i.value=!1}),e.on("rulego-editor:setting",$e=>{M.value=$e,E.value=$e.showTest});const k=()=>{w.value="test"},P=()=>{let $e=e.getGraphData();u.value=$e.ruleChain.id,l.value=JSON.stringify($e,null," "),w.value="export"},R=()=>{w.value="import"},D=()=>{w.value="nodeMgt"},F=()=>{w.value="",f.value=!1},W=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():Gn.request(document.documentElement),e.graphModel.eventCenter.emit("rulego-editor:fullScreen",T.value))};Gn.on("change",()=>{Gn.isFullscreen?T.value=!0:T.value=!1});const I=$e=>{re({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:new",$e),F(),Q(!0)}})},Q=($e=!1)=>{let ue=e.getRuleChain();ue&&(c.value=ue.name||ue.id,"disabled"in ue?d.value=ue.disabled?2:1:d.value=0,ue.id&&$e&&(window.location.hash=ue.id))},L=()=>{g.value=!g.value,g.value?e.openSelectionSelect():e.closeSelectionSelect()},H=()=>{h=!h,h?e.extension.miniMap.show():e.extension.miniMap.hide()},re=({message:$e="\u5F53\u524D\u753B\u5E03\u5B58\u5728\u672A\u4FDD\u5B58\u6570\u636E\u3002\u786E\u5B9A\u653E\u5F03\u4FDD\u5B58\u5417\uFF1F",title:ue="\u786E\u8BA4",confirmButtonText:G="\u786E\u5B9A",cancelButtonText:ve="\u53D6\u6D88",type:q="warning",onConfirm:Ie,onCancel:Ee})=>{a.value?ip.confirm($e,ue,{confirmButtonText:G,cancelButtonText:ve,type:q}).then(()=>{typeof Ie=="function"&&Ie()}).catch(()=>{typeof Ee=="function"&&Ee()}):typeof Ie=="function"&&Ie()},U=($e,ue)=>{re({onConfirm:()=>{var G;if(ue==="from-import"){const ve=JSON.parse($e),q=e.getRuleChain();ve.ruleChain.name=q.name,ve.ruleChain.id=q.id,ve.ruleChain.additionalInfo.description=((G=q.additionalInfo)==null?void 0:G.description)||"",$e=JSON.stringify(ve),a.value=!0}e.graphModel.eventCenter.emit("rulego-editor:open",$e),F(),Q(!0)}})},J=($e,ue)=>{let G=e.getRuleChain();G.id===$e&&(ue==="start"?(G.disabled=!1,d.value=1,e.graphModel.eventCenter.emit("rulego-editor:update",G)):ue==="stop"?(G.disabled=!0,d.value=2,e.graphModel.eventCenter.emit("rulego-editor:update",G)):ue==="delete"&&(d.value=0,e.graphModel.eventCenter.emit("rulego-editor:new",{}))),a.value=!1},ie=($e,ue)=>{e.graphModel.eventCenter.emit("rulego-editor:update",$e),a.value=!0,ue==="base"&&(F(),Q())},te=$e=>{e.graphModel.eventCenter.emit("rulego-editor:setting",$e),F()},he=()=>{e.graphModel.eventCenter.emit("rulego-editor:save")},K=()=>{re({onConfirm:async()=>{var $e;try{let ue=e.getRuleChain();const{data:G}=await dq(ue.id);a.value=!1,e.graphModel.eventCenter.emit("rulego-editor:reset",G),U(G),setTimeout(()=>{a.value=!1},300)}catch(ue){hr.error(`\u64CD\u4F5C\u5931\u8D25: ${(($e=ue.response)==null?void 0:$e.data)||ue.toString()}`)}}})},ne=()=>{e.graphModel.eventCenter.emit("rulego-editor:deleteSelects"),o.value=!1},fe=()=>{e.graphModel.eventCenter.emit("rulego-editor:showEditPanel")},Ne=()=>{};return($e,ue)=>{const G=Cu,ve=Q$,q=Zo,Ie=Kn,Ee=WU,Oe=QU,se=jU,X=ri,oe=oi;return N(),Z(ut,null,[M.value.toolbar.showTile?(N(),Z("div",fst,[B(q,{class:"box-item",content:d.value===0?"\u7F16\u8F91\u4E2D":d.value===1?"\u8FD0\u884C\u4E2D":"\u505C\u7528\u4E2D",placement:"bottom-start"},{default:V(()=>[B(ve,{"is-dot":"",type:d.value===0?"info":d.value===1?"success":"danger"},{default:V(()=>[B(G,{tag:"b"},{default:V(()=>[We(ze(c.value),1)]),_:1})]),_:1},8,["type"])]),_:1},8,["content"])])):ge("",!0),ee("div",hst,[B(oe,null,{default:V(()=>[B(X,{span:24},{default:V(()=>[M.value.toolbar.showTest?(N(),me(q,{key:0,effect:"dark",content:"\u8FD0\u884C\u89C4\u5219\u94FE",placement:"bottom-start"},{default:V(()=>[M.value.toolbar.showTest?(N(),me(Ie,{key:0,icon:p(aTe),onClick:k,circle:""},null,8,["icon"])):ge("",!0)]),_:1})):ge("",!0),M.value.toolbar.showSelection?(N(),me(q,{key:1,class:"box-item",effect:"dark",content:p(g)?"\u5173\u95ED\u6846\u9009":"\u6253\u5F00\u6846\u9009",placement:"bottom-start"},{default:V(()=>[M.value.toolbar.showSelection?(N(),me(Ie,{key:0,type:p(g)?"success":"",icon:Jat,onClick:L,circle:""},null,8,["type"])):ge("",!0)]),_:1},8,["content"])):ge("",!0),M.value.toolbar.showUndo?(N(),me(q,{key:2,class:"box-item",effect:"dark",content:"\u64A4\u9500",placement:"bottom-start"},{default:V(()=>[M.value.toolbar.showUndo?(N(),me(Ie,{key:0,icon:dst,onClick:ue[0]||(ue[0]=ce=>t.lf.undo()),disabled:!m.value,circle:""},null,8,["disabled"])):ge("",!0)]),_:1})):ge("",!0),M.value.toolbar.showRedo?(N(),me(q,{key:3,class:"box-item",effect:"dark",content:"\u91CD\u505A",placement:"bottom-start"},{default:V(()=>[M.value.toolbar.showRedo?(N(),me(Ie,{key:0,icon:ist,onClick:ue[1]||(ue[1]=ce=>t.lf.redo()),disabled:!v.value,circle:""},null,8,["disabled"])):ge("",!0)]),_:1})):ge("",!0),M.value.toolbar.showMinMap?(N(),me(q,{key:4,class:"box-item",effect:"dark",content:"\u5C0F\u5730\u56FE",placement:"bottom-start"},{default:V(()=>[M.value.toolbar.showMinMap?(N(),me(Ie,{key:0,icon:p(GEe),onClick:H,circle:""},null,8,["icon"])):ge("",!0)]),_:1})):ge("",!0),B(se,{placement:"top-start"},{dropdown:V(()=>[B(Oe,null,{default:V(()=>[M.value.toolbar.showSave?(N(),me(Ee,{key:0,onClick:he,disabled:!a.value,divided:""},{default:V(()=>[We("\u4FDD\u5B58")]),_:1},8,["disabled"])):ge("",!0),M.value.toolbar.showImport?(N(),me(Ee,{key:1,onClick:R,divided:""},{default:V(()=>[We("\u5BFC\u5165")]),_:1})):ge("",!0),M.value.toolbar.showExport?(N(),me(Ee,{key:2,onClick:P},{default:V(()=>[We("\u5BFC\u51FA")]),_:1})):ge("",!0),M.value.toolbar.showNodeMgt?(N(),me(Ee,{key:3,onClick:D,divided:""},{default:V(()=>[We("\u7EC4\u4EF6\u7BA1\u7406")]),_:1})):ge("",!0)]),_:1})]),default:V(()=>[M.value.toolbar.showSetting?(N(),me(Ie,{key:0,icon:p(_Te),circle:""},null,8,["icon"])):ge("",!0)]),_:1}),M.value.toolbar.showFullScreen?(N(),me(q,{key:5,effect:"dark",content:T.value?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F",placement:"bottom-start"},{default:V(()=>[B(Ie,{show:M.value.toolbar.showFullScreen,icon:T.value?p(Ub):p(od),onClick:W,circle:""},null,8,["show","icon"])]),_:1},8,["content"])):ge("",!0)]),_:1})]),_:1})]),ee("div",pst,[B(oe,null,{default:V(()=>[B(X,{span:24},{default:V(()=>[i.value&&M.value.toolbar.showDelete?(N(),me(q,{key:0,class:"box-item",effect:"dark",content:"\u5220\u9664\u9009\u5B9A\u7684\u8282\u70B9\u548C\u8FDE\u63A5",placement:"top-start"},{default:V(()=>[B(Ie,{"settingOptions.toolbar.showDelete":"showDeleteBtn&&settingOptions.toolbar.showDelete",type:"danger",size:"large",icon:p(gC),onClick:ne,circle:""},null,8,["icon"])]),_:1})):ge("",!0),M.value.toolbar.showSave?(N(),me(q,{key:1,class:"box-item",effect:"dark",content:"\u4FDD\u5B58",placement:"top-start"},{default:V(()=>[B(Ie,{"v-if":M.value.toolbar.showSave,type:"primary",size:"large",icon:p(yTe),onClick:he,disabled:!a.value,circle:""},null,8,["v-if","icon","disabled"])]),_:1})):ge("",!0),M.value.toolbar.showReset?(N(),me(q,{key:2,class:"box-item",effect:"dark",content:"\u91CD\u7F6E",placement:"top-start"},{default:V(()=>[M.value.toolbar.showReset?(N(),me(Ie,{key:0,size:"large",icon:p(fa),type:"danger",onClick:K,disabled:!a.value,circle:""},null,8,["icon","disabled"])):ge("",!0)]),_:1})):ge("",!0)]),_:1})]),_:1})]),o.value?(N(),me(vat,{key:1,onDelete:ne,onEdit:fe,currentElementPosition:p(x)},null,8,["currentElementPosition"])):ge("",!0),B(yq,{ref_key:"newFlowDialogRef",ref:b,lf:t.lf,show:f.value,onSubmit:I,onClose:F},null,8,["lf","show"]),B(qqe,{lf:t.lf,show:w.value==="open",onNew:I,onOpen:U,onOperate:J,onClose:F},null,8,["lf","show"]),B(gat,{lf:t.lf,show:w.value==="import",onSubmit:U,onClose:F},null,8,["lf","show"]),B(fat,{lf:t.lf,show:w.value==="export",data:l.value,ruleChainId:u.value,onClose:F},null,8,["lf","show","data","ruleChainId"]),B(jat,{lf:t.lf,show:w.value==="setting",onSubmit:te,onClose:F},null,8,["lf","show"]),B(_at,{lf:t.lf,show:w.value==="test",onOperate:J,onClose:F},null,8,["lf","show"]),B(Eat,{ref_key:"flowInfoDialogRef",ref:s,lf:t.lf,flowStatus:d.value,show:w.value==="edit",fromActiveName:O.value,ruleChain:S.value,onSubmit:ie,onClose:F},null,8,["lf","flowStatus","show","fromActiveName","ruleChain"]),B(Dat,{lf:t.lf,show:w.value==="nodeMgt",onUpdateLocales:Ne,onClose:F},null,8,["lf","show"]),B(Yat,{lf:t.lf,show:w.value==="showAbout",onClose:F},null,8,["lf","show"])],64)}}};var vst=zl(gst,[["__scopeId","data-v-d465bcb2"]]);class Gee{constructor({lf:e}){this.app=qv(vst,{lf:e})}render(e,n){const r=document.createElement("div");n.appendChild(r),this.app.mount(r)}}RT(Gee,"pluginName","ControlExtension");const mst={style:{flex:"auto","text-align":"left"}},yst={__name:"EdgePropertyDrawer",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:o,relationTypeSplit:i,sourceNodeRelationTypeOptions:a}=t,s=z(),l=pn({relationTypeOptions:[],relationTypeValues:[]});let u=r;l.relationTypeOptions=a||o&&o.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=o&&o.relationTypeAllowCreate;const c=h=>{!h||h.validate(g=>{if(g)o.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Fn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Mn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,g)=>{const v=ri,m=oi,b=ld,w=Ml,O=hs,S=fs,x=Kn,C=sR;return N(),me(C,{modal:!0,"append-to-body":!1,"destroy-on-close":!0,style:{position:"absolute"},direction:"rtl",class:"properties-panel",width:"100%",size:500,"before-close":f,modelValue:t.show},{header:V(()=>[B(m,{class:"setter-title"},{default:V(()=>[B(v,{span:12},{default:V(()=>[We("\u89C4\u5219\u8282\u70B9\u94FE\u63A5\u8BE6\u60C5")]),_:1})]),_:1})]),footer:V(()=>[ee("div",mst,[B(x,{type:"primary",size:"large",onClick:g[1]||(g[1]=E=>c(s.value))},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(x,{size:"large",onClick:d},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[B(S,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:V(()=>[B(O,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:V(()=>[B(w,{modelValue:l.relationTypeValues,"onUpdate:modelValue":g[0]||(g[0]=E=>l.relationTypeValues=E),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:V(()=>[(N(!0),Z(ut,null,Xt(l.relationTypeOptions,E=>(N(),me(b,{key:E.value!==void 0&&E.value!==null?E.value:E,label:E.label||E,value:E.value!==void 0&&E.value!==null?E.value:E},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},bst={style:{flex:"auto"}},_st={__name:"EdgePropertyDialog",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:o,relationTypeSplit:i,sourceNodeRelationTypeOptions:a}=t,s=z(),l=pn({relationTypeAllowCreate:!1,relationTypeOptions:[],relationTypeValues:[]});let u=r;if(l.relationTypeOptions=a||o&&o.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=o&&o.relationTypeAllowCreate,!l.relationTypeValues){let h=l.relationTypeOptions&&l.relationTypeOptions.length>0?l.relationTypeOptions[0]:null;h?o.nodeType==="endpoint-node"?l.relationTypeValues=h.value!==void 0&&h.value!==null?h.value:h:l.relationTypeValues=[h.value!==void 0&&h.value!==null?h.value:h]:l.relationTypeValues=[]}const c=h=>{!h||h.validate(g=>{if(g)o.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Fn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Mn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,g)=>{const v=ld,m=Ml,b=hs,w=fs,O=Kn,S=Ei;return N(),me(S,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"50%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{header:V(()=>[We(" \u6DFB\u52A0\u94FE\u63A5 ")]),footer:V(()=>[ee("div",bst,[B(O,{type:"primary",size:"large",onClick:g[1]||(g[1]=x=>c(s.value))},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:d},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[B(w,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:V(()=>[B(b,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:V(()=>[B(m,{modelValue:l.relationTypeValues,"onUpdate:modelValue":g[0]||(g[0]=x=>l.relationTypeValues=x),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:V(()=>[(N(!0),Z(ut,null,Xt(l.relationTypeOptions,x=>(N(),me(v,{key:x.value!==void 0&&x.value!==null?x.value:x,label:x.label||x,value:x.value!==void 0&&x.value!==null?x.value:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Ost=304,w7=1,wst=2,Sst=305,xst=307,Cst=308,Est=3,Tst=4,kst=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],qee=125,Ast=59,S7=47,Pst=42,Nst=43,Mst=45,$st=new oit({start:!1,shift(t,e){return e==Est||e==Tst||e==xst?t:e==Cst},strict:!1}),Rst=new _E((t,e)=>{let{next:n}=t;(n==qee||n==-1||e.context)&&t.acceptToken(Sst)},{contextual:!0,fallback:!0}),Dst=new _E((t,e)=>{let{next:n}=t,r;kst.indexOf(n)>-1||n==S7&&((r=t.peek(1))==S7||r==Pst)||n!=qee&&n!=Ast&&n!=-1&&!e.context&&t.acceptToken(Ost)},{contextual:!0}),Ist=new _E((t,e)=>{let{next:n}=t;if((n==Nst||n==Mst)&&(t.advance(),n==t.next)){t.advance();let r=!e.context&&e.canShift(w7);t.acceptToken(r?w7:wst)}},{contextual:!0}),Lst=lE({"get set async static":Xe.modifier,"for while do if else switch try catch finally return throw break continue default case":Xe.controlKeyword,"in of await yield void typeof delete instanceof":Xe.operatorKeyword,"let var const using function class extends":Xe.definitionKeyword,"import export from":Xe.moduleKeyword,"with debugger as new":Xe.keyword,TemplateString:Xe.special(Xe.string),super:Xe.atom,BooleanLiteral:Xe.bool,this:Xe.self,null:Xe.null,Star:Xe.modifier,VariableName:Xe.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Xe.function(Xe.variableName),VariableDefinition:Xe.definition(Xe.variableName),Label:Xe.labelName,PropertyName:Xe.propertyName,PrivatePropertyName:Xe.special(Xe.propertyName),"CallExpression/MemberExpression/PropertyName":Xe.function(Xe.propertyName),"FunctionDeclaration/VariableDefinition":Xe.function(Xe.definition(Xe.variableName)),"ClassDeclaration/VariableDefinition":Xe.definition(Xe.className),PropertyDefinition:Xe.definition(Xe.propertyName),PrivatePropertyDefinition:Xe.definition(Xe.special(Xe.propertyName)),UpdateOp:Xe.updateOperator,"LineComment Hashbang":Xe.lineComment,BlockComment:Xe.blockComment,Number:Xe.number,String:Xe.string,Escape:Xe.escape,ArithOp:Xe.arithmeticOperator,LogicOp:Xe.logicOperator,BitOp:Xe.bitwiseOperator,CompareOp:Xe.compareOperator,RegExp:Xe.regexp,Equals:Xe.definitionOperator,Arrow:Xe.function(Xe.punctuation),": Spread":Xe.punctuation,"( )":Xe.paren,"[ ]":Xe.squareBracket,"{ }":Xe.brace,"InterpolationStart InterpolationEnd":Xe.special(Xe.brace),".":Xe.derefOperator,", ;":Xe.separator,"@":Xe.meta,TypeName:Xe.typeName,TypeDefinition:Xe.definition(Xe.typeName),"type enum interface implements namespace module declare":Xe.definitionKeyword,"abstract global Privacy readonly override":Xe.modifier,"is keyof unique infer":Xe.operatorKeyword,JSXAttributeValue:Xe.attributeValue,JSXText:Xe.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Xe.angleBracket,"JSXIdentifier JSXNameSpacedName":Xe.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Xe.attributeName,"JSXBuiltin/JSXIdentifier":Xe.standard(Xe.tagName)}),Bst={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},Fst={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},Vst={__proto__:null,"<":139},zst=Yv.deserialize({version:14,states:"$6zO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JeO6[Q(CjO'#JfO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9OQSO'#FvOOQ(CY'#Jf'#JfOOQ(CW'#Je'#JeO9TQSO'#GpOOQQ'#KQ'#KQO9`QSO'#IQO9eQ(C[O'#IROOQQ'#JR'#JROOQQ'#IV'#IVQ`QUOOO`QUOOO%[QUO'#DoO9mQUO'#D{O9tQUO'#D}O9ZQSO'#GlO9{Q,UO'#CmO:ZQSO'#EhO:fQSO'#EsO:kQ,UO'#F`O;YQSO'#GlOOQO'#KR'#KRO;_QSO'#KRO;mQSO'#GtO;mQSO'#GuO;mQSO'#GwO9ZQSO'#GzO]QSO'#HZO>eQSO'#HaO>eQSO'#HcO`QUO'#HeO>eQSO'#HgO>eQSO'#HjO>jQSO'#HpO>oQ(C]O'#HvO%[QUO'#HxO>zQ(C]O'#HzO?VQ(C]O'#H|O9eQ(C[O'#IOO?bQ(CjO'#CgO@dQWO'#DgQOQSOOO%[QUO'#D}O@zQSO'#EQO9{Q,UO'#EhOAVQSO'#EhOAbQ`O'#F`OOQQ'#Ce'#CeOOQ(CW'#Dl'#DlOOQ(CW'#Ji'#JiO%[QUO'#JiOOQO'#Jm'#JmOOQO'#Ia'#IaOBbQWO'#EaOOQ(CW'#E`'#E`OC^Q(C`O'#EaOChQWO'#ETOOQO'#Jl'#JlOC|QWO'#JmOEZQWO'#ETOChQWO'#EaPEhO?MpO'#C`POOO)CDp)CDpOOOO'#IW'#IWOEsOpO,59SOOQ(CY,59S,59SOOOO'#IX'#IXOFRO!bO,59SO%[QUO'#D^OOOO'#IZ'#IZOFaO07`O,59vOOQ(CY,59v,59vOFoQUO'#I[OGSQSO'#JgOIUQbO'#JgO+}QUO'#JgOI]QSO,59|OIsQSO'#EjOJQQSO'#JuOJ]QSO'#JtOJ]QSO'#JtOJeQSO,5;WOJjQSO'#JsOOQ(CY,5:X,5:XOJqQUO,5:XOLrQ(CjO,5:cOMcQSO,5:kOM|Q(C[O'#JrONTQSO'#JqO9TQSO'#JqONiQSO'#JqONqQSO,5;VONvQSO'#JqO!#OQbO'#JfOOQ(CY'#Cg'#CgO%[QUO'#EPO!#nQ`O,5:pOOQO'#Jn'#JnOOQO-ElOOQQ'#JZ'#JZOOQQ,5>m,5>mOOQQ-ExQ(CjO,5:iOOQO,5@m,5@mO!?iQ,UO,5=WO!?wQ(C[O'#J[O9OQSO'#J[O!@YQ(C[O,59XO!@eQWO,59XO!@mQ,UO,59XO9{Q,UO,59XO!@xQSO,5;TO!AQQSO'#HYO!AcQSO'#KVO%[QUO,5;xO!7cQWO,5;zO!AkQSO,5=sO!ApQSO,5=sO!AuQSO,5=sO9eQ(C[O,5=sO;mQSO,5=cOOQO'#Cs'#CsO!BTQWO,5=`O!B]Q,UO,5=aO!BhQSO,5=cO!BmQ`O,5=fO!BuQSO'#KRO>jQSO'#HPO9ZQSO'#HRO!BzQSO'#HRO9{Q,UO'#HTO!CPQSO'#HTOOQQ,5=i,5=iO!CUQSO'#HUO!C^QSO'#CmO!CcQSO,58}O!CmQSO,58}O!ErQUO,58}OOQQ,58},58}O!FSQ(C[O,58}O%[QUO,58}O!H_QUO'#H]OOQQ'#H^'#H^OOQQ'#H_'#H_O`QUO,5=uO!HuQSO,5=uO`QUO,5={O`QUO,5=}O!HzQSO,5>PO`QUO,5>RO!IPQSO,5>UO!IUQUO,5>[OOQQ,5>b,5>bO%[QUO,5>bO9eQ(C[O,5>dOOQQ,5>f,5>fO!M`QSO,5>fOOQQ,5>h,5>hO!M`QSO,5>hOOQQ,5>j,5>jO!MeQWO'#DYO%[QUO'#JiO!NSQWO'#JiO!NqQWO'#DhO# SQWO'#DhO##eQUO'#DhO##lQSO'#JhO##tQSO,5:RO##yQSO'#EnO#$XQSO'#JvO#$aQSO,5;XO#$fQWO'#DhO#$sQWO'#ESOOQ(CY,5:l,5:lO%[QUO,5:lO#$zQSO,5:lO>jQSO,5;SO!@eQWO,5;SO!@mQ,UO,5;SO9{Q,UO,5;SO#%SQSO,5@TO#%XQ!LQO,5:pOOQO-E<_-E<_O#&_Q(C`O,5:{OChQWO,5:oO#&iQWO,5:oOChQWO,5:{O!@YQ(C[O,5:oOOQ(CW'#Ed'#EdOOQO,5:{,5:{O%[QUO,5:{O#&vQ(C[O,5:{O#'RQ(C[O,5:{O!@eQWO,5:oOOQO,5;R,5;RO#'aQ(C[O,5:{POOO'#IU'#IUP#'uO?MpO,58zPOOO,58z,58zOOOO-EvO+}QUO,5>vOOQO,5>|,5>|O#(aQUO'#I[OOQO-ERQ(CjO1G0yO#?yQ(CjO1G0yO#ByQ$IUO'#CgO#DwQ$IUO1G1[O#EOQ$IUO'#JfO!,YQSO1G1bO#E`Q(CjO,5?SOOQ(CW-EeQSO1G3kO$.VQUO1G3mO$2ZQUO'#HlOOQQ1G3p1G3pO$2hQSO'#HrO>jQSO'#HtOOQQ1G3v1G3vO$2pQUO1G3vO9eQ(C[O1G3|OOQQ1G4O1G4OOOQ(CW'#GX'#GXO9eQ(C[O1G4QO9eQ(C[O1G4SO$6wQSO,5@TO!*SQUO,5;YO9TQSO,5;YO>jQSO,5:SO!*SQUO,5:SO!@eQWO,5:SO$6|Q$IUO,5:SOOQO,5;Y,5;YO$7WQWO'#I]O$7nQSO,5@SOOQ(CY1G/m1G/mO$7vQWO'#IcO$8QQSO,5@bOOQ(CW1G0s1G0sO# SQWO,5:SOOQO'#I`'#I`O$8YQWO,5:nOOQ(CY,5:n,5:nO#$}QSO1G0WOOQ(CY1G0W1G0WO%[QUO1G0WOOQ(CY1G0n1G0nO>jQSO1G0nO!@eQWO1G0nO!@mQ,UO1G0nOOQ(CW1G5o1G5oO!@YQ(C[O1G0ZOOQO1G0g1G0gO%[QUO1G0gO$8aQ(C[O1G0gO$8lQ(C[O1G0gO!@eQWO1G0ZOChQWO1G0ZO$8zQ(C[O1G0gOOQO1G0Z1G0ZO$9`Q(CjO1G0gPOOO-EvO$9|QSO1G5mO$:UQSO1G5zO$:^QbO1G5{O9TQSO,5>|O$:hQ(CjO1G5xO%[QUO1G5xO$:xQ(C[O1G5xO$;ZQSO1G5wO$;ZQSO1G5wO9TQSO1G5wO$;cQSO,5?PO9TQSO,5?POOQO,5?P,5?PO$;wQSO,5?PO$$XQSO,5?POOQO-ExQ(CjO,5WOOQQ,5>W,5>WO%[QUO'#HmO%(ZQSO'#HoOOQQ,5>^,5>^O9TQSO,5>^OOQQ,5>`,5>`OOQQ7+)b7+)bOOQQ7+)h7+)hOOQQ7+)l7+)lOOQQ7+)n7+)nO%(`QWO1G5oO%(tQ$IUO1G0tO%)OQSO1G0tOOQO1G/n1G/nO%)ZQ$IUO1G/nO>jQSO1G/nO!*SQUO'#DhOOQO,5>w,5>wOOQO-E},5>}OOQO-EjQSO7+&YO!@eQWO7+&YOOQO7+%u7+%uO$9`Q(CjO7+&ROOQO7+&R7+&RO%[QUO7+&RO%)eQ(C[O7+&RO!@YQ(C[O7+%uO!@eQWO7+%uO%)pQ(C[O7+&RO%*OQ(CjO7++dO%[QUO7++dO%*`QSO7++cO%*`QSO7++cOOQO1G4k1G4kO9TQSO1G4kO%*hQSO1G4kOOQO7+%z7+%zO#$}QSO<xOOQO-E<[-E<[O%2^QbO,5>yO%[QUO,5>yOOQO-E<]-E<]O%2hQSO1G5qOOQ(CY<XQ$IUO1G0yO%>`Q$IUO1G0yO%@WQ$IUO1G0yO%@kQ(CjO<XOOQQ,5>Z,5>ZO%NUQSO1G3xO9TQSO7+&`O!*SQUO7+&`OOQO7+%Y7+%YO%NZQ$IUO1G5{O>jQSO7+%YOOQ(CY<jQSO<jQSO7+)dO&5rQSO<{AN>{O%[QUOAN?XOOQO<SQSO7++uO%LgQSOANAyOOQQANAyANAyO!&^Q,UOANAyO&>[QSOANAyOOQQANA{ANA{O9eQ(C[OANA{O#MzQSOANA{OOQO'#HW'#HWOOQO7+*e7+*eOOQQG22uG22uOOQQANEPANEPOOQQANEQANEQOOQQANBTANBTO&>dQSOANBTOOQQ<iQSOLD,jO&>qQ$IUO7+'tO&@gQ$IUO7+'vO&B]Q,UOG26|OOQO<YOPZXYZXlZXzZX{ZX}ZX!fZX!gZX!iZX!mZX#YZX#edX#hZX#iZX#jZX#kZX#lZX#mZX#nZX#oZX#pZX#rZX#tZX#vZX#wZX#|ZX(TZX(dZX(kZX(lZX!WZX!XZX~O#zZX~P#@sOP$]OY:YOl9|Oz#yO{#zO}#{O!f:OO!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O#l9}O#m:OO#n:OO#o:XO#p:OO#r:PO#t:RO#v:TO#w:UO(TVO(d$ZO(k#|O(l#}O~O#z.iO~P#CQO#Y:ZO#|:ZO#z(YX!X(YX~P! UO_'[a!W'[a'm'[a'k'[a!h'[a!T'[ap'[a!Y'[a%b'[a!b'[a~P!7zOP#giY#gi_#gil#gi{#gi!W#gi!f#gi!g#gi!i#gi!m#gi#h#gi#i#gi#j#gi#k#gi#l#gi#m#gi#n#gi#o#gi#p#gi#r#gi#t#gi#v#gi#w#gi'm#gi(T#gi(d#gi'k#gi!T#gi!h#gip#gi!Y#gi%b#gi!b#gi~P#,gO_#{i!W#{i'm#{i'k#{i!T#{i!h#{ip#{i!Y#{i%b#{i!b#{i~P!7zO$X.nO$Z.nO~O$X.oO$Z.oO~O!b)_O#Y.pO!Y$_X$U$_X$X$_X$Z$_X$b$_X~O!V.qO~O!Y)bO$U.sO$X)aO$Z)aO$b.tO~O!W:VO!X(XX~P#CQO!X.uO~O!b)_O$b(mX~O$b.wO~Or)qO(U)rO(V.zO~O!T/OO~P!&^O!WdX!bdX!hdX!h$tX(ddX~P!/bO!h/UO~P#,gO!W/VO!b#uO(d'gO!h(qX~O!h/[O~O!V*SO'v%`O!h(qP~O#e/^O~O!T$tX!W$tX!b${X~P!/bO!W/_O!T(rX~P#,gO!b/aO~O!T/cO~Ol/gO!b#uO!i%^O(P%RO(d'gO~O'v/iO~O!b+YO~O_%gO!W/mO'm%gO~O!X/oO~P!3`O!^/pO!_/pO'w!lO(W!mO~O}/rO(W!mO~O#U/sO~O'v&QOe'aX!W'aX~O!W*lOe(Qa~Oe/xO~Oz/yO{/yO}/zOhwa(kwa(lwa!Wwa#Ywa~Oewa#zwa~P$ hOz)vO})wOh$ma(k$ma(l$ma!W$ma#Y$ma~Oe$ma#z$ma~P$!^Oz)vO})wOh$oa(k$oa(l$oa!W$oa#Y$oa~Oe$oa#z$oa~P$#PO#e/|O~Oe$}a!W$}a#Y$}a#z$}a~P!0kO!b#uO~O#e0PO~O!W*}O_(va'm(va~Oz#yO{#zO}#{O!g#wO!i#xO(TVOP!oiY!oil!oi!W!oi!f!oi!m!oi#h!oi#i!oi#j!oi#k!oi#l!oi#m!oi#n!oi#o!oi#p!oi#r!oi#t!oi#v!oi#w!oi(d!oi(k!oi(l!oi~O_!oi'm!oi'k!oi!T!oi!h!oip!oi!Y!oi%b!oi!b!oi~P$$nOh.UO!Y'VO%b.TO~Oj0ZO'v0YO~P!1]O!b+YO_(Oa!Y(Oa'm(Oa!W(Oa~O#e0aO~OYZX!WdX!XdX~O!W0bO!X(zX~O!X0dO~OY0eO~O'v+bO'xTO'{UO~O!Y%wO'v%`O^'iX!W'iX~O!W+gO^(ya~O!h0jO~P!7zOY0mO~O^0nO~O#Y0qO~Oh0tO!Y$|O~O(W(tO!X(wP~Oh0}O!Y0zO%b0|O(P%RO~OY1XO!W1VO!X(xX~O!X1YO~O^1[O_%gO'm%gO~O'v#mO'xTO'{UO~O#Y$eO#|$eOP(YXY(YXl(YXz(YX{(YX}(YX!W(YX!f(YX!i(YX!m(YX#h(YX#i(YX#j(YX#k(YX#l(YX#m(YX#n(YX#o(YX#r(YX#t(YX#v(YX#w(YX(T(YX(d(YX(k(YX(l(YX~O#p1_O&S1`O_(YX!g(YX~P$+dO#Y$eO#p1_O&S1`O~O_1bO~P%[O_1dO~O&]1gOP&ZiQ&ZiW&Zi_&Zib&Zic&Zij&Zil&Zim&Zin&Zit&Ziv&Zix&Zi}&Zi!R&Zi!S&Zi!Y&Zi!d&Zi!i&Zi!l&Zi!m&Zi!n&Zi!p&Zi!r&Zi!u&Zi!y&Zi#q&Zi$R&Zi$V&Zi%a&Zi%c&Zi%e&Zi%f&Zi%g&Zi%j&Zi%l&Zi%o&Zi%p&Zi%r&Zi&O&Zi&U&Zi&W&Zi&Y&Zi&[&Zi&_&Zi&e&Zi&k&Zi&m&Zi&o&Zi&q&Zi&s&Zi'k&Zi'v&Zi'x&Zi'{&Zi(T&Zi(c&Zi(p&Zi!X&Zi`&Zi&b&Zi~O`1mO!X1kO&b1lO~P`O!YXO!i1oO~O&i,jOP&diQ&diW&di_&dib&dic&dij&dil&dim&din&dit&div&dix&di}&di!R&di!S&di!Y&di!d&di!i&di!l&di!m&di!n&di!p&di!r&di!u&di!y&di#q&di$R&di$V&di%a&di%c&di%e&di%f&di%g&di%j&di%l&di%o&di%p&di%r&di&O&di&U&di&W&di&Y&di&[&di&_&di&e&di&k&di&m&di&o&di&q&di&s&di'k&di'v&di'x&di'{&di(T&di(c&di(p&di!X&di&]&di`&di&b&di~O!T1uO~O!W![a!X![a~P#CQOm!nO}!oO!V1{O(W!mO!W'PX!X'PX~P@OO!W,zO!X([a~O!W'VX!X'VX~P!7SO!W,}O!X(ja~O!X2SO~P'_O_%gO#Y2]O'm%gO~O_%gO!b#uO#Y2]O'm%gO~O_%gO!b#uO!m2aO#Y2]O'm%gO(d'gO~O_%gO'm%gO~P!7zO!W$aOp$la~O!T'Oi!W'Oi~P!7zO!W'{O!T(Zi~O!W(SO!T(hi~O!T(ii!W(ii~P!7zO!W(fi!h(fi_(fi'm(fi~P!7zO#Y2cO!W(fi!h(fi_(fi'm(fi~O!W(`O!h(ei~O}%aO!Y%bO!y]O#c2hO#d2gO'v%`O~O}%aO!Y%bO#d2gO'v%`O~Oh2oO!Y'VO%b2nO~Oh2oO!Y'VO%b2nO(P%RO~O#ewaPwaYwa_walwa!fwa!gwa!iwa!mwa#hwa#iwa#jwa#kwa#lwa#mwa#nwa#owa#pwa#rwa#twa#vwa#wwa'mwa(Twa(dwa!hwa!Twa'kwapwa!Ywa%bwa!bwa~P$ hO#e$maP$maY$ma_$mal$ma{$ma!f$ma!g$ma!i$ma!m$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#o$ma#p$ma#r$ma#t$ma#v$ma#w$ma'm$ma(T$ma(d$ma!h$ma!T$ma'k$map$ma!Y$ma%b$ma!b$ma~P$!^O#e$oaP$oaY$oa_$oal$oa{$oa!f$oa!g$oa!i$oa!m$oa#h$oa#i$oa#j$oa#k$oa#l$oa#m$oa#n$oa#o$oa#p$oa#r$oa#t$oa#v$oa#w$oa'm$oa(T$oa(d$oa!h$oa!T$oa'k$oap$oa!Y$oa%b$oa!b$oa~P$#PO#e$}aP$}aY$}a_$}al$}a{$}a!W$}a!f$}a!g$}a!i$}a!m$}a#h$}a#i$}a#j$}a#k$}a#l$}a#m$}a#n$}a#o$}a#p$}a#r$}a#t$}a#v$}a#w$}a'm$}a(T$}a(d$}a!h$}a!T$}a'k$}a#Y$}ap$}a!Y$}a%b$}a!b$}a~P#,gO_#]q!W#]q'm#]q'k#]q!T#]q!h#]qp#]q!Y#]q%b#]q!b#]q~P!7zOe'QX!W'QX~P!'vO!W._Oe(^a~O!V2wO!W'RX!h'RX~P%[O!W.bO!h(_a~O!W.bO!h(_a~P!7zO!T2zO~O#z!ka!X!ka~PJxO#z!ca!W!ca!X!ca~P#CQO#z!oa!X!oa~P!:eO#z!qa!X!qa~P!=OO!Y3^O$VfO$`3_O~O!X3cO~Op3dO~P#,gO_$iq!W$iq'm$iq'k$iq!T$iq!h$iqp$iq!Y$iq%b$iq!b$iq~P!7zO!T3eO~P#,gOz)vO})wO(l){Oh%Yi(k%Yi!W%Yi#Y%Yi~Oe%Yi#z%Yi~P$I|Oz)vO})wOh%[i(k%[i(l%[i!W%[i#Y%[i~Oe%[i#z%[i~P$JoO(d$ZO~P#,gO!V3hO'v%`O!W']X!h']X~O!W/VO!h(qa~O!W/VO!b#uO!h(qa~O!W/VO!b#uO(d'gO!h(qa~Oe$vi!W$vi#Y$vi#z$vi~P!0kO!V3pO'v*XO!T'_X!W'_X~P!1YO!W/_O!T(ra~O!W/_O!T(ra~P#,gO!b#uO#p3xO~Ol3{O!b#uO(d'gO~Oe(Ri!W(Ri~P!0kO#Y4OOe(Ri!W(Ri~P!0kO!h4RO~O_$jq!W$jq'm$jq'k$jq!T$jq!h$jqp$jq!Y$jq%b$jq!b$jq~P!7zO!T4VO~O!W4WO!Y(sX~P#,gO!g#wO~P4XO_$tX!Y$tX%VZX'm$tX!W$tX~P!/bO%V4YO_iXhiXziX}iX!YiX'miX(kiX(liX!WiX~O%V4YO~O%c4aO'v+bO'xTO'{UO!W'hX!X'hX~O!W0bO!X(za~OY4eO~O^4fO~O_%gO'm%gO~P#,gO!Y$|O~P#,gO!W4nO#Y4pO!X(wX~O!X4qO~Om!nO}4rO!]!xO!^!uO!_!uO!y9rO!}!pO#O!pO#P!pO#Q!pO#R!pO#U4wO#V!yO'w!lO'xTO'{UO(W!mO(c!sO~O!X4vO~P%$nOh4|O!Y0zO%b4{O~Oh4|O!Y0zO%b4{O(P%RO~O'v#mO!W'gX!X'gX~O!W1VO!X(xa~O'xTO'{UO(W5VO~O^5ZO~O#p5^O&S5_O~PMhO!h5`O~P%[O_5bO~O_5bO~P%[O`1mO!X5gO&b1lO~P`O!b5iO~O!b5kO!W(]i!X(]i!b(]i!i(]i(P(]i~O!W#bi!X#bi~P#CQO#Y5lO!W#bi!X#bi~O!W![i!X![i~P#CQO_%gO#Y5uO'm%gO~O_%gO!b#uO#Y5uO'm%gO~O!W(fq!h(fq_(fq'm(fq~P!7zO!W(`O!h(eq~O}%aO!Y%bO#d5|O'v%`O~O!Y'VO%b6PO~Oh6SO!Y'VO%b6PO~O#e%YiP%YiY%Yi_%Yil%Yi{%Yi!f%Yi!g%Yi!i%Yi!m%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#o%Yi#p%Yi#r%Yi#t%Yi#v%Yi#w%Yi'm%Yi(T%Yi(d%Yi!h%Yi!T%Yi'k%Yip%Yi!Y%Yi%b%Yi!b%Yi~P$I|O#e%[iP%[iY%[i_%[il%[i{%[i!f%[i!g%[i!i%[i!m%[i#h%[i#i%[i#j%[i#k%[i#l%[i#m%[i#n%[i#o%[i#p%[i#r%[i#t%[i#v%[i#w%[i'm%[i(T%[i(d%[i!h%[i!T%[i'k%[ip%[i!Y%[i%b%[i!b%[i~P$JoO#e$viP$viY$vi_$vil$vi{$vi!W$vi!f$vi!g$vi!i$vi!m$vi#h$vi#i$vi#j$vi#k$vi#l$vi#m$vi#n$vi#o$vi#p$vi#r$vi#t$vi#v$vi#w$vi'm$vi(T$vi(d$vi!h$vi!T$vi'k$vi#Y$vip$vi!Y$vi%b$vi!b$vi~P#,gOe'Qa!W'Qa~P!0kO!W'Ra!h'Ra~P!7zO!W.bO!h(_i~O#z#]i!W#]i!X#]i~P#CQOP$]Oz#yO{#zO}#{O!g#wO!i#xO!m$]O(TVOY#gil#gi!f#gi#i#gi#j#gi#k#gi#l#gi#m#gi#n#gi#o#gi#p#gi#r#gi#t#gi#v#gi#w#gi#z#gi(d#gi(k#gi(l#gi!W#gi!X#gi~O#h#gi~P%2}O#h9zO~P%2}OP$]Oz#yO{#zO}#{O!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O(TVOY#gi!f#gi#l#gi#m#gi#n#gi#o#gi#p#gi#r#gi#t#gi#v#gi#w#gi#z#gi(d#gi(k#gi(l#gi!W#gi!X#gi~Ol#gi~P%5YOl9|O~P%5YOP$]Ol9|Oz#yO{#zO}#{O!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O#l9}O(TVO#r#gi#t#gi#v#gi#w#gi#z#gi(d#gi(k#gi(l#gi!W#gi!X#gi~OY#gi!f#gi#m#gi#n#gi#o#gi#p#gi~P%7eOY:YO!f:OO#m:OO#n:OO#o:XO#p:OO~P%7eOP$]OY:YOl9|Oz#yO{#zO}#{O!f:OO!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O#l9}O#m:OO#n:OO#o:XO#p:OO#r:PO(TVO#t#gi#v#gi#w#gi#z#gi(d#gi(l#gi!W#gi!X#gi~O(k#gi~P%:PO(k#|O~P%:POP$]OY:YOl9|Oz#yO{#zO}#{O!f:OO!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O#l9}O#m:OO#n:OO#o:XO#p:OO#r:PO#t:RO(TVO(k#|O#v#gi#w#gi#z#gi(d#gi!W#gi!X#gi~O(l#gi~P%<[O(l#}O~P%<[OP$]OY:YOl9|Oz#yO{#zO}#{O!f:OO!g#wO!i#xO!m$]O#h9zO#i9{O#j9{O#k9{O#l9}O#m:OO#n:OO#o:XO#p:OO#r:PO#t:RO#v:TO(TVO(k#|O(l#}O~O#w#gi#z#gi(d#gi!W#gi!X#gi~P%>gO_#xy!W#xy'm#xy'k#xy!T#xy!h#xyp#xy!Y#xy%b#xy!b#xy~P!7zOh;mOz)vO})wO(k)yO(l){O~OP#giY#gil#gi{#gi!f#gi!g#gi!i#gi!m#gi#h#gi#i#gi#j#gi#k#gi#l#gi#m#gi#n#gi#o#gi#p#gi#r#gi#t#gi#v#gi#w#gi#z#gi(T#gi(d#gi!W#gi!X#gi~P%A_O!g#wOP(SXY(SXh(SXl(SXz(SX{(SX}(SX!f(SX!i(SX!m(SX#h(SX#i(SX#j(SX#k(SX#l(SX#m(SX#n(SX#o(SX#p(SX#r(SX#t(SX#v(SX#w(SX#z(SX(T(SX(d(SX(k(SX(l(SX!W(SX!X(SX~O#z#{i!W#{i!X#{i~P#CQO#z!oi!X!oi~P$$nO!X6`O~O!W'[a!X'[a~P#CQO!b#uO(d'gO!W']a!h']a~O!W/VO!h(qi~O!W/VO!b#uO!h(qi~Oe$vq!W$vq#Y$vq#z$vq~P!0kO!T'_a!W'_a~P#,gO!b6gO~O!W/_O!T(ri~P#,gO!W/_O!T(ri~O!T6kO~O!b#uO#p6pO~Ol6qO!b#uO(d'gO~O!T6sO~Oe$xq!W$xq#Y$xq#z$xq~P!0kO_$jy!W$jy'm$jy'k$jy!T$jy!h$jyp$jy!Y$jy%b$jy!b$jy~P!7zO!b5kO~O!W4WO!Y(sa~O_#]y!W#]y'm#]y'k#]y!T#]y!h#]yp#]y!Y#]y%b#]y!b#]y~P!7zOY6xO~O!W0bO!X(zi~O^7OO~O(W(tO!W'dX!X'dX~O!W4nO!X(wa~OjkO'v7VO~P.iO!X7YO~P%$nOm!nO}7ZO'xTO'{UO(W!mO(c!sO~O!Y0zO~O!Y0zO%b7]O~Oh7`O!Y0zO%b7]O~OY7eO!W'ga!X'ga~O!W1VO!X(xi~O!h7iO~O!h7jO~O!h7mO~O!h7mO~P%[O_7oO~O!b7pO~O!h7qO~O!W(ii!X(ii~P#CQO_%gO#Y7yO'm%gO~O!W(fy!h(fy_(fy'm(fy~P!7zO!W(`O!h(ey~O!Y'VO%b7|O~O#e$vqP$vqY$vq_$vql$vq{$vq!W$vq!f$vq!g$vq!i$vq!m$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#o$vq#p$vq#r$vq#t$vq#v$vq#w$vq'm$vq(T$vq(d$vq!h$vq!T$vq'k$vq#Y$vqp$vq!Y$vq%b$vq!b$vq~P#,gO#e$xqP$xqY$xq_$xql$xq{$xq!W$xq!f$xq!g$xq!i$xq!m$xq#h$xq#i$xq#j$xq#k$xq#l$xq#m$xq#n$xq#o$xq#p$xq#r$xq#t$xq#v$xq#w$xq'm$xq(T$xq(d$xq!h$xq!T$xq'k$xq#Y$xqp$xq!Y$xq%b$xq!b$xq~P#,gO!W'Ri!h'Ri~P!7zO#z#]q!W#]q!X#]q~P#CQOz/yO{/yO}/zOPwaYwahwalwa!fwa!gwa!iwa!mwa#hwa#iwa#jwa#kwa#lwa#mwa#nwa#owa#pwa#rwa#twa#vwa#wwa#zwa(Twa(dwa(kwa(lwa!Wwa!Xwa~Oz)vO})wOP$maY$mah$mal$ma{$ma!f$ma!g$ma!i$ma!m$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#o$ma#p$ma#r$ma#t$ma#v$ma#w$ma#z$ma(T$ma(d$ma(k$ma(l$ma!W$ma!X$ma~Oz)vO})wOP$oaY$oah$oal$oa{$oa!f$oa!g$oa!i$oa!m$oa#h$oa#i$oa#j$oa#k$oa#l$oa#m$oa#n$oa#o$oa#p$oa#r$oa#t$oa#v$oa#w$oa#z$oa(T$oa(d$oa(k$oa(l$oa!W$oa!X$oa~OP$}aY$}al$}a{$}a!f$}a!g$}a!i$}a!m$}a#h$}a#i$}a#j$}a#k$}a#l$}a#m$}a#n$}a#o$}a#p$}a#r$}a#t$}a#v$}a#w$}a#z$}a(T$}a(d$}a!W$}a!X$}a~P%A_O#z$iq!W$iq!X$iq~P#CQO#z$jq!W$jq!X$jq~P#CQO!X8WO~O#z8XO~P!0kO!b#uO!W']i!h']i~O!b#uO(d'gO!W']i!h']i~O!W/VO!h(qq~O!T'_i!W'_i~P#,gO!W/_O!T(rq~O!T8_O~P#,gO!T8_O~Oe(Ry!W(Ry~P!0kO!W'ba!Y'ba~P#,gO_%Uq!Y%Uq'm%Uq!W%Uq~P#,gOY8dO~O!W0bO!X(zq~O#Y8hO!W'da!X'da~O!W4nO!X(wi~P#CQOPZXYZXlZXzZX{ZX}ZX!TZX!WZX!fZX!gZX!iZX!mZX#YZX#edX#hZX#iZX#jZX#kZX#lZX#mZX#nZX#oZX#pZX#rZX#tZX#vZX#wZX#|ZX(TZX(dZX(kZX(lZX~O!b%SX#p%SX~P&2_O!Y0zO%b8lO~O'xTO'{UO(W8qO~O!W1VO!X(xq~O!h8tO~O!h8uO~O!h8vO~O!h8vO~P%[O#Y8yO!W#by!X#by~O!W#by!X#by~P#CQO!Y'VO%b9OO~O#z#xy!W#xy!X#xy~P#CQOP$viY$vil$vi{$vi!f$vi!g$vi!i$vi!m$vi#h$vi#i$vi#j$vi#k$vi#l$vi#m$vi#n$vi#o$vi#p$vi#r$vi#t$vi#v$vi#w$vi#z$vi(T$vi(d$vi!W$vi!X$vi~P%A_Oz)vO})wO(l){OP%YiY%Yih%Yil%Yi{%Yi!f%Yi!g%Yi!i%Yi!m%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#o%Yi#p%Yi#r%Yi#t%Yi#v%Yi#w%Yi#z%Yi(T%Yi(d%Yi(k%Yi!W%Yi!X%Yi~Oz)vO})wOP%[iY%[ih%[il%[i{%[i!f%[i!g%[i!i%[i!m%[i#h%[i#i%[i#j%[i#k%[i#l%[i#m%[i#n%[i#o%[i#p%[i#r%[i#t%[i#v%[i#w%[i#z%[i(T%[i(d%[i(k%[i(l%[i!W%[i!X%[i~O#z$jy!W$jy!X$jy~P#CQO#z#]y!W#]y!X#]y~P#CQO!b#uO!W']q!h']q~O!W/VO!h(qy~O!T'_q!W'_q~P#,gO!T9VO~P#,gO!W0bO!X(zy~O!W4nO!X(wq~O!Y0zO%b9^O~O!h9aO~O!Y'VO%b9fO~OP$vqY$vql$vq{$vq!f$vq!g$vq!i$vq!m$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#o$vq#p$vq#r$vq#t$vq#v$vq#w$vq#z$vq(T$vq(d$vq!W$vq!X$vq~P%A_OP$xqY$xql$xq{$xq!f$xq!g$xq!i$xq!m$xq#h$xq#i$xq#j$xq#k$xq#l$xq#m$xq#n$xq#o$xq#p$xq#r$xq#t$xq#v$xq#w$xq#z$xq(T$xq(d$xq!W$xq!X$xq~P%A_Oe%^!Z!W%^!Z#Y%^!Z#z%^!Z~P!0kO!W'dq!X'dq~P#CQO!W#b!Z!X#b!Z~P#CQO#e%^!ZP%^!ZY%^!Z_%^!Zl%^!Z{%^!Z!W%^!Z!f%^!Z!g%^!Z!i%^!Z!m%^!Z#h%^!Z#i%^!Z#j%^!Z#k%^!Z#l%^!Z#m%^!Z#n%^!Z#o%^!Z#p%^!Z#r%^!Z#t%^!Z#v%^!Z#w%^!Z'm%^!Z(T%^!Z(d%^!Z!h%^!Z!T%^!Z'k%^!Z#Y%^!Zp%^!Z!Y%^!Z%b%^!Z!b%^!Z~P#,gOP%^!ZY%^!Zl%^!Z{%^!Z!f%^!Z!g%^!Z!i%^!Z!m%^!Z#h%^!Z#i%^!Z#j%^!Z#k%^!Z#l%^!Z#m%^!Z#n%^!Z#o%^!Z#p%^!Z#r%^!Z#t%^!Z#v%^!Z#w%^!Z#z%^!Z(T%^!Z(d%^!Z!W%^!Z!X%^!Z~P%A_Op(XX~P1qO'w!lO~P!*SO!TdX!WdX#YdX~P&2_OPZXYZXlZXzZX{ZX}ZX!WZX!WdX!fZX!gZX!iZX!mZX#YZX#YdX#edX#hZX#iZX#jZX#kZX#lZX#mZX#nZX#oZX#pZX#rZX#tZX#vZX#wZX#|ZX(TZX(dZX(kZX(lZX~O!bdX!hZX!hdX(ddX~P&GuOP9qOQ9qOb;bOc!iOjkOl9qOmkOnkOtkOv9qOx9qO}WO!RkO!SkO!YXO!d9tO!iZO!l9qO!m9qO!n9qO!p9uO!r9xO!u!hO$R!kO$VfO'v)UO'xTO'{UO(TVO(c[O(p;`O~O!W:VO!X$la~Oj%SOl$tOm$sOn$sOt%TOv%UOx:]O}${O!Y$|O!d;gO!i$xO#d:cO$R%YO$n:_O$p:aO$s%ZO'v(lO'xTO'{UO(P%RO(T$uO~O#q)]O~P&LkO!XZX!XdX~P&GuO#e9yO~O!b#uO#e9yO~O#Y:ZO~O#p:OO~O#Y:eO!W(iX!X(iX~O#Y:ZO!W(gX!X(gX~O#e:fO~Oe:hO~P!0kO#e:mO~O#e:nO~O!b#uO#e:oO~O!b#uO#e:fO~O#z:pO~P#CQO#e:qO~O#e:rO~O#e:sO~O#e:tO~O#e:uO~O#e:vO~O#z:wO~P!0kO#z:xO~P!0kO$V~!g!}#O#Q#R#U#c#d#o(p$n$p$s%V%a%b%c%j%l%o%p%r%t~'qR$V(p#i!S'o'w#jm#h#klz'p(W'p'v$X$Z$X~",goto:"$'R)OPPPP)PPP)SP)eP*t.xPPPP5YPP5pP;l>sP?WP?WPPP?WP@xP?WP?WP?WP@|PPARPAlPFdPPPFhPPPPFhIiPPPIoJjPFhPLxPPPP! WFhPPPFhPFhP!#fFhP!&z!'|!(VP!(y!(}!(yPPPPP!,Y!'|PP!,v!-pP!0dFhFh!0i!3s!8Y!8Y!wP#@W#@_#@gPPPP#Du#Gl#NT#NW#NZ$ S$ V$ Y$ a$ iPP$ o$ s$!k$#j$#n$$SPP$$W$$^$$bP$$e$$i$$l$%b$%y$&b$&f$&i$&l$&r$&u$&y$&}R!{RoqOXst!Z#c%f&i&k&l&n,b,g1g1jY!uQ'V-S0z4uQ%lvQ%tyQ%{|Q&a!VS&}!e,zQ']!iS'c!r!xS*_$|*dQ+`%uQ+m%}Q,R&ZQ-Q'UQ-['^Q-d'dQ/p*fQ1U,SR:d9u%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|,_,b,g-W-`-n-t.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2w4r4|5^5_5b5u7Z7`7o7yS#p]9r!r)W$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cQ*o%VQ+e%wQ,T&^Q,[&fQ.X:[Q0W+WQ0[+YQ0g+fQ1^,YQ2k.UQ4`0bQ5T1VQ6R2oQ6X:]Q6z4aR8P6S&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;ct!nQ!r!u!x!y&}'U'V'c'd'e,z-Q-S-d0z4u4w$^$si#u#w$c$d$x${%W%X%])q)w)z)|)}*U*[*j*k+V+Y+q+t.T._/P/^/_/a/|0q0t0|2n3f3p3x4O4W4Y4{6P6g6p7]7|8X8l9O9^9f:X:Y:^:_:`:a:b:c:i:j:k:l:m:n:q:r:s:t:w:x;`;h;i;l;mQ&O|Q&{!eS'R%b,}Q+e%wQ/{*sQ0g+fQ0l+lQ1],XQ1^,YQ4`0bQ4i0nQ5W1XQ5X1[Q6z4aQ6}4fQ7h5ZQ8g7OR8r7ernOXst!V!Z#c%f&`&i&k&l&n,b,g1g1jR,V&b&v^OPXYstuvwz!Z!`!g!j!o#R#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'X'i'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;b;c[#[WZ#V#Y'O'y!S%cm#g#h#k%^%a(S(^(_(`*z*{*},^,t-r-x-y-z-|1o2g2h5k5|Q%oxQ%syS%x|%}Q&U!TQ'Y!hQ'[!iQ(g#rS*R$x*VS+_%t%uQ+c%wQ+|&XQ,Q&ZS-Z']'^Q.W(hQ/Z*SQ0`+`Q0f+fQ0h+gQ0k+kQ1P+}S1T,R,SQ2X-[Q3g/VQ4_0bQ4c0eQ4h0mQ5S1UQ6d3hQ6y4aQ6|4eQ8c6xR9X8dv$zi#w%W%X%])z)|*U*j*k._/^/|3f4O8X;`;h;i!S%qy!i!t%s%t%u&|'[']'^'b'l*^+_+`,w-Z-[-c/h0`2Q2X2`3zQ+X%oQ+r&RQ+u&SQ,P&ZQ.V(gQ1O+|U1S,Q,R,SQ2p.WQ4}1PS5R1T1UQ7d5S#O;d#u$c$d$x${)q)w)}*[+V+Y+q+t.T/P/_/a0q0t0|2n3p3x4W4Y4{6P6g6p7]7|8l9O9^9f:^:`:b:i:k:m:q:s:w;l;mg;e:X:Y:_:a:c:j:l:n:r:t:xW%Pi%R*l;`S&R!Q&`Q&S!RQ&T!SR+p&P$_%Oi#u#w$c$d$x${%W%X%])q)w)z)|)}*U*[*j*k+V+Y+q+t.T._/P/^/_/a/|0q0t0|2n3f3p3x4O4W4Y4{6P6g6p7]7|8X8l9O9^9f:X:Y:^:_:`:a:b:c:i:j:k:l:m:n:q:r:s:t:w:x;`;h;i;l;mT)r$u)sV*p%V:[:]U'R!e%b,}S(u#y#zQ+j%zS.P(c(dQ0u+vQ4P/yR7S4n&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;c$i$`c#X#d%j%k%m'x(O(j(q(y(z({(|(})O)P)Q)R)S)T)V)Y)^)h+T+i,x-g-l-q-s.^.d.h.j.k.l.{/}1v1y2Z2b2v2{2|2}3O3P3Q3R3S3T3U3V3W3X3[3]3b4T4]5n5t5y6V6W6]6^7U7s7w8Q8U8V8{9Z9b9s;VT#SV#T&}kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cQ'P!eR1|,zv!nQ!e!r!u!x!y&}'U'V'c'd'e,z-Q-S-d0z4u4wS*^$|*dS/h*_*fQ/q*gQ0w+xQ3z/pR3}/snqOXst!Z#c%f&i&k&l&n,b,g1g1jQ&p!^Q'm!wS(i#t9yQ+]%rQ+z&UQ+{&WQ-X'ZQ-f'fS.](n:fS0O*x:oQ0^+^Q0y+yQ1n,iQ1p,jQ1x,uQ2V-YQ2Y-^S4U0P:uQ4Z0_S4^0a:vQ5m1zQ5q2WQ5v2_Q6w4[Q7t5oQ7u5rQ7x5wR8x7q$d$_c#X#d%k%m'x(O(j(q(y(z({(|(})O)P)Q)R)S)T)V)Y)^)h+T+i,x-g-l-q-s.^.d.h.k.l.{/}1v1y2Z2b2v2{2|2}3O3P3Q3R3S3T3U3V3W3X3[3]3b4T4]5n5t5y6V6W6]6^7U7s7w8Q8U8V8{9Z9b9s;VS(f#o'`U*i$}(m3ZS+S%j.jQ2l0WQ6O2kQ8O6RR9P8P$d$^c#X#d%k%m'x(O(j(q(y(z({(|(})O)P)Q)R)S)T)V)Y)^)h+T+i,x-g-l-q-s.^.d.h.k.l.{/}1v1y2Z2b2v2{2|2}3O3P3Q3R3S3T3U3V3W3X3[3]3b4T4]5n5t5y6V6W6]6^7U7s7w8Q8U8V8{9Z9b9s;VS(e#o'`S(w#z$_S+R%j.jS.Q(d(fQ.m)XQ0T+SR2i.R&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cS#p]9rQ&k!XQ&l!YQ&n![Q&o!]R1f,eQ'W!hQ+U%oQ-V'YS.S(g+XQ2T-UW2m.V.W0V0XQ5p2UU5}2j2l2pS7{6O6QS8}7}8OS9d8|9PQ9l9eR9o9mU!vQ'V-ST4s0z4u!Q_OXZ`st!V!Z#c#g%^%f&`&b&i&k&l&n(`,b,g-y1g1j]!pQ!r'V-S0z4uT#p]9r%Y{OPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&f&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|+W,_,b,g-W-`-n-t.U.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2o2w4r4|5^5_5b5u6S7Z7`7o7yS(u#y#zS.P(c(d!s:|$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cY!tQ'V-S0z4uQ'b!rS'l!u!xS'n!y4wS-c'c'dQ-e'eR2`-dQ'k!tS([#f1aS-b'b'nQ/Y*RQ/f*^Q2a-eQ3l/ZS3u/g/qQ6c3gS6n3{3}Q8Z6dR8b6qQ#vbQ'j!tS(Z#f1aS(]#l*wQ*y%_Q+Z%pQ+a%vU-a'b'k'nQ-u([Q/X*RQ/e*^Q/k*aQ0]+[Q1Q,OS2^-b-eQ2f-}S3k/Y/ZS3t/f/qQ3w/jQ3y/lQ5P1RQ5x2aQ6b3gQ6f3lS6j3u3}Q6o3|Q7b5QS8Y6c6dQ8^6kQ8`6nQ8o7cQ9T8ZQ9U8_Q9W8bQ9`8pQ9h9VQ;P:zQ;[;TR;];UV!vQ'V-S%YaOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&f&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|+W,_,b,g-W-`-n-t.U.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2o2w4r4|5^5_5b5u6S7Z7`7o7yS#vz!j!r:y$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cR;P;b%YbOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&f&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|+W,_,b,g-W-`-n-t.U.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2o2w4r4|5^5_5b5u6S7Z7`7o7yQ%_j!S%py!i!t%s%t%u&|'[']'^'b'l*^+_+`,w-Z-[-c/h0`2Q2X2`3zS%vz!jQ+[%qQ,O&ZW1R,P,Q,R,SU5Q1S1T1US7c5R5SQ8p7d!r:z$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cQ;T;aR;U;b$|eOPXYstuvw!Z!`!g!o#R#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&i&k&l&n&r&z'X'i'{(R(Y(n(r(v)u*x*|+W,_,b,g-W-`-n-t.U.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2o2w4r4|5^5_5b5u6S7Z7`7o7yY#aWZ#V#Y'y!S%cm#g#h#k%^%a(S(^(_(`*z*{*},^,t-r-x-y-z-|1o2g2h5k5|Q,]&f!p:{$[$m)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cR;O'OS'S!e%bR2O,}%OdOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|,_,b,g-W-`-n-t.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2w4r4|5^5_5b5u7Z7`7o7y!r)W$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cQ,[&fQ0W+WQ2k.UQ6R2oR8P6S!f$Uc#X%j'x(O(j(q)Q)R)S)T)Y)^+i-g-l-q-s.^.d.{/}2Z2b2v3X4T4]5t5y6V7w8{9s!T:Q)V)h,x.j1v1y2{3T3U3V3W3[3b5n6W6]6^7U7s8Q8U8V9Z9b;V!b$Wc#X%j'x(O(j(q)S)T)Y)^+i-g-l-q-s.^.d.{/}2Z2b2v3X4T4]5t5y6V7w8{9s!P:S)V)h,x.j1v1y2{3V3W3[3b5n6W6]6^7U7s8Q8U8V9Z9b;V!^$[c#X%j'x(O(j(q)Y)^+i-g-l-q-s.^.d.{/}2Z2b2v3X4T4]5t5y6V7w8{9sQ3f/Tz;c)V)h,x.j1v1y2{3[3b5n6W6]6^7U7s8Q8U8V9Z9b;VQ;h;jR;i;k&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cS$nh$oR3_.p'TgOPWXYZhstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m$o%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.p.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cT$jf$pQ$hfS)a$k)eR)m$pT$if$pT)c$k)e'ThOPWXYZhstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m$o%f%l%y&b&e&f&i&k&l&n&r&z'O'X'i'y'{(R(Y(n(r(v)j)u*x*|+W,_,b,g,s,v-W-`-n-t.U.b.i.p.q/z0P0a0}1_1`1b1d1g1j1l1{2]2c2o2w3^4p4r4|5^5_5b5l5u6S7Z7`7o7y8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;cT$nh$oQ$qhR)l$o%YjOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$a$e%f%l%y&b&e&f&i&k&l&n&r&z'X'i'y'{(R(Y(n(r(v)u*x*|+W,_,b,g-W-`-n-t.U.b.i/z0P0a0}1_1`1b1d1g1j1l2]2c2o2w4r4|5^5_5b5u6S7Z7`7o7y!s;a$[$m'O)j,s,v.q1{3^4p5l8h8y9q9t9u9x9y9z9{9|9}:O:P:Q:R:S:T:U:V:Z:d:e:f:h:o:p:u:v;c#clOPXZst!Z!`!o#R#c#n#{$m%f&b&e&f&i&k&l&n&r&z'X(v)j*|+W,_,b,g-W.U.q/z0}1_1`1b1d1g1j1l2o3^4r4|5^5_5b6S7Z7`7ov$}i#w%W%X%])z)|*U*j*k._/^/|3f4O8X;`;h;i#O(m#u$c$d$x${)q)w)}*[+V+Y+q+t.T/P/_/a0q0t0|2n3p3x4W4Y4{6P6g6p7]7|8l9O9^9f:^:`:b:i:k:m:q:s:w;l;mQ*t%ZQ.|)vg3Z:X:Y:_:a:c:j:l:n:r:t:xv$yi#w%W%X%])z)|*U*j*k._/^/|3f4O8X;`;h;iQ*W$zS*a$|*dQ*u%[Q/l*b#O;R#u$c$d$x${)q)w)}*[+V+Y+q+t.T/P/_/a0q0t0|2n3p3x4W4Y4{6P6g6p7]7|8l9O9^9f:^:`:b:i:k:m:q:s:w;l;mf;S:X:Y:_:a:c:j:l:n:r:t:xQ;W;dQ;X;eQ;Y;fR;Z;gv$}i#w%W%X%])z)|*U*j*k._/^/|3f4O8X;`;h;i#O(m#u$c$d$x${)q)w)}*[+V+Y+q+t.T/P/_/a0q0t0|2n3p3x4W4Y4{6P6g6p7]7|8l9O9^9f:^:`:b:i:k:m:q:s:w;l;mg3Z:X:Y:_:a:c:j:l:n:r:t:xnoOXst!Z#c%f&i&k&l&n,b,g1g1jQ*Z${Q,p&uQ,q&wR3o/_$^%Oi#u#w$c$d$x${%W%X%])q)w)z)|)}*U*[*j*k+V+Y+q+t.T._/P/^/_/a/|0q0t0|2n3f3p3x4O4W4Y4{6P6g6p7]7|8X8l9O9^9f:X:Y:^:_:`:a:b:c:i:j:k:l:m:n:q:r:s:t:w:x;`;h;i;l;mQ+s&SQ0s+uQ4l0rR7R4mT*c$|*dS*c$|*dT4t0z4uS/j*`4rT3|/r7ZQ+Z%pQ/k*aQ0]+[Q1Q,OQ5P1RQ7b5QQ8o7cR9`8pn)z$v(o*v/]/t/u2t3m4S6a6r9S;Q;^;_!Y:i(k)[*Q*Y.[.x.}/T/b0U0p0r2s3n3r4k4m6T6U6h6l6t6v8]8a9g;j;k]:j3Y6[8R9Q9R9pp)|$v(o*v/R/]/t/u2t3m4S6a6r9S;Q;^;_![:k(k)[*Q*Y.[.x.}/T/b0U0p0r2q2s3n3r4k4m6T6U6h6l6t6v8]8a9g;j;k_:l3Y6[8R8S9Q9R9prnOXst!V!Z#c%f&`&i&k&l&n,b,g1g1jQ&]!UR,_&frnOXst!V!Z#c%f&`&i&k&l&n,b,g1g1jR&]!UQ+w&TR0o+psnOXst!V!Z#c%f&`&i&k&l&n,b,g1g1jQ0{+|S4z1O1PU7[4x4y4}S8k7^7_S9[8j8mQ9i9]R9n9jQ&d!VR,W&`R5W1XS%x|%}R0h+gQ&i!WR,b&jR,h&oT1h,g1jR,l&pQ,k&pR1q,lQ'p!zR-h'pSsOtQ#cXT%is#cQ!}TR'r!}Q#QUR't#QQ)s$uR.y)sQ#TVR'v#TQ#WWU'|#W'}-oQ'}#XR-o(OQ,{'PR1},{Q.`(oR2u.`Q.c(qS2x.c2yR2y.dQ-S'VR2R-SY!rQ'V-S0z4uR'a!rS#^W%aU(T#^(U-pQ(U#_R-p(PQ-O'SR2P-Ot`OXst!V!Z#c%f&`&b&i&k&l&n,b,g1g1jS#gZ%^U#q`#g-yR-y(`Q(a#iQ-v(]W.O(a-v2d5zQ2d-wR5z2eQ)e$kR.r)eQ$ohR)k$oQ$bcU)Z$b-k:WQ-k9sR:W)hQ/W*RW3i/W3j6e8[U3j/X/Y/ZS6e3k3lR8[6f#o)x$v(k(o)[*Q*Y*q*r*v.Y.Z.[.x.}/R/S/T/]/b/t/u0U0p0r2q2r2s2t3Y3m3n3r4S4k4m6T6U6Y6Z6[6a6h6l6r6t6v8R8S8T8]8a9Q9R9S9g9p;Q;^;_;j;kQ/`*YU3q/`3s6iQ3s/bR6i3rQ*d$|R/n*dQ*m%QR/w*mQ4X0UR6u4XQ+O%dR0S+OQ4o0uS7T4o8iR8i7UQ+y&UR0x+yQ4u0zR7X4uQ1W,TS5U1W7fR7f5WQ0c+cW4b0c4d6{8eQ4d0fQ6{4cR8e6|Q+h%xR0i+hQ1j,gR5f1jYrOXst#cQ&m!ZQ+Q%fQ,a&iQ,c&kQ,d&lQ,f&nQ1e,bS1h,g1jR5e1gQ%hpQ&q!_Q&t!aQ&v!bQ&x!cQ'h!tQ+P%eQ+]%rQ+o&OQ,V&dQ,n&sW-_'b'j'k'nQ-f'fQ/m*cQ0^+^S1Z,W,ZQ1r,mQ1s,pQ1t,qQ2Y-^W2[-a-b-e-gQ4Z0_Q4g0lQ4j0pQ5O1QQ5Y1]Q5d1fU5s2Z2^2aQ5v2_Q6w4[Q7P4iQ7Q4kQ7W4tQ7a5PQ7g5XS7v5t5xQ7x5wQ8f6}Q8n7bQ8s7hQ8z7wQ9Y8gQ9_8oQ9c8{R9k9`Q%ryQ'Z!iQ'f!tU+^%s%t%uQ,u&|U-Y'[']'^S-^'b'lQ/d*^S0_+_+`Q1z,wS2W-Z-[Q2_-cQ3v/hQ4[0`Q5o2QQ5r2XQ5w2`R6m3zS$wi;`R*n%RU%Qi%R;`R/v*lQ$viS(k#u+YQ(o#wS)[$c$dQ*Q$xQ*Y${Q*q%WQ*r%XQ*v%]Q.Y:^Q.Z:`Q.[:bQ.x)qS.})w/PQ/R)zQ/S)|Q/T)}Q/]*UQ/b*[Q/t*jQ/u*kh0U+V.T0|2n4{6P7]7|8l9O9^9fQ0p+qQ0r+tQ2q:iQ2r:kQ2s:mQ2t._S3Y:X:YQ3m/^Q3n/_Q3r/aQ4S/|Q4k0qQ4m0tQ6T:qQ6U:sQ6Y:_Q6Z:aQ6[:cQ6a3fQ6h3pQ6l3xQ6r4OQ6t4WQ6v4YQ8R:nQ8S:jQ8T:lQ8]6gQ8a6pQ9Q:rQ9R:tQ9S8XQ9g:wQ9p:xQ;Q;`Q;^;hQ;_;iQ;j;lR;k;mnpOXst!Z#c%f&i&k&l&n,b,g1g1jQ!fPS#eZ#nQ&s!`U'_!o4r7ZQ'u#RQ(x#{Q)i$mS,Z&b&eQ,`&fQ,m&rQ,r&zQ-U'XQ.f(vQ.v)jQ0Q*|Q0X+WQ1c,_Q2U-WQ2l.UQ3a.qQ4Q/zQ4y0}Q5[1_Q5]1`Q5a1bQ5c1dQ5h1lQ6O2oQ6_3^Q7_4|Q7k5^Q7l5_Q7n5bQ8O6SQ8m7`R8w7o#WcOPXZst!Z!`!o#c#n#{%f&b&e&f&i&k&l&n&r&z'X(v*|+W,_,b,g-W.U/z0}1_1`1b1d1g1j1l2o4r4|5^5_5b6S7Z7`7oQ#XWQ#dYQ%juQ%kvS%mw!gS'x#V'{Q(O#YQ(j#tQ(q#xQ(y$OQ(z$PQ({$QQ(|$RQ(}$SQ)O$TQ)P$UQ)Q$VQ)R$WQ)S$XQ)T$YQ)V$[Q)Y$aQ)^$eW)h$m)j.q3^Q+T%lQ+i%yS,x'O1{Q-g'iS-l'y-nQ-q(RQ-s(YQ.^(nQ.d(rQ.h9qQ.j9tQ.k9uQ.l9xQ.{)uQ/}*xQ1v,sQ1y,vQ2Z-`Q2b-tQ2v.bQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S:QQ3T:RQ3U:SQ3V:TQ3W:UQ3X.iQ3[:ZQ3]:dQ3b:VQ4T0PQ4]0aQ5n:eQ5t2]Q5y2cQ6V2wQ6W:fQ6]:hQ6^:oQ7U4pQ7s5lQ7w5uQ8Q:pQ8U:uQ8V:vQ8{7yQ9Z8hQ9b8yQ9s#RR;V;cR#ZWR'Q!eY!tQ'V-S0z4uS&|!e,zQ'b!rS'l!u!xS'n!y4wS,w&}'US-c'c'dQ-e'eQ2Q-QR2`-dR(p#wR(s#xQ!fQT-R'V-S]!qQ!r'V-S0z4uQ#o]R'`9rT#jZ%^S#iZ%^S%dm,^U(]#g#h#kS-w(^(_Q-{(`Q0R*}Q2e-xU2f-y-z-|S5{2g2hR7z5|`#]W#V#Y%a'y(S*z-rr#fZm#g#h#k%^(^(_(`*}-x-y-z-|2g2h5|Q1a,^Q1w,tQ5j1oQ7r5kT:}'O*{T#`W%aS#_W%aS'z#V(SS(P#Y*zS,y'O*{T-m'y-rT'T!e%bQ$kfR)o$pT)d$k)eR3`.pT*T$x*VR*]${Q0V+VQ2j.TQ4x0|Q6Q2nQ7^4{Q7}6PQ8j7]Q8|7|Q9]8lQ9e9OQ9j9^R9m9fnqOXst!Z#c%f&i&k&l&n,b,g1g1jQ&c!VR,V&`tmOXst!U!V!Z#c%f&`&i&k&l&n,b,g1g1jR,^&fT%em,^R0v+vR,U&^Q%||R+n%}R+d%wT&g!W&jT&h!W&jT1i,g1j",nodeNames:"\u26A0 ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:367,context:$st,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[Lst],skippedNodes:[0,3,4,270],repeatNodeCount:33,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Nu!`!a$#a!a!b$(n!b!c$,m!c!}Er!}#O$-w#O#P$/R#P#Q$4j#Q#R$5t#R#SEr#S#T$7R#T#o$8]#o#p$s#r#s$@P#s$f%Z$f$g+g$g#BYEr#BY#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$I|Er$I|$I}$Df$I}$JO$Df$JO$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AZ?HUOEr(n%d_$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$e&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$e&j'|!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'|!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$e&j'ypOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'ypOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'yp'|!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$e&j'yp'|!b'o(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'z#S$e&j'p(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$e&j'yp'|!b'p(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$e&j!m$Ip'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#r$Id$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#r$Id$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'x$(n$e&j'|!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$e&j'|!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$e&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$`#t$e&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$`#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$`#t$e&j'|!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'|!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$`#t'|!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hh$e&j'yp'|!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXUS$e&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSUSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWUS'|!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]US$e&j'ypOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWUS'ypOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYUS'yp'|!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%lQ^$e&j!SSOY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@Y!_!}!=y!}#O!Bw#O#P!Dj#P#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!?Ta$e&j!SSO!^&c!_#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&cS!@_X!SSOY!@YZ!P!@Y!P!Q!@z!Q!}!@Y!}#O!Ac#O#P!Bb#P;'S!@Y;'S;=`!Bq<%lO!@YS!APU!SS#Z#[!@z#]#^!@z#a#b!@z#g#h!@z#i#j!@z#m#n!@zS!AfVOY!AcZ#O!Ac#O#P!A{#P#Q!@Y#Q;'S!Ac;'S;=`!B[<%lO!AcS!BOSOY!AcZ;'S!Ac;'S;=`!B[<%lO!AcS!B_P;=`<%l!AcS!BeSOY!@YZ;'S!@Y;'S;=`!Bq<%lO!@YS!BtP;=`<%l!@Y&n!B|[$e&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#O!Bw#O#P!Cr#P#Q!=y#Q#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!CwX$e&jOY!BwYZ&cZ!^!Bw!^!_!Ac!_#o!Bw#o#p!Ac#p;'S!Bw;'S;=`!Dd<%lO!Bw&n!DgP;=`<%l!Bw&n!DoX$e&jOY!=yYZ&cZ!^!=y!^!_!@Y!_#o!=y#o#p!@Y#p;'S!=y;'S;=`!E[<%lO!=y&n!E_P;=`<%l!=y(Q!Eki$e&j'|!b!SSOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#Z&}#Z#[!Eb#[#]&}#]#^!Eb#^#a&}#a#b!Eb#b#g&}#g#h!Eb#h#i&}#i#j!Eb#j#m&}#m#n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ'|!b!SSOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb'|!b!SSOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX'|!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$e&j'|!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$e&j'yp'|!bm$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#Bst[t]||-1},{term:330,get:t=>Fst[t]||-1},{term:68,get:t=>Vst[t]||-1}],tokenPrec:12827}),Kee=[Ga("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ga("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ga("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ga("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ga("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ga(`try { \${} } catch (\${error}) { \${} }`,{label:"try",detail:"/ catch block",type:"keyword"}),Ga("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ga(`if (\${}) { \${} } else { \${} }`,{label:"if",detail:"/ else block",type:"keyword"}),Ga(`class \${name} { constructor(\${params}) { \${} } }`,{label:"class",detail:"definition",type:"keyword"}),Ga('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ga('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],jst=Kee.concat([Ga("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ga("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ga("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),x7=new Jet,Jee=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function my(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const Wst=["FunctionDeclaration"],Qst={FunctionDeclaration:my("function"),ClassDeclaration:my("class"),ClassExpression:()=>!0,EnumDeclaration:my("constant"),TypeAliasDeclaration:my("type"),NamespaceDeclaration:my("namespace"),VariableDefinition(t,e){t.matchContext(Wst)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function ete(t,e){let n=x7.get(e);if(n)return n;let r=[],o=!0;function i(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(fi.IncludeAnonymous).iterate(a=>{if(o)o=!1;else if(a.name){let s=Qst[a.name];if(s&&s(a,i)||Jee.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of ete(t,a.node))r.push(s);return!1}}),x7.set(e,r),r}const C7=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,tte=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Hst(t){let e=ni(t.state).resolveInner(t.pos,-1);if(tte.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&C7.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let o=e;o;o=o.parent)Jee.has(o.name)&&(r=r.concat(ete(t.state.doc,o)));return{options:r,from:n?e.from:t.pos,validFor:C7}}const cp=Wv.define({name:"javascript",parser:zst.configure({props:[cE.add({IfStatement:iv({except:/^\s*({|else\b)/}),TryStatement:iv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:btt,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:ytt({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":iv({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),dE.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":tJ,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),nte={test:t=>/^JSX/.test(t.name),facet:qK({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Ust=cp.configure({dialect:"ts"},"typescript"),Yst=cp.configure({dialect:"jsx",props:[GD.add(t=>t.isTop?[nte]:void 0)]}),Xst=cp.configure({dialect:"jsx ts",props:[GD.add(t=>t.isTop?[nte]:void 0)]},"typescript");let rte=t=>({label:t,type:"keyword"});const ote="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(rte),Zst=ote.concat(["declare","implements","private","protected","public"].map(rte));function EI(t={}){let e=t.jsx?t.typescript?Xst:Yst:t.typescript?Ust:cp,n=t.typescript?jst.concat(Zst):Kee.concat(ote);return new qD(e,[cp.data.of({autocomplete:nee(tte,lI(n))}),cp.data.of({autocomplete:Hst}),t.jsx?Kst:[]])}function Gst(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function E7(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const qst=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Kst=tn.inputHandler.of((t,e,n,r,o)=>{if((qst?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!cp.isActiveAt(t.state,e,-1))return!1;let i=o(),{state:a}=i,s=a.changeByRange(l=>{var u;let{head:c}=l,d=ni(a).resolveInner(c-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(c-1,c)!=r||d.name=="JSXAttributeValue"&&d.to>c)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,g=h.parent;if(g&&h.from==c-2&&((f=E7(a.doc,g.firstChild,c))||((u=g.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let v=`${f}>`;return{range:Ct.cursor(c+v.length,-1),changes:{from:c,insert:v}}}}else if(r==">"){let h=Gst(d);if(h&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(f=E7(a.doc,h,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([i,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Jst=36,T7=1,elt=2,_g=3,bk=4,tlt=5,nlt=6,rlt=7,olt=8,ilt=9,alt=10,slt=11,llt=12,ult=13,clt=14,dlt=15,flt=16,hlt=17,k7=18,plt=19,ite=20,ate=21,A7=22,glt=23,vlt=24;function HN(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57}function mlt(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function kh(t,e,n){for(let r=!1;;){if(t.next<0)return;if(t.next==e&&!r){t.advance();return}r=n&&!r&&t.next==92,t.advance()}}function ylt(t,e){e:for(;;){if(t.next<0)return;if(t.next==36){t.advance();for(let n=0;n)".charCodeAt(n);for(;;){if(t.next<0)return;if(t.next==r&&t.peek(1)==39){t.advance(2);return}t.advance()}}function UN(t,e){for(;!(t.next!=95&&!HN(t.next));)e!=null&&(e+=String.fromCharCode(t.next)),t.advance();return e}function _lt(t){if(t.next==39||t.next==34||t.next==96){let e=t.next;t.advance(),kh(t,e,!1)}else UN(t)}function P7(t,e){for(;t.next==48||t.next==49;)t.advance();e&&t.next==e&&t.advance()}function N7(t,e){for(;;){if(t.next==46){if(e)break;e=!0}else if(t.next<48||t.next>57)break;t.advance()}if(t.next==69||t.next==101)for(t.advance(),(t.next==43||t.next==45)&&t.advance();t.next>=48&&t.next<=57;)t.advance()}function M7(t){for(;!(t.next<0||t.next==10);)t.advance()}function xh(t,e){for(let n=0;n!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:ste(wlt,Olt)};function Slt(t,e,n,r){let o={};for(let i in YN)o[i]=(t.hasOwnProperty(i)?t:YN)[i];return e&&(o.words=ste(e,n||"",r)),o}function lte(t){return new _E(e=>{var n;let{next:r}=e;if(e.advance(),xh(r,_k)){for(;xh(e.next,_k);)e.advance();e.acceptToken(Jst)}else if(r==36&&t.doubleDollarQuotedStrings){let o=UN(e,"");e.next==36&&(e.advance(),ylt(e,o),e.acceptToken(_g))}else if(r==39||r==34&&t.doubleQuotedStrings)kh(e,r,t.backslashEscapes),e.acceptToken(_g);else if(r==35&&t.hashComments||r==47&&e.next==47&&t.slashComments)M7(e),e.acceptToken(T7);else if(r==45&&e.next==45&&(!t.spaceAfterDashes||e.peek(1)==32))M7(e),e.acceptToken(T7);else if(r==47&&e.next==42){e.advance();for(let o=1;;){let i=e.next;if(e.next<0)break;if(e.advance(),i==42&&e.next==47){if(o--,e.advance(),!o)break}else i==47&&e.next==42&&(o++,e.advance())}e.acceptToken(elt)}else if((r==101||r==69)&&e.next==39)e.advance(),kh(e,39,!0),e.acceptToken(_g);else if((r==110||r==78)&&e.next==39&&t.charSetCasts)e.advance(),kh(e,39,t.backslashEscapes),e.acceptToken(_g);else if(r==95&&t.charSetCasts)for(let o=0;;o++){if(e.next==39&&o>1){e.advance(),kh(e,39,t.backslashEscapes),e.acceptToken(_g);break}if(!HN(e.next))break;e.advance()}else if(t.plsqlQuotingMechanism&&(r==113||r==81)&&e.next==39&&e.peek(1)>0&&!xh(e.peek(1),_k)){let o=e.peek(1);e.advance(2),blt(e,o),e.acceptToken(_g)}else if(r==40)e.acceptToken(rlt);else if(r==41)e.acceptToken(olt);else if(r==123)e.acceptToken(ilt);else if(r==125)e.acceptToken(alt);else if(r==91)e.acceptToken(slt);else if(r==93)e.acceptToken(llt);else if(r==59)e.acceptToken(ult);else if(t.unquotedBitLiterals&&r==48&&e.next==98)e.advance(),P7(e),e.acceptToken(A7);else if((r==98||r==66)&&(e.next==39||e.next==34)){const o=e.next;e.advance(),t.treatBitsAsBytes?(kh(e,o,t.backslashEscapes),e.acceptToken(glt)):(P7(e,o),e.acceptToken(A7))}else if(r==48&&(e.next==120||e.next==88)||(r==120||r==88)&&e.next==39){let o=e.next==39;for(e.advance();mlt(e.next);)e.advance();o&&e.next==39&&e.advance(),e.acceptToken(bk)}else if(r==46&&e.next>=48&&e.next<=57)N7(e,!0),e.acceptToken(bk);else if(r==46)e.acceptToken(clt);else if(r>=48&&r<=57)N7(e,!1),e.acceptToken(bk);else if(xh(r,t.operatorChars)){for(;xh(e.next,t.operatorChars);)e.advance();e.acceptToken(dlt)}else if(xh(r,t.specialVar))e.next==r&&e.advance(),_lt(e),e.acceptToken(hlt);else if(xh(r,t.identifierQuotes))kh(e,r,!1),e.acceptToken(plt);else if(r==58||r==44)e.acceptToken(flt);else if(HN(r)){let o=UN(e,String.fromCharCode(r));e.acceptToken(e.next==46||e.peek(-o.length-1)==46?k7:(n=t.words[o.toLowerCase()])!==null&&n!==void 0?n:k7)}})}const ute=lte(YN),xlt=Yv.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"\u26A0 LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,ute],topRules:{Script:[0,25]},tokenPrec:0});function XN(t){let e=t.cursor().moveTo(t.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function Pb(t,e){let n=t.sliceString(e.from,e.to),r=/^([`'"])(.*)\1$/.exec(n);return r?r[2]:n}function Nx(t){return t&&(t.name=="Identifier"||t.name=="QuotedIdentifier")}function Clt(t,e){if(e.name=="CompositeIdentifier"){let n=[];for(let r=e.firstChild;r;r=r.nextSibling)Nx(r)&&n.push(Pb(t,r));return n}return[Pb(t,e)]}function $7(t,e){for(let n=[];;){if(!e||e.name!=".")return n;let r=XN(e);if(!Nx(r))return n;n.unshift(Pb(t,r)),e=XN(r)}}function Elt(t,e){let n=ni(t).resolveInner(e,-1),r=klt(t.doc,n);return n.name=="Identifier"||n.name=="QuotedIdentifier"||n.name=="Keyword"?{from:n.from,quoted:n.name=="QuotedIdentifier"?t.doc.sliceString(n.from,n.from+1):null,parents:$7(t.doc,XN(n)),aliases:r}:n.name=="."?{from:e,quoted:null,parents:$7(t.doc,n),aliases:r}:{from:e,quoted:null,parents:[],empty:!0,aliases:r}}const Tlt=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function klt(t,e){let n;for(let o=e;!n;o=o.parent){if(!o)return null;o.name=="Statement"&&(n=o)}let r=null;for(let o=n.firstChild,i=!1,a=null;o;o=o.nextSibling){let s=o.name=="Keyword"?t.sliceString(o.from,o.to).toLowerCase():null,l=null;if(!i)i=s=="from";else if(s=="as"&&a&&Nx(o.nextSibling))l=Pb(t,o.nextSibling);else{if(s&&Tlt.has(s))break;a&&Nx(o)&&(l=Pb(t,o))}l&&(r||(r=Object.create(null)),r[l]=Clt(t,a)),a=/Identifier$/.test(o.name)?o:null}return r}function Alt(t,e){return t?e.map(n=>Object.assign(Object.assign({},n),{label:n.label[0]==t?n.label:t+n.label+t,apply:void 0})):e}const Plt=/^\w*$/,Nlt=/^[`'"]?\w*[`'"]?$/;function R7(t){return t.self&&typeof t.self.label=="string"}class TI{constructor(e,n){this.idQuote=e,this.idCaseInsensitive=n,this.list=[],this.children=void 0}child(e){let n=this.children||(this.children=Object.create(null)),r=n[e];return r||(e&&!this.list.some(o=>o.label==e)&&this.list.push(D7(e,"type",this.idQuote,this.idCaseInsensitive)),n[e]=new TI(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let n=this.list.findIndex(r=>r.label==e.label);n>-1?this.list[n]=e:this.list.push(e)}addCompletions(e){for(let n of e)this.addCompletion(typeof n=="string"?D7(n,"property",this.idQuote,this.idCaseInsensitive):n)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):R7(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let n of Object.keys(e)){let r=e[n],o=null,i=n.replace(/\\?\./g,s=>s=="."?"\0":s).split("\0"),a=this;R7(r)&&(o=r.self,r=r.children);for(let s=0;s{let{parents:d,from:f,quoted:h,empty:g,aliases:v}=Elt(c.state,c.pos);if(g&&!c.explicit)return null;v&&d.length==1&&(d=v[d[0]]||d);let m=l;for(let O of d){for(;!m.children||!m.children[O];)if(m==l&&u)m=u;else if(m==u&&r)m=m.child(r);else return null;let S=m.maybeChild(O);if(!S)return null;m=S}let b=h&&c.state.sliceDoc(c.pos,c.pos+1)==h,w=m.list;return m==l&&v&&(w=w.concat(Object.keys(v).map(O=>({label:O,type:"constant"})))),{from:f,to:b?c.pos+1:void 0,options:Alt(h,w),validFor:h?Nlt:Plt}}}function $lt(t){return t==ate?"type":t==ite?"keyword":"variable"}function Rlt(t,e,n){let r=Object.keys(t).map(o=>n(e?o.toUpperCase():o,$lt(t[o])));return nee(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],lI(r))}let Dlt=xlt.configure({props:[cE.add({Statement:iv()}),dE.add({Statement(t,e){return{from:Math.min(t.from+100,e.doc.lineAt(t.from).to),to:t.to}},BlockComment(t){return{from:t.from+2,to:t.to-2}}}),lE({Keyword:Xe.keyword,Type:Xe.typeName,Builtin:Xe.standard(Xe.name),Bits:Xe.number,Bytes:Xe.string,Bool:Xe.bool,Null:Xe.null,Number:Xe.number,String:Xe.string,Identifier:Xe.name,QuotedIdentifier:Xe.special(Xe.string),SpecialVar:Xe.special(Xe.name),LineComment:Xe.lineComment,BlockComment:Xe.blockComment,Operator:Xe.operator,"Semi Punctuation":Xe.punctuation,"( )":Xe.paren,"{ }":Xe.brace,"[ ]":Xe.squareBracket})]});class kI{constructor(e,n,r){this.dialect=e,this.language=n,this.spec=r}get extension(){return this.language.extension}static define(e){let n=Slt(e,e.keywords,e.types,e.builtin),r=Wv.define({name:"sql",parser:Dlt.configure({tokenizers:[{from:ute,to:lte(n)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new kI(n,r,e)}}function Ilt(t,e){return{label:t,type:e,boost:-1}}function Llt(t,e=!1,n){return Rlt(t.dialect.words,e,n||Ilt)}function Blt(t){return t.schema?Mlt(t.schema,t.tables,t.schemas,t.defaultTable,t.defaultSchema,t.dialect||TE):()=>null}function Flt(t){return t.schema?(t.dialect||TE).language.data.of({autocomplete:Blt(t)}):[]}function Vlt(t={}){let e=t.dialect||TE;return new qD(e.language,[Flt(t),e.language.data.of({autocomplete:Llt(e,t.upperCaseKeywords,t.keywordCompletion)})])}const TE=kI.define({}),zlt={style:{flex:"auto","text-align":"right"}},jlt={__name:"NodePropertyItemTable",props:["nodePropertyForm","configuration","fields","parentField","currentNodeModel","lf"],emits:["submit","close"],setup(t,{emit:e}){const{nodePropertyForm:n,configuration:r,fields:o,parentField:i,currentNodeModel:a,lf:s}=t,l=z(null),u=z(!1),c=z({}),d=z(!1),f=z(0),h=z(r||[]),g=()=>{c.value={},d.value=!0,u.value=!0},v=(O,S)=>{c.value=O,d.value=!0,u.value=!1,f.value=S},m=(O,S)=>{c.value=O,S!==-1&&h.value.splice(S,1)},b=()=>{d.value=!1},w=()=>{l.value.submit(O=>{O&&(u.value?h.value.push(Mn(c.value)):h.value[f.value]=Mn(c.value),d.value=!1,e("submit",i,Mn(h.value)))})};return(O,S)=>{const x=Kn,C=mm,E=vm,T=Ei;return N(),Z(ut,null,[B(x,{style:{float:"right"},onClick:g},{default:V(()=>[We("\u6DFB\u52A0")]),_:1}),B(E,{data:h.value,stripe:"",style:{width:"100%"}},{default:V(()=>[(N(!0),Z(ut,null,Xt(t.fields,M=>(N(),me(C,{prop:M.name,label:M.label},null,8,["prop","label"]))),256)),B(C,{fixed:"right",label:"\u64CD\u4F5C"},{default:V(({row:M,$index:k})=>[B(x,{link:"",type:"primary",size:"small",onClick:P=>v(M,k)},{default:V(()=>[We("\u7F16\u8F91")]),_:2},1032,["onClick"]),B(x,{link:"",type:"primary",size:"small",onClick:P=>m(M,k)},{default:V(()=>[We("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),B(T,{modelValue:d.value,"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":b},{default:V(()=>[B(AI,{ref_key:"formRef",ref:l,configuration:c.value,fields:t.fields},null,8,["configuration","fields"]),ee("div",zlt,[B(x,{type:"default",onClick:b},{default:V(()=>[We("\u53D6\u6D88")]),_:1}),B(x,{type:"primary",onClick:S[0]||(S[0]=M=>w())},{default:V(()=>[We("\u4FDD\u5B58")]),_:1})])]),_:1},8,["modelValue"])],64)}}},Wlt=localStorage.getItem("token"),Qlt=sq.create({baseURL:window.allEnv.rule.iotServer.startsWith(":")?`${window.location.protocol}//${window.location.hostname}${window.allEnv.rule.iotServer}`:window.allEnv.rule.iotServer,timeout:6e4,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Wlt}`}});function I7(t,e){return Qlt.get(t,{params:e})}const Hlt={class:"node-property-item"},Ult={key:0},Ylt={key:1},Xlt={class:"pair-content"},Zlt={key:2},Glt={key:3},qlt={key:4},Klt={key:5},Jlt={key:6},eut={key:7},tut={key:8},nut={class:"pair-content"},rut={key:9},out={class:"pair-content"},iut={key:10},aut={class:"node-property-sub-item"},sut={key:11},lut={class:"sql-editor-container"},uut={class:"sql-header"},cut={class:"sql-buttons"},dut={key:12},fut={class:"sql-editor-container"},hut={class:"sql-header"},put={class:"sql-buttons"},gut={key:13},vut={key:14},mut={key:15},yut={__name:"NodePropertyItem",props:["nodePropertyForm","configuration","fields","parentField","currentNodeModel","lf"],setup(t,{expose:e}){const{nodePropertyForm:n,configuration:r,fields:o,parentField:i,currentNodeModel:a,lf:s}=t;z("");const l=[EI()],u=["ABS","SQRT","ACOS","ASIN","ATAN","ATAN2","CEILING","COS","COSH","EXP","FLOOR","LN","LOG","LOG10","LOG2","MOD","RAND","ROUND","SIGN","SIN","SINH","TAN","TANH","POWER","CONCAT","LENGTH","UPPER","LOWER","TRIM","FORMAT","ENDSWITH","STARTSWITH","INDEXOF","SUBSTRING","REPLACE","SPLIT","LPAD","RPAD","LTRIM","RTRIM","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SUBSTRING","CAST","HEX2DEC","DEC2HEX","ENCODE","DECODE","CONVERT_TZ","TO_SECONDS","CHR","TRUNC","URL_ENCODE","URL_DECODE","NOW","CURRENT_TIME","CURRENT_DATE","SUM","AVG","MIN","MAX","COUNT","STDDEV","MEDIAN","PERCENTILE","COLLECT","LAST_VALUE","MERGE_AGG","STDDEV_S","DEDUPLICATE","VAR","VAR_S","ROW_NUMBER","FIRST_VALUE","LEAD","NTH_VALUE","LAG","LATEST","CHANGED_COL","HAD_CHANGED","WINDOW_START","WINDOW_END","TO_JSON","FROM_JSON","JSON_EXTRACT","JSON_VALID","JSON_TYPE","JSON_LENGTH","MD5","SHA1","SHA256","SHA512","ARRAY_LENGTH","ARRAY_CONTAINS","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_DISTINCT","ARRAY_INTERSECT","ARRAY_UNION","ARRAY_EXCEPT","IS_NULL","IS_NOT_NULL","IS_NUMERIC","IS_STRING","IS_BOOL","IS_ARRAY","IS_OBJECT","IF_NULL","COALESCE","NULL_IF","GREATEST","LEAST","CASE_WHEN","UNNEST"],c=["SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","DISTINCT","AS","AND","OR","NOT","NULL","TRUE","FALSE","TumblingWindow","SlidingWindow","SessionWindow","STREAM"],d=L=>{const H=L.matchBefore(/\w*/);if(!H||H.from==H.to&&!L.explicit)return null;const re=[...u.map(U=>({label:U,type:"function",info:`StreamSQL \u51FD\u6570: ${U}`,apply:U+"()"})),...c.map(U=>({label:U,type:"keyword",info:`StreamSQL \u5173\u952E\u5B57: ${U}`}))];return{from:H.from,options:re}},f=$(()=>[Vlt({dialect:TE,schema:{stream:["deviceId","temperature","humidity","timestamp","data"]},upperCaseKeywords:!0}),pee({override:[d]})]),h=z(),g=z(),v=z([]);z({}),z({});const m=z(null),b=z("300px");(o||[]).forEach(L=>{if(L.component&&L.component.type==="select"&&L.component.defineOptions&&(L.component.options=L.component.defineOptions||[]),L.component&&L.component.type==="select"&&L.component.optionApi&&L.component.autoGetData){L.component.loading=!0,I7(L.component.optionApi,L.component.apiParams).then(U=>{L.component.options=(L.component.defineOptions||[]).concat(U.data.data[L.component.resDataKey]||[])}).finally(()=>L.component.loading=!1);const H=r[L.name],re=L.component.onChangeGetDataKey;re&&O(H,re,!0)}});function O(L,H,re=!1){if(!L)return;const U=o.find(J=>J.name===H);!U||(re||(r[H]=U.component.defineOptions?U.component.defineOptions[0].value:null),U.component.options=U.component.defineOptions||[],U.component.loading=!0,I7(U.component.optionApi,{[U.component.getDataByKey]:L}).then(J=>{U.component.options=(U.component.defineOptions||[]).concat(J.data.data[U.component.resDataKey]||[])}).finally(()=>U.component.loading=!1))}const S=function(L){r[L]=Pp.js(r[L],{indent_size:2})},x=function(L){let H=r[L];!H||(H=H.replace(/\bSELECT\b/gi,` SELECT`).replace(/\bFROM\b/gi,` FROM`).replace(/\bWHERE\b/gi,` WHERE`).replace(/\bGROUP BY\b/gi,` GROUP BY`).replace(/\bHAVING\b/gi,` HAVING`).replace(/\bORDER BY\b/gi,` ORDER BY`).replace(/\bLIMIT\b/gi,` LIMIT`).replace(/,/g,`, `).replace(/^\s+/gm," ").trim(),r[L]=H)},C=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():(b.value="100%",Gn.request(m.value[0])))};Gn.on("change",()=>{Gn.isFullscreen?b.value="100%":b.value="300px"}),function(){let L={};if(o&&o.forEach(H=>{L[H.name]=H}),r){let H={},re={};for(let U in r){let J=Mn(r[U]),ie=L[U];if(!(!ie||ie.component)){if(J&&J instanceof Array)H[U]=[],J.forEach(te=>{H[U].push({key:te})});else if(J&&typeof J=="object"&&ie.type!=="struct"){re[U]=[];for(let te in J)re[U].push({key:te,value:J[te]})}}}r.arrayItemValues=H,r.mapItemValues=re}}();const T=L=>{r.mapItemValues[L]?r.mapItemValues[L].push({key:"",value:""}):r.mapItemValues[L]=[{key:"",value:""}]},M=(L,H)=>{r.mapItemValues[L]&&r.mapItemValues[L].splice(H,1)},k=L=>{r.arrayItemValues[L]?r.arrayItemValues[L].push({key:"",value:""}):r.arrayItemValues[L]=[{key:"",value:""}]},P=(L,H)=>{r.arrayItemValues[L]&&r.arrayItemValues[L].splice(H,1)},R=L=>{r[L]||(r[L]=[]),r[L].push({case:"",then:""})},D=(L,H)=>{r[L]&&r[L].length>H&&r[L].splice(H,1)},F=L=>L.indexOf("int")>-1||L==="number",W=L=>L.indexOf("float")>-1,I=(L,H)=>{r[L]=H};return e({submit:L=>{if(!h.value){L&&L(!1);return}return h.value.validate(H=>(L&&L(H),H))}}),(L,H)=>{const re=gm,U=Cu,J=hs,ie=ri,te=oi,he=ao,K=Kn,ne=ld,fe=Ml,Ne=dR,$e=mY,ue=U$,G=H$,ve=fs;return N(),me(ve,{model:t.configuration,ref_key:"propertyItemFormRef",ref:h,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:V(()=>[(N(!0),Z(ut,null,Xt(t.fields,(q,Ie)=>(N(),Z("div",Hlt,[q.type==="Boolean"||q.type==="bool"?(N(),Z("div",Ult,[B(J,{label:q.label||q.name,prop:q.name},{default:V(()=>[B(re,{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,class:"ml-2",style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue","onUpdate:modelValue"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","prop"])])):q.component&&q.component.type==="switchNode"?(N(),Z("div",Ylt,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[ee("div",Xlt,[B(te,{class:"pair-item-header"},{default:V(()=>[B(ie,{span:12},{default:V(()=>[We(" \u6761\u4EF6 ")]),_:1}),B(ie,{span:6,offset:1},{default:V(()=>[We(" \u8DEF\u7531 ")]),_:1})]),_:1}),(N(!0),Z(ut,null,Xt(t.configuration[q.name],(Ee,Oe)=>(N(),me(te,{key:Oe,class:"pair-item"},{default:V(()=>[B(ie,{span:12},{default:V(()=>[B(he,{modelValue:Ee.case,"onUpdate:modelValue":se=>Ee.case=se,rules:[{required:!0,message:"\u6761\u4EF6\u662F\u5FC5\u987B\u7684"}],prop:q.name+"["+Oe+"].case",placeholder:"\u8F93\u5165\u5224\u65AD\u6761\u4EF6\uFF0C\u5982\uFF1Amsg.temperature > 50"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(ie,{span:6,offset:1},{default:V(()=>[B(he,{modelValue:Ee.then,"onUpdate:modelValue":se=>Ee.then=se,rules:[{required:!0,message:"\u8DEF\u7531\u662F\u5FC5\u987B\u7684"}],prop:q.name+"["+Oe+"].then",placeholder:"\u8F93\u5165\u8DEF\u7531\uFF1A\u5982\uFF1ACase1"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(ie,{span:2,offset:1},{default:V(()=>[B(K,{icon:p(fa),onClick:se=>D(q.name,Oe),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(te,null,{default:V(()=>[B(ie,{span:24},{default:V(()=>[B(K,{type:"primary",onClick:Ee=>R(q.name),icon:"el-icon-plus"},{default:V(()=>[We("\u6DFB\u52A0\u5206\u652F")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):q.component&&q.component.type==="select"&&q.component.resDataLabelKey?(N(),Z("div",Zlt,[!q.component.getDataByKey||t.configuration[q.component.getDataByKey]?(N(),me(J,{key:0,label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[B(fe,{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,multiple:q.component&&q.component.multiple,filterable:q.component&&q.component.filterable,"allow-create":q.component&&q.component.allowCreate,placeholder:q.component&&q.component.placeholder,clearable:q.component&&q.component.clearable,remote:!0,"remote-method":q.component.loadData&&q.component.loadData(t.lf,t.currentNodeModel,q,t.configuration[q.name]),onChange:Ee=>O(Ee,q.component.onChangeGetDataKey)},{default:V(()=>[(N(!0),Z(ut,null,Xt(q.component.options,Ee=>(N(),me(ne,{key:Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee,label:Ee[q.component.resDataLabelKey]||Ee.label||Ee,value:Ee[q.component.resDataValueKey]||(Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder","clearable","remote-method","onChange"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])):ge("",!0)])):q.component&&q.component.type==="select"?(N(),Z("div",Glt,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[B(fe,{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,multiple:q.component&&q.component.multiple,filterable:q.component&&q.component.filterable,"allow-create":q.component&&q.component.allowCreate,placeholder:q.component&&q.component.placeholder,clearable:q.component&&q.component.clearable,remote:!0,"remote-method":q.component.loadData&&q.component.loadData(t.lf,t.currentNodeModel,q,t.configuration[q.name])},{default:V(()=>[(N(!0),Z(ut,null,Xt(q.component.options,Ee=>(N(),me(ne,{key:Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee,label:Ee.label||Ee,value:Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder","clearable","remote-method"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):q.component&&q.component.type==="textarea"?(N(),Z("div",qlt,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>{var Ee;return[B(he,{type:"textarea",rows:((Ee=q==null?void 0:q.component)==null?void 0:Ee.rows)||2,modelValue:t.configuration[q.name],"onUpdate:modelValue":Oe=>t.configuration[q.name]=Oe},null,8,["rows","modelValue","onUpdate:modelValue"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):q.component&&q.component.type==="input-number"?(N(),Z("div",Klt,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>{var Ee,Oe,se,X;return[B(Ne,{modelValue:t.configuration[q.name],"onUpdate:modelValue":oe=>t.configuration[q.name]=oe,precision:(Ee=q.component)==null?void 0:Ee.precision,min:((Oe=q.component)==null?void 0:Oe.min)||0,max:((se=q.component)==null?void 0:se.max)||0,step:((X=q.component)==null?void 0:X.step)||1},null,8,["modelValue","onUpdate:modelValue","precision","min","max","step"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):q.component&&q.component.type==="slider"?(N(),Z("div",Jlt,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>{var Ee,Oe,se,X,oe;return[B($e,{modelValue:t.configuration[q.name],"onUpdate:modelValue":ce=>t.configuration[q.name]=ce,"show-input":(Ee=q.component)==null?void 0:Ee.showInput,min:((Oe=q.component)==null?void 0:Oe.min)||0,max:(se=q.component)==null?void 0:se.max,step:((X=q.component)==null?void 0:X.step)||1,"show-tooltip":(oe=q.component)==null?void 0:oe.showTooltip},null,8,["modelValue","onUpdate:modelValue","show-input","min","max","step","show-tooltip"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):q.component&&q.component.type==="table"?(N(),Z("div",eut,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[B(jlt,{configuration:t.configuration[q.name],parentField:q.name,fields:q.component.options,onSubmit:I},null,8,["configuration","parentField","fields"])]),_:2},1032,["label","rules","prop"])])):q.type==="map"?(N(),Z("div",tut,[B(J,{label:q.label||q.name,rules:q.rules,prop:"mapItemValues["+q.name+"]"},{default:V(()=>[ee("div",nut,[B(te,{class:"pair-item-header"},{default:V(()=>[B(ie,{span:8},{default:V(()=>[We(" \u952E ")]),_:1}),B(ie,{span:8,offset:2},{default:V(()=>[We(" \u503C ")]),_:1})]),_:1}),(N(!0),Z(ut,null,Xt(t.configuration.mapItemValues[q.name],(Ee,Oe)=>(N(),me(te,{key:Oe,class:"pair-item"},{default:V(()=>[B(ie,{span:8},{default:V(()=>[B(he,{modelValue:Ee.key,"onUpdate:modelValue":se=>Ee.key=se,rules:[{required:!0,message:"key\u662F\u5FC5\u987B\u7684"}],prop:"mapItemValues["+q.name+"]["+Ee.key+"]",placeholder:"\u8BF7\u8F93\u5165\u952E"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(ie,{span:8,offset:2},{default:V(()=>[B(he,{modelValue:Ee.value,"onUpdate:modelValue":se=>Ee.value=se,rules:[{required:!0,message:"value\u662F\u5FC5\u987B\u7684"}],prop:"configuration[item.name][pair.key]",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(ie,{span:4,offset:2},{default:V(()=>[B(K,{icon:p(fa),onClick:se=>M(q.name,Oe),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(te,null,{default:V(()=>[B(K,{type:"primary",icon:p(Lw),onClick:Ee=>T(q.name)},{default:V(()=>[We("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)])]),_:2},1032,["label","rules","prop"])])):q.type==="array"?(N(),Z("div",rut,[B(J,{label:q.label||q.name,rules:q.rules,prop:"arrayItemValues["+q.name+"].0.key"},{default:V(()=>[ee("div",out,[(N(!0),Z(ut,null,Xt(t.configuration.arrayItemValues[q.name],(Ee,Oe)=>(N(),me(te,{key:Oe,class:"pair-item"},{default:V(()=>[B(ie,{span:12},{default:V(()=>[B(he,{modelValue:Ee.key,"onUpdate:modelValue":se=>Ee.key=se,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(ie,{span:4,offset:2},{default:V(()=>[B(K,{icon:p(fa),onClick:se=>P(q.name,Oe),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(te,null,{default:V(()=>[B(K,{type:"primary",icon:p(Lw),onClick:Ee=>k(q.name)},{default:V(()=>[We("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024)]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):q.type==="struct"||q.type==="object"?(N(),Z("div",iut,[B(G,{modelValue:v.value,"onUpdate:modelValue":H[0]||(H[0]=Ee=>v.value=Ee)},{default:V(()=>[B(ue,{name:q.name},{title:V(()=>[We(ze(q.label||q.name),1)]),default:V(()=>[ee("div",aut,[B(AI,{ref_for:!0,ref_key:"subPropertyItemFormRef",ref:g,configuration:t.configuration[q.name],fields:q.fields},null,8,["configuration","fields"])])]),_:2},1032,["name"])]),_:2},1032,["modelValue"])])):q.component&&(q.component.type==="sql"||q.component.type==="SQL")?(N(),Z("div",sut,[ee("div",lut,[ee("div",uut,[B(J,{rules:q.rules,prop:q.name,class:"sql-form-item"},{label:V(()=>[ee("label",null,ze(q.label||q.name),1)]),_:2},1032,["rules","prop"]),ee("div",cut,[B(K,{type:"info",size:"small",round:"",onClick:Ee=>x(q.name)},{default:V(()=>[We("\u683C\u5F0F\u5316")]),_:2},1032,["onClick"]),B(K,{icon:p(od),size:"small",onClick:C,circle:""},null,8,["icon"])])]),B(te,{style:{height:"300px",width:"100%"}},{default:V(()=>[B(ie,{span:24},{default:V(()=>[ee("div",{ref_for:!0,ref_key:"codeEditorRef",ref:m},[B(p(Ds),{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,placeholder:"\u8BF7\u8F93\u5165SQL\u8BED\u53E5...",style:bt({height:b.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:p(f)},null,8,["modelValue","onUpdate:modelValue","style","extensions"])],512)]),_:2},1024)]),_:2},1024),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)])])):q.name==="jsScript"||q.name==="JsScript"||q.name==="script"||q.component&&q.component.type==="codeEditor"?(N(),Z("div",dut,[ee("div",fut,[ee("div",hut,[B(J,{rules:q.rules,prop:"item.name",class:"sql-form-item"},{label:V(()=>[ee("label",null,ze(q.label||q.name),1)]),_:2},1032,["rules"]),ee("div",put,[B(K,{type:"info",size:"small",round:"",onClick:Ee=>S(q.name)},{default:V(()=>[We("\u6574\u7406")]),_:2},1032,["onClick"]),B(K,{icon:p(od),size:"small",onClick:C,circle:""},null,8,["icon"])])]),B(te,{style:{height:"300px",width:"100%"}},{default:V(()=>[B(ie,{span:24},{default:V(()=>[ee("div",{ref_for:!0,ref_key:"codeEditorRef",ref:m},[B(p(Ds),{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",style:bt({height:b.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:l},null,8,["modelValue","onUpdate:modelValue","style"])],512)]),_:2},1024)]),_:2},1024),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)])])):F(q.type)?(N(),Z("div",gut,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[B(Ne,{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,step:"1"},null,8,["modelValue","onUpdate:modelValue"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):W(q.type)?(N(),Z("div",vut,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[B(he,{modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee},null,8,["modelValue","onUpdate:modelValue"]),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):(N(),Z("div",mut,[B(J,{label:q.label||q.name,rules:q.rules,prop:q.name},{default:V(()=>[q.component&&q.component.type==="select"?(N(),me(fe,{key:0,modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee,multiple:q.component&&q.component.multiple,filterable:q.component&&q.component.filterable,"allow-create":q.component&&q.component.allowCreate,placeholder:q.component&&q.component.placeholder},{default:V(()=>[(N(!0),Z(ut,null,Xt(q.component.options,Ee=>(N(),me(ne,{key:Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee,label:Ee.label||Ee,value:Ee.value!==void 0&&Ee.value!==null?Ee.value:Ee},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder"])):(N(),me(he,{key:1,modelValue:t.configuration[q.name],"onUpdate:modelValue":Ee=>t.configuration[q.name]=Ee},null,8,["modelValue","onUpdate:modelValue"])),B(U,{size:"small",type:"info"},{default:V(()=>[We(ze(q.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])]))]))),256))]),_:1},8,["model"])}}};var AI=zl(yut,[["__scopeId","data-v-8c9e9b46"]]);const but={class:""},_ut={__name:"NodePropertyForm",props:["showDrawer","currentNodeModel","currentNodeView","lf"],setup(t,{expose:e}){const{showDrawer:n,currentNodeModel:r,currentNodeView:o,lf:i}=t;z(""),EI();const a=z(),s=z();z({}),z({});const l=pn({nodeId:r.nodeId,id:r.id,type:r.type,name:r.name,configuration:r.configuration||{},debugMode:r.debugMode,additionalInfo:r.additionalInfo||{}});(function(){r.configuration||(r.configuration={}),o.fields&&(o.fields.forEach(h=>{!r.configuration.hasOwnProperty(h.name)&&(h.defaultValue||h.defaultValue===0)&&(r.configuration[h.name]=h.defaultValue)}),l.configuration=r.configuration)})();const c=()=>(d(l.configuration),l),d=h=>{if(h===null)return h;if(h.mapItemValues)for(let g in h.mapItemValues){let v=h.mapItemValues[g];v&&(h[g]={},v.forEach(m=>{m.key!==""&&(h[g][m.key]=m.value)}))}if(h.arrayItemValues)for(let g in h.arrayItemValues){let v=h.arrayItemValues[g];v&&(h[g]=[],v.forEach(m=>{m.key!==""&&h[g].push(m.key)}))}delete h.mapItemValues,delete h.arrayItemValues;for(let g in h)typeof h[g]=="object"&&d(h[g]);return h};return e({getFormModel:c,submit:h=>(a.value||h&&h(!1),a.value.validate(g=>g?s.value.submit(h):(h&&h(g),g)))}),(h,g)=>{const v=ao,m=ri,b=gm,w=Cu,O=oi,S=hs,x=fs;return N(),Z("div",but,[B(x,{model:l,ref_key:"nodePropertyFormRef",ref:a,"label-position":"top","label-width":"auto"},{default:V(()=>[B(S,{label:"\u8282\u70B9ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:V(()=>[B(O,{style:{width:"100%"}},{default:V(()=>[B(m,{span:16},{default:V(()=>[B(v,{modelValue:l.id,"onUpdate:modelValue":g[0]||(g[0]=C=>l.id=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9ID"},null,8,["modelValue"])]),_:1}),B(m,{span:7,offset:1},{default:V(()=>[B(b,{class:"ml-2",modelValue:l.debugMode,"onUpdate:modelValue":g[1]||(g[1]=C=>l.debugMode=C),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(w,{class:"mx-1",prop:"debugMode",onClick:g[2]||(g[2]=C=>l.debugMode=!l.debugMode)},{default:V(()=>[We(" \u8C03\u8BD5\u6A21\u5F0F ")]),_:1})]),_:1})]),_:1})]),_:1}),B(S,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:V(()=>[B(O,{style:{width:"100%"}},{default:V(()=>[B(m,{span:24},{default:V(()=>[B(v,{modelValue:l.name,"onUpdate:modelValue":g[3]||(g[3]=C=>l.name=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(AI,{ref_key:"nodePropertyItemFormRef",ref:s,lf:t.lf,currentNodeModel:t.currentNodeModel,configuration:pn(l.configuration),fields:t.currentNodeView.fields},null,8,["lf","currentNodeModel","configuration","fields"]),B(S,{label:"\u63CF\u8FF0",prop:"desc"},{default:V(()=>[B(v,{modelValue:l.additionalInfo.description,"onUpdate:modelValue":g[4]||(g[4]=C=>l.additionalInfo.description=C),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}};var ZN=zl(_ut,[["__scopeId","data-v-1f03bfa7"]]);const Out="logs",wut=(t,e,n,r)=>Go.get(`/api/v1/${Out}/debug`,{params:{chainId:t,nodeId:e,page:n,pageSize:r}}),Sut={style:{flex:"auto"}},xut={__name:"DebugDataPanel",props:["url","chainId","nodeId"],setup(t){const{url:e,chainId:n,nodeId:r}=t,o=[Bp(),Or.readOnly.of(!0)],i=z([]),a=z(!1),s=z(""),l=z(""),u=z({page:1,size:20,total:0}),c=w=>{u.value.size=w,u.value.page=1,f()},d=w=>{u.value.page=w,f()},f=async()=>{var w;try{const{data:O}=await wut(n,r,u.value.page,u.value.size);i.value=O.items||[],u.value={size:O.size||20,page:O.page,total:O.total}}catch(O){hr.error((w=O.response)==null?void 0:w.data)}};jt(()=>{f()});const h=(w,O)=>Ht(w.ts).format("YYYY-MM-DD HH:mm:ss"),g=w=>{s.value="\u6570\u636E",l.value=Pp.js(w.data,{indent_size:2}),a.value=!0},v=w=>{s.value="\u5143\u6570\u636E",l.value=Pp.js(JSON.stringify(w.metadata),{indent_size:2}),a.value=!0},m=w=>{s.value="\u9519\u8BEF",l.value=w||"",a.value=!0},b=()=>{a.value=!1};return(w,O)=>{const S=Kn,x=Zo,C=ri,E=oi,T=mm,M=vm,k=AC,P=Ei;return N(),Z(ut,null,[B(E,null,{default:V(()=>[B(C,{span:4,offset:20},{default:V(()=>[B(x,{class:"box-item",effect:"dark",content:"\u5237\u65B0",placement:"top-start"},{default:V(()=>[B(S,{icon:p(jQ),onClick:f,circle:""},null,8,["icon"])]),_:1})]),_:1})]),_:1}),B(M,{data:i.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:V(()=>[B(T,{prop:"ts",label:"\u4E8B\u4EF6\u65F6\u95F4",width:"90",formatter:h}),B(T,{prop:"flowType",label:"\u7C7B\u578B",width:"60"}),B(T,{prop:"msg.id",label:"\u6D88\u606FID",width:"130"},{default:V(R=>[B(x,{class:"box-item",effect:"dark",content:R.row.msg.id,placement:"top-start"},{default:V(()=>[We(ze(R.row.msg.id.length>14?R.row.msg.id.substring(0,14)+"...":R.row.msg.id),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"msg.type",label:"\u6D88\u606F\u7C7B\u578B",width:"130"},{default:V(R=>[B(x,{class:"box-item",effect:"dark",content:R.row.msg.type,placement:"top-start"},{default:V(()=>[We(ze(R.row.msg.type.length>10?R.row.msg.type.substring(0,10)+"...":R.row.msg.type),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"relationType",label:"\u5173\u7CFB\u7C7B\u578B",width:"90"}),B(T,{prop:"msg.data",label:"\u6570\u636E",width:"60"},{default:V(R=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:V(()=>[B(S,{icon:p(Qy),onClick:D=>g(R.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"msg.metadata",label:"\u5143\u6570\u636E",width:"80"},{default:V(R=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:V(()=>[B(S,{icon:p(Qy),onClick:D=>v(R.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"err",label:"\u9519\u8BEF",width:"80"},{default:V(R=>[R.row.err?(N(),me(x,{key:0,class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:V(()=>[R.row.err?(N(),me(S,{key:0,icon:p(Qy),onClick:D=>m(R.row.err),link:""},null,8,["icon","onClick"])):ge("",!0)]),_:2},1024)):ge("",!0)]),_:1})]),_:1},8,["data"]),B(k,{currentPage:u.value.page,"onUpdate:currentPage":O[0]||(O[0]=R=>u.value.page=R),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"]),B(P,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":b,modelValue:a.value},{header:V(()=>[B(E,null,{default:V(()=>[B(C,{span:12},{default:V(()=>[We(ze(s.value),1)]),_:1})]),_:1})]),footer:V(()=>[ee("div",Sut,[B(S,{onClick:b},{default:V(()=>[We("\u5173\u95ED")]),_:1})])]),default:V(()=>[B(p(Ds),{modelValue:l.value,"onUpdate:modelValue":O[1]||(O[1]=R=>l.value=R),placeholder:"\u65E0\u6570\u636E",style:{height:"400px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Cut={class:""},Eut={__name:"RouterItemForm",props:["showDrawer","currentRouter","currentNodeView","currentNodeModel"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentRouter:o,currentNodeView:i,currentNodeModel:a}=t;z(["headersToMetadata"]),z(["responseToBody"]);const s=z(["POST","GET","DELETE","PUT","PATCH"]),l={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},u=pn(o),c=z(l);if(i.router){let O={...l};O=Object.assign(O,i.router),O.from.processors||(O.from.processors=l.from.processors),O.to.processors||(O.to.processors=l.to.processors),c.value=O,i.type==="endpoint/http"&&(!u.params||u.params.length===0)&&(u.params=["POST"])}const d=z();pn({showPopover:!1,cronValue:""});const f=()=>d.value.validate(O=>{var S,x,C;if(O&&a.routers){let E=(C=(x=(S=i.router)==null?void 0:S.from)==null?void 0:x.path)==null?void 0:C.unique;a.routers.forEach(T=>{if(Fn.toFromPath(T,E)===Fn.toFromPath(u,E)&&T.id!==u.id)return hr.error(Fn.toFromPath(u)+" \u5DF2\u7ECF\u5B58\u5728"),O=!1,!1})}return O&&n("submit",Mn(u)),O}),h=()=>c,g=[EI()],v=z(null),m=z("300px"),b=function(){u.params[1]=Pp.js(u.params[1],{indent_size:2})},w=()=>{Gn.isEnabled&&(Gn.isFullscreen?Gn.exit():(m.value="100%",Gn.request(v.value[0])))};return Gn.on("change",()=>{Gn.isFullscreen?m.value="100%":m.value="300px"}),e({submit:f,getRouterView:h}),(O,S)=>{const x=ld,C=Ml,E=ao,T=Cu,M=ri,k=oi,P=hs,R=gm,D=Kn,F=fs;return N(),Z("div",Cut,[B(F,{model:u,ref_key:"formRef",ref:d,"label-position":"top","label-width":"auto"},{default:V(()=>{var W,I,Q,L,H,re;return[B(P,{label:c.value.from.path.label,rules:c.value.from.path.rules,prop:"from.path"},{default:V(()=>[B(k,{style:{width:"100%"}},{default:V(()=>[B(M,{span:24},{default:V(()=>[t.currentNodeView.type==="endpoint/sagoo/devicein"?(N(),me(C,{key:0,modelValue:u.from.path,"onUpdate:modelValue":S[0]||(S[0]=U=>u.from.path=U),filterable:""},{default:V(()=>[(N(!0),Z(ut,null,Xt(c.value.from.path.options,U=>(N(),me(x,{key:U,label:U.label,value:U.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):(N(),Z(ut,{key:1},[B(E,{modelValue:u.from.path,"onUpdate:modelValue":S[2]||(S[2]=U=>u.from.path=U),placeholder:"\u8BF7\u8F93\u5165"+c.value.from.path.label},ha({_:2},[t.currentNodeView.type==="endpoint/http"?{name:"prepend",fn:V(()=>[B(C,{modelValue:u.params[0],"onUpdate:modelValue":S[1]||(S[1]=U=>u.params[0]=U),filterable:"",style:{width:"150px"}},{default:V(()=>[(N(!0),Z(ut,null,Xt(s.value,U=>(N(),me(x,{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),B(T,{size:"small",type:"info"},{default:V(()=>[We(ze(c.value.from.path.desc),1)]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["label","rules"]),c.value.from.processors.hide?ge("",!0):(N(),me(P,{key:0,label:c.value.from.processors.label,prop:"from.processors"},{default:V(()=>[B(C,{modelValue:u.from.processors,"onUpdate:modelValue":S[3]||(S[3]=U=>u.from.processors=U),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.from.processors.label},{default:V(()=>[(N(!0),Z(ut,null,Xt(c.value.options.inProcessors,U=>(N(),me(x,{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(T,{size:"small",type:"info"},{default:V(()=>[We(ze(c.value.from.processors.desc),1)]),_:1})]),_:1},8,["label"])),(Q=(I=(W=c.value)==null?void 0:W.to)==null?void 0:I.processors)!=null&&Q.hide?ge("",!0):(N(),me(P,{key:1,label:(re=(H=(L=c.value)==null?void 0:L.to)==null?void 0:H.processors)==null?void 0:re.label,prop:"to.processors"},{default:V(()=>[B(C,{modelValue:u.to.processors,"onUpdate:modelValue":S[4]||(S[4]=U=>u.to.processors=U),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.to.processors.label},{default:V(()=>[(N(!0),Z(ut,null,Xt(c.value.options.outProcessors,U=>(N(),me(x,{key:U,label:U,value:U},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(T,{size:"small",type:"info"},{default:V(()=>[We(ze(c.value.to.processors.desc),1)]),_:1})]),_:1},8,["label"])),t.currentNodeView.type==="endpoint/http"?(N(),me(P,{key:2,label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",prop:"to.wait"},{default:V(()=>[B(R,{modelValue:u.to.wait,"onUpdate:modelValue":S[5]||(S[5]=U=>u.to.wait=U),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(T,{size:"small",type:"info"},{default:V(()=>[We("\u5982\u679C\u5F00\u542F\u5219\u4F1A\u628A\u89C4\u5219\u94FE\u6267\u884C\u7ED3\u679C\u54CD\u5E94\u5230\u5BA2\u6237\u7AEF")]),_:1})]),_:1})):ge("",!0),t.currentNodeView.type==="endpoint/mcpServer"?(N(),me(P,{key:3,label:c.value.from.desc.label||"\u5DE5\u5177\u63CF\u8FF0",prop:"from.params"},{default:V(()=>[B(E,{modelValue:u.params[0],"onUpdate:modelValue":S[6]||(S[6]=U=>u.params[0]=U),type:"textarea",rows:"3",placeholder:"\u8BF7\u8F93\u5165"+c.value.from.desc.label},null,8,["modelValue","placeholder"]),B(T,{size:"small",type:"info"},{default:V(()=>[We(ze(c.value.from.desc.desc),1)]),_:1})]),_:1},8,["label"])):ge("",!0),t.currentNodeView.type==="endpoint/mcpServer"?(N(),me(P,{key:4,prop:"from.params"},{label:V(()=>[B(k,null,{default:V(()=>[B(M,{span:20},{default:V(()=>[ee("label",null,ze(c.value.from.inputSchema.label||"\u5DE5\u5177\u5165\u53C2JsonSchema"),1)]),_:1}),B(M,{span:4,style:{"text-align":"right"}},{default:V(()=>[B(D,{type:"info",size:"small",round:"",onClick:S[7]||(S[7]=U=>b())},{default:V(()=>[We("\u6574\u7406")]),_:1}),B(D,{icon:p(od),size:"small",onClick:w,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:V(()=>[B(k,{style:{height:"300px",width:"100%"}},{default:V(()=>[B(M,{span:24},{default:V(()=>[ee("div",{ref_key:"codeEditorRef",ref:v},[B(p(Ds),{modelValue:u.params[1],"onUpdate:modelValue":S[8]||(S[8]=U=>u.params[1]=U),placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",style:bt({height:m.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:g},null,8,["modelValue","style"])],512)]),_:1})]),_:1}),B(T,{size:"small",type:"info"},{default:V(()=>[We(ze(c.value.from.inputSchema.desc),1)]),_:1})]),_:1})):ge("",!0)]}),_:1},8,["model"])])}}},cte={__name:"RouterPropertyTable",props:["showDrawer","currentNodeModel","currentNodeView"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentNodeModel:o,currentNodeView:i}=t,a=z({}),s=z(!1),l=z(!1),u=z(),c={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},d=z(c);if(i.router){let k={...c};k=Object.assign(k,i.router),d.value=k}const f=()=>{if(i.router&&i.router.defaultValue&&Array.isArray(i.router.defaultValue)){i.router.defaultValue.forEach(P=>{P.id||(P.id=Fn.genId())}),o.routers||(o.routers=[]);const k=o.routers.map(P=>{var D,F,W;let R=(W=(F=(D=i.router)==null?void 0:D.from)==null?void 0:F.path)==null?void 0:W.unique;return Fn.toFromPath(P,R)});i.router.defaultValue.forEach(P=>{var F,W,I;let R=(I=(W=(F=i.router)==null?void 0:F.from)==null?void 0:W.path)==null?void 0:I.unique;const D=Fn.toFromPath(P,R);if(!k.includes(D)){const Q=JSON.parse(JSON.stringify(P));Q.from||(Q.from={path:"",processors:[]}),Q.to||(Q.to={path:"",processors:[],wait:!1}),Q.params||(Q.params=[]),o.routers.push(Q)}})}},h=z({current:1,pageSize:12,total:o.routers&&o.routers.length}),g=k=>{h.value.pageSize=k,h.value.current=1},v=k=>{h.value.current=k},m=k=>{var P,R,D;if(l.value){let F=(D=(R=(P=i.router)==null?void 0:P.from)==null?void 0:R.path)==null?void 0:D.unique;const W=o.routers.findIndex(I=>I.id===k.id||Fn.toFromPath(I,F)===Fn.toFromPath(k,F));W!==-1&&o.routers.splice(W,1,k)}else o.routers||(o.routers=[]),o.routers.push(k);s.value=!1},b=()=>o,w=()=>{n("cancel")},O=(k,P)=>{var D,F,W;let R=(W=(F=(D=i.router)==null?void 0:D.from)==null?void 0:F.path)==null?void 0:W.unique;return Fn.toFromPath(k,R)},S=(k,P)=>k.to&&k.to.wait?"\u662F":"\u5426",x=(k,P)=>(k==null?void 0:k.params)&&k.params.length>0?k.params[0]:"",C=()=>{a.value={id:Fn.genId(),params:[],from:{path:"",processors:[]},to:{path:"",processors:[],wait:!1}},l.value=!1,s.value=!0},E=k=>{a.value={...k},l.value=!0,s.value=!0},T=k=>{var P,R,D;if(o.routers){let F=(D=(R=(P=i.router)==null?void 0:P.from)==null?void 0:R.path)==null?void 0:D.unique;o.routers=o.routers.filter(W=>W.id!==k.id&&Fn.toFromPath(W,F)!==Fn.toFromPath(k,F))}},M=()=>{u.value.submit()};return jt(()=>{f()}),e({getFormModel:b}),(k,P)=>{const R=Kn,D=mm,F=Zs,W=vm,I=AC,Q=Ei;return N(),Z(ut,null,[B(R,{type:"primary",onClick:C},{default:V(()=>[We("\u65B0\u589E")]),_:1}),B(W,{data:t.currentNodeModel.routers,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"50px"}},{default:V(()=>{var L,H,re,U;return[B(D,{prop:"from.path",label:d.value.from.path.label,formatter:O},null,8,["label"]),(H=(L=d.value.from)==null?void 0:L.processors)!=null&&H.hide?ge("",!0):(N(),me(D,{key:0,prop:"from.processors",label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:V(J=>[(N(!0),Z(ut,null,Xt(J.row.from.processors,ie=>(N(),me(F,{key:ie,style:{"margin-right":"5px"}},{default:V(()=>[We(ze(ie),1)]),_:2},1024))),128))]),_:1})),(U=(re=d.value.to)==null?void 0:re.processors)!=null&&U.hide?ge("",!0):(N(),me(D,{key:1,prop:"to.processors",label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:V(J=>{var ie;return[(N(!0),Z(ut,null,Xt(((ie=J.row.to)==null?void 0:ie.processors)||[],te=>(N(),me(F,{key:te,style:{"margin-right":"5px"}},{default:V(()=>[We(ze(te),1)]),_:2},1024))),128))]}),_:1})),t.currentNodeView.type==="endpoint/http"?(N(),me(D,{key:2,prop:"to.wait",label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",formatter:S})):ge("",!0),t.currentNodeView.type==="endpoint/mcpServer"?(N(),me(D,{key:3,prop:"from.desc.label",label:"\u5DE5\u5177\u63CF\u8FF0",formatter:x})):ge("",!0),B(D,{label:"\u64CD\u4F5C"},{default:V(({row:J})=>[B(R,{type:"primary",size:"small",onClick:ie=>E(J)},{default:V(()=>[We("\u7F16\u8F91")]),_:2},1032,["onClick"]),B(R,{type:"danger",size:"small",onClick:ie=>T(J)},{default:V(()=>[We("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]}),_:1},8,["data"]),B(I,{currentPage:h.value.current,"onUpdate:currentPage":P[0]||(P[0]=L=>h.value.current=L),style:{"margin-top":"10px"},class:"float-right","page-size":h.value.pageSize,total:h.value.total,"page-sizes":[12,24,36],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:g,onCurrentChange:v},null,8,["currentPage","page-size","total"]),B(Q,{modelValue:s.value,"onUpdate:modelValue":P[2]||(P[2]=L=>s.value=L),"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,title:l.value.value?"\u7F16\u8F91\u7F16\u8F91":"\u65B0\u589E\u8DEF\u7531"},{footer:V(()=>[B(R,{onClick:P[1]||(P[1]=L=>s.value=!1)},{default:V(()=>[We("\u53D6\u6D88")]),_:1}),B(R,{type:"primary",onClick:M},{default:V(()=>[We("\u4FDD\u5B58")]),_:1})]),default:V(()=>[B(Eut,{ref_key:"routerItemFormRef",ref:u,currentRouter:a.value,currentNodeView:t.currentNodeView,currentNodeModel:t.currentNodeModel,onSubmit:m,onCancel:w},null,8,["currentRouter","currentNodeView","currentNodeModel"])]),_:1},8,["modelValue","title"])],64)}}},Tut=["innerHTML"],kut={style:{"text-align":"left"}},Aut={__name:"NodePropertyDrawer",props:["show","currentNodeModel","currentNodeView","chainId","debugDataUrl","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:o,chainId:i,debugDataUrl:a,lf:s}=t,l=z(),u=z(),c=z("detail"),d=async()=>{let v;if(u.value&&!o.router.hide){if(v=u.value.getFormModel().routers,!v||v.length===0){c.value="router",hr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else o.nodeType==="endpoint-node"&&(v=[{from:{path:"*"},to:{}}]);l.value.submit(m=>{if(!m)c.value="detail";else{const b=l.value.getFormModel();v&&(b.routers=v),e("submit",b)}})},f=()=>{e("cancel")},h=()=>{f()},g=()=>{};return(v,m)=>{const b=Zs,w=ri,O=oi,S=xc,x=Sc,C=Kn,E=sR;return N(),me(E,{modal:!0,"append-to-body":!0,"destroy-on-close":!0,"close-on-press-escape":!1,"close-on-click-modal":!1,direction:"rtl",size:"60%","before-close":h,modelValue:t.show},ha({header:V(()=>[B(O,{class:"setter-title"},{default:V(()=>[B(w,{span:12},{default:V(()=>[We("\u8282\u70B9\u8BE6\u60C5 "),B(b,{class:"ml-2",type:"info"},{default:V(()=>[We(ze(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),default:V(()=>[B(x,{modelValue:c.value,"onUpdate:modelValue":m[0]||(m[0]=T=>c.value=T),onTabClick:g},{default:V(()=>[B(S,{label:"\u8BE6\u60C5",name:"detail"},{default:V(()=>[B(ZN,{ref_key:"nodePropertyFormRef",ref:l,lf:t.lf,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["lf","currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.nodeType==="endpoint-node"&&!t.currentNodeView.router.hide?(N(),me(S,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:V(()=>[B(cte,{ref_key:"routerPropertyFormRef",ref:u,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["currentNodeModel","currentNodeView"])]),_:1})):ge("",!0),t.currentNodeView.nodeType!=="endpoint-node"?(N(),me(S,{key:1,label:"\u8C03\u8BD5\u65E5\u5FD7",name:"debug"},{default:V(()=>[c.value==="debug"?(N(),me(xut,{key:0,url:t.debugDataUrl,chainId:t.chainId,nodeId:t.currentNodeModel.id},null,8,["url","chainId","nodeId"])):ge("",!0)]),_:1})):ge("",!0),B(S,{label:"\u5E2E\u52A9",name:"help"},{default:V(()=>[ee("div",{innerHTML:t.currentNodeView.desc},null,8,Tut)]),_:1})]),_:1},8,["modelValue"])]),_:2},[c.value==="detail"||c.value==="router"?{name:"footer",fn:V(()=>[ee("div",kut,[B(C,{type:"primary",size:"large",onClick:d},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(C,{size:"large",onClick:f},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),key:"0"}:void 0]),1032,["modelValue"])}}};var Put=zl(Aut,[["__scopeId","data-v-603ec374"]]);const Nut={style:{flex:"auto"}},Mut={__name:"NodePropertyDialog",props:["show","currentNodeModel","currentNodeView","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:o,lf:i}=t,a=z(),s=z(),l=z("detail"),u=async()=>{let f;if(s.value&&!o.router.hide){if(f=s.value.getFormModel().routers,!f||f.length===0){l.value="router",hr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else o.nodeType==="endpoint-node"&&(f=[{from:{path:"*"},to:{}}]);a.value.submit(h=>{if(!h)l.value="detail";else{const g=a.value.getFormModel();f&&(g.routers=f),e("submit",g)}})},c=()=>{e("cancel")},d=()=>{c()};return(f,h)=>{const g=Zs,v=ri,m=oi,b=xc,w=Sc,O=Kn,S=Ei;return N(),me(S,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!0,width:"55%",draggable:"",top:"10px","before-close":d,modelValue:t.show},{header:V(()=>[B(m,{class:"setter-title"},{default:V(()=>[B(v,{span:12},{default:V(()=>[We("\u8282\u70B9\u8BE6\u60C5\u914D\u7F6E "),B(g,{class:"ml-2",type:"info"},{default:V(()=>[We(ze(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),footer:V(()=>[ee("div",Nut,[B(O,{type:"primary",size:"large",onClick:u},{default:V(()=>[We("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:c},{default:V(()=>[We("\u53D6\u6D88")]),_:1})])]),default:V(()=>[t.currentNodeView.nodeType!=="endpoint-node"?(N(),me(ZN,{key:0,ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,editorOptions:f.editorOptions,lf:t.lf,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView","editorOptions","lf"])):ge("",!0),t.currentNodeView.nodeType==="endpoint-node"?(N(),me(w,{key:1,modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=x=>l.value=x)},{default:V(()=>[B(b,{label:"\u8BE6\u60C5",name:"detail"},{default:V(()=>[B(ZN,{ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.router.hide?ge("",!0):(N(),me(b,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:V(()=>[B(cte,{ref_key:"routerPropertyFormRef",ref:s,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}))]),_:1},8,["modelValue"])):ge("",!0)]),_:1},8,["modelValue"])}}};let Ok=!1;const $ut=(t,e)=>{try{const n=typeof e=="object"&&e!==null?e:t.getNodeModelById?t.getNodeModelById(e):null,r=typeof e=="string"?e:n&&(n.id||n.modelId),o=r?t.getNodeDataById(r):null;if(!o||o.type!=="group-node")return[];let i=[];const a=n&&n.children!==void 0?n.children:void 0;a&&(Array.isArray(a)?i=[...a]:typeof a=="object"&&(a.length!==void 0?i=Array.from(a):a.values&&typeof a.values=="function"?i=Array.from(a.values()):a.toJS&&typeof a.toJS=="function"&&(i=a.toJS())));let s=i.map(l=>t.getNodeDataById&&t.getNodeDataById(l)).filter(Boolean).filter(l=>l.type!=="start-node"&&l.type!=="group-node"&&l.type!=="endpoint-node").map(l=>{var u,c;return(c=(u=l.properties)==null?void 0:u.model)==null?void 0:c.id}).filter(l=>!!l);return Array.from(new Set(s))}catch(n){return console.warn("\u83B7\u53D6\u5206\u7EC4\u5185\u8282\u70B9\u5931\u8D25:",n),[]}},Rut={for:{fieldName:"do",fillStrategy:"firstAvailable"},groupAction:{fieldName:"nodeIds",fillStrategy:"allNodes"},groupFilter:{fieldName:"nodeIds",fillStrategy:"allNodes"}},Dut=t=>{try{const e=Df&&Df.nodes;if(!e)return null;const n=e[t];if(!n||n.nodeType!=="group-node")return null;for(const[r,o]of Object.entries(n)){const i=o&&o.component&&o.component.strategy;if(!!i&&(i==="firstAvailable"||i==="allNodes"))return{fieldName:r,fillStrategy:i}}return null}catch(e){return console.warn("\u4ECE\u914D\u7F6E\u89E3\u6790\u5206\u7EC4\u5B57\u6BB5\u5931\u8D25:",e),null}},L7=(t,e)=>{var n,r,o;try{const i=t.getNodeDataById(e),a=t.getNodeModelById(e);if(!i||!a||i.type!=="group-node")return;const s=(r=(n=i.properties)==null?void 0:n.model)==null?void 0:r.type;if(!s)return;const l=Dut(s)||Rut[s];if(!l)return;const{fieldName:u,fillStrategy:c}=l,d=i.properties.model.configuration||(i.properties.model.configuration={}),f=$ut(t,e);let h=null;if(f.length>0)switch(c){case"firstAvailable":const g=t.getGraphRawData(),v=g.nodes||[],m=g.edges||[],b=f.map(x=>{const C=v.find(T=>{var M,k;return((k=(M=T.properties)==null?void 0:M.model)==null?void 0:k.id)===x}),E=C?m.filter(T=>T.targetNodeId===C.id).length:0;return{bizId:x,count:E,lfNode:C}}),w=b.filter(x=>x.count===0),S=(w.length>0?w:b).filter(x=>x.lfNode).sort((x,C)=>parseFloat(x.lfNode.x||0)-parseFloat(C.lfNode.x||0));h=S.length>0?S[0].bizId:f[0];break;case"allNodes":h=[...f];break}d[u]=h,(o=a==null?void 0:a.properties)!=null&&o.model&&(a.properties.model.configuration=i.properties.model.configuration)}catch(i){console.warn("\u586B\u5145\u5206\u7EC4\u5B57\u6BB5\u5931\u8D25:",i)}},B7=t=>{!t||!t.graphModel||(t.on("group:add-node",({data:e,childId:n})=>{var a,s,l,u;const r=t.getNodeModelById(n),o=t.getNodeDataById(n),i=(s=(a=e.properties)==null?void 0:a.model)==null?void 0:s.id;if(r&&o){let c=((l=o.properties)==null?void 0:l.model)||{};c.id||(c.id=o.id),!c.name&&((u=o.text)==null?void 0:u.value)&&(c.name=o.text.value),i&&(c.additionalInfo=c.additionalInfo||{},c.additionalInfo.parentGroupId=i),r.setProperty("model",c)}L7(t,e.id),t.graphModel.eventCenter.emit("group:field-updated",{groupId:e.id,childId:n,action:"add"})}),t.on("group:remove-node",({data:e,childId:n})=>{L7(t,e.id),t.graphModel.eventCenter.emit("group:field-updated",{groupId:e.id,childId:n,action:"remove"})}))},M1=t=>{if(!Ok){Ok=!0;try{const e=t.getGraphRawData(),n=e.nodes||[],r={};n.filter(a=>a.type==="group-node").forEach(a=>{var l,u;const s=(u=(l=a.properties)==null?void 0:l.model)==null?void 0:u.id;s&&(r[s]=a.id)});const o=(e.nodes||[]).filter(a=>a.type==="group-node").map(a=>{const s=t.getNodeModelById(a.id);return{id:a.id,x:s.x,y:s.y,w:s.width,h:s.height}}),i=(a,s)=>{const l=a.x-a.w/2,u=a.x+a.w/2,c=a.y-a.h/2,d=a.y+a.h/2;return s.x>=l&&s.x<=u&&s.y>=c&&s.y<=d};n.filter(a=>a.type!=="start-node"&&a.type!=="group-node").forEach(a=>{var u,c,d;const s=(d=(c=(u=a.properties)==null?void 0:u.model)==null?void 0:c.additionalInfo)==null?void 0:d.parentGroupId;let l="";if(s&&r[s])l=r[s];else{const f=o.filter(h=>i(h,a)).map(h=>({id:h.id,area:h.w*h.h})).sort((h,g)=>h.area-g.area);f.length>0&&(l=f[0].id)}if(l)try{const f=t.getNodeModelById(l);if(!f||f.isAllowAppendIn&&!f.isAllowAppendIn(a))return;f&&f.addChild&&f.addChild(a.id)}catch{}})}catch{}finally{Ok=!1}}},Iut={builtins:{endpoints:{inProcessors:["toHex","headersToMetadata","setJsonDataType"],outProcessors:["responseToBody","metadataToHeaders"]},functions:{functionName:[]},nodePool:{}},endpoints:[{type:"endpoint/kafka",category:"endpoint/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null}],label:"Kafka",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/nats",category:"endpoint/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Nats",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/rabbitmq",category:"endpoint/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"RabbitMQ",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis",category:"endpoint/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis/stream",category:"endpoint/redis_stream",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/mqtt",category:"github.com/rulego/rulego/endpoint/mqtt",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"Duration",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Mqtt",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/net",category:"github.com/rulego/rulego/endpoint/net",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:":6335",label:"",desc:"",validate:"",fields:null},{name:"readTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"encode",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Net",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/http",category:"github.com/rulego/rulego/endpoint/rest",fields:[{name:"server",type:"string",defaultValue:":6333",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Rest",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/schedule",category:"github.com/rulego/rulego/endpoint/schedule",fields:null,label:"Schedule",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/ws",category:"github.com/rulego/rulego/endpoint/websocket",fields:[{name:"server",type:"string",defaultValue:":6334",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Websocket",desc:"",icon:"",relationTypes:["Success","Failure"]}],nodes:[{type:"comment",category:"action",fields:null,label:"CommentNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"delay",category:"action",fields:[{name:"maxPendingMsgs",type:"int",defaultValue:1e3,label:"",desc:"",validate:"",fields:null},{name:"periodInSeconds",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"periodInSecondsPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"overwrite",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DelayNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exec",category:"action",fields:[{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"args",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"log",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"replaceData",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ExecCommandNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"for",category:"action",fields:[{name:"range",type:"string",defaultValue:"1..3",label:"",desc:"",validate:"",fields:null},{name:"do",type:"string",defaultValue:"s3",label:"",desc:"",validate:"",fields:null},{name:"mode",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ForNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"functions",category:"action",fields:[{name:"functionName",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null}],label:"FunctionsNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupAction",category:"action",fields:[{name:"matchRelationType",type:"string",defaultValue:"Success",label:"",desc:"",validate:"",fields:null},{name:"matchNum",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupActionNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"iterator",category:"action",fields:[{name:"fieldName",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"jsScript",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"IteratorNode",desc:"",icon:"",relationTypes:["True","False","Success","Failure"]},{type:"join",category:"action",fields:[{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"JoinNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"log",category:"action",fields:[{name:"jsScript",type:"string",defaultValue:"return 'Incoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",label:"",desc:"",validate:"",fields:null}],label:"LogNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"dbClient",category:"external",fields:[{name:"driverName",type:"string",defaultValue:"mysql",label:"",desc:"",validate:"",fields:null},{name:"dsn",type:"string",defaultValue:"root:root@tcp(127.0.0.1:3306)/test",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"sql",type:"string",defaultValue:"select * from test",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"getOne",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DbClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"mqttClient",category:"external",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"MqttClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"net",category:"external",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"connectTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"heartbeatInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null}],label:"NetNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"restApiCall",category:"external",fields:[{name:"restEndpointUrlPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"requestMethod",type:"string",defaultValue:"POST",label:"",desc:"",validate:"",fields:null},{name:"withoutRequestBody",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:{"Content-Type":"application/json"},label:"",desc:"",validate:"",fields:null},{name:"readTimeoutMs",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"insecureSkipVerify",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"maxParallelRequestsCount",type:"int",defaultValue:200,label:"",desc:"",validate:"",fields:null},{name:"enableProxy",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"useSystemProxyProperties",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"proxyScheme",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"proxyUser",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPassword",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RestApiCallNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"sendEmail",category:"external",fields:[{name:"smtpHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"smtpPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"enableTls",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"email",type:"struct",defaultValue:{from:"",to:"",cc:"",bcc:"",subject:"",body:""},label:"",desc:"",validate:"",fields:[{name:"from",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"to",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"bcc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"subject",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"body",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}]},{name:"connectTimeout",type:"int",defaultValue:10,label:"",desc:"",validate:"",fields:null}],label:"SendEmailNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ssh",category:"external",fields:[{name:"host",type:"string",defaultValue:"127.0.0.1",label:"",desc:"",validate:"",fields:null},{name:"port",type:"int",defaultValue:22,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"root",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"password",label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"SshNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/grpcClient",category:"external/grpc",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:50051",label:"",desc:"",validate:"",fields:null},{name:"service",type:"string",defaultValue:"helloworld.Greeter",label:"",desc:"",validate:"",fields:null},{name:"method",type:"string",defaultValue:"SayHello",label:"",desc:"",validate:"",fields:null},{name:"request",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/kafkaProducer",category:"external/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"partition",type:"int32",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ProducerNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/mongodbClient",category:"external/mongodb",fields:[{name:"server",type:"string",defaultValue:"mongodb://localhost:27017",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null},{name:"collection",type:"string",defaultValue:"user",label:"",desc:"",validate:"",fields:null},{name:"opType",type:"string",defaultValue:"QUERY",label:"",desc:"",validate:"",fields:null},{name:"filter",type:"string",defaultValue:'{"age": {"$gte": 18}}',label:"",desc:"",validate:"",fields:null},{name:"doc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"one",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/natsClient",category:"external/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiQuery",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"command",type:"string",defaultValue:"select * from cpu_load",label:"",desc:"",validate:"",fields:null}],label:"QueryNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiWrite",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"WriteNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/rabbitmqClient",category:"external/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"device.msg.request",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisClient",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"GET",label:"",desc:"",validate:"",fields:null},{name:"paramsExpr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:["${metadata.key}"],label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisPub",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"channel",type:"string",defaultValue:"default",label:"",desc:"",validate:"",fields:null}],label:"PublisherNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprFilter",category:"filter",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"ExprFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fieldFilter",category:"filter",fields:[{name:"checkAllKeys",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"dataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"metadataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"FieldFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fork",category:"filter",fields:null,label:"ForkNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupFilter",category:"filter",fields:[{name:"allMatches",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsFilter",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return msg.temperature > 50;",label:"",desc:"",validate:"",fields:null}],label:"JsFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsSwitch",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return ['msgType1','msgType2'];",label:"",desc:"",validate:"",fields:null}],label:"JsSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"msgTypeSwitch",category:"filter",fields:null,label:"MsgTypeSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"switch",category:"filter",fields:[{name:"cases",type:"array",defaultValue:[{case:"msg.temperature>=20 && msg.temperature<=50",then:"Case1"},{case:"msg.temperature>50",then:"Case2"}],label:"",desc:"",validate:"",fields:null}],label:"SwitchNode",desc:"",icon:"",relationTypes:[]},{type:"x/luaFilter",category:"filter",fields:[{name:"script",type:"string",defaultValue:"return msg.temperature > 50",label:"",desc:"",validate:"",fields:null}],label:"LuaFilter",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"flow",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"extend",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ChainNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ref",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RefNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprTransform",category:"transform",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"mapping",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ExprTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"jsTransform",category:"transform",fields:[{name:"jsScript",type:"string",defaultValue:"return {'msg':msg,'metadata':metadata,'msgType':msgType};",label:"",desc:"",validate:"",fields:null}],label:"JsTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"metadataTransform",category:"transform",fields:[{name:"mapping",type:"map",defaultValue:{temperature:"msg.temperature"},label:"",desc:"",validate:"",fields:null},{name:"isNew",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"MetadataTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"text/template",category:"transform",fields:[{name:"template",type:"string",defaultValue:`"id": "{{ .id}}" "ts": "{{ .ts}}" "type": "{{ .type}}" "msgType": "{{ .msgType}}" "data": "{{ .data | escape}}" "dataType": "{{ .dataType}}" `,label:"",desc:"",validate:"",fields:null}],label:"TemplateNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/luaTransform",category:"transform",fields:[{name:"script",type:"string",defaultValue:"return msg, metadata, msgType",label:"",desc:"",validate:"",fields:null}],label:"LuaTransform",desc:"",icon:"",relationTypes:["Success","Failure"]}]},Lut={class:"flow-chart"},But={__name:"RuleGoEditor",props:["options","data"],emits:["saveOk","saveError","reset","updateLocales"],setup(t,{expose:e,emit:n}){const r=t,o=z(),i=z(null),a=z(null),s=z({}),l=z({}),u=z({}),c=z(null),d=z(!1),f=z(!1),h=z(!1),g=z(!1),v=z(!1),m=z({url:"http://127.0.0.1:9090",toolbar:{}});let b={},w=z({}),O={},S={},x={},C=[],E=[];const T=z(r.data),M=r.options;let k={setting:{},topOffset:100,relationTypeSplit:"/",endpointRelationTypeSplit:` `,url:"http://127.0.0.1:9090",componentsApi:"/api/v1/components",debugDataApi:"/api/v1/logs/debug",executeApi:"/api/v1/rules/:id/execute/:msgType",notifyApi:"/api/v1/rules/:id/notify/msgType",chainsApi:"/api/v1/rules",startX:280,startY:280,loadComponentsFromApi:!0,loadEndpointComponents:!0,locales:{},builtinComponents:{builtins:{},endpoints:[],nodes:[]},components:{endpoints:[],nodes:[]},adapterComponents:function(Oe){return k.loadEndpointComponents||(Oe.endpoints=[]),k.builtinComponents=Oe,Fn.adapterComponents(Oe,k.locales)},toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0},container:o.value,grid:{visible:!0,type:"mesh",size:10,config:{color:"#eeeeee"}},adjustEdge:!0,adjustEdgeStartAndEnd:!0,textEdit:!1,stopMoveGraph:!1,hoverOutline:!1,edgeSelectedOutline:!1,allowResize:!0,keyboard:{enabled:!0,shortcuts:[{keys:["delete","backspace"],callback:Oe=>{!Oe.target||Oe.target.tagName!=="DIV"&&Oe.target.tagName!=="div"&&Oe.target.tagName!=="g"||te()}},{keys:["cmd + c","ctrl + c"],callback:Oe=>{if(!Oe.target||Oe.target.tagName!=="DIV"&&Oe.target.tagName!=="div"&&Oe.target.tagName!=="g")return;if(!i.value){Fn.copyToClipboard("");return}O.currentCloneNodeId=i.value.id;let se=i.value.properties&&i.value.properties.model||{};Fn.copyToClipboard(JSON.stringify(se))}},{keys:["cmd + v","ctrl + v"],callback:Oe=>{!Oe.target||Oe.target.tagName!=="DIV"&&Oe.target.tagName!=="div"&&Oe.target.tagName!=="g"||U()}}]},idGenerator:function(Oe){return Oe==="flow-link"?(O.edgeCount++,"edge_"+O.edgeCount):(O.nodeCount++,"node_"+O.nodeCount)},plugins:[HXe,DXe,mq,Gee,QXe,mXe]},P=null;jt(()=>{R()});const R=()=>{k.components&&k.components.nodes&&k.components.nodes.length>0?(k.components=k.adapterComponents(k.components),b=G(k.components),D()):(k.components=k.adapterComponents(Iut),b=G(k.components),D()),k.loadComponentsFromApi&&ue().then(Oe=>{k.components=Oe,b=G(k.components),D()})},D=()=>{fe(),Object.assign(k,M),k.url&&$Ge(k.url),m.value={url:k.url,componentsApi:k.componentsApi,debugDataApi:k.debugDataApi,executeApi:k.executeApi,notifyApi:k.notifyApi,chainsApi:k.chainsApi,toolbar:k.toolbar},k.ruleChain&&(w.value=w),k.container=o.value,P=new fG(k);try{B7&&B7(P)}catch{}P.getRuleChain=function(){return w.value},P.getEditorSetting=function(){return m.value},P.rulegoEditor={getRuleChain:function(){return w.value},getOptions:function(){return k},getEditorSetting:function(){return m.value},nodeComponents:function(){return b},setLocales:function(se){Ie(se)},reloadComponents:function(){Ee()}},P.extension.selectionSelect.setSelectionSense(!0,!1),P.adapterIn=function(se){Pr(se)&&(se=se.value),se||(se={});let X={};se.ruleChain&&(w.value=se.ruleChain,X=se.ruleChain.additionalInfo||{});let oe=[],ce=[],Ae=parseInt(X.layoutX||k.startX)||k.startX,ye=parseInt(X.layoutY||k.startY)||k.startY;const Te=!!X.noDefaultInput;Te||oe.push({id:O.startNodeId,type:"start-node",x:Ae,y:ye,text:Uu("Input")});let Me=null,Fe=0,at=se.metadata&&se.metadata.firstNodeIndex||0;se&&se.metadata&&Array.isArray(se.metadata.nodes)&&se.metadata.nodes.forEach((ht,Je)=>{let ft=Fn.getNodeSeq(ht.id);ft>Fe&&(Fe=ft),O.nodeCount++;let Mt=b[ht.type],Pe="simple-node";Mt&&Mt.nodeType&&(Pe=Mt.nodeType),at===Je&&(Me=ht),Ae=Ae+150;let Ce=ht.additionalInfo||{},pe=Ce.layoutX||Ae,Be=Ce.layoutY||ye;oe.push({id:ht.id,type:Pe,x:pe,y:Be,text:ht.name,properties:{view:b[ht.type],model:ht}})}),se&&se.metadata&&se.metadata.endpoints&&se.metadata.endpoints.forEach((ht,Je)=>{let ft=Fn.getNodeSeq(ht.id);ft>Fe&&(Fe=ft),O.nodeCount++,Ae=Ae+150;let Mt=ht.additionalInfo||{},Pe=Mt.layoutX||Ae,Ce=Mt.layoutY||ye;oe.push({id:ht.id,type:"endpoint-node",x:Pe,y:Ce,text:ht.name,properties:{view:b[ht.type],model:ht}})}),O.nodeCount+=Fe;let nt=[];if(!Te){let ht=Me?Me.id:null;ht&&(nt=[{fromId:O.startNodeId,toId:ht}])}se.metadata&&se.metadata.endpoints&&se.metadata.endpoints.forEach((ht,Je)=>{let ft=Fn.getEndpointConnections(ht.id,ht,Me);nt=nt.concat(ft)});let ct=nt;return se&&se.metadata&&se.metadata.connections&&(ct=ct.concat(se.metadata.connections)),ct.forEach(ht=>{O.edgeCount++;let Je=Fn.getEdgeBySourceNodeIdAndTargetNodeId(ce,ht.fromId,ht.toId);Je?(ht.nodeType==="endpoint-node"?Je.text=Je.text+k.endpointRelationTypeSplit+Uu(ht.type,"relationTypes"):Je.text=Je.text+k.relationTypeSplit+Uu(ht.type,"relationTypes"),Je.properties.model.relationTypes||(Je.properties.model.relationTypes=[]),Je.properties.model.relationTypes.push(ht.type),ht.routerId&&(Je.properties.model.routerId=ht.routerId)):(ht.relationTypes=[ht.type],Je=Fn.createEdge(O,oe,ht),ce.push(Je))}),{edges:ce,nodes:oe}},P.adapterOut=function(se){if(w.value){const Me=w.value.id||Fn.genId();w.value.id=Me,w.value.name=w.value.name||Me}w.value&&!w.value.name&&(w.value.name=w.value.id);let X=[],oe=[],ce=[],Ae=null,ye=[];if(se&&se.edges&&se.edges.forEach(Me=>{if(Me.sourceNodeId!==O.startNodeId){let Fe=ve(Me.sourceNodeId),at=ve(Me.targetNodeId);Fe===""&&hr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+Fe),at===""&&hr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+at);let nt=P.getNodeDataById(Me.sourceNodeId),ct=Me.properties.model||{fromId:Fe,toId:at,type:""};ct.fromId=Fe,ct.toId=at,ct.relationTypes.forEach(ht=>{let Je={};Object.assign(Je,ct),Je.type=ht,delete Je.id,delete Je.relationTypes,delete Je.relationTypesLabel,nt.type==="endpoint-node"?ye.push(Je):ce.push(Je)})}else Ae=Me.targetNodeId}),w.value.additionalInfo=w.value.additionalInfo||{},w.value.additionalInfo.noDefaultInput=!0,(!se.nodes||se.nodes.length===0)&&(w.value.additionalInfo.noDefaultInput=!1),se&&se.nodes){const Me={};se.nodes.forEach(Fe=>{if(Fe.id===O.startNodeId)w.value.additionalInfo.noDefaultInput=!1,w.value.additionalInfo?(w.value.additionalInfo.layoutX=String(Fe.x),w.value.additionalInfo.layoutY=String(Fe.y)):w.value.additionalInfo={layoutX:String(Fe.x),layoutY:String(Fe.y)};else{let at=Fe.properties.model;if(at){Me[Fe.id]=at;let nt=at.additionalInfo;nt?(nt.layoutX=Fe.x,nt.layoutY=Fe.y):at.additionalInfo={layoutX:Fe.x,layoutY:Fe.y},delete at.nodeId,Fe.type==="endpoint-node"?(Fn.updateEndpointRouterToPath(at,w.value.id,ye),X.push(at)):!Ae&&Fe.type==="simple-node"||Fe.id===Ae?oe.unshift(at):oe.push(at)}}});try{const at=(se.nodes||[]).filter(ft=>ft.type==="group-node").map(ft=>{var Ce,pe,Be;const Mt=P.getNodeModelById(ft.id),Pe=((Ce=Me[ft.id])==null?void 0:Ce.id)||((Be=(pe=ft.properties)==null?void 0:pe.model)==null?void 0:Be.id);return{lfId:ft.id,bizId:Pe,x:Mt.x,y:Mt.y,w:Mt.width,h:Mt.height}}),nt=ft=>ft.x-ft.w/2,ct=ft=>ft.x+ft.w/2,ht=ft=>ft.y-ft.h/2,Je=ft=>ft.y+ft.h/2;(se.nodes||[]).filter(ft=>ft.type!=="start-node"&&ft.type!=="group-node").forEach(ft=>{const Mt=ft.x,Pe=ft.y,Ce=at.find(pe=>Mt>=nt(pe)&&Mt<=ct(pe)&&Pe>=ht(pe)&&Pe<=Je(pe));if(Ce){const pe=Me[ft.id];pe&&(pe.additionalInfo=pe.additionalInfo||{},pe.additionalInfo.parentGroupId=Ce.bizId)}})}catch{}}let Te={endpoints:X,nodes:oe,connections:ce};return{ruleChain:w.value,metadata:Te}},T?(P.render(T),M1(P),requestAnimationFrame(()=>{M1(P),P.once&&P.once("graph:rendered",()=>M1(P))})):(w.value.id=Fn.genId(),P.render({})),P.graphModel.eventCenter.emit("rulego-editor:componentOk",k.components),P.on("blank:mousemove",({e:se})=>{O.mouseX=se.offsetX,O.mouseY=se.offsetY}),P.on("blank:mousedown",({e:se})=>{O.mouseX=se.offsetX,O.mouseY=se.offsetY}),P.on("node:click",({data:se})=>{se.type!=="start-node"?(i.value=se,a.value=null):(i.value=null,a.value=null)}),P.on("node:dbclick",({data:se})=>{se.type!=="start-node"&&(i.value=se,a.value=null,he(),f.value=!0)}),P.on("blank:click",({data:se})=>{K()}),P.on("edge:click",({data:se})=>{i.value=null,a.value=se,f.value=!1,h.value=!1}),P.on("edge:dbclick",({data:se})=>{a.value=se,i.value=null,he()}),P.on("node:dnd-add",({data:se})=>{var oe,ce,Ae;if(i.value=se,a.value=null,se.type==="start-node"){if((P.getGraphData().nodes||[]).some(nt=>nt.type==="start-node"&&nt.id===O.startNodeId)){hr.error("\u8F93\u5165\u8282\u70B9\u53EA\u80FD\u5B58\u5728\u4E00\u4E2A"),P.deleteNode(se.id),i.value=null;return}const Me=se.x,Fe=se.y;P.deleteNode(se.id);const at=P.addNode({id:O.startNodeId,type:"start-node",x:Me,y:Fe,text:Uu("Input")});i.value=at;return}const X=P.getNodeModelById(se.id);if(X){let ye=se.properties.model||{};ye.id=se.id,ye.name||(ye.name=se.text.value),X.setProperty("model",ye)}se.type!=="group-node"&&((Ae=(ce=(oe=se==null?void 0:se.properties)==null?void 0:oe.view)==null?void 0:ce.fields)==null?void 0:Ae.length)>0&&(S=se,he(!0))}),P.on("node:add",({data:se})=>{if(se.type==="start-node"&&!(se.properties&&se.properties.innerGroupStart)){if(P.graphModel.nodes.some(Ae=>Ae.type==="start-node"&&Ae.id===O.startNodeId)&&se.id!==O.startNodeId){hr.error("\u8F93\u5165\u8282\u70B9\u53EA\u80FD\u5B58\u5728\u4E00\u4E2A"),P.deleteNode(se.id);return}if(se.id!==O.startNodeId){const Ae=se.x,ye=se.y;P.deleteNode(se.id),P.addNode({id:O.startNodeId,type:"start-node",x:Ae,y:ye,text:Uu("Input")});return}}let X=se.properties.model;const oe=P.getNodeModelById(se.id);X&&oe&&(X.id=se.id,oe.setProperty("model",X))});let Oe=!1;P.on("node:properties-change",({id:se,properties:X})=>{const oe=P.getNodeDataById(se);oe&&oe.type==="group-node"&&X&&X.hasOwnProperty("isCollapsed")&&(Oe=!0,setTimeout(()=>{Oe=!1},100))}),P.on("edge:add",({data:se})=>{if(Oe)return;let X=P.getNodeEdges(se.sourceNodeId);X&&X.length>1&&P.getNodeDataById(se.sourceNodeId).type==="start-node"&&P.deleteEdge(se.id),x=se,a.value=se,i.value=null,se.sourceNodeId!==O.startNodeId&&he(!0)}),P.on("node:drop",({data:se})=>{let X=se.properties.model;X&&(X.additionalInfo?(X.layoutX=se.x,X.layoutY=se.y):X.additionalInfo={layoutX:se.x,layoutY:se.y})}),P.on("rulego-editor:new",se=>{$e();let X=typeof se=="string"?JSON.parse(se):se;X.id||(X.id=Fn.genId()),w.value=X}),P.on("rulego-editor:open",se=>{let X=typeof se=="string"?JSON.parse(se):se;Ne(X)}),P.on("rulego-editor:update",se=>{let X=typeof se=="string"?JSON.parse(se):se;w.name=X.name,w.root=X.root||!0,w.disabled=X.disabled,w.additionalInfo=X.additionalInfo}),P.on("rulego-editor:setting",se=>{se.baseUrl&&se.baseUrl!==m.value.url?(m.value.url=se.baseUrl,m.value.toolbar=se.toolbar,k.url=se.baseUrl,M.url=se.baseUrl,ue().then(X=>{k.components=X,b=G(k.components),D()})):(m.value.url=se.baseUrl,m.value.toolbar=se.toolbar)}),P.on("rulego-editor:fullScreen",()=>{}),P.on("rulego-editor:save",()=>{ie()}),P.on("rulego-editor:reset",se=>{n("reset",se)}),P.on("rulego-editor:deleteSelects",()=>{te()}),P.on("rulego-editor:showEditPanel",()=>{he(!1)}),P.on("history:change",se=>{C=se.data.undos,E=se.data.redos}),P.on("rulego-editor:loadComponents",se=>{k.components=k.adapterComponents(se),P.graphModel.eventCenter.emit("rulego-editor:componentOk",k.components)})},F=Oe=>{i.value=Oe;let se=Oe.properties.model;!se.type&&Oe.properties.view&&(se.type=Oe.properties.view.type),l.value=b[se.type]||Oe.properties.view,se.id=se.id||Oe.id,se.nodeId=Oe.id,se.additionalInfo?(se.layoutX=Oe.x,se.layoutY=Oe.y):se.additionalInfo={layoutX:Oe.x,layoutY:Oe.y},s.value=se||{}},W=Oe=>{const se=P.getNodeModelById(Oe.nodeId);se&&(i.value=se,se.setProperty("model",Oe),se.updateText(Oe.name));let X=se.getData();if(X.type==="endpoint-node")H(Oe.nodeId,Oe);else{let oe=X.properties||{};re(Oe.nodeId,oe.view||{},Oe)}S=null,d.value=!1,f.value=!1},I=()=>{S&&(P.deleteNode(S.id),S=null),ne()},Q=Oe=>{const se=P.getEdgeModelById(Oe.id);se&&(a.value=se,P.getNodeDataById(se.sourceNodeId).type==="endpoint-node"?(Oe.routerId=Oe.relationTypes[0],se.updateText(Oe.relationTypesLabel.join(k.endpointRelationTypeSplit))):se.updateText(Oe.relationTypesLabel.join(k.relationTypeSplit)),se.setProperty("model",Oe)),x=null,v.value=!1,h.value=!1},L=()=>{x&&(P.deleteEdge(x.id),x=null),ne()},H=(Oe,se)=>{P.getEdgeModels({sourceNodeId:Oe}).forEach(oe=>{let ce=oe.properties.model||{},Ae=Fn.getRouterRelationTypeLabel(se,ce.routerId||ce.relationTypes);if(Ae.length===0)P.deleteEdge(oe.id);else{let ye=Ae.map(Te=>Te.label);oe.updateText(ye.join(k.endpointRelationTypeSplit))}})},re=(Oe,se,X)=>{if(!se.relationTypeDynamics)return;let oe=P.getEdgeModels({sourceNodeId:Oe}),ce=Fn.getRelationTypeOptionsFromNode(se,X);oe.forEach(Ae=>{(Ae.properties.model||{}).relationTypes.every(Me=>ce.find(Fe=>Fe.value===Me))||P.deleteEdge(Ae.id)})},U=()=>{Fn.readFromClipboard().then(Oe=>{!J(Oe)&&O.currentCloneNodeId&&P.cloneNode(O.currentCloneNodeId)}).catch(Oe=>{O.currentCloneNodeId&&P.cloneNode(O.currentCloneNodeId)})},J=Oe=>{if(!Oe)return!1;try{let se=JSON.parse(Oe);if(!se.type)return!1;O.nodeCount++,se.id="node_"+O.nodeCount;let X=O.mouseX,oe=O.mouseY,ce=b[se.type];return ce?(P.addNode({id:se.id,type:ce.nodeType||"simple-node",x:X,y:oe,text:se.name,properties:{view:ce,model:se}}),!0):!1}catch{return!1}},ie=async()=>{var se;let Oe=P.getGraphData();try{let X=Fn.validator.validate(Oe);if(X){hr.error(X.message);return}await IGe(w.value.id,Oe),hr({showClose:!0,message:"\u4FDD\u5B58\u6210\u529F",type:"success"}),n("saveOk",Oe),P.graphModel.eventCenter.emit("rulego-editor:saveOk",Oe)}catch(X){hr.error(((se=X.response)==null?void 0:se.data)||X.toString()),n("saveError",Oe,X)}},te=()=>{const{nodes:Oe,edges:se}=P.getSelectElements(),X=P.graphModel.nodes||[],oe=X.filter(Fe=>Fe.type==="endpoint-node").length,ce=X.some(Fe=>Fe.type==="start-node"),Ae=Oe||[],ye=Ae.filter(Fe=>Fe.type==="start-node").length,Te=Ae.filter(Fe=>Fe.type==="endpoint-node").length,Me=oe-Te+(ce?1:0)-ye;if(Ae.length>0&&Me<1){hr.error("\u753B\u5E03\u81F3\u5C11\u9700\u8981\u4FDD\u7559\u4E00\u4E2A\u8F93\u5165\u7AEF\u6216\u9ED8\u8BA4\u8F93\u5165\u8282\u70B9");return}se&&se.forEach(Fe=>{P.deleteEdge(Fe.id)}),Ae.length>0&&Ae.forEach(Fe=>{Fe.type==="start-node"?oe>=1&&P.deleteNode(Fe.id):P.deleteNode(Fe.id)}),P.graphModel.eventCenter.emit("rulego-editor:deleted"),K()},he=Oe=>{if(i.value){let se=i.value;se.type!=="start-node"&&(F(se),Oe?d.value=!0:f.value=!0,h.value=!1)}else{let se=a.value,X=P.getNodeDataById(se.sourceNodeId);if(X.type==="start-node")return;let oe=X.properties.model||{},ce=oe.type;l.value=b[ce];let Ae=P.getEdgeModels({sourceNodeId:X.id}),ye=[];if(X.type==="endpoint-node"){if(ye=Fn.getRelationTypeOptionsFromRouters(Ae,oe,se.id),X.type==="endpoint-node"&&ye.length===0){hr.error("\u8F93\u5165\u7AEF\u6BCF\u4E2A\u8DEF\u7531\u53EA\u5141\u8BB8\u4E00\u6761\u8FB9"),P.deleteEdge(se.id);return}}else ye=Fn.getRelationTypeOptionsFromNode(X.properties.view||{},oe);c.value=ye.length>0?ye:null,u.value=se.properties.model||{id:se.id,fromId:se.sourceNodeId,toId:se.targetNodeId,type:""},u.value.id=se.id,d.value=!1,f.value=!1,Oe?v.value=!0:h.value=!0}},K=()=>{i.value=null,a.value=null,S=null,x=null,ne()},ne=()=>{d.value=!1,f.value=!1,v.value=!1,h.value=!1},fe=()=>{O={nodeCount:0,edgeCount:0,startNodeId:"$node_start_input",nodeWidth:100,currentCloneNodeId:""},i.value=null,a.value=null,d.value=!1,f.value=!1,h.value=!1,g.value=!1,w.value={}},Ne=Oe=>{T.value=Oe,fe(),P||R(),P.render(Oe),M1(P),C.length=0,E.length=0},$e=()=>{P.clearData(),Ne({})},ue=async()=>{m.value.url+k.componentsApi;const Oe=await jGe();return k.adapterComponents(Oe.data)},G=Oe=>{let se={};for(let X in Oe)Oe[X].components&&Oe[X].components.forEach(oe=>{se[oe.type]=oe});return se},ve=Oe=>{let se=P.getNodeModelById(Oe);return se&&se.properties&&se.properties.model?se.properties.model.id:""},q=()=>P.getGraphData(),Ie=Oe=>{k.locales=Oe,k.components=k.adapterComponents(k.builtinComponents),b=G(k.components),P.graphModel.eventCenter.emit("rulego-editor:componentOk",k.components)},Ee=()=>{ue().then(Oe=>{k.components=Oe,b=G(k.components),P.graphModel.eventCenter.emit("rulego-editor:componentOk",k.components)})};return e({render:Ne,save:ie,lf:P,getData:q,setLocales:Ie,reloadComponents:Ee}),(Oe,se)=>(N(),Z("div",Lut,[ee("div",{ref_key:"container",ref:o,class:"container"},null,512),f.value?(N(),me(Put,{key:0,show:f.value,currentNodeModel:s.value,currentNodeView:l.value,debugDataUrl:m.value.url+p(k).debugDataApi,chainId:p(w).id,lf:p(P),onSubmit:W,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","debugDataUrl","chainId","lf"])):ge("",!0),d.value?(N(),me(Mut,{key:1,show:d.value,currentNodeModel:s.value,currentNodeView:l.value,lf:p(P),onSubmit:W,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","lf"])):ge("",!0),h.value?(N(),me(yst,{key:2,show:h.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(k).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,onSubmit:Q,onCancel:L},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"])):ge("",!0),v.value?(N(),me(_st,{key:3,show:v.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(k).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,lf:p(P),onSubmit:Q,onCancel:L},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions","lf"])):ge("",!0)]))}};var Fut=zl(But,[["__scopeId","data-v-c49d42f8"]]);const Vut={__name:"App",setup(t){const e=z(),n=z(!1),r=z({url:"http://127.0.0.1:9090",toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0}}),o=z({});let i=window.location.hash.slice(1);jt(()=>{try{const s=ND();s&&(r.value.url=s.baseUrl||r.value.url)}catch(s){console.error("\u8BFB\u53D6\u6570\u636E\u51FA\u9519:",s)}finally{n.value=!0}a(i!==""&&i!=="#undefined"?i:"get/latest")});const a=async s=>{var c;let l,u;try{let d=await WGe();l=d.data,e.value.setLocales(l),d=await dq(s),u=d.data,window.location.hash=(c=u==null?void 0:u.ruleChain)==null?void 0:c.id,e.value.render(u,l)}catch(d){console.error("Error fetching data:",d)}};return(s,l)=>n.value?(N(),me(Fut,{key:0,ref_key:"ruleGoEditorRef",ref:e,data:o.value,options:r.value},null,8,["data","options"])):ge("",!0)}},dte=qv(Vut);dte.use(Zze,{locale:qX});dte.mount("#app")});export default zut();