[{"name":"System.Actor","comment":"\n\n\n# Actor\n\nIn the context of this package an Actor is a Component that is mapped to the System.\n\nCurrently there are three components defined;\n\n  - The Worker Component\n  - The Ui Component\n  - The Layout Component\n\nAn Actor probably looks very familiar to you,\nthat is because it closely resembles the Elm Program definition.\n\nIt should be relativaly straight forwards to map you exisiting Elm component on top\nof one of the existing Components.\n\nActors can communicate directly with other Actors only when it knows it's PID.\n\n@docs Actor\n\n@docs SystemActor, toSystemActor\n\n","unions":[],"aliases":[{"name":"Actor","comment":" An Actor looks a lot like a Browser.element !\n","args":["model","actorModel","output","msg"],"type":"{ init : ( System.Internal.PID.PID, Json.Decode.Value ) -> ( actorModel, msg ), update : model -> msg -> System.Internal.PID.PID -> ( actorModel, msg ), view : model -> System.Internal.PID.PID -> (System.Internal.PID.PID -> Maybe.Maybe output) -> output, subscriptions : model -> System.Internal.PID.PID -> Platform.Sub.Sub msg, events : System.Internal.Event.Event -> System.Internal.PID.PID -> System.Event.EventHandler msg }"},{"name":"SystemActor","comment":" An Actor within the System has a different Type.\n\nYou can create SystemActors using the `toSystemActor` function.\n\n","args":["actorModel","output","msg"],"type":"System.Internal.SystemActor.SystemActor actorModel output msg"}],"values":[{"name":"toSystemActor","comment":" Apply your model over your Actor to create a SystemActor\n","type":"System.Actor.Actor model actorModel output msg -> model -> System.Actor.SystemActor actorModel output msg"}],"binops":[]},{"name":"System.Browser","comment":" This module helps you set up an System Program.\n\n\n# Elements\n\nCreate an HTML element managed by Elm.\n\n@docs element\n\n\n# Applications\n\nCreate an application that manages Url changes.\n\nWhen the application starts, init gets the initial Url. You can show different things depending on the Url!\n\nWhen someone clicks a link, like <a href=\"/home\">Home</a>, it always goes through onUrlRequest. The resulting message goes to your update function, giving you a chance to save scroll position or persist data before changing the URL yourself with pushUrl or load. More info on this in the UrlRequest docs!\n\nWhen the URL changes, the new Url goes through onUrlChange. The resulting message goes to update where you can decide what to show next.\n\nApplications always use the Browser.Navigation module for precise control over Url changes.\n\n@docs application\n\n","unions":[],"aliases":[],"values":[{"name":"application","comment":" Create an Application managed by Elm through a System\n","type":"{ apply : actorModel -> System.Internal.SystemActor.SystemActor actorModel output (System.Internal.Message.Message address actorName wrappedMsg), factory : actorName -> ( System.Internal.PID.PID, Json.Decode.Value ) -> ( actorModel, System.Internal.Message.Message address actorName wrappedMsg ), init : flags -> Url.Url -> Browser.Navigation.Key -> List.List (System.Internal.Message.Message address actorName wrappedMsg), view : List.List output -> List.List (Html.Html (System.Internal.Message.Message address actorName wrappedMsg)), onUrlRequest : Browser.UrlRequest -> System.Internal.Message.Message address actorName wrappedMsg, onUrlChange : Url.Url -> System.Internal.Message.Message address actorName wrappedMsg, onLogMessage : System.Internal.Message.LogMessage address actorName wrappedMsg -> System.Internal.Message.Message address actorName wrappedMsg } -> System.Platform.Program flags address actorName actorModel wrappedMsg"},{"name":"element","comment":" Create an HTML element managed by Elm through a System.\n","type":"{ apply : actorModel -> System.Internal.SystemActor.SystemActor actorModel output (System.Internal.Message.Message address actorName wrappedMsg), factory : actorName -> ( System.Internal.PID.PID, Json.Decode.Value ) -> ( actorModel, System.Internal.Message.Message address actorName wrappedMsg ), init : flags -> List.List (System.Internal.Message.Message address actorName wrappedMsg), view : List.List output -> Html.Html (System.Internal.Message.Message address actorName wrappedMsg), onLogMessage : System.Internal.Message.LogMessage address actorName wrappedMsg -> System.Internal.Message.Message address actorName wrappedMsg } -> System.Platform.Program flags address actorName actorModel wrappedMsg"}],"binops":[]},{"name":"System.Component.Layout","comment":"\n\n\n# Layout\n\nA Layout is a component that can spawn, hold and render other components.\n\n@docs Layout, toActor\n\n","unions":[],"aliases":[{"name":"Layout","comment":" The Type of a Layout Component\n","args":["model","msgIn","msgOut","msg"],"type":"{ init : ( System.Process.PID, Json.Decode.Value ) -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), update : msgIn -> model -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), subscriptions : model -> Platform.Sub.Sub msgIn, events : System.Event.ComponentEventHandlers msgIn, view : (msgIn -> msg) -> model -> (System.Process.PID -> Html.Html msg) -> Html.Html msg }"}],"values":[{"name":"toActor","comment":" Create an Actor from a Layout\n","type":"System.Component.Layout.Layout model msgIn msgOut (System.Internal.Message.Message address actorName wrappedMsg) -> { wrapModel : model -> actorModel, wrapMsg : msgIn -> wrappedMsg, mapIn : wrappedMsg -> Maybe.Maybe msgIn, mapOut : System.Process.PID -> msgOut -> System.Internal.Message.Message address actorName wrappedMsg } -> System.Actor.Actor model actorModel (Html.Html (System.Internal.Message.Message address actorName wrappedMsg)) (System.Internal.Message.Message address actorName wrappedMsg)"}],"binops":[]},{"name":"System.Component.Ui","comment":"\n\n\n# Ui\n\nA Ui component can't spawn or render other Actors.\n\n@docs Ui, toActor\n\n","unions":[],"aliases":[{"name":"Ui","comment":" The Type of a Ui Component\n","args":["model","msgIn","msgOut"],"type":"{ init : ( System.Process.PID, Json.Decode.Value ) -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), update : msgIn -> model -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), subscriptions : model -> Platform.Sub.Sub msgIn, events : System.Event.ComponentEventHandlers msgIn, view : model -> Html.Html msgIn }"}],"values":[{"name":"toActor","comment":" Create an Actor from a Ui\n","type":"System.Component.Ui.Ui model msgIn msgOut -> { wrapModel : model -> actorModel, wrapMsg : msgIn -> wrappedMsg, mapIn : wrappedMsg -> Maybe.Maybe msgIn, mapOut : System.Process.PID -> msgOut -> System.Internal.Message.Message address actorName wrappedMsg } -> System.Actor.Actor model actorModel (Html.Html (System.Internal.Message.Message address actorName wrappedMsg)) (System.Internal.Message.Message address actorName wrappedMsg)"}],"binops":[]},{"name":"System.Component.Worker","comment":"\n\n\n# Worker\n\nA Worker is a [headless](https://en.wikipedia.org/wiki/Headless_software) Actor, it has no user interface.\n\nThis is great if you want to use an Actor as the “brain” for something else.\n\n@docs Worker, toActor\n\n","unions":[],"aliases":[{"name":"Worker","comment":" The Type of a Worker Component\n","args":["model","msgIn","msgOut"],"type":"{ init : ( System.Process.PID, Json.Decode.Value ) -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), update : msgIn -> model -> ( model, List.List msgOut, Platform.Cmd.Cmd msgIn ), subscriptions : model -> Platform.Sub.Sub msgIn, events : System.Event.ComponentEventHandlers msgIn }"}],"values":[{"name":"toActor","comment":" Create an Actor from a Worker\n","type":"System.Component.Worker.Worker model msgIn msgOut -> { wrapModel : model -> actorModel, wrapMsg : msgIn -> wrappedMsg, mapIn : wrappedMsg -> Maybe.Maybe msgIn, mapOut : System.Process.PID -> msgOut -> System.Internal.Message.Message address actorName wrappedMsg } -> System.Actor.Actor model actorModel (Html.Html msg) (System.Internal.Message.Message address actorName wrappedMsg)"}],"binops":[]},{"name":"System.Debug","comment":"\n\n\n# Processes\n\n@docs pidToInt, pidToString, pidSpawnedBy\n\n","unions":[],"aliases":[],"values":[{"name":"pidSpawnedBy","comment":" Get the PID responsible for spawing the given PID\n","type":"System.Internal.PID.PID -> System.Internal.PID.PID"},{"name":"pidToInt","comment":" Represent a PID as an Int\n","type":"System.Internal.PID.PID -> Basics.Int"},{"name":"pidToString","comment":" Represent a PID as a String\n","type":"System.Internal.PID.PID -> String.String"}],"binops":[]},{"name":"System.Event","comment":"\n\n\n# Event Handling\n\n@docs EventHandler, default, ignore, beforeDefault, custom\n\n\n# Component\n\nYour components can receive Events that are being spawned by the System.\nIt's up to your component to handle these.\n\n@docs ComponentEventHandlers, systemDefault, ignoreAll\n\n","unions":[],"aliases":[{"name":"ComponentEventHandlers","comment":" Components need to supply the following event handlers\n","args":["msgIn"],"type":"{ onPIDNotFound : System.Internal.PID.PID -> System.Event.EventHandler msgIn, onKill : System.Event.EventHandler msgIn }"},{"name":"EventHandler","comment":" A System Event Handler\n","args":["msgIn"],"type":"System.Internal.Event.EventHandler msgIn"}],"values":[{"name":"beforeDefault","comment":" Before the default behaviour respond with a custom msgIn\n","type":"msgIn -> System.Event.EventHandler msgIn"},{"name":"custom","comment":" Ignore the default behaviour and respond with a custom msgIn\n","type":"msgIn -> System.Event.EventHandler msgIn"},{"name":"default","comment":" Let the System decide what to do\n","type":"System.Event.EventHandler msgIn"},{"name":"ignore","comment":" Ignore the event\n","type":"System.Event.EventHandler msgIn"},{"name":"ignoreAll","comment":" You can choose to ignore all events\n","type":"System.Event.ComponentEventHandlers msgIn"},{"name":"systemDefault","comment":" You can choose to apply a sytem default behaviour\n\nIt might be easy to start with systemDefault when specifying your components event handlers.\n\n    { systemDefault | onKill = beforeDefault SaveProgress }\n\n","type":"System.Event.ComponentEventHandlers msgIn"}],"binops":[]},{"name":"System.Log","comment":" The System and your Actors can LogMessage through this module.\n\nThe System itself doesn't store these log messages anywhere,\nIt's up to you to handle and/or store these messages through an Actor.\n\n@docs LogMessage\n\n\n# Create\n\n@docs emergency, alert, critical, error, warning, notice, info, debug\n\n\n# Time\n\nWhen you create a log message through any of the create helpers\nyour log message will not have a time accociated with it.\n\n@docs withPosix\n\n\n# Msg\n\nWhat was the message that resulted in this LogMessage?\nI don't know, but if you supply it I'll store it on the LogMessage type!\n\n@docs withMessage\n\n\n# Helpers\n\n@docs toString, severityToString, toMeta\n\n","unions":[],"aliases":[{"name":"LogMessage","comment":" The opaque LogMessage type\n\nYou can create LogMessages using the helper function available\n\n","args":["address","actorName","wrappedMsg"],"type":"System.Internal.Message.LogMessage address actorName wrappedMsg"}],"values":[{"name":"alert","comment":" Create a new LogMessage with the severity Alert\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"critical","comment":" Create a new LogMessage with the severity Critical\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"debug","comment":" Create a new LogMessage with the severity Debug\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"emergency","comment":" Create a new LogMessage with the severity Emergency\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"error","comment":" Create a new LogMessage with the severity Error\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"info","comment":" Create a new LogMessage with the severity Informational\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"notice","comment":" Create a new LogMessage with the severity Notice\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"severityToString","comment":" Severity to String\n","type":"System.Log.Severity -> String.String"},{"name":"toMeta","comment":" LogMessage to Description\n","type":"System.Log.LogMessage address actorName appMsg -> { posix : Maybe.Maybe Time.Posix, severity : System.Log.Severity, pid : System.Internal.PID.PID, message : Maybe.Maybe (System.Message.SystemMessage address actorName appMsg), description : String.String }"},{"name":"toString","comment":" Turn a LogMessage into a String\n\n    error pid wrappedMsg \"I'm sorry Dave, I'm afraid I can't do that\"\n        |> toString\n\n    -- error | 2(1) | I'm sorry Dave, I'm afraid I can't do that\n\n    error system wrappedMsg \"I'm sorry Dave, I'm afraid I can't do that\"\n        |> withPosix now\n        |> toString\n\n    -- 2019/12/25 12:59:59 (UTC) | error | system | I'm sorry Dave, I'm afraid I can't do that\n\n","type":"System.Log.LogMessage address actorName wrappedMsg -> String.String"},{"name":"warning","comment":" Create a new LogMessage with the severity Warning\n","type":"System.Internal.PID.PID -> String.String -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"withMessage","comment":" Supply a Message that resulted in this logMessage\n\nYou could use this to retry a failed command for instance.\n\n","type":"System.Log.LogMessage address actorName wrappedMsg -> System.Message.SystemMessage address actorName wrappedMsg -> System.Log.LogMessage address actorName wrappedMsg"},{"name":"withPosix","comment":" Add a Posix (elm/time) to your LogMessage\n","type":"System.Log.LogMessage address actorName wrappedMsg -> Time.Posix -> System.Log.LogMessage address actorName wrappedMsg"}],"binops":[]},{"name":"System.Message","comment":"\n\n\n# System Messages\n\n@docs SystemMessage\n\n\n# Spawning and Populating\n\nSpawn an Actor and add it to the System's view\n\n    spawn SomeActor populateView\n\nSpawn an Actor, add it to the System's view, and assign it an Address\n\n    spawn\n        SomeActor\n        (\\pid ->\n            batch\n                [ populateView pid\n                , populateAddress pid\n                ]\n        )\n\n@docs spawn, spawnWithFlags, populateView, populateAddress\n\n\n# Destroying\n\n@docs kill\n\n\n# Actor Communication\n\n@docs sendToPid, sendToAddress\n\n\n# Utility\n\n@docs batch, noOperation, toCmd\n\n\n# Application\n\n@docs updateDocumentTitle\n\n\n# Log\n\n@docs log, ignoreLog\n\n","unions":[],"aliases":[{"name":"SystemMessage","comment":" The type of the System Messages\n","args":["address","actorName","appMsg"],"type":"System.Internal.Message.Message address actorName appMsg"}],"values":[{"name":"batch","comment":" Batch perform a list of messages\n","type":"List.List (System.Internal.Message.Message address actorName appMsg) -> System.Internal.Message.Message address actorName appMsg"},{"name":"ignoreLog","comment":" convenience function that ignores all logs\n","type":"System.Internal.Message.LogMessage address actorName appMsg -> System.Internal.Message.Message address actorName appMsg"},{"name":"kill","comment":" Kill a process\n\nThis will trigger the Actors onKill event on which you can decide what to do with this Message.\n\nThere is a Default behaviour available that will remove the Process from the System.\n\n","type":"System.Internal.PID.PID -> System.Internal.Message.Message address actorName appMsg"},{"name":"log","comment":" Log a LogMessage\n\nThis will trigger the onLogMessage function you provided while initializing your application.\n\n","type":"System.Internal.Message.LogMessage address actorName appMsg -> System.Internal.Message.Message address actorName appMsg"},{"name":"noOperation","comment":" Don't do anythinge\n\nThis can be handy for instance when you want to spawn an Actor but don't do anything with it's resulting PID.\n\n    spaw MyActorWorker (always noOperation)\n\n","type":"System.Internal.Message.Message address actorName appMsg"},{"name":"populateAddress","comment":" Add a PID to the System's view\n\nThe System will render views in the order it receives it.\n\n","type":"address -> System.Internal.PID.PID -> System.Internal.Message.Message address actorName appMsg"},{"name":"populateView","comment":" Add a PID to the System's view\n\nThe System will render views in the order it receives it.\n\n","type":"System.Internal.PID.PID -> System.Internal.Message.Message address actorName appMsg"},{"name":"sendToAddress","comment":" Send a message to an Address\n","type":"address -> appMsg -> System.Internal.Message.Message address actorName appMsg"},{"name":"sendToPid","comment":" Send a message to a PID.\n","type":"System.Internal.PID.PID -> appMsg -> System.Internal.Message.Message address actorName appMsg"},{"name":"spawn","comment":" Spawn an Actor\n","type":"actorName -> (System.Internal.PID.PID -> System.Internal.Message.Message address actorName appMsg) -> System.Internal.Message.Message address actorName appMsg"},{"name":"spawnWithFlags","comment":" Spawn an Actor with given flags (as an encoded JSON Value)\n","type":"Json.Encode.Value -> actorName -> (System.Internal.PID.PID -> System.Internal.Message.Message address actorName appMsg) -> System.Internal.Message.Message address actorName appMsg"},{"name":"toCmd","comment":" Converts a msg in to Cmd.\n","type":"msg -> Platform.Cmd.Cmd msg"},{"name":"updateDocumentTitle","comment":" Update the document title\n","type":"String.String -> System.Internal.Message.Message address actorName appMsg"}],"binops":[]},{"name":"System.Platform","comment":"\n\n@docs Program\n\n","unions":[],"aliases":[{"name":"Program","comment":" This will be the type of your program when you create it using this package.\n\nCheckout out the `element` and `application` functions in the System.Browser module to find out how to create a System.Program.\n\n_A [Program](https://package.elm-lang.org/packages/elm/core/latest/Platform#Program) describes an Elm program! How does it react to input? Does it show anything on screen? Etc._\n\n","args":["flags","address","actorName","actorModel","wrappedMsg"],"type":"Platform.Program flags (System.Internal.Model.Model address actorName actorModel) (System.Internal.Message.Message address actorName wrappedMsg)"}],"values":[],"binops":[]},{"name":"System.Process","comment":"\n\n\n# Process ID\n\n@docs PID\n\n\n# Helpers\n\n@docs equals\n\n","unions":[],"aliases":[{"name":"PID","comment":" Each Process has an unique identifier ([PID](https://en.wikipedia.org/wiki/Process_identifier)).\n","args":[],"type":"System.Internal.PID.PID"}],"values":[{"name":"equals","comment":" Check if two PID's are the same\n","type":"System.Process.PID -> System.Process.PID -> Basics.Bool"}],"binops":[]}]