[{"data":1,"prerenderedAt":1830},["ShallowReactive",2],{"navigation_docs":3,"-sending-maps":191,"-sending-maps-surround":1825},[4,31,67,103,129,155,175],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-play",{"title":26,"path":27,"stem":28,"icon":29},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F4.agent-skill","i-lucide-sparkles",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"Authoring","i-lucide-pen-line","\u002Fauthoring","2.authoring",[37,42,47,52,57,62],{"title":38,"path":39,"stem":40,"icon":41},"Comark syntax","\u002Fauthoring\u002Fcomark-syntax","2.authoring\u002F1.comark-syntax","i-lucide-file-code",{"title":43,"path":44,"stem":45,"icon":46},"Frontmatter","\u002Fauthoring\u002Ffrontmatter","2.authoring\u002F2.frontmatter","i-lucide-heading",{"title":48,"path":49,"stem":50,"icon":51},"Modules","\u002Fauthoring\u002Fmodules","2.authoring\u002F3.modules","i-lucide-blocks",{"title":53,"path":54,"stem":55,"icon":56},"Merge tags and bindings","\u002Fauthoring\u002Fmerge-tags-and-bindings","2.authoring\u002F4.merge-tags-and-bindings","i-lucide-braces",{"title":58,"path":59,"stem":60,"icon":61},"Actions and spans","\u002Fauthoring\u002Factions-and-spans","2.authoring\u002F5.actions-and-spans","i-lucide-mouse-pointer-click",{"title":63,"path":64,"stem":65,"icon":66},"Compile errors","\u002Fauthoring\u002Fcompile-errors","2.authoring\u002F6.compile-errors","i-lucide-circle-alert",{"title":68,"icon":69,"path":70,"stem":71,"children":72,"page":30},"Rendering","i-lucide-layout-template","\u002Frendering","3.rendering",[73,78,83,88,93,98],{"title":74,"path":75,"stem":76,"icon":77},"Families and streams","\u002Frendering\u002Ffamilies-and-streams","3.rendering\u002F1.families-and-streams","i-lucide-users",{"title":79,"path":80,"stem":81,"icon":82},"Themes","\u002Frendering\u002Fthemes","3.rendering\u002F2.themes","i-lucide-palette",{"title":84,"path":85,"stem":86,"icon":87},"Config and the renderer","\u002Frendering\u002Fconfig-and-renderer","3.rendering\u002F3.config-and-renderer","i-lucide-settings",{"title":89,"path":90,"stem":91,"icon":92},"Layout and spacing","\u002Frendering\u002Flayout-and-spacing","3.rendering\u002F4.layout-and-spacing","i-lucide-ruler",{"title":94,"path":95,"stem":96,"icon":97},"HTML output","\u002Frendering\u002Fhtml-output","3.rendering\u002F5.html-output","i-lucide-code-xml",{"title":99,"path":100,"stem":101,"icon":102},"Plain text","\u002Frendering\u002Fplain-text","3.rendering\u002F6.plain-text","i-lucide-file-text",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":30},"Sending","i-lucide-send","\u002Fsending","4.sending",[109,114,119,124],{"title":110,"path":111,"stem":112,"icon":113},"Message and MIME","\u002Fsending\u002Fmessage-and-mime","4.sending\u002F1.message-and-mime","i-lucide-mail",{"title":115,"path":116,"stem":117,"icon":118},"Router and streams","\u002Fsending\u002Frouter-and-streams","4.sending\u002F2.router-and-streams","i-lucide-route",{"title":120,"path":121,"stem":122,"icon":123},"SMTP","\u002Fsending\u002Fsmtp","4.sending\u002F3.smtp","i-lucide-server",{"title":125,"path":126,"stem":127,"icon":128},"Maps","\u002Fsending\u002Fmaps","4.sending\u002F4.maps","i-lucide-map",{"title":130,"icon":131,"path":132,"stem":133,"children":134,"page":30},"Tooling","i-lucide-wrench","\u002Ftooling","5.tooling",[135,140,145,150],{"title":136,"path":137,"stem":138,"icon":139},"The lttr CLI","\u002Ftooling\u002Fcli","5.tooling\u002F1.cli","i-lucide-terminal",{"title":141,"path":142,"stem":143,"icon":144},"Live preview","\u002Ftooling\u002Flive-preview","5.tooling\u002F2.live-preview","i-lucide-eye",{"title":146,"path":147,"stem":148,"icon":149},"Screenshots","\u002Ftooling\u002Fscreenshots","5.tooling\u002F3.screenshots","i-lucide-camera",{"title":151,"path":152,"stem":153,"icon":154},"Goldens and testing","\u002Ftooling\u002Fgoldens-and-testing","5.tooling\u002F4.goldens-and-testing","i-lucide-flask-conical",{"title":156,"icon":157,"path":158,"stem":159,"children":160,"page":30},"Guides","i-lucide-book-open","\u002Fguides","6.guides",[161,166,170],{"title":162,"path":163,"stem":164,"icon":165},"The Quiet example","\u002Fguides\u002Fthe-quiet-example","6.guides\u002F1.the-quiet-example","i-lucide-mail-open",{"title":167,"path":168,"stem":169,"icon":82},"Your own family and theme","\u002Fguides\u002Fyour-own-family-and-theme","6.guides\u002F2.your-own-family-and-theme",{"title":171,"path":172,"stem":173,"icon":174},"Releasing","\u002Fguides\u002Freleasing","6.guides\u002F3.releasing","i-lucide-tag",{"title":176,"icon":177,"path":178,"stem":179,"children":180,"page":30},"Reference","i-lucide-library","\u002Freference","7.reference",[181,186],{"title":182,"path":183,"stem":184,"icon":185},"API reference","\u002Freference\u002Fapi-reference","7.reference\u002F1.api-reference","i-lucide-list-tree",{"title":187,"path":188,"stem":189,"icon":190},"Gallery","\u002Freference\u002Fgallery","7.reference\u002F2.gallery","i-lucide-images",{"id":192,"title":125,"body":193,"description":1818,"extension":1819,"links":1820,"meta":1821,"navigation":1822,"path":126,"seo":1823,"stem":127,"__hash__":1824},"docs\u002F4.sending\u002F4.maps.md",{"type":194,"value":195,"toc":1810},"minimark",[196,217,232,240,391,412,452,713,719,723,782,803,1148,1151,1159,1188,1192,1274,1283,1328,1331,1334,1363,1787,1791,1806],[197,198,199,200,204,205,208,209,212,213,216],"p",{},"The ",[201,202,203],"code",{},"::map"," component (used by the ",[201,206,207],{},"job.offered"," example's driver email) needs a static map image URL. The ",[201,210,211],{},"mapbox"," package builds that URL and fetches the image; it never renders anything into the template itself — you fetch the bytes at send time, upload them to your own CDN, and put the CDN URL in ",[201,214,215],{},"::map{src}",".",[218,219,220,221,225,226,231],"warning",{},"The Static Images API URL carries your Mapbox access token in its query string. ",[222,223,224],"strong",{},"Never hot-link it or put it directly in an email."," See ",[227,228,230],"a",{"href":229},"#upload-to-your-own-cdn","Upload to your own CDN"," below.",[233,234,236,237],"h2",{"id":235},"configure-static","Configure ",[201,238,239],{},"Static",[241,242,247],"pre",{"className":243,"code":244,"language":245,"meta":246,"style":246},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","type Point struct{ Lng, Lat float64 }\n\ntype Static struct {\n    Token   string\n    Style   string\n    Width   int\n    Height  int\n    Padding int\n\n    RouteColor   string \u002F\u002F route line stroke\n    PickupColor  string \u002F\u002F pickup pin\n    DropoffColor string \u002F\u002F drop-off pin\n}\n","go","",[201,248,249,282,289,303,312,320,329,337,345,350,363,374,385],{"__ignoreMap":246},[250,251,254,258,262,265,269,272,275,279],"span",{"class":252,"line":253},"line",1,[250,255,257],{"class":256},"sMK4o","type",[250,259,261],{"class":260},"sBMFI"," Point",[250,263,264],{"class":256}," struct{",[250,266,268],{"class":267},"sTEyZ"," Lng",[250,270,271],{"class":256},",",[250,273,274],{"class":267}," Lat ",[250,276,278],{"class":277},"spNyl","float64",[250,280,281],{"class":256}," }\n",[250,283,285],{"class":252,"line":284},2,[250,286,288],{"emptyLinePlaceholder":287},true,"\n",[250,290,292,294,297,300],{"class":252,"line":291},3,[250,293,257],{"class":256},[250,295,296],{"class":260}," Static",[250,298,299],{"class":256}," struct",[250,301,302],{"class":256}," {\n",[250,304,306,309],{"class":252,"line":305},4,[250,307,308],{"class":267},"    Token   ",[250,310,311],{"class":277},"string\n",[250,313,315,318],{"class":252,"line":314},5,[250,316,317],{"class":267},"    Style   ",[250,319,311],{"class":277},[250,321,323,326],{"class":252,"line":322},6,[250,324,325],{"class":267},"    Width   ",[250,327,328],{"class":277},"int\n",[250,330,332,335],{"class":252,"line":331},7,[250,333,334],{"class":267},"    Height  ",[250,336,328],{"class":277},[250,338,340,343],{"class":252,"line":339},8,[250,341,342],{"class":267},"    Padding ",[250,344,328],{"class":277},[250,346,348],{"class":252,"line":347},9,[250,349,288],{"emptyLinePlaceholder":287},[250,351,353,356,359],{"class":252,"line":352},10,[250,354,355],{"class":267},"    RouteColor   ",[250,357,358],{"class":277},"string",[250,360,362],{"class":361},"sHwdD"," \u002F\u002F route line stroke\n",[250,364,366,369,371],{"class":252,"line":365},11,[250,367,368],{"class":267},"    PickupColor  ",[250,370,358],{"class":277},[250,372,373],{"class":361}," \u002F\u002F pickup pin\n",[250,375,377,380,382],{"class":252,"line":376},12,[250,378,379],{"class":267},"    DropoffColor ",[250,381,358],{"class":277},[250,383,384],{"class":361}," \u002F\u002F drop-off pin\n",[250,386,388],{"class":252,"line":387},13,[250,389,390],{"class":256},"}\n",[197,392,393,396,397,400,401,404,405,408,409,216],{},[201,394,395],{},"Width",", ",[201,398,399],{},"Height"," and ",[201,402,403],{},"Padding"," default to 600, 240 and 80 pixels at their zero value (1280px is the maximum for either dimension). ",[201,406,407],{},"Style"," is ",[201,410,411],{},"owner\u002Fid",[197,413,414,417,418,421,422,400,425,428,429,432,433,436,437,439,440,443,444,447,448,451],{},[222,415,416],{},"The three colours are required fields"," (D34): each must be six hex digits without ",[201,419,420],{},"#",", or ",[201,423,424],{},"URL",[201,426,427],{},"Fetch"," fail with ",[201,430,431],{},"mapbox: {name} colour is required"," or ",[201,434,435],{},"must be 6 hex digits without '#'",". The ",[201,438,211],{}," package carries no default brand colours — SPEC's literal ",[201,441,442],{},"#0b4740","\u002F",[201,445,446],{},"#c84a0e"," pins are superseded by this rule, since the library itself must stay brand-neutral. ",[201,449,450],{},"examples\u002Fquiet.Mapbox"," supplies the Quiet brand's own colours:",[241,453,456],{"className":243,"code":454,"filename":455,"language":245,"meta":246,"style":246},"\u002F\u002F Mapbox returns the Static map builder for the T4 band in the Quiet\n\u002F\u002F colours: the pickup pin in the accent orange, the drop-off pin and the\n\u002F\u002F route in the action teal, both read from Theme.\nfunc Mapbox(token, style string) mapbox.Static {\n    l := Theme().Light\n    hex := func(c string) string { return strings.TrimPrefix(c, \"#\") }\n    return mapbox.Static{\n        Token:        token,\n        Style:        style,\n        RouteColor:   hex(string(l.Action)), \u002F\u002F \"0B4740\"\n        PickupColor:  hex(string(l.Accent)), \u002F\u002F \"C84A0E\"\n        DropoffColor: hex(string(l.Action)), \u002F\u002F \"0B4740\"\n    }\n}\n","examples\u002Fquiet\u002Fmapbox.go",[201,457,458,463,468,473,509,526,579,593,607,619,649,677,703,708],{"__ignoreMap":246},[250,459,460],{"class":252,"line":253},[250,461,462],{"class":361},"\u002F\u002F Mapbox returns the Static map builder for the T4 band in the Quiet\n",[250,464,465],{"class":252,"line":284},[250,466,467],{"class":361},"\u002F\u002F colours: the pickup pin in the accent orange, the drop-off pin and the\n",[250,469,470],{"class":252,"line":291},[250,471,472],{"class":361},"\u002F\u002F route in the action teal, both read from Theme.\n",[250,474,475,478,482,485,489,491,494,497,500,503,505,507],{"class":252,"line":305},[250,476,477],{"class":256},"func",[250,479,481],{"class":480},"s2Zo4"," Mapbox",[250,483,484],{"class":256},"(",[250,486,488],{"class":487},"sHdIc","token",[250,490,271],{"class":256},[250,492,493],{"class":487}," style",[250,495,496],{"class":277}," string",[250,498,499],{"class":256},")",[250,501,502],{"class":260}," mapbox",[250,504,216],{"class":256},[250,506,239],{"class":260},[250,508,302],{"class":256},[250,510,511,514,517,520,523],{"class":252,"line":314},[250,512,513],{"class":267},"    l ",[250,515,516],{"class":256},":=",[250,518,519],{"class":480}," Theme",[250,521,522],{"class":256},"().",[250,524,525],{"class":267},"Light\n",[250,527,528,531,533,536,539,541,543,545,548,552,555,557,560,562,564,566,569,572,575,577],{"class":252,"line":322},[250,529,530],{"class":267},"    hex ",[250,532,516],{"class":256},[250,534,535],{"class":256}," func(",[250,537,538],{"class":487},"c",[250,540,496],{"class":277},[250,542,499],{"class":256},[250,544,496],{"class":277},[250,546,547],{"class":256}," {",[250,549,551],{"class":550},"s7zQu"," return",[250,553,554],{"class":267}," strings",[250,556,216],{"class":256},[250,558,559],{"class":480},"TrimPrefix",[250,561,484],{"class":256},[250,563,538],{"class":267},[250,565,271],{"class":256},[250,567,568],{"class":256}," \"",[250,570,420],{"class":571},"sfazB",[250,573,574],{"class":256},"\"",[250,576,499],{"class":256},[250,578,281],{"class":256},[250,580,581,584,586,588,590],{"class":252,"line":331},[250,582,583],{"class":550},"    return",[250,585,502],{"class":260},[250,587,216],{"class":256},[250,589,239],{"class":260},[250,591,592],{"class":256},"{\n",[250,594,595,598,601,604],{"class":252,"line":339},[250,596,597],{"class":267},"        Token",[250,599,600],{"class":256},":",[250,602,603],{"class":267},"        token",[250,605,606],{"class":256},",\n",[250,608,609,612,614,617],{"class":252,"line":347},[250,610,611],{"class":267},"        Style",[250,613,600],{"class":256},[250,615,616],{"class":267},"        style",[250,618,606],{"class":256},[250,620,621,624,626,629,631,633,635,638,640,643,646],{"class":252,"line":352},[250,622,623],{"class":267},"        RouteColor",[250,625,600],{"class":256},[250,627,628],{"class":480},"   hex",[250,630,484],{"class":256},[250,632,358],{"class":277},[250,634,484],{"class":256},[250,636,637],{"class":267},"l",[250,639,216],{"class":256},[250,641,642],{"class":267},"Action",[250,644,645],{"class":256},")),",[250,647,648],{"class":361}," \u002F\u002F \"0B4740\"\n",[250,650,651,654,656,659,661,663,665,667,669,672,674],{"class":252,"line":365},[250,652,653],{"class":267},"        PickupColor",[250,655,600],{"class":256},[250,657,658],{"class":480},"  hex",[250,660,484],{"class":256},[250,662,358],{"class":277},[250,664,484],{"class":256},[250,666,637],{"class":267},[250,668,216],{"class":256},[250,670,671],{"class":267},"Accent",[250,673,645],{"class":256},[250,675,676],{"class":361}," \u002F\u002F \"C84A0E\"\n",[250,678,679,682,684,687,689,691,693,695,697,699,701],{"class":252,"line":376},[250,680,681],{"class":267},"        DropoffColor",[250,683,600],{"class":256},[250,685,686],{"class":480}," hex",[250,688,484],{"class":256},[250,690,358],{"class":277},[250,692,484],{"class":256},[250,694,637],{"class":267},[250,696,216],{"class":256},[250,698,642],{"class":267},[250,700,645],{"class":256},[250,702,648],{"class":361},[250,704,705],{"class":252,"line":387},[250,706,707],{"class":256},"    }\n",[250,709,711],{"class":252,"line":710},14,[250,712,390],{"class":256},[197,714,715,716,718],{},"Write the equivalent for your own brand: read the two theme colours you want for the pins and route, strip their ",[201,717,420],{},", and pass them through.",[233,720,722],{"id":721},"build-the-url","Build the URL",[241,724,726],{"className":243,"code":725,"language":245,"meta":246,"style":246},"func (s Static) URL(pickup, dropoff Point, route []Point) (string, error)\n",[201,727,728],{"__ignoreMap":246},[250,729,730,732,735,738,740,742,745,747,750,752,755,757,759,762,765,768,770,772,774,776,779],{"class":252,"line":253},[250,731,477],{"class":256},[250,733,734],{"class":256}," (",[250,736,737],{"class":487},"s ",[250,739,239],{"class":260},[250,741,499],{"class":256},[250,743,744],{"class":480}," URL",[250,746,484],{"class":256},[250,748,749],{"class":487},"pickup",[250,751,271],{"class":256},[250,753,754],{"class":487}," dropoff",[250,756,261],{"class":260},[250,758,271],{"class":256},[250,760,761],{"class":487}," route",[250,763,764],{"class":256}," []",[250,766,767],{"class":260},"Point",[250,769,499],{"class":256},[250,771,734],{"class":256},[250,773,358],{"class":277},[250,775,271],{"class":256},[250,777,778],{"class":277}," error",[250,780,781],{"class":256},")\n",[197,783,784,785,788,789,791,792,795,796,799,800,216],{},"When ",[201,786,787],{},"route"," is empty, the line runs directly from ",[201,790,749],{}," to ",[201,793,794],{},"dropoff","; pass your own points (e.g. a decoded polyline) to draw the actual path instead. Every point is validated: finite, longitude in ",[250,797,798],{},"-180, 180",", latitude in ",[250,801,802],{},"-90, 90",[241,804,807],{"className":243,"code":805,"filename":806,"language":245,"meta":246,"style":246},"package main\n\nimport (\n    \"fmt\"\n\n    \"github.com\u002Fsulv-io\u002Flttr\u002Fmapbox\"\n)\n\nfunc main() {\n    m := mapbox.Static{\n        Token:        \"pk.example-token\",\n        Style:        \"caribhubs\u002Fquiet-map\",\n        RouteColor:   \"0B4740\",\n        PickupColor:  \"C84A0E\",\n        DropoffColor: \"0B4740\",\n    }\n\n    pickup := mapbox.Point{Lng: -62.72, Lat: 17.30}\n    dropoff := mapbox.Point{Lng: -62.70, Lat: 17.28}\n\n    u, err := m.URL(pickup, dropoff, nil)\n    if err != nil {\n        panic(err)\n    }\n    fmt.Println(u)\n}\n","main.go",[201,808,809,817,821,829,840,844,853,857,861,873,888,904,919,935,951,966,971,976,1017,1053,1058,1091,1107,1120,1125,1143],{"__ignoreMap":246},[250,810,811,814],{"class":252,"line":253},[250,812,813],{"class":256},"package",[250,815,816],{"class":260}," main\n",[250,818,819],{"class":252,"line":284},[250,820,288],{"emptyLinePlaceholder":287},[250,822,823,826],{"class":252,"line":291},[250,824,825],{"class":550},"import",[250,827,828],{"class":256}," (\n",[250,830,831,834,837],{"class":252,"line":305},[250,832,833],{"class":256},"    \"",[250,835,836],{"class":260},"fmt",[250,838,839],{"class":256},"\"\n",[250,841,842],{"class":252,"line":314},[250,843,288],{"emptyLinePlaceholder":287},[250,845,846,848,851],{"class":252,"line":322},[250,847,833],{"class":256},[250,849,850],{"class":260},"github.com\u002Fsulv-io\u002Flttr\u002Fmapbox",[250,852,839],{"class":256},[250,854,855],{"class":252,"line":331},[250,856,781],{"class":256},[250,858,859],{"class":252,"line":339},[250,860,288],{"emptyLinePlaceholder":287},[250,862,863,865,868,871],{"class":252,"line":347},[250,864,477],{"class":256},[250,866,867],{"class":480}," main",[250,869,870],{"class":256},"()",[250,872,302],{"class":256},[250,874,875,878,880,882,884,886],{"class":252,"line":352},[250,876,877],{"class":267},"    m ",[250,879,516],{"class":256},[250,881,502],{"class":260},[250,883,216],{"class":256},[250,885,239],{"class":260},[250,887,592],{"class":256},[250,889,890,892,894,897,900,902],{"class":252,"line":365},[250,891,597],{"class":267},[250,893,600],{"class":256},[250,895,896],{"class":256},"        \"",[250,898,899],{"class":571},"pk.example-token",[250,901,574],{"class":256},[250,903,606],{"class":256},[250,905,906,908,910,912,915,917],{"class":252,"line":376},[250,907,611],{"class":267},[250,909,600],{"class":256},[250,911,896],{"class":256},[250,913,914],{"class":571},"caribhubs\u002Fquiet-map",[250,916,574],{"class":256},[250,918,606],{"class":256},[250,920,921,923,925,928,931,933],{"class":252,"line":387},[250,922,623],{"class":267},[250,924,600],{"class":256},[250,926,927],{"class":256},"   \"",[250,929,930],{"class":571},"0B4740",[250,932,574],{"class":256},[250,934,606],{"class":256},[250,936,937,939,941,944,947,949],{"class":252,"line":710},[250,938,653],{"class":267},[250,940,600],{"class":256},[250,942,943],{"class":256},"  \"",[250,945,946],{"class":571},"C84A0E",[250,948,574],{"class":256},[250,950,606],{"class":256},[250,952,954,956,958,960,962,964],{"class":252,"line":953},15,[250,955,681],{"class":267},[250,957,600],{"class":256},[250,959,568],{"class":256},[250,961,930],{"class":571},[250,963,574],{"class":256},[250,965,606],{"class":256},[250,967,969],{"class":252,"line":968},16,[250,970,707],{"class":256},[250,972,974],{"class":252,"line":973},17,[250,975,288],{"emptyLinePlaceholder":287},[250,977,979,982,984,986,988,990,993,996,998,1001,1005,1007,1010,1012,1015],{"class":252,"line":978},18,[250,980,981],{"class":267},"    pickup ",[250,983,516],{"class":256},[250,985,502],{"class":260},[250,987,216],{"class":256},[250,989,767],{"class":260},[250,991,992],{"class":256},"{",[250,994,995],{"class":267},"Lng",[250,997,600],{"class":256},[250,999,1000],{"class":256}," -",[250,1002,1004],{"class":1003},"sbssI","62.72",[250,1006,271],{"class":256},[250,1008,1009],{"class":267}," Lat",[250,1011,600],{"class":256},[250,1013,1014],{"class":1003}," 17.30",[250,1016,390],{"class":256},[250,1018,1020,1023,1025,1027,1029,1031,1033,1035,1037,1039,1042,1044,1046,1048,1051],{"class":252,"line":1019},19,[250,1021,1022],{"class":267},"    dropoff ",[250,1024,516],{"class":256},[250,1026,502],{"class":260},[250,1028,216],{"class":256},[250,1030,767],{"class":260},[250,1032,992],{"class":256},[250,1034,995],{"class":267},[250,1036,600],{"class":256},[250,1038,1000],{"class":256},[250,1040,1041],{"class":1003},"62.70",[250,1043,271],{"class":256},[250,1045,1009],{"class":267},[250,1047,600],{"class":256},[250,1049,1050],{"class":1003}," 17.28",[250,1052,390],{"class":256},[250,1054,1056],{"class":252,"line":1055},20,[250,1057,288],{"emptyLinePlaceholder":287},[250,1059,1061,1064,1066,1069,1071,1074,1076,1078,1080,1082,1084,1086,1088],{"class":252,"line":1060},21,[250,1062,1063],{"class":267},"    u",[250,1065,271],{"class":256},[250,1067,1068],{"class":267}," err ",[250,1070,516],{"class":256},[250,1072,1073],{"class":267}," m",[250,1075,216],{"class":256},[250,1077,424],{"class":480},[250,1079,484],{"class":256},[250,1081,749],{"class":267},[250,1083,271],{"class":256},[250,1085,754],{"class":267},[250,1087,271],{"class":256},[250,1089,1090],{"class":256}," nil)\n",[250,1092,1094,1097,1099,1102,1105],{"class":252,"line":1093},22,[250,1095,1096],{"class":550},"    if",[250,1098,1068],{"class":267},[250,1100,1101],{"class":256},"!=",[250,1103,1104],{"class":256}," nil",[250,1106,302],{"class":256},[250,1108,1110,1113,1115,1118],{"class":252,"line":1109},23,[250,1111,1112],{"class":480},"        panic",[250,1114,484],{"class":256},[250,1116,1117],{"class":267},"err",[250,1119,781],{"class":256},[250,1121,1123],{"class":252,"line":1122},24,[250,1124,707],{"class":256},[250,1126,1128,1131,1133,1136,1138,1141],{"class":252,"line":1127},25,[250,1129,1130],{"class":267},"    fmt",[250,1132,216],{"class":256},[250,1134,1135],{"class":480},"Println",[250,1137,484],{"class":256},[250,1139,1140],{"class":267},"u",[250,1142,781],{"class":256},[250,1144,1146],{"class":252,"line":1145},26,[250,1147,390],{"class":256},[197,1149,1150],{},"prints a URL of the shape:",[241,1152,1157],{"className":1153,"code":1155,"filename":424,"language":1156,"meta":246},[1154],"language-text","https:\u002F\u002Fapi.mapbox.com\u002Fstyles\u002Fv1\u002Fcaribhubs\u002Fquiet-map\u002Fstatic\u002Fgeojson(%7B%22type%22...),pin-s+C84A0E(-62.72000,17.30000),pin-s+0B4740(-62.70000,17.28000)\u002Fauto\u002F600x240@2x?padding=80&access_token=pk.example-token\n","text",[201,1158,1155],{"__ignoreMap":246},[197,1160,1161,1162,1165,1166,396,1169,1172,1173,1176,1177,1180,1181,1187],{},"The overlay list is, in order: a path-escaped GeoJSON ",[201,1163,1164],{},"LineString"," feature (",[201,1167,1168],{},"\"stroke\": \"#{RouteColor}\"",[201,1170,1171],{},"\"stroke-width\": 4",") for the route, then ",[201,1174,1175],{},"pin-s+{PickupColor}(lng,lat)"," for the pickup, then ",[201,1178,1179],{},"pin-s+{DropoffColor}(lng,lat)"," for the drop-off — coordinates to 5 decimal places. ",[222,1182,1183,1184,1186],{},"No error ",[201,1185,424],{}," returns contains the token"," — errors name only what was wrong (a colour, a style, a point), never the request.",[233,1189,1191],{"id":1190},"fetch-the-image-bytes","Fetch the image bytes",[241,1193,1195],{"className":243,"code":1194,"language":245,"meta":246,"style":246},"func (s Static) Fetch(ctx context.Context, c *http.Client, pickup, dropoff Point, route []Point) ([]byte, error)\n",[201,1196,1197],{"__ignoreMap":246},[250,1198,1199,1201,1203,1205,1207,1209,1212,1214,1217,1220,1222,1225,1227,1230,1233,1236,1238,1241,1243,1246,1248,1250,1252,1254,1256,1258,1260,1262,1265,1268,1270,1272],{"class":252,"line":253},[250,1200,477],{"class":256},[250,1202,734],{"class":256},[250,1204,737],{"class":487},[250,1206,239],{"class":260},[250,1208,499],{"class":256},[250,1210,1211],{"class":480}," Fetch",[250,1213,484],{"class":256},[250,1215,1216],{"class":487},"ctx",[250,1218,1219],{"class":260}," context",[250,1221,216],{"class":256},[250,1223,1224],{"class":260},"Context",[250,1226,271],{"class":256},[250,1228,1229],{"class":487}," c",[250,1231,1232],{"class":256}," *",[250,1234,1235],{"class":260},"http",[250,1237,216],{"class":256},[250,1239,1240],{"class":260},"Client",[250,1242,271],{"class":256},[250,1244,1245],{"class":487}," pickup",[250,1247,271],{"class":256},[250,1249,754],{"class":487},[250,1251,261],{"class":260},[250,1253,271],{"class":256},[250,1255,761],{"class":487},[250,1257,764],{"class":256},[250,1259,767],{"class":260},[250,1261,499],{"class":256},[250,1263,1264],{"class":256}," ([]",[250,1266,1267],{"class":277},"byte",[250,1269,271],{"class":256},[250,1271,778],{"class":277},[250,1273,781],{"class":256},[197,1275,1276,1278,1279,1282],{},[201,1277,427],{}," builds the URL, issues the ",[201,1280,1281],{},"GET",", and returns the body. Three things make it safe to call from a send path:",[1284,1285,1286,1297,1307],"ul",{},[1287,1288,1289,1292,1293,1296],"li",{},[222,1290,1291],{},"The response body is capped at 8 MiB."," A larger body is an error (",[201,1294,1295],{},"mapbox: response body exceeds 8 MiB",") rather than an unbounded read.",[1287,1298,1299,1302,1303,1306],{},[222,1300,1301],{},"A non-200 response names only the status code"," — ",[201,1304,1305],{},"mapbox: unexpected status 404"," — never the URL, so a logged error can't leak the token.",[1287,1308,1309,1312,1313,1316,1317,1320,1321,1324,1325,1327],{},[222,1310,1311],{},"Transport errors are sanitised too."," ",[201,1314,1315],{},"net\u002Fhttp"," wraps client errors in ",[201,1318,1319],{},"*url.Error",", whose ",[201,1322,1323],{},"Error()"," string embeds the request URL; ",[201,1326,427],{}," unwraps to the inner error before returning, so a DNS failure or a timeout doesn't print the token either.",[233,1329,230],{"id":1330},"upload-to-your-own-cdn",[197,1332,1333],{},"The Static Images API URL is short-lived working state, not something to persist or hand to a recipient. The intended flow:",[1335,1336,1337,1343,1346],"ol",{},[1287,1338,1339,1340,1342],{},"Call ",[201,1341,427],{}," at send time (or ahead of time, in a batch job) to get the PNG bytes.",[1287,1344,1345],{},"Upload those bytes to your own object storage \u002F CDN.",[1287,1347,1348,1349,1352,1353,1356,1357,1359,1360,1362],{},"Put ",[222,1350,1351],{},"only the CDN URL"," — never the Mapbox URL — in ",[201,1354,1355],{},"::map{src=\"{{map_url}}\"}"," (see the ",[201,1358,207],{}," example in ",[227,1361,48],{"href":49},").",[241,1364,1366],{"className":243,"code":1365,"filename":806,"language":245,"meta":246,"style":246},"package main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"net\u002Fhttp\"\n\n    \"github.com\u002Fsulv-io\u002Flttr\u002Fmapbox\"\n)\n\nfunc main() {\n    m := mapbox.Static{\n        Token: \"pk.example-token\", Style: \"caribhubs\u002Fquiet-map\",\n        RouteColor: \"0B4740\", PickupColor: \"C84A0E\", DropoffColor: \"0B4740\",\n    }\n    pickup := mapbox.Point{Lng: -62.72, Lat: 17.30}\n    dropoff := mapbox.Point{Lng: -62.70, Lat: 17.28}\n\n    img, err := m.Fetch(context.Background(), http.DefaultClient, pickup, dropoff, nil)\n    if err != nil {\n        fmt.Println(\"fetch failed:\", err) \u002F\u002F safe to log: never contains the token\n        return\n    }\n    mapURL := uploadToCDN(img) \u002F\u002F your own storage; not part of lttr\n    fmt.Println(\"map_url =\", mapURL)\n}\n\nfunc uploadToCDN(img []byte) string {\n    \u002F\u002F upload img to S3 \u002F R2 \u002F GCS \u002F wherever your assets already live\n    return \"https:\u002F\u002Fcdn.caribhubs.com\u002Fmaps\u002Fch-20417.png\"\n}\n",[201,1367,1368,1374,1378,1384,1393,1401,1409,1413,1421,1425,1429,1439,1453,1480,1520,1524,1556,1588,1592,1641,1653,1681,1686,1690,1710,1734,1738,1743,1764,1770,1782],{"__ignoreMap":246},[250,1369,1370,1372],{"class":252,"line":253},[250,1371,813],{"class":256},[250,1373,816],{"class":260},[250,1375,1376],{"class":252,"line":284},[250,1377,288],{"emptyLinePlaceholder":287},[250,1379,1380,1382],{"class":252,"line":291},[250,1381,825],{"class":550},[250,1383,828],{"class":256},[250,1385,1386,1388,1391],{"class":252,"line":305},[250,1387,833],{"class":256},[250,1389,1390],{"class":260},"context",[250,1392,839],{"class":256},[250,1394,1395,1397,1399],{"class":252,"line":314},[250,1396,833],{"class":256},[250,1398,836],{"class":260},[250,1400,839],{"class":256},[250,1402,1403,1405,1407],{"class":252,"line":322},[250,1404,833],{"class":256},[250,1406,1315],{"class":260},[250,1408,839],{"class":256},[250,1410,1411],{"class":252,"line":331},[250,1412,288],{"emptyLinePlaceholder":287},[250,1414,1415,1417,1419],{"class":252,"line":339},[250,1416,833],{"class":256},[250,1418,850],{"class":260},[250,1420,839],{"class":256},[250,1422,1423],{"class":252,"line":347},[250,1424,781],{"class":256},[250,1426,1427],{"class":252,"line":352},[250,1428,288],{"emptyLinePlaceholder":287},[250,1430,1431,1433,1435,1437],{"class":252,"line":365},[250,1432,477],{"class":256},[250,1434,867],{"class":480},[250,1436,870],{"class":256},[250,1438,302],{"class":256},[250,1440,1441,1443,1445,1447,1449,1451],{"class":252,"line":376},[250,1442,877],{"class":267},[250,1444,516],{"class":256},[250,1446,502],{"class":260},[250,1448,216],{"class":256},[250,1450,239],{"class":260},[250,1452,592],{"class":256},[250,1454,1455,1457,1459,1461,1463,1465,1467,1470,1472,1474,1476,1478],{"class":252,"line":387},[250,1456,597],{"class":267},[250,1458,600],{"class":256},[250,1460,568],{"class":256},[250,1462,899],{"class":571},[250,1464,574],{"class":256},[250,1466,271],{"class":256},[250,1468,1469],{"class":267}," Style",[250,1471,600],{"class":256},[250,1473,568],{"class":256},[250,1475,914],{"class":571},[250,1477,574],{"class":256},[250,1479,606],{"class":256},[250,1481,1482,1484,1486,1488,1490,1492,1494,1497,1499,1501,1503,1505,1507,1510,1512,1514,1516,1518],{"class":252,"line":710},[250,1483,623],{"class":267},[250,1485,600],{"class":256},[250,1487,568],{"class":256},[250,1489,930],{"class":571},[250,1491,574],{"class":256},[250,1493,271],{"class":256},[250,1495,1496],{"class":267}," PickupColor",[250,1498,600],{"class":256},[250,1500,568],{"class":256},[250,1502,946],{"class":571},[250,1504,574],{"class":256},[250,1506,271],{"class":256},[250,1508,1509],{"class":267}," DropoffColor",[250,1511,600],{"class":256},[250,1513,568],{"class":256},[250,1515,930],{"class":571},[250,1517,574],{"class":256},[250,1519,606],{"class":256},[250,1521,1522],{"class":252,"line":953},[250,1523,707],{"class":256},[250,1525,1526,1528,1530,1532,1534,1536,1538,1540,1542,1544,1546,1548,1550,1552,1554],{"class":252,"line":968},[250,1527,981],{"class":267},[250,1529,516],{"class":256},[250,1531,502],{"class":260},[250,1533,216],{"class":256},[250,1535,767],{"class":260},[250,1537,992],{"class":256},[250,1539,995],{"class":267},[250,1541,600],{"class":256},[250,1543,1000],{"class":256},[250,1545,1004],{"class":1003},[250,1547,271],{"class":256},[250,1549,1009],{"class":267},[250,1551,600],{"class":256},[250,1553,1014],{"class":1003},[250,1555,390],{"class":256},[250,1557,1558,1560,1562,1564,1566,1568,1570,1572,1574,1576,1578,1580,1582,1584,1586],{"class":252,"line":973},[250,1559,1022],{"class":267},[250,1561,516],{"class":256},[250,1563,502],{"class":260},[250,1565,216],{"class":256},[250,1567,767],{"class":260},[250,1569,992],{"class":256},[250,1571,995],{"class":267},[250,1573,600],{"class":256},[250,1575,1000],{"class":256},[250,1577,1041],{"class":1003},[250,1579,271],{"class":256},[250,1581,1009],{"class":267},[250,1583,600],{"class":256},[250,1585,1050],{"class":1003},[250,1587,390],{"class":256},[250,1589,1590],{"class":252,"line":978},[250,1591,288],{"emptyLinePlaceholder":287},[250,1593,1594,1597,1599,1601,1603,1605,1607,1609,1611,1613,1615,1618,1621,1624,1626,1629,1631,1633,1635,1637,1639],{"class":252,"line":1019},[250,1595,1596],{"class":267},"    img",[250,1598,271],{"class":256},[250,1600,1068],{"class":267},[250,1602,516],{"class":256},[250,1604,1073],{"class":267},[250,1606,216],{"class":256},[250,1608,427],{"class":480},[250,1610,484],{"class":256},[250,1612,1390],{"class":267},[250,1614,216],{"class":256},[250,1616,1617],{"class":480},"Background",[250,1619,1620],{"class":256},"(),",[250,1622,1623],{"class":267}," http",[250,1625,216],{"class":256},[250,1627,1628],{"class":267},"DefaultClient",[250,1630,271],{"class":256},[250,1632,1245],{"class":267},[250,1634,271],{"class":256},[250,1636,754],{"class":267},[250,1638,271],{"class":256},[250,1640,1090],{"class":256},[250,1642,1643,1645,1647,1649,1651],{"class":252,"line":1055},[250,1644,1096],{"class":550},[250,1646,1068],{"class":267},[250,1648,1101],{"class":256},[250,1650,1104],{"class":256},[250,1652,302],{"class":256},[250,1654,1655,1658,1660,1662,1664,1666,1669,1671,1673,1676,1678],{"class":252,"line":1060},[250,1656,1657],{"class":267},"        fmt",[250,1659,216],{"class":256},[250,1661,1135],{"class":480},[250,1663,484],{"class":256},[250,1665,574],{"class":256},[250,1667,1668],{"class":571},"fetch failed:",[250,1670,574],{"class":256},[250,1672,271],{"class":256},[250,1674,1675],{"class":267}," err",[250,1677,499],{"class":256},[250,1679,1680],{"class":361}," \u002F\u002F safe to log: never contains the token\n",[250,1682,1683],{"class":252,"line":1093},[250,1684,1685],{"class":550},"        return\n",[250,1687,1688],{"class":252,"line":1109},[250,1689,707],{"class":256},[250,1691,1692,1695,1697,1700,1702,1705,1707],{"class":252,"line":1122},[250,1693,1694],{"class":267},"    mapURL ",[250,1696,516],{"class":256},[250,1698,1699],{"class":480}," uploadToCDN",[250,1701,484],{"class":256},[250,1703,1704],{"class":267},"img",[250,1706,499],{"class":256},[250,1708,1709],{"class":361}," \u002F\u002F your own storage; not part of lttr\n",[250,1711,1712,1714,1716,1718,1720,1722,1725,1727,1729,1732],{"class":252,"line":1127},[250,1713,1130],{"class":267},[250,1715,216],{"class":256},[250,1717,1135],{"class":480},[250,1719,484],{"class":256},[250,1721,574],{"class":256},[250,1723,1724],{"class":571},"map_url =",[250,1726,574],{"class":256},[250,1728,271],{"class":256},[250,1730,1731],{"class":267}," mapURL",[250,1733,781],{"class":256},[250,1735,1736],{"class":252,"line":1145},[250,1737,390],{"class":256},[250,1739,1741],{"class":252,"line":1740},27,[250,1742,288],{"emptyLinePlaceholder":287},[250,1744,1746,1748,1750,1752,1754,1756,1758,1760,1762],{"class":252,"line":1745},28,[250,1747,477],{"class":256},[250,1749,1699],{"class":480},[250,1751,484],{"class":256},[250,1753,1704],{"class":487},[250,1755,764],{"class":256},[250,1757,1267],{"class":277},[250,1759,499],{"class":256},[250,1761,496],{"class":277},[250,1763,302],{"class":256},[250,1765,1767],{"class":252,"line":1766},29,[250,1768,1769],{"class":361},"    \u002F\u002F upload img to S3 \u002F R2 \u002F GCS \u002F wherever your assets already live\n",[250,1771,1773,1775,1777,1780],{"class":252,"line":1772},30,[250,1774,583],{"class":550},[250,1776,568],{"class":256},[250,1778,1779],{"class":571},"https:\u002F\u002Fcdn.caribhubs.com\u002Fmaps\u002Fch-20417.png",[250,1781,839],{"class":256},[250,1783,1785],{"class":252,"line":1784},31,[250,1786,390],{"class":256},[233,1788,1790],{"id":1789},"next-steps","Next steps",[1284,1792,1793,1801],{},[1287,1794,1795,1797,1798,1800],{},[227,1796,48],{"href":49}," for the ",[201,1799,203],{}," component's frontmatter and attributes.",[1287,1802,1803,1805],{},[227,1804,120],{"href":121}," for delivering the message once the map image is in place.",[1807,1808,1809],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":246,"searchDepth":284,"depth":284,"links":1811},[1812,1814,1815,1816,1817],{"id":235,"depth":284,"text":1813},"Configure Static",{"id":721,"depth":284,"text":722},{"id":1190,"depth":284,"text":1191},{"id":1330,"depth":284,"text":230},{"id":1789,"depth":284,"text":1790},"Build a Mapbox Static Images API URL, fetch the bytes, and keep the access token out of the email and out of your errors.","md",null,{},{"icon":128},{"title":125,"description":1818},"FoaReBUMZ2r6OTSjktNIPbQDrFszy1FC_4hBTEi946s",[1826,1828],{"title":120,"path":121,"stem":122,"description":1827,"icon":123,"children":-1},"The one Sender the library ships, one session per message, and how to test it without a real mail server.",{"title":136,"path":137,"stem":138,"description":1829,"icon":139,"children":-1},"Every lttr subcommand, its flags straight from -h, and its exit codes.",1790309828077]