[{"name":"QRCode","comment":" QR Code encoding and rendering.\n\n@docs QRCode, ErrorCorrection\n\n\n# Encoding\n\n@docs encode, encodeWith\n\n\n# Rendering\n\n@docs toSvg, toSvgWithoutQuietZone, toString, toImage, toImageWithOptions, ImageOptions, defaultImageOptions\n\n\n# Extracting\n\n@docs toMatrix\n\n\n# Error\n\n@docs Error\n\n","unions":[{"name":"Error","comment":" Possible encoding errors.\n","args":[],"cases":[["AlignmentPatternNotFound",[]],["InvalidNumericChar",[]],["InvalidAlphanumericChar",[]],["InvalidUTF8Char",[]],["LogTableException",["Basics.Int"]],["PolynomialMultiplyException",[]],["PolynomialModException",[]],["InputLengthOverflow",[]]]},{"name":"ErrorCorrection","comment":" Error correction level. Provides the following error\ncorrection capability:\n\n  - **Low**: 7% of codewords can be restored.\n  - **Medium**: 15% of codewords can be restored.\n  - **Quartile**: 25% of codewords can be restored.\n  - **High**: 30% of codewords can be restored.\n\n","args":[],"cases":[["Low",[]],["Medium",[]],["Quartile",[]],["High",[]]]},{"name":"QRCode","comment":" QRCode type.\n","args":[],"cases":[]}],"aliases":[{"name":"ImageOptions","comment":" Available options to transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image) with [toImageWithOptions](#toImageWithOptions).\n\n  - `moduleSize` is the size of the module (the dark square) in px;\n  - `moduleColor` and `emptyColor` expects an `Int` as `0xRRGGBBAA`;\n  - `quietZoneSize` is the number of modules the [quiet zone](https://en.wikipedia.org/wiki/QR_code#Standards) should have.\n\n","args":[],"type":"{ moduleSize : Basics.Int, moduleColor : Basics.Int, emptyColor : Basics.Int, quietZoneSize : Basics.Int }"}],"values":[{"name":"defaultImageOptions","comment":" Default options used by [toImage](#toImage).\n\n    defaultImageOptions =\n        { moduleSize = 5\n        , moduleColor = 0xFF\n        , emptyColor = 0xFFFFFFFF\n        , quietZoneSize = 4\n        }\n\n","type":"QRCode.ImageOptions"},{"name":"encode","comment":" Transform a string into a result [Error](#Error)\nor a [QRCode](#QRCode) using `Quartile` [ErrorCorrection](#ErrorCorrection).\n","type":"String.String -> Result.Result QRCode.Error QRCode.QRCode"},{"name":"encodeWith","comment":" Transform a string with a given [ErrorCorrection](#ErrorCorrection)\ninto a result [Error](#Error) or a [QRCode](#QRCode).\n","type":"QRCode.ErrorCorrection -> String.String -> Result.Result QRCode.Error QRCode.QRCode"},{"name":"toImage","comment":" Transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image). You can transform the Image into a [PNG](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#toPngUrl) or [BMP](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#toBmpUrl).\n\n    import Html\n    import Html.Attribute\n    import Image\n    import QRCode\n\n    viewQRCode : String -> Html msg\n    viewQRCode message =\n        QRCode.encode message\n            |> Result.map\n                (\\qrCode ->\n                    Html.img\n                        [ QRCode.toImage qrCode\n                            |> Image.toPngUrl\n                            |> Html.Attribute.src\n                        ]\n                        []\n                )\n            |> Result.withDefault\n                (Html.text \"Error while encoding to QRCode.\")\n\n**Note**: You must install the [`justgook/elm-image`](https://package.elm-lang.org/packages/justgook/elm-image/latest) package in order to use the functions to convert the `Image` type to something else:\n\n```sh\nelm install \"justgook/elm-image\"\n```\n\n","type":"QRCode.QRCode -> Image.Image"},{"name":"toImageWithOptions","comment":" Transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image) with an [ImageOptions](#ImageOptions).\n","type":"QRCode.ImageOptions -> QRCode.QRCode -> Image.Image"},{"name":"toMatrix","comment":" Transform a [QRCode](#QRCode) into a list of list of booleans.\n\n    \"Hello World!\"\n        |> QRCode.encode\n        |> Result.map QRCode.toMatrix\n        |> Result.withDefault []\n\n","type":"QRCode.QRCode -> List.List (List.List Basics.Bool)"},{"name":"toString","comment":" Transform a [QRCode](#QRCode) into a string.\n\n    \"Hello World!\"\n        |> QRCode.encode\n        |> Result.map QRCode.toString\n        |> Result.withDefault \"Error while encoding to QRCode.\"\n\nReturns:\n\n    ■■■■■■■ ■■■■  ■■■■■■■\n    ■     ■ ■■■■  ■     ■\n    ■ ■■■ ■ ■■■■■ ■ ■■■ ■\n    ■ ■■■ ■ ■   ■ ■ ■■■ ■\n    ■ ■■■ ■ ■■■■  ■ ■■■ ■\n    ■     ■    ■  ■     ■\n    ■■■■■■■ ■ ■ ■ ■■■■■■■\n            ■ ■■\n     ■■ ■ ■■  ■   ■ ■■■■■\n    ■■ ■■■   ■■■■ ■■■  ■■\n     ■ ■■ ■■ ■■■■■ ■■■■■■\n     ■■      ■■■■   ■  ■\n    ■  ■ ■■■  ■■■■ ■■\n            ■■ ■■■    ■■\n    ■■■■■■■ ■ ■    ■■ ■■■\n    ■     ■  ■  ■  ■    ■\n    ■ ■■■ ■ ■■■     ■\n    ■ ■■■ ■   ■■  ■■■ ■■\n    ■ ■■■ ■ ■ ■ ■ ■ ■ ■ ■\n    ■     ■ ■  ■    ■  ■\n    ■■■■■■■   ■■■  ■   ■■\n\n","type":"QRCode.QRCode -> String.String"},{"name":"toSvg","comment":" Transform a [QRCode](#QRCode) into a svg element.\n\n    qrCodeView : String -> Html msg\n    qrCodeView message =\n        QRCode.encode message\n            |> Result.map QRCode.toSvg\n            |> Result.withDefault\n                (Html.text \"Error while encoding to QRCode.\")\n\n**Tip**: You can determine the size of the generated svg setting\n`width` and `height` styles.\n\n","type":"QRCode.QRCode -> Html.Html msg"},{"name":"toSvgWithoutQuietZone","comment":" Same as [toSvg](#toSvg), but without the [quiet zone](https://en.wikipedia.org/wiki/QR_code#/media/File:QR_Code_Structure_Example_3.svg).\n","type":"QRCode.QRCode -> Html.Html msg"}],"binops":[]}]