You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/38541.0d990d5b.async.js

1 line
250 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[38541],{15378:function(){"use strict";function e(e,t,n,a){void 0===n&&(n=0),void 0===a&&(a=1/0),this._name=e,this._defaultValue=t,this._minimum=n,this._maximum=a}Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){if("string"!=typeof e||""===e)throw new Error("Shape name must be a valid string.");this._name=e}}),Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("The default value must be a real number, not: "+e);this._defaultValue=e}}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("Minimum must be a real number, not: "+e);this._minimum=e}}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("Maximum must be a real number, not: "+e);this._maximum=e}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(e,t){var n=go.Shape._FigureParameters[e];return n?n[t]:null},go.Shape.setFigureParameter=function(t,n,a){if(!(a instanceof e))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+a);if(a.defaultValue<a.minimum||a.defaultValue>a.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+a.defaultValue);var g=go.Shape._FigureParameters[t];g||(g=[],go.Shape._FigureParameters[t]=g),g[n]=a};var t=[];function n(e,n){var a=t.pop();return void 0===a?new go.Point(e,n):(a.x=e,a.y=n,a)}function a(){var e=t.pop();return void 0===e?new go.Point:e}function g(e){t.push(e)}function o(e,t,n,a,g,o,r,d,i){i||(i=new go.Point);var h,m,S,P=e-n,w=g-r,u=NaN,s=NaN;0===P?0===w?e===n&&(u=e,s=t):s=(m=(o-d)/w)*(u=e)+(o-m*g):s=0===w?(h=(t-a)/P)*(u=g)+(S=t-h*e):(h=(t-a)/P)*(u=(o-(m=(o-d)/w)*g-(S=t-h*e))/(h-m))+S;return i.x=u,i.y=s,i}function r(e,t,n,a,g,o,r,d,i,h,m,S,P,w){var u=1-i,s=e*u+n*i,l=t*u+a*i,c=n*u+g*i,p=a*u+o*i,f=g*u+r*i,L=o*u+d*i,v=s*u+c*i,y=l*u+p*i,F=c*u+f*i,G=p*u+L*i,B=v*u+F*i,b=y*u+G*i;h.x=s,h.y=l,m.x=v,m.y=y,S.x=B,S.y=b,P.x=F,P.y=G,w.x=f,w.y=L}var d=new go.Spot(.156,.156),i=new go.Spot(.844,.844),h=(Math.sqrt(2)-1)/3*4;go.Shape.setFigureParameter("RoundedRectangle",0,new e("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=5),a=Math.min(a,t/3);var g=(a=Math.min(a,n/3))*h,o=(new go.Geometry).add(new go.PathFigure(a,0,!0).add(new go.PathSegment(go.PathSegment.Line,t-a,0)).add(new go.PathSegment(go.PathSegment.Bezier,t,a,t-g,0,t,g)).add(new go.PathSegment(go.PathSegment.Line,t,n-a)).add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,n-g,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,a,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,g,n,0,n-g)).add(new go.PathSegment(go.PathSegment.Line,0,a)).add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,g,g,0).close()));return g>1&&(o.spot1=new go.Spot(0,0,g,g),o.spot2=new go.Spot(1,1,-g,-g)),o})),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.25,.5,.75)})),go.Shape.defineFigureGenerator("TriangleDown",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close())).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("TriangleLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,n).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,0).close())).setSpots(.5,.25,1,.75)})),go.Shape.defineFigureGenerator("TriangleUp",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,n).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,0).close())).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n).close())).setSpots(.25,.25,.75,.75)})),go.Shape.defineFigureGenerator("LineH",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=0,a.startY=n/2,a.endX=t,a.endY=n/2,a})),go.Shape.defineFigureGenerator("LineV",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=t/2,a.startY=0,a.endX=t/2,a.endY=n,a})),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n/2,!1).add(new go.PathSegment(go.PathSegment.Line,t,n/2)).add(new go.PathSegment(go.PathSegment.Move,t/2,0)).add(new go.PathSegment(go.PathSegment.Line,t/2,n)))})),go.Shape.defineFigureGenerator("XLine",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)))})),go.Shape.defineFigureGenerator("LineRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.25*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.25*t,n)))})),go.Shape.defineFigureGenerator("LineDown",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.25*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)).add(new go.PathSegment(go.PathSegment.Line,t,.25*n)))})),go.Shape.defineFigureGenerator("LineLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.75*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*t,n)))})),go.Shape.defineFigureGenerator("LineUp",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.75*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,t,.75*n)))})),go.Shape.defineFigureGenerator("AsteriskLine",(function(e,t,n){var a=.2/Math.SQRT2;return(new go.Geometry).add(new go.PathFigure(a*t,(1-a)*n,!1).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,a*n)).add(new go.PathSegment(go.PathSegment.Move,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Move,0,n/2)).add(new go.PathSegment(go.PathSegment.Line,t,n/2)).add(new go.PathSegment(go.PathSegment.Move,t/2,0)).add(new go.PathSegment(go.PathSegment.Line,t/2,n)))})),go.Shape.defineFigureGenerator("CircleLine",(function(e,t,n){var a=t/2,g=(new go.Geometry).add(new go.PathFigure(t,t/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,a,a,a,a).close()));return g.spot1=d,g.spot2=i,g.defaultStretch=go.GraphObject.Uniform,g})),go.Shape.defineFigureGenerator("Line1",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=0,a.startY=0,a.endX=t,a.endY=n,a})),go.Shape.defineFigureGenerator("Line2",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=t,a.startY=0,a.endX=0,a.endY=n,a})),go.Shape.defineFigureGenerator("Curve1",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,t,n,h*t,0,t,(1-h)*n)))})),go.Shape.defineFigureGenerator("Curve2",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,t,n,0,h*n,(1-h)*t,n)))})),go.Shape.defineFigureGenerator("Curve3",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,h*n,h*t,n)))})),go.Shape.defineFigureGenerator("Curve4",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,(1-h)*t,0,0,(1-h)*n)))})),go.Shape.defineFigureGenerator("TriangleDownLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.5,.5,1)})),go.Shape.defineFigureGenerator("TriangleDownRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(.5,.5,1,1)})),go.Shape.defineFigureGenerator("TriangleUpLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,0,.5,.5)})),go.Shape.defineFigureGenerator("TriangleUpRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n).close())).setSpots(.5,0,1,.5)})),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new e("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=.1:a<-1?a=-1:a>1&&(a=1);var g=Math.abs(a)*t;if(0===a)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=t,o.endY=n,o;var o=new go.Geometry;return a>0?o.add(new go.PathFigure(g,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t-g,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,g,n).close())),g<t/2&&o.setSpots(g/t,0,(t-g)/t,1),o})),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new e("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=10:a<-t?a=-t:a>t&&(a=t);var g=Math.abs(a);if(0===a)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=t,o.endY=n,o;var o=new go.Geometry;return a>0?o.add(new go.PathFigure(g,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t-g,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,g,n).close())),g<t/2&&o.setSpots(g/t,0,(t-g)/t,1),o})),go.Shape.setFigureParameter("Trapezoid1",0,new e("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=.2:a<.5?a=-.5:a>.5&&(a=.5);var g=Math.abs(a)*t;if(0===a)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=t,o.endY=n,o;var o=new go.Geometry;return a>0?o.add(new go.PathFigure(g,0).add(new go.PathSegment(go.PathSegment.Line,t-g,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,g,n).close())),g<t/2&&o.setSpots(g/t,0,(t-g)/t,1),o})),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new e("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=20:a<-t?a=-t/2:a>t&&(a=t/2);var g=Math.abs(a);if(0===a)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=t,o.endY=n,o;var o=new go.Geometry;return a>0?o.add(new go.PathFigure(g,0).add(new go.PathSegment(go.PathSegment.Line,t-g,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,g,n).close())),g<t/2&&o.setSpots(g/t,0,(t-g)/t,1),o})),go.Shape.setFigureParameter("ManualOperation",0,new e("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=10:a<-t?a=-t/2:a>t&&(a=t/2);var g=Math.abs(a);if(0===a)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=t,o.endY=n,o;var o=new go.Geometry;return a>0?o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-g,n)).add(new go.PathSegment(go.PathSegment.Line,g,n).close())):o.add(new go.PathFigure(g,0).add(new go.PathSegment(go.PathSegment.Line,t-g,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())),g<t/2&&o.setSpots(g/t,0,(t-g)/t,1),o}));var m=[];function S(){var e=m.pop();return void 0===e?[]:e}function P(e){e.length=0,m.push(e)}function w(e){for(var t=S(),n=1.5*Math.PI,a=0,g=0;g<e;g++)a=2*Math.PI/e*g+n,t[g]=new go.Point(.5+.5*Math.cos(a),.5+.5*Math.sin(a));return t.push(t[0]),t}function u(e){var t=s(e),n=S();n[0]=t[0];for(var a=1,g=1;a<t.length;a+=2,g+=3)n[g]=t[a],n[g+1]=t[a],n[g+2]=t[a+1];return P(t),n}function s(e){for(var t=w(e),n=S(),a=Math.floor(t.length/2),g=t.length-1,r=e%2==0?2:1,d=0;d<g;d++){var i=t[d],h=t[d+1],m=t[(a+d-1)%g],u=t[(a+d+r)%g];n[2*d]=i,n[2*d+1]=o(i.x,i.y,m.x,m.y,h.x,h.y,u.x,u.y,new go.Point)}return n[n.length]=n[0],P(t),n}go.Shape.defineFigureGenerator("Pentagon",(function(e,t,n){var a=w(5),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<5;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.2,.22),g.spot2=new go.Spot(.8,.9),g})),go.Shape.defineFigureGenerator("Hexagon",(function(e,t,n){var a=w(6),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<6;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.07,.25),g.spot2=new go.Spot(.93,.75),g})),go.Shape.defineFigureGenerator("Heptagon",(function(e,t,n){var a=w(7),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<7;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.2,.15),g.spot2=new go.Spot(.8,.85),g})),go.Shape.defineFigureGenerator("Octagon",(function(e,t,n){var a=w(8),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<8;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.15,.15),g.spot2=new go.Spot(.85,.85),g})),go.Shape.defineFigureGenerator("Nonagon",(function(e,t,n){var a=w(9),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<9;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.17,.13),g.spot2=new go.Spot(.82,.82),g})),go.Shape.defineFigureGenerator("Decagon",(function(e,t,n){var a=w(10),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<10;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.16,.16),g.spot2=new go.Spot(.84,.84),g})),go.Shape.defineFigureGenerator("Dodecagon",(function(e,t,n){var a=w(12),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<12;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.16,.16),g.spot2=new go.Spot(.84,.84),g})),go.Shape.defineFigureGenerator("FivePointedStar",(function(e,t,n){var a=s(5),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<10;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.266,.333),g.spot2=new go.Spot(.733,.733),g})),go.Shape.defineFigureGenerator("SixPointedStar",(function(e,t,n){var a=s(6),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<12;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.17,.25),g.spot2=new go.Spot(.83,.75),g})),go.Shape.defineFigureGenerator("SevenPointedStar",(function(e,t,n){var a=s(7),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<14;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.222,.277),g.spot2=new go.Spot(.777,.666),g})),go.Shape.defineFigureGenerator("EightPointedStar",(function(e,t,n){var a=s(8),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<16;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.25,.25),g.spot2=new go.Spot(.75,.75),g})),go.Shape.defineFigureGenerator("NinePointedStar",(function(e,t,n){var a=s(9),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<18;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.222,.277),g.spot2=new go.Spot(.777,.666),g})),go.Shape.defineFigureGenerator("TenPointedStar",(function(e,t,n){var a=s(10),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<20;r++)o.add(new go.PathSegment(go.PathSegment.Line,a[r].x*t,a[r].y*n));return o.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),P(a),g.spot1=new go.Spot(.281,.261),g.spot2=new go.Spot(.723,.748),g})),go.Shape.defineFigureGenerator("FivePointedBurst",(function(e,t,n){var a=u(5),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.222,.277),g.spot2=new go.Spot(.777,.777),g})),go.Shape.defineFigureGenerator("SixPointedBurst",(function(e,t,n){var a=u(6),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.17,.222),g.spot2=new go.Spot(.833,.777),g})),go.Shape.defineFigureGenerator("SevenPointedBurst",(function(e,t,n){var a=u(7),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.222,.222),g.spot2=new go.Spot(.777,.777),g})),go.Shape.defineFigureGenerator("EightPointedBurst",(function(e,t,n){var a=u(8),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.222,.222),g.spot2=new go.Spot(.777,.777),g})),go.Shape.defineFigureGenerator("NinePointedBurst",(function(e,t,n){var a=u(9),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.222,.222),g.spot2=new go.Spot(.777,.777),g})),go.Shape.defineFigureGenerator("TenPointedBurst",(function(e,t,n){var a=u(10),g=new go.Geometry,o=new go.PathFigure(a[0].x*t,a[0].y*n,!0);g.add(o);for(var r=1;r<a.length;r+=3)o.add(new go.PathSegment(go.PathSegment.Bezier,a[r+2].x*t,a[r+2].y*n,a[r].x*t,a[r].y*n,a[r+1].x*t,a[r+1].y*n));return o.segments.last().close(),P(a),g.spot1=new go.Spot(.222,.222),g.spot2=new go.Spot(.777,.777),g})),go.Shape.setFigureParameter("FramedRectangle",0,new e("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new e("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",(function(e,t,n){var a=e?e.parameter1:NaN,g=e?e.parameter2:NaN;isNaN(a)&&(a=8),isNaN(g)&&(g=8);var o=new go.Geometry,r=new go.PathFigure(0,0,!0);return o.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,0)),r.add(new go.PathSegment(go.PathSegment.Line,t,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a<t/2&&g<n/2&&(r.add(new go.PathSegment(go.PathSegment.Move,a,g)),r.add(new go.PathSegment(go.PathSegment.Line,a,n-g)),r.add(new go.PathSegment(go.PathSegment.Line,t-a,n-g)),r.add(new go.PathSegment(go.PathSegment.Line,t-a,g).close())),o.setSpots(0,0,1,1,a,g,-a,-g),o})),go.Shape.setFigureParameter("Ring",0,new e("Thickness",8)),go.Shape.defineFigureGenerator("Ring",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=8);var g=t/2,o=new go.Geometry,r=new go.PathFigure(t,t/2,!0);o.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,0,360,g,g,g,g).close());var h=Math.max(g-a,0);return h>0&&(r.add(new go.PathSegment(go.PathSegment.Move,t/2+h,t/2)),r.add(new go.PathSegment(go.PathSegment.Arc,0,-360,g,g,h,h).close())),o.spot1=d,o.spot2=i,o.defaultStretch=go.GraphObject.Uniform,o})),go.Shape.defineFigureGenerator("Cloud",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.08034461*t,.1944299*n,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*t,.05349299*n,-.09239631*t,.07836421*n,.1406031*t,-.0542823*n)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*t,.074219*n,.2450511*t,-.00697547*n,.3776197*t,-.01112067*n)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*t,.07004196*n,.4539471*t,0,.6066018*t,-.02526587*n)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*t,.08370865*n,.6914277*t,-.01904177*n,.8921095*t,-.01220843*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*t,.3194596*n,1.036446*t,.04105738*n,1.020377*t,.3022052*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*t,.562044*n,1.04448*t,.360238*n,.992256*t,.5219009*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*t,.8217117*n,1.032337*t,.5771781*n,1.018411*t,.8120651*n)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*t,.9156953*n,1.028411*t,.9571472*n,.8556702*t,1.052487*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*t,.9310455*n,.7431877*t,1.009325*n,.5624123*t,1.021761*n)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*t,.9344623*n,.4820677*t,1.031761*n,.3030112*t,1.002796*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*t,.870098*n,.2329994*t,1.01518*n,.03213784*t,1.01518*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*t,.6545475*n,-.02812061*t,.9032597*n,-.01205169*t,.6835638*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*t,.4265613*n,-.01812061*t,.6089503*n,-.00606892*t,.4555777*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*t,.1944299*n,-.01606892*t,.3892545*n,-.01205169*t,.1944299*n))).setSpots(.1,.1,.9,.9)})),go.Shape.defineFigureGenerator("StopSign",(function(e,t,n){var a=1/(Math.SQRT2+2);return(new go.Geometry).add(new go.PathFigure(a*t,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,a*n)).add(new go.PathSegment(go.PathSegment.Line,t,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Line,a*t,n)).add(new go.PathSegment(go.PathSegment.Line,0,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Line,0,a*n).close())).setSpots(a/2,a/2,1-a/2,1-a/2)})),go.Shape.setFigureParameter("Pie",0,new e("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new e("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",(function(e,t,n){var a=e?e.parameter1:NaN,g=e?e.parameter2:NaN;isNaN(a)&&(a=0),isNaN(g)&&(g=315);var o=a%360;o<0&&(o+=360);var r=g%360,d=Math.min(t,n)/2;return(new go.Geometry).add(new go.PathFigure(d,d).add(new go.PathSegment(go.PathSegment.Arc,o,r,d,d,d,d).close()))})),go.Shape.defineFigureGenerator("PiePiece",(function(e,t,n){var a=h/Math.SQRT2*.5,g=Math.SQRT2/2,o=1-Math.SQRT2/2;return(new go.Geometry).add(new go.PathFigure(t,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,g*t,o*n,t,(1-a)*n,(g+a)*t,(o+a)*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()))})),go.Shape.setFigureParameter("ThickCross",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=30);var g=Math.min(a,t)/2,o=t/2,r=n/2;return(new go.Geometry).add(new go.PathFigure(o-g,0,!0).add(new go.PathSegment(go.PathSegment.Line,o+g,0)).add(new go.PathSegment(go.PathSegment.Line,o+g,r-g)).add(new go.PathSegment(go.PathSegment.Line,t,r-g)).add(new go.PathSegment(go.PathSegment.Line,t,r+g)).add(new go.PathSegment(go.PathSegment.Line,o+g,r+g)).add(new go.PathSegment(go.PathSegment.Line,o+g,n)).add(new go.PathSegment(go.PathSegment.Line,o-g,n)).add(new go.PathSegment(go.PathSegment.Line,o-g,r+g)).add(new go.PathSegment(go.PathSegment.Line,0,r+g)).add(new go.PathSegment(go.PathSegment.Line,0,r-g)).add(new go.PathSegment(go.PathSegment.Line,o-g,r-g).close()))})),go.Shape.setFigureParameter("ThinCross",0,new e("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=10);var g=Math.min(a,t)/2,o=t/2,r=n/2;return(new go.Geometry).add(new go.PathFigure(o-g,0,!0).add(new go.PathSegment(go.PathSegment.Line,o+g,0)).add(new go.PathSegment(go.PathSegment.Line,o+g,r-g)).add(new go.PathSegment(go.PathSegment.Line,t,r-g)).add(new go.PathSegment(go.PathSegment.Line,t,r+g)).add(new go.PathSegment(go.PathSegment.Line,o+g,r+g)).add(new go.PathSegment(go.PathSegment.Line,o+g,n)).add(new go.PathSegment(go.PathSegment.Line,o-g,n)).add(new go.PathSegment(go.PathSegment.Line,o-g,r+g)).add(new go.PathSegment(go.PathSegment.Line,0,r+g)).add(new go.PathSegment(go.PathSegment.Line,0,r-g)).add(new go.PathSegment(go.PathSegment.Line,o-g,r-g).close()))})),go.Shape.setFigureParameter("ThickX",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",(function(e,t,n){var a=e?e.parameter1:NaN;if((isNaN(a)||a<0)&&(a=30),0===t||0===n)return(h=new go.Geometry(go.Geometry.Rectangle)).startX=0,h.startY=0,h.endX=t,h.endY=n,h;var g=t/2,o=n/2,r=Math.atan2(n,t),d=a-Math.min(Math.cos(r)*a/2,g),i=a-Math.min(Math.sin(r)*a/2,o),h=new go.Geometry,m=new go.PathFigure(d,0,!0);return h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,g,.2*n)),m.add(new go.PathSegment(go.PathSegment.Line,t-d,0)),m.add(new go.PathSegment(go.PathSegment.Line,t,i)),m.add(new go.PathSegment(go.PathSegment.Line,.8*t,o)),m.add(new go.PathSegment(go.PathSegment.Line,t,n-i)),m.add(new go.PathSegment(go.PathSegment.Line,t-d,n)),m.add(new go.PathSegment(go.PathSegment.Line,g,.8*n)),m.add(new go.PathSegment(go.PathSegment.Line,d,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,n-i)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,o)),m.add(new go.PathSegment(go.PathSegment.Line,0,i).close()),h})),go.Shape.setFigureParameter("ThinX",0,new e("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=10);var g=new go.Geometry,o=new go.PathFigure(.1*t,0,!0);return g.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.1*n).close()),g})),go.Shape.setFigureParameter("SquareIBeam",0,new e("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.2);var g=new go.Geometry,o=new go.PathFigure(0,0,!0);return g.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,a*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5+a/2)*t,a*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5+a/2)*t,(1-a)*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,(1-a)*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,(1-a)*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5-a/2)*t,(1-a)*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5-a/2)*t,a*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,a*n).close()),g})),go.Shape.setFigureParameter("RoundedIBeam",0,new e("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.5);var g=new go.Geometry,o=new go.PathFigure(0,0,!0);return g.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,n,Math.abs(1-a)*t,.25*n,Math.abs(1-a)*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,0,a*t,.75*n,a*t,.25*n).close()),g})),go.Shape.defineFigureGenerator("HalfEllipse",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,h*t,0,t,(.5-h/2)*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,(.5+h/2)*n,h*t,n).close())).setSpots(0,.156,.844,.844)})),go.Shape.defineFigureGenerator("Crescent",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,0,t,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*t,.75*n,.5*t,.25*n).close())).setSpots(.311,.266,.744,.744)})),go.Shape.defineFigureGenerator("Heart",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,.1*t,.8*n,0,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,0,0,.45*t,0)).add(new go.PathSegment(go.PathSegment.Bezier,t,.3*n,.55*t,0,t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,.5*n,.9*t,.8*n).close())).setSpots(.14,.29,.86,.78)})),go.Shape.defineFigureGenerator("Spade",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*t,.01*n)).add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.6*t,.2*n,t,.25*n)).add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.7*n,t,.8*n,.6*t,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,.5*t,.75*n,.55*t,.95*n)).add(new go.PathSegment(go.PathSegment.Line,.25*t,n)).add(new go.PathSegment(go.PathSegment.Bezier,.45*t,.7*n,.45*t,.95*n,.5*t,.75*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.4*t,.8*n,0,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.49*t,.01*n,0,.25*n,.4*t,.2*n).close())).setSpots(.14,.26,.86,.78)})),go.Shape.defineFigureGenerator("Club",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.4*t,.6*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.15*t,n,.5*t,.75*n,.45*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.6*n,.55*t,.95*n,.5*t,.75*n));var o=.2,r=.3,d=0,i=o*h;return g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r)*t,(.5+o+d)*n,(.5-o+r)*t,(.5+i+d)*n,(.5-i+r)*t,(.5+o+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+r)*t,(.5+d)*n,(.5+i+r)*t,(.5+o+d)*n,(.5+o+r)*t,(.5+i+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r)*t,(.5-o+d)*n,(.5+o+r)*t,(.5-i+d)*n,(.5+i+r)*t,(.5-o+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.65*t,.36771243*n,(.5-i+r)*t,(.5-o+d)*n,(.5-o+r+.05)*t,(.5-i+d-.02)*n)),r=0,d=-.3,i=(o=.2)*h,g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+r)*t,(.5+d)*n,(.5+i+r)*t,(.5+o+d)*n,(.5+o+r)*t,(.5+i+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r)*t,(.5-o+d)*n,(.5+o+r)*t,(.5-i+d)*n,(.5+i+r)*t,(.5-o+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+r)*t,(.5+d)*n,(.5-i+r)*t,(.5-o+d)*n,(.5-o+r)*t,(.5-i+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5-i+r)*t,(.5+o+d)*n,(.5-o+r)*t,(.5+i+d)*n,(.5-i+r)*t,(.5+o+d)*n)),r=-.3,d=0,i=(o=.2)*h,g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r)*t,(.5-o+d)*n,(.5+o+r-.05)*t,(.5-i+d-.02)*n,(.5+i+r)*t,(.5-o+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+r)*t,(.5+d)*n,(.5-i+r)*t,(.5-o+d)*n,(.5-o+r)*t,(.5-i+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r)*t,(.5+o+d)*n,(.5-o+r)*t,(.5+i+d)*n,(.5-i+r)*t,(.5+o+d)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,.6*n,(.5+i+r)*t,(.5+o+d)*n,(.5+o+r)*t,(.5+i+d)*n).close()),a.setSpots(.06,.33,.93,.68),a})),go.Shape.defineFigureGenerator("YinYang",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,270,180,.5*t,.5*t,.5*t,.5*t)),g.add(new go.PathSegment(go.PathSegment.Arc,90,-180,.5*t,.75*t,.25*t,.25*t)),g.add(new go.PathSegment(go.PathSegment.Arc,90,180,.5*t,.25*t,.25*t,.25*t));var o=.1,r=.5,d=.25;return g.add(new go.PathSegment(go.PathSegment.Move,.6*t,d*n)),g.add(new go.PathSegment(go.PathSegment.Arc,0,-360,t*r,n*d,o*t,o*t).close()),g=new go.PathFigure(.5*t,0,!1),a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,270,-180,.5*t,.5*t,.5*t,.5*t)),d=.75,g=new go.PathFigure(.6*t,d*n,!0),a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,0,360,t*r,n*d,o*t,o*t).close()),a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("Peace",(function(e,t,n){var a=.8535533905932737,g=.5*t,o=.5*n;return(new go.Geometry).add(new go.PathFigure(g,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,g,o,g,o)).add(new go.PathSegment(go.PathSegment.Line,g,n)).add(new go.PathSegment(go.PathSegment.Move,g,o)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,a*n)).add(new go.PathSegment(go.PathSegment.Move,g,o)).add(new go.PathSegment(go.PathSegment.Line,a*t,a*n)))})),go.Shape.defineFigureGenerator("NotAllowed",(function(e,t,n){var o=new go.Geometry,d=.5*h,i=.5,m=.5,S=.5,P=new go.PathFigure(m*t,(S-i)*n);o.add(P),P.add(new go.PathSegment(go.PathSegment.Bezier,(m-i)*t,S*n,(m-d)*t,(S-i)*n,(m-i)*t,(S-d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+i)*n,(m-i)*t,(S+d)*n,(m-d)*t,(S+i)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m+i)*t,S*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-i)*n,(m+i)*t,(S-d)*n,(m+d)*t,(S-i)*n)),i=.4,d=.4*h;var w=a(),u=a(),s=a(),l=a();r(m,S-i,m+d,S-i,m+i,S-d,m+i,S,.42,w,u,s,l,l);var c=a(),p=a(),f=a();r(m,S-i,m+d,S-i,m+i,S-d,m+i,S,.58,l,l,f,c,p);var L=a(),v=a(),y=a();r(m,S+i,m-d,S+i,m-i,S+d,m-i,S,.42,L,v,y,l,l);var F=a(),G=a(),B=a();return r(m,S+i,m-d,S+i,m-i,S+d,m-i,S,.58,l,l,B,F,G),P.add(new go.PathSegment(go.PathSegment.Move,B.x*t,B.y*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m-i)*t,S*n,F.x*t,F.y*n,G.x*t,G.y*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-i)*n,(m-i)*t,(S-d)*n,(m-d)*t,(S-i)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,s.x*t,s.y*n,w.x*t,w.y*n,u.x*t,u.y*n)),P.add(new go.PathSegment(go.PathSegment.Line,B.x*t,B.y*n).close()),P.add(new go.PathSegment(go.PathSegment.Move,y.x*t,y.y*n)),P.add(new go.PathSegment(go.PathSegment.Line,f.x*t,f.y*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m+i)*t,S*n,c.x*t,c.y*n,p.x*t,p.y*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+i)*n,(m+i)*t,(S+d)*n,(m+d)*t,(S+i)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,y.x*t,y.y*n,L.x*t,L.y*n,v.x*t,v.y*n).close()),g(w),g(u),g(s),g(l),g(c),g(p),g(f),g(L),g(v),g(y),g(F),g(G),g(B),o.defaultStretch=go.GraphObject.Uniform,o})),go.Shape.defineFigureGenerator("Fragile",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*t,0)).add(new go.PathSegment(go.PathSegment.Line,.2*t,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.29*t,.33*n)).add(new go.PathSegment(go.PathSegment.Line,.35*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.5*n,t,.25*n,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.55*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*t,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.5*n,0,.25*n).close()))})),go.Shape.setFigureParameter("HourGlass",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=30),a>t&&(a=t);var g=(t-a)/2,o=g+a;return(new go.Geometry).add(new go.PathFigure(o,.5*n).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,g,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,t,0).close()))})),go.Shape.defineFigureGenerator("Lightning",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.55*n).add(new go.PathSegment(go.PathSegment.Line,.6*t,0)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.45*n)).add(new go.PathSegment(go.PathSegment.Line,t,.45*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.55*n).close()))})),go.Shape.defineFigureGenerator("GenderMale",(function(e,t,o){var d=new go.Geometry,i=.4*h,m=.4,S=.5,P=.5,w=a(),u=a(),s=a(),l=a(),c=new go.PathFigure((S-m)*t,P*o,!1);d.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P-m)*o,(S-m)*t,(P-i)*o,(S-i)*t,(P-m)*o)),r(S,P-m,S+i,P-m,S+m,P-i,S+m,P,.44,s,l,u,w,w),c.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*o,s.x*t,s.y*o,l.x*t,l.y*o));var p=n(u.x,u.y);r(S,P-m,S+i,P-m,S+m,P-i,S+m,P,.56,w,w,u,s,l);var f=n(u.x,u.y);c.add(new go.PathSegment(go.PathSegment.Line,(.1*p.x+.855)*t,.1*p.y*o)),c.add(new go.PathSegment(go.PathSegment.Line,.85*t,.1*p.y*o)),c.add(new go.PathSegment(go.PathSegment.Line,.85*t,0)),c.add(new go.PathSegment(go.PathSegment.Line,t,0)),c.add(new go.PathSegment(go.PathSegment.Line,t,.15*o)),c.add(new go.PathSegment(go.PathSegment.Line,(.1*f.x+.9)*t,.15*o)),c.add(new go.PathSegment(go.PathSegment.Line,(.1*f.x+.9)*t,(.1*f.y+.05*.9)*o)),c.add(new go.PathSegment(go.PathSegment.Line,f.x*t,f.y*o)),c.add(new go.PathSegment(go.PathSegment.Bezier,(S+m)*t,P*o,s.x*t,s.y*o,l.x*t,l.y*o)),c.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+m)*o,(S+m)*t,(P+i)*o,(S+i)*t,(P+m)*o)),c.add(new go.PathSegment(go.PathSegment.Bezier,(S-m)*t,P*o,(S-i)*t,(P+m)*o,(S-m)*t,(P+i)*o)),m=.35,i=.35*h;var L=new go.PathFigure(S*t,(P-m)*o,!1);d.add(L),L.add(new go.PathSegment(go.PathSegment.Bezier,(S-m)*t,P*o,(S-i)*t,(P-m)*o,(S-m)*t,(P-i)*o)),L.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+m)*o,(S-m)*t,(P+i)*o,(S-i)*t,(P+m)*o)),L.add(new go.PathSegment(go.PathSegment.Bezier,(S+m)*t,P*o,(S+i)*t,(P+m)*o,(S+m)*t,(P+i)*o)),L.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P-m)*o,(S+m)*t,(P-i)*o,(S+i)*t,(P-m)*o));var v=new go.PathFigure((S-m)*t,P*o,!1);return d.add(v),g(w),g(u),g(s),g(l),g(p),g(f),d.spot1=new go.Spot(.202,.257),d.spot2=new go.Spot(.792,.739),d.defaultStretch=go.GraphObject.Uniform,d})),go.Shape.defineFigureGenerator("GenderFemale",(function(e,t,n){var a=new go.Geometry,g=.375,o=0,r=-.125,d=g*h,i=new go.PathFigure((.525+o)*t,(.5+g+r)*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g+o)*t,(.5+r)*n,(.5+d+o)*t,(.5+g+r)*n,(.5+g+o)*t,(.5+d+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*t,(.5-g+r)*n,(.5+g+o)*t,(.5-d+r)*n,(.5+d+o)*t,(.5-g+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5-g+o)*t,(.5+r)*n,(.5-d+o)*t,(.5-g+r)*n,(.5-g+o)*t,(.5-d+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.475+o)*t,(.5+g+r)*n,(.5-g+o)*t,(.5+d+r)*n,(.5-d+o)*t,(.5+g+r)*n)),i.add(new go.PathSegment(go.PathSegment.Line,.475*t,.85*n)),i.add(new go.PathSegment(go.PathSegment.Line,.425*t,.85*n)),i.add(new go.PathSegment(go.PathSegment.Line,.425*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.475*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.475*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.525*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.525*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.575*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.575*t,.85*n)),i.add(new go.PathSegment(go.PathSegment.Line,.525*t,.85*n).close()),o=0,r=-.125,d=(g=.325)*h;i=new go.PathFigure((.5+g+o)*t,(.5+r)*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*t,(.5+g+r)*n,(.5+g+o)*t,(.5+d+r)*n,(.5+d+o)*t,(.5+g+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5-g+o)*t,(.5+r)*n,(.5-d+o)*t,(.5+g+r)*n,(.5-g+o)*t,(.5+d+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*t,(.5-g+r)*n,(.5-g+o)*t,(.5-d+r)*n,(.5-d+o)*t,(.5-g+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g+o)*t,(.5+r)*n,(.5+d+o)*t,(.5-g+r)*n,(.5+g+o)*t,(.5-d+r)*n));i=new go.PathFigure((.525+o)*t,(.5+g+r)*n,!1);return a.add(i),a.spot1=new go.Spot(.232,.136),a.spot2=new go.Spot(.682,.611),a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("LogicImplies",(function(e,t,n){var a=e?e.parameter1:NaN;return isNaN(a)&&(a=.2),(new go.Geometry).add(new go.PathFigure((1-a)*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n))).setSpots(0,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicIff",(function(e,t,n){var a=e?e.parameter1:NaN;return isNaN(a)&&(a=.2),(new go.Geometry).add(new go.PathFigure((1-a)*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Move,a*t,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,a*t,n))).setSpots(.2,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicNot",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)))})),go.Shape.defineFigureGenerator("LogicAnd",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("LogicOr",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,0))).setSpots(.219,0,.78,.409)})),go.Shape.defineFigureGenerator("LogicXor",(function(e,t,n){var a=(new go.Geometry).add(new go.PathFigure(.5*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*t,.5*n,.5*t,.5*n)));return a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("LogicTruth",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,.5*t,0)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)))})),go.Shape.defineFigureGenerator("LogicFalsity",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Move,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,0)))})),go.Shape.defineFigureGenerator("LogicThereExists",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Move,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)))})),go.Shape.defineFigureGenerator("LogicForAll",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,.25*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n))).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("LogicIsDefinedAs",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Move,0,n)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(.01,.01,.99,.49)})),go.Shape.defineFigureGenerator("LogicIntersect",(function(e,t,n){var a=.5;return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,0,a*n)).add(new go.PathSegment(go.PathSegment.Arc,180,180,a*t,a*n,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(0,.5,1,1)})),go.Shape.defineFigureGenerator("LogicUnion",(function(e,t,n){var a=.5;return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,a*n)).add(new go.PathSegment(go.PathSegment.Arc,0,180,a*t,a*n,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)})),go.Shape.setFigureParameter("Arrow",0,new e("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new e("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.3);var d=e?e.parameter2:NaN;isNaN(d)&&(d=.3);var i=(1-r)*t,h=(.5-d/2)*n,m=(.5+d/2)*n,S=new go.Geometry,P=new go.PathFigure(0,h,!0);S.add(P),P.add(new go.PathSegment(go.PathSegment.Line,i,h)),P.add(new go.PathSegment(go.PathSegment.Line,i,0)),P.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),P.add(new go.PathSegment(go.PathSegment.Line,i,n)),P.add(new go.PathSegment(go.PathSegment.Line,i,m)),P.add(new go.PathSegment(go.PathSegment.Line,0,m).close()),S.spot1=new go.Spot(0,h/n);var w=o(0,m/n,1,m/n,i/t,1,1,.5,a());return S.spot2=new go.Spot(w.x,w.y),g(w),S})),go.Shape.setFigureParameter("Arrow2",0,new e("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new e("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=30),r>t&&(r=t);var d=e?e.parameter2:NaN;isNaN(d)&&(d=30);var i=t-r,h=(n-(d=Math.min(d,n/2)))/2,m=h+d,S=new go.Geometry,P=new go.PathFigure(0,h,!0);S.add(P),P.add(new go.PathSegment(go.PathSegment.Line,i,h)),P.add(new go.PathSegment(go.PathSegment.Line,i,0)),P.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),P.add(new go.PathSegment(go.PathSegment.Line,i,n)),P.add(new go.PathSegment(go.PathSegment.Line,i,m)),P.add(new go.PathSegment(go.PathSegment.Line,0,m).close()),S.spot1=new go.Spot(0,h/n);var w=o(0,m/n,1,m/n,i/t,1,1,.5,a());return S.spot2=new go.Spot(w.x,w.y),g(w),S})),go.Shape.defineFigureGenerator("Chevron",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("DoubleArrow",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.214*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.786*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,1*n).close()),a})),go.Shape.setFigureParameter("DoubleEndArrow",0,new e("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.3);var d=(.5-r/2)*n,i=(.5+r/2)*n,h=new go.Geometry,m=new go.PathFigure(t,.5*n,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,.3*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,.3*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),m.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),m.add(new go.PathSegment(go.PathSegment.Line,.3*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close());var S=o(0,.5,.3,0,0,d/n,.1,d/n,a());return h.spot1=new go.Spot(S.x,S.y),S=o(.7,1,1,.5,0,i/n,1,i/n,S),h.spot2=new go.Spot(S.x,S.y),g(S),h})),go.Shape.setFigureParameter("DoubleEndArrow2",0,new e("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new e("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=40);var d=e?e.parameter2:NaN;isNaN(d)&&(d=100);var i=(n-r)/2,h=i+r,m=(n-d)/2,S=m+d;(r>n||d>n)&&(d>r?(h=(i=(n-(r=r*n/d))/2)+r,m=0,S=n):(i=0,h=n,m=0,S=n));var P=new go.Geometry,w=new go.PathFigure(t,.5*n,!0);P.add(w),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,S)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,h)),w.add(new go.PathSegment(go.PathSegment.Line,.3*t,h)),w.add(new go.PathSegment(go.PathSegment.Line,.3*t,S)),w.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),w.add(new go.PathSegment(go.PathSegment.Line,.3*t,m)),w.add(new go.PathSegment(go.PathSegment.Line,.3*t,i)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,m).close());var u=o(0,.5,.3,m/n,0,i/n,1,i/n,a());return P.spot1=new go.Spot(u.x,u.y),u=o(.7,S/n,1,.5,0,h/n,1,h/n,u),P.spot2=new go.Spot(u.x,u.y),g(u),P})),go.Shape.setFigureParameter("IBeamArrow",0,new e("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.3);var d=(.5-r/2)*n,i=(.5+r/2)*n,h=new go.Geometry,m=new go.PathFigure(t,.5*n,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,0)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,0)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),h.spot1=new go.Spot(0,d/n);var S=o(.7,1,1,.5,0,i/n,1,i/n,a());return h.spot2=new go.Spot(S.x,S.y),g(S),h})),go.Shape.setFigureParameter("IBeamArrow2",0,new e("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new e("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=40);var d=e?e.parameter2:NaN;isNaN(d)&&(d=100);var i=(n-r)/2,h=i+r,m=(n-d)/2,S=m+d;(r>n||d>n)&&(d>r?(h=(i=(n-(r=r*n/d))/2)+r,m=0,S=n):(i=0,h=n,m=0,S=n));var P=new go.Geometry,w=new go.PathFigure(t,.5*n,!0);P.add(w),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,S)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,h)),w.add(new go.PathSegment(go.PathSegment.Line,.2*t,h)),w.add(new go.PathSegment(go.PathSegment.Line,.2*t,S)),w.add(new go.PathSegment(go.PathSegment.Line,0,S)),w.add(new go.PathSegment(go.PathSegment.Line,0,m)),w.add(new go.PathSegment(go.PathSegment.Line,.2*t,m)),w.add(new go.PathSegment(go.PathSegment.Line,.2*t,i)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),w.add(new go.PathSegment(go.PathSegment.Line,.7*t,m).close()),P.spot1=new go.Spot(0,i/n);var u=o(.7,S/n,1,.5,0,h/n,1,h/n,a());return P.spot2=new go.Spot(u.x,u.y),g(u),P})),go.Shape.setFigureParameter("Pointer",0,new e("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.1);var d=new go.Geometry,i=new go.PathFigure(t,.5*n,!0);d.add(i),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,r*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),d.spot1=new go.Spot(r,.35);var h=o(.2,.65,1,.65,0,1,1,.5,a());return d.spot2=new go.Spot(h.x,h.y),g(h),d})),go.Shape.setFigureParameter("RoundedPointer",0,new e("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.3);var d=new go.Geometry,i=new go.PathFigure(t,.5*n,!0);d.add(i),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,0,r*t,.75*n,r*t,.25*n).close()),d.spot1=new go.Spot(r,.35);var h=o(0,.65,1,.65,0,1,1,.5,a());return d.spot2=new go.Spot(h.x,h.y),g(h),d})),go.Shape.setFigureParameter("SplitEndArrow",0,new e("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=.4);var d=(.5-r/2)*n,i=(.5+r/2)*n,h=new go.Geometry,m=new go.PathFigure(t,.5*n,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,0,i)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),m.add(new go.PathSegment(go.PathSegment.Line,0,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),h.spot1=new go.Spot(.2,.3);var S=o(.7,1,1,.5,0,i/n,1,i/n,a());return h.spot2=new go.Spot(S.x,S.y),g(S),h})),go.Shape.setFigureParameter("SplitEndArrow2",0,new e("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",(function(e,t,n){var r=e?e.parameter1:NaN;isNaN(r)&&(r=50);var d=(n-r)/2,i=d+r;r>n&&(d=0,i=n);var h=new go.Geometry,m=new go.PathFigure(t,.5*n,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),m.add(new go.PathSegment(go.PathSegment.Line,0,i)),m.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),m.add(new go.PathSegment(go.PathSegment.Line,0,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),m.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),h.spot1=new go.Spot(.2,d/n);var S=o(.7,1,1,.5,0,i/n,1,i/n,a());return h.spot2=new go.Spot(S.x,S.y),g(S),h})),go.Shape.setFigureParameter("SquareArrow",0,new e("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.7);var g=new go.Geometry,o=new go.PathFigure(t,.5*n,!0);return g.add(o),o.add(new go.PathSegment(go.PathSegment.Line,a*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,a*t,0).close()),g.spot1=go.Spot.TopLeft,g.spot2=new go.Spot(a,1),g})),go.Shape.defineFigureGenerator("Cone1",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.1*h,r=new go.PathFigure(0,.9*n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+o)*n,(.5+g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-g)*t,n,0,(.9+o)*n).close()),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.97),a})),go.Shape.defineFigureGenerator("Cone2",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.9*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.9*n,(1-.85/.9)*t,n,.85/.9*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,.9*n).close());var o=new go.PathFigure(0,.9*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.9*n,(1-.85/.9)*t,.8*n,.85/.9*t,.8*n)),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.82),a})),go.Shape.defineFigureGenerator("Cube1",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var o=new go.PathFigure(.5*t,n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(.5,.85),a})),go.Shape.defineFigureGenerator("Cube2",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.3*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,0).close());var o=new go.PathFigure(0,.3*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Move,.7*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(.7,1),a})),go.Shape.defineFigureGenerator("Cylinder1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,n/3);var g=new go.Geometry,o=.5*h,r=new go.PathFigure(0,a,!0);g.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,h*a,(.5-o)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,1*t,a,(.5+o)*t,0,1*t,h*a)),r.add(new go.PathSegment(go.PathSegment.Line,t,n-a)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,1*n,1*t,n-h*a,(.5+o)*t,1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,(.5-o)*t,1*n,0,n-h*a)),r.add(new go.PathSegment(go.PathSegment.Line,0,a));var d=new go.PathFigure(t,a,!1);return g.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,2*a,1*t,2*a-h*a,(.5+o)*t,2*a)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,a,(.5-o)*t,2*a,0,2*a-h*a)),g.spot1=new go.Spot(0,0,0,2*a),g.spot2=new go.Spot(1,1),g})),go.Shape.defineFigureGenerator("Cylinder2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,n/3);var g=new go.Geometry,o=.5*h,r=new go.PathFigure(0,n-a,!0);g.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,a)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,h*a,(.5-o)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,a,(.5+o)*t,0,t,h*a)),r.add(new go.PathSegment(go.PathSegment.Line,t,n-a)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,n-h*a,(.5+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,(.5-o)*t,n,0,n-h*a));var d=new go.PathFigure(0,n-a,!1);return g.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n-2*a,0,n-a-h*a,(.5-o)*t,n-2*a)),d.add(new go.PathSegment(go.PathSegment.Bezier,t,n-a,(.5+o)*t,n-2*a,t,n-a-h*a)),g.spot1=new go.Spot(0,0),g.spot2=new go.Spot(1,1,0,-2*a),g})),go.Shape.defineFigureGenerator("Cylinder3",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,t/3);var g=new go.Geometry,o=.5*h,r=new go.PathFigure(a,0,!0);g.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t-a,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,t-h*a,0,t,(.5-o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,(.5+o)*n,t-h*a,n)),r.add(new go.PathSegment(go.PathSegment.Line,a,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,h*a,n,0,(.5+o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,(.5-o)*n,h*a,0));var d=new go.PathFigure(a,0,!1);return g.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,2*a,.5*n,a+h*a,0,2*a,(.5-o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,a,n,2*a,(.5+o)*n,a+h*a,n)),g.spot1=new go.Spot(0,0,2*a,0),g.spot2=new go.Spot(1,1),g})),go.Shape.defineFigureGenerator("Cylinder4",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,t/3);var g=new go.Geometry,o=.5*h,r=new go.PathFigure(t-a,0,!0);g.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,t-h*a,0,t,(.5-o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,(.5+o)*n,t-h*a,n)),r.add(new go.PathSegment(go.PathSegment.Line,a,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,h*a,n,0,(.5+o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,(.5-o)*n,h*a,0)),r.add(new go.PathSegment(go.PathSegment.Line,t-a,0));var d=new go.PathFigure(t-a,0,!1);return g.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,t-2*a,.5*n,t-a-h*a,0,t-2*a,(.5-o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t-2*a,(.5+o)*n,t-a-h*a,n)),g.spot1=new go.Spot(0,0),g.spot2=new go.Spot(1,1,-2*a,0),g})),go.Shape.defineFigureGenerator("Prism1",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.25*t,.25*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(.25*t,.25*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.408,.172),a.spot2=new go.Spot(.833,.662),a})),go.Shape.defineFigureGenerator("Prism2",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.25*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(0,n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("Pyramid1",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.75*n).close());var o=new go.PathFigure(.5*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.25,.367),a.spot2=new go.Spot(.75,.875),a})),go.Shape.defineFigureGenerator("Pyramid2",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var o=new go.PathFigure(.5*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),a.spot1=new go.Spot(.25,.367),a.spot2=new go.Spot(.75,.875),a})),go.Shape.defineFigureGenerator("Actor",(function(e,t,n){var a=new go.Geometry,g=.2,o=.1,r=h*g,d=h*o,i=.5,m=.1,S=new go.PathFigure(i*t,(m+o)*n,!0);a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,(i-g)*t,m*n,(i-r)*t,(m+o)*n,(i-g)*t,(m+d)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-o)*n,(i-g)*t,(m-d)*n,(i-r)*t,(m-o)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(i+g)*t,m*n,(i+r)*t,(m-o)*n,(i+g)*t,(m-d)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m+o)*n,(i+g)*t,(m+d)*n,(i+r)*t,(m+o)*n));var P=.05,w=h*P;i=.05,m=.25;var u=new go.PathFigure(.5*t,.2*n,!0);return a.add(u),u.add(new go.PathSegment(go.PathSegment.Line,.95*t,.2*n)),i=.95,m=.25,u.add(new go.PathSegment(go.PathSegment.Bezier,(i+P)*t,m*n,(i+w)*t,(m-P)*n,(i+P)*t,(m-w)*n)),u.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,.85*t,.35*n)),w=h*(P=.025),i=.825,m=.35,u.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-P)*n,(i+P)*t,(m-w)*n,(i+w)*t,(m-P)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(i-P)*t,m*n,(i-w)*t,(m-P)*n,(i-P)*t,(m-w)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.55*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.55*t,.7*n)),w=h*(P=.05),i=.5,m=.7,u.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-P)*n,(i+P)*t,(m-w)*n,(i+w)*t,(m-P)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(i-P)*t,m*n,(i-w)*t,(m-P)*n,(i-P)*t,(m-w)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.45*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.2*t,.35*n)),w=h*(P=.025),i=.175,m=.35,u.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-P)*n,(i+P)*t,(m-w)*n,(i+w)*t,(m-P)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(i-P)*t,m*n,(i-w)*t,(m-P)*n,(i-P)*t,(m-w)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),w=h*(P=.05),i=.05,m=.25,u.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-P)*n,(i-P)*t,(m-w)*n,(i-w)*t,(m-P)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.5*t,.2*n)),a.spot1=new go.Spot(.2,.2),a.spot2=new go.Spot(.8,.65),a})),go.Shape.setFigureParameter("Card",0,new e("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.2);var g=new go.Geometry,o=new go.PathFigure(t,0,!0);return g.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,a*n)),o.add(new go.PathSegment(go.PathSegment.Line,a*t,0).close()),g.spot1=new go.Spot(0,a),g.spot2=go.Spot.BottomRight,g})),go.Shape.defineFigureGenerator("Collate",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,.5*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n));var o=new go.PathFigure(.5*t,.5*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),a.spot1=new go.Spot(.25,0),a.spot2=new go.Spot(.75,.25),a})),go.Shape.defineFigureGenerator("CreateRequest",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure(0,g*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,g*n)),r.add(new go.PathSegment(go.PathSegment.Move,0,(1-g)*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,(1-g)*n)),a})),go.Shape.defineFigureGenerator("Database",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.1*h,r=new go.PathFigure(t,.1*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+o)*n,(.5+g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-g)*t,n,0,(.9+o)*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,(.1-o)*n,(.5-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,(.5+g)*t,0,t,(.1-o)*n));var d=new go.PathFigure(t,.1*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,t,(.1+o)*n,(.5+g)*t,.2*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-g)*t,.2*n,0,(.1+o)*n)),d.add(new go.PathSegment(go.PathSegment.Move,t,.2*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,t,(.2+o)*n,(.5+g)*t,.3*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-g)*t,.3*n,0,(.2+o)*n)),d.add(new go.PathSegment(go.PathSegment.Move,t,.3*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.4*n,t,(.3+o)*n,(.5+g)*t,.4*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,(.5-g)*t,.4*n,0,(.3+o)*n)),a.spot1=new go.Spot(0,.4),a.spot2=new go.Spot(1,.9),a})),go.Shape.defineFigureGenerator("DataStorage",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,t,0,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.9*n,.25*t,.1*n).close()),a.spot1=new go.Spot(.226,0),a.spot2=new go.Spot(.81,1),a})),go.Shape.defineFigureGenerator("DiskStorage",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.1*h,r=new go.PathFigure(t,.1*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+o)*n,(.5+g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-g)*t,n,0,(.9+o)*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,(.1-o)*n,(.5-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,(.5+g)*t,0,t,(.1-o)*n));var d=new go.PathFigure(t,.1*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,t,(.1+o)*n,(.5+g)*t,.2*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-g)*t,.2*n,0,(.1+o)*n)),d.add(new go.PathSegment(go.PathSegment.Move,t,.2*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,t,(.2+o)*n,(.5+g)*t,.3*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-g)*t,.3*n,0,(.2+o)*n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(1,.9),a})),go.Shape.defineFigureGenerator("Display",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.25*t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,t,0,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close()),a.spot1=new go.Spot(.25,0),a.spot2=new go.Spot(.75,1),a})),go.Shape.defineFigureGenerator("DividedEvent",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)?g=.2:g<.15&&(g=.15);var o=.2*h,r=new go.PathFigure(0,.2*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,0,(.2-o)*n,(.2-o)*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.2*n,(.8+o)*t,0,t,(.2-o)*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,n,t,(.8+o)*n,(.8+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*n,(.2-o)*t,n,0,(.8+o)*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.2*n));var d=new go.PathFigure(0,g*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t,g*n)),a})),go.Shape.defineFigureGenerator("DividedProcess",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;(isNaN(g)||g<.1)&&(g=.1);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure(0,g*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,g*n)),a})),go.Shape.defineFigureGenerator("Document",(function(e,t,n){var a=new go.Geometry;n/=.8;var g=new go.PathFigure(0,.7*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(1,.6),a})),go.Shape.defineFigureGenerator("ExternalOrganization",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;(isNaN(g)||g<.2)&&(g=.2);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure(g*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,g*n)),r.add(new go.PathSegment(go.PathSegment.Move,t,g*n)),r.add(new go.PathSegment(go.PathSegment.Line,(1-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Move,0,(1-g)*n)),r.add(new go.PathSegment(go.PathSegment.Line,g*t,n)),r.add(new go.PathSegment(go.PathSegment.Move,(1-g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,t,(1-g)*n)),a})),go.Shape.defineFigureGenerator("ExternalProcess",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var o=new go.PathFigure(.1*t,.4*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Move,.9*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Move,.6*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Move,.4*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.9*n)),a.spot1=new go.Spot(.25,.25),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("File",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(.75*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("Interrupt",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,.5*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n));var o=new go.PathFigure(t,.5*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n));var r=new go.PathFigure(t,.5*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,0)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("InternalStorage",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN,o=e?e.parameter2:NaN;isNaN(g)&&(g=.1),isNaN(o)&&(o=.1);var r=new go.PathFigure(0,0,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,0)),r.add(new go.PathSegment(go.PathSegment.Line,t,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var d=new go.PathFigure(g*t,0,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,g*t,n)),d.add(new go.PathSegment(go.PathSegment.Move,0,o*n)),d.add(new go.PathSegment(go.PathSegment.Line,t,o*n)),a})),go.Shape.defineFigureGenerator("Junction",(function(e,t,n){var a=new go.Geometry,g=1/Math.SQRT2,o=(1-1/Math.SQRT2)/2,r=.5*h,d=.5,i=new go.PathFigure(t,d*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,d*t,n,t,(d+r)*n,(d+r)*t,n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,d*n,(d-r)*t,n,0,(d+r)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,d*t,0,0,(d-r)*n,(d-r)*t,0)),i.add(new go.PathSegment(go.PathSegment.Bezier,t,d*n,(d+r)*t,0,t,(d-r)*n));var m=new go.PathFigure((o+g)*t,(o+g)*n,!1);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Line,o*t,o*n)),m.add(new go.PathSegment(go.PathSegment.Move,o*t,(o+g)*n)),m.add(new go.PathSegment(go.PathSegment.Line,(o+g)*t,o*n)),a})),go.Shape.defineFigureGenerator("LinedDocument",(function(e,t,n){var a=new go.Geometry;n/=.8;var g=new go.PathFigure(0,.7*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close());var o=new go.PathFigure(.1*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.75*n)),a.spot1=new go.Spot(.1,0),a.spot2=new go.Spot(1,.6),a})),go.Shape.defineFigureGenerator("LoopLimit",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("MagneticTape",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=new go.PathFigure(.5*t,n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-g)*t,n,0,(o+g)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0,0,(o-g)*n,(o-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,o*n,(o+g)*t,0,t,(o-g)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.9*n,t,(o+g)*n,(o+g)*t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.15,.15),a.spot2=new go.Spot(.85,.8),a})),go.Shape.defineFigureGenerator("ManualInput",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.25*n).close()),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("MessageFromUser",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.7);var o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,g*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a})),go.Shape.defineFigureGenerator("MicroformProcessing",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.25);var o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,g*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,(1-g)*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("MicroformRecording",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(1,.75),a})),go.Shape.defineFigureGenerator("MultiDocument",(function(e,t,n){var a=new go.Geometry;n/=.8;var g=new go.PathFigure(t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.44*n,.96*t,.47*n,.93*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.54*n,.86*t,.57*n,.83*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.4*t,.4*n,.4*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,0).close());var o=new go.PathFigure(.1*t,.2*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.54*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.44*n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.8,.77),a})),go.Shape.defineFigureGenerator("MultiProcess",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.1*t,.1*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n).close());var o=new go.PathFigure(.2*t,.1*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Move,.1*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.9*n)),a.spot1=new go.Spot(0,.2),a.spot2=new go.Spot(.8,1),a})),go.Shape.defineFigureGenerator("OfflineStorage",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close());var r=new go.PathFigure(.5*g*t,g*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,(1-.5*g)*t,g*n)),a})),go.Shape.defineFigureGenerator("OffPageConnector",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(.75,1),a})),go.Shape.defineFigureGenerator("Or",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=new go.PathFigure(t,o*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,o*t,n,t,(o+g)*n,(o+g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-g)*t,n,0,(o+g)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0,0,(o-g)*n,(o-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,o*n,(o+g)*t,0,t,(o-g)*n));var d=new go.PathFigure(t,.5*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),d.add(new go.PathSegment(go.PathSegment.Move,.5*t,n)),d.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),a})),go.Shape.defineFigureGenerator("PaperTape",(function(e,t,n){var a=new go.Geometry;n/=.8;var g=new go.PathFigure(0,.7*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.3*n,.5*t,.6*n,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close()),a.spot1=new go.Spot(0,.49),a.spot2=new go.Spot(1,.75),a})),go.Shape.defineFigureGenerator("PrimitiveFromCall",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN,o=e?e.parameter2:NaN;isNaN(g)&&(g=.1),isNaN(o)&&(o=.3);var r=new go.PathFigure(0,0,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,0)),r.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("PrimitiveToCall",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN,o=e?e.parameter2:NaN;isNaN(g)&&(g=.1),isNaN(o)&&(o=.3);var r=new go.PathFigure(0,0,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("Procedure",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure((1-g)*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,(1-g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Move,g*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,g*t,n)),a})),go.Shape.defineFigureGenerator("Process",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure(g*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,g*t,n)),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("Sort",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var o=new go.PathFigure(0,.5*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),a.spot1=new go.Spot(.25,.25),a.spot2=new go.Spot(.75,.5),a})),go.Shape.defineFigureGenerator("Start",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.25);var o=new go.PathFigure(g*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*t,.5*n,.25*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*t,.5*n,.25*t,.5*n));var r=new go.PathFigure(g*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,g*t,n)),r.add(new go.PathSegment(go.PathSegment.Move,(1-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,(1-g)*t,n)),a.spot1=new go.Spot(g,0),a.spot2=new go.Spot(1-g,1),a})),go.Shape.defineFigureGenerator("Terminator",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.25*t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*t,.5*n,.25*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*t,.5*n,.25*t,.5*n)),a.spot1=new go.Spot(.23,0),a.spot2=new go.Spot(.77,1),a})),go.Shape.defineFigureGenerator("TransmittalTape",(function(e,t,n){var a=new go.Geometry,g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,(1-g)*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,(1-g)*n).close()),a.spot1=go.Spot.TopLeft,a})),go.Shape.defineFigureGenerator("AndGate",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(.5+g)*t,0,t,(.5-g)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.5+g)*n,(.5+g)*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(.55,1),a})),go.Shape.defineFigureGenerator("Buffer",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("Clock",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=new go.PathFigure(t,o*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,o*t,n,t,(o+g)*n,(o+g)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-g)*t,n,0,(o+g)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0,0,(o-g)*n,(o-g)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,o*n,(o+g)*t,0,t,(o-g)*n));var d=new go.PathFigure(t,o*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t,o*n));var i=new go.PathFigure(.8*t,.75*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.75*n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.75*n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.2*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.2*t,.75*n)),a})),go.Shape.defineFigureGenerator("Ground",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Move,.2*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Move,.3*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Move,.4*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,n)),a})),go.Shape.defineFigureGenerator("Inverter",(function(e,t,n){var a=new go.Geometry,g=.1*h,o=.9,r=.5,d=new go.PathFigure(.8*t,.5*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,0,n)),d.add(new go.PathSegment(go.PathSegment.Line,0,0)),d.add(new go.PathSegment(go.PathSegment.Line,.8*t,.5*n));var i=new go.PathFigure(1*t,r*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,o*t,.6*n,1*t,(r+g)*n,(o+g)*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,r*n,(o-g)*t,.6*n,.8*t,(r+g)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,o*t,.4*n,.8*t,(r-g)*n,(o-g)*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,1*t,r*n,(o+g)*t,.4*n,1*t,(r-g)*n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.4,.75),a})),go.Shape.defineFigureGenerator("NandGate",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.4*h,r=.1*h,d=.9,i=.5,m=new go.PathFigure(.8*t,.5*n,!0);a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,n,.8*t,(.5+o)*n,(.4+g)*t,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,n)),m.add(new go.PathSegment(go.PathSegment.Line,0,0)),m.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),m.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(.4+g)*t,0,.8*t,(.5-o)*n));var S=new go.PathFigure(1*t,i*n,!0);return a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,d*t,.6*n,1*t,(i+r)*n,(d+r)*t,.6*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,i*n,(d-r)*t,.6*n,.8*t,(i+r)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,d*t,.4*n,.8*t,(i-r)*n,(d-r)*t,.4*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,1*t,i*n,(d+r)*t,.4*n,1*t,(i-r)*n)),a.spot1=new go.Spot(0,.05),a.spot2=new go.Spot(.55,.95),a})),go.Shape.defineFigureGenerator("NorGate",(function(e,t,n){var a=new go.Geometry,g=.5,o=h*g,r=0,d=.5,i=new go.PathFigure(.8*t,.5*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.7*t,(d+o)*n,(r+o)*t,(d+g)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.75*n,.25*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(r+o)*t,(d-g)*n,.7*t,(d-o)*n)),g=.1,o=.1*h,r=.9,d=.5;var m=new go.PathFigure((r-g)*t,d*n,!0);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d-g)*n,(r-g)*t,(d-o)*n,(r-o)*t,(d-g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(r+g)*t,d*n,(r+o)*t,(d-g)*n,(r+g)*t,(d-o)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d+g)*n,(r+g)*t,(d+o)*n,(r+o)*t,(d+g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(r-g)*t,d*n,(r-o)*t,(d+g)*n,(r-g)*t,(d+o)*n)),a.spot1=new go.Spot(.2,.25),a.spot2=new go.Spot(.6,.75),a})),go.Shape.defineFigureGenerator("OrGate",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=new go.PathFigure(0,0,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(0+g+g)*t,0*n,.8*t,(o-g)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.8*t,(o+g)*n,(0+g+g)*t,1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.75*n,.25*t,.25*n).close()),a.spot1=new go.Spot(.2,.25),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("XnorGate",(function(e,t,n){var a=new go.Geometry,g=.5,o=h*g,r=.2,d=.5,i=new go.PathFigure(.1*t,0,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,n,.35*t,.25*n,.35*t,.75*n));var m=new go.PathFigure(.8*t,.5*n,!0);a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,n,.7*t,(d+o)*n,(r+o)*t,(d+g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,.45*t,.75*n,.45*t,.25*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(r+o)*t,(d-g)*n,.7*t,(d-o)*n)),g=.1,o=.1*h,r=.9,d=.5;var S=new go.PathFigure((r-g)*t,d*n,!0);return a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d-g)*n,(r-g)*t,(d-o)*n,(r-o)*t,(d-g)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(r+g)*t,d*n,(r+o)*t,(d-g)*n,(r+g)*t,(d-o)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d+g)*n,(r+g)*t,(d+o)*n,(r+o)*t,(d+g)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(r-g)*t,d*n,(r-o)*t,(d+g)*n,(r-g)*t,(d+o)*n)),a.spot1=new go.Spot(.4,.25),a.spot2=new go.Spot(.65,.75),a})),go.Shape.defineFigureGenerator("XorGate",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=new go.PathFigure(.1*t,0,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,n,.35*t,.25*n,.35*t,.75*n));var d=new go.PathFigure(.2*t,0,!0);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(.2+g)*t,0*n,.9*t,(o-g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,n,.9*t,(o+g)*n,(.2+g)*t,1*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,.45*t,.75*n,.45*t,.25*n).close()),a.spot1=new go.Spot(.4,.25),a.spot2=new go.Spot(.8,.75),a})),go.Shape.defineFigureGenerator("Capacitor",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Move,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("Resistor",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.5*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.5*n)),a})),go.Shape.defineFigureGenerator("Inductor",(function(e,t,n){var a=new go.Geometry,g=.1*h,o=.1,r=.1,d=new go.PathFigure((r-.5*g)*t,n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t,0,(r-g)*t,n,(r-o)*t,0)),r=.3,d.add(new go.PathSegment(go.PathSegment.Bezier,r*t,n,(r+o)*t,0,(r+g)*t,n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t,0,(r-g)*t,n,(r-o)*t,0)),r=.5,d.add(new go.PathSegment(go.PathSegment.Bezier,r*t,n,(r+o)*t,0,(r+g)*t,n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t,0,(r-g)*t,n,(r-o)*t,0)),r=.7,d.add(new go.PathSegment(go.PathSegment.Bezier,r*t,n,(r+o)*t,0,(r+g)*t,n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t,0,(r-g)*t,n,(r-o)*t,0)),r=.9,d.add(new go.PathSegment(go.PathSegment.Bezier,(r+.5*g)*t,n,(r+o)*t,0,(r+g)*t,n)),a})),go.Shape.defineFigureGenerator("ACvoltageSource",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=.5,d=new go.PathFigure(0*t,r*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0*n,0*t,(r-g)*n,(o-g)*t,0*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,1*t,r*n,(o+g)*t,0*n,1*t,(r-g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,o*t,1*n,1*t,(r+g)*n,(o+g)*t,1*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0*t,r*n,(o-g)*t,1*n,0*t,(r+g)*n)),d.add(new go.PathSegment(go.PathSegment.Move,.1*t,r*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,r*n,o*t,0*n,o*t,1*n)),a})),go.Shape.defineFigureGenerator("DCvoltageSource",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.75*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),g.add(new go.PathSegment(go.PathSegment.Move,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("Diode",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("Wifi",(function(e,t,n){var a=new go.Geometry,g=.8*h,o=.8,r=0,d=.5,i=(t-(t*=.38))/2,m=(n-(n*=.6))/2,S=new go.PathFigure(r*t+i,(d+o)*n+m,!0);a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,(r-o)*t+i,d*n+m,(r-g)*t+i,(d+o)*n+m,(r-o)*t+i,(d+g)*n+m)),S.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d-o)*n+m,(r-o)*t+i,(d-g)*n+m,(r-g)*t+i,(d-o)*n+m)),S.add(new go.PathSegment(go.PathSegment.Bezier,(r-o+.5*g)*t+i,d*n+m,r*t+i,(d-o)*n+m,(r-o+.5*g)*t+i,(d-g)*n+m)),S.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d+o)*n+m,(r-o+.5*g)*t+i,(d+g)*n+m,r*t+i,(d+o)*n+m).close()),g=.4*h,o=.4,r=.2,d=.5;var P=new go.PathFigure(r*t+i,(d+o)*n+m,!0);a.add(P),P.add(new go.PathSegment(go.PathSegment.Bezier,(r-o)*t+i,d*n+m,(r-g)*t+i,(d+o)*n+m,(r-o)*t+i,(d+g)*n+m)),P.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d-o)*n+m,(r-o)*t+i,(d-g)*n+m,(r-g)*t+i,(d-o)*n+m)),P.add(new go.PathSegment(go.PathSegment.Bezier,(r-o+.5*g)*t+i,d*n+m,r*t+i,(d-o)*n+m,(r-o+.5*g)*t+i,(d-g)*n+m)),P.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d+o)*n+m,(r-o+.5*g)*t+i,(d+g)*n+m,r*t+i,(d+o)*n+m).close()),g=.2*h,o=.2,r=.5,d=.5;var w=new go.PathFigure((r-o)*t+i,d*n+m,!0);a.add(w),w.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d-o)*n+m,(r-o)*t+i,(d-g)*n+m,(r-g)*t+i,(d-o)*n+m)),w.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t+i,d*n+m,(r+g)*t+i,(d-o)*n+m,(r+o)*t+i,(d-g)*n+m)),w.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d+o)*n+m,(r+o)*t+i,(d+g)*n+m,(r+g)*t+i,(d+o)*n+m)),w.add(new go.PathSegment(go.PathSegment.Bezier,(r-o)*t+i,d*n+m,(r-g)*t+i,(d+o)*n+m,(r-o)*t+i,(d+g)*n+m)),g=.4*h,o=.4,r=.8,d=.5;var u=new go.PathFigure(r*t+i,(d-o)*n+m,!0);a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t+i,d*n+m,(r+g)*t+i,(d-o)*n+m,(r+o)*t+i,(d-g)*n+m)),u.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d+o)*n+m,(r+o)*t+i,(d+g)*n+m,(r+g)*t+i,(d+o)*n+m)),u.add(new go.PathSegment(go.PathSegment.Bezier,(r+o-.5*g)*t+i,d*n+m,r*t+i,(d+o)*n+m,(r+o-.5*g)*t+i,(d+g)*n+m)),u.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d-o)*n+m,(r+o-.5*g)*t+i,(d-g)*n+m,r*t+i,(d-o)*n+m).close()),g=.8*h,o=.8,r=1,d=.5;var s=new go.PathFigure(r*t+i,(d-o)*n+m,!0);return a.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,(r+o)*t+i,d*n+m,(r+g)*t+i,(d-o)*n+m,(r+o)*t+i,(d-g)*n+m)),s.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d+o)*n+m,(r+o)*t+i,(d+g)*n+m,(r+g)*t+i,(d+o)*n+m)),s.add(new go.PathSegment(go.PathSegment.Bezier,(r+o-.5*g)*t+i,d*n+m,r*t+i,(d+o)*n+m,(r+o-.5*g)*t+i,(d+g)*n+m)),s.add(new go.PathSegment(go.PathSegment.Bezier,r*t+i,(d-o)*n+m,(r+o-.5*g)*t+i,(d-g)*n+m,r*t+i,(d-o)*n+m).close()),a})),go.Shape.defineFigureGenerator("Email",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Move,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.54*n)),o.add(new go.PathSegment(go.PathSegment.Move,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.54*n)),a})),go.Shape.defineFigureGenerator("Ethernet",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.35*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,0).close());var o=new go.PathFigure(.1*t,n,!0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,n).close());var r=new go.PathFigure(.6*t,n,!0,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,n).close());var d=new go.PathFigure(0,.5*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Move,.5*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),d.add(new go.PathSegment(go.PathSegment.Move,.75*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,.75*t,.6*n)),d.add(new go.PathSegment(go.PathSegment.Move,.25*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,.25*t,.6*n)),a})),go.Shape.defineFigureGenerator("Power",(function(e,t,o){var d=new go.Geometry,i=.4*h,m=.4,S=.5,P=.5,w=a(),u=a(),s=a(),l=a();r(S,P-m,S+i,P-m,S+m,P-i,S+m,P,.5,w,w,u,s,l);var c=n(u.x,u.y),p=new go.PathFigure(u.x*t,u.y*o,!0);d.add(p),p.add(new go.PathSegment(go.PathSegment.Bezier,(S+m)*t,P*o,s.x*t,s.y*o,l.x*t,l.y*o)),p.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+m)*o,(S+m)*t,(P+i)*o,(S+i)*t,(P+m)*o)),p.add(new go.PathSegment(go.PathSegment.Bezier,(S-m)*t,P*o,(S-i)*t,(P+m)*o,(S-m)*t,(P+i)*o)),r(S-m,P,S-m,P-i,S-i,P-m,S,P-m,.5,s,l,u,w,w),p.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*o,s.x*t,s.y*o,l.x*t,l.y*o)),r(S-(m=.3),P,S-m,P-(i=.3*h),S-i,P-m,S,P-m,.5,s,l,u,w,w),p.add(new go.PathSegment(go.PathSegment.Line,u.x*t,u.y*o)),p.add(new go.PathSegment(go.PathSegment.Bezier,(S-m)*t,P*o,l.x*t,l.y*o,s.x*t,s.y*o)),p.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+m)*o,(S-m)*t,(P+i)*o,(S-i)*t,(P+m)*o)),p.add(new go.PathSegment(go.PathSegment.Bezier,(S+m)*t,P*o,(S+i)*t,(P+m)*o,(S+m)*t,(P+i)*o)),r(S,P-m,S+i,P-m,S+m,P-i,S+m,P,.5,w,w,u,s,l),p.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*o,l.x*t,l.y*o,s.x*t,s.y*o).close());p=new go.PathFigure(.45*t,0,!0);return d.add(p),p.add(new go.PathSegment(go.PathSegment.Line,.45*t,.5*o)),p.add(new go.PathSegment(go.PathSegment.Line,.55*t,.5*o)),p.add(new go.PathSegment(go.PathSegment.Line,.55*t,0).close()),g(w),g(u),g(s),g(l),g(c),d.spot1=new go.Spot(.25,.45),d.spot2=new go.Spot(.75,.8),d})),go.Shape.defineFigureGenerator("Fallout",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n/2,!0);function o(e,a,g){e.add(new go.PathSegment(go.PathSegment.Move,(.3+a)*t,(.8+g)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.5+a)*t,(.5+g)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.1+a)*t,(.5+g)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.3+a)*t,(.8+g)*n).close())}return a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,180,360,t/2,n/2,t/2,n/2)),o(g,0,0),o(g,.4,0),o(g,.2,-.3),a})),go.Shape.defineFigureGenerator("IrritationHazard",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.2*t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close()),a.spot1=new go.Spot(.3,.3),a.spot2=new go.Spot(.7,.7),a})),go.Shape.defineFigureGenerator("ElectricalHazard",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.37*t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.11*n)),g.add(new go.PathSegment(go.PathSegment.Line,.77*t,.04*n)),g.add(new go.PathSegment(go.PathSegment.Line,.33*t,.49*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.37*n)),g.add(new go.PathSegment(go.PathSegment.Line,.63*t,.86*n)),g.add(new go.PathSegment(go.PathSegment.Line,.77*t,.91*n)),g.add(new go.PathSegment(go.PathSegment.Line,.34*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.34*t,.78*n)),g.add(new go.PathSegment(go.PathSegment.Line,.44*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.56*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.68*n).close()),a})),go.Shape.defineFigureGenerator("FireHazard",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.1*t,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.29*t,0,-.25*t,.63*n,.45*t,.44*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.51*t,.42*n,.48*t,.17*n,.54*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.59*t,.18*n,.59*t,.29*n,.58*t,.28*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,.6*n,.8*t,.34*n,.88*t,.43*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.88*t,.31*n,.87*t,.48*n,.88*t,.43*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,n,1.17*t,.76*n,.82*t,.8*n).close()),a.spot1=new go.Spot(.07,.445),a.spot2=new go.Spot(.884,.958),a})),go.Shape.defineFigureGenerator("BpmnActivityLoop",(function(e,t,n){var a=new go.Geometry,g=.5,o=g*h,r=.4*Math.SQRT2/2+.5,d=.5-.5*Math.SQRT2/2,i=new go.PathFigure(r*t,(1-d)*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,1*t,.5*n,1*t,.7*n,1*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0*n,1*t,(.5-o+0)*n,(.5+o+0)*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0*t,.5*n,(.5-o+0)*t,0*n,0*t,(.5-o+0)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.35*t,.9*n,0*t,(.5+o+0)*n,(.5-o+0)*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Move,.25*t,.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,.35*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.2*t,.95*n)),a})),go.Shape.defineFigureGenerator("BpmnActivityParallel",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("BpmnActivitySequential",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Move,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);a.add(g);var o=new go.PathFigure(t,n,!1);a.add(o);var r=new go.PathFigure(0,.5*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.5*n,.2*t,.35*n,.3*t,.35*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.7*t,.65*n,.8*t,.65*n)),a})),go.Shape.defineFigureGenerator("BpmnActivityCompensation",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.5*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close()),a})),go.Shape.defineFigureGenerator("BpmnTaskMessage",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.2*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n).close());g=new go.PathFigure(0,.2*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),a})),go.Shape.defineFigureGenerator("BpmnTaskScript",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.7*t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,0,.6*t,.5*n,0,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,n,.4*t,.5*n,t,.5*n).close());var o=new go.PathFigure(.45*t,.73*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.73*n)),o.add(new go.PathSegment(go.PathSegment.Move,.38*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.63*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Move,.31*t,.27*n)),o.add(new go.PathSegment(go.PathSegment.Line,.56*t,.27*n)),a})),go.Shape.defineFigureGenerator("BpmnTaskUser",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);a.add(g);var o=new go.PathFigure(.335*t,(1-.555)*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.335*t,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*t,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*t,(1-.555)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.68*n,.88*t,.46*n,.98*t,.54*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.68*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.335*t,(1-.555)*n,.02*t,.54*n,.12*t,.46*n)),o.add(new go.PathSegment(go.PathSegment.Line,.365*t,.405*n));var r=.5-.285,d=.5,i=r,h=Math.PI/4,m=4*(1-Math.cos(h))/(3*Math.sin(h)),S=r,P=r,w=m*S,u=m*P;o.add(new go.PathSegment(go.PathSegment.Bezier,.285*t,i*n,(d-(w+S)/2)*t,(i+(P+u)/2)*n,.285*t,(i+u)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,d*t,0*n,.285*t,(i-u)*n,(d-w)*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(d+S)*t,i*n,(d+w)*t,0*n,(d+S)*t,(i-u)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.635*t,.405*n,(d+S)*t,(i+u)*n,(d+(w+S)/2)*t,(i+(P+u)/2)*n)),o.add(new go.PathSegment(go.PathSegment.Line,.635*t,.405*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*t,(1-.555)*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*t,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.335*t,.595*n));var s=new go.PathFigure(.2*t,n,!1);a.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.2*t,.8*n));var l=new go.PathFigure(.8*t,n,!1);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.8*t,.8*n)),a})),go.Shape.defineFigureGenerator("BpmnEventConditional",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.1*t,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,n).close());var o=new go.PathFigure(.2*t,.2*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.8*n)),a})),go.Shape.defineFigureGenerator("BpmnEventError",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.33*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.33*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("BpmnEventEscalation",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);a.add(g);var o=new go.PathFigure(t,n,!1);a.add(o);var r=new go.PathFigure(.1*t,n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),r.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("Caution",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.05*t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,.8*n,0,n,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.1*n,.5*t,0,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.95*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,n,t,n,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.05*t,n));var o=.05;return g.add(new go.PathSegment(go.PathSegment.Move,.45*t,.875*n)),g.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*t,.875*n,o*t,o*n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.325*n,.575*t,.725*n,.625*t,.375*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.75*n,.375*t,.375*n,.425*t,.725*n)),a})),go.Shape.defineFigureGenerator("Recycle",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.45*t,.95*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.185*t,.85*n,.17*t,.95*n,.15*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.235*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.625*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,.275*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.05*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.05*t,.575*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.1875*t,.95*n,0,.675*n,0,.7*n)),g.add(new go.PathSegment(go.PathSegment.Move,.45*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.775*n)),g.add(new go.PathSegment(go.PathSegment.Line,.22*t,.775*n));var o=new go.PathFigure(.475*t,.2*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.225*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*t,.175*n)),o.add(new go.PathSegment(go.PathSegment.Line,.325*t,.05*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,.05*n,.35*t,0,.375*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.575*t,.375*n)),o.add(new go.PathSegment(go.PathSegment.Line,.525*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.475*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,.315*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.05*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.575*t,0,.65*t,.05*n,.625*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.38*t,.0105*n));var r=new go.PathFigure(.675*t,.575*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.875*t,.525*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,.775*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.85*t,.95*n,t,.8*n,t,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*t,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*t,.725*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*t,.775*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*t,.775*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,.775*n)),r.add(new go.PathSegment(go.PathSegment.Move,.675*t,.575*n)),r.add(new go.PathSegment(go.PathSegment.Line,.775*t,.775*n)),a})),go.Shape.defineFigureGenerator("BpmnEventTimer",(function(e,t,n){var a=new go.Geometry,g=.5,o=.5*h,r=new go.PathFigure(t,g*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,g*t,n,t,(g+o)*n,(g+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,g*n,(g-o)*t,n,0,(g+o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,g*t,0,0,(g-o)*n,(g-o)*t,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,g*n,(g+o)*t,0,t,(g-o)*n));var d=new go.PathFigure(g*t,0,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,g*t,.15*n)),d.add(new go.PathSegment(go.PathSegment.Move,g*t,n)),d.add(new go.PathSegment(go.PathSegment.Line,g*t,.85*n)),d.add(new go.PathSegment(go.PathSegment.Move,0,g*n)),d.add(new go.PathSegment(go.PathSegment.Line,.15*t,g*n)),d.add(new go.PathSegment(go.PathSegment.Move,t,g*n)),d.add(new go.PathSegment(go.PathSegment.Line,.85*t,g*n)),d.add(new go.PathSegment(go.PathSegment.Move,g*t,g*n)),d.add(new go.PathSegment(go.PathSegment.Line,.58*t,.1*n)),d.add(new go.PathSegment(go.PathSegment.Move,g*t,g*n)),d.add(new go.PathSegment(go.PathSegment.Line,.78*t,.54*n)),a})),go.Shape.defineFigureGenerator("Package",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.15*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(0,.15*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.15*n).close()),a.spot1=new go.Spot(0,.1),a.spot2=new go.Spot(1,1),a})),go.Shape.defineFigureGenerator("Class",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,.2*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n).close());var r=new go.PathFigure(0,.5*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,.5*n).close()),a})),go.Shape.defineFigureGenerator("Component",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n).close());var o=new go.PathFigure(0,.2*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close());var r=new go.PathFigure(0,.6*n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.45*t,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*t,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.6*n).close()),a})),go.Shape.defineFigureGenerator("Boat Shipment",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.15*t,.6*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n));var o=new go.PathFigure(.15*t,.6*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),a})),go.Shape.defineFigureGenerator("Customer/Supplier",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,.33*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.33*t,.33*n)),g.add(new go.PathSegment(go.PathSegment.Line,.33*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a})),go.Shape.defineFigureGenerator("Workcell",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("Supermarket",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.33*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),g.add(new go.PathSegment(go.PathSegment.Move,t,.33*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.66*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.66*n)),g.add(new go.PathSegment(go.PathSegment.Move,t,.66*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),a})),go.Shape.defineFigureGenerator("TruckShipment",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(t,.8*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.8*n).close());var r=.1,d=.1*h,i=.2,m=.9,S=new go.PathFigure((i-r)*t,m*n,!0);a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-r)*n,(i-r)*t,(m-d)*n,(i-d)*t,(m-r)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(i+r)*t,m*n,(i+d)*t,(m-r)*n,(i+r)*t,(m-d)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m+r)*n,(i+r)*t,(m+d)*n,(i+d)*t,(m+r)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(i-r)*t,m*n,(i-d)*t,(m+r)*n,(i-r)*t,(m+d)*n).close()),r=.1,d=.1*h,i=.8,m=.9;var P=new go.PathFigure((i-r)*t,m*n,!0);return a.add(P),P.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m-r)*n,(i-r)*t,(m-d)*n,(i-d)*t,(m-r)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(i+r)*t,m*n,(i+d)*t,(m-r)*n,(i+r)*t,(m-d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,i*t,(m+r)*n,(i+r)*t,(m+d)*n,(i+d)*t,(m+r)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(i-r)*t,m*n,(i-d)*t,(m+r)*n,(i-r)*t,(m+d)*n).close()),a})),go.Shape.defineFigureGenerator("KanbanPost",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.2*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),a})),go.Shape.defineFigureGenerator("Forklift",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,0));var o=new go.PathFigure(0,.5*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var r=new go.PathFigure(.5*t,.8*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,.8*n));var d=new go.PathFigure(.5*t,.7*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t,.7*n));var i=.1,m=.1*h,S=.1,P=.9,w=new go.PathFigure((S-i)*t,P*n,!0);a.add(w),w.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P-i)*n,(S-i)*t,(P-m)*n,(S-m)*t,(P-i)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,(S+i)*t,P*n,(S+m)*t,(P-i)*n,(S+i)*t,(P-m)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+i)*n,(S+i)*t,(P+m)*n,(S+m)*t,(P+i)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,(S-i)*t,P*n,(S-m)*t,(P+i)*n,(S-i)*t,(P+m)*n)),i=.1,m=.1*h,S=.4,P=.9;var u=new go.PathFigure((S-i)*t,P*n,!0);return a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P-i)*n,(S-i)*t,(P-m)*n,(S-m)*t,(P-i)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(S+i)*t,P*n,(S+m)*t,(P-i)*n,(S+i)*t,(P-m)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,S*t,(P+i)*n,(S+i)*t,(P+m)*n,(S+m)*t,(P+i)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(S-i)*t,P*n,(S-m)*t,(P+i)*n,(S-i)*t,(P+m)*n)),a})),go.Shape.defineFigureGenerator("RailShipment",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.1*t,.4*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.4*n).close());var o=new go.PathFigure(.45*t,.7*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.7*n));var r=new go.PathFigure(.55*t,.4*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,.4*n).close());var d=.05,i=.05*h,m=.175,S=.95,P=new go.PathFigure((m-d)*t,S*n,!0);a.add(P),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-d)*n,(m-d)*t,(S-i)*n,(m-i)*t,(S-d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m+d)*t,S*n,(m+i)*t,(S-d)*n,(m+d)*t,(S-i)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+d)*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m-d)*t,S*n,(m-i)*t,(S+d)*n,(m-d)*t,(S+i)*n));d=.05,i=.05*h,m=.375,S=.95;var w=new go.PathFigure((m-d)*t,S*n,!0);a.add(w),w.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-d)*n,(m-d)*t,(S-i)*n,(m-i)*t,(S-d)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,(m+d)*t,S*n,(m+i)*t,(S-d)*n,(m+d)*t,(S-i)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+d)*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),w.add(new go.PathSegment(go.PathSegment.Bezier,(m-d)*t,S*n,(m-i)*t,(S+d)*n,(m-d)*t,(S+i)*n));d=.05,i=.05*h,m=.625,S=.95;var u=new go.PathFigure((m-d)*t,S*n,!0);a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-d)*n,(m-d)*t,(S-i)*n,(m-i)*t,(S-d)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(m+d)*t,S*n,(m+i)*t,(S-d)*n,(m+d)*t,(S-i)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+d)*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(m-d)*t,S*n,(m-i)*t,(S+d)*n,(m-d)*t,(S+i)*n));d=.05,i=.05*h,m=.825,S=.95;var s=new go.PathFigure((m-d)*t,S*n,!0);a.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S-d)*n,(m-d)*t,(S-i)*n,(m-i)*t,(S-d)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,(m+d)*t,S*n,(m+i)*t,(S-d)*n,(m+d)*t,(S-i)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+d)*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,(m-d)*t,S*n,(m-i)*t,(S+d)*n,(m-d)*t,(S+i)*n).close());var l=new go.PathFigure(0,n,!1);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a})),go.Shape.defineFigureGenerator("Warehouse",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,.2*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n).close());var r=new go.PathFigure(.15*t,n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.15*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*t,n).close());var d=.05,i=.05*h,m=.35,S=.775,P=new go.PathFigure(.3*t,S*n,!0);return a.add(P),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,.725*n,.3*t,(S-i)*n,(m-i)*t,.725*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,(m+d)*t,S*n,(m+i)*t,.725*n,(m+d)*t,(S-i)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,m*t,(S+d)*n,(m+d)*t,(S+i)*n,(m+i)*t,(S+d)*n)),P.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,S*n,(m-i)*t,(S+d)*n,.3*t,(S+i)*n).close()),a})),go.Shape.defineFigureGenerator("ControlCenter",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Move,.1*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n).close()),a})),go.Shape.defineFigureGenerator("Bluetooth",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.75*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),a})),go.Shape.defineFigureGenerator("Bookmark",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Move,.2*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),a})),go.Shape.defineFigureGenerator("Bookmark",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,0,0)),g.add(new go.PathSegment(go.PathSegment.Move,.2*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),a})),go.Shape.defineFigureGenerator("Globe",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.75*t,0,t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,.75*n,.75*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.25*t,n,0,.75*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,.25*n,.25*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,.15*t,.25*n,.15*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.85*t,.75*n,.85*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Move,.1675*t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.8325*t,.15*n,.35*t,.3*n,.65*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Move,.1675*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.8325*t,.85*n,.35*t,.7*n,.65*t,.7*n)),a})),go.Shape.defineFigureGenerator("Wave",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.25*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.25*n,.1*t,0,.2*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,.25*n,.425*t,.5*n,.575*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.25*n,.8*t,0,.9*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.75*n,.1*t,.5*n,.2*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,.75*n,.425*t,n,.575*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.75*n,.8*t,.5*n,.9*t,.5*n)),a})),go.Shape.defineFigureGenerator("Operator",(function(e,t,n){var a=new go.Geometry,g=.3,o=.3*h,r=.5,d=.7,i=new go.PathFigure(.2*t,d*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d-g)*n,.2*t,(d-o)*n,(r-o)*t,(d-g)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,d*n,(r+o)*t,(d-g)*n,.8*t,(d-o)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,r*t,1*n,.8*t,(d+o)*n,(r+o)*t,1*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,d*n,(r-o)*t,1*n,.2*t,(d+o)*n));var m=new go.PathFigure(0,.7*n,!1);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,t,.7*n,0,0,t,0)),a})),go.Shape.defineFigureGenerator("TripleFanBlades",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.65*t,.3*n,.65*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.35*t,.5*n,.35*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.3*t,.6*n,.1*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.2*t,n,.35*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,n,.7*t,.6*n,.9*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.8*t,n,.65*t,.95*n)),a})),go.Shape.defineFigureGenerator("CentrifugalPump",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(t,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,0,.075*n,0,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,n,0,n,.4*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.4*n,.8*t,n,.85*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),a})),go.Shape.defineFigureGenerator("Battery",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Move,.4*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.1*n));var o=new go.PathFigure(0,.6*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Move,0,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),a})),go.Shape.defineFigureGenerator("Delete",(function(e,t,n){var a=new go.Geometry,g=.5*h,o=.5,r=.5,d=new go.PathFigure(0*t,r*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0*n,0*t,(r-g)*n,(o-g)*t,0*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,1*t,r*n,(o+g)*t,0*n,1*t,(r-g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,o*t,1*n,1*t,(r+g)*n,(o+g)*t,1*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0*t,r*n,(o-g)*t,1*n,0*t,(r+g)*n));var i=new go.PathFigure(.15*t,.5*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.85*t,.5*n)),a})),go.Shape.defineFigureGenerator("Flag",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.1*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Move,0,.1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.1*n,.15*t,0,.35*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,.65*t,.2*n,.85*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.5*n,.85*t,.6*n,.65*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.35*t,.4*n,.15*t,.4*n).close()),a})),go.Shape.defineFigureGenerator("Help",(function(e,t,n){var a=new go.Geometry,g=.5,o=.5*h,r=.5,d=.5,i=new go.PathFigure((r-g)*t,d*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d-g)*n,(r-g)*t,(d-o)*n,(r-o)*t,(d-g)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(r+g)*t,d*n,(r+o)*t,(d-g)*n,(r+g)*t,(d-o)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d+g)*n,(r+g)*t,(d+o)*n,(r+o)*t,(d+g)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(r-g)*t,d*n,(r-o)*t,(d+g)*n,(r-g)*t,(d+o)*n).close()),g=.05,o=.05*h,r=.5,d=.8;var m=new go.PathFigure((r-g)*t,d*n,!1);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d-g)*n,(r-g)*t,(d-o)*n,(r-o)*t,(d-g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(r+g)*t,d*n,(r+o)*t,(d-g)*n,(r+g)*t,(d-o)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,r*t,(d+g)*n,(r+g)*t,(d+o)*n,(r+o)*t,(d+g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(r-g)*t,d*n,(r-o)*t,(d+g)*n,(r-g)*t,(d+o)*n).close()),m.add(new go.PathSegment(go.PathSegment.Move,.5*t,.7*n)),m.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,.75*t,.475*n,.75*t,.225*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.35*n,.4*t,.2*n,.3*t,.25*n)),a})),go.Shape.defineFigureGenerator("Location",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,n,!0).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.975*t,.025*n,.5*t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*t,.5*n,.5*t,0,.025*t,.025*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*t,.2*n)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*t,.3*n,.1*t,.1*n).close()))})),go.Shape.defineFigureGenerator("Lock",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.5*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var o=new go.PathFigure(.2*t,.5*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.3*n,.25*t,0,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.3*n)),a})),go.Shape.defineFigureGenerator("Unlocked",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.5*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var o=new go.PathFigure(.2*t,.5*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.3*n,.25*t,0,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.35*n)),a})),go.Shape.defineFigureGenerator("Gear",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.9375*t,.56246875*n,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.80621875*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.763*t,.3316875*n,.79840625*t,.39915625*n,.7834375*t,.3635*n)).add(new go.PathSegment(go.PathSegment.Line,.8566875*t,.23796875*n)).add(new go.PathSegment(go.PathSegment.Line,.76825*t,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.67596875*t,.24184375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*t,.19378125*n,.64228125*t,.2188125*n,.603875*t,.2021875*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*t,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*t,.19378125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*t,.239375*n,.39759375*t,.20190625*n,.36053125*t,.2176875*n)).add(new go.PathSegment(go.PathSegment.Line,.2379375*t,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.14953125*t,.2379375*n)).add(new go.PathSegment(go.PathSegment.Line,.23934375*t,.3278125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*t,.4375*n,.21765625*t,.36059375*n,.201875*t,.397625*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*t,.5625*n)).add(new go.PathSegment(go.PathSegment.Line,.1938125*t,.5625*n)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*t,.67596875*n,.20221875*t,.603875*n,.21884375*t,.64228125*n)).add(new go.PathSegment(go.PathSegment.Line,.1495625*t,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.238*t,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.3316875*t,.76296875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*t,.80621875*n,.36353125*t,.78340625*n,.3991875*t,.79840625*n)).add(new go.PathSegment(go.PathSegment.Line,.43753125*t,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.80621875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*t,.760625*n,.602375*t,.79809375*n,.63946875*t,.78234375*n)).add(new go.PathSegment(go.PathSegment.Line,.76828125*t,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.85671875*t,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.76065625*t,.67221875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*t,.56246875*n,.78234375*t,.63940625*n,.798125*t,.602375*n)).add(new go.PathSegment(go.PathSegment.Line,.9375*t,.56246875*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*t,.6*n)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*t,.5*n,.1*t,.1*n).close()))})),go.Shape.defineFigureGenerator("Hand",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.5*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,.3*n,0,.375*n,.05*t,.325*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.45*t,.075*n,.3*t,.225*n,.4*t,.175*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.525*t,.075*n,.46*t,.05*n,.525*t,.05*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.4*n,.525*t,.275*n,.475*t,.325*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.55*n,t,.4*n,t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.425*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.7*n,.675*t,.55*n,.675*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,.575*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.575*t,.85*n,.65*t,.7*n,.65*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.525*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.535*t,n,.61*t,.85*n,.61*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,.435*t,n,0,n).close()),a})),go.Shape.defineFigureGenerator("Map",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,.2*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),g.add(new go.PathSegment(go.PathSegment.Move,.25*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Move,.5*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,.75*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.8*n)),a})),go.Shape.defineFigureGenerator("Eject",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.7*n).close());var o=new go.PathFigure(0,.6*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0).close()),a})),go.Shape.defineFigureGenerator("Pencil",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)).add(new go.PathSegment(go.PathSegment.Line,t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,n)).add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n).close()))})),go.Shape.defineFigureGenerator("Building",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(1*t,1*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.046*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.046*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,.046*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.954*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.954*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.954*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.85*n).close());var o=new go.PathFigure(.126*t,.85*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.126*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.322*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.322*t,.85*n).close());var r=new go.PathFigure(.402*t,.85*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.402*t,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.598*t,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.598*t,.85*n).close());var d=new go.PathFigure(.678*t,.85*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.678*t,.45*n)),d.add(new go.PathSegment(go.PathSegment.Line,.874*t,.45*n)),d.add(new go.PathSegment(go.PathSegment.Line,.874*t,.85*n).close());var i=new go.PathFigure(.5*t,.1*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.196*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,.804*t,.3*n).close()),a})),go.Shape.defineFigureGenerator("Staircase",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,1*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.15*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.95*n).close()),a})),go.Shape.defineFigureGenerator("5Bars",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,1*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.184*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.184*t,n*(1-.184)).close());var o=new go.PathFigure(.204*t,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.204*t,n*(1-.184))),o.add(new go.PathSegment(go.PathSegment.Line,.388*t,.632*n)),o.add(new go.PathSegment(go.PathSegment.Line,.388*t,1*n).close());var r=new go.PathFigure(.408*t,n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.408*t,.632*n)),r.add(new go.PathSegment(go.PathSegment.Line,.592*t,n*(1-.552))),r.add(new go.PathSegment(go.PathSegment.Line,.592*t,1*n).close());var d=new go.PathFigure(.612*t,n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.612*t,n*(1-.552))),d.add(new go.PathSegment(go.PathSegment.Line,.796*t,.264*n)),d.add(new go.PathSegment(go.PathSegment.Line,.796*t,1*n).close());var i=new go.PathFigure(.816*t,n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.816*t,.264*n)),i.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-.184*5))),i.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n).close()),a})),go.Shape.defineFigureGenerator("PC",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,0).close());var o=new go.PathFigure(.055*t,.07*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.245*t,.07*n)),o.add(new go.PathSegment(go.PathSegment.Line,.245*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.055*t,.1*n).close());var r=new go.PathFigure(.055*t,.13*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.245*t,.13*n)),r.add(new go.PathSegment(go.PathSegment.Line,.245*t,.16*n)),r.add(new go.PathSegment(go.PathSegment.Line,.055*t,.16*n).close());var d=new go.PathFigure(.055*t,.18*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.245*t,.18*n)),d.add(new go.PathSegment(go.PathSegment.Line,.245*t,.21*n)),d.add(new go.PathSegment(go.PathSegment.Line,.055*t,.21*n).close());var i=new go.PathFigure(1*t,0,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.65*n)),i.add(new go.PathSegment(go.PathSegment.Line,1*t,.65*n).close()),a})),go.Shape.defineFigureGenerator("Plane",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.55*t,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.7*n)),g.add(new go.PathSegment(go.PathSegment.Line,.1*t,.475*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.35*t,.525*n,0,.4*n,.225*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.475*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.325*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.325*n)),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.2*n,.975*t,0,t,.08*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,n).close()),a})),go.Shape.defineFigureGenerator("Key",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(1*t,.5*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.2*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,.575*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n).close()),g.add(new go.PathSegment(go.PathSegment.Move,.17*t,.425*n)),g.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*t,.5*n,.075*t,.075*n).close()),a})),go.Shape.defineFigureGenerator("FilmTape",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0,0,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,270,180,0*t,.3*t,.055*t)),g.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.08*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.08*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.136*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.136*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.192*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.192*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.248*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.248*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.304*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.304*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.28),.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.28),1*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.336),1*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.336),.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.392),.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.392),1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.528*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.528*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.584*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.584*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.64*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.64*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.696*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.696*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.752*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.752*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.728),.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.728),1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.864*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.864*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.84),.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.84),1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n));var o=new go.PathFigure(0,0,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,1*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Arc,270,-180,1*t,.3*t,.055*t)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n));var r=new go.PathFigure(.11*t,.1*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.35133333*t,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35133333*t,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.11*t,.8*n).close());var d=new go.PathFigure(.37933333*t,.1*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.62066666*t,.1*n)),d.add(new go.PathSegment(go.PathSegment.Line,.62066666*t,.8*n)),d.add(new go.PathSegment(go.PathSegment.Line,.37933333*t,.8*n).close());var i=new go.PathFigure(t*(.59266666+.056),.1*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t*(.83399999+.056),.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,t*(.83399999+.056),.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,t*(.59266666+.056),.8*n).close()),a})),go.Shape.defineFigureGenerator("FloppyDisk",(function(e,t,n){var a=new go.Geometry,g=8*h,o=new go.PathFigure(8,0,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.86*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.14*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n-8)),o.add(new go.PathSegment(go.PathSegment.Bezier,t-8,n,t,n-g,t-g,n)),o.add(new go.PathSegment(go.PathSegment.Line,8,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,n-8,g,n,0,n-g)),o.add(new go.PathSegment(go.PathSegment.Line,0,8)),o.add(new go.PathSegment(go.PathSegment.Bezier,8,0,0,g,g,0).close());var r=new go.PathFigure(.83*t,0,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.83*t,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,.17*t,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,.17*t,0*n).close());var d=new go.PathFigure(.83*t,1*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.83*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,.17*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,.17*t,1*n).close());var i=new go.PathFigure(.78*t,.05*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.66*t,.05*n)),i.add(new go.PathSegment(go.PathSegment.Line,.66*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.78*t,.25*n).close()),a})),go.Shape.defineFigureGenerator("SpeechBubble",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=15),a=Math.min(a,t/3);var g=(a=Math.min(a,n/3))*h,o=.8*n,r=new go.Geometry,d=new go.PathFigure(a,0,!0);return r.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t-a,0)),d.add(new go.PathSegment(go.PathSegment.Bezier,t,a,t-g,0,t,g)),d.add(new go.PathSegment(go.PathSegment.Line,t,o-a)),d.add(new go.PathSegment(go.PathSegment.Bezier,t-a,o,t,o-g,t-g,o)),d.add(new go.PathSegment(go.PathSegment.Line,.7*t,o)),d.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),d.add(new go.PathSegment(go.PathSegment.Line,.55*t,o)),d.add(new go.PathSegment(go.PathSegment.Line,a,o)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,o-a,g,o,0,o-g)),d.add(new go.PathSegment(go.PathSegment.Line,0,a)),d.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,g,g,0).close()),g>1?(r.spot1=new go.Spot(0,0,g,g),r.spot2=new go.Spot(1,.8,-g,-g)):(r.spot1=go.Spot.TopLeft,r.spot2=new go.Spot(1,.8)),r})),go.Shape.defineFigureGenerator("Repeat",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0*t,.45*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,.45*n).close());var o=new go.PathFigure(1*t,.55*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.55*n).close()),a})),go.Shape.defineFigureGenerator("Windows",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()).add(new go.PathSegment(go.PathSegment.Move,.4*t,.4*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n).close()).add(new go.PathSegment(go.PathSegment.Move,.2*t,.1*n)).add(new go.PathSegment(go.PathSegment.Line,.2*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.1*n).close()).add(new go.PathSegment(go.PathSegment.Move,.1*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.1*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n).close()))})),go.Shape.defineFigureGenerator("Terminal",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0*t,.1*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,0*t,.9*n).close());var o=new go.PathFigure(.1*t,.2*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.22*t,.285*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.37*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*t,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*t,.25*n).close());var r=new go.PathFigure(.28*t,.37*n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.45*t,.37*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*t,.41*n)),r.add(new go.PathSegment(go.PathSegment.Line,.28*t,.41*n).close()),a})),go.Shape.defineFigureGenerator("Beaker",(function(e,t,n){var a=new go.Geometry,g=15*h,o=new go.PathFigure(.62*t,.475*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n-15)),o.add(new go.PathSegment(go.PathSegment.Bezier,t-15,n,t,n-g,t-g,n)),o.add(new go.PathSegment(go.PathSegment.Line,15,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,n-15,g,n,0,n-g)),o.add(new go.PathSegment(go.PathSegment.Line,.38*t,.475*n)),o.add(new go.PathSegment(go.PathSegment.Line,.38*t,.03*n)),o.add(new go.PathSegment(go.PathSegment.Line,.36*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.62*t,.03*n).close()),g>1?(a.spot1=new go.Spot(0,0,g,g),a.spot2=new go.Spot(1,1,-g,-g)):(a.spot1=go.Spot.TopLeft,a.spot2=go.Spot.BottomRight),a})),go.Shape.defineFigureGenerator("Download",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0*t,1*n,!0);a.add(g);var o=.1/.3;g.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-o)).close());var r=new go.PathFigure(.4*t,0*n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.4*t,.44*n)),r.add(new go.PathSegment(go.PathSegment.Line,.26*t,.44*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,.66*n)),r.add(new go.PathSegment(go.PathSegment.Line,.74*t,.44*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,.44*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,0*n).close()),a})),go.Shape.defineFigureGenerator("Bin",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0*t,1*n,!0);a.add(g);var o=.1/.3;return g.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-o)).close()),a})),go.Shape.defineFigureGenerator("Upload",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(0*t,1*n,!0);a.add(g);var o=.1/.3;g.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-o))),g.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),g.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-o)).close());var r=new go.PathFigure(.5*t,0*n,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.26*t,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*t,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*t,.63*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,.63*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*t,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.74*t,.25*n).close()),a})),go.Shape.defineFigureGenerator("EmptyDrink",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.15*t,0*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n).close()),a})),go.Shape.defineFigureGenerator("Drink",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.15*t,0*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.85*t,0*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n).close());var o=new go.PathFigure(.235*t,.28*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.765*t,.28*n)),o.add(new go.PathSegment(go.PathSegment.Line,.655*t,.97*n)),o.add(new go.PathSegment(go.PathSegment.Line,.345*t,.97*n).close()),a})),go.Shape.defineFigureGenerator("4Arrows",(function(e,t,n){var a=new go.Geometry,g=new go.PathFigure(.5*t,0*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,1*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,.75*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.75*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.55*n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.65*n)),g.add(new go.PathSegment(go.PathSegment.Line,0*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Line,.25*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35*t,.25*n).close()),a})),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},47503:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},t="5.0",n={},a=null,g=!1,o=!1,r=null,d=!1,i=null,h=null,m=0;m<arguments.length;m++){var S=arguments[m];if(null!==S)switch(_typeof(S)){case"number":t=S.toFixed(1);break;case"string":S.match(new RegExp("^[0-9]\\.[0-9]+$"))?t=S:r=S;break;case"object":void 0!==S.is3D?a=S:n=S;break;case"boolean":g=S,o=!0}}null===a&&(a={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===n.material_id||o||(g=!0)),null!==r&&void 0===n.id&&(n.id=r);var P="",w=!1,u=null,s=null,l=null,c=!1,p=null,f=null,L=null;void 0!==n.height&&(n.height=Math.round(n.height)),void 0!==n.width&&(n.width=Math.round(n.width));var v=function(e){return parseFloat(e)>4?parseFloat(e):5};function y(){try{return window.self!==window.top}catch(e){return!0}}function F(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){h=e,j(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(i=e,E(e,t))},e.getHTML5CodebaseVersion=function(){return s},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){L=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var a,g="auto",o=n.id,r=!1,i=0;i<arguments.length;i++){var h=arguments[i];"string"==typeof h?(h=h.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?g=h:o=arguments[i]:"boolean"==typeof h?r=h:h instanceof HTMLElement&&(a=h)}function m(){if(d){g=C(g);var i=a||document.getElementById(o);if(i)if(e.removeExistingApplet(i,!1),void 0===n.width&&i.clientWidth&&(n.width=i.clientWidth),void 0===n.height&&i.clientHeight&&(n.height=i.clientHeight),n.width&&n.height||"html5"!==g||(delete n.width,delete n.height),u=g,"screenshot"===g)N(i,n);else{var h=!1;n.hasOwnProperty("playButton")&&n.playButton||n.hasOwnProperty("clickToLoad")&&n.clickToLoad?h=!0:n.hasOwnProperty("playButtonAutoDecide")&&n.playButtonAutoDecide&&(h=(!y()||t())&&F()),h?(u="screenshot",_(i,n,r,g)):z(i,n,r)}else console.log("possibly bug on ajax loading? ")}else setTimeout(m,200)}m()},e.getViews=function(){return a},e.isJavaInstalled=function(){return!1};var G=function(t){var g=function(){n.onError&&n.onError(),O("Error: Fetching material (id "+n.material_id+") failed.",n)},o=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",r="/materials/"+n.material_id+"?scope=basic";b("https://"+o+"/api/proxy.php?path="+encodeURIComponent(r),(function(o){var r=JSON.parse(o),d=r.elements?r.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:r;if(d&&d.url){n.fileName=d.url,B(d.settings||{}),a.is3D=!0;var i="https://www.geogebra.org/images/";e.setPreviewImage(p||d.previewUrl,i+"GeoGebra_loading.png",i+"applet_play.png"),t()}else g()}),g)};function B(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(t){e[t]=!!e[t]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(t){void 0===n[t]&&void 0!==e[t]&&(n[t]=e[t])})),void 0===n.showToolBarHelp&&(n.showToolBarHelp=n.showToolBar)}function b(e,t,n){var a=new XMLHttpRequest;a.open("GET",e),a.onload=function(){t(a.responseText)},a.onerror=n,a.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return u},e.setPreviewImage=function(e,t,n){p=e,f=t,n},e.removeExistingApplet=function(e,t){var a;"string"==typeof e&&(e=document.getElementById(e)),u=null;var g=null;for(a=0;a<e.childNodes.length;a++){var o=e.childNodes[a],r=o.className;"applet_screenshot"===r?t?(o.style.display="block",u="screenshot"):o.style.display="none":"applet_scaler prerender"!==r&&(e.removeChild(o),g=r&&-1!=r.indexOf("appletParameters")?o.id:null,a--)}var d=void 0!==n.id?n.id:g,i=window[d];i&&"function"==typeof i.getBase64&&(i.remove(),window[d]=null)},e.refreshHitPoints=function(){if(v(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var x=function(e){return e&&"false"!==e},z=function(t,n,a){v(s)<=4.2&&(a=!0);var g=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==s||ggbHTML5LoadedCodebaseIsWebSimple&&!c)&&(g=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var r=n.width,d=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(v(s)<=4.4)x(n.showToolBar)&&(n.height-=7),x(n.showAlgebraInput)&&(n.height-=37),n.width<605&&x(n.showToolBar)&&(n.width=605,r=605);else{var m=100;(x(n.showToolBar)||x(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),m=x(n.showMenuBar)?245:155),r<m&&(n.width=m,r=m)}for(var S in o.style.border="none",o.style.display="inline-block",n)n.hasOwnProperty(S)&&"appletOnLoad"!==S&&o.setAttribute("data-param-"+S,n[S]);L&&o.setAttribute("data-param-fontscssurl",L),e.resize=function(){GGBAppletUtils.responsiveResize(t,n)},window.addEventListener("resize",(function(t){e.resize()}));var w="function"==typeof n.appletOnLoad?n.appletOnLoad:function(){};if(a||void 0===n.width){var u=document.createElement("div");u.className="applet_scaler",u.style.position="relative",u.style.display="block",u.appendChild(o),t.appendChild(u),n.appletOnLoad=function(t){e.resize(),w(t)}}else{n.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var p=t.querySelector(".applet_scaler.prerender"),f=null!==p;if(f)y=p.querySelector(".ggb_preview");else{var y=T(r,d,n.borderColor,!1);(p=document.createElement("div")).className="applet_scaler",p.style.position="relative",p.style.display="block",p.style.width=r+"px",p.style.height=d+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(p,"66%"),v(s)>=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(p),window.GGBT_wsf_view&&$(window).trigger("resize"),w(e)},f||p.appendChild(y)):o.appendChild(y),p.appendChild(o),f||t.appendChild(p),setTimeout((function(){e.resize()}),1)}function F(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),O("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function G(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){F(e.article,e.params)})),html5AppletsToProcess=null)},v(s)<5&&(e.className+=" geogebraweb")):F(e,t)}if(g){scriptLoadStarted=!0;for(var B=0;B<o.childNodes.length;B++){"TABLE"===o.childNodes[B].tagName&&(o.removeChild(o.childNodes[B]),B--)}if(null!==ggbHTML5LoadedScript){var b=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=b&&b.parentNode.removeChild(b)}var z=document.createElement("script"),N=function(){G(o,n)};z.src=P+l,ggbHTML5LoadedCodebaseIsWebSimple=c,ggbHTML5LoadedCodebaseVersion=s,ggbHTML5LoadedScript=z.src,O("GeoGebra HTML5 codebase loaded: '"+P+"'.",n),h||i&&"5.0"!=i?P.requirejs?__webpack_require__.e(32721).then(function(){var e=[__webpack_require__(32721)];N.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(z.onload=N,t.appendChild(z)):(c?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),N())}else G(o,n);n.height=d,n.width=r},N=function(t,n,a){var g=T(n.width,n.height,n.borderColor,a),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=n.width+"px",o.style.height=n.height+"px",o.className="applet_screenshot applet_scaler"+(a?" applet_screenshot_play":""),o.appendChild(g);var r=GGBAppletUtils.getScale(n,t,a);a?(t.appendChild(M()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),t.appendChild(o),1===r||isNaN(r)||(GGBAppletUtils.scaleElement(o,r),o.style.width=n.width+"px",o.style.height=n.height+"px",o.parentNode.style.width=n.width*r+"px",o.parentNode.style.height=n.height*r+"px"),e.resize=function(){k(t,g,o,a)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function k(e,t,a,g){if(e.contains(t)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var o=GGBAppletUtils.getScale(n,e,g);null!==a.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(a,1),a.parentNode.style.width=n.width+"px",a.parentNode.style.height=n.height+"px"):(GGBAppletUtils.scaleElement(a,o),a.parentNode.style.width=n.width*o+"px",a.parentNode.style.height=n.height*o+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,t){t.appendChild(e)};var _=function(e,t,n,a){N(e,t,!0);for(var g=function(){var n=[];for(r=0;r<e.childNodes.length;r++)n.push(e.childNodes[r]);if(window.GGBT_wsf_view){var g=window.GGBT_wsf_view.renderFullScreen(e,t.id),o=document.getElementById("fullscreencontainer"),d=jQuery(e).find(".fullscreencontent");d.length>0?(g.remove(),d.attr("id","fullscreencontent").show(),jQuery(o).append(d),window.dispatchEvent(new Event("resize"))):z(g,t,!1),window.GGBT_wsf_view.launchFullScreen(o)}else u=a,z(e,t,!1);if(!window.GGBT_wsf_view)for(r=0;r<n.length;r++)e.removeChild(n[r])},o=e.getElementsByClassName("ggb_preview_play"),r=0;r<o.length;r++)o[r].addEventListener("click",g,!1),o[r].addEventListener("ontouchstart",g,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),F()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},M=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var t='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',n=document.createElement("style");n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(n)}return e},T=function(e,t,n,a){var g=document.createElement("div");g.className="ggb_preview",g.style.position="absolute",g.style.zIndex="90",g.style.width=e-2+"px",g.style.height=t-2+"px",g.style.top="0px",g.style.left="0px",g.style.overflow="hidden",g.style.backgroundColor="white";var o="lightgrey";void 0!==n&&(o="none"===n?"transparent":n),g.style.border="1px solid "+o;var r,d,i,h=document.createElement("img");if((h.style.position="relative",h.style.zIndex="1000",h.style.top="-1px",h.style.left="-1px",null!==p&&h.setAttribute("src",p),h.style.opacity=.7,null!==f)&&!a){(r=document.createElement("img")).style.position="absolute",r.style.zIndex="1001",r.style.opacity=1,h.style.opacity=.3,(d=360)>e/4*3&&(d=e/4*3),i=d/5.8,r.setAttribute("src",f),r.setAttribute("width",d),r.setAttribute("height",i);var m=(e-d)/2,S=(t-i)/2;r.style.left=m+"px",r.style.top=S+"px",g.appendChild(r)}return g.appendChild(h),g},C=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},A=["web","webSimple","web3d","tablet","tablet3d","phone"],E=function(e,t){if(s=e,t)j(s,!0);else{var o,r,d=!g;if(d){var i=v(s);!isNaN(i)&&i<4.4&&(d=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var h=s.indexOf("//");for(var m in r=h>0?s:0===h?o+s:"https://www.geogebra.org/apps/5.2.814.0/",A)if(s.slice(-1*A[m].length)===A[m]||s.slice(-1*(A[m].length+1))===A[m]+"/")return void j(r,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!d||a.is3D||a.AV||a.SV||a.CV||a.EV2||a.CP||a.PC||a.DA||a.FI||a.PV||x(n.showToolBar)||x(n.showMenuBar)||x(n.showAlgebraInput)||x(n.enableRightClick)||n.appName&&"classic"!=n.appName?r+="web3d/":r+="webSimple/",j(r,!1)}},j=function(e,t){if(e.requirejs)P=e;else{"/"!==e.slice(-1)&&(e+="/"),P=e,null===t&&(t=-1===e.indexOf("http")),w=t,l="web.nocache.js",c=!1;var n=P.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?A.indexOf(n[n.length-2])>=0&&(l=n[n.length-2]+".nocache.js"):(l="webSimple.nocache.js",c=!0)),n=e.split("/"),"test"===(s=n[n.length-3]).substr(0,4)?s=s.substr(4,1)+"."+s.substr(5,1):"war"!==s.substr(0,3)&&"beta"!==s.substr(0,4)||(s="5.0");var a=parseFloat(s);NaN!==a&&a<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+a+" is deprecated. Using version latest instead."),E("5.0",t))}},O=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function R(){var e=t;null!==i?e=i:parseFloat(e)<5&&(e="5.0"),E(e,!1),null!==h&&j(h,w),d=!0}return void 0!==n.material_id?G(R):R(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,a,g){if(e.isScreenshoGenerator)return 1;var o,r=void 0!==a&&a,d=null!=e.noScaleMargin&&e.noScaleMargin,i=(o=e.autoHeight)&&"false"!==o,h=function(e,t,n,a,g,o){var r=null;if(null!=o&&""!=o)for(var d=e.parentNode;null!=d;){if((" "+d.className+" ").indexOf(" "+o+" ")>-1){r=d;break}d=d.parentNode}var i=0,h=0,m=0,S=0,P=0,w=0,u=0;if(r)i=r.offsetWidth,h=Math.max(a?r.offsetWidth:0,r.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(i=Math.min(window.innerWidth,document.documentElement.clientWidth),h=Math.min(window.innerHeight,document.documentElement.clientHeight),m=i):(i=window.innerWidth,h=window.innerHeight,m=window.innerWidth),e){var s=e.getBoundingClientRect();s.left>0&&s.left<=i&&(void 0===g||!g)&&("rtl"===document.dir?(P=i-s.width-s.left,w=m<=480?10:30):(w=s.left,P=m<=480?10:30),S=w+P)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(S=40,u=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(S=0,u=40))}return e&&((void 0===n||!n)&&t>0&&t+S<i?i=t:i-=S,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==n&&n||(h-=u)),{width:i,height:h}}(t,e.width,n,i,r&&window.GGBT_wsf_view||d,g),m=parseInt(h.width),S=e.width,P=e.height;if(void 0===S){var w=t.querySelector(".appletParameters");w&&(S=w.offsetWidth,P=w.offsetHeight)}var u=m/S,s=r?1:h.height/P;return void 0===n||n||(u=Math.min(1,u),s=Math.min(1,s)),Math.min(u,s)}function a(e,t,a){var g,o=1,r=!1;return e.hasOwnProperty("allowUpscale")&&(r=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(r=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(r=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(g=n(e,t,r,a,e.scaleContainerClass),!r||e.hasOwnProperty("scale")&&1!==o?Math.min(o,g):g)}function g(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),a=e.getBoundingClientRect(),g=(t-a.width)/2,o=(n-a.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=g<40?"40px":g+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=g+"px")}return{responsiveResize:function(n,o){var r=n.querySelector(".appletParameters");if(r){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==r.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(r.parentElement&&/fullscreen/.test(r.parentElement.className))return;var d=a(o,n);e()&&r.setAttribute("data-param-scale",d);for(var i=null,h=0;h<n.childNodes.length;h++)if(void 0!==n.childNodes[h].className&&n.childNodes[h].className.match(/^applet_scaler/)){i=n.childNodes[h];break}if(null!==i&&null!==i.querySelector(".noscale"))return;var m=void 0!==o.id?o.id:"ggbApplet",S=window[m];null!=S&&S.recalculateEnvironments||null===i||i.className.match(/fullscreen/)||(i.parentNode.style.transform="",isNaN(d)||1===d?(t(i,1),i.parentNode.style.width=o.width+"px",i.parentNode.style.height=o.height+"px"):(i.parentNode.style.width=o.width*d+"px",i.parentNode.style.height=o.height*d+"px",t(i,d))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&g(n),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(r).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:g,getScale:a,scaleElement:t}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,t){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function t(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var n=t();if(n)e();else{o.addEventListener&&o.addEventListener(Z,g,!1);var a=setInterval((function(){g()}),$)}function g(){if(!n){if(!t())return;n=!0,e(),o.removeEventListener&&o.removeEventListener(Z,g,!1),a&&clearInterval(a)}}}((function(){var t,n,a,g;t=e,n=u(),a=n.body,(g=n.createElement(_)).language=ab,g.crossOrigin=W,g.src=t,webModule.__errFn&&(g.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),a.appendChild(g),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var a=e.lastIndexOf(tb,Math.min(n,t));return a>=O?e.substring(O,a+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;n<t.length;++n)if(-1!=t[n].src.indexOf(xb))return e(t[n].src);return W}()),n==W&&(n=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,a=[],g=[];function o(e){var t=g[e](),n=a[e];if(t in n)return t;var o=[];for(var d in n)o[n[d]]=d;throw r&&r(e,o,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in a[e]},webModule.__getPropMap=function(){var e={};for(var t in a)a.hasOwnProperty(t)&&(e[t]=o(t));return e},webModule.__computePropValue=o,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var d=(e=Cb).indexOf(Db);-1!=d&&(t=parseInt(e.substring(d+P),$),e=e.substring(O,d))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},a=e[webModule.__softPermutationId],g=O;g<a.length;g++){var o=a[g];n[o[O]]=o[P]}return n}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),n=t.body,a=t.createElement(_);a.language=ab,a.text=e,n.appendChild(a),n.removeChild(a)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},37318:function(e,t,n){"use strict";function a(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function g(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],a=0;a<e.length;a++){var g=e[a],o=t?"".concat(t,"/").concat(g.name):"".concat(g.name);n.push({title:g.name,type:g.type,isLeaf:"tree"!==g.type,key:o})}return n}function o(e,t,n){for(var a=0;a<e.length;a++){var g=e[a];if(g.key===t){g.children=n;break}g.children&&o(g.children,t,n)}return e}function r(e,t,n){var a;return function(){var g=this,o=arguments,r=function(){a=null,n||e.apply(g,o)},d=n&&!a;clearTimeout(a),a=setTimeout(r,t),d&&e.apply(g,o)}}n.d(t,{Ax:function(){return o},Ds:function(){return r},KI:function(){return d},SI:function(){return g},f1:function(){return a}});var d=n(69423).Z.API_SERVER},12840:function(e,t,n){"use strict";n.d(t,{Z:function(){return L}});var a=n(7557),g=n.n(a),o=n(41498),r=n.n(o),d=n(79800),i=n.n(d),h=n(59301),m="imageDimensions___a7crR",S="img___Kroat",P="fullWidth___c492T",w=n(92310),u=n.n(w),s=n(71418),l=n(2859),c=n(82710),p=n(95972),f=n(37712),L=function(e){var t=e.data,n=e.className,a=e.fullWidth,o=e.style,d=void 0===o?{}:o,w=e.onClose,L=e.onOk,v=e.showFullTools,y=e.noAssociationId,F=(0,h.useRef)(null),G=(0,h.useRef)(null),B=(0,h.useRef)(null),b=(0,h.useRef)(null),x=(0,h.useState)(!1),z=i()(x,2),N=z[0],k=z[1],_=(0,h.useState)("正在加载中"),M=i()(_,2),T=M[0],C=M[1];(0,h.useEffect)((function(){B.current||(B.current=document.createElement("style"),document.head.appendChild(B.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),B.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&A()):(document.body.removeAttribute("data-custom"),B.current&&(document.head.removeChild(B.current),B.current=null))}),[null==t?void 0:t.visible]);var A=function(){var e=r()(g()().mark((function e(){var n;return g()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),C("正在加载中"),e.next=4,(0,p.ZJ)(null==t?void 0:t.src);case 4:n=e.sent,F.current.src="",F.current.src=n,F.current.onload=function(){j()},k(!1),C("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=r()(g()().mark((function e(n){var a;return g()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),C("正在保存中"),e.next=4,(0,c.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:n.dataUrl}});case 4:if(null==(a=e.sent)||!a.id||y){e.next=12;break}return e.next=8,(0,c.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==a?void 0:a.id,settings:JSON.stringify(n.state)}});case 8:0===e.sent.status&&L(),e.next=13;break;case 12:null!=a&&a.id&&L(a);case 13:k(!1),C("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){G.current=new l.hP(F.current),G.current.targetRoot=b.current,G.current.addEventListener("render",E),G.current.addEventListener("beforeclose",w),v&&(G.current.availableMarkerTypes=G.current.ALL_MARKER_TYPES,G.current.uiStyleSettings.redoButtonVisible=!0,G.current.uiStyleSettings.notesButtonVisible=!0,G.current.uiStyleSettings.zoomButtonVisible=!0,G.current.uiStyleSettings.zoomOutButtonVisible=!0,G.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=G.current.uiStyleSettings,G.current.show(),null!=t&&t.snapshotData&&G.current.restoreState(t.snapshotData),setTimeout((function(){var e;window.scrollTo(0,0),(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var t=document.querySelector(e.name);t&&t.setAttribute("title",e.title)}))}),300)};return(0,f.jsx)(h.Fragment,{children:(null==t?void 0:t.visible)&&(0,f.jsx)(s.Z,{spinning:N,tip:T,style:{position:"absolute"},children:(0,f.jsx)("div",{ref:b,className:u()(m,n,a?P:""),style:d,children:(0,f.jsx)("img",{className:S,ref:F})})})})}},18890:function(e,t,n){"use strict";n.d(t,{h:function(){return c}});var a=n(82242),g=n.n(a),o=n(79800),r=n.n(o),d=n(59301),i=n(57809),h=n(78241),m=n(3113),S=n(89780),P=n.n(S),w=(n(79906),n(44383),n(37712)),u=i.default.Option,s={labelCol:{span:4},wrapperCol:{span:20}},l={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function c(e){var t=e.value,n=e.onChange,a=e.mode,o=e.options,i=void 0===o?{}:o,h=(0,d.useRef)(),m=(0,d.useState)(),S=r()(m,2),u=S[0],s=S[1];return(0,d.useEffect)((function(){if(u){var e=function(e){var t=e.getValue();n&&n(t)};return u.on("change",e),function(){u.off("change",e)}}}),[u,n]),(0,d.useEffect)((function(){u&&u.setOption("mode",a)}),[u,a]),(0,d.useEffect)((function(){u&&(t===u.getValue()&&""!==t||setTimeout((function(){u.setValue(t||"")}),300))}),[u,t]),(0,d.useEffect)((function(){if(h.current&&!u){var e=P().fromTextArea(h.current,g()({mode:a,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},i));s(e)}}),[h.current,u]),(0,w.jsx)("div",{className:"my-codemirror-container",children:(0,w.jsx)("textarea",{ref:h})})}t.Z=function(e){var t=e.callback,n=e.onCancel,a=(0,d.useState)("python"),o=r()(a,2),S=o[0],P=o[1];return(0,w.jsxs)(h.Z,g()(g()({},s),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,w.jsx)(h.Z.Item,{label:"代码语言",name:"language",children:(0,w.jsx)(i.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){P(l[e][1])},children:Object.keys(l).map((function(e){return(0,w.jsx)(u,{value:e,children:l[e][0]},e)}))})}),(0,w.jsx)(h.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,w.jsx)(c,{mode:S})}),(0,w.jsxs)("div",{className:"flex-container flex-end",children:[(0,w.jsx)(m.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,w.jsx)(m.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},85654:function(e,t,n){"use strict";n.d(t,{Z:function(){return Le}});var a=n(91232),g=n.n(a),o=n(79800),r=n.n(o),d=n(85573),i=n.n(d),h=n(59301),m=n(89780),S=n.n(m),P=n(76374),w=(n(79906),n(6313),n(25717),n(99498),n(25419),n(67549),n(501)),u=n(37712),s=function(e){var t=e.value,n=void 0===t?"":t,a=(e.className,e.showTextOnly,e.showLines,e.style,(0,h.useMemo)((function(){return""}),[n]));return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})})},l=n(82242),c=n.n(l),p=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function f(e){var t=e.onActionCallback,n=e.title,a=e.icon,g=e.actionName,o=e.className,r=void 0===o?"":o,d=e.children;return(0,u.jsxs)("a",{title:n,className:r,onClick:function(){t(g)},children:[(0,u.jsx)("i",{className:"".concat(a)}),d]})}var L=function(e){var t=e.watch,n=e.showNullButton,a=e.showNullProgramButton,g=e.onActionCallback,o=e.fullScreen,r=e.insertTemp,d=e.hidetoolBar,i=e.extraUse,h=[].concat(p,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,u.jsxs)("ul",{className:"markdown-toolbar-container",children:[!d&&h.map((function(e,t){return(0,u.jsx)("li",{children:e.actionName?(0,u.jsx)(f,c()(c()({},e),{},{onActionCallback:g})):(0,u.jsx)("span",{className:"v-line"})},t)})),n?(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:g,children:(0,u.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,a?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:g,children:(0,u.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:g,children:(0,u.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,r&&(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(r),onActionCallback:g,children:(0,u.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),i&&(0,u.jsx)("li",{children:i}),(0,u.jsx)("li",{className:"btn-full-screen",children:(0,u.jsx)(f,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:g})})]})},v=n(32552),y=n(78241),F=n(92832),G=n(3113),B={labelCol:{span:4},wrapperCol:{span:20}},b=function(e){var t=e.callback,n=e.onCancel;return(0,u.jsxs)(y.Z,c()(c()({},B),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,u.jsx)(y.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,u.jsx)(F.Z,{})}),(0,u.jsx)(y.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,u.jsx)(F.Z,{})}),(0,u.jsxs)("div",{className:"flex-container flex-end",children:[(0,u.jsx)(G.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,u.jsx)(G.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},x=n(18890),z=n(48347),N=n(43418),k=n(95237),_=n(12840),M=function(e){var t=e.callback,n=e.onCancel,a=document.createElement("canvas"),g=a.getContext("2d");a.width=1e3,a.height=800,g.fillStyle="#ffffff",g.fillRect(0,0,a.width,a.height);var o=a.toDataURL("image/png");return(0,u.jsx)(N.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,u.jsx)(k.Z,{style:{height:"100vh"},children:(0,u.jsx)(_.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},T=n(7557),C=n.n(T),A=n(41498),E=n.n(A),j=n(37205),O=n.n(j),R=n(12378);function D(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(D,go.CommandHandler),D.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},D.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.x,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t,e.position.y))})),e.commitTransaction("aligning left")},D.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var n=e.actualBounds.x+e.actualBounds.width;t=Math.max(n,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},D.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.y,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,t))})),e.commitTransaction("alignTop")},D.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var n=e.actualBounds.y+e.actualBounds.height;t=Math.max(n,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},D.prototype.alignCenterX=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center X");var n=t.actualBounds.x+t.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},D.prototype.alignCenterY=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center Y");var n=t.actualBounds.y+t.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},D.prototype.alignColumn=function(e){var t=this.diagram;t.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var n=new Array;t.selection.each((function(e){e instanceof go.Link||n.push(e)}));for(var a=0;a<n.length-1;a++){var g=n[a],o=g.actualBounds.y+g.actualBounds.height+e;n[a+1].move(new go.Point(g.actualBounds.x,o))}t.commitTransaction("align Column")},D.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var t=this.diagram;t.startTransaction("align Row");var n=new Array;t.selection.each((function(e){e instanceof go.Link||n.push(e)}));for(var a=0;a<n.length-1;a++){var g=n[a],o=g.actualBounds.x+g.actualBounds.width+e;n[a+1].move(new go.Point(o,g.actualBounds.y))}t.commitTransaction("align Row")},D.prototype.canRotate=function(e){var t=this.diagram;return null!==t&&!t.isReadOnly&&!t.isModelReadOnly&&!(t.selection.count<1)},D.prototype.rotate=function(e){var t;void 0===e&&(e=90),(t=this.diagram).startTransaction("rotate "+e.toString()),(t=this.diagram).selection.each((function(t){t instanceof go.Link||t instanceof go.Group||(t.angle+=e)})),t.commitTransaction("rotate "+e.toString())},D.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var n=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:n=Math.max(n,t)}})),t.set(e,n)})),e.selection.each((function(e){D._assignZOrder(e,t.get(e.layer)+1)})),e.commitTransaction("pullToFront")},D.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var n=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:n=Math.min(n,t)}})),t.set(e,n)})),e.selection.each((function(e){D._assignZOrder(e,t.get(e.layer)-1-D._findGroupDepth(e))})),e.commitTransaction("pushToBack")},D._assignZOrder=function(e,t,n){void 0===n&&(n=e),e.layer===n.layer&&(e.zOrder=t),e instanceof go.Group&&e.memberParts.each((function(e){D._assignZOrder(e,t+1,n)}))},D._findGroupDepth=function(e){if(e instanceof go.Group){var t=0;return e.memberParts.each((function(e){t=Math.max(t,D._findGroupDepth(e))})),t+1}return 0},D.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var t=e.lastInput;if("Up"===t.key||"Down"===t.key||"Left"===t.key||"Right"===t.key){var n=this.arrowKeyBehavior;if("none"===n)return;if("select"===n)return void this._arrowKeySelect();if("move"===n)return void this._arrowKeyMove();if("tree"===n)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},D.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(t){e.push(t)})),this.diagram.parts.each((function(t){e.push(t)})),e},D.prototype._arrowKeyMove=function(){var e=this.diagram,t=e.lastInput,n=0,a=0;if(t.control||t.meta)n=1,a=1;else if(null!==e.grid){var g=e.grid.gridCellSize;a=g.width,n=g.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-n)):"Down"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+n)):"Left"===t.key?e.move(new go.Point(e.actualBounds.x-a,e.actualBounds.y)):"Right"===t.key&&e.move(new go.Point(e.actualBounds.x+a,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},D.prototype._arrowKeySelect=function(){var e=this.diagram,t=e.lastInput,n=null;"Up"===t.key?n=this._findNearestPartTowards(270):"Down"===t.key?n=this._findNearestPartTowards(90):"Left"===t.key?n=this._findNearestPartTowards(180):"Right"===t.key&&(n=this._findNearestPartTowards(0)),null!==n&&(t.shift?n.isSelected=!0:t.control||t.meta?n.isSelected=!n.isSelected:e.select(n))},D.prototype._findNearestPartTowards=function(e){var t=this.diagram.selection.first();if(null===t)return null;for(var n=t.actualBounds.center,a=this._getAllParts(),g=1/0,o=t,r=0;r<a.length;r++){var d=a[r];if(d!==t&&d.canSelect()){var i=d.actualBounds.center,h=n.directionPoint(i),m=this._angleCloseness(h,e);if(m<=45){var S=n.distanceSquaredPoint(i);(S*=1+Math.sin(m*Math.PI/180))<g&&(g=S,o=d)}}}return o},D.prototype._angleCloseness=function(e,t){return Math.min(Math.abs(t-e),Math.min(Math.abs(t+360-e),Math.abs(t-360-e)))},D.prototype._arrowKeyTree=function(){var e=this.diagram,t=e.selection.first();if(t instanceof go.Node){var n=e.lastInput;if("Right"===n.key)if(t.isTreeLeaf);else if(t.isTreeExpanded){null!==(g=this._sortTreeChildrenByY(t).first())&&e.select(g)}else e.commandHandler.canExpandTree(t)&&e.commandHandler.expandTree(t);else if("Left"===n.key){if(!t.isTreeLeaf&&t.isTreeExpanded)e.commandHandler.canCollapseTree(t)&&e.commandHandler.collapseTree(t);else null!==(o=t.findTreeParentNode())&&e.select(o)}else if("Up"===n.key){if(null!==(o=t.findTreeParentNode()))if((d=(r=this._sortTreeChildrenByY(o)).indexOf(t))>0){for(var a=r.elt(d-1);null!==a&&a.isTreeExpanded&&!a.isTreeLeaf;){a=this._sortTreeChildrenByY(a).last()}null!==a&&e.select(a)}else e.select(o)}else if("Down"===n.key){var g;if(t.isTreeExpanded&&!t.isTreeLeaf)null!==(g=this._sortTreeChildrenByY(t).first())&&e.select(g);else for(;null!==t;){var o,r,d;if(null===(o=t.findTreeParentNode()))break;if((d=(r=this._sortTreeChildrenByY(o)).indexOf(t))<r.length-1){e.select(r.elt(d+1));break}t=o}}var i=e.selection.first();null!==i&&e.scrollToRect(i.actualBounds)}},D.prototype._sortTreeChildrenByY=function(e){var t=(new go.List).addAll(e.findTreeChildrenNodes());return t.sort((function(e,t){var n=e.location,a=t.location;return n.y<a.y?-1:n.y>a.y?1:n.x<a.x?-1:n.x>a.x?1:0})),t},D.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},D.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(D.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(D.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var H=D,I=(n(15378),n(43604)),W=n(82710),X="myPaletteDiv___Xjz2I",K="flowChartWrp____f45r",Z="maxH60___Pd4Re";var U=function(e){var t=e.onCancel,n=e.callback,a=(0,h.useRef)(),g=(0,h.useRef)(),o=(0,h.useRef)(),d=(0,h.useRef)(!1),i=(0,h.useRef)(!1),m=(0,h.useState)(0),S=r()(m,2),P=S[0],w=S[1],s=function(){var e=E()(C()().mark((function e(){var t,g;return C()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.current.makeImage(),e.next=3,(0,W.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:t.src}});case 3:g=e.sent,n({src:g.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){return setTimeout((function(){!function(){var e=R.bx.make,t="#ff3333",n="#3358ff",r="#25ad23",d="#d533ff",i="#7d33ff",h="#ff6233",m="#ffffff",S="#000000",P="#fffcd5",w="#d5ebff",u="#f2dfe0",s="#a5d2fa",l="#cccccc",c="#b3e6b3",p="#fcbbbd";function f(t,n){var a=function(e,n){e.handled=!0,e.diagram.model.commit((function(a){var g=n.part.adornedPart,o=(new R.E9).setRectSpot(g.actualBounds,t);o.subtract(g.location),o.scale(2,2),o.x+=130*Math.sign(o.x),o.y+=130*Math.sign(o.y),o.add(g.location),o.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var r=a.copyNodeData(g.data);a.setGroupKeyForNodeData(r,a.getGroupKeyForNodeData(g.data)),a.addNodeData(r);var d={from:g.key,to:a.getKeyForNodeData(r)};a.addLinkData(d);var i=e.diagram.findNodeForData(r);i.location=o,e.diagram.select(i),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(R.bn,{figure:n,alignment:t,alignmentFocus:t.opposite(),width:t.equals(R.z6.Top)||t.equals(R.z6.Bottom)?25:18,height:t.equals(R.z6.Top)||t.equals(R.z6.Bottom)?18:25,fill:"orange",stroke:m,strokeWidth:4,mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},isActionable:!0,click:a,contextClick:a})}function L(t){return e(R.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},click:function(e,t){e.diagram.commandHandler.showContextMenu(t.part.adornedPart)}},t||{})}function v(e,t){return function(n,a){n.handled=!0,n.diagram.model.commit((function(n){n.set(a.part.adornedPart.data,e,t)}))}}function y(t,n){return n||(n="color"),e(R.bn,{width:16,height:16,stroke:"lightgray",fill:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.stroke="dodgerblue"},mouseLeave:function(e,t){return t.stroke="lightgray"},click:v(n,t),contextClick:v(n,t)})}function F(){return[e("ContextMenuButton",e(R.s_,"Horizontal",y(m,"fill"),y(P,"fill"),y(w,"fill"),y(u,"fill"))),e("ContextMenuButton",e(R.s_,"Horizontal",y(l,"fill"),y(c,"fill"),y(s,"fill"),y(p,"fill")))]}function G(){return[e("ContextMenuButton",e(R.s_,"Horizontal",y(S),y(r),y(n),y(t))),e("ContextMenuButton",e(R.s_,"Horizontal",y(m),y(d),y(i),y(h)))]}function B(t,n){return n||(n="thickness"),e(R.bn,"LineH",{width:16,height:16,strokeWidth:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:v(n,t),contextClick:v(n,t)})}function b(t,n){return n||(n="dash"),e(R.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:v(n,t),contextClick:v(n,t)})}function x(){return[e("ContextMenuButton",e(R.s_,"Horizontal",B(1),B(2),B(3),B(4))),e("ContextMenuButton",e(R.s_,"Horizontal",b(null),b([2,4]),b([4,4])))]}function z(t,n){return n||(n="figure"),e(R.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="lightgray"},click:v(n,t),contextClick:v(n,t)})}function N(t){return e(R.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(t+4).toString()+" H3"})}function k(t){var n="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===t?n="M0 0 M16 16 M0 8 L16 8":2===t&&(n="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(R.bn,{geometryString:n,margin:2,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:v("dir",t),contextClick:v("dir",t)})}function _(t){var n=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var a=n.part.adornedPart;e.set(a.data,t?"toSpot":"fromSpot",R.z6.stringify(R.z6.AllSides)),(t?a.toNode:a.fromNode).invalidateConnectedLinks()}))};return e(R.bn,{width:12,height:12,fill:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:n,contextClick:n})}function M(t,n){var a=0,g=R.z6.RightSide;t.equals(R.z6.Top)?(a=270,g=R.z6.TopSide):t.equals(R.z6.Left)?(a=180,g=R.z6.LeftSide):t.equals(R.z6.Bottom)&&(a=90,g=R.z6.BottomSide),n||(a-=180);var o=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var a=t.part.adornedPart;e.set(a.data,n?"toSpot":"fromSpot",R.z6.stringify(g)),(n?a.toNode:a.fromNode).invalidateConnectedLinks()}))};return e(R.bn,{alignment:t,alignmentFocus:t.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:a,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:o,contextClick:o})}a.current=new R.S0(g.current,{padding:20,grid:e(R.s_,"Grid",e(R.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(R.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(H),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var t=e.subject;t.location=t.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject,setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var t=e.subject;e.diagram.toolManager.linkingTool.isForwards?t.toNode.invalidateConnectedLinks():t.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),a.current.nodeTemplate=e(R.NB,"Auto",{locationSpot:R.z6.Center,locationObjectName:"SHAPE",desiredSize:new R.$u(120,60),minSize:new R.$u(40,40),resizable:!0,resizeCellSize:new R.$u(10,10),rotatable:!0},new R.KX("location","loc",R.E9.parse).makeTwoWay(R.E9.stringify),new R.KX("desiredSize","size",R.$u.parse).makeTwoWay(R.$u.stringify),e(R.bn,{name:"SHAPE",fill:m,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:R.z6.AllSides,toSpot:R.z6.AllSides},new R.KX("figure"),new R.KX("fill"),new R.KX("stroke","borderColor"),new R.KX("strokeWidth","thickness"),new R.KX("strokeDashArray","dash")),e(R.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(R.al,{margin:1,textAlign:"center",overflow:R.al.OverflowEllipsis,editable:!0},new R.KX("text").makeTwoWay(),new R.KX("stroke","color"))),a.current.nodeTemplate.toolTip=e("ToolTip",e(R.s_,"Vertical",{maxSize:new R.$u(200,NaN)},e(R.al,{font:"bold 10pt sans-serif",textAlign:"center"},new R.KX("text")),e(R.al,{font:"10pt sans-serif",textAlign:"center"},new R.KX("text","details")))),a.current.nodeTemplate.selectionAdornmentTemplate=e(R.uz,"Spot",e(R.Vm,{padding:10}),f(R.z6.Top,"TriangleUp"),f(R.z6.Left,"TriangleLeft"),f(R.z6.Right,"TriangleRight"),f(R.z6.Bottom,"TriangleDown"),L({alignment:new R.z6(.75,0)})),a.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(R.s_,"Horizontal",z("Rectangle"),z("RoundedRectangle"),z("Ellipse"),z("Diamond"))),e("ContextMenuButton",e(R.s_,"Horizontal",z("Parallelogram2"),z("ManualOperation"),z("Procedure"),z("Cylinder1"))),e("ContextMenuButton",e(R.s_,"Horizontal",z("Terminator"),z("CreateRequest"),z("Document"),z("TriangleDown"))),F(),G(),x()),a.current.groupTemplate=e(R.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:R.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,t){t.addMembers(t.diagram.selection,!0)||t.diagram.currentTool.doCancel()},avoidable:!1},new R.KX("location","loc",R.E9.parse).makeTwoWay(R.E9.stringify),e(R.s_,"Auto",{name:"BODY"},e(R.bn,{parameter1:10,fill:m,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:R.z6.AllSides,toSpot:R.z6.AllSides},new R.KX("fill"),new R.KX("stroke","color"),new R.KX("strokeWidth","thickness"),new R.KX("strokeDashArray","dash")),e(R.Vm,{background:"transparent",margin:20})),e(R.al,{alignment:R.z6.Top,alignmentFocus:R.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new R.KX("text"),new R.KX("stroke","color"))),a.current.groupTemplate.selectionAdornmentTemplate=e(R.uz,"Spot",e(R.s_,"Auto",e(R.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(R.Vm,{margin:1.5})),L({alignment:R.z6.TopRight,alignmentFocus:R.z6.BottomRight})),a.current.groupTemplate.contextMenu=e("ContextMenu",F(),G(),x()),a.current.linkTemplate=e(R.rU,{layerName:"Foreground",routing:R.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new R.KX("fromSpot","fromSpot",R.z6.parse),new R.KX("toSpot","toSpot",R.z6.parse),new R.KX("fromShortLength","dir",(function(e){return e>=1?10:0})),new R.KX("toShortLength","dir",(function(e){return e>=1?10:0})),new R.KX("points").makeTwoWay(),e(R.bn,{strokeWidth:2},new R.KX("stroke","color"),new R.KX("strokeWidth","thickness"),new R.KX("strokeDashArray","dash")),e(R.bn,{segmentIndex:0,segmentOffset:new R.E9(15,0),segmentOrientation:R.rU.OrientAlong,alignmentFocus:R.z6.Right,figure:"circle",width:10,strokeWidth:0},new R.KX("fill","color"),new R.KX("visible","dir",(function(e){return 1===e}))),e(R.bn,{segmentIndex:-1,segmentOffset:new R.E9(-10,6),segmentOrientation:R.rU.OrientPlus90,alignmentFocus:R.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new R.KX("fill","color"),new R.KX("visible","dir",(function(e){return e>=1})),new R.KX("width","thickness",(function(e){return 7+3*e})),new R.KX("height","thickness",(function(e){return 7+3*e})),new R.KX("segmentOffset","thickness",(function(e){return new R.E9(-15,4+1.5*e)}))),e(R.bn,{segmentIndex:0,segmentOffset:new R.E9(15,-6),segmentOrientation:R.rU.OrientMinus90,alignmentFocus:R.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new R.KX("fill","color"),new R.KX("visible","dir",(function(e){return 2===e})),new R.KX("width","thickness",(function(e){return 7+3*e})),new R.KX("height","thickness",(function(e){return 7+3*e})),new R.KX("segmentOffset","thickness",(function(e){return new R.E9(-15,4+1.5*e)}))),e(R.al,{alignmentFocus:new R.z6(0,1,-4,0),editable:!0},new R.KX("text").makeTwoWay(),new R.KX("stroke","color"))),a.current.linkTemplate.selectionAdornmentTemplate=e(R.uz,e(R.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:N(2)},new R.KX("pathPattern","thickness",N)),L({alignmentFocus:new R.z6(0,0,-6,-4)})),a.current.linkTemplate.contextMenu=e("ContextMenu",G(),x(),e("ContextMenuButton",e(R.s_,"Horizontal",k(0),k(1),k(2))),e("ContextMenuButton",e(R.s_,"Horizontal",e(R.s_,"Spot",_(!1),M(R.z6.Top,!1),M(R.z6.Left,!1),M(R.z6.Right,!1),M(R.z6.Bottom,!1)),e(R.s_,"Spot",{margin:new R.Zt(0,0,0,2)},_(!0),M(R.z6.Top,!0),M(R.z6.Left,!0),M(R.z6.Right,!0),M(R.z6.Bottom,!0)))));var T=new R.YI(o.current,{maxSelectionCount:1,linkTemplate:e(R.rU,{locationSpot:R.z6.Center,selectionAdornmentTemplate:e(R.uz,"Link",{locationSpot:R.z6.Center},e(R.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(R.bn,{toArrow:"Standard",stroke:null}))},{routing:R.rU.AvoidsNodes,curve:R.rU.JumpOver,corner:5,toShortLength:4},new R.KX("points"),e(R.bn,{isPanelMain:!0,strokeWidth:2}),e(R.bn,{toArrow:"Standard",stroke:null})),model:new R.FJ([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(O()(R.bn.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))});a.current.addDiagramListener("TextEdited",(function(e){var t,n=e.subject.part,g=null===(t=document.activeElement)||void 0===t?void 0:t.value;"string"==typeof g&&""===g.trim()&&a.current.model.commit((function(e){e.set(n.data,"text","未命名"),a.current.commandHandler.stopCommand()}),"increment")})),T.nodeTemplate=e(R.NB,"Auto",{locationSpot:R.z6.Center},new R.KX("location","location",R.E9.parse).makeTwoWay(R.E9.stringify),e(R.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new R.KX("stroke").makeTwoWay(),new R.KX("fill").makeTwoWay(),new R.KX("figure")),e(R.al,{margin:new R.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new R.$u(16,16),maxSize:new R.$u(10,NaN),textAlign:"center",editable:!0},new R.KX("key").makeTwoWay())),setTimeout((function(){a.current.grid=e(R.s_,"Grid",e(R.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(R.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),a.current.grid.visible=!0,a.current.grid.gridCellStroke="darkgray",a.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=a.current,a.current}()}),500),w(P+1),function(){a.current=null}}),[]),(0,u.jsx)("div",{ref:i,className:d.current?"".concat(Z," body-overflow-initial"):"body-overflow-initial",children:(0,u.jsx)(N.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!P,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:(0,u.jsxs)(k.Z,{children:[(0,u.jsx)(I.Z,{flex:1,children:"插入流程图"}),(0,u.jsx)(I.Z,{onClick:function(){var e=a.current.selection.first();if(d.current=!d.current,document.activeElement&&e){var t,n=null===(t=document.activeElement)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.trim();"string"==typeof n&&a.current.model.commit((function(t){t.set(e.data,"text",n||"未命名"),a.current.commandHandler.stopCommand()}),"increment")}w(P+1)},children:(0,u.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:t,children:(0,u.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:K,children:[(0,u.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,u.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,u.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,u.jsx)("div",{style:{height:"calc(100% - 50px)"},className:X,ref:o})]}),(0,u.jsx)("div",{style:{flex:1,position:"relative"},children:(0,u.jsx)("div",{ref:g,style:{height:"80vh"}})})]}),(0,u.jsx)("div",{className:"tr",children:(0,u.jsx)(G.ZP,{size:"large",onClick:s,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},V=n(5112),q=n(88897),Y=V.ZP.Group,$={margin:"0 8px"},J=function(e){var t=e.callback,n=e.onCancel;return(0,u.jsxs)(y.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,u.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,u.jsx)("span",{style:$,children:"单元格数:"}),(0,u.jsx)("span",{style:$,children:"行数"}),(0,u.jsx)(y.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,u.jsx)(q.Z,{})}),(0,u.jsx)("span",{style:$,children:"列数"}),(0,u.jsx)(y.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,u.jsx)(q.Z,{})})]}),(0,u.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,u.jsx)("span",{style:$,children:"对齐方式:"}),(0,u.jsx)(y.Z.Item,{name:"align",children:(0,u.jsxs)(Y,{children:[(0,u.jsx)(V.ZP,{value:"default",children:(0,u.jsx)("i",{className:"fa fa-align-justify"})}),(0,u.jsx)(V.ZP,{value:"left",children:(0,u.jsx)("i",{className:"fa fa-align-left"})}),(0,u.jsx)(V.ZP,{value:"center",children:(0,u.jsx)("i",{className:"fa fa-align-center"})}),(0,u.jsx)(V.ZP,{value:"right",children:(0,u.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,u.jsxs)("div",{className:"flex-container flex-end",children:[(0,u.jsx)(G.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,u.jsx)(G.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},Q=n(78673),ee=n(47503),te=n.n(ee),ne=(0,h.forwardRef)((function(e,t){var n=e.use3d,a=e.width,g=e.height,o=e.callback,d=(e.showSaveButton,(0,h.useRef)()),i=(0,h.useRef)(),m=(0,h.useState)(!1),S=r()(m,2),P=S[0],w=S[1],s=(0,h.useRef)({id:d,appName:"graphing",width:a||1e3,height:g||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,h.useEffect)((function(){i.current=new(te())(s.current,!0),window.onload=function(){i.current.inject("applet_container")}}),[]);var l=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,h.useEffect)((function(){s.current.appName=P?"3D":"graphing",i.current.inject("applet_container")}),[P]),(0,h.useEffect)((function(){w(n)}),[n]),(0,h.useImperativeHandle)(t,(function(){return{getImgData:l}})),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:d}),(0,u.jsxs)(k.Z,{align:"middle",children:[(0,u.jsx)(I.Z,{flex:1,children:(0,u.jsx)(Q.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:P,onChange:function(e){return w(e)}})}),(0,u.jsx)(I.Z,{children:(0,u.jsx)(G.ZP,{size:"large",onClick:l,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ae=n(46246),ge=n(8591),oe="link",re="upload-image",de="add-flowchart",ie="draw-image",he="code-block",me="add-table",Se="------------",Pe={default:Se,left:":".concat(Se),center:":".concat(Se,":"),right:"".concat(Se,":")},we=n(4027);var ue="@▁▁@",se=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function le(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",pe=i()(i()({},ce+"-B","bold"),ce+"-I","italic"),fe=i()(i()(i()(i()(i()(i()(i()(i()({},oe,"添加链接"),he,"添加代码块"),re,"添加图片"),ie,"添加画图"),de,"插入流程图"),me,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Le=function(e){var t=e.defaultValue,n=void 0===t?"":t,a=e.onChange,o=e.width,d=void 0===o?"100%":o,m=e.height,l=void 0===m?400:m,c=e.miniToolbar,p=void 0!==c&&c,f=e.isFocus,y=void 0!==f&&f,F=e.watch,G=e.insertTemp,B=e.mode,k=void 0===B?"markdown":B,_=e.id,T=void 0===_?"markdown-editor-id":_,C=e.showResizeBar,A=void 0!==C&&C,E=e.noStorage,j=void 0!==E&&E,O=e.showNullButton,R=void 0!==O&&O,D=e.showNullProgramButton,H=void 0!==D&&D,I=e.hidetoolBar,W=void 0!==I&&I,X=e.fullScreen,K=void 0!==X&&X,Z=e.onBlur,V=e.onCMBeforeChange,q=e.onFullScreen,Y=e.className,$=void 0===Y?"":Y,Q=e.disablePaste,ee=void 0!==Q&&Q,te=e.disabled,Se=void 0!==te&&te,ce=e.disabledFill,Le=void 0!==ce&&ce,ve=e.placeholder,ye=void 0===ve?"":ve,Fe=e.values,Ge=void 0===Fe?"":Fe,Be=e.extraUse,be=(0,h.useState)(null),xe=r()(be,2),ze=xe[0],Ne=xe[1],ke=(0,h.useState)(n),_e=r()(ke,2),Me=_e[0],Te=_e[1],Ce=(0,h.useState)(F),Ae=r()(Ce,2),Ee=Ae[0],je=Ae[1],Oe=(0,h.useState)(K),Re=r()(Oe,2),De=Re[0],He=Re[1],Ie=(0,h.useState)(""),We=r()(Ie,2),Xe=We[0],Ke=We[1],Ze=(0,h.useState)(0),Ue=r()(Ze,2),Ve=Ue[0],qe=Ue[1],Ye=(0,h.useState)(l),$e=r()(Ye,2),Je=$e[0],Qe=$e[1],et=(0,h.useState)(!1),tt=r()(et,2),nt=(tt[0],tt[1]),at=(0,h.useState)(0),gt=r()(at,2),ot=gt[0],rt=gt[1],dt=(0,h.useState)(0),it=r()(dt,2),ht=it[0],mt=it[1],St=(0,h.useRef)(),Pt=(0,h.useRef)(),wt=(0,h.useRef)(),ut=(0,h.useRef)();(0,h.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Te(Ge),null==ze||ze.setValue(Ge),window.scrollTo(0,e)}),[Ge]),(0,h.useEffect)((function(){null==q||q(De)}),[De]),(0,h.useEffect)((function(){if(St.current){var e=function(e,n){if(!ee){var a=n.clipboardData;if(a){var g=a.types.toString(),o=a.items;if("Files"===g||a.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==k)return;try{var r,d=o[1];"file"===(null===(r=o[0])||void 0===r?void 0:r.kind)&&(d=o[0]);var i=d.getAsFile(),h=i.name.split(".").pop();(0,z.I)(i,(function(e){var n,a,g;e.id?(null==i||null===(n=i.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==i||null===(a=i.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==i||null===(g=i.type)||void 0===g?void 0:g.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(i.type,'&disposition=inline" target="_blank">').concat(i.name,"</a>")):se.includes(h)?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(i.name,"</a>")):t.replaceSelection("[".concat(i.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){ge.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=S().fromTextArea(St.current,{mode:k,lineNumbers:!p,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",ye):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),a=n.getCursor(),g=n.getLine(a.line),o=g.charAt(a.ch-1),r=g.lastIndexOf("@▁@",a.ch),d=g.lastIndexOf("@▁▁@",a.ch),i=r>d?r:d,h=r>d?3:4;if(-1===ue.indexOf(o))return null;if(console.log("change1:",t,e,g,a,i,r,d,o),i>=0&&a.ch-i<5){var m=i+h;return n.replaceRange("",{line:a.line,ch:i},{line:a.line,ch:m}),{line:a.line,ch:m}}return null}(e);n&&t.preventDefault()}})),y&&t.focus(),t.on("paste",e),Se&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Ne(t),function(){t.off("paste",e)}}}),[]);var st=(0,h.useCallback)((function(){Pt.current}),[Je,Pt,De]);(0,h.useEffect)((function(){if(ze){var e=function(){var e=new P.Z((function(e){var t,n=g()(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(st(),ze.setSize("100%","100%"),ze.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(St.current.parentElement),e}();return function(){var t,n;null!==(t=St.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=St.current)||void 0===n?void 0:n.parentElement)}}}),[ze,st]),(0,h.useEffect)((function(){if(ze){for(var e=[],t=function(){var t=r()(a[n],2),g=t[0],o=t[1],d=i()({},g,(function(){lt(o)}));e.push(d),ze.addKeyMap(d)},n=0,a=Object.entries(pe);n<a.length;n++)t();return function(){for(var t=0,n=e;t<n.length;t++){var a=n[t];ze.removeKeyMap(a)}}}}),[ze]),(0,h.useEffect)((function(){K!==De&&He(K)}),[K]),(0,we.Z)((function(){if(!j&&Ve>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(T);e>=Ve+1e4&&(!t||t!==Me)&&(window.sessionStorage.setItem(T,Me),nt(!0))}}),1e4),(0,h.useEffect)((function(){je(F)}),[ze,F]),(0,h.useEffect)((function(){ze&&y&&ze.focus()}),[ze,y]),(0,h.useEffect)((function(){if(Ee&&ze){var e=function(e){var t=e.target;if(ut.current){var n=t.scrollTop/t.scrollHeight;ut.current.scrollTop=ut.current.scrollHeight*n}},t=ze.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[ze,Ee]),(0,h.useEffect)((function(){if(ze&&V){var e=function(e,t){V(e,t)};return ze.on("beforeChange",e),function(){ze.off("beforeChange",e)}}}),[ze,V]),(0,h.useEffect)((function(){if(ze&&Z){var e=function(){Z(ze.getValue())};return ze.on("blur",e),function(){ze.off("blur",e)}}}),[ze,Z]),(0,h.useEffect)((function(){if(ze){var e=function(e,t){var n=e.getValue();Te(n),qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),a&&(H?a(n,vt(n)):a(n))};return ze.on("change",e),function(){ze.off("change",e)}}}),[ze,a]),(0,h.useEffect)((function(){if(ze)if(null==n)ze.setValue(""),Te("");else{var e=window.scrollY||window.pageYOffset;n!==ze.getValue()&&(ze.setValue(n),Te(n),ze.setCursor(Se?1:ze.lineCount(),0),window.scrollTo(0,e))}}),[ze,n]);var lt=(0,h.useCallback)((function(e){var t=ze.getCursor(),n=ze.getSelection(),a=n.split("\n");switch(e){case"bold":return ze.replaceSelection("**"+n+"**"),""===n&&ze.setCursor(t.line,t.ch+2),ze.focus();case"italic":return ze.replaceSelection("*"+n+"*"),""===n&&ze.setCursor(t.line,t.ch+1),ze.focus();case"code":return ze.replaceSelection("`"+n+"`"),""===n&&ze.setCursor(t.line,t.ch+1),ze.focus();case"inline-latex":return Ke("inline-latex"),ze.focus();case"latex":return ze.replaceSelection("```latex\n"+n+"\n```"),ze.setCursor(t.line+1,n.length+1),ze.focus();case"line-break":return ze.replaceSelection("<br/>\n"),ze.focus();case"list-ul":return""===n?ze.replaceSelection("- "+n):ze.replaceSelection(a.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ze.focus();case"list-ol":return""===n?ze.replaceSelection("1. "+n):ze.replaceSelection(a.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ze.focus();case"add-null-ch":return""===n&&ze.setCursor(t.line,t.ch),ze.replaceSelection("▁"),ze.focus();case"add-signal":return""===n&&ze.setCursor(t.line,t.ch),ze.replaceSelection("@▁@"),ze.focus();case"add-multiple":return""===n&&ze.setCursor(t.line,t.ch),ze.replaceSelection(ue),ze.focus();case"inster-template-1":return""===n&&ze.setCursor(t.line,t.ch),ze.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),ze.focus();case"eraser":return ze.setValue(""),ze.focus();case"trigger-watch":return je(!Ee),ze.focus();case"trigger-full-screen":return He(!De),ze.focus();case oe:return void Ke(oe);case he:return void Ke(he);case re:return void Ke(re);case ie:return void Ke(ie);case"maths-latex":return void Ke("maths-latex");case de:return void Ke(de);case me:return void Ke(me);default:throw new Error}}),[ze,Ee,De]),ct=(0,h.useCallback)((function(e,t){var n,a,g,o,r;switch(Ke(""),Xe){case oe:var d=e.title,i=e.link;return ze.replaceSelection("[".concat(d,"](").concat(i,")")),ze.focus();case he:var h=e.language,m=e.content;return ze.replaceSelection(["```"+h,m,"```"].join("\n")),ze.focus();case"maths-latex":for(var S=atob(e),P=new Uint8Array(S.length),w=0;w<S.length;w++)P[w]=S.charCodeAt(w);var u=new Blob([P],{type:"image/png"});(0,z.I)(u,(function(e){e.id?ze.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":ze.replaceSelection("`$$"+e+"$$`");break;case re:case ie:case"add-flowchart":var s=e.src,l=e.alt,c=t,p=null==c||null===(n=c.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(a=n.pop)||void 0===a?void 0:a.call(n);return(null==c||null===(g=c.type)||void 0===g?void 0:g.indexOf("image"))>-1||null==c||!c.type?l?ze.replaceSelection("![ ".concat(l," ]( ").concat(s,' "').concat(l,'" )')):ze.replaceSelection("![,](".concat(s,")")):(null==c||null===(o=c.type)||void 0===o?void 0:o.indexOf("video"))>-1?ze.replaceSelection('<video width="100%" controls src="'.concat(s,'"></video>')):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?ze.replaceSelection('<a href="'.concat(s,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):se.includes(p)?ze.replaceSelection('<a href="'.concat(s,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):ze.replaceSelection("[".concat(c.name,"](").concat(s,")")),ze.focus();case me:for(var f=e.row,L=e.col,v=e.align,y="\n",F=0;F<f;F++){for(var G=[],B=[],b=0;b<L;b++)1===F&&B.push(Pe[v]),G.push(" ");1===F&&(y+="| ".concat(B.join(" | ")," |\n")),y+="| ".concat(G.join(1===L?"":" | ")," |\n")}return ze.replaceSelection(y+"\n"),ze.focus();default:throw new Error}}),[ze,Xe]),pt=(0,h.useMemo)((function(){switch(Xe){case oe:return(0,u.jsx)(b,{callback:ct,onCancel:ft});case he:return(0,u.jsx)(x.Z,{callback:ct,onCancel:ft});case re:return(0,u.jsx)(z.Z,{callback:ct,onCancel:ft});case de:return(0,u.jsx)(U,{callback:ct,onCancel:ft});case me:return(0,u.jsx)(J,{callback:ct,onCancel:ft});case"maths-latex":return(0,u.jsx)(ne,{showSaveButton:!0,callback:ct});case"inline-latex":return(0,u.jsx)(ae.Z,{showSaveButton:!0,callback:ct});default:return null}}),[Xe]);function ft(){Ke("")}(0,h.useEffect)((function(){if(wt.current){var e=function(e){g=!0,o=e.pageY},t=function(){g=!1},n=function(e){if(g){var t=e.pageY-o;t<0&&(t=0),t>300&&(t=300),Qe(l+t+"px")}},a=wt.current,g=!1,o=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[ze,wt]),(0,h.useEffect)((function(){Qe(l)}),[l]);var Lt={width:le(d),height:le(Je)},vt=((0,h.useMemo)((function(){if(Ve){var e=new Date(Ve),t=e.getHours(),n=e.getMinutes(),a=e.getSeconds();return n=n<10?"0"+n:n,a=a<10?"0"+a:a,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(a)}return 0}),[Ve]),function(e){var t=[];if(H){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,a){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,h.useEffect)((function(){fe[Xe]&&Xe!==ie&&Xe!==de&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;rt(t),mt(n)}),0)}),[Xe]);var yt=function(e,t,n,a){var g=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&n<e||t<20&&a>t||t>g-20&&a<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,u.jsxs)(h.Fragment,{children:[(0,u.jsx)("div",{className:"markdown-editor-wrapper",ref:Pt,children:(0,u.jsxs)("div",{className:"markdown-editor-container ".concat($," ").concat(Ee?"on-preview":""," ").concat(p?"mini":""," ").concat(De?"full-screen":""),style:Lt,children:[(0,u.jsx)(L,{insertTemp:G,watch:Ee,fullScreen:De,showNullButton:R,showNullProgramButton:H,onActionCallback:lt,hidetoolBar:W,extraUse:Be}),(0,u.jsxs)("div",{className:"markdown-editor-body",children:[(0,u.jsx)("div",{className:"codemirror-container",children:(0,u.jsx)("textarea",{ref:St,placeholder:ye})}),Ee?(0,u.jsxs)("div",{ref:ut,className:"preview-container",children:["stex"===k&&(0,u.jsx)(s,{value:Me}),"stex"!==k&&(0,u.jsx)(w.Z,{disabledFill:Le,showProgramFill:H,value:Me})]}):null]})]})}),A?(0,u.jsx)("a",{ref:wt,className:"editor-resize"}):null,Xe===ie&&(0,u.jsx)(M,{callback:ct,onCancel:ft}),Xe===de&&(0,u.jsx)(U,{callback:ct,onCancel:ft}),(0,u.jsx)(v.Z,{children:fe[Xe]&&Xe!==ie&&Xe!==de?(0,u.jsx)(N.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ot,top:ht},title:(0,u.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-ot,n=e.clientY-ht;document.body.onmousemove=function(e){var a=e.clientX-t,g=e.clientY-n,o=document.getElementsByClassName("markdown-popup-form")[0],r=window.innerWidth-o.offsetWidth,d=window.innerHeight-o.offsetHeight;a=Math.max(0,Math.min(a,r)),g=Math.max(0,Math.min(g,d)),yt(e.clientX,e.clientY,t,n)&&(rt(a),mt(g))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:fe[Xe]}),open:!0,onCancel:ft,footer:null,destroyOnClose:!0,width:Xe===de?"1200px":null,height:Xe===de?"80vh":null,className:"markdown-popup-form",children:pt}):null})]})}},48347:function(e,t,n){"use strict";n.d(t,{Z:function(){return c},I:function(){return f}});var a=n(82242),g=n.n(a),o=n(79800),r=n.n(o),d=n(78241),i=n(8591),h=n(92832),m=n(3113),S=n(37318),P=n(59301),w=n(37712),u=d.Z.useForm,s={width:280,marginRight:10},l={labelCol:{span:5},wrapperCol:{span:19}},c=function(e){var t=e.callback,n=e.onCancel,a=u(),o=r()(a,1)[0],S=(0,P.useRef)();function c(e,t){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):i.ZP.error(e.message)}return(0,w.jsxs)(d.Z,g()(g()({form:o},l),{},{className:"upload-image-panel",onFinish:function(e){t(e,S.current)},style:{width:470,overflow:"hidden"},children:[(0,w.jsx)(d.Z.Item,{label:"图片地址",required:!0,children:(0,w.jsxs)("div",{className:"flex-container",children:[(0,w.jsx)(d.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,w.jsx)(h.Z,{style:s})}),(0,w.jsx)(p,{onFileChange:function(e){var t=e.target.files[0];S.current=t,f(t,c)}})]})}),(0,w.jsx)(d.Z.Item,{label:"图片描述",name:"alt",children:(0,w.jsx)(h.Z,{style:{width:264}})}),(0,w.jsxs)(d.Z.Item,{style:{textAlign:"right"},children:[(0,w.jsx)(m.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,w.jsx)(m.ZP,{type:"default",onClick:n,children:"取消"})]})]}))};function p(e){var t=e.onFileChange;return(0,w.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,w.jsx)("input",{type:"file",onChange:t})]})}function f(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var a=new window.XMLHttpRequest;a.withCredentials=!0,a.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),a.addEventListener("error",(function(e){console.error(e)}),!1),a.open("POST","".concat(S.KI,"/api/attachments.json")),a.send(n)}},32552:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var a=n(82100),g=n.n(a),o=n(29186),r=n.n(o),d=n(80619),i=n.n(d),h=n(47074),m=n.n(h),S=n(59301),P=n(4676),w=function(e){i()(n,e);var t=m()(n);function n(e){var a;g()(this,n),a=t.call(this,e);var o=window.document;return a.node=o.createElement("div"),o.body.appendChild(a.node),a}return r()(n,[{key:"render",value:function(){var e=this.props.children;return(0,P.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(S.Component)},4027:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var a=n(59301);function g(e,t){var n=(0,a.useRef)();(0,a.useEffect)((function(){n.current=e})),(0,a.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}}}]);