Socket
Socket
Sign inDemoInstall

@jledentu/vue-finder

Package Overview
Dependencies
22
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0 to 4.1.1

2

dist/vue-finder.cjs.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var s=require("vue"),gt=typeof global=="object"&&global&&global.Object===Object&&global,ze=gt,pt=typeof self=="object"&&self&&self.Object===Object&&self,mt=ze||pt||Function("return this")(),w=mt,vt=w.Symbol,v=vt,Ue=Object.prototype,yt=Ue.hasOwnProperty,bt=Ue.toString,$=v?v.toStringTag:void 0;function _t(e){var t=yt.call(e,$),r=e[$];try{e[$]=void 0;var n=!0}catch{}var a=bt.call(e);return n&&(t?e[$]=r:delete e[$]),a}var wt=Object.prototype,Dt=wt.toString;function Tt(e){return Dt.call(e)}var Ot="[object Null]",Ct="[object Undefined]",pe=v?v.toStringTag:void 0;function B(e){return e==null?e===void 0?Ct:Ot:pe&&pe in Object(e)?_t(e):Tt(e)}function E(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function ne(e){return typeof e=="symbol"||E(e)&&B(e)==At}function Ze(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var St=Array.isArray,y=St,Et=1/0,me=v?v.prototype:void 0,ve=me?me.toString:void 0;function ke(e){if(typeof e=="string")return e;if(y(e))return Ze(e,ke)+"";if(ne(e))return ve?ve.call(e):"";var t=e+"";return t=="0"&&1/e==-Et?"-0":t}function ie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ae(e){return e}var Mt="[object AsyncFunction]",xt="[object Function]",It="[object GeneratorFunction]",Nt="[object Proxy]";function Ve(e){if(!ie(e))return!1;var t=B(e);return t==xt||t==It||t==Mt||t==Nt}var Pt=w["__core-js_shared__"],K=Pt,ye=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ft(e){return!!ye&&ye in e}var Bt=Function.prototype,$t=Bt.toString;function x(e){if(e!=null){try{return $t.call(e)}catch{}try{return e+""}catch{}}return""}var Lt=/[\\^$.*+?()[\]{}|]/g,jt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Gt=Object.prototype,Ht=Rt.toString,zt=Gt.hasOwnProperty,Ut=RegExp("^"+Ht.call(zt).replace(Lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zt(e){if(!ie(e)||Ft(e))return!1;var t=Ve(e)?Ut:jt;return t.test(x(e))}function kt(e,t){return e==null?void 0:e[t]}function I(e,t){var r=kt(e,t);return Zt(r)?r:void 0}var Vt=I(w,"WeakMap"),J=Vt;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function qt(){}var Kt=800,Yt=16,Xt=Date.now;function Jt(e){var t=0,r=0;return function(){var n=Xt(),a=Yt-(n-r);if(r=n,a>0){if(++t>=Kt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Qt(e){return function(){return e}}var er=function(){try{var e=I(Object,"defineProperty");return e({},"",{}),e}catch{}}(),be=er,tr=be?function(e,t){return be(e,"toString",{configurable:!0,enumerable:!1,value:Qt(t),writable:!0})}:ae,rr=tr,nr=Jt(rr),ir=nr;function ar(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function or(e){return e!==e}function sr(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function dr(e,t,r){return t===t?sr(e,t,r):ar(e,or,r)}function We(e,t){var r=e==null?0:e.length;return!!r&&dr(e,t,0)>-1}var lr=9007199254740991,ur=/^(?:0|[1-9]\d*)$/;function qe(e,t){var r=typeof e;return t=t==null?lr:t,!!t&&(r=="number"||r!="symbol"&&ur.test(e))&&e>-1&&e%1==0&&e<t}function Ke(e,t){return e===t||e!==e&&t!==t}var _e=Math.max;function fr(e,t,r){return t=_e(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=_e(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var d=Array(t+1);++a<t;)d[a]=n[a];return d[t]=r(o),Wt(e,this,d)}}function oe(e,t){return ir(fr(e,t,ae),e+"")}var cr=9007199254740991;function se(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cr}function Ye(e){return e!=null&&se(e.length)&&!Ve(e)}var hr=Object.prototype;function gr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||hr;return e===r}function pr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var mr="[object Arguments]";function we(e){return E(e)&&B(e)==mr}var Xe=Object.prototype,vr=Xe.hasOwnProperty,yr=Xe.propertyIsEnumerable,br=we(function(){return arguments}())?we:function(e){return E(e)&&vr.call(e,"callee")&&!yr.call(e,"callee")},de=br;function _r(){return!1}var Je=typeof exports=="object"&&exports&&!exports.nodeType&&exports,De=Je&&typeof module=="object"&&module&&!module.nodeType&&module,wr=De&&De.exports===Je,Te=wr?w.Buffer:void 0,Dr=Te?Te.isBuffer:void 0,Tr=Dr||_r,Q=Tr,Or="[object Arguments]",Cr="[object Array]",Ar="[object Boolean]",Sr="[object Date]",Er="[object Error]",Mr="[object Function]",xr="[object Map]",Ir="[object Number]",Nr="[object Object]",Pr="[object RegExp]",Fr="[object Set]",Br="[object String]",$r="[object WeakMap]",Lr="[object ArrayBuffer]",jr="[object DataView]",Rr="[object Float32Array]",Gr="[object Float64Array]",Hr="[object Int8Array]",zr="[object Int16Array]",Ur="[object Int32Array]",Zr="[object Uint8Array]",kr="[object Uint8ClampedArray]",Vr="[object Uint16Array]",Wr="[object Uint32Array]",g={};g[Rr]=g[Gr]=g[Hr]=g[zr]=g[Ur]=g[Zr]=g[kr]=g[Vr]=g[Wr]=!0;g[Or]=g[Cr]=g[Lr]=g[Ar]=g[jr]=g[Sr]=g[Er]=g[Mr]=g[xr]=g[Ir]=g[Nr]=g[Pr]=g[Fr]=g[Br]=g[$r]=!1;function qr(e){return E(e)&&se(e.length)&&!!g[B(e)]}function Qe(e){return function(t){return e(t)}}var et=typeof exports=="object"&&exports&&!exports.nodeType&&exports,L=et&&typeof module=="object"&&module&&!module.nodeType&&module,Kr=L&&L.exports===et,Y=Kr&&ze.process,Yr=function(){try{var e=L&&L.require&&L.require("util").types;return e||Y&&Y.binding&&Y.binding("util")}catch{}}(),Oe=Yr,Ce=Oe&&Oe.isTypedArray,Xr=Ce?Qe(Ce):qr,tt=Xr,Jr=Object.prototype,Qr=Jr.hasOwnProperty;function en(e,t){var r=y(e),n=!r&&de(e),a=!r&&!n&&Q(e),i=!r&&!n&&!a&&tt(e),o=r||n||a||i,d=o?pr(e.length,String):[],l=d.length;for(var u in e)(t||Qr.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qe(u,l)))&&d.push(u);return d}function tn(e,t){return function(r){return e(t(r))}}var rn=tn(Object.keys,Object),nn=rn,an=Object.prototype,on=an.hasOwnProperty;function sn(e){if(!gr(e))return nn(e);var t=[];for(var r in Object(e))on.call(e,r)&&r!="constructor"&&t.push(r);return t}function rt(e){return Ye(e)?en(e):sn(e)}var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/;function le(e,t){if(y(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ne(e)?!0:ln.test(e)||!dn.test(e)||t!=null&&e in Object(t)}var un=I(Object,"create"),j=un;function fn(){this.__data__=j?j(null):{},this.size=0}function cn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hn="__lodash_hash_undefined__",gn=Object.prototype,pn=gn.hasOwnProperty;function mn(e){var t=this.__data__;if(j){var r=t[e];return r===hn?void 0:r}return pn.call(t,e)?t[e]:void 0}var vn=Object.prototype,yn=vn.hasOwnProperty;function bn(e){var t=this.__data__;return j?t[e]!==void 0:yn.call(t,e)}var _n="__lodash_hash_undefined__";function wn(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=j&&t===void 0?_n:t,this}function M(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=fn;M.prototype.delete=cn;M.prototype.get=mn;M.prototype.has=bn;M.prototype.set=wn;function Dn(){this.__data__=[],this.size=0}function k(e,t){for(var r=e.length;r--;)if(Ke(e[r][0],t))return r;return-1}var Tn=Array.prototype,On=Tn.splice;function Cn(e){var t=this.__data__,r=k(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():On.call(t,r,1),--this.size,!0}function An(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]}function Sn(e){return k(this.__data__,e)>-1}function En(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function D(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}D.prototype.clear=Dn;D.prototype.delete=Cn;D.prototype.get=An;D.prototype.has=Sn;D.prototype.set=En;var Mn=I(w,"Map"),R=Mn;function xn(){this.size=0,this.__data__={hash:new M,map:new(R||D),string:new M}}function In(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function V(e,t){var r=e.__data__;return In(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Nn(e){var t=V(this,e).delete(e);return this.size-=t?1:0,t}function Pn(e){return V(this,e).get(e)}function Fn(e){return V(this,e).has(e)}function Bn(e,t){var r=V(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}T.prototype.clear=xn;T.prototype.delete=Nn;T.prototype.get=Pn;T.prototype.has=Fn;T.prototype.set=Bn;var $n="Expected a function";function ue(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($n);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ue.Cache||T),r}ue.Cache=T;var Ln=500;function jn(e){var t=ue(e,function(n){return r.size===Ln&&r.clear(),n}),r=t.cache;return t}var Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gn=/\\(\\)?/g,Hn=jn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rn,function(r,n,a,i){t.push(a?i.replace(Gn,"$1"):n||r)}),t}),zn=Hn;function Un(e){return e==null?"":ke(e)}function nt(e,t){return y(e)?e:le(e,t)?[e]:zn(Un(e))}var Zn=1/0;function W(e){if(typeof e=="string"||ne(e))return e;var t=e+"";return t=="0"&&1/e==-Zn?"-0":t}function it(e,t){t=nt(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[W(t[r++])];return r&&r==n?e:void 0}function Z(e,t,r){var n=e==null?void 0:it(e,t);return n===void 0?r:n}function at(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ae=v?v.isConcatSpreadable:void 0;function kn(e){return y(e)||de(e)||!!(Ae&&e&&e[Ae])}function q(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=kn),a||(a=[]);++i<o;){var d=e[i];t>0&&r(d)?t>1?q(d,t-1,r,n,a):at(a,d):n||(a[a.length]=d)}return a}function Vn(){this.__data__=new D,this.size=0}function Wn(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function qn(e){return this.__data__.get(e)}function Kn(e){return this.__data__.has(e)}var Yn=200;function Xn(e,t){var r=this.__data__;if(r instanceof D){var n=r.__data__;if(!R||n.length<Yn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new T(n)}return r.set(e,t),this.size=r.size,this}function _(e){var t=this.__data__=new D(e);this.size=t.size}_.prototype.clear=Vn;_.prototype.delete=Wn;_.prototype.get=qn;_.prototype.has=Kn;_.prototype.set=Xn;function Jn(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function Qn(){return[]}var ei=Object.prototype,ti=ei.propertyIsEnumerable,Se=Object.getOwnPropertySymbols,ri=Se?function(e){return e==null?[]:(e=Object(e),Jn(Se(e),function(t){return ti.call(e,t)}))}:Qn,ni=ri;function ii(e,t,r){var n=t(e);return y(e)?n:at(n,r(e))}function Ee(e){return ii(e,rt,ni)}var ai=I(w,"DataView"),ee=ai,oi=I(w,"Promise"),te=oi,si=I(w,"Set"),N=si,Me="[object Map]",di="[object Object]",xe="[object Promise]",Ie="[object Set]",Ne="[object WeakMap]",Pe="[object DataView]",li=x(ee),ui=x(R),fi=x(te),ci=x(N),hi=x(J),S=B;(ee&&S(new ee(new ArrayBuffer(1)))!=Pe||R&&S(new R)!=Me||te&&S(te.resolve())!=xe||N&&S(new N)!=Ie||J&&S(new J)!=Ne)&&(S=function(e){var t=B(e),r=t==di?e.constructor:void 0,n=r?x(r):"";if(n)switch(n){case li:return Pe;case ui:return Me;case fi:return xe;case ci:return Ie;case hi:return Ne}return t});var Fe=S,gi=w.Uint8Array,Be=gi,pi="__lodash_hash_undefined__";function mi(e){return this.__data__.set(e,pi),this}function vi(e){return this.__data__.has(e)}function F(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new T;++t<r;)this.add(e[t])}F.prototype.add=F.prototype.push=mi;F.prototype.has=vi;function yi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function fe(e,t){return e.has(t)}var bi=1,_i=2;function ot(e,t,r,n,a,i){var o=r&bi,d=e.length,l=t.length;if(d!=l&&!(o&&l>d))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var c=-1,h=!0,b=r&_i?new F:void 0;for(i.set(e,t),i.set(t,e);++c<d;){var p=e[c],m=t[c];if(n)var O=o?n(m,p,c,t,e,i):n(p,m,c,e,t,i);if(O!==void 0){if(O)continue;h=!1;break}if(b){if(!yi(t,function(C,A){if(!fe(b,A)&&(p===C||a(p,C,r,n,i)))return b.push(A)})){h=!1;break}}else if(!(p===m||a(p,m,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function wi(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ce(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Di=1,Ti=2,Oi="[object Boolean]",Ci="[object Date]",Ai="[object Error]",Si="[object Map]",Ei="[object Number]",Mi="[object RegExp]",xi="[object Set]",Ii="[object String]",Ni="[object Symbol]",Pi="[object ArrayBuffer]",Fi="[object DataView]",$e=v?v.prototype:void 0,X=$e?$e.valueOf:void 0;function Bi(e,t,r,n,a,i,o){switch(r){case Fi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pi:return!(e.byteLength!=t.byteLength||!i(new Be(e),new Be(t)));case Oi:case Ci:case Ei:return Ke(+e,+t);case Ai:return e.name==t.name&&e.message==t.message;case Mi:case Ii:return e==t+"";case Si:var d=wi;case xi:var l=n&Di;if(d||(d=ce),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=Ti,o.set(e,t);var f=ot(d(e),d(t),n,a,i,o);return o.delete(e),f;case Ni:if(X)return X.call(e)==X.call(t)}return!1}var $i=1,Li=Object.prototype,ji=Li.hasOwnProperty;function Ri(e,t,r,n,a,i){var o=r&$i,d=Ee(e),l=d.length,u=Ee(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var h=d[c];if(!(o?h in t:ji.call(t,h)))return!1}var b=i.get(e),p=i.get(t);if(b&&p)return b==t&&p==e;var m=!0;i.set(e,t),i.set(t,e);for(var O=o;++c<l;){h=d[c];var C=e[h],A=t[h];if(n)var ge=o?n(A,C,h,t,e,i):n(C,A,h,e,t,i);if(!(ge===void 0?C===A||a(C,A,r,n,i):ge)){m=!1;break}O||(O=h=="constructor")}if(m&&!O){var H=e.constructor,z=t.constructor;H!=z&&"constructor"in e&&"constructor"in t&&!(typeof H=="function"&&H instanceof H&&typeof z=="function"&&z instanceof z)&&(m=!1)}return i.delete(e),i.delete(t),m}var Gi=1,Le="[object Arguments]",je="[object Array]",U="[object Object]",Hi=Object.prototype,Re=Hi.hasOwnProperty;function zi(e,t,r,n,a,i){var o=y(e),d=y(t),l=o?je:Fe(e),u=d?je:Fe(t);l=l==Le?U:l,u=u==Le?U:u;var f=l==U,c=u==U,h=l==u;if(h&&Q(e)){if(!Q(t))return!1;o=!0,f=!1}if(h&&!f)return i||(i=new _),o||tt(e)?ot(e,t,r,n,a,i):Bi(e,t,l,r,n,a,i);if(!(r&Gi)){var b=f&&Re.call(e,"__wrapped__"),p=c&&Re.call(t,"__wrapped__");if(b||p){var m=b?e.value():e,O=p?t.value():t;return i||(i=new _),a(m,O,r,n,i)}}return h?(i||(i=new _),Ri(e,t,r,n,a,i)):!1}function he(e,t,r,n,a){return e===t?!0:e==null||t==null||!E(e)&&!E(t)?e!==e&&t!==t:zi(e,t,r,n,he,a)}var Ui=1,Zi=2;function ki(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var d=r[a];if(o&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++a<i;){d=r[a];var l=d[0],u=e[l],f=d[1];if(o&&d[2]){if(u===void 0&&!(l in e))return!1}else{var c=new _;if(n)var h=n(u,f,l,e,t,c);if(!(h===void 0?he(f,u,Ui|Zi,n,c):h))return!1}}return!0}function st(e){return e===e&&!ie(e)}function Vi(e){for(var t=rt(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,st(a)]}return t}function dt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Wi(e){var t=Vi(e);return t.length==1&&t[0][2]?dt(t[0][0],t[0][1]):function(r){return r===e||ki(r,e,t)}}function qi(e,t){return e!=null&&t in Object(e)}function Ki(e,t,r){t=nt(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=W(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&se(a)&&qe(o,a)&&(y(e)||de(e)))}function Yi(e,t){return e!=null&&Ki(e,t,qi)}var Xi=1,Ji=2;function Qi(e,t){return le(e)&&st(t)?dt(W(e),t):function(r){var n=Z(r,e);return n===void 0&&n===t?Yi(r,e):he(t,n,Xi|Ji)}}function ea(e){return function(t){return t==null?void 0:t[e]}}function ta(e){return function(t){return it(t,e)}}function ra(e){return le(e)?ea(W(e)):ta(e)}function na(e){return typeof e=="function"?e:e==null?ae:typeof e=="object"?y(e)?Qi(e[0],e[1]):Wi(e):ra(e)}function P(e){return E(e)&&Ye(e)}function lt(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var ia=200;function ut(e,t,r,n){var a=-1,i=We,o=!0,d=e.length,l=[],u=t.length;if(!d)return l;r&&(t=Ze(t,Qe(r))),n?(i=lt,o=!1):t.length>=ia&&(i=fe,o=!1,t=new F(t));e:for(;++a<d;){var f=e[a],c=r==null?f:r(f);if(f=n||f!==0?f:0,o&&c===c){for(var h=u;h--;)if(t[h]===c)continue e;l.push(f)}else i(t,c,n)||l.push(f)}return l}var aa=oe(function(e,t){return P(e)?ut(e,q(t,1,P,!0)):[]}),oa=aa;function sa(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var da=oe(function(e,t){var r=sa(t);return P(r)&&(r=void 0),P(e)?ut(e,q(t,1,P,!0),na(r)):[]}),la=da;function ua(e){return e==null}var fa=1/0,ca=N&&1/ce(new N([,-0]))[1]==fa?function(e){return new N(e)}:qt,ha=ca,ga=200;function pa(e,t,r){var n=-1,a=We,i=e.length,o=!0,d=[],l=d;if(r)o=!1,a=lt;else if(i>=ga){var u=t?null:ha(e);if(u)return ce(u);o=!1,a=fe,l=new F}else l=t?[]:d;e:for(;++n<i;){var f=e[n],c=t?t(f):f;if(f=r||f!==0?f:0,o&&c===c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),d.push(f)}else a(l,c,r)||(l!==d&&l.push(c),d.push(f))}return d}var ma=oe(function(e){return pa(q(e,1,P,!0))}),va=ma;function re(e,t){return e.id===t||(e.children?e.children.some(r=>re(r,t)):!1)}function Ge(e){const t={};function r(n,a){if(!(!n||!n.id)&&(t[n.id]={...n,...a?{parent:a}:{}},n.children))for(let i=0,o=n.children.length;i<o;++i)r(n.children[i],n.id)}return r(e),t}function ya(e,t){function r(n){const a=t[n];return a?[...r(a.parent),n]:[]}return r(e)}function He(e,t,r){const n=[];function a(i){const o=r[i],d=(o.children||[]).map(l=>a(l.id)).filter(({toHide:l})=>!l);return d.length===0&&!e(o)?{...o,toHide:!0}:(n.push(i),{...o,children:d})}return a(t),n}class ba{constructor(){this.listeners={}}on(t,r){this.listeners[t]=[...this.listeners[t]||[],r]}off(t,r){let n=this.listeners[t];n&&(this.listeners[t]=n.filter(a=>a===r))}trigger(t,...r){const n=this.listeners[t];n&&n.forEach(a=>a.apply(null,r))}}class _a extends ba{constructor(t={},r={}){super(),Object.defineProperty(this,"_root",{value:t,configurable:!1,writable:!0}),Object.defineProperty(this,"nodesMap",{value:Ge(t),configurable:!1,writable:!0}),this._initExpanded(r.defaultExpanded),this.selected=Object.values(this.nodesMap).filter(({selected:n})=>n).map(({id:n})=>n),this.filtered=[],r.filter&&(this.filter=r.filter),this.autoSelectDescendants=r.autoSelectDescendants,this.autoDeselectDescendants=r.autoDeselectDescendants,this._updateVisibleTree(),this.draggedNodeId=void 0}_initExpanded(t){t?this.expandNode(t):this.root&&this.root.id?(this.expanded=[this.root.id],this.expandedWithoutFilter=this.expanded):(this.expanded=[],this.expandedWithoutFilter=[])}_updateVisibleTree(){this.visibleTree=this._computeVisibleTree(this.root.id,{expanded:this.expanded})}_detachNodeFromParent(t){const r=this._getNode(t.parent);t.parent=void 0,r&&(r.children=la(r.children||[],[t],({id:n})=>n))}_attachNodeToParent(t,r,n){this._detachNodeFromParent(t);const a=this._getNode(r);a&&(t.parent=a.id,ua(n)?a.children=[...a.children||[],{...t}]:a.children=[...(a.children||[]).slice(0,n),{...t},...(a.children||[]).slice(n)])}_computeVisibleTree(t,{expanded:r}){const n=this._getNode(t);if(!n)return{};const a=n.children||[];return{...n,children:r.includes(n.id)?a.filter(i=>this.isNodeFiltered(i.id)).map(i=>this._computeVisibleTree(i.id,{expanded:r})):[],isLeaf:a.length===0}}_getNode(t){return this.nodesMap[t]}_getNodeData(t){const{children:r,parent:n,selected:a,...i}=this.nodesMap[t];return i}expandNode(t,r){this.expanded=ya(t,this.nodesMap),this.expandedWithoutFilter=this.expanded,this._updateVisibleTree(),this.trigger("expand",this.expanded,r,this.expanded.map(n=>this._getNodeData(n)))}isNodeExpanded(t){return this.expanded.includes(t)}selectNode(t,r){const a=(r?this.autoSelectDescendants:this.autoDeselectDescendants)?He(i=>i.selectable!==!1,t,this.nodesMap):[t];this.selected=(r?va:oa)(this.selected,a),this.trigger("select",this.selected,this.selected.map(i=>this._getNodeData(i)))}isNodeSelected(t){return this.selected.includes(t)}isNodeFiltered(t){return!this._filter||this.filtered.includes(t)}startDrag(t){Object.prototype.hasOwnProperty.call(this.nodesMap,t)&&(this.draggedNodeId=t)}stopDrag(){this.draggedNodeId=void 0}isParent(t,r){const n=this._getNode(t);return!!n&&re(n,r)}dropOnNode(t,r){if(!this.isDragging()||this.isNodeDragged(t))return;const n=this._getNode(this.draggedNodeId);re(n,t)||(this._attachNodeToParent(n,t,r),this.expandNode(this.draggedNodeId,"drop"),this.draggedNodeId=void 0,this._updateVisibleTree(),this.trigger("move",{moved:n.id,to:t,index:r}))}isNodeDragged(t){return this.draggedNodeId===t}isDragging(){return this.draggedNodeId!==void 0}get root(){return this._root}set root(t={}){this._root=t,this.nodesMap=Ge(t),(!this.expanded.length||this.expanded.some(r=>!this.nodesMap[r]))&&this._initExpanded(),this._applyFilter(),this._updateVisibleTree()}set filter(t){this._filter=t,this._applyFilter(),this._updateVisibleTree()}_applyFilter(){this._filter?(this.expandedWithoutFilter.some(t=>{const r=this._getNode(t);return this._filter(r)||r.children&&r.children.some(this._filter)})?this.expanded=this.expandedWithoutFilter:this.expanded=[this.root.id],this.filtered=He(this._filter,this.root.id,this.nodesMap)):this.filtered=[]}}var G=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const wa={name:"FinderItemArrow",props:{expanded:{type:Boolean,default:!1},theme:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}}}};function Da(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:"arrow",style:s.normalizeStyle({expanded:r.expanded,...r.theme.arrowColor&&{borderColor:r.theme.arrowColor}})},null,4)}var Ta=G(wa,[["render",Da],["__scopeId","data-v-af4ed7cc"]]);const Oa={name:"FinderListDropZone",props:{treeModel:{type:Object,required:!0},node:{type:Object,required:!0},dragEnabled:{type:[Boolean,Function],default:!1},index:{type:Number,default:void 0},options:{type:Object,default:()=>({})}},data:()=>({dragCounter:0}),computed:{dragOver(){return this.treeModel.isDragging()&&this.canDrop&&this.dragCounter>0},theme(){return Z(this,"options.theme",{})},canDrag(){return typeof this.dragEnabled=="function"?this.dragEnabled(this.node):this.dragEnabled},canDrop(){return this.treeModel.isParent(this.treeModel.draggedNodeId,this.node.id)?!1:!this.options.canDrop||this.options.canDrop(this.node.id,this.treeModel.draggedNodeId)}},methods:{onDragEnter(){this.dragCounter++},onDragLeave(){this.dragCounter--},onDrop(e){e.preventDefault(),this.dragCounter=0,!(!this.canDrop||!this.treeModel.isDragging())&&this.treeModel.dropOnNode(this.node.id,this.index)}}};function Ca(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["drop-zone",{"drag-over":i.dragOver,dragging:r.treeModel.isDragging(),"no-drop":r.treeModel.isDragging()&&!i.canDrop}]),style:s.normalizeStyle({...i.dragOver&&i.theme.primaryColor&&{borderColor:i.theme.primaryColor},...i.dragOver&&i.theme.dropZoneBgColor&&{backgroundColor:i.theme.dropZoneBgColor}}),onDragenter:t[0]||(t[0]=s.withModifiers((...o)=>i.onDragEnter&&i.onDragEnter(...o),["prevent"])),onDragleave:t[1]||(t[1]=s.withModifiers((...o)=>i.onDragLeave&&i.onDragLeave(...o),["prevent"])),onDragover:t[2]||(t[2]=s.withModifiers(()=>{},["prevent"])),onDrop:t[3]||(t[3]=s.withModifiers((...o)=>i.onDrop&&i.onDrop(...o),["prevent"]))},[r.options.dropZoneComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.options.dropZoneComponent),{key:0,dragging:r.treeModel.isDragging(),"drag-over":i.dragOver,style:{"flex-grow":"1"}},null,8,["dragging","drag-over"])):s.createCommentVNode("",!0)],38)}var ft=G(Oa,[["render",Ca],["__scopeId","data-v-47518178"]]);const Aa={name:"FinderItem",mixins:[ft],props:{selectable:{type:Boolean,default:!1}},data(){return{showGhost:!1,dragHandleOver:!1}},computed:{expanded(){return this.treeModel.isNodeExpanded(this.node.id)},selected(){return this.treeModel.isNodeSelected(this.node.id)},dragged(){return this.treeModel.isNodeDragged(this.node.id)},itemComponent(){return this.options.itemComponent||"div"},arrowComponent(){return this.options.arrowComponent||Ta}},watch:{dragOver(e){e&&this.canDrop&&!this.node.isLeaf?this.dragOverTimeout=setTimeout(()=>this.treeModel.expandNode(this.node.id,"dragover"),500):this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)},node(){this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)}},methods:{onMouseDown(){this.mousedown=!0,setTimeout(()=>{this.mousedown=!1},100)},onClick(){this.treeModel.expandNode(this.node.id,"click")},onFocus(){this.mousedown||this.treeModel.expandNode(this.node.id,"focus")},onSelect(e){this.treeModel.selectNode(this.node.id,e.target.checked)},async onDragStart(e){!this.canDrag||(this.options.dragImageComponent&&(this.showGhost=!0,await this.$nextTick(),e.dataTransfer.setDragImage(this.$refs.ghost.$el,0,0)),e.dataTransfer.setData("text/plain",this.node.id),this.treeModel.startDrag(this.node.id))},onDragOver(e){!this.canDrag||(e.preventDefault(),this.canDrop?e.dataTransfer.dropEffect="move":e.dataTransfer.dropEffect="none")},onDragEnd(){this.showGhost=!1,this.canDrag&&(this.dragHandleOver=!1,this.treeModel.stopDrag())}}},Sa=e=>(s.pushScopeId("data-v-6a473606"),e=e(),s.popScopeId(),e),Ea=["draggable","aria-expanded"],Ma=Sa(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[s.createElementVNode("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14m6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6m0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14"})],-1)),xa=[Ma],Ia=["checked","disabled","aria-label"];function Na(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",s.mergeProps({class:["item",[e.node.cssClass||"",{expanded:i.expanded,draggable:e.canDrag&&!e.options.hasDragHandle,dragged:i.dragged,"has-drag-handle":e.canDrag&&e.options.hasDragHandle,"drag-over":e.dragOver,"no-drop":e.treeModel.isDragging()&&!e.canDrop}]],role:"button",style:{...i.expanded&&e.theme.primaryColor&&{backgroundColor:e.theme.primaryColor},...i.dragged&&e.theme.draggedItemBgColor&&{backgroundColor:e.theme.draggedItemBgColor},...i.dragged&&e.theme.draggedItemBoxShadow&&{"box-shadow":e.theme.draggedItemBoxShadow},...e.dragOver&&e.theme.primaryColor&&{borderColor:e.theme.primaryColor},...e.dragOver&&e.theme.dropZoneBgColor&&{backgroundColor:e.theme.dropZoneBgColor}},draggable:e.canDrag&&(!e.options.hasDragHandle||a.dragHandleOver),"aria-expanded":e.node.isLeaf?void 0:i.expanded},e.$attrs,{onMousedown:t[4]||(t[4]=(...o)=>i.onMouseDown&&i.onMouseDown(...o)),onClick:t[5]||(t[5]=(...o)=>i.onClick&&i.onClick(...o)),onDragenter:t[6]||(t[6]=(...o)=>e.onDragEnter&&e.onDragEnter(...o)),onDragleave:t[7]||(t[7]=(...o)=>e.onDragLeave&&e.onDragLeave(...o)),onDragstart:t[8]||(t[8]=(...o)=>i.onDragStart&&i.onDragStart(...o)),onDragover:t[9]||(t[9]=(...o)=>i.onDragOver&&i.onDragOver(...o)),onDrop:t[10]||(t[10]=(...o)=>e.onDrop&&e.onDrop(...o)),onDragend:t[11]||(t[11]=(...o)=>i.onDragEnd&&i.onDragEnd(...o)),onFocus:t[12]||(t[12]=(...o)=>i.onFocus&&i.onFocus(...o))}),[e.canDrag&&e.options.hasDragHandle?(s.openBlock(),s.createElementBlock("div",{key:0,class:"drag-handle",onMousedown:t[0]||(t[0]=o=>a.dragHandleOver=!0),onMouseup:t[1]||(t[1]=o=>a.dragHandleOver=!1)},xa,32)):s.createCommentVNode("",!0),r.selectable?(s.openBlock(),s.createElementBlock("input",{key:1,type:"checkbox",checked:i.selected,disabled:e.node.selectable===!1,"aria-label":e.node.label,onClick:t[2]||(t[2]=s.withModifiers(()=>{},["stop"])),onChange:t[3]||(t[3]=(...o)=>i.onSelect&&i.onSelect(...o))},null,40,Ia)):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.itemComponent),{class:"inner-item",item:e.node,expanded:i.expanded,dragged:i.dragged},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["item","expanded","dragged"])),e.node.isLeaf?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.arrowComponent),{key:2,theme:e.theme,expanded:i.expanded,item:e.node},null,8,["theme","expanded","item"]))],16,Ea),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[e.options.dragImageComponent?s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(e.options.dragImageComponent),{key:0,ref:"ghost",item:e.node,style:{"box-shadow":"0 3px 4px rgba(116, 116, 116, 0.3)",position:"absolute",padding:"10px",top:"-1000px","box-sizing":"border-box","pointer-events":"none"}},null,8,["item"])),[[s.vShow,a.showGhost]]):s.createCommentVNode("",!0)]))],64)}var Pa=G(Aa,[["render",Na],["__scopeId","data-v-6a473606"]]);function Fa(e){let t=e.previousSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.previousSibling}}function Ba(e){let t=e.nextSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.nextSibling}}const $a={name:"FinderList",components:{FinderItem:Pa,FinderListDropZone:ft},props:{parent:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},treeModel:{type:Object,required:!0},selectable:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!0},options:{type:Object,default:()=>({})},hasExpandedItem:{type:Boolean,default:!1}},computed:{sortedItems(){return this.options.sortBy?[...this.items].sort(this.options.sortBy):this.items},style(){const e=Z(this.options,"theme.separatorColor",""),t=Z(this.options,"theme.separatorWidth","");return{...e&&{borderColor:e},...t&&{borderWidth:t}}},expandedItemIndex(){return Math.max(0,this.items.findIndex(e=>this.treeModel.isNodeExpanded(e.id)))}},methods:{navigate(e){let t;e.key==="ArrowDown"?t=Ba(e.target):e.key==="ArrowUp"&&(t=Fa(e.target)),t&&t.focus()}}};function La(e,t,r,n,a,i){const o=s.resolveComponent("FinderListDropZone"),d=s.resolveComponent("FinderItem");return s.openBlock(),s.createElementBlock("div",{class:"list",style:s.normalizeStyle(i.style),onKeydown:t[0]||(t[0]=(...l)=>i.navigate&&i.navigate(...l))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.sortedItems,(l,u)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:`item-${l.id}`},[r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,node:r.parent,"tree-model":r.treeModel,"drag-enabled":r.dragEnabled,index:u,options:r.options},null,8,["node","tree-model","drag-enabled","index","options"])):s.createCommentVNode("",!0),s.createVNode(d,{node:l,"tree-model":r.treeModel,selectable:r.selectable,"drag-enabled":r.dragEnabled,options:r.options,tabindex:u===i.expandedItemIndex?"0":"-1"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l.label),1)]),_:2},1032,["node","tree-model","selectable","drag-enabled","options","tabindex"])],64))),128)),r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,class:"last","tree-model":r.treeModel,node:r.parent,"drag-enabled":r.dragEnabled,index:r.items.length,options:r.options},null,8,["tree-model","node","drag-enabled","index","options"])):s.createCommentVNode("",!0)],36)}var ct=G($a,[["render",La],["__scopeId","data-v-21b06b5c"]]);function ht(e,t,r){if(!r||!r.children||r.children.length===0)return null;const n=r.children.find(o=>t.treeModel.isNodeExpanded(o.id)),a={sortBy:t.sortBy,itemComponent:t.itemComponent,arrowComponent:t.arrowComponent,dragImageComponent:t.dragImageComponent,dropZoneComponent:t.dropZoneComponent,theme:t.theme,hasDragHandle:t.hasDragHandle,canDrop:t.canDrop},i=s.createVNode(ct,{ref:"rootList","tree-model":t.treeModel,parent:r,items:r.children,selectable:t.selectable,"drag-enabled":t.dragEnabled,options:a,"has-expanded-item":!!n},null);return s.createVNode("div",{class:"list-container"},[i,n&&ht(e,t,n)])}function ja(e,t,r,n){return-r*(e/=n)*(e-2)+t}var Ra={name:"Finder",components:{FinderList:ct},props:{tree:{type:Object,required:!0},selectable:{type:Boolean,default:!1},autoSelectDescendants:{type:Boolean,default:!1},autoDeselectDescendants:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!1},hasDragHandle:{type:Boolean,default:!1},canDrop:{type:Function,default:void 0},filter:{type:Function,default:void 0},sortBy:{type:Function,default:void 0},defaultExpanded:{type:String,default:void 0},itemComponent:{type:[String,Object],default:void 0},arrowComponent:{type:[String,Object],default:void 0},dragImageComponent:{type:[String,Object],default:void 0},dropZoneComponent:{type:[String,Object],default:void 0},theme:{type:Object,default:()=>({})},scrollAnimationDuration:{type:Number,default:200}},emits:["expand","select","move"],data(){return{treeModel:{}}},watch:{tree(e){this.treeModel.root=s.toRaw(e)},filter(e){this.treeModel.filter=e},autoSelectDescendants(e){this.treeModel.autoSelectDescendants=e},autoDeselectDescendants(e){this.treeModel.autoDeselectDescendants=e}},created(){this.treeModel=new _a(s.toRaw(this.tree),{filter:this.filter,defaultExpanded:this.defaultExpanded,autoSelectDescendants:this.autoSelectDescendants,autoDeselectDescendants:this.autoDeselectDescendants}),this.treeModel.on("expand",(e,t,r)=>{t!=="dragover"&&this.$nextTick(()=>{this._scrollToRight(this.scrollAnimationDuration)}),this.$emit("expand",{expanded:e,sourceEvent:t,expandedItems:r})}),this.treeModel.on("select",(e,t)=>{this.$emit("select",{selected:e,selectedItems:t})}),this.treeModel.on("move",({moved:e,to:t,index:r})=>{this.$emit("move",{moved:e,to:t,index:r})})},methods:{expand(e,t="api"){this.treeModel.expandNode(e,t)},_scrollToRight(e){const{scrollLeft:t,scrollWidth:r,offsetWidth:n}=this.$el;if(e===0){this.$el.scrollLeft=r;return}const a=r-n-t;if(a<=0)return;let i=performance.now(),o=0;const d=l=>{if(o+=l-i,o>=e){this.$el.scrollLeft=this.$el.scrollWidth;return}i=l,this.$el.scrollLeft=ja(o,t,a,e),window.requestAnimationFrame(d)};window.requestAnimationFrame(d)}},render(e){return s.createVNode("div",{class:"tree-container"},[this.treeModel&&ht(e,this,this.treeModel.visibleTree)])}};var Ga=G(Ra,[["__scopeId","data-v-51da5e0a"]]);exports.Finder=Ga;
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var s=require("vue"),gt=typeof global=="object"&&global&&global.Object===Object&&global,ze=gt,pt=typeof self=="object"&&self&&self.Object===Object&&self,mt=ze||pt||Function("return this")(),w=mt,vt=w.Symbol,v=vt,Ue=Object.prototype,yt=Ue.hasOwnProperty,bt=Ue.toString,$=v?v.toStringTag:void 0;function _t(e){var t=yt.call(e,$),r=e[$];try{e[$]=void 0;var n=!0}catch{}var a=bt.call(e);return n&&(t?e[$]=r:delete e[$]),a}var wt=Object.prototype,Dt=wt.toString;function Tt(e){return Dt.call(e)}var Ot="[object Null]",Ct="[object Undefined]",pe=v?v.toStringTag:void 0;function B(e){return e==null?e===void 0?Ct:Ot:pe&&pe in Object(e)?_t(e):Tt(e)}function E(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function ne(e){return typeof e=="symbol"||E(e)&&B(e)==At}function Ze(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var St=Array.isArray,y=St,Et=1/0,me=v?v.prototype:void 0,ve=me?me.toString:void 0;function ke(e){if(typeof e=="string")return e;if(y(e))return Ze(e,ke)+"";if(ne(e))return ve?ve.call(e):"";var t=e+"";return t=="0"&&1/e==-Et?"-0":t}function ie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ae(e){return e}var Mt="[object AsyncFunction]",xt="[object Function]",Nt="[object GeneratorFunction]",It="[object Proxy]";function Ve(e){if(!ie(e))return!1;var t=B(e);return t==xt||t==Nt||t==Mt||t==It}var Pt=w["__core-js_shared__"],K=Pt,ye=function(){var e=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ft(e){return!!ye&&ye in e}var Bt=Function.prototype,$t=Bt.toString;function x(e){if(e!=null){try{return $t.call(e)}catch{}try{return e+""}catch{}}return""}var Lt=/[\\^$.*+?()[\]{}|]/g,jt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Gt=Object.prototype,Ht=Rt.toString,zt=Gt.hasOwnProperty,Ut=RegExp("^"+Ht.call(zt).replace(Lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zt(e){if(!ie(e)||Ft(e))return!1;var t=Ve(e)?Ut:jt;return t.test(x(e))}function kt(e,t){return e==null?void 0:e[t]}function N(e,t){var r=kt(e,t);return Zt(r)?r:void 0}var Vt=N(w,"WeakMap"),J=Vt;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function qt(){}var Kt=800,Yt=16,Xt=Date.now;function Jt(e){var t=0,r=0;return function(){var n=Xt(),a=Yt-(n-r);if(r=n,a>0){if(++t>=Kt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Qt(e){return function(){return e}}var er=function(){try{var e=N(Object,"defineProperty");return e({},"",{}),e}catch{}}(),be=er,tr=be?function(e,t){return be(e,"toString",{configurable:!0,enumerable:!1,value:Qt(t),writable:!0})}:ae,rr=tr,nr=Jt(rr),ir=nr;function ar(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function or(e){return e!==e}function sr(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function dr(e,t,r){return t===t?sr(e,t,r):ar(e,or,r)}function We(e,t){var r=e==null?0:e.length;return!!r&&dr(e,t,0)>-1}var lr=9007199254740991,ur=/^(?:0|[1-9]\d*)$/;function qe(e,t){var r=typeof e;return t=t==null?lr:t,!!t&&(r=="number"||r!="symbol"&&ur.test(e))&&e>-1&&e%1==0&&e<t}function Ke(e,t){return e===t||e!==e&&t!==t}var _e=Math.max;function fr(e,t,r){return t=_e(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=_e(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var d=Array(t+1);++a<t;)d[a]=n[a];return d[t]=r(o),Wt(e,this,d)}}function oe(e,t){return ir(fr(e,t,ae),e+"")}var cr=9007199254740991;function se(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cr}function Ye(e){return e!=null&&se(e.length)&&!Ve(e)}var hr=Object.prototype;function gr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||hr;return e===r}function pr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var mr="[object Arguments]";function we(e){return E(e)&&B(e)==mr}var Xe=Object.prototype,vr=Xe.hasOwnProperty,yr=Xe.propertyIsEnumerable,br=we(function(){return arguments}())?we:function(e){return E(e)&&vr.call(e,"callee")&&!yr.call(e,"callee")},de=br;function _r(){return!1}var Je=typeof exports=="object"&&exports&&!exports.nodeType&&exports,De=Je&&typeof module=="object"&&module&&!module.nodeType&&module,wr=De&&De.exports===Je,Te=wr?w.Buffer:void 0,Dr=Te?Te.isBuffer:void 0,Tr=Dr||_r,Q=Tr,Or="[object Arguments]",Cr="[object Array]",Ar="[object Boolean]",Sr="[object Date]",Er="[object Error]",Mr="[object Function]",xr="[object Map]",Nr="[object Number]",Ir="[object Object]",Pr="[object RegExp]",Fr="[object Set]",Br="[object String]",$r="[object WeakMap]",Lr="[object ArrayBuffer]",jr="[object DataView]",Rr="[object Float32Array]",Gr="[object Float64Array]",Hr="[object Int8Array]",zr="[object Int16Array]",Ur="[object Int32Array]",Zr="[object Uint8Array]",kr="[object Uint8ClampedArray]",Vr="[object Uint16Array]",Wr="[object Uint32Array]",g={};g[Rr]=g[Gr]=g[Hr]=g[zr]=g[Ur]=g[Zr]=g[kr]=g[Vr]=g[Wr]=!0;g[Or]=g[Cr]=g[Lr]=g[Ar]=g[jr]=g[Sr]=g[Er]=g[Mr]=g[xr]=g[Nr]=g[Ir]=g[Pr]=g[Fr]=g[Br]=g[$r]=!1;function qr(e){return E(e)&&se(e.length)&&!!g[B(e)]}function Qe(e){return function(t){return e(t)}}var et=typeof exports=="object"&&exports&&!exports.nodeType&&exports,L=et&&typeof module=="object"&&module&&!module.nodeType&&module,Kr=L&&L.exports===et,Y=Kr&&ze.process,Yr=function(){try{var e=L&&L.require&&L.require("util").types;return e||Y&&Y.binding&&Y.binding("util")}catch{}}(),Oe=Yr,Ce=Oe&&Oe.isTypedArray,Xr=Ce?Qe(Ce):qr,tt=Xr,Jr=Object.prototype,Qr=Jr.hasOwnProperty;function en(e,t){var r=y(e),n=!r&&de(e),a=!r&&!n&&Q(e),i=!r&&!n&&!a&&tt(e),o=r||n||a||i,d=o?pr(e.length,String):[],l=d.length;for(var u in e)(t||Qr.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qe(u,l)))&&d.push(u);return d}function tn(e,t){return function(r){return e(t(r))}}var rn=tn(Object.keys,Object),nn=rn,an=Object.prototype,on=an.hasOwnProperty;function sn(e){if(!gr(e))return nn(e);var t=[];for(var r in Object(e))on.call(e,r)&&r!="constructor"&&t.push(r);return t}function rt(e){return Ye(e)?en(e):sn(e)}var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/;function le(e,t){if(y(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ne(e)?!0:ln.test(e)||!dn.test(e)||t!=null&&e in Object(t)}var un=N(Object,"create"),j=un;function fn(){this.__data__=j?j(null):{},this.size=0}function cn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var hn="__lodash_hash_undefined__",gn=Object.prototype,pn=gn.hasOwnProperty;function mn(e){var t=this.__data__;if(j){var r=t[e];return r===hn?void 0:r}return pn.call(t,e)?t[e]:void 0}var vn=Object.prototype,yn=vn.hasOwnProperty;function bn(e){var t=this.__data__;return j?t[e]!==void 0:yn.call(t,e)}var _n="__lodash_hash_undefined__";function wn(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=j&&t===void 0?_n:t,this}function M(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=fn;M.prototype.delete=cn;M.prototype.get=mn;M.prototype.has=bn;M.prototype.set=wn;function Dn(){this.__data__=[],this.size=0}function k(e,t){for(var r=e.length;r--;)if(Ke(e[r][0],t))return r;return-1}var Tn=Array.prototype,On=Tn.splice;function Cn(e){var t=this.__data__,r=k(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():On.call(t,r,1),--this.size,!0}function An(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]}function Sn(e){return k(this.__data__,e)>-1}function En(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function D(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}D.prototype.clear=Dn;D.prototype.delete=Cn;D.prototype.get=An;D.prototype.has=Sn;D.prototype.set=En;var Mn=N(w,"Map"),R=Mn;function xn(){this.size=0,this.__data__={hash:new M,map:new(R||D),string:new M}}function Nn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function V(e,t){var r=e.__data__;return Nn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function In(e){var t=V(this,e).delete(e);return this.size-=t?1:0,t}function Pn(e){return V(this,e).get(e)}function Fn(e){return V(this,e).has(e)}function Bn(e,t){var r=V(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}T.prototype.clear=xn;T.prototype.delete=In;T.prototype.get=Pn;T.prototype.has=Fn;T.prototype.set=Bn;var $n="Expected a function";function ue(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($n);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ue.Cache||T),r}ue.Cache=T;var Ln=500;function jn(e){var t=ue(e,function(n){return r.size===Ln&&r.clear(),n}),r=t.cache;return t}var Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gn=/\\(\\)?/g,Hn=jn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Rn,function(r,n,a,i){t.push(a?i.replace(Gn,"$1"):n||r)}),t}),zn=Hn;function Un(e){return e==null?"":ke(e)}function nt(e,t){return y(e)?e:le(e,t)?[e]:zn(Un(e))}var Zn=1/0;function W(e){if(typeof e=="string"||ne(e))return e;var t=e+"";return t=="0"&&1/e==-Zn?"-0":t}function it(e,t){t=nt(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[W(t[r++])];return r&&r==n?e:void 0}function Z(e,t,r){var n=e==null?void 0:it(e,t);return n===void 0?r:n}function at(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ae=v?v.isConcatSpreadable:void 0;function kn(e){return y(e)||de(e)||!!(Ae&&e&&e[Ae])}function q(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=kn),a||(a=[]);++i<o;){var d=e[i];t>0&&r(d)?t>1?q(d,t-1,r,n,a):at(a,d):n||(a[a.length]=d)}return a}function Vn(){this.__data__=new D,this.size=0}function Wn(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function qn(e){return this.__data__.get(e)}function Kn(e){return this.__data__.has(e)}var Yn=200;function Xn(e,t){var r=this.__data__;if(r instanceof D){var n=r.__data__;if(!R||n.length<Yn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new T(n)}return r.set(e,t),this.size=r.size,this}function _(e){var t=this.__data__=new D(e);this.size=t.size}_.prototype.clear=Vn;_.prototype.delete=Wn;_.prototype.get=qn;_.prototype.has=Kn;_.prototype.set=Xn;function Jn(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function Qn(){return[]}var ei=Object.prototype,ti=ei.propertyIsEnumerable,Se=Object.getOwnPropertySymbols,ri=Se?function(e){return e==null?[]:(e=Object(e),Jn(Se(e),function(t){return ti.call(e,t)}))}:Qn,ni=ri;function ii(e,t,r){var n=t(e);return y(e)?n:at(n,r(e))}function Ee(e){return ii(e,rt,ni)}var ai=N(w,"DataView"),ee=ai,oi=N(w,"Promise"),te=oi,si=N(w,"Set"),I=si,Me="[object Map]",di="[object Object]",xe="[object Promise]",Ne="[object Set]",Ie="[object WeakMap]",Pe="[object DataView]",li=x(ee),ui=x(R),fi=x(te),ci=x(I),hi=x(J),S=B;(ee&&S(new ee(new ArrayBuffer(1)))!=Pe||R&&S(new R)!=Me||te&&S(te.resolve())!=xe||I&&S(new I)!=Ne||J&&S(new J)!=Ie)&&(S=function(e){var t=B(e),r=t==di?e.constructor:void 0,n=r?x(r):"";if(n)switch(n){case li:return Pe;case ui:return Me;case fi:return xe;case ci:return Ne;case hi:return Ie}return t});var Fe=S,gi=w.Uint8Array,Be=gi,pi="__lodash_hash_undefined__";function mi(e){return this.__data__.set(e,pi),this}function vi(e){return this.__data__.has(e)}function F(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new T;++t<r;)this.add(e[t])}F.prototype.add=F.prototype.push=mi;F.prototype.has=vi;function yi(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function fe(e,t){return e.has(t)}var bi=1,_i=2;function ot(e,t,r,n,a,i){var o=r&bi,d=e.length,l=t.length;if(d!=l&&!(o&&l>d))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var c=-1,h=!0,b=r&_i?new F:void 0;for(i.set(e,t),i.set(t,e);++c<d;){var p=e[c],m=t[c];if(n)var O=o?n(m,p,c,t,e,i):n(p,m,c,e,t,i);if(O!==void 0){if(O)continue;h=!1;break}if(b){if(!yi(t,function(C,A){if(!fe(b,A)&&(p===C||a(p,C,r,n,i)))return b.push(A)})){h=!1;break}}else if(!(p===m||a(p,m,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function wi(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ce(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Di=1,Ti=2,Oi="[object Boolean]",Ci="[object Date]",Ai="[object Error]",Si="[object Map]",Ei="[object Number]",Mi="[object RegExp]",xi="[object Set]",Ni="[object String]",Ii="[object Symbol]",Pi="[object ArrayBuffer]",Fi="[object DataView]",$e=v?v.prototype:void 0,X=$e?$e.valueOf:void 0;function Bi(e,t,r,n,a,i,o){switch(r){case Fi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pi:return!(e.byteLength!=t.byteLength||!i(new Be(e),new Be(t)));case Oi:case Ci:case Ei:return Ke(+e,+t);case Ai:return e.name==t.name&&e.message==t.message;case Mi:case Ni:return e==t+"";case Si:var d=wi;case xi:var l=n&Di;if(d||(d=ce),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;n|=Ti,o.set(e,t);var f=ot(d(e),d(t),n,a,i,o);return o.delete(e),f;case Ii:if(X)return X.call(e)==X.call(t)}return!1}var $i=1,Li=Object.prototype,ji=Li.hasOwnProperty;function Ri(e,t,r,n,a,i){var o=r&$i,d=Ee(e),l=d.length,u=Ee(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var h=d[c];if(!(o?h in t:ji.call(t,h)))return!1}var b=i.get(e),p=i.get(t);if(b&&p)return b==t&&p==e;var m=!0;i.set(e,t),i.set(t,e);for(var O=o;++c<l;){h=d[c];var C=e[h],A=t[h];if(n)var ge=o?n(A,C,h,t,e,i):n(C,A,h,e,t,i);if(!(ge===void 0?C===A||a(C,A,r,n,i):ge)){m=!1;break}O||(O=h=="constructor")}if(m&&!O){var H=e.constructor,z=t.constructor;H!=z&&"constructor"in e&&"constructor"in t&&!(typeof H=="function"&&H instanceof H&&typeof z=="function"&&z instanceof z)&&(m=!1)}return i.delete(e),i.delete(t),m}var Gi=1,Le="[object Arguments]",je="[object Array]",U="[object Object]",Hi=Object.prototype,Re=Hi.hasOwnProperty;function zi(e,t,r,n,a,i){var o=y(e),d=y(t),l=o?je:Fe(e),u=d?je:Fe(t);l=l==Le?U:l,u=u==Le?U:u;var f=l==U,c=u==U,h=l==u;if(h&&Q(e)){if(!Q(t))return!1;o=!0,f=!1}if(h&&!f)return i||(i=new _),o||tt(e)?ot(e,t,r,n,a,i):Bi(e,t,l,r,n,a,i);if(!(r&Gi)){var b=f&&Re.call(e,"__wrapped__"),p=c&&Re.call(t,"__wrapped__");if(b||p){var m=b?e.value():e,O=p?t.value():t;return i||(i=new _),a(m,O,r,n,i)}}return h?(i||(i=new _),Ri(e,t,r,n,a,i)):!1}function he(e,t,r,n,a){return e===t?!0:e==null||t==null||!E(e)&&!E(t)?e!==e&&t!==t:zi(e,t,r,n,he,a)}var Ui=1,Zi=2;function ki(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var d=r[a];if(o&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++a<i;){d=r[a];var l=d[0],u=e[l],f=d[1];if(o&&d[2]){if(u===void 0&&!(l in e))return!1}else{var c=new _;if(n)var h=n(u,f,l,e,t,c);if(!(h===void 0?he(f,u,Ui|Zi,n,c):h))return!1}}return!0}function st(e){return e===e&&!ie(e)}function Vi(e){for(var t=rt(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,st(a)]}return t}function dt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Wi(e){var t=Vi(e);return t.length==1&&t[0][2]?dt(t[0][0],t[0][1]):function(r){return r===e||ki(r,e,t)}}function qi(e,t){return e!=null&&t in Object(e)}function Ki(e,t,r){t=nt(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=W(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&se(a)&&qe(o,a)&&(y(e)||de(e)))}function Yi(e,t){return e!=null&&Ki(e,t,qi)}var Xi=1,Ji=2;function Qi(e,t){return le(e)&&st(t)?dt(W(e),t):function(r){var n=Z(r,e);return n===void 0&&n===t?Yi(r,e):he(t,n,Xi|Ji)}}function ea(e){return function(t){return t==null?void 0:t[e]}}function ta(e){return function(t){return it(t,e)}}function ra(e){return le(e)?ea(W(e)):ta(e)}function na(e){return typeof e=="function"?e:e==null?ae:typeof e=="object"?y(e)?Qi(e[0],e[1]):Wi(e):ra(e)}function P(e){return E(e)&&Ye(e)}function lt(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var ia=200;function ut(e,t,r,n){var a=-1,i=We,o=!0,d=e.length,l=[],u=t.length;if(!d)return l;r&&(t=Ze(t,Qe(r))),n?(i=lt,o=!1):t.length>=ia&&(i=fe,o=!1,t=new F(t));e:for(;++a<d;){var f=e[a],c=r==null?f:r(f);if(f=n||f!==0?f:0,o&&c===c){for(var h=u;h--;)if(t[h]===c)continue e;l.push(f)}else i(t,c,n)||l.push(f)}return l}var aa=oe(function(e,t){return P(e)?ut(e,q(t,1,P,!0)):[]}),oa=aa;function sa(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var da=oe(function(e,t){var r=sa(t);return P(r)&&(r=void 0),P(e)?ut(e,q(t,1,P,!0),na(r)):[]}),la=da;function ua(e){return e==null}var fa=1/0,ca=I&&1/ce(new I([,-0]))[1]==fa?function(e){return new I(e)}:qt,ha=ca,ga=200;function pa(e,t,r){var n=-1,a=We,i=e.length,o=!0,d=[],l=d;if(r)o=!1,a=lt;else if(i>=ga){var u=t?null:ha(e);if(u)return ce(u);o=!1,a=fe,l=new F}else l=t?[]:d;e:for(;++n<i;){var f=e[n],c=t?t(f):f;if(f=r||f!==0?f:0,o&&c===c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),d.push(f)}else a(l,c,r)||(l!==d&&l.push(c),d.push(f))}return d}var ma=oe(function(e){return pa(q(e,1,P,!0))}),va=ma;function re(e,t){return e.id===t||(e.children?e.children.some(r=>re(r,t)):!1)}function Ge(e){const t={};function r(n,a){if(!(!n||!n.id)&&(t[n.id]={...n,...a?{parent:a}:{}},n.children))for(let i=0,o=n.children.length;i<o;++i)r(n.children[i],n.id)}return r(e),t}function ya(e,t){function r(n){const a=t[n];return a?[...r(a.parent),n]:[]}return r(e)}function He(e,t,r){const n=[];function a(i){const o=r[i],d=(o.children||[]).map(l=>a(l.id)).filter(({toHide:l})=>!l);return d.length===0&&!e(o)?{...o,toHide:!0}:(n.push(i),{...o,children:d})}return a(t),n}class ba{constructor(){this.listeners={}}on(t,r){this.listeners[t]=[...this.listeners[t]||[],r]}off(t,r){let n=this.listeners[t];n&&(this.listeners[t]=n.filter(a=>a===r))}trigger(t,...r){const n=this.listeners[t];n&&n.forEach(a=>a.apply(null,r))}}class _a extends ba{constructor(t={},r={}){super(),Object.defineProperty(this,"_root",{value:t,configurable:!1,writable:!0}),Object.defineProperty(this,"nodesMap",{value:Ge(t),configurable:!1,writable:!0}),this._initExpanded(r.defaultExpanded),this.selected=Object.values(this.nodesMap).filter(({selected:n})=>n).map(({id:n})=>n),this.filtered=[],r.filter&&(this.filter=r.filter),this.autoSelectDescendants=r.autoSelectDescendants,this.autoDeselectDescendants=r.autoDeselectDescendants,this._updateVisibleTree(),this.draggedNodeId=void 0}_initExpanded(t){t?this.expandNode(t):this.root&&this.root.id?(this.expanded=[this.root.id],this.expandedWithoutFilter=this.expanded):(this.expanded=[],this.expandedWithoutFilter=[])}_updateVisibleTree(){this.visibleTree=this._computeVisibleTree(this.root.id,{expanded:this.expanded})}_detachNodeFromParent(t){const r=this._getNode(t.parent);t.parent=void 0,r&&(r.children=la(r.children||[],[t],({id:n})=>n))}_attachNodeToParent(t,r,n){this._detachNodeFromParent(t);const a=this._getNode(r);a&&(t.parent=a.id,ua(n)?a.children=[...a.children||[],{...t}]:a.children=[...(a.children||[]).slice(0,n),{...t},...(a.children||[]).slice(n)])}_computeVisibleTree(t,{expanded:r}){const n=this._getNode(t);if(!n)return{};const a=n.children||[];return{...n,children:r.includes(n.id)?a.filter(i=>this.isNodeFiltered(i.id)).map(i=>this._computeVisibleTree(i.id,{expanded:r})):[],isLeaf:a.length===0}}_getNode(t){return this.nodesMap[t]}_getNodeData(t){const{children:r,parent:n,selected:a,...i}=this.nodesMap[t];return i}expandNode(t,r){this.expanded&&t===this.expanded[this.expanded.length-1]||(this.expanded=ya(t,this.nodesMap),this.expandedWithoutFilter=this.expanded,this._updateVisibleTree(),this.trigger("expand",this.expanded,r,this.expanded.map(n=>this._getNodeData(n))))}isNodeExpanded(t){return this.expanded.includes(t)}selectNode(t,r){const a=(r?this.autoSelectDescendants:this.autoDeselectDescendants)?He(i=>i.selectable!==!1,t,this.nodesMap):[t];this.selected=(r?va:oa)(this.selected,a),this.trigger("select",this.selected,this.selected.map(i=>this._getNodeData(i)))}isNodeSelected(t){return this.selected.includes(t)}isNodeFiltered(t){return!this._filter||this.filtered.includes(t)}startDrag(t){Object.prototype.hasOwnProperty.call(this.nodesMap,t)&&(this.draggedNodeId=t)}stopDrag(){this.draggedNodeId=void 0}isParent(t,r){const n=this._getNode(t);return!!n&&re(n,r)}dropOnNode(t,r){if(!this.isDragging()||this.isNodeDragged(t))return;const n=this._getNode(this.draggedNodeId);re(n,t)||(this._attachNodeToParent(n,t,r),this.expandNode(this.draggedNodeId,"drop"),this.draggedNodeId=void 0,this._updateVisibleTree(),this.trigger("move",{moved:n.id,to:t,index:r}))}isNodeDragged(t){return this.draggedNodeId===t}isDragging(){return this.draggedNodeId!==void 0}get root(){return this._root}set root(t={}){this._root=t,this.nodesMap=Ge(t),(!this.expanded.length||this.expanded.some(r=>!this.nodesMap[r]))&&this._initExpanded(),this._applyFilter(),this._updateVisibleTree()}set filter(t){this._filter=t,this._applyFilter(),this._updateVisibleTree()}_applyFilter(){this._filter?(this.expandedWithoutFilter.some(t=>{const r=this._getNode(t);return this._filter(r)||r.children&&r.children.some(this._filter)})?this.expanded=this.expandedWithoutFilter:this.expanded=[this.root.id],this.filtered=He(this._filter,this.root.id,this.nodesMap)):this.filtered=[]}}var G=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const wa={name:"FinderItemArrow",props:{expanded:{type:Boolean,default:!1},theme:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}}}};function Da(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:"arrow",style:s.normalizeStyle({expanded:r.expanded,...r.theme.arrowColor&&{borderColor:r.theme.arrowColor}})},null,4)}var Ta=G(wa,[["render",Da],["__scopeId","data-v-af4ed7cc"]]);const Oa={name:"FinderListDropZone",props:{treeModel:{type:Object,required:!0},node:{type:Object,required:!0},dragEnabled:{type:[Boolean,Function],default:!1},index:{type:Number,default:void 0},options:{type:Object,default:()=>({})}},data:()=>({dragCounter:0}),computed:{dragOver(){return this.treeModel.isDragging()&&this.canDrop&&this.dragCounter>0},theme(){return Z(this,"options.theme",{})},canDrag(){return typeof this.dragEnabled=="function"?this.dragEnabled(this.node):this.dragEnabled},canDrop(){return this.treeModel.isParent(this.treeModel.draggedNodeId,this.node.id)?!1:!this.options.canDrop||this.options.canDrop(this.node.id,this.treeModel.draggedNodeId)}},methods:{onDragEnter(){this.dragCounter++},onDragLeave(){this.dragCounter--},onDrop(e){e.preventDefault(),this.dragCounter=0,!(!this.canDrop||!this.treeModel.isDragging())&&this.treeModel.dropOnNode(this.node.id,this.index)}}};function Ca(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["drop-zone",{"drag-over":i.dragOver,dragging:r.treeModel.isDragging(),"no-drop":r.treeModel.isDragging()&&!i.canDrop}]),style:s.normalizeStyle({...i.dragOver&&i.theme.primaryColor&&{borderColor:i.theme.primaryColor},...i.dragOver&&i.theme.dropZoneBgColor&&{backgroundColor:i.theme.dropZoneBgColor}}),onDragenter:t[0]||(t[0]=s.withModifiers((...o)=>i.onDragEnter&&i.onDragEnter(...o),["prevent"])),onDragleave:t[1]||(t[1]=s.withModifiers((...o)=>i.onDragLeave&&i.onDragLeave(...o),["prevent"])),onDragover:t[2]||(t[2]=s.withModifiers(()=>{},["prevent"])),onDrop:t[3]||(t[3]=s.withModifiers((...o)=>i.onDrop&&i.onDrop(...o),["prevent"]))},[r.options.dropZoneComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.options.dropZoneComponent),{key:0,dragging:r.treeModel.isDragging(),"drag-over":i.dragOver,style:{"flex-grow":"1"}},null,8,["dragging","drag-over"])):s.createCommentVNode("",!0)],38)}var ft=G(Oa,[["render",Ca],["__scopeId","data-v-47518178"]]);const Aa={name:"FinderItem",mixins:[ft],props:{selectable:{type:Boolean,default:!1}},data(){return{showGhost:!1,dragHandleOver:!1}},computed:{expanded(){return this.treeModel.isNodeExpanded(this.node.id)},selected(){return this.treeModel.isNodeSelected(this.node.id)},dragged(){return this.treeModel.isNodeDragged(this.node.id)},itemComponent(){return this.options.itemComponent||"div"},arrowComponent(){return this.options.arrowComponent||Ta}},watch:{dragOver(e){e&&this.canDrop&&!this.node.isLeaf?this.dragOverTimeout=setTimeout(()=>this.treeModel.expandNode(this.node.id,"dragover"),500):this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)},node(){this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)}},methods:{onMouseDown(){this.mousedown=!0,setTimeout(()=>{this.mousedown=!1},100)},onClick(){this.treeModel.expandNode(this.node.id,"click")},onFocus(){this.mousedown||this.treeModel.expandNode(this.node.id,"focus")},onSelect(e){this.treeModel.selectNode(this.node.id,e.target.checked)},async onDragStart(e){!this.canDrag||(this.options.dragImageComponent&&(this.showGhost=!0,await this.$nextTick(),e.dataTransfer.setDragImage(this.$refs.ghost.$el,0,0)),e.dataTransfer.setData("text/plain",this.node.id),this.treeModel.startDrag(this.node.id))},onDragOver(e){!this.canDrag||(e.preventDefault(),this.canDrop?e.dataTransfer.dropEffect="move":e.dataTransfer.dropEffect="none")},onDragEnd(){this.showGhost=!1,this.canDrag&&(this.dragHandleOver=!1,this.treeModel.stopDrag())}}},Sa=e=>(s.pushScopeId("data-v-6a473606"),e=e(),s.popScopeId(),e),Ea=["draggable","aria-expanded"],Ma=Sa(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[s.createElementVNode("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14m6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6m0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14"})],-1)),xa=[Ma],Na=["checked","disabled","aria-label"];function Ia(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",s.mergeProps({class:["item",[e.node.cssClass||"",{expanded:i.expanded,draggable:e.canDrag&&!e.options.hasDragHandle,dragged:i.dragged,"has-drag-handle":e.canDrag&&e.options.hasDragHandle,"drag-over":e.dragOver,"no-drop":e.treeModel.isDragging()&&!e.canDrop}]],role:"button",style:{...i.expanded&&e.theme.primaryColor&&{backgroundColor:e.theme.primaryColor},...i.dragged&&e.theme.draggedItemBgColor&&{backgroundColor:e.theme.draggedItemBgColor},...i.dragged&&e.theme.draggedItemBoxShadow&&{"box-shadow":e.theme.draggedItemBoxShadow},...e.dragOver&&e.theme.primaryColor&&{borderColor:e.theme.primaryColor},...e.dragOver&&e.theme.dropZoneBgColor&&{backgroundColor:e.theme.dropZoneBgColor}},draggable:e.canDrag&&(!e.options.hasDragHandle||a.dragHandleOver),"aria-expanded":e.node.isLeaf?void 0:i.expanded},e.$attrs,{onMousedown:t[4]||(t[4]=(...o)=>i.onMouseDown&&i.onMouseDown(...o)),onClick:t[5]||(t[5]=(...o)=>i.onClick&&i.onClick(...o)),onDragenter:t[6]||(t[6]=(...o)=>e.onDragEnter&&e.onDragEnter(...o)),onDragleave:t[7]||(t[7]=(...o)=>e.onDragLeave&&e.onDragLeave(...o)),onDragstart:t[8]||(t[8]=(...o)=>i.onDragStart&&i.onDragStart(...o)),onDragover:t[9]||(t[9]=(...o)=>i.onDragOver&&i.onDragOver(...o)),onDrop:t[10]||(t[10]=(...o)=>e.onDrop&&e.onDrop(...o)),onDragend:t[11]||(t[11]=(...o)=>i.onDragEnd&&i.onDragEnd(...o)),onFocus:t[12]||(t[12]=(...o)=>i.onFocus&&i.onFocus(...o))}),[e.canDrag&&e.options.hasDragHandle?(s.openBlock(),s.createElementBlock("div",{key:0,class:"drag-handle",onMousedown:t[0]||(t[0]=o=>a.dragHandleOver=!0),onMouseup:t[1]||(t[1]=o=>a.dragHandleOver=!1)},xa,32)):s.createCommentVNode("",!0),r.selectable?(s.openBlock(),s.createElementBlock("input",{key:1,type:"checkbox",checked:i.selected,disabled:e.node.selectable===!1,"aria-label":e.node.label,onClick:t[2]||(t[2]=s.withModifiers(()=>{},["stop"])),onChange:t[3]||(t[3]=(...o)=>i.onSelect&&i.onSelect(...o))},null,40,Na)):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.itemComponent),{class:"inner-item",item:e.node,expanded:i.expanded,dragged:i.dragged},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["item","expanded","dragged"])),e.node.isLeaf?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.arrowComponent),{key:2,theme:e.theme,expanded:i.expanded,item:e.node},null,8,["theme","expanded","item"]))],16,Ea),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[e.options.dragImageComponent?s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(e.options.dragImageComponent),{key:0,ref:"ghost",item:e.node,style:{"box-shadow":"0 3px 4px rgba(116, 116, 116, 0.3)",position:"absolute",padding:"10px",top:"-1000px","box-sizing":"border-box","pointer-events":"none"}},null,8,["item"])),[[s.vShow,a.showGhost]]):s.createCommentVNode("",!0)]))],64)}var Pa=G(Aa,[["render",Ia],["__scopeId","data-v-6a473606"]]);function Fa(e){let t=e.previousSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.previousSibling}}function Ba(e){let t=e.nextSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.nextSibling}}const $a={name:"FinderList",components:{FinderItem:Pa,FinderListDropZone:ft},props:{parent:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},treeModel:{type:Object,required:!0},selectable:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!0},options:{type:Object,default:()=>({})},hasExpandedItem:{type:Boolean,default:!1}},computed:{sortedItems(){return this.options.sortBy?[...this.items].sort(this.options.sortBy):this.items},style(){const e=Z(this.options,"theme.separatorColor",""),t=Z(this.options,"theme.separatorWidth","");return{...e&&{borderColor:e},...t&&{borderWidth:t}}},expandedItemIndex(){return Math.max(0,this.items.findIndex(e=>this.treeModel.isNodeExpanded(e.id)))}},methods:{navigate(e){let t;e.key==="ArrowDown"?t=Ba(e.target):e.key==="ArrowUp"&&(t=Fa(e.target)),t&&t.focus()}}};function La(e,t,r,n,a,i){const o=s.resolveComponent("FinderListDropZone"),d=s.resolveComponent("FinderItem");return s.openBlock(),s.createElementBlock("div",{class:"list",style:s.normalizeStyle(i.style),onKeydown:t[0]||(t[0]=(...l)=>i.navigate&&i.navigate(...l))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.sortedItems,(l,u)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:`item-${l.id}`},[r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,node:r.parent,"tree-model":r.treeModel,"drag-enabled":r.dragEnabled,index:u,options:r.options},null,8,["node","tree-model","drag-enabled","index","options"])):s.createCommentVNode("",!0),s.createVNode(d,{node:l,"tree-model":r.treeModel,selectable:r.selectable,"drag-enabled":r.dragEnabled,options:r.options,tabindex:u===i.expandedItemIndex?"0":"-1"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l.label),1)]),_:2},1032,["node","tree-model","selectable","drag-enabled","options","tabindex"])],64))),128)),r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,class:"last","tree-model":r.treeModel,node:r.parent,"drag-enabled":r.dragEnabled,index:r.items.length,options:r.options},null,8,["tree-model","node","drag-enabled","index","options"])):s.createCommentVNode("",!0)],36)}var ct=G($a,[["render",La],["__scopeId","data-v-21b06b5c"]]);function ht(e,t,r){if(!r||!r.children||r.children.length===0)return null;const n=r.children.find(o=>t.treeModel.isNodeExpanded(o.id)),a={sortBy:t.sortBy,itemComponent:t.itemComponent,arrowComponent:t.arrowComponent,dragImageComponent:t.dragImageComponent,dropZoneComponent:t.dropZoneComponent,theme:t.theme,hasDragHandle:t.hasDragHandle,canDrop:t.canDrop},i=s.createVNode(ct,{ref:"rootList","tree-model":t.treeModel,parent:r,items:r.children,selectable:t.selectable,"drag-enabled":t.dragEnabled,options:a,"has-expanded-item":!!n},null);return s.createVNode("div",{class:"list-container"},[i,n&&ht(e,t,n)])}function ja(e,t,r,n){return-r*(e/=n)*(e-2)+t}var Ra={name:"Finder",components:{FinderList:ct},props:{tree:{type:Object,required:!0},selectable:{type:Boolean,default:!1},autoSelectDescendants:{type:Boolean,default:!1},autoDeselectDescendants:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!1},hasDragHandle:{type:Boolean,default:!1},canDrop:{type:Function,default:void 0},filter:{type:Function,default:void 0},sortBy:{type:Function,default:void 0},defaultExpanded:{type:String,default:void 0},itemComponent:{type:[String,Object],default:void 0},arrowComponent:{type:[String,Object],default:void 0},dragImageComponent:{type:[String,Object],default:void 0},dropZoneComponent:{type:[String,Object],default:void 0},theme:{type:Object,default:()=>({})},scrollAnimationDuration:{type:Number,default:200}},emits:["expand","select","move"],data(){return{treeModel:{}}},watch:{tree(e){this.treeModel.root=s.toRaw(e)},filter(e){this.treeModel.filter=e},autoSelectDescendants(e){this.treeModel.autoSelectDescendants=e},autoDeselectDescendants(e){this.treeModel.autoDeselectDescendants=e}},created(){this.treeModel=new _a(s.toRaw(this.tree),{filter:this.filter,defaultExpanded:this.defaultExpanded,autoSelectDescendants:this.autoSelectDescendants,autoDeselectDescendants:this.autoDeselectDescendants}),this.treeModel.on("expand",(e,t,r)=>{t!=="dragover"&&this.$nextTick(()=>{this._scrollToRight(this.scrollAnimationDuration)}),this.$emit("expand",{expanded:e,sourceEvent:t,expandedItems:r})}),this.treeModel.on("select",(e,t)=>{this.$emit("select",{selected:e,selectedItems:t})}),this.treeModel.on("move",({moved:e,to:t,index:r})=>{this.$emit("move",{moved:e,to:t,index:r})})},methods:{expand(e,t="api"){this.treeModel.expandNode(e,t)},_scrollToRight(e){const{scrollLeft:t,scrollWidth:r,offsetWidth:n}=this.$el;if(e===0){this.$el.scrollLeft=r;return}const a=r-n-t;if(a<=0)return;let i=performance.now(),o=0;const d=l=>{if(o+=l-i,o>=e){this.$el.scrollLeft=this.$el.scrollWidth;return}i=l,this.$el.scrollLeft=ja(o,t,a,e),window.requestAnimationFrame(d)};window.requestAnimationFrame(d)}},render(e){return s.createVNode("div",{class:"tree-container"},[this.treeModel&&ht(e,this,this.treeModel.visibleTree)])}};var Ga=G(Ra,[["__scopeId","data-v-51da5e0a"]]);exports.Finder=Ga;

@@ -1,1 +0,1 @@

(function(p,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(p=typeof globalThis!="undefined"?globalThis:p||self,s(p.Finder={},p.Vue))})(this,function(p,s){"use strict";var pt=typeof global=="object"&&global&&global.Object===Object&&global,pe=pt,mt=typeof self=="object"&&self&&self.Object===Object&&self,yt=pe||mt||Function("return this")(),v=yt,bt=v.Symbol,b=bt,me=Object.prototype,_t=me.hasOwnProperty,vt=me.toString,L=b?b.toStringTag:void 0;function wt(e){var t=_t.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch{}var a=vt.call(e);return n&&(t?e[L]=r:delete e[L]),a}var Dt=Object.prototype,Tt=Dt.toString;function Ot(e){return Tt.call(e)}var Ct="[object Null]",At="[object Undefined]",ye=b?b.toStringTag:void 0;function x(e){return e==null?e===void 0?At:Ct:ye&&ye in Object(e)?wt(e):Ot(e)}function A(e){return e!=null&&typeof e=="object"}var St="[object Symbol]";function Y(e){return typeof e=="symbol"||A(e)&&x(e)==St}function be(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Et=Array.isArray,_=Et,Mt=1/0,_e=b?b.prototype:void 0,ve=_e?_e.toString:void 0;function we(e){if(typeof e=="string")return e;if(_(e))return be(e,we)+"";if(Y(e))return ve?ve.call(e):"";var t=e+"";return t=="0"&&1/e==-Mt?"-0":t}function X(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e}var It="[object AsyncFunction]",Nt="[object Function]",Pt="[object GeneratorFunction]",xt="[object Proxy]";function De(e){if(!X(e))return!1;var t=x(e);return t==Nt||t==Pt||t==It||t==xt}var Ft=v["__core-js_shared__"],Q=Ft,Te=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bt(e){return!!Te&&Te in e}var $t=Function.prototype,Lt=$t.toString;function S(e){if(e!=null){try{return Lt.call(e)}catch{}try{return e+""}catch{}}return""}var jt=/[\\^$.*+?()[\]{}|]/g,Rt=/^\[object .+?Constructor\]$/,Gt=Function.prototype,Ht=Object.prototype,zt=Gt.toString,Ut=Ht.hasOwnProperty,Zt=RegExp("^"+zt.call(Ut).replace(jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kt(e){if(!X(e)||Bt(e))return!1;var t=De(e)?Zt:Rt;return t.test(S(e))}function Vt(e,t){return e==null?void 0:e[t]}function E(e,t){var r=Vt(e,t);return kt(r)?r:void 0}var Wt=E(v,"WeakMap"),ee=Wt;function qt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Kt(){}var Yt=800,Xt=16,Jt=Date.now;function Qt(e){var t=0,r=0;return function(){var n=Jt(),a=Xt-(n-r);if(r=n,a>0){if(++t>=Yt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function er(e){return function(){return e}}var tr=function(){try{var e=E(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Oe=tr,rr=Oe?function(e,t){return Oe(e,"toString",{configurable:!0,enumerable:!1,value:er(t),writable:!0})}:J,nr=rr,ir=Qt(nr),ar=ir;function or(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function sr(e){return e!==e}function dr(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function lr(e,t,r){return t===t?dr(e,t,r):or(e,sr,r)}function Ce(e,t){var r=e==null?0:e.length;return!!r&&lr(e,t,0)>-1}var fr=9007199254740991,ur=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var r=typeof e;return t=t==null?fr:t,!!t&&(r=="number"||r!="symbol"&&ur.test(e))&&e>-1&&e%1==0&&e<t}function Se(e,t){return e===t||e!==e&&t!==t}var Ee=Math.max;function cr(e,t,r){return t=Ee(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Ee(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var d=Array(t+1);++a<t;)d[a]=n[a];return d[t]=r(o),qt(e,this,d)}}function te(e,t){return ar(cr(e,t,J),e+"")}var hr=9007199254740991;function re(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hr}function Me(e){return e!=null&&re(e.length)&&!De(e)}var gr=Object.prototype;function pr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gr;return e===r}function mr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var yr="[object Arguments]";function Ie(e){return A(e)&&x(e)==yr}var Ne=Object.prototype,br=Ne.hasOwnProperty,_r=Ne.propertyIsEnumerable,vr=Ie(function(){return arguments}())?Ie:function(e){return A(e)&&br.call(e,"callee")&&!_r.call(e,"callee")},ne=vr;function wr(){return!1}var Pe=typeof p=="object"&&p&&!p.nodeType&&p,xe=Pe&&typeof module=="object"&&module&&!module.nodeType&&module,Dr=xe&&xe.exports===Pe,Fe=Dr?v.Buffer:void 0,Tr=Fe?Fe.isBuffer:void 0,Or=Tr||wr,ie=Or,Cr="[object Arguments]",Ar="[object Array]",Sr="[object Boolean]",Er="[object Date]",Mr="[object Error]",Ir="[object Function]",Nr="[object Map]",Pr="[object Number]",xr="[object Object]",Fr="[object RegExp]",Br="[object Set]",$r="[object String]",Lr="[object WeakMap]",jr="[object ArrayBuffer]",Rr="[object DataView]",Gr="[object Float32Array]",Hr="[object Float64Array]",zr="[object Int8Array]",Ur="[object Int16Array]",Zr="[object Int32Array]",kr="[object Uint8Array]",Vr="[object Uint8ClampedArray]",Wr="[object Uint16Array]",qr="[object Uint32Array]",g={};g[Gr]=g[Hr]=g[zr]=g[Ur]=g[Zr]=g[kr]=g[Vr]=g[Wr]=g[qr]=!0,g[Cr]=g[Ar]=g[jr]=g[Sr]=g[Rr]=g[Er]=g[Mr]=g[Ir]=g[Nr]=g[Pr]=g[xr]=g[Fr]=g[Br]=g[$r]=g[Lr]=!1;function Kr(e){return A(e)&&re(e.length)&&!!g[x(e)]}function Be(e){return function(t){return e(t)}}var $e=typeof p=="object"&&p&&!p.nodeType&&p,j=$e&&typeof module=="object"&&module&&!module.nodeType&&module,Yr=j&&j.exports===$e,ae=Yr&&pe.process,Xr=function(){try{var e=j&&j.require&&j.require("util").types;return e||ae&&ae.binding&&ae.binding("util")}catch{}}(),Le=Xr,je=Le&&Le.isTypedArray,Jr=je?Be(je):Kr,Re=Jr,Qr=Object.prototype,en=Qr.hasOwnProperty;function tn(e,t){var r=_(e),n=!r&&ne(e),a=!r&&!n&&ie(e),i=!r&&!n&&!a&&Re(e),o=r||n||a||i,d=o?mr(e.length,String):[],l=d.length;for(var f in e)(t||en.call(e,f))&&!(o&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ae(f,l)))&&d.push(f);return d}function rn(e,t){return function(r){return e(t(r))}}var nn=rn(Object.keys,Object),an=nn,on=Object.prototype,sn=on.hasOwnProperty;function dn(e){if(!pr(e))return an(e);var t=[];for(var r in Object(e))sn.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ge(e){return Me(e)?tn(e):dn(e)}var ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fn=/^\w*$/;function oe(e,t){if(_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Y(e)?!0:fn.test(e)||!ln.test(e)||t!=null&&e in Object(t)}var un=E(Object,"create"),R=un;function cn(){this.__data__=R?R(null):{},this.size=0}function hn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gn="__lodash_hash_undefined__",pn=Object.prototype,mn=pn.hasOwnProperty;function yn(e){var t=this.__data__;if(R){var r=t[e];return r===gn?void 0:r}return mn.call(t,e)?t[e]:void 0}var bn=Object.prototype,_n=bn.hasOwnProperty;function vn(e){var t=this.__data__;return R?t[e]!==void 0:_n.call(t,e)}var wn="__lodash_hash_undefined__";function Dn(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=R&&t===void 0?wn:t,this}function M(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=cn,M.prototype.delete=hn,M.prototype.get=yn,M.prototype.has=vn,M.prototype.set=Dn;function Tn(){this.__data__=[],this.size=0}function z(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}var On=Array.prototype,Cn=On.splice;function An(e){var t=this.__data__,r=z(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Cn.call(t,r,1),--this.size,!0}function Sn(e){var t=this.__data__,r=z(t,e);return r<0?void 0:t[r][1]}function En(e){return z(this.__data__,e)>-1}function Mn(e,t){var r=this.__data__,n=z(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function w(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}w.prototype.clear=Tn,w.prototype.delete=An,w.prototype.get=Sn,w.prototype.has=En,w.prototype.set=Mn;var In=E(v,"Map"),G=In;function Nn(){this.size=0,this.__data__={hash:new M,map:new(G||w),string:new M}}function Pn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function U(e,t){var r=e.__data__;return Pn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function xn(e){var t=U(this,e).delete(e);return this.size-=t?1:0,t}function Fn(e){return U(this,e).get(e)}function Bn(e){return U(this,e).has(e)}function $n(e,t){var r=U(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function D(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}D.prototype.clear=Nn,D.prototype.delete=xn,D.prototype.get=Fn,D.prototype.has=Bn,D.prototype.set=$n;var Ln="Expected a function";function se(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ln);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(se.Cache||D),r}se.Cache=D;var jn=500;function Rn(e){var t=se(e,function(n){return r.size===jn&&r.clear(),n}),r=t.cache;return t}var Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hn=/\\(\\)?/g,zn=Rn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Gn,function(r,n,a,i){t.push(a?i.replace(Hn,"$1"):n||r)}),t}),Un=zn;function Zn(e){return e==null?"":we(e)}function He(e,t){return _(e)?e:oe(e,t)?[e]:Un(Zn(e))}var kn=1/0;function Z(e){if(typeof e=="string"||Y(e))return e;var t=e+"";return t=="0"&&1/e==-kn?"-0":t}function ze(e,t){t=He(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Z(t[r++])];return r&&r==n?e:void 0}function k(e,t,r){var n=e==null?void 0:ze(e,t);return n===void 0?r:n}function Ue(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ze=b?b.isConcatSpreadable:void 0;function Vn(e){return _(e)||ne(e)||!!(Ze&&e&&e[Ze])}function V(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=Vn),a||(a=[]);++i<o;){var d=e[i];t>0&&r(d)?t>1?V(d,t-1,r,n,a):Ue(a,d):n||(a[a.length]=d)}return a}function Wn(){this.__data__=new w,this.size=0}function qn(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Kn(e){return this.__data__.get(e)}function Yn(e){return this.__data__.has(e)}var Xn=200;function Jn(e,t){var r=this.__data__;if(r instanceof w){var n=r.__data__;if(!G||n.length<Xn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new D(n)}return r.set(e,t),this.size=r.size,this}function T(e){var t=this.__data__=new w(e);this.size=t.size}T.prototype.clear=Wn,T.prototype.delete=qn,T.prototype.get=Kn,T.prototype.has=Yn,T.prototype.set=Jn;function Qn(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function ei(){return[]}var ti=Object.prototype,ri=ti.propertyIsEnumerable,ke=Object.getOwnPropertySymbols,ni=ke?function(e){return e==null?[]:(e=Object(e),Qn(ke(e),function(t){return ri.call(e,t)}))}:ei,ii=ni;function ai(e,t,r){var n=t(e);return _(e)?n:Ue(n,r(e))}function Ve(e){return ai(e,Ge,ii)}var oi=E(v,"DataView"),de=oi,si=E(v,"Promise"),le=si,di=E(v,"Set"),F=di,We="[object Map]",li="[object Object]",qe="[object Promise]",Ke="[object Set]",Ye="[object WeakMap]",Xe="[object DataView]",fi=S(de),ui=S(G),ci=S(le),hi=S(F),gi=S(ee),I=x;(de&&I(new de(new ArrayBuffer(1)))!=Xe||G&&I(new G)!=We||le&&I(le.resolve())!=qe||F&&I(new F)!=Ke||ee&&I(new ee)!=Ye)&&(I=function(e){var t=x(e),r=t==li?e.constructor:void 0,n=r?S(r):"";if(n)switch(n){case fi:return Xe;case ui:return We;case ci:return qe;case hi:return Ke;case gi:return Ye}return t});var Je=I,pi=v.Uint8Array,Qe=pi,mi="__lodash_hash_undefined__";function yi(e){return this.__data__.set(e,mi),this}function bi(e){return this.__data__.has(e)}function B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new D;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=yi,B.prototype.has=bi;function _i(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function fe(e,t){return e.has(t)}var vi=1,wi=2;function et(e,t,r,n,a,i){var o=r&vi,d=e.length,l=t.length;if(d!=l&&!(o&&l>d))return!1;var f=i.get(e),u=i.get(t);if(f&&u)return f==t&&u==e;var c=-1,h=!0,O=r&wi?new B:void 0;for(i.set(e,t),i.set(t,e);++c<d;){var m=e[c],y=t[c];if(n)var C=o?n(y,m,c,t,e,i):n(m,y,c,e,t,i);if(C!==void 0){if(C)continue;h=!1;break}if(O){if(!_i(t,function(N,P){if(!fe(O,P)&&(m===N||a(m,N,r,n,i)))return O.push(P)})){h=!1;break}}else if(!(m===y||a(m,y,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function Di(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ue(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ti=1,Oi=2,Ci="[object Boolean]",Ai="[object Date]",Si="[object Error]",Ei="[object Map]",Mi="[object Number]",Ii="[object RegExp]",Ni="[object Set]",Pi="[object String]",xi="[object Symbol]",Fi="[object ArrayBuffer]",Bi="[object DataView]",tt=b?b.prototype:void 0,ce=tt?tt.valueOf:void 0;function $i(e,t,r,n,a,i,o){switch(r){case Bi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fi:return!(e.byteLength!=t.byteLength||!i(new Qe(e),new Qe(t)));case Ci:case Ai:case Mi:return Se(+e,+t);case Si:return e.name==t.name&&e.message==t.message;case Ii:case Pi:return e==t+"";case Ei:var d=Di;case Ni:var l=n&Ti;if(d||(d=ue),e.size!=t.size&&!l)return!1;var f=o.get(e);if(f)return f==t;n|=Oi,o.set(e,t);var u=et(d(e),d(t),n,a,i,o);return o.delete(e),u;case xi:if(ce)return ce.call(e)==ce.call(t)}return!1}var Li=1,ji=Object.prototype,Ri=ji.hasOwnProperty;function Gi(e,t,r,n,a,i){var o=r&Li,d=Ve(e),l=d.length,f=Ve(t),u=f.length;if(l!=u&&!o)return!1;for(var c=l;c--;){var h=d[c];if(!(o?h in t:Ri.call(t,h)))return!1}var O=i.get(e),m=i.get(t);if(O&&m)return O==t&&m==e;var y=!0;i.set(e,t),i.set(t,e);for(var C=o;++c<l;){h=d[c];var N=e[h],P=t[h];if(n)var gt=o?n(P,N,h,t,e,i):n(N,P,h,e,t,i);if(!(gt===void 0?N===P||a(N,P,r,n,i):gt)){y=!1;break}C||(C=h=="constructor")}if(y&&!C){var q=e.constructor,K=t.constructor;q!=K&&"constructor"in e&&"constructor"in t&&!(typeof q=="function"&&q instanceof q&&typeof K=="function"&&K instanceof K)&&(y=!1)}return i.delete(e),i.delete(t),y}var Hi=1,rt="[object Arguments]",nt="[object Array]",W="[object Object]",zi=Object.prototype,it=zi.hasOwnProperty;function Ui(e,t,r,n,a,i){var o=_(e),d=_(t),l=o?nt:Je(e),f=d?nt:Je(t);l=l==rt?W:l,f=f==rt?W:f;var u=l==W,c=f==W,h=l==f;if(h&&ie(e)){if(!ie(t))return!1;o=!0,u=!1}if(h&&!u)return i||(i=new T),o||Re(e)?et(e,t,r,n,a,i):$i(e,t,l,r,n,a,i);if(!(r&Hi)){var O=u&&it.call(e,"__wrapped__"),m=c&&it.call(t,"__wrapped__");if(O||m){var y=O?e.value():e,C=m?t.value():t;return i||(i=new T),a(y,C,r,n,i)}}return h?(i||(i=new T),Gi(e,t,r,n,a,i)):!1}function he(e,t,r,n,a){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:Ui(e,t,r,n,he,a)}var Zi=1,ki=2;function Vi(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var d=r[a];if(o&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++a<i;){d=r[a];var l=d[0],f=e[l],u=d[1];if(o&&d[2]){if(f===void 0&&!(l in e))return!1}else{var c=new T;if(n)var h=n(f,u,l,e,t,c);if(!(h===void 0?he(u,f,Zi|ki,n,c):h))return!1}}return!0}function at(e){return e===e&&!X(e)}function Wi(e){for(var t=Ge(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,at(a)]}return t}function ot(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function qi(e){var t=Wi(e);return t.length==1&&t[0][2]?ot(t[0][0],t[0][1]):function(r){return r===e||Vi(r,e,t)}}function Ki(e,t){return e!=null&&t in Object(e)}function Yi(e,t,r){t=He(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=Z(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&re(a)&&Ae(o,a)&&(_(e)||ne(e)))}function Xi(e,t){return e!=null&&Yi(e,t,Ki)}var Ji=1,Qi=2;function ea(e,t){return oe(e)&&at(t)?ot(Z(e),t):function(r){var n=k(r,e);return n===void 0&&n===t?Xi(r,e):he(t,n,Ji|Qi)}}function ta(e){return function(t){return t==null?void 0:t[e]}}function ra(e){return function(t){return ze(t,e)}}function na(e){return oe(e)?ta(Z(e)):ra(e)}function ia(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?_(e)?ea(e[0],e[1]):qi(e):na(e)}function $(e){return A(e)&&Me(e)}function st(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var aa=200;function dt(e,t,r,n){var a=-1,i=Ce,o=!0,d=e.length,l=[],f=t.length;if(!d)return l;r&&(t=be(t,Be(r))),n?(i=st,o=!1):t.length>=aa&&(i=fe,o=!1,t=new B(t));e:for(;++a<d;){var u=e[a],c=r==null?u:r(u);if(u=n||u!==0?u:0,o&&c===c){for(var h=f;h--;)if(t[h]===c)continue e;l.push(u)}else i(t,c,n)||l.push(u)}return l}var oa=te(function(e,t){return $(e)?dt(e,V(t,1,$,!0)):[]}),sa=oa;function da(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var la=te(function(e,t){var r=da(t);return $(r)&&(r=void 0),$(e)?dt(e,V(t,1,$,!0),ia(r)):[]}),fa=la;function ua(e){return e==null}var ca=1/0,ha=F&&1/ue(new F([,-0]))[1]==ca?function(e){return new F(e)}:Kt,ga=ha,pa=200;function ma(e,t,r){var n=-1,a=Ce,i=e.length,o=!0,d=[],l=d;if(r)o=!1,a=st;else if(i>=pa){var f=t?null:ga(e);if(f)return ue(f);o=!1,a=fe,l=new B}else l=t?[]:d;e:for(;++n<i;){var u=e[n],c=t?t(u):u;if(u=r||u!==0?u:0,o&&c===c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),d.push(u)}else a(l,c,r)||(l!==d&&l.push(c),d.push(u))}return d}var ya=te(function(e){return ma(V(e,1,$,!0))}),ba=ya;function ge(e,t){return e.id===t||(e.children?e.children.some(r=>ge(r,t)):!1)}function lt(e){const t={};function r(n,a){if(!(!n||!n.id)&&(t[n.id]={...n,...a?{parent:a}:{}},n.children))for(let i=0,o=n.children.length;i<o;++i)r(n.children[i],n.id)}return r(e),t}function _a(e,t){function r(n){const a=t[n];return a?[...r(a.parent),n]:[]}return r(e)}function ft(e,t,r){const n=[];function a(i){const o=r[i],d=(o.children||[]).map(l=>a(l.id)).filter(({toHide:l})=>!l);return d.length===0&&!e(o)?{...o,toHide:!0}:(n.push(i),{...o,children:d})}return a(t),n}class va{constructor(){this.listeners={}}on(t,r){this.listeners[t]=[...this.listeners[t]||[],r]}off(t,r){let n=this.listeners[t];n&&(this.listeners[t]=n.filter(a=>a===r))}trigger(t,...r){const n=this.listeners[t];n&&n.forEach(a=>a.apply(null,r))}}class wa extends va{constructor(t={},r={}){super(),Object.defineProperty(this,"_root",{value:t,configurable:!1,writable:!0}),Object.defineProperty(this,"nodesMap",{value:lt(t),configurable:!1,writable:!0}),this._initExpanded(r.defaultExpanded),this.selected=Object.values(this.nodesMap).filter(({selected:n})=>n).map(({id:n})=>n),this.filtered=[],r.filter&&(this.filter=r.filter),this.autoSelectDescendants=r.autoSelectDescendants,this.autoDeselectDescendants=r.autoDeselectDescendants,this._updateVisibleTree(),this.draggedNodeId=void 0}_initExpanded(t){t?this.expandNode(t):this.root&&this.root.id?(this.expanded=[this.root.id],this.expandedWithoutFilter=this.expanded):(this.expanded=[],this.expandedWithoutFilter=[])}_updateVisibleTree(){this.visibleTree=this._computeVisibleTree(this.root.id,{expanded:this.expanded})}_detachNodeFromParent(t){const r=this._getNode(t.parent);t.parent=void 0,r&&(r.children=fa(r.children||[],[t],({id:n})=>n))}_attachNodeToParent(t,r,n){this._detachNodeFromParent(t);const a=this._getNode(r);a&&(t.parent=a.id,ua(n)?a.children=[...a.children||[],{...t}]:a.children=[...(a.children||[]).slice(0,n),{...t},...(a.children||[]).slice(n)])}_computeVisibleTree(t,{expanded:r}){const n=this._getNode(t);if(!n)return{};const a=n.children||[];return{...n,children:r.includes(n.id)?a.filter(i=>this.isNodeFiltered(i.id)).map(i=>this._computeVisibleTree(i.id,{expanded:r})):[],isLeaf:a.length===0}}_getNode(t){return this.nodesMap[t]}_getNodeData(t){const{children:r,parent:n,selected:a,...i}=this.nodesMap[t];return i}expandNode(t,r){this.expanded=_a(t,this.nodesMap),this.expandedWithoutFilter=this.expanded,this._updateVisibleTree(),this.trigger("expand",this.expanded,r,this.expanded.map(n=>this._getNodeData(n)))}isNodeExpanded(t){return this.expanded.includes(t)}selectNode(t,r){const a=(r?this.autoSelectDescendants:this.autoDeselectDescendants)?ft(i=>i.selectable!==!1,t,this.nodesMap):[t];this.selected=(r?ba:sa)(this.selected,a),this.trigger("select",this.selected,this.selected.map(i=>this._getNodeData(i)))}isNodeSelected(t){return this.selected.includes(t)}isNodeFiltered(t){return!this._filter||this.filtered.includes(t)}startDrag(t){Object.prototype.hasOwnProperty.call(this.nodesMap,t)&&(this.draggedNodeId=t)}stopDrag(){this.draggedNodeId=void 0}isParent(t,r){const n=this._getNode(t);return!!n&&ge(n,r)}dropOnNode(t,r){if(!this.isDragging()||this.isNodeDragged(t))return;const n=this._getNode(this.draggedNodeId);ge(n,t)||(this._attachNodeToParent(n,t,r),this.expandNode(this.draggedNodeId,"drop"),this.draggedNodeId=void 0,this._updateVisibleTree(),this.trigger("move",{moved:n.id,to:t,index:r}))}isNodeDragged(t){return this.draggedNodeId===t}isDragging(){return this.draggedNodeId!==void 0}get root(){return this._root}set root(t={}){this._root=t,this.nodesMap=lt(t),(!this.expanded.length||this.expanded.some(r=>!this.nodesMap[r]))&&this._initExpanded(),this._applyFilter(),this._updateVisibleTree()}set filter(t){this._filter=t,this._applyFilter(),this._updateVisibleTree()}_applyFilter(){this._filter?(this.expandedWithoutFilter.some(t=>{const r=this._getNode(t);return this._filter(r)||r.children&&r.children.some(this._filter)})?this.expanded=this.expandedWithoutFilter:this.expanded=[this.root.id],this.filtered=ft(this._filter,this.root.id,this.nodesMap)):this.filtered=[]}}var Ha="",H=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const Da={name:"FinderItemArrow",props:{expanded:{type:Boolean,default:!1},theme:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}}}};function Ta(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:"arrow",style:s.normalizeStyle({expanded:r.expanded,...r.theme.arrowColor&&{borderColor:r.theme.arrowColor}})},null,4)}var Oa=H(Da,[["render",Ta],["__scopeId","data-v-af4ed7cc"]]),za="";const Ca={name:"FinderListDropZone",props:{treeModel:{type:Object,required:!0},node:{type:Object,required:!0},dragEnabled:{type:[Boolean,Function],default:!1},index:{type:Number,default:void 0},options:{type:Object,default:()=>({})}},data:()=>({dragCounter:0}),computed:{dragOver(){return this.treeModel.isDragging()&&this.canDrop&&this.dragCounter>0},theme(){return k(this,"options.theme",{})},canDrag(){return typeof this.dragEnabled=="function"?this.dragEnabled(this.node):this.dragEnabled},canDrop(){return this.treeModel.isParent(this.treeModel.draggedNodeId,this.node.id)?!1:!this.options.canDrop||this.options.canDrop(this.node.id,this.treeModel.draggedNodeId)}},methods:{onDragEnter(){this.dragCounter++},onDragLeave(){this.dragCounter--},onDrop(e){e.preventDefault(),this.dragCounter=0,!(!this.canDrop||!this.treeModel.isDragging())&&this.treeModel.dropOnNode(this.node.id,this.index)}}};function Aa(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["drop-zone",{"drag-over":i.dragOver,dragging:r.treeModel.isDragging(),"no-drop":r.treeModel.isDragging()&&!i.canDrop}]),style:s.normalizeStyle({...i.dragOver&&i.theme.primaryColor&&{borderColor:i.theme.primaryColor},...i.dragOver&&i.theme.dropZoneBgColor&&{backgroundColor:i.theme.dropZoneBgColor}}),onDragenter:t[0]||(t[0]=s.withModifiers((...o)=>i.onDragEnter&&i.onDragEnter(...o),["prevent"])),onDragleave:t[1]||(t[1]=s.withModifiers((...o)=>i.onDragLeave&&i.onDragLeave(...o),["prevent"])),onDragover:t[2]||(t[2]=s.withModifiers(()=>{},["prevent"])),onDrop:t[3]||(t[3]=s.withModifiers((...o)=>i.onDrop&&i.onDrop(...o),["prevent"]))},[r.options.dropZoneComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.options.dropZoneComponent),{key:0,dragging:r.treeModel.isDragging(),"drag-over":i.dragOver,style:{"flex-grow":"1"}},null,8,["dragging","drag-over"])):s.createCommentVNode("",!0)],38)}var ut=H(Ca,[["render",Aa],["__scopeId","data-v-47518178"]]),Ua="";const Sa={name:"FinderItem",mixins:[ut],props:{selectable:{type:Boolean,default:!1}},data(){return{showGhost:!1,dragHandleOver:!1}},computed:{expanded(){return this.treeModel.isNodeExpanded(this.node.id)},selected(){return this.treeModel.isNodeSelected(this.node.id)},dragged(){return this.treeModel.isNodeDragged(this.node.id)},itemComponent(){return this.options.itemComponent||"div"},arrowComponent(){return this.options.arrowComponent||Oa}},watch:{dragOver(e){e&&this.canDrop&&!this.node.isLeaf?this.dragOverTimeout=setTimeout(()=>this.treeModel.expandNode(this.node.id,"dragover"),500):this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)},node(){this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)}},methods:{onMouseDown(){this.mousedown=!0,setTimeout(()=>{this.mousedown=!1},100)},onClick(){this.treeModel.expandNode(this.node.id,"click")},onFocus(){this.mousedown||this.treeModel.expandNode(this.node.id,"focus")},onSelect(e){this.treeModel.selectNode(this.node.id,e.target.checked)},async onDragStart(e){!this.canDrag||(this.options.dragImageComponent&&(this.showGhost=!0,await this.$nextTick(),e.dataTransfer.setDragImage(this.$refs.ghost.$el,0,0)),e.dataTransfer.setData("text/plain",this.node.id),this.treeModel.startDrag(this.node.id))},onDragOver(e){!this.canDrag||(e.preventDefault(),this.canDrop?e.dataTransfer.dropEffect="move":e.dataTransfer.dropEffect="none")},onDragEnd(){this.showGhost=!1,this.canDrag&&(this.dragHandleOver=!1,this.treeModel.stopDrag())}}},Ea=e=>(s.pushScopeId("data-v-6a473606"),e=e(),s.popScopeId(),e),Ma=["draggable","aria-expanded"],Ia=[Ea(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[s.createElementVNode("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14m6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6m0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14"})],-1))],Na=["checked","disabled","aria-label"];function Pa(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",s.mergeProps({class:["item",[e.node.cssClass||"",{expanded:i.expanded,draggable:e.canDrag&&!e.options.hasDragHandle,dragged:i.dragged,"has-drag-handle":e.canDrag&&e.options.hasDragHandle,"drag-over":e.dragOver,"no-drop":e.treeModel.isDragging()&&!e.canDrop}]],role:"button",style:{...i.expanded&&e.theme.primaryColor&&{backgroundColor:e.theme.primaryColor},...i.dragged&&e.theme.draggedItemBgColor&&{backgroundColor:e.theme.draggedItemBgColor},...i.dragged&&e.theme.draggedItemBoxShadow&&{"box-shadow":e.theme.draggedItemBoxShadow},...e.dragOver&&e.theme.primaryColor&&{borderColor:e.theme.primaryColor},...e.dragOver&&e.theme.dropZoneBgColor&&{backgroundColor:e.theme.dropZoneBgColor}},draggable:e.canDrag&&(!e.options.hasDragHandle||a.dragHandleOver),"aria-expanded":e.node.isLeaf?void 0:i.expanded},e.$attrs,{onMousedown:t[4]||(t[4]=(...o)=>i.onMouseDown&&i.onMouseDown(...o)),onClick:t[5]||(t[5]=(...o)=>i.onClick&&i.onClick(...o)),onDragenter:t[6]||(t[6]=(...o)=>e.onDragEnter&&e.onDragEnter(...o)),onDragleave:t[7]||(t[7]=(...o)=>e.onDragLeave&&e.onDragLeave(...o)),onDragstart:t[8]||(t[8]=(...o)=>i.onDragStart&&i.onDragStart(...o)),onDragover:t[9]||(t[9]=(...o)=>i.onDragOver&&i.onDragOver(...o)),onDrop:t[10]||(t[10]=(...o)=>e.onDrop&&e.onDrop(...o)),onDragend:t[11]||(t[11]=(...o)=>i.onDragEnd&&i.onDragEnd(...o)),onFocus:t[12]||(t[12]=(...o)=>i.onFocus&&i.onFocus(...o))}),[e.canDrag&&e.options.hasDragHandle?(s.openBlock(),s.createElementBlock("div",{key:0,class:"drag-handle",onMousedown:t[0]||(t[0]=o=>a.dragHandleOver=!0),onMouseup:t[1]||(t[1]=o=>a.dragHandleOver=!1)},Ia,32)):s.createCommentVNode("",!0),r.selectable?(s.openBlock(),s.createElementBlock("input",{key:1,type:"checkbox",checked:i.selected,disabled:e.node.selectable===!1,"aria-label":e.node.label,onClick:t[2]||(t[2]=s.withModifiers(()=>{},["stop"])),onChange:t[3]||(t[3]=(...o)=>i.onSelect&&i.onSelect(...o))},null,40,Na)):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.itemComponent),{class:"inner-item",item:e.node,expanded:i.expanded,dragged:i.dragged},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["item","expanded","dragged"])),e.node.isLeaf?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.arrowComponent),{key:2,theme:e.theme,expanded:i.expanded,item:e.node},null,8,["theme","expanded","item"]))],16,Ma),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[e.options.dragImageComponent?s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(e.options.dragImageComponent),{key:0,ref:"ghost",item:e.node,style:{"box-shadow":"0 3px 4px rgba(116, 116, 116, 0.3)",position:"absolute",padding:"10px",top:"-1000px","box-sizing":"border-box","pointer-events":"none"}},null,8,["item"])),[[s.vShow,a.showGhost]]):s.createCommentVNode("",!0)]))],64)}var xa=H(Sa,[["render",Pa],["__scopeId","data-v-6a473606"]]),ka="";function Fa(e){let t=e.previousSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.previousSibling}}function Ba(e){let t=e.nextSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.nextSibling}}const $a={name:"FinderList",components:{FinderItem:xa,FinderListDropZone:ut},props:{parent:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},treeModel:{type:Object,required:!0},selectable:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!0},options:{type:Object,default:()=>({})},hasExpandedItem:{type:Boolean,default:!1}},computed:{sortedItems(){return this.options.sortBy?[...this.items].sort(this.options.sortBy):this.items},style(){const e=k(this.options,"theme.separatorColor",""),t=k(this.options,"theme.separatorWidth","");return{...e&&{borderColor:e},...t&&{borderWidth:t}}},expandedItemIndex(){return Math.max(0,this.items.findIndex(e=>this.treeModel.isNodeExpanded(e.id)))}},methods:{navigate(e){let t;e.key==="ArrowDown"?t=Ba(e.target):e.key==="ArrowUp"&&(t=Fa(e.target)),t&&t.focus()}}};function La(e,t,r,n,a,i){const o=s.resolveComponent("FinderListDropZone"),d=s.resolveComponent("FinderItem");return s.openBlock(),s.createElementBlock("div",{class:"list",style:s.normalizeStyle(i.style),onKeydown:t[0]||(t[0]=(...l)=>i.navigate&&i.navigate(...l))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.sortedItems,(l,f)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:`item-${l.id}`},[r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,node:r.parent,"tree-model":r.treeModel,"drag-enabled":r.dragEnabled,index:f,options:r.options},null,8,["node","tree-model","drag-enabled","index","options"])):s.createCommentVNode("",!0),s.createVNode(d,{node:l,"tree-model":r.treeModel,selectable:r.selectable,"drag-enabled":r.dragEnabled,options:r.options,tabindex:f===i.expandedItemIndex?"0":"-1"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l.label),1)]),_:2},1032,["node","tree-model","selectable","drag-enabled","options","tabindex"])],64))),128)),r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,class:"last","tree-model":r.treeModel,node:r.parent,"drag-enabled":r.dragEnabled,index:r.items.length,options:r.options},null,8,["tree-model","node","drag-enabled","index","options"])):s.createCommentVNode("",!0)],36)}var ct=H($a,[["render",La],["__scopeId","data-v-21b06b5c"]]);function ht(e,t,r){if(!r||!r.children||r.children.length===0)return null;const n=r.children.find(o=>t.treeModel.isNodeExpanded(o.id)),a={sortBy:t.sortBy,itemComponent:t.itemComponent,arrowComponent:t.arrowComponent,dragImageComponent:t.dragImageComponent,dropZoneComponent:t.dropZoneComponent,theme:t.theme,hasDragHandle:t.hasDragHandle,canDrop:t.canDrop},i=s.createVNode(ct,{ref:"rootList","tree-model":t.treeModel,parent:r,items:r.children,selectable:t.selectable,"drag-enabled":t.dragEnabled,options:a,"has-expanded-item":!!n},null);return s.createVNode("div",{class:"list-container"},[i,n&&ht(e,t,n)])}function ja(e,t,r,n){return-r*(e/=n)*(e-2)+t}var Ra={name:"Finder",components:{FinderList:ct},props:{tree:{type:Object,required:!0},selectable:{type:Boolean,default:!1},autoSelectDescendants:{type:Boolean,default:!1},autoDeselectDescendants:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!1},hasDragHandle:{type:Boolean,default:!1},canDrop:{type:Function,default:void 0},filter:{type:Function,default:void 0},sortBy:{type:Function,default:void 0},defaultExpanded:{type:String,default:void 0},itemComponent:{type:[String,Object],default:void 0},arrowComponent:{type:[String,Object],default:void 0},dragImageComponent:{type:[String,Object],default:void 0},dropZoneComponent:{type:[String,Object],default:void 0},theme:{type:Object,default:()=>({})},scrollAnimationDuration:{type:Number,default:200}},emits:["expand","select","move"],data(){return{treeModel:{}}},watch:{tree(e){this.treeModel.root=s.toRaw(e)},filter(e){this.treeModel.filter=e},autoSelectDescendants(e){this.treeModel.autoSelectDescendants=e},autoDeselectDescendants(e){this.treeModel.autoDeselectDescendants=e}},created(){this.treeModel=new wa(s.toRaw(this.tree),{filter:this.filter,defaultExpanded:this.defaultExpanded,autoSelectDescendants:this.autoSelectDescendants,autoDeselectDescendants:this.autoDeselectDescendants}),this.treeModel.on("expand",(e,t,r)=>{t!=="dragover"&&this.$nextTick(()=>{this._scrollToRight(this.scrollAnimationDuration)}),this.$emit("expand",{expanded:e,sourceEvent:t,expandedItems:r})}),this.treeModel.on("select",(e,t)=>{this.$emit("select",{selected:e,selectedItems:t})}),this.treeModel.on("move",({moved:e,to:t,index:r})=>{this.$emit("move",{moved:e,to:t,index:r})})},methods:{expand(e,t="api"){this.treeModel.expandNode(e,t)},_scrollToRight(e){const{scrollLeft:t,scrollWidth:r,offsetWidth:n}=this.$el;if(e===0){this.$el.scrollLeft=r;return}const a=r-n-t;if(a<=0)return;let i=performance.now(),o=0;const d=l=>{if(o+=l-i,o>=e){this.$el.scrollLeft=this.$el.scrollWidth;return}i=l,this.$el.scrollLeft=ja(o,t,a,e),window.requestAnimationFrame(d)};window.requestAnimationFrame(d)}},render(e){return s.createVNode("div",{class:"tree-container"},[this.treeModel&&ht(e,this,this.treeModel.visibleTree)])}},Va="",Ga=H(Ra,[["__scopeId","data-v-51da5e0a"]]);p.Finder=Ga,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(function(p,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(p=typeof globalThis!="undefined"?globalThis:p||self,s(p.Finder={},p.Vue))})(this,function(p,s){"use strict";var pt=typeof global=="object"&&global&&global.Object===Object&&global,pe=pt,mt=typeof self=="object"&&self&&self.Object===Object&&self,yt=pe||mt||Function("return this")(),v=yt,bt=v.Symbol,b=bt,me=Object.prototype,_t=me.hasOwnProperty,vt=me.toString,L=b?b.toStringTag:void 0;function wt(e){var t=_t.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch{}var a=vt.call(e);return n&&(t?e[L]=r:delete e[L]),a}var Dt=Object.prototype,Tt=Dt.toString;function Ot(e){return Tt.call(e)}var Ct="[object Null]",At="[object Undefined]",ye=b?b.toStringTag:void 0;function P(e){return e==null?e===void 0?At:Ct:ye&&ye in Object(e)?wt(e):Ot(e)}function A(e){return e!=null&&typeof e=="object"}var St="[object Symbol]";function Y(e){return typeof e=="symbol"||A(e)&&P(e)==St}function be(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Et=Array.isArray,_=Et,Mt=1/0,_e=b?b.prototype:void 0,ve=_e?_e.toString:void 0;function we(e){if(typeof e=="string")return e;if(_(e))return be(e,we)+"";if(Y(e))return ve?ve.call(e):"";var t=e+"";return t=="0"&&1/e==-Mt?"-0":t}function X(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e}var Nt="[object AsyncFunction]",It="[object Function]",xt="[object GeneratorFunction]",Pt="[object Proxy]";function De(e){if(!X(e))return!1;var t=P(e);return t==It||t==xt||t==Nt||t==Pt}var Ft=v["__core-js_shared__"],Q=Ft,Te=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bt(e){return!!Te&&Te in e}var $t=Function.prototype,Lt=$t.toString;function S(e){if(e!=null){try{return Lt.call(e)}catch{}try{return e+""}catch{}}return""}var jt=/[\\^$.*+?()[\]{}|]/g,Rt=/^\[object .+?Constructor\]$/,Gt=Function.prototype,Ht=Object.prototype,zt=Gt.toString,Ut=Ht.hasOwnProperty,Zt=RegExp("^"+zt.call(Ut).replace(jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kt(e){if(!X(e)||Bt(e))return!1;var t=De(e)?Zt:Rt;return t.test(S(e))}function Vt(e,t){return e==null?void 0:e[t]}function E(e,t){var r=Vt(e,t);return kt(r)?r:void 0}var Wt=E(v,"WeakMap"),ee=Wt;function qt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Kt(){}var Yt=800,Xt=16,Jt=Date.now;function Qt(e){var t=0,r=0;return function(){var n=Jt(),a=Xt-(n-r);if(r=n,a>0){if(++t>=Yt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function er(e){return function(){return e}}var tr=function(){try{var e=E(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Oe=tr,rr=Oe?function(e,t){return Oe(e,"toString",{configurable:!0,enumerable:!1,value:er(t),writable:!0})}:J,nr=rr,ir=Qt(nr),ar=ir;function or(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function sr(e){return e!==e}function dr(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}function lr(e,t,r){return t===t?dr(e,t,r):or(e,sr,r)}function Ce(e,t){var r=e==null?0:e.length;return!!r&&lr(e,t,0)>-1}var fr=9007199254740991,ur=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var r=typeof e;return t=t==null?fr:t,!!t&&(r=="number"||r!="symbol"&&ur.test(e))&&e>-1&&e%1==0&&e<t}function Se(e,t){return e===t||e!==e&&t!==t}var Ee=Math.max;function cr(e,t,r){return t=Ee(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Ee(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var d=Array(t+1);++a<t;)d[a]=n[a];return d[t]=r(o),qt(e,this,d)}}function te(e,t){return ar(cr(e,t,J),e+"")}var hr=9007199254740991;function re(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=hr}function Me(e){return e!=null&&re(e.length)&&!De(e)}var gr=Object.prototype;function pr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gr;return e===r}function mr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var yr="[object Arguments]";function Ne(e){return A(e)&&P(e)==yr}var Ie=Object.prototype,br=Ie.hasOwnProperty,_r=Ie.propertyIsEnumerable,vr=Ne(function(){return arguments}())?Ne:function(e){return A(e)&&br.call(e,"callee")&&!_r.call(e,"callee")},ne=vr;function wr(){return!1}var xe=typeof p=="object"&&p&&!p.nodeType&&p,Pe=xe&&typeof module=="object"&&module&&!module.nodeType&&module,Dr=Pe&&Pe.exports===xe,Fe=Dr?v.Buffer:void 0,Tr=Fe?Fe.isBuffer:void 0,Or=Tr||wr,ie=Or,Cr="[object Arguments]",Ar="[object Array]",Sr="[object Boolean]",Er="[object Date]",Mr="[object Error]",Nr="[object Function]",Ir="[object Map]",xr="[object Number]",Pr="[object Object]",Fr="[object RegExp]",Br="[object Set]",$r="[object String]",Lr="[object WeakMap]",jr="[object ArrayBuffer]",Rr="[object DataView]",Gr="[object Float32Array]",Hr="[object Float64Array]",zr="[object Int8Array]",Ur="[object Int16Array]",Zr="[object Int32Array]",kr="[object Uint8Array]",Vr="[object Uint8ClampedArray]",Wr="[object Uint16Array]",qr="[object Uint32Array]",g={};g[Gr]=g[Hr]=g[zr]=g[Ur]=g[Zr]=g[kr]=g[Vr]=g[Wr]=g[qr]=!0,g[Cr]=g[Ar]=g[jr]=g[Sr]=g[Rr]=g[Er]=g[Mr]=g[Nr]=g[Ir]=g[xr]=g[Pr]=g[Fr]=g[Br]=g[$r]=g[Lr]=!1;function Kr(e){return A(e)&&re(e.length)&&!!g[P(e)]}function Be(e){return function(t){return e(t)}}var $e=typeof p=="object"&&p&&!p.nodeType&&p,j=$e&&typeof module=="object"&&module&&!module.nodeType&&module,Yr=j&&j.exports===$e,ae=Yr&&pe.process,Xr=function(){try{var e=j&&j.require&&j.require("util").types;return e||ae&&ae.binding&&ae.binding("util")}catch{}}(),Le=Xr,je=Le&&Le.isTypedArray,Jr=je?Be(je):Kr,Re=Jr,Qr=Object.prototype,en=Qr.hasOwnProperty;function tn(e,t){var r=_(e),n=!r&&ne(e),a=!r&&!n&&ie(e),i=!r&&!n&&!a&&Re(e),o=r||n||a||i,d=o?mr(e.length,String):[],l=d.length;for(var f in e)(t||en.call(e,f))&&!(o&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ae(f,l)))&&d.push(f);return d}function rn(e,t){return function(r){return e(t(r))}}var nn=rn(Object.keys,Object),an=nn,on=Object.prototype,sn=on.hasOwnProperty;function dn(e){if(!pr(e))return an(e);var t=[];for(var r in Object(e))sn.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ge(e){return Me(e)?tn(e):dn(e)}var ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fn=/^\w*$/;function oe(e,t){if(_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Y(e)?!0:fn.test(e)||!ln.test(e)||t!=null&&e in Object(t)}var un=E(Object,"create"),R=un;function cn(){this.__data__=R?R(null):{},this.size=0}function hn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gn="__lodash_hash_undefined__",pn=Object.prototype,mn=pn.hasOwnProperty;function yn(e){var t=this.__data__;if(R){var r=t[e];return r===gn?void 0:r}return mn.call(t,e)?t[e]:void 0}var bn=Object.prototype,_n=bn.hasOwnProperty;function vn(e){var t=this.__data__;return R?t[e]!==void 0:_n.call(t,e)}var wn="__lodash_hash_undefined__";function Dn(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=R&&t===void 0?wn:t,this}function M(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}M.prototype.clear=cn,M.prototype.delete=hn,M.prototype.get=yn,M.prototype.has=vn,M.prototype.set=Dn;function Tn(){this.__data__=[],this.size=0}function z(e,t){for(var r=e.length;r--;)if(Se(e[r][0],t))return r;return-1}var On=Array.prototype,Cn=On.splice;function An(e){var t=this.__data__,r=z(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Cn.call(t,r,1),--this.size,!0}function Sn(e){var t=this.__data__,r=z(t,e);return r<0?void 0:t[r][1]}function En(e){return z(this.__data__,e)>-1}function Mn(e,t){var r=this.__data__,n=z(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function w(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}w.prototype.clear=Tn,w.prototype.delete=An,w.prototype.get=Sn,w.prototype.has=En,w.prototype.set=Mn;var Nn=E(v,"Map"),G=Nn;function In(){this.size=0,this.__data__={hash:new M,map:new(G||w),string:new M}}function xn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function U(e,t){var r=e.__data__;return xn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Pn(e){var t=U(this,e).delete(e);return this.size-=t?1:0,t}function Fn(e){return U(this,e).get(e)}function Bn(e){return U(this,e).has(e)}function $n(e,t){var r=U(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function D(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}D.prototype.clear=In,D.prototype.delete=Pn,D.prototype.get=Fn,D.prototype.has=Bn,D.prototype.set=$n;var Ln="Expected a function";function se(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ln);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(se.Cache||D),r}se.Cache=D;var jn=500;function Rn(e){var t=se(e,function(n){return r.size===jn&&r.clear(),n}),r=t.cache;return t}var Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hn=/\\(\\)?/g,zn=Rn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Gn,function(r,n,a,i){t.push(a?i.replace(Hn,"$1"):n||r)}),t}),Un=zn;function Zn(e){return e==null?"":we(e)}function He(e,t){return _(e)?e:oe(e,t)?[e]:Un(Zn(e))}var kn=1/0;function Z(e){if(typeof e=="string"||Y(e))return e;var t=e+"";return t=="0"&&1/e==-kn?"-0":t}function ze(e,t){t=He(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Z(t[r++])];return r&&r==n?e:void 0}function k(e,t,r){var n=e==null?void 0:ze(e,t);return n===void 0?r:n}function Ue(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Ze=b?b.isConcatSpreadable:void 0;function Vn(e){return _(e)||ne(e)||!!(Ze&&e&&e[Ze])}function V(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=Vn),a||(a=[]);++i<o;){var d=e[i];t>0&&r(d)?t>1?V(d,t-1,r,n,a):Ue(a,d):n||(a[a.length]=d)}return a}function Wn(){this.__data__=new w,this.size=0}function qn(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Kn(e){return this.__data__.get(e)}function Yn(e){return this.__data__.has(e)}var Xn=200;function Jn(e,t){var r=this.__data__;if(r instanceof w){var n=r.__data__;if(!G||n.length<Xn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new D(n)}return r.set(e,t),this.size=r.size,this}function T(e){var t=this.__data__=new w(e);this.size=t.size}T.prototype.clear=Wn,T.prototype.delete=qn,T.prototype.get=Kn,T.prototype.has=Yn,T.prototype.set=Jn;function Qn(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function ei(){return[]}var ti=Object.prototype,ri=ti.propertyIsEnumerable,ke=Object.getOwnPropertySymbols,ni=ke?function(e){return e==null?[]:(e=Object(e),Qn(ke(e),function(t){return ri.call(e,t)}))}:ei,ii=ni;function ai(e,t,r){var n=t(e);return _(e)?n:Ue(n,r(e))}function Ve(e){return ai(e,Ge,ii)}var oi=E(v,"DataView"),de=oi,si=E(v,"Promise"),le=si,di=E(v,"Set"),F=di,We="[object Map]",li="[object Object]",qe="[object Promise]",Ke="[object Set]",Ye="[object WeakMap]",Xe="[object DataView]",fi=S(de),ui=S(G),ci=S(le),hi=S(F),gi=S(ee),N=P;(de&&N(new de(new ArrayBuffer(1)))!=Xe||G&&N(new G)!=We||le&&N(le.resolve())!=qe||F&&N(new F)!=Ke||ee&&N(new ee)!=Ye)&&(N=function(e){var t=P(e),r=t==li?e.constructor:void 0,n=r?S(r):"";if(n)switch(n){case fi:return Xe;case ui:return We;case ci:return qe;case hi:return Ke;case gi:return Ye}return t});var Je=N,pi=v.Uint8Array,Qe=pi,mi="__lodash_hash_undefined__";function yi(e){return this.__data__.set(e,mi),this}function bi(e){return this.__data__.has(e)}function B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new D;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=yi,B.prototype.has=bi;function _i(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function fe(e,t){return e.has(t)}var vi=1,wi=2;function et(e,t,r,n,a,i){var o=r&vi,d=e.length,l=t.length;if(d!=l&&!(o&&l>d))return!1;var f=i.get(e),u=i.get(t);if(f&&u)return f==t&&u==e;var c=-1,h=!0,O=r&wi?new B:void 0;for(i.set(e,t),i.set(t,e);++c<d;){var m=e[c],y=t[c];if(n)var C=o?n(y,m,c,t,e,i):n(m,y,c,e,t,i);if(C!==void 0){if(C)continue;h=!1;break}if(O){if(!_i(t,function(I,x){if(!fe(O,x)&&(m===I||a(m,I,r,n,i)))return O.push(x)})){h=!1;break}}else if(!(m===y||a(m,y,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}function Di(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function ue(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ti=1,Oi=2,Ci="[object Boolean]",Ai="[object Date]",Si="[object Error]",Ei="[object Map]",Mi="[object Number]",Ni="[object RegExp]",Ii="[object Set]",xi="[object String]",Pi="[object Symbol]",Fi="[object ArrayBuffer]",Bi="[object DataView]",tt=b?b.prototype:void 0,ce=tt?tt.valueOf:void 0;function $i(e,t,r,n,a,i,o){switch(r){case Bi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fi:return!(e.byteLength!=t.byteLength||!i(new Qe(e),new Qe(t)));case Ci:case Ai:case Mi:return Se(+e,+t);case Si:return e.name==t.name&&e.message==t.message;case Ni:case xi:return e==t+"";case Ei:var d=Di;case Ii:var l=n&Ti;if(d||(d=ue),e.size!=t.size&&!l)return!1;var f=o.get(e);if(f)return f==t;n|=Oi,o.set(e,t);var u=et(d(e),d(t),n,a,i,o);return o.delete(e),u;case Pi:if(ce)return ce.call(e)==ce.call(t)}return!1}var Li=1,ji=Object.prototype,Ri=ji.hasOwnProperty;function Gi(e,t,r,n,a,i){var o=r&Li,d=Ve(e),l=d.length,f=Ve(t),u=f.length;if(l!=u&&!o)return!1;for(var c=l;c--;){var h=d[c];if(!(o?h in t:Ri.call(t,h)))return!1}var O=i.get(e),m=i.get(t);if(O&&m)return O==t&&m==e;var y=!0;i.set(e,t),i.set(t,e);for(var C=o;++c<l;){h=d[c];var I=e[h],x=t[h];if(n)var gt=o?n(x,I,h,t,e,i):n(I,x,h,e,t,i);if(!(gt===void 0?I===x||a(I,x,r,n,i):gt)){y=!1;break}C||(C=h=="constructor")}if(y&&!C){var q=e.constructor,K=t.constructor;q!=K&&"constructor"in e&&"constructor"in t&&!(typeof q=="function"&&q instanceof q&&typeof K=="function"&&K instanceof K)&&(y=!1)}return i.delete(e),i.delete(t),y}var Hi=1,rt="[object Arguments]",nt="[object Array]",W="[object Object]",zi=Object.prototype,it=zi.hasOwnProperty;function Ui(e,t,r,n,a,i){var o=_(e),d=_(t),l=o?nt:Je(e),f=d?nt:Je(t);l=l==rt?W:l,f=f==rt?W:f;var u=l==W,c=f==W,h=l==f;if(h&&ie(e)){if(!ie(t))return!1;o=!0,u=!1}if(h&&!u)return i||(i=new T),o||Re(e)?et(e,t,r,n,a,i):$i(e,t,l,r,n,a,i);if(!(r&Hi)){var O=u&&it.call(e,"__wrapped__"),m=c&&it.call(t,"__wrapped__");if(O||m){var y=O?e.value():e,C=m?t.value():t;return i||(i=new T),a(y,C,r,n,i)}}return h?(i||(i=new T),Gi(e,t,r,n,a,i)):!1}function he(e,t,r,n,a){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:Ui(e,t,r,n,he,a)}var Zi=1,ki=2;function Vi(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var d=r[a];if(o&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++a<i;){d=r[a];var l=d[0],f=e[l],u=d[1];if(o&&d[2]){if(f===void 0&&!(l in e))return!1}else{var c=new T;if(n)var h=n(f,u,l,e,t,c);if(!(h===void 0?he(u,f,Zi|ki,n,c):h))return!1}}return!0}function at(e){return e===e&&!X(e)}function Wi(e){for(var t=Ge(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,at(a)]}return t}function ot(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function qi(e){var t=Wi(e);return t.length==1&&t[0][2]?ot(t[0][0],t[0][1]):function(r){return r===e||Vi(r,e,t)}}function Ki(e,t){return e!=null&&t in Object(e)}function Yi(e,t,r){t=He(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=Z(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&re(a)&&Ae(o,a)&&(_(e)||ne(e)))}function Xi(e,t){return e!=null&&Yi(e,t,Ki)}var Ji=1,Qi=2;function ea(e,t){return oe(e)&&at(t)?ot(Z(e),t):function(r){var n=k(r,e);return n===void 0&&n===t?Xi(r,e):he(t,n,Ji|Qi)}}function ta(e){return function(t){return t==null?void 0:t[e]}}function ra(e){return function(t){return ze(t,e)}}function na(e){return oe(e)?ta(Z(e)):ra(e)}function ia(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?_(e)?ea(e[0],e[1]):qi(e):na(e)}function $(e){return A(e)&&Me(e)}function st(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var aa=200;function dt(e,t,r,n){var a=-1,i=Ce,o=!0,d=e.length,l=[],f=t.length;if(!d)return l;r&&(t=be(t,Be(r))),n?(i=st,o=!1):t.length>=aa&&(i=fe,o=!1,t=new B(t));e:for(;++a<d;){var u=e[a],c=r==null?u:r(u);if(u=n||u!==0?u:0,o&&c===c){for(var h=f;h--;)if(t[h]===c)continue e;l.push(u)}else i(t,c,n)||l.push(u)}return l}var oa=te(function(e,t){return $(e)?dt(e,V(t,1,$,!0)):[]}),sa=oa;function da(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var la=te(function(e,t){var r=da(t);return $(r)&&(r=void 0),$(e)?dt(e,V(t,1,$,!0),ia(r)):[]}),fa=la;function ua(e){return e==null}var ca=1/0,ha=F&&1/ue(new F([,-0]))[1]==ca?function(e){return new F(e)}:Kt,ga=ha,pa=200;function ma(e,t,r){var n=-1,a=Ce,i=e.length,o=!0,d=[],l=d;if(r)o=!1,a=st;else if(i>=pa){var f=t?null:ga(e);if(f)return ue(f);o=!1,a=fe,l=new B}else l=t?[]:d;e:for(;++n<i;){var u=e[n],c=t?t(u):u;if(u=r||u!==0?u:0,o&&c===c){for(var h=l.length;h--;)if(l[h]===c)continue e;t&&l.push(c),d.push(u)}else a(l,c,r)||(l!==d&&l.push(c),d.push(u))}return d}var ya=te(function(e){return ma(V(e,1,$,!0))}),ba=ya;function ge(e,t){return e.id===t||(e.children?e.children.some(r=>ge(r,t)):!1)}function lt(e){const t={};function r(n,a){if(!(!n||!n.id)&&(t[n.id]={...n,...a?{parent:a}:{}},n.children))for(let i=0,o=n.children.length;i<o;++i)r(n.children[i],n.id)}return r(e),t}function _a(e,t){function r(n){const a=t[n];return a?[...r(a.parent),n]:[]}return r(e)}function ft(e,t,r){const n=[];function a(i){const o=r[i],d=(o.children||[]).map(l=>a(l.id)).filter(({toHide:l})=>!l);return d.length===0&&!e(o)?{...o,toHide:!0}:(n.push(i),{...o,children:d})}return a(t),n}class va{constructor(){this.listeners={}}on(t,r){this.listeners[t]=[...this.listeners[t]||[],r]}off(t,r){let n=this.listeners[t];n&&(this.listeners[t]=n.filter(a=>a===r))}trigger(t,...r){const n=this.listeners[t];n&&n.forEach(a=>a.apply(null,r))}}class wa extends va{constructor(t={},r={}){super(),Object.defineProperty(this,"_root",{value:t,configurable:!1,writable:!0}),Object.defineProperty(this,"nodesMap",{value:lt(t),configurable:!1,writable:!0}),this._initExpanded(r.defaultExpanded),this.selected=Object.values(this.nodesMap).filter(({selected:n})=>n).map(({id:n})=>n),this.filtered=[],r.filter&&(this.filter=r.filter),this.autoSelectDescendants=r.autoSelectDescendants,this.autoDeselectDescendants=r.autoDeselectDescendants,this._updateVisibleTree(),this.draggedNodeId=void 0}_initExpanded(t){t?this.expandNode(t):this.root&&this.root.id?(this.expanded=[this.root.id],this.expandedWithoutFilter=this.expanded):(this.expanded=[],this.expandedWithoutFilter=[])}_updateVisibleTree(){this.visibleTree=this._computeVisibleTree(this.root.id,{expanded:this.expanded})}_detachNodeFromParent(t){const r=this._getNode(t.parent);t.parent=void 0,r&&(r.children=fa(r.children||[],[t],({id:n})=>n))}_attachNodeToParent(t,r,n){this._detachNodeFromParent(t);const a=this._getNode(r);a&&(t.parent=a.id,ua(n)?a.children=[...a.children||[],{...t}]:a.children=[...(a.children||[]).slice(0,n),{...t},...(a.children||[]).slice(n)])}_computeVisibleTree(t,{expanded:r}){const n=this._getNode(t);if(!n)return{};const a=n.children||[];return{...n,children:r.includes(n.id)?a.filter(i=>this.isNodeFiltered(i.id)).map(i=>this._computeVisibleTree(i.id,{expanded:r})):[],isLeaf:a.length===0}}_getNode(t){return this.nodesMap[t]}_getNodeData(t){const{children:r,parent:n,selected:a,...i}=this.nodesMap[t];return i}expandNode(t,r){this.expanded&&t===this.expanded[this.expanded.length-1]||(this.expanded=_a(t,this.nodesMap),this.expandedWithoutFilter=this.expanded,this._updateVisibleTree(),this.trigger("expand",this.expanded,r,this.expanded.map(n=>this._getNodeData(n))))}isNodeExpanded(t){return this.expanded.includes(t)}selectNode(t,r){const a=(r?this.autoSelectDescendants:this.autoDeselectDescendants)?ft(i=>i.selectable!==!1,t,this.nodesMap):[t];this.selected=(r?ba:sa)(this.selected,a),this.trigger("select",this.selected,this.selected.map(i=>this._getNodeData(i)))}isNodeSelected(t){return this.selected.includes(t)}isNodeFiltered(t){return!this._filter||this.filtered.includes(t)}startDrag(t){Object.prototype.hasOwnProperty.call(this.nodesMap,t)&&(this.draggedNodeId=t)}stopDrag(){this.draggedNodeId=void 0}isParent(t,r){const n=this._getNode(t);return!!n&&ge(n,r)}dropOnNode(t,r){if(!this.isDragging()||this.isNodeDragged(t))return;const n=this._getNode(this.draggedNodeId);ge(n,t)||(this._attachNodeToParent(n,t,r),this.expandNode(this.draggedNodeId,"drop"),this.draggedNodeId=void 0,this._updateVisibleTree(),this.trigger("move",{moved:n.id,to:t,index:r}))}isNodeDragged(t){return this.draggedNodeId===t}isDragging(){return this.draggedNodeId!==void 0}get root(){return this._root}set root(t={}){this._root=t,this.nodesMap=lt(t),(!this.expanded.length||this.expanded.some(r=>!this.nodesMap[r]))&&this._initExpanded(),this._applyFilter(),this._updateVisibleTree()}set filter(t){this._filter=t,this._applyFilter(),this._updateVisibleTree()}_applyFilter(){this._filter?(this.expandedWithoutFilter.some(t=>{const r=this._getNode(t);return this._filter(r)||r.children&&r.children.some(this._filter)})?this.expanded=this.expandedWithoutFilter:this.expanded=[this.root.id],this.filtered=ft(this._filter,this.root.id,this.nodesMap)):this.filtered=[]}}var Ha="",H=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r};const Da={name:"FinderItemArrow",props:{expanded:{type:Boolean,default:!1},theme:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}}}};function Ta(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:"arrow",style:s.normalizeStyle({expanded:r.expanded,...r.theme.arrowColor&&{borderColor:r.theme.arrowColor}})},null,4)}var Oa=H(Da,[["render",Ta],["__scopeId","data-v-af4ed7cc"]]),za="";const Ca={name:"FinderListDropZone",props:{treeModel:{type:Object,required:!0},node:{type:Object,required:!0},dragEnabled:{type:[Boolean,Function],default:!1},index:{type:Number,default:void 0},options:{type:Object,default:()=>({})}},data:()=>({dragCounter:0}),computed:{dragOver(){return this.treeModel.isDragging()&&this.canDrop&&this.dragCounter>0},theme(){return k(this,"options.theme",{})},canDrag(){return typeof this.dragEnabled=="function"?this.dragEnabled(this.node):this.dragEnabled},canDrop(){return this.treeModel.isParent(this.treeModel.draggedNodeId,this.node.id)?!1:!this.options.canDrop||this.options.canDrop(this.node.id,this.treeModel.draggedNodeId)}},methods:{onDragEnter(){this.dragCounter++},onDragLeave(){this.dragCounter--},onDrop(e){e.preventDefault(),this.dragCounter=0,!(!this.canDrop||!this.treeModel.isDragging())&&this.treeModel.dropOnNode(this.node.id,this.index)}}};function Aa(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["drop-zone",{"drag-over":i.dragOver,dragging:r.treeModel.isDragging(),"no-drop":r.treeModel.isDragging()&&!i.canDrop}]),style:s.normalizeStyle({...i.dragOver&&i.theme.primaryColor&&{borderColor:i.theme.primaryColor},...i.dragOver&&i.theme.dropZoneBgColor&&{backgroundColor:i.theme.dropZoneBgColor}}),onDragenter:t[0]||(t[0]=s.withModifiers((...o)=>i.onDragEnter&&i.onDragEnter(...o),["prevent"])),onDragleave:t[1]||(t[1]=s.withModifiers((...o)=>i.onDragLeave&&i.onDragLeave(...o),["prevent"])),onDragover:t[2]||(t[2]=s.withModifiers(()=>{},["prevent"])),onDrop:t[3]||(t[3]=s.withModifiers((...o)=>i.onDrop&&i.onDrop(...o),["prevent"]))},[r.options.dropZoneComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.options.dropZoneComponent),{key:0,dragging:r.treeModel.isDragging(),"drag-over":i.dragOver,style:{"flex-grow":"1"}},null,8,["dragging","drag-over"])):s.createCommentVNode("",!0)],38)}var ut=H(Ca,[["render",Aa],["__scopeId","data-v-47518178"]]),Ua="";const Sa={name:"FinderItem",mixins:[ut],props:{selectable:{type:Boolean,default:!1}},data(){return{showGhost:!1,dragHandleOver:!1}},computed:{expanded(){return this.treeModel.isNodeExpanded(this.node.id)},selected(){return this.treeModel.isNodeSelected(this.node.id)},dragged(){return this.treeModel.isNodeDragged(this.node.id)},itemComponent(){return this.options.itemComponent||"div"},arrowComponent(){return this.options.arrowComponent||Oa}},watch:{dragOver(e){e&&this.canDrop&&!this.node.isLeaf?this.dragOverTimeout=setTimeout(()=>this.treeModel.expandNode(this.node.id,"dragover"),500):this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)},node(){this.dragOverTimeout&&clearTimeout(this.dragOverTimeout)}},methods:{onMouseDown(){this.mousedown=!0,setTimeout(()=>{this.mousedown=!1},100)},onClick(){this.treeModel.expandNode(this.node.id,"click")},onFocus(){this.mousedown||this.treeModel.expandNode(this.node.id,"focus")},onSelect(e){this.treeModel.selectNode(this.node.id,e.target.checked)},async onDragStart(e){!this.canDrag||(this.options.dragImageComponent&&(this.showGhost=!0,await this.$nextTick(),e.dataTransfer.setDragImage(this.$refs.ghost.$el,0,0)),e.dataTransfer.setData("text/plain",this.node.id),this.treeModel.startDrag(this.node.id))},onDragOver(e){!this.canDrag||(e.preventDefault(),this.canDrop?e.dataTransfer.dropEffect="move":e.dataTransfer.dropEffect="none")},onDragEnd(){this.showGhost=!1,this.canDrag&&(this.dragHandleOver=!1,this.treeModel.stopDrag())}}},Ea=e=>(s.pushScopeId("data-v-6a473606"),e=e(),s.popScopeId(),e),Ma=["draggable","aria-expanded"],Na=[Ea(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[s.createElementVNode("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14m6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6m0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8m0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14"})],-1))],Ia=["checked","disabled","aria-label"];function xa(e,t,r,n,a,i){return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",s.mergeProps({class:["item",[e.node.cssClass||"",{expanded:i.expanded,draggable:e.canDrag&&!e.options.hasDragHandle,dragged:i.dragged,"has-drag-handle":e.canDrag&&e.options.hasDragHandle,"drag-over":e.dragOver,"no-drop":e.treeModel.isDragging()&&!e.canDrop}]],role:"button",style:{...i.expanded&&e.theme.primaryColor&&{backgroundColor:e.theme.primaryColor},...i.dragged&&e.theme.draggedItemBgColor&&{backgroundColor:e.theme.draggedItemBgColor},...i.dragged&&e.theme.draggedItemBoxShadow&&{"box-shadow":e.theme.draggedItemBoxShadow},...e.dragOver&&e.theme.primaryColor&&{borderColor:e.theme.primaryColor},...e.dragOver&&e.theme.dropZoneBgColor&&{backgroundColor:e.theme.dropZoneBgColor}},draggable:e.canDrag&&(!e.options.hasDragHandle||a.dragHandleOver),"aria-expanded":e.node.isLeaf?void 0:i.expanded},e.$attrs,{onMousedown:t[4]||(t[4]=(...o)=>i.onMouseDown&&i.onMouseDown(...o)),onClick:t[5]||(t[5]=(...o)=>i.onClick&&i.onClick(...o)),onDragenter:t[6]||(t[6]=(...o)=>e.onDragEnter&&e.onDragEnter(...o)),onDragleave:t[7]||(t[7]=(...o)=>e.onDragLeave&&e.onDragLeave(...o)),onDragstart:t[8]||(t[8]=(...o)=>i.onDragStart&&i.onDragStart(...o)),onDragover:t[9]||(t[9]=(...o)=>i.onDragOver&&i.onDragOver(...o)),onDrop:t[10]||(t[10]=(...o)=>e.onDrop&&e.onDrop(...o)),onDragend:t[11]||(t[11]=(...o)=>i.onDragEnd&&i.onDragEnd(...o)),onFocus:t[12]||(t[12]=(...o)=>i.onFocus&&i.onFocus(...o))}),[e.canDrag&&e.options.hasDragHandle?(s.openBlock(),s.createElementBlock("div",{key:0,class:"drag-handle",onMousedown:t[0]||(t[0]=o=>a.dragHandleOver=!0),onMouseup:t[1]||(t[1]=o=>a.dragHandleOver=!1)},Na,32)):s.createCommentVNode("",!0),r.selectable?(s.openBlock(),s.createElementBlock("input",{key:1,type:"checkbox",checked:i.selected,disabled:e.node.selectable===!1,"aria-label":e.node.label,onClick:t[2]||(t[2]=s.withModifiers(()=>{},["stop"])),onChange:t[3]||(t[3]=(...o)=>i.onSelect&&i.onSelect(...o))},null,40,Ia)):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.itemComponent),{class:"inner-item",item:e.node,expanded:i.expanded,dragged:i.dragged},{default:s.withCtx(()=>[s.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["item","expanded","dragged"])),e.node.isLeaf?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(i.arrowComponent),{key:2,theme:e.theme,expanded:i.expanded,item:e.node},null,8,["theme","expanded","item"]))],16,Ma),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[e.options.dragImageComponent?s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(e.options.dragImageComponent),{key:0,ref:"ghost",item:e.node,style:{"box-shadow":"0 3px 4px rgba(116, 116, 116, 0.3)",position:"absolute",padding:"10px",top:"-1000px","box-sizing":"border-box","pointer-events":"none"}},null,8,["item"])),[[s.vShow,a.showGhost]]):s.createCommentVNode("",!0)]))],64)}var Pa=H(Sa,[["render",xa],["__scopeId","data-v-6a473606"]]),ka="";function Fa(e){let t=e.previousSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.previousSibling}}function Ba(e){let t=e.nextSibling;for(;t;){if(t.classList&&t.classList.contains("item"))return t;t=t.nextSibling}}const $a={name:"FinderList",components:{FinderItem:Pa,FinderListDropZone:ut},props:{parent:{type:Object,default:()=>({})},items:{type:Array,default:()=>[]},treeModel:{type:Object,required:!0},selectable:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!0},options:{type:Object,default:()=>({})},hasExpandedItem:{type:Boolean,default:!1}},computed:{sortedItems(){return this.options.sortBy?[...this.items].sort(this.options.sortBy):this.items},style(){const e=k(this.options,"theme.separatorColor",""),t=k(this.options,"theme.separatorWidth","");return{...e&&{borderColor:e},...t&&{borderWidth:t}}},expandedItemIndex(){return Math.max(0,this.items.findIndex(e=>this.treeModel.isNodeExpanded(e.id)))}},methods:{navigate(e){let t;e.key==="ArrowDown"?t=Ba(e.target):e.key==="ArrowUp"&&(t=Fa(e.target)),t&&t.focus()}}};function La(e,t,r,n,a,i){const o=s.resolveComponent("FinderListDropZone"),d=s.resolveComponent("FinderItem");return s.openBlock(),s.createElementBlock("div",{class:"list",style:s.normalizeStyle(i.style),onKeydown:t[0]||(t[0]=(...l)=>i.navigate&&i.navigate(...l))},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.sortedItems,(l,f)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:`item-${l.id}`},[r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,node:r.parent,"tree-model":r.treeModel,"drag-enabled":r.dragEnabled,index:f,options:r.options},null,8,["node","tree-model","drag-enabled","index","options"])):s.createCommentVNode("",!0),s.createVNode(d,{node:l,"tree-model":r.treeModel,selectable:r.selectable,"drag-enabled":r.dragEnabled,options:r.options,tabindex:f===i.expandedItemIndex?"0":"-1"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(l.label),1)]),_:2},1032,["node","tree-model","selectable","drag-enabled","options","tabindex"])],64))),128)),r.dragEnabled?(s.openBlock(),s.createBlock(o,{key:0,class:"last","tree-model":r.treeModel,node:r.parent,"drag-enabled":r.dragEnabled,index:r.items.length,options:r.options},null,8,["tree-model","node","drag-enabled","index","options"])):s.createCommentVNode("",!0)],36)}var ct=H($a,[["render",La],["__scopeId","data-v-21b06b5c"]]);function ht(e,t,r){if(!r||!r.children||r.children.length===0)return null;const n=r.children.find(o=>t.treeModel.isNodeExpanded(o.id)),a={sortBy:t.sortBy,itemComponent:t.itemComponent,arrowComponent:t.arrowComponent,dragImageComponent:t.dragImageComponent,dropZoneComponent:t.dropZoneComponent,theme:t.theme,hasDragHandle:t.hasDragHandle,canDrop:t.canDrop},i=s.createVNode(ct,{ref:"rootList","tree-model":t.treeModel,parent:r,items:r.children,selectable:t.selectable,"drag-enabled":t.dragEnabled,options:a,"has-expanded-item":!!n},null);return s.createVNode("div",{class:"list-container"},[i,n&&ht(e,t,n)])}function ja(e,t,r,n){return-r*(e/=n)*(e-2)+t}var Ra={name:"Finder",components:{FinderList:ct},props:{tree:{type:Object,required:!0},selectable:{type:Boolean,default:!1},autoSelectDescendants:{type:Boolean,default:!1},autoDeselectDescendants:{type:Boolean,default:!1},dragEnabled:{type:[Boolean,Function],default:!1},hasDragHandle:{type:Boolean,default:!1},canDrop:{type:Function,default:void 0},filter:{type:Function,default:void 0},sortBy:{type:Function,default:void 0},defaultExpanded:{type:String,default:void 0},itemComponent:{type:[String,Object],default:void 0},arrowComponent:{type:[String,Object],default:void 0},dragImageComponent:{type:[String,Object],default:void 0},dropZoneComponent:{type:[String,Object],default:void 0},theme:{type:Object,default:()=>({})},scrollAnimationDuration:{type:Number,default:200}},emits:["expand","select","move"],data(){return{treeModel:{}}},watch:{tree(e){this.treeModel.root=s.toRaw(e)},filter(e){this.treeModel.filter=e},autoSelectDescendants(e){this.treeModel.autoSelectDescendants=e},autoDeselectDescendants(e){this.treeModel.autoDeselectDescendants=e}},created(){this.treeModel=new wa(s.toRaw(this.tree),{filter:this.filter,defaultExpanded:this.defaultExpanded,autoSelectDescendants:this.autoSelectDescendants,autoDeselectDescendants:this.autoDeselectDescendants}),this.treeModel.on("expand",(e,t,r)=>{t!=="dragover"&&this.$nextTick(()=>{this._scrollToRight(this.scrollAnimationDuration)}),this.$emit("expand",{expanded:e,sourceEvent:t,expandedItems:r})}),this.treeModel.on("select",(e,t)=>{this.$emit("select",{selected:e,selectedItems:t})}),this.treeModel.on("move",({moved:e,to:t,index:r})=>{this.$emit("move",{moved:e,to:t,index:r})})},methods:{expand(e,t="api"){this.treeModel.expandNode(e,t)},_scrollToRight(e){const{scrollLeft:t,scrollWidth:r,offsetWidth:n}=this.$el;if(e===0){this.$el.scrollLeft=r;return}const a=r-n-t;if(a<=0)return;let i=performance.now(),o=0;const d=l=>{if(o+=l-i,o>=e){this.$el.scrollLeft=this.$el.scrollWidth;return}i=l,this.$el.scrollLeft=ja(o,t,a,e),window.requestAnimationFrame(d)};window.requestAnimationFrame(d)}},render(e){return s.createVNode("div",{class:"tree-container"},[this.treeModel&&ht(e,this,this.treeModel.visibleTree)])}},Va="",Ga=H(Ra,[["__scopeId","data-v-51da5e0a"]]);p.Finder=Ga,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "@jledentu/vue-finder",
"description": "A Vue.js component to display hierarchical data",
"version": "4.1.0",
"version": "4.1.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "dist/vue-finder.umd.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc