!g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                               !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN O P Q R S TUVW X Y Z [ \]^_`abcdefghijklmnopqrstuvwxy z { | } ~                             ;Safe179"= Safe79"Safe79#/Safe79#~  !"#$%Safe79)& eventloopAlmost all key presses are registered including modifier keys. Expect character keys to come in as their character. Press a c, get a "c". If a modifier is used and a different character is expected, it will be that instead. Press shift + c, get a Ct. Modifiers are also sent as their string representation: "shift", "ctrl" or "alt". Space is expected as "space". &'Safe* ()*++*)(Safe79SQ, eventloop Opcode: 1900 - eventloop Opcode: 1901. eventloop Opcode: 1902/ eventloop Opcode: 18000 eventloop Opcode: 18011 eventloop Opcode: 18022 eventloop Opcode: 23003 eventloop Opcode: 23014 eventloop@Opcode: 2302 Usually this is the top left corner of the element 6 eventloop Opcode: 22019 eventloop Opcode: 2200; eventloop Opcode: 1601< eventloop Opcode: 1602= eventloop Opcode: 1603> eventloop Opcode: 1604? eventloop Opcode: 1605@ eventloop Opcode: 1606A eventloop Opcode: 1607B eventloop Opcode: 1608D eventloop Opcode: 1600E eventloop Opcode: 1500F eventloop Opcode: 1501G eventloop Opcode: 1502H eventloop Opcode: 1503I eventloop Opcode: 2400J eventloop Opcode: 2401K eventloop Opcode: 2402M eventloop Opcode: 1401N eventloop Opcode: 1402P eventloop Opcode: 1400Q eventloop Opcode: 1300R eventloop Opcode: 1301S eventloop Opcode: 1200T eventloop Opcode: 1201U eventloop Opcode: 1000V eventloopOpcode: 1001 First circle = inner circle, Second circle is enclosing circleW eventloop Opcode: 1002X eventloop Opcode: 0900Y eventloop Opcode: 0901Z eventloop Opcode: 0902[ eventloop Opcode: 0903\ eventloop Opcode: 0904] eventloop Opcode: 0800^ eventloop Opcode: 0801_ eventloopOpcode: 0802 [ScreenPixel] should be as long as width * height * 4. Each quad is red,green,blue,alphaa eventloop Opcode: 0701b eventloop Opcode:0702c eventloop Opcode: 0703d eventloop Opcode: 0700f eventloop Opcode: 0601g eventloop Opcode: 0602h eventloop Opcode: 0600j eventloop Opcode: 0501k eventloop Opcode: 0502l eventloop Opcode: 0500m eventloop Opcode: 0400n eventloop Opcode: 0401o eventloop Opcode: 0402p eventloop Opcode: 0403q eventloop Opcode: 0404r eventloop Opcode: 0405s eventloop Opcode: 0406t eventloop Opcode: 0407u eventloop Opcode: 0408v eventloop Opcode: 0300w eventloop Opcode: 0301 x eventloop Opcode: 0302 y eventloop Opcode: 0303 z eventloop Opcode: 0304 { eventloop Opcode: 0305 | eventloopReserved type words Type: t | Opcode Arguments: a | List of arguments for that data type Route: r | Either s for system or u8 for user Object: o | The object that is beneathExample: {r: s, o: {SystemMeasuredText object}}SystemMeasuredText object: {t:2102, a1:[CanvasId, CanvasText object, ScreenDimensions]} Opcode: 0200} eventloop Opcode: 0201~ eventloop Opcode: 0202 eventloop Opcode: 0203 eventloop Opcode: 0204 eventloop Opcode: 0100 eventloop Opcode: 0101 eventloop Opcode: 2000 eventloop Opcode: 2001 eventloop Opcode: 2100 eventloop Opcode: 2101 eventloop In degrees,.-/1024356789:BA@?>=<;CDEHGFIKJLNMOPQRSTUWVX\[ZY]_^`cbadegfhikjlmutsrqponv{zyxw|~}SafeUNoneVNoneVI Safe79=?[ eventloopReturns the vector perpendicular on the given vector between the 2 points. Always has positive y and vector length 1; y is inverted in canvas eventloopReturns the vector perpendicular on the given vector between the 2 points. Always has negative y and vector length 1; y is inverted in canvas eventloop In degrees--Safe79]}Safe79^2      Safe79l" eventloopZ| The point indications are from the perspective of a regular Cartesian cordinate system.' eventloop| Rotation is around a point on the canvas. May be the centre of the boundingbox (enclosing rectangle) or an arbitrary point. Angle is in degrees and counter-clockwise in the cordinate system(from the x-axis to the y-axis) and visually on canvas clock-wise.) eventloop8Should contain atleast 1 shape. Rotation before Position* eventloop| Position is upperleftcorner. Position is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian cordinate system, this is bottom left.+ eventloop| Position is center, eventloopThe first point of the regular polygon, always starts in the direction from the x-axis.(Towards x-infinity). Position is the the centre of the regular polygonB eventloop"| Can contain any number of points@EFGH!"#$%&'(-*)+,./01<?=>B23456789:;@ACDEFGHIJKLMNOPQRSTUVWXYZ[Safem Safe79nS!\]^_`abcdefhgijklmnopqrstuvwxyz{|!ijfhgdecba`_^\]klmnopqrstuvwxyz{| Safe79o !Safe 1789=>?UVXry eventloop Convert to a  eventloop Convert to a  eventloop A version of 8 that works for any data type that has an instance for "Noner"#None79sNone79t$None2t %Noneu[&NoneuNonev)W      !"$#%&/.-,+*)('0123456789W9876543210%&/.-,+*)('!"$#      'Noney(NoneyR)Noney*Noney+Nonez,None{T eventloopeventloop function  eventloopeventloop function -None{.None{;<=>?@None|% !"#$%;<=>?@;<=>?@%$#"! /None|ABCNone}&ABCABC0None}DEFGHNone} DEFGH DEFGH1None~mIJKLMNone~ IJKLMIJKLM 2NoneNOPQRS NoneNOPQRSNOPQRS3NoneTUVNoneeEFGH!"#$%&'(-*)+,./01<?=>B23456789:;@ACDEFGHIJKLMNOPQRSTUVWXYZ[TUVeTUV!"#$%&'(-*)+,./01<?=>B23456789:;@ACDEFGHIJKLMNOPQRSTUVWXYZ[EFGH4NonedWXYZ[ NoneWXYZ[WXYZ[5None\]^_`None&'\]^_`\]^_`&'NoneVabcabc6None7NonedefghNone*,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~defghdefgh|~}v{zyxwmutsrqponlikjhegfd`cba]_^X\[ZYUWVSTQRPOLNMIKJEHGFDC:BA@?>=<;98756243/10,.-8NoneijklNoneijklijkl9None:None: eventloopGrab an outEvent from the outEventQueue and route it to the correct module sender if any. If there isn't one, throw a NoOutRouteException. The router will continue until it: - Comes across a Stop outEvent: Raises a RequestShutdownException - Raises an exception - Receives an exception (Only possibility is ShutdownException) In all cases, a Stop outEvent is sent to all module senders.Nonem eventloop-Starts the entire system. First the setup phase is handled to setup the different concurrent resources. This is followed by the initialization phase where all modules are initialised. Than, the different worker threads are spawned and finally the system thread will go to work as the eventloop thread.^Shutting down is handled centrally through the system thread (main thread). If any of the threads(including the system thread) receive an exception, only the first exception is thrown to the system thread which will try to shutdown immediately. This exception is logged by the system thread. All other exceptions are logged by their respective threads. The system thread will than shutdown the worker threads. This is done by throwing exceptions to all workerthreads except sender threads. These are sent a Stop event. If they take longer than 1 second, to finish up, they will also be thrown an exception.o eventloopUtility function in order to create the different thread actions in the system. Assumed is that the action requires the system configuration, the module configuration and some resource that may be available in the module configuration. mnopqrstuvwx mnopqrstuvwx;None"  eventloop7Checkes to see if there is a node on a certain position eventloopAbstracts the standardized <= to  eventloop Abstracts  back to  BasicShapes and Canvas events eventloop'Translates color datatype to RGBA codes eventloop#Translates the thickness to a float eventloopReturns the point when making a step f long from the point start in the direction of the vector. The length between start pos and result pos is always f. eventloopVector from p1 to p2 eventloopReturns the vector perpendicular on the given vector between the 2 points. Always has positive y and vector length 1; y is inverted in canvas eventloopReturns the vector perpendicular on the given vector between the 2 points. Always has negative y and vector length 1; y is inverted in canvas eventloopReturns the size of the vector"yz{|}~ NoneT      yz{|}~Tyz{|}~      >?@ABCDEFGHIJKLM?NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrrstuvwxyz{|}~     y                                        !"#$%&'()*+,-../00123456789:;<=>??@ABCDEFGHIJKL-dMNOOPQRSSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy5z786{|}~   N                                                     !!!""""""""""""""""""""""""""""""""""################      !!"#$%&'())*+,--./01234567889:;<==>?@@ABCDEFGHIJKLMNOPQRST.U.V.W.X.Y.Z/[/\/]0^0_0`0a0b1c1d1e1f1g2h2i2j2k2l2m3n3o3p4q4r4s4t4u5v5w5x5y5z{|}7~77778888;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;$$$$$$$$$$$%%%%%%%%%%%%%%%%%%&&&&'(())***+,,,,-69::::eventloop-0.8.2.8-inplaceEventloop.Module.FileEventloop.Module.StdInEventloop.Module.StdOutEventloop.Module.Timer#Eventloop.Module.Websocket.KeyboardEventloop.Types.Common!Eventloop.Module.Websocket.CanvasEventloop.Module.BasicShapesEventloop.Utility.Vectors Eventloop.Module.Websocket.MouseEventloop.Module.Graphs#Eventloop.Utility.Trees.GeneralTreeEventloop.Module.DrawTrees!Eventloop.Module.StatefulGraphicsEventloop.Types.EventsEventloop.Types.SystemEventloop.DefaultConfigurationEventloop.CoreEventloop.Module.File.TypesEventloop.Module.StdIn.TypesEventloop.Module.StdOut.TypesEventloop.Module.Timer.Types)Eventloop.Module.Websocket.Keyboard.Types'Eventloop.Module.Websocket.Canvas.Types(Eventloop.Module.Websocket.Canvas.Opcode.Eventloop.Module.Websocket.Canvas.JSONEncoding,Eventloop.Module.BasicShapes.MeasureTextHack&Eventloop.Module.Websocket.Mouse.TypesEventloop.Module.Graphs.Types"Eventloop.Module.BasicShapes.Types"Eventloop.Utility.Trees.LayoutTree Eventloop.Module.DrawTrees.Types*Eventloop.Module.DrawTrees.RoseTreeGeneric$Eventloop.Module.BasicShapes.Classes'Eventloop.Module.StatefulGraphics.TypesEventloop.Types.ExceptionEventloop.Utility.WebsocketsEventloop.Utility.ConfigEventloop.System.TeardownThreadEventloop.System.SenderThread Eventloop.System.RetrieverThreadEventloop.System.Processing%Eventloop.System.InitializationThread Eventloop.System.EventloopThread'Eventloop.System.DisplayExceptionThreadEventloop.Module.Timer.TimerEventloop.Module.StdOut.StdOutEventloop.Module.StdIn.StdInEventloop.Module.File.File$Eventloop.Module.DrawTrees.DrawTrees(Eventloop.Module.BasicShapes.BasicShapes&Eventloop.Module.Websocket.Mouse.Mouse,Eventloop.Module.Websocket.Keyboard.KeyboardEventloop.System.Setup(Eventloop.Module.Websocket.Canvas.Canvas2Eventloop.Module.StatefulGraphics.StatefulGraphicsEventloop.OutRouter Eventloop.System.OutRouterThreadEventloop.Module.Graphs.GraphsEventLoop.Types EventTypesFileOutOpenFile CloseFileRetrieveContents RetrieveLine RetrieveCharIfEOFWriteToFileIn FileOpened FileClosedRetrievedContents RetrievedLine RetrievedCharIsEOFWroteToStdInOutStdInReceiveContentsStdInReceiveLineStdInReceiveCharStdInInStdInReceivedContentsStdInReceivedLineStdInReceivedChar StdOutOut StdOutMessageTimerOutSetTimerSetIntervalTimer UnsetTimerTimerInTickTimerStartFunction StartedTimer TickBufferTimerIdMicroSecondDelayKeyboardKey NumericIdNamedIdProcessingDescriptionEventloopModuleIdentifier ClearPartClearRectangle ClearCanvasCSSUnit CSSPixels CSSPercentage CSSBindPoint CSSFromCenterCSSFromDefault CSSPositionCSSMeasurements CSSTopOffset CSSLeftOffsetCanvasTransformSaveRestore TranslateRotateScale Transform SetTransformResetTransformTransformationMatrix TransformUnit Alignment AlignLeft AlignRight AlignCenterTextFill NoTextFill TextStroke NoTextStrokeTextFillRenderStyleTextStrokeRenderStyleFont CanvasTextCanvasGradientTypeRadialGradientLinearGradientPatternRepetitionRepeatRepeatXRepeatYNoRepeat CanvasImage CanvasElement ImageData RenderStyle CanvasColorCanvasGradient CanvasPatternCanvasColorStopPathFill NoPathFillPathRenderFillStyle PathStroke NoPathStrokePathRenderStrokeStyleScreenPathPartMoveToLineTo BezierCurveToQuadraticCurveToArcToArc Rectangle ClosePathCanvasOperationDrawPathDrawText DoTransformClearFrame CanvasOut SetupCanvasTeardownCanvasCanvasOperations MeasureTextCanvasIn MeasuredTextSystemCanvasOutSystemMeasureTextSystemCanvasInSystemMeasuredTextRoutedMessageOut OutUserCanvasOutSystemCanvasRoutedMessageIn InUserCanvasInSystemCanvasFontSize FontFamilyScreenLineThicknessScaleYScaleX ScaleUnit ScreenCircleColorStopOffset ScreenPixel ScreenColor ScreenAlpha ScreenBlue ScreenGreen ScreenRedScreenColorMetricZIndexCanvasIdScreenEndAngleScreenStartingAngleScreenEndPointScreenControlPointScreenStartingPointScreenDimensions ScreenPoint ScreenAngle ScreenRadius ScreenHeight ScreenWidthScreenYScreenX ScreenMetricOpcodeCanvasSystemReceiveBufferRotateLeftAroundrotateLeftAround ToPolarCoord toPolarCoordToPointtoPointVector2D|+||-||/|* negateVector angleBetween translate ExtremaCoordxMinxMaxyMinyMaxCoordxyPoint PolarCoordOffsetYXLengthRadiansAngledegreesToRadiansradiansToDegrees lengthToPointlengthBetweenPointsdifferenceBetweenPoints averagePointdownPerpendicularupPerpendicular followVectorintersectVector turnToVector originPoint $fCoordPoint$fExtremaCoord[]$fVector2DPoint$fToPointPolarCoord$fCoordPolarCoord$fToPolarCoordPoint$fRotateLeftAroundPoint$fRotateLeftAroundPolarCoord$fVector2DPolarCoord$fShowPolarCoord$fEqPolarCoord $fShowPoint $fEqPoint$fGenericPoint $fNFDataPoint MouseButton MouseLeft MouseRight MouseMiddle MouseEventClick DoubleClick MouseMove MouseDownMouseUp MouseEnter MouseLeave MouseType MouseCanvasMouseSVGMouseInMouseWeighted UnweightedDirected Undirected ThicknessThinThickColorRedBlueGreenPurpleGreyYellowOrangeBlackWhiteGraphnodesedgesdirectedweightedEdgeNodeWeightLabel GraphsOut SetupGraphs DrawGraph InstructionsGraphsInVectorPos BoundingBox RotatePoint AroundCenter AroundPointRotationShapeCompositeShapeCircleRegularPolygonTextLine MultiLineFilledMultiLinePolygonshapes positionM rotationMposition dimensions fillColorstrokeLineThickness strokeColorradiusnumberOfPointstext fontFamilyfontSize alignmentpoint1point2points fillWidthBasicShapesOut DrawShapesNumberOfPoints LowerRight LowerLeft UpperRight UpperLeftStrokeLineThickness FillThickness StrokeColor FillColorAlphaRadius DimensionsHeightWidthPositionGraphicalNumericGeneralizeTreegeneralizeTreeMiddle BottomOffset RightOffset TopOffset LeftOffset GeneralLineGeneralNodeContentGeneralNodeText GeneralNode GeneralTreeGeneralTreeBoxtextFont textHeight charWidthmarginBetweenTreesmarginBetweenNodeContentmarginBetweenNodeRowsmarginBetweenNodeColumnsgeneralNodeDimensionflattenDimensionsgeneralNodeContentDimensionlayoutGeneralTreelayoutGeneralTreeChildren layoutLinelayoutGeneralTreeslayoutGeneralNodeContentListlayoutGeneralNodeContenttextSize treeIndex$fGeneralizeTreeGeneralTree$fShowGeneralNodeContent$fEqGeneralNodeContent$fGenericGeneralNodeContent$fNFDataGeneralNodeContent$fShowGeneralLine$fEqGeneralLine$fGenericGeneralLine$fNFDataGeneralLine$fShowGeneralTree$fEqGeneralTree$fGenericGeneralTree$fNFDataGeneralTreeRoseTreeRoseNodeRBTreeRBNode NodeColorNodeRed NodeBlackNodeGrey DrawTreesOut DrawTrees ToRoseTree toRoseTreegenericToRoseTreeToScreenPathParttoScreenPathPartsToCanvasOperationstoCanvasOperations ToCanvasOut toCanvasOutOverlapsoverlapscontainstouches ToBoundingBox toBoundingBoxToCentertoCenter ToPrimitives toPrimitivesGeometricPrimitivePoints CircleAreaopOnBoundingBoxallRegularPolygonPointsboundingBoxFromPrimitives normalizeBBox roundPoint roundColorstrokePointsForLinestrokePointsForConnection strokePointsstrokePointsClosedPathfindRotationPoint toCanvasTexttoCanvasPathFillhasCanvasPathFillallScreenPolygonPoints NoDimChange noDimChangeGraphicsStates GraphicsState StatefulBBStatefulGraphicStatefulGraphicPerformedDrawnModifiedRemovedNoOpStatefulGraphicsOutDrawRemoveOutOutFileOutTimer OutStdOutOutStdIn OutCanvasOutBasicShapes OutDrawTrees OutGraphsOutStatefulGraphicsStopInStart InKeyboardInMouseInFileInTimerInStdInInCanvasInGraphs$fEqIn$fShowIn$fEqOut $fShowOut $fGenericOut $fNFDataOutIOState TimerState FileStateStatefulGraphicsStateNoStatestartedIntervalTimers startedTimersopenedstates IOConstantsMouseConstantsKeyboardConstantsCanvasConstantsStdInConstantsTimerConstants FileConstants NoConstants clientSocketclientConnection serverSocketcanvasSystemReceiveBuffer stdInInQueue tickInQueue fileInQueue SharedIOStateSharedIOConstantssafePrintToken measureText!EventloopSetupModuleConfigurationmoduleIdentifier initializerFeventRetrieverF preprocessorFpostprocessorF eventSenderF teardownFEventloopSetupConfigurationbeginProgstate eventloopFsetupModuleConfigurationsEventloopSystemConfigurationeventloopConfig moduleConfigssharedIOConstantssharedIOStateTsystemThreadIdretrieverThreadsMoutRouterThreadMsenderThreadsM exceptions isStoppingMEventloopConfiguration progstateT eventloopFunc inEventQueue outEventQueue"EventloopModuleSenderConfigurationsendersenderEventQueueEventloopModuleConfigurationmoduleId ioConstantsioStateT initializerM retrieverM preprocessorMpostprocessorM senderConfigM teardownMSenderEventQueue OutEventQueue InEventQueueOutEventRouterTeardown EventSender PostProcessor PreProcessorEventRetriever Initializer$fShowIOConstantssetupTimerModuleConfigurationtimerModuleIdentifiertimerInitializertimerEventRetrievertimerEventSender timerTeardownsetupStdOutModuleConfigurationstdOutModuleIdentifierstdOutEventSendersetupStdInModuleConfigurationstdInModuleIdentifierstdInInitializerstdInEventRetrieverstdInEventSendersetupFileModuleConfigurationfileModuleIdentifierfileEventRetrieverfileEventSender fileTeardown!setupDrawTreesModuleConfigurationdrawTreesModuleIdentifierdrawTreesPostProcessorshowGeneralTreeList rbExampleTreeroseExampleTree#setupBasicShapesModuleConfigurationbasicShapesModuleIdentifierbasicShapesPostProcessorsetupMouseModuleConfigurationmouseModuleIdentifiermouseInitializermouseEventRetrievermouseEventSender setupKeyboardModuleConfigurationkeyboardModuleIdentifierkeyboardInitializerkeyboardEventRetrieverkeyboardEventSender%allModulesEventloopSetupConfigurationsetupSharedIOConstantssetupSharedIOStatesetupCanvasModuleConfigurationcanvasModuleIdentifiercanvasInitializercanvasEventRetrievercanvasEventSender(setupStatefulGraphicsModuleConfiguration statefulGraphicsModuleIdentifierstatefulGraphicsInitializerstatefulGraphicsPostProcessorstartEventloopSystemterminateWithinOrThrowExceptionthreadActionsBasedOnModulespawnWorkerThreadregisterRetrieverThreadregisterOutRouterThreadregisterSenderThreadthrowShutdownExceptionToThreadallWorkerThreadsretrieverThreadsoutRouterThread senderThreadssetupGraphsModuleConfigurationgraphsModuleIdentifier nodeRadius xArrowSize yArrowSize weightHeightdimCanvasGraphsroundDimCanvasGraphscanvasGraphsWidthcanvasGraphsHeightinstructionsHeightinstructionsBeginAtcanvasInstrWidthcanvasInstrHeightdimCanvasInstrroundDimCanvasInstrcanvasIdGraphscanvasIdInstructionsonNodegraphsPreProcessorgraphsPostProcessorcolorToRGBAColorthicknessToFloatfindNode graphToShapes nodeToShapes edgeToShapes posOnVector vectorizedownPerpendicularToupPerpendicularTo vectorSizeToOpcodetoOpcodeoperationObjectmeasureTextRefsaveMeasureTextuseMeasureTextConnect BottomConnect TopConnect LayoutLineLayoutNodeContent LayoutNodeLayoutNodeText LayoutTreeLBox marginLine lineThickness textThickness printTreeprintNodeContent printLinemarginizeLinePointsbase GHC.GenericsGenericEventloopExceptionTeardownExceptionSendingExceptionProcessingExceptionRetrievingExceptionInitializationExceptionNoOutRouteExceptionRequestShutdownExceptionShuttingDownExceptionexceptionMessagePnetwork-2.8.0.1-4d19edc5880409fead6a41f5bdb5c63a62c3bbffc22258b872fb282e9f114818Network.Socket iNADDR_ANYTwebsockets-0.12.5.3-7b0af35c1706a38808c64acc26af56fbcacd2b5dc6126b1e8570ecc8e8ff417bNetwork.WebSockets.Connection ConnectionUnbufferedReaderThread ReaderThread ClientSocket ServerSocket ReceiveBufferMessagePortHostcreateBindListenServerSocketacceptFirstConnectionsetupWebsocketConnectionhandleCloseRequestException takeMessage writeMessagewriteBinaryMessage isConnectedcloseWebsocketConnectiondestroyWebsocketConnection ipAddress keyboardPort mousePort canvasPortstartTeardowning startSendingsendOnestartRetrieving retrieveOneprocessEventWithModuleprocessEventsWithModules processEventsstartInitializingeventloopSteps eventloopStepstartEventloopingfindProcessorsstartDisplayingExceptionssetupEventloopSystemConfig routeOutEventstartOutRouting outRoutes outRouteOneoutRouteBroadcastStop