@logicflow/core 0.7.11 → 0.7.13
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/CHANGELOG.md +45 -0
- package/dist/logic-flow-cjs.js +2 -0
- package/dist/logic-flow-cjs.js.LICENSE.txt +23 -0
- package/dist/logic-flow.js +3 -3
- package/dist/logic-flow.js.LICENSE.txt +23 -0
- package/dist/style/index.css +14 -0
- package/package.json +2 -2
- package/types/view/node/BaseNode.d.ts +29 -38
- package/types/view/node/CircleNode.d.ts +13 -16
- package/types/view/node/DiamondNode.d.ts +13 -16
- package/types/view/node/EllipseNode.d.ts +12 -15
- package/types/view/node/PolygonNode.d.ts +13 -35
- package/types/view/node/RectNode.d.ts +13 -16
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see logic-flow-cjs.js.LICENSE.txt */
|
|
2
|
+
!function(){var t={7111:function(t,e,r){var n=r(9859),o=r(6733),i=r(9821),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},7988:function(t,e,r){var n=r(9859),o=r(2359),i=r(9821),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},8505:function(t,e,r){var n=r(9859),o=r(6733),i=n.String,a=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},9736:function(t,e,r){var n=r(95),o=r(2391),i=r(1787),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},6637:function(t,e,r){"use strict";var n=r(966).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},7728:function(t,e,r){var n=r(9859),o=r(1321),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},1176:function(t,e,r){var n=r(9859),o=r(5052),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},2460:function(t,e,r){var n=r(4229);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},7065:function(t,e,r){"use strict";var n=r(2991),o=r(3231),i=r(9646);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>u;)e[u++]=t;return e}},6570:function(t,e,r){"use strict";var n=r(9996).forEach,o=r(6038)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},507:function(t,e,r){"use strict";var n=r(9859),o=r(7636),i=r(266),a=r(2991),u=r(4960),c=r(1943),s=r(2359),l=r(9646),f=r(2324),p=r(8403),y=r(8830),h=n.Array;t.exports=function(t){var e=a(t),r=s(this),n=arguments.length,d=n>1?arguments[1]:void 0,v=void 0!==d;v&&(d=o(d,n>2?arguments[2]:void 0));var b,g,m,O,_,w,x=y(e),E=0;if(!x||this==h&&c(x))for(b=l(e),g=r?new this(b):h(b);b>E;E++)w=v?d(e[E],E):e[E],f(g,E,w);else for(_=(O=p(e,x)).next,g=r?new this:[];!(m=i(_,O)).done;E++)w=v?u(O,d,[m.value,E],!0):m.value,f(g,E,w);return g.length=E,g}},9540:function(t,e,r){var n=r(905),o=r(3231),i=r(9646),a=function(t){return function(e,r,a){var u,c=n(e),s=i(c),l=o(a,s);if(t&&r!=r){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9996:function(t,e,r){var n=r(7636),o=r(5968),i=r(9337),a=r(2991),u=r(9646),c=r(7501),s=o([].push),l=function(t){var e=1==t,r=2==t,o=3==t,l=4==t,f=6==t,p=7==t,y=5==t||f;return function(h,d,v,b){for(var g,m,O=a(h),_=i(O),w=n(d,v),x=u(_),E=0,S=b||c,j=e?S(h,x):r||p?S(h,0):void 0;x>E;E++)if((y||E in _)&&(m=w(g=_[E],E,O),t))if(e)j[E]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:s(j,g)}else switch(t){case 4:return!1;case 7:s(j,g)}return f?-1:o||l?l:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},1460:function(t,e,r){var n=r(4229),o=r(95),i=r(6358),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},6038:function(t,e,r){"use strict";var n=r(4229);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},9794:function(t,e,r){var n=r(9859),o=r(3231),i=r(9646),a=r(2324),u=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),l=o(void 0===r?n:r,n),f=u(c(l-s,0)),p=0;s<l;s++,p++)a(f,p,t[s]);return f.length=p,f}},1909:function(t,e,r){var n=r(5968);t.exports=n([].slice)},3867:function(t,e,r){var n=r(9794),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?a(t,e):u(t,i(n(t,0,c),e),i(n(t,c),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},u=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(e[a],r[u])<=0?e[a++]:r[u++]:a<o?e[a++]:r[u++];return t};t.exports=i},8760:function(t,e,r){var n=r(9859),o=r(3718),i=r(2359),a=r(5052),u=r(95)("species"),c=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},7501:function(t,e,r){var n=r(8760);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},4960:function(t,e,r){var n=r(1176),o=r(7281);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},4575:function(t,e,r){var n=r(95)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},7079:function(t,e,r){var n=r(5968),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},1589:function(t,e,r){var n=r(9859),o=r(1601),i=r(6733),a=r(7079),u=r(95)("toStringTag"),c=n.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?r:s?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},8081:function(t,e,r){"use strict";var n=r(1787).f,o=r(2391),i=r(8787),a=r(7636),u=r(7728),c=r(9003),s=r(7675),l=r(1832),f=r(7400),p=r(5926).fastKey,y=r(6407),h=y.set,d=y.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,y),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),y=l.prototype,v=d(e),b=function(t,e,r){var n,o,i=v(t),a=g(t,e);return a?a.value=r:(i.last=a={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},g=function(t,e){var r,n=v(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(y,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,r=v(e),n=g(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),f?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=v(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),i(y,r?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),f&&n(y,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=d(e),i=d(n);s(t,e,(function(t,e){h(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},9789:function(t,e,r){"use strict";var n=r(3103),o=r(9859),i=r(5968),a=r(6541),u=r(7487),c=r(5926),s=r(9003),l=r(7728),f=r(6733),p=r(5052),y=r(4229),h=r(4575),d=r(4555),v=r(835);t.exports=function(t,e,r){var b=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),m=b?"set":"add",O=o[t],_=O&&O.prototype,w=O,x={},E=function(t){var e=i(_[t]);u(_,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return g&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!f(O)||!(g||_.forEach&&!y((function(){(new O).entries().next()})))))w=r.getConstructor(e,t,b,m),c.enable();else if(a(t,!0)){var S=new w,j=S[m](g?{}:-0,1)!=S,P=y((function(){S.has(1)})),k=h((function(t){new O(t)})),A=!g&&y((function(){for(var t=new O,e=5;e--;)t[m](e,e);return!t.has(-0)}));k||((w=e((function(t,e){l(t,_);var r=v(new O,t,w);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:b}),r}))).prototype=_,_.constructor=w),(P||A)&&(E("delete"),E("has"),b&&E("get")),(A||j)&&E(m),g&&_.clear&&delete _.clear}return x[t]=w,n({global:!0,forced:w!=O},x),d(w,t),g||r.setStrong(w,t,b),w}},7081:function(t,e,r){var n=r(8270),o=r(4826),i=r(7933),a=r(1787);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||u(t,l,c(e,l))}}},8127:function(t,e,r){var n=r(95)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},7528:function(t,e,r){var n=r(4229);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},1720:function(t,e,r){var n=r(5968),o=r(8885),i=r(3326),a=/"/g,u=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+u(i(n),a,""")+'"'),s+">"+c+"</"+e+">"}},3723:function(t,e,r){"use strict";var n=r(693).IteratorPrototype,o=r(2391),i=r(5358),a=r(4555),u=r(5495),c=function(){return this};t.exports=function(t,e,r,s){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),a(t,l,!1,!0),u[l]=c,t}},5762:function(t,e,r){var n=r(7400),o=r(1787),i=r(5358);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2324:function(t,e,r){"use strict";var n=r(9310),o=r(1787),i=r(5358);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},7675:function(t,e,r){"use strict";var n=r(3103),o=r(266),i=r(4231),a=r(1805),u=r(6733),c=r(3723),s=r(7567),l=r(6540),f=r(4555),p=r(5762),y=r(7487),h=r(95),d=r(5495),v=r(693),b=a.PROPER,g=a.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,_=h("iterator"),w="keys",x="values",E="entries",S=function(){return this};t.exports=function(t,e,r,a,h,v,j){c(r,e,a);var P,k,A,D=function(t){if(t===h&&R)return R;if(!O&&t in N)return N[t];switch(t){case w:case x:case E:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",M=!1,N=t.prototype,C=N[_]||N["@@iterator"]||h&&N[h],R=!O&&C||D(h),I="Array"==e&&N.entries||C;if(I&&(P=s(I.call(new t)))!==Object.prototype&&P.next&&(i||s(P)===m||(l?l(P,m):u(P[_])||y(P,_,S)),f(P,T,!0,!0),i&&(d[T]=S)),b&&h==x&&C&&C.name!==x&&(!i&&g?p(N,"name",x):(M=!0,R=function(){return o(C,this)})),h)if(k={values:D(x),keys:v?R:D(w),entries:D(E)},j)for(A in k)(O||M||!(A in N))&&y(N,A,k[A]);else n({target:e,proto:!0,forced:O||M},k);return i&&!j||N[_]===R||y(N,_,R,{name:h}),d[e]=R,k}},8423:function(t,e,r){var n=r(9276),o=r(8270),i=r(5391),a=r(1787).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},7400:function(t,e,r){var n=r(4229);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,r){var n=r(9859),o=r(5052),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},5694:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8865:function(t,e,r){var n=r(2635)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},2671:function(t,e,r){var n=r(598).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},8506:function(t,e,r){var n=r(598);t.exports=/MSIE|Trident/.test(n)},598:function(t,e,r){var n=r(1333);t.exports=n("navigator","userAgent")||""},6358:function(t,e,r){var n,o,i=r(9859),a=r(598),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},9811:function(t,e,r){var n=r(598).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,r){var n=r(9859),o=r(7933).f,i=r(5762),a=r(7487),u=r(2079),c=r(7081),s=r(6541);t.exports=function(t,e){var r,l,f,p,y,h=t.target,d=t.global,v=t.stat;if(r=d?n:v?n[h]||u(h,{}):(n[h]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(y=o(r,l))&&y.value:r[l],!s(d?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},4954:function(t,e,r){"use strict";r(7950);var n=r(5968),o=r(7487),i=r(3466),a=r(4229),u=r(95),c=r(5762),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=u(t),y=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=y&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!y||!h||r){var d=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,a){var u=n(t),c=e.exec;return c===i||c===l.exec?y&&!a?{done:!0,value:d(e,r,o)}:{done:!0,value:u(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,p,v[1])}f&&c(l[p],"sham",!0)}},8476:function(t,e,r){var n=r(4229);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},3171:function(t){var e=Function.prototype,r=e.apply,n=e.bind,o=e.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(r):function(){return o.apply(r,arguments)})},7636:function(t,e,r){var n=r(5968),o=r(7111),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},4128:function(t,e,r){"use strict";var n=r(9859),o=r(5968),i=r(7111),a=r(5052),u=r(8270),c=r(1909),s=n.Function,l=o([].concat),f=o([].join),p={},y=function(t,e,r){if(!u(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=s("C,a","return new C("+f(n,",")+")")}return p[e](t,r)};t.exports=s.bind||function(t){var e=i(this),r=e.prototype,n=c(arguments,1),o=function(){var r=l(n,c(arguments));return this instanceof o?y(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},266:function(t){var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},1805:function(t,e,r){var n=r(7400),o=r(8270),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},5968:function(t){var e=Function.prototype,r=e.bind,n=e.call,o=r&&r.bind(n);t.exports=r?function(t){return t&&o(n,t)}:function(t){return t&&function(){return n.apply(t,arguments)}}},1333:function(t,e,r){var n=r(9859),o=r(6733),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},8830:function(t,e,r){var n=r(1589),o=r(5300),i=r(5495),a=r(95)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},8403:function(t,e,r){var n=r(9859),o=r(266),i=r(7111),a=r(1176),u=r(9821),c=r(8830),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?c(t):e;if(i(r))return a(o(r,t));throw s(u(t)+" is not iterable")}},5300:function(t,e,r){var n=r(7111);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},17:function(t,e,r){var n=r(5968),o=r(2991),i=Math.floor,a=n("".charAt),u=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var y=r+t.length,h=n.length,d=l;return void 0!==f&&(f=o(f),d=s),u(p,d,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,y);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>h){var p=i(l/10);return 0===p?o:p<=h?void 0===n[p-1]?a(u,1):n[p-1]+a(u,1):o}s=n[l-1]}return void 0===s?"":s}))}},9859:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},8270:function(t,e,r){var n=r(5968),o=r(2991),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,r){var n=r(1333);t.exports=n("document","documentElement")},4394:function(t,e,r){var n=r(7400),o=r(4229),i=r(2635);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,r){var n=r(9859),o=r(5968),i=r(4229),a=r(7079),u=n.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},835:function(t,e,r){var n=r(6733),o=r(5052),i=r(6540);t.exports=function(t,e,r){var a,u;return i&&n(a=e.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&i(t,u),t}},8511:function(t,e,r){var n=r(5968),o=r(6733),i=r(5353),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},5926:function(t,e,r){var n=r(3103),o=r(5968),i=r(5977),a=r(5052),u=r(8270),c=r(1787).f,s=r(8151),l=r(166),f=r(5343),p=r(1441),y=r(8476),h=!1,d=p("meta"),v=0,b=function(t){c(t,d,{value:{objectID:"O"+v++,weakData:{}}})},g=t.exports={enable:function(){g.enable=function(){},h=!0;var t=s.f,e=o([].splice),r={};r[d]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===d){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,d)){if(!f(t))return"F";if(!e)return"E";b(t)}return t[d].objectID},getWeakData:function(t,e){if(!u(t,d)){if(!f(t))return!0;if(!e)return!1;b(t)}return t[d].weakData},onFreeze:function(t){return y&&h&&f(t)&&!u(t,d)&&b(t),t}};i[d]=!0},6407:function(t,e,r){var n,o,i,a=r(8694),u=r(9859),c=r(5968),s=r(5052),l=r(5762),f=r(8270),p=r(5353),y=r(4399),h=r(5977),d="Object already initialized",v=u.TypeError,b=u.WeakMap;if(a||p.state){var g=p.state||(p.state=new b),m=c(g.get),O=c(g.has),_=c(g.set);n=function(t,e){if(O(g,t))throw new v(d);return e.facade=t,_(g,t,e),e},o=function(t){return m(g,t)||{}},i=function(t){return O(g,t)}}else{var w=y("state");h[w]=!0,n=function(t,e){if(f(t,w))throw new v(d);return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return r}}}},1943:function(t,e,r){var n=r(95),o=r(5495),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},3718:function(t,e,r){var n=r(7079);t.exports=Array.isArray||function(t){return"Array"==n(t)}},6733:function(t){t.exports=function(t){return"function"==typeof t}},2359:function(t,e,r){var n=r(5968),o=r(4229),i=r(6733),a=r(1589),u=r(1333),c=r(8511),s=function(){},l=[],f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,y=n(p.exec),h=!p.exec(s),d=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!y(p,c(t))}:d},193:function(t,e,r){var n=r(8270);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},6541:function(t,e,r){var n=r(4229),o=r(6733),i=/#|\.prototype\./,a=function(t,e){var r=c[u(t)];return r==l||r!=s&&(o(e)?n(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},5052:function(t,e,r){var n=r(6733);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},4231:function(t){t.exports=!1},8311:function(t,e,r){var n=r(5052),o=r(7079),i=r(95)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},9395:function(t,e,r){var n=r(9859),o=r(1333),i=r(6733),a=r(1321),u=r(6969),c=n.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},9003:function(t,e,r){var n=r(9859),o=r(7636),i=r(266),a=r(1176),u=r(9821),c=r(1943),s=r(9646),l=r(1321),f=r(8403),p=r(8830),y=r(7281),h=n.TypeError,d=function(t,e){this.stopped=t,this.result=e},v=d.prototype;t.exports=function(t,e,r){var n,b,g,m,O,_,w,x=r&&r.that,E=!(!r||!r.AS_ENTRIES),S=!(!r||!r.IS_ITERATOR),j=!(!r||!r.INTERRUPTED),P=o(e,x),k=function(t){return n&&y(n,"normal",t),new d(!0,t)},A=function(t){return E?(a(t),j?P(t[0],t[1],k):P(t[0],t[1])):j?P(t,k):P(t)};if(S)n=t;else{if(!(b=p(t)))throw h(u(t)+" is not iterable");if(c(b)){for(g=0,m=s(t);m>g;g++)if((O=A(t[g]))&&l(v,O))return O;return new d(!1)}n=f(t,b)}for(_=n.next;!(w=i(_,n)).done;){try{O=A(w.value)}catch(t){y(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new d(!1)}},7281:function(t,e,r){var n=r(266),o=r(1176),i=r(5300);t.exports=function(t,e,r){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw r;if(u)throw a;return o(a),r}},693:function(t,e,r){"use strict";var n,o,i,a=r(4229),u=r(6733),c=r(2391),s=r(7567),l=r(7487),f=r(95),p=r(4231),y=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):h=!0),null==n||a((function(){var t={};return n[y].call(t)!==t}))?n={}:p&&(n=c(n)),u(n[y])||l(n,y,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},5495:function(t){t.exports={}},9646:function(t,e,r){var n=r(4237);t.exports=function(t){return n(t.length)}},3839:function(t,e,r){var n=r(6358),o=r(4229);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8694:function(t,e,r){var n=r(9859),o=r(6733),i=r(8511),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},7272:function(t,e,r){var n=r(9859),o=r(8311),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},47:function(t,e,r){"use strict";var n=r(7400),o=r(5968),i=r(266),a=r(4229),u=r(5632),c=r(894),s=r(9195),l=r(2991),f=r(9337),p=Object.assign,y=Object.defineProperty,h=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||u(p({},e)).join("")!=o}))?function(t,e){for(var r=l(t),o=arguments.length,a=1,p=c.f,y=s.f;o>a;)for(var d,v=f(arguments[a++]),b=p?h(u(v),p(v)):u(v),g=b.length,m=0;g>m;)d=b[m++],n&&!i(y,v,d)||(r[d]=v[d]);return r}:p},2391:function(t,e,r){var n,o=r(1176),i=r(219),a=r(3837),u=r(5977),c=r(3777),s=r(2635),l=r(4399)("IE_PROTO"),f=function(){},p=function(t){return"<script>"+t+"<\/script>"},y=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&n?y(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):y(n);for(var r=a.length;r--;)delete h.prototype[a[r]];return h()};u[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(f.prototype=o(t),r=new f,f.prototype=null,r[l]=t):r=h(),void 0===e?r:i(r,e)}},219:function(t,e,r){var n=r(7400),o=r(1787),i=r(1176),a=r(905),u=r(5632);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),c=u(e),s=c.length,l=0;s>l;)o.f(t,r=c[l++],n[r]);return t}},1787:function(t,e,r){var n=r(9859),o=r(7400),i=r(4394),a=r(1176),u=r(9310),c=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(a(t),e=u(e),a(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7933:function(t,e,r){var n=r(7400),o=r(266),i=r(9195),a=r(5358),u=r(905),c=r(9310),s=r(8270),l=r(4394),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=u(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},166:function(t,e,r){var n=r(7079),o=r(905),i=r(8151).f,a=r(9794),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},8151:function(t,e,r){var n=r(140),o=r(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},7567:function(t,e,r){var n=r(9859),o=r(8270),i=r(6733),a=r(2991),u=r(4399),c=r(7528),s=u("IE_PROTO"),l=n.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?f:null}},5343:function(t,e,r){var n=r(4229),o=r(5052),i=r(7079),a=r(2460),u=Object.isExtensible,c=n((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&(!a||"ArrayBuffer"!=i(t))&&(!u||u(t))}:u},1321:function(t,e,r){var n=r(5968);t.exports=n({}.isPrototypeOf)},140:function(t,e,r){var n=r(5968),o=r(8270),i=r(905),a=r(9540).indexOf,u=r(5977),c=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,l=[];for(r in n)!o(u,r)&&o(n,r)&&c(l,r);for(;e.length>s;)o(n,r=e[s++])&&(~a(l,r)||c(l,r));return l}},5632:function(t,e,r){var n=r(140),o=r(3837);t.exports=Object.keys||function(t){return n(t,o)}},9195:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},6540:function(t,e,r){var n=r(5968),o=r(1176),i=r(8505);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},7664:function(t,e,r){var n=r(7400),o=r(5968),i=r(5632),a=r(905),u=o(r(9195).f),c=o([].push),s=function(t){return function(e){for(var r,o=a(e),s=i(o),l=s.length,f=0,p=[];l>f;)r=s[f++],n&&!u(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:s(!0),values:s(!1)}},4059:function(t,e,r){"use strict";var n=r(1601),o=r(1589);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},2914:function(t,e,r){var n=r(9859),o=r(266),i=r(6733),a=r(5052),u=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw u("Can't convert object to primitive value")}},4826:function(t,e,r){var n=r(1333),o=r(5968),i=r(8151),a=r(894),u=r(1176),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(u(t)),r=a.f;return r?c(e,r(t)):e}},9276:function(t,e,r){var n=r(9859);t.exports=n},8787:function(t,e,r){var n=r(7487);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},7487:function(t,e,r){var n=r(9859),o=r(6733),i=r(8270),a=r(5762),u=r(2079),c=r(8511),s=r(6407),l=r(1805).CONFIGURABLE,f=s.get,p=s.enforce,y=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==v)&&a(r,"name",v),(s=p(r)).source||(s.source=y.join("string"==typeof v?v:""))),t!==n?(f?!d&&t[e]&&(h=!0):delete t[e],h?t[e]=r:a(t,e,r)):h?t[e]=r:u(e,r)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},8115:function(t,e,r){var n=r(9859),o=r(266),i=r(1176),a=r(6733),u=r(7079),c=r(3466),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},3466:function(t,e,r){"use strict";var n,o,i=r(266),a=r(5968),u=r(3326),c=r(895),s=r(5650),l=r(3036),f=r(2391),p=r(6407).get,y=r(2926),h=r(461),d=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,b=v,g=a("".charAt),m=a("".indexOf),O=a("".replace),_=a("".slice),w=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),x=s.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(w||E||x||y||h)&&(b=function(t){var e,r,n,o,a,s,l,y=this,h=p(y),S=u(t),j=h.raw;if(j)return j.lastIndex=y.lastIndex,e=i(b,j,S),y.lastIndex=j.lastIndex,e;var P=h.groups,k=x&&y.sticky,A=i(c,y),D=y.source,T=0,M=S;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),M=_(S,y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&"\n"!==g(S,y.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",A)),E&&(r=new RegExp("^"+D+"$(?!\\s)",A)),w&&(n=y.lastIndex),o=i(v,k?r:y,M),k?o?(o.input=_(o.input,T),o[0]=_(o[0],T),o.index=y.lastIndex,y.lastIndex+=o[0].length):y.lastIndex=0:w&&o&&(y.lastIndex=y.global?o.index+o[0].length:n),E&&o&&o.length>1&&i(d,o[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&P)for(o.groups=s=f(null),a=0;a<P.length;a++)s[(l=P[a])[0]]=o[l[1]];return o}),t.exports=b},895:function(t,e,r){"use strict";var n=r(1176);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},5650:function(t,e,r){var n=r(4229),o=r(9859).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),u=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},2926:function(t,e,r){var n=r(4229),o=r(9859).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},461:function(t,e,r){var n=r(4229),o=r(9859).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},8885:function(t,e,r){var n=r(9859).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},2079:function(t,e,r){var n=r(9859),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},1832:function(t,e,r){"use strict";var n=r(1333),o=r(1787),i=r(95),a=r(7400),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},4555:function(t,e,r){var n=r(1787).f,o=r(8270),i=r(95)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},4399:function(t,e,r){var n=r(3036),o=r(1441),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5353:function(t,e,r){var n=r(9859),o=r(2079),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},3036:function(t,e,r){var n=r(4231),o=r(5353);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},7942:function(t,e,r){var n=r(1176),o=r(7988),i=r(95)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},3689:function(t,e,r){var n=r(4229);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},966:function(t,e,r){var n=r(5968),o=r(3329),i=r(3326),a=r(8885),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),l=function(t){return function(e,r){var n,l,f=i(a(e)),p=o(r),y=f.length;return p<0||p>=y?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===y||(l=c(f,p+1))<56320||l>57343?t?u(f,p):n:t?s(f,p,p+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},3124:function(t,e,r){"use strict";var n=r(9859),o=r(3329),i=r(3326),a=r(8885),u=n.RangeError;t.exports=function(t){var e=i(a(this)),r="",n=o(t);if(n<0||n==1/0)throw u("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},9445:function(t,e,r){var n=r(1805).PROPER,o=r(4229),i=r(1647);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||n&&i[t].name!==t}))}},1017:function(t,e,r){var n=r(5968),o=r(8885),i=r(3326),a=r(1647),u=n("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=u(r,s,"")),2&t&&(r=u(r,l,"")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},143:function(t,e,r){var n=r(5968);t.exports=n(1..valueOf)},3231:function(t,e,r){var n=r(3329),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},905:function(t,e,r){var n=r(9337),o=r(8885);t.exports=function(t){return n(o(t))}},3329:function(t){var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},4237:function(t,e,r){var n=r(3329),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},2991:function(t,e,r){var n=r(9859),o=r(8885),i=n.Object;t.exports=function(t){return i(o(t))}},2066:function(t,e,r){var n=r(9859),o=r(266),i=r(5052),a=r(9395),u=r(5300),c=r(2914),s=r(95),l=n.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=u(t,f);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},9310:function(t,e,r){var n=r(2066),o=r(9395);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},1601:function(t,e,r){var n={};n[r(95)("toStringTag")]="z",t.exports="[object z]"===String(n)},3326:function(t,e,r){var n=r(9859),o=r(1589),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},9821:function(t,e,r){var n=r(9859).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},1441:function(t,e,r){var n=r(5968),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},6969:function(t,e,r){var n=r(3839);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5391:function(t,e,r){var n=r(95);e.f=n},95:function(t,e,r){var n=r(9859),o=r(3036),i=r(8270),a=r(1441),u=r(3839),c=r(6969),s=o("wks"),l=n.Symbol,f=l&&l.for,p=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):p(e)}return s[t]}},1647:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},8178:function(t,e,r){"use strict";var n=r(3103),o=r(9859),i=r(4229),a=r(3718),u=r(5052),c=r(2991),s=r(9646),l=r(2324),f=r(7501),p=r(1460),y=r(95),h=r(6358),d=y("isConcatSpreadable"),v=9007199254740991,b="Maximum allowed index exceeded",g=o.TypeError,m=h>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),O=p("concat"),_=function(t){if(!u(t))return!1;var e=t[d];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!m||!O},{concat:function(t){var e,r,n,o,i,a=c(this),u=f(a,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(_(i=-1===e?a:arguments[e])){if(p+(o=s(i))>v)throw g(b);for(r=0;r<o;r++,p++)r in i&&l(u,p,i[r])}else{if(p>=v)throw g(b);l(u,p++,i)}return u.length=p,u}})},2656:function(t,e,r){var n=r(3103),o=r(7065),i=r(9736);n({target:"Array",proto:!0},{fill:o}),i("fill")},5342:function(t,e,r){"use strict";var n=r(3103),o=r(9996).filter;n({target:"Array",proto:!0,forced:!r(1460)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},9228:function(t,e,r){"use strict";var n=r(3103),o=r(9996).find,i=r(9736),a="find",u=!0;a in[]&&Array(1).find((function(){u=!1})),n({target:"Array",proto:!0,forced:u},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},7233:function(t,e,r){var n=r(3103),o=r(507);n({target:"Array",stat:!0,forced:!r(4575)((function(t){Array.from(t)}))},{from:o})},9529:function(t,e,r){"use strict";var n=r(3103),o=r(9540).includes,i=r(9736);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},5735:function(t,e,r){"use strict";var n=r(905),o=r(9736),i=r(5495),a=r(6407),u=r(7675),c="Array Iterator",s=a.set,l=a.getterFor(c);t.exports=u(Array,"Array",(function(t,e){s(this,{type:c,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},6781:function(t,e,r){"use strict";var n=r(3103),o=r(5968),i=r(9337),a=r(905),u=r(6038),c=o([].join),s=i!=Object,l=u("join",",");n({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},3450:function(t,e,r){"use strict";var n=r(3103),o=r(9996).map;n({target:"Array",proto:!0,forced:!r(1460)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},2501:function(t,e,r){"use strict";var n=r(3103),o=r(9859),i=r(3718),a=r(2359),u=r(5052),c=r(3231),s=r(9646),l=r(905),f=r(2324),p=r(95),y=r(1460),h=r(1909),d=y("slice"),v=p("species"),b=o.Array,g=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,o,p=l(this),y=s(p),d=c(t,y),m=c(void 0===e?y:e,y);if(i(p)&&(r=p.constructor,(a(r)&&(r===b||i(r.prototype))||u(r)&&null===(r=r[v]))&&(r=void 0),r===b||void 0===r))return h(p,d,m);for(n=new(void 0===r?b:r)(g(m-d,0)),o=0;d<m;d++,o++)d in p&&f(n,o,p[d]);return n.length=o,n}})},3430:function(t,e,r){"use strict";var n=r(3103),o=r(5968),i=r(7111),a=r(2991),u=r(9646),c=r(3326),s=r(4229),l=r(3867),f=r(6038),p=r(2671),y=r(8506),h=r(6358),d=r(9811),v=[],b=o(v.sort),g=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),_=f("sort"),w=!s((function(){if(h)return h<70;if(!(p&&p>3)){if(y)return!0;if(d)return d<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!_||!w},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(w)return void 0===t?b(e):b(e,t);var r,n,o=[],s=u(e);for(n=0;n<s;n++)n in e&&g(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},9805:function(t,e,r){"use strict";var n=r(3103),o=r(9859),i=r(3231),a=r(3329),u=r(9646),c=r(2991),s=r(7501),l=r(2324),f=r(1460)("splice"),p=o.TypeError,y=Math.max,h=Math.min,d=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,b,g,m=c(this),O=u(m),_=i(t,O),w=arguments.length;if(0===w?r=n=0:1===w?(r=0,n=O-_):(r=w-2,n=h(y(a(e),0),O-_)),O+r-n>d)throw p(v);for(o=s(m,n),f=0;f<n;f++)(b=_+f)in m&&l(o,f,m[b]);if(o.length=n,r<n){for(f=_;f<O-n;f++)g=f+r,(b=f+n)in m?m[g]=m[b]:delete m[g];for(f=O;f>O-n+r;f--)delete m[f-1]}else if(r>n)for(f=O-n;f>_;f--)g=f+r-1,(b=f+n-1)in m?m[g]=m[b]:delete m[g];for(f=0;f<r;f++)m[f+_]=arguments[f+2];return m.length=O-n+r,o}})},6936:function(t,e,r){var n=r(7400),o=r(1805).EXISTS,i=r(5968),a=r(1787).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);n&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},9321:function(t,e,r){"use strict";r(9789)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(8081))},9509:function(t,e,r){var n=r(3103),o=Math.hypot,i=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,u=0,c=arguments.length,s=0;u<c;)s<(r=i(arguments[u++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*a(o)}})},1245:function(t,e,r){"use strict";var n=r(7400),o=r(9859),i=r(5968),a=r(6541),u=r(7487),c=r(8270),s=r(835),l=r(1321),f=r(9395),p=r(2066),y=r(4229),h=r(8151).f,d=r(7933).f,v=r(1787).f,b=r(143),g=r(1017).trim,m="Number",O=o.Number,_=O.prototype,w=o.TypeError,x=i("".slice),E=i("".charCodeAt),S=function(t){var e=p(t,"number");return"bigint"==typeof e?e:j(e)},j=function(t){var e,r,n,o,i,a,u,c,s=p(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=g(s),43===(e=E(s,0))||45===e){if(88===(r=E(s,2))||120===r)return NaN}else if(48===e){switch(E(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=x(s,2)).length,u=0;u<a;u++)if((c=E(i,u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(a(m,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var P,k=function(t){var e=arguments.length<1?0:O(S(t)),r=this;return l(_,r)&&y((function(){b(r)}))?s(Object(e),r,k):e},A=n?h(O):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0;A.length>D;D++)c(O,P=A[D])&&!c(k,P)&&v(k,P,d(O,P));k.prototype=_,_.constructor=k,u(o,m,k)}},8143:function(t,e,r){r(3103)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},2023:function(t,e,r){r(3103)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},3105:function(t,e,r){var n=r(3103),o=r(47);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},5883:function(t,e,r){var n=r(3103),o=r(7664).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},8625:function(t,e,r){var n=r(3103),o=r(4229),i=r(905),a=r(7933).f,u=r(7400),c=o((function(){a(1)}));n({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},2775:function(t,e,r){var n=r(3103),o=r(7400),i=r(4826),a=r(905),u=r(7933),c=r(2324);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=a(t),o=u.f,s=i(n),l={},f=0;s.length>f;)void 0!==(r=o(n,e=s[f++]))&&c(l,e,r);return l}})},6928:function(t,e,r){var n=r(3103),o=r(4229),i=r(2991),a=r(7567),u=r(7528);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},4769:function(t,e,r){var n=r(3103),o=r(2991),i=r(5632);n({target:"Object",stat:!0,forced:r(4229)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},2506:function(t,e,r){r(3103)({target:"Object",stat:!0},{setPrototypeOf:r(6540)})},8188:function(t,e,r){var n=r(1601),o=r(7487),i=r(4059);n||o(Object.prototype,"toString",i,{unsafe:!0})},1229:function(t,e,r){var n=r(3103),o=r(1333),i=r(3171),a=r(4128),u=r(7988),c=r(1176),s=r(5052),l=r(2391),f=r(4229),p=o("Reflect","construct"),y=Object.prototype,h=[].push,d=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),b=d||v;n({target:"Reflect",stat:!0,forced:b,sham:b},{construct:function(t,e){u(t),c(e);var r=arguments.length<3?t:u(arguments[2]);if(v&&!d)return p(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return i(h,n,e),new(i(a,t,n))}var o=r.prototype,f=l(s(o)?o:y),b=i(t,f,e);return s(b)?b:f}})},4565:function(t,e,r){var n=r(3103),o=r(266),i=r(5052),a=r(1176),u=r(193),c=r(7933),s=r(7567);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[r]:(n=c.f(e,r))?u(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(l=s(e))?t(l,r,f):void 0}})},7950:function(t,e,r){"use strict";var n=r(3103),o=r(3466);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},1549:function(t,e,r){"use strict";var n=r(3103),o=r(1720);n({target:"String",proto:!0,forced:r(3689)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},1235:function(t,e,r){"use strict";var n=r(3103),o=r(5968),i=r(7272),a=r(8885),u=r(3326),c=r(8127),s=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},8673:function(t,e,r){"use strict";var n=r(966).charAt,o=r(3326),i=r(6407),a=r(7675),u="String Iterator",c=i.set,s=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},4069:function(t,e,r){"use strict";var n=r(266),o=r(4954),i=r(1176),a=r(4237),u=r(3326),c=r(8885),s=r(5300),l=r(6637),f=r(8115);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return f(n,o);var s=n.unicode;n.lastIndex=0;for(var p,y=[],h=0;null!==(p=f(n,o));){var d=u(p[0]);y[h]=d,""===d&&(n.lastIndex=l(o,a(n.lastIndex),s)),h++}return 0===h?null:y}]}))},7789:function(t,e,r){r(3103)({target:"String",proto:!0},{repeat:r(3124)})},5940:function(t,e,r){"use strict";var n=r(3171),o=r(266),i=r(5968),a=r(4954),u=r(4229),c=r(1176),s=r(6733),l=r(3329),f=r(4237),p=r(3326),y=r(8885),h=r(6637),d=r(5300),v=r(17),b=r(8115),g=r(95)("replace"),m=Math.max,O=Math.min,_=i([].concat),w=i([].push),x=i("".indexOf),E=i("".slice),S="$0"==="a".replace(/./,"$0"),j=!!/./[g]&&""===/./[g]("a","$0");a("replace",(function(t,e,r){var i=j?"$":"$0";return[function(t,r){var n=y(this),i=null==t?void 0:d(t,g);return i?o(i,t,n,r):o(e,p(n),t,r)},function(t,o){var a=c(this),u=p(t);if("string"==typeof o&&-1===x(o,i)&&-1===x(o,"$<")){var y=r(e,a,u,o);if(y.done)return y.value}var d=s(o);d||(o=p(o));var g=a.global;if(g){var S=a.unicode;a.lastIndex=0}for(var j=[];;){var P=b(a,u);if(null===P)break;if(w(j,P),!g)break;""===p(P[0])&&(a.lastIndex=h(u,f(a.lastIndex),S))}for(var k,A="",D=0,T=0;T<j.length;T++){for(var M=p((P=j[T])[0]),N=m(O(l(P.index),u.length),0),C=[],R=1;R<P.length;R++)w(C,void 0===(k=P[R])?k:String(k));var I=P.groups;if(d){var L=_([M],C,N,u);void 0!==I&&w(L,I);var z=p(n(o,void 0,L))}else z=v(M,u,N,C,I,o);N>=D&&(A+=E(u,D,N)+z,D=N+M.length)}return A+E(u,D)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||j)},8319:function(t,e,r){"use strict";var n=r(3171),o=r(266),i=r(5968),a=r(4954),u=r(8311),c=r(1176),s=r(8885),l=r(7942),f=r(6637),p=r(4237),y=r(3326),h=r(5300),d=r(9794),v=r(8115),b=r(3466),g=r(5650),m=r(4229),O=g.UNSUPPORTED_Y,_=4294967295,w=Math.min,x=[].push,E=i(/./.exec),S=i(x),j=i("".slice),P=!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));a("split",(function(t,e,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var i=y(s(this)),a=void 0===r?_:r>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var c,l,f,p=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=new RegExp(t.source,h+"g");(c=o(b,g,i))&&!((l=g.lastIndex)>v&&(S(p,j(i,v,c.index)),c.length>1&&c.index<i.length&&n(x,p,d(c,1)),f=c[0].length,v=l,p.length>=a));)g.lastIndex===c.index&&g.lastIndex++;return v===i.length?!f&&E(g,"")||S(p,""):S(p,j(i,v)),p.length>a?d(p,0,a):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),a=null==e?void 0:h(e,t);return a?o(a,e,n,r):o(i,y(n),e,r)},function(t,n){var o=c(this),a=y(t),u=r(i,o,a,n,i!==e);if(u.done)return u.value;var s=l(o,RegExp),h=o.unicode,d=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),b=new s(O?"^(?:"+o.source+")":o,d),g=void 0===n?_:n>>>0;if(0===g)return[];if(0===a.length)return null===v(b,a)?[a]:[];for(var m=0,x=0,E=[];x<a.length;){b.lastIndex=O?0:x;var P,k=v(b,O?j(a,x):a);if(null===k||(P=w(p(b.lastIndex+(O?x:0)),a.length))===m)x=f(a,x,h);else{if(S(E,j(a,m,x)),E.length===g)return E;for(var A=1;A<=k.length-1;A++)if(S(E,k[A]),E.length===g)return E;x=m=P}}return S(E,j(a,m)),E}]}),!P,O)},5794:function(t,e,r){"use strict";var n=r(3103),o=r(1017).trim;n({target:"String",proto:!0,forced:r(9445)("trim")},{trim:function(){return o(this)}})},634:function(t,e,r){"use strict";var n=r(3103),o=r(7400),i=r(9859),a=r(5968),u=r(8270),c=r(6733),s=r(1321),l=r(3326),f=r(1787).f,p=r(7081),y=i.Symbol,h=y&&y.prototype;if(o&&c(y)&&(!("description"in h)||void 0!==y().description)){var d={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(h,this)?new y(t):void 0===t?y():y(t);return""===t&&(d[e]=!0),e};p(v,y),v.prototype=h,h.constructor=v;var b="Symbol(test)"==String(y("test")),g=a(h.toString),m=a(h.valueOf),O=/^Symbol\((.*)\)[^)]+$/,_=a("".replace),w=a("".slice);f(h,"description",{configurable:!0,get:function(){var t=m(this),e=g(t);if(u(d,t))return"";var r=b?w(e,7,-1):_(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},796:function(t,e,r){r(8423)("iterator")},4115:function(t,e,r){"use strict";var n=r(3103),o=r(9859),i=r(1333),a=r(3171),u=r(266),c=r(5968),s=r(4231),l=r(7400),f=r(3839),p=r(4229),y=r(8270),h=r(3718),d=r(6733),v=r(5052),b=r(1321),g=r(9395),m=r(1176),O=r(2991),_=r(905),w=r(9310),x=r(3326),E=r(5358),S=r(2391),j=r(5632),P=r(8151),k=r(166),A=r(894),D=r(7933),T=r(1787),M=r(9195),N=r(1909),C=r(7487),R=r(3036),I=r(4399),L=r(5977),z=r(1441),B=r(95),X=r(5391),U=r(8423),F=r(4555),H=r(6407),G=r(9996).forEach,Y=I("hidden"),V="Symbol",W=B("toPrimitive"),$=H.set,K=H.getterFor(V),Z=Object.prototype,q=o.Symbol,J=q&&q.prototype,Q=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),rt=D.f,nt=T.f,ot=k.f,it=M.f,at=c([].push),ut=R("symbols"),ct=R("op-symbols"),st=R("string-to-symbol-registry"),lt=R("symbol-to-string-registry"),ft=R("wks"),pt=!tt||!tt.prototype||!tt.prototype.findChild,yt=l&&p((function(){return 7!=S(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=rt(Z,e);n&&delete Z[e],nt(t,e,r),n&&t!==Z&&nt(Z,e,n)}:nt,ht=function(t,e){var r=ut[t]=S(J);return $(r,{type:V,tag:t,description:e}),l||(r.description=e),r},dt=function(t,e,r){t===Z&&dt(ct,e,r),m(t);var n=w(e);return m(r),y(ut,n)?(r.enumerable?(y(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=S(r,{enumerable:E(0,!1)})):(y(t,Y)||nt(t,Y,E(1,{})),t[Y][n]=!0),yt(t,n,r)):nt(t,n,r)},vt=function(t,e){m(t);var r=_(e),n=j(r).concat(Ot(r));return G(n,(function(e){l&&!u(bt,r,e)||dt(t,e,r[e])})),t},bt=function(t){var e=w(t),r=u(it,this,e);return!(this===Z&&y(ut,e)&&!y(ct,e))&&(!(r||!y(this,e)||!y(ut,e)||y(this,Y)&&this[Y][e])||r)},gt=function(t,e){var r=_(t),n=w(e);if(r!==Z||!y(ut,n)||y(ct,n)){var o=rt(r,n);return!o||!y(ut,n)||y(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},mt=function(t){var e=ot(_(t)),r=[];return G(e,(function(t){y(ut,t)||y(L,t)||at(r,t)})),r},Ot=function(t){var e=t===Z,r=ot(e?ct:_(t)),n=[];return G(r,(function(t){!y(ut,t)||e&&!y(Z,t)||at(n,ut[t])})),n};if(f||(q=function(){if(b(J,this))throw Q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?x(arguments[0]):void 0,e=z(t),r=function(t){this===Z&&u(r,ct,t),y(this,Y)&&y(this[Y],e)&&(this[Y][e]=!1),yt(this,e,E(1,t))};return l&&pt&&yt(Z,e,{configurable:!0,set:r}),ht(e,t)},C(J=q.prototype,"toString",(function(){return K(this).tag})),C(q,"withoutSetter",(function(t){return ht(z(t),t)})),M.f=bt,T.f=dt,D.f=gt,P.f=k.f=mt,A.f=Ot,X.f=function(t){return ht(B(t),t)},l&&(nt(J,"description",{configurable:!0,get:function(){return K(this).description}}),s||C(Z,"propertyIsEnumerable",bt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:q}),G(j(ft),(function(t){U(t)})),n({target:V,stat:!0,forced:!f},{for:function(t){var e=x(t);if(y(st,e))return st[e];var r=q(e);return st[e]=r,lt[r]=e,r},keyFor:function(t){if(!g(t))throw Q(t+" is not a symbol");if(y(lt,t))return lt[t]},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?S(t):vt(S(t),e)},defineProperty:dt,defineProperties:vt,getOwnPropertyDescriptor:gt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:mt,getOwnPropertySymbols:Ot}),n({target:"Object",stat:!0,forced:p((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(O(t))}}),et&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=q();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!g(t))return h(e)||(e=function(t,e){if(d(o)&&(e=u(o,this,t,e)),!g(e))return e}),n[1]=e,a(et,null,n)}}),!J[W]){var _t=J.valueOf;C(J,W,(function(t){return u(_t,this)}))}F(q,V),L[Y]=!0},1939:function(t,e,r){var n=r(9859),o=r(5694),i=r(8865),a=r(6570),u=r(5762),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(n[s]&&n[s].prototype);c(i)},6886:function(t,e,r){var n=r(9859),o=r(5694),i=r(8865),a=r(5735),u=r(5762),c=r(95),s=c("iterator"),l=c("toStringTag"),f=a.values,p=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var r in a)if(t[r]!==a[r])try{u(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var y in o)p(n[y]&&n[y].prototype,y);p(i,"DOMTokenList")},7495:function(t,e,r){var n;!function(o,i,a){if(o){for(var u,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(g(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},m.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function y(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function d(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=function(){if(!u)for(var t in u={},c)t>95&&t<112||c.hasOwnProperty(t)&&(u[c[t]]=t);return u}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function b(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),d(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function g(t,e){return null!==t&&t!==i&&(t===e||g(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(u=!1)}function s(t,r,o,i,a,u){var c,s,l,f,p=[],y=o.type;if(!e._callbacks[t])return[];for("keyup"==y&&d(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&y==s.action&&("keypress"==y&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(h||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=h(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,i,a,f,y){e._directMap[t+":"+a]=i;var d,v=(t=t.replace(/\s+/g," ")).split(" ");v.length>1?function(t,e,i,a){function s(e){return function(){u=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=h(e)),setTimeout(c,10)}n[t]=0;for(var y=0;y<e.length;++y){var d=y+1===e.length?f:s(a||b(e[y+1]).action);p(e[y],d,a,t,y)}}(t,v,i,a):(d=b(t,a),e._callbacks[d.key]=e._callbacks[d.key]||[],s(d.key,d.modifiers,{type:d.action},f,t,y),e._callbacks[d.key][f?"unshift":"push"]({callback:i,modifiers:d.modifiers,action:d.action,seq:f,level:y,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var y="keypress"==r.type&&a;r.type!=u||d(t)||y||c(i),a=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)p(t[n],e,r)},y(t,"keypress",f),y(t,"keydown",f),y(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{Arrow:function(){return jO},BaseEdge:function(){return c_},BaseEdgeModel:function(){return jf},BaseNode:function(){return Ig},BaseNodeModel:function(){return lv},BezierEdge:function(){return K_},BezierEdgeModel:function(){return qd},CircleNode:function(){return am},CircleNodeModel:function(){return _v},DiamondNode:function(){return Nm},DiamondNodeModel:function(){return Xv},EditConfigModel:function(){return is},EllipseNode:function(){return $m},EllipseNodeModel:function(){return qv},GraphModel:function(){return py},HtmlNode:function(){return yO},HtmlNodeModel:function(){return $b},Keyboard:function(){return ax},LineEdge:function(){return O_},LineEdgeModel:function(){return If},LogicFlow:function(){return vx},LogicFlowUtil:function(){return t},PolygonNode:function(){return _m},PolygonNodeModel:function(){return sb},PolylineEdge:function(){return I_},PolylineEdgeModel:function(){return $f},RectNode:function(){return $g},RectNodeModel:function(){return _b},SnaplineModel:function(){return Qb},TextNode:function(){return oO},TextNodeModel:function(){return Tb},default:function(){return gx},defaults:function(){return ld},get:function(){return ud},h:function(){return Sr},observer:function(){return bx}});var t={};r.r(t),r.d(t,{StepDrag:function(){return ry},createDrag:function(){return Lp},createUuid:function(){return Ol},refreshGraphId:function(){return _l}});var e=[];Object.freeze(e);var o={};Object.freeze(o);var i={};function a(){return"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:i}function u(){return++Ct.mobxGuid}function c(t){throw s(!1,t),"X"}function s(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is an production build."))}function l(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var f=function(){};function p(t){return null!==t&&"object"==typeof t}function y(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function h(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:r})}function v(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return p(t)&&!0===t[r]}}function b(t){return void 0!==a().Map&&t instanceof a().Map}function g(t){return t instanceof Set}function m(t){for(var e=[];;){var r=t.next();if(r.done)break;e.push(r.value)}return e}function O(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function _(t){return null===t?null:"object"==typeof t?""+t:t}function w(t,e){for(var r=t.next();!r.done;)e(r.value),r=t.next()}function x(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function E(t,e){d(t,x(),e)}function S(t){return t[x()]=P,t}function j(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function P(){return this}var k=function(){function t(t){void 0===t&&(t="Atom@"+u()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=nt.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return Xt(this)},t.prototype.reportChanged=function(){zt(),function(t){if(t.lowestObserverState!==nt.STALE){t.lowestObserverState=nt.STALE;for(var e=t.observers,r=e.length;r--;){var n=e[r];n.dependenciesState===nt.UP_TO_DATE&&(n.isTracing!==ot.NONE&&Ut(n,t),n.onBecomeStale()),n.dependenciesState=nt.STALE}}}(this),Bt()},t.prototype.toString=function(){return this.name},t}(),A=v("Atom",k);function D(t,e,r){void 0===e&&(e=f),void 0===r&&(r=f);var n=new k(t);return le("onBecomeObserved",n,e,undefined),se(n,r),n}function T(t,e){return t===e}var M={identity:T,structural:function(t,e){return cr(t,e)},default:function(t,e){return function(t,e){return"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}(t,e)||T(t,e)},shallow:function(t,e){return cr(t,e,1)}},N=function(t,e){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},N(t,e)};function C(t,e){function r(){this.constructor=t}N(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var R=function(){return R=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},R.apply(this,arguments)};function I(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function L(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(I(arguments[e]));return t}var z={},B={};function X(t,e){var r=e?z:B;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return U(this),this[t]},set:function(e){U(this),this[t]=e}})}function U(t){if(!0!==t.__mobxDidRunLazyInitializers){var e=t.__mobxDecorators;if(e)for(var r in h(t,"__mobxDidRunLazyInitializers",!0),e){var n=e[r];n.propertyCreator(t,n.prop,n.descriptor,n.decoratorTarget,n.decoratorArguments)}}}function F(t,r){return function(){var n,o=function(e,o,i,a){if(!0===a)return r(e,o,i,e,n),null;if(!Object.prototype.hasOwnProperty.call(e,"__mobxDecorators")){var u=e.__mobxDecorators;h(e,"__mobxDecorators",R({},u))}return e.__mobxDecorators[o]={prop:o,propertyCreator:r,descriptor:i,decoratorTarget:e,decoratorArguments:n},X(o,t)};return H(arguments)?(n=e,o.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),o)}}function H(t){return(2===t.length||3===t.length)&&"string"==typeof t[1]||4===t.length&&!0===t[3]}function G(t,e,r){return ve(t)?t:Array.isArray(t)?et.array(t,{name:r}):y(t)?et.object(t,void 0,{name:r}):b(t)?et.map(t,{name:r}):g(t)?et.set(t,{name:r}):t}function Y(t){return t}function V(t){s(t);var e=F(!0,(function(e,r,n,o,i){!function(t,e,r,n){var o=Je(t);if(Se(o)){var i=Pe(o,{object:t,name:e,type:"add",newValue:r});if(!i)return;r=i.newValue}r=(o.values[e]=new Pt(r,n,o.name+"."+e,!1)).value,Object.defineProperty(t,e,function(t){return Qe[t]||(Qe[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(e){this.$mobx.write(this,t,e)}})}(e)),o.keys&&o.keys.push(e),function(t,e,r,n){var o=ke(t),i=Kt(),a=o||i?{type:"add",object:e,name:r,newValue:n}:null;i&&qt(R(R({},a),{name:t.name,key:r})),o&&De(t,a),i&&Qt()}(o,t,e,r)}(e,r,n?n.initializer?n.initializer.call(e):n.value:void 0,t)})),r=("undefined"!=typeof process&&process.env,e);return r.enhancer=t,r}var W={deep:!0,name:void 0,defaultDecorator:void 0};function $(t){return null==t?W:"string"==typeof t?{name:t,deep:!0}:t}function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?Y:G}Object.freeze(W),Object.freeze({deep:!1,name:void 0,defaultDecorator:void 0});var Z=V(G),q=V((function(t,e,r){return null==t||nr(t)||He(t)||We(t)||Ze(t)?t:Array.isArray(t)?et.array(t,{name:r,deep:!1}):y(t)?et.object(t,void 0,{name:r,deep:!1}):b(t)?et.map(t,{name:r,deep:!1}):g(t)?et.set(t,{name:r,deep:!1}):c(!1)})),J=V(Y),Q=V((function(t,e,r){return cr(t,e)?e:t})),tt={box:function(t,e){arguments.length>2&&rt("box");var r=$(e);return new Pt(t,K(r),r.name,!0,r.equals)},shallowBox:function(t,e){return arguments.length>2&&rt("shallowBox"),et.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&rt("array");var r=$(e);return new Le(t,K(r),r.name)},shallowArray:function(t,e){return arguments.length>2&&rt("shallowArray"),et.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&rt("map");var r=$(e);return new Ye(t,K(r),r.name)},shallowMap:function(t,e){return arguments.length>2&&rt("shallowMap"),et.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&rt("set");var r=$(e);return new Ke(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&rt("object");var n=$(r);return fe({},t,e,n)},shallowObject:function(t,e){return"string"==typeof arguments[1]&&rt("shallowObject"),et.object(t,{},{name:e,deep:!1})},ref:J,shallow:q,deep:Z,struct:Q},et=function(t,e,r){if("string"==typeof arguments[1])return Z.apply(null,arguments);if(ve(t))return t;var n=y(t)?et.object(t,e,r):Array.isArray(t)?et.array(t,e):b(t)?et.map(t,e):g(t)?et.set(t,e):t;if(n!==t)return n;c(!1)};function rt(t){c("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(tt).forEach((function(t){return et[t]=tt[t]}));var nt,ot,it=F(!1,(function(t,e,r,n,o){var i=r.get,a=r.set,u=o[0]||{};!function(t,e,r){var n=Je(t);r.name=n.name+"."+e,r.context=t,n.values[e]=new At(r),Object.defineProperty(t,e,function(t){return tr[t]||(tr[t]={configurable:Ct.computedConfigurable,enumerable:!1,get:function(){return er(this).read(this,t)},set:function(e){er(this).write(this,t,e)}})}(e))}(t,e,R({get:i,set:a},u))})),at=it({equals:M.structural}),ut=function(t,e,r){if("string"==typeof e)return it.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return it.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new At(n)};ut.struct=at,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(nt||(nt={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(ot||(ot={}));var ct=function(t){this.cause=t};function st(t){return t instanceof ct}function lt(t){switch(t.dependenciesState){case nt.UP_TO_DATE:return!1;case nt.NOT_TRACKING:case nt.STALE:return!0;case nt.POSSIBLY_STALE:for(var e=bt(!0),r=dt(),n=t.observing,o=n.length,i=0;i<o;i++){var a=n[i];if(Dt(a)){if(Ct.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return vt(r),gt(e),!0}if(t.dependenciesState===nt.STALE)return vt(r),gt(e),!0}}return mt(t),vt(r),gt(e),!1}}function ft(t){var e=t.observers.length>0;Ct.computationDepth>0&&e&&c(!1),Ct.allowStateChanges||!e&&"strict"!==Ct.enforceActions||c(!1)}function pt(t,e,r){var n=bt(!0);mt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ct.runId;var o,i=Ct.trackingDerivation;if(Ct.trackingDerivation=t,!0===Ct.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new ct(t)}return Ct.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=nt.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;a<i;a++)0===(u=r[a]).diffValue&&(u.diffValue=1,o!==a&&(r[o]=u),o++),u.dependenciesState>n&&(n=u.dependenciesState);for(r.length=o,t.newObserving=null,i=e.length;i--;)0===(u=e[i]).diffValue&&It(u,t),u.diffValue=0;for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,Rt(u,t))}n!==nt.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),t.observing.length,gt(n),o}function yt(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)It(e[r],t);t.dependenciesState=nt.NOT_TRACKING}function ht(t){var e=dt(),r=t();return vt(e),r}function dt(){var t=Ct.trackingDerivation;return Ct.trackingDerivation=null,t}function vt(t){Ct.trackingDerivation=t}function bt(t){var e=Ct.allowStateReads;return Ct.allowStateReads=t,e}function gt(t){Ct.allowStateReads=t}function mt(t){if(t.dependenciesState!==nt.UP_TO_DATE){t.dependenciesState=nt.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=nt.UP_TO_DATE}}var Ot=0,_t=1,wt=Object.getOwnPropertyDescriptor((function(){}),"name");function xt(t,e){var r=function(){return Et(t,e,this,arguments)};return r.isMobxAction=!0,r}function Et(t,e,r,n){var o=function(t,e,r){var n=Kt()&&!!t,o=0;if(n){o=Date.now();var i=r&&r.length||0,a=new Array(i);if(i>0)for(var u=0;u<i;u++)a[u]=r[u];qt({type:"action",name:t,object:e,arguments:a})}var c=dt();zt();var s={prevDerivation:c,prevAllowStateChanges:St(!0),prevAllowStateReads:bt(!0),notifySpy:n,startTime:o,actionId:_t++,parentActionId:Ot};return Ot=s.actionId,s}(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{!function(t){Ot!==t.actionId&&c("invalid action stack. did you forget to finish an action?"),Ot=t.parentActionId,void 0!==t.error&&(Ct.suppressReactionErrors=!0),jt(t.prevAllowStateChanges),gt(t.prevAllowStateReads),Bt(),vt(t.prevDerivation),t.notifySpy&&Qt({time:Date.now()-t.startTime}),Ct.suppressReactionErrors=!1}(o)}}function St(t){var e=Ct.allowStateChanges;return Ct.allowStateChanges=t,e}function jt(t){Ct.allowStateChanges=t}wt&&wt.configurable;var Pt=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+u()),void 0===o&&(o=!0),void 0===i&&(i=M.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),o&&Kt()&&Zt({type:"create",name:a.name,newValue:""+a.value}),a}return C(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){var e=this.value;if((t=this.prepareNewValue(t))!==Ct.UNCHANGED){var r=Kt();r&&qt({type:"update",name:this.name,newValue:t,oldValue:e}),this.setNewValue(t),r&&Qt()}},e.prototype.prepareNewValue=function(t){if(ft(this),Se(this)){var e=Pe(this,{object:this,type:"update",newValue:t});if(!e)return Ct.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Ct.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),ke(this)&&De(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return je(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ae(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return _(this.get())},e}(k);Pt.prototype[O()]=Pt.prototype.valueOf;var kt=v("ObservableValue",Pt),At=function(){function t(t){this.dependenciesState=nt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=nt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+u(),this.value=new ct(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ot.NONE,s(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+u(),t.set&&(this.setter=xt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?M.structural:M.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState===nt.UP_TO_DATE){t.lowestObserverState=nt.POSSIBLY_STALE;for(var e=t.observers,r=e.length;r--;){var n=e[r];n.dependenciesState===nt.UP_TO_DATE&&(n.dependenciesState=nt.POSSIBLY_STALE,n.isTracing!==ot.NONE&&Ut(n,t),n.onBecomeStale())}}}(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&c("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ct.inBatch||0!==this.observers.length||this.keepAlive?(Xt(this),lt(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState!==nt.STALE){t.lowestObserverState=nt.STALE;for(var e=t.observers,r=e.length;r--;){var n=e[r];n.dependenciesState===nt.POSSIBLY_STALE?n.dependenciesState=nt.STALE:n.dependenciesState===nt.UP_TO_DATE&&(t.lowestObserverState=nt.UP_TO_DATE)}}}(this)):lt(this)&&(this.warnAboutUntrackedRead(),zt(),this.value=this.computeValue(!1),Bt());var t=this.value;if(st(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(st(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){s(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else s(!1,!1)},t.prototype.trackAndCompute=function(){Kt()&&Zt({object:this.scope,type:"compute",name:this.name});var t=this.value,e=this.dependenciesState===nt.NOT_TRACKING,r=this.computeValue(!0),n=e||st(t)||st(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Ct.computationDepth++,t)e=pt(this,this.derivation,this.scope);else if(!0===Ct.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new ct(t)}return Ct.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(yt(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,i=void 0;return function(t,e){void 0===e&&(e=o);var r,n=e&&e.name||t.name||"Autorun@"+u();if(e.scheduler||e.delay){var i=ue(e),a=!1;r=new Ht(n,(function(){a||(a=!0,i((function(){a=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}else r=new Ht(n,(function(){this.track(c)}),e.onError,e.requiresObservable);function c(){t(r)}return r.schedule(),r.getDisposer()}((function(){var o=r.get();if(!n||e){var a=dt();t({type:"update",object:r,newValue:o,oldValue:i}),vt(a)}n=!1,i=o}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return _(this.get())},t}();At.prototype[O()]=At.prototype.valueOf;var Dt=v("ComputedValue",At),Tt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Mt=!0,Nt=!1,Ct=function(){var t=a();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Mt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Tt).version&&(Mt=!1),Mt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Tt):(setTimeout((function(){Nt||c("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Tt)}();function Rt(t,e){var r=t.observers.length;r&&(t.observersIndexes[e.__mapid]=r),t.observers[r]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function It(t,e){if(1===t.observers.length)t.observers.length=0,Lt(t);else{var r=t.observers,n=t.observersIndexes,o=r.pop();if(o!==e){var i=n[e.__mapid]||0;i?n[o.__mapid]=i:delete n[o.__mapid],r[i]=o}delete n[e.__mapid]}}function Lt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Ct.pendingUnobservations.push(t))}function zt(){Ct.inBatch++}function Bt(){if(0==--Ct.inBatch){Yt();for(var t=Ct.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.length&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof At&&r.suspend())}Ct.pendingUnobservations=[]}}function Xt(t){var e=Ct.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.length&&Ct.inBatch>0&&Lt(t),!1)}function Ut(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===ot.BREAK){var r=[];Ft(pe(or(t,void 0)),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof At?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function Ft(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ft(t,e,r+1)})))}var Ht=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+u()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=nt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+u(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ot.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ct.pendingReactions.push(this),Yt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(zt(),this._isScheduled=!1,lt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Kt()&&Zt({name:this.name,type:"scheduled-reaction"})}catch(t){this.reportExceptionInDerivation(t)}}Bt()}},t.prototype.track=function(t){zt();var e,r=Kt();r&&(e=Date.now(),qt({name:this.name,type:"reaction"})),this._isRunning=!0;var n=pt(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&yt(this),st(n)&&this.reportExceptionInDerivation(n.cause),r&&Qt({time:Date.now()-e}),Bt()},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Ct.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ct.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),Kt()&&Zt({type:"error",name:this.name,message:r,error:""+t}),Ct.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(zt(),yt(this),Bt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t.$mobx=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=xe(t);if(!n)return c(!1);n.isTracing===ot.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?ot.BREAK:ot.LOG}(this,t)},t}(),Gt=function(t){return t()};function Yt(){Ct.inBatch>0||Ct.isRunningReactions||Gt(Vt)}function Vt(){Ct.isRunningReactions=!0;for(var t=Ct.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Ct.isRunningReactions=!1}var Wt=v("Reaction",Ht);function $t(t){var e=Gt;Gt=function(r){return t((function(){return e(r)}))}}function Kt(){return!!Ct.spyListeners.length}function Zt(t){if(Ct.spyListeners.length)for(var e=Ct.spyListeners,r=0,n=e.length;r<n;r++)e[r](t)}function qt(t){Zt(R(R({},t),{spyReportStart:!0}))}var Jt={spyReportEnd:!0};function Qt(t){Zt(t?R(R({},t),{spyReportEnd:!0}):Jt)}function te(t){return Ct.spyListeners.push(t),l((function(){Ct.spyListeners=Ct.spyListeners.filter((function(e){return e!==t}))}))}function ee(){c(!1)}function re(t){return function(e,r,n){if(n){if(n.value)return{value:xt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return xt(t,o.call(this))}}}return ne(t).apply(this,arguments)}}function ne(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){h(this,r,oe(t,e))}})}}var oe=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?xt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?xt(t,e):1===arguments.length&&"string"==typeof t?re(t):!0!==n?re(e).apply(null,arguments):void(t[e]=xt(t.name||e,r.value))};function ie(t,e,r){h(t,e,xt(e,r.bind(t)))}oe.bound=function(t,e,r,n){return!0===n?(ie(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return ie(this,e,r.value||r.initializer.call(this)),this[e]},set:ee}:{enumerable:!1,configurable:!0,set:function(t){ie(this,e,t)},get:function(){}}};var ae=function(t){return t()};function ue(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ae}function ce(t,e,r){void 0===r&&(r=o),"boolean"==typeof r&&(r={fireImmediately:r});var n,i,a,c=r.name||"Reaction@"+u(),s=oe(c,r.onError?(n=r.onError,i=e,function(){try{return i.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ue(r),p=!0,y=!1,h=r.compareStructural?M.structural:r.equals||M.default,d=new Ht(c,(function(){p||l?v():y||(y=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(y=!1,!d.isDisposed){var e=!1;d.track((function(){var r=t(d);e=p||!h(a,r),a=r})),p&&r.fireImmediately&&s(a,d),p||!0!==e||s(a,d),p&&(p=!1)}}return d.schedule(),d.getDisposer()}function se(t,e,r){return le("onBecomeUnobserved",t,e,r)}function le(t,e,r,n){var o="function"==typeof n?or(e,r):or(e),i="function"==typeof n?n:r,a=o[t];return"function"!=typeof a?c(!1):(o[t]=function(){a.call(this),i.call(this)},function(){o[t]=a})}function fe(t,e,r,n){var o=(n=$(n)).defaultDecorator||(!1===n.deep?J:Z);U(t),Je(t,n.name,o.enhancer),zt();try{for(var i=Object.getOwnPropertyNames(e),a=0,u=i.length;a<u;a++){var c=i[a],s=Object.getOwnPropertyDescriptor(e,c),l=(r&&c in r?r[c]:s.get?it:o)(t,c,s,!0);l&&Object.defineProperty(t,c,l)}}finally{Bt()}return t}function pe(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(pe)),n}function ye(t,e){if(null==t)return!1;if(void 0!==e){if(!1===nr(t))return!1;if(!t.$mobx.values[e])return!1;var r=or(t,e);return Dt(r)}return Dt(t)}function he(t,e){return"string"!=typeof e?c(!1):ye(t,e)}function de(t,e){if(null==t)return!1;if(void 0!==e){if(nr(t)){var r=t.$mobx;return r.values&&!!r.values[e]}return!1}return nr(t)||!!t.$mobx||A(t)||Wt(t)||Dt(t)}function ve(t){return 1!==arguments.length&&c(!1),de(t)}function be(t){return nr(t)?t.$mobx.getKeys():We(t)||Ze(t)?m(t.keys()):He(t)?t.map((function(t,e){return e})):c(!1)}function ge(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return ir(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return ir(t).observe(e,r)}(t,e,r)}Object.create(Error.prototype);var me={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Oe(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function _e(t,e,r){if(!e.recurseEverything&&!ve(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(kt(t))return _e(t.get(),e,r);if(ve(t)&&be(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(He(t)||Array.isArray(t)){var n=Oe(r,t,[],e),o=t.map((function(t){return _e(t,e,r)}));n.length=o.length;for(var i=0,a=o.length;i<a;i++)n[i]=o[i];return n}if(Ze(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var u=Oe(r,t,new Set,e);return t.forEach((function(t){u.add(_e(t,e,r))})),u}var c=Oe(r,t,[],e);return t.forEach((function(t){c.push(_e(t,e,r))})),c}if(We(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var s=Oe(r,t,new Map,e);return t.forEach((function(t,n){s.set(n,_e(t,e,r))})),s}var l=Oe(r,t,{},e);return t.forEach((function(t,n){l[n]=_e(t,e,r)})),l}var f=Oe(r,t,{},e);for(var p in t)f[p]=_e(t[p],e,r);return f}function we(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=me),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),_e(t,e,r)}function xe(t){switch(t.length){case 0:return Ct.trackingDerivation;case 1:return or(t[0]);case 2:return or(t[0],t[1])}}function Ee(t,e){void 0===e&&(e=void 0),zt();try{return t.apply(e)}finally{Bt()}}function Se(t){return void 0!==t.interceptors&&t.interceptors.length>0}function je(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),l((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Pe(t,e){var r=dt();try{var n=t.interceptors;if(n)for(var o=0,i=n.length;o<i&&(s(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{vt(r)}}function ke(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Ae(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),l((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function De(t,e){var r=dt(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);vt(r)}}var Te,Me,Ne=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,!1===t}(),Ce=0,Re=function(){};Te=Re,Me=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(Te.prototype,Me):void 0!==Te.prototype.__proto__?Te.prototype.__proto__=Me:Te.prototype=Me,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(t){Object.defineProperty(Re.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})}));var Ie=function(){function t(t,e,r,n){this.array=r,this.owned=n,this.values=[],this.lastKnownLength=0,this.atom=new k(t||"ObservableArray@"+u()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return je(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ae(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>Ce&&Ue(t+e+1)},t.prototype.spliceWithArray=function(t,r,n){var o=this;ft(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),r=1===arguments.length?i-t:null==r?0:Math.max(0,Math.min(r,i-t)),void 0===n&&(n=e),Se(this)){var a=Pe(this,{object:this.array,type:"splice",index:t,removedCount:r,added:n});if(!a)return e;r=a.removedCount,n=a.added}n=0===n.length?n:n.map((function(t){return o.enhancer(t,void 0)}));var u=n.length-r;this.updateArrayLength(i,u);var c=this.spliceItemsIntoValues(t,r,n);return 0===r&&0===n.length||this.notifyArraySplice(t,n,c),this.dehanceValues(c)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,L([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&Kt(),o=ke(this),i=o||n?{object:this.array,type:"update",index:t,newValue:e,oldValue:r}:null;n&&qt(R(R({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&De(this,i),n&&Qt()},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&Kt(),o=ke(this),i=o||n?{object:this.array,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;n&&qt(R(R({},i),{name:this.atom.name})),this.atom.reportChanged(),o&&De(this,i),n&&Qt()},t}(),Le=function(t){function e(e,r,n,o){void 0===n&&(n="ObservableArray@"+u()),void 0===o&&(o=!1);var i=t.call(this)||this,a=new Ie(n,r,i,o);if(d(i,"$mobx",a),e&&e.length){var c=St(!0);i.spliceWithArray(0,0,e),jt(c)}return Ne&&Object.defineProperty(a.array,"0",ze),i}return C(e,t),e.prototype.intercept=function(t){return this.$mobx.intercept(t)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),t.map((function(t){return He(t)?t.peek():t})))},e.prototype.replace=function(t){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,t)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(t,e,r){void 0===r&&(r=0);var n=this.findIndex.apply(this,arguments);return-1===n?void 0:this.get(n)},e.prototype.findIndex=function(t,e,r){void 0===r&&(r=0);for(var n=this.peek(),o=n.length,i=r;i<o;i++)if(t.call(e,n[i],i,this))return i;return-1},e.prototype.splice=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,e)}return this.$mobx.spliceWithArray(t,e,r)},e.prototype.spliceWithArray=function(t,e,r){return this.$mobx.spliceWithArray(t,e,r)},e.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,t),r.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this.$mobx;return r.spliceWithArray(0,0,t),r.values.length},e.prototype.reverse=function(){var t=this.slice();return t.reverse.apply(t,arguments)},e.prototype.sort=function(t){var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.dehanceValues(this.$mobx.values).indexOf(t);return e>-1&&(this.splice(e,1),!0)},e.prototype.move=function(t,e){function r(t){if(t<0)throw new Error("[mobx.array] Index out of bounds: "+t+" is negative");var e=this.$mobx.values.length;if(t>=e)throw new Error("[mobx.array] Index out of bounds: "+t+" is not smaller than "+e)}if(r.call(this,t),r.call(this,e),t!==e){var n,o=this.$mobx.values;n=t<e?L(o.slice(0,t),o.slice(t+1,e+1),[o[t]],o.slice(e+1)):L(o.slice(0,e),[o[t]],o.slice(e,t),o.slice(t+1)),this.replace(n)}},e.prototype.get=function(t){var e=this.$mobx;if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(t,e){var r=this.$mobx,n=r.values;if(t<n.length){ft(r.atom);var o=n[t];if(Se(r)){var i=Pe(r,{type:"update",object:this,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}},e}(Re);E(Le.prototype,(function(){this.$mobx.atom.reportObserved();var t=this,e=0;return S({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})})),Object.defineProperty(Le.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}}),h(Le.prototype,j(),"Array"),["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){var e=Array.prototype[t];s("function"==typeof e,"Base function not defined on Array prototype: '"+t+"'"),h(Le.prototype,t,(function(){return e.apply(this.peek(),arguments)}))})),["every","filter","forEach","map","some"].forEach((function(t){s("function"==typeof Array.prototype[t],"Base function not defined on Array prototype: '"+t+"'"),h(Le.prototype,t,(function(e,r){var n=this,o=this.$mobx;return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)}))})),["reduce","reduceRight"].forEach((function(t){h(Le.prototype,t,(function(){var e=this,r=this.$mobx;r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}))})),function(t,e){for(var r=0;r<e.length;r++)h(t,e[r],t[e[r]])}(Le.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var ze=Be(0);function Be(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function Xe(t){Object.defineProperty(Le.prototype,""+t,Be(t))}function Ue(t){for(var e=Ce;e<t;e++)Xe(e);Ce=t}Ue(1e3);var Fe=v("ObservableArrayAdministration",Ie);function He(t){return p(t)&&Fe(t.$mobx)}var Ge={},Ye=function(){function t(t,e,r){if(void 0===e&&(e=G),void 0===r&&(r="ObservableMap@"+u()),this.enhancer=e,this.name=r,this.$mobx=Ge,this._keysAtom=D(this.name+".keys()"),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Ct.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new Pt(this._has(t),Y,this.name+"."+Ve(t)+"?",!1);this._hasMap.set(t,n),se(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Se(this)){var n=Pe(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if(ft(this._keysAtom),Se(this)&&!(o=Pe(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Kt(),n=ke(this),o=n||r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return r&&qt(R(R({},o),{name:this.name,key:t})),Ee((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),n&&De(this,o),r&&Qt(),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Ct.UNCHANGED){var n=Kt(),o=ke(this),i=o||n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n&&qt(R(R({},i),{name:this.name,key:t})),r.setNewValue(e),o&&De(this,i),n&&Qt()}},t.prototype._addValue=function(t,e){var r=this;ft(this._keysAtom),Ee((function(){var n=new Pt(e,r.enhancer,r.name+"."+Ve(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=Kt(),o=ke(this),i=o||n?{type:"add",object:this,name:t,newValue:e}:null;n&&qt(R(R({},i),{name:this.name,key:t})),o&&De(this,i),n&&Qt()},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return S({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return S({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype.forEach=function(t,e){var r=this;this._keysAtom.reportObserved(),this._data.forEach((function(n,o){return t.call(e,r.get(o),o,r)}))},t.prototype.merge=function(t){var e=this;return We(t)&&(t=t.toJS()),Ee((function(){var r=St(!0);try{y(t)?Object.keys(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=I(t,2),n=r[0],o=r[1];return e.set(n,o)})):b(t)?t.constructor!==Map?c("Cannot initialize from classes that inherit from Map: "+t.constructor.name):t.forEach((function(t,r){return e.set(r,t)})):null!=t&&c("Cannot initialize map from "+t)}finally{jt(r)}})),this},t.prototype.clear=function(){var t=this;Ee((function(){ht((function(){t._data.forEach((function(e,r){return t.delete(r)}))}))}))},t.prototype.replace=function(t){var e=this;return Ee((function(){var r=function(t){if(b(t)||We(t))return t;if(Array.isArray(t))return new Map(t);if(y(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return c("Cannot convert to map from '"+t+"'")}(t),n=new Map,o=!1;if(w(e._data.keys(),(function(t){if(!r.has(t))if(e.delete(t))o=!0;else{var i=e._data.get(t);n.set(t,i)}})),w(r.entries(),(function(t){var r=I(t,2),i=r[0],a=r[1],u=e._data.has(i);if(e.set(i,a),e._data.has(i)){var c=e._data.get(i);n.set(i,c),u||(o=!0)}})),!o)if(e._data.size!==n.size)e._keysAtom.reportChanged();else for(var i=e._data.keys(),a=n.keys(),u=i.next(),s=a.next();!u.done;){if(u.value!==s.value){e._keysAtom.reportChanged();break}u=i.next(),s=a.next()}e._data=n})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t=this,e={};return this.forEach((function(r,n){return e["symbol"==typeof n?n:Ve(n)]=t.get(n)})),e},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+m(this.keys()).map((function(e){return Ve(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Ae(this,t)},t.prototype.intercept=function(t){return je(this,t)},t}();function Ve(t){return t&&t.toString?t.toString():new String(t).toString()}E(Ye.prototype,(function(){return this.entries()})),d(Ye.prototype,j(),"Map");var We=v("ObservableMap",Ye),$e={},Ke=function(){function t(t,e,r){if(void 0===e&&(e=G),void 0===r&&(r="ObservableSet@"+u()),this.name=r,this.$mobx=$e,this._data=new Set,this._atom=D(this.name),"function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Ee((function(){ht((function(){t._data.forEach((function(e){t.delete(e)}))}))}))},t.prototype.forEach=function(t,e){var r=this;this._atom.reportObserved(),this._data.forEach((function(n){t.call(e,n,n,r)}))},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if(ft(this._atom),Se(this)&&!(o=Pe(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Ee((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=Kt(),n=ke(this),o=n||r?{type:"add",object:this,newValue:t}:null;n&&De(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Se(this)&&!(o=Pe(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Kt(),n=ke(this),o=n||r?{type:"delete",object:this,oldValue:t}:null;return Ee((function(){e._atom.reportChanged(),e._data.delete(t)})),n&&De(this,o),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=m(this.keys()),r=m(this.values());return S({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t,e=this,r=0;return void 0!==this._data.values?t=m(this._data.values()):(t=[],this._data.forEach((function(e){return t.push(e)}))),S({next:function(){return r<t.length?{value:e.dehanceValue(t[r++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return Ze(t)&&(t=t.toJS()),Ee((function(){var r=St(!0);try{Array.isArray(t)||g(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&c("Cannot initialize set from "+t)}finally{jt(r)}})),this},t.prototype.observe=function(t,e){return Ae(this,t)},t.prototype.intercept=function(t){return je(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+m(this.keys()).join(", ")+" ]"},t}();E(Ke.prototype,(function(){return this.values()})),d(Ke.prototype,j(),"Set");var Ze=v("ObservableSet",Ke),qe=function(){function t(t,e,r){this.target=t,this.name=e,this.defaultEnhancer=r,this.values={}}return t.prototype.read=function(t,e){if(this.target===t||(this.illegalAccess(t,e),this.values[e]))return this.values[e].get()},t.prototype.write=function(t,e,r){var n=this.target;n!==t&&this.illegalAccess(t,e);var o=this.values[e];if(o instanceof At)o.set(r);else{if(Se(this)){if(!(u=Pe(this,{type:"update",object:n,name:e,newValue:r})))return;r=u.newValue}if((r=o.prepareNewValue(r))!==Ct.UNCHANGED){var i=ke(this),a=Kt(),u=i||a?{type:"update",object:n,oldValue:o.value,name:e,newValue:r}:null;a&&qt(R(R({},u),{name:this.name,key:e})),o.setNewValue(r),i&&De(this,u),a&&Qt()}}},t.prototype.remove=function(t){if(this.values[t]){var e=this.target;if(Se(this)&&!(i=Pe(this,{object:e,name:t,type:"remove"})))return;try{zt();var r=ke(this),n=Kt(),o=this.values[t].get();this.keys&&this.keys.remove(t),delete this.values[t],delete this.target[t];var i=r||n?{type:"remove",object:e,oldValue:o,name:t}:null;n&&qt(R(R({},i),{name:this.name,key:t})),r&&De(this,i),n&&Qt()}finally{Bt()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Ae(this,t)},t.prototype.intercept=function(t){return je(this,t)},t.prototype.getKeys=function(){var t=this;return void 0===this.keys&&(this.keys=new Le(Object.keys(this.values).filter((function(e){return t.values[e]instanceof Pt})),Y,"keys("+this.name+")",!0)),this.keys.slice()},t}();function Je(t,e,r){void 0===e&&(e=""),void 0===r&&(r=G);var n=t.$mobx;return n||(y(t)||(e=(t.constructor.name||"ObservableObject")+"@"+u()),e||(e="ObservableObject@"+u()),d(t,"$mobx",n=new qe(t,e,r)),n)}var Qe=Object.create(null),tr=Object.create(null);function er(t){return t.$mobx||(U(t),t.$mobx)}var rr=v("ObservableObjectAdministration",qe);function nr(t){return!!p(t)&&(U(t),rr(t.$mobx))}function or(t,e){if("object"==typeof t&&null!==t){if(He(t))return void 0!==e&&c(!1),t.$mobx.atom;if(Ze(t))return t.$mobx;if(We(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||c(!1),n)}var n;if(U(t),e&&!t.$mobx&&t[e],nr(t))return e?((n=t.$mobx.values[e])||c(!1),n):c(!1);if(A(t)||Dt(t)||Wt(t))return t}else if("function"==typeof t&&Wt(t.$mobx))return t.$mobx;return c(!1)}function ir(t,e){return t||c("Expecting some object"),void 0!==e?ir(or(t,e)):A(t)||Dt(t)||Wt(t)||We(t)||Ze(t)?t:(U(t),t.$mobx?t.$mobx:void c(!1))}function ar(t,e){return(void 0!==e?or(t,e):nr(t)||We(t)||Ze(t)?ir(t):or(t)).name}var ur=Object.prototype.toString;function cr(t,e,r){return void 0===r&&(r=-1),sr(t,e,r)}function sr(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;t=lr(t),e=lr(e);var a=ur.call(t);if(a!==ur.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e)}var u="[object Array]"===a;if(!u){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,s=e.constructor;if(c!==s&&!("function"==typeof c&&c instanceof c&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return o[l]===e;if(n.push(t),o.push(e),u){if((l=t.length)!==e.length)return!1;for(;l--;)if(!sr(t[l],e[l],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(l=f.length,Object.keys(e).length!==l)return!1;for(;l--;)if(!fr(e,p=f[l])||!sr(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function lr(t){return He(t)?t.peek():b(t)||We(t)||g(t)||Ze(t)?m(t.entries()):t}function fr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var pr="$mobx";"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:te,extras:{getDebugName:ar},$mobx:pr});var yr,hr,dr,vr,br,gr,mr,Or={},_r=[],wr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function xr(t,e){for(var r in e)t[r]=e[r];return t}function Er(t){var e=t.parentNode;e&&e.removeChild(t)}function Sr(t,e,r){var n,o,i,a={};for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:a[i]=e[i];if(arguments.length>2&&(a.children=arguments.length>3?yr.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===a[i]&&(a[i]=t.defaultProps[i]);return jr(t,a,n,o,null)}function jr(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++dr:o};return null==o&&null!=hr.vnode&&hr.vnode(i),i}function Pr(t){return t.children}function kr(t,e){this.props=t,this.context=e}function Ar(t,e){if(null==e)return t.__?Ar(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?Ar(t):null}function Dr(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return Dr(t)}}function Tr(t){(!t.__d&&(t.__d=!0)&&vr.push(t)&&!Mr.__r++||gr!==hr.debounceRendering)&&((gr=hr.debounceRendering)||br)(Mr)}function Mr(){for(var t;Mr.__r=vr.length;)t=vr.sort((function(t,e){return t.__v.__b-e.__v.__b})),vr=[],t.some((function(t){var e,r,n,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=xr({},o)).__v=o.__v+1,Ur(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?Ar(o):i,o.__h),Fr(r,o),o.__e!=i&&Dr(o)))}))}function Nr(t,e,r,n,o,i,a,u,c,s){var l,f,p,y,h,d,v,b=n&&n.__k||_r,g=b.length;for(r.__k=[],l=0;l<e.length;l++)if(null!=(y=r.__k[l]=null==(y=e[l])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?jr(null,y,null,null,y):Array.isArray(y)?jr(Pr,{children:y},null,null,null):y.__b>0?jr(y.type,y.props,y.key,null,y.__v):y)){if(y.__=r,y.__b=r.__b+1,null===(p=b[l])||p&&y.key==p.key&&y.type===p.type)b[l]=void 0;else for(f=0;f<g;f++){if((p=b[f])&&y.key==p.key&&y.type===p.type){b[f]=void 0;break}p=null}Ur(t,y,p=p||Or,o,i,a,u,c,s),h=y.__e,(f=y.ref)&&p.ref!=f&&(v||(v=[]),p.ref&&v.push(p.ref,null,y),v.push(f,y.__c||h,y)),null!=h?(null==d&&(d=h),"function"==typeof y.type&&y.__k===p.__k?y.__d=c=Cr(y,c,t):c=Ir(t,y,p,b,h,c),"function"==typeof r.type&&(r.__d=c)):c&&p.__e==c&&c.parentNode!=t&&(c=Ar(p))}for(r.__e=d,l=g;l--;)null!=b[l]&&("function"==typeof r.type&&null!=b[l].__e&&b[l].__e==r.__d&&(r.__d=Ar(n,l+1)),Yr(b[l],b[l]));if(v)for(l=0;l<v.length;l++)Gr(v[l],v[++l],v[++l])}function Cr(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?Cr(n,e,r):Ir(r,n,n,o,n.__e,e));return e}function Rr(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){Rr(t,e)})):e.push(t)),e}function Ir(t,e,r,n,o,i){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==r||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<n.length;c+=2)if(u==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function Lr(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||wr.test(e)?r:r+"px"}function zr(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||Lr(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||Lr(t.style,e,r[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?Xr:Br,i):t.removeEventListener(e,i?Xr:Br,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function Br(t){this.l[t.type+!1](hr.event?hr.event(t):t)}function Xr(t){this.l[t.type+!0](hr.event?hr.event(t):t)}function Ur(t,e,r,n,o,i,a,u,c){var s,l,f,p,y,h,d,v,b,g,m,O=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(c=r.__h,u=e.__e=r.__e,e.__h=null,i=[u]),(s=hr.__b)&&s(e);try{t:if("function"==typeof O){if(v=e.props,b=(s=O.contextType)&&n[s.__c],g=s?b?b.props.value:s.__:n,r.__c?d=(l=e.__c=r.__c).__=l.__E:("prototype"in O&&O.prototype.render?e.__c=l=new O(v,g):(e.__c=l=new kr(v,g),l.constructor=O,l.render=Vr),b&&b.sub(l),l.props=v,l.state||(l.state={}),l.context=g,l.__n=n,f=l.__d=!0,l.__h=[]),null==l.__s&&(l.__s=l.state),null!=O.getDerivedStateFromProps&&(l.__s==l.state&&(l.__s=xr({},l.__s)),xr(l.__s,O.getDerivedStateFromProps(v,l.__s))),p=l.props,y=l.state,f)null==O.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&l.__h.push(l.componentDidMount);else{if(null==O.getDerivedStateFromProps&&v!==p&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(v,g),!l.__e&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(v,l.__s,g)||e.__v===r.__v){l.props=v,l.state=l.__s,e.__v!==r.__v&&(l.__d=!1),l.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),l.__h.length&&a.push(l);break t}null!=l.componentWillUpdate&&l.componentWillUpdate(v,l.__s,g),null!=l.componentDidUpdate&&l.__h.push((function(){l.componentDidUpdate(p,y,h)}))}l.context=g,l.props=v,l.state=l.__s,(s=hr.__r)&&s(e),l.__d=!1,l.__v=e,l.__P=t,s=l.render(l.props,l.state,l.context),l.state=l.__s,null!=l.getChildContext&&(n=xr(xr({},n),l.getChildContext())),f||null==l.getSnapshotBeforeUpdate||(h=l.getSnapshotBeforeUpdate(p,y)),m=null!=s&&s.type===Pr&&null==s.key?s.props.children:s,Nr(t,Array.isArray(m)?m:[m],e,r,n,o,i,a,u,c),l.base=e.__e,e.__h=null,l.__h.length&&a.push(l),d&&(l.__E=l.__=null),l.__e=!1}else null==i&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=Hr(r.__e,e,r,n,o,i,a,c);(s=hr.diffed)&&s(e)}catch(t){e.__v=null,(c||null!=i)&&(e.__e=u,e.__h=!!c,i[i.indexOf(u)]=null),hr.__e(t,e,r)}}function Fr(t,e){hr.__c&&hr.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){hr.__e(t,e.__v)}}))}function Hr(t,e,r,n,o,i,a,u){var c,s,l,f=r.props,p=e.props,y=e.type,h=0;if("svg"===y&&(o=!0),null!=i)for(;h<i.length;h++)if((c=i[h])&&"setAttribute"in c==!!y&&(y?c.localName===y:3===c.nodeType)){t=c,i[h]=null;break}if(null==t){if(null===y)return document.createTextNode(p);t=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,p.is&&p),i=null,u=!1}if(null===y)f===p||u&&t.data===p||(t.data=p);else{if(i=i&&yr.call(t.childNodes),s=(f=r.props||Or).dangerouslySetInnerHTML,l=p.dangerouslySetInnerHTML,!u){if(null!=i)for(f={},h=0;h<t.attributes.length;h++)f[t.attributes[h].name]=t.attributes[h].value;(l||s)&&(l&&(s&&l.__html==s.__html||l.__html===t.innerHTML)||(t.innerHTML=l&&l.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||zr(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||zr(t,i,e[i],r[i],n)}(t,p,f,o,u),l)e.__k=[];else if(h=e.props.children,Nr(t,Array.isArray(h)?h:[h],e,r,n,o&&"foreignObject"!==y,i,a,i?i[0]:r.__k&&Ar(r,0),u),null!=i)for(h=i.length;h--;)null!=i[h]&&Er(i[h]);u||("value"in p&&void 0!==(h=p.value)&&(h!==f.value||h!==t.value||"progress"===y&&!h)&&zr(t,"value",h,f.value,!1),"checked"in p&&void 0!==(h=p.checked)&&h!==t.checked&&zr(t,"checked",h,f.checked,!1))}return t}function Gr(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){hr.__e(t,r)}}function Yr(t,e,r){var n,o;if(hr.unmount&&hr.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Gr(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){hr.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Yr(n[o],e,"function"!=typeof t.type);r||null==t.__e||Er(t.__e),t.__e=t.__d=void 0}function Vr(t,e,r){return this.constructor(t,r)}function Wr(t,e,r){var n,o,i;hr.__&&hr.__(t,e),o=(n="function"==typeof r)?null:r&&r.__k||e.__k,i=[],Ur(e,t=(!n&&r||e).__k=Sr(Pr,null,[t]),o||Or,Or,void 0!==e.ownerSVGElement,!n&&r?[r]:o?null:e.firstChild?yr.call(e.childNodes):null,i,!n&&r?r:o?o.__e:e.firstChild,n),Fr(i,t)}function $r(t,e){Wr(t,e,$r)}function Kr(t,e,r){var n,o,i,a=xr({},t.props);for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:a[i]=e[i];return arguments.length>2&&(a.children=arguments.length>3?yr.call(arguments,2):r),jr(t.type,a,n||t.key,o||t.ref,null)}yr=_r.slice,hr={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},dr=0,kr.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=xr({},this.state),"function"==typeof t&&(t=t(xr({},r),this.props)),t&&xr(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),Tr(this))},kr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Tr(this))},kr.prototype.render=Pr,vr=[],br="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Mr.__r=0,mr=0;var Zr,qr,Jr,Qr=0,tn=[],en=hr.__b,rn=hr.__r,nn=hr.diffed,on=hr.__c,an=hr.unmount;function un(t,e){hr.__h&&hr.__h(qr,t,Qr||e),Qr=0;var r=qr.__H||(qr.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function cn(t,e,r){var n=un(Zr++,2);return n.t=t,n.__c||(n.__=[r?r(e):vn(void 0,e),function(t){var e=n.t(n.__[0],t);n.__[0]!==e&&(n.__=[e,n.__[1]],n.__c.setState({}))}],n.__c=qr),n.__}function sn(t,e){var r=un(Zr++,4);!hr.__s&&dn(r.__H,e)&&(r.__=t,r.__H=e,qr.__h.push(r))}function ln(t,e){var r=un(Zr++,7);return dn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function fn(){tn.forEach((function(t){if(t.__P)try{t.__H.__h.forEach(yn),t.__H.__h.forEach(hn),t.__H.__h=[]}catch(e){t.__H.__h=[],hr.__e(e,t.__v)}})),tn=[]}hr.__b=function(t){qr=null,en&&en(t)},hr.__r=function(t){rn&&rn(t),Zr=0;var e=(qr=t.__c).__H;e&&(e.__h.forEach(yn),e.__h.forEach(hn),e.__h=[])},hr.diffed=function(t){nn&&nn(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==tn.push(e)&&Jr===hr.requestAnimationFrame||((Jr=hr.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),pn&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);pn&&(e=requestAnimationFrame(r))})(fn)),qr=null},hr.__c=function(t,e){e.some((function(t){try{t.__h.forEach(yn),t.__h=t.__h.filter((function(t){return!t.__||hn(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],hr.__e(r,t.__v)}})),on&&on(t,e)},hr.unmount=function(t){an&&an(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{yn(t)}catch(t){e=t}})),e&&hr.__e(e,r.__v))};var pn="function"==typeof requestAnimationFrame;function yn(t){var e=qr,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),qr=e}function hn(t){var e=qr;t.__c=t.__(),qr=e}function dn(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function vn(t,e){return"function"==typeof e?e(t):e}function bn(t,e){for(var r in e)t[r]=e[r];return t}function gn(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function mn(t){this.props=t}(mn.prototype=new kr).isPureReactComponent=!0,mn.prototype.shouldComponentUpdate=function(t,e){return gn(this.props,t)||gn(this.state,e)};var On=hr.__b;hr.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),On&&On(t)};var _n="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wn(t){function e(e,r){var n=bn({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=_n,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var xn=function(t,e){return null==t?null:Rr(Rr(t).map(e))},En={map:xn,forEach:xn,count:function(t){return t?Rr(t).length:0},only:function(t){var e=Rr(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:Rr},Sn=hr.__e;hr.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);Sn(t,e,r)};var jn=hr.unmount;function Pn(){this.__u=0,this.t=null,this.__b=null}function kn(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function An(){this.u=null,this.o=null}hr.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),jn&&jn(t)},(Pn.prototype=new kr).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=kn(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(u):u())};r.__R=a;var u=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=function t(e,r,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)})),e.__c&&e.__c.__P===r&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},Pn.prototype.componentWillUnmount=function(){this.t=[]},Pn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,r,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=bn({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)}))),e}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Sr(Pr,null,t.fallback);return o&&(o.__h=null),[Sr(Pr,null,e.__e?null:t.children),o]};var Dn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Tn(t){return this.getChildContext=function(){return t.context},t.children}function Mn(t){var e=this,r=t.i;e.componentWillUnmount=function(){Wr(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Wr(Sr(Tn,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(An.prototype=new kr).__e=function(t){var e=this,r=kn(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),Dn(e,t,n)):o()};r?r(i):i()}},An.prototype.render=function(t){this.u=null,this.o=new Map;var e=Rr(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},An.prototype.componentDidUpdate=An.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){Dn(t,r,e)}))};var Nn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Cn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Rn="undefined"!=typeof document,In=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};kr.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(kr.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Ln=hr.event;function zn(){}function Bn(){return this.cancelBubble}function Xn(){return this.defaultPrevented}hr.event=function(t){return Ln&&(t=Ln(t)),t.persist=zn,t.isPropagationStopped=Bn,t.isDefaultPrevented=Xn,t.nativeEvent=t};var Un,Fn={configurable:!0,get:function(){return this.class}},Hn=hr.vnode;hr.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var a=r[i];Rn&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==a||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!In(r.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&Cn.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),n[i]=a)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Rr(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Rr(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(Fn.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",Fn))}t.$$typeof=Nn,Hn&&Hn(t)};var Gn=hr.__r;hr.__r=function(t){Gn&&Gn(t),Un=t.__c};var Yn={ReactCurrentDispatcher:{current:{readContext:function(t){return Un.__n[t.__c].props.value}}}};function Vn(t){return!!t&&t.$$typeof===Nn}function Wn(t){return t&&(t.base||1===t.nodeType&&t)||null}var $n=function(t,e){return t(e)},Kn={useState:function(t){return Qr=1,cn(vn,t)},useReducer:cn,useEffect:function(t,e){var r=un(Zr++,3);!hr.__s&&dn(r.__H,e)&&(r.__=t,r.__H=e,qr.__H.__h.push(r))},useLayoutEffect:sn,useRef:function(t){return Qr=5,ln((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){Qr=6,sn((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:ln,useCallback:function(t,e){return Qr=8,ln((function(){return t}),e)},useContext:function(t){var e=qr.context[t.__c],r=un(Zr++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(qr)),e.props.value):t.__},useDebugValue:function(t,e){hr.useDebugValue&&hr.useDebugValue(e?e(t):t)},version:"17.0.2",Children:En,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Wr(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return $r(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Wr(null,t),!0)},createPortal:function(t,e){return Sr(Mn,{__v:t,i:e})},createElement:Sr,createContext:function(t,e){var r={__c:e="__cC"+mr++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(Tr)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(t){return Sr.bind(null,t)},cloneElement:function(t){return Vn(t)?Kr.apply(null,arguments):t},createRef:function(){return{current:null}},Fragment:Pr,isValidElement:Vn,findDOMNode:Wn,Component:kr,PureComponent:mn,memo:function(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:gn(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Sr(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:wn,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:$n,StrictMode:Pr,Suspense:Pn,SuspenseList:An,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Sr(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn};function Zn(t){return Zn="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},Zn(t)}function qn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Qn(t,e,r){return e&&Jn(t.prototype,e),r&&Jn(t,r),t}function to(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&no(t,e)}function ro(t){return ro=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ro(t)}function no(t,e){return no=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},no(t,e)}function oo(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function io(t,e){return t(e={exports:{}},e.exports),e.exports}var ao=io((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.memo"):60115,d=r?Symbol.for("react.lazy"):60116;function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case u:case a:return t;default:switch(t=t&&t.$$typeof){case s:case p:case c:return t;default:return e}}case o:return e}}}function b(t){return v(t)===f}e.typeOf=v,e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Profiler=u,e.Portal=o,e.StrictMode=a,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===a||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===h||t.$$typeof===c||t.$$typeof===s||t.$$typeof===p)},e.isAsyncMode=function(t){return b(t)||v(t)===l},e.isConcurrentMode=b,e.isContextConsumer=function(t){return v(t)===s},e.isContextProvider=function(t){return v(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return v(t)===p},e.isFragment=function(t){return v(t)===i},e.isProfiler=function(t){return v(t)===u},e.isPortal=function(t){return v(t)===o},e.isStrictMode=function(t){return v(t)===a}}));!function(t){t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")&&t.default}(ao),ao.typeOf,ao.AsyncMode,ao.ConcurrentMode,ao.ContextConsumer,ao.ContextProvider,ao.Element,ao.ForwardRef,ao.Fragment,ao.Profiler,ao.Portal,ao.StrictMode,ao.isValidElementType,ao.isAsyncMode,ao.isConcurrentMode,ao.isContextConsumer,ao.isContextProvider,ao.isElement,ao.isForwardRef,ao.isFragment,ao.isProfiler,ao.isPortal,ao.isStrictMode;var uo=io((function(t){t.exports=ao})),co={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},so={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lo={};lo[uo.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var fo=Object.defineProperty,po=Object.getOwnPropertyNames,yo=Object.getOwnPropertySymbols,ho=Object.getOwnPropertyDescriptor,vo=Object.getPrototypeOf,bo=Object.prototype,go=function t(e,r,n){if("string"!=typeof r){if(bo){var o=vo(r);o&&o!==bo&&t(e,o,n)}var i=po(r);yo&&(i=i.concat(yo(r)));for(var a=lo[e.$$typeof]||co,u=lo[r.$$typeof]||co,c=0;c<i.length;++c){var s=i[c];if(!(so[s]||n&&n[s]||u&&u[s]||a&&a[s])){var l=ho(r,s);try{fo(e,s,l)}catch(t){}}}return e}return e},mo=function(){function t(){qn(this,t),this.listeners=[]}return Qn(t,[{key:"on",value:function(t){var e=this;return this.listeners.push(t),function(){var r=e.listeners.indexOf(t);-1!==r&&e.listeners.splice(r,1)}}},{key:"emit",value:function(t){this.listeners.forEach((function(e){return e(t)}))}}]),t}();function Oo(t){function e(e,r,n,o,i,a){for(var u=arguments.length,c=new Array(u>6?u-6:0),s=6;s<u;s++)c[s-6]=arguments[s];return ht((function(){if(o=o||"<<anonymous>>",a=a||n,null==r[n]){if(e){var u=null===r[n]?"null":"undefined";return new Error("The "+i+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+u+"`.")}return null}return t.apply(void 0,[r,n,o,i,a].concat(c))}))}var r=e.bind(null,!1);return r.isRequired=e.bind(null,!0),r}function _o(t){var e=Zn(t);return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||"Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol}(e,t)?"symbol":e}function wo(t,e){return Oo((function(r,n,o,i,a){return ht((function(){if(t&&_o(r[n])===e.toLowerCase())return null;var i;switch(e){case"Array":i=He;break;case"Object":i=nr;break;case"Map":i=We;break;default:throw new Error("Unexpected mobxType: ".concat(e))}var u=r[n];if(!i(u)){var c=function(t){var e=_o(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}(u),s=t?" or javascript `"+e.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `mobx.Observable"+e+"`"+s+".")}return null}))}))}function xo(t,e){return Oo((function(r,n,o,i,a){for(var u=arguments.length,c=new Array(u>5?u-5:0),s=5;s<u;s++)c[s-5]=arguments[s];return ht((function(){if("function"!=typeof e)return new Error("Property `"+a+"` of component `"+o+"` has invalid PropType notation.");var u=wo(t,"Array")(r,n,o);if(u instanceof Error)return u;for(var s=r[n],l=0;l<s.length;l++)if((u=e.apply(void 0,[s,l,o,i,a+"["+l+"]"].concat(c)))instanceof Error)return u;return null}))}))}wo(!1,"Array"),xo.bind(null,!1),wo(!1,"Map"),wo(!1,"Object"),wo(!0,"Array"),xo.bind(null,!0);var Eo=wo(!0,"Object"),So=0,jo={};function Po(t){return jo[t]||(jo[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react ".concat(t," (").concat(So,")");return So++,e}(t)),jo[t]}var ko=Po("patchMixins"),Ao=Po("patchedDefinition");function Do(t,e){var r=t[ko]=t[ko]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}function To(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function Mo(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];To.call.apply(To,[this,t,e].concat(n))}}function No(t,e,r,n,o){var i,a=Mo(o,n);return to(i={},Ao,!0),to(i,"get",(function(){return a})),to(i,"set",(function(o){if(this===t)a=Mo(o,n);else{var i=No(this,e,r,n,o);Object.defineProperty(this,e,i)}})),to(i,"configurable",!0),to(i,"enumerable",r),i}var Co={mobxStores:Eo};Object.seal(Co);var Ro={contextTypes:{get:function(){return Co},set:function(t){console.warn("Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`")},configurable:!0,enumerable:!1},isMobxInjector:{value:!0,writable:!0,configurable:!0,enumerable:!0}};function Io(t,e,r){var n="inject-"+(e.displayName||e.name||e.constructor&&e.constructor.name||"Unknown");r&&(n+="-with-"+r);var o=function(r){function n(){var t,e;qn(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=oo(this,(t=ro(n)).call.apply(t,[this].concat(o)))).storeRef=function(t){e.wrappedInstance=t},e}return eo(n,r),Qn(n,[{key:"render",value:function(){var r={};for(var n in this.props)this.props.hasOwnProperty(n)&&(r[n]=this.props[n]);var o=t(this.context.mobxStores||{},r,this.context)||{};for(var i in o)r[i]=o[i];return function(t){return!(t.prototype&&t.prototype.render)}(e)||(r.ref=this.storeRef),Sr(e,r)}}]),n}(kr);return o.displayName=n,go(o,e),o.wrappedComponent=e,Object.defineProperties(o,Ro),o}function Lo(t){return function(e,r){return t.forEach((function(t){if(!(t in r)){if(!(t in e))throw new Error("MobX injector: Store '"+t+"' is not available! Make sure it is provided by some Provider");r[t]=e[t]}})),r}}function zo(){var t;if("function"==typeof arguments[0])return t=arguments[0],function(e){var r=Io(t,e);return r.isMobxInjector=!1,(r=ri(r)).isMobxInjector=!0,r};for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t=Lo(e),function(r){return Io(t,r,e.join("-"))}}var Bo=Po("isUnmounted"),Xo=!1,Uo=!1,Fo="undefined"!=typeof WeakMap?new WeakMap:void 0,Ho=new mo,Go=Po("skipRender"),Yo=Po("isForcingUpdate"),Vo=wn((function(t,e){})).$$typeof;function Wo(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}function $o(t){if(Wn)try{return Wn(t)}catch(t){return null}return null}function Ko(t){var e=$o(t);e&&Fo&&Fo.set(e,t),Ho.emit({event:"render",renderTime:t.__$mobRenderEnd-t.__$mobRenderStart,totalTime:Date.now()-t.__$mobRenderStart,component:t,node:e})}var Zo=new mo;function qo(t,e){if(Jo(t,e))return!0;if("object"!==Zn(t)||null===t||"object"!==Zn(e)||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!hasOwnProperty.call(e,r[o])||!Jo(t[r[o]],e[r[o]]))return!1;return!0}function Jo(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Qo(t){var e=this;function r(){var t=this;a=!1;var e=void 0,r=void 0;if(u.track((function(){Xo&&(t.__$mobRenderStart=Date.now());try{r=function(t,e){var r,n=St(!1);try{r=e()}finally{jt(n)}return r}(0,i)}catch(t){e=t}Xo&&(t.__$mobRenderEnd=Date.now())})),e)throw Zo.emit(e),e;return r}var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>",o=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID||this._reactInternalInstance&&this._reactInternalInstance._debugID||this._reactInternalFiber&&this._reactInternalFiber._debugID;Wo(this,Go,!1),Wo(this,Yo,!1);var i=t.bind(this),a=!1,u=new Ht("".concat(n,"#").concat(o,".render()"),(function(){if(!a&&(a=!0,"function"==typeof e.componentWillReact&&e.componentWillReact(),!0!==e[Bo])){var t=!0;try{Wo(e,Yo,!0),e[Go]||kr.prototype.forceUpdate.call(e),t=!1}finally{Wo(e,Yo,!1),t&&u.dispose()}}}));return u.reactComponent=this,r.$mobx=u,this.render=r,r.call(this)}var ti={componentWillUnmount:function(){if(this.render.$mobx&&this.render.$mobx.dispose(),this[Bo]=!0,Xo){var t=$o(this);t&&Fo&&Fo.delete(t),Ho.emit({event:"destroy",component:this,node:t})}},componentDidMount:function(){Xo&&Ko(this)},componentDidUpdate:function(){Xo&&Ko(this)},shouldComponentUpdate:function(t,e){return this.state!==e||!qo(this.props,t)}};function ei(t,e){var r=Po("reactProp_".concat(e,"_valueHolder")),n=Po("reactProp_".concat(e,"_atomHolder"));function o(){return this[n]||Wo(this,n,D("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return o.call(this).reportObserved(),this[r]},set:function(t){this[Yo]||qo(this[r],t)?Wo(this,r,t):(Wo(this,r,t),Wo(this,Go,!0),o.call(this).reportChanged(),Wo(this,Go,!1))}})}function ri(t,e){if("string"==typeof t)throw new Error("Store names should be provided as array");if(Array.isArray(t))return Uo||(Uo=!0,console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')),e?zo.apply(null,t)(ri(e)):function(e){return ri(t,e)};var r=t;if(!0===r.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),r.__proto__===mn&&console.warn("Mobx observer: You are using 'observer' on React.PureComponent. These two achieve two opposite goals and should not be used together"),Vo&&r.$$typeof===Vo){var n=r.render;if("function"!=typeof n)throw new Error("render property of ForwardRef was not a function");return wn((function(){var t=arguments;return Kn.createElement(ni,null,(function(){return n.apply(void 0,t)}))}))}if(!("function"!=typeof r||r.prototype&&r.prototype.render||r.isReactClass||kr.isPrototypeOf(r))){var o,i,a=ri((i=o=function(t){function e(){return qn(this,e),oo(this,ro(e).apply(this,arguments))}return eo(e,t),Qn(e,[{key:"render",value:function(){return r.call(this,this.props,this.context)}}]),e}(kr),o.displayName=r.displayName||r.name,o.contextTypes=r.contextTypes,o.propTypes=r.propTypes,o.defaultProps=r.defaultProps,i));return go(a,r),a}if(!r)throw new Error("Please pass a valid component to 'observer'");var u=r.prototype||r;!function(t){["componentDidMount","componentWillUnmount","componentDidUpdate"].forEach((function(e){!function(t,e){!function(t,e){for(var r=Do(t,e),n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];for(var a=0;a<o.length;a++){var u=o[a];r.methods.indexOf(u)<0&&r.methods.push(u)}var c=Object.getOwnPropertyDescriptor(t,e);if(!c||!c[Ao]){var s=t[e],l=No(t,e,c?c.enumerable:void 0,r,s);Object.defineProperty(t,e,l)}}(t,e,ti[e])}(t,e)})),t.shouldComponentUpdate?t.shouldComponentUpdate!==ti.shouldComponentUpdate&&console.warn("Use `shouldComponentUpdate` in an `observer` based component breaks the behavior of `observer` and might lead to unexpected results. Manually implementing `sCU` should not be needed when using mobx-react."):t.shouldComponentUpdate=ti.shouldComponentUpdate}(u),r.isMobXReactObserver=!0,ei(u,"props"),ei(u,"state");var c=u.render;return u.render=function(){return Qo.call(this,c)},r}var ni=ri((function(t){var e=t.children,r=t.inject,n=t.render,o=e||n;if(void 0===o)return null;if(!r)return o();console.warn("<Observer inject=.../> is no longer supported. Please use inject on the enclosing component instead");var i=zo(r)(o);return Kn.createElement(i,null)}));ni.displayName="Observer";var oi=function(t,e,r,n,o){var i="children"===e?"render":"children";return"function"==typeof t[e]&&"function"==typeof t[i]?new Error("Invalid prop,do not use children and render in the same time in`"+r):"function"!=typeof t[e]&&"function"!=typeof t[i]?new Error("Invalid prop `"+o+"` of type `"+Zn(t[e])+"` supplied to `"+r+"`, expected `function`."):void 0};function ii(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function ai(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return null!=r?r:null}.bind(this))}function ui(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}ni.propTypes={render:oi,children:oi},ii.__suppressDeprecationWarning=!0,ai.__suppressDeprecationWarning=!0,ui.__suppressDeprecationWarning=!0;var ci={children:!0,key:!0,ref:!0},si=function(t){function e(t,r){var n;return qn(this,e),(n=oo(this,ro(e).call(this,t,r))).state={},li(t,n.state),n}return eo(e,t),Qn(e,[{key:"render",value:function(){return En.only(this.props.children)}},{key:"getChildContext",value:function(){var t={};return li(this.context.mobxStores,t),li(this.props,t),{mobxStores:t}}}],[{key:"getDerivedStateFromProps",value:function(t,e){if(!t)return null;if(!e)return t;if(Object.keys(t).filter(fi).length!==Object.keys(e).filter(fi).length&&console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!t.suppressChangedStoreWarning)for(var r in t)fi(r)&&e[r]!==t[r]&&console.warn("MobX Provider: Provided store '"+r+"' has changed. Please avoid replacing stores as the change might not propagate to all children");return t}}]),e}(kr);function li(t,e){if(t)for(var r in t)fi(r)&&(e[r]=t[r])}function fi(t){return!ci[t]&&"suppressChangedStoreWarning"!==t}if(si.contextTypes={mobxStores:Eo},si.childContextTypes={mobxStores:Eo.isRequired},function(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var r=null,n=null,o=null;if("function"==typeof e.componentWillMount?r="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?n="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(n="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?o="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==r||null!==n||null!==o){var i=t.displayName||t.name,a="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=ii,e.componentWillReceiveProps=ai),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=ui;var u=e.componentDidUpdate;e.componentDidUpdate=function(t,e,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;u.call(this,t,e,n)}}}(si),Po("disposeOnUnmount"),!kr)throw new Error("mobx-react requires React to be available");if(!te)throw new Error("mobx-react requires mobx to be available");if(function(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.arrayBuffer,u=t.reactionScheduler,s=t.reactionRequiresObservable,l=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Ct.pendingReactions.length||Ct.inBatch||Ct.isRunningReactions)&&c("isolateGlobalState should be called before MobX is running any reactions"),Nt=!0,Mt&&(0==--a().__mobxInstanceCount&&(a().__mobxGlobals=void 0),Ct=new Tt)),void 0!==e){var f=void 0;switch(e){case!0:case"observed":f=!0;break;case!1:case"never":f=!1;break;case"strict":case"always":f="strict";break;default:c("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Ct.enforceActions=f,Ct.allowStateChanges=!0!==f&&"strict"!==f}void 0!==r&&(Ct.computedRequiresReaction=!!r),void 0!==s&&(Ct.reactionRequiresObservable=!!s),void 0!==l&&(Ct.observableRequiresReaction=!!l,Ct.allowStateReads=!Ct.observableRequiresReaction),void 0!==n&&(Ct.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),Ct.disableErrorBoundaries=!!o),"number"==typeof i&&Ue(i),u&&$t(u)}({reactionScheduler:$n}),"object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":Zn(__MOBX_DEVTOOLS_GLOBAL_HOOK__))){var pi={spy:te,extras:{getDebugName:ar}},yi={renderReporter:Ho,componentByNodeRegistry:Fo,componentByNodeRegistery:Fo,trackComponents:function(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");Xo||(Xo=!0)}};__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(yi,pi)}r(5735),r(9321),r(8188),r(8673),r(6886),r(1939),r(6936),r(3450),r(4769),r(4115),r(5342),r(8625),r(2775),r(634),r(796),r(2501),r(7233),r(7950),r(3430),r(9228),r(9805),r(9529),r(1235);var hi=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},di=function(t,e){return t===e||t!=t&&e!=e},vi=function(t,e){for(var r=t.length;r--;)if(di(t[r][0],e))return r;return-1},bi=Array.prototype.splice;function gi(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gi.prototype.clear=function(){this.__data__=[],this.size=0},gi.prototype.delete=function(t){var e=this.__data__,r=vi(e,t);return!(r<0||(r==e.length-1?e.pop():bi.call(e,r,1),--this.size,0))},gi.prototype.get=function(t){var e=this.__data__,r=vi(e,t);return r<0?void 0:e[r][1]},gi.prototype.has=function(t){return vi(this.__data__,t)>-1},gi.prototype.set=function(t,e){var r=this.__data__,n=vi(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var mi,Oi=gi,_i="object"==typeof global&&global&&global.Object===Object&&global,wi="object"==typeof self&&self&&self.Object===Object&&self,xi=_i||wi||Function("return this")(),Ei=xi.Symbol,Si=Object.prototype,ji=Si.hasOwnProperty,Pi=Si.toString,ki=Ei?Ei.toStringTag:void 0,Ai=Object.prototype.toString,Di=Ei?Ei.toStringTag:void 0,Ti=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Di&&Di in Object(t)?function(t){var e=ji.call(t,ki),r=t[ki];try{t[ki]=void 0;var n=!0}catch(t){}var o=Pi.call(t);return n&&(e?t[ki]=r:delete t[ki]),o}(t):function(t){return Ai.call(t)}(t)},Mi=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Ni=function(t){if(!Mi(t))return!1;var e=Ti(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ci=xi["__core-js_shared__"],Ri=(mi=/[^.]+$/.exec(Ci&&Ci.keys&&Ci.keys.IE_PROTO||""))?"Symbol(src)_1."+mi:"",Ii=Function.prototype.toString,Li=function(t){if(null!=t){try{return Ii.call(t)}catch(t){}try{return t+""}catch(t){}}return""},zi=/^\[object .+?Constructor\]$/,Bi=Function.prototype,Xi=Object.prototype,Ui=Bi.toString,Fi=Xi.hasOwnProperty,Hi=RegExp("^"+Ui.call(Fi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gi=function(t){return!(!Mi(t)||(e=t,Ri&&Ri in e))&&(Ni(t)?Hi:zi).test(Li(t));var e},Yi=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Gi(r)?r:void 0},Vi=Yi(xi,"Map"),Wi=Yi(Object,"create"),$i=Object.prototype.hasOwnProperty,Ki=Object.prototype.hasOwnProperty;function Zi(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Zi.prototype.clear=function(){this.__data__=Wi?Wi(null):{},this.size=0},Zi.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Zi.prototype.get=function(t){var e=this.__data__;if(Wi){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return $i.call(e,t)?e[t]:void 0},Zi.prototype.has=function(t){var e=this.__data__;return Wi?void 0!==e[t]:Ki.call(e,t)},Zi.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Wi&&void 0===e?"__lodash_hash_undefined__":e,this};var qi=Zi,Ji=function(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map};function Qi(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qi.prototype.clear=function(){this.size=0,this.__data__={hash:new qi,map:new(Vi||Oi),string:new qi}},Qi.prototype.delete=function(t){var e=Ji(this,t).delete(t);return this.size-=e?1:0,e},Qi.prototype.get=function(t){return Ji(this,t).get(t)},Qi.prototype.has=function(t){return Ji(this,t).has(t)},Qi.prototype.set=function(t,e){var r=Ji(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var ta=Qi;function ea(t){var e=this.__data__=new Oi(t);this.size=e.size}ea.prototype.clear=function(){this.__data__=new Oi,this.size=0},ea.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},ea.prototype.get=function(t){return this.__data__.get(t)},ea.prototype.has=function(t){return this.__data__.has(t)},ea.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Oi){var n=r.__data__;if(!Vi||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ta(n)}return r.set(t,e),this.size=r.size,this};var ra=ea;function na(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ta;++e<r;)this.add(t[e])}na.prototype.add=na.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},na.prototype.has=function(t){return this.__data__.has(t)};var oa=na,ia=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1},aa=function(t,e){return t.has(e)},ua=function(t,e,r,n,o,i){var a=1&r,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,p=!0,y=2&r?new oa:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],d=e[f];if(n)var v=a?n(d,h,f,e,t,i):n(h,d,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(y){if(!ia(e,(function(t,e){if(!aa(y,e)&&(h===t||o(h,t,r,n,i)))return y.push(e)}))){p=!1;break}}else if(h!==d&&!o(h,d,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},ca=xi.Uint8Array,sa=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r},la=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},fa=Ei?Ei.prototype:void 0,pa=fa?fa.valueOf:void 0,ya=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},ha=Array.isArray,da=function(t,e,r){var n=e(t);return ha(t)?n:ya(n,r(t))},va=function(){return[]},ba=Object.prototype.propertyIsEnumerable,ga=Object.getOwnPropertySymbols,ma=ga?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}(ga(t),(function(e){return ba.call(t,e)})))}:va,Oa=function(t){return null!=t&&"object"==typeof t},_a=function(t){return Oa(t)&&"[object Arguments]"==Ti(t)},wa=Object.prototype,xa=wa.hasOwnProperty,Ea=wa.propertyIsEnumerable,Sa=_a(function(){return arguments}())?_a:function(t){return Oa(t)&&xa.call(t,"callee")&&!Ea.call(t,"callee")},ja=Sa,Pa="object"==typeof exports&&exports&&!exports.nodeType&&exports,ka=Pa&&"object"==typeof module&&module&&!module.nodeType&&module,Aa=ka&&ka.exports===Pa?xi.Buffer:void 0,Da=(Aa?Aa.isBuffer:void 0)||function(){return!1},Ta=/^(?:0|[1-9]\d*)$/,Ma=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Ta.test(t))&&t>-1&&t%1==0&&t<e},Na=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ca={};Ca["[object Float32Array]"]=Ca["[object Float64Array]"]=Ca["[object Int8Array]"]=Ca["[object Int16Array]"]=Ca["[object Int32Array]"]=Ca["[object Uint8Array]"]=Ca["[object Uint8ClampedArray]"]=Ca["[object Uint16Array]"]=Ca["[object Uint32Array]"]=!0,Ca["[object Arguments]"]=Ca["[object Array]"]=Ca["[object ArrayBuffer]"]=Ca["[object Boolean]"]=Ca["[object DataView]"]=Ca["[object Date]"]=Ca["[object Error]"]=Ca["[object Function]"]=Ca["[object Map]"]=Ca["[object Number]"]=Ca["[object Object]"]=Ca["[object RegExp]"]=Ca["[object Set]"]=Ca["[object String]"]=Ca["[object WeakMap]"]=!1;var Ra=function(t){return function(e){return t(e)}},Ia="object"==typeof exports&&exports&&!exports.nodeType&&exports,La=Ia&&"object"==typeof module&&module&&!module.nodeType&&module,za=La&&La.exports===Ia&&_i.process,Ba=function(){try{return La&&La.require&&La.require("util").types||za&&za.binding&&za.binding("util")}catch(t){}}(),Xa=Ba&&Ba.isTypedArray,Ua=Xa?Ra(Xa):function(t){return Oa(t)&&Na(t.length)&&!!Ca[Ti(t)]},Fa=Object.prototype.hasOwnProperty,Ha=function(t,e){var r=ha(t),n=!r&&ja(t),o=!r&&!n&&Da(t),i=!r&&!n&&!o&&Ua(t),a=r||n||o||i,u=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var s in t)!e&&!Fa.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ma(s,c))||u.push(s);return u},Ga=Object.prototype,Ya=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ga)},Va=function(t,e){return function(r){return t(e(r))}},Wa=Va(Object.keys,Object),$a=Object.prototype.hasOwnProperty,Ka=function(t){return null!=t&&Na(t.length)&&!Ni(t)},Za=function(t){return Ka(t)?Ha(t):function(t){if(!Ya(t))return Wa(t);var e=[];for(var r in Object(t))$a.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)},qa=function(t){return da(t,Za,ma)},Ja=Object.prototype.hasOwnProperty,Qa=Yi(xi,"DataView"),tu=Yi(xi,"Promise"),eu=Yi(xi,"Set"),ru=Yi(xi,"WeakMap"),nu="[object Map]",ou="[object Promise]",iu="[object Set]",au="[object WeakMap]",uu="[object DataView]",cu=Li(Qa),su=Li(Vi),lu=Li(tu),fu=Li(eu),pu=Li(ru),yu=Ti;(Qa&&yu(new Qa(new ArrayBuffer(1)))!=uu||Vi&&yu(new Vi)!=nu||tu&&yu(tu.resolve())!=ou||eu&&yu(new eu)!=iu||ru&&yu(new ru)!=au)&&(yu=function(t){var e=Ti(t),r="[object Object]"==e?t.constructor:void 0,n=r?Li(r):"";if(n)switch(n){case cu:return uu;case su:return nu;case lu:return ou;case fu:return iu;case pu:return au}return e});var hu=yu,du="[object Arguments]",vu="[object Array]",bu="[object Object]",gu=Object.prototype.hasOwnProperty,mu=function(t,e,r,n,o,i){var a=ha(t),u=ha(e),c=a?vu:hu(t),s=u?vu:hu(e),l=(c=c==du?bu:c)==bu,f=(s=s==du?bu:s)==bu,p=c==s;if(p&&Da(t)){if(!Da(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new ra),a||Ua(t)?ua(t,e,r,n,o,i):function(t,e,r,n,o,i,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new ca(t),new ca(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return di(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=sa;case"[object Set]":var c=1&n;if(u||(u=la),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=2,a.set(t,e);var l=ua(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(pa)return pa.call(t)==pa.call(e)}return!1}(t,e,c,r,n,o,i);if(!(1&r)){var y=l&&gu.call(t,"__wrapped__"),h=f&&gu.call(e,"__wrapped__");if(y||h){var d=y?t.value():t,v=h?e.value():e;return i||(i=new ra),o(d,v,r,n,i)}}return!!p&&(i||(i=new ra),function(t,e,r,n,o,i){var a=1&r,u=qa(t),c=u.length;if(c!=qa(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Ja.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var y=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var d=t[l=u[s]],v=e[l];if(n)var b=a?n(v,d,l,e,t,i):n(d,v,l,t,e,i);if(!(void 0===b?d===v||o(d,v,r,n,i):b)){y=!1;break}h||(h="constructor"==l)}if(y&&!h){var g=t.constructor,m=e.constructor;g==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m||(y=!1)}return i.delete(t),i.delete(e),y}(t,e,r,n,o,i))},Ou=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Oa(e)&&!Oa(r)?e!=e&&r!=r:mu(e,r,n,o,t,i))},_u=function(t){return t==t&&!Mi(t)},wu=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}},xu=function(t){var e=function(t){for(var e=Za(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,_u(o)]}return e}(t);return 1==e.length&&e[0][2]?wu(e[0][0],e[0][1]):function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new ra;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Ou(l,s,3,n,f):p))return!1}}return!0}(r,t,e)}},Eu=function(t){return"symbol"==typeof t||Oa(t)&&"[object Symbol]"==Ti(t)},Su=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ju=/^\w*$/,Pu=function(t,e){if(ha(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Eu(t))||ju.test(t)||!Su.test(t)||null!=e&&t in Object(e)};function ku(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(ku.Cache||ta),r}ku.Cache=ta;var Au,Du,Tu,Mu,Nu,Cu,Ru,Iu,Lu,zu,Bu,Xu,Uu,Fu,Hu,Gu,Yu,Vu,Wu,$u,Ku,Zu=ku,qu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ju=/\\(\\)?/g,Qu=function(t){var e=Zu(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(qu,(function(t,r,n,o){e.push(n?o.replace(Ju,"$1"):r||t)})),e})),tc=Ei?Ei.prototype:void 0,ec=tc?tc.toString:void 0,rc=function t(e){if("string"==typeof e)return e;if(ha(e))return hi(e,t)+"";if(Eu(e))return ec?ec.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},nc=function(t){return null==t?"":rc(t)},oc=function(t,e){return ha(t)?t:Pu(t,e)?[t]:Qu(nc(t))},ic=function(t){if("string"==typeof t||Eu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},ac=function(t,e){for(var r=0,n=(e=oc(e,t)).length;null!=t&&r<n;)t=t[ic(e[r++])];return r&&r==n?t:void 0},uc=function(t,e,r){var n=null==t?void 0:ac(t,e);return void 0===n?r:n},cc=function(t,e){return null!=t&&e in Object(t)},sc=function(t,e){return null!=t&&function(t,e,r){for(var n=-1,o=(e=oc(e,t)).length,i=!1;++n<o;){var a=ic(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Na(o)&&Ma(a,o)&&(ha(t)||ja(t))}(t,e,cc)},lc=function(t){return t},fc=function(t){return Pu(t)?(e=ic(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return ac(e,t)}}(t);var e},pc=function(t){return"function"==typeof t?t:null==t?lc:"object"==typeof t?ha(t)?(e=t[0],r=t[1],Pu(e)&&_u(r)?wu(ic(e),r):function(t){var n=uc(t,e);return void 0===n&&n===r?sc(t,e):Ou(r,n,3)}):xu(t):fc(t);var e,r},yc=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var u=i[++n];if(!1===e(o[u],u,o))break}return t},hc=function(t,e){if(null==t)return t;if(!Ka(t))return function(t,e){return t&&yc(t,e,Za)}(t,e);for(var r=t.length,n=-1,o=Object(t);++n<r&&!1!==e(o[n],n,o););return t},dc=function(t,e){var r=-1,n=Ka(t)?Array(t.length):[];return hc(t,(function(t,o,i){n[++r]=e(t,o,i)})),n},vc=function(t,e){return(ha(t)?hi:dc)(t,pc(e))},bc=function(){try{var t=Yi(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),gc=function(t,e,r){"__proto__"==e&&bc?bc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},mc=Object.prototype.hasOwnProperty,Oc=function(t,e,r){var n=t[e];mc.call(t,e)&&di(n,r)&&(void 0!==r||e in t)||gc(t,e,r)},_c=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?gc(r,u,c):Oc(r,u,c)}return r},wc=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},xc=Math.max,Ec=function(t,e,r){return e=xc(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=xc(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=r(a),wc(t,this,u)}},Sc=bc?function(t,e){return bc(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:lc,jc=Date.now,Pc=(Au=Sc,Du=0,Tu=0,function(){var t=jc(),e=16-(t-Tu);if(Tu=t,e>0){if(++Du>=800)return arguments[0]}else Du=0;return Au.apply(void 0,arguments)}),kc=Object.prototype.hasOwnProperty,Ac=(Mu=function(t,e){if(Ya(e)||Ka(e))_c(e,Za(e),t);else for(var r in e)kc.call(e,r)&&Oc(t,r,e[r])},function(t,e){return Pc(Ec(t,e,lc),t+"")}((function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Mu.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!Mi(r))return!1;var n=typeof e;return!!("number"==n?Ka(r)&&Ma(e,r.length):"string"==n&&e in r)&&di(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var a=e[r];a&&Mu(t,a,r,o)}return t}))),Dc=function(t,e,r,n){if(!Mi(t))return t;for(var o=-1,i=(e=oc(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=ic(e[o]),s=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var l=u[c];void 0===(s=n?n(l,c,u):void 0)&&(s=Mi(l)?l:Ma(e[o+1])?[]:{})}Oc(u,c,s),u=u[c]}return t},Tc=function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=ac(t,a);r(u,a)&&Dc(i,oc(a,t),u)}return i}(t,e,(function(e,r){return sc(t,r)}))},Mc=Ei?Ei.isConcatSpreadable:void 0,Nc=function(t){return ha(t)||ja(t)||!!(Mc&&t&&t[Mc])},Cc=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Nc),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):ya(i,c):o||(i[i.length]=c)}return i},Rc=function(t){return null!=t&&t.length?Cc(t,1):[]},Ic=function(t){return Pc(Ec(t,void 0,Rc),t+"")}((function(t,e){return null==t?{}:Tc(t,e)}));function Lc(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function zc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xc(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Uc,Fc,Hc,Gc,Yc,Vc,Wc,$c,Kc,Zc,qc,Jc,Qc,ts,es,rs,ns={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},os=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","multipleSelectKey","extraConf"],is=(Nu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Lc(this,"stopZoomGraph",Cu,this),Lc(this,"stopScrollGraph",Ru,this),Lc(this,"stopMoveGraph",Iu,this),Lc(this,"adjustEdge",Lu,this),Lc(this,"adjustEdgeMiddle",zu,this),Lc(this,"adjustEdgeStartAndEnd",Bu,this),Lc(this,"adjustNodePosition",Xu,this),Lc(this,"hideAnchors",Uu,this),Lc(this,"hoverOutline",Fu,this),Lc(this,"nodeSelectedOutline",Hu,this),Lc(this,"edgeSelectedOutline",Gu,this),Lc(this,"nodeTextEdit",Yu,this),Lc(this,"edgeTextEdit",Vu,this),Lc(this,"nodeTextDraggable",Wu,this),Lc(this,"edgeTextDraggable",$u,this),Lc(this,"metaKeyMultipleSelected",Ku,this),Bc(this,"multipleSelectKey",""),Bc(this,"extraConf",{}),Bc(this,"defaultConfig",{}),Ac(this,this.getConfigDetail(e))}var e,r;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Ac(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Ac(n,this.defaultConfig),!0===e){var o=Ic(ns,os);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,metaKeyMultipleSelected:this.metaKeyMultipleSelected},Ac(n,o)}!1===r&&Ac(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=Ic(t,os);return Ac(n,i)}},{key:"getConfig",value:function(){return Ic(this,os)}}])&&zc(e.prototype,r),t}(),Cu=Xc(Nu.prototype,"stopZoomGraph",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ru=Xc(Nu.prototype,"stopScrollGraph",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Iu=Xc(Nu.prototype,"stopMoveGraph",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lu=Xc(Nu.prototype,"adjustEdge",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zu=Xc(Nu.prototype,"adjustEdgeMiddle",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Bu=Xc(Nu.prototype,"adjustEdgeStartAndEnd",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xu=Xc(Nu.prototype,"adjustNodePosition",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Uu=Xc(Nu.prototype,"hideAnchors",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fu=Xc(Nu.prototype,"hoverOutline",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hu=Xc(Nu.prototype,"nodeSelectedOutline",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gu=Xc(Nu.prototype,"edgeSelectedOutline",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yu=Xc(Nu.prototype,"nodeTextEdit",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vu=Xc(Nu.prototype,"edgeTextEdit",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wu=Xc(Nu.prototype,"nodeTextDraggable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$u=Xc(Nu.prototype,"edgeTextDraggable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ku=Xc(Nu.prototype,"metaKeyMultipleSelected",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xc(Nu.prototype,"updateEditConfig",[oe],Object.getOwnPropertyDescriptor(Nu.prototype,"updateEditConfig"),Nu.prototype),Nu);function as(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return us(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?us(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function us(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cs(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ss(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ls(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fs(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}r(6781),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Uc||(Uc={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(Fc||(Fc={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(Hc||(Hc={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Gc||(Gc={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform"}(Yc||(Yc={})),(Wc=Vc||(Vc={})).HORIZONTAL="horizontal",Wc.VERTICAL="vertical",function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}($c||($c={}));var ps=(Kc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ls(this,"MINI_SCALE_SIZE",.2),ls(this,"MAX_SCALE_SIZE",16),cs(this,"SCALE_X",Zc,this),cs(this,"SKEW_Y",qc,this),cs(this,"SKEW_X",Jc,this),cs(this,"SCALE_Y",Qc,this),cs(this,"TRANSLATE_X",ts,this),cs(this,"TRANSLATE_Y",es,this),cs(this,"ZOOM_SIZE",rs,this),this.eventCenter=e}var e,r;return e=t,r=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=as(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=as(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=as(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),!(r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom"),0))}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(Yc.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,r,n){var o=as(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],a=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}],r&&ss(e.prototype,r),t}(),Zc=fs(Kc.prototype,"SCALE_X",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),qc=fs(Kc.prototype,"SKEW_Y",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Jc=fs(Kc.prototype,"SKEW_X",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Qc=fs(Kc.prototype,"SCALE_Y",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ts=fs(Kc.prototype,"TRANSLATE_X",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),es=fs(Kc.prototype,"TRANSLATE_Y",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),rs=fs(Kc.prototype,"ZOOM_SIZE",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),fs(Kc.prototype,"zoom",[oe],Object.getOwnPropertyDescriptor(Kc.prototype,"zoom"),Kc.prototype),fs(Kc.prototype,"resetZoom",[oe],Object.getOwnPropertyDescriptor(Kc.prototype,"resetZoom"),Kc.prototype),fs(Kc.prototype,"translate",[oe],Object.getOwnPropertyDescriptor(Kc.prototype,"translate"),Kc.prototype),fs(Kc.prototype,"focusOn",[oe],Object.getOwnPropertyDescriptor(Kc.prototype,"focusOn"),Kc.prototype),Kc),ys=Object.prototype.hasOwnProperty,hs=function(t){if(!Mi(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Ya(t),r=[];for(var n in t)("constructor"!=n||!e&&ys.call(t,n))&&r.push(n);return r},ds=function(t){return Ka(t)?Ha(t,!0):hs(t)},vs="object"==typeof exports&&exports&&!exports.nodeType&&exports,bs=vs&&"object"==typeof module&&module&&!module.nodeType&&module,gs=bs&&bs.exports===vs?xi.Buffer:void 0,ms=gs?gs.allocUnsafe:void 0,Os=Va(Object.getPrototypeOf,Object),_s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ya(e,ma(t)),t=Os(t);return e}:va,ws=function(t){return da(t,ds,_s)},xs=Object.prototype.hasOwnProperty,Es=function(t){var e=new t.constructor(t.byteLength);return new ca(e).set(new ca(t)),e},Ss=/\w*$/,js=Ei?Ei.prototype:void 0,Ps=js?js.valueOf:void 0,ks=function(t,e,r){var n,o,i,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Es(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var r=e?Es(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?Es(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(i=new(o=t).constructor(o.source,Ss.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=t,Ps?Object(Ps.call(n)):{}}},As=Object.create,Ds=function(){function t(){}return function(e){if(!Mi(e))return{};if(As)return As(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Ts=Ds,Ms=Ba&&Ba.isMap,Ns=Ms?Ra(Ms):function(t){return Oa(t)&&"[object Map]"==hu(t)},Cs=Ba&&Ba.isSet,Rs=Cs?Ra(Cs):function(t){return Oa(t)&&"[object Set]"==hu(t)},Is="[object Arguments]",Ls="[object Function]",zs={};zs[Is]=zs["[object Array]"]=zs["[object ArrayBuffer]"]=zs["[object DataView]"]=zs["[object Boolean]"]=zs["[object Date]"]=zs["[object Float32Array]"]=zs["[object Float64Array]"]=zs["[object Int8Array]"]=zs["[object Int16Array]"]=zs["[object Int32Array]"]=zs["[object Map]"]=zs["[object Number]"]=zs["[object Object]"]=zs["[object RegExp]"]=zs["[object Set]"]=zs["[object String]"]=zs["[object Symbol]"]=zs["[object Uint8Array]"]=zs["[object Uint8ClampedArray]"]=zs["[object Uint16Array]"]=zs["[object Uint32Array]"]=!0,zs["[object Error]"]=zs[Ls]=zs["[object WeakMap]"]=!1;var Bs=function t(e,r,n,o,i,a){var u,c=1&r,s=2&r,l=4&r;if(n&&(u=i?n(e,o,i,a):n(e)),void 0!==u)return u;if(!Mi(e))return e;var f=ha(e);if(f){if(u=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&xs.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(e),!c)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(e,u)}else{var p=hu(e),y=p==Ls||"[object GeneratorFunction]"==p;if(Da(e))return function(t,e){if(e)return t.slice();var r=t.length,n=ms?ms(r):new t.constructor(r);return t.copy(n),n}(e,c);if("[object Object]"==p||p==Is||y&&!i){if(u=s||y?{}:function(t){return"function"!=typeof t.constructor||Ya(t)?{}:Ts(Os(t))}(e),!c)return s?function(t,e){return _c(t,_s(t),e)}(e,function(t,e){return t&&_c(e,ds(e),t)}(u,e)):function(t,e){return _c(t,ma(t),e)}(e,function(t,e){return t&&_c(e,Za(e),t)}(u,e))}else{if(!zs[p])return i?e:{};u=ks(e,p,c)}}a||(a=new ra);var h=a.get(e);if(h)return h;a.set(e,u),Rs(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):Ns(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var d=f?void 0:(l?s?ws:qa:s?ds:Za)(e);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););}(d||e,(function(o,i){d&&(o=e[i=o]),Oc(u,i,t(o,r,n,i,e,a))})),u},Xs=function(t){return Bs(t,5)};function Us(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Us(Object(r),!0).forEach((function(e){Hs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Us(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gs={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},Ys=Fs(Fs({},Gs),{},{width:100,height:80,radius:0}),Vs=Fs(Fs({},Gs),{},{r:50}),Ws=Fs(Fs({},Gs),{},{rx:55,ry:45}),$s=Fs(Fs({},Gs),{},{rx:50,ry:50}),Ks=Fs({},Gs),Zs=Fs(Fs({},Gs),{},{stroke:"#000000",strokeWidth:1,r:4}),qs={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},Js=Fs({},qs),Qs=Fs(Fs({},qs),{},{offset:30}),tl=Fs(Fs({},qs),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),el={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},rl={rect:Ys,circle:Vs,diamond:$s,ellipse:Ws,polygon:Ks,anchor:Zs,text:el,nodeText:Fs(Fs({},el),{},{autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"}),edgeText:{color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:"",background:{fill:"transparent",height:20,stroke:"transparent",radius:0},hoverBackground:null,autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"},line:Js,polyline:Qs,bezier:tl,arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},anchorHover:{fill:"#1E90FF",fillOpacity:.5,stroke:"#4169E1",strokeWidth:1,r:10},snapline:{stroke:"#1E90FF",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#373738",strokeWidth:"2px"}};function nl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ol(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nl(Object(r),!0).forEach((function(e){il(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function il(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var al=function(t){var e=Xs(rl);return t&&Object.keys(t).forEach((function(r){e[r]=ol(ol({},e[r]),t[r])})),e};function ul(t,e){return e*Math.round(t/e)||t}function cl(t,e){return t%e}function sl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ll(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ll(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ll(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var fl,pl=function(t,e,r){var n=sl(t,2),o=n[0],i=n[1],a=sl(e,2),u=a[0],c=a[1],s=sl(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},yl=(r(8178),r(8319),r(1245),r(4069),r(5940),r(8143),r(2506),r(6928),r(1229),r(3105),new Uint8Array(16));function hl(){if(!fl&&!(fl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fl(yl)}for(var dl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,vl=function(t){return"string"==typeof t&&dl.test(t)},bl=[],gl=0;gl<256;++gl)bl.push((gl+256).toString(16).substr(1));var ml=function(t,e,r){var n=(t=t||{}).random||(t.rng||hl)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(bl[t[e+0]]+bl[t[e+1]]+bl[t[e+2]]+bl[t[e+3]]+"-"+bl[t[e+4]]+bl[t[e+5]]+"-"+bl[t[e+6]]+bl[t[e+7]]+"-"+bl[t[e+8]]+bl[t[e+9]]+"-"+bl[t[e+10]]+bl[t[e+11]]+bl[t[e+12]]+bl[t[e+13]]+bl[t[e+14]]+bl[t[e+15]]).toLowerCase();if(!vl(r))throw TypeError("Stringified UUID is invalid");return r}(n)},Ol=function(){return ml()},_l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.nodes.reduce((function(t,r){return t[r.id]=e+ml(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+ml(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},wl=(r(1549),r(9509),function(t,e,r){var n=t.x,o=t.y;return(n-e.x)*(n-r.x)<=0&&(o-e.y)*(o-r.y)<=0});function xl(t){return xl="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},xl(t)}function El(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Sl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?El(Object(r),!0).forEach((function(e){jl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):El(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function jl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pl,kl,Al,Dl,Tl,Ml,Nl,Cl,Rl,Il,Ll,zl,Bl,Xl,Ul,Fl,Hl,Gl,Yl,Vl,Wl,$l,Kl,Zl,ql,Jl=function(t){return t.anchors},Ql=function(t,e){for(var r,n=e.length-1;n>=0;n--)if(nf(t,e[n])){var o=tf(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}return r},tf=function(t,e){for(var r,n=Jl(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=ef(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:Sl(Sl({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},ef=function(t,e,r,n){return Math.hypot(t-r,e-n)},rf=function(t,e){var r=!1,n=of(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},nf=function(t,e){var r=!1,n=of(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},of=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},af=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,a=e.radius;return[{x:r-o/2+a,y:n-i/2+a,r:a},{x:r+o/2-a,y:n-i/2+a,r:a},{x:r-o/2+a,y:n+i/2-a,r:a},{x:r+o/2-a,y:n+i/2-a,r:a}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=ef(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),uf(t,e,n)},uf=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===Vc.HORIZONTAL){var c=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)),s=i+Math.sqrt(u*u-(t.y-a)*(t.y-a));n={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===Vc.VERTICAL){var l=a-Math.sqrt(u*u-(t.x-i)*(t.x-i)),f=a+Math.sqrt(u*u-(t.x-i)*(t.x-i)),p=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;n={x:t.x,y:p}}return n},cf=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,a=r.y-r.height/2+r.radius,u=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>a&&t.y<u),n},sf=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===Vc.HORIZONTAL){var s=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c)),l=i+Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===Vc.VERTICAL){var f=a-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),p=a+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),y=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:y}}return n},lf=function(t,e,r){for(var n,o=r.pointsPosition,i=Number.MAX_SAFE_INTEGER,a=[],u=0;u<o.length;u++)a.push({start:o[u],end:o[(u+1)%o.length]});return a.forEach((function(r){var o=r.start,a=r.end,u=o,c=a;o.x>a.x&&(u=a,c=o);var s,l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);if(l>Number.MAX_SAFE_INTEGER||f>Number.MAX_SAFE_INTEGER?s={x:t.x,y:t.y}:e===Vc.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===Vc.VERTICAL&&(s={x:t.x,y:l*t.x+f}),wl(s,o,a)){var p=ef(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},ff=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},pf=function(t){var e=t.rows,r=t.style,n=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var a=i.clientHeight;return document.body.removeChild(i),a},yf=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=jp(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},hf=function(t){return"object"!==xl(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},df=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},vf=1e3,bf=999,gf=function(){return++vf};function mf(t){return mf="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},mf(t)}function Of(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function _f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}function xf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ef(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Sf=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xf(Object(r),!0).forEach((function(e){Ef(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({sourceNodeId:"",sourceAnchorId:"",targetNodeId:"",targetAnchorId:"",startPoint:null,endPoint:null,zIndex:0,isSelected:!1,isHovered:!1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},points:"",pointsList:[],strokeOpacity:1,hideOutline:!1},rl.line),jf=(Pl=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ef(this,"id",Ol()),Ef(this,"BaseType",Gc.EDGE),Of(this,"state",kl,this),Ef(this,"modelType",Hc.EDGE),Ef(this,"sourceAnchorId",Sf.sourceAnchorId),Ef(this,"targetAnchorId",Sf.targetAnchorId),Ef(this,"customTextPosition",!1),Of(this,"text",Al,this),Of(this,"type",Dl,this),Of(this,"properties",Tl,this),Of(this,"sourceNodeId",Ml,this),Of(this,"targetNodeId",Nl,this),Of(this,"startPoint",Cl,this),Of(this,"endPoint",Rl,this),Of(this,"strokeWidth",Il,this),Of(this,"stroke",Ll,this),Of(this,"strokeDashArray",zl,this),Of(this,"outlineColor",Bl,this),Of(this,"hideOutline",Xl,this),Of(this,"outlineStrokeDashArray",Ul,this),Of(this,"strokeOpacity",Fl,this),Of(this,"zIndex",Hl,this),Of(this,"isSelected",Gl,this),Of(this,"isHovered",Yl,this),Of(this,"isHitable",Vl,this),Of(this,"hoverStroke",Wl,this),Of(this,"selectedStroke",$l,this),Of(this,"points",Kl,this),Of(this,"pointsList",Zl,this),Of(this,"draggable",ql,this),this.graphModel=r,this.setStyleFromTheme(n,r),this.initEdgeData(e),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(e)}var e,r;return e=t,r=[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}Ac(this,Tp(t)),this.graphModel.overlapMode===$c.INCREASE&&(this.zIndex=t.zIndex||gf())}},{key:"createId",value:function(){return null}},{key:"setAttributes",value:function(){}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"move",value:function(){}},{key:"getBeginAnchor",value:function(t,e){var r,n;return Jl(t).forEach((function(t){var o=Mp(t,e);n?o<n&&(n=o,r=t):(n=o,r=t)})),r}},{key:"getEndAnchor",value:function(t){var e,r,n=this;return Jl(t).forEach((function(t){var o=Mp(t,n.startPoint);r?o<r&&(r=o,e=t):(r=o,e=t)})),e}},{key:"getProperties",value:function(){return we(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,o={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:we(this.properties)};return n&&(o.text={x:e,y:r,value:n}),this.graphModel.overlapMode===$c.INCREASE&&(o.zIndex=this.zIndex),o}},{key:"setProperty",value:function(t,e){this.properties[t]=df(e),this.setAttributes()}},{key:"setProperties",value:function(t){Object.assign(this.properties,df(t)),this.setAttributes()}},{key:"updateData",value:function(t){var e=df(Ic(t,"type","sourceNodeId","targetNodeId","startPoint","endPoint","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text){var u={value:e.text,draggable:i,editable:a},c=this.textPosition;e.text=n||o?Object.assign({},u,{x:n,y:o}):Object.assign({},u,c)}else if("object"===mf(e.text)){var s=Object.assign({},this.text,e.text);e.text=Ic(s,"x","y","value","draggable","editable")}Ac(this,e)}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,r=t.y;this.text.x=e,this.text.y=r}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,draggable:a,x:n+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&Ac(this.text,t)}},{key:"updateText",value:function(t){var e=this.text,r=e.x,n=e.y,o=e.draggable,i=e.editable;this.text={x:r,y:n,draggable:o,editable:i,value:t}}},{key:"setAnchors",value:function(){if(!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=t}if(!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint=e}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateStrokeWidth",value:function(t){this.strokeWidth=t}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&Ac(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sf.zIndex;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Ac(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}],r&&_f(e.prototype,r),t}(),kl=wf(Pl.prototype,"state",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Al=wf(Pl.prototype,"text",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.text}}),Dl=wf(Pl.prototype,"type",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Tl=wf(Pl.prototype,"properties",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ml=wf(Pl.prototype,"sourceNodeId",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.sourceNodeId}}),Nl=wf(Pl.prototype,"targetNodeId",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.targetNodeId}}),Cl=wf(Pl.prototype,"startPoint",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.startPoint}}),Rl=wf(Pl.prototype,"endPoint",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.endPoint}}),Il=wf(Pl.prototype,"strokeWidth",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.strokeWidth}}),Ll=wf(Pl.prototype,"stroke",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.stroke}}),zl=wf(Pl.prototype,"strokeDashArray",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.strokeDashArray}}),Bl=wf(Pl.prototype,"outlineColor",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.outlineColor}}),Xl=wf(Pl.prototype,"hideOutline",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.hideOutline}}),Ul=wf(Pl.prototype,"outlineStrokeDashArray",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.outlineStrokeDashArray}}),Fl=wf(Pl.prototype,"strokeOpacity",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.strokeOpacity}}),Hl=wf(Pl.prototype,"zIndex",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.zIndex}}),Gl=wf(Pl.prototype,"isSelected",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.isSelected}}),Yl=wf(Pl.prototype,"isHovered",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.isHovered}}),Vl=wf(Pl.prototype,"isHitable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wl=wf(Pl.prototype,"hoverStroke",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.hoverStroke}}),$l=wf(Pl.prototype,"selectedStroke",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.selectedStroke}}),Kl=wf(Pl.prototype,"points",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.points}}),Zl=wf(Pl.prototype,"pointsList",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sf.pointsList}}),ql=wf(Pl.prototype,"draggable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),wf(Pl.prototype,"sourceNode",[ut],Object.getOwnPropertyDescriptor(Pl.prototype,"sourceNode"),Pl.prototype),wf(Pl.prototype,"targetNode",[ut],Object.getOwnPropertyDescriptor(Pl.prototype,"targetNode"),Pl.prototype),wf(Pl.prototype,"textPosition",[ut],Object.getOwnPropertyDescriptor(Pl.prototype,"textPosition"),Pl.prototype),wf(Pl.prototype,"setProperty",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setProperty"),Pl.prototype),wf(Pl.prototype,"setProperties",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setProperties"),Pl.prototype),wf(Pl.prototype,"updateData",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateData"),Pl.prototype),wf(Pl.prototype,"formatText",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"formatText"),Pl.prototype),wf(Pl.prototype,"resetTextPosition",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"resetTextPosition"),Pl.prototype),wf(Pl.prototype,"moveText",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"moveText"),Pl.prototype),wf(Pl.prototype,"setText",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setText"),Pl.prototype),wf(Pl.prototype,"updateText",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateText"),Pl.prototype),wf(Pl.prototype,"setAnchors",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setAnchors"),Pl.prototype),wf(Pl.prototype,"setSelected",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setSelected"),Pl.prototype),wf(Pl.prototype,"setHovered",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setHovered"),Pl.prototype),wf(Pl.prototype,"setHitable",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setHitable"),Pl.prototype),wf(Pl.prototype,"setElementState",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setElementState"),Pl.prototype),wf(Pl.prototype,"updateStroke",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateStroke"),Pl.prototype),wf(Pl.prototype,"updateStrokeWidth",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateStrokeWidth"),Pl.prototype),wf(Pl.prototype,"updateStartPoint",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateStartPoint"),Pl.prototype),wf(Pl.prototype,"updateEndPoint",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateEndPoint"),Pl.prototype),wf(Pl.prototype,"setStyleFromTheme",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setStyleFromTheme"),Pl.prototype),wf(Pl.prototype,"setZIndex",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"setZIndex"),Pl.prototype),wf(Pl.prototype,"initPoints",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"initPoints"),Pl.prototype),wf(Pl.prototype,"updateAttributes",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateAttributes"),Pl.prototype),wf(Pl.prototype,"getAdjustStart",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"getAdjustStart"),Pl.prototype),wf(Pl.prototype,"getAdjustEnd",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"getAdjustEnd"),Pl.prototype),wf(Pl.prototype,"updateAfterAdjustStartAndEnd",[oe],Object.getOwnPropertyDescriptor(Pl.prototype,"updateAfterAdjustStartAndEnd"),Pl.prototype),Pl),Pf=jf;function kf(t){return kf="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},kf(t)}function Af(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Df(t,e){return Df=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Df(t,e)}function Tf(t,e){if(e&&("object"===kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mf(t)}function Mf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}var Cf,Rf,If=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Df(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Nf(n);if(o){var r=Nf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Tf(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=Mf(r=i.call(this,t,e,"line")),o="modelType",u=Hc.LINE_EDGE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,r}return e=a,(r=[{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Af(e.prototype,r),a}(Pf);function Lf(t){return Lf="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},Lf(t)}function zf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xf(){return Xf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Uf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xf.apply(this,arguments)}function Uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yf(t)););return t}function Ff(t,e){return Ff=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ff(t,e)}function Hf(t,e){if(e&&("object"===Lf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Gf(t)}function Gf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yf(t){return Yf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yf(t)}function Vf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}r(4565);var $f=(Cf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ff(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Yf(n);if(o){var r=Yf(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Hf(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),Vf(Gf(r=i.call(this,t,e,"polyline")),"modelType",Hc.POLYLINE_EDGE),Vf(Gf(r),"offset",rl.polyline.offset),n=Gf(r),o=Rf,u=Gf(r),o&&Object.defineProperty(n,"dbClickPosition",{enumerable:o.enumerable,configurable:o.configurable,writable:o.writable,value:o.initializer?o.initializer.call(u):void 0}),r}return e=a,r=[{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n,o,i=xp(this.points),a=(n=gp(i),o=2,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(n,o)||function(t,e){if(t){if("string"==typeof t)return zf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zf(t,e):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],c=a[1];return{x:(u.x+c.x)/2,y:(u.y+c.y)/2}}},{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===Vc.HORIZONTAL?i=Math.abs(e.y-r.y):t===Vc.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCorssPoint",value:function(t,e,r){var n;return t===Vc.HORIZONTAL?n={x:r.x,y:e.y}:t===Vc.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],a=n[t-1];if(mp(a,o,this.sourceNode)){if(Op(o,i,this.sourceNode)){var u=_p(o,i,this.sourceNode);u&&(n[t]=u,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===a.x&&e.x===o.x||e.y===a.y&&e.y===o.y)&&ef(e.x,e.y,o.x,o.y)<ef(a.x,a.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],s=n[e],l=n[e+1];if(mp(s,l,this.targetNode)){if(Op(c,s,this.targetNode)){var f=_p(c,s,this.targetNode);f&&(n[e]=f,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&ef(t.x,t.y,s.x,s.y)<ef(l.x,l.y,s.x,s.y)&&(n[e+1]=t)}))}return n}},{key:"getDragingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,r,n),u=this.getCorssPoint(t,r,a);return"start"===e?(i.unshift(u),i.unshift(a)):(i.push(u),i.push(a)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],a=this.sourceNode,u=this.targetNode,c=a.modelType,s=u.modelType,l=wp(r,n),f=e[0];switch(c){case Hc.RECT_NODE:0!==a.radius&&(cf(r,a)||(f=af(r,l,a)));break;case Hc.CIRCLE_NODE:f=uf(r,l,a);break;case Hc.ELLIPSE_NODE:f=sf(r,l,a);break;case Hc.DIAMOND_NODE:case Hc.POLYGON_NODE:f=lf(r,l,a)}e[0]=f;var p=wp(o,i),y=e[e.length-1];switch(s){case Hc.RECT_NODE:0!==u.radius&&(cf(i,u)||(y=af(i,p,u)));break;case Hc.CIRCLE_NODE:y=uf(i,p,u);break;case Hc.ELLIPSE_NODE:y=sf(i,p,u);break;case Hc.DIAMOND_NODE:case Hc.POLYGON_NODE:y=lf(i,p,u)}return e[e.length-1]=y,e}},{key:"getData",value:function(){var t=Xf(Yf(a.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=bp({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===Vc.HORIZONTAL?(u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map((function(t){return t}))):a===Vc.VERTICAL&&(u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrage(c),this.draginngPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppend",value:function(t,e){var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===Vc.HORIZONTAL){u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:r.x,y:r.y+e.y};if(!rf(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDragingPoints(a,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!rf(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=vp(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===Vc.VERTICAL){u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y};var y=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(y=this.removeCrossPoints(o,i,y)),0===o){var h={x:r.x+e.x,y:r.y};if(!rf(h,this.sourceNode)){var d=this.sourceNode.anchors;y=this.getDragingPoints(a,"start",h,d,y)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!rf(v,this.targetNode)){var b=this.targetNode.anchors;y=this.getDragingPoints(a,"end",v,b,y)}}y=vp(y),this.updatePointsAfterDrage(y),this.draginngPointList=y}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var t=xp(this.points);this.pointsList=t.map((function(t){return t})),this.draginngPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}}},{key:"updatePointsAfterDrage",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=bp({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}],r&&Bf(e.prototype,r),a}(Pf),Rf=Wf(Cf.prototype,"dbClickPosition",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Wf(Cf.prototype,"initPoints",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"initPoints"),Cf.prototype),Wf(Cf.prototype,"updatePoints",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"updatePoints"),Cf.prototype),Wf(Cf.prototype,"updateStartPoint",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"updateStartPoint"),Cf.prototype),Wf(Cf.prototype,"updateEndPoint",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"updateEndPoint"),Cf.prototype),Wf(Cf.prototype,"dragAppendStart",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"dragAppendStart"),Cf.prototype),Wf(Cf.prototype,"dragAppendSimple",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"dragAppendSimple"),Cf.prototype),Wf(Cf.prototype,"dragAppend",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"dragAppend"),Cf.prototype),Wf(Cf.prototype,"dragAppendEnd",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"dragAppendEnd"),Cf.prototype),Wf(Cf.prototype,"updatePointsAfterDrage",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"updatePointsAfterDrage"),Cf.prototype),Wf(Cf.prototype,"getAdjustStart",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"getAdjustStart"),Cf.prototype),Wf(Cf.prototype,"getAdjustEnd",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"getAdjustEnd"),Cf.prototype),Wf(Cf.prototype,"updateAfterAdjustStartAndEnd",[oe],Object.getOwnPropertyDescriptor(Cf.prototype,"updateAfterAdjustStartAndEnd"),Cf.prototype),Cf),Kf=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(a.leftX=e.x+s*Math.sin(u+c),a.leftY=e.y-s*Math.cos(u+c),a.rightX=e.x-s*Math.sin(u-c),a.rightY=e.y+s*Math.cos(u-c)):(a.leftX=e.x-s*Math.sin(u+c),a.leftY=e.y+s*Math.cos(u+c),a.rightX=e.x+s*Math.sin(u-c),a.rightY=e.y-s*Math.cos(u-c)):"end"===i&&(r.x>=e.x?(a.leftX=r.x+s*Math.sin(u-c),a.leftY=r.y-s*Math.cos(u-c),a.rightX=r.x-s*Math.sin(u+c),a.rightY=r.y+s*Math.cos(u+c)):(a.leftX=r.x-s*Math.sin(u-c),a.leftY=r.y+s*Math.cos(u-c),a.rightX=r.x+s*Math.sin(u+c),a.rightY=r.y-s*Math.cos(u+c))),a};function Zf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zf(Object(r),!0).forEach((function(e){Jf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qf(t){return Qf="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},Qf(t)}function tp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||ep(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ep(t,e){if(t){if("string"==typeof t)return rp(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rp(t,e):void 0}}function rp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var np=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},op=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},ip=function(t,e){var r=function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?Vc.HORIZONTAL:Vc.VERTICAL}(e,t);return r===Vc.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},ap=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},up=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),a=Math.min.apply(Math,n),u=Math.max.apply(Math,n),c=i-o,s=u-a;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(a+u)/2,maxX:i,maxY:u,minX:o,minY:a,x:(o+i)/2,y:(a+u)/2,height:s,width:c}},cp=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},sp=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},lp=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},fp=function(t,e,r,n,o){return lp(t,e)+lp(t,r)+function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r}(t,[e,r,n,o])},pp=function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)},yp=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,a=n.x-r.x,u=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-a*i+o*u),s=(a*(t.y-r.y)-u*(t.x-r.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},hp=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=tp(cp(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return yp(t,e,o,i)||yp(t,e,o,u)||yp(t,e,i,a)||yp(t,e,a,u)},dp=function(t){return of(t)},vp=function(t){for(var e=t,r=1;r<e.length-1;){var n=e[r-1],o=e[r],i=e[r+1];n.x===o.x&&o.x===i.x||n.y===o.y&&o.y===i.y?e.splice(r,1):r++}return e},bp=function(t,e,r,n,o){var i,a,u,c=dp(r),s=dp(n),l=op(c,o),f=op(s,o),p=ip(l,t),y=ip(f,e);if(i=l,a=f,2*Math.abs(i.centerX-a.centerX)<i.width+a.width&&2*Math.abs(i.centerY-a.centerY)<i.height+a.height){var h=Ep(t,e,p,y);return[t,p].concat(function(t){if(Array.isArray(t))return rp(t)}(u=h)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(u)||ep(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[y,e])}var d=up([p,y]),v=ap(l,d),b=ap(f,d),g=[];g=(g=g.concat(cp(v))).concat(cp(b));var m={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[d,v,b].forEach((function(t){g=g.concat(function(t,e){return function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]}(t,e.x).concat(function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]}(t,e.y))}(t,m).filter((function(t){return sp(t,l)&&sp(t,f)})))})),[{x:p.x,y:y.y},{x:y.x,y:p.y}].forEach((function(t){sp(t,l)&&sp(t,f)&&g.push(t)})),g.unshift(p),g.push(y);var O=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=fp(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var y=function(){var y,h,d,v=void 0,b=1/0;if(c.forEach((function(t){f[t.id]<b&&(b=f[t.id],v=t)})),v===r){var g=[];return pp(g,p,s,r.id),{v:g}}h=v,(d=(y=c).indexOf(h))>-1&&y.splice(d,1),u.push(v),function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||hp(t,e,r)||hp(t,e,n)||o.push(t))})),np(o)}(t,v,n,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[v.id]+lp(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+fp(t,r,e,i,a))}}))};c.length;){var h=y();if("object"===Qf(h))return h.v}return[e,r]}(g=np(g),p,y,c,s,t,e);return O.unshift(t),O.push(e),O.length>2&&(O=vp(O)),np(O)},gp=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=ef(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=ef(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},mp=function(t,e,r){var n=rf(t,r),o=rf(e,r);return n&&o},Op=function(t,e,r){var n=rf(t,r),o=rf(e,r);return!(n&&o)&&(n||o)},_p=function(t,e,r){for(var n,o,i=of(r),a=cp(i),u=0;u<a.length;u++)yp(t,e,a[u],a[(u+1)%a.length])&&(o=[a[u],a[(u+1)%a.length]]);return o&&(n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,a=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(a-r.y)*(a-n.y)<=0&&{x:i,y:a}}(t,e,o[0],o[1])),n},wp=function(t,e){var r;return t.x===e.x?r=Vc.VERTICAL:t.y===e.y&&(r=Vc.HORIZONTAL),r},xp=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=tp(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Ep=function(t,e,r,n){var o=[];if(wp(t,r)===wp(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{var i={x:r.x,y:n.y},a=wl(i,t,r),u=wl(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=Sp(i,t,r),s=Sp(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Sp=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},jp=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Pp=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=of(n),u=of(o),c=op(a,i),s=op(u,i);return{sNext:ip(c,e),ePre:ip(s,r)}},kp=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Ap(e[0]),Ap(e[1]),Ap(e[2]),Ap(e[3])]},Ap=function(t){var e=tp(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Dp=function(t,e){for(var r,n=t.x,o=t.y,i=xp(e),a=Number.MAX_SAFE_INTEGER,u=[],c=0;c<i.length;c++)u.push({start:i[c],end:i[(c+1)%i.length]});if(u.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var u={x:e.x,y:o};if(wl(u,e,i)){var c=Math.abs(e.x-n);c<a&&(a=c,r=u)}}else if(e.y===i.y){var s={x:n,y:e.y};if(wl(s,e,i)){var l=Math.abs(e.y-o);l<a&&(a=l,r=s)}}})),!r){var s=u[0],l=s.start,f=s.end;r={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return r},Tp=function(t){return Ic(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Mp=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Np=function(){};function Cp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ip=window.document;function Lp(t){var e=t.onDragStart,r=void 0===e?Np:e,n=t.onDraging,o=void 0===n?Np:n,i=t.onDragEnd,a=void 0===i?Np:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,p=!1,y=0,h=0,d=0,v=0;function b(t){if(l&&t.stopPropagation(),p&&(f=!0,d+=t.clientX-y,v+=t.clientY-h,y=t.clientX,h=t.clientY,Math.abs(d)>c||Math.abs(v)>c)){var e=d%c,r=v%c,n=d-e,i=v-r;d=e,v=r,o({deltaX:n,deltaY:i,event:t})}}function g(t){if(l&&t.stopPropagation(),p=!1,Ip.removeEventListener("mousemove",b,!1),Ip.removeEventListener("mouseup",g,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),p=!0,y=t.clientX,h=t.clientY,Ip.addEventListener("mousemove",b,!1),Ip.addEventListener("mouseup",g,!1),r({event:t})}}var zp,Bp,Xp,Up,Fp,Hp,Gp,Yp,Vp,Wp,$p,Kp,Zp,qp,Jp,Qp,ty,ey,ry=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?Np:n,i=e.onDraging,a=void 0===i?Np:i,u=e.onDragEnd,c=void 0===u?Np:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,y=e.step,h=void 0===y?1:y,d=e.isStopPropagation,v=void 0===d||d,b=e.model,g=void 0===b?null:b;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Rp(this,"isDraging",!1),Rp(this,"isStartDraging",!1),Rp(this,"startX",0),Rp(this,"startY",0),Rp(this,"sumDeltaX",0),Rp(this,"sumDeltaY",0),Rp(this,"handleMouseDown",(function(t){var e,n,o;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDraging=!0,r.startX=t.clientX,r.startY=t.clientY,Ip.addEventListener("mousemove",r.handleMouseMove,!1),Ip.addEventListener("mouseup",r.handleMouseUp,!1),r.onDragStart({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(Yc["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(Yc["".concat(r.eventType,"_DRAGSTART")],{e:t,data:i}),r.startTime=(new Date).getTime()}})),Rp(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDraging&&(r.isDraging=!0,r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n,o,i=r.sumDeltaX%r.step,a=r.sumDeltaY%r.step,u=r.sumDeltaX-i,c=r.sumDeltaY-a;r.sumDeltaX=i,r.sumDeltaY=a,r.onDraging({deltaX:u,deltaY:c,event:t});var s=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(Yc["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:s}),null===(o=r.eventCenter)||void 0===o||o.emit(Yc["".concat(r.eventType,"_DRAG")],{e:t,data:s})}})),Rp(this,"handleMouseUp",(function(t){var e,n,o;if(r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),Ip.removeEventListener("mousemove",r.handleMouseMove,!1),Ip.removeEventListener("mouseup",r.handleMouseUp,!1),r.isDraging){r.isDraging=!1,r.onDragEnd({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(Yc["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(Yc["".concat(r.eventType,"_DROP")],{e:t,data:i})}})),this.onDragStart=o,this.onDraging=a,this.onDragEnd=c,this.step=h,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=g}var e,r;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&Cp(e.prototype,r),t}();function ny(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ny(Object(r),!0).forEach((function(e){sy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ny(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function iy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ay(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function uy(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function cy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ly(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var fy,py=(zp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),sy(this,"BaseType",Gc.GRAPH),sy(this,"modelType",Hc.GRAPH),sy(this,"modelMap",new Map),sy(this,"nodeMoveRules",[]),uy(this,"edgeType",Bp,this),uy(this,"nodes",Xp,this),uy(this,"activeElement",Up,this),uy(this,"activeElementState",Fp,this),uy(this,"state",Hp,this),uy(this,"additionStateData",Gp,this),uy(this,"edges",Yp,this),uy(this,"isSlient",Vp,this),uy(this,"overlapMode",Wp,this),uy(this,"plugins",$p,this),uy(this,"tools",Kp,this),uy(this,"background",Zp,this),uy(this,"transformMatrix",qp,this),uy(this,"editConfig",Jp,this),uy(this,"gridSize",Qp,this),uy(this,"partial",ty,this),uy(this,"fakerNode",ey,this);var r=e.container,n=e.background,o=void 0===n?{}:n,i=e.grid,a=(i=void 0===i?{}:i).size,u=void 0===a?1:a,c=e.isSilentMode,s=void 0!==c&&c,l=e.eventCenter,f=e.idGenerator;this.background=o,this.isSlient=s,this.gridSize=u,this.rootEl=r,this.editConfig=new is(e),this.eventCenter=l,this.transformMatrix=new ps(l),this.theme=al(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=f}var e,r;return e=t,r=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],r=-1,n=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];this.partial&&!this.isElementInArea(a,n,o,!1)||(9999===a.zIndex&&(r=e.length),e.push(a))}if(-1!==r){var u=e[e.length-1];e[e.length-1]=e[r],e[r]=u}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===Uc.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===Uc.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"getAreaElement",value:function(t,e){var r=[],n=[];this.nodes.forEach((function(t){return n.push(t)})),this.edges.forEach((function(t){return n.push(t)}));for(var o=0;o<n.length;o++){var i=n[o];this.isElementInArea(i,t,e)&&r.push(i)}return r}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModel",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=iy(this.transformMatrix.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.BaseType===Gc.NODE){for(var o=of(t=t),i=o.minX,a=o.minY,u=o.maxX,c=o.maxY,s=[{x:i,y:a},{x:u,y:a},{x:u,y:c},{x:i,y:c}],l=!0,f=0;f<s.length;f++){var p=s[f],y=p.x,h=p.y,d=this.transformMatrix.CanvasPointToHtmlPoint([y,h]),v=iy(d,2);if(y=v[0],h=v[1],!pl([y,h],e,r)){l=!1;break}}return l}if(t.BaseType===Gc.EDGE){var b=t=t,g=b.startPoint,m=b.endPoint,O=this.transformMatrix.CanvasPointToHtmlPoint([g.x,g.y]),_=this.transformMatrix.CanvasPointToHtmlPoint([m.x,m.y]),w=pl(O,e,r),x=pl(_,e,r);return n?w&&x:w||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=vc(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=ul(n,e.gridSize),t.y=ul(o,e.gridSize),"[object Object]"===Object.prototype.toString.call(t.text)&&(t.text.x-=cl(n,e.gridSize),t.text.y-=cl(o,e.gridSize))),new r(t,e)})),this.edges=vc(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)}))}},{key:"modelToGraphData",value:function(){var t=this.edges.map((function(t){return t.getData()}));return{nodes:this.nodes.map((function(t){return t.getData()})),edges:t}}},{key:"getEdgeModel",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.getNodeModel(t)||this.getEdgeModel(t)}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===Gc.NODE&&r.nodes.push(n.getData()),n.BaseType===Gc.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=Ol()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),!1):this.nodesMap[t]?(this.edges.forEach((function(r){r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)})),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),!1)}},{key:"changeEdgeId",value:function(t,e){return e||(e=Ol()),this.edgesMap[e]?(console.warn("当前流程图已存在连线: ".concat(e,", 修改失败")),!1):this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&(r.id=e)})),e):(console.warn("当前流程图找不到连线: ".concat(e,", 修改失败")),!1)}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"updateEdgeByIndex",value:function(t,e){this.edges[t]=oy(oy({},this.edges[t]),e)}},{key:"toFront",value:function(t){var e,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),this.topElement=o,o.setZIndex(9999))}},{key:"setElementZIndex",value:function(t,e){var r,n,o,i=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=gf()),"bottom"===e&&(o=--bf),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.removeEdgeBySource(t),this.removeEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(Yc.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=df(t);e.id&&this.nodesMap[t.id]&&delete e.id;var r=this.getModel(e.type);if(!r)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var n=new r(e,this);this.nodes.push(n);var o=n.getData();return this.eventCenter.emit(Yc.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModel(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model;i.move(e,r,n),this.moveEdge(t,e,r)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"moveNode2Coordinate",value:function(t,e,r){var n=this.nodesMap[t];if(n){var o=n.model,i=e-o.x,a=r-o.y;this.moveNode(t,i,a)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"setTextEditable",value:function(t){this.setElementStateById(t,Uc.TEXT_EDIT)}},{key:"createEdge",value:function(t){var e=df(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的连线,请确认是否已注册此类型连线。"));var o=new n(oy(oy({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(Yc.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o,i=this.edges[n],a=i.textPosition,u=a.x,c=a.y,s=this.edges[n].sourceNodeId===t,l=this.edges[n].targetNodeId===t;if(s&&i.updateStartPoint({x:i.startPoint.x+e,y:i.startPoint.y+r}),l&&i.updateEndPoint({x:i.endPoint.x+e,y:i.endPoint.y+r}),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===Hc.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=Dp(f,i.points);i.moveText(p.x-f.x,p.y-f.y)}else{var y=i.textPosition,h=y.x,d=y.y;i.moveText(h-u,d-c)}}}},{key:"removeEdge",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(Yc.EDGE_DELETE,{data:n})}}},{key:"removeEdgeById",value:function(t){var e=this.edgesMap[t].index;if(this.edgesMap[t]){var r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(Yc.EDGE_DELETE,{data:r})}}},{key:"removeEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(Yc.EDGE_DELETE,{data:r})}}},{key:"removeEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(Yc.EDGE_DELETE,{data:r})}}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setElementStateById",value:function(t,e,r){this.resetElementState(),this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Uc.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Uc.DEFAULT)}))}},{key:"setElementTextById",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"resetElementState",value:function(){}},{key:"selectNodeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o||(null===(n=this.selectElement)||void 0===n||n.setSelected(!1),this.clearSelectElements()),this.selectElement=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model,null===(r=this.selectElement)||void 0===r||r.setSelected(!0)}},{key:"selectElementById",value:function(t){var e,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||(null===(r=this.selectElement)||void 0===r||r.setSelected(!1),this.clearSelectElements()),this.selectElement=this.getElement(t),null===(e=this.selectElement)||void 0===e||e.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode!==$c.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveElements",value:function(t,e,r){var n=this;t.nodes.forEach((function(t){return n.moveNode(t.id,e,r)}))}},{key:"moveNodes",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach((function(t){return n.moveNode(t,e,r,o)}))}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var r=this.getNodeModel(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=ff(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=ff(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModel(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}else console.warn("找不到id为".concat(t,"的连线"))}},{key:"setTheme",value:function(t){this.theme=al(oy(oy({},this.theme),t))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}],r&&cy(e.prototype,r),t}(),Bp=ly(zp.prototype,"edgeType",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xp=ly(zp.prototype,"nodes",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Up=ly(zp.prototype,"activeElement",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fp=ly(zp.prototype,"activeElementState",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hp=ly(zp.prototype,"state",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gp=ly(zp.prototype,"additionStateData",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yp=ly(zp.prototype,"edges",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Vp=ly(zp.prototype,"isSlient",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wp=ly(zp.prototype,"overlapMode",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),$p=ly(zp.prototype,"plugins",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Kp=ly(zp.prototype,"tools",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Zp=ly(zp.prototype,"background",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qp=ly(zp.prototype,"transformMatrix",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jp=ly(zp.prototype,"editConfig",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qp=ly(zp.prototype,"gridSize",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ty=ly(zp.prototype,"partial",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ey=ly(zp.prototype,"fakerNode",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ly(zp.prototype,"nodesMap",[ut],Object.getOwnPropertyDescriptor(zp.prototype,"nodesMap"),zp.prototype),ly(zp.prototype,"edgesMap",[ut],Object.getOwnPropertyDescriptor(zp.prototype,"edgesMap"),zp.prototype),ly(zp.prototype,"sortElements",[ut],Object.getOwnPropertyDescriptor(zp.prototype,"sortElements"),zp.prototype),ly(zp.prototype,"textEditElement",[ut],Object.getOwnPropertyDescriptor(zp.prototype,"textEditElement"),zp.prototype),ly(zp.prototype,"selectElements",[ut],Object.getOwnPropertyDescriptor(zp.prototype,"selectElements"),zp.prototype),ly(zp.prototype,"setFakerNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setFakerNode"),zp.prototype),ly(zp.prototype,"removeFakerNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"removeFakerNode"),zp.prototype),ly(zp.prototype,"setModel",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setModel"),zp.prototype),ly(zp.prototype,"updateEdgeByIndex",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"updateEdgeByIndex"),zp.prototype),ly(zp.prototype,"toFront",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"toFront"),zp.prototype),ly(zp.prototype,"setElementZIndex",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setElementZIndex"),zp.prototype),ly(zp.prototype,"deleteNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"deleteNode"),zp.prototype),ly(zp.prototype,"addNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"addNode"),zp.prototype),ly(zp.prototype,"cloneNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"cloneNode"),zp.prototype),ly(zp.prototype,"moveNode",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"moveNode"),zp.prototype),ly(zp.prototype,"moveNode2Coordinate",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"moveNode2Coordinate"),zp.prototype),ly(zp.prototype,"setTextEditable",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setTextEditable"),zp.prototype),ly(zp.prototype,"createEdge",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"createEdge"),zp.prototype),ly(zp.prototype,"moveEdge",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"moveEdge"),zp.prototype),ly(zp.prototype,"removeEdge",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"removeEdge"),zp.prototype),ly(zp.prototype,"removeEdgeById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"removeEdgeById"),zp.prototype),ly(zp.prototype,"removeEdgeBySource",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"removeEdgeBySource"),zp.prototype),ly(zp.prototype,"removeEdgeByTarget",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"removeEdgeByTarget"),zp.prototype),ly(zp.prototype,"setElementState",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setElementState"),zp.prototype),ly(zp.prototype,"setElementStateById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setElementStateById"),zp.prototype),ly(zp.prototype,"setElementTextById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setElementTextById"),zp.prototype),ly(zp.prototype,"resetElementState",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"resetElementState"),zp.prototype),ly(zp.prototype,"selectNodeById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"selectNodeById"),zp.prototype),ly(zp.prototype,"selectEdgeById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"selectEdgeById"),zp.prototype),ly(zp.prototype,"selectElementById",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"selectElementById"),zp.prototype),ly(zp.prototype,"clearSelectElements",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"clearSelectElements"),zp.prototype),ly(zp.prototype,"moveElements",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"moveElements"),zp.prototype),ly(zp.prototype,"moveNodes",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"moveNodes"),zp.prototype),ly(zp.prototype,"setDefaultEdgeType",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setDefaultEdgeType"),zp.prototype),ly(zp.prototype,"changeNodeType",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"changeNodeType"),zp.prototype),ly(zp.prototype,"changeEdgeType",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"changeEdgeType"),zp.prototype),ly(zp.prototype,"setTheme",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"setTheme"),zp.prototype),ly(zp.prototype,"clearData",[oe],Object.getOwnPropertyDescriptor(zp.prototype,"clearData"),zp.prototype),zp),yy=py;function hy(t){return hy="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},hy(t)}function dy(){return dy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dy.apply(this,arguments)}function vy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function by(t,e){return by=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},by(t,e)}function gy(t,e){if(e&&("object"===hy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return my(t)}function my(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Oy(t){return Oy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oy(t)}function _y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wy,xy=bx(fy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&by(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Oy(n);if(o){var r=Oy(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return gy(this,t)});function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),_y(my(e=i.call(this)),"stepScrollX",0),_y(my(e),"stepScrollY",0),_y(my(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformMatrix;o.editConfig.stopMoveGraph||i.translate(r,n)})),_y(my(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),_y(my(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfig,i=n.transformMatrix,a=n.gridSize,u=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var y=e.stepScrollX%a,h=e.stepScrollX-y;i.translate(-h*i.SCALE_X,0),e.stepScrollX=y}if(Math.abs(e.stepScrollY)>=a){var d=e.stepScrollY%a,v=e.stepScrollY-d;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=d}}})),_y(my(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.textEditElement;n.selectElements.size>0&&n.clearSelectElements(),i&&i.setElementState(Uc.DEFAULT),o.emit(Yc.BLANK_CLICK,{e:t})}})),_y(my(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props,n=r.graphModel,o=r.eventCenter,i=n.getPointByClient({x:t.clientX,y:t.clientY});n.setElementState(Uc.SHOW_MENU,i.domOverlayPosition),o.emit(Yc.BLANK_CONTEXTMENU,{e:t,position:i})}})),_y(my(e),"mouseDownHandler",(function(t){var r=e.props,n=r.eventCenter,o=r.graphModel,i=o.editConfig,a=o.transformMatrix.SCALE_X,u=o.gridSize;i.stopMoveGraph?n.emit(Yc.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(u*a),e.stepDrag.handleMouseDown(t)),e.clickHandler(t)}));var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new ry({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"BLANK",eventCenter:n,model:null}),e.state={isDraging:!1},e}return e=a,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformMatrix.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDraging;return Sr("svg",dy({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-dragging":"lf-drag-able"},n.eventMap()),Sr("g",{transform:t},r))}}])&&vy(e.prototype,r),a}(kr))||fy,Ey=xy;function Sy(t){return Sy="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},Sy(t)}function jy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Py(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ky(t,e){return ky=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ky(t,e)}function Ay(t,e){if(e&&("object"===Sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Dy(t)}function Dy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ty(t){return Ty=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ty(t)}function My(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ny=bx(wy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ky(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ty(n);if(o){var r=Ty(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ay(this,t)});function a(){var t;jy(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return My(Dy(t=i.call.apply(i,[this].concat(r))),"setToolOverlayRef",(function(e){var r=t.props.tool.getInstance();r.components.forEach((function(t){return t(r,e)})),r.components=[]})),t}return e=a,(r=[{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Sr(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return Sr("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&Py(e.prototype,r),a}(kr))||wy;function Cy(t){return Cy="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},Cy(t)}function Ry(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Iy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ly(t,e){return Ly=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ly(t,e)}function zy(t,e){if(e&&("object"===Cy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function By(t){return By=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},By(t)}r(7789);var Xy,Uy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ly(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=By(n);if(o){var r=By(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return zy(this,t)});function a(){return Ry(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=this.props.background,e=t.image,r=void 0===e?"":e,n=t.color,o=void 0===n?"":n,i=t.repeat,a=void 0===i?"no-repeat":i,u=t.position,c=void 0===u?"center":u,s=t.size,l=void 0===s?"auto auto":s,f=t.opacity,p=void 0===f?1:f;return o?{color:o,opacity:p,image:"none"}:r?{image:"url(".concat(r,")"),repeat:a,position:c,size:l,opacity:p}:{}}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.image,r=t.color,n=t.repeat,o=t.size;return Sr("div",{className:"lf-background"},Sr("div",{style:{backgroundImage:e,backgroundColor:r,backgroundRepeat:n,backgroundPosition:t.position,backgroundSize:o,opacity:t.opacity},className:"lf-background-area"}))}},{key:"render",value:function(){return this.getShape()}}])&&Iy(e.prototype,r),a}(kr);function Fy(t){return Fy="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},Fy(t)}function Hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Yy(t,e){return Yy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yy(t,e)}function Vy(t,e){if(e&&("object"===Fy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wy(t)}function Wy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $y(t){return $y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$y(t)}function Ky(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zy=bx(Xy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yy(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$y(n);if(o){var r=$y(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Vy(this,t)});function a(){var t;Hy(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ky(Wy(t=i.call.apply(i,[this].concat(r))),"id",Ol()),t}return e=a,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?2:n,i=t.size,a=t.visible,u=Math.min(Math.max(2,o),i/2),c=1;return a||(c=0),Sr("rect",{width:u,height:u,rx:u/2,ry:u/2,fill:r,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?1:n,i=t.size,a=t.visible,u=Math.min(Math.max(1,o),i/2),c=1;return a||(c=0),Sr("path",{d:"M ".concat(i," 0 H0 M0 0 V0 ").concat(i),stroke:r,strokeWidth:u,opacity:c})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,n=t.graphModel.transformMatrix,o=[n.SCALE_X,n.SKEW_Y,n.SKEW_X,n.SCALE_Y,n.TRANSLATE_X,n.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return Sr("div",{className:"lf-grid"},Sr("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Sr("defs",null,Sr("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r,style:{transition:"all 0.1s ease"}},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Sr("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Gy(e.prototype,r),a}(kr))||Xy;function qy(t){return qy="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},qy(t)}function Jy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Zy.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},r(5883);var Qy,th=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r,n,o=(n=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return Jy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jy(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];"object"!==qy(a)&&(e[i]=a)})),Sr("line",e)};function eh(t){return eh="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},eh(t)}function rh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oh(t,e){return oh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},oh(t,e)}function ih(t,e){if(e&&("object"===eh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ah(t){return ah=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ah(t)}var uh,ch=bx(Qy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&oh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ah(n);if(o){var r=ah(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ih(this,t)});function a(){return rh(this,a),i.apply(this,arguments)}return e=a,r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,n=t.isShowVertical,o=t.stroke,i=t.strokeWidth,a=e.x,u=void 0===a?0:a,c=e.y,s=void 0===c?0:c,l={x1:u,y1:-1e5,x2:u,y2:1e5,stroke:n?o:"none",strokeWidth:i};return Sr("g",{className:"lf-snapline"},Sr(th,{x1:-1e5,y1:s,x2:1e5,y2:s,stroke:r?o:"none",strokeWidth:i}),Sr(th,l))}}],r&&nh(e.prototype,r),a}(kr))||Qy;function sh(t){return sh="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},sh(t)}function lh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function fh(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.radius,a=t.className,u=e-n/2,c=r-o/2,s={width:10,height:10,cx:0,cy:0,rx:i||0,ry:i||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape ".concat(a),x:0,y:0};return Object.entries(t).forEach((function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return lh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lh(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];"object"!==sh(i)&&(s[o]=i)})),s.x=u,s.y=c,Sr("rect",s)}function ph(t){return ph="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},ph(t)}function yh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dh(t,e){return dh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dh(t,e)}function vh(t,e){if(e&&("object"===ph(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function bh(t){return bh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},bh(t)}fh.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var gh,mh=bx(uh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=bh(n);if(o){var r=bh(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return vh(this,t)});function a(){return yh(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getNodeOutline",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.editConfig,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.BaseType===Gc.NODE){var e=t.isHovered,r=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height,l=t.hideOutline,f=t.outlineColor,p=t.hoverOutlineColor,y=t.outlineStrokeDashArray,h=t.hoverOutlineStrokeDashArray;if(!l&&(o||n&&e)){var d=r?f:p,v=r?y:h;i.push(Sr(fh,{className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10,radius:0,fill:"none",stroke:d,strokeDasharray:v}))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfig.edgeSelectedOutline,n=[],o=0;o<e.length;o++){var i=e[o];!i.hideOutline&&i.isSelected&&r&&(i.modelType===Hc.LINE_EDGE?n.push(this.getLineOutline(i)):i.modelType===Hc.POLYLINE_EDGE?n.push(this.getPolylineOutline(i)):i.modelType===Hc.BEZIER_EDGE&&n.push(this.getBezierOutline(i)))}return n}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10,u=this.props.graphModel.theme.line;return Sr(fh,{className:"lf-outline-edge",x:n,y:o,width:i,height:a,radius:0,fill:"none",stroke:u.outlineColor,strokeDasharray:u.outlineStrokeDashArray})}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=xp(e),n=up(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.polyline;return Sr(fh,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:c.outlineColor,strokeDasharray:c.outlineStrokeDashArray})}},{key:"getBezierOutline",value:function(t){var e=t.path,r=kp(e),n=up(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=this.props.graphModel.theme.bezier;return Sr(fh,{className:"lf-outline",x:o,y:i,width:a,height:u,radius:0,fill:"none",stroke:c.outlineColor,strokeDasharray:c.outlineStrokeDashArray})}},{key:"render",value:function(){return Sr("g",{className:"lf-outline"},this.getNodeOutline(),this.getEdgeOutline())}}],r&&hh(e.prototype,r),a}(kr))||uh;function Oh(t){return Oh="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},Oh(t)}function _h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wh(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,a={cx:r,cy:o,r:void 0===i?4:i,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"};return Object.entries(t).forEach((function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return _h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];"object"!==Oh(i)&&(a[o]=i)})),Sr("circle",a)}function xh(t){return xh="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},xh(t)}function Eh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Sh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ph(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kh(t,e,r){return e&&Ph(t.prototype,e),r&&Ph(t,r),t}function Ah(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dh(t,e)}function Dh(t,e){return Dh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dh(t,e)}function Th(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ch(t);if(e){var o=Ch(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mh(this,r)}}function Mh(t,e){if(e&&("object"===xh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nh(t)}function Nh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ch(t){return Ch=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ch(t)}function Rh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ih,Lh=function(t){Ah(r,t);var e=Th(r);function r(t){var n;jh(this,r),Rh(Nh(n=e.call(this)),"onDraging",(function(t){var e=t.deltaX,r=t.deltaY,o=n.props,i=o.graphModel,a=o.bezierModel,u=o.type,c=i.transformMatrix,s=n.state,l=s.endX,f=s.endY,p=Eh(c.moveCanvasPointByHtml([l,f],e,r),2),y=p[0],h=p[1];n.setState({endX:y,endY:h}),a.updateAdjustAnchor({x:y,y:h},u)})),Rh(Nh(n),"onDragEnd",(function(){var t=n.state,e=t.endX,r=t.endY,o=n.props,i=o.bezierModel,a=o.type;i.updateAdjustAnchor({x:e,y:r},a)})),n.dragHandler=Lp({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return kh(r,[{key:"render",value:function(){var t,e,r,n=this.props.position,o=n.x,i=n.y,a=null===(t=this.props)||void 0===t||null===(e=t.graphModel)||void 0===e||null===(r=e.theme)||void 0===r?void 0:r.bezier;return Sr(wh,{className:"lf-bezier-adjust-anchor",x:o,y:i,r:4,stroke:a.adjustAnchorStroke,fill:a.adjustAnchorFill,fillOpacity:a.adjustAnchorFillOpacity,onMouseDown:this.dragHandler})}}]),r}(kr),zh=bx(gh=function(t){Ah(r,t);var e=Th(r);function r(){return jh(this,r),e.apply(this,arguments)}return kh(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=Eh(kp(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=e.theme.bezier.adjustLineColor,l=[];return l.push(Sr(th,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,stroke:s})),l.push(Sr(Lh,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Sr(th,{x1:c.x,y1:c.y,x2:u.x,y2:u.y,stroke:s})),l.push(Sr(Lh,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===Hc.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Sr("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(kr))||gh;function Bh(t){return Bh="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},Bh(t)}function Xh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fh(t,e){return Fh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fh(t,e)}function Hh(t,e){if(e&&("object"===Bh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gh(t){return Gh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gh(t)}var Yh,Vh=bx(Ih=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Gh(n);if(o){var r=Gh(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Hh(this,t)});function a(){return Xh(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"render",value:function(){return Sr("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Sr("g",{transform:this.props.graphModel.transformMatrix.getTransformStyle().transform},this.props.children))}}])&&Uh(e.prototype,r),a}(kr))||Ih;function Wh(t){return Wh="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},Wh(t)}function $h(){return $h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$h.apply(this,arguments)}function Kh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qh(t,e){return qh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},qh(t,e)}function Jh(t,e){if(e&&("object"===Wh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qh(t){return Qh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qh(t)}var td=bx(Yh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qh(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Qh(n);if(o){var r=Qh(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Jh(this,t)});function a(){return Kh(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getComponent",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"canvas-overlay",o=this.props.getView,i=o(t.type);return Sr(i,{key:t.id,model:t,graphModel:e,overlay:n,eventCenter:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.eventCenter,a=e.dnd,u=e.snaplineModel,c={};o.width&&(c.width="".concat(o.width,"px")),o.height&&(c.height="".concat(o.height,"px"));var s=r.fakerNode,l=r.editConfig.adjustEdge;return Sr("div",{className:"lf-graph",style:c},Sr(Ey,{graphModel:r,eventCenter:i,dnd:a},Sr("g",{className:"lf-base"},vc(r.sortElements,(function(e){return t.getComponent(e,r,i)}))),s?this.getComponent(s,r,i):""),Sr(Vh,{graphModel:r},o.hideOutline?"":Sr(mh,{graphModel:r}),l?Sr(zh,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Sr(ch,{snaplineModel:u})),Sr(Ny,{graphModel:r,tool:n}),o.background&&Sr(Uy,{background:o.background}),o.grid&&Sr(Zy,$h({},o.grid,{graphModel:r})))}}],r&&Zh(e.prototype,r),a}(kr))||Yh,ed=td;function rd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function nd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rd(Object(r),!0).forEach((function(e){id(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function od(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function id(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ad=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),id(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),id(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(nd(nd({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),id(this,"onDragOver",(function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i),r.lf.eventCenter.emit(Yc.NODE_DND_DRAG,{data:i})}return!1})),id(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),id(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(nd(nd({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null;var n=e.getData();r.lf.eventCenter.emit(Yc.NODE_DND_ADD,{data:n})}}));var n=e.options,o=e.lf;this.lf=o,this.options=n}var e,r;return e=t,r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=uc(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:ul(i,n),y:ul(a,n)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}],r&&od(e.prototype,r),t}();function ud(t){var e=t.container,r=t.grid;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=Ac({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Ac({},ld,t)}var cd,sd,ld={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function fd(t){return fd="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},fd(t)}function pd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return yd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yd(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function hd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hd(Object(r),!0).forEach((function(e){xd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function bd(){return bd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=gd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},bd.apply(this,arguments)}function gd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wd(t)););return t}function md(t,e){return md=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},md(t,e)}function Od(t,e){if(e&&("object"===fd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _d(t)}function _d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wd(t){return wd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wd(t)}function xd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ed(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Sd,jd,Pd,kd,Ad,Dd,Td,Md,Nd,Cd,Rd,Id,Ld,zd,Bd,Xd,Ud,Fd,Hd,Gd,Yd,Vd,Wd,$d,Kd,Zd,qd=(cd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&md(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=wd(n);if(o){var r=wd(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Od(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),xd(_d(r=i.call(this,t,e,"bezier")),"modelType",Hc.BEZIER_EDGE),xd(_d(r),"offset",rl.bezier.offset),n=_d(r),o=sd,u=_d(r),o&&Object.defineProperty(n,"path",{enumerable:o.enumerable,configurable:o.configurable,writable:o.writable,value:o.initializer?o.initializer.call(u):void 0}),r}return e=a,r=[{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=bd(wd(a.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return dd(dd({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Pp({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=pd(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y,"\n C ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=this.getControls(),n=r.sNext,o=r.ePre;this.pointsList=[t,n,o,e],this.path=this.getPath(this.pointsList)}},{key:"updatePath",value:function(){var t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=pd(this.pointsList,3),n=r[1],o=r[2];this.pointsList=[t,n,o,e],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePath()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePath()}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Pp({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),a=i.sNext,u=i.ePre;this.pointsList=[e,a,u,r],this.initPoints()}}],r&&vd(e.prototype,r),a}(Pf),sd=Ed(cd.prototype,"path",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ed(cd.prototype,"initPoints",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"initPoints"),cd.prototype),Ed(cd.prototype,"updatePoints",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updatePoints"),cd.prototype),Ed(cd.prototype,"updatePath",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updatePath"),cd.prototype),Ed(cd.prototype,"updateStartPoint",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updateStartPoint"),cd.prototype),Ed(cd.prototype,"updateEndPoint",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updateEndPoint"),cd.prototype),Ed(cd.prototype,"updateAdjustAnchor",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updateAdjustAnchor"),cd.prototype),Ed(cd.prototype,"getAdjustStart",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"getAdjustStart"),cd.prototype),Ed(cd.prototype,"getAdjustEnd",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"getAdjustEnd"),cd.prototype),Ed(cd.prototype,"updateAfterAdjustStartAndEnd",[oe],Object.getOwnPropertyDescriptor(cd.prototype,"updateAfterAdjustStartAndEnd"),cd.prototype),cd);function Jd(t){return Jd="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},Jd(t)}function Qd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qd(Object(r),!0).forEach((function(e){iv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ev(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return rv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rv(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function rv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ov(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function iv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function av(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}r(2656);var uv,cv,sv=Ac({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},hideOutline:!1},rl.rect,rl.circle),lv=(Sd=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),iv(this,"id",Ol()),iv(this,"BaseType",Gc.NODE),iv(this,"modelType",Hc.NODE),iv(this,"targetRules",[]),iv(this,"sourceRules",[]),iv(this,"moveRules",[]),iv(this,"hasSetTargetRules",!1),iv(this,"hasSetSourceRules",!1),nv(this,"properties",jd,this),nv(this,"type",Pd,this),nv(this,"x",kd,this),nv(this,"y",Ad,this),nv(this,"_width",Dd,this),nv(this,"_height",Td,this),nv(this,"fill",Md,this),nv(this,"fillOpacity",Nd,this),nv(this,"strokeWidth",Cd,this),nv(this,"stroke",Rd,this),nv(this,"strokeOpacity",Id,this),nv(this,"opacity",Ld,this),nv(this,"outlineColor",zd,this),nv(this,"hideOutline",Bd,this),nv(this,"hoverOutlineColor",Xd,this),nv(this,"outlineStrokeDashArray",Ud,this),nv(this,"hoverOutlineStrokeDashArray",Fd,this),nv(this,"isSelected",Hd,this),nv(this,"isHovered",Gd,this),nv(this,"isHitable",Yd,this),nv(this,"zIndex",Vd,this),nv(this,"anchorsOffset",Wd,this),nv(this,"state",$d,this),nv(this,"text",Kd,this),nv(this,"draggable",Zd,this),this.graphModel=r,this.setStyleFromTheme(n,r),this.initNodeData(e),this.setAttributes()}var e,r;return e=t,r=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}this.formatText(t),Ac(this,function(t){return Ic(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===$c.INCREASE&&(this.zIndex=t.zIndex||gf())}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"setAttributes",value:function(){}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,o=this.properties;ve(o)&&(o=we(o));var i={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.graphModel.overlapMode===$c.INCREASE&&(i.zIndex=this.zIndex),n&&(i.text={x:e,y:r,value:n}),i}},{key:"getProperties",value:function(){return we(this.properties)}},{key:"isAllowConnectedAsSource",value:function(t,e,r){var n=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,this,t,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r){var n=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,t,this,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=ev(this.moveRules);try{for(n.s();!(r=n.n()).done;)if(!(0,r.value)(this,t,e))return!1}catch(t){n.e(t)}finally{n.f()}var o,i=ev(this.graphModel.nodeMoveRules);try{for(i.s();!(o=i.n()).done;)if(!(0,o.value)(this,t,e))return!1}catch(t){i.e(t)}finally{i.f()}return!0}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,r=this.x,n=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):tv(tv({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDetaultAnchor()}},{key:"getDetaultAnchor",value:function(){return[]}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){return this.getAnchorsByOffset()}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r||this.isAllowMoveNode(t,e)){var n=this.x+t,o=this.y+e;this.x=n,this.y=o,this.text&&this.moveText(t,e)}}},{key:"moveTo",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t-this.x,o=e-this.y;(r||this.isAllowMoveNode(n,o))&&(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e)}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,editable:u,draggable:a,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text.value=t}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStroke",value:function(t){this.stroke=t}},{key:"updateData",value:function(t){var e=df(Ic(t,"type","x","y","text","properties")),r=this.text,n=r.x,o=r.y,i=r.draggable,a=r.editable;if(e.text&&"string"==typeof e.text)e.text={x:n,y:o,value:e.text,draggable:i,editable:a};else if("object"===Jd(e.text)){var u=tv(tv({},this.text),e.text);e.text=Ic(u,"x","y","value","draggable","editable")}Ac(this,e)}},{key:"setProperty",value:function(t,e){this.properties=tv(tv({},this.properties),{},iv({},t,df(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=tv(tv({},this.properties),df(t)),this.setAttributes()}},{key:"setStyleFromTheme",value:function(t,e){var r=e.theme;r[t]&&Ac(this,r[t])}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sv.zIndex;this.zIndex=t}},{key:"updateAttributes",value:function(t){Ac(this,t)}}],r&&ov(e.prototype,r),t}(),jd=av(Sd.prototype,"properties",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Pd=av(Sd.prototype,"type",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),kd=av(Sd.prototype,"x",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.x}}),Ad=av(Sd.prototype,"y",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.y}}),Dd=av(Sd.prototype,"_width",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.width}}),Td=av(Sd.prototype,"_height",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.height}}),Md=av(Sd.prototype,"fill",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.fill}}),Nd=av(Sd.prototype,"fillOpacity",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.fillOpacity}}),Cd=av(Sd.prototype,"strokeWidth",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.strokeWidth}}),Rd=av(Sd.prototype,"stroke",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.stroke}}),Id=av(Sd.prototype,"strokeOpacity",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.strokeOpacity}}),Ld=av(Sd.prototype,"opacity",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.opacity}}),zd=av(Sd.prototype,"outlineColor",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.outlineColor}}),Bd=av(Sd.prototype,"hideOutline",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.hideOutline}}),Xd=av(Sd.prototype,"hoverOutlineColor",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.hoverOutlineColor}}),Ud=av(Sd.prototype,"outlineStrokeDashArray",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.outlineStrokeDashArray}}),Fd=av(Sd.prototype,"hoverOutlineStrokeDashArray",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.hoverOutlineStrokeDashArray}}),Hd=av(Sd.prototype,"isSelected",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gd=av(Sd.prototype,"isHovered",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yd=av(Sd.prototype,"isHitable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vd=av(Sd.prototype,"zIndex",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.zIndex}}),Wd=av(Sd.prototype,"anchorsOffset",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),$d=av(Sd.prototype,"state",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Kd=av(Sd.prototype,"text",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return sv.text}}),Zd=av(Sd.prototype,"draggable",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),av(Sd.prototype,"addNodeMoveRules",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"addNodeMoveRules"),Sd.prototype),av(Sd.prototype,"move",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"move"),Sd.prototype),av(Sd.prototype,"moveTo",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"moveTo"),Sd.prototype),av(Sd.prototype,"moveText",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"moveText"),Sd.prototype),av(Sd.prototype,"updateText",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"updateText"),Sd.prototype),av(Sd.prototype,"setSelected",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setSelected"),Sd.prototype),av(Sd.prototype,"setHovered",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setHovered"),Sd.prototype),av(Sd.prototype,"setHitable",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setHitable"),Sd.prototype),av(Sd.prototype,"setElementState",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setElementState"),Sd.prototype),av(Sd.prototype,"updateStroke",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"updateStroke"),Sd.prototype),av(Sd.prototype,"updateData",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"updateData"),Sd.prototype),av(Sd.prototype,"setProperty",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setProperty"),Sd.prototype),av(Sd.prototype,"setProperties",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setProperties"),Sd.prototype),av(Sd.prototype,"setStyleFromTheme",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setStyleFromTheme"),Sd.prototype),av(Sd.prototype,"setZIndex",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"setZIndex"),Sd.prototype),av(Sd.prototype,"updateAttributes",[oe],Object.getOwnPropertyDescriptor(Sd.prototype,"updateAttributes"),Sd.prototype),Sd);function fv(t){return fv="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},fv(t)}function pv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yv(t,e){return yv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yv(t,e)}function hv(t,e){if(e&&("object"===fv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dv(t)}function dv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vv(t){return vv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vv(t)}function bv(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var gv,mv,Ov,_v=(uv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yv(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=vv(n);if(o){var r=vv(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return hv(this,t)});function a(t,e){var r,n,o,u,c,s,l;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=dv(r=i.call(this,t,e,"circle")),o="modelType",u=Hc.CIRCLE_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,c=dv(r),s=cv,l=dv(r),s&&Object.defineProperty(c,"r",{enumerable:s.enumerable,configurable:s.configurable,writable:s.writable,value:s.initializer?s.initializer.call(l):void 0}),r}return e=a,r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getDetaultAnchor",value:function(){var t=this.x,e=this.y,r=this.r;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}],r&&pv(e.prototype,r),a}(lv),cv=bv(uv.prototype,"r",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.circle.r}}),bv(uv.prototype,"width",[ut],Object.getOwnPropertyDescriptor(uv.prototype,"width"),uv.prototype),bv(uv.prototype,"height",[ut],Object.getOwnPropertyDescriptor(uv.prototype,"height"),uv.prototype),uv);function wv(t){return wv="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},wv(t)}function xv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ev(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ev(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ev(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Sv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sv(Object(r),!0).forEach((function(e){Rv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Pv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function kv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Av(){return Av="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Dv(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Av.apply(this,arguments)}function Dv(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cv(t)););return t}function Tv(t,e){return Tv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tv(t,e)}function Mv(t,e){if(e&&("object"===wv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Nv(t)}function Nv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cv(t){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cv(t)}function Rv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iv(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}r(2023);var Lv,zv,Bv,Xv=(gv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tv(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Cv(n);if(o){var r=Cv(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Mv(this,t)});function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),Rv(Nv(r=i.call(this,t,e,"diamond")),"modelType",Hc.DIAMOND_NODE),Pv(Nv(r),"rx",mv,Nv(r)),Pv(Nv(r),"ry",Ov,Nv(r)),r}return e=a,r=[{key:"getData",value:function(){var t=this.rx,e=this.ry;return jv(jv({},Av(Cv(a.prototype),"getData",this).call(this)),{},{rx:t,ry:e})}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=xv(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=xv(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this,e=this.anchorsOffset,r=this.points;return e&&e.length>0?this.getAnchorsByOffset():r.map((function(e,r){var n=xv(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}],r&&kv(e.prototype,r),a}(lv),mv=Iv(gv.prototype,"rx",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ov=Iv(gv.prototype,"ry",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Iv(gv.prototype,"points",[ut],Object.getOwnPropertyDescriptor(gv.prototype,"points"),gv.prototype),Iv(gv.prototype,"pointsPosition",[ut],Object.getOwnPropertyDescriptor(gv.prototype,"pointsPosition"),gv.prototype),Iv(gv.prototype,"width",[ut],Object.getOwnPropertyDescriptor(gv.prototype,"width"),gv.prototype),Iv(gv.prototype,"height",[ut],Object.getOwnPropertyDescriptor(gv.prototype,"height"),gv.prototype),Iv(gv.prototype,"anchors",[ut],Object.getOwnPropertyDescriptor(gv.prototype,"anchors"),gv.prototype),gv);function Uv(t){return Uv="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},Uv(t)}function Fv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Hv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gv(t,e){return Gv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gv(t,e)}function Yv(t,e){if(e&&("object"===Uv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vv(t)}function Vv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wv(t){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wv(t)}function $v(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Kv,Zv,qv=(Lv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gv(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Wv(n);if(o){var r=Wv(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Yv(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=Vv(r=i.call(this,t,e,"ellipse")),o="modelType",u=Hc.ELLIPSE_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,Fv(Vv(r),"rx",zv,Vv(r)),Fv(Vv(r),"ry",Bv,Vv(r)),r}return e=a,r=[{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.rx,o=this.ry;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o,id:"".concat(this.id,"_0")},{x:e+n,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o,id:"".concat(this.id,"_2")},{x:e-n,y:r,id:"".concat(this.id,"_3")}]}}],r&&Hv(e.prototype,r),a}(lv),zv=$v(Lv.prototype,"rx",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.ellipse.rx}}),Bv=$v(Lv.prototype,"ry",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.ellipse.ry}}),$v(Lv.prototype,"width",[ut],Object.getOwnPropertyDescriptor(Lv.prototype,"width"),Lv.prototype),$v(Lv.prototype,"height",[ut],Object.getOwnPropertyDescriptor(Lv.prototype,"height"),Lv.prototype),$v(Lv.prototype,"anchors",[ut],Object.getOwnPropertyDescriptor(Lv.prototype,"anchors"),Lv.prototype),Lv);function Jv(t){return Jv="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},Jv(t)}function Qv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tb(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function eb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rb(t,e){return rb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rb(t,e)}function nb(t,e){if(e&&("object"===Jv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ob(t)}function ob(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ib(t){return ib=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ib(t)}function ab(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ub,cb,sb=(Kv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rb(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ib(n);if(o){var r=ib(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return nb(this,t)});function a(t,e){var r,n,o,u,c,s,l;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=ob(r=i.call(this,t,e,"polygon")),o="modelType",u=Hc.POLYGON_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,c=ob(r),s=Zv,l=ob(r),s&&Object.defineProperty(c,"points",{enumerable:s.enumerable,configurable:s.configurable,writable:s.writable,value:s.initializer?s.initializer.call(l):void 0}),r}return e=a,r=[{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Qv(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Qv(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"anchors",get:function(){var t=this,e=this.anchorsOffset,r=this.x,n=this.y,o=this.width,i=this.height,a=this.points;return e&&e.length>0?this.getAnchorsByOffset():a.map((function(e,a){var u=Qv(e,2),c=u[0],s=u[1];return{x:r+c-o/2,y:n+s-i/2,id:"".concat(t.id,"_").concat(a)}}))}}],r&&eb(e.prototype,r),a}(lv),Zv=ab(Kv.prototype,"points",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),ab(Kv.prototype,"pointsPosition",[ut],Object.getOwnPropertyDescriptor(Kv.prototype,"pointsPosition"),Kv.prototype),ab(Kv.prototype,"width",[ut],Object.getOwnPropertyDescriptor(Kv.prototype,"width"),Kv.prototype),ab(Kv.prototype,"height",[ut],Object.getOwnPropertyDescriptor(Kv.prototype,"height"),Kv.prototype),ab(Kv.prototype,"anchors",[ut],Object.getOwnPropertyDescriptor(Kv.prototype,"anchors"),Kv.prototype),Kv);function lb(t){return lb="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},lb(t)}function fb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pb(t,e){return pb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pb(t,e)}function yb(t,e){if(e&&("object"===lb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return hb(t)}function hb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function db(t){return db=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},db(t)}function vb(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var bb,gb,mb,Ob,_b=(ub=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pb(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=db(n);if(o){var r=db(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return yb(this,t)});function a(t,e){var r,n,o,u,c,s,l;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=hb(r=i.call(this,t,e,"rect")),o="modelType",u=Hc.RECT_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,c=hb(r),s=cb,l=hb(r),s&&Object.defineProperty(c,"radius",{enumerable:s.enumerable,configurable:s.configurable,writable:s.writable,value:s.initializer?s.initializer.call(l):void 0}),r}return e=a,r=[{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o/2,id:"".concat(this.id,"_0")},{x:e+n/2,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o/2,id:"".concat(this.id,"_2")},{x:e-n/2,y:r,id:"".concat(this.id,"_3")}]}}],r&&fb(e.prototype,r),a}(lv),cb=vb(ub.prototype,"radius",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.rect.radius}}),vb(ub.prototype,"anchors",[ut],Object.getOwnPropertyDescriptor(ub.prototype,"anchors"),ub.prototype),ub);function wb(t){return wb="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},wb(t)}function xb(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Eb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Sb(t,e){return Sb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sb(t,e)}function jb(t,e){if(e&&("object"===wb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pb(t)}function Pb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kb(t){return kb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},kb(t)}function Ab(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Db,Tb=(bb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sb(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kb(n);if(o){var r=kb(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return jb(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=Pb(r=i.call(this,t,e,"text")),o="modelType",u=Hc.TEXT_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,xb(Pb(r),"fontSize",gb,Pb(r)),xb(Pb(r),"fontFamily",mb,Pb(r)),xb(Pb(r),"fontWeight",Ob,Pb(r)),r}return e=a,(r=[{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=yf({rows:t,fontSize:this.fontSize,rowsLength:t.length}).width;return e>100?e:100}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=yf({rows:t,fontSize:this.fontSize,rowsLength:t.length}).height;return e>20?e:20}}])&&Eb(e.prototype,r),a}(lv),gb=Ab(bb.prototype,"fontSize",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.text.fontSize}}),mb=Ab(bb.prototype,"fontFamily",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.text.fontFamily}}),Ob=Ab(bb.prototype,"fontWeight",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return rl.text.fontWeight}}),Ab(bb.prototype,"width",[ut],Object.getOwnPropertyDescriptor(bb.prototype,"width"),bb.prototype),Ab(bb.prototype,"height",[ut],Object.getOwnPropertyDescriptor(bb.prototype,"height"),bb.prototype),bb);function Mb(t){return Mb="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},Mb(t)}function Nb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Cb(t,e){return Cb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Cb(t,e)}function Rb(t,e){if(e&&("object"===Mb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ib(t)}function Ib(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lb(t){return Lb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lb(t)}var zb,Bb,Xb,Ub,Fb,Hb,Gb,Yb,Vb,Wb,$b=(Db=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cb(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Lb(n);if(o){var r=Lb(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Rb(this,t)});function a(t,e){var r,n,o,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),n=Ib(r=i.call(this,t,e,"html")),o="modelType",u=Hc.HTML_NODE,o in n?Object.defineProperty(n,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):n[o]=u,r}return e=a,r=[{key:"anchors",get:function(){var t=this.anchorsOffset,e=this.x,r=this.y,n=this.width,o=this.height;return t&&t.length>0?this.getAnchorsByOffset():[{x:e,y:r-o/2,id:"".concat(this.id,"_0")},{x:e+n/2,y:r,id:"".concat(this.id,"_1")},{x:e,y:r+o/2,id:"".concat(this.id,"_2")},{x:e-n/2,y:r,id:"".concat(this.id,"_3")}]}}],r&&Nb(e.prototype,r),a}(lv),Fb=Db.prototype,Hb="anchors",Gb=[ut],Yb=Object.getOwnPropertyDescriptor(Db.prototype,"anchors"),Vb=Db.prototype,Wb={},Object.keys(Yb).forEach((function(t){Wb[t]=Yb[t]})),Wb.enumerable=!!Wb.enumerable,Wb.configurable=!!Wb.configurable,("value"in Wb||Wb.initializer)&&(Wb.writable=!0),Wb=Gb.slice().reverse().reduce((function(t,e){return e(Fb,Hb,t)||t}),Wb),Vb&&void 0!==Wb.initializer&&(Wb.value=Wb.initializer?Wb.initializer.call(Vb):void 0,Wb.initializer=void 0),void 0===Wb.initializer&&(Object.defineProperty(Fb,Hb,Wb),Wb=null),Db);function Kb(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Zb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qb(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Jb=rl.snapline,Qb=(zb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Kb(this,"isShowHorizontal",Bb,this),Kb(this,"isShowVertical",Xb,this),Kb(this,"position",Ub,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,r;return e=t,r=[{key:"stroke",get:function(){return this.graphModel.theme.snapline.stroke||Jb.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||Jb.strokeWidth}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(r===u.x&&(o=!0),n===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=of(a);else{var u=this.graphModel.getNodeModel(i);n=of(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=of(s);if(l.minY===n.minY||l.maxY===n.minY){o=!0,r=n.minY;break}if(l.minY===n.maxY||l.maxY===n.maxY){o=!0,r=n.maxY;break}}}return Ac({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=of(a);else{var u=this.graphModel.getNodeModel(i);n=of(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=of(s);if(l.minX===n.minX||l.maxX===n.minX){o=!0,r=n.minX;break}if(l.minX===n.maxX||l.maxX===n.maxX){o=!0,r=n.maxX;break}}}return Ac({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(r.isShowVertical=a.isShowVertical,r.position.x=a.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}],r&&Zb(e.prototype,r),t}(),Bb=qb(zb.prototype,"isShowHorizontal",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xb=qb(zb.prototype,"isShowVertical",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ub=qb(zb.prototype,"position",[et],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qb(zb.prototype,"stroke",[ut],Object.getOwnPropertyDescriptor(zb.prototype,"stroke"),zb.prototype),qb(zb.prototype,"strokeWidth",[ut],Object.getOwnPropertyDescriptor(zb.prototype,"strokeWidth"),zb.prototype),qb(zb.prototype,"clearSnapline",[oe],Object.getOwnPropertyDescriptor(zb.prototype,"clearSnapline"),zb.prototype),qb(zb.prototype,"setNodeSnapLine",[oe],Object.getOwnPropertyDescriptor(zb.prototype,"setNodeSnapLine"),zb.prototype),zb);function tg(t){return tg="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},tg(t)}function eg(){return eg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},eg.apply(this,arguments)}function rg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ng(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function og(t,e){return og=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},og(t,e)}function ig(t,e){if(e&&("object"===tg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ag(t)}function ag(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ug(t){return ug=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ug(t)}function cg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&og(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ug(n);if(o){var r=ug(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return ig(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),cg(ag(t=i.call(this)),"onDragStart",(function(){var e=t.props,r=e.x,n=e.y,o=e.nodeModel,i=e.graphModel,a=i.overlapMode;i.selectNodeById(o.id),a!==$c.INCREASE&&i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})})),cg(ag(t),"onDraging",(function(e){var r,n,o=e.deltaX,i=e.deltaY,a=t.state,u=a.endX,c=a.endY,s=t.props,l=s.graphModel,f=s.nodeModel,p=l.transformMatrix,y=l.nodes,h=(r=p.moveCanvasPointByHtml([u,c],o,i),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return rg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rg(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=h[0],v=h[1];t.setState({endX:d,endY:v,draging:!0});var b=Ql({x:u,y:c},y);if(b){var g=b.node;t.preTargetNode=g;var m=b.anchor.id,O="".concat(g.id,"_").concat(m);if(!t.targetRuleResults.has(O)){var _=t.props.anchorData,w=b.anchor,x=f.isAllowConnectedAsSource(g,_,w),E=g.isAllowConnectedAsTarget(f,_,w);t.sourceRuleResults.set(g.id,hf(x)),t.targetRuleResults.set(O,hf(E))}var S=t.sourceRuleResults.get(g.id).isAllPass,j=t.targetRuleResults.get(O).isAllPass;S&&j?g.setElementState(Uc.ALLOW_CONNECT):g.setElementState(Uc.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==Uc.DEFAULT&&t.preTargetNode.setElementState(Uc.DEFAULT)})),cg(ag(t),"onDragEnd",(function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),cg(ag(t),"checkEnd",(function(){var e=t.props,r=e.graphModel,n=e.nodeModel,o=e.x,i=e.y,a=e.eventCenter,u=e.id,c=r.nodes,s=r.edgeType,l=t.state,f=l.endX,p=l.endY,y=l.draging,h=Ql({x:f,y:p},c);if(t.preTargetNode&&t.preTargetNode.state!==Uc.DEFAULT&&t.preTargetNode.setElementState(Uc.DEFAULT),y&&h&&h.node){var d=h.node,v=t.sourceRuleResults.get(d.id)||{},b=v.isAllPass,g=v.msg,m=h.anchor.id,O="".concat(d.id,"_").concat(m),_=t.targetRuleResults.get(O)||{},w=_.isAllPass,x=_.msg;if(b&&w)d.setElementState(Uc.ALLOW_CONNECT),o===h.anchor.x&&i===h.anchor.y||r.createEdge({type:s,sourceNodeId:n.id,sourceAnchorId:u,startPoint:{x:o,y:i},targetNodeId:h.node.id,targetAnchorId:h.anchor.id,endPoint:{x:h.anchor.x,y:h.anchor.y}});else{var E=d.getData();a.emit(Yc.CONNECTION_NOT_ALLOWED,{data:E,msg:x||g})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=Lp({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=a,r=[{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return ef(e,r,n,o)>10}},{key:"render",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY,i=this.props,a=i.x,u=i.y,c=i.style,s=i.edgeStyle;return Sr("g",{className:"lf-anchor"},Sr(wh,eg({className:"lf-node-anchor-hover",x:a,y:u},i.hoverStyle,{onMouseDown:this.dragHandler})),Sr(wh,eg({className:"lf-node-anchor",x:a,y:u},c,{onMouseDown:this.dragHandler})),this.isShowLine()&&Sr(th,eg({x1:e,y1:r,x2:n,y2:o,"pointer-events":"none"},s)))}}],r&&ng(e.prototype,r),a}(kr),lg=sg;function fg(t){return fg="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},fg(t)}function pg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yg(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.value,a=t.color,u=void 0===a?"#000000":a,c=t.fontSize,s=t.fill,l=void 0===s?"currentColor":s,f=t.model,p=t.fontFamily,y=void 0===p?"":p,h=t.lineHeight,d=t.autoWrap,v=void 0!==d&&d,b=t.wrapPadding,g=void 0===b?"0, 0":b,m={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:l};if(Object.entries(t).forEach((function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return pg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pg(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];"object"!==fg(i)&&(m[o]=i)})),i){var O=String(i).split(/[\r\n]/g),_=O.length,w=f.BaseType,x=f.width,E=f.textWidth,S=f.textHeight,j=f.modelType;if(w===Gc.NODE&&j!==Hc.TEXT_NODE&&v||w===Gc.EDGE&&v&&E){var P=E||x,k=pf({rows:O,style:{fontSize:"".concat(c,"px"),width:"".concat(P,"px"),fontFamily:y,lineHeight:h,padding:g},rowsLength:_,className:"lf-get-text-height"}),A=f.height>k?f.height:k;return S&&(A=S),Sr("g",null,Sr("foreignObject",{width:P,height:A,x:m.x-P/2,y:m.y-A/2},Sr("div",{className:"lf-node-text-auto-wrap",style:{boxSizing:"border-box",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid transparent",minHeight:A,width:P,color:u,padding:g}},Sr("div",{className:"lf-node-text-auto-wrap-content",style:{fontSize:c,fontFamily:y,lineHeight:h,background:"transparent",textAlign:"center",wordBreak:"break-all"}},O.map((function(t){return Sr("div",null,t)}))))))}if(_>1){var D=O.map((function(t,e){return Sr("tspan",{className:"lf-text-tspan",x:r,y:o+(e-(_-1)/2)*(c+2)},t)}));return Sr("text",m,D)}return Sr("text",m,i)}}function hg(t){return hg="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},hg(t)}function dg(){return dg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dg.apply(this,arguments)}function vg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function gg(t,e){return gg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gg(t,e)}function mg(t,e){if(e&&("object"===hg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Og(t)}function Og(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _g(t){return _g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_g(t)}function wg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gg(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=_g(n);if(o){var r=_g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return mg(this,t)});function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),wg(Og(e=i.call(this)),"sumDeltaX",0),wg(Og(e),"sumDeltaY",0),wg(Og(e),"onDraging",(function(t){var r,n,o=t.deltaX,i=t.deltaY,a=e.props,u=a.model,c=(r=a.graphModel.transformMatrix.fixDeltaXY(o,i),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return vg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vg(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=c[0],l=c[1];u.moveText(s,l)})),wg(Og(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(Uc.TEXT_EDIT)})),wg(Og(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfig.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)}));var r=t.model,n=t.draggable;return e.stepDrag=new ry({onDraging:e.onDraging,step:1,model:r,isStopPropagation:n}),e}return e=a,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value;return Sr(yg,dg({},{x:n.x,y:n.y,className:"lf-element-text",value:o},r,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Sr("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&bg(e.prototype,r),a}(kr),Eg=null!==window.navigator.userAgent.match(/MSIE|Trident/);function Sg(t){return Sg="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},Sg(t)}function jg(){return jg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jg.apply(this,arguments)}function Pg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pg(Object(r),!0).forEach((function(e){Rg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ag(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tg(t,e){return Tg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tg(t,e)}function Mg(t,e){if(e&&("object"===Sg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ng(t)}function Ng(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cg(t){return Cg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cg(t)}function Rg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ig=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tg(t,e)}(u,t);var e,r,n,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Cg(o);if(i){var r=Cg(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Mg(this,t)});function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),Rg(Ng(e=a.call(this)),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=o.graphModel;e.state.isDraging||e.setState({isDraging:!0});var u,c,s=(u=a.transformMatrix.fixDeltaXY(r,n),c=2,function(t){if(Array.isArray(t))return t}(u)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(u,c)||function(t,e){if(t){if("string"==typeof t)return Ag(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ag(t,e):void 0}}(u,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=s[0],f=s[1];a.moveNode(i.id,l,f)})),Rg(Ng(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),Rg(Ng(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var r=e.props,n=r.model,o=r.eventCenter,i=r.graphModel,a={data:n.getData(),e:t,position:i.getPointByClient({x:t.clientX,y:t.clientY})},u=2===t.button,c=2===t.detail;if(!u){var s=i.editConfig;i.selectNodeById(n.id,function(t,e){var r=e.multipleSelectKey;if(e.metaKeyMultipleSelected&&t.metaKey)return!0;var n=!1;switch(r){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;default:n=!1}return n}(t,s)),e.toFront(),c?(s.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),i.setElementStateById(n.id,Uc.TEXT_EDIT)),o.emit(Yc.NODE_DBCLICK,a)):(o.emit(Yc.ELEMENT_CLICK,a),o.emit(Yc.NODE_CLICK,a))}}})),Rg(Ng(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.eventCenter,i=r.graphModel,a=n.getData(),u=i.getPointByClient({x:t.clientX,y:t.clientY});i.setElementStateById(n.id,Uc.SHOW_MENU,u.domOverlayPosition),i.selectNodeById(n.id),o.emit(Yc.NODE_CONTEXTMENU,{data:a,e:t,position:u}),e.toFront()})),Rg(Ng(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfig.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Rg(Ng(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var r=e.props,n=r.model,o=r.eventCenter,i=n.getData();n.setHovered(!0),o.emit(Yc.NODE_MOUSEENTER,{data:i,e:t})}})),Rg(Ng(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var r=e.props,n=r.model,o=r.eventCenter,i=n.getData();n.setHovered(!1),o.emit(Yc.NODE_MOUSELEAVE,{data:i,e:t})})),Rg(Ng(e),"onMouseOut",(function(t){Eg&&e.setHoverOFF(t)}));var r=t.graphModel.gridSize,n=t.eventCenter,o=t.model;return e.stepDrag=new ry({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:r,eventType:"NODE",eventCenter:n,model:o}),e.state={isDraging:!1,isHovered:!1},e}return e=u,r=[{key:"getShapeStyle",value:function(){var t=this.props.model;return{width:t.width,height:t.height,fill:t.fill,fillOpacity:t.fillOpacity,strokeWidth:t.strokeWidth,stroke:t.stroke,strokeOpacity:t.strokeOpacity,opacity:t.opacity,outlineColor:t.outlineColor}}},{key:"getAttributes",value:function(){var t=this.props.model,e=t.id,r=t.properties,n=void 0===r?{}:r,o=t.type,i=t.x,a=t.y,u=t.isSelected,c=t.isHovered,s=t.text,l=this.getShapeStyle();return kg({id:e,properties:kg({},n),type:o,x:i,y:a,isSelected:u,isHovered:c,text:kg({},s)},l)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return kg({},this.props.graphModel.theme.anchor)}},{key:"getAnchorHoverStyle",value:function(){return kg({},this.props.graphModel.theme.anchorHover)}},{key:"getNewEdgeStyle",value:function(){return kg({},this.props.graphModel.theme.anchorLine)}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=e.eventCenter,i=r.isSelected,a=r.isHitable,u=this.state,c=u.isHovered,s=u.isDraging;if(a&&(i||c)){var l=this.getAnchorStyle(),f=this.getAnchorHoverStyle(),p=this.getNewEdgeStyle();return vc(r.anchors,(function(e,i){return Sr(lg,jg({},e,{anchorData:e,nodeDraging:s,style:l,hoverStyle:f,edgeStyle:p,anchorIndex:i,nodeModel:r,eventCenter:o,graphModel:n,setHoverOFF:t.setHoverOFF}))}))}return[]}},{key:"getTextStyle",value:function(){return kg({},this.props.graphModel.theme.nodeText)}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Uc.TEXT_EDIT)return"";var n=this.getTextStyle();if(e.text){var o=r.editConfig,i=!1;return(e.text.draggable||o.nodeTextDraggable)&&(i=!0),Sr(xg,{editable:o.nodeTextEdit&&e.text.editable,style:n,model:e,graphModel:r,draggable:i})}}},{key:"getStateClassName",value:function(){var t="lf-node";switch(this.props.model.state){case Uc.ALLOW_CONNECT:t+=" lf-node-allow";break;case Uc.NOT_ALLOW_CONNECT:t+=" lf-node-not-allow";break;default:t+=" lf-node-default"}return this.state.isDraging&&(t+=" lf-dragging"),t}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;r.overlapMode!==$c.INCREASE&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfig,i=o.hideAnchors,a=o.adjustNodePosition,u=n.gridSize,c=n.transformMatrix.SCALE_X,s=r.isHitable,l=r.draggable,f=Sr("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=Sr("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},f)):t=Sr("g",{className:this.getStateClassName()},f),t}}],n=[{key:"getModel",value:function(t){return t}}],r&&Dg(e.prototype,r),n&&Dg(e,n),u}(kr);function Lg(t){return Lg="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},Lg(t)}function zg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zg(Object(r),!0).forEach((function(e){Xg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ug(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Hg(){return Hg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Gg(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Hg.apply(this,arguments)}function Gg(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wg(t)););return t}function Yg(t,e){return Yg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Yg(t,e)}function Vg(t,e){if(e&&("object"===Lg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wg(t){return Wg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wg(t)}var $g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Yg(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Wg(n);if(o){var r=Wg(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Vg(this,t)});function a(){return Ug(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=Hg(Wg(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.radius;return Bg(Bg({},t),{},{radius:e})}},{key:"getAttributes",value:function(){var t=Hg(Wg(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Bg(Bg({},t),e)}},{key:"getShape",value:function(){return Sr(fh,this.getAttributes())}}])&&Fg(e.prototype,r),a}(Ig);function Kg(t){return Kg="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},Kg(t)}function Zg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zg(Object(r),!0).forEach((function(e){Jg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function em(){return em="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=rm(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},em.apply(this,arguments)}function rm(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=im(t)););return t}function nm(t,e){return nm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nm(t,e)}function om(t,e){if(e&&("object"===Kg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function im(t){return im=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},im(t)}var am=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nm(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=im(n);if(o){var r=im(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return om(this,t)});function a(){return Qg(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getShapeStyle",value:function(){var t=em(im(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.r;return qg(qg({},t),{},{r:e})}},{key:"getAttributes",value:function(){var t=em(im(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return qg(qg({},t),e)}},{key:"getShape",value:function(){return Sr(wh,this.getAttributes())}}],r&&tm(e.prototype,r),a}(Ig);function um(t){return um="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},um(t)}function cm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sm(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:"",className:"lf-basic-shape ".concat(r)};return Object.entries(t).forEach((function(t){var e,r,o=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return cm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cm(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];"object"!==um(a)&&(n[i]=a)})),n.points=e.map((function(t){return t.join(",")})).join(" "),Sr("polygon",n)}function lm(t){return lm="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},lm(t)}function fm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function pm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fm(Object(r),!0).forEach((function(e){ym(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ym(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vm(){return vm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=bm(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},vm.apply(this,arguments)}function bm(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Om(t)););return t}function gm(t,e){return gm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gm(t,e)}function mm(t,e){if(e&&("object"===lm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Om(t){return Om=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Om(t)}var _m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gm(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Om(n);if(o){var r=Om(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return mm(this,t)});function a(){return hm(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getShapeStyle",value:function(){var t=vm(Om(a.prototype),"getShapeStyle",this).call(this),e=this.props.model.points;return pm(pm({},t),{},{points:e})}},{key:"getAttributes",value:function(){var t=vm(Om(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return pm(pm({},t),e)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.width,r=t.height,n=t.x,o=t.y,i=t.fill,a=t.fillOpacity,u=t.strokeWidth,c=t.stroke,s=t.strokeOpacity,l=t.points;return Sr("g",{transform:"matrix(1 0 0 1 ".concat(n-e/2," ").concat(o-r/2,")")},Sr(sm,{fill:i,fillOpacity:a,strokeWidth:u,stroke:c,strokeOpacity:s,points:l}))}}],r&&dm(e.prototype,r),a}(Ig);function wm(t){return wm="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},wm(t)}function xm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Em(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xm(Object(r),!0).forEach((function(e){Sm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function km(){return km="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Am(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},km.apply(this,arguments)}function Am(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mm(t)););return t}function Dm(t,e){return Dm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dm(t,e)}function Tm(t,e){if(e&&("object"===wm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Mm(t){return Mm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mm(t)}var Nm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dm(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Mm(n);if(o){var r=Mm(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Tm(this,t)});function a(){return jm(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getShapeStyle",value:function(){var t=this.props.model.points;return Em(Em({},km(Mm(a.prototype),"getShapeStyle",this).call(this)),{},{points:t})}},{key:"getAttributes",value:function(){var t=km(Mm(a.prototype),"getAttributes",this).call(this),e=this.getShapeStyle();return Em(Em({},t),e)}},{key:"getShape",value:function(){var t=this.props.model.points,e=this.getAttributes();return Sr("g",null,Sr(sm,{fill:e.fill,fillOpacity:e.fillOpacity,strokeWidth:e.strokeWidth,stroke:e.stroke,strokeOpacity:e.strokeOpacity,points:t}))}}])&&Pm(e.prototype,r),a}(Ig);function Cm(t){return Cm="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},Cm(t)}function Rm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Im(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,a=void 0===i?4:i,u=t.ry,c={cx:r,cy:o,rx:a,ry:void 0===u?4:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e,r,n=(r=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Rm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rm(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];"object"!==Cm(i)&&(c[o]=i)})),Sr("ellipse",c)}function Lm(t){return Lm="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},Lm(t)}function zm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zm(Object(r),!0).forEach((function(e){Xm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Um(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Hm(){return Hm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Gm(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Hm.apply(this,arguments)}function Gm(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Wm(t)););return t}function Ym(t,e){return Ym=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ym(t,e)}function Vm(t,e){if(e&&("object"===Lm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wm(t){return Wm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wm(t)}var $m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ym(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Wm(n);if(o){var r=Wm(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Vm(this,t)});function a(){return Um(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=Hm(Wm(a.prototype),"getAttributes",this).call(this),e=this.props.model,r=e.rx,n=e.ry;return Bm(Bm({},t),{},{rx:r,ry:n})}},{key:"getShape",value:function(){return Sr(Im,this.getAttributes())}}])&&Fm(e.prototype,r),a}(Ig);function Km(t){return Km="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},Km(t)}function Zm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zm(Object(r),!0).forEach((function(e){Jm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function eO(t,e){return eO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},eO(t,e)}function rO(t,e){if(e&&("object"===Km(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function nO(t){return nO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nO(t)}var oO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&eO(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=nO(n);if(o){var r=nO(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return rO(this,t)});function a(){return Qm(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getBackgroud",value:function(){var t=this.getAttributes().text,e=this.getTextStyle();if(t&&t.value&&e.backgroundStyle&&"transparnet"!==e.backgroundStyle.fill){var r=e.fontSize,n=t.value,o=t.x,i=t.y,a=String(n).split(/[\r\n]/g),u=a.length,c=0;a&&a.forEach((function(t){var e=jp(t);c=e>c?e:c}));var s=yf({rows:a,fontSize:r,rowsLength:u}),l=s.width,f=s.height;return Sr(fh,qm(qm({},e.backgroundStyle),{},{x:o-1,y:i-1,width:l,height:f}))}}},{key:"getShape",value:function(){var t=this.getAttributes();return Sr("g",null,this.getBackgroud(),Sr(yg,t))}}],r&&tO(e.prototype,r),a}(Ig);function iO(t){return iO="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},iO(t)}function aO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cO(t,e){return cO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cO(t,e)}function sO(t,e){if(e&&("object"===iO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lO(t)}function lO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fO(t){return fO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fO(t)}function pO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cO(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=fO(n);if(o){var r=fO(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return sO(this,t)});function a(){var t;aO(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return pO(lO(t=i.call.apply(i,[this].concat(r))),"setRef",(function(e){t.ref=e})),t}return e=a,r=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"componentDidMount",value:function(){this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.getAttributes(),e=t.x,r=t.y,n=t.width,o=t.height;return Sr("foreignObject",{x:e-n/2,y:r-o/2,width:n,height:o,ref:this.setRef})}}],r&&uO(e.prototype,r),a}(Ig);function hO(t){return hO="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},hO(t)}function dO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vO(t){var e={d:""};return Object.entries(t).forEach((function(t){var r,n,o=(n=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return dO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?dO(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];"object"!==hO(a)&&(e[i]=a)})),Sr("path",e)}vO.defaultProps={strokeDasharray:""};var bO=vO;function gO(t){return gO="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},gO(t)}function mO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function OO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xO(t,e){return xO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xO(t,e)}function EO(t,e){if(e&&("object"===gO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function SO(t){return SO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},SO(t)}var jO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xO(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=SO(n);if(o){var r=SO(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return EO(this,t)});function a(){return _O(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getArrowAttibutes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},a=Kf(i),u=a.leftX,c=a.leftY,s=a.rightX,l=a.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mO(Object(r),!0).forEach((function(e){OO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttibutes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Sr(bO,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Sr("g",{className:"lf-arrow"},this.getShape())}}],r&&wO(e.prototype,r),a}(kr);function PO(t){return PO="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},PO(t)}function kO(){return kO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kO.apply(this,arguments)}function AO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function DO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?AO(Object(r),!0).forEach((function(e){IO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function TO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function MO(t,e){return MO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},MO(t,e)}function NO(t,e){if(e&&("object"===PO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return CO(t)}function CO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function RO(t){return RO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},RO(t)}function IO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var LO,zO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&MO(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=RO(n);if(o){var r=RO(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return NO(this,t)});function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),IO(CO(e=i.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),IO(CO(e),"setHoverOFF",(function(){e.setState({isHoverd:!1})})),e.state={isHoverd:!1},e}return e=a,r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=this.props.style,r=t.text,n=t.textWidth,o=Ic(e.background,"fill","stroke","radius","height");if(this.state.isHoverd&&e.hoverBackground&&(o=DO(DO({},o),e.hoverBackground)),r&&r.value&&"transparnet"!==o.fill){var i,a=e.fontSize,u=e.autoWrap,c=e.lineHeight,s=e.wrapPadding,l=r.value,f=r.x,p=r.y,y=String(l).split(/[\r\n]/g),h=y.length;if(u&&n){var d=pf({rows:y,style:{fontSize:"".concat(a,"px"),width:"".concat(n,"px"),lineHeight:c,padding:s},rowsLength:h,className:"lf-get-text-height"});i=DO(DO({},o),{},{x:f-1,y:p-1,width:n,height:d})}else{var v=0;y&&y.forEach((function(t){var e=jp(t);v=e>v?e:v}));var b=yf({rows:y,fontSize:a,rowsLength:h}),g=b.width,m=b.height;i=DO(DO({},o),{},{x:f-1,y:p-1,width:g,height:m})}return Sr(fh,i)}}},{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.style,n=e.text,o=n.value,i=DO({x:n.x,y:n.y,className:"lf-element-text",value:o},r);return Sr("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Sr(yg,kO({},i,{model:e})))}}],r&&TO(e.prototype,r),a}(xg);function BO(t){return BO="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},BO(t)}function XO(){return XO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},XO.apply(this,arguments)}function UO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function FO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?UO(Object(r),!0).forEach((function(e){KO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):UO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function HO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function GO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function YO(t,e){return YO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},YO(t,e)}function VO(t,e){if(e&&("object"===BO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return WO(t)}function WO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $O(t){return $O=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$O(t)}function KO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(LO||(LO={}));var ZO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&YO(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$O(n);if(o){var r=$O(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return VO(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),KO(WO(t=i.call(this)),"onDragStart",(function(){var e=t.props,r=e.x,n=e.y,o=e.edgeModel,i=o.startPoint,a=o.endPoint,u=o.pointsList;t.oldEdge={startPoint:i,endPoint:a,pointsList:u},t.setState({endX:r,endY:n,draging:!0})})),KO(WO(t),"onDraging",(function(e){var r,n,o=e.deltaX,i=e.deltaY,a=t.state,u=a.endX,c=a.endY,s=t.props,l=s.graphModel,f=s.type,p=(r=l.transformMatrix.moveCanvasPointByHtml([u,c],o,i),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return HO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?HO(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=p[0],h=p[1];t.setState({endX:y,endY:h,draging:!0});var d=t.props.edgeModel,v=l.nodes,b=Ql({x:u,y:c},v);if(b&&b.node){var g,m=d.startPoint,O=d.endPoint,_=d.sourceNode,w=d.targetNode;f===LO.SOURCE?g={startPoint:{x:b.anchor.x,y:b.anchor.y},endPoint:{x:O.x,y:O.y},sourceNode:b.node,targetNode:w}:f===LO.TARGET&&(g={startPoint:{x:m.x,y:m.y},endPoint:{x:b.anchor.x,y:b.anchor.y},sourceNode:_,targetNode:b.node}),d.updateAfterAdjustStartAndEnd(g)}else f===LO.SOURCE?d.updateStartPoint({x:y,y:h}):f===LO.TARGET&&d.updateEndPoint({x:y,y:h})})),KO(WO(t),"onDragEnd",(function(){t.setState({draging:!1});var e=t.props,r=e.graphModel,n=e.edgeModel,o=e.type,i=e.eventCenter,a=r.nodes,u=t.state,c=u.endX,s=u.endY,l=u.draging,f=Ql({x:c,y:s},a);if(l)if(f&&f.node){var p,y=n.getData(),h=FO(FO({},y),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==y||null===(p=y.text)||void 0===p?void 0:p.value)||""});o===LO.SOURCE?h=FO(FO({},h),{},{sourceNodeId:f.node.id,sourceAnchorId:f.anchor.id,startPoint:{x:f.anchor.x,y:f.anchor.y},targetNodeId:n.targetNodeId,endPoint:FO({},n.endPoint)}):o===LO.TARGET&&(h=FO(FO({},h),{},{sourceNodeId:n.sourceNodeId,startPoint:FO({},n.startPoint),targetNodeId:f.node.id,targetAnchorId:f.anchor.id,endPoint:{x:f.anchor.x,y:f.anchor.y}})),r.removeEdgeById(n.id);var d=r.createEdge(FO({},h));i.emit(Yc.EDGE_EXCHANGE_NODE,{data:{newEdge:d.getData(),oldEdge:n.getData()}})}else t.recoveryEdge()})),KO(WO(t),"recoveryEdge",(function(){var e=t.props.edgeModel,r=t.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;e.updateStartPoint(n),e.updateEndPoint(o),e.modelType!==Hc.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),KO(WO(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.dragHandler=Lp({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=a,r=[{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=this.state.draging;return Sr("g",null,Sr(wh,XO({className:"lf-edge-adjust-point"},this.getAdjustPointStyle(),{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}],r&&GO(e.prototype,r),a}(kr);function qO(t){return qO="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},qO(t)}function JO(){return JO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},JO.apply(this,arguments)}function QO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function t_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?QO(Object(r),!0).forEach((function(e){u_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function e_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n_(t,e){return n_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n_(t,e)}function o_(t,e){if(e&&("object"===qO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i_(t)}function i_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a_(t){return a_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a_(t)}function u_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n_(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a_(n);if(o){var r=a_(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return o_(this,t)});function a(){var t;e_(this,a);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return u_(i_(t=i.call.apply(i,[this].concat(r))),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.eventCenter;o.setHovered(e);var a=e?Yc.EDGE_MOUSEENTER:Yc.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),u_(i_(t),"setHoverON",(function(e){t.handleHover(!0,e)})),u_(i_(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),u_(i_(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=r.eventCenter,a=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,Uc.SHOW_MENU,a.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();i.emit(Yc.EDGE_CONTEXTMENU,{data:u,e:e,position:a})})),u_(i_(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),u_(i_(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var r=2===e.detail,n=t.props,o=n.model,i=n.graphModel,a=n.eventCenter,u=null==o?void 0:o.getData(),c=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var s=i.editConfig,l=i.textEditElement;if(l&&l.id===o.id&&i.setElementStateById(o.id,Uc.DEFAULT),s.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,Uc.TEXT_EDIT),o.modelType===Hc.POLYLINE_EDGE){var f=o,p=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,y=p.x,h=p.y,d=Dp({x:y,y:h},f.points);f.dbClickPosition=d}a.emit(Yc.EDGE_DBCLICK,{data:u,e:e,position:c})}else a.emit(Yc.ELEMENT_CLICK,{data:u,e:e,position:c}),a.emit(Yc.EDGE_CLICK,{data:u,e:e,position:c});var v=i.editConfig.metaKeyMultipleSelected;i.selectEdgeById(o.id,e.metaKey&&v),t.toFront()}})),u_(i_(t),"getIsDraging",(function(){return!1})),t}return e=a,(r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.strokeWidth,r=t.strokeOpacity,n=t.strokeDashArray,o=t.isSelected,i=t.isHovered,a=t.hoverStroke,u=t.selectedStroke,c=t.properties,s=this.props.model.stroke;return i?s=a:o&&(s=u),{stroke:s,strokeWidth:e,strokeOpacity:r,strokeDashArray:n,isSelected:o,isHovered:i,hoverStroke:a,selectedStroke:u,properties:t_({},c)}}},{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Uc.TEXT_EDIT)return"";var n=r.theme.edgeText,o=this.getTextStyle(),i=Ac({},n,o),a=!1,u=r.editConfig;return(e.text.draggable||u.edgeTextDraggable)&&(a=!0),Sr(zO,{editable:u.edgeTextEdit&&e.text.editable,model:e,graphModel:r,style:i,draggable:a})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getArrowStyle",value:function(){var t=this.getAttributes().stroke,e=this.props.graphModel.theme.arrow;return{stroke:t,strokeWidth:1,fill:t,offset:e.offset,verticalLength:e.verticalLength}}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,r=t.end;if(e&&r&&(e.x!==r.x||e.y!==r.y)){var n=this.getArrowStyle();return Sr(jO,{arrowInfo:t,style:n})}}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=t.eventCenter,o=e.getAdjustStart(),i=e.getAdjustEnd();return Sr("g",null,Sr(ZO,JO({type:"SOURCE"},o,{edgeModel:e,graphModel:r,eventCenter:n})),Sr(ZO,JO({type:"TARGET"},i,{edgeModel:e,graphModel:r,eventCenter:n})))}},{key:"getAppendWidth",value:function(){return Sr("g",null)}},{key:"getAppend",value:function(){return Sr("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==$c.INCREASE&&e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model.isSelected,r=t.graphModel.editConfig,n=this.getIsDraging(),o=r.adjustEdgeStartAndEnd;return Sr("g",{className:"lf-edge",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow(),o&&e&&!n?this.getAdjustPoints():"")}}])&&r_(e.prototype,r),a}(kr);function s_(t){return s_="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},s_(t)}function l_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l_(Object(r),!0).forEach((function(e){p_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d_(){return d_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=v_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},d_.apply(this,arguments)}function v_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m_(t)););return t}function b_(t,e){return b_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b_(t,e)}function g_(t,e){if(e&&("object"===s_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function m_(t){return m_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m_(t)}var O_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b_(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m_(n);if(o){var r=m_(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return g_(this,t)});function a(){return y_(this,a),i.apply(this,arguments)}return e=a,r=[{key:"getAttributes",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint;return f_(f_({},d_(m_(a.prototype),"getAttributes",this).call(this)),{},{startPoint:e,endPoint:r})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.stroke,r=t.startPoint,n=t.endPoint,o=t.strokeWidth,i=t.strokeOpacity,a=t.strokeDashArray;return Sr(th,{x1:r.x,y1:r.y,x2:n.x,y2:n.y,strokeOpacity:i,strokeWidth:o,stroke:e,strokeDasharray:a})}},{key:"getShape",value:function(){return Sr("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Kf(qf(qf({},o),{},{type:"start"})),a=Kf(qf(qf({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:t.startPoint,end:t.endPoint}),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Sr(bO,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}],r&&h_(e.prototype,r),a}(c_);function __(t){return __="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},__(t)}function w_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var x_=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r,n,o=(n=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return w_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w_(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];"object"!==__(a)&&(e[i]=a)})),Sr("polyline",e)};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)}function S_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?S_(Object(r),!0).forEach((function(e){R_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):S_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function P_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function k_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A_(){return A_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=D_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},A_.apply(this,arguments)}function D_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C_(t)););return t}function T_(t,e){return T_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},T_(t,e)}function M_(t,e){if(e&&("object"===E_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return N_(t)}function N_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C_(t){return C_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},C_(t)}function R_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var I_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&T_(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=C_(n);if(o){var r=C_(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return M_(this,t)});function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),R_(N_(t=i.call(this)),"onDragStart",(function(){t.props.model.dragAppendStart()})),R_(N_(t),"onDraging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDraging=!0;var u,c,s=a.transformMatrix,l=a.editConfig,f=(u=s.fixDeltaXY(r,n),c=2,function(t){if(Array.isArray(t))return t}(u)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(u,c)||function(t,e){if(t){if("string"==typeof t)return P_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P_(t,e):void 0}}(u,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=f[0],y=f[1],h=i,d=l.adjustEdgeMiddle;t.appendInfo=d?h.dragAppendSimple(t.appendInfo,{x:p,y:y}):h.dragAppend(t.appendInfo,{x:p,y:y})})),R_(N_(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.eventCenter,o=r;o.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0,n.emit(Yc.EDGE_ADJUST,{data:o.getData()})})),R_(N_(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),R_(N_(t),"getIsDraging",(function(){return t.isDraging})),t.drag=Lp({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=a,r=[{key:"getAttributes",value:function(){var t=A_(C_(a.prototype),"getAttributes",this).call(this),e=this.props.model.points;return j_(j_({},t),{},{points:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.points,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return Sr(x_,{points:e,strokeWidth:r,stroke:n,strokeDasharray:o})}},{key:"getShape",value:function(){return Sr("g",null,this.getEdge())}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=xp(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttibutes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Kf(j_(j_({},o),{},{type:"start"})),a=Kf(j_(j_({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttibutes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Sr(bO,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.pointsList,i=r.draggable,a=[],u=o.length,c=function(e){var r="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=Sr("g",{className:r},t.getAppendShape(c)),l=n.editConfig,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var y=c.startIndex,h=c.endIndex,d=p&&(0===y||h===u-1);c.dragAble=!d,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=Vc.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=Vc.HORIZONTAL),s=Sr("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Sr("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return Sr("g",null,a)}}],r&&k_(e.prototype,r),a}(c_);function L_(t){return L_="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},L_(t)}function z_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function B_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?B_(Object(r),!0).forEach((function(e){U_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function U_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function G_(){return G_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Y_(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},G_.apply(this,arguments)}function Y_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$_(t)););return t}function V_(t,e){return V_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},V_(t,e)}function W_(t,e){if(e&&("object"===L_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $_(t){return $_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$_(t)}var K_=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&V_(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$_(n);if(o){var r=$_(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return W_(this,t)});function a(){return F_(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"getAttributes",value:function(){var t=G_($_(a.prototype),"getAttributes",this).call(this),e=this.props.model.path;return X_(X_({},t),{},{path:e})}},{key:"getEdge",value:function(){var t=this.getAttributes(),e=t.path,r=t.strokeWidth,n=t.stroke,o=t.strokeDashArray;return Sr(bO,{d:e,strokeWidth:r,stroke:n,fill:"none",strokeDasharray:o})}},{key:"getShape",value:function(){return Sr("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.getAttributes().path;return Sr(bO,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t,e,r=this.props.model,n=this.state.hover,o=r,i=o.path,a=o.isSelected,u=function(t){var e=kp(t);return[e[2],e[3]]}(i),c=(e=2,function(t){if(Array.isArray(t))return t}(t=u)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return z_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z_(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return{start:c[0],end:c[1],hover:n,isSelected:a}}}])&&H_(e.prototype,r),a}(c_),Z_=function(t,e){return Ou(t,e)},q_=function(){return xi.Date.now()},J_=/\s/,Q_=/^\s+/,tw=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&J_.test(t.charAt(e)););return e}(t)+1).replace(Q_,""):t},ew=/^[-+]0x[0-9a-f]+$/i,rw=/^0b[01]+$/i,nw=/^0o[0-7]+$/i,ow=parseInt,iw=function(t){if("number"==typeof t)return t;if(Eu(t))return NaN;if(Mi(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Mi(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=tw(t);var r=rw.test(t);return r||nw.test(t)?ow(t.slice(2),r?2:8):ew.test(t)?NaN:+t},aw=Math.max,uw=Math.min;function cw(t,e){void 0===e&&(e="Illegal state"),t||function(t){throw new Error("[mobx-utils] "+t)}(e)}var sw=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(sw(Object.getPrototypeOf(t))||[])},lw="pending",fw="fulfilled",pw="rejected";function yw(t){switch(this.state){case lw:return t.pending&&t.pending(this.value);case pw:return t.rejected&&t.rejected(this.value);case fw:return t.fulfilled?t.fulfilled(this.value):this.value}}function hw(t,e){if(cw(arguments.length<=2,"fromPromise expects up to two arguments"),cw("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(oe("observableFromPromise-resolve",(function(t){r.value=t,r.state=fw})),oe("observableFromPromise-reject",(function(t){r.value=t,r.state=pw}))),r.isPromiseBasedObservable=!0,r.case=yw;var n=e&&e.state===fw?e.value:void 0;return fe(r,{value:n,state:lw},{},{deep:!1}),r}!function(t){t.reject=oe("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=pw,r.value=e,r})),t.resolve=oe("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state=fw,r.value=e,r}))}(hw||(hw={}));var dw=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(){function t(t,e){var r=this;!function(t,e){Et(t.name||"<unnamed action>",t,this,void 0)}((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},dw([et.ref],t.prototype,"current",void 0),dw([oe.bound],t.prototype,"next",null),dw([oe.bound],t.prototype,"complete",null),dw([oe.bound],t.prototype,"error",null)}();var vw=function(){return vw=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},vw.apply(this,arguments)},bw=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},gw=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];function mw(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function Ow(t){return nr(t)||He(t)||We(t)}!function(){function t(t){var e=this;this.model=t,this.localValues=et.map({}),this.localComputedValues=et.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},cw(nr(t),"createViewModel expects an observable object"),function(t){return function(t){var e=sw(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))}(t).forEach((function(r){if(r!==pr&&"__mobxDidRunLazyInitializers"!==r){if(cw(-1===gw.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),he(t,r)){var n=ir(t,r).derivation;e.localComputedValues.set(r,ut(n.bind(e)))}var o=Object.getOwnPropertyDescriptor(t,r),i=o?{enumerable:o.enumerable}:{};Object.defineProperty(e,r,vw(vw({},i),{configurable:!0,get:function(){return he(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:oe((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;be(this.localValues).forEach((function(e){var r=t.localValues.get(e),n=t.model[e];He(n)?n.replace(r):We(n)?(n.clear(),n.merge(r)):function(t){return arguments.length>1?c(!1):ye(t)}(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},bw([ut],t.prototype,"isDirty",null),bw([ut],t.prototype,"changedValues",null),bw([oe.bound],t.prototype,"submit",null),bw([oe.bound],t.prototype,"reset",null),bw([oe.bound],t.prototype,"resetProperty",null)}();var _w=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},t(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();(function(t){function e(e,r,n){var o=void 0===n?{}:n,i=o.name,a=void 0===i?"ogm"+(1e3*Math.random()|0):i,u=o.keyToName,c=void 0===u?function(t){return""+t}:u,s=t.call(this)||this;s._keyToName=c,s._groupBy=r,s._ogmInfoKey=Symbol("ogmInfo"+a),s._base=e;for(var l=0;l<e.length;l++)s._addItem(e[l]);return s._disposeBaseObserver=ge(s._base,(function(t){if("splice"===t.type)Ee((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];s._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var a=i[o];s._addItem(a)}}));else{if("update"!==t.type)throw new Error("illegal state");Ee((function(){s._removeItem(t.oldValue),s._addItem(t.newValue)}))}})),s}_w(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=et([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),n=this._getGroupArr(r),o={groupByValue:r,groupArrIndex:n.length,reaction:ce((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),a=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=a}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:o}),n.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}})(Ye),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")}}();new Set,new Set;Promise.resolve();"undefined"!=typeof queueMicrotask?queueMicrotask:"undefined"!=typeof process&&process.nextTick;function ww(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ew,Sw,jw,Pw=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),xw(this,"undos",[]),xw(this,"redos",[]),xw(this,"callbacks",[]),xw(this,"stopWatch",null),xw(this,"curData",null),xw(this,"maxSize",50),xw(this,"waitTime",100),this.eventCenter=e}var e,r;return e=t,(r=[{key:"add",value:function(t){var e,r;Z_((e=this.undos,(r=null==e?0:e.length)?e[r-1]:void 0),t)||(this.undos.push(t),Z_(this.curData,t)||(this.redos=[]),this.eventCenter.emit(Yc.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();this.redos.push(t);var e=this.undos.pop();return this.curData=Xs(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=Xs(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=function(t,e){var r=new WeakMap;function n(n){var a=r.get(n.object);!function(t,e){switch(t.type){case"add":o(t.newValue,e,t.name);break;case"update":i(t.oldValue),o(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":i(t.oldValue);break;case"splice":t.removed.map(i),t.added.forEach((function(r,n){return o(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(Ow(t.object[n])){var a=r.get(t.object[n]);a&&(a.path=""+n)}}}(n,a),e(n,mw(a),t)}function o(t,e,i){if(Ow(t)){var a=r.get(t);if(a){if(a.parent!==e||a.path!==i)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+mw(e)+"/"+i+"', but it already exists at '"+mw(a.parent)+"/"+a.path+"'")}else{var u={parent:e,path:i,dispose:ge(t,n)};r.set(t,u),(s=t,nr(s)?be(s).map((function(t){return[t,s[t]]})):We(s)?be(s).map((function(t){return[t,s.get(t)]})):Ze(s)?m(s.entries()):He(s)?s.map((function(t,e){return[e,t]})):c(!1)).forEach((function(t){var e=t[0];return o(t[1],u,e)}))}}var s}function i(t){if(Ow(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),(n=t,nr(n)?be(n).map((function(t){return n[t]})):We(n)?be(n).map((function(t){return n.get(t)})):Ze(n)?m(n.values()):He(n)?n.slice():c(!1)).forEach(i)}var n}return o(t,void 0,""),function(){i(t)}}(t,function(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function h(t){return s=t,u=setTimeout(v,e),l?y(t):a}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=q_();if(d(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?uw(r,i-(t-s)):r}(t))}function b(t){return u=void 0,p&&n?y(t):(n=o=void 0,a)}function g(){var t=q_(),r=d(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return h(c);if(f)return clearTimeout(u),u=setTimeout(v,e),y(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=iw(e)||0,Mi(r)&&(l=!!r.leading,i=(f="maxWait"in r)?aw(iw(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:b(q_())},g}((function(){var r=t.modelToGraphData();e.add(r)}),this.waitTime))}}])&&ww(e.prototype,r),t}();function kw(t){return kw="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},kw(t)}function Aw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Tw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dw(Object(r),!0).forEach((function(e){Lw(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Nw(t,e){return Nw=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Nw(t,e)}function Cw(t,e){if(e&&("object"===kw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Rw(t)}function Rw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Iw(t){return Iw=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Iw(t)}function Lw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var zw,Bw,Xw,Uw=bx((jw=Sw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nw(t,e)}(u,t);var e,r,n,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Iw(o);if(i){var r=Iw(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Cw(this,t)});function u(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),Lw(Rw(t=a.call(this)),"ref",{current:null}),Lw(Rw(t),"__prevText",{type:"",text:"",id:""}),Lw(Rw(t),"keyupHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;13===e.keyCode&&e.altKey&&n.setElementState(0),t.__prevText={type:n.type,text:r,id:n.id}})),t.state={style:{left:0,top:0}},t}return e=u,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r,n,o=t.graphModel,i=o.transformMatrix,a=o.theme,u=o.textEditElement;if(u){var c;if(null===(c=u.text)||void 0===c||!c.value)if(u.BaseType===Gc.EDGE){var s=(u=u).text,l=u.textPosition,f=l.x,p=l.y;s.x=f,s.y=p,u.setText(s)}else u=u;var y={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(u.BaseType===Gc.EDGE){var h=a.edgeText,d=h.autoWrap,v=h.lineHeight,b=h.wrapPadding,g=u.textWidth;d&&g&&(e=Tw(Tw({},y),{},{width:g,minWidth:g,lineHeight:v,padding:b}))}else if(u.BaseType===Gc.NODE){var m=a.nodeText,O=m.autoWrap,_=m.lineHeight,w=m.wrapPadding,x=u,E=x.width,S=x.textWidth,j=x.modelType;(j!==Hc.TEXT_NODE&&O||j===Hc.TEXT_NODE&&O&&S)&&(e=Tw(Tw({},y),{},{width:S||E,minWidth:S||E,lineHeight:_,padding:w}))}var P=u.text,k=P.x,A=P.y,D=(r=i.CanvasPointToHtmlPoint([k,A]),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(r,n)||function(t,e){if(t){if("string"==typeof t)return Aw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Aw(t,e):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return{style:Tw({left:D[0],top:D[1]},e)}}}}],(r=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var t=this.props.graphModel,e=t.eventCenter,r=t.editConfig,n=r.edgeTextEdit,o=r.nodeTextEdit;(n||o)&&e.on(Yc.GRAPH_TRANSFORM,(function(){t.textEditElement&&t.textEditElement.setElementState(Uc.DEFAULT)}))}},{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,r=e.text,n=e.id;t.setElementTextById(n,r),t.eventCenter.emit(Yc.TEXT_UPDATE,Tw({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Sr("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&Mw(e.prototype,r),n&&Mw(e,n),u}(kr),Lw(Sw,"toolName","textEdit"),Ew=jw))||Ew;function Fw(t){return Fw="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},Fw(t)}function Hw(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,e)||Gw(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gw(t,e){if(t){if("string"==typeof t)return Yw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yw(t,e):void 0}}function Yw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ww(t,e){return Ww=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ww(t,e)}function $w(t,e){if(e&&("object"===Fw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Kw(t)}function Kw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zw(t){return Zw=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zw(t)}function qw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Jw=bx((Xw=Bw=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ww(t,e)}(a,t);var e,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Zw(n);if(o){var r=Zw(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return $w(this,t)});function a(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),qw(Kw(e=i.call(this)),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),qw(Kw(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel;o.moveElements(o.getSelectElements(!0),r,n)})),qw(Kw(e),"handleContextMenu",(function(t){t.preventDefault();var r,n=e.props,o=n.graphModel,i=n.graphModel,a=i.eventCenter,u=i.selectElements,c=o.getPointByClient({x:t.clientX,y:t.clientY}),s={nodes:[],edges:[]};(r=u.values(),function(t){if(Array.isArray(t))return Yw(t)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||Gw(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(t){t.BaseType===Gc.NODE&&s.nodes.push(t.getData()),t.BaseType===Gc.EDGE&&s.edges.push(t.getData())})),a.emit(Yc.SELECTION_CONTEXTMENU,{data:s,e:t,position:c})}));var r=t.graphModel.gridSize,n=t.eventCenter;return e.stepDrag=new ry({onDraging:e.onDraging,step:r,eventType:"multiple:select",eventCenter:n}),e}return e=a,r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformMatrix;if(!(e.size<=1)){var n=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===Gc.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===Gc.EDGE&&(e=function(t){return t.modelType===Hc.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-a/2,x1:n+i/2,y1:o+a/2}}(t):t.modelType===Hc.POLYLINE_EDGE?function(t){var e=t.points,r=xp(e),n=up(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===Hc.BEZIER_EDGE?function(t){var e=t.path,r=kp(e),n=up(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0}(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),a=Math.max(a,e.y1)}));var u=Hw(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=Hw(r.CanvasPointToHtmlPoint([i,a]),2);return i=c[0],a=c[1],Sr("div",{className:"lf-multiple-select",style:{left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(a-o+20,"px")},onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}],r&&Vw(e.prototype,r),a}(kr),qw(Bw,"toolName","multipleSelect"),zw=Xw))||zw;function Qw(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var tx=function(){function t(e){var r,n,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n="toolMap",o=new Map,n in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,this.instance=e,this.isDisabledTool(Uw.toolName)||this.registerTool(Uw.toolName,Uw),this.isDisabledTool(Jw.toolName)||this.registerTool(Jw.toolName,Jw)}var e,r;return e=t,(r=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&Qw(e.prototype,r),t}();function ex(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}r(5794);var rx=function(){function t(){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r={},(e="_events")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r}var e,r;return e=t,r=[{key:"on",value:function(t,e,r){var n=this;return t.split(",").forEach((function(t){t=t.trim(),n._events[t]||(n._events[t]=[]),n._events[t].push({callback:e,once:!!r})})),this}},{key:"once",value:function(t,e){var r=this;t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;t.split(",").forEach((function(t){var n=r._events[t]||[],o=r._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var a=n[i],u=a.callback;a.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),u.apply(r,[e])}};i(n),i(o)}))}},{key:"off",value:function(t,e){var r=this;return t||(this._events={}),t.split(",").forEach((function(t){if(e){for(var n=r._events[t]||[],o=n.length,i=0;i<o;i++)n[i].callback===e&&(n.splice(i,1),o--,i--);0===n.length&&delete r._events[t]}else delete r._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}],r&&ex(e.prototype,r),t}(),nx=r(7495),ox=r.n(nx);function ix(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var ax=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new(ox())(this.target),e.keyboard.enabled&&this.enable(!0)}var e,r;return e=t,r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(ha(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,n=e.callback,o=e.action;this.on(r,n,o)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatkey(t)}))}},{key:"formatkey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}],r&&ix(e.prototype,r),t}(),ux=ax,cx=null;function sx(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function lx(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}function fx(t){return fx="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},fx(t)}function px(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yx(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?px(Object(r),!0).forEach((function(e){dx(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):px(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hx(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dx(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vx=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),dx(this,"viewMap",new Map),dx(this,"components",[]),dx(this,"getView",(function(t){return r.viewMap.get(t)}));var n,o,i=e.container,a=e.width,u=e.height,c=e.dndOptions,s=e.keyboard,l=e.isSilentMode,f=e.snapline;this.options=ud(e),this.container=i,this.width=a||i.getBoundingClientRect().width,this.height=u||i.getBoundingClientRect().height,this.tool=new tx(this),this.eventCenter=new rx,this.history=new Pw(this.eventCenter),this.dnd=new ad({options:c,lf:this}),this.keyboard=new ux({lf:this,keyboard:s}),this.graphModel=new yy(yx(yx({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),l||!1===f||(this.snaplineModel=new Qb(this.graphModel),n=this.eventCenter,o=this.snaplineModel,n.on("node:mousemove",(function(t){var e=t.data;o.setNodeSnapLine(e)})),n.on("node:mouseup",(function(){o.clearSnapline()}))),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(n.enabled&&!e.textEditElement){var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)?(cx=null,!1):((cx=o).nodes.forEach((function(t){return sx(t,40)})),cx.edges.forEach((function(t){return lx(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(cx&&(cx.nodes||cx.edges)){t.clearSelectElements();var r=t.addElements(cx);if(!r)return;r.nodes.forEach((function(e){return t.select(e.id,!0)})),r.edges.forEach((function(e){return t.select(e.id,!0)})),cx.nodes.forEach((function(t){return sx(t,40)})),cx.edges.forEach((function(t){return lx(t,40)}))}return!1}})),r.on(["cmd + z","ctrl + z"],(function(){if(n.enabled&&!e.textEditElement)return t.undo(),!1})),r.on(["cmd + y","ctrl + y"],(function(){if(n.enabled&&!e.textEditElement)return t.redo(),!1})),r.on(["backspace"],(function(){if(n.enabled&&!e.textEditElement){var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,r,n;return e=t,r=[{key:"on",value:function(t,e){this.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.extensions.forEach((function(t){var n=t.pluginName||t.name;-1===r.indexOf(n)&&e.__installPlugin(t)}))}},{key:"__installPlugin",value:function(e){if("object"===fx(e)){var r=e.install,n=e.render;return r&&r.call(e,this,t),void(n&&this.components.push(n.bind(e)))}var o=new e({lf:this,LogicFlow:t});o.render&&this.components.push(o.render.bind(o))}},{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:c_,BaseEdgeModel:jf,BaseNode:Ig,BaseNodeModel:lv,RectNode:$g,RectNodeModel:_b,CircleNode:am,CircleNodeModel:_v,PolygonNode:_m,PolygonNodeModel:sb,TextNode:oO,TextNodeModel:Tb,LineEdge:O_,LineEdgeModel:If,DiamondNode:Nm,DiamondNodeModel:Xv,PolylineEdge:I_,PolylineEdgeModel:$f,BezierEdge:K_,BezierEdgeModel:qd,EllipseNode:$m,EllipseNodeModel:qv,HtmlNode:yO,HtmlNodeModel:$b,h:Sr,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)}));var o=e(n),i=o.view,a=o.model,u=i;r&&!u.isObervered&&(u.isObervered=!0,u=ri(u)),this.setView(t,u),this.graphModel.setModel(t,a)}else this._registerElement(t)}},{key:"_registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=ri(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this._registerElement({view:$g,model:_b,type:"rect"}),this._registerElement({type:"circle",view:am,model:_v}),this._registerElement({type:"polygon",view:_m,model:sb}),this._registerElement({type:"line",view:O_,model:If}),this._registerElement({type:"polyline",view:I_,model:$f}),this._registerElement({type:"bezier",view:K_,model:qd}),this._registerElement({type:"text",view:oO,model:Tb}),this._registerElement({type:"ellipse",view:$m,model:qv}),this._registerElement({type:"diamond",view:Nm,model:Xv}),this._registerElement({type:"html",view:yO,model:$b})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=df(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=df(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){var r=this.graphModel.transformMatrix;return r.zoom(t,e),"".concat(100*r.SCALE_X,"%")}},{key:"resetZoom",value:function(){this.graphModel.transformMatrix.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformMatrix.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformMatrix.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformMatrix;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformMatrix.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformMatrix,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"select",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformMatrix,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModel(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var a=r,u=a.x,c=a.y;e.focusOn(u,c,this.width,this.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"setDefaultEdgeType",value:function(t){this.options.edgeType=t,this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.setElementTextById(t,e)}},{key:"deleteElement",value:function(t){return this.graphModel.getNodeModel(t)?this.deleteNode(t):!!this.graphModel.getEdgeModel(t)&&this.deleteEdge(t)}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){return this.graphModel.addNode(t)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModel(t);if(!e)return!1;var r=e.getData(),n=this.options.guards,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}},{key:"editNodeText",value:function(t){this.graphModel.setTextEditable(t)}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModel(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"createEdge",value:function(t){this.graphModel.createEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(!r)return!1;var n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.removeEdgeById(t),o}},{key:"removeEdge",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.removeEdge(e,r):e?this.graphModel.removeEdgeBySource(e):r&&this.graphModel.removeEdgeByTarget(r)}},{key:"getNodeModel",value:function(t){return this.graphModel.getNodeModel(t)}},{key:"getNodeData",value:function(t){return this.graphModel.getNodeModel(t).getData()}},{key:"setNodeData",value:function(t){var e=t.id;this.graphModel.getNodeModel(e).updateData(t)}},{key:"getEdgeModel",value:function(t){return this.getEdge(t)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdge",value:function(t){var e=this.graphModel,r=e.edges,n=e.edgesMap,o=t.id,i=t.sourceNodeId,a=t.targetNodeId;if(o)return n[o]?[n[o].model]:void console.warn("不存在id为".concat(o,"的边"));if(i&&a){var u=[];return r.forEach((function(t){t.sourceNodeId===i&&t.targetNodeId===a&&u.push(t)})),u}if(i){var c=[];return r.forEach((function(t){t.sourceNodeId===i&&c.push(t)})),c}if(a){var s=[];return r.forEach((function(t){t.targetNodeId===a&&s.push(t)})),s}return[]}},{key:"getEdgeData",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"setEdgeData",value:function(t){var e,r=t.id;return null===(e=this.getEdgeModelById(r))||void 0===e?void 0:e.updateData(t)}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(df(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfig.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfig.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},a=0;a<r.length;a++){var u=r[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(t.sourceNodeId=o[r]),o[n]&&(t.targetNodeId=o[n]);var a=e.graphModel.createEdge(t);i.edges.push(a)})),i}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(t,this.graphModel);return this.graphModel.setFakerNode(r),r}console.warn("不存在为".concat(t.type,"类型的节点"))}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"getAreaElement",value:function(t,e){return this.graphModel.getAreaElement(t,e).map((function(t){return t.getData()}))}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.graphModel.graphDataToModel(df(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Wr(Sr(ed,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}],n=[{key:"use",value:function(t){var e=t.pluginName;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);var r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}}],r&&hx(e.prototype,r),n&&hx(e,n),t}();function bx(t){return ri(t)}dx(vx,"extensions",new Map);var gx=vx}(),exports.LogicFlow=n}();
|