Files
fad_oa/ruoyi-ui/public/file-viewer/assets/graphlib-B8gBHxth.js

1 line
23 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var e=typeof global==`object`&&global&&global.Object===Object&&global,t=typeof self==`object`&&self&&self.Object===Object&&self,n=e||t||Function(`return this`)(),r=n.Symbol,i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;function c(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch{}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}var l=Object.prototype.toString;function u(e){return l.call(e)}var d=`[object Null]`,f=`[object Undefined]`,p=r?r.toStringTag:void 0;function m(e){return e==null?e===void 0?f:d:p&&p in Object(e)?c(e):u(e)}function h(e){return typeof e==`object`&&!!e}var g=`[object Symbol]`;function _(e){return typeof e==`symbol`||h(e)&&m(e)==g}function v(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var y=Array.isArray,ee=1/0,te=r?r.prototype:void 0,ne=te?te.toString:void 0;function re(e){if(typeof e==`string`)return e;if(y(e))return v(e,re)+``;if(_(e))return ne?ne.call(e):``;var t=e+``;return t==`0`&&1/e==-ee?`-0`:t}function b(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function x(e){return e}var ie=`[object AsyncFunction]`,ae=`[object Function]`,oe=`[object GeneratorFunction]`,se=`[object Proxy]`;function S(e){if(!b(e))return!1;var t=m(e);return t==ae||t==oe||t==ie||t==se}var ce=n[`__core-js_shared__`],le=function(){var e=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ue(e){return!!le&&le in e}var de=Function.prototype.toString;function C(e){if(e!=null){try{return de.call(e)}catch{}try{return e+``}catch{}}return``}var fe=/[\\^$.*+?()[\]{}|]/g,pe=/^\[object .+?Constructor\]$/,me=Function.prototype,he=Object.prototype,ge=me.toString,_e=he.hasOwnProperty,ve=RegExp(`^`+ge.call(_e).replace(fe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function ye(e){return!b(e)||ue(e)?!1:(S(e)?ve:pe).test(C(e))}function be(e,t){return e?.[t]}function w(e,t){var n=be(e,t);return ye(n)?n:void 0}var xe=w(n,`WeakMap`);function Se(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ce(){}var we=800,Te=16,Ee=Date.now;function De(e){var t=0,n=0;return function(){var r=Ee(),i=Te-(r-n);if(n=r,i>0){if(++t>=we)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function T(e){return function(){return e}}var Oe=function(){try{var e=w(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),ke=De(Oe?function(e,t){return Oe(e,`toString`,{configurable:!0,enumerable:!1,value:T(t),writable:!0})}:x);function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function je(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Me(e){return e!==e}function Ne(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Pe(e,t,n){return t===t?Ne(e,t,n):je(e,Me,n)}function Fe(e,t){return!!(e!=null&&e.length)&&Pe(e,t,0)>-1}var Ie=9007199254740991,Le=/^(?:0|[1-9]\d*)$/;function Re(e,t){var n=typeof e;return t??=Ie,!!t&&(n==`number`||n!=`symbol`&&Le.test(e))&&e>-1&&e%1==0&&e<t}function ze(e,t){return e===t||e!==e&&t!==t}var Be=Math.max;function Ve(e,t,n){return t=Be(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Be(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Se(e,this,s)}}function He(e,t){return ke(Ve(e,t,x),e+``)}var Ue=9007199254740991;function We(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ue}function E(e){return e!=null&&We(e.length)&&!S(e)}var Ge=Object.prototype;function Ke(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ge)}function qe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Je=`[object Arguments]`;function Ye(e){return h(e)&&m(e)==Je}var Xe=Object.prototype,Ze=Xe.hasOwnProperty,Qe=Xe.propertyIsEnumerable,D=Ye(function(){return arguments}())?Ye:function(e){return h(e)&&Ze.call(e,`callee`)&&!Qe.call(e,`callee`)};function $e(){return!1}var et=typeof exports==`object`&&exports&&!exports.nodeType&&exports,tt=et&&typeof module==`object`&&module&&!module.nodeType&&module,nt=tt&&tt.exports===et?n.Buffer:void 0,O=(nt?nt.isBuffer:void 0)||$e,rt=`[object Arguments]`,it=`[object Array]`,at=`[object Boolean]`,ot=`[object Date]`,st=`[object Error]`,ct=`[object Function]`,lt=`[object Map]`,ut=`[object Number]`,dt=`[object Object]`,ft=`[object RegExp]`,pt=`[object Set]`,mt=`[object String]`,ht=`[object WeakMap]`,gt=`[object ArrayBuffer]`,_t=`[object DataView]`,vt=`[object Float32Array]`,yt=`[object Float64Array]`,bt=`[object Int8Array]`,xt=`[object Int16Array]`,St=`[object Int32Array]`,Ct=`[object Uint8Array]`,wt=`[object Uint8ClampedArray]`,Tt=`[object Uint16Array]`,Et=`[object Uint32Array]`,k={};k[vt]=k[yt]=k[bt]=k[xt]=k[St]=k[Ct]=k[wt]=k[Tt]=k[Et]=!0,k[rt]=k[it]=k[gt]=k[at]=k[_t]=k[ot]=k[st]=k[ct]=k[lt]=k[ut]=k[dt]=k[ft]=k[pt]=k[mt]=k[ht]=!1;function Dt(e){return h(e)&&We(e.length)&&!!k[m(e)]}function Ot(e){return function(t){return e(t)}}var kt=typeof exports==`object`&&exports&&!exports.nodeType&&exports,A=kt&&typeof module==`object`&&module&&!module.nodeType&&module,At=A&&A.exports===kt&&e.process,jt=function(){try{return A&&A.require&&A.require(`util`).types||At&&At.binding&&At.binding(`util`)}catch{}}(),Mt=jt&&jt.isTypedArray,j=Mt?Ot(Mt):Dt,Nt=Object.prototype.hasOwnProperty;function Pt(e,t){var n=y(e),r=!n&&D(e),i=!n&&!r&&O(e),a=!n&&!r&&!i&&j(e),o=n||r||i||a,s=o?qe(e.length,String):[],c=s.length;for(var l in e)(t||Nt.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Re(l,c)))&&s.push(l);return s}function Ft(e,t){return function(n){return e(t(n))}}var It=Ft(Object.keys,Object),Lt=Object.prototype.hasOwnProperty;function Rt(e){if(!Ke(e))return It(e);var t=[];for(var n in Object(e))Lt.call(e,n)&&n!=`constructor`&&t.push(n);return t}function M(e){return E(e)?Pt(e):Rt(e)}var zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/;function Vt(e,t){if(y(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||_(e)?!0:Bt.test(e)||!zt.test(e)||t!=null&&e in Object(t)}var N=w(Object,`create`);function Ht(){this.__data__=N?N(null):{},this.size=0}function Ut(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Wt=`__lodash_hash_undefined__`,Gt=Object.prototype.hasOwnProperty;function Kt(e){var t=this.__data__;if(N){var n=t[e];return n===Wt?void 0:n}return Gt.call(t,e)?t[e]:void 0}var qt=Object.prototype.hasOwnProperty;function Jt(e){var t=this.__data__;return N?t[e]!==void 0:qt.call(t,e)}var Yt=`__lodash_hash_undefined__`;function Xt(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=N&&t===void 0?Yt:t,this}function P(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}P.prototype.clear=Ht,P.prototype.delete=Ut,P.prototype.get=Kt,P.prototype.has=Jt,P.prototype.set=Xt;function Zt(){this.__data__=[],this.size=0}function F(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}var Qt=Array.prototype.splice;function $t(e){var t=this.__data__,n=F(t,e);return n<0?!1:(n==t.length-1?t.pop():Qt.call(t,n,1),--this.size,!0)}function en(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]}function tn(e){return F(this.__data__,e)>-1}function nn(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function I(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}I.prototype.clear=Zt,I.prototype.delete=$t,I.prototype.get=en,I.prototype.has=tn,I.prototype.set=nn;var L=w(n,`Map`);function rn(){this.size=0,this.__data__={hash:new P,map:new(L||I),string:new P}}function an(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function R(e,t){var n=e.__data__;return an(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function on(e){var t=R(this,e).delete(e);return this.size-=+!!t,t}function sn(e){return R(this,e).get(e)}function cn(e){return R(this,e).has(e)}function ln(e,t){var n=R(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=rn,z.prototype.delete=on,z.prototype.get=sn,z.prototype.has=cn,z.prototype.set=ln;var un=`Expected a function`;function dn(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(un);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(dn.Cache||z),n}dn.Cache=z;var fn=500;function pn(e){var t=dn(e,function(e){return n.size===fn&&n.clear(),e}),n=t.cache;return t}var mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hn=/\\(\\)?/g,gn=pn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(mn,function(e,n,r,i){t.push(r?i.replace(hn,`$1`):n||e)}),t});function _n(e){return e==null?``:re(e)}function vn(e,t){return y(e)?e:Vt(e,t)?[e]:gn(_n(e))}var yn=1/0;function B(e){if(typeof e==`string`||_(e))return e;var t=e+``;return t==`0`&&1/e==-yn?`-0`:t}function bn(e,t){t=vn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[B(t[n++])];return n&&n==r?e:void 0}function xn(e,t,n){var r=e==null?void 0:bn(e,t);return r===void 0?n:r}function Sn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Cn=r?r.isConcatSpreadable:void 0;function wn(e){return y(e)||D(e)||!!(Cn&&e&&e[Cn])}function Tn(e,t,n,r,i){var a=-1,o=e.length;for(n||=wn,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Tn(s,t-1,n,r,i):Sn(i,s):r||(i[i.length]=s)}return i}function En(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Dn(){this.__data__=new I,this.size=0}function On(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function kn(e){return this.__data__.get(e)}function An(e){return this.__data__.has(e)}var jn=200;function Mn(e,t){var n=this.__data__;if(n instanceof I){var r=n.__data__;if(!L||r.length<jn-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new z(r)}return n.set(e,t),this.size=n.size,this}function V(e){var t=this.__data__=new I(e);this.size=t.size}V.prototype.clear=Dn,V.prototype.delete=On,V.prototype.get=kn,V.prototype.has=An,V.prototype.set=Mn;function Nn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Pn(){return[]}var Fn=Object.prototype.propertyIsEnumerable,In=Object.getOwnPropertySymbols,Ln=In?function(e){return e==null?[]:(e=Object(e),Nn(In(e),function(t){return Fn.call(e,t)}))}:Pn;function Rn(e,t,n){var r=t(e);return y(e)?r:Sn(r,n(e))}function zn(e){return Rn(e,M,Ln)}var Bn=w(n,`DataView`),Vn=w(n,`Promise`),H=w(n,`Set`),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=C(Bn),Yn=C(L),Xn=C(Vn),Zn=C(H),Qn=C(xe),U=m;(Bn&&U(new Bn(new ArrayBuffer(1)))!=qn||L&&U(new L)!=Hn||Vn&&U(Vn.resolve())!=Wn||H&&U(new H)!=Gn||xe&&U(new xe)!=Kn)&&(U=function(e){var t=m(e),n=t==Un?e.constructor:void 0,r=n?C(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t});var W=U,$n=n.Uint8Array,er=`__lodash_hash_undefined__`;function tr(e){return this.__data__.set(e,er),this}function nr(e){return this.__data__.has(e)}function G(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new z;++t<n;)this.add(e[t])}G.prototype.add=G.prototype.push=tr,G.prototype.has=nr;function rr(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ir(e,t){return e.has(t)}var ar=1,or=2;function sr(e,t,n,r,i,a){var o=n&ar,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&or?new G:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!rr(t,function(e,t){if(!ir(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function cr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function lr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ur=1,dr=2,fr=`[object Boolean]`,pr=`[object Date]`,mr=`[object Error]`,hr=`[object Map]`,gr=`[object Number]`,_r=`[object RegExp]`,vr=`[object Set]`,yr=`[object String]`,br=`[object Symbol]`,xr=`[object ArrayBuffer]`,Sr=`[object DataView]`,Cr=r?r.prototype:void 0,wr=Cr?Cr.valueOf:void 0;function Tr(e,t,n,r,i,a,o){switch(n){case Sr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xr:return!(e.byteLength!=t.byteLength||!a(new $n(e),new $n(t)));case fr:case pr:case gr:return ze(+e,+t);case mr:return e.name==t.name&&e.message==t.message;case _r:case yr:return e==t+``;case hr:var s=cr;case vr:var c=r&ur;if(s||=lr,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=dr,o.set(e,t);var u=sr(s(e),s(t),r,i,a,o);return o.delete(e),u;case br:if(wr)return wr.call(e)==wr.call(t)}return!1}var Er=1,Dr=Object.prototype.hasOwnProperty;function Or(e,t,n,r,i,a){var o=n&Er,s=zn(e),c=s.length;if(c!=zn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Dr.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var kr=1,Ar=`[object Arguments]`,jr=`[object Array]`,K=`[object Object]`,Mr=Object.prototype.hasOwnProperty;function Nr(e,t,n,r,i,a){var o=y(e),s=y(t),c=o?jr:W(e),l=s?jr:W(t);c=c==Ar?K:c,l=l==Ar?K:l;var u=c==K,d=l==K,f=c==l;if(f&&O(e)){if(!O(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new V,o||j(e)?sr(e,t,n,r,i,a):Tr(e,t,c,n,r,i,a);if(!(n&kr)){var p=u&&Mr.call(e,`__wrapped__`),m=d&&Mr.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new V,i(h,g,n,r,a)}}return f?(a||=new V,Or(e,t,n,r,i,a)):!1}function Pr(e,t,n,r,i){return e===t?!0:e==null||t==null||!h(e)&&!h(t)?e!==e&&t!==t:Nr(e,t,n,r,Pr,i)}var Fr=1,Ir=2;function Lr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new V;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Pr(u,l,Fr|Ir,r,d):f))return!1}}return!0}function Rr(e){return e===e&&!b(e)}function zr(e){for(var t=M(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Rr(i)]}return t}function Br(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Vr(e){var t=zr(e);return t.length==1&&t[0][2]?Br(t[0][0],t[0][1]):function(n){return n===e||Lr(n,e,t)}}function Hr(e,t){return e!=null&&t in Object(e)}function Ur(e,t,n){t=vn(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=B(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&We(i)&&Re(o,i)&&(y(e)||D(e)))}function Wr(e,t){return e!=null&&Ur(e,t,Hr)}var Gr=1,Kr=2;function qr(e,t){return Vt(e)&&Rr(t)?Br(B(e),t):function(n){var r=xn(n,e);return r===void 0&&r===t?Wr(n,e):Pr(t,r,Gr|Kr)}}function Jr(e){return function(t){return t?.[e]}}function Yr(e){return function(t){return bn(t,e)}}function Xr(e){return Vt(e)?Jr(B(e)):Yr(e)}function Zr(e){return typeof e==`function`?e:e==null?x:typeof e==`object`?y(e)?qr(e[0],e[1]):Vr(e):Xr(e)}function Qr(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var $r=Qr();function ei(e,t){return e&&$r(e,t,M)}function ti(e,t){return function(n,r){if(n==null)return n;if(!E(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var q=ti(ei);function ni(e){return h(e)&&E(e)}function ri(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ii(e){return typeof e==`function`?e:x}function J(e,t){return(y(e)?Ae:q)(e,ii(t))}function ai(e,t){var n=[];return q(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Y(e,t){return(y(e)?Nn:ai)(e,Zr(t,3))}function oi(e,t){return v(t,function(t){return e[t]})}function X(e){return e==null?[]:oi(e,M(e))}var si=`[object Map]`,ci=`[object Set]`,li=Object.prototype.hasOwnProperty;function ui(e){if(e==null)return!0;if(E(e)&&(y(e)||typeof e==`string`||typeof e.splice==`function`||O(e)||j(e)||D(e)))return!e.length;var t=W(e);if(t==si||t==ci)return!e.size;if(Ke(e))return!Rt(e).length;for(var n in e)if(li.call(e,n))return!1;return!0}function Z(e){return e===void 0}function di(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function fi(e,t,n){var r=y(e)?En:di,i=arguments.length<3;return r(e,Zr(t,4),n,i,q)}var pi=H&&1/lr(new H([,-0]))[1]==1/0?function(e){return new H(e)}:Ce,mi=200;function hi(e,t,n){var r=-1,i=Fe,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=ri;else if(a>=mi){var l=t?null:pi(e);if(l)return lr(l);o=!1,i=ir,c=new G}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var gi=He(function(e){return hi(Tn(e,1,ni,!0))}),_i=`\0`,Q=`\0`,vi=``,yi=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=T(void 0),this._defaultEdgeLabelFn=T(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Q]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return S(e)||(e=T(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return M(this._nodes)}sources(){var e=this;return Y(this.nodes(),function(t){return ui(e._in[t])})}sinks(){var e=this;return Y(this.nodes(),function(t){return ui(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return J(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Q,this._children[e]={},this._children[Q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],J(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),J(M(this._in[e]),t),delete this._in[e],delete this._preds[e],J(M(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(Z(t))t=Q;else{t+=``;for(var n=t;!Z(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Q)return t}}children(e){if(Z(e)&&(e=Q),this._isCompound){var t=this._children[e];if(t)return M(t)}else if(e===Q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return M(t)}successors(e){var t=this._sucs[e];if(t)return M(t)}neighbors(e){var t=this.predecessors(e);if(t)return gi(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;J(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),J(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&J(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return S(e)||(e=T(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return X(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return fi(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,Z(n)||(n=``+n);var o=$(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!Z(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Si(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,bi(this._preds[t],e),bi(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],xi(this._preds[t],e),xi(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=X(n);return t?Y(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=X(n);return t?Y(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};yi.prototype._nodeCount=0,yi.prototype._edgeCount=0;function bi(e,t){e[t]?e[t]++:e[t]=1}function xi(e,t){--e[t]||delete e[t]}function $(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+vi+a+vi+(Z(r)?_i:r)}function Si(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Ci(e,t){return $(e,t.v,t.w,t.name)}export{v as $,Rt as A,He as B,Tn as C,vn as D,B as E,Ot as F,Ae as G,ze as H,O as I,T as J,ke as K,D as L,Pt as M,j as N,_n as O,jt as P,y as Q,Ke as R,V as S,bn as T,Re as U,Ve as V,je as W,x as X,S as Y,b as Z,W as _,Y as a,Ln as b,ni as c,$r as d,_ as et,Zr as f,$n as g,Ur as h,X as i,n as it,Ft as j,M as k,q as l,Wr as m,fi as n,m as nt,J as o,Jr as p,Oe as q,Z as r,r as rt,ii as s,yi as t,h as tt,ei as u,zn as v,Sn as w,Pn as x,Rn as y,E as z};