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wAA4DgcBwAAQBwcBwAAABwcBwAAB/wcBwAAD/wcBwAAf/4cBwAA/D4cBwAB8A4cBwABwA4eBwABwBwOBwABwBwOB4ABwB4OA4AB4H4OA8AA//4OAYAAf/4PAAAAP8QHAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
canvas2:{"type":"canvas","size":[88,35],"pos":[214,64],"image":"%%IMG0AFgAIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAB8AAAAAAAAAAAAADwAAAAAAAAAAAAADgAAAAAAABwAAAAOAAAAAAAAPgAAAA4AAAAAAAAeAAAADgAAAAAAAA4AAAAHAAAAAAAADgAAAAcAAAAAAAAHAAAABwAAAAAAAAcAAAAHAAAAAAAABwAAcAcAAAAAAAAHAAD+BwAAAAMAIAcAAf8HAAAAB4BwP/ADz4f/gP/DgHD/+AOBx//B/+OAcf/wAQHH/+P/84BwxwAAAOcA88A7gHAHAAA/5wB3wDuAcAcAAf/3AHeAO4BwBwAD//OAc4A7gHgHAAfA84BzgDvA+AcADwBzgOHAeeH4BwAOAHOB4PHw/9wHgA8Ac4fA/+B/jgPgB4Bz/wB/wB4EAfADwHH+AA4AAAAAYAH/8HwAAAAAAAAAAP/wAAAAAAAAAAAAP/AAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}
canvas3:{"type":"canvas","size":[40,62],"pos":[121,88],"image":"%%IMG2ACgAPgDmAQMAJAEFACMBBQAjAQUAIwEFACMBBQAiAQYAIgEGACIBBgAiAQUAIwEFACMBBQAiAQYAIgEGACIBBQAjAQUAIwEFACMBBQAjAQUAIwEFACMBBQAjAQUAIwEFACMBBQAVAQsAAwEGABEBFwAPARkADgEaAA4BGgANAQkABwELAA0BBgANAQgADQEFABABBgANAQUAEQEFAA0BBQARAQUADQEFABEBBQANAQUAEQEFAA0BBgAQAQUADQEGABABBQANAQYAEAEFAA4BBgAPAQUADgEHAA4BBQAPAQcADQEFAA8BCAAMAQUAEAEJAAoBBQARAQsABwEFABIBDwACAQUAEwEVABQBFAAXAREAGgENACABBwD5","draggable":1,"scale":1}
canvas4:{"type":"canvas","size":[31,35],"pos":[156,118],"image":"%%IMG2AB8AIwDgAQMABQEJAA0BBQACAQwADAEFAAEBDQAMARMADAESAA0BDAATAQoAFQEIABgBBgAZAQUAGgEFABoBBQAaAQUAGgEFABkBBgAZAQYAGQEFABoBBQAaAQYAGQEGABkBBgAaAQUAGwEDAK8=","draggable":1,"scale":1}
canvas5:{"type":"canvas","size":[35,38],"pos":[184,115],"image":"%%IMG2ACMAJgDeAQYAHAEIABoBDAAWAQ4AFAERABIBBgACAQoAEQEFAAQBCQASAQMABwEIABQBEAAQARMADwEUAA4BFgAMARcACwEJAAcBCAALAQcADAEFAAsBBQAOAQUACwEFAA4BBQALAQUADgEFAAsBBgAMAQYACwENAAIBCQALARcADQEXAA0BFgAPARQAFgEGAAIBBAD8","draggable":1,"scale":1}
canvas6:{"type":"canvas","size":[33,53],"pos":[215,117],"image":"%%IMG0ACEANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAPgAAAAA+AAAAP/4AAAB//gAAA//+AAAH//4AAA///gAAH/B+AAA/4D4AAH+APgAAfgA/AAB8AD8AAHwAPwAA/AA/AAD8AD8AAPgAPwAA/AA/AAD8AD8AAP8AfwAAf+D/AAA///8AAB///wAAD///AAAD//8AAAD//wAAAAAfAAAAAB8AAAAAHwAAAAAfAAAAAB8AAAAAHwAAAAA/AAAAAD8AAAAAPgAAOAA+AAB8AD4AAH8APgAAf4A+AAB/4H4AAD///gAAH//8AAAD//wAAAH//AAAAH/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}
canvas7:{"type":"canvas","size":[33,53],"pos":[245,116],"image":"%%IMG0ACEANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAPgAAAAA+AAAAP/4AAAB//gAAA//+AAAH//4AAA///gAAH/B+AAA/4D4AAH+APgAAfgA/AAB8AD8AAHwAPwAA/AA/AAD8AD8AAPgAPwAA/AA/AAD8AD8AAP8AfwAAf+D/AAA///8AAB///wAAD///AAAD//8AAAD//wAAAAAfAAAAAB8AAAAAHwAAAAAfAAAAAB8AAAAAHwAAAAA/AAAAAD8AAAAAPgAAOAA+AAB8AD4AAH8APgAAf4A+AAB/4H4AAD///gAAH//8AAAD//wAAAH//AAAAH/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}
canvas8:{"type":"canvas","size":[35,38],"pos":[276,116],"image":"%%IMG2ACMAJgDeAQYAHAEIABoBDAAWAQ4AFAERABIBBgACAQoAEQEFAAQBCQASAQMABwEIABQBEAAQARMADwEUAA4BFgAMARcACwEJAAcBCAALAQcADAEFAAsBBQAOAQUACwEFAA4BBQALAQUADgEFAAsBBgAMAQYACwENAAIBCQALARcADQEXAA0BFgAPARQAFgEGAAIBBAD8","draggable":1,"scale":1}
canvas9:{"type":"canvas","size":[36,58],"pos":[306,98],"image":"%%IMG2ACQAOgD/AAQBAwAgAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUAHwEFAB8BBQAfAQUABQEFABUBEQATARMAEQEVAA8BFgAOARcADQEHAAgBCAAOAQUACwEHAA0BBQAMAQcADAEFAA0BBgAMAQUADQEGAAwBBQAOAQUADAEFAA4BBQAMAQUADgEFAAwBBQANAQYADAEFAA0BBgAMAQUADAEHAAwBBQAKAQgADQEFAAgBCgANARYADQEWAA4BFQAPARIAEwEPAMI=","draggable":1,"scale":1}
canvas10:{"type":"canvas","size":[24,56],"pos":[337,99],"image":"%%IMG0ABgAOAAAAAAAAAAAAAAAAAAAAADgAAH4AAH8AAH+AAD+AAB+AAA+AAA+AAA+AAA+AAA+AAA+AAA+AAA/AAA/AAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfAAAfgAAfwAAfwAAfwAAPgAAAAAAAAAAAAAAAAA==","draggable":1,"scale":1}
canvas11:{"type":"canvas","size":[32,34],"pos":[358,124],"image":"%%IMG2ACAAIgCvAQYAFAEOABEBEAAPARIADQETAAwBDAACAQcACgEIAAgBBgAKAQYACwEFAAoBFgAKARcACQEXAAkBFwAJARYACwEFABsBBgAaAQcAGgEHABoBCwAVARAAEQEQABIBDgATAQ0AFwEIAMk=","draggable":1,"scale":1}
field1:{"type":"field","size":[108,13],"pos":[286,158],"locked":1,"border":0,"style":"plain","align":"center","value":"An interactive tutorial"}
field2:{"type":"field","size":[150,75],"pos":[11,257],"locked":1,"style":"plain","align":"center","value":"This deck includes a utility module 'rect' for manipulating rectangles that you can import into your own decks."}
button1:{"type":"button","size":[94,23],"pos":[36,303],"script":"home.0","text":"Module Docs"}
button2:{"type":"button","size":[94,23],"pos":[401,306],"script":"home.1","text":"Begin..."}

{script:home.0}
on click do
  go["Rect Reference" "SlideDown"]
end
{end}

{script:home.1}
on click do
  go["The Basics" "SlideLeft"]
end
{end}

{card:The Basics}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[15,307],"script":"The Basics.0","text":"Back"}
button2:{"type":"button","size":[60,20],"pos":[436,307],"script":"The Basics.1","text":"Next"}
field1:{"type":"field","size":[204,19],"pos":[148,28],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"The Basics"}
field2:{"type":"field","size":[316,47],"pos":[101,292],"locked":1,"border":0,"style":"plain","align":"center","value":"Normally, an unlocked canvas widget can be scribbled upon.\nIf the \"draggable\" attribute of a canvas is 1, the user can click-and-drag to reposition it while in interact mode.\nTry it!"}
field3:{"type":"field","size":[99,18],"pos":[94,212],"locked":1,"border":0,"style":"plain","align":"center","value":"Non-draggable"}
field4:{"type":"field","size":[99,18],"pos":[312,214],"locked":1,"border":0,"style":"plain","align":"center","value":"Draggable"}
canvas1:{"type":"canvas","size":[100,100],"pos":[93,100]}
canvas2:{"type":"canvas","size":[100,100],"pos":[314,103],"draggable":1,"scale":1}

{script:The Basics.0}
on click do
 go["Prev" "SlideRight"]
end
{end}

{script:The Basics.1}
on click do
 go["Next" "SlideLeft"]
end
{end}

{card:Checkers}
image:"%%[encoded data, 7152 characters]"
{widgets}
button1:{"type":"button","size":[60,20],"pos":[15,307],"script":"The Basics.0","text":"Back"}
button2:{"type":"button","size":[60,20],"pos":[436,307],"script":"The Basics.1","text":"Next"}
field1:{"type":"field","size":[204,19],"pos":[149,26],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"Example: Checkers"}
field2:{"type":"field","size":[313,24],"pos":[103,316],"locked":1,"border":0,"style":"plain","align":"center","value":"Without writing any code, draggable canvases have a number of possible applications, like making simple board games..."}
canvas1:{"type":"canvas","size":[36,34],"pos":[120,271],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas2:{"type":"canvas","size":[36,34],"pos":[153,239],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas3:{"type":"canvas","size":[36,34],"pos":[121,207],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas4:{"type":"canvas","size":[36,34],"pos":[184,206],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas5:{"type":"canvas","size":[36,34],"pos":[216,239],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas6:{"type":"canvas","size":[36,34],"pos":[184,270],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas7:{"type":"canvas","size":[36,34],"pos":[249,206],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas8:{"type":"canvas","size":[36,34],"pos":[281,238],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas9:{"type":"canvas","size":[36,34],"pos":[249,271],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas10:{"type":"canvas","size":[36,34],"pos":[313,206],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas11:{"type":"canvas","size":[36,34],"pos":[344,239],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas12:{"type":"canvas","size":[36,34],"pos":[312,271],"show":"transparent","border":0,"image":"%%IMG2ACQAIgCeAQgAGgECDQgBAgAWAQINDAECABMBAg0OAQIAEQEBDRIBAQAPAQENFAEBAA0BAg0UAQIADAEBDRYBAQALAQENGAEBAAoBAQ0YAQEACQEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAgBAQ0aAQEACAEBDRoBAQAIAQENGgEBAAkBAQ0YAQEACgEBDRgBAQALAQENFgEBAAwBAg0UAQIADQEBDRQBAQAPAQENEgEBABEBAg0OAQIAEwECDQwBAgAWAQINCAECABoBCABW","draggable":1,"scale":1}
canvas13:{"type":"canvas","size":[28,28],"pos":[156,51],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas14:{"type":"canvas","size":[28,28],"pos":[125,83],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas15:{"type":"canvas","size":[28,28],"pos":[156,115],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas16:{"type":"canvas","size":[28,28],"pos":[189,82],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas17:{"type":"canvas","size":[28,28],"pos":[220,50],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas18:{"type":"canvas","size":[28,28],"pos":[253,82],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas19:{"type":"canvas","size":[28,28],"pos":[221,114],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas20:{"type":"canvas","size":[28,28],"pos":[285,51],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas21:{"type":"canvas","size":[28,28],"pos":[316,82],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas22:{"type":"canvas","size":[28,28],"pos":[285,115],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas23:{"type":"canvas","size":[28,28],"pos":[349,114],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}
canvas24:{"type":"canvas","size":[28,28],"pos":[348,50],"show":"transparent","border":0,"image":"%%IMG2ABwAHAAKIAgAEiACBQggAgAOIAIFDCACAAsgAQEBBQ4BASABAAkgAQUSIAEAByABBRQgAQAFIAEBAQUUAQEgAQAEIAEFFiABAAMgAQUYIAEAAiABBRggAQABIAEFGiACBRogAgUaIAIFGiACBRogAgUaIAIFGiACBRogAQABIAEFGCABAAIgAQUYIAEAAyABBRYgAQAEIAEBAQUUAQEgAQAFIAEFFCABAAcgAQUSIAEACSABAQEFDgEBIAEACyACBQwgAgAOIAIFCCACABIgCAAK","draggable":1,"scale":1}

{card:Poetry}
image:"%%[encoded data, 4504 characters]"
{widgets}
button1:{"type":"button","size":[60,20],"pos":[15,307],"script":"The Basics.0","text":"Back"}
button2:{"type":"button","size":[60,20],"pos":[436,307],"script":"The Basics.1","text":"Next"}
field1:{"type":"field","size":[204,19],"pos":[148,28],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"Example: Magnetic Poetry"}
field2:{"type":"field","size":[316,28],"pos":[104,305],"locked":1,"border":0,"style":"plain","align":"center","value":"...Or \"magnetic poetry\". The options are limitless."}
word:{"type":"field","size":[110,32],"pos":[383,131],"value":"white"}
button3:{"type":"button","size":[111,20],"pos":[383,169],"script":"Poetry.0","text":"Make Magnet"}
canvas1:{"type":"canvas","size":[20,20],"pos":[124,75],"image":"%%IMG0ABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOYAAQkAAMkAACkAAcYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1}
canvas2:{"type":"canvas","size":[33,20],"pos":[145,75],"image":"%%IMG0ACEAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAABAAAHZJnAAASUpSAABJShIAAElKUgAASTmSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas3:{"type":"canvas","size":[45,20],"pos":[179,75],"image":"%%IMG0AC0AFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAABAAACAAABAAAOZxnHOAASlKUpQAAS9L0pMAAShKEpCAAOZxkncAAABAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1}
canvas4:{"type":"canvas","size":[30,20],"pos":[126,96],"image":"%%IMG0AB4AFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLjOAASlKQAEpSkABKUpAAO4yQAAIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas5:{"type":"canvas","size":[15,20],"pos":[122,125],"image":"%%IMG2AA8AFAB+AQIADwEBAAwBAwALAQEAAgEBAAwBAwBv","draggable":1}
canvas6:{"type":"canvas","size":[25,20],"pos":[138,125],"image":"%%IMG0ABkAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAABZjgAAYlIAAEPSAABCEgAAQY4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas7:{"type":"canvas","size":[36,20],"pos":[164,125],"image":"%%IMG0ACQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAwAAAQABAAEFxjEAAKkpSQAAqS95AABRKEEAAFEmMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas8:{"type":"canvas","size":[43,20],"pos":[125,146],"image":"%%IMG0ACsAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAQAAAAAAAcZazIIAASFjElQAASdCElQAASlCEigAAcdCDCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1}
canvas9:{"type":"canvas","size":[38,20],"pos":[127,180],"image":"%%IMG0ACYAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAEAABAAAQADkzzHAASQiSkABJOR6QAElKEJAAOTvMcAAIAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas10:{"type":"canvas","size":[30,20],"pos":[166,180],"image":"%%IMG0AB4AFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSAAAAEgABBbuAAKiSQACokkAAUJJAAFCKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas11:{"type":"canvas","size":[43,20],"pos":[197,180],"image":"%%IMG0ACsAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAggQAAAAAgAQAAAAM5mSZwAASkpUlIAAQkoY9IAASkpUhIAAMkmSZIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1}
canvas12:{"type":"canvas","size":[30,20],"pos":[128,201],"image":"%%IMG0AB4AFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABxjOAASlKQAEpSkABKUpAAcYzgAEAAgABAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas13:{"type":"canvas","size":[59,20],"pos":[121,238],"image":"%%IMG0ADsAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAkAAAAAgAAACQAAEuOZbjGdwAASlKWJSEkgABKUvQl5ySAAEpShCUJJIAAOk5kJMcUgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas14:{"type":"canvas","size":[31,20],"pos":[123,259],"image":"%%IMG0AB8AFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAIAAAAAABzc5gASUpIAElKSABJSkgAcXOIAEBCAABAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas15:{"type":"canvas","size":[28,20],"pos":[248,151],"image":"%%IMG0ABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAABZm4AAYEpAAEHKQABCSkAAQcpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","draggable":1}
canvas16:{"type":"canvas","size":[37,20],"pos":[265,168],"image":"%%IMG0ACUAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAQAAAEEzmWAAKgklgAAqOT0AABRJIQAAFDiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas17:{"type":"canvas","size":[38,20],"pos":[51,216],"image":"%%IMG0ACYAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABCAABAAAIAAHGOzmAASlBSkABLzFLwAEoCUoAAcZxOYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}
canvas18:{"type":"canvas","size":[24,20],"pos":[62,238],"image":"%%IMG0ABgAFAAAAAAAAAAAAAAAAAAAAAAAAAJAAAJAAAdxgAJKQAJLwAJKAAFJgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","draggable":1}
canvas19:{"type":"canvas","size":[15,20],"pos":[91,223],"image":"%%IMG2AA8AFAB+AQMACwEBAA8BAgAPAQEACwEDAHA=","draggable":1}
canvas20:{"type":"canvas","size":[35,20],"pos":[266,233],"image":"%%IMG0ACMAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEgAAAAQCAAAEFzcwAAKkkkgAAqSSeAABRJJAAAFEkTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1}

{script:Poetry.0}
on click do
 s:deck.fonts.body.textsize[word.text]
 c:card.add["canvas"]
 c.draggable:1
 c.size:10+s
 c.pos:(card.size-c.size)/2
 c.text[word.text 5,5]
end
{end}

{card:Constraints}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD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20],"pos":[436,307],"script":"The Basics.1","text":"Next"}
field1:{"type":"field","size":[204,19],"pos":[148,28],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"Constraints"}
field2:{"type":"field","size":[316,47],"pos":[101,292],"locked":1,"border":0,"style":"plain","align":"center","value":"Draggable canvases respond to click[], drag[], and release[] events.\nWe can use the drag[] event handler to reposition a canvas as the user tries to move it, and thus constrain it within certain boundaries,\nin this case the interior of another canvas."}
container:{"type":"canvas","size":[220,172],"pos":[38,82],"locked":1,"image":"%%IMG2ANwArA3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/DWQ=","pattern":13,"scale":1}
canvas1:{"type":"canvas","size":[60,53],"pos":[183,105],"script":"Constraints.0","image":"%%IMG0ADwANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAgAAAAAAAAAEAOAAAAAAAAQBoDAAAAAABDIQ2AAAAAB8eBEYAAAAAMzoehQAAAAAhMDaFAAAAACEwQk0AAAAAITBCeQAAAAAbMD4BAAAAAA4AAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAYAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABYAAAQAAAAAOngYCAAAAAAyxGwIAAAAACKExhgAAAAAIwTCEAAAAAAhBX4QAAAAADEFAAAAAAAAIAUAAAAAAAAABIBAAAAAAAAAxEAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}
field3:{"type":"field","size":[101,14],"pos":[91,68],"locked":1,"border":0,"style":"plain","align":"center","value":"container"}
field4:{"type":"field","size":[227,40],"pos":[275,148],"locked":1,"border":1,"style":"code","value":"on drag do\n me.pos:rect.constrain[me container]\nend"}

{script:Constraints.0}
on drag do
 me.pos:rect.constrain[me container]
end
{end}

{card:Overlaps}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/A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wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/ABE="
{widgets}
field3:{"type":"field","size":[100,14],"pos":[201,188],"locked":1,"border":0,"style":"plain","align":"center","value":"target"}
button1:{"type":"button","size":[60,20],"pos":[15,307],"script":"The Basics.0","text":"Back"}
button2:{"type":"button","size":[60,20],"pos":[436,307],"script":"The Basics.1","text":"Next"}
field1:{"type":"field","size":[204,19],"pos":[148,28],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"Overlaps"}
field2:{"type":"field","size":[316,29],"pos":[101,304],"locked":1,"border":0,"style":"plain","align":"center","value":"We can use the release[] event to make something happen if a draggable canvas is dropped on a particular \"target\" widget."}
target:{"type":"canvas","size":[65,51],"pos":[220,203],"locked":1,"image":"%%IMG2AEEAMw1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ1AAAENQAABDUAAAQ==","pattern":13,"scale":1}
field4:{"type":"field","size":[209,66],"pos":[230,83],"locked":1,"border":1,"style":"code","value":"on release do\n if rect.overlaps[me target]\n  alert[\"You hit the target!\"]\n end\nend"}
canvas1:{"type":"canvas","size":[60,53],"pos":[92,87],"script":"Overlaps.0","image":"%%IMG0ADwANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAgAAAAAAAAAEAOAAAAAAAAQBoDAAAAAABDIQ2AAAAAB8eBEYAAAAAMzoehQAAAAAhMDaFAAAAACEwQk0AAAAAITBCeQAAAAAbMD4BAAAAAA4AAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAYAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABYAAAQAAAAAOngYCAAAAAAyxGwIAAAAACKExhgAAAAAIwTCEAAAAAAhBX4QAAAAADEFAAAAAAAAIAUAAAAAAAAABIBAAAAAAAAAxEAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}

{script:Overlaps.0}
on release do
 if rect.overlaps[me target]
  alert["You hit the target!"]
 end
end
{end}

{card:Snapback}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/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P8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8ABA=="
{widgets}
field3:{"type":"field","size":[100,14],"pos":[210,177],"locked":1,"border":0,"style":"plain","align":"center","value":"target"}
button1:{"type":"button","size":[60,20],"pos":[15,307],"script":"The Basics.0","text":"Back"}
button2:{"type":"button","size":[60,20],"pos":[436,307],"script":"Snapback.0","text":"Home"}
field1:{"type":"field","size":[204,19],"pos":[148,28],"locked":1,"font":"menu","border":0,"style":"plain","align":"center","value":"Snapback"}
field2:{"type":"field","size":[317,45],"pos":[101,290],"locked":1,"border":0,"style":"plain","align":"center","value":"The click[], drag[], and release[] events are given a \"pos\" argument representing the original position of the widget.\nThis can be useful for returning a draggable to where it started if the user moves it to an invalid location."}
target:{"type":"canvas","size":[87,75],"pos":[215,192],"locked":1,"image":"%%IMG2AFcASw3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/Df8N/w3/DZY=","pattern":13,"scale":1}
field4:{"type":"field","size":[174,66],"pos":[231,87],"locked":1,"border":1,"style":"code","value":"on release pos do\n if !rect.inside[me target]\n  me.pos:pos\n end\nend"}
canvas1:{"type":"canvas","size":[60,53],"pos":[97,91],"script":"Snapback.1","image":"%%IMG0ADwANQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAgAAAAAAAAAEAOAAAAAAAAQBoDAAAAAABDIQ2AAAAAB8eBEYAAAAAMzoehQAAAAAhMDaFAAAAACEwQk0AAAAAITBCeQAAAAAbMD4BAAAAAA4AAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAYAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABYAAAQAAAAAOngYCAAAAAAyxGwIAAAAACKExhgAAAAAIwTCEAAAAAAhBX4QAAAAADEFAAAAAAAAIAUAAAAAAAAABIBAAAAAAAAAxEAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","draggable":1,"scale":1}

{script:Snapback.0}
on click do
 go["First" "BoxOut"]
end
{end}

{script:Snapback.1}
on release pos do
 if !rect.inside[me target]
  me.pos:pos
 end
end
{end}

{card:Rect Reference}
image:"%%[encoded data, 4760 characters]"
{widgets}
button1:{"type":"button","size":[60,20],"pos":[16,309],"script":"Rect Reference.0","text":"Back"}
field1:{"type":"field","size":[459,224],"pos":[26,69],"locked":1,"border":0,"value":{"text":["The rect module operates on widgets or dictionaries with a pos and size field, which should be pairs of numbers. It provides the following routines:\n\n","rect.make[pos size]",": construct a rectangle dictionary.\n\n","rect.overlaps[a b]",": returns 1 if rectangle a partially or fully overlaps rectangle b, otherwise 0.\n\n","rect.inside[a b]",": returns 1 if rectangle a is entirely within rectangle b, otherwise 0.\n\n","rect.constrain[a b]",": returns the closest pos for rectangle a which is inside rectangle b.\n\n","rect.union[a b]",": returns the smallest rectangle enclosing both rectangles a and b.\n\n","rect.intersect[a b]",": returns a rectangle giving the area overlapped by both rectangles a and b.\n"],"font":["","mono","","mono","","mono","","mono","","mono","","mono",""],"arg":["","","","","","","","","","","","",""]}}

{script:Rect Reference.0}
on click do
 go["Back" "SlideUp"]
end
{end}

{module:rect}
description:"Utilities for working with rectangles"
version:1
{script}
module.make     :on make      a b do ("pos","size") dict (list a),(list b)                   end
module.overlaps :on overlaps  a b do min(a.pos<b.pos+b.size),b.pos<a.pos+a.size              end
module.inside   :on inside    a b do min(a.pos>b.pos),(a.pos+a.size)<b.pos+b.size            end
module.constrain:on constrain a b do (b.pos+b.size-a.size)&b.pos|a.pos                       end
module.union    :on union     a b do p:a.pos&b.pos make[p ((a.pos+a.size)|(b.pos+b.size))-p] end
module.intersect:on intersect a b do p:a.pos|b.pos make[p ((a.pos+a.size)&(b.pos+b.size))-p] end
{end}

