@next-bricks/diagram 0.42.4 → 0.42.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +1 -1
- package/dist/chunks/{1371.f4b9a35d.js → 1371.eca61ce0.js} +2 -2
- package/dist/chunks/{1371.f4b9a35d.js.map → 1371.eca61ce0.js.map} +1 -1
- package/dist/chunks/3489.e0ce6106.js +3 -0
- package/dist/chunks/3489.e0ce6106.js.map +1 -0
- package/dist/chunks/3790.093a51f1.js +3 -0
- package/dist/chunks/3790.093a51f1.js.map +1 -0
- package/dist/chunks/{4017.3be5f2b8.js → 4017.5d4d14b0.js} +3 -3
- package/dist/chunks/4017.5d4d14b0.js.map +1 -0
- package/dist/chunks/7304.3d0757fa.js +2 -0
- package/dist/chunks/7304.3d0757fa.js.map +1 -0
- package/dist/chunks/788.5a8dd377.js +3 -0
- package/dist/chunks/{1094.866a0229.js.LICENSE.txt → 788.5a8dd377.js.LICENSE.txt} +2 -0
- package/dist/chunks/788.5a8dd377.js.map +1 -0
- package/dist/chunks/{eo-diagram.7a793a39.js → eo-diagram.63804ec2.js} +2 -2
- package/dist/chunks/{eo-diagram.7a793a39.js.map → eo-diagram.63804ec2.js.map} +1 -1
- package/dist/chunks/main.7dff2080.js +2 -0
- package/dist/chunks/{main.5ad8bc12.js.map → main.7dff2080.js.map} +1 -1
- package/dist/index.e3c858d4.js +2 -0
- package/dist/{index.dccf2262.js.map → index.e3c858d4.js.map} +1 -1
- package/package.json +2 -2
- package/dist/chunks/1094.866a0229.js +0 -3
- package/dist/chunks/1094.866a0229.js.map +0 -1
- package/dist/chunks/3790.e8dc7307.js +0 -3
- package/dist/chunks/3790.e8dc7307.js.map +0 -1
- package/dist/chunks/4017.3be5f2b8.js.map +0 -1
- package/dist/chunks/4090.0a4db475.js +0 -3
- package/dist/chunks/4090.0a4db475.js.map +0 -1
- package/dist/chunks/7304.14847830.js +0 -2
- package/dist/chunks/7304.14847830.js.map +0 -1
- package/dist/chunks/main.5ad8bc12.js +0 -2
- package/dist/index.dccf2262.js +0 -2
- /package/dist/chunks/{4090.0a4db475.js.LICENSE.txt → 3489.e0ce6106.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3790.e8dc7307.js.LICENSE.txt → 3790.093a51f1.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{4017.3be5f2b8.js.LICENSE.txt → 4017.5d4d14b0.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 3790.093a51f1.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[3790],{2559:(t,i,n)=>{function e(t,i,n){if("function"==typeof t?t===i:t.has(i))return arguments.length<3?i:n;throw new TypeError("Private element is not present on this object")}n.d(i,{A:()=>e})},2016:(t,i,n)=>{function e(t,i){if(i.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(i,{A:()=>e})},829:(t,i,n)=>{n.d(i,{A:()=>s});var e=n(2559);function s(t,i){return t.get((0,e.A)(t,i))}},918:(t,i,n)=>{n.d(i,{A:()=>s});var e=n(2016);function s(t,i,n){(0,e.A)(t,i),i.set(t,n)}},6121:(t,i,n)=>{n.d(i,{A:()=>s});var e=n(2559);function s(t,i,n){return t.set((0,e.A)(t,i),n),n}},4635:(t,i,n)=>{n.d(i,{A:()=>s});var e=n(2016);function s(t,i){(0,e.A)(t,i),i.add(t)}},1369:(t,i,n)=>{n.d(i,{A:()=>s});var e=n(7545);function s(t){var i=function(t,i){if("object"!=(0,e.A)(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,"string");if("object"!=(0,e.A)(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,e.A)(i)?i:i+""}},7545:(t,i,n)=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}n.d(i,{A:()=>e})},780:(t,i,n)=>{n.d(i,{_:()=>o});var e=n(6330),s=n(3496),o=function(){var t=(0,e.A)((function*(t,i,n){return(yield s.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(t,"/instance"),i,n)).data}));return function(i,n,e){return t.apply(this,arguments)}}()},8406:(t,i,n)=>{n.d(i,{y:()=>o});var e=n(6330),s=n(3496),o=function(){var t=(0,e.A)((function*(t,i,n){return(yield s.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(t,"/instance/_search"),i,n)).data}));return function(i,n,e){return t.apply(this,arguments)}}()},6841:(t,i,n)=>{n.d(i,{x:()=>o});var e=n(6330),s=n(3496),o=function(){var t=(0,e.A)((function*(t,i,n,e){return(yield s.http.put("api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/".concat(t,"/instance/").concat(i),n,e)).data}));return function(i,n,e,s){return t.apply(this,arguments)}}()},4993:(t,i,n)=>{function e(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function s(t){this._context=t}function o(t){return new s(t)}n.d(i,{Ay:()=>o}),s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:e(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:e(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}}},4643:(t,i,n)=>{n.d(i,{dJ:()=>s,kl:()=>o});class e{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}}function s(t){return new e(t,!0)}function o(t){return new e(t,!1)}},482:(t,i,n)=>{function e(t){this._context=t}function s(t){return new e(t)}n.d(i,{A:()=>s}),e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}}},3488:(t,i,n)=>{function e(t){return t<0?-1:1}function s(t,i,n){var s=t._x1-t._x0,o=i-t._x1,h=(t._y1-t._y0)/(s||o<0&&-0),r=(n-t._y1)/(o||s<0&&-0),_=(h*o+r*s)/(s+o);return(e(h)+e(r))*Math.min(Math.abs(h),Math.abs(r),.5*Math.abs(_))||0}function o(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function h(t,i,n){var e=t._x0,s=t._y0,o=t._x1,h=t._y1,r=(o-e)/3;t._context.bezierCurveTo(e+r,s+r*i,o-r,h-r*n,o,h)}function r(t){this._context=t}function _(t){this._context=new a(t)}function a(t){this._context=t}function c(t){return new r(t)}function u(t){return new _(t)}n.d(i,{G:()=>c,N:()=>u}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:h(this,this._t0,o(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,h(this,o(this,n=s(this,t,i)),n);break;default:h(this,this._t0,n=s(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}},(_.prototype=Object.create(r.prototype)).point=function(t,i){r.prototype.point.call(this,i,t)},a.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,e,s,o){this._context.bezierCurveTo(i,t,e,n,o,s)}}},6066:(t,i,n)=>{function e(t){this._context=t}function s(t){var i,n,e=t.length-1,s=new Array(e),o=new Array(e),h=new Array(e);for(s[0]=0,o[0]=2,h[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,h[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,h[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,h[i]-=n*h[i-1];for(s[e-1]=h[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(h[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function o(t){return new e(t)}n.d(i,{A:()=>o}),e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===n)this._context.lineTo(t[1],i[1]);else for(var e=s(t),o=s(i),h=0,r=1;r<n;++h,++r)this._context.bezierCurveTo(e[0][h],o[0][h],e[1][h],o[1][h],t[r],i[r]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}}},3269:(t,i,n)=>{function e(t){return function(){return t}}n.d(i,{A:()=>f}),Array.prototype.slice;var s=n(482);const o=Math.PI,h=2*o,r=1e-6,_=h-r;function a(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=arguments[i]+t[i]}class c{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?a:function(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return a;const n=10**i;return function(t){this._+=t[0];for(let i=1,e=t.length;i<e;++i)this._+=Math.round(arguments[i]*n)/n+t[i]}}(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,n,e){this._append`Q${+t},${+i},${this._x1=+n},${this._y1=+e}`}bezierCurveTo(t,i,n,e,s,o){this._append`C${+t},${+i},${+n},${+e},${this._x1=+s},${this._y1=+o}`}arcTo(t,i,n,e,s){if(t=+t,i=+i,n=+n,e=+e,(s=+s)<0)throw new Error(`negative radius: ${s}`);let h=this._x1,_=this._y1,a=n-t,c=e-i,u=h-t,l=_-i,f=u*u+l*l;if(null===this._x1)this._append`M${this._x1=t},${this._y1=i}`;else if(f>r)if(Math.abs(l*a-c*u)>r&&s){let p=n-h,y=e-_,x=a*a+c*c,d=p*p+y*y,v=Math.sqrt(x),$=Math.sqrt(f),b=s*Math.tan((o-Math.acos((x+f-d)/(2*v*$)))/2),w=b/$,T=b/v;Math.abs(w-1)>r&&this._append`L${t+w*u},${i+w*l}`,this._append`A${s},${s},0,0,${+(l*p>u*y)},${this._x1=t+T*a},${this._y1=i+T*c}`}else this._append`L${this._x1=t},${this._y1=i}`}arc(t,i,n,e,s,a){if(t=+t,i=+i,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(e),u=n*Math.sin(e),l=t+c,f=i+u,p=1^a,y=a?e-s:s-e;null===this._x1?this._append`M${l},${f}`:(Math.abs(this._x1-l)>r||Math.abs(this._y1-f)>r)&&this._append`L${l},${f}`,n&&(y<0&&(y=y%h+h),y>_?this._append`A${n},${n},0,1,${p},${t-c},${i-u}A${n},${n},0,1,${p},${this._x1=l},${this._y1=f}`:y>r&&this._append`A${n},${n},0,${+(y>=o)},${p},${this._x1=t+n*Math.cos(s)},${this._y1=i+n*Math.sin(s)}`)}rect(t,i,n,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${n=+n}v${+e}h${-n}Z`}toString(){return this._}}function u(t){return t[0]}function l(t){return t[1]}function f(t,i){var n=e(!0),o=null,h=s.A,r=null,_=function(t){let i=3;return t.digits=function(n){if(!arguments.length)return i;if(null==n)i=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);i=t}return t},()=>new c(i)}(a);function a(e){var s,a,c,u=(e=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(e)).length,l=!1;for(null==o&&(r=h(c=_())),s=0;s<=u;++s)!(s<u&&n(a=e[s],s,e))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(a,s,e),+i(a,s,e));if(c)return r=null,c+""||null}return t="function"==typeof t?t:void 0===t?u:e(t),i="function"==typeof i?i:void 0===i?l:e(i),a.x=function(i){return arguments.length?(t="function"==typeof i?i:e(+i),a):t},a.y=function(t){return arguments.length?(i="function"==typeof t?t:e(+t),a):i},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:e(!!t),a):n},a.curve=function(t){return arguments.length?(h=t,null!=o&&(r=h(o)),a):h},a.context=function(t){return arguments.length?(null==t?o=r=null:r=h(o=t),a):o},a}c.prototype}}]);
|
|
3
|
+
//# sourceMappingURL=3790.093a51f1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/3790.093a51f1.js","mappings":";wIAAe,SAASA,EAAkBC,EAAGC,EAAGC,GAC9C,GAAI,mBAAqBF,EAAIA,IAAMC,EAAID,EAAEG,IAAIF,GAAI,OAAOG,UAAUC,OAAS,EAAIJ,EAAIC,EACnF,MAAM,IAAII,UAAU,gDACtB,kCCHe,SAASC,EAA2BC,EAAKC,GACtD,GAAIA,EAAkBN,IAAIK,GACxB,MAAM,IAAIF,UAAU,iEAExB,gECHe,SAASI,EAAuBC,EAAGC,GAChD,OAAOD,EAAEE,KAAI,OAAiBF,EAAGC,GACnC,gDCFe,SAASE,EAA2BN,EAAKO,EAAYC,IAClE,OAA0BR,EAAKO,GAC/BA,EAAWE,IAAIT,EAAKQ,EACtB,iDCHe,SAASE,EAAuBP,EAAGC,EAAGO,GACnD,OAAOR,EAAEM,KAAI,OAAiBN,EAAGC,GAAIO,GAAIA,CAC3C,iDCFe,SAASC,EAA4BZ,EAAKa,IACvD,OAA0Bb,EAAKa,GAC/BA,EAAWC,IAAId,EACjB,iDCFe,SAASe,EAActB,GACpC,IAAIuB,ECFS,SAAqBvB,EAAGkB,GACrC,GAAI,WAAY,OAAQlB,KAAOA,EAAG,OAAOA,EACzC,IAAID,EAAIC,EAAEwB,OAAOC,aACjB,QAAI,IAAW1B,EAAG,CAChB,IAAIwB,EAAIxB,EAAE2B,KAAK1B,EAAGkB,UAClB,GAAI,WAAY,OAAQK,GAAI,OAAOA,EACnC,MAAM,IAAIlB,UAAU,+CACtB,CACA,OAAyBsB,OAAiB3B,EAC5C,CDPUyB,CAAYzB,GACpB,MAAO,WAAY,OAAQuB,GAAKA,EAAIA,EAAI,E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O1H,UAAUC,QAAUoK,EAAQ3C,EAAc,MAAX/D,IAAoB2G,EAASD,EAAM1G,IAAWgH,GAAQN,CAC9F,EAEAM,EAAKhH,QAAU,SAAS+D,GACtB,OAAO1H,UAAUC,QAAe,MAALyH,EAAY/D,EAAU2G,EAAS,KAAOA,EAASD,EAAM1G,EAAU+D,GAAIiD,GAAQhH,CACxG,EAEOgH,CACT,CF8FiBhD,EAAK9F","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/createInstance.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/postSearchV3.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/updateInstanceV2.js","webpack:///../../node_modules/d3-shape/src/curve/basis.js","webpack:///../../node_modules/d3-shape/src/curve/bump.js","webpack:///../../node_modules/d3-shape/src/curve/linear.js","webpack:///../../node_modules/d3-shape/src/curve/monotone.js","webpack:///../../node_modules/d3-shape/src/curve/natural.js","webpack:///../../node_modules/d3-shape/src/constant.js","webpack:///../../node_modules/d3-shape/src/array.js","webpack:///../../node_modules/d3-path/src/path.js","webpack:///../../node_modules/d3-shape/src/point.js","webpack:///../../node_modules/d3-shape/src/line.js","webpack:///../../node_modules/d3-shape/src/path.js"],"sourcesContent":["export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n\n/** 创建实例 */\n\n/**\n * @description 创建实例 (body为实例信息,字段限制参考模型定义,支持关系创建)\n * @endpoint POST /v2/object/:objectId/instance\n */\nexport var InstanceApi_createInstance = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, data, options) {\n return (/**! @contract easyops.api.cmdb.instance.CreateInstance@1.1.0 */(yield http.post(\"api/gateway/cmdb.instance.CreateInstance/v2/object/\".concat(objectId, \"/instance\"), data, options)).data\n );\n });\n return function InstanceApi_createInstance(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=createInstance.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 搜索实例V3 (支持多属性排序)\n * @endpoint POST /v3/object/:objectId/instance/_search\n */\nexport var InstanceApi_postSearchV3 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, data, options) {\n return (/**! @contract easyops.api.cmdb.instance.PostSearchV3@1.1.0 */(yield http.post(\"api/gateway/cmdb.instance.PostSearchV3/v3/object/\".concat(objectId, \"/instance/_search\"), data, options)).data\n );\n });\n return function InstanceApi_postSearchV3(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=postSearchV3.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n\n/** 要更新的实例 */\n\n/**\n * @description 更新实例V2 (支持关系更新)\n * @endpoint PUT /v2/object/:objectId/instance/:instanceId\n */\nexport var InstanceApi_updateInstanceV2 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, instanceId, data, options) {\n return (/**! @contract easyops.api.cmdb.instance.UpdateInstanceV2@1.0.0 */(yield http.put(\"api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/\".concat(objectId, \"/instance/\").concat(instanceId), data, options)).data\n );\n });\n return function InstanceApi_updateInstanceV2(_x, _x2, _x3, _x4) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=updateInstanceV2.js.map","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n"],"names":["_assertClassBrand","e","t","n","has","arguments","length","TypeError","_checkPrivateRedeclaration","obj","privateCollection","_classPrivateFieldGet2","s","a","get","_classPrivateFieldInitSpec","privateMap","value","set","_classPrivateFieldSet2","r","_classPrivateMethodInitSpec","privateSet","add","toPropertyKey","i","Symbol","toPrimitive","call","String","_typeof","o","iterator","constructor","prototype","InstanceApi_createInstance","_ref","objectId","data","options","http","post","concat","_x","_x2","_x3","apply","this","InstanceApi_postSearchV3","InstanceApi_updateInstanceV2","instanceId","put","_x4","point","that","x","y","_context","bezierCurveTo","_x0","_x1","_y0","_y1","Basis","context","areaStart","_line","areaEnd","NaN","lineStart","_point","lineEnd","lineTo","closePath","moveTo","Bump","bumpX","bumpY","Linear","sign","slope3","x2","y2","h0","h1","s0","s1","p","Math","min","abs","slope2","h","t0","t1","x0","y0","x1","y1","dx","MonotoneX","MonotoneY","ReflectContext","monotoneX","monotoneY","_t0","Object","create","Natural","controlPoints","m","Array","b","_y","px","py","i0","i1","push","slice","pi","PI","tau","epsilon","tauEpsilon","append","strings","_","Path","digits","_append","d","floor","Error","k","round","appendRound","quadraticCurveTo","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","sqrt","l01","l","tan","acos","t01","t21","arc","a0","a1","ccw","cos","dy","sin","cw","da","rect","w","toString","defined","constant","curve","output","path","shape","RangeError","withPath","line","buffer","from","array","defined0","undefined"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 4017.
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4017,8939],{9711:(e,t,n)=>{n.r(t);var i,a=n(4635),s=n(918),l=n(6902),o=n(5536),r=n(6121),h=n(829),c=n(2740),d=n(8769),u=n.n(d),p=n(4782),g=n(1389),A=(n(9772),n(7566)),f=n(1517),y=n(3373),v=n.n(y),b=n(1030),m=n(9126),k=n(8892),w=n(5157),_=n(8308),x=n(9576),M=n(9137),C=n(2547),E=n(1803),N=n(3739),W=n(9191),T=n(6671),R=n(8060),S=n(2448),z=n(8657),$=n(8069),L=n(1324),B=n(821),D=n(9741),P=n(2673),O=n(5987);let H,I,K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ie,ae,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe;const{defineElement:He,property:Ie,event:Ke,method:Ue}=(0,p.createDecorators)(),Ye=(0,d.forwardRef)(wt);let Ve;var je=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Fe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Ge=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,it=new WeakMap,at=new WeakMap,st=new WeakMap,lt=new WeakMap,ot=new WeakSet,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,At=new WeakMap,ft=new WeakMap,yt=new WeakMap,vt=new WeakMap,bt=new WeakMap,mt=new WeakMap;class kt extends g.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ot),(0,s.A)(this,je,(H(this),K(this))),(0,s.A)(this,Xe,(U(this),Y(this))),(0,s.A)(this,qe,(V(this),j(this))),(0,s.A)(this,Fe,(X(this),q(this))),(0,s.A)(this,Ze,(F(this),Z(this))),(0,s.A)(this,Je,(J(this),G(this))),(0,s.A)(this,Ge,(Q(this),ee(this))),(0,s.A)(this,Qe,(te(this),ne(this))),(0,s.A)(this,et,(ie(this),ae(this))),(0,s.A)(this,tt,(se(this),le(this))),(0,s.A)(this,nt,(oe(this),re(this,!0))),(0,s.A)(this,it,(he(this),ce(this,!0))),(0,s.A)(this,at,(de(this),ue(this,!0))),(0,s.A)(this,st,(pe(this),ge(this))),(0,s.A)(this,lt,(Ae(this),fe(this))),(0,s.A)(this,rt,(be(this),e=>{(0,o.A)(ot,this,ye).emit(e)})),(0,s.A)(this,ht,me(this)),(0,s.A)(this,ct,(_e(this),e=>{(0,o.A)(ot,this,ke).emit(e)})),(0,s.A)(this,dt,xe(this)),(0,s.A)(this,ut,(Ee(this),e=>{(0,o.A)(ot,this,Me).emit(e)})),(0,s.A)(this,pt,Ne(this)),(0,s.A)(this,gt,(Re(this),e=>{(0,o.A)(ot,this,We).emit(e)})),(0,s.A)(this,At,Se(this)),(0,s.A)(this,ft,(Le(this),e=>{(0,o.A)(ot,this,ze).emit(e)})),(0,s.A)(this,yt,Be(this)),(0,s.A)(this,vt,(Oe(this),e=>{(0,o.A)(ot,this,De).emit(e)})),(0,s.A)(this,bt,(e=>{(0,P.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,mt,(0,d.createRef)())}get layout(){return(0,h.A)(je,this)}set layout(e){(0,r.A)(je,this,e)}get nodes(){return(0,h.A)(Xe,this)}set nodes(e){(0,r.A)(Xe,this,e)}get edges(){return(0,h.A)(qe,this)}set edges(e){(0,r.A)(qe,this,e)}get nodeBricks(){return(0,h.A)(Fe,this)}set nodeBricks(e){(0,r.A)(Fe,this,e)}get lines(){return(0,h.A)(Ze,this)}set lines(e){(0,r.A)(Ze,this,e)}get layoutOptions(){return(0,h.A)(Je,this)}set layoutOptions(e){(0,r.A)(Je,this,e)}get activeTarget(){return(0,h.A)(Ge,this)}set activeTarget(e){(0,r.A)(Ge,this,e)}get disableKeyboardAction(){return(0,h.A)(Qe,this)}set disableKeyboardAction(e){(0,r.A)(Qe,this,e)}get connectNodes(){return(0,h.A)(et,this)}set connectNodes(e){(0,r.A)(et,this,e)}get dragNodes(){return(0,h.A)(tt,this)}set dragNodes(e){(0,r.A)(tt,this,e)}get zoomable(){return(0,h.A)(nt,this)}set zoomable(e){(0,r.A)(nt,this,e)}get scrollable(){return(0,h.A)(it,this)}set scrollable(e){(0,r.A)(it,this,e)}get pannable(){return(0,h.A)(at,this)}set pannable(e){(0,r.A)(at,this,e)}get scaleRange(){return(0,h.A)(st,this)}set scaleRange(e){(0,r.A)(st,this,e)}callOnLineLabel(e,t){for(var n,i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];null===(n=(0,h.A)(mt,this).current)||void 0===n||n.callOnLineLabel(e,t,...a)}render(){return u().createElement(Ye,{ref:(0,h.A)(mt,this),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(rt,this),onSwitchActiveTarget:(0,h.A)(bt,this),onNodeDelete:(0,h.A)(ct,this),onEdgeDelete:(0,h.A)(ut,this),onLineClick:(0,h.A)(gt,this),onLineDoubleClick:(0,h.A)(ft,this),onNodesConnect:(0,h.A)(vt,this)})}}function wt(e,t){let{layout:n,nodes:i,edges:a,nodeBricks:s,lines:l,layoutOptions:o,connectNodes:r,dragNodes:h,activeTarget:c,disableKeyboardAction:p,zoomable:g,scrollable:y,pannable:B,scaleRange:H,onActiveTargetChange:I,onSwitchActiveTarget:K,onNodeDelete:U,onEdgeDelete:Y,onLineClick:V,onLineDoubleClick:j,onNodesConnect:X}=e;const[q,F]=(0,d.useState)(!1),[Z,J]=(0,d.useState)(0),[G,Q]=(0,d.useState)(null),[ee,te]=(0,d.useState)(!1),[ne,ie]=(0,d.useState)(0),[ae,se]=(0,d.useState)(null),[le,oe]=(0,d.useState)([]),[re,he]=(0,d.useState)(!1),[ce,de]=(0,d.useState)({k:1,x:0,y:0}),ue=(0,d.useRef)(new Map),pe=(0,d.useRef)(null),ge=(0,d.useRef)(null),[Ae,fe]=(0,d.useState)(!1),{userViewReady:ye,userViewNodesMap:ve,saveUserView:be}=(0,D._)(null==h?void 0:h.save),[me,ke]=(0,d.useState)([0,0]),[we,_e]=(0,d.useState)(null),[xe,Me]=(0,d.useState)("initial"),[Ce,Ee]=(0,d.useState)(null);(0,d.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var n,i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];null==ae||null===(n=ae.get(e))||void 0===n||null===(n=n.firstElementChild)||void 0===n||n[t](...a)}}))),(0,d.useEffect)((()=>{const e=e=>{(0,S.P)(e,{nodes:i,nodesRefRepository:G,connectNodes:r,dragNodes:h,scale:ce.k,setConnectLineState:_e,setConnectLineTo:ke,setManualLayoutStatus:Me,setNodeMovement:Ee,onSwitchActiveTarget:K,onNodesConnect:X})},t=ge.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[i,r,h,ce.k,G,X,K]);const{normalizedLines:Ne,normalizedLinesMap:We,markers:Te}=(0,d.useMemo)((()=>(0,M.t)(a,l)),[a,l]),Re=(0,d.useMemo)((()=>Ne.flatMap((e=>{let t,n,{line:{text:i,label:a,$id:s},edge:l}=e;return i||a?(a?(t="label",n=[].concat(a)):(t="text",n=[].concat(i)),n.map((e=>({[t]:e,id:`${s}-${e.placement??"center"}`,edge:l})))):[]}))),[Ne]),{nodes:Se,edges:ze}=(0,$.o)({layout:n,nodes:i,edges:a,manualLayoutStatus:xe,userViewReady:ye,userViewNodesMap:ve,nodeMovement:Ce,nodesRefRepository:G,lineLabelsRefRepository:ae,normalizedLinesMap:We,layoutOptions:o,nodesRenderId:Z,lineLabelsRenderId:ne});(0,d.useEffect)((()=>{"finished"===xe&&be(Se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[xe]);const $e=(0,d.useMemo)((()=>(0,x.R)(ze,Se,Ne)),[Ne,Se,ze]),Le=c??null,[Be,De]=(0,d.useState)(Le);(0,d.useEffect)((()=>{De((e=>(0,P.c)(e,Le)?e:Le))}),[Le]);const Pe=(0,d.useRef)(!1);(0,d.useEffect)((()=>{Pe.current?null==I||I(Be):Pe.current=!0}),[Be,I]),(0,d.useEffect)((()=>{const e=pe.current;if(!e||p)return;const t=e=>{const t=(0,w.a)(e,{renderedNodes:Se,activeTarget:Be});"delete-node"===(null==t?void 0:t.action)?null==U||U(t.node):"delete-edge"===(null==t?void 0:t.action)?null==Y||Y(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==K||K({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[Be,Se,p,K,U,Y]);const Oe=(0,d.useCallback)((e=>{e&&(J((e=>e+1)),Q(e)),F((t=>t||!!e))}),[]),He=(0,d.useCallback)((e=>{e&&(ie((e=>e+1)),se(e)),te((t=>t||!!e))}),[]),Ie=(0,d.useMemo)((()=>H??[z.sS,z.Yt]),[H]),Ke=(0,d.useMemo)((()=>(0,f.s_)()),[]);(0,d.useEffect)((()=>{let e=!1;Ke.scaleExtent(g?Ie:[1,1]).on("start",(()=>{e=!1,he(!0)})).on("zoom",(t=>{e=!0,de(t.transform)})).on("end",(()=>{he(!1),e||null==K||K(null)}))}),[K,Ie,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(!e)return;const t=(0,A.A)(e),n=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(g||y||B)return(g||y)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),y&&(e.preventDefault(),Ke.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Ke).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),B||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),n;n()}),[B,y,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(0===Se.length||!e||Ae)return;const{k:t,x:n,y:i}=(0,_.r)(Se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:g?Ie:void 0});Ke.transform((0,A.A)(e),new f.uV(t,n,i)),fe(!0)}),[Ae,Se,Ie,g,Ke]);const Ue=(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[]),Ye=`${Ue}line-arrow-`,Ve=`${Ue}mask-`,je=`${Ue}active-line-`;(0,d.useEffect)((()=>{oe((e=>(0,R.z)(e,$e,ue.current)))}),[$e]);const[Xe,qe]=u().useState(new Map);return(0,d.useEffect)((()=>{if(!ae)return;(0,L.F)(le,ae);const e=new m.A((()=>{qe((0,O.G)(le,ae))}));for(const t of ae.values())e.observe(t);return()=>{e.disconnect()}}),[ne,ae,le]),"dagre"!==n&&"force"!==n?u().createElement("div",null,`Diagram layout not supported: "${n}"`):u().createElement("div",{className:v()("diagram",{ready:q&&Ae,grabbing:re,pannable:B}),tabIndex:-1,ref:pe},u().createElement("svg",{width:"100%",height:"100%",className:"lines"},u().createElement("defs",null,Te.map(((e,t)=>{let{type:n,strokeColor:i}=e;return u().createElement(N.c,{key:t,id:`${Ye}${t}`,type:n,strokeColor:i})})),[...Xe].map((e=>{let[t,n]=e;return u().createElement(W.y,{key:t,lineId:t,rects:n,maskPrefix:Ve,renderedLineLabels:le})})),u().createElement("marker",{id:`${je}start`,viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),u().createElement("marker",{id:`${je}end`,viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),u().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),u().createElement("g",{transform:`translate(${ce.x} ${ce.y}) scale(${ce.k})`},$e.map((e=>u().createElement(E.m,{key:e.line.$id,line:e,linePaths:ue.current,lineMaskRects:Xe,maskPrefix:Ve,markerPrefix:Ye,activeLineMarkerPrefix:je,active:"edge"===(null==Be?void 0:Be.type)&&Be.edge.source===e.edge.source&&Be.edge.target===e.edge.target,activeRelated:"node"===(null==Be?void 0:Be.type)&&(e.edge.source===Be.nodeId||e.edge.target===Be.nodeId),onLineClick:V,onLineDoubleClick:j}))))),u().createElement("div",{className:v()("line-labels",{ready:ee}),style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(C.d2,{labels:Re,onRendered:He})),u().createElement("div",{className:"nodes",ref:ge,style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(k.p,{nodes:i,nodeBricks:s,onRendered:Oe})),u().createElement(T.w,{connectLineState:we,connectLineTo:me,markerPrefix:Ye}))}i=kt,({e:[K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ie,ae,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,H],c:[Ve,I]}=(0,c.A)(i,[He("eo-diagram",{styleTexts:[B.A]})],[[Ie({type:String}),1,"layout"],[Ie({attribute:!1}),1,"nodes"],[Ie({attribute:!1}),1,"edges"],[Ie({attribute:!1}),1,"nodeBricks"],[Ie({attribute:!1}),1,"lines"],[Ie({attribute:!1}),1,"layoutOptions"],[Ie({attribute:!1}),1,"activeTarget"],[Ie({type:Boolean}),1,"disableKeyboardAction"],[Ie({attribute:!1}),1,"connectNodes"],[Ie({attribute:!1}),1,"dragNodes"],[Ie({type:Boolean}),1,"zoomable"],[Ie({type:Boolean}),1,"scrollable"],[Ie({type:Boolean}),1,"pannable"],[Ie({attribute:!1}),1,"scaleRange"],[Ke({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(lt,e),(e,t)=>(0,r.A)(lt,e,t)],[Ke({type:"node.delete"}),1,"nodeDelete",e=>(0,h.A)(ht,e),(e,t)=>(0,r.A)(ht,e,t)],[Ke({type:"edge.delete"}),1,"edgeDelete",e=>(0,h.A)(dt,e),(e,t)=>(0,r.A)(dt,e,t)],[Ke({type:"line.click"}),1,"lineClick",e=>(0,h.A)(pt,e),(e,t)=>(0,r.A)(pt,e,t)],[Ke({type:"line.dblclick"}),1,"lineDoubleClick",e=>(0,h.A)(At,e),(e,t)=>(0,r.A)(At,e,t)],[Ke({type:"nodes.connect"}),1,"connectNodes",e=>(0,h.A)(yt,e),(e,t)=>(0,r.A)(yt,e,t)],[Ue(),2,"callOnLineLabel"]],0,(e=>mt.has((0,l.A)(e))),g.ReactNextElement)),I();var _t,xt=n(3971);let Mt,Ct,Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt;const{defineElement:Ot,property:Ht,event:It,method:Kt}=(0,p.createDecorators)(),Ut=(0,d.forwardRef)(en);let Yt;var Vt=new WeakMap,jt=new WeakMap,Xt=new WeakMap,qt=new WeakSet,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap;class Qt extends g.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,qt),(0,s.A)(this,Vt,(Mt(this),Et(this))),(0,s.A)(this,jt,(Nt(this),Wt(this))),(0,s.A)(this,Xt,(Tt(this),Rt(this))),(0,s.A)(this,Ft,($t(this),e=>{(0,o.A)(qt,this,St).emit(e)})),(0,s.A)(this,Zt,Lt(this)),(0,s.A)(this,Jt,(Pt(this),e=>{(0,o.A)(qt,this,Bt).emit(e)})),(0,s.A)(this,Gt,(0,d.createRef)())}get label(){return(0,h.A)(Vt,this)}set label(e){(0,r.A)(Vt,this,e)}get type(){return(0,h.A)(jt,this)}set type(e){(0,r.A)(jt,this,e)}enableEditing(){var e;null===(e=(0,h.A)(Gt,this).current)||void 0===e||e.enableEditing()}render(){return u().createElement(Ut,{ref:(0,h.A)(Gt,this),label:this.label,onLabelEditingChange:(0,h.A)(Ft,this),onLabelChange:(0,h.A)(Jt,this)})}}function en(e,t){let{label:n,onLabelChange:i,onLabelEditingChange:a}=e;const s=n??"",[l,o]=(0,d.useState)(s),[r,h]=(0,d.useState)(!1),c=(0,d.useRef)(!1),[p,g]=(0,d.useState)(!1),A=(0,d.useRef)(null);(0,d.useImperativeHandle)(t,(()=>({enableEditing(){h(!0)}}))),(0,d.useEffect)((()=>{o(s)}),[s]);const f=(0,d.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),h(!0)}),[]);(0,d.useEffect)((()=>{var e,t;r&&(null===(e=A.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=A.current)||void 0===t||t.select())}),[r]),(0,d.useEffect)((()=>{c.current?null==a||a(r):c.current=!0}),[r,a]);const y=(0,d.useCallback)((e=>{o(e.target.value)}),[]),b=(0,d.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=A.current)||void 0===n||n.blur()}),[]),m=(0,d.useCallback)((()=>{h(!1),g(!0)}),[]);(0,d.useEffect)((()=>{p&&(null==i||i(l),g(!1))}),[l,i,p]);const k=(0,d.useCallback)((e=>{e.stopPropagation()}),[]);return u().createElement("div",{className:v()("label",{editing:r,empty:!l}),onDoubleClick:k,onMouseDown:k},u().createElement("input",{className:"label-input",value:l,ref:A,onChange:y,onKeyDown:b,onBlur:m}),u().createElement("div",{className:"label-text",onDoubleClick:f},l))}_t=Qt,({e:[Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt,Mt],c:[Yt,Ct]}=(0,c.A)(_t,[Ot("diagram.editable-label",{styleTexts:[xt.A]})],[[Ht(),1,"label"],[Ht({render:!1}),1,"type"],[It({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,h.A)(Xt,e),(e,t)=>(0,r.A)(Xt,e,t)],[It({type:"label.change"}),1,"labelChange",e=>(0,h.A)(Zt,e),(e,t)=>(0,r.A)(Zt,e,t)],[Kt(),2,"enableEditing"]],0,(e=>Gt.has((0,l.A)(e))),g.ReactNextElement)),Ct(),n(9068);var tn,nn=n(497);let an,sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn;const{defineElement:_n,property:xn,event:Mn}=(0,p.createDecorators)();let Cn;var En=new WeakMap,Nn=new WeakMap,Wn=new WeakMap,Tn=new WeakMap,Rn=new WeakSet,Sn=new WeakMap,zn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Bn=new WeakMap;class Dn extends g.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Rn),(0,s.A)(this,En,sn(this)),(0,s.A)(this,Nn,(ln(this),on(this))),(0,s.A)(this,Wn,(rn(this),hn(this))),(0,s.A)(this,Tn,(cn(this),dn(this))),(0,s.A)(this,Sn,(gn(this),e=>{(0,o.A)(Rn,this,un).emit(e)})),(0,s.A)(this,zn,An(this)),(0,s.A)(this,$n,(vn(this),e=>{(0,o.A)(Rn,this,fn).emit(e)})),(0,s.A)(this,Ln,bn(this)),(0,s.A)(this,Bn,(wn(this),e=>{(0,o.A)(Rn,this,mn).emit(e)}))}get usage(){return(0,h.A)(En,this)}set usage(e){(0,r.A)(En,this,e)}get status(){return(0,h.A)(Nn,this)}set status(e){(0,r.A)(Nn,this,e)}get decorator(){return(0,h.A)(Wn,this)}set decorator(e){(0,r.A)(Wn,this,e)}render(){return u().createElement(Pn,{usage:this.usage,onDragStart:(0,h.A)(Sn,this),onDragMove:(0,h.A)($n,this),onDragEnd:(0,h.A)(Bn,this)})}}function Pn(e){let{usage:t,onDragStart:n,onDragMove:i,onDragEnd:a}=e;const s=(0,d.useCallback)((e=>{if("library"!==t)return;e.stopPropagation(),e.preventDefault();const s=[e.clientX,e.clientY];let l=!1;const o=e=>{l||(l=(e.clientX-s[0])**2+(e.clientY-s[1])**2>=9,l&&(null==n||n([e.clientX,e.clientY]))),l&&(null==i||i([e.clientX,e.clientY]))},r=e=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),l&&(null==a||a([e.clientX,e.clientY]))};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}),[a,i,n,t]);return u().createElement("div",{onMouseDown:s},u().createElement("slot",null))}tn=Dn,({e:[sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn],c:[Cn,an]}=(0,c.A)(tn,[_n("diagram.experimental-node",{styleTexts:[nn.A]})],[[xn(),1,"usage"],[xn({type:String,render:!1}),1,"status"],[xn({type:String}),1,"decorator"],[Mn({type:"drag.start"}),1,"dragStartEvent",e=>(0,h.A)(Tn,e),(e,t)=>(0,r.A)(Tn,e,t)],[Mn({type:"drag.move"}),1,"dragMoveEvent",e=>(0,h.A)(zn,e),(e,t)=>(0,r.A)(zn,e,t)],[Mn({type:"drag.end"}),1,"dragEndEvent",e=>(0,h.A)(Ln,e),(e,t)=>(0,r.A)(Ln,e,t)]],0,(e=>Bn.has((0,l.A)(e))),g.ReactNextElement)),an();var On,Hn=n(8185),In=n(2140),Kn=n(3783),Un=n(3033),Yn=n(8091),Vn=n(1819),jn=n(5748),Xn=n(227),qn=n(531),Fn=n(7099),Zn=n(1484),Jn=n(8197),Gn=n(7531),Qn=n(2098),ei=n(3012),ti=n(6237);let ni,ii,ai,si,li,oi,ri,hi,ci,di,ui,pi,gi,Ai,fi,yi,vi,bi,mi,ki,wi,_i,xi,Mi,Ci,Ei,Ni,Wi,Ti,Ri,Si,zi,$i,Li,Bi,Di,Pi,Oi,Hi,Ii,Ki;const{defineElement:Ui,property:Yi,event:Vi}=(0,p.createDecorators)();let ji;var Xi=new WeakMap,qi=new WeakMap,Fi=new WeakMap,Zi=new WeakMap,Ji=new WeakMap,Gi=new WeakMap,Qi=new WeakMap,ea=new WeakMap,ta=new WeakMap,na=new WeakMap,ia=new WeakMap,aa=new WeakMap,sa=new WeakMap,la=new WeakMap,oa=new WeakMap,ra=new WeakSet,ha=new WeakMap,ca=new WeakMap,da=new WeakMap,ua=new WeakMap,pa=new WeakMap,ga=new WeakMap;class Aa extends g.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ra),(0,s.A)(this,Xi,ii(this)),(0,s.A)(this,qi,(ai(this),si(this))),(0,s.A)(this,Fi,(li(this),oi(this))),(0,s.A)(this,Zi,(ri(this),hi(this,[Un.HP,Un.HP]))),(0,s.A)(this,Ji,(ci(this),di(this))),(0,s.A)(this,Gi,(ui(this),pi(this))),(0,s.A)(this,Qi,(gi(this),Ai(this))),(0,s.A)(this,ea,(fi(this),yi(this))),(0,s.A)(this,ta,(vi(this),bi(this))),(0,s.A)(this,na,(mi(this),ki(this))),(0,s.A)(this,ia,(wi(this),_i(this,!0))),(0,s.A)(this,aa,(xi(this),Mi(this,!0))),(0,s.A)(this,sa,(Ci(this),Ei(this,!0))),(0,s.A)(this,la,(Ni(this),Wi(this))),(0,s.A)(this,oa,(Ti(this),Ri(this))),(0,s.A)(this,ha,($i(this),e=>{(0,o.A)(ra,this,Si).emit(e)})),(0,s.A)(this,ca,(e=>{(0,Hn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,da,Li(this)),(0,s.A)(this,ua,(Pi(this),e=>{(0,o.A)(ra,this,Bi).emit(e)})),(0,s.A)(this,pa,Oi(this)),(0,s.A)(this,ga,(Ki(this),e=>{(0,o.A)(ra,this,Hi).emit(e)}))}get cells(){return(0,h.A)(Xi,this)}set cells(e){(0,r.A)(Xi,this,e)}get layout(){return(0,h.A)(qi,this)}set layout(e){(0,r.A)(qi,this,e)}get layoutOptions(){return(0,h.A)(Fi,this)}set layoutOptions(e){(0,r.A)(Fi,this,e)}get defaultNodeSize(){return(0,h.A)(Zi,this)}set defaultNodeSize(e){(0,r.A)(Zi,this,e)}get defaultNodeBricks(){return(0,h.A)(Ji,this)}set defaultNodeBricks(e){(0,r.A)(Ji,this,e)}get degradedThreshold(){return(0,h.A)(Gi,this)}set degradedThreshold(e){(0,r.A)(Gi,this,e)}get degradedNodeLabel(){return(0,h.A)(Qi,this)}set degradedNodeLabel(e){(0,r.A)(Qi,this,e)}get defaultEdgeLines(){return(0,h.A)(ea,this)}set defaultEdgeLines(e){(0,r.A)(ea,this,e)}get activeTarget(){return(0,h.A)(ta,this)}set activeTarget(e){(0,r.A)(ta,this,e)}get fadeUnrelatedCells(){return(0,h.A)(na,this)}set fadeUnrelatedCells(e){(0,r.A)(na,this,e)}get zoomable(){return(0,h.A)(ia,this)}set zoomable(e){(0,r.A)(ia,this,e)}get scrollable(){return(0,h.A)(aa,this)}set scrollable(e){(0,r.A)(aa,this,e)}get pannable(){return(0,h.A)(sa,this)}set pannable(e){(0,r.A)(sa,this,e)}get scaleRange(){return(0,h.A)(la,this)}set scaleRange(e){(0,r.A)(la,this,e)}render(){return u().createElement(fa,{shadowRoot:this.shadowRoot,cells:this.cells,layout:this.layout,layoutOptions:this.layoutOptions,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(ha,this),onSwitchActiveTarget:(0,h.A)(ca,this),onCellContextMenu:(0,h.A)(ua,this),onCellClick:(0,h.A)(ga,this)})}}function fa(e){let{shadowRoot:t,cells:n,layout:i,layoutOptions:a,defaultNodeSize:s,defaultNodeBricks:l,defaultEdgeLines:o,degradedThreshold:r,degradedNodeLabel:h,activeTarget:c,fadeUnrelatedCells:p,zoomable:g,scrollable:f,pannable:y,scaleRange:m,onActiveTargetChange:k,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x}=e;const[{cells:M,layoutKey:C},E]=(0,d.useReducer)(jn.d,n,(e=>({cells:(0,Kn.C)(e,{defaultNodeSize:s}),layoutKey:1}))),W=(0,d.useMemo)((()=>M.filter(qn.N).length>=(r??Un.pC)),[M,r]),T=(0,d.useRef)(null),R=(0,d.useRef)(null),{grabbing:S,transform:z,zoomer:$,scaleRange:L}=(0,Yn.f)({rootRef:T,zoomable:g,scrollable:f,pannable:y,draggable:!0,scaleRange:m,onSwitchActiveTarget:w}),{centered:B,setCentered:D,getNextLayoutKey:P}=(0,Zn.g)({layout:i,layoutOptions:a,rootRef:T,cells:M,zoomable:g,zoomer:$,scaleRange:L,layoutKey:C,dispatch:E}),O=(0,d.useCallback)((()=>{D(!1)}),[D]),H=(0,d.useRef)(n);(0,d.useEffect)((()=>{if(n!==H.current){H.current=n;const e=(0,Qn.L)({canvasWidth:t.host.clientWidth,canvasHeight:t.host.clientHeight,defaultNodeSize:s,layout:i,previousCells:M,cells:n,scaleRange:L,transform:z});E({type:"update-cells",payload:e.cells})}}),[M,s,n,i,L,t,z]);const I=(0,Vn.J)({cellsRef:R,activeTarget:c,onActiveTargetChange:k}),K=`${(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[])}line-arrow-`,U=(0,d.useCallback)(((e,t)=>{E({type:"update-node-size",payload:{id:e,size:t},layoutKey:P()})}),[P]),[Y,V]=(0,d.useState)(null),j=(0,d.useCallback)((e=>{V(e)}),[]),X=(0,d.useCallback)((e=>{V((t=>t===e?null:t))}),[]),[q,F]=(0,d.useState)([]);(0,d.useEffect)((()=>{const e=p?(0,Xn.Y)(M,null,Y):[];F((t=>0===t.length&&0===e.length?t:e))}),[M,p,Y]);const Z=(0,d.useCallback)((e=>{$.scaleTo((0,A.A)(T.current),e/100)}),[$]),[J,G]=(0,Gn.d)({cells:M,defaultEdgeLines:o,markerPrefix:K}),Q=(0,Jn.H)({cells:M,layout:i,centered:B});return u().createElement(u().Fragment,null,u().createElement("svg",{width:"100%",height:"100%",ref:T,className:v()("root",{grabbing:S,pannable:y,ready:Q}),tabIndex:-1},u().createElement("defs",null,G.map(((e,t)=>u().createElement(N.c,{key:t,id:`${K}${t}`,type:"arrow",strokeColor:e.strokeColor})))),u().createElement("g",{transform:`translate(${z.x} ${z.y}) scale(${z.k})`},u().createElement("g",{className:"cells",ref:R},M.map((e=>u().createElement(In.m,{key:`${e.type}:${(0,qn.WW)(e)?`${e.source}~${e.target}`:e.id}`,layout:i,cell:e,cells:M,degraded:W,degradedNodeLabel:h,defaultNodeBricks:l,lineConfMap:J,transform:z,activeTarget:I,readOnly:!0,unrelatedCells:q,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x,onNodeBrickResize:U,onCellMouseEnter:p&&(0,qn.N)(e)?j:void 0,onCellMouseLeave:p&&(0,qn.N)(e)?X:void 0})))))),u().createElement(Fn.Y,{shadowRoot:t,scale:z.k,scaleRange:L,onZoomChange:Z,onReCenter:O}))}On=Aa,({e:[ii,ai,si,li,oi,ri,hi,ci,di,ui,pi,gi,Ai,fi,yi,vi,bi,mi,ki,wi,_i,xi,Mi,Ci,Ei,Ni,Wi,Ti,Ri,Si,zi,$i,Li,Bi,Di,Pi,Oi,Hi,Ii,Ki],c:[ji,ni]}=(0,c.A)(On,[Ui("eo-display-canvas",{styleTexts:[ei.A,ti.A]})],[[Yi({attribute:!1}),1,"cells"],[Yi({type:String}),1,"layout"],[Yi({attribute:!1}),1,"layoutOptions"],[Yi({attribute:!1}),1,"defaultNodeSize"],[Yi({attribute:!1}),1,"defaultNodeBricks"],[Yi({type:Number}),1,"degradedThreshold"],[Yi({attribute:!1}),1,"degradedNodeLabel"],[Yi({attribute:!1}),1,"defaultEdgeLines"],[Yi({attribute:!1}),1,"activeTarget"],[Yi({type:Boolean}),1,"fadeUnrelatedCells"],[Yi({type:Boolean}),1,"zoomable"],[Yi({type:Boolean}),1,"scrollable"],[Yi({type:Boolean}),1,"pannable"],[Yi({attribute:!1}),1,"scaleRange"],[Vi({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(oa,e),(e,t)=>(0,r.A)(oa,e,t)],[Vi({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,h.A)(da,e),(e,t)=>(0,r.A)(da,e,t)],[Vi({type:"cell.click"}),1,"cellClick",e=>(0,h.A)(pa,e),(e,t)=>(0,r.A)(pa,e,t)]],0,(e=>ga.has((0,l.A)(e))),g.ReactNextElement)),ni()},9068:(e,t,n)=>{n.d(t,{uuidV4:()=>kn});var i,a=n(4635),s=n(918),l=n(6902),o=n(2559),r=n(5536),h=n(6121),c=n(829),d=n(2740),u=n(8769),p=n.n(u),g=n(4782),A=n(1389),f=n(3518),y=(n(9772),n(1030)),v=n(3373),b=n.n(v),m=n(7566),k=n(5748),w=n(3739),_=n(531),x=n(8185),M=n(5114),C=n(2140),E=n(3639),N=n(3783),W=n(2098),T=n(227),R=n(3033),S=n(8091),z=n(1819),$=n(7099),L=n(1484),B=n(8197),D=n(7531),P=n(2219),O=n(3012),H=n(6237),I=n(9386),K=n(1991);let U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ie,ae,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,it,at,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt;const kt=(0,f.unwrapProvider)("basic.lock-body-scroll"),{defineElement:wt,property:_t,method:xt,event:Mt}=(0,g.createDecorators)(),Ct=p().forwardRef(mn);let Et;var Nt=new WeakMap,Wt=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,St=new WeakMap,zt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Ht=new WeakMap,It=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Yt=new WeakMap,Vt=new WeakMap,jt=new WeakMap,Xt=new WeakSet,qt=new WeakMap,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,an=new WeakMap,sn=new WeakMap,ln=new WeakMap,on=new WeakMap,rn=new WeakMap,hn=new WeakMap,cn=new WeakMap,dn=new WeakMap,un=new WeakMap,pn=new WeakMap,gn=new WeakMap,An=new WeakMap,fn=new WeakMap,yn=new WeakMap;class vn extends A.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Xt),(0,s.A)(this,Nt,(U(this),V(this))),(0,s.A)(this,Wt,(j(this),X(this))),(0,s.A)(this,Tt,(q(this),F(this))),(0,s.A)(this,Rt,(Z(this),J(this,[R.HP,R.HP]))),(0,s.A)(this,St,(G(this),Q(this))),(0,s.A)(this,zt,(ee(this),te(this))),(0,s.A)(this,$t,(ne(this),ie(this))),(0,s.A)(this,Lt,(ae(this),se(this))),(0,s.A)(this,Bt,(le(this),oe(this))),(0,s.A)(this,Dt,(re(this),he(this))),(0,s.A)(this,Pt,(ce(this),de(this,!0))),(0,s.A)(this,Ot,(ue(this),pe(this,!0))),(0,s.A)(this,Ht,(ge(this),Ae(this,!0))),(0,s.A)(this,It,(fe(this),ye(this,!0))),(0,s.A)(this,Kt,(ve(this),be(this,!1))),(0,s.A)(this,Ut,(me(this),ke(this))),(0,s.A)(this,Yt,(we(this),_e(this))),(0,s.A)(this,Vt,(xe(this),Me(this))),(0,s.A)(this,jt,(Ce(this),Ee(this))),(0,s.A)(this,qt,(Te(this),e=>{(0,r.A)(Xt,this,Ne).emit(e)})),(0,s.A)(this,Ft,(e=>{(0,x.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,Zt,Re(this)),(0,s.A)(this,Jt,($e(this),Le(this))),(0,s.A)(this,Gt,(Pe(this),e=>{(0,r.A)(Xt,this,Be).emit(e),"node"===e.type&&(0,r.A)(Xt,this,Se).emit(e)})),(0,s.A)(this,Qt,Oe(this)),(0,s.A)(this,en,(Ke(this),e=>{(0,r.A)(Xt,this,He).emit(e)})),(0,s.A)(this,tn,Ue(this)),(0,s.A)(this,nn,(je(this),e=>{(0,r.A)(Xt,this,Ye).emit(e)})),(0,s.A)(this,an,Xe(this)),(0,s.A)(this,sn,(Ze(this),Je(this))),(0,s.A)(this,ln,(et(this),e=>{(0,r.A)(Xt,this,Ge).emit(e),"node"===e.type&&(0,r.A)(Xt,this,qe).emit(e)})),(0,s.A)(this,on,tt(this)),(0,s.A)(this,rn,(at(this),e=>{(0,r.A)(Xt,this,nt).emit(e)})),(0,s.A)(this,hn,st(this)),(0,s.A)(this,cn,(rt(this),e=>{(0,r.A)(Xt,this,lt).emit(e)})),(0,s.A)(this,dn,ht(this)),(0,s.A)(this,un,(ut(this),e=>{(0,r.A)(Xt,this,ct).emit(e)})),(0,s.A)(this,pn,pt(this)),(0,s.A)(this,gn,(ft(this),e=>{(0,r.A)(Xt,this,gt).emit(e)})),(0,s.A)(this,An,yt(this)),(0,s.A)(this,fn,(mt(this),e=>{(0,r.A)(Xt,this,vt).emit(e)})),(0,s.A)(this,yn,(0,u.createRef)())}get cells(){return(0,c.A)(Nt,this)}set cells(e){(0,h.A)(Nt,this,e)}get layout(){return(0,c.A)(Wt,this)}set layout(e){(0,h.A)(Wt,this,e)}get layoutOptions(){return(0,c.A)(Tt,this)}set layoutOptions(e){(0,h.A)(Tt,this,e)}get defaultNodeSize(){return(0,c.A)(Rt,this)}set defaultNodeSize(e){(0,h.A)(Rt,this,e)}get defaultNodeBricks(){return(0,c.A)(St,this)}set defaultNodeBricks(e){(0,h.A)(St,this,e)}get degradedThreshold(){return(0,c.A)(zt,this)}set degradedThreshold(e){(0,h.A)(zt,this,e)}get degradedNodeLabel(){return(0,c.A)($t,this)}set degradedNodeLabel(e){(0,h.A)($t,this,e)}get defaultEdgeLines(){return(0,c.A)(Lt,this)}set defaultEdgeLines(e){(0,h.A)(Lt,this,e)}get activeTarget(){return(0,c.A)(Bt,this)}set activeTarget(e){(0,h.A)(Bt,this,e)}get fadeUnrelatedCells(){return(0,c.A)(Dt,this)}set fadeUnrelatedCells(e){(0,h.A)(Dt,this,e)}get zoomable(){return(0,c.A)(Pt,this)}set zoomable(e){(0,h.A)(Pt,this,e)}get scrollable(){return(0,c.A)(Ot,this)}set scrollable(e){(0,h.A)(Ot,this,e)}get pannable(){return(0,c.A)(Ht,this)}set pannable(e){(0,h.A)(Ht,this,e)}get selectable(){return(0,c.A)(It,this)}set selectable(e){(0,h.A)(It,this,e)}get allowEdgeToArea(){return(0,c.A)(Kt,this)}set allowEdgeToArea(e){(0,h.A)(Kt,this,e)}get dragBehavior(){return(0,c.A)(Ut,this)}set dragBehavior(e){(0,h.A)(Ut,this,e)}get ctrlDragBehavior(){return(0,c.A)(Yt,this)}set ctrlDragBehavior(e){(0,h.A)(Yt,this,e)}get scaleRange(){return(0,c.A)(Vt,this)}set scaleRange(e){(0,h.A)(Vt,this,e)}async dropNode(e){var t,n;let{id:i,position:a,size:s,data:l,useBrick:o}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,a[0],a[1]))||void 0===t?void 0:t.includes(this)){var r;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"node",id:i,view:{..."force"===this.layout||"dagre"===this.layout?null:{x:(a[0]-e.left-t.x)/t.k,y:(a[1]-e.top-t.y)/t.k},width:(null==s?void 0:s[0])??this.defaultNodeSize[0],height:(null==s?void 0:s[1])??this.defaultNodeSize[0]},data:l,useBrick:o};return null===(r=(0,c.A)(yn,this).current)||void 0===r||r.dropNode(n),n}return null}async dropDecorator(e){var t,n;let{position:i,decorator:a,text:s,direction:l}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,i[0],i[1]))||void 0===t?void 0:t.includes(this)){var o;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"decorator",decorator:a,id:kn(),view:{x:(i[0]-e.left-t.x)/t.k,y:(i[1]-e.top-t.y)/t.k,width:R.N8,height:R.w1,text:s,direction:l}};return null===(o=(0,c.A)(yn,this).current)||void 0===o||o.dropDecorator(n),n}return null}async addNodes(e){if(0===e.length)return[];const t=e.map((e=>{let{size:t,useBrick:n,id:i,data:a}=e;return{type:"node",id:i,data:a,view:{width:(null==t?void 0:t[0])??this.defaultNodeSize[0],height:(null==t?void 0:t[1])??this.defaultNodeSize[0]},useBrick:n}}));return(0,c.A)(yn,this).current.addNodes(t,{defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight})}async addEdge(e){var t;let{source:n,target:i,data:a}=e;const s={type:"edge",source:n,target:i,data:a};return null===(t=(0,c.A)(yn,this).current)||void 0===t||t.addEdge(s),s}manuallyConnectNodes(e){return(0,c.A)(yn,this).current.manuallyConnectNodes(e)}async updateCells(e,t){await(0,o.A)(Xt,this,bn).call(this);const{updated:n}=(0,c.A)(yn,this).current.updateCells(e,{...t,defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight});return{updated:n}}disconnectedCallback(){super.disconnectedCallback(),kt(this,!1)}render(){return p().createElement(Ct,{host:this,ref:(0,c.A)(yn,this),layout:this.layout,layoutOptions:this.layoutOptions,cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,dragBehavior:this.dragBehavior,ctrlDragBehavior:this.ctrlDragBehavior,scaleRange:this.scaleRange,allowEdgeToArea:this.allowEdgeToArea,onActiveTargetChange:(0,c.A)(qt,this),onSwitchActiveTarget:(0,c.A)(Ft,this),onCellMove:(0,c.A)(Gt,this),onCellsMove:(0,c.A)(en,this),onCellResize:(0,c.A)(nn,this),onCellDelete:(0,c.A)(ln,this),onCellsDelete:(0,c.A)(rn,this),onCellContextMenu:(0,c.A)(cn,this),onDecoratorTextChange:(0,c.A)(un,this),onContainerContainerChange:(0,c.A)(gn,this),onScaleChange:(0,c.A)(fn,this)})}}function bn(){return new Promise((e=>{const t=()=>{(0,c.A)(yn,this).current?e():setTimeout(t,10)};t()}))}function mn(e,t){let{host:n,layout:i,layoutOptions:a,cells:s,defaultNodeSize:l,defaultNodeBricks:o,defaultEdgeLines:r,degradedThreshold:h,degradedNodeLabel:c,activeTarget:d,fadeUnrelatedCells:g,zoomable:A,scrollable:f,pannable:v,dragBehavior:x,ctrlDragBehavior:O,scaleRange:H,allowEdgeToArea:U,onActiveTargetChange:Y,onSwitchActiveTarget:V,onCellMove:j,onCellResize:X,onCellDelete:q,onCellsMove:F,onCellsDelete:Z,onCellContextMenu:J,onDecoratorTextChange:G,onScaleChange:Q,onContainerContainerChange:ee}=e;const[{cells:te,layoutKey:ne},ie]=(0,u.useReducer)(k.d,s,(e=>({cells:(0,N.C)(e,{defaultNodeSize:l}),layoutKey:0}))),ae=(0,u.useMemo)((()=>te.filter(_.N).length>=(h??R.pC)),[te,h]),se=(0,u.useRef)(null),le=(0,u.useRef)(null),oe=(0,u.useRef)(null),[re,he]=(0,u.useState)([]),[ce,de]=(0,u.useState)([]),{grabbing:ue,transform:pe,zoomer:ge,scaleRange:Ae}=(0,S.f)({rootRef:se,zoomable:A,scrollable:f,pannable:v,draggable:"grab"===x,ctrlDraggable:"grab"===O,scaleRange:H,onSwitchActiveTarget:V});(0,u.useEffect)((()=>{Q(pe.k)}),[Q,pe.k]);const[fe,ye]=(0,u.useState)(null),[ve,be]=(0,u.useState)(null),{centered:me,setCentered:ke,getNextLayoutKey:we}=(0,L.g)({layout:i,layoutOptions:a,rootRef:se,cells:te,zoomable:A,zoomer:ge,scaleRange:Ae,layoutKey:ne,allowEdgeToArea:U,dispatch:ie});(0,u.useImperativeHandle)(t,(()=>({dropNode(e){"dagre"!==i&&"force"!==i&&ke(!0),ie({type:"drop-node",payload:e})},dropDecorator(e){"dagre"!==i&&"force"!==i&&ke(!0),ie({type:"drop-decorator",payload:e})},addNodes(e,t){let{defaultNodeSize:n,canvasWidth:a,canvasHeight:s}=t;const l=te.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,o=[...te.slice(0,l),...e,...te.slice(l)],{cells:r,updated:h,shouldReCenter:c}=(0,W.L)({cells:o,layout:i,previousCells:te,defaultNodeSize:n,canvasWidth:a,canvasHeight:s,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return c&&ke(!1),ie({type:"update-cells",payload:r}),h.filter((t=>e.includes(t)))},addEdge(e){ie({type:"add-edge",payload:e})},updateCells(e,t){const{shouldReCenter:n,...a}=(0,W.L)({...t,layout:i,previousCells:te,cells:e,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return n&&ke(!1),ie({type:"update-cells",payload:a.cells}),a},getTransform:()=>pe,manuallyConnectNodes(e){const t=te.find((t=>(U&&(0,_.o6)(t)||(0,_.N)(t))&&t.id===e));if(t){const e=se.current.getBoundingClientRect();return be({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[e.left,e.top]}),new Promise(((e,t)=>{oe.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[te,i,Ae,ke,pe,U]);const _e=(0,u.useCallback)(((e,t)=>{var n;for(let n=te.length-1;n>=0;n--){const a=te[n];if((U&&(0,_.o6)(a)||(0,_.N)(a))&&a.id!==e.source.id&&a.view.x<t[0]&&a.view.x+a.view.width>t[0]&&a.view.y<t[1]&&a.view.y+a.view.height>t[1]){var i;null===(i=oe.current)||void 0===i||i.resolve({source:e.source,target:a});break}}null===(n=oe.current)||void 0===n||n.reject(null),be(null)}),[te]);(0,u.useEffect)((()=>{kt(n,!(!ve&&!fe))}),[ve,n,fe]);const xe=(0,z.J)({cellsRef:le,activeTarget:d,onActiveTargetChange:Y}),[Me,Ce]=(0,u.useState)([]);(0,u.useEffect)((()=>{const e=g?(0,T.Y)(te,ve,xe,U):[];Ce((t=>0===t.length&&0===e.length?t:e))}),[xe,te,ve,g,U]),(0,u.useEffect)((()=>{const e=se.current;if(!e||re.length>0)return;const t=e=>{const t=(0,M.a)(e,{cells:te,activeTarget:xe});"delete-cells"===(null==t?void 0:t.action)&&(Z(t.cells),1===t.cells.length&&q(t.cells[0]))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[xe,te,re.length,q,Z]);const Ee=`${(0,u.useMemo)((()=>`${(0,y.uniqueId)("diagram-")}-`),[])}line-arrow-`,Ne=(0,u.useCallback)((e=>{ie({type:"move-cells",payload:e});const t=[];(0,K._)(e,te).forEach((e=>{var n,i;null!==(n=e.containerCell)&&void 0!==n&&n.id&&t.push(null===(i=e.containerCell)||void 0===i?void 0:i.id)})),de(t)}),[te]),We=(0,u.useCallback)((e=>{ie({type:"move-cells",payload:e}),F(e),1===e.length&&j(e[0]),(0,K._)(e,te,ee),de([])}),[j,F,te,ee]),Te=(0,u.useCallback)((e=>{ie({type:"resize-cell",payload:e})}),[]),Re=(0,u.useCallback)((e=>{ie({type:"resize-cell",payload:e}),X(e)}),[X]),Se=(0,u.useCallback)((e=>{let{id:t,editing:n}=e;he(n?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]),ze=(0,u.useCallback)(((e,t)=>{const n=we();ie({type:"update-node-size",payload:{id:e,size:t},layoutKey:n})}),[we]),$e=(0,u.useCallback)((e=>{ge.scaleTo((0,m.A)(se.current),e/100)}),[ge]),Le=(0,u.useCallback)((()=>{ke(!1)}),[ke]),[Be,De]=(0,D.d)({cells:te,defaultEdgeLines:r,markerPrefix:Ee}),Pe=(0,B.H)({cells:te,layout:i,centered:me});return(0,u.useEffect)((()=>{const e=se.current;if(!e||"lasso"!==x)return;const t=e.getBoundingClientRect(),n=e=>{(0,P.F)(e,{transform:pe,offset:[t.left,t.top],onLassoing(e){ye(e)},onLassoed(e){ye(null);const t=[];for(const n of te)if((0,_.t2)(n)||(0,_.o6)(n)||(0,_.Hs)(n)){const i=n.view.x,a=n.view.y;i>=e.x&&i+n.view.width<=e.x+e.width&&a>=e.y&&a+n.view.height<=e.y+e.height&&t.push(n)}null==V||V(t.length>1?{type:"multi",targets:t.map(I.P)}:1===t.length?(0,I.P)(t[0]):null)}})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}),[pe,te,x,V]),p().createElement(p().Fragment,null,p().createElement("svg",{width:"100%",height:"100%",ref:se,className:b()("root",{grabbing:ue,pannable:v,ready:Pe}),tabIndex:-1},p().createElement("defs",null,De.map(((e,t)=>p().createElement(w.c,{key:t,id:`${Ee}${t}`,type:"arrow",strokeColor:e.strokeColor})))),p().createElement("g",{transform:`translate(${pe.x} ${pe.y}) scale(${pe.k})`},p().createElement("g",{className:b()("cells",{allowEdgeToArea:U}),ref:le},te.map((e=>p().createElement(C.m,{key:`${e.type}:${(0,_.WW)(e)?`${e.source}~${e.target}`:e.id}`,dragNodeToContainerActive:!(0,_.WW)(e)&&ce.includes(e.id),layout:i,cell:e,cells:te,degraded:ae,degradedNodeLabel:c,defaultNodeBricks:o,transform:pe,lineConfMap:Be,activeTarget:xe,unrelatedCells:Me,onCellsMoving:Ne,onCellsMoved:We,onCellResizing:Te,onCellResized:Re,onSwitchActiveTarget:V,onCellContextMenu:J,onDecoratorTextChange:G,onDecoratorTextEditing:Se,onNodeBrickResize:ze})))),p().createElement(E.w,{connectLineState:ve,transform:pe,markerEnd:`${Ee}0`,onConnect:_e}),fe&&p().createElement("rect",{x:fe.x,y:fe.y,width:fe.width,height:fe.height,fill:"var(--palette-gray-5)",fillOpacity:.3,stroke:"var(--palette-gray-5)",strokeDasharray:2}))),p().createElement($.Y,{shadowRoot:n.shadowRoot,scale:pe.k,scaleRange:Ae,onZoomChange:$e,onReCenter:Le}))}function kn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}i=vn,({e:[V,j,X,q,F,Z,J,G,Q,ee,te,ne,ie,ae,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,it,at,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt,U],c:[Et,Y]}=(0,d.A)(i,[wt("eo-draw-canvas",{styleTexts:[O.A,H.A]})],[[_t({attribute:!1}),1,"cells"],[_t({type:String}),1,"layout"],[_t({attribute:!1}),1,"layoutOptions"],[_t({attribute:!1}),1,"defaultNodeSize"],[_t({attribute:!1}),1,"defaultNodeBricks"],[_t({type:Number}),1,"degradedThreshold"],[_t({attribute:!1}),1,"degradedNodeLabel"],[_t({attribute:!1}),1,"defaultEdgeLines"],[_t({attribute:!1}),1,"activeTarget"],[_t({type:Boolean}),1,"fadeUnrelatedCells"],[_t({type:Boolean}),1,"zoomable"],[_t({type:Boolean}),1,"scrollable"],[_t({type:Boolean}),1,"pannable"],[_t({type:Boolean}),1,"selectable"],[_t({type:Boolean}),1,"allowEdgeToArea"],[_t(),1,"dragBehavior"],[_t(),1,"ctrlDragBehavior"],[_t({attribute:!1}),1,"scaleRange"],[Mt({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(jt,e),(e,t)=>(0,h.A)(jt,e,t)],[Mt({type:"node.move"}),1,"nodeMoveEvent",e=>(0,c.A)(Zt,e),(e,t)=>(0,h.A)(Zt,e,t)],[Mt({type:"cell.move"}),1,"cellMoveEvent",e=>(0,c.A)(Jt,e),(e,t)=>(0,h.A)(Jt,e,t)],[Mt({type:"cells.move"}),1,"cellsMoveEvent",e=>(0,c.A)(Qt,e),(e,t)=>(0,h.A)(Qt,e,t)],[Mt({type:"cell.resize"}),1,"cellResizeEvent",e=>(0,c.A)(tn,e),(e,t)=>(0,h.A)(tn,e,t)],[Mt({type:"node.delete"}),1,"nodeDelete",e=>(0,c.A)(an,e),(e,t)=>(0,h.A)(an,e,t)],[Mt({type:"cell.delete"}),1,"cellDelete",e=>(0,c.A)(sn,e),(e,t)=>(0,h.A)(sn,e,t)],[Mt({type:"cells.delete"}),1,"cellsDelete",e=>(0,c.A)(on,e),(e,t)=>(0,h.A)(on,e,t)],[Mt({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,c.A)(hn,e),(e,t)=>(0,h.A)(hn,e,t)],[Mt({type:"decorator.text.change"}),1,"decoratorTextChange",e=>(0,c.A)(dn,e),(e,t)=>(0,h.A)(dn,e,t)],[Mt({type:"node.container.change"}),1,"containerContainerChange",e=>(0,c.A)(pn,e),(e,t)=>(0,h.A)(pn,e,t)],[Mt({type:"scale.change"}),1,"scaleChange",e=>(0,c.A)(An,e),(e,t)=>(0,h.A)(An,e,t)],[xt(),2,"dropNode"],[xt(),2,"dropDecorator"],[xt(),2,"addNodes"],[xt(),2,"addEdge"],[xt(),2,"manuallyConnectNodes"],[xt(),2,"updateCells"]],0,(e=>yn.has((0,l.A)(e))),A.ReactNextElement)),Y()},3971:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(6758),a=n.n(i),s=n(935),l=n.n(s)()(a());l.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const o=l.toString()},497:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(6758),a=n.n(i),s=n(935),l=n.n(s)()(a());l.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage="dragging"]):not([usage="library"]):hover),\n:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const o=l.toString()},6330:(e,t,n)=>{function i(e,t,n,i,a,s,l){try{var o=e[s](l),r=o.value}catch(e){return void n(e)}o.done?t(r):Promise.resolve(r).then(i,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,s){var l=e.apply(t,n);function o(e){i(l,a,s,o,r,"next",e)}function r(e){i(l,a,s,o,r,"throw",e)}o(void 0)}))}}n.d(t,{A:()=>a})},780:(e,t,n)=>{n.d(t,{_:()=>s});var i=n(6330),a=n(3496),s=function(){var e=(0,i.A)((function*(e,t,n){return(yield a.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,i){return e.apply(this,arguments)}}()},8406:(e,t,n)=>{n.d(t,{y:()=>s});var i=n(6330),a=n(3496),s=function(){var e=(0,i.A)((function*(e,t,n){return(yield a.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,i){return e.apply(this,arguments)}}()},6841:(e,t,n)=>{n.d(t,{x:()=>s});var i=n(6330),a=n(3496),s=function(){var e=(0,i.A)((function*(e,t,n,i){return(yield a.http.put("api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/".concat(e,"/instance/").concat(t),n,i)).data}));return function(t,n,i,a){return e.apply(this,arguments)}}()},4993:(e,t,n)=>{function i(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function a(e){this._context=e}function s(e){return new a(e)}n.d(t,{Ay:()=>s}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:i(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:i(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},4643:(e,t,n)=>{n.d(t,{dJ:()=>a,kl:()=>s});class i{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function a(e){return new i(e,!0)}function s(e){return new i(e,!1)}},482:(e,t,n)=>{function i(e){this._context=e}function a(e){return new i(e)}n.d(t,{A:()=>a}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},3488:(e,t,n)=>{function i(e){return e<0?-1:1}function a(e,t,n){var a=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(a||s<0&&-0),o=(n-e._y1)/(s||a<0&&-0),r=(l*s+o*a)/(a+s);return(i(l)+i(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(r))||0}function s(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function l(e,t,n){var i=e._x0,a=e._y0,s=e._x1,l=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,a+o*t,s-o,l-o*n,s,l)}function o(e){this._context=e}function r(e){this._context=new h(e)}function h(e){this._context=e}function c(e){return new o(e)}function d(e){return new r(e)}n.d(t,{G:()=>c,N:()=>d}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:l(this,this._t0,s(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,l(this,s(this,n=a(this,e,t)),n);break;default:l(this,this._t0,n=a(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(r.prototype=Object.create(o.prototype)).point=function(e,t){o.prototype.point.call(this,t,e)},h.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,a,s){this._context.bezierCurveTo(t,e,i,n,s,a)}}},6066:(e,t,n)=>{function i(e){this._context=e}function a(e){var t,n,i=e.length-1,a=new Array(i),s=new Array(i),l=new Array(i);for(a[0]=0,s[0]=2,l[0]=e[0]+2*e[1],t=1;t<i-1;++t)a[t]=1,s[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[i-1]=2,s[i-1]=7,l[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)n=a[t]/s[t-1],s[t]-=n,l[t]-=n*l[t-1];for(a[i-1]=l[i-1]/s[i-1],t=i-2;t>=0;--t)a[t]=(l[t]-a[t+1])/s[t];for(s[i-1]=(e[i]+a[i-1])/2,t=0;t<i-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function s(e){return new i(e)}n.d(t,{A:()=>s}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var i=a(e),s=a(t),l=0,o=1;o<n;++l,++o)this._context.bezierCurveTo(i[0][l],s[0][l],i[1][l],s[1][l],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}},3269:(e,t,n)=>{function i(e){return function(){return e}}n.d(t,{A:()=>p}),Array.prototype.slice;var a=n(482);const s=Math.PI,l=2*s,o=1e-6,r=l-o;function h(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class c{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return h;const n=10**t;return function(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,i){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,t,n,i,a,s){this._append`C${+e},${+t},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,t,n,i,a){if(e=+e,t=+t,n=+n,i=+i,(a=+a)<0)throw new Error(`negative radius: ${a}`);let l=this._x1,r=this._y1,h=n-e,c=i-t,d=l-e,u=r-t,p=d*d+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(p>o)if(Math.abs(u*h-c*d)>o&&a){let g=n-l,A=i-r,f=h*h+c*c,y=g*g+A*A,v=Math.sqrt(f),b=Math.sqrt(p),m=a*Math.tan((s-Math.acos((f+p-y)/(2*v*b)))/2),k=m/b,w=m/v;Math.abs(k-1)>o&&this._append`L${e+k*d},${t+k*u}`,this._append`A${a},${a},0,0,${+(u*g>d*A)},${this._x1=e+w*h},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,i,a,h){if(e=+e,t=+t,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),d=n*Math.sin(i),u=e+c,p=t+d,g=1^h,A=h?i-a:a-i;null===this._x1?this._append`M${u},${p}`:(Math.abs(this._x1-u)>o||Math.abs(this._y1-p)>o)&&this._append`L${u},${p}`,n&&(A<0&&(A=A%l+l),A>r?this._append`A${n},${n},0,1,${g},${e-c},${t-d}A${n},${n},0,1,${g},${this._x1=u},${this._y1=p}`:A>o&&this._append`A${n},${n},0,${+(A>=s)},${g},${this._x1=e+n*Math.cos(a)},${this._y1=t+n*Math.sin(a)}`)}rect(e,t,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function d(e){return e[0]}function u(e){return e[1]}function p(e,t){var n=i(!0),s=null,l=a.A,o=null,r=function(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new c(t)}(h);function h(i){var a,h,c,d=(i=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(i)).length,u=!1;for(null==s&&(o=l(c=r())),a=0;a<=d;++a)!(a<d&&n(h=i[a],a,i))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(h,a,i),+t(h,a,i));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?d:i(e),t="function"==typeof t?t:void 0===t?u:i(t),h.x=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),h):e},h.y=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),h):t},h.defined=function(e){return arguments.length?(n="function"==typeof e?e:i(!!e),h):n},h.curve=function(e){return arguments.length?(l=e,null!=s&&(o=l(s)),h):l},h.context=function(e){return arguments.length?(null==e?s=o=null:o=l(s=e),h):s},h}c.prototype}}]);
|
|
3
|
-
//# sourceMappingURL=4017.
|
|
1
|
+
/*! For license information please see 4017.5d4d14b0.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[4017,8939],{9711:(e,t,n)=>{n.r(t);var a,i=n(4635),s=n(918),l=n(6902),o=n(5536),r=n(6121),h=n(829),c=n(2740),d=n(8769),u=n.n(d),p=n(4782),g=n(1389),A=(n(9772),n(7566)),f=n(9047),y=n(3373),v=n.n(y),b=n(1030),m=n(9126),k=n(8892),w=n(5157),_=n(8308),x=n(9576),M=n(9137),C=n(2547),E=n(1803),N=n(3739),W=n(9191),T=n(6671),R=n(8060),S=n(2448),z=n(8657),$=n(8069),L=n(1324),B=n(821),D=n(9741),P=n(2673),O=n(5987);let H,I,K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe;const{defineElement:He,property:Ie,event:Ke,method:Ue}=(0,p.createDecorators)(),Ye=(0,d.forwardRef)(wt);let Ve;var je=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Fe=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Ge=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,at=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ot=new WeakSet,rt=new WeakMap,ht=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,pt=new WeakMap,gt=new WeakMap,At=new WeakMap,ft=new WeakMap,yt=new WeakMap,vt=new WeakMap,bt=new WeakMap,mt=new WeakMap;class kt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ot),(0,s.A)(this,je,(H(this),K(this))),(0,s.A)(this,Xe,(U(this),Y(this))),(0,s.A)(this,qe,(V(this),j(this))),(0,s.A)(this,Fe,(X(this),q(this))),(0,s.A)(this,Ze,(F(this),Z(this))),(0,s.A)(this,Je,(J(this),G(this))),(0,s.A)(this,Ge,(Q(this),ee(this))),(0,s.A)(this,Qe,(te(this),ne(this))),(0,s.A)(this,et,(ae(this),ie(this))),(0,s.A)(this,tt,(se(this),le(this))),(0,s.A)(this,nt,(oe(this),re(this,!0))),(0,s.A)(this,at,(he(this),ce(this,!0))),(0,s.A)(this,it,(de(this),ue(this,!0))),(0,s.A)(this,st,(pe(this),ge(this))),(0,s.A)(this,lt,(Ae(this),fe(this))),(0,s.A)(this,rt,(be(this),e=>{(0,o.A)(ot,this,ye).emit(e)})),(0,s.A)(this,ht,me(this)),(0,s.A)(this,ct,(_e(this),e=>{(0,o.A)(ot,this,ke).emit(e)})),(0,s.A)(this,dt,xe(this)),(0,s.A)(this,ut,(Ee(this),e=>{(0,o.A)(ot,this,Me).emit(e)})),(0,s.A)(this,pt,Ne(this)),(0,s.A)(this,gt,(Re(this),e=>{(0,o.A)(ot,this,We).emit(e)})),(0,s.A)(this,At,Se(this)),(0,s.A)(this,ft,(Le(this),e=>{(0,o.A)(ot,this,ze).emit(e)})),(0,s.A)(this,yt,Be(this)),(0,s.A)(this,vt,(Oe(this),e=>{(0,o.A)(ot,this,De).emit(e)})),(0,s.A)(this,bt,(e=>{(0,P.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,mt,(0,d.createRef)())}get layout(){return(0,h.A)(je,this)}set layout(e){(0,r.A)(je,this,e)}get nodes(){return(0,h.A)(Xe,this)}set nodes(e){(0,r.A)(Xe,this,e)}get edges(){return(0,h.A)(qe,this)}set edges(e){(0,r.A)(qe,this,e)}get nodeBricks(){return(0,h.A)(Fe,this)}set nodeBricks(e){(0,r.A)(Fe,this,e)}get lines(){return(0,h.A)(Ze,this)}set lines(e){(0,r.A)(Ze,this,e)}get layoutOptions(){return(0,h.A)(Je,this)}set layoutOptions(e){(0,r.A)(Je,this,e)}get activeTarget(){return(0,h.A)(Ge,this)}set activeTarget(e){(0,r.A)(Ge,this,e)}get disableKeyboardAction(){return(0,h.A)(Qe,this)}set disableKeyboardAction(e){(0,r.A)(Qe,this,e)}get connectNodes(){return(0,h.A)(et,this)}set connectNodes(e){(0,r.A)(et,this,e)}get dragNodes(){return(0,h.A)(tt,this)}set dragNodes(e){(0,r.A)(tt,this,e)}get zoomable(){return(0,h.A)(nt,this)}set zoomable(e){(0,r.A)(nt,this,e)}get scrollable(){return(0,h.A)(at,this)}set scrollable(e){(0,r.A)(at,this,e)}get pannable(){return(0,h.A)(it,this)}set pannable(e){(0,r.A)(it,this,e)}get scaleRange(){return(0,h.A)(st,this)}set scaleRange(e){(0,r.A)(st,this,e)}callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null===(n=(0,h.A)(mt,this).current)||void 0===n||n.callOnLineLabel(e,t,...i)}render(){return u().createElement(Ye,{ref:(0,h.A)(mt,this),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(rt,this),onSwitchActiveTarget:(0,h.A)(bt,this),onNodeDelete:(0,h.A)(ct,this),onEdgeDelete:(0,h.A)(ut,this),onLineClick:(0,h.A)(gt,this),onLineDoubleClick:(0,h.A)(ft,this),onNodesConnect:(0,h.A)(vt,this)})}}function wt(e,t){let{layout:n,nodes:a,edges:i,nodeBricks:s,lines:l,layoutOptions:o,connectNodes:r,dragNodes:h,activeTarget:c,disableKeyboardAction:p,zoomable:g,scrollable:y,pannable:B,scaleRange:H,onActiveTargetChange:I,onSwitchActiveTarget:K,onNodeDelete:U,onEdgeDelete:Y,onLineClick:V,onLineDoubleClick:j,onNodesConnect:X}=e;const[q,F]=(0,d.useState)(!1),[Z,J]=(0,d.useState)(0),[G,Q]=(0,d.useState)(null),[ee,te]=(0,d.useState)(!1),[ne,ae]=(0,d.useState)(0),[ie,se]=(0,d.useState)(null),[le,oe]=(0,d.useState)([]),[re,he]=(0,d.useState)(!1),[ce,de]=(0,d.useState)({k:1,x:0,y:0}),ue=(0,d.useRef)(new Map),pe=(0,d.useRef)(null),ge=(0,d.useRef)(null),[Ae,fe]=(0,d.useState)(!1),{userViewReady:ye,userViewNodesMap:ve,saveUserView:be}=(0,D._)(null==h?void 0:h.save),[me,ke]=(0,d.useState)([0,0]),[we,_e]=(0,d.useState)(null),[xe,Me]=(0,d.useState)("initial"),[Ce,Ee]=(0,d.useState)(null);(0,d.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var n,a=arguments.length,i=new Array(a>2?a-2:0),s=2;s<a;s++)i[s-2]=arguments[s];null==ie||null===(n=ie.get(e))||void 0===n||null===(n=n.firstElementChild)||void 0===n||n[t](...i)}}))),(0,d.useEffect)((()=>{const e=e=>{(0,S.P)(e,{nodes:a,nodesRefRepository:G,connectNodes:r,dragNodes:h,scale:ce.k,setConnectLineState:_e,setConnectLineTo:ke,setManualLayoutStatus:Me,setNodeMovement:Ee,onSwitchActiveTarget:K,onNodesConnect:X})},t=ge.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[a,r,h,ce.k,G,X,K]);const{normalizedLines:Ne,normalizedLinesMap:We,markers:Te}=(0,d.useMemo)((()=>(0,M.t)(i,l)),[i,l]),Re=(0,d.useMemo)((()=>Ne.flatMap((e=>{let t,n,{line:{text:a,label:i,$id:s},edge:l}=e;return a||i?(i?(t="label",n=[].concat(i)):(t="text",n=[].concat(a)),n.map((e=>({[t]:e,id:`${s}-${e.placement??"center"}`,edge:l})))):[]}))),[Ne]),{nodes:Se,edges:ze}=(0,$.o)({layout:n,nodes:a,edges:i,manualLayoutStatus:xe,userViewReady:ye,userViewNodesMap:ve,nodeMovement:Ce,nodesRefRepository:G,lineLabelsRefRepository:ie,normalizedLinesMap:We,layoutOptions:o,nodesRenderId:Z,lineLabelsRenderId:ne});(0,d.useEffect)((()=>{"finished"===xe&&be(Se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[xe]);const $e=(0,d.useMemo)((()=>(0,x.R)(ze,Se,Ne)),[Ne,Se,ze]),Le=c??null,[Be,De]=(0,d.useState)(Le);(0,d.useEffect)((()=>{De((e=>(0,P.c)(e,Le)?e:Le))}),[Le]);const Pe=(0,d.useRef)(!1);(0,d.useEffect)((()=>{Pe.current?null==I||I(Be):Pe.current=!0}),[Be,I]),(0,d.useEffect)((()=>{const e=pe.current;if(!e||p)return;const t=e=>{const t=(0,w.a)(e,{renderedNodes:Se,activeTarget:Be});"delete-node"===(null==t?void 0:t.action)?null==U||U(t.node):"delete-edge"===(null==t?void 0:t.action)?null==Y||Y(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==K||K({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[Be,Se,p,K,U,Y]);const Oe=(0,d.useCallback)((e=>{e&&(J((e=>e+1)),Q(e)),F((t=>t||!!e))}),[]),He=(0,d.useCallback)((e=>{e&&(ae((e=>e+1)),se(e)),te((t=>t||!!e))}),[]),Ie=(0,d.useMemo)((()=>H??[z.sS,z.Yt]),[H]),Ke=(0,d.useMemo)((()=>(0,f.s_)()),[]);(0,d.useEffect)((()=>{let e=!1;Ke.scaleExtent(g?Ie:[1,1]).on("start",(()=>{e=!1,he(!0)})).on("zoom",(t=>{e=!0,de(t.transform)})).on("end",(()=>{he(!1),e||null==K||K(null)}))}),[K,Ie,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(!e)return;const t=(0,A.A)(e),n=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(g||y||B)return(g||y)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),y&&(e.preventDefault(),Ke.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Ke).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),B||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),n;n()}),[B,y,g,Ke]),(0,d.useEffect)((()=>{const e=pe.current;if(0===Se.length||!e||Ae)return;const{k:t,x:n,y:a}=(0,_.r)(Se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:g?Ie:void 0});Ke.transform((0,A.A)(e),new f.uV(t,n,a)),fe(!0)}),[Ae,Se,Ie,g,Ke]);const Ue=(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[]),Ye=`${Ue}line-arrow-`,Ve=`${Ue}mask-`,je=`${Ue}active-line-`;(0,d.useEffect)((()=>{oe((e=>(0,R.z)(e,$e,ue.current)))}),[$e]);const[Xe,qe]=u().useState(new Map);return(0,d.useEffect)((()=>{if(!ie)return;(0,L.F)(le,ie);const e=new m.A((()=>{qe((0,O.G)(le,ie))}));for(const t of ie.values())e.observe(t);return()=>{e.disconnect()}}),[ne,ie,le]),"dagre"!==n&&"force"!==n?u().createElement("div",null,`Diagram layout not supported: "${n}"`):u().createElement("div",{className:v()("diagram",{ready:q&&Ae,grabbing:re,pannable:B}),tabIndex:-1,ref:pe},u().createElement("svg",{width:"100%",height:"100%",className:"lines"},u().createElement("defs",null,Te.map(((e,t)=>{let{type:n,strokeColor:a}=e;return u().createElement(N.c,{key:t,id:`${Ye}${t}`,type:n,strokeColor:a})})),[...Xe].map((e=>{let[t,n]=e;return u().createElement(W.y,{key:t,lineId:t,rects:n,maskPrefix:Ve,renderedLineLabels:le})})),u().createElement("marker",{id:`${je}start`,viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),u().createElement("marker",{id:`${je}end`,viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},u().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),u().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),u().createElement("g",{transform:`translate(${ce.x} ${ce.y}) scale(${ce.k})`},$e.map((e=>u().createElement(E.m,{key:e.line.$id,line:e,linePaths:ue.current,lineMaskRects:Xe,maskPrefix:Ve,markerPrefix:Ye,activeLineMarkerPrefix:je,active:"edge"===(null==Be?void 0:Be.type)&&Be.edge.source===e.edge.source&&Be.edge.target===e.edge.target,activeRelated:"node"===(null==Be?void 0:Be.type)&&(e.edge.source===Be.nodeId||e.edge.target===Be.nodeId),onLineClick:V,onLineDoubleClick:j}))))),u().createElement("div",{className:v()("line-labels",{ready:ee}),style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(C.d2,{labels:Re,onRendered:He})),u().createElement("div",{className:"nodes",ref:ge,style:{left:ce.x,top:ce.y,transform:`scale(${ce.k})`}},u().createElement(k.p,{nodes:a,nodeBricks:s,onRendered:Oe})),u().createElement(T.w,{connectLineState:we,connectLineTo:me,markerPrefix:Ye}))}a=kt,({e:[K,U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,H],c:[Ve,I]}=(0,c.A)(a,[He("eo-diagram",{styleTexts:[B.A]})],[[Ie({type:String}),1,"layout"],[Ie({attribute:!1}),1,"nodes"],[Ie({attribute:!1}),1,"edges"],[Ie({attribute:!1}),1,"nodeBricks"],[Ie({attribute:!1}),1,"lines"],[Ie({attribute:!1}),1,"layoutOptions"],[Ie({attribute:!1}),1,"activeTarget"],[Ie({type:Boolean}),1,"disableKeyboardAction"],[Ie({attribute:!1}),1,"connectNodes"],[Ie({attribute:!1}),1,"dragNodes"],[Ie({type:Boolean}),1,"zoomable"],[Ie({type:Boolean}),1,"scrollable"],[Ie({type:Boolean}),1,"pannable"],[Ie({attribute:!1}),1,"scaleRange"],[Ke({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(lt,e),(e,t)=>(0,r.A)(lt,e,t)],[Ke({type:"node.delete"}),1,"nodeDelete",e=>(0,h.A)(ht,e),(e,t)=>(0,r.A)(ht,e,t)],[Ke({type:"edge.delete"}),1,"edgeDelete",e=>(0,h.A)(dt,e),(e,t)=>(0,r.A)(dt,e,t)],[Ke({type:"line.click"}),1,"lineClick",e=>(0,h.A)(pt,e),(e,t)=>(0,r.A)(pt,e,t)],[Ke({type:"line.dblclick"}),1,"lineDoubleClick",e=>(0,h.A)(At,e),(e,t)=>(0,r.A)(At,e,t)],[Ke({type:"nodes.connect"}),1,"connectNodes",e=>(0,h.A)(yt,e),(e,t)=>(0,r.A)(yt,e,t)],[Ue(),2,"callOnLineLabel"]],0,(e=>mt.has((0,l.A)(e))),g.ReactNextElement)),I();var _t,xt=n(3971);let Mt,Ct,Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt;const{defineElement:Ot,property:Ht,event:It,method:Kt}=(0,p.createDecorators)(),Ut=(0,d.forwardRef)(en);let Yt;var Vt=new WeakMap,jt=new WeakMap,Xt=new WeakMap,qt=new WeakSet,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap;class Qt extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,qt),(0,s.A)(this,Vt,(Mt(this),Et(this))),(0,s.A)(this,jt,(Nt(this),Wt(this))),(0,s.A)(this,Xt,(Tt(this),Rt(this))),(0,s.A)(this,Ft,($t(this),e=>{(0,o.A)(qt,this,St).emit(e)})),(0,s.A)(this,Zt,Lt(this)),(0,s.A)(this,Jt,(Pt(this),e=>{(0,o.A)(qt,this,Bt).emit(e)})),(0,s.A)(this,Gt,(0,d.createRef)())}get label(){return(0,h.A)(Vt,this)}set label(e){(0,r.A)(Vt,this,e)}get type(){return(0,h.A)(jt,this)}set type(e){(0,r.A)(jt,this,e)}enableEditing(){var e;null===(e=(0,h.A)(Gt,this).current)||void 0===e||e.enableEditing()}render(){return u().createElement(Ut,{ref:(0,h.A)(Gt,this),label:this.label,onLabelEditingChange:(0,h.A)(Ft,this),onLabelChange:(0,h.A)(Jt,this)})}}function en(e,t){let{label:n,onLabelChange:a,onLabelEditingChange:i}=e;const s=n??"",[l,o]=(0,d.useState)(s),[r,h]=(0,d.useState)(!1),c=(0,d.useRef)(!1),[p,g]=(0,d.useState)(!1),A=(0,d.useRef)(null);(0,d.useImperativeHandle)(t,(()=>({enableEditing(){h(!0)}}))),(0,d.useEffect)((()=>{o(s)}),[s]);const f=(0,d.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),h(!0)}),[]);(0,d.useEffect)((()=>{var e,t;r&&(null===(e=A.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=A.current)||void 0===t||t.select())}),[r]),(0,d.useEffect)((()=>{c.current?null==i||i(r):c.current=!0}),[r,i]);const y=(0,d.useCallback)((e=>{o(e.target.value)}),[]),b=(0,d.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=A.current)||void 0===n||n.blur()}),[]),m=(0,d.useCallback)((()=>{h(!1),g(!0)}),[]);(0,d.useEffect)((()=>{p&&(null==a||a(l),g(!1))}),[l,a,p]);const k=(0,d.useCallback)((e=>{e.stopPropagation()}),[]);return u().createElement("div",{className:v()("label",{editing:r,empty:!l}),onDoubleClick:k,onMouseDown:k},u().createElement("input",{className:"label-input",value:l,ref:A,onChange:y,onKeyDown:b,onBlur:m}),u().createElement("div",{className:"label-text",onDoubleClick:f},l))}_t=Qt,({e:[Et,Nt,Wt,Tt,Rt,St,zt,$t,Lt,Bt,Dt,Pt,Mt],c:[Yt,Ct]}=(0,c.A)(_t,[Ot("diagram.editable-label",{styleTexts:[xt.A]})],[[Ht(),1,"label"],[Ht({render:!1}),1,"type"],[It({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,h.A)(Xt,e),(e,t)=>(0,r.A)(Xt,e,t)],[It({type:"label.change"}),1,"labelChange",e=>(0,h.A)(Zt,e),(e,t)=>(0,r.A)(Zt,e,t)],[Kt(),2,"enableEditing"]],0,(e=>Gt.has((0,l.A)(e))),g.ReactNextElement)),Ct(),n(9068);var tn,nn=n(497);let an,sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn;const{defineElement:_n,property:xn,event:Mn}=(0,p.createDecorators)();let Cn;var En=new WeakMap,Nn=new WeakMap,Wn=new WeakMap,Tn=new WeakMap,Rn=new WeakSet,Sn=new WeakMap,zn=new WeakMap,$n=new WeakMap,Ln=new WeakMap,Bn=new WeakMap;class Dn extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Rn),(0,s.A)(this,En,sn(this)),(0,s.A)(this,Nn,(ln(this),on(this))),(0,s.A)(this,Wn,(rn(this),hn(this))),(0,s.A)(this,Tn,(cn(this),dn(this))),(0,s.A)(this,Sn,(gn(this),e=>{(0,o.A)(Rn,this,un).emit(e)})),(0,s.A)(this,zn,An(this)),(0,s.A)(this,$n,(vn(this),e=>{(0,o.A)(Rn,this,fn).emit(e)})),(0,s.A)(this,Ln,bn(this)),(0,s.A)(this,Bn,(wn(this),e=>{(0,o.A)(Rn,this,mn).emit(e)}))}get usage(){return(0,h.A)(En,this)}set usage(e){(0,r.A)(En,this,e)}get status(){return(0,h.A)(Nn,this)}set status(e){(0,r.A)(Nn,this,e)}get decorator(){return(0,h.A)(Wn,this)}set decorator(e){(0,r.A)(Wn,this,e)}render(){return u().createElement(Pn,{usage:this.usage,onDragStart:(0,h.A)(Sn,this),onDragMove:(0,h.A)($n,this),onDragEnd:(0,h.A)(Bn,this)})}}function Pn(e){let{usage:t,onDragStart:n,onDragMove:a,onDragEnd:i}=e;const s=(0,d.useCallback)((e=>{if("library"!==t)return;e.stopPropagation(),e.preventDefault();const s=[e.clientX,e.clientY];let l=!1;const o=e=>{l||(l=(e.clientX-s[0])**2+(e.clientY-s[1])**2>=9,l&&(null==n||n([e.clientX,e.clientY]))),l&&(null==a||a([e.clientX,e.clientY]))},r=e=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r),l&&(null==i||i([e.clientX,e.clientY]))};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}),[i,a,n,t]);return u().createElement("div",{onMouseDown:s},u().createElement("slot",null))}tn=Dn,({e:[sn,ln,on,rn,hn,cn,dn,un,pn,gn,An,fn,yn,vn,bn,mn,kn,wn],c:[Cn,an]}=(0,c.A)(tn,[_n("diagram.experimental-node",{styleTexts:[nn.A]})],[[xn(),1,"usage"],[xn({type:String,render:!1}),1,"status"],[xn({type:String}),1,"decorator"],[Mn({type:"drag.start"}),1,"dragStartEvent",e=>(0,h.A)(Tn,e),(e,t)=>(0,r.A)(Tn,e,t)],[Mn({type:"drag.move"}),1,"dragMoveEvent",e=>(0,h.A)(zn,e),(e,t)=>(0,r.A)(zn,e,t)],[Mn({type:"drag.end"}),1,"dragEndEvent",e=>(0,h.A)(Ln,e),(e,t)=>(0,r.A)(Ln,e,t)]],0,(e=>Bn.has((0,l.A)(e))),g.ReactNextElement)),an();var On,Hn=n(8185),In=n(2140),Kn=n(3783),Un=n(3033),Yn=n(8091),Vn=n(1819),jn=n(5748),Xn=n(227),qn=n(531),Fn=n(7099),Zn=n(1484),Jn=n(8197),Gn=n(7531),Qn=n(2098),ea=n(3012),ta=n(6237);let na,aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka;const{defineElement:Ua,property:Ya,event:Va}=(0,p.createDecorators)();let ja;var Xa=new WeakMap,qa=new WeakMap,Fa=new WeakMap,Za=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Qa=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,li=new WeakMap,oi=new WeakMap,ri=new WeakSet,hi=new WeakMap,ci=new WeakMap,di=new WeakMap,ui=new WeakMap,pi=new WeakMap,gi=new WeakMap;class Ai extends g.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ri),(0,s.A)(this,Xa,aa(this)),(0,s.A)(this,qa,(ia(this),sa(this))),(0,s.A)(this,Fa,(la(this),oa(this))),(0,s.A)(this,Za,(ra(this),ha(this,[Un.HP,Un.HP]))),(0,s.A)(this,Ja,(ca(this),da(this))),(0,s.A)(this,Ga,(ua(this),pa(this))),(0,s.A)(this,Qa,(ga(this),Aa(this))),(0,s.A)(this,ei,(fa(this),ya(this))),(0,s.A)(this,ti,(va(this),ba(this))),(0,s.A)(this,ni,(ma(this),ka(this))),(0,s.A)(this,ai,(wa(this),_a(this,!0))),(0,s.A)(this,ii,(xa(this),Ma(this,!0))),(0,s.A)(this,si,(Ca(this),Ea(this,!0))),(0,s.A)(this,li,(Na(this),Wa(this))),(0,s.A)(this,oi,(Ta(this),Ra(this))),(0,s.A)(this,hi,($a(this),e=>{(0,o.A)(ri,this,Sa).emit(e)})),(0,s.A)(this,ci,(e=>{(0,Hn.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,di,La(this)),(0,s.A)(this,ui,(Pa(this),e=>{(0,o.A)(ri,this,Ba).emit(e)})),(0,s.A)(this,pi,Oa(this)),(0,s.A)(this,gi,(Ka(this),e=>{(0,o.A)(ri,this,Ha).emit(e)}))}get cells(){return(0,h.A)(Xa,this)}set cells(e){(0,r.A)(Xa,this,e)}get layout(){return(0,h.A)(qa,this)}set layout(e){(0,r.A)(qa,this,e)}get layoutOptions(){return(0,h.A)(Fa,this)}set layoutOptions(e){(0,r.A)(Fa,this,e)}get defaultNodeSize(){return(0,h.A)(Za,this)}set defaultNodeSize(e){(0,r.A)(Za,this,e)}get defaultNodeBricks(){return(0,h.A)(Ja,this)}set defaultNodeBricks(e){(0,r.A)(Ja,this,e)}get degradedThreshold(){return(0,h.A)(Ga,this)}set degradedThreshold(e){(0,r.A)(Ga,this,e)}get degradedNodeLabel(){return(0,h.A)(Qa,this)}set degradedNodeLabel(e){(0,r.A)(Qa,this,e)}get defaultEdgeLines(){return(0,h.A)(ei,this)}set defaultEdgeLines(e){(0,r.A)(ei,this,e)}get activeTarget(){return(0,h.A)(ti,this)}set activeTarget(e){(0,r.A)(ti,this,e)}get fadeUnrelatedCells(){return(0,h.A)(ni,this)}set fadeUnrelatedCells(e){(0,r.A)(ni,this,e)}get zoomable(){return(0,h.A)(ai,this)}set zoomable(e){(0,r.A)(ai,this,e)}get scrollable(){return(0,h.A)(ii,this)}set scrollable(e){(0,r.A)(ii,this,e)}get pannable(){return(0,h.A)(si,this)}set pannable(e){(0,r.A)(si,this,e)}get scaleRange(){return(0,h.A)(li,this)}set scaleRange(e){(0,r.A)(li,this,e)}render(){return u().createElement(fi,{shadowRoot:this.shadowRoot,cells:this.cells,layout:this.layout,layoutOptions:this.layoutOptions,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,h.A)(hi,this),onSwitchActiveTarget:(0,h.A)(ci,this),onCellContextMenu:(0,h.A)(ui,this),onCellClick:(0,h.A)(gi,this)})}}function fi(e){let{shadowRoot:t,cells:n,layout:a,layoutOptions:i,defaultNodeSize:s,defaultNodeBricks:l,defaultEdgeLines:o,degradedThreshold:r,degradedNodeLabel:h,activeTarget:c,fadeUnrelatedCells:p,zoomable:g,scrollable:f,pannable:y,scaleRange:m,onActiveTargetChange:k,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x}=e;const[{cells:M,layoutKey:C},E]=(0,d.useReducer)(jn.d,n,(e=>({cells:(0,Kn.C)(e,{defaultNodeSize:s}),layoutKey:1}))),W=(0,d.useMemo)((()=>M.filter(qn.N).length>=(r??Un.pC)),[M,r]),T=(0,d.useRef)(null),R=(0,d.useRef)(null),{grabbing:S,transform:z,zoomer:$,scaleRange:L}=(0,Yn.f)({rootRef:T,zoomable:g,scrollable:f,pannable:y,draggable:!0,scaleRange:m,onSwitchActiveTarget:w}),{centered:B,setCentered:D,getNextLayoutKey:P}=(0,Zn.g)({layout:a,layoutOptions:i,rootRef:T,cells:M,zoomable:g,zoomer:$,scaleRange:L,layoutKey:C,dispatch:E}),O=(0,d.useCallback)((()=>{D(!1)}),[D]),H=(0,d.useRef)(n);(0,d.useEffect)((()=>{if(n!==H.current){H.current=n;const e=(0,Qn.L)({canvasWidth:t.host.clientWidth,canvasHeight:t.host.clientHeight,defaultNodeSize:s,layout:a,previousCells:M,cells:n,scaleRange:L,transform:z});E({type:"update-cells",payload:e.cells})}}),[M,s,n,a,L,t,z]);const I=(0,Vn.J)({cellsRef:R,activeTarget:c,onActiveTargetChange:k}),K=`${(0,d.useMemo)((()=>`${(0,b.uniqueId)("diagram-")}-`),[])}line-arrow-`,U=(0,d.useCallback)(((e,t)=>{E({type:"update-node-size",payload:{id:e,size:t},layoutKey:P()})}),[P]),[Y,V]=(0,d.useState)(null),j=(0,d.useCallback)((e=>{V(e)}),[]),X=(0,d.useCallback)((e=>{V((t=>t===e?null:t))}),[]),[q,F]=(0,d.useState)([]);(0,d.useEffect)((()=>{const e=p?(0,Xn.Y)(M,null,Y):[];F((t=>0===t.length&&0===e.length?t:e))}),[M,p,Y]);const Z=(0,d.useCallback)((e=>{$.scaleTo((0,A.A)(T.current),e/100)}),[$]),[J,G]=(0,Gn.d)({cells:M,defaultEdgeLines:o,markerPrefix:K}),Q=(0,Jn.H)({cells:M,layout:a,centered:B});return u().createElement(u().Fragment,null,u().createElement("svg",{width:"100%",height:"100%",ref:T,className:v()("root",{grabbing:S,pannable:y,ready:Q}),tabIndex:-1},u().createElement("defs",null,G.map(((e,t)=>u().createElement(N.c,{key:t,id:`${K}${t}`,type:"arrow",strokeColor:e.strokeColor})))),u().createElement("g",{transform:`translate(${z.x} ${z.y}) scale(${z.k})`},u().createElement("g",{className:"cells",ref:R},M.map((e=>u().createElement(In.m,{key:`${e.type}:${(0,qn.WW)(e)?`${e.source}~${e.target}`:e.id}`,layout:a,cell:e,cells:M,degraded:W,degradedNodeLabel:h,defaultNodeBricks:l,lineConfMap:J,transform:z,activeTarget:I,readOnly:!0,unrelatedCells:q,onSwitchActiveTarget:w,onCellContextMenu:_,onCellClick:x,onNodeBrickResize:U,onCellMouseEnter:p&&(0,qn.N)(e)?j:void 0,onCellMouseLeave:p&&(0,qn.N)(e)?X:void 0})))))),u().createElement(Fn.Y,{shadowRoot:t,scale:z.k,scaleRange:L,onZoomChange:Z,onReCenter:O}))}On=Ai,({e:[aa,ia,sa,la,oa,ra,ha,ca,da,ua,pa,ga,Aa,fa,ya,va,ba,ma,ka,wa,_a,xa,Ma,Ca,Ea,Na,Wa,Ta,Ra,Sa,za,$a,La,Ba,Da,Pa,Oa,Ha,Ia,Ka],c:[ja,na]}=(0,c.A)(On,[Ua("eo-display-canvas",{styleTexts:[ea.A,ta.A]})],[[Ya({attribute:!1}),1,"cells"],[Ya({type:String}),1,"layout"],[Ya({attribute:!1}),1,"layoutOptions"],[Ya({attribute:!1}),1,"defaultNodeSize"],[Ya({attribute:!1}),1,"defaultNodeBricks"],[Ya({type:Number}),1,"degradedThreshold"],[Ya({attribute:!1}),1,"degradedNodeLabel"],[Ya({attribute:!1}),1,"defaultEdgeLines"],[Ya({attribute:!1}),1,"activeTarget"],[Ya({type:Boolean}),1,"fadeUnrelatedCells"],[Ya({type:Boolean}),1,"zoomable"],[Ya({type:Boolean}),1,"scrollable"],[Ya({type:Boolean}),1,"pannable"],[Ya({attribute:!1}),1,"scaleRange"],[Va({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,h.A)(oi,e),(e,t)=>(0,r.A)(oi,e,t)],[Va({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,h.A)(di,e),(e,t)=>(0,r.A)(di,e,t)],[Va({type:"cell.click"}),1,"cellClick",e=>(0,h.A)(pi,e),(e,t)=>(0,r.A)(pi,e,t)]],0,(e=>gi.has((0,l.A)(e))),g.ReactNextElement)),na()},9068:(e,t,n)=>{n.d(t,{uuidV4:()=>kn});var a,i=n(4635),s=n(918),l=n(6902),o=n(2559),r=n(5536),h=n(6121),c=n(829),d=n(2740),u=n(8769),p=n.n(u),g=n(4782),A=n(1389),f=n(3518),y=(n(9772),n(1030)),v=n(3373),b=n.n(v),m=n(7566),k=n(5748),w=n(3739),_=n(531),x=n(8185),M=n(5114),C=n(2140),E=n(3639),N=n(3783),W=n(2098),T=n(227),R=n(3033),S=n(8091),z=n(1819),$=n(7099),L=n(1484),B=n(8197),D=n(7531),P=n(2219),O=n(3012),H=n(6237),I=n(9386),K=n(1991);let U,Y,V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt;const kt=(0,f.unwrapProvider)("basic.lock-body-scroll"),{defineElement:wt,property:_t,method:xt,event:Mt}=(0,g.createDecorators)(),Ct=p().forwardRef(mn);let Et;var Nt=new WeakMap,Wt=new WeakMap,Tt=new WeakMap,Rt=new WeakMap,St=new WeakMap,zt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,Bt=new WeakMap,Dt=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Ht=new WeakMap,It=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Yt=new WeakMap,Vt=new WeakMap,jt=new WeakMap,Xt=new WeakSet,qt=new WeakMap,Ft=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,an=new WeakMap,sn=new WeakMap,ln=new WeakMap,on=new WeakMap,rn=new WeakMap,hn=new WeakMap,cn=new WeakMap,dn=new WeakMap,un=new WeakMap,pn=new WeakMap,gn=new WeakMap,An=new WeakMap,fn=new WeakMap,yn=new WeakMap;class vn extends A.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Xt),(0,s.A)(this,Nt,(U(this),V(this))),(0,s.A)(this,Wt,(j(this),X(this))),(0,s.A)(this,Tt,(q(this),F(this))),(0,s.A)(this,Rt,(Z(this),J(this,[R.HP,R.HP]))),(0,s.A)(this,St,(G(this),Q(this))),(0,s.A)(this,zt,(ee(this),te(this))),(0,s.A)(this,$t,(ne(this),ae(this))),(0,s.A)(this,Lt,(ie(this),se(this))),(0,s.A)(this,Bt,(le(this),oe(this))),(0,s.A)(this,Dt,(re(this),he(this))),(0,s.A)(this,Pt,(ce(this),de(this,!0))),(0,s.A)(this,Ot,(ue(this),pe(this,!0))),(0,s.A)(this,Ht,(ge(this),Ae(this,!0))),(0,s.A)(this,It,(fe(this),ye(this,!0))),(0,s.A)(this,Kt,(ve(this),be(this,!1))),(0,s.A)(this,Ut,(me(this),ke(this))),(0,s.A)(this,Yt,(we(this),_e(this))),(0,s.A)(this,Vt,(xe(this),Me(this))),(0,s.A)(this,jt,(Ce(this),Ee(this))),(0,s.A)(this,qt,(Te(this),e=>{(0,r.A)(Xt,this,Ne).emit(e)})),(0,s.A)(this,Ft,(e=>{(0,x.c)(e,this.activeTarget)||(this.activeTarget=e)})),(0,s.A)(this,Zt,Re(this)),(0,s.A)(this,Jt,($e(this),Le(this))),(0,s.A)(this,Gt,(Pe(this),e=>{(0,r.A)(Xt,this,Be).emit(e),"node"===e.type&&(0,r.A)(Xt,this,Se).emit(e)})),(0,s.A)(this,Qt,Oe(this)),(0,s.A)(this,en,(Ke(this),e=>{(0,r.A)(Xt,this,He).emit(e)})),(0,s.A)(this,tn,Ue(this)),(0,s.A)(this,nn,(je(this),e=>{(0,r.A)(Xt,this,Ye).emit(e)})),(0,s.A)(this,an,Xe(this)),(0,s.A)(this,sn,(Ze(this),Je(this))),(0,s.A)(this,ln,(et(this),e=>{(0,r.A)(Xt,this,Ge).emit(e),"node"===e.type&&(0,r.A)(Xt,this,qe).emit(e)})),(0,s.A)(this,on,tt(this)),(0,s.A)(this,rn,(it(this),e=>{(0,r.A)(Xt,this,nt).emit(e)})),(0,s.A)(this,hn,st(this)),(0,s.A)(this,cn,(rt(this),e=>{(0,r.A)(Xt,this,lt).emit(e)})),(0,s.A)(this,dn,ht(this)),(0,s.A)(this,un,(ut(this),e=>{(0,r.A)(Xt,this,ct).emit(e)})),(0,s.A)(this,pn,pt(this)),(0,s.A)(this,gn,(ft(this),e=>{(0,r.A)(Xt,this,gt).emit(e)})),(0,s.A)(this,An,yt(this)),(0,s.A)(this,fn,(mt(this),e=>{(0,r.A)(Xt,this,vt).emit(e)})),(0,s.A)(this,yn,(0,u.createRef)())}get cells(){return(0,c.A)(Nt,this)}set cells(e){(0,h.A)(Nt,this,e)}get layout(){return(0,c.A)(Wt,this)}set layout(e){(0,h.A)(Wt,this,e)}get layoutOptions(){return(0,c.A)(Tt,this)}set layoutOptions(e){(0,h.A)(Tt,this,e)}get defaultNodeSize(){return(0,c.A)(Rt,this)}set defaultNodeSize(e){(0,h.A)(Rt,this,e)}get defaultNodeBricks(){return(0,c.A)(St,this)}set defaultNodeBricks(e){(0,h.A)(St,this,e)}get degradedThreshold(){return(0,c.A)(zt,this)}set degradedThreshold(e){(0,h.A)(zt,this,e)}get degradedNodeLabel(){return(0,c.A)($t,this)}set degradedNodeLabel(e){(0,h.A)($t,this,e)}get defaultEdgeLines(){return(0,c.A)(Lt,this)}set defaultEdgeLines(e){(0,h.A)(Lt,this,e)}get activeTarget(){return(0,c.A)(Bt,this)}set activeTarget(e){(0,h.A)(Bt,this,e)}get fadeUnrelatedCells(){return(0,c.A)(Dt,this)}set fadeUnrelatedCells(e){(0,h.A)(Dt,this,e)}get zoomable(){return(0,c.A)(Pt,this)}set zoomable(e){(0,h.A)(Pt,this,e)}get scrollable(){return(0,c.A)(Ot,this)}set scrollable(e){(0,h.A)(Ot,this,e)}get pannable(){return(0,c.A)(Ht,this)}set pannable(e){(0,h.A)(Ht,this,e)}get selectable(){return(0,c.A)(It,this)}set selectable(e){(0,h.A)(It,this,e)}get allowEdgeToArea(){return(0,c.A)(Kt,this)}set allowEdgeToArea(e){(0,h.A)(Kt,this,e)}get dragBehavior(){return(0,c.A)(Ut,this)}set dragBehavior(e){(0,h.A)(Ut,this,e)}get ctrlDragBehavior(){return(0,c.A)(Yt,this)}set ctrlDragBehavior(e){(0,h.A)(Yt,this,e)}get scaleRange(){return(0,c.A)(Vt,this)}set scaleRange(e){(0,h.A)(Vt,this,e)}async dropNode(e){var t,n;let{id:a,position:i,size:s,data:l,useBrick:o}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,i[0],i[1]))||void 0===t?void 0:t.includes(this)){var r;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"node",id:a,view:{..."force"===this.layout||"dagre"===this.layout?null:{x:(i[0]-e.left-t.x)/t.k,y:(i[1]-e.top-t.y)/t.k},width:(null==s?void 0:s[0])??this.defaultNodeSize[0],height:(null==s?void 0:s[1])??this.defaultNodeSize[0]},data:l,useBrick:o};return null===(r=(0,c.A)(yn,this).current)||void 0===r||r.dropNode(n),n}return null}async dropDecorator(e){var t,n;let{position:a,decorator:i,text:s,direction:l}=e;if(null===(t=(n=document).elementsFromPoint)||void 0===t||null===(t=t.call(n,a[0],a[1]))||void 0===t?void 0:t.includes(this)){var o;const e=this.getBoundingClientRect(),t=(0,c.A)(yn,this).current.getTransform(),n={type:"decorator",decorator:i,id:kn(),view:{x:(a[0]-e.left-t.x)/t.k,y:(a[1]-e.top-t.y)/t.k,width:R.N8,height:R.w1,text:s,direction:l}};return null===(o=(0,c.A)(yn,this).current)||void 0===o||o.dropDecorator(n),n}return null}async addNodes(e){if(0===e.length)return[];const t=e.map((e=>{let{size:t,useBrick:n,id:a,data:i}=e;return{type:"node",id:a,data:i,view:{width:(null==t?void 0:t[0])??this.defaultNodeSize[0],height:(null==t?void 0:t[1])??this.defaultNodeSize[0]},useBrick:n}}));return(0,c.A)(yn,this).current.addNodes(t,{defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight})}async addEdge(e){var t;let{source:n,target:a,data:i}=e;const s={type:"edge",source:n,target:a,data:i};return null===(t=(0,c.A)(yn,this).current)||void 0===t||t.addEdge(s),s}manuallyConnectNodes(e){return(0,c.A)(yn,this).current.manuallyConnectNodes(e)}async updateCells(e,t){await(0,o.A)(Xt,this,bn).call(this);const{updated:n}=(0,c.A)(yn,this).current.updateCells(e,{...t,defaultNodeSize:this.defaultNodeSize,canvasWidth:this.clientWidth,canvasHeight:this.clientHeight});return{updated:n}}disconnectedCallback(){super.disconnectedCallback(),kt(this,!1)}render(){return p().createElement(Ct,{host:this,ref:(0,c.A)(yn,this),layout:this.layout,layoutOptions:this.layoutOptions,cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,degradedThreshold:this.degradedThreshold,degradedNodeLabel:this.degradedNodeLabel,activeTarget:this.activeTarget,fadeUnrelatedCells:this.fadeUnrelatedCells,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,dragBehavior:this.dragBehavior,ctrlDragBehavior:this.ctrlDragBehavior,scaleRange:this.scaleRange,allowEdgeToArea:this.allowEdgeToArea,onActiveTargetChange:(0,c.A)(qt,this),onSwitchActiveTarget:(0,c.A)(Ft,this),onCellMove:(0,c.A)(Gt,this),onCellsMove:(0,c.A)(en,this),onCellResize:(0,c.A)(nn,this),onCellDelete:(0,c.A)(ln,this),onCellsDelete:(0,c.A)(rn,this),onCellContextMenu:(0,c.A)(cn,this),onDecoratorTextChange:(0,c.A)(un,this),onContainerContainerChange:(0,c.A)(gn,this),onScaleChange:(0,c.A)(fn,this)})}}function bn(){return new Promise((e=>{const t=()=>{(0,c.A)(yn,this).current?e():setTimeout(t,10)};t()}))}function mn(e,t){let{host:n,layout:a,layoutOptions:i,cells:s,defaultNodeSize:l,defaultNodeBricks:o,defaultEdgeLines:r,degradedThreshold:h,degradedNodeLabel:c,activeTarget:d,fadeUnrelatedCells:g,zoomable:A,scrollable:f,pannable:v,dragBehavior:x,ctrlDragBehavior:O,scaleRange:H,allowEdgeToArea:U,onActiveTargetChange:Y,onSwitchActiveTarget:V,onCellMove:j,onCellResize:X,onCellDelete:q,onCellsMove:F,onCellsDelete:Z,onCellContextMenu:J,onDecoratorTextChange:G,onScaleChange:Q,onContainerContainerChange:ee}=e;const[{cells:te,layoutKey:ne},ae]=(0,u.useReducer)(k.d,s,(e=>({cells:(0,N.C)(e,{defaultNodeSize:l}),layoutKey:0}))),ie=(0,u.useMemo)((()=>te.filter(_.N).length>=(h??R.pC)),[te,h]),se=(0,u.useRef)(null),le=(0,u.useRef)(null),oe=(0,u.useRef)(null),[re,he]=(0,u.useState)([]),[ce,de]=(0,u.useState)([]),{grabbing:ue,transform:pe,zoomer:ge,scaleRange:Ae}=(0,S.f)({rootRef:se,zoomable:A,scrollable:f,pannable:v,draggable:"grab"===x,ctrlDraggable:"grab"===O,scaleRange:H,onSwitchActiveTarget:V});(0,u.useEffect)((()=>{Q(pe.k)}),[Q,pe.k]);const[fe,ye]=(0,u.useState)(null),[ve,be]=(0,u.useState)(null),{centered:me,setCentered:ke,getNextLayoutKey:we}=(0,L.g)({layout:a,layoutOptions:i,rootRef:se,cells:te,zoomable:A,zoomer:ge,scaleRange:Ae,layoutKey:ne,allowEdgeToArea:U,dispatch:ae});(0,u.useImperativeHandle)(t,(()=>({dropNode(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-node",payload:e})},dropDecorator(e){"dagre"!==a&&"force"!==a&&ke(!0),ae({type:"drop-decorator",payload:e})},addNodes(e,t){let{defaultNodeSize:n,canvasWidth:i,canvasHeight:s}=t;const l=te.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,o=[...te.slice(0,l),...e,...te.slice(l)],{cells:r,updated:h,shouldReCenter:c}=(0,W.L)({cells:o,layout:a,previousCells:te,defaultNodeSize:n,canvasWidth:i,canvasHeight:s,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return c&&ke(!1),ae({type:"update-cells",payload:r}),h.filter((t=>e.includes(t)))},addEdge(e){ae({type:"add-edge",payload:e})},updateCells(e,t){const{shouldReCenter:n,...i}=(0,W.L)({...t,layout:a,previousCells:te,cells:e,scaleRange:Ae,transform:pe,allowEdgeToArea:U});return n&&ke(!1),ae({type:"update-cells",payload:i.cells}),i},getTransform:()=>pe,manuallyConnectNodes(e){const t=te.find((t=>(U&&(0,_.o6)(t)||(0,_.N)(t))&&t.id===e));if(t){const e=se.current.getBoundingClientRect();return be({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[e.left,e.top]}),new Promise(((e,t)=>{oe.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[te,a,Ae,ke,pe,U]);const _e=(0,u.useCallback)(((e,t)=>{var n;for(let n=te.length-1;n>=0;n--){const i=te[n];if((U&&(0,_.o6)(i)||(0,_.N)(i))&&i.id!==e.source.id&&i.view.x<t[0]&&i.view.x+i.view.width>t[0]&&i.view.y<t[1]&&i.view.y+i.view.height>t[1]){var a;null===(a=oe.current)||void 0===a||a.resolve({source:e.source,target:i});break}}null===(n=oe.current)||void 0===n||n.reject(null),be(null)}),[te]);(0,u.useEffect)((()=>{kt(n,!(!ve&&!fe))}),[ve,n,fe]);const xe=(0,z.J)({cellsRef:le,activeTarget:d,onActiveTargetChange:Y}),[Me,Ce]=(0,u.useState)([]);(0,u.useEffect)((()=>{const e=g?(0,T.Y)(te,ve,xe,U):[];Ce((t=>0===t.length&&0===e.length?t:e))}),[xe,te,ve,g,U]),(0,u.useEffect)((()=>{const e=se.current;if(!e||re.length>0)return;const t=e=>{const t=(0,M.a)(e,{cells:te,activeTarget:xe});"delete-cells"===(null==t?void 0:t.action)&&(Z(t.cells),1===t.cells.length&&q(t.cells[0]))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}),[xe,te,re.length,q,Z]);const Ee=`${(0,u.useMemo)((()=>`${(0,y.uniqueId)("diagram-")}-`),[])}line-arrow-`,Ne=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e});const t=[];(0,K._)(e,te).forEach((e=>{var n,a;null!==(n=e.containerCell)&&void 0!==n&&n.id&&t.push(null===(a=e.containerCell)||void 0===a?void 0:a.id)})),de(t)}),[te]),We=(0,u.useCallback)((e=>{ae({type:"move-cells",payload:e}),F(e),1===e.length&&j(e[0]),(0,K._)(e,te,ee),de([])}),[j,F,te,ee]),Te=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e})}),[]),Re=(0,u.useCallback)((e=>{ae({type:"resize-cell",payload:e}),X(e)}),[X]),Se=(0,u.useCallback)((e=>{let{id:t,editing:n}=e;he(n?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]),ze=(0,u.useCallback)(((e,t)=>{const n=we();ae({type:"update-node-size",payload:{id:e,size:t},layoutKey:n})}),[we]),$e=(0,u.useCallback)((e=>{ge.scaleTo((0,m.A)(se.current),e/100)}),[ge]),Le=(0,u.useCallback)((()=>{ke(!1)}),[ke]),[Be,De]=(0,D.d)({cells:te,defaultEdgeLines:r,markerPrefix:Ee}),Pe=(0,B.H)({cells:te,layout:a,centered:me});return(0,u.useEffect)((()=>{const e=se.current;if(!e||"lasso"!==x)return;const t=e.getBoundingClientRect(),n=e=>{(0,P.F)(e,{transform:pe,offset:[t.left,t.top],onLassoing(e){ye(e)},onLassoed(e){ye(null);const t=[];for(const n of te)if((0,_.t2)(n)||(0,_.o6)(n)||(0,_.Hs)(n)){const a=n.view.x,i=n.view.y;a>=e.x&&a+n.view.width<=e.x+e.width&&i>=e.y&&i+n.view.height<=e.y+e.height&&t.push(n)}null==V||V(t.length>1?{type:"multi",targets:t.map(I.P)}:1===t.length?(0,I.P)(t[0]):null)}})};return e.addEventListener("mousedown",n),()=>{e.removeEventListener("mousedown",n)}}),[pe,te,x,V]),p().createElement(p().Fragment,null,p().createElement("svg",{width:"100%",height:"100%",ref:se,className:b()("root",{grabbing:ue,pannable:v,ready:Pe}),tabIndex:-1},p().createElement("defs",null,De.map(((e,t)=>p().createElement(w.c,{key:t,id:`${Ee}${t}`,type:"arrow",strokeColor:e.strokeColor})))),p().createElement("g",{transform:`translate(${pe.x} ${pe.y}) scale(${pe.k})`},p().createElement("g",{className:b()("cells",{allowEdgeToArea:U}),ref:le},te.map((e=>p().createElement(C.m,{key:`${e.type}:${(0,_.WW)(e)?`${e.source}~${e.target}`:e.id}`,dragNodeToContainerActive:!(0,_.WW)(e)&&ce.includes(e.id),layout:a,cell:e,cells:te,degraded:ie,degradedNodeLabel:c,defaultNodeBricks:o,transform:pe,lineConfMap:Be,activeTarget:xe,unrelatedCells:Me,onCellsMoving:Ne,onCellsMoved:We,onCellResizing:Te,onCellResized:Re,onSwitchActiveTarget:V,onCellContextMenu:J,onDecoratorTextChange:G,onDecoratorTextEditing:Se,onNodeBrickResize:ze})))),p().createElement(E.w,{connectLineState:ve,transform:pe,markerEnd:`${Ee}0`,onConnect:_e}),fe&&p().createElement("rect",{x:fe.x,y:fe.y,width:fe.width,height:fe.height,fill:"var(--palette-gray-5)",fillOpacity:.3,stroke:"var(--palette-gray-5)",strokeDasharray:2}))),p().createElement($.Y,{shadowRoot:n.shadowRoot,scale:pe.k,scaleRange:Ae,onZoomChange:$e,onReCenter:Le}))}function kn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}a=vn,({e:[V,j,X,q,F,Z,J,G,Q,ee,te,ne,ae,ie,se,le,oe,re,he,ce,de,ue,pe,ge,Ae,fe,ye,ve,be,me,ke,we,_e,xe,Me,Ce,Ee,Ne,We,Te,Re,Se,ze,$e,Le,Be,De,Pe,Oe,He,Ie,Ke,Ue,Ye,Ve,je,Xe,qe,Fe,Ze,Je,Ge,Qe,et,tt,nt,at,it,st,lt,ot,rt,ht,ct,dt,ut,pt,gt,At,ft,yt,vt,bt,mt,U],c:[Et,Y]}=(0,d.A)(a,[wt("eo-draw-canvas",{styleTexts:[O.A,H.A]})],[[_t({attribute:!1}),1,"cells"],[_t({type:String}),1,"layout"],[_t({attribute:!1}),1,"layoutOptions"],[_t({attribute:!1}),1,"defaultNodeSize"],[_t({attribute:!1}),1,"defaultNodeBricks"],[_t({type:Number}),1,"degradedThreshold"],[_t({attribute:!1}),1,"degradedNodeLabel"],[_t({attribute:!1}),1,"defaultEdgeLines"],[_t({attribute:!1}),1,"activeTarget"],[_t({type:Boolean}),1,"fadeUnrelatedCells"],[_t({type:Boolean}),1,"zoomable"],[_t({type:Boolean}),1,"scrollable"],[_t({type:Boolean}),1,"pannable"],[_t({type:Boolean}),1,"selectable"],[_t({type:Boolean}),1,"allowEdgeToArea"],[_t(),1,"dragBehavior"],[_t(),1,"ctrlDragBehavior"],[_t({attribute:!1}),1,"scaleRange"],[Mt({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(jt,e),(e,t)=>(0,h.A)(jt,e,t)],[Mt({type:"node.move"}),1,"nodeMoveEvent",e=>(0,c.A)(Zt,e),(e,t)=>(0,h.A)(Zt,e,t)],[Mt({type:"cell.move"}),1,"cellMoveEvent",e=>(0,c.A)(Jt,e),(e,t)=>(0,h.A)(Jt,e,t)],[Mt({type:"cells.move"}),1,"cellsMoveEvent",e=>(0,c.A)(Qt,e),(e,t)=>(0,h.A)(Qt,e,t)],[Mt({type:"cell.resize"}),1,"cellResizeEvent",e=>(0,c.A)(tn,e),(e,t)=>(0,h.A)(tn,e,t)],[Mt({type:"node.delete"}),1,"nodeDelete",e=>(0,c.A)(an,e),(e,t)=>(0,h.A)(an,e,t)],[Mt({type:"cell.delete"}),1,"cellDelete",e=>(0,c.A)(sn,e),(e,t)=>(0,h.A)(sn,e,t)],[Mt({type:"cells.delete"}),1,"cellsDelete",e=>(0,c.A)(on,e),(e,t)=>(0,h.A)(on,e,t)],[Mt({type:"cell.contextmenu"}),1,"cellContextMenu",e=>(0,c.A)(hn,e),(e,t)=>(0,h.A)(hn,e,t)],[Mt({type:"decorator.text.change"}),1,"decoratorTextChange",e=>(0,c.A)(dn,e),(e,t)=>(0,h.A)(dn,e,t)],[Mt({type:"node.container.change"}),1,"containerContainerChange",e=>(0,c.A)(pn,e),(e,t)=>(0,h.A)(pn,e,t)],[Mt({type:"scale.change"}),1,"scaleChange",e=>(0,c.A)(An,e),(e,t)=>(0,h.A)(An,e,t)],[xt(),2,"dropNode"],[xt(),2,"dropDecorator"],[xt(),2,"addNodes"],[xt(),2,"addEdge"],[xt(),2,"manuallyConnectNodes"],[xt(),2,"updateCells"]],0,(e=>yn.has((0,l.A)(e))),A.ReactNextElement)),Y()},3971:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const o=l.toString()},497:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(6758),i=n.n(a),s=n(935),l=n.n(s)()(i());l.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host(:not([usage="dragging"]):not([usage="library"]):hover),\n:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const o=l.toString()},780:(e,t,n)=>{n.d(t,{_:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},8406:(e,t,n)=>{n.d(t,{y:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n){return(yield i.http.post("api/gateway/cmdb.instance.PostSearchV3/v3/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}()},6841:(e,t,n)=>{n.d(t,{x:()=>s});var a=n(6330),i=n(3496),s=function(){var e=(0,a.A)((function*(e,t,n,a){return(yield i.http.put("api/gateway/cmdb.instance.UpdateInstanceV2/v2/object/".concat(e,"/instance/").concat(t),n,a)).data}));return function(t,n,a,i){return e.apply(this,arguments)}}()},4993:(e,t,n)=>{function a(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function i(e){this._context=e}function s(e){return new i(e)}n.d(t,{Ay:()=>s}),i.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:a(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:a(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}},4643:(e,t,n)=>{n.d(t,{dJ:()=>i,kl:()=>s});class a{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function i(e){return new a(e,!0)}function s(e){return new a(e,!1)}},482:(e,t,n)=>{function a(e){this._context=e}function i(e){return new a(e)}n.d(t,{A:()=>i}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}},3488:(e,t,n)=>{function a(e){return e<0?-1:1}function i(e,t,n){var i=e._x1-e._x0,s=t-e._x1,l=(e._y1-e._y0)/(i||s<0&&-0),o=(n-e._y1)/(s||i<0&&-0),r=(l*s+o*i)/(i+s);return(a(l)+a(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(r))||0}function s(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function l(e,t,n){var a=e._x0,i=e._y0,s=e._x1,l=e._y1,o=(s-a)/3;e._context.bezierCurveTo(a+o,i+o*t,s-o,l-o*n,s,l)}function o(e){this._context=e}function r(e){this._context=new h(e)}function h(e){this._context=e}function c(e){return new o(e)}function d(e){return new r(e)}n.d(t,{G:()=>c,N:()=>d}),o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:l(this,this._t0,s(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,l(this,s(this,n=i(this,e,t)),n);break;default:l(this,this._t0,n=i(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(r.prototype=Object.create(o.prototype)).point=function(e,t){o.prototype.point.call(this,t,e)},h.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,a,i,s){this._context.bezierCurveTo(t,e,a,n,s,i)}}},6066:(e,t,n)=>{function a(e){this._context=e}function i(e){var t,n,a=e.length-1,i=new Array(a),s=new Array(a),l=new Array(a);for(i[0]=0,s[0]=2,l[0]=e[0]+2*e[1],t=1;t<a-1;++t)i[t]=1,s[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[a-1]=2,s[a-1]=7,l[a-1]=8*e[a-1]+e[a],t=1;t<a;++t)n=i[t]/s[t-1],s[t]-=n,l[t]-=n*l[t-1];for(i[a-1]=l[a-1]/s[a-1],t=a-2;t>=0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[a-1]=(e[a]+i[a-1])/2,t=0;t<a-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function s(e){return new a(e)}n.d(t,{A:()=>s}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var a=i(e),s=i(t),l=0,o=1;o<n;++l,++o)this._context.bezierCurveTo(a[0][l],s[0][l],a[1][l],s[1][l],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}},3269:(e,t,n)=>{function a(e){return function(){return e}}n.d(t,{A:()=>p}),Array.prototype.slice;var i=n(482);const s=Math.PI,l=2*s,o=1e-6,r=l-o;function h(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class c{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?h:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return h;const n=10**t;return function(e){this._+=e[0];for(let t=1,a=e.length;t<a;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,a){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,t,n,a,i,s){this._append`C${+e},${+t},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(e,t,n,a,i){if(e=+e,t=+t,n=+n,a=+a,(i=+i)<0)throw new Error(`negative radius: ${i}`);let l=this._x1,r=this._y1,h=n-e,c=a-t,d=l-e,u=r-t,p=d*d+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(p>o)if(Math.abs(u*h-c*d)>o&&i){let g=n-l,A=a-r,f=h*h+c*c,y=g*g+A*A,v=Math.sqrt(f),b=Math.sqrt(p),m=i*Math.tan((s-Math.acos((f+p-y)/(2*v*b)))/2),k=m/b,w=m/v;Math.abs(k-1)>o&&this._append`L${e+k*d},${t+k*u}`,this._append`A${i},${i},0,0,${+(u*g>d*A)},${this._x1=e+w*h},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,a,i,h){if(e=+e,t=+t,h=!!h,(n=+n)<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(a),d=n*Math.sin(a),u=e+c,p=t+d,g=1^h,A=h?a-i:i-a;null===this._x1?this._append`M${u},${p}`:(Math.abs(this._x1-u)>o||Math.abs(this._y1-p)>o)&&this._append`L${u},${p}`,n&&(A<0&&(A=A%l+l),A>r?this._append`A${n},${n},0,1,${g},${e-c},${t-d}A${n},${n},0,1,${g},${this._x1=u},${this._y1=p}`:A>o&&this._append`A${n},${n},0,${+(A>=s)},${g},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function d(e){return e[0]}function u(e){return e[1]}function p(e,t){var n=a(!0),s=null,l=i.A,o=null,r=function(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new c(t)}(h);function h(a){var i,h,c,d=(a=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(a)).length,u=!1;for(null==s&&(o=l(c=r())),i=0;i<=d;++i)!(i<d&&n(h=a[i],i,a))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+e(h,i,a),+t(h,i,a));if(c)return o=null,c+""||null}return e="function"==typeof e?e:void 0===e?d:a(e),t="function"==typeof t?t:void 0===t?u:a(t),h.x=function(t){return arguments.length?(e="function"==typeof t?t:a(+t),h):e},h.y=function(e){return arguments.length?(t="function"==typeof e?e:a(+e),h):t},h.defined=function(e){return arguments.length?(n="function"==typeof e?e:a(!!e),h):n},h.curve=function(e){return arguments.length?(l=e,null!=s&&(o=l(s)),h):l},h.context=function(e){return arguments.length?(null==e?s=o=null:o=l(s=e),h):s},h}c.prototype}}]);
|
|
3
|
+
//# sourceMappingURL=4017.5d4d14b0.js.map
|