forked from anseki/leader-line
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleader-line.min.js
More file actions
2 lines (2 loc) · 99.3 KB
/
leader-line.min.js
File metadata and controls
2 lines (2 loc) · 99.3 KB
1
2
/*! LeaderLine v1.0.5 (c) anseki https://anseki.github.io/leader-line/ */
var LeaderLine=function(){"use strict";var g,_,y,m,v,o,t,h,f,r,a,i,l,E="leader-line",k=1,w=2,O=3,M=4,n={top:k,right:w,bottom:O,left:M},C=1,I=2,L=3,A=4,V=5,S={straight:C,arc:I,fluid:L,magnet:A,grid:V},x="behind",s=E+"-defs",u='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="leader-line-defs"><style><![CDATA[.leader-line{position:absolute;overflow:visible!important;pointer-events:none!important;font-size:16px}#leader-line-defs{width:0;height:0;position:absolute;left:0;top:0}.leader-line-line-path{fill:none}.leader-line-mask-bg-rect{fill:#fff}.leader-line-caps-mask-anchor,.leader-line-caps-mask-marker-shape{fill:#000}.leader-line-caps-mask-anchor{stroke:#000}.leader-line-caps-mask-line,.leader-line-plugs-face{stroke:transparent}.leader-line-line-mask-shape{stroke:#fff}.leader-line-line-outline-mask-shape{stroke:#000}.leader-line-plug-mask-shape{fill:#fff;stroke:#000}.leader-line-plug-outline-mask-shape{fill:#000;stroke:#fff}.leader-line-areaAnchor{position:absolute;overflow:visible!important}]]></style><defs><circle id="leader-line-disc" cx="0" cy="0" r="5"/><rect id="leader-line-square" x="-5" y="-5" width="10" height="10"/><polygon id="leader-line-arrow1" points="-8,-8 8,0 -8,8 -5,0"/><polygon id="leader-line-arrow2" points="-4,-8 4,0 -4,8 -7,5 -2,0 -7,-5"/><polygon id="leader-line-arrow3" points="-4,-5 8,0 -4,5"/><g id="leader-line-hand"><path style="fill: #fcfcfc" d="M9.19 11.14h4.75c1.38 0 2.49-1.11 2.49-2.49 0-.51-.15-.98-.41-1.37h1.3c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.53-2.49-2.53h1.02c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49h14.96c1.37 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49H16.58C16-9.86 14.28-11.14 9.7-11.14c-4.79 0-6.55 3.42-7.87 4.73H-2.14v13.23h3.68C3.29 9.97 5.47 11.14 9.19 11.14L9.19 11.14Z"/><path style="fill: black" d="M13.95 12c1.85 0 3.35-1.5 3.35-3.35 0-.17-.02-.34-.04-.51h.07c1.85 0 3.35-1.5 3.35-3.35 0-.79-.27-1.51-.72-2.08 1.03-.57 1.74-1.67 1.74-2.93 0-.59-.16-1.15-.43-1.63h12.04c1.85 0 3.35-1.5 3.35-3.35 0-1.85-1.5-3.35-3.35-3.35H17.2C16.26-10.93 13.91-12 9.7-12 5.36-12 3.22-9.4 1.94-7.84c0 0-.29.33-.5.57-.63 0-3.58 0-3.58 0C-2.61-7.27-3-6.88-3-6.41v13.23c0 .47.39.86.86.86 0 0 2.48 0 3.2 0C2.9 10.73 5.29 12 9.19 12L13.95 12ZM9.19 10.28c-3.46 0-5.33-1.05-6.9-3.87-.15-.27-.44-.44-.75-.44 0 0-1.81 0-2.82 0V-5.55c1.06 0 3.11 0 3.11 0 .25 0 .44-.06.61-.25l.83-.95c1.23-1.49 2.91-3.53 6.43-3.53 3.45 0 4.9.74 5.57 1.72h-4.3c-.48 0-.86.38-.86.86s.39.86.86.86h22.34c.9 0 1.63.73 1.63 1.63 0 .9-.73 1.63-1.63 1.63H15.83c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.52c.9 0 1.63.73 1.63 1.63s-.73 1.63-1.63 1.63h-3.12c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.11c.88 0 1.63.76 1.63 1.67 0 .9-.73 1.63-1.63 1.63h-3.2c-.48 0-.86.39-.86.86 0 .47.39.86.86.86h1.36c.05.16.09.34.09.51 0 .9-.73 1.63-1.63 1.63C13.95 10.28 9.19 10.28 9.19 10.28Z"/></g><g id="leader-line-crosshair"><path d="M0-78.97c-43.54 0-78.97 35.43-78.97 78.97 0 43.54 35.43 78.97 78.97 78.97s78.97-35.43 78.97-78.97C78.97-43.54 43.55-78.97 0-78.97ZM76.51-1.21h-9.91v-9.11h-2.43v9.11h-11.45c-.64-28.12-23.38-50.86-51.5-51.5V-64.17h9.11V-66.6h-9.11v-9.91C42.46-75.86 75.86-42.45 76.51-1.21ZM-1.21-30.76h-9.11v2.43h9.11V-4.2c-1.44.42-2.57 1.54-2.98 2.98H-28.33v-9.11h-2.43v9.11H-50.29C-49.65-28-27.99-49.65-1.21-50.29V-30.76ZM-30.76 1.21v9.11h2.43v-9.11H-4.2c.42 1.44 1.54 2.57 2.98 2.98v24.13h-9.11v2.43h9.11v19.53C-27.99 49.65-49.65 28-50.29 1.21H-30.76ZM1.22 30.75h9.11v-2.43h-9.11V4.2c1.44-.42 2.56-1.54 2.98-2.98h24.13v9.11h2.43v-9.11h19.53C49.65 28 28 49.65 1.22 50.29V30.75ZM30.76-1.21v-9.11h-2.43v9.11H4.2c-.42-1.44-1.54-2.56-2.98-2.98V-28.33h9.11v-2.43h-9.11V-50.29C28-49.65 49.65-28 50.29-1.21H30.76ZM-1.21-76.51v9.91h-9.11v2.43h9.11v11.45c-28.12.64-50.86 23.38-51.5 51.5H-64.17v-9.11H-66.6v9.11h-9.91C-75.86-42.45-42.45-75.86-1.21-76.51ZM-76.51 1.21h9.91v9.11h2.43v-9.11h11.45c.64 28.12 23.38 50.86 51.5 51.5v11.45h-9.11v2.43h9.11v9.91C-42.45 75.86-75.86 42.45-76.51 1.21ZM1.22 76.51v-9.91h9.11v-2.43h-9.11v-11.45c28.12-.64 50.86-23.38 51.5-51.5h11.45v9.11h2.43v-9.11h9.91C75.86 42.45 42.45 75.86 1.22 76.51Z"/><path d="M0 83.58-7.1 96 7.1 96Z"/><path d="M0-83.58 7.1-96-7.1-96"/><path d="M83.58 0 96 7.1 96-7.1Z"/><path d="M-83.58 0-96-7.1-96 7.1Z"/></g></defs></svg>',b={disc:{elmId:"leader-line-disc",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},square:{elmId:"leader-line-square",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},arrow1:{elmId:"leader-line-arrow1",bBox:{left:-8,top:-8,width:16,height:16,right:8,bottom:8},widthR:4,heightR:4,bCircle:8,sideLen:8,backLen:8,overhead:8,outlineBase:2,outlineMax:1.5},arrow2:{elmId:"leader-line-arrow2",bBox:{left:-7,top:-8,width:11,height:16,right:4,bottom:8},widthR:2.75,heightR:4,bCircle:8,sideLen:8,backLen:7,overhead:4,outlineBase:1,outlineMax:1.75},arrow3:{elmId:"leader-line-arrow3",bBox:{left:-4,top:-5,width:12,height:10,right:8,bottom:5},widthR:3,heightR:2.5,bCircle:8,sideLen:5,backLen:4,overhead:8,outlineBase:1,outlineMax:2.5},hand:{elmId:"leader-line-hand",bBox:{left:-3,top:-12,width:40,height:24,right:37,bottom:12},widthR:10,heightR:6,bCircle:37,sideLen:12,backLen:3,overhead:37},crosshair:{elmId:"leader-line-crosshair",noRotate:!0,bBox:{left:-96,top:-96,width:192,height:192,right:96,bottom:96},widthR:48,heightR:48,bCircle:96,sideLen:96,backLen:96,overhead:0}},P={behind:x,disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},N={disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},T=[k,w,O,M],W="auto",B={x:"left",y:"top",width:"width",height:"height"},R=80,F=4,G=5,D=120,z=8,j=3.75,H=10,U=30,Z=.5522847,Y=.25*Math.PI,p=/^\s*(\-?[\d\.]+)\s*(\%)?\s*$/,X="http://www.w3.org/2000/svg",e="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,q=!e&&!!document.uniqueID,c="MozAppearance"in document.documentElement.style,d=!(e||c||!window.chrome||!window.CSS),Q=!e&&!q&&!c&&!d&&!window.chrome&&"WebkitAppearance"in document.documentElement.style,K=q||e?.2:.1,J={path:L,lineColor:"coral",lineSize:4,plugSE:[x,"arrow1"],plugSizeSE:[1,1],lineOutlineEnabled:!1,lineOutlineColor:"indianred",lineOutlineSize:.25,plugOutlineEnabledSE:[!1,!1],plugOutlineSizeSE:[1,1]},$=(a={}.toString,i={}.hasOwnProperty.toString,l=i.call(Object),function(e){var t,n;return e&&"[object Object]"===a.call(e)&&(!(t=Object.getPrototypeOf(e))||(n=t.hasOwnProperty("constructor")&&t.constructor)&&"function"==typeof n&&i.call(n)===l)}),ee=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},te=function(){var e,x={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},b=1e3/60/2,t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,b)},n=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){clearTimeout(e)},a=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},k=[],w=0;function r(){var i=Date.now(),o=!1;e&&(n.call(window,e),e=null),k.forEach(function(e){var t,n,a;if(e.framesStart){if((t=i-e.framesStart)>=e.duration&&e.count&&e.loopsLeft<=1)return a=e.frames[e.lastFrame=e.reverse?0:e.frames.length-1],e.frameCallback(a.value,!0,a.timeRatio,a.outputRatio),void(e.framesStart=null);if(t>e.duration){if(n=Math.floor(t/e.duration),e.count){if(n>=e.loopsLeft)return a=e.frames[e.lastFrame=e.reverse?0:e.frames.length-1],e.frameCallback(a.value,!0,a.timeRatio,a.outputRatio),void(e.framesStart=null);e.loopsLeft-=n}e.framesStart+=e.duration*n,t=i-e.framesStart}e.reverse&&(t=e.duration-t),a=e.frames[e.lastFrame=Math.round(t/b)],!1!==e.frameCallback(a.value,!1,a.timeRatio,a.outputRatio)?o=!0:e.framesStart=null}}),o&&(e=t.call(window,r))}function O(e,t){e.framesStart=Date.now(),null!=t&&(e.framesStart-=e.duration*(e.reverse?1-t:t)),e.loopsLeft=e.count,e.lastFrame=null,r()}return{add:function(n,e,t,a,i,o,r){var l,s,u,h,p,c,d,f,y,m,S,g,_,v=++w;function E(e,t){return{value:n(t),timeRatio:e,outputRatio:t}}if("string"==typeof i&&(i=x[i]),n=n||function(){},t<b)s=[E(0,0),E(1,1)];else{if(u=b/t,s=[E(0,0)],0===i[0]&&0===i[1]&&1===i[2]&&1===i[3])for(p=u;p<=1;p+=u)s.push(E(p,p));else for(c=h=(p=u)/10;c<=1;c+=h)void 0,m=(y=(f=c)*f)*f,_=3*(S=1-f)*y,p<=(d={x:(g=3*(S*S)*f)*i[0]+_*i[2]+m,y:g*i[1]+_*i[3]+m}).x&&(s.push(E(d.x,d.y)),p+=u);s.push(E(1,1))}return l={animId:v,frameCallback:e,duration:t,count:a,frames:s,reverse:!!o},k.push(l),!1!==r&&O(l,r),v},remove:function(n){var a;k.some(function(e,t){return e.animId===n&&(a=t,!(e.framesStart=null))})&&k.splice(a,1)},start:function(t,n,a){k.some(function(e){return e.animId===t&&(e.reverse=!!n,O(e,a),!0)})},stop:function(t,n){var a;return k.some(function(e){return e.animId===t&&(n?null!=e.lastFrame&&(a=e.frames[e.lastFrame].timeRatio):(a=(Date.now()-e.framesStart)/e.duration,e.reverse&&(a=1-a),a<0?a=0:1<a&&(a=1)),!(e.framesStart=null))}),a},validTiming:function(t){return"string"==typeof t?x[t]:Array.isArray(t)&&[0,1,2,3].every(function(e){return a(t[e])&&0<=t[e]&&t[e]<=1})?[t[0],t[1],t[2],t[3]]:null}}}(),ne=function(e){e.SVGPathElement.prototype.getPathData&&e.SVGPathElement.prototype.setPathData||function(){var i={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},o=function(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()},r=-1!==e.navigator.userAgent.indexOf("MSIE ");o.prototype={parseSegment:function(){var e=this._string[this._currentIndex],t=i[e]?i[e]:null;if(null===t){if(null===this._prevCommand)return null;if(null===(t=("+"===e||"-"===e||"."===e||"0"<=e&&e<="9")&&"Z"!==this._prevCommand?"M"===this._prevCommand?"L":"m"===this._prevCommand?"l":this._prevCommand:null))return null}else this._currentIndex+=1;var n=null,a=(this._prevCommand=t).toUpperCase();return"H"===a||"V"===a?n=[this._parseNumber()]:"M"===a||"L"===a||"T"===a?n=[this._parseNumber(),this._parseNumber()]:"S"===a||"Q"===a?n=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"C"===a?n=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"A"===a?n=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:"Z"===a&&(this._skipOptionalSpaces(),n=[]),null===n||0<=n.indexOf(null)?null:{type:t,values:n}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var e=this._string[this._currentIndex];return i[e]?i[e]:null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var e=this.peekSegmentType();return"M"===e||"m"===e},_isCurrentSpace:function(){var e=this._string[this._currentIndex];return e<=" "&&(" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e)},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!==this._string[this._currentIndex])&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","===this._string[this._currentIndex]&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var e=0,t=0,n=1,a=0,i=1,o=1,r=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"===this._string[this._currentIndex]?this._currentIndex+=1:this._currentIndex<this._endIndex&&"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,i=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])&&"."!==this._string[this._currentIndex])return null;for(var l=this._currentIndex;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==l)for(var s=this._currentIndex-1,u=1;l<=s;)t+=u*(this._string[s]-"0"),s-=1,u*=10;if(this._currentIndex<this._endIndex&&"."===this._string[this._currentIndex]){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)n*=10,a+=(this._string.charAt(this._currentIndex)-"0")/n,this._currentIndex+=1}if(this._currentIndex!==r&&this._currentIndex+1<this._endIndex&&("e"===this._string[this._currentIndex]||"E"===this._string[this._currentIndex])&&"x"!==this._string[this._currentIndex+1]&&"m"!==this._string[this._currentIndex+1]){if(this._currentIndex+=1,"+"===this._string[this._currentIndex]?this._currentIndex+=1:"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,o=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)e*=10,e+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var h=t+a;return h*=i,e&&(h*=Math.pow(10,o*e)),r===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),h)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var e=null,t=this._string[this._currentIndex];if(this._currentIndex+=1,"0"===t)e=0;else{if("1"!==t)return null;e=1}return this._skipOptionalSpacesOrDelimiter(),e}};var a=function(e){if(!e||0===e.length)return[];var t=new o(e),n=[];if(t.initialCommandIsMoveTo())for(;t.hasMoreData();){var a=t.parseSegment();if(null===a)break;n.push(a)}return n},n=e.SVGPathElement.prototype.setAttribute,l=e.SVGPathElement.prototype.removeAttribute,s=e.Symbol?e.Symbol():"__cachedPathData",u=e.Symbol?e.Symbol():"__cachedNormalizedPathData",U=function(e,t,n,a,i,o,r,l,s,u){var h,p,c,d,f,y=function(e,t,n){return{x:e*Math.cos(n)-t*Math.sin(n),y:e*Math.sin(n)+t*Math.cos(n)}},m=(h=r,Math.PI*h/180),S=[];if(u)p=u[0],c=u[1],d=u[2],f=u[3];else{var g=y(e,t,-m);e=g.x,t=g.y;var _=y(n,a,-m),v=(e-(n=_.x))/2,E=(t-(a=_.y))/2,x=v*v/(i*i)+E*E/(o*o);1<x&&(i*=x=Math.sqrt(x),o*=x);var b=i*i,k=o*o,w=b*k-b*E*E-k*v*v,O=b*E*E+k*v*v,M=(l===s?-1:1)*Math.sqrt(Math.abs(w/O));d=M*i*E/o+(e+n)/2,f=M*-o*v/i+(t+a)/2,p=Math.asin(parseFloat(((t-f)/o).toFixed(9))),c=Math.asin(parseFloat(((a-f)/o).toFixed(9))),e<d&&(p=Math.PI-p),n<d&&(c=Math.PI-c),p<0&&(p=2*Math.PI+p),c<0&&(c=2*Math.PI+c),s&&c<p&&(p-=2*Math.PI),!s&&p<c&&(c-=2*Math.PI)}var C=c-p;if(Math.abs(C)>120*Math.PI/180){var I=c,L=n,A=a;c=s&&p<c?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,n=d+i*Math.cos(c),a=f+o*Math.sin(c),S=U(n,a,L,A,i,o,r,0,s,[c,I,d,f])}C=c-p;var V=Math.cos(p),P=Math.sin(p),N=Math.cos(c),T=Math.sin(c),W=Math.tan(C/4),B=4/3*i*W,R=4/3*o*W,F=[e,t],G=[e+B*P,t-R*V],D=[n+B*T,a-R*N],z=[n,a];if(G[0]=2*F[0]-G[0],G[1]=2*F[1]-G[1],u)return[G,D,z].concat(S);S=[G,D,z].concat(S).join().split(",");var j=[],H=[];return S.forEach(function(e,t){t%2?H.push(y(S[t-1],S[t],m).y):H.push(y(S[t],S[t+1],m).x),6===H.length&&(j.push(H),H=[])}),j},h=function(e){return e.map(function(e){return{type:e.type,values:Array.prototype.slice.call(e.values)}})},p=function(e){var m=[],S=null,g=null,_=null,v=null,E=null,x=null,b=null;return e.forEach(function(e){if("M"===e.type){var t=e.values[0],n=e.values[1];m.push({type:"M",values:[t,n]}),v=x=t,E=b=n}else if("C"===e.type){var a=e.values[0],i=e.values[1],o=e.values[2],r=e.values[3];t=e.values[4],n=e.values[5];m.push({type:"C",values:[a,i,o,r,t,n]}),g=o,_=r,v=t,E=n}else if("L"===e.type){t=e.values[0],n=e.values[1];m.push({type:"L",values:[t,n]}),v=t,E=n}else if("H"===e.type){t=e.values[0];m.push({type:"L",values:[t,E]}),v=t}else if("V"===e.type){n=e.values[0];m.push({type:"L",values:[v,n]}),E=n}else if("S"===e.type){o=e.values[0],r=e.values[1],t=e.values[2],n=e.values[3];s="C"===S||"S"===S?(l=v+(v-g),E+(E-_)):(l=v,E),m.push({type:"C",values:[l,s,o,r,t,n]}),g=o,_=r,v=t,E=n}else if("T"===e.type){t=e.values[0],n=e.values[1];i="Q"===S||"T"===S?(a=v+(v-g),E+(E-_)):(a=v,E);var l=v+2*(a-v)/3,s=E+2*(i-E)/3,u=t+2*(a-t)/3,h=n+2*(i-n)/3;m.push({type:"C",values:[l,s,u,h,t,n]}),g=a,_=i,v=t,E=n}else if("Q"===e.type){a=e.values[0],i=e.values[1],t=e.values[2],n=e.values[3],l=v+2*(a-v)/3,s=E+2*(i-E)/3,u=t+2*(a-t)/3,h=n+2*(i-n)/3;m.push({type:"C",values:[l,s,u,h,t,n]}),g=a,_=i,v=t,E=n}else if("A"===e.type){var p=e.values[0],c=e.values[1],d=e.values[2],f=e.values[3],y=e.values[4];t=e.values[5],n=e.values[6];if(0===p||0===c)m.push({type:"C",values:[v,E,t,n,t,n]}),v=t,E=n;else if(v!==t||E!==n)U(v,E,t,n,p,c,d,f,y).forEach(function(e){m.push({type:"C",values:e}),v=t,E=n})}else"Z"===e.type&&(m.push(e),v=x,E=b);S=e.type}),m};e.SVGPathElement.prototype.setAttribute=function(e,t){"d"===e&&(this[s]=null,this[u]=null),n.call(this,e,t)},e.SVGPathElement.prototype.removeAttribute=function(e,t){"d"===e&&(this[s]=null,this[u]=null),l.call(this,e)},e.SVGPathElement.prototype.getPathData=function(e){if(e&&e.normalize){if(this[u])return h(this[u]);this[s]?n=h(this[s]):(n=a(this.getAttribute("d")||""),this[s]=h(n));var t=p(function(e){var s=[],u=null,h=null,p=null,c=null;return e.forEach(function(e){var t=e.type;if("M"===t){var n=e.values[0],a=e.values[1];s.push({type:"M",values:[n,a]}),u=p=n,h=c=a}else if("m"===t)n=u+e.values[0],a=h+e.values[1],s.push({type:"M",values:[n,a]}),u=p=n,h=c=a;else if("L"===t)n=e.values[0],a=e.values[1],s.push({type:"L",values:[n,a]}),u=n,h=a;else if("l"===t)n=u+e.values[0],a=h+e.values[1],s.push({type:"L",values:[n,a]}),u=n,h=a;else if("C"===t){var i=e.values[0],o=e.values[1],r=e.values[2],l=e.values[3];n=e.values[4],a=e.values[5],s.push({type:"C",values:[i,o,r,l,n,a]}),u=n,h=a}else"c"===t?(i=u+e.values[0],o=h+e.values[1],r=u+e.values[2],l=h+e.values[3],n=u+e.values[4],a=h+e.values[5],s.push({type:"C",values:[i,o,r,l,n,a]}),u=n,h=a):"Q"===t?(i=e.values[0],o=e.values[1],n=e.values[2],a=e.values[3],s.push({type:"Q",values:[i,o,n,a]}),u=n,h=a):"q"===t?(i=u+e.values[0],o=h+e.values[1],n=u+e.values[2],a=h+e.values[3],s.push({type:"Q",values:[i,o,n,a]}),u=n,h=a):"A"===t?(n=e.values[5],a=e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],n,a]}),u=n,h=a):"a"===t?(n=u+e.values[5],a=h+e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],n,a]}),u=n,h=a):"H"===t?(n=e.values[0],s.push({type:"H",values:[n]}),u=n):"h"===t?(n=u+e.values[0],s.push({type:"H",values:[n]}),u=n):"V"===t?(a=e.values[0],s.push({type:"V",values:[a]}),h=a):"v"===t?(a=h+e.values[0],s.push({type:"V",values:[a]}),h=a):"S"===t?(r=e.values[0],l=e.values[1],n=e.values[2],a=e.values[3],s.push({type:"S",values:[r,l,n,a]}),u=n,h=a):"s"===t?(r=u+e.values[0],l=h+e.values[1],n=u+e.values[2],a=h+e.values[3],s.push({type:"S",values:[r,l,n,a]}),u=n,h=a):"T"===t?(n=e.values[0],a=e.values[1],s.push({type:"T",values:[n,a]}),u=n,h=a):"t"===t?(n=u+e.values[0],a=h+e.values[1],s.push({type:"T",values:[n,a]}),u=n,h=a):"Z"!==t&&"z"!==t||(s.push({type:"Z",values:[]}),u=p,h=c)}),s}(n));return this[u]=h(t),t}if(this[s])return h(this[s]);var n=a(this.getAttribute("d")||"");return this[s]=h(n),n},e.SVGPathElement.prototype.setPathData=function(e){if(0===e.length)r?this.setAttribute("d",""):this.removeAttribute("d");else{for(var t="",n=0,a=e.length;n<a;n+=1){var i=e[n];0<n&&(t+=" "),t+=i.type,i.values&&0<i.values.length&&(t+=" "+i.values.join(" "))}this.setAttribute("d",t)}},e.SVGRectElement.prototype.getPathData=function(e){var t=this.x.baseVal.value,n=this.y.baseVal.value,a=this.width.baseVal.value,i=this.height.baseVal.value,o=this.hasAttribute("rx")?this.rx.baseVal.value:this.ry.baseVal.value,r=this.hasAttribute("ry")?this.ry.baseVal.value:this.rx.baseVal.value;a/2<o&&(o=a/2),i/2<r&&(r=i/2);var l=[{type:"M",values:[t+o,n]},{type:"H",values:[t+a-o]},{type:"A",values:[o,r,0,0,1,t+a,n+r]},{type:"V",values:[n+i-r]},{type:"A",values:[o,r,0,0,1,t+a-o,n+i]},{type:"H",values:[t+o]},{type:"A",values:[o,r,0,0,1,t,n+i-r]},{type:"V",values:[n+r]},{type:"A",values:[o,r,0,0,1,t+o,n]},{type:"Z",values:[]}];return l=l.filter(function(e){return"A"!==e.type||0!==e.values[0]&&0!==e.values[1]}),e&&!0===e.normalize&&(l=p(l)),l},e.SVGCircleElement.prototype.getPathData=function(e){var t=this.cx.baseVal.value,n=this.cy.baseVal.value,a=this.r.baseVal.value,i=[{type:"M",values:[t+a,n]},{type:"A",values:[a,a,0,0,1,t,n+a]},{type:"A",values:[a,a,0,0,1,t-a,n]},{type:"A",values:[a,a,0,0,1,t,n-a]},{type:"A",values:[a,a,0,0,1,t+a,n]},{type:"Z",values:[]}];return e&&!0===e.normalize&&(i=p(i)),i},e.SVGEllipseElement.prototype.getPathData=function(e){var t=this.cx.baseVal.value,n=this.cy.baseVal.value,a=this.rx.baseVal.value,i=this.ry.baseVal.value,o=[{type:"M",values:[t+a,n]},{type:"A",values:[a,i,0,0,1,t,n+i]},{type:"A",values:[a,i,0,0,1,t-a,n]},{type:"A",values:[a,i,0,0,1,t,n-i]},{type:"A",values:[a,i,0,0,1,t+a,n]},{type:"Z",values:[]}];return e&&!0===e.normalize&&(o=p(o)),o},e.SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},e.SVGPolylineElement.prototype.getPathData=function(){for(var e=[],t=0;t<this.points.numberOfItems;t+=1){var n=this.points.getItem(t);e.push({type:0===t?"M":"L",values:[n.x,n.y]})}return e},e.SVGPolygonElement.prototype.getPathData=function(){for(var e=[],t=0;t<this.points.numberOfItems;t+=1){var n=this.points.getItem(t);e.push({type:0===t?"M":"L",values:[n.x,n.y]})}return e.push({type:"Z",values:[]}),e}}()},ae=function(n){var a={};function i(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}return i.m=n,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,n){n.r(t);var a=500,i=[],o=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},l=Date.now(),s=void 0;function u(){var n=void 0,e=void 0;s&&(r.call(window,s),s=null),i.forEach(function(e){var t;(t=e.event)&&(e.event=null,e.listener(t),n=!0)}),n?(l=Date.now(),e=!0):Date.now()-l<a&&(e=!0),e&&(s=o.call(window,u))}function h(n){var a=-1;return i.some(function(e,t){return e.listener===n&&(a=t,!0)}),a}var p={add:function(e){var t=void 0;return-1===h(e)?(i.push(t={listener:e}),function(e){t.event=e,s||u()}):null},remove:function(e){var t;-1<(t=h(e))&&(i.splice(t,1),!i.length&&s&&(r.call(window,s),s=null))}};t.default=p}]).default,ie={line_altColor:{iniValue:!1},line_color:{},line_colorTra:{iniValue:!1},line_strokeWidth:{},plug_enabled:{iniValue:!1},plug_enabledSE:{hasSE:!0,iniValue:!1},plug_plugSE:{hasSE:!0,iniValue:x},plug_colorSE:{hasSE:!0},plug_colorTraSE:{hasSE:!0,iniValue:!1},plug_markerWidthSE:{hasSE:!0},plug_markerHeightSE:{hasSE:!0},lineOutline_enabled:{iniValue:!1},lineOutline_color:{},lineOutline_colorTra:{iniValue:!1},lineOutline_strokeWidth:{},lineOutline_inStrokeWidth:{},plugOutline_enabledSE:{hasSE:!0,iniValue:!1},plugOutline_plugSE:{hasSE:!0,iniValue:x},plugOutline_colorSE:{hasSE:!0},plugOutline_colorTraSE:{hasSE:!0,iniValue:!1},plugOutline_strokeWidthSE:{hasSE:!0},plugOutline_inStrokeWidthSE:{hasSE:!0},position_socketXYSE:{hasSE:!0,hasProps:!0},position_plugOverheadSE:{hasSE:!0},position_path:{},position_lineStrokeWidth:{},position_socketGravitySE:{hasSE:!0},path_pathData:{},path_edge:{hasProps:!0},viewBox_bBox:{hasProps:!0},viewBox_plugBCircleSE:{hasSE:!0},lineMask_enabled:{iniValue:!1},lineMask_outlineMode:{iniValue:!1},lineMask_x:{},lineMask_y:{},lineOutlineMask_x:{},lineOutlineMask_y:{},maskBGRect_x:{},maskBGRect_y:{},capsMaskAnchor_enabledSE:{hasSE:!0,iniValue:!1},capsMaskAnchor_pathDataSE:{hasSE:!0},capsMaskAnchor_strokeWidthSE:{hasSE:!0},capsMaskMarker_enabled:{iniValue:!1},capsMaskMarker_enabledSE:{hasSE:!0,iniValue:!1},capsMaskMarker_plugSE:{hasSE:!0,iniValue:x},capsMaskMarker_markerWidthSE:{hasSE:!0},capsMaskMarker_markerHeightSE:{hasSE:!0},caps_enabled:{iniValue:!1},attach_plugSideLenSE:{hasSE:!0},attach_plugBackLenSE:{hasSE:!0}},oe={show_on:{},show_effect:{},show_animOptions:{},show_animId:{},show_inAnim:{}},re="fade",le=[],se={},ue=0,he={},pe=0;function ce(t,n){var e,a;return typeof t!=typeof n||(e=$(t)?"obj":Array.isArray(t)?"array":"")!=($(n)?"obj":Array.isArray(n)?"array":"")||("obj"===e?ce(a=Object.keys(t).sort(),Object.keys(n).sort())||a.some(function(e){return ce(t[e],n[e])}):"array"===e?t.length!==n.length||t.some(function(e,t){return ce(e,n[t])}):t!==n)}function de(n){return n?$(n)?Object.keys(n).reduce(function(e,t){return e[t]=de(n[t]),e},{}):Array.isArray(n)?n.map(de):n:n}function fe(e){var t,n,a,i=1,o=e=(e+"").trim();function r(e){var t=1,n=p.exec(e);return n&&(t=parseFloat(n[1]),n[2]?t=0<=t&&t<=100?t/100:1:(t<0||1<t)&&(t=1)),t}return(t=/^(rgba|hsla|hwb|gray|device\-cmyk)\s*\(([\s\S]+)\)$/i.exec(e))?(n=t[1].toLowerCase(),a=t[2].trim().split(/\s*,\s*/),"rgba"===n&&4===a.length?(i=r(a[3]),o="rgb("+a.slice(0,3).join(", ")+")"):"hsla"===n&&4===a.length?(i=r(a[3]),o="hsl("+a.slice(0,3).join(", ")+")"):"hwb"===n&&4===a.length?(i=r(a[3]),o="hwb("+a.slice(0,3).join(", ")+")"):"gray"===n&&2===a.length?(i=r(a[1]),o="gray("+a[0]+")"):"device-cmyk"===n&&5<=a.length&&(i=r(a[4]),o="device-cmyk("+a.slice(0,4).join(", ")+")")):(t=/^\#(?:([\da-f]{6})([\da-f]{2})|([\da-f]{3})([\da-f]))$/i.exec(e))?o=t[1]?(i=parseInt(t[2],16)/255,"#"+t[1]):(i=parseInt(t[4]+t[4],16)/255,"#"+t[3]):"transparent"===e.toLocaleLowerCase()&&(i=0),[i,o]}function ye(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect)}function me(e){var t={},n=e.getBoundingClientRect();return t.left=e.offsetLeft,t.top=e.offsetTop,t.width=n.width,t.height=n.height,t.x=t.left,t.y=t.top,t}function Se(e,t){return t.parentElement?function(e,t){if(t){var n,a,i,o={},r=e;for(n=me(e);(r=r.offsetParent)&&r!==t&&r;)a=me(r),n.left+=a.left,n.top+=a.top;for(i in n.x=n.left,n.y=n.top,n.right=n.left+n.width,n.bottom=n.top+n.height,n)o[i]=n[i];return o}return ge(e)}(e,t.parentElement):function(e,t){var n,a,i=0,o=0;return t=t||window,(a=_e(e,t))?a.length?(a.forEach(function(e,t){var n=ge(e,0<t);i+=n.left,o+=n.top,n=function(e){var t=e.ownerDocument.defaultView.getComputedStyle(e,"");return{left:e.clientLeft+parseFloat(t.paddingLeft),top:e.clientTop+parseFloat(t.paddingTop)}}(e),i+=n.left,o+=n.top}),(n=ge(e,!0)).left+=i,n.right+=i,n.top+=o,n.bottom+=o,n):ge(e):null}(e,t.baseWindow)}function ge(e,t){var n,a,i,o,r={};if(!(i=e.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_DISCONNECTED)return console.error("A disconnected element was passed."),null;for(a in n=e.getBoundingClientRect())r[a]=n[a];if(!t){if(!(o=i.defaultView))return console.error("Cannot get window that contains the element."),null;r.left+=o.pageXOffset,r.right+=o.pageXOffset,r.top+=o.pageYOffset,r.bottom+=o.pageYOffset}return r}function _e(e,t){var n,a,i=[],o=e;for(t=t||window;;){if(!(n=o.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(!(a=n.defaultView))return console.error("Cannot get window that contains the element."),null;if(a===t)break;if(!(o=a.frameElement))return console.error("`baseWindow` was not found."),null;i.unshift(o)}return i}function ve(e,t){var n=e.x-t.x,a=e.y-t.y;return Math.sqrt(n*n+a*a)}function Ee(e,t,n){var a=t.x-e.x,i=t.y-e.y;return{x:e.x+a*n,y:e.y+i*n,angle:Math.atan2(i,a)/(Math.PI/180)}}function xe(e,t,n){var a=Math.atan2(e.y-t.y,t.x-e.x);return{x:t.x+Math.cos(a)*n,y:t.y+Math.sin(a)*n*-1}}function be(e,t,n,a,i){var o=i*i,r=o*i,l=1-i,s=l*l,u=s*l,h=u*e.x+3*s*i*t.x+3*l*o*n.x+r*a.x,p=u*e.y+3*s*i*t.y+3*l*o*n.y+r*a.y,c=e.x+2*i*(t.x-e.x)+o*(n.x-2*t.x+e.x),d=e.y+2*i*(t.y-e.y)+o*(n.y-2*t.y+e.y),f=t.x+2*i*(n.x-t.x)+o*(a.x-2*n.x+t.x),y=t.y+2*i*(n.y-t.y)+o*(a.y-2*n.y+t.y),m=l*e.x+i*t.x,S=l*e.y+i*t.y,g=l*n.x+i*a.x,_=l*n.y+i*a.y,v=90-180*Math.atan2(c-f,d-y)/Math.PI;return{x:h,y:p,fromP2:{x:c,y:d},toP1:{x:f,y:y},fromP1:{x:m,y:S},toP2:{x:g,y:_},angle:v+=180<v?-180:180}}function ke(n,a,i,o,e){function r(e,t,n,a,i){return e*(e*(-3*t+9*n-9*a+3*i)+6*t-12*n+6*a)-3*t+3*n}var l,s,u,h,p,c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0;return l=(e=null==e||1<e?1:e<0?0:e)/2,[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816].forEach(function(e,t){u=r(s=l*e+l,n.x,a.x,i.x,o.x),h=r(s,n.y,a.y,i.y,o.y),p=u*u+h*h,d+=c[t]*Math.sqrt(p)}),l*d}function we(e,t,n,a,i){for(var o,r=.5,l=1-r;o=ke(e,t,n,a,l),!(Math.abs(o-i)<=.01);)l+=(o<i?1:-1)*(r/=2);return l}function Oe(e,n){var a;return e.forEach(function(e){var t=n?e.map(function(e){var t={x:e.x,y:e.y};return n(t),t}):e;a||(a=[{type:"M",values:[t[0].x,t[0].y]}]),a.push(t.length?2===t.length?{type:"L",values:[t[1].x,t[1].y]}:{type:"C",values:[t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y]}:{type:"Z",values:[]})}),a}function Me(e){var n=[],a=0;return e.forEach(function(e){var t=(2===e.length?ve:ke).apply(null,e);n.push(t),a+=t}),{segsLen:n,lenAll:a}}function Ce(e,a){return null==e||null==a||e.length!==a.length||e.some(function(e,t){var n=a[t];return e.type!==n.type||e.values.some(function(e,t){return e!==n.values[t]})})}function Ie(e,t,n){e.events[t]?e.events[t].indexOf(n)<0&&e.events[t].push(n):e.events[t]=[n]}function Le(e,t,n){var a;e.events[t]&&-1<(a=e.events[t].indexOf(n))&&e.events[t].splice(a,1)}function Ae(e){t&&clearTimeout(t),le.push(e),t=setTimeout(function(){le.forEach(function(e){e()}),le=[]},0)}function Ve(e,t){e.reflowTargets.indexOf(t)<0&&e.reflowTargets.push(t)}function Pe(e){e.reflowTargets.forEach(function(e){!function(n){setTimeout(function(){var e=n.parentNode,t=n.nextSibling;e.insertBefore(e.removeChild(n),t)},0)}(e)}),e.reflowTargets=[]}function Ne(e,t,n,a,i,o,r){var l,s,u;"auto-start-reverse"===n?("boolean"!=typeof h&&(t.setAttribute("orient","auto-start-reverse"),h=t.orientType.baseVal===SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN),h?t.setAttribute("orient",n):((l=i.createSVGTransform()).setRotate(180,0,0),o.transform.baseVal.appendItem(l),t.setAttribute("orient","auto"),u=!0)):(t.setAttribute("orient",n),!1===h&&o.transform.baseVal.clear()),s=t.viewBox.baseVal,u?(s.x=-a.right,s.y=-a.bottom):(s.x=a.left,s.y=a.top),s.width=a.width,s.height=a.height,q&&Ve(e,r)}function Te(e,t){return{prop:e?"markerEnd":"markerStart",orient:t?t.noRotate?"0":e?"auto":"auto-start-reverse":null}}function We(n,a){Object.keys(a).forEach(function(e){var t=a[e];n[e]=null!=t.iniValue?t.hasSE?[t.iniValue,t.iniValue]:t.iniValue:t.hasSE?t.hasProps?[{},{}]:[]:t.hasProps?{}:null})}function Be(t,e,n,a,i){return a!==e[n]&&(e[n]=a,i&&i.forEach(function(e){e(t,a,n)}),!0)}function Re(e){function t(e,t){return e+parseFloat(t)}var n=e.document,a=e.getComputedStyle(n.documentElement,""),i=e.getComputedStyle(n.body,""),o={x:0,y:0};return"static"!==i.position?(o.x-=[a.marginLeft,a.borderLeftWidth,a.paddingLeft,i.marginLeft,i.borderLeftWidth].reduce(t,0),o.y-=[a.marginTop,a.borderTopWidth,a.paddingTop,i.marginTop,i.borderTopWidth].reduce(t,0)):"static"!==a.position&&(o.x-=[a.marginLeft,a.borderLeftWidth].reduce(t,0),o.y-=[a.marginTop,a.borderTopWidth].reduce(t,0)),o}function Fe(e){var t,n=e.document;n.getElementById(s)||(t=(new e.DOMParser).parseFromString(u,"image/svg+xml"),n.body.appendChild(t.documentElement),ne(e))}function Ge(r){var _,f,v,e,n,a,i,y,t,o,l,s,u,h,p,c,d=r.options,m=r.curStats,S=r.aplStats,E=m.position_socketXYSE,g=!1;function x(e,t){var n=t===k?{x:e.left+e.width/2,y:e.top}:t===w?{x:e.right,y:e.top+e.height/2}:t===O?{x:e.left+e.width/2,y:e.bottom}:{x:e.left,y:e.top+e.height/2};return n.socketId=t,n}function b(e){return{x:e.x,y:e.y}}if(m.position_path=d.path,m.position_lineStrokeWidth=m.line_strokeWidth,m.position_socketGravitySE=_=de(d.socketGravitySE),f=[0,1].map(function(e){var t=d.anchorSE[e],n=r.optionIsAttach.anchorSE[e],a=!1!==n?he[t._id]:null,i=!1!==n&&a.conf.getStrokeWidth?a.conf.getStrokeWidth(a,r):0,o=!1!==n&&a.conf.getBBoxNest?a.conf.getBBoxNest(a,r,i):Se(t,r);return m.capsMaskAnchor_pathDataSE[e]=!1!==n&&a.conf.getPathData?a.conf.getPathData(a,r,i):function(e){var t=null!=e.right?e.right:e.left+e.width,n=null!=e.bottom?e.bottom:e.top+e.height;return[{type:"M",values:[e.left,e.top]},{type:"L",values:[t,e.top]},{type:"L",values:[t,n]},{type:"L",values:[e.left,n]},{type:"Z",values:[]}]}(o),m.capsMaskAnchor_strokeWidthSE[e]=i,o}),i=-1,d.socketSE[0]&&d.socketSE[1]?(E[0]=x(f[0],d.socketSE[0]),E[1]=x(f[1],d.socketSE[1])):(d.socketSE[0]||d.socketSE[1]?(a=d.socketSE[0]?(n=0,1):(n=1,0),E[n]=x(f[n],d.socketSE[n]),(e=T.map(function(e){return x(f[a],e)})).forEach(function(e){var t=ve(e,E[n]);(t<i||-1===i)&&(E[a]=e,i=t)})):(e=T.map(function(e){return x(f[1],e)}),T.map(function(e){return x(f[0],e)}).forEach(function(n){e.forEach(function(e){var t=ve(n,e);(t<i||-1===i)&&(E[0]=n,E[1]=e,i=t)})})),[0,1].forEach(function(e){var t,n;d.socketSE[e]||(f[e].width||f[e].height?f[e].width||E[e].socketId!==M&&E[e].socketId!==w?f[e].height||E[e].socketId!==k&&E[e].socketId!==O||(E[e].socketId=0<=E[e?0:1].y-f[e].top?O:k):E[e].socketId=0<=E[e?0:1].x-f[e].left?w:M:(t=E[e?0:1].x-f[e].left,n=E[e?0:1].y-f[e].top,E[e].socketId=Math.abs(t)>=Math.abs(n)?0<=t?w:M:0<=n?O:k))})),m.position_path!==S.position_path||m.position_lineStrokeWidth!==S.position_lineStrokeWidth||[0,1].some(function(e){return m.position_plugOverheadSE[e]!==S.position_plugOverheadSE[e]||function(e,t){return e.x!==t.x||e.y!==t.y||e.socketId!==t.socketId}(E[e],S.position_socketXYSE[e])||function(e,t){var n=null==e?"auto":Array.isArray(e)?"array":"number";return n!=(null==t?"auto":Array.isArray(t)?"array":"number")||("array"==n?e[0]!==t[0]||e[1]!==t[1]:e!==t)}(_[e],S.position_socketGravitySE[e])})){switch(r.pathList.baseVal=v=[],r.pathList.animVal=null,m.position_path){case C:v.push([b(E[0]),b(E[1])]);break;case I:t="number"==typeof _[0]&&0<_[0]||"number"==typeof _[1]&&0<_[1],o=Y*(t?-1:1),l=Math.atan2(E[1].y-E[0].y,E[1].x-E[0].x),s=o-l,u=Math.PI-l-o,h=ve(E[0],E[1])/Math.sqrt(2)*Z,p={x:E[0].x+Math.cos(s)*h,y:E[0].y+Math.sin(s)*h*-1},c={x:E[1].x+Math.cos(u)*h,y:E[1].y+Math.sin(u)*h*-1},v.push([b(E[0]),p,c,b(E[1])]);break;case L:case A:!function(s){var u=[],h=[];E.forEach(function(e,t){var n,a,i,o,r,l=s[t];n=Array.isArray(l)?{x:l[0],y:l[1]}:"number"==typeof l?e.socketId===k?{x:0,y:-l}:e.socketId===w?{x:l,y:0}:e.socketId===O?{x:0,y:l}:{x:-l,y:0}:(a=E[t?0:1],o=0<(i=m.position_plugOverheadSE[t])?D+(z<i?(i-z)*j:0):R+(m.position_lineStrokeWidth>F?(m.position_lineStrokeWidth-F)*G:0),e.socketId===k?((r=(e.y-a.y)/2)<o&&(r=o),{x:0,y:-r}):e.socketId===w?((r=(a.x-e.x)/2)<o&&(r=o),{x:r,y:0}):e.socketId===O?((r=(a.y-e.y)/2)<o&&(r=o),{x:0,y:r}):((r=(e.x-a.x)/2)<o&&(r=o),{x:-r,y:0})),u[t]=e.x+n.x,h[t]=e.y+n.y});var e=b(E[0]),t=b(E[1]);Math.abs(e.x-t.x)<16&&Math.abs(e.y-t.y)<16?v.push([e,t]):v.push([e,{x:u[0],y:h[0]},{x:u[1],y:h[1]},t])}([_[0],m.position_path===A?0:_[1]]);break;case V:!function(){var a,o=1,r=2,l=3,s=4,u=[[],[]],h=[];function p(e){return e===o?l:e===r?s:e===l?o:r}function c(e){return e===r||e===s?"x":"y"}function d(e,t,n){var a={x:e.x,y:e.y};if(n){if(n===p(e.dirId))throw new Error("Invalid dirId: "+n);a.dirId=n}else a.dirId=e.dirId;return a.dirId===o?a.y-=t:a.dirId===r?a.x+=t:a.dirId===l?a.y+=t:a.x-=t,a}function f(e,t){return t.dirId===o?e.y<=t.y:t.dirId===r?e.x>=t.x:t.dirId===l?e.y>=t.y:e.x<=t.x}function y(e,t){return t.dirId===o||t.dirId===l?e.x===t.x:e.y===t.y}function m(e){return e[0]?{contain:0,notContain:1}:{contain:1,notContain:0}}function S(e,t,n){return Math.abs(t[n]-e[n])}function g(e,t,n){return"x"===n?e.x<t.x?r:s:e.y<t.y?l:o}function e(){var e,t,a,i,n=[f(h[1],h[0]),f(h[0],h[1])],o=[c(h[0].dirId),c(h[1].dirId)];if(o[0]===o[1]){if(n[0]&&n[1])return y(h[1],h[0])||(h[0][o[0]]===h[1][o[1]]?(u[0].push(h[0]),u[1].push(h[1])):(e=h[0][o[0]]+(h[1][o[1]]-h[0][o[0]])/2,u[0].push(d(h[0],Math.abs(e-h[0][o[0]]))),u[1].push(d(h[1],Math.abs(e-h[1][o[1]]))))),!1;n[0]!==n[1]?(t=m(n),(a=S(h[t.notContain],h[t.contain],o[t.notContain]))<U&&(h[t.notContain]=d(h[t.notContain],U-a)),u[t.notContain].push(h[t.notContain]),h[t.notContain]=d(h[t.notContain],U,y(h[t.contain],h[t.notContain])?"x"===o[t.notContain]?l:r:g(h[t.notContain],h[t.contain],"x"===o[t.notContain]?"y":"x"))):(a=S(h[0],h[1],"x"===o[0]?"y":"x"),u.forEach(function(e,t){var n=0===t?1:0;e.push(h[t]),h[t]=d(h[t],U,2*U<=a?g(h[t],h[n],"x"===o[t]?"y":"x"):"x"===o[t]?l:r)}))}else{if(n[0]&&n[1])return y(h[1],h[0])?u[1].push(h[1]):y(h[0],h[1])?u[0].push(h[0]):u[0].push("x"===o[0]?{x:h[1].x,y:h[0].y}:{x:h[0].x,y:h[1].y}),!1;n[0]!==n[1]?(t=m(n),u[t.notContain].push(h[t.notContain]),h[t.notContain]=d(h[t.notContain],U,S(h[t.notContain],h[t.contain],o[t.contain])>=U?g(h[t.notContain],h[t.contain],o[t.contain]):h[t.contain].dirId)):(i=[{x:h[0].x,y:h[0].y},{x:h[1].x,y:h[1].y}],u.forEach(function(e,t){var n=0===t?1:0,a=S(i[t],i[n],o[t]);a<U&&(h[t]=d(h[t],U-a)),e.push(h[t]),h[t]=d(h[t],U,g(h[t],h[n],o[n]))}))}return!0}for(E.forEach(function(e,t){var n,a=b(e),i=_[t];n=Array.isArray(i)?i[0]<0?[s,-i[0]]:0<i[0]?[r,i[0]]:i[1]<0?[o,-i[1]]:0<i[1]?[l,i[1]]:[e.socketId,0]:"number"!=typeof i?[e.socketId,U]:0<=i?[e.socketId,i]:[p(e.socketId),-i],a.dirId=n[0],i=n[1],u[t].push(a),h[t]=d(a,i)});e(););u[1].reverse(),u[0].concat(u[1]).forEach(function(e,t){var n={x:e.x,y:e.y};0<t&&v.push([a,n]),a=n})}()}y=[],m.position_plugOverheadSE.forEach(function(e,t){var n,a,i,o,r,l,s,u,h,p,c,d=!t;0<e?2===(n=v[a=d?0:v.length-1]).length?(y[a]=y[a]||ve.apply(null,n),y[a]>H&&(y[a]-e<H&&(e=y[a]-H),i=Ee(n[0],n[1],(d?e:y[a]-e)/y[a]),v[a]=d?[i,n[1]]:[n[0],i],y[a]-=e)):(y[a]=y[a]||ke.apply(null,n),y[a]>H&&(y[a]-e<H&&(e=y[a]-H),i=be(n[0],n[1],n[2],n[3],we(n[0],n[1],n[2],n[3],d?e:y[a]-e)),r=d?(o=n[0],i.toP1):(o=n[3],i.fromP2),l=Math.atan2(o.y-i.y,i.x-o.x),s=ve(i,r),i.x=o.x+Math.cos(l)*e,i.y=o.y+Math.sin(l)*e*-1,r.x=i.x+Math.cos(l)*s,r.y=i.y+Math.sin(l)*s*-1,v[a]=d?[i,i.toP1,i.toP2,n[3]]:[n[0],i.fromP1,i.fromP2,i],y[a]=null)):e<0&&(n=v[a=d?0:v.length-1],u=E[t].socketId,h=u===M||u===w?"x":"y",e<(c=-f[t]["x"==h?"width":"height"])&&(e=c),p=e*(u===M||u===k?-1:1),2===n.length?n[d?0:n.length-1][h]+=p:(d?[0,1]:[n.length-2,n.length-1]).forEach(function(e){n[e][h]+=p}),y[a]=null)}),S.position_socketXYSE=de(E),S.position_plugOverheadSE=de(m.position_plugOverheadSE),S.position_path=m.position_path,S.position_lineStrokeWidth=m.position_lineStrokeWidth,S.position_socketGravitySE=de(_),g=!0,r.events.apl_position&&r.events.apl_position.forEach(function(e){e(r,v)})}return g}function De(t,n){n!==t.isShown&&(!!n!=!!t.isShown&&(t.svg.style.visibility=n?"":"hidden"),t.isShown=n,t.events&&t.events.svgShow&&t.events.svgShow.forEach(function(e){e(t,n)}))}function ze(e,t){var n={};t.line&&(n.line=function(e){var t=e.options,n=e.curStats,a=e.events,i=!1;return i=Be(e,n,"line_color",t.lineColor,a.cur_line_color)||i,i=Be(e,n,"line_colorTra",fe(n.line_color)[0]<1)||i,i=Be(e,n,"line_strokeWidth",t.lineSize,a.cur_line_strokeWidth)||i}(e)),(t.plug||n.line)&&(n.plug=function(h){var p=h.options,c=h.curStats,d=h.events,f=!1;return[0,1].forEach(function(e){var t,n,a,i,o,r,l,s,u=p.plugSE[e];f=Be(h,c.plug_enabledSE,e,u!==x)||f,f=Be(h,c.plug_plugSE,e,u)||f,f=Be(h,c.plug_colorSE,e,s=p.plugColorSE[e]||c.line_color,d.cur_plug_colorSE)||f,f=Be(h,c.plug_colorTraSE,e,fe(s)[0]<1)||f,u!==x&&(i=n=(t=b[N[u]]).widthR*p.plugSizeSE[e],o=a=t.heightR*p.plugSizeSE[e],Q&&(i*=c.line_strokeWidth,o*=c.line_strokeWidth),f=Be(h,c.plug_markerWidthSE,e,i)||f,f=Be(h,c.plug_markerHeightSE,e,o)||f,c.capsMaskMarker_markerWidthSE[e]=n,c.capsMaskMarker_markerHeightSE[e]=a),c.plugOutline_plugSE[e]=c.capsMaskMarker_plugSE[e]=u,c.plug_enabledSE[e]?(s=c.line_strokeWidth/J.lineSize*p.plugSizeSE[e],c.position_plugOverheadSE[e]=t.overhead*s,c.viewBox_plugBCircleSE[e]=t.bCircle*s,r=t.sideLen*s,l=t.backLen*s):(c.position_plugOverheadSE[e]=-c.line_strokeWidth/2,c.viewBox_plugBCircleSE[e]=r=l=0),Be(h,c.attach_plugSideLenSE,e,r,d.cur_attach_plugSideLenSE),Be(h,c.attach_plugBackLenSE,e,l,d.cur_attach_plugBackLenSE),c.capsMaskAnchor_enabledSE[e]=!c.plug_enabledSE[e]}),f=Be(h,c,"plug_enabled",c.plug_enabledSE[0]||c.plug_enabledSE[1])||f}(e)),(t.lineOutline||n.line)&&(n.lineOutline=function(e){var t,n=e.options,a=e.curStats,i=!1;return i=Be(e,a,"lineOutline_enabled",n.lineOutlineEnabled)||i,i=Be(e,a,"lineOutline_color",n.lineOutlineColor)||i,i=Be(e,a,"lineOutline_colorTra",fe(a.lineOutline_color)[0]<1)||i,t=a.line_strokeWidth*n.lineOutlineSize,i=Be(e,a,"lineOutline_strokeWidth",a.line_strokeWidth-2*t)||i,i=Be(e,a,"lineOutline_inStrokeWidth",a.lineOutline_colorTra?a.lineOutline_strokeWidth+2*K:a.line_strokeWidth-t)||i}(e)),(t.plugOutline||n.line||n.plug||n.lineOutline)&&(n.plugOutline=function(i){var o=i.options,r=i.curStats,l=!1;return[0,1].forEach(function(e){var t,n=r.plugOutline_plugSE[e],a=n!==x?b[N[n]]:null;l=Be(i,r.plugOutline_enabledSE,e,o.plugOutlineEnabledSE[e]&&r.plug_enabled&&r.plug_enabledSE[e]&&!!a&&!!a.outlineBase)||l,l=Be(i,r.plugOutline_colorSE,e,t=o.plugOutlineColorSE[e]||r.lineOutline_color)||l,l=Be(i,r.plugOutline_colorTraSE,e,fe(t)[0]<1)||l,a&&a.outlineBase&&((t=o.plugOutlineSizeSE[e])>a.outlineMax&&(t=a.outlineMax),t*=2*a.outlineBase,l=Be(i,r.plugOutline_strokeWidthSE,e,t)||l,l=Be(i,r.plugOutline_inStrokeWidthSE,e,r.plugOutline_colorTraSE[e]?t-K/(r.line_strokeWidth/J.lineSize)/o.plugSizeSE[e]*2:t/2)||l)}),l}(e)),(t.faces||n.line||n.plug||n.lineOutline||n.plugOutline)&&(n.faces=function(i){var o,r=i.curStats,l=i.aplStats,s=i.events,u=!1;return!r.line_altColor&&Be(i,l,"line_color",o=r.line_color,s.apl_line_color)&&(i.lineFace.style.stroke=o,u=!0),Be(i,l,"line_strokeWidth",o=r.line_strokeWidth,s.apl_line_strokeWidth)&&(i.lineShape.style.strokeWidth=o+"px",u=!0,(c||q)&&(Ve(i,i.lineShape),q&&(Ve(i,i.lineFace),Ve(i,i.lineMaskCaps)))),Be(i,l,"lineOutline_enabled",o=r.lineOutline_enabled,s.apl_lineOutline_enabled)&&(i.lineOutlineFace.style.display=o?"inline":"none",u=!0),r.lineOutline_enabled&&(Be(i,l,"lineOutline_color",o=r.lineOutline_color,s.apl_lineOutline_color)&&(i.lineOutlineFace.style.stroke=o,u=!0),Be(i,l,"lineOutline_strokeWidth",o=r.lineOutline_strokeWidth,s.apl_lineOutline_strokeWidth)&&(i.lineOutlineMaskShape.style.strokeWidth=o+"px",u=!0,q&&(Ve(i,i.lineOutlineMaskCaps),Ve(i,i.lineOutlineFace))),Be(i,l,"lineOutline_inStrokeWidth",o=r.lineOutline_inStrokeWidth,s.apl_lineOutline_inStrokeWidth)&&(i.lineMaskShape.style.strokeWidth=o+"px",u=!0,q&&(Ve(i,i.lineOutlineMaskCaps),Ve(i,i.lineOutlineFace)))),Be(i,l,"plug_enabled",o=r.plug_enabled,s.apl_plug_enabled)&&(i.plugsFace.style.display=o?"inline":"none",u=!0),r.plug_enabled&&[0,1].forEach(function(n){var e=r.plug_plugSE[n],t=e!==x?b[N[e]]:null,a=Te(n,t);Be(i,l.plug_enabledSE,n,o=r.plug_enabledSE[n],s.apl_plug_enabledSE)&&(i.plugsFace.style[a.prop]=o?"url(#"+i.plugMarkerIdSE[n]+")":"none",u=!0),r.plug_enabledSE[n]&&(Be(i,l.plug_plugSE,n,e,s.apl_plug_plugSE)&&(i.plugFaceSE[n].href.baseVal="#"+t.elmId,Ne(i,i.plugMarkerSE[n],a.orient,t.bBox,i.svg,i.plugMarkerShapeSE[n],i.plugsFace),u=!0,c&&Ve(i,i.plugsFace)),Be(i,l.plug_colorSE,n,o=r.plug_colorSE[n],s.apl_plug_colorSE)&&(i.plugFaceSE[n].style.fill=o,u=!0,(d||Q||q)&&!r.line_colorTra&&Ve(i,q?i.lineMaskCaps:i.capsMaskLine)),["markerWidth","markerHeight"].forEach(function(e){var t="plug_"+e+"SE";Be(i,l[t],n,o=r[t][n],s["apl_"+t])&&(i.plugMarkerSE[n][e].baseVal.value=o,u=!0)}),Be(i,l.plugOutline_enabledSE,n,o=r.plugOutline_enabledSE[n],s.apl_plugOutline_enabledSE)&&(o?(i.plugFaceSE[n].style.mask="url(#"+i.plugMaskIdSE[n]+")",i.plugOutlineFaceSE[n].style.display="inline"):(i.plugFaceSE[n].style.mask="none",i.plugOutlineFaceSE[n].style.display="none"),u=!0),r.plugOutline_enabledSE[n]&&(Be(i,l.plugOutline_plugSE,n,e,s.apl_plugOutline_plugSE)&&(i.plugOutlineFaceSE[n].href.baseVal=i.plugMaskShapeSE[n].href.baseVal=i.plugOutlineMaskShapeSE[n].href.baseVal="#"+t.elmId,[i.plugMaskSE[n],i.plugOutlineMaskSE[n]].forEach(function(e){e.x.baseVal.value=t.bBox.left,e.y.baseVal.value=t.bBox.top,e.width.baseVal.value=t.bBox.width,e.height.baseVal.value=t.bBox.height}),u=!0),Be(i,l.plugOutline_colorSE,n,o=r.plugOutline_colorSE[n],s.apl_plugOutline_colorSE)&&(i.plugOutlineFaceSE[n].style.fill=o,u=!0,q&&(Ve(i,i.lineMaskCaps),Ve(i,i.lineOutlineMaskCaps))),Be(i,l.plugOutline_strokeWidthSE,n,o=r.plugOutline_strokeWidthSE[n],s.apl_plugOutline_strokeWidthSE)&&(i.plugOutlineMaskShapeSE[n].style.strokeWidth=o+"px",u=!0),Be(i,l.plugOutline_inStrokeWidthSE,n,o=r.plugOutline_inStrokeWidthSE[n],s.apl_plugOutline_inStrokeWidthSE)&&(i.plugMaskShapeSE[n].style.strokeWidth=o+"px",u=!0)))}),u}(e)),(t.position||n.line||n.plug)&&(n.position=Ge(e)),(t.path||n.position)&&(n.path=function(t){var n,e=t.curStats,a=t.aplStats,i=t.pathList.animVal||t.pathList.baseVal,o=e.path_edge,r=!1;return i&&(o.x1=o.x2=i[0][0].x,o.y1=o.y2=i[0][0].y,e.path_pathData=n=Oe(i,function(e){e.x<o.x1&&(o.x1=e.x),e.y<o.y1&&(o.y1=e.y),e.x>o.x2&&(o.x2=e.x),e.y>o.y2&&(o.y2=e.y)}),Ce(n,a.path_pathData)&&(t.linePath.setPathData(n),a.path_pathData=n,r=!0,q?(Ve(t,t.plugsFace),Ve(t,t.lineMaskCaps)):c&&Ve(t,t.linePath),t.events.apl_path&&t.events.apl_path.forEach(function(e){e(t,n)}))),r}(e)),n.viewBox=function(n){var e,t,a=n.curStats,i=n.aplStats,o=a.path_edge,r=a.viewBox_bBox,l=i.viewBox_bBox,s=n.svg.viewBox.baseVal,u=n.svg.style,h=!1;return e=Math.max(a.line_strokeWidth/2,a.viewBox_plugBCircleSE[0]||0,a.viewBox_plugBCircleSE[1]||0),t={x1:o.x1-e,y1:o.y1-e,x2:o.x2+e,y2:o.y2+e},n.events.new_edge4viewBox&&n.events.new_edge4viewBox.forEach(function(e){e(n,t)}),r.x=a.lineMask_x=a.lineOutlineMask_x=a.maskBGRect_x=t.x1,r.y=a.lineMask_y=a.lineOutlineMask_y=a.maskBGRect_y=t.y1,r.width=t.x2-t.x1,r.height=t.y2-t.y1,["x","y","width","height"].forEach(function(e){var t;(t=r[e])!==l[e]&&(s[e]=l[e]=t,u[B[e]]=t+("x"===e||"y"===e?n.bodyOffset[e]:0)+"px",h=!0)}),h}(e),n.mask=function(i){var o,r=i.curStats,l=i.aplStats,s=!1;return r.plug_enabled?[0,1].forEach(function(e){r.capsMaskMarker_enabledSE[e]=r.plug_enabledSE[e]&&r.plug_colorTraSE[e]||r.plugOutline_enabledSE[e]&&r.plugOutline_colorTraSE[e]}):r.capsMaskMarker_enabledSE[0]=r.capsMaskMarker_enabledSE[1]=!1,r.capsMaskMarker_enabled=r.capsMaskMarker_enabledSE[0]||r.capsMaskMarker_enabledSE[1],r.lineMask_outlineMode=r.lineOutline_enabled,r.caps_enabled=r.capsMaskMarker_enabled||r.capsMaskAnchor_enabledSE[0]||r.capsMaskAnchor_enabledSE[1],r.lineMask_enabled=r.caps_enabled||r.lineMask_outlineMode,(r.lineMask_enabled&&!r.lineMask_outlineMode||r.lineOutline_enabled)&&["x","y"].forEach(function(e){var t="maskBGRect_"+e;Be(i,l,t,o=r[t])&&(i.maskBGRect[e].baseVal.value=o,s=!0)}),Be(i,l,"lineMask_enabled",o=r.lineMask_enabled)&&(i.lineFace.style.mask=o?"url(#"+i.lineMaskId+")":"none",s=!0,Q&&Ve(i,i.lineMask)),r.lineMask_enabled&&(Be(i,l,"lineMask_outlineMode",o=r.lineMask_outlineMode)&&(o?(i.lineMaskBG.style.display="none",i.lineMaskShape.style.display="inline"):(i.lineMaskBG.style.display="inline",i.lineMaskShape.style.display="none"),s=!0),["x","y"].forEach(function(e){var t="lineMask_"+e;Be(i,l,t,o=r[t])&&(i.lineMask[e].baseVal.value=o,s=!0)}),Be(i,l,"caps_enabled",o=r.caps_enabled)&&(i.lineMaskCaps.style.display=i.lineOutlineMaskCaps.style.display=o?"inline":"none",s=!0,Q&&Ve(i,i.capsMaskLine)),r.caps_enabled&&([0,1].forEach(function(e){var t;Be(i,l.capsMaskAnchor_enabledSE,e,o=r.capsMaskAnchor_enabledSE[e])&&(i.capsMaskAnchorSE[e].style.display=o?"inline":"none",s=!0,Q&&Ve(i,i.lineMask)),r.capsMaskAnchor_enabledSE[e]&&(Ce(t=r.capsMaskAnchor_pathDataSE[e],l.capsMaskAnchor_pathDataSE[e])&&(i.capsMaskAnchorSE[e].setPathData(t),l.capsMaskAnchor_pathDataSE[e]=t,s=!0),Be(i,l.capsMaskAnchor_strokeWidthSE,e,o=r.capsMaskAnchor_strokeWidthSE[e])&&(i.capsMaskAnchorSE[e].style.strokeWidth=o+"px",s=!0))}),Be(i,l,"capsMaskMarker_enabled",o=r.capsMaskMarker_enabled)&&(i.capsMaskLine.style.display=o?"inline":"none",s=!0),r.capsMaskMarker_enabled&&[0,1].forEach(function(n){var e=r.capsMaskMarker_plugSE[n],t=e!==x?b[N[e]]:null,a=Te(n,t);Be(i,l.capsMaskMarker_enabledSE,n,o=r.capsMaskMarker_enabledSE[n])&&(i.capsMaskLine.style[a.prop]=o?"url(#"+i.lineMaskMarkerIdSE[n]+")":"none",s=!0),r.capsMaskMarker_enabledSE[n]&&(Be(i,l.capsMaskMarker_plugSE,n,e)&&(i.capsMaskMarkerShapeSE[n].href.baseVal="#"+t.elmId,Ne(i,i.capsMaskMarkerSE[n],a.orient,t.bBox,i.svg,i.capsMaskMarkerShapeSE[n],i.capsMaskLine),s=!0,c&&(Ve(i,i.capsMaskLine),Ve(i,i.lineFace))),["markerWidth","markerHeight"].forEach(function(e){var t="capsMaskMarker_"+e+"SE";Be(i,l[t],n,o=r[t][n])&&(i.capsMaskMarkerSE[n][e].baseVal.value=o,s=!0)}))}))),r.lineOutline_enabled&&["x","y"].forEach(function(e){var t="lineOutlineMask_"+e;Be(i,l,t,o=r[t])&&(i.lineOutlineMask[e].baseVal.value=o,s=!0)}),s}(e),t.effect&&function(o){var r,l=o.curStats,s=o.aplStats;Object.keys(g).forEach(function(e){var t=g[e],n=e+"_enabled",a=e+"_options",i=l[a];Be(o,s,n,r=l[n])?(r&&(s[a]=de(i)),t[r?"init":"remove"](o)):r&&ce(i,s[a])&&(t.remove(o),s[n]=!0,s[a]=de(i),t.init(o))})}(e),(d||Q)&&n.line&&!n.path&&Ve(e,e.lineShape),d&&n.plug&&!n.line&&Ve(e,e.plugsFace),Pe(e)}function je(e,t){return{duration:ee(e.duration)&&0<e.duration?e.duration:t.duration,timing:te.validTiming(e.timing)?e.timing:de(t.timing)}}function He(e,t,n,a){var i,o=e.curStats,r=e.aplStats,l={};function s(){["show_on","show_effect","show_animOptions"].forEach(function(e){r[e]=o[e]})}o.show_on=t,n&&_[n]&&(o.show_effect=n,o.show_animOptions=je($(a)?a:{},_[n].defaultAnimOptions)),l.show_on=o.show_on!==r.show_on,l.show_effect=o.show_effect!==r.show_effect,l.show_animOptions=ce(o.show_animOptions,r.show_animOptions),l.show_effect||l.show_animOptions?o.show_inAnim?(i=l.show_effect?_[r.show_effect].stop(e,!0,!0):_[r.show_effect].stop(e),s(),_[r.show_effect].init(e,i)):l.show_on&&(r.show_effect&&l.show_effect&&_[r.show_effect].stop(e,!0,!0),s(),_[r.show_effect].init(e)):l.show_on&&(s(),_[r.show_effect].start(e))}function Ue(e,t,n){var a={props:e,optionName:n};return!(!(e.attachments.indexOf(t)<0)||t.conf.bind&&!t.conf.bind(t,a))&&(e.attachments.push(t),t.boundTargets.push(a),!0)}function Ze(n,a,e){var i=n.attachments.indexOf(a);-1<i&&n.attachments.splice(i,1),a.boundTargets.some(function(e,t){return e.props===n&&(a.conf.unbind&&a.conf.unbind(a,e),i=t,!0)})&&(a.boundTargets.splice(i,1),e||Ae(function(){a.boundTargets.length||o(a)}))}function Ye(s,u){var e,i,h=s.options,p={};function f(e,t,n,a,i){var o={};return n?null!=a?(o.container=e[n],o.key=a):(o.container=e,o.key=n):(o.container=e,o.key=t),o.default=i,o.acceptsAuto=null==o.default,o}function c(e,t,n,a,i,o,r){var l,s,u,h=f(e,n,i,o,r);return null!=t[n]&&(s=(t[n]+"").toLowerCase())&&(h.acceptsAuto&&s===W||(u=a[s]))&&u!==h.container[h.key]&&(h.container[h.key]=u,l=!0),null!=h.container[h.key]||h.acceptsAuto||(h.container[h.key]=h.default,l=!0),l}function d(e,t,n,a,i,o,r,l,s){var u,h,p,c,d=f(e,n,i,o,r);if(!a){if(null==d.default)throw new Error("Invalid `type`: "+n);a=typeof d.default}return null!=t[n]&&(d.acceptsAuto&&(t[n]+"").toLowerCase()===W||(p=h=t[n],("number"===(c=a)?ee(p):typeof p===c)&&(h=s&&"string"===a&&h?h.trim():h,1)&&(!l||l(h))))&&h!==d.container[d.key]&&(d.container[d.key]=h,u=!0),null!=d.container[d.key]||d.acceptsAuto||(d.container[d.key]=d.default,u=!0),u}if(u=u||{},["start","end"].forEach(function(e,t){var n=u[e],a=!1;if(n&&(ye(n)||(a=v(n,"anchor")))&&n!==h.anchorSE[t]){if(!1!==s.optionIsAttach.anchorSE[t]&&Ze(s,he[h.anchorSE[t]._id]),a&&!Ue(s,he[n._id],e))throw new Error("Can't bind attachment");h.anchorSE[t]=n,s.optionIsAttach.anchorSE[t]=a,i=p.position=!0}}),!h.anchorSE[0]||!h.anchorSE[1]||h.anchorSE[0]===h.anchorSE[1])throw new Error("`start` and `end` are required.");i&&(e=function(e,t){var n,a,i;if(!(n=_e(e))||!(a=_e(t)))throw new Error("Cannot get frames.");return n.length&&a.length&&(n.reverse(),a.reverse(),n.some(function(t){return a.some(function(e){return e===t&&(i=e.contentWindow,!0)})})),i||window}(!1!==s.optionIsAttach.anchorSE[0]?he[h.anchorSE[0]._id].element:h.anchorSE[0],!1!==s.optionIsAttach.anchorSE[1]?he[h.anchorSE[1]._id].element:h.anchorSE[1]))!==s.baseWindow&&(function(a,e){var t,n,i,o,r,l,s,u,h,p,c=a.aplStats,d=e.document,f=E+"-"+a._id;function y(e){var t=n.appendChild(d.createElementNS(X,"mask"));return t.id=e,t.maskUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[t.x,t.y,t.width,t.height].forEach(function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)}),t}function m(e){var t=n.appendChild(d.createElementNS(X,"marker"));return t.id=e,t.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH,t.viewBox.baseVal||t.setAttribute("viewBox","0 0 0 0"),t}function S(e){return[e.width,e.height].forEach(function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100)}),e}a.pathList={},We(c,ie),Object.keys(g).forEach(function(e){var t=e+"_enabled";c[t]&&(g[e].remove(a),c[t]=!1)}),a.baseWindow&&a.svg&&(a.parentElement?a.parentElement.removeChild(a.svg):a.baseWindow.document.body.removeChild(a.svg)),Fe(a.baseWindow=e),a.bodyOffset=Re(e),a.svg=t=d.createElementNS(X,"svg"),t.className.baseVal=E,t.viewBox.baseVal||t.setAttribute("viewBox","0 0 0 0"),a.defs=n=t.appendChild(d.createElementNS(X,"defs")),a.linePath=o=n.appendChild(d.createElementNS(X,"path")),o.id=r=f+"-line-path",o.className.baseVal=E+"-line-path",Q&&(o.style.fill="none"),a.lineShape=o=n.appendChild(d.createElementNS(X,"use")),o.id=l=f+"-line-shape",o.href.baseVal="#"+r,(i=n.appendChild(d.createElementNS(X,"g"))).id=s=f+"-caps",a.capsMaskAnchorSE=[0,1].map(function(){var e=i.appendChild(d.createElementNS(X,"path"));return e.className.baseVal=E+"-caps-mask-anchor",e}),a.lineMaskMarkerIdSE=[f+"-caps-mask-marker-0",f+"-caps-mask-marker-1"],a.capsMaskMarkerSE=[0,1].map(function(e){return m(a.lineMaskMarkerIdSE[e])}),a.capsMaskMarkerShapeSE=[0,1].map(function(e){var t=a.capsMaskMarkerSE[e].appendChild(d.createElementNS(X,"use"));return t.className.baseVal=E+"-caps-mask-marker-shape",t}),a.capsMaskLine=o=i.appendChild(d.createElementNS(X,"use")),o.className.baseVal=E+"-caps-mask-line",o.href.baseVal="#"+l,a.maskBGRect=o=S(n.appendChild(d.createElementNS(X,"rect"))),o.id=u=f+"-mask-bg-rect",o.className.baseVal=E+"-mask-bg-rect",Q&&(o.style.fill="white"),a.lineMask=S(y(a.lineMaskId=f+"-line-mask")),a.lineMaskBG=o=a.lineMask.appendChild(d.createElementNS(X,"use")),o.href.baseVal="#"+u,a.lineMaskShape=o=a.lineMask.appendChild(d.createElementNS(X,"use")),o.className.baseVal=E+"-line-mask-shape",o.href.baseVal="#"+r,o.style.display="none",a.lineMaskCaps=o=a.lineMask.appendChild(d.createElementNS(X,"use")),o.href.baseVal="#"+s,a.lineOutlineMask=S(y(h=f+"-line-outline-mask")),(o=a.lineOutlineMask.appendChild(d.createElementNS(X,"use"))).href.baseVal="#"+u,a.lineOutlineMaskShape=o=a.lineOutlineMask.appendChild(d.createElementNS(X,"use")),o.className.baseVal=E+"-line-outline-mask-shape",o.href.baseVal="#"+r,a.lineOutlineMaskCaps=o=a.lineOutlineMask.appendChild(d.createElementNS(X,"use")),o.href.baseVal="#"+s,a.face=t.appendChild(d.createElementNS(X,"g")),a.lineFace=o=a.face.appendChild(d.createElementNS(X,"use")),o.href.baseVal="#"+l,a.lineOutlineFace=o=a.face.appendChild(d.createElementNS(X,"use")),o.href.baseVal="#"+l,o.style.mask="url(#"+h+")",o.style.display="none",a.plugMaskIdSE=[f+"-plug-mask-0",f+"-plug-mask-1"],a.plugMaskSE=[0,1].map(function(e){return y(a.plugMaskIdSE[e])}),a.plugMaskShapeSE=[0,1].map(function(e){var t=a.plugMaskSE[e].appendChild(d.createElementNS(X,"use"));return t.className.baseVal=E+"-plug-mask-shape",t}),p=[],a.plugOutlineMaskSE=[0,1].map(function(e){return y(p[e]=f+"-plug-outline-mask-"+e)}),a.plugOutlineMaskShapeSE=[0,1].map(function(e){var t=a.plugOutlineMaskSE[e].appendChild(d.createElementNS(X,"use"));return t.className.baseVal=E+"-plug-outline-mask-shape",t}),a.plugMarkerIdSE=[f+"-plug-marker-0",f+"-plug-marker-1"],a.plugMarkerSE=[0,1].map(function(e){var t=m(a.plugMarkerIdSE[e]);return Q&&(t.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE),t}),a.plugMarkerShapeSE=[0,1].map(function(e){return a.plugMarkerSE[e].appendChild(d.createElementNS(X,"g"))}),a.plugFaceSE=[0,1].map(function(e){return a.plugMarkerShapeSE[e].appendChild(d.createElementNS(X,"use"))}),a.plugOutlineFaceSE=[0,1].map(function(e){var t=a.plugMarkerShapeSE[e].appendChild(d.createElementNS(X,"use"));return t.style.mask="url(#"+p[e]+")",t.style.display="none",t}),a.plugsFace=o=a.face.appendChild(d.createElementNS(X,"use")),o.className.baseVal=E+"-plugs-face",o.href.baseVal="#"+l,o.style.display="none",a.curStats.show_inAnim?(a.isShown=1,_[c.show_effect].stop(a,!0)):a.isShown||(t.style.visibility="hidden"),a.parentElement?a.prepend&&a.parentElement.firstChild?a.parentElement.insertBefore(t,a.parentElement.firstChild):a.parentElement.appendChild(t):d.body.appendChild(t),[0,1,2].forEach(function(e){var t,n=a.options.labelSEM[e];n&&v(n,"label")&&(t=he[n._id]).conf.initSvg&&t.conf.initSvg(t,a)})}(s,e),p.line=p.plug=p.lineOutline=p.plugOutline=p.faces=p.effect=!0),p.position=c(h,u,"path",S,null,null,J.path)||p.position,p.position=c(h,u,"startSocket",n,"socketSE",0)||p.position,p.position=c(h,u,"endSocket",n,"socketSE",1)||p.position,[u.startSocketGravity,u.endSocketGravity].forEach(function(e,t){var n,a,i=!1;null!=e&&(Array.isArray(e)?ee(e[0])&&ee(e[1])&&(i=[e[0],e[1]],Array.isArray(h.socketGravitySE[t])&&(n=i,a=h.socketGravitySE[t],n.length===a.length&&n.every(function(e,t){return e===a[t]}))&&(i=!1)):((e+"").toLowerCase()===W?i=null:ee(e)&&0<=e&&(i=e),i===h.socketGravitySE[t]&&(i=!1)),!1!==i&&(h.socketGravitySE[t]=i,p.position=!0))}),p.line=d(h,u,"color",null,"lineColor",null,J.lineColor,null,!0)||p.line,p.line=d(h,u,"size",null,"lineSize",null,J.lineSize,function(e){return 0<e})||p.line,["startPlug","endPlug"].forEach(function(e,t){p.plug=c(h,u,e,P,"plugSE",t,J.plugSE[t])||p.plug,p.plug=d(h,u,e+"Color","string","plugColorSE",t,null,null,!0)||p.plug,p.plug=d(h,u,e+"Size",null,"plugSizeSE",t,J.plugSizeSE[t],function(e){return 0<e})||p.plug}),p.lineOutline=d(h,u,"outline",null,"lineOutlineEnabled",null,J.lineOutlineEnabled)||p.lineOutline,p.lineOutline=d(h,u,"outlineColor",null,"lineOutlineColor",null,J.lineOutlineColor,null,!0)||p.lineOutline,p.lineOutline=d(h,u,"outlineSize",null,"lineOutlineSize",null,J.lineOutlineSize,function(e){return 0<e&&e<=.48})||p.lineOutline,["startPlugOutline","endPlugOutline"].forEach(function(e,t){p.plugOutline=d(h,u,e,null,"plugOutlineEnabledSE",t,J.plugOutlineEnabledSE[t])||p.plugOutline,p.plugOutline=d(h,u,e+"Color","string","plugOutlineColorSE",t,null,null,!0)||p.plugOutline,p.plugOutline=d(h,u,e+"Size",null,"plugOutlineSizeSE",t,J.plugOutlineSizeSE[t],function(e){return 1<=e})||p.plugOutline}),["startLabel","endLabel","middleLabel"].forEach(function(e,t){var n,a,i,o=u[e],r=h.labelSEM[t]&&!s.optionIsAttach.labelSEM[t]?he[h.labelSEM[t]._id].text:h.labelSEM[t],l=!1;if((n="string"==typeof o)&&(o=o.trim()),(n||o&&(l=v(o,"label")))&&o!==r){if(h.labelSEM[t]&&(Ze(s,he[h.labelSEM[t]._id]),h.labelSEM[t]=""),o){if(l?(a=he[(i=o)._id]).boundTargets.slice().forEach(function(e){a.conf.removeOption(a,e)}):i=new m(y.captionLabel,[o]),!Ue(s,he[i._id],e))throw new Error("Can't bind attachment");h.labelSEM[t]=i}s.optionIsAttach.labelSEM[t]=l}}),Object.keys(g).forEach(function(a){var e,t,o=g[a],n=a+"_enabled",i=a+"_options";function r(a){var i={};return o.optionsConf.forEach(function(e){var t=e[0],n=e[3];null==e[4]||i[n]||(i[n]=[]),("function"==typeof t?t:"id"===t?c:d).apply(null,[i,a].concat(e.slice(1)))}),i}function l(e){var t,n=a+"_animOptions";return e.hasOwnProperty("animation")?$(e.animation)?t=s.curStats[n]=je(e.animation,o.defaultAnimOptions):(t=!!e.animation,s.curStats[n]=t?je({},o.defaultAnimOptions):null):(t=!!o.defaultEnabled,s.curStats[n]=t?je({},o.defaultAnimOptions):null),t}u.hasOwnProperty(a)&&(e=u[a],$(e)?(s.curStats[n]=!0,t=s.curStats[i]=r(e),o.anim&&(s.curStats[i].animation=l(e))):(t=s.curStats[n]=!!e)&&(s.curStats[i]=r({}),o.anim&&(s.curStats[i].animation=l({}))),ce(t,h[a])&&(h[a]=t,p.effect=!0))}),ze(s,p)}function Xe(e,t,n,a,i){var o={options:{anchorSE:[],socketSE:[],socketGravitySE:[],plugSE:[],plugColorSE:[],plugSizeSE:[],plugOutlineEnabledSE:[],plugOutlineColorSE:[],plugOutlineSizeSE:[],labelSEM:["","",""]},optionIsAttach:{anchorSE:[!1,!1],labelSEM:[!1,!1,!1]},curStats:{},aplStats:{},attachments:[],events:{},reflowTargets:[]};a&&(o.parentElement=a),i&&(o.prepend=!0),We(o.curStats,ie),We(o.aplStats,ie),Object.keys(g).forEach(function(e){var t=g[e].stats;We(o.curStats,t),We(o.aplStats,t),o.options[e]=!1}),We(o.curStats,oe),We(o.aplStats,oe),o.curStats.show_effect=re,o.curStats.show_animOptions=de(_[re].defaultAnimOptions),Object.defineProperty(this,"_id",{value:++ue}),o._id=this._id,se[this._id]=o,1===arguments.length&&(n=e,e=null),n=n||{},(e||t)&&(n=de(n),e&&(n.start=e),t&&(n.end=t)),a&&(n.parentElement=a),o.isShown=o.aplStats.show_on=!n.hide,this.setOptions(n)}return g={dash:{stats:{dash_len:{},dash_gap:{},dash_maxOffset:{}},anim:!0,defaultAnimOptions:{duration:1e3,timing:"linear"},optionsConf:[["type","len","number",null,null,null,function(e){return 0<e}],["type","gap","number",null,null,null,function(e){return 0<e}]],init:function(e){Ie(e,"apl_line_strokeWidth",g.dash.update),e.lineFace.style.strokeDashoffset=0,g.dash.update(e)},remove:function(e){var t=e.curStats;Le(e,"apl_line_strokeWidth",g.dash.update),t.dash_animId&&(te.remove(t.dash_animId),t.dash_animId=null),e.lineFace.style.strokeDasharray="none",e.lineFace.style.strokeDashoffset=0,We(e.aplStats,g.dash.stats)},update:function(t){var e,n=t.curStats,a=t.aplStats,i=a.dash_options,o=!1;n.dash_len=i.len||2*a.line_strokeWidth,n.dash_gap=i.gap||a.line_strokeWidth,n.dash_maxOffset=n.dash_len+n.dash_gap,o=Be(t,a,"dash_len",n.dash_len)||o,(o=Be(t,a,"dash_gap",n.dash_gap)||o)&&(t.lineFace.style.strokeDasharray=a.dash_len+","+a.dash_gap),n.dash_animOptions?(o=Be(t,a,"dash_maxOffset",n.dash_maxOffset),a.dash_animOptions&&(o||ce(n.dash_animOptions,a.dash_animOptions))&&(n.dash_animId&&(e=te.stop(n.dash_animId),te.remove(n.dash_animId)),a.dash_animOptions=null),a.dash_animOptions||(n.dash_animId=te.add(function(e){return(1-e)*a.dash_maxOffset+"px"},function(e){t.lineFace.style.strokeDashoffset=e},n.dash_animOptions.duration,0,n.dash_animOptions.timing,!1,e),a.dash_animOptions=de(n.dash_animOptions))):a.dash_animOptions&&(n.dash_animId&&(te.remove(n.dash_animId),n.dash_animId=null),t.lineFace.style.strokeDashoffset=0,a.dash_animOptions=null)}},gradient:{stats:{gradient_colorSE:{hasSE:!0},gradient_pointSE:{hasSE:!0,hasProps:!0}},optionsConf:[["type","startColor","string","colorSE",0,null,null,!0],["type","endColor","string","colorSE",1,null,null,!0]],init:function(e){var t,a=e.baseWindow.document,n=e.defs,i=E+"-"+e._id+"-gradient";e.efc_gradient_gradient=t=n.appendChild(a.createElementNS(X,"linearGradient")),t.id=i,t.gradientUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[t.x1,t.y1,t.x2,t.y2].forEach(function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)}),e.efc_gradient_stopSE=[0,1].map(function(t){var n=e.efc_gradient_gradient.appendChild(a.createElementNS(X,"stop"));try{n.offset.baseVal=t}catch(e){if(e.code!==DOMException.NO_MODIFICATION_ALLOWED_ERR)throw e;n.setAttribute("offset",t)}return n}),Ie(e,"cur_plug_colorSE",g.gradient.update),Ie(e,"apl_path",g.gradient.update),e.curStats.line_altColor=!0,e.lineFace.style.stroke="url(#"+i+")",g.gradient.update(e)},remove:function(e){e.efc_gradient_gradient&&(e.defs.removeChild(e.efc_gradient_gradient),e.efc_gradient_gradient=e.efc_gradient_stopSE=null),Le(e,"cur_plug_colorSE",g.gradient.update),Le(e,"apl_path",g.gradient.update),e.curStats.line_altColor=!1,e.lineFace.style.stroke=e.curStats.line_color,We(e.aplStats,g.gradient.stats)},update:function(a){var e,t,i=a.curStats,o=a.aplStats,n=o.gradient_options,r=a.pathList.animVal||a.pathList.baseVal;[0,1].forEach(function(e){i.gradient_colorSE[e]=n.colorSE[e]||i.plug_colorSE[e]}),t=r[0][0],i.gradient_pointSE[0]={x:t.x,y:t.y},t=(e=r[r.length-1])[e.length-1],i.gradient_pointSE[1]={x:t.x,y:t.y},[0,1].forEach(function(t){var n;Be(a,o.gradient_colorSE,t,n=i.gradient_colorSE[t])&&(Q?(n=fe(n),a.efc_gradient_stopSE[t].style.stopColor=n[1],a.efc_gradient_stopSE[t].style.stopOpacity=n[0]):a.efc_gradient_stopSE[t].style.stopColor=n),["x","y"].forEach(function(e){(n=i.gradient_pointSE[t][e])!==o.gradient_pointSE[t][e]&&(a.efc_gradient_gradient[e+(t+1)].baseVal.value=o.gradient_pointSE[t][e]=n)})})}},dropShadow:{stats:{dropShadow_dx:{},dropShadow_dy:{},dropShadow_blur:{},dropShadow_color:{},dropShadow_opacity:{},dropShadow_x:{},dropShadow_y:{}},optionsConf:[["type","dx",null,null,null,2],["type","dy",null,null,null,4],["type","blur",null,null,null,3,function(e){return 0<=e}],["type","color",null,null,null,"#000",null,!0],["type","opacity",null,null,null,.8,function(e){return 0<=e&&e<=1}]],init:function(t){var e=t.baseWindow.document,n=t.defs,a=E+"-"+t._id+"-dropShadow",i=function(e,t){var n,a,i={};return"boolean"!=typeof r&&(r=!!window.SVGFEDropShadowElement&&!Q),i.elmsAppend=[i.elmFilter=n=e.createElementNS(X,"filter")],n.filterUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,n.x.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),n.y.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),n.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),n.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),n.id=t,r?(i.elmOffset=i.elmBlur=a=n.appendChild(e.createElementNS(X,"feDropShadow")),i.styleFlood=a.style):(i.elmBlur=n.appendChild(e.createElementNS(X,"feGaussianBlur")),i.elmOffset=a=n.appendChild(e.createElementNS(X,"feOffset")),a.result.baseVal="offsetblur",a=n.appendChild(e.createElementNS(X,"feFlood")),i.styleFlood=a.style,(a=n.appendChild(e.createElementNS(X,"feComposite"))).in2.baseVal="offsetblur",a.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN,(a=n.appendChild(e.createElementNS(X,"feMerge"))).appendChild(e.createElementNS(X,"feMergeNode")),a.appendChild(e.createElementNS(X,"feMergeNode")).in1.baseVal="SourceGraphic"),i}(e,a);["elmFilter","elmOffset","elmBlur","styleFlood","elmsAppend"].forEach(function(e){t["efc_dropShadow_"+e]=i[e]}),i.elmsAppend.forEach(function(e){n.appendChild(e)}),t.face.setAttribute("filter","url(#"+a+")"),Ie(t,"new_edge4viewBox",g.dropShadow.adjustEdge),g.dropShadow.update(t)},remove:function(e){var t=e.defs;e.efc_dropShadow_elmsAppend&&(e.efc_dropShadow_elmsAppend.forEach(function(e){t.removeChild(e)}),e.efc_dropShadow_elmFilter=e.efc_dropShadow_elmOffset=e.efc_dropShadow_elmBlur=e.efc_dropShadow_styleFlood=e.efc_dropShadow_elmsAppend=null),Le(e,"new_edge4viewBox",g.dropShadow.adjustEdge),ze(e,{}),e.face.removeAttribute("filter"),We(e.aplStats,g.dropShadow.stats)},update:function(e){var t,n,a=e.curStats,i=e.aplStats,o=i.dropShadow_options;a.dropShadow_dx=t=o.dx,Be(e,i,"dropShadow_dx",t)&&(e.efc_dropShadow_elmOffset.dx.baseVal=t,n=!0),a.dropShadow_dy=t=o.dy,Be(e,i,"dropShadow_dy",t)&&(e.efc_dropShadow_elmOffset.dy.baseVal=t,n=!0),a.dropShadow_blur=t=o.blur,Be(e,i,"dropShadow_blur",t)&&(e.efc_dropShadow_elmBlur.setStdDeviation(t,t),n=!0),n&&ze(e,{}),a.dropShadow_color=t=o.color,Be(e,i,"dropShadow_color",t)&&(e.efc_dropShadow_styleFlood.floodColor=t),a.dropShadow_opacity=t=o.opacity,Be(e,i,"dropShadow_opacity",t)&&(e.efc_dropShadow_styleFlood.floodOpacity=t)},adjustEdge:function(a,i){var e,t,o=a.curStats,r=a.aplStats;null!=o.dropShadow_dx&&(e=3*o.dropShadow_blur,(t={x1:i.x1-e+o.dropShadow_dx,y1:i.y1-e+o.dropShadow_dy,x2:i.x2+e+o.dropShadow_dx,y2:i.y2+e+o.dropShadow_dy}).x1<i.x1&&(i.x1=t.x1),t.y1<i.y1&&(i.y1=t.y1),t.x2>i.x2&&(i.x2=t.x2),t.y2>i.y2&&(i.y2=t.y2),["x","y"].forEach(function(e){var t,n="dropShadow_"+e;o[n]=t=i[e+"1"],Be(a,r,n,t)&&(a.efc_dropShadow_elmFilter[e].baseVal.value=t)}))}}},Object.keys(g).forEach(function(e){var t=g[e],n=t.stats;n[e+"_enabled"]={iniValue:!1},n[e+"_options"]={hasProps:!0},t.anim&&(n[e+"_animOptions"]={},n[e+"_animId"]={})}),_={none:{defaultAnimOptions:{},init:function(e,t){var n=e.curStats;n.show_animId&&(te.remove(n.show_animId),n.show_animId=null),_.none.start(e,t)},start:function(e,t){_.none.stop(e,!0)},stop:function(e,t,n){var a=e.curStats;return n=null!=n?n:e.aplStats.show_on,a.show_inAnim=!1,t&&De(e,n),n?1:0}},fade:{defaultAnimOptions:{duration:300,timing:"linear"},init:function(n,e){var t=n.curStats,a=n.aplStats;t.show_animId&&te.remove(t.show_animId),t.show_animId=te.add(function(e){return e},function(e,t){t?_.fade.stop(n,!0):(n.svg.style.opacity=e+"",q&&(Ve(n,n.svg),Pe(n)))},a.show_animOptions.duration,1,a.show_animOptions.timing,null,!1),_.fade.start(n,e)},start:function(e,t){var n,a=e.curStats;a.show_inAnim&&(n=te.stop(a.show_animId)),De(e,1),a.show_inAnim=!0,te.start(a.show_animId,!e.aplStats.show_on,null!=t?t:n)},stop:function(e,t,n){var a,i=e.curStats;return n=null!=n?n:e.aplStats.show_on,a=i.show_inAnim?te.stop(i.show_animId):n?1:0,i.show_inAnim=!1,t&&(e.svg.style.opacity=n?"":"0",De(e,n)),a}},draw:{defaultAnimOptions:{duration:500,timing:[.58,0,.42,1]},init:function(n,e){var t=n.curStats,a=n.aplStats,r=n.pathList.baseVal,i=Me(r),l=i.segsLen,s=i.lenAll;t.show_animId&&te.remove(t.show_animId),t.show_animId=te.add(function(e){var t,n,a,i,o=-1;if(0===e)n=[[r[0][0],r[0][0]]];else if(1===e)n=r;else{for(t=s*e,n=[];t>=l[++o];)n.push(r[o]),t-=l[o];t&&(2===(a=r[o]).length?n.push([a[0],Ee(a[0],a[1],t/l[o])]):(i=be(a[0],a[1],a[2],a[3],we(a[0],a[1],a[2],a[3],t)),n.push([a[0],i.fromP1,i.fromP2,i])))}return n},function(e,t){t?_.draw.stop(n,!0):(n.pathList.animVal=e,ze(n,{path:!0}))},a.show_animOptions.duration,1,a.show_animOptions.timing,null,!1),_.draw.start(n,e)},start:function(e,t){var n,a=e.curStats;a.show_inAnim&&(n=te.stop(a.show_animId)),De(e,1),a.show_inAnim=!0,Ie(e,"apl_position",_.draw.update),te.start(a.show_animId,!e.aplStats.show_on,null!=t?t:n)},stop:function(e,t,n){var a,i=e.curStats;return n=null!=n?n:e.aplStats.show_on,a=i.show_inAnim?te.stop(i.show_animId):n?1:0,i.show_inAnim=!1,t&&(e.pathList.animVal=n?null:[[e.pathList.baseVal[0][0],e.pathList.baseVal[0][0]]],ze(e,{path:!0}),De(e,n)),a},update:function(e){Le(e,"apl_position",_.draw.update),e.curStats.show_inAnim?_.draw.init(e,_.draw.stop(e)):e.aplStats.show_animOptions={}}}},function(){function l(n){return function(e){var t={};t[n]=e,this.setOptions(t)}}[["start","anchorSE",0],["end","anchorSE",1],["color","lineColor"],["size","lineSize"],["startSocketGravity","socketGravitySE",0],["endSocketGravity","socketGravitySE",1],["startPlugColor","plugColorSE",0],["endPlugColor","plugColorSE",1],["startPlugSize","plugSizeSE",0],["endPlugSize","plugSizeSE",1],["outline","lineOutlineEnabled"],["outlineColor","lineOutlineColor"],["outlineSize","lineOutlineSize"],["startPlugOutline","plugOutlineEnabledSE",0],["endPlugOutline","plugOutlineEnabledSE",1],["startPlugOutlineColor","plugOutlineColorSE",0],["endPlugOutlineColor","plugOutlineColorSE",1],["startPlugOutlineSize","plugOutlineSizeSE",0],["endPlugOutlineSize","plugOutlineSizeSE",1]].forEach(function(e){var t=e[0],n=e[1],a=e[2];Object.defineProperty(Xe.prototype,t,{get:function(){var e=null!=a?se[this._id].options[n][a]:n?se[this._id].options[n]:se[this._id].options[t];return null==e?W:de(e)},set:l(t),enumerable:!0})}),[["path",S],["startSocket",n,"socketSE",0],["endSocket",n,"socketSE",1],["startPlug",P,"plugSE",0],["endPlug",P,"plugSE",1]].forEach(function(e){var a=e[0],i=e[1],o=e[2],r=e[3];Object.defineProperty(Xe.prototype,a,{get:function(){var t,n=null!=r?se[this._id].options[o][r]:o?se[this._id].options[o]:se[this._id].options[a];return n?Object.keys(i).some(function(e){return i[e]===n&&(t=e,!0)})?t:new Error("It's broken"):W},set:l(a),enumerable:!0})}),Object.keys(g).forEach(function(t){var n=g[t];Object.defineProperty(Xe.prototype,t,{get:function(){var e=se[this._id].options[t];return $(e)?function(u){var e=n.optionsConf.reduce(function(e,t){var n,a=t[0],i=t[1],o=t[2],r=t[3],l=t[4],s=null!=l?u[r][l]:r?u[r]:u[i];return e[i]="id"===a?s?Object.keys(o).some(function(e){return o[e]===s&&(n=e,!0)})?n:new Error("It's broken"):W:null==s?W:de(s),e},{});return n.anim&&(e.animation=de(u.animation)),e}(e):e},set:l(t),enumerable:!0})}),["startLabel","endLabel","middleLabel"].forEach(function(e,n){Object.defineProperty(Xe.prototype,e,{get:function(){var e=se[this._id],t=e.options;return t.labelSEM[n]&&!e.optionIsAttach.labelSEM[n]?he[t.labelSEM[n]._id].text:t.labelSEM[n]||""},set:l(e),enumerable:!0})})}(),Xe.prototype.setOptions=function(e){return Ye(se[this._id],e),this},Xe.prototype.position=function(){return ze(se[this._id],{position:!0}),this},Xe.prototype.remove=function(){var t=se[this._id],n=t.curStats;Object.keys(g).forEach(function(e){var t=e+"_animId";n[t]&&te.remove(n[t])}),n.show_animId&&te.remove(n.show_animId),t.attachments.slice().forEach(function(e){Ze(t,e)}),t.baseWindow&&t.svg&&(t.parentElement?t.parentElement.removeChild(t.svg):t.baseWindow.document.body.removeChild(t.svg)),delete se[this._id]},Xe.prototype.show=function(e,t){return He(se[this._id],!0,e,t),this},Xe.prototype.hide=function(e,t){return He(se[this._id],!1,e,t),this},o=function(t){t&&he[t._id]&&(t.boundTargets.slice().forEach(function(e){Ze(e.props,t,!0)}),t.conf.remove&&t.conf.remove(t),delete he[t._id])},m=function(){function e(e,t){var n,a={conf:e,curStats:{},aplStats:{},boundTargets:[]},i={};e.argOptions.every(function(e){return!(!t.length||("string"==typeof e.type?typeof t[0]!==e.type:"function"!=typeof e.type||!e.type(t[0])))&&(i[e.optionName]=t.shift(),!0)}),n=t.length&&$(t[0])?de(t[0]):{},Object.keys(i).forEach(function(e){n[e]=i[e]}),e.stats&&(We(a.curStats,e.stats),We(a.aplStats,e.stats)),Object.defineProperty(this,"_id",{value:++pe}),Object.defineProperty(this,"isRemoved",{get:function(){return!he[this._id]}}),a._id=this._id,e.init&&!e.init(a,n)||(he[this._id]=a)}return e.prototype.remove=function(){var t=this,n=he[t._id];n&&(n.boundTargets.slice().forEach(function(e){n.conf.removeOption(n,e)}),Ae(function(){var e=he[t._id];e&&(console.error("LeaderLineAttachment was not removed by removeOption"),o(e))}))},e}(),window.LeaderLineAttachment=m,v=function(e,t){return e instanceof m&&(!(e.isRemoved||t&&he[e._id].conf.type!==t)||null)},y={pointAnchor:{type:"anchor",argOptions:[{optionName:"element",type:ye}],init:function(e,t){return e.element=y.pointAnchor.checkElement(t.element),e.x=y.pointAnchor.parsePercent(t.x,!0)||[.5,!0],e.y=y.pointAnchor.parsePercent(t.y,!0)||[.5,!0],!0},removeOption:function(e,t){var n=t.props,a={},i=e.element,o=n.options.anchorSE["start"===t.optionName?1:0];i===o&&(i=o===document.body?new m(y.pointAnchor,[i]):document.body),a[t.optionName]=i,Ye(n,a)},getBBoxNest:function(e,t){var n=Se(e.element,t),a=n.width,i=n.height;return n.width=n.height=0,n.left=n.right=n.left+e.x[0]*(e.x[1]?a:1),n.top=n.bottom=n.top+e.y[0]*(e.y[1]?i:1),n},parsePercent:function(e,t){var n,a,i=!1;return ee(e)?a=e:"string"==typeof e&&(n=p.exec(e))&&n[2]&&(i=0!==(a=parseFloat(n[1])/100)),null!=a&&(t||0<=a)?[a,i]:null},checkElement:function(e){if(null==e)e=document.body;else if(!ye(e))throw new Error("`element` must be Element");return e}},areaAnchor:{type:"anchor",argOptions:[{optionName:"element",type:ye},{optionName:"shape",type:"string"}],stats:{color:{},strokeWidth:{},elementWidth:{},elementHeight:{},elementLeft:{},elementTop:{},pathListRel:{},bBoxRel:{},pathData:{},viewBoxBBox:{hasProps:!0},dashLen:{},dashGap:{}},init:function(i,e){var t,n,a,o=[];return i.element=y.pointAnchor.checkElement(e.element),"string"==typeof e.color&&(i.color=e.color.trim()),"string"==typeof e.fillColor&&(i.fill=e.fillColor.trim()),ee(e.size)&&0<=e.size&&(i.size=e.size),e.dash&&(i.dash=!0,ee(e.dash.len)&&0<e.dash.len&&(i.dashLen=e.dash.len),ee(e.dash.gap)&&0<e.dash.gap&&(i.dashGap=e.dash.gap)),"circle"===e.shape?i.shape=e.shape:"polygon"===e.shape&&Array.isArray(e.points)&&3<=e.points.length&&e.points.every(function(e){var t={};return!(!(t.x=y.pointAnchor.parsePercent(e[0],!0))||!(t.y=y.pointAnchor.parsePercent(e[1],!0)))&&(o.push(t),(t.x[1]||t.y[1])&&(i.hasRatio=!0),!0)})?(i.shape=e.shape,i.points=o):(i.shape="rect",i.radius=ee(e.radius)&&0<=e.radius?e.radius:0),"rect"!==i.shape&&"circle"!==i.shape||(i.x=y.pointAnchor.parsePercent(e.x,!0)||[-.05,!0],i.y=y.pointAnchor.parsePercent(e.y,!0)||[-.05,!0],i.width=y.pointAnchor.parsePercent(e.width)||[1.1,!0],i.height=y.pointAnchor.parsePercent(e.height)||[1.1,!0],(i.x[1]||i.y[1]||i.width[1]||i.height[1])&&(i.hasRatio=!0)),t=i.element.ownerDocument,i.svg=n=t.createElementNS(X,"svg"),n.className.baseVal=E+"-areaAnchor",n.viewBox.baseVal||n.setAttribute("viewBox","0 0 0 0"),i.path=n.appendChild(t.createElementNS(X,"path")),i.path.style.fill=i.fill||"none",i.isShown=!1,n.style.visibility="hidden",i.parentElement?i.parentElement.appendChild(n):t.body.appendChild(n),Fe(a=t.defaultView),i.bodyOffset=Re(a),i.updateColor=function(){var e,t=i.curStats,n=i.aplStats,a=i.boundTargets.length?i.boundTargets[0].props.curStats:null;t.color=e=i.color||(a?a.line_color:J.lineColor),Be(i,n,"color",e)&&(i.path.style.stroke=e)},i.updateShow=function(){De(i,i.boundTargets.some(function(e){return!0===e.props.isShown}))},!0},bind:function(e,t){var n=t.props;return e.color||Ie(n,"cur_line_color",e.updateColor),Ie(n,"svgShow",e.updateShow),Ae(function(){e.updateColor(),e.updateShow()}),!0},unbind:function(e,t){var n=t.props;e.color||Le(n,"cur_line_color",e.updateColor),Le(n,"svgShow",e.updateShow),1<e.boundTargets.length&&Ae(function(){e.updateColor(),e.updateShow(),y.areaAnchor.update(e)&&e.boundTargets.forEach(function(e){ze(e.props,{position:!0})})})},removeOption:function(e,t){y.pointAnchor.removeOption(e,t)},remove:function(t){t.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),t.boundTargets.forEach(function(e){y.areaAnchor.unbind(t,e)})),t.svg.parentNode.removeChild(t.svg)},getStrokeWidth:function(e,t){return y.areaAnchor.update(e)&&1<e.boundTargets.length&&Ae(function(){e.boundTargets.forEach(function(e){e.props!==t&&ze(e.props,{position:!0})})}),e.curStats.strokeWidth},getPathData:function(e,t){var n=Se(e.element,t);return Oe(e.curStats.pathListRel,function(e){e.x+=n.left,e.y+=n.top})},getBBoxNest:function(e,t){var n=Se(e.element,t),a=e.curStats.bBoxRel;return{left:a.left+n.left,top:a.top+n.top,right:a.right+n.left,bottom:a.bottom+n.top,width:a.width,height:a.height}},update:function(t){var a,n,i,o,e,r,l,s,u,h,p,c,d,f,y,m,S,g,_,v,E,x,b,k,w,O,M,C,I,L,A,V,P=t.curStats,N=t.aplStats,T=t.boundTargets.length?t.boundTargets[0].props.curStats:null,W={};if(W.strokeWidth=Be(t,P,"strokeWidth",null!=t.size?t.size:T?T.line_strokeWidth:J.lineSize),a=ge(t.element),W.elementWidth=Be(t,P,"elementWidth",a.width),W.elementHeight=Be(t,P,"elementHeight",a.height),W.elementLeft=Be(t,P,"elementLeft",a.left),W.elementTop=Be(t,P,"elementTop",a.top),W.strokeWidth||t.hasRatio&&(W.elementWidth||W.elementHeight)){switch(t.shape){case"rect":(v={left:t.x[0]*(t.x[1]?a.width:1),top:t.y[0]*(t.y[1]?a.height:1),width:t.width[0]*(t.width[1]?a.width:1),height:t.height[0]*(t.height[1]?a.height:1)}).right=v.left+v.width,v.bottom=v.top+v.height,k=P.strokeWidth/2,x=(b=Math.min(v.width,v.height))?b/2*Math.SQRT2+k:0,M=(E=t.radius?t.radius<=x?t.radius:x:0)?(O=E-(w=(E-k)/Math.SQRT2),C=E*Z,M=[{x:v.left-O,y:v.top+w},{x:v.left+w,y:v.top-O},{x:v.right-w,y:v.top-O},{x:v.right+O,y:v.top+w},{x:v.right+O,y:v.bottom-w},{x:v.right-w,y:v.bottom+O},{x:v.left+w,y:v.bottom+O},{x:v.left-O,y:v.bottom-w}],P.pathListRel=[[M[0],{x:M[0].x,y:M[0].y-C},{x:M[1].x-C,y:M[1].y},M[1]]],M[1].x!==M[2].x&&P.pathListRel.push([M[1],M[2]]),P.pathListRel.push([M[2],{x:M[2].x+C,y:M[2].y},{x:M[3].x,y:M[3].y-C},M[3]]),M[3].y!==M[4].y&&P.pathListRel.push([M[3],M[4]]),P.pathListRel.push([M[4],{x:M[4].x,y:M[4].y+C},{x:M[5].x+C,y:M[5].y},M[5]]),M[5].x!==M[6].x&&P.pathListRel.push([M[5],M[6]]),P.pathListRel.push([M[6],{x:M[6].x-C,y:M[6].y},{x:M[7].x,y:M[7].y+C},M[7]]),M[7].y!==M[0].y&&P.pathListRel.push([M[7],M[0]]),P.pathListRel.push([]),O=E-w+P.strokeWidth/2,[{x:v.left-O,y:v.top-O},{x:v.right+O,y:v.bottom+O}]):(O=P.strokeWidth/2,M=[{x:v.left-O,y:v.top-O},{x:v.right+O,y:v.bottom+O}],P.pathListRel=[[M[0],{x:M[1].x,y:M[0].y}],[{x:M[1].x,y:M[0].y},M[1]],[M[1],{x:M[0].x,y:M[1].y}],[]],[{x:v.left-P.strokeWidth,y:v.top-P.strokeWidth},{x:v.right+P.strokeWidth,y:v.bottom+P.strokeWidth}]),P.bBoxRel={left:M[0].x,top:M[0].y,right:M[1].x,bottom:M[1].y,width:M[1].x-M[0].x,height:M[1].y-M[0].y};break;case"circle":(l={left:t.x[0]*(t.x[1]?a.width:1),top:t.y[0]*(t.y[1]?a.height:1),width:t.width[0]*(t.width[1]?a.width:1),height:t.height[0]*(t.height[1]?a.height:1)}).width||l.height||(l.width=l.height=10),l.width||(l.width=l.height),l.height||(l.height=l.width),l.right=l.left+l.width,l.bottom=l.top+l.height,s=l.left+l.width/2,u=l.top+l.height/2,f=P.strokeWidth/2,y=l.width/2,m=l.height/2,h=y*Math.SQRT2+f,p=m*Math.SQRT2+f,c=h*Z,d=p*Z,_=[{x:s-h,y:u},{x:s,y:u-p},{x:s+h,y:u},{x:s,y:u+p}],P.pathListRel=[[_[0],{x:_[0].x,y:_[0].y-d},{x:_[1].x-c,y:_[1].y},_[1]],[_[1],{x:_[1].x+c,y:_[1].y},{x:_[2].x,y:_[2].y-d},_[2]],[_[2],{x:_[2].x,y:_[2].y+d},{x:_[3].x+c,y:_[3].y},_[3]],[_[3],{x:_[3].x-c,y:_[3].y},{x:_[0].x,y:_[0].y+d},_[0]],[]],S=h-y+P.strokeWidth/2,g=p-m+P.strokeWidth/2,_=[{x:l.left-S,y:l.top-g},{x:l.right+S,y:l.bottom+g}],P.bBoxRel={left:_[0].x,top:_[0].y,right:_[1].x,bottom:_[1].y,width:_[1].x-_[0].x,height:_[1].y-_[0].y};break;case"polygon":t.points.forEach(function(e){var t=e.x[0]*(e.x[1]?a.width:1),n=e.y[0]*(e.y[1]?a.height:1);i?(t<i.left&&(i.left=t),t>i.right&&(i.right=t),n<i.top&&(i.top=n),n>i.bottom&&(i.bottom=n)):i={left:t,right:t,top:n,bottom:n},o?P.pathListRel.push([o,{x:t,y:n}]):P.pathListRel=[],o={x:t,y:n}}),P.pathListRel.push([]),e=P.strokeWidth/2,r=[{x:i.left-e,y:i.top-e},{x:i.right+e,y:i.bottom+e}],P.bBoxRel={left:r[0].x,top:r[0].y,right:r[1].x,bottom:r[1].y,width:r[1].x-r[0].x,height:r[1].y-r[0].y}}W.pathListRel=W.bBoxRel=!0}return(W.pathListRel||W.elementLeft||W.elementTop)&&(P.pathData=Oe(P.pathListRel,function(e){e.x+=a.left,e.y+=a.top})),Be(t,N,"strokeWidth",n=P.strokeWidth)&&(t.path.style.strokeWidth=n+"px"),Ce(n=P.pathData,N.pathData)&&(t.path.setPathData(n),N.pathData=n,W.pathData=!0),t.dash&&(!W.pathData&&(!W.strokeWidth||t.dashLen&&t.dashGap)||(P.dashLen=t.dashLen||2*P.strokeWidth,P.dashGap=t.dashGap||P.strokeWidth),W.dash=Be(t,N,"dashLen",P.dashLen)||W.dash,W.dash=Be(t,N,"dashGap",P.dashGap)||W.dash,W.dash&&(t.path.style.strokeDasharray=N.dashLen+","+N.dashGap)),I=P.viewBoxBBox,L=N.viewBoxBBox,A=t.svg.viewBox.baseVal,V=t.svg.style,I.x=P.bBoxRel.left+a.left,I.y=P.bBoxRel.top+a.top,I.width=P.bBoxRel.width,I.height=P.bBoxRel.height,["x","y","width","height"].forEach(function(e){(n=I[e])!==L[e]&&(A[e]=L[e]=n,V[B[e]]=n+("x"===e||"y"===e?t.bodyOffset[e]:0)+"px")}),W.strokeWidth||W.pathListRel||W.bBoxRel}},mouseHoverAnchor:{type:"anchor",argOptions:[{optionName:"element",type:ye},{optionName:"showEffectName",type:"string"}],style:{backgroundImage:"url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==')",backgroundSize:"",backgroundRepeat:"no-repeat",backgroundColor:"#f8f881",cursor:"default"},hoverStyle:{backgroundImage:"none",backgroundColor:"#fadf8f"},padding:{top:1,right:15,bottom:1,left:2},minHeight:15,backgroundPosition:{right:2,top:2},backgroundSize:{width:12,height:12},dirKeys:[["top","Top"],["right","Right"],["bottom","Bottom"],["left","Left"]],init:function(a,i){var o,t,e,n,r,l,s,u,h,p,c,d=y.mouseHoverAnchor,f={};if(a.element=y.pointAnchor.checkElement(i.element),u=a.element,!((p=u.ownerDocument)&&(h=p.defaultView)&&h.HTMLElement&&u instanceof h.HTMLElement))throw new Error("`element` must be HTML element");return d.style.backgroundSize=d.backgroundSize.width+"px "+d.backgroundSize.height+"px",["style","hoverStyle"].forEach(function(e){var n=d[e];a[e]=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},{})}),"inline"===(o=a.element.ownerDocument.defaultView.getComputedStyle(a.element,"")).display?a.style.display="inline-block":"none"===o.display&&(a.style.display="block"),y.mouseHoverAnchor.dirKeys.forEach(function(e){var t=e[0],n="padding"+e[1];parseFloat(o[n])<d.padding[t]&&(a.style[n]=d.padding[t]+"px")}),a.style.display&&(n=a.element.style.display,a.element.style.display=a.style.display),y.mouseHoverAnchor.dirKeys.forEach(function(e){var t="padding"+e[1];a.style[t]&&(f[t]=a.element.style[t],a.element.style[t]=a.style[t])}),(e=a.element.getBoundingClientRect()).height<d.minHeight&&(q?(c=d.minHeight,"content-box"===o.boxSizing?c-=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth)+parseFloat(o.paddingTop)+parseFloat(o.paddingBottom):"padding-box"===o.boxSizing&&(c-=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth)),a.style.height=c+"px"):a.style.height=parseFloat(o.height)+(d.minHeight-e.height)+"px"),a.style.backgroundPosition=Q?e.width-d.backgroundSize.width-d.backgroundPosition.right+"px "+d.backgroundPosition.top+"px":"right "+d.backgroundPosition.right+"px top "+d.backgroundPosition.top+"px",a.style.display&&(a.element.style.display=n),y.mouseHoverAnchor.dirKeys.forEach(function(e){var t="padding"+e[1];a.style[t]&&(a.element.style[t]=f[t])}),["style","hoverStyle"].forEach(function(e){var t=a[e],n=i[e];$(n)&&Object.keys(n).forEach(function(e){"string"==typeof n[e]||ee(n[e])?t[e]=n[e]:null==n[e]&&delete t[e]})}),"function"==typeof i.onSwitch&&(s=i.onSwitch),i.showEffectName&&_[i.showEffectName]&&(a.showEffectName=r=i.showEffectName),l=i.animOptions,a.elmStyle=t=a.element.style,a.mouseenter=function(e){a.hoverStyleSave=d.getStyles(t,Object.keys(a.hoverStyle)),d.setStyles(t,a.hoverStyle),a.boundTargets.forEach(function(e){He(e.props,!0,r,l)}),s&&s(e)},a.mouseleave=function(e){d.setStyles(t,a.hoverStyleSave),a.boundTargets.forEach(function(e){He(e.props,!1,r,l)}),s&&s(e)},!0},bind:function(e,t){return t.props.svg?y.mouseHoverAnchor.llShow(t.props,!1,e.showEffectName):Ae(function(){y.mouseHoverAnchor.llShow(t.props,!1,e.showEffectName)}),e.enabled||(e.styleSave=y.mouseHoverAnchor.getStyles(e.elmStyle,Object.keys(e.style)),y.mouseHoverAnchor.setStyles(e.elmStyle,e.style),e.removeEventListener=function(e,t,n){var a,i;return"onmouseenter"in e&&"onmouseleave"in e?(e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",n,!1),function(){e.removeEventListener("mouseenter",t,!1),e.removeEventListener("mouseleave",n,!1)}):(console.warn("mouseenter and mouseleave events polyfill is enabled."),a=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||t.apply(this,arguments)},e.addEventListener("mouseover",a),i=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||n.apply(this,arguments)},e.addEventListener("mouseout",i),function(){e.removeEventListener("mouseover",a,!1),e.removeEventListener("mouseout",i,!1)})}(e.element,e.mouseenter,e.mouseleave),e.enabled=!0),!0},unbind:function(e,t){e.enabled&&e.boundTargets.length<=1&&(e.removeEventListener(),y.mouseHoverAnchor.setStyles(e.elmStyle,e.styleSave),e.enabled=!1),y.mouseHoverAnchor.llShow(t.props,!0,e.showEffectName)},removeOption:function(e,t){y.pointAnchor.removeOption(e,t)},remove:function(t){t.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),t.boundTargets.forEach(function(e){y.mouseHoverAnchor.unbind(t,e)}))},getBBoxNest:function(e,t){return Se(e.element,t)},llShow:function(e,t,n){_[n||e.curStats.show_effect].stop(e,!0,t),e.aplStats.show_on=t},getStyles:function(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})},setStyles:function(t,n){Object.keys(n).forEach(function(e){t[e]=n[e]})}},captionLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},x:{},y:{}},textStyleProps:["fontFamily","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","kerning","letterSpacing","wordSpacing","textDecoration"],init:function(u,t){return"string"==typeof t.text&&(u.text=t.text.trim()),!!u.text&&("string"==typeof t.color&&(u.color=t.color.trim()),u.outlineColor="string"==typeof t.outlineColor?t.outlineColor.trim():"#fff",Array.isArray(t.offset)&&ee(t.offset[0])&&ee(t.offset[1])&&(u.offset={x:t.offset[0],y:t.offset[1]}),ee(t.lineOffset)&&(u.lineOffset=t.lineOffset),y.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(u[e]=t[e])}),u.updateColor=function(e){y.captionLabel.updateColor(u,e)},u.updateSocketXY=function(e){var t,n,a,i,o=u.curStats,r=u.aplStats,l=e.curStats,s=l.position_socketXYSE[u.socketIndex];null!=s.x&&(u.offset?(o.x=s.x+u.offset.x,o.y=s.y+u.offset.y):(t=u.height/2,n=Math.max(l.attach_plugSideLenSE[u.socketIndex]||0,l.line_strokeWidth/2),a=l.position_socketXYSE[u.socketIndex?0:1],s.socketId===M||s.socketId===w?(o.x=s.socketId===M?s.x-t-u.width:s.x+t,o.y=a.y<s.y?s.y+n+t:s.y-n-t-u.height):(o.x=a.x<s.x?s.x+n+t:s.x-n-t-u.width,o.y=s.socketId===k?s.y-t-u.height:s.y+t)),Be(u,r,"x",i=o.x)&&(u.elmPosition.x.baseVal.getItem(0).value=i),Be(u,r,"y",i=o.y)&&(u.elmPosition.y.baseVal.getItem(0).value=i+u.height))},u.updatePath=function(e){var t,n,a=u.curStats,i=u.aplStats,o=e.pathList.animVal||e.pathList.baseVal;o&&(t=y.captionLabel.getMidPoint(o,u.lineOffset),a.x=t.x-u.width/2,a.y=t.y-u.height/2,Be(u,i,"x",n=a.x)&&(u.elmPosition.x.baseVal.getItem(0).value=n),Be(u,i,"y",n=a.y)&&(u.elmPosition.y.baseVal.getItem(0).value=n+u.height))},u.updateShow=function(e){y.captionLabel.updateShow(u,e)},Q&&(u.adjustEdge=function(e,t){var n=u.curStats;null!=n.x&&y.captionLabel.adjustEdge(t,{x:n.x,y:n.y,width:u.width,height:u.height},u.strokeWidth/2)}),!0)},updateColor:function(e,t){var n,a=e.curStats,i=e.aplStats,o=t.curStats;a.color=n=e.color||o.line_color,Be(e,i,"color",n)&&(e.styleFill.fill=n)},updateShow:function(e,t){var n=!0===t.isShown;n!==e.isShown&&(e.styleShow.visibility=n?"":"hidden",e.isShown=n)},adjustEdge:function(e,t,n){var a={x1:t.x-n,y1:t.y-n,x2:t.x+t.width+n,y2:t.y+t.height+n};a.x1<e.x1&&(e.x1=a.x1),a.y1<e.y1&&(e.y1=a.y1),a.x2>e.x2&&(e.x2=a.x2),a.y2>e.y2&&(e.y2=a.y2)},newText:function(e,t,n,a,i){var o,r,l,s,u,h;return(o=t.createElementNS(X,"text")).textContent=e,[o.x,o.y].forEach(function(e){var t=n.createSVGLength();t.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),e.baseVal.initialize(t)}),"boolean"!=typeof f&&(f="paintOrder"in o.style),i&&!f?(l=t.createElementNS(X,"defs"),o.id=a,l.appendChild(o),(u=(r=t.createElementNS(X,"g")).appendChild(t.createElementNS(X,"use"))).href.baseVal="#"+a,(s=r.appendChild(t.createElementNS(X,"use"))).href.baseVal="#"+a,(h=u.style).strokeLinejoin="round",{elmPosition:o,styleText:o.style,styleFill:s.style,styleStroke:h,styleShow:r.style,elmsAppend:[l,r]}):(h=o.style,i&&(h.strokeLinejoin="round",h.paintOrder="stroke"),{elmPosition:o,styleText:h,styleFill:h,styleStroke:i?h:null,styleShow:h,elmsAppend:[o]})},getMidPoint:function(e,t){var n,a,i,o=Me(e),r=o.segsLen,l=o.lenAll,s=-1;if((n=l/2+(t||0))<=0)return 2===(a=e[0]).length?Ee(a[0],a[1],0):be(a[0],a[1],a[2],a[3],0);if(l<=n)return 2===(a=e[e.length-1]).length?Ee(a[0],a[1],1):be(a[0],a[1],a[2],a[3],1);for(i=[];n>r[++s];)i.push(e[s]),n-=r[s];return 2===(a=e[s]).length?Ee(a[0],a[1],n/r[s]):be(a[0],a[1],a[2],a[3],we(a[0],a[1],a[2],a[3],n))},initSvg:function(t,n){var e,a,i=y.captionLabel.newText(t.text,n.baseWindow.document,n.svg,E+"-captionLabel-"+t._id,t.outlineColor);["elmPosition","styleFill","styleShow","elmsAppend"].forEach(function(e){t[e]=i[e]}),t.isShown=!1,t.styleShow.visibility="hidden",y.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(i.styleText[e]=t[e])}),i.elmsAppend.forEach(function(e){n.svg.appendChild(e)}),e=i.elmPosition.getBBox(),t.width=e.width,t.height=e.height,t.outlineColor&&(a=10<(a=e.height/9)?10:a<2?2:a,i.styleStroke.strokeWidth=a+"px",i.styleStroke.stroke=t.outlineColor),t.strokeWidth=a||0,We(t.aplStats,y.captionLabel.stats),t.updateColor(n),t.refSocketXY?t.updateSocketXY(n):t.updatePath(n),Q&&ze(n,{}),t.updateShow(n)},bind:function(e,t){var n=t.props;return e.color||Ie(n,"cur_line_color",e.updateColor),(e.refSocketXY="startLabel"===t.optionName||"endLabel"===t.optionName)?(e.socketIndex="startLabel"===t.optionName?0:1,Ie(n,"apl_position",e.updateSocketXY),e.offset||(Ie(n,"cur_attach_plugSideLenSE",e.updateSocketXY),Ie(n,"cur_line_strokeWidth",e.updateSocketXY))):Ie(n,"apl_path",e.updatePath),Ie(n,"svgShow",e.updateShow),Q&&Ie(n,"new_edge4viewBox",e.adjustEdge),y.captionLabel.initSvg(e,n),!0},unbind:function(e,t){var n=t.props;e.elmsAppend&&(e.elmsAppend.forEach(function(e){n.svg.removeChild(e)}),e.elmPosition=e.styleFill=e.styleShow=e.elmsAppend=null),We(e.curStats,y.captionLabel.stats),We(e.aplStats,y.captionLabel.stats),e.color||Le(n,"cur_line_color",e.updateColor),e.refSocketXY?(Le(n,"apl_position",e.updateSocketXY),e.offset||(Le(n,"cur_attach_plugSideLenSE",e.updateSocketXY),Le(n,"cur_line_strokeWidth",e.updateSocketXY))):Le(n,"apl_path",e.updatePath),Le(n,"svgShow",e.updateShow),Q&&(Le(n,"new_edge4viewBox",e.adjustEdge),ze(n,{}))},removeOption:function(e,t){var n=t.props,a={};a[t.optionName]="",Ye(n,a)},remove:function(t){t.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),t.boundTargets.forEach(function(e){y.captionLabel.unbind(t,e)}))}},pathLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},startOffset:{},pathData:{}},init:function(l,t){return"string"==typeof t.text&&(l.text=t.text.trim()),!!l.text&&("string"==typeof t.color&&(l.color=t.color.trim()),l.outlineColor="string"==typeof t.outlineColor?t.outlineColor.trim():"#fff",ee(t.lineOffset)&&(l.lineOffset=t.lineOffset),y.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(l[e]=t[e])}),l.updateColor=function(e){y.captionLabel.updateColor(l,e)},l.updatePath=function(e){var t,n=l.curStats,a=l.aplStats,i=e.curStats,o=e.pathList.animVal||e.pathList.baseVal;o&&(n.pathData=t=y.pathLabel.getOffsetPathData(o,i.line_strokeWidth/2+l.strokeWidth/2+l.height/4,1.25*l.height),Ce(t,a.pathData)&&(l.elmPath.setPathData(t),a.pathData=t,l.bBox=l.elmPosition.getBBox(),l.updateStartOffset(e)))},l.updateStartOffset=function(e){var t,n,a,i=l.curStats,o=l.aplStats,r=e.curStats;i.pathData&&(2!==l.semIndex||l.lineOffset)&&(t=function(e){var i;return e.reduce(function(e,t){var n,a=t.values;switch(t.type){case"M":i={x:a[0],y:a[1]};break;case"L":n={x:a[0],y:a[1]},i&&(e+=ve(i,n)),i=n;break;case"C":n={x:a[4],y:a[5]},i&&(e+=ke(i,{x:a[0],y:a[1]},{x:a[2],y:a[3]},n)),i=n}return e},0)}(i.pathData),a=0===l.semIndex?0:1===l.semIndex?t:t/2,2!==l.semIndex&&(n=Math.max(r.attach_plugBackLenSE[l.semIndex]||0,r.line_strokeWidth/2)+l.strokeWidth/2+l.height/4,a=(a+=0===l.semIndex?n:-n)<0?0:t<a?t:a),l.lineOffset&&(a=(a+=l.lineOffset)<0?0:t<a?t:a),i.startOffset=a,Be(l,o,"startOffset",a)&&(l.elmOffset.startOffset.baseVal.value=a))},l.updateShow=function(e){y.captionLabel.updateShow(l,e)},Q&&(l.adjustEdge=function(e,t){l.bBox&&y.captionLabel.adjustEdge(t,l.bBox,l.strokeWidth/2)}),!0)},getOffsetPathData:function(e,s,n){var u,a,h=[];function p(e,t){return Math.abs(e.x-t.x)<3&&Math.abs(e.y-t.y)<3}return e.forEach(function(e){var t,n,a,i,o,r,l;2===e.length?(t=function(e,t,n){var a=Math.atan2(e.y-t.y,t.x-e.x)+.5*Math.PI;return[{x:e.x+Math.cos(a)*n,y:e.y+Math.sin(a)*n*-1},{x:t.x+Math.cos(a)*n,y:t.y+Math.sin(a)*n*-1}]}(e[0],e[1],s),u?(a=u.points,0<=(i=Math.atan2(a[1].y-a[0].y,a[0].x-a[1].x)-Math.atan2(e[0].y-e[1].y,e[1].x-e[0].x))&&i<=Math.PI?n={type:"line",points:t,inside:!0}:(r=xe(a[0],a[1],s),o=xe(t[1],t[0],s),n=(l=function(e,t,n,a){var i=t.x-e.x,o=t.y-e.y,r=a.x-n.x,l=a.y-n.y,s=(-o*(e.x-n.x)+i*(e.y-n.y))/(-r*o+i*l),u=(r*(e.y-n.y)-l*(e.x-n.x))/(-r*o+i*l);return 0<=s&&s<=1&&0<=u&&u<=1?{x:e.x+u*i,y:e.y+u*o}:null}(a[0],r,o,t[1]))?{type:"line",points:[a[1]=l,t[1]]}:(a[1]=p(o,r)?o:r,{type:"line",points:[o,t[1]]}),u.len=ve(a[0],a[1]))):n={type:"line",points:t},n.len=ve(n.points[0],n.points[1]),h.push(u=n)):(h.push({type:"cubic",points:function(e,t,n,a,i,o){for(var r,l,s=ke(e,t,n,a)/o,u=1/(o<i?i/o*s:s),h=[],p=0;l=(90-(r=be(e,t,n,a,p)).angle)*(Math.PI/180),h.push({x:r.x+Math.cos(l)*i,y:r.y+Math.sin(l)*i*-1}),!(1<=p);)1<(p+=u)&&(p=1);return h}(e[0],e[1],e[2],e[3],s,16)}),u=null)}),u=null,h.forEach(function(e){var t;u="line"===e.type?(e.inside&&(u.len>s?((t=u.points)[1]=xe(t[0],t[1],-s),u.len=ve(t[0],t[1])):(u.points=null,u.len=0),e.len>s+n?((t=e.points)[0]=xe(t[1],t[0],-(s+n)),e.len=ve(t[0],t[1])):(e.points=null,e.len=0)),e):null}),h.reduce(function(t,e){var n=e.points;return n&&(a&&p(n[0],a)||t.push({type:"M",values:[n[0].x,n[0].y]}),"line"===e.type?t.push({type:"L",values:[n[1].x,n[1].y]}):(n.shift(),n.forEach(function(e){t.push({type:"L",values:[e.x,e.y]})})),a=n[n.length-1]),t},[])},newText:function(e,t,n,a){var i,o,r,l,s,u,h,p,c,d;return(l=(r=t.createElementNS(X,"defs")).appendChild(t.createElementNS(X,"path"))).id=i=n+"-path",(u=(s=t.createElementNS(X,"text")).appendChild(t.createElementNS(X,"textPath"))).href.baseVal="#"+i,u.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),u.textContent=e,"boolean"!=typeof f&&(f="paintOrder"in s.style),a&&!f?(s.id=o=n+"-text",r.appendChild(s),(c=(h=t.createElementNS(X,"g")).appendChild(t.createElementNS(X,"use"))).href.baseVal="#"+o,(p=h.appendChild(t.createElementNS(X,"use"))).href.baseVal="#"+o,(d=c.style).strokeLinejoin="round",{elmPosition:s,elmPath:l,elmOffset:u,styleText:s.style,styleFill:p.style,styleStroke:d,styleShow:h.style,elmsAppend:[r,h]}):(d=s.style,a&&(d.strokeLinejoin="round",d.paintOrder="stroke"),{elmPosition:s,elmPath:l,elmOffset:u,styleText:d,styleFill:d,styleStroke:a?d:null,styleShow:d,elmsAppend:[r,s]})},initSvg:function(t,n){var e,a,i=y.pathLabel.newText(t.text,n.baseWindow.document,E+"-pathLabel-"+t._id,t.outlineColor);["elmPosition","elmPath","elmOffset","styleFill","styleShow","elmsAppend"].forEach(function(e){t[e]=i[e]}),t.isShown=!1,t.styleShow.visibility="hidden",y.captionLabel.textStyleProps.forEach(function(e){null!=t[e]&&(i.styleText[e]=t[e])}),i.elmsAppend.forEach(function(e){n.svg.appendChild(e)}),i.elmPath.setPathData([{type:"M",values:[0,100]},{type:"h",values:[100]}]),e=i.elmPosition.getBBox(),i.styleText.textAnchor=["start","end","middle"][t.semIndex],2!==t.semIndex||t.lineOffset||i.elmOffset.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,50),t.height=e.height,t.outlineColor&&(a=10<(a=e.height/9)?10:a<2?2:a,i.styleStroke.strokeWidth=a+"px",i.styleStroke.stroke=t.outlineColor),t.strokeWidth=a||0,We(t.aplStats,y.pathLabel.stats),t.updateColor(n),t.updatePath(n),t.updateStartOffset(n),Q&&ze(n,{}),t.updateShow(n)},bind:function(e,t){var n=t.props;return e.color||Ie(n,"cur_line_color",e.updateColor),Ie(n,"cur_line_strokeWidth",e.updatePath),Ie(n,"apl_path",e.updatePath),e.semIndex="startLabel"===t.optionName?0:"endLabel"===t.optionName?1:2,(2!==e.semIndex||e.lineOffset)&&Ie(n,"cur_attach_plugBackLenSE",e.updateStartOffset),Ie(n,"svgShow",e.updateShow),Q&&Ie(n,"new_edge4viewBox",e.adjustEdge),y.pathLabel.initSvg(e,n),!0},unbind:function(e,t){var n=t.props;e.elmsAppend&&(e.elmsAppend.forEach(function(e){n.svg.removeChild(e)}),e.elmPosition=e.elmPath=e.elmOffset=e.styleFill=e.styleShow=e.elmsAppend=null),We(e.curStats,y.pathLabel.stats),We(e.aplStats,y.pathLabel.stats),e.color||Le(n,"cur_line_color",e.updateColor),Le(n,"cur_line_strokeWidth",e.updatePath),Le(n,"apl_path",e.updatePath),(2!==e.semIndex||e.lineOffset)&&Le(n,"cur_attach_plugBackLenSE",e.updateStartOffset),Le(n,"svgShow",e.updateShow),Q&&(Le(n,"new_edge4viewBox",e.adjustEdge),ze(n,{}))},removeOption:function(e,t){var n=t.props,a={};a[t.optionName]="",Ye(n,a)},remove:function(t){t.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),t.boundTargets.forEach(function(e){y.pathLabel.unbind(t,e)}))}}},Object.keys(y).forEach(function(e){Xe[e]=function(){return new m(y[e],Array.prototype.slice.call(arguments))}}),Xe.positionByWindowResize=!0,window.addEventListener("resize",ae.add(function(){Xe.positionByWindowResize&&Object.keys(se).forEach(function(e){ze(se[e],{position:!0})})}),!1),Xe}();