on master help sign in
Make changes to get `Dict` and `Set` working as expected.

Add a note to elm-server indicating that you don't need to restart to recompile code.

commit6ac414c79e2266be88c598d7db26b1783571cf12 authorevancz <info@elm-lang.org> dateWed 12 Dec 2012, 22:52 (14 years ago) parent3afe1fb
8 files changed+549−400
core-elm/Dict.elm+20−21 core-js/Dict.js+371−358 core-js/Prelude.js+18−16 core-js/cat.bat+1−1 elm-server/Server.hs+1 elm-server/elm-server.cabal+2−2 elm/Elm.cabal+2−2 elm/elm-runtime-0.6.0.3.js+134
core-elm/Dict.elm+20−21
@@ -16,7 +16,7 @@ data RBTree k v = RBNode NColor k v (RBTree k v) (RBTree k v) | RBEmpty
1616
1717empty = RBEmpty
1818
19−raise = console.log
19+raise err = throw (JavaScript.castStringToJSString err)
2020
2121{-- Helpers for checking invariants
2222
@@ -254,13 +254,11 @@ moveRedRight t =
254254 let t' = color_flip t in
255255 if isRedLeftLeft t' then color_flip (rotateRight t') else t'
256256
257−moveRedLeftIfNeeded t
258− | not (isRedLeft t) && not (isRedLeftLeft t) = moveRedLeft t
259− | otherwise = t
257+moveRedLeftIfNeeded t =
258+ if not (isRedLeft t) && not (isRedLeftLeft t) then moveRedLeft t else t
260259
261−moveRedRightIfNeeded t
262− | not (isRedRight t) && not (isRedRightLeft t) = moveRedRight t
263− | otherwise = t
260+moveRedRightIfNeeded t =
261+ if not (isRedRight t) && not (isRedRightLeft t) then moveRedRight t else t
264262
265263deleteMin t =
266264 let del t =
@@ -285,7 +283,8 @@ deleteMax t =
285283--}
286284
287285remove k t =
288− let eq_and_noRightNode t = case t of { RBNode _ k' _ _ RBEmpty -> k == k' ; _ -> False }
286+ let eq_and_noRightNode t =
287+ case t of { RBNode _ k' _ _ RBEmpty -> k == k' ; _ -> False }
289288 eq t = case t of { RBNode _ k' _ _ _ -> k == k' ; _ -> False }
290289 delLT t = case moveRedLeftIfNeeded t of
291290 RBNode c k' v l r -> fixUp (RBNode c k' v (del l) r)
@@ -300,12 +299,12 @@ remove k t =
300299 del t = case t of
301300 RBEmpty -> RBEmpty
302301 RBNode _ k' _ _ _ ->
303− let v | k < k' = delLT t
304− | eq_and_noRightNode (if isRedLeft t then rotateRight t else t) = RBEmpty
305− | otherwise = let t' = moveRedRightIfNeeded t in
306− if eq t' then delEQ t' else delGT t'
307− in v
308− in ensureBlackRoot (del t)
302+ if k < k' then delLT t else
303+ let u = if isRedLeft t then rotateRight t else t in
304+ if eq_and_noRightNode u then RBEmpty else
305+ let t' = moveRedRightIfNeeded t in
306+ if eq t' then delEQ t' else delGT t'
307+ in if member k t then ensureBlackRoot (del t) else t
309308{--
310309 if not (invariants_hold t) then
311310 raise "invariants broken before remove"
@@ -329,12 +328,12 @@ foldr f acc t =
329328 RBEmpty -> acc
330329 RBNode _ k v l r -> foldr f (f k v (foldr f acc r)) l
331330
332−union t1 t2 = Dict.foldl insert t2 t1
333−intersect t1 t2 = Dict.foldl (\k v t -> if k `member` t2 then insert k v t else t) empty t1
334−diff t1 t2 = Dict.foldl (\k v t -> remove k t) t1 t2
331+union t1 t2 = foldl insert t2 t1
332+intersect t1 t2 = foldl (\k v t -> if k `member` t2 then insert k v t else t) empty t1
333+diff t1 t2 = foldl (\k v t -> remove k t) t1 t2
335334
336−keys t = Dict.foldl (\k v acc -> k : acc) [] t
337−values t = Dict.foldl (\k v acc -> v : acc) [] t
335+keys t = foldr (\k v acc -> k : acc) [] t
336+values t = foldr (\k v acc -> v : acc) [] t
338337
339−toList t = Dict.foldl (\k v acc -> (k,v) : acc) [] t
340−fromList assocs = List.foldl (uncurry insert) empty assocs
338+toList t = foldr (\k v acc -> (k,v) : acc) [] t
339+fromList assocs = Elm.List.foldl (uncurry insert) empty assocs
core-js/Dict.js+371−358
@@ -1,472 +1,485 @@
11
22Elm.Dict=function(){
3− for(this['i'] in Elm.Prelude){
4− eval('var ' + this['i'] + '=Elm.Prelude[this.i];'); }
3+ var compare = Elm.Prelude.compare;
4+ var uncurry = Elm.Prelude.uncurry;
5+ var Nothing = Elm.Prelude.Nothing;
6+ var Just = Elm.Prelude.Just;
7+ var not = Elm.Prelude.not;
8+ var eq = Elm.Prelude.eq;
59 var isJust=Elm.Maybe.isJust;
6− var Red_0=["Red"];
7− var Black_1=["Black"];
10+ var Red_0=['Red'];
11+ var Black_1=['Black'];
812 function RBNode_2(a1){
913 return function(a2){
1014 return function(a3){
1115 return function(a4){
1216 return function(a5){
13− return ["RBNode",a1,a2,a3,a4,a5];};};};};};
14− var RBEmpty_3=["RBEmpty"];
15− var empty_4=RBEmpty_3;
16− var raise_5=function(x){return x;};
17− function min_6(t_43){
17+ return ['RBNode',a1,a2,a3,a4,a5];};};};};}
18+ var RBEmpty_3=['RBEmpty'];
19+ function min_6(t_42){
1820 return function(){
19− switch(t_43[0]){
20− case "RBEmpty":
21− return raise_5(Value.str("(min RBEmpty) is not defined"));
22− case "RBNode":
23− switch(t_43[4][0]){
24− case "RBEmpty":
25− return ["Tuple2",t_43[2],t_43[3]];
21+ switch(t_42[0]){
22+ case 'RBEmpty':
23+ throw '(min RBEmpty) is not defined';
24+ case 'RBNode':
25+ switch(t_42[4][0]){
26+ case 'RBEmpty':
27+ return ['Tuple2',t_42[2],t_42[3]];
2628 }
27− return min_6(t_43[4]);
29+ return min_6(t_42[4]);
2830 }
29− throw "Non-exhaustive pattern match in case";}();};
30− function lookup_7(k_47){
31− return function(t_48){
31+ throw "Non-exhaustive pattern match in case";}();}
32+ function lookup_7(k_46){
33+ return function(t_47){
3234 return function(){
33− switch(t_48[0]){
34− case "RBEmpty":
35+ switch(t_47[0]){
36+ case 'RBEmpty':
3537 return Nothing;
36− case "RBNode":
38+ case 'RBNode':
3739 return function(){
38− var case6=compare(k_47)(t_48[2]);
39− switch(case6[0]){
40− case "EQ":
41− return Just(t_48[3]);
42− case "GT":
43− return lookup_7(k_47)(t_48[5]);
44− case "LT":
45− return lookup_7(k_47)(t_48[4]);
40+ var case12=compare(k_46)(t_47[2]);
41+ switch(case12[0]){
42+ case 'EQ':
43+ return Just(t_47[3]);
44+ case 'GT':
45+ return lookup_7(k_46)(t_47[5]);
46+ case 'LT':
47+ return lookup_7(k_46)(t_47[4]);
4648 }
4749 throw "Non-exhaustive pattern match in case";}();
4850 }
49− throw "Non-exhaustive pattern match in case";}();};};
50− function findWithDefault_8(base_53){
51− return function(k_54){
52− return function(t_55){
51+ throw "Non-exhaustive pattern match in case";}();};}
52+ function findWithDefault_8(base_52){
53+ return function(k_53){
54+ return function(t_54){
5355 return function(){
54− switch(t_55[0]){
55− case "RBEmpty":
56− return base_53;
57− case "RBNode":
56+ switch(t_54[0]){
57+ case 'RBEmpty':
58+ return base_52;
59+ case 'RBNode':
5860 return function(){
59− var case6=compare(k_54)(t_55[2]);
60− switch(case6[0]){
61− case "EQ":
62− return t_55[3];
63− case "GT":
64− return findWithDefault_8(base_53)(k_54)(t_55[5]);
65− case "LT":
66− return findWithDefault_8(base_53)(k_54)(t_55[4]);
61+ var case19=compare(k_53)(t_54[2]);
62+ switch(case19[0]){
63+ case 'EQ':
64+ return t_54[3];
65+ case 'GT':
66+ return findWithDefault_8(base_52)(k_53)(t_54[5]);
67+ case 'LT':
68+ return findWithDefault_8(base_52)(k_53)(t_54[4]);
6769 }
6870 throw "Non-exhaustive pattern match in case";}();
6971 }
70− throw "Non-exhaustive pattern match in case";}();};};};
71− function member_10(k_66){
72− return function(t_67){
73− return isJust(lookup_7(k_66)(t_67));};};
74− function rotateLeft_11(t_68){
72+ throw "Non-exhaustive pattern match in case";}();};};}
73+ function member_9(k_59){
74+ return function(t_60){
75+ return isJust(lookup_7(k_59)(t_60));};}
76+ function rotateLeft_10(t_61){
7577 return function(){
76− switch(t_68[0]){
77− case "RBNode":
78− switch(t_68[5][0]){
79− case "RBNode":
80− return RBNode_2(t_68[1])(t_68[5][2])(t_68[5][3])(RBNode_2(Red_0)(t_68[2])(t_68[3])(t_68[4])(t_68[5][4]))(t_68[5][5]);
78+ switch(t_61[0]){
79+ case 'RBNode':
80+ switch(t_61[5][0]){
81+ case 'RBNode':
82+ return RBNode_2(t_61[1])(t_61[5][2])(t_61[5][3])(RBNode_2(Red_0)(t_61[2])(t_61[3])(t_61[4])(t_61[5][4]))(t_61[5][5]);
8183 }break;
8284 }
83− return raise_5(Value.str("rotateLeft of a node without enough children"));}();};
84− function rotateRight_12(t_78){
85+ throw 'rotateLeft of a node without enough children';}();}
86+ function rotateRight_11(t_71){
8587 return function(){
86− switch(t_78[0]){
87− case "RBNode":
88− switch(t_78[4][0]){
89− case "RBNode":
90− return RBNode_2(t_78[1])(t_78[4][2])(t_78[4][3])(t_78[4][4])(RBNode_2(Red_0)(t_78[2])(t_78[3])(t_78[4][5])(t_78[5]));
88+ switch(t_71[0]){
89+ case 'RBNode':
90+ switch(t_71[4][0]){
91+ case 'RBNode':
92+ return RBNode_2(t_71[1])(t_71[4][2])(t_71[4][3])(t_71[4][4])(RBNode_2(Red_0)(t_71[2])(t_71[3])(t_71[4][5])(t_71[5]));
9193 }break;
9294 }
93− return raise_5(Value.str("rotateRight of a node without enough children"));}();};
94− function rotateLeftIfNeeded_13(t_88){
95+ throw 'rotateRight of a node without enough children';}();}
96+ function rotateLeftIfNeeded_12(t_81){
9597 return function(){
96− switch(t_88[0]){
97− case "RBNode":
98− switch(t_88[5][0]){
99− case "RBNode":
100− switch(t_88[5][1][0]){
101− case "Red":
102− return rotateLeft_11(t_88);
98+ switch(t_81[0]){
99+ case 'RBNode':
100+ switch(t_81[5][0]){
101+ case 'RBNode':
102+ switch(t_81[5][1][0]){
103+ case 'Red':
104+ return rotateLeft_10(t_81);
103105 }break;
104106 }break;
105107 }
106− return t_88;}();};
107− function rotateRightIfNeeded_14(t_89){
108+ return t_81;}();}
109+ function rotateRightIfNeeded_13(t_82){
108110 return function(){
109− switch(t_89[0]){
110− case "RBNode":
111− switch(t_89[4][0]){
112− case "RBNode":
113− switch(t_89[4][1][0]){
114− case "Red":
115− switch(t_89[4][4][0]){
116− case "RBNode":
117− switch(t_89[4][4][1][0]){
118− case "Red":
119− return rotateRight_12(t_89);
111+ switch(t_82[0]){
112+ case 'RBNode':
113+ switch(t_82[4][0]){
114+ case 'RBNode':
115+ switch(t_82[4][1][0]){
116+ case 'Red':
117+ switch(t_82[4][4][0]){
118+ case 'RBNode':
119+ switch(t_82[4][4][1][0]){
120+ case 'Red':
121+ return rotateRight_11(t_82);
120122 }break;
121123 }break;
122124 }break;
123125 }break;
124126 }
125− return t_89;}();};
126− function otherColor_15(c_90){
127+ return t_82;}();}
128+ function otherColor_14(c_83){
127129 return function(){
128− switch(c_90[0]){
129− case "Black":
130+ switch(c_83[0]){
131+ case 'Black':
130132 return Red_0;
131− case "Red":
133+ case 'Red':
132134 return Black_1;
133135 }
134− throw "Non-exhaustive pattern match in case";}();};
135− function color_flip_16(t_91){
136+ throw "Non-exhaustive pattern match in case";}();}
137+ function color_flip_15(t_84){
136138 return function(){
137− switch(t_91[0]){
138− case "RBNode":
139− switch(t_91[4][0]){
140− case "RBNode":
141− switch(t_91[5][0]){
142− case "RBNode":
143− return RBNode_2(otherColor_15(t_91[1]))(t_91[2])(t_91[3])(RBNode_2(otherColor_15(t_91[4][1]))(t_91[4][2])(t_91[4][3])(t_91[4][4])(t_91[4][5]))(RBNode_2(otherColor_15(t_91[5][1]))(t_91[5][2])(t_91[5][3])(t_91[5][4])(t_91[5][5]));
139+ switch(t_84[0]){
140+ case 'RBNode':
141+ switch(t_84[4][0]){
142+ case 'RBNode':
143+ switch(t_84[5][0]){
144+ case 'RBNode':
145+ return RBNode_2(otherColor_14(t_84[1]))(t_84[2])(t_84[3])(RBNode_2(otherColor_14(t_84[4][1]))(t_84[4][2])(t_84[4][3])(t_84[4][4])(t_84[4][5]))(RBNode_2(otherColor_14(t_84[5][1]))(t_84[5][2])(t_84[5][3])(t_84[5][4])(t_84[5][5]));
144146 }break;
145147 }break;
146148 }
147− return raise_5(Value.str("color_flip called on a RBEmpty or RBNode with a RBEmpty child"));}();};
148− function color_flipIfNeeded_17(t_105){
149+ throw 'color_flip called on a RBEmpty or RBNode with a RBEmpty child';}();}
150+ function color_flipIfNeeded_16(t_98){
149151 return function(){
150− switch(t_105[0]){
151− case "RBNode":
152− switch(t_105[4][0]){
153− case "RBNode":
154− switch(t_105[4][1][0]){
155− case "Red":
156− switch(t_105[5][0]){
157− case "RBNode":
158− switch(t_105[5][1][0]){
159− case "Red":
160− return color_flip_16(t_105);
152+ switch(t_98[0]){
153+ case 'RBNode':
154+ switch(t_98[4][0]){
155+ case 'RBNode':
156+ switch(t_98[4][1][0]){
157+ case 'Red':
158+ switch(t_98[5][0]){
159+ case 'RBNode':
160+ switch(t_98[5][1][0]){
161+ case 'Red':
162+ return color_flip_15(t_98);
161163 }break;
162164 }break;
163165 }break;
164166 }break;
165167 }
166− return t_105;}();};
167− function fixUp_18(t_106){
168− return color_flipIfNeeded_17(rotateRightIfNeeded_14(rotateLeftIfNeeded_13(t_106)));};
169− function ensureBlackRoot_19(t_107){
168+ return t_98;}();}
169+ function fixUp_17(t_99){
170+ return color_flipIfNeeded_16(rotateRightIfNeeded_13(rotateLeftIfNeeded_12(t_99)));}
171+ function ensureBlackRoot_18(t_100){
170172 return function(){
171− switch(t_107[0]){
172− case "RBNode":
173− switch(t_107[1][0]){
174− case "Red":
175− return RBNode_2(Black_1)(t_107[2])(t_107[3])(t_107[4])(t_107[5]);
173+ switch(t_100[0]){
174+ case 'RBNode':
175+ switch(t_100[1][0]){
176+ case 'Red':
177+ return RBNode_2(Black_1)(t_100[2])(t_100[3])(t_100[4])(t_100[5]);
176178 }break;
177179 }
178− return t_107;}();};
179− function insert_20(k_112){
180− return function(v_113){
181− return function(t_114){
180+ return t_100;}();}
181+ function insert_19(k_105){
182+ return function(v_106){
183+ return function(t_107){
182184 return function(){
183− function ins_115(t_116){
185+ function ins_108(t_109){
184186 return function(){
185− switch(t_116[0]){
186− case "RBEmpty":
187− return RBNode_2(Red_0)(k_112)(v_113)(RBEmpty_3)(RBEmpty_3);
188− case "RBNode":
187+ switch(t_109[0]){
188+ case 'RBEmpty':
189+ return RBNode_2(Red_0)(k_105)(v_106)(RBEmpty_3)(RBEmpty_3);
190+ case 'RBNode':
189191 return function(){
190− var h_122=function(){
191− var case6=compare(k_112)(t_116[2]);
192− switch(case6[0]){
193− case "EQ":
194− return RBNode_2(t_116[1])(t_116[2])(v_113)(t_116[4])(t_116[5]);
195− case "GT":
196− return RBNode_2(t_116[1])(t_116[2])(t_116[3])(t_116[4])(ins_115(t_116[5]));
197− case "LT":
198− return RBNode_2(t_116[1])(t_116[2])(t_116[3])(ins_115(t_116[4]))(t_116[5]);
192+ var h_115=function(){
193+ var case114=compare(k_105)(t_109[2]);
194+ switch(case114[0]){
195+ case 'EQ':
196+ return RBNode_2(t_109[1])(t_109[2])(v_106)(t_109[4])(t_109[5]);
197+ case 'GT':
198+ return RBNode_2(t_109[1])(t_109[2])(t_109[3])(t_109[4])(ins_108(t_109[5]));
199+ case 'LT':
200+ return RBNode_2(t_109[1])(t_109[2])(t_109[3])(ins_108(t_109[4]))(t_109[5]);
199201 }
200202 throw "Non-exhaustive pattern match in case";}();
201− return fixUp_18(h_122);}();
203+ return fixUp_17(h_115);}();
202204 }
203− throw "Non-exhaustive pattern match in case";}();};
204− return ensureBlackRoot_19(ins_115(t_114));}();};};};
205− function singleton_21(k_123){
206− return function(v_124){
207− return insert_20(k_123)(v_124)(RBEmpty_3);};};
208− function isRed_22(t_125){
205+ throw "Non-exhaustive pattern match in case";}();}
206+ return ensureBlackRoot_18(ins_108(t_107));}();};};}
207+ function singleton_20(k_116){
208+ return function(v_117){
209+ return insert_19(k_116)(v_117)(RBEmpty_3);};}
210+ function isRed_21(t_118){
209211 return function(){
210− switch(t_125[0]){
211− case "RBNode":
212− switch(t_125[1][0]){
213− case "Red":
212+ switch(t_118[0]){
213+ case 'RBNode':
214+ switch(t_118[1][0]){
215+ case 'Red':
214216 return true;
215217 }break;
216218 }
217− return false;}();};
218− function isRedLeft_23(t_126){
219+ return false;}();}
220+ function isRedLeft_22(t_119){
219221 return function(){
220− switch(t_126[0]){
221− case "RBNode":
222− switch(t_126[4][0]){
223− case "RBNode":
224− switch(t_126[4][1][0]){
225− case "Red":
222+ switch(t_119[0]){
223+ case 'RBNode':
224+ switch(t_119[4][0]){
225+ case 'RBNode':
226+ switch(t_119[4][1][0]){
227+ case 'Red':
226228 return true;
227229 }break;
228230 }break;
229231 }
230− return false;}();};
231− function isRedLeftLeft_24(t_127){
232+ return false;}();}
233+ function isRedLeftLeft_23(t_120){
232234 return function(){
233− switch(t_127[0]){
234− case "RBNode":
235− switch(t_127[4][0]){
236− case "RBNode":
237− switch(t_127[4][4][0]){
238− case "RBNode":
239− switch(t_127[4][4][1][0]){
240− case "Red":
235+ switch(t_120[0]){
236+ case 'RBNode':
237+ switch(t_120[4][0]){
238+ case 'RBNode':
239+ switch(t_120[4][4][0]){
240+ case 'RBNode':
241+ switch(t_120[4][4][1][0]){
242+ case 'Red':
241243 return true;
242244 }break;
243245 }break;
244246 }break;
245247 }
246− return false;}();};
247− function isRedRight_25(t_128){
248+ return false;}();}
249+ function isRedRight_24(t_121){
248250 return function(){
249− switch(t_128[0]){
250− case "RBNode":
251− switch(t_128[5][0]){
252− case "RBNode":
253− switch(t_128[5][1][0]){
254− case "Red":
251+ switch(t_121[0]){
252+ case 'RBNode':
253+ switch(t_121[5][0]){
254+ case 'RBNode':
255+ switch(t_121[5][1][0]){
256+ case 'Red':
255257 return true;
256258 }break;
257259 }break;
258260 }
259− return false;}();};
260− function isRedRightLeft_26(t_129){
261+ return false;}();}
262+ function isRedRightLeft_25(t_122){
261263 return function(){
262− switch(t_129[0]){
263− case "RBNode":
264− switch(t_129[5][0]){
265− case "RBNode":
266− switch(t_129[5][4][0]){
267− case "RBNode":
268− switch(t_129[5][4][1][0]){
269− case "Red":
264+ switch(t_122[0]){
265+ case 'RBNode':
266+ switch(t_122[5][0]){
267+ case 'RBNode':
268+ switch(t_122[5][4][0]){
269+ case 'RBNode':
270+ switch(t_122[5][4][1][0]){
271+ case 'Red':
270272 return true;
271273 }break;
272274 }break;
273275 }break;
274276 }
275− return false;}();};
276− function moveRedLeft_27(t_130){
277+ return false;}();}
278+ function moveRedLeft_26(t_123){
277279 return function(){
278− var t__131=color_flip_16(t_130);
280+ var t__124=color_flip_15(t_123);
279281 return function(){
280− switch(t__131[0]){
281− case "RBNode":
282+ switch(t__124[0]){
283+ case 'RBNode':
282284 return function(){
283− switch(t__131[5][0]){
284− case "RBNode":
285− switch(t__131[5][4][0]){
286− case "RBNode":
287− switch(t__131[5][4][1][0]){
288− case "Red":
289− return color_flip_16(rotateLeft_11(RBNode_2(t__131[1])(t__131[2])(t__131[3])(t__131[4])(rotateRight_12(t__131[5]))));
285+ switch(t__124[5][0]){
286+ case 'RBNode':
287+ switch(t__124[5][4][0]){
288+ case 'RBNode':
289+ switch(t__124[5][4][1][0]){
290+ case 'Red':
291+ return color_flip_15(rotateLeft_10(RBNode_2(t__124[1])(t__124[2])(t__124[3])(t__124[4])(rotateRight_11(t__124[5]))));
290292 }break;
291293 }break;
292294 }
293− return t__131;}();
295+ return t__124;}();
294296 }
295− return t__131;}();}();};
296− function moveRedRight_28(t_137){
297+ return t__124;}();}();}
298+ function moveRedRight_27(t_130){
297299 return function(){
298− var t__138=color_flip_16(t_137);
299− return (isRedLeftLeft_24(t__138)?color_flip_16(rotateRight_12(t__138)):t__138);}();};
300− function moveRedLeftIfNeeded_29(t_139){
301− return ((not(isRedLeft_23(t_139))&&not(isRedLeftLeft_24(t_139)))?moveRedLeft_27(t_139):t_139);};
302− function moveRedRightIfNeeded_30(t_140){
303− return ((not(isRedRight_25(t_140))&&not(isRedRightLeft_26(t_140)))?moveRedRight_28(t_140):t_140);};
304− function deleteMin_31(t_141){
300+ var t__131=color_flip_15(t_130);
301+ return (isRedLeftLeft_23(t__131)?color_flip_15(rotateRight_11(t__131)):t__131);}();}
302+ function moveRedLeftIfNeeded_28(t_132){
303+ return ((not(isRedLeft_22(t_132))&&not(isRedLeftLeft_23(t_132)))?moveRedLeft_26(t_132):t_132);}
304+ function moveRedRightIfNeeded_29(t_133){
305+ return ((not(isRedRight_24(t_133))&&not(isRedRightLeft_25(t_133)))?moveRedRight_27(t_133):t_133);}
306+ function deleteMin_30(t_134){
305307 return function(){
306− function del_142(t_143){
308+ function del_135(t_136){
307309 return function(){
308− switch(t_143[0]){
309− case "RBNode":
310− switch(t_143[4][0]){
311− case "RBEmpty":
310+ switch(t_136[0]){
311+ case 'RBNode':
312+ switch(t_136[4][0]){
313+ case 'RBEmpty':
312314 return RBEmpty_3;
313315 }break;
314316 }
315317 return function(){
316− var t__144=moveRedLeftIfNeeded_29(t_143);
317− return function(){
318− switch(t__144[0]){
319− case "RBEmpty":
320− return RBEmpty_3;
321− case "RBNode":
322− return fixUp_18(RBNode_2(t__144[1])(t__144[2])(t__144[3])(del_142(t__144[4]))(t__144[5]));
323− }
324− throw "Non-exhaustive pattern match in case";}();}();}();};
325− return ensureBlackRoot_19(del_142(t_141));}();};
326− function remove_32(k_150){
327− return function(t_151){
318+ var case198=moveRedLeftIfNeeded_28(t_136);
319+ switch(case198[0]){
320+ case 'RBEmpty':
321+ return RBEmpty_3;
322+ case 'RBNode':
323+ return fixUp_17(RBNode_2(case198[1])(case198[2])(case198[3])(del_135(case198[4]))(case198[5]));
324+ }
325+ throw "Non-exhaustive pattern match in case";}();}();}
326+ return ensureBlackRoot_18(del_135(t_134));}();}
327+ function remove_31(k_142){
328+ return function(t_143){
328329 return function(){
329− function eq_and_noRightNode_152(t_153){
330+ function eq_and_noRightNode_144(t_150){
330331 return function(){
331− switch(t_153[0]){
332− case "RBNode":
333− switch(t_153[5][0]){
334− case "RBEmpty":
335− return eq(k_150,t_153[2]);
332+ switch(t_150[0]){
333+ case 'RBNode':
334+ switch(t_150[5][0]){
335+ case 'RBEmpty':
336+ return eq(k_142,t_150[2]);
336337 }break;
337338 }
338− return false;}();};
339− return function(){
340− function eq_155(t_156){
341− return function(){
342− switch(t_156[0]){
343− case "RBNode":
344− return eq(k_150,t_156[2]);
345− }
346− return false;}();};
339+ return false;}();}
340+ function eq_145(t_152){
347341 return function(){
348− function delLT_158(t_159){
349− return function(){
350− var t__160=moveRedLeftIfNeeded_29(t_159);
351− return function(){
352− switch(t__160[0]){
353− case "RBEmpty":
354− return raise_5(Value.str("delLT on RBEmpty"));
355− case "RBNode":
356− return fixUp_18(RBNode_2(t__160[1])(t__160[2])(t__160[3])(del(t__160[4]))(t__160[5]));
357− }
358− throw "Non-exhaustive pattern match in case";}();}();};
342+ switch(t_152[0]){
343+ case 'RBNode':
344+ return eq(k_142,t_152[2]);
345+ }
346+ return false;}();}
347+ function delLT_146(t_154){
348+ return function(){
349+ var case216=moveRedLeftIfNeeded_28(t_154);
350+ switch(case216[0]){
351+ case 'RBEmpty':
352+ throw 'delLT on RBEmpty';
353+ case 'RBNode':
354+ return fixUp_17(RBNode_2(case216[1])(case216[2])(case216[3])(del_149(case216[4]))(case216[5]));
355+ }
356+ throw "Non-exhaustive pattern match in case";}();}
357+ function delEQ_147(t_160){
358+ return function(){
359+ switch(t_160[0]){
360+ case 'RBEmpty':
361+ throw 'delEQ called on a RBEmpty';
362+ case 'RBNode':
359363 return function(){
360− function delEQ_166(t_167){
361− return function(){
362− switch(t_167[0]){
363− case "RBEmpty":
364− return raise_5(Value.str("delEQ called on a RBEmpty"));
365− case "RBNode":
366− return function(){
367− var Tuple2$k_v__171=min_6(t_167[5]);
368− var k__172=function(){
369− switch(Tuple2$k_v__171[0]){
370− case "Tuple2":
371− return Tuple2$k_v__171[1];
372− }
373− throw "Non-exhaustive pattern match in case";}();
374− var v__173=function(){
375− switch(Tuple2$k_v__171[0]){
376− case "Tuple2":
377− return Tuple2$k_v__171[2];
378− }
379− throw "Non-exhaustive pattern match in case";}();
380− return fixUp_18(RBNode_2(t_167[1])(k__172)(v__173)(t_167[4])(deleteMin_31(t_167[5])));}();
381− }
382− throw "Non-exhaustive pattern match in case";}();};
383− return function(){
384− function delGT_178(t_179){
385− return function(){
386− switch(t_179[0]){
387− case "RBEmpty":
388− return raise_5(Value.str("delGT called on a RBEmpty"));
389− case "RBNode":
390− return fixUp_18(RBNode_2(t_179[1])(t_179[2])(t_179[3])(t_179[4])(del(t_179[5])));
391− }
392− throw "Non-exhaustive pattern match in case";}();};
393− return function(){
394− function del_185(t_186){
395− return function(){
396− switch(t_186[0]){
397− case "RBEmpty":
398− return RBEmpty_3;
399− case "RBNode":
400− return ((compare(k_150)(t_186[2])[0] === 'LT')?delLT_158(t_186):function(){
401− var t__188=(isRedLeft_23(t_186)?rotateRight_12(t_186):t_186);
402− return (eq_and_noRightNode_152(t__188)?RBEmpty_3:function(){
403− var t_189=moveRedRightIfNeeded_30(t_189);
404− return (eq_155(t_189)?delEQ_166(t_189):delGT_178(t_189));}());}());
405− }
406− throw "Non-exhaustive pattern match in case";}();};
407− return ensureBlackRoot_19(del_185(t_151));}();}();}();}();}();}();};};
408− function map_33(f_190){
409− return function(t_191){
364+ var Tuple2$k_v__164=min_6(t_160[5]);
365+ var k__165=function(){
366+ switch(Tuple2$k_v__164[0]){
367+ case 'Tuple2':
368+ return Tuple2$k_v__164[1];
369+ }
370+ throw "Non-exhaustive pattern match in case";}();
371+ var v__166=function(){
372+ switch(Tuple2$k_v__164[0]){
373+ case 'Tuple2':
374+ return Tuple2$k_v__164[2];
375+ }
376+ throw "Non-exhaustive pattern match in case";}();
377+ return fixUp_17(RBNode_2(t_160[1])(k__165)(v__166)(t_160[4])(deleteMin_30(t_160[5])));}();
378+ }
379+ throw "Non-exhaustive pattern match in case";}();}
380+ function delGT_148(t_171){
381+ return function(){
382+ switch(t_171[0]){
383+ case 'RBEmpty':
384+ throw 'delGT called on a RBEmpty';
385+ case 'RBNode':
386+ return fixUp_17(RBNode_2(t_171[1])(t_171[2])(t_171[3])(t_171[4])(del_149(t_171[5])));
387+ }
388+ throw "Non-exhaustive pattern match in case";}();}
389+ function del_149(t_177){
390+ return function(){
391+ switch(t_177[0]){
392+ case 'RBEmpty':
393+ return RBEmpty_3;
394+ case 'RBNode':
395+ return ((compare(k_142)(t_177[2])[0] === 'LT')?delLT_146(t_177):function(){
396+ var u_179=(isRedLeft_22(t_177)?rotateRight_11(t_177):t_177);
397+ return (eq_and_noRightNode_144(u_179)?u_179[4]:function(){
398+ var t__180=moveRedRightIfNeeded_29(t_177);
399+ return (eq_145(t__180)?delEQ_147(t__180):delGT_148(t__180));}());}());
400+ }
401+ throw "Non-exhaustive pattern match in case";}();}
402+ return (member_9(k_142)(t_143)?ensureBlackRoot_18(del_149(t_143)):t_143);}();};}
403+ function map_32(f_181){
404+ return function(t_182){
410405 return function(){
411− switch(t_191[0]){
412− case "RBEmpty":
406+ switch(t_182[0]){
407+ case 'RBEmpty':
413408 return RBEmpty_3;
414− case "RBNode":
415− return RBNode_2(t_191[1])(t_191[2])(f_190(t_191[3]))(map_33(f_190)(t_191[4]))(map_33(f_190)(t_191[5]));
409+ case 'RBNode':
410+ return RBNode_2(t_182[1])(t_182[2])(f_181(t_182[3]))(map_32(f_181)(t_182[4]))(map_32(f_181)(t_182[5]));
416411 }
417− throw "Non-exhaustive pattern match in case";}();};};
418− function foldl_34(f_197){
419− return function(acc_198){
420− return function(t_199){
412+ throw "Non-exhaustive pattern match in case";}();};}
413+ function foldl_33(f_188){
414+ return function(acc_189){
415+ return function(t_190){
421416 return function(){
422− switch(t_199[0]){
423− case "RBEmpty":
424− return acc_198;
425− case "RBNode":
426− return foldl_34(f_197)(f_197(t_199[2])(t_199[3])(foldl_34(f_197)(acc_198)(t_199[4])))(t_199[5]);
417+ switch(t_190[0]){
418+ case 'RBEmpty':
419+ return acc_189;
420+ case 'RBNode':
421+ return foldl_33(f_188)(f_188(t_190[2])(t_190[3])(foldl_33(f_188)(acc_189)(t_190[4])))(t_190[5]);
427422 }
428− throw "Non-exhaustive pattern match in case";}();};};};
429− function foldr_35(f_204){
430− return function(acc_205){
431− return function(t_206){
423+ throw "Non-exhaustive pattern match in case";}();};};}
424+ function foldr_34(f_195){
425+ return function(acc_196){
426+ return function(t_197){
432427 return function(){
433− switch(t_206[0]){
434− case "RBEmpty":
435− return acc_205;
436− case "RBNode":
437− return foldr_35(f_204)(f_204(t_206[2])(t_206[3])(foldr_35(f_204)(acc_205)(t_206[5])))(t_206[4]);
428+ switch(t_197[0]){
429+ case 'RBEmpty':
430+ return acc_196;
431+ case 'RBNode':
432+ return foldr_34(f_195)(f_195(t_197[2])(t_197[3])(foldr_34(f_195)(acc_196)(t_197[5])))(t_197[4]);
438433 }
439− throw "Non-exhaustive pattern match in case";}();};};};
440− function union_36(t1_211){
441− return function(t2_212){
442− return foldl_34(insert_20)(t2_212)(t1_211);};};
443− function intersect_37(t1_213){
444− return function(t2_214){
445− return foldl_34(function(k_215){
446− return function(v_216){
447− return function(t_217){
448− return (member_10(k_215)(t2_214)?insert_20(k_215)(v_216)(t_217):t_217);};};})(empty_4)(t1_213);};};
449− function diff_38(t1_218){
450− return function(t2_219){
451− return foldl_34(function(k_220){
452− return function(__221){
453− return function(t_222){
454− return remove_32(k_220)(t_222);};};})(t1_218)(t2_219);};};
455− function keys_39(t_223){
456− return foldl_34(function(k_224){
457− return function(__225){
458− return function(acc_226){
459− return ["Cons",k_224,acc_226];};};})(["Nil"])(t_223);};
460− function values_40(t_227){
461− return foldl_34(function(__228){
462− return function(x_229){
463− return function(y_230){
464− return ["Cons",x_229,y_230];};};})(["Nil"])(t_227);};
465− function toList_41(t_231){
466− return foldl_34(function(k_232){
467− return function(v_233){
468− return function(acc_234){
469− return ["Cons",["Tuple2",k_232,v_233],acc_234];};};})(["Nil"])(t_231);};
470− function fromList_42(assocs_235){
471− return Elm.List.foldl(uncurry(insert_20))(empty_4)(assocs_235);};
472− return {empty:empty_4,lookup:lookup_7,findWithDefault:findWithDefault_8,member:member_10,insert:insert_20,singleton:singleton_21,remove:remove_32,map:map_33,foldl:foldl_34,foldr:foldr_35,union:union_36,intersect:intersect_37,diff:diff_38,keys:keys_39,values:values_40,toList:toList_41,fromList:fromList_42};}();
434+ throw "Non-exhaustive pattern match in case";}();};};}
435+ function union_35(t1_202){
436+ return function(t2_203){
437+ return foldl_33(insert_19)(t2_203)(t1_202);};}
438+ function intersect_36(t1_204){
439+ return function(t2_205){
440+ return foldl_33(function(k_206){
441+ return function(v_207){
442+ return function(t_208){
443+ return (member_9(k_206)(t2_205)?insert_19(k_206)(v_207)(t_208):t_208);};};})(empty_4)(t1_204);};}
444+ function diff_37(t1_209){
445+ return function(t2_210){
446+ return foldl_33(function(k_211){
447+ return function(v_212){
448+ return function(t_213){
449+ return remove_31(k_211)(t_213);};};})(t1_209)(t2_210);};}
450+ function keys_38(t_214){
451+ return foldr_34(function(k_215){
452+ return function(v_216){
453+ return function(acc_217){
454+ return ['Cons',k_215,acc_217];};};})(['Nil'])(t_214);}
455+ function values_39(t_218){
456+ return foldr_34(function(k_219){
457+ return function(v_220){
458+ return function(acc_221){
459+ return ['Cons',v_220,acc_221];};};})(['Nil'])(t_218);}
460+ function toList_40(t_222){
461+ return foldr_34(function(k_223){
462+ return function(v_224){
463+ return function(acc_225){
464+ return ['Cons',['Tuple2',k_223,v_224],acc_225];};};})(['Nil'])(t_222);}
465+ function fromList_41(assocs_226){
466+ return Elm.List.foldl(uncurry(insert_19))(empty_4)(assocs_226);}
467+ var empty_4=RBEmpty_3;
468+ return {$op : {},
469+ empty:empty_4,
470+ lookup:lookup_7,
471+ findWithDefault:findWithDefault_8,
472+ member:member_9,
473+ insert:insert_19,
474+ singleton:singleton_20,
475+ remove:remove_31,
476+ map:map_32,
477+ foldl:foldl_33,
478+ foldr:foldr_34,
479+ union:union_35,
480+ intersect:intersect_36,
481+ diff:diff_37,
482+ keys:keys_38,
483+ values:values_39,
484+ toList:toList_40,
485+ fromList:fromList_41};}();
core-js/Prelude.js+18−16
@@ -67,7 +67,23 @@ Elm.Prelude = function() {
6767 }
6868 return ["Just", parseFloat(s)];
6969 }
70−
70+
71+ function compare(x) { return function (y) {
72+ if (x instanceof Array && y instanceof Array) {
73+ var len = x.length;
74+ if (len == y.length) {
75+ for (var i = 1; i < len; ++i) {
76+ var cmp = compare(x[i])(y[i]);
77+ if (cmp[0] === 'EQ') continue;
78+ return cmp;
79+ }
80+ return ['EQ'];
81+ }
82+ return [ y.length == 1 ? 'GT' : 'LT' ];
83+ }
84+ return [ x === y ? 'EQ' : (x < y ? 'LT' : 'GT') ];
85+ };
86+ }
7187 return {eq : Value.eq,
7288 id : function(x) { return x; },
7389 not : function(b) { return !b; },
@@ -76,21 +92,7 @@ Elm.Prelude = function() {
7692 rem : function(x) { return function(y) { return x % y; }; },
7793 div : function(x) { return function(y) { return ~~(x / y); }; },
7894 otherwise : true,
79− compare : function(x) { return function (y) {
80− if (x instanceof Array && y instanceof Array) {
81− var len = x.length;
82− if (len == y.length) {
83− for (var i = 0; i < len; ++i) {
84− var cmp = compare(x[i])(y[i]);
85− if (cmp[0] === 'EQ') continue;
86− return cmp;
87− }
88− return ['EQ'];
89− }
90− }
91− return [ x === y ? 'EQ' : (x < y ? 'LT' : 'GT') ];
92− };
93− },
95+ compare : compare,
9496 toFloat : function(x) { return x; },
9597 round : function(n) { return Math.round(n); },
9698 floor : function(n) { return Math.floor(n); },
core-js/cat.bat+1−1
@@ -2,4 +2,4 @@ copy /B Guid.js+foreign\JavaScript.js+foreign\JSON.js+Value.js+List.js+Maybe.js+
22
33cd ..\elm
44
5−copy /B ..\elm-mini.js elm-runtime-0.6.0.1.js
5+copy /B ..\elm-mini.js elm-runtime-0.6.0.3.js
elm-server/Server.hs+1
@@ -17,6 +17,7 @@ runtime = "/elm-" ++ showVersion version ++ ".js"
1717serve :: String -> IO ()
1818serve libLoc = do
1919 putStrLn ("Elm Server " ++ showVersion version ++ ": running at <http://localhost:8000>")
20+ putStrLn "Just refresh a page to recompile it!"
2021 simpleHTTP nullConf $ do
2122 _ <- compressedResponseFilter
2223 msum [ uriRest serveElm
elm-server/elm-server.cabal+2−2
@@ -1,5 +1,5 @@
11Name: elm-server
2−Version: 0.6
2+Version: 0.6.0.3
33Synopsis: The Elm language server.
44Description: This package provides a standalone, Happstack-based Elm server.
55
@@ -35,4 +35,4 @@ Executable elm-server
3535 happstack-server == 7.0.2,
3636 deepseq,
3737 filepath,
38− Elm >= 0.6
38+ Elm >= 0.6.0.3
elm/Elm.cabal+2−2
@@ -1,6 +1,6 @@
11
22Name: Elm
3−Version: 0.6.0.2
3+Version: 0.6.0.3
44Synopsis: The Elm language module.
55Description: Elm aims to make client-side web-development more pleasant.
66 It is a statically/strongly typed, functional reactive
@@ -22,7 +22,7 @@ Category: Compiler, Language
2222Build-type: Simple
2323
2424Extra-source-files: changelog.txt
25−Data-files: elm-runtime-0.6.0.2.js
25+Data-files: elm-runtime-0.6.0.3.js
2626Cabal-version: >=1.8
2727
2828source-repository head
elm/elm-runtime-0.6.0.3.jsnew file+134
@@ -0,0 +1,134 @@
1+Elm={};var Guid=function(){var e=0;return{guid:function(){return e+=1}}}();
2+Elm.JavaScript=function(){function e(a){for(var b=["Nil"],l=a.length;l--;)b=["Cons",a[l],b];return b}function j(a){for(var b=[];"Cons"===a[0];)b.push(a[1]),a=a[2];return b}function a(a){return a.slice(1)}function d(a){return["Tuple"+a.length].concat(a)}return{castJSBoolToBool:function(a){return a},castBoolToJSBool:function(a){return a},castJSNumberToFloat:function(a){return a},castFloatToJSNumber:function(a){return a},castJSNumberToInt:function(a){return~~a},castIntToJSNumber:function(a){return a},
3+Experimental:{castJSElementToElement:function(a){return function(b){return function(l){return["Element",Guid.guid(),["EExternalHtml",l],a,b,1,Nothing,Nothing]}}},castElementToJSElement:function(a){return Render.render(a)}},castJSArrayToList:e,castListToJSArray:j,castJSStringToString:e,castStringToJSString:function(a){return"string"===typeof a?a:j(a).join("")},castTupleToJSTuple2:a,castTupleToJSTuple3:a,castTupleToJSTuple4:a,castTupleToJSTuple5:a,castJSTupleToTuple2:d,castJSTupleToTuple3:d,castJSTupleToTuple4:d,
4+castJSTupleToTuple5:d}}();var JSjson=window.JSON;
5+Elm.JSON=function(){function e(b,a){return function(h){return function(k){var f=d.castStringToJSString(h);return k[1].hasOwnProperty(f)&&(k=k[1][f],k[0]===b)?k[1]:a}}}function j(b){return function(a){function h(b){switch(b[0]){case "JsonNull":return null;case "JsonString":return d.castStringToJSString(b[1]);case "JsonObject":var f={},b=b[1][1],c;for(c in b)f[c]=h(b[c]);return f;case "JsonArray":f=d.castListToJSArray(b[1]);for(c=f.length;c--;)f[c]=h(f[c]);return f;default:return b[1]}}return JSjson.stringify(h(["JsonObject",
6+a]),null,d.castStringToJSString(b))}}function a(b){function a(b){switch(typeof b){case "string":return["JsonString",d.castJSStringToString(b)];case "number":return["JsonNumber",d.castJSNumberToFloat(b)];case "boolean":return["JsonBool",d.castJSBoolToBool(b)];case "object":if(null===b)return["JsonNull"];for(var f in b)b[f]=a(b[f]);return b instanceof Array?["JsonArray",d.castJSArrayToList(b)]:["JsonObject",["JSON",b]]}}var b=JSjson.parse(b),h;for(h in b)b[h]=a(b[h]);return["JSON",b]}var d=Elm.JavaScript,
7+i=["JSON",{}];return{empty:i,singleton:function(b){return function(a){var h={};h[d.castStringToJSString(b)]=a;return["JSON",h]}},insert:function(b){return function(a){return function(h){var h=h[1],k={},f;for(f in h)k[f]=h[f];k[d.castStringToJSString(b)]=a;return["JSON",k]}}},lookup:function(b){return function(a){var h=d.castStringToJSString(b);return a[1].hasOwnProperty(h)?["Just",a[1][h]]:["Nothing"]}},findString:e("JsonString",["Nil"]),findObject:e("JsonObject",i),findArray:e("JsonArray",["Nil"]),
8+findWithDefault:function(b){return function(a){return function(h){var k=d.castStringToJSString(a);return h[1].hasOwnProperty(k)?h[1][k]:b}}},remove:function(b){return function(a){var a=a[1],h={},k;for(k in a)h[k]=a[k];delete h[d.castStringToJSString(b)];return["JSON",h]}},toPrettyJSString:j,toJSString:j(""),fromJSString:a,toPrettyString:function(b){return function(a){return d.castJSStringToString(j(b)(a))}},toString:function(b){return d.castJSStringToString(j("")(b))},fromString:function(b){return a(d.castStringToJSString(b))},
9+toList:function(b){var b=b[1],a=[],h;for(h in b)a.push(Value.Tuple(d.castJSStringToString(h),b[h]));return d.castJSArrayToList(a)},fromList:function(b){for(var b=d.castListToJSArray(b),a={},h=b.length;h--;)a[d.castStringToJSString(b[h][1])]=b[h][2];return["JSON",a]},JsonString:function(b){return["JsonString",b]},JsonNumber:function(b){return["JsonNumber",b]},JsonBool:function(b){return["JsonBool",b]},JsonNull:["JsonNull"],JsonArray:function(b){return["JsonArray",b]},JsonObject:function(b){return["JsonObject",
10+b]}}}();
11+var Value=function(){function e(b){if(0==b.length)return b;for(var b=b.replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;").replace(/>/g,"&#62;").replace(/\n/g,"<br/>"),b=b.split("<br/>"),a=b.length;a--;){var h=b,d=a,f;f=b[a];if(0!=f.length){f=f.split("");" "==f[0]&&(f[0]="&nbsp;");for(var c=f.length;--c;)" "==f[c][0]&&" "==f[c-1]&&(f[c-1]+=f[c],f[c]="");for(c=f.length;c--;)if(1<f[c].length&&" "==f[c][0]){for(var g=f[c].split(""),r=g.length-2;0<=r;r-=2)g[r]="&nbsp;";f[c]=g.join("")}f=f.join("");
12+f=" "===f[f.length-1]?f.slice(0,-1)+"&nbsp;":f}h[d]=f}return b.join("<br/>")}var j=function(b,a){if("object"===typeof b){if(b===a)return!0;if(b.length!==a.length)return!1;for(var h=b.length;h--;)if(!j(b[h],a[h]))return!1;return!0}return b===a},a=function(b){if("boolean"===typeof b)return b?"True":"False";if("number"!==typeof b){if("string"===typeof b&&2>b.length)return"'"+b+"'";if(b[0]){if("Tuple"===b[0].substring(0,5)){for(var d="",h=b.length;--h;)d=","+a(b[h])+d;","===d[0]&&(d=d.substring(1));return"("+
13+d+")"}if("Cons"===b[0])for(var h="string"===typeof b[1]?'"':"]",k="string"===typeof b[1]?"":",",f="string"===typeof b[1]?function(b){return b}:a,d=("string"===typeof b[1]?'"':"[")+f(b[1]),b=b[2];;)if("Cons"===b[0])d+=k+f(b[1]),b=b[2];else return d+h;else{if("Nil"===b[0])return"[]";if("JSON"===b[0])return"(JSON.fromList "+a(Elm.JSON.toList(b))+")";if("RBNode"===b[0]||"RBEmpty"===b[0])return b=Elm.Dict.foldr(function(b){return function(a){return function(f){return["Cons",["Tuple2",b,a],f]}}})(["Nil"])(b),
14+d="Dict","Cons"===b[0]&&"Tuple0"===b[1][2][0]&&(d="Set",b=Elm.List.map(function(b){return b[1]})(b)),"("+d+".fromList "+a(b)+")";d="";for(h=b.length;--h;)d=" "+a(b[h])+d;d=b[0]+d;return 1<b.length?"("+d+")":d}}}return b+""},d=function(b){for(var a=["Nil"],d=b.length;d--;)a=["Cons",b[d],a];return a},i;i=document.addEventListener?function(b,a,d){b.addEventListener(a,d,!1)}:function(b,a,d){b.attachEvent("on"+a,d)};return{eq:j,str:d,show:function(b){return d(a(b))},Tuple:function(){var b=arguments.length,
15+a=Array(b+1);for(a[0]="Tuple"+arguments.length;b--;)a[b+1]=arguments[b];return a},append:function(b,a){if("string"===typeof b&&"string"===typeof a)return b.concat(a);if("Nil"===b[0])return a;for(var d=["Cons",b[1],["Nil"]],k=d,b=b[2];"Cons"===b[0];)k[2]=["Cons",b[1],["Nil"]],b=b[2],k=k[2];k[2]=a;return d},listToArray:function(b){for(var a=[];"Cons"===b[0];)a.push(b[1]),b=b[2];return a},toText:function(a){if("string"===typeof a)return e(a);for(var d=[];"Cons"===a[0];)d.push(a[1]),a=a[2];return e(d.join(""))},
16+properEscape:e,getTextSize:function(a,d,h){var k=document.createElement("div");k.innerHTML=h;k.style.textAlign="left";0<a&&(k.style.width=a+"px");k.style.visibility="hidden";k.style.styleFloat="left";k.style.cssFloat="left";document.body.appendChild(k);h=window.getComputedStyle(k,null);a=h.getPropertyValue("width").slice(0,-2)-0;h=h.getPropertyValue("height").slice(0,-2)-0;document.body.removeChild(k);return[Math.ceil(a),Math.ceil(Math.max(d,h))]},getSize:function(a){a=a.cloneNode(!0);a.style.visibility=
17+"hidden";a.style.styleFloat="left";a.style.cssFloat="left";document.body.appendChild(a);var d=a.offsetWidth,h=a.offsetHeight;document.body.removeChild(a);return[d,h]},getExcess:function(a){a=a.cloneNode(!0);a.style.visibility="hidden";a.style.styleFloat="left";a.style.cssFloat="left";document.body.appendChild(a);var d=a.offsetWidth,h=a.offsetHeight,k=window.getComputedStyle(a,null),f=k.getPropertyValue("width").slice(0,-2)-0,k=k.getPropertyValue("height").slice(0,-2)-0;document.body.removeChild(a);
18+return[d-f,h-k]},groupForms:function(a){for(var a=Elm.JavaScript.castListToJSArray(a),d=[],h=[],k=a.length;k--;){var f=a[k];switch(f[4][0]){case "FElement":0<h.length&&(d.push(h),h=[]);d.push(f);break;default:h.push(f)}}0<h.length&&d.push(h);return d},wrap:function(a){var d=Value.getSize(a);return["Element",Guid.guid(),["EHtml",a],d[0],d[1],1,["Nothing"],["Nothing"]]},addListener:i}}();
19+Elm.List=function(){function e(a){return function(b){if("Nil"===b[0])return b;"Cons"!==b[0]&&f("map");for(var c=["Cons",a(b[1]),["Nil"]],g=c,b=b[2];"Cons"===b[0];)g[2]=["Cons",a(b[1]),["Nil"]],b=b[2],g=g[2];return c}}function j(a){return function(b){return function(c){var g=b;if("Nil"===c[0])return g;for("Cons"!==c[0]&&f("foldl");"Cons"===c[0];)g=a(c[1])(g),c=c[2];return g}}}function a(a){return function(b){return function(c){var g=b;if("Nil"===c[0])return g;"Cons"!==c[0]&&f("foldr");for(var d=[];"Cons"===
20+c[0];)d.push(c[1]),c=c[2];for(c=d.length;c--;)g=a(d[c])(g);return g}}}function d(a){return function(f){var b;"Cons"!==f[0]?b=void 0:(b=f[1],f=f[2],b=j(a)(b)(f));return b}}function i(a){return function(b){return function(c){if("Nil"===c[0])return["Cons",b,["Nil"]];"Cons"!==c[0]&&f("scanl");for(var g=[b];"Cons"===c[0];)b=a(c[1])(b),g.push(b),c=c[2];for(var c=["Nil"],d=g.length;d--;)c=["Cons",g[d],c];return c}}}function b(a){return function(f){a:{for(var c=[function(a){return"Nil"!==a[0]?void 0:["Tuple2",
21+["Nil"],["Nil"]]},function(f){if("Cons"===f[0]){var c=f[1],f=f[2];var g=b(a)(f);"Tuple2"!==g[0]?c=void 0:(f=g[1],g=g[2],c=a(c)?["Tuple2",["Cons",c,f],g]:["Tuple2",f,["Cons",c,g]]);return c}}],g=c.length;g--;){var d=c[g](f);if(void 0!==d){f=d;break a}}f=void 0}return f}}function l(a){a:{for(var f=[function(a){return"Nil"!==a[0]?void 0:["Tuple2",["Nil"],["Nil"]]},function(a){if("Cons"!==a[0])a=void 0;else if(a=["Tuple2",a[1],l(a[2])],"Tuple2"!==a[0]||"Tuple2"!==a[1][0])a=void 0;else var f=a[1][1],b=
22+a[1][2],a="Tuple2"!==a[2][0]?void 0:["Tuple2",["Cons",f,a[2][1]],["Cons",b,a[2][2]]];return a}],b=f.length;b--;){var c=f[b](a);if(void 0!==c){a=c;break a}}a=void 0}return a}function h(a){return function(f){a:{for(var b=[function(a){return"Nil"!==a[0]?void 0:["Nil"]},function(a){if("Cons"===a[0]){var f=a[1];return"Nil"!==a[2][0]?void 0:["Cons",f,["Nil"]]}},function(f){if("Cons"===f[0]){var b=f[1];if("Cons"===f[2][0]){var c=f[2][1],f=f[2][2];return["Cons",b,["Cons",a,h(a)(["Cons",c,f])]]}}}],c=b.length;c--;){var g=
23+b[c](f);if(void 0!==g){f=g;break a}}f=void 0}return f}}function k(a){return function(f){a:{for(var b=[function(a){return"Nil"!==a[0]?void 0:["Nil"]},function(a){if("Cons"===a[0]){var f=a[1];return"Nil"!==a[2][0]?void 0:f}},function(f){if("Cons"===f[0]){var b=f[1];if("Cons"===f[2][0]){var c=f[2][1],f=f[2][2];return Value.append(b,Value.append(a,k(a)(["Cons",c,f])))}}}],c=b.length;c--;){var g=b[c](f);if(void 0!==g){f=g;break a}}f=void 0}return f}}var f=function(a){throw"Function '"+a+"' expecting a list!";
24+},c=j(function(a){return function(f){return["Cons",a,f]}})(["Nil"]),g=a(function(a){return function(f){return Value.append(a,f)}})(["Nil"]),r=j(function(a){return function(f){return a&&f}})(!0),m=j(function(a){return function(f){return a||f}})(!1),n=j(function(a){return function(f){return a+f}})(0),u=j(function(a){return function(f){return a*f}})(1),x=d(function(a){return function(f){return Math.max(a,f)}}),q=d(function(a){return function(f){return Math.min(a,f)}});return{head:function(a){if("Cons"!==
25+a[0])throw"Error: 'head' only accepts lists of length greater than one.";return a[1]},tail:function(a){if("Cons"!==a[0])throw"Error: 'tail' only accepts lists of length greater than one.";return a[2]},last:function(a){if("Cons"!==a[0])throw"Error: 'last' only accepts lists of length greater than one.";for(var f=a[1];"Cons"===a[0];)f=a[1],a=a[2];return f},map:e,foldl:j,foldr:a,foldl1:d,foldr1:function(a){return function(b){if("Nil"===b[0])throw"'foldr1' requires an non-empty list.";"Cons"!==b[0]&&
26+f("foldr1");for(var c=[];"Cons"===b[0];)c.push(b[1]),b=b[2];for(var b=c.pop(),g=c.length;g--;)b=a(c[g])(b);return b}},scanl:i,scanl1:function(a){return function(f){if("Cons"!==f[0])throw"Error: 'scanl1' requires a list of at least length 1.";return i(a)(f[1])(f[2])}},filter:function(a){return function(b){if("Nil"===b[0])return b;"Cons"!==b[0]&&f("filter");for(var c=[];"Cons"===b[0];)a(b[1])&&c.push(b[1]),b=b[2];for(var b=["Nil"],g=c.length;g--;)b=["Cons",c[g],b];return b}},length:function(a){for(var f=
27+0;"Cons"===a[0];)f+=1,a=a[2];return f},reverse:c,concat:g,concatMap:function(a){return function(f){return g(e(a)(f))}},and:r,or:m,all:function(a){return j(function(f){return function(b){return b&&a(f)}})(!0)},any:function(a){return j(function(f){return function(b){return b||a(f)}})(!1)},sum:n,product:u,maximum:x,minimum:q,partition:b,zipWith:function(a){return function(b){return function(c){if("Nil"===b[0]||"Nil"===c[0])return["Nil"];("Cons"!==b[0]||"Cons"!==c[0])&&f("zipWith");for(var g=[];"Cons"===
28+b[0]&&"Cons"===c[0];)g.push(a(b[1])(c[1])),b=b[2],c=c[2];for(var c=["Nil"],d=g.length;d--;)c=["Cons",g[d],c];return c}}},zip:function(a){return function(b){if("Nil"===a[0]||"Nil"===b[0])return["Nil"];("Cons"!==a[0]||"Cons"!==b[0])&&f("zip");for(var c=[];"Cons"===a[0]&&"Cons"===b[0];)c.push(["Tuple2",a[1],b[1]]),a=a[2],b=b[2];for(var b=["Nil"],g=c.length;g--;)b=["Cons",c[g],b];return b}},unzip:l,intersperse:h,intercalate:k,sort:function(a){if("Nil"===a[0])return a;"Cons"!==a[0]&&f("sort");for(var b=
29+[];"Cons"===a[0];)b.push(a[1]),a=a[2];b.sort(function(a,f){return a-f});for(var a=["Nil"],c=b.length;c--;)a=["Cons",b[c],a];return a},take:function(a){return function(b){if(0>=a)return["Nil"];if("Nil"===b[0])return b;"Cons"!==b[0]&&f("take");var c=["Cons",b[1],["Nil"]],g=c,b=b[2];for(--a;"Cons"===b[0]&&0<a;)g[2]=["Cons",b[1],["Nil"]],g=g[2],b=b[2],--a;return c}},drop:function(a){return function(b){if("Nil"===b[0])return b;for("Cons"!==b[0]&&f("drop");"Cons"===b[0]&&0<a;)b=b[2],--a;return b}}}}();
30+Elm.Maybe=function(){function e(a){return function(d){return"Just"===a[0]?["Cons",a[1],d]:d}}function j(a){return function(d){return function(i){var b=a(d);return"Just"===b[0]?["Cons",b[1],i]:i}}}return{Just:function(a){return["Just",a]},Nothing:["Nothing"],catMaybes:Elm.List.foldr(e)(["Nil"]),isJust:function(a){return"Just"===a[0]},isNothing:function(a){return"Nothing"===a[0]},fromMaybe:function(a){return function(d){return"Just"===d[0]?d[1]:a}},consMaybe:e,mapMaybe:function(a){return Elm.List.foldr(j(a))(["Nil"])},
31+maybe:function(a){return function(d){return function(i){return"Just"===i[0]?d(i[1]):a}}}}}();
32+Elm.Char=function(){function e(a,b){return function(d){d=d.charCodeAt(0);return a<=d&&d<=b}}var j=e(48,57),a=e(97,102),d=e(65,70);return{fromCode:function(a){return String.fromCharCode(a)},toCode:function(a){return a.charCodeAt(0)},toUpper:function(a){return a.toUpperCase()},toLower:function(a){return a.toLowerCase()},toLocaleUpper:function(a){return a.toLocaleUpperCase()},toLocaleLower:function(a){return a.toLocaleLowerCase()},isLower:e(97,122),isUpper:e(65,90),isDigit:j,isOctDigit:e(48,55),isHexDigit:function(e){return j(e)||
33+a(e)||d(e)}}}();
34+Elm.Color=function(){function e(e){var a=e.value*e.saturation,d=e.hue/60,i=a*(1-Math.abs(d%2-1)),b=0,l=0,h=0;0<=d&&1>d?(b=a,l=i,h=0):1<=d&&2>d?(b=i,l=a,h=0):2<=d&&3>d?(b=0,l=a,h=i):3<=d&&4>d?(b=0,l=i,h=a):4<=d&&5>d?(b=i,l=0,h=a):5<=d&&6>d&&(b=a,l=0,h=i);e=e.value-a;return["Color",Math.round(255*(b+e)),Math.round(255*(l+e)),Math.round(255*(h+e)),1]}return{rgba:function(e){return function(a){return function(d){return function(i){return["Color",e,a,d,i]}}}},rgb:function(e){return function(a){return function(d){return["Color",e,
35+a,d,1]}}},hsva:function(j){return function(a){return function(d){return function(i){var b=e({hue:j,saturation:a,value:d});b[4]=i;return b}}}},hsv:function(j){return function(a){return function(d){return e({hue:j,saturation:a,value:d})}}},red:["Color",255,0,0,1],green:["Color",0,255,0,1],blue:["Color",0,0,255,1],yellow:["Color",255,255,0,1],cyan:["Color",0,255,255,1],magenta:["Color",255,0,255,1],black:["Color",0,0,0,1],white:["Color",255,255,255,1],gray:["Color",128,128,128,1],grey:["Color",128,128,
36+128,1],complement:function(j){var a;a=j[1]/255;var d=j[2]/255,j=j[3]/255,i=Math.max(a,d,j),b=Math.min(a,d,j),b=i-b,l=0;0===b?l=0:i===a?l=(d-j)/b%6:i===d?l=(j-a)/b+2:i===j&&(l=(a-d)/b+4);a={value:i,hue:60*l,saturation:0===i?0:b/i};a.hue=(a.hue+180)%360;return e(a)},extract:function(e){return 1===e[4]?"rgb("+e[1]+","+e[2]+","+e[3]+")":"rgba("+e[1]+","+e[2]+","+e[3]+","+e[4]+")"}}}();
37+var Collage=function(){function e(a,b){var c=b.length-1;if(!(0>=c))for(a.moveTo(b[c][1],b[c][2]);c--;)a.lineTo(b[c][1],b[c][2])}function j(a,b,c,g){0===a.length&&(a=[8,4]);var d=g.length-1;if(!(0>=d)){var m=g[d][1],h=g[d][2],e=0,i=0,j=0,l=0,p=0,s=0,v=a.length,z=!0,w=a[0];for(b.moveTo(m,h);d--;){e=g[d][1];i=g[d][2];j=e-m;l=i-h;for(p=Math.sqrt(j*j+l*l);w<=p;)m+=j*w/p,h+=l*w/p,b[z?"lineTo":"moveTo"](m,h),j=e-m,l=i-h,p=Math.sqrt(j*j+l*l),z=!z,s=(s+1)%v,w=a[s];0<p&&(b[z?"lineTo":"moveTo"](e,i),w-=p);m=
38+e;h=i}}b.strokeStyle=Elm.Color.extract(c);b.stroke()}function a(a,b,c,g,d){b.clearRect(0,0,c,g);for(c=d.length;c--;){var m=d[c],n=a,g=b,i=m[1],l=m[2],q=m[3][1],t=m[3][2],m=m[4];g.save();(0!==q||0!==t)&&g.translate(q,t);i!==~~i&&g.rotate(2*Math.PI*i);1!==l&&g.scale(l,l);g.beginPath();switch(m[0]){case "FLine":a:switch(n=g,i=m,m=i[3][1],i[1][0]){case "Solid":i=i[2];e(n,m);n.strokeStyle=Elm.Color.extract(i);n.stroke();break;case "Dotted":j([3,3],n,i[2],m);break a;case "Dashed":j([8,4],n,i[2],m);break a;
39+case "Custom":j(i[1][1],n,i[2],m)}break;case "FShape":a:switch(q=n,l=g,n=m[1],i=m[2],m=m[3][1],n[0]){case "Filled":n=l;e(n,m);n.fillStyle=Elm.Color.extract(i);n.fill();break a;case "Outlined":n=l;e(n,m);n.strokeStyle=Elm.Color.extract(i);n.stroke();break a;case "Textured":i=q;n=n[1];q=new Image;q.src=h.castStringToJSString(n);q.onload=i;e(l,m);l.fillStyle=l.createPattern(q,"repeat");l.fill();break a;case "CustomOutline":j(n[1],l,i,m)}break;case "FImage":i=g,l=m[1],q=m[2],m=m[3],t=new Image,t.onload=
40+n,t.src=h.castStringToJSString(m),i.drawImage(t,-l/2,-q/2,l,q)}g.restore()}}function d(b,f,c){var g=Render.newElement("canvas"),b=~~b,f=~~f;g.style.width=b+"px";g.style.height=f+"px";g.style.display="block";g.width=b;g.height=f;if(g.getContext){var d=g.getContext("2d");a(function(){a(this,d,b,f,c)},d,b,f,c);return g}g.innerHTML="Your browser does not support the canvas element.";return g}function i(a,b,c,g,d,h,e){var i=Render.render(e),c="translate("+(d-e[3]/2)+"px,"+(h-e[4]/2)+"px) "+(1===g?"":"scale("+
41+g+","+g+")")+" "+(c===~~c?"":"rotate("+360*c+"deg)");i.style.transform=c;i.style.msTransform=c;i.style.MozTransform=c;i.style.webkitTransform=c;i.style.OTransform=c;c=Render.newElement("div");Render.addTo(c,i);c.style.width=~~a+"px";c.style.height=~~b+"px";c.style.overflow="hidden";return c}function b(b,f,c){if(!Value.eq(c,f)){var g=b.style.width.slice(0,-2)-0,h=b.style.height.slice(0,-2)-0;if("object"===typeof c[0]){if("object"===typeof f[0]&&b.getContext){var m=b.getContext("2d");return a(function(){a(this,
42+m,g,h,c)},m,g,h,c)}f=d(g,h,c);f.style.position="absolute";return b.parentNode.replaceChild(f,b)}f=i(g,h,c[1],c[2],c[3][1],c[3][2],c[4][1]);f.style.position="absolute";return b.parentNode.replaceChild(f,b)}}function l(a,b,c,g,d){var h=0,e,i=(a[1]-g[1])/c,a=(a[2]-g[2])/c;0!==b&&(b*=-2*Math.PI,c=i*Math.cos(b)-a*Math.sin(b),a=i*Math.sin(b)+a*Math.cos(b),i=c);if(0===d.length)return!1;e=d[0];for(c=d.length-1;c--;){b=d[c];g=e[1];e=e[2];var j=b[1],l=b[2];if(e<l)var t=e,p=l;else t=l,p=e;if(g<j)var s=g,v=j;
43+else s=j,v=g;t<a&&a<=p&&i<=v&&(i<=s||i<=(a-e)*(j-g)/(l-e)+g)&&++h;e=b}return 1===h%2}var h=Elm.JavaScript;return{collage:function(a,b,c){if(0===c.length)return d(a,b,[]);for(var g=Array(c.length),h=c.length;h--;){var e=c[h];g[h]="string"===typeof e[0]?i(a,b,e[1],e[2],e[3][1],e[3][2],e[4][1]):d(a,b,e)}return 1===c.length?g[0]:Render.flowWith(Render.goIn,function(a){return a},g)},updateCollage:function(a,f,c){if(1===c.length)return b(a,f[0],c[0]);for(var a=a.childNodes,g=a.length,d=g;d--;)b(a[g-d-1],
44+f[d],c[d])},insideForm:function(a){return function(b){var c=a[1],g=a[2];if(6>b.length){var d=b[3][1],e=b[3][2],h=0,i=b[2];switch(b[4][0]){case "FShape":for(var j=b[4][3][1],q=j.length;--q;)var t=j[q],h=Math.max(h,t[1]*t[1]+t[2]*t[2]);h*=i*i;break;case "FImage":j=i*b[4][1]/2;i=i*b[4][2]/2;h=j*j+i*i;break;case "FElement":j=i*b[4][1][3]/2,i=i*b[4][1][4]/2,h=j*j+i*i}b.push(function(a,b){var c=a-d,f=b-e;return c*c+f*f<h+1})}if(!b[5](c,g))return!1;var p,s;switch(b[4][0]){case "FShape":return l(a,b[1],b[2],
45+b[3],b[4][3][1]);case "FLine":return!1;case "FImage":p=b[4][1]/2;s=b[4][2]/2;break;case "FElement":p=b[4][1][3]/2,s=b[4][1][4]/2}return l(a,b[1],b[2],b[3],[[null,p,s],[null,-p,s],[null,-p,-s],[null,p,-s],[null,p,s]])}}}}();
46+Elm.Graphics=function(){function e(a){return function(b){return["Position",a,b]}}function j(a){return function(b){return["EText",a,b]}}function a(a){return function(b){return["EFlow",a,u.castListToJSArray(b)]}}function d(a){return["Line",u.castListToJSArray(a)]}function i(a){return function(b){var c=u.castListToJSArray(a);0<c.length&&c.push(c[0]);return["Shape",c,b]}}function b(a){return function(b){return function(c){return function(f){return["Form",a,b,c,f]}}}}function l(a){return function(b){return function(c){return["FLine",
47+a,b,c]}}}function h(a){return function(b){return function(c){return["FShape",a,b,c]}}}function k(a,b,c,f,g,d){return["Element",Guid.guid(),a,b,c,f,g,d]}function f(a,b,c){return["Element",Guid.guid(),a,b,c,1,["Nothing"],["Nothing"]]}function c(a){return~~a[3]}function g(a){return~~a[4]}function r(a){return function(b){return function(c){return f(["EImage",u.castStringToJSString(c)],a,b)}}}function m(a){return function(b){return f(z,a,b)}}function n(a){return function(b){return function(c){var f=map(function(c){return["Tuple2",
48+a/2*Math.cos(2*(Math.PI/50)*c),b/2*Math.sin(2*(Math.PI/50)*c)]}),g=49,d=["Nil"];if(0<=g){do d=["Cons",g,d];while(0<g--)}return i(f(d))(c)}}}for(this.i in Elm.List)eval("var "+this.i+" = Elm.List[this.i];");var u=Elm.JavaScript,x=["DRight"],q=["DDown"],t=["DOut"],p=["Near"],s=["Mid"],v=["Far"],z=["EEmpty"],w=["Solid"],C=["Dotted"],E=["Dashed"],A=["Filled"],D=["Outlined"],y=e(p)(p),B=e(v)(p),F=e(p)(v),G=e(v)(v),H=e(p)(s),I=e(v)(s),p=e(s)(p),v=e(s)(v),s=e(s)(s);return{left:["DLeft"],right:x,down:q,up:["DUp"],
49+inward:["DIn"],outward:t,topLeft:y,topRight:B,bottomLeft:F,bottomRight:G,midLeft:H,midRight:I,midTop:p,midBottom:v,middle:s,middleAt:function(a){return function(b){return["PositionAt",a,b]}},topLeftAt:function(a){return function(b){return["PositionTL",a,b]}},topRightAt:function(a){return function(b){return["PositionTR",a,b]}},bottomLeftAt:function(a){return function(b){return["PositionBL",a,b]}},bottomRightAt:function(a){return function(b){return["PositionBR",a,b]}},absolute:function(a){return["Absolute",
50+a]},relative:function(a){return["Relative",a]},width:function(a){return function(b){var c=b[2];switch(c[0]){case "EImage":case "EVideo":return k(b[2],a,b[4]*a/b[3],b[5],b[6],b[7]);case "EText":return c=Value.getTextSize(a,b[4],c[2]),k(b[2],a,c[1],b[5],b[6],b[7])}return k(b[2],a,b[4],b[5],b[6],b[7])}},height:function(a){return function(b){switch(b[2][0]){case "EImage":case "EVideo":return k(b[2],b[3]*a/b[4],a,b[5],b[6],b[7])}return k(b[2],b[3],a,b[5],b[6],b[7])}},size:function(a){return function(b){return function(c){return k(c[2],
51+a,b,c[5],c[6],c[7])}}},opacity:function(a){return function(b){return k(b[2],b[3],b[4],a,b[6],b[7])}},color:function(a){return function(b){return k(b[2],b[3],b[4],b[5],["Just",a],b[7])}},link:function(a){return function(b){return k(b[2],b[3],b[4],b[5],b[6],["Just",u.castStringToJSString(a)])}},widthOf:c,heightOf:g,sizeOf:function(a){return["Tuple2",~~a[3],~~a[4]]},text:function(a){var b=Value.getTextSize(0,0,a);return f(j("left")(a),b[0],b[1])},asText:function(a){var a=Elm.Text.monospace(Value.toText(Value.show(a))),
52+b=Value.getTextSize(0,0,a);return f(j("left")(a),b[0],b[1])},plainText:function(a){var a=Value.toText(a),b=Value.getTextSize(0,0,a);return f(j("left")(a),b[0],b[1])},centeredText:function(a){var b=Value.getTextSize(0,0,a);return f(j("center")(a),b[0],b[1])},justifiedText:function(a){var b=Value.getTextSize(0,0,a);return f(j("justify")(a),b[0],b[1])},rightedText:function(a){var b=Value.getTextSize(0,0,a);return f(j("right")(a),b[0],b[1])},image:r,images:function(a){var b=Elm.Signal.constant(m(0)(0)),
53+a=Elm.Signal.lift(function(a){var a=u.castStringToJSString(a),c=new Image;c.onload=function(){Dispatcher.notify(b.id,r(this.width)(this.height)(a))};c.src=a})(a);return Elm.Signal.lift2(function(a){return function(){return a}})(b)(a)},video:function(a){return function(b){return function(c){return f(["EVideo",u.castStringToJSString(c)],a,b)}}},fittedImage:function(a){return function(b){return function(c){return f(["EFittedImage",u.castStringToJSString(c)],a,b)}}},flow:function(b){return function(d){var h;
54+h=map(c)(d);a:{switch(b[0]){case "DLeft":h=sum(h);break a;case "DRight":h=sum(h);break a}h=maximum(h)}var e;e=map(g)(d);a:{switch(b[0]){case "DDown":e=sum(e);break a;case "DUp":e=sum(e);break a}e=maximum(e)}return f(a(b)(d),h,e)}},above:function(b){return function(c){return f(a(q)(["Cons",b,["Cons",c,["Nil"]]]),Math.max(~~b[3],~~c[3]),~~b[4]+~~c[4])}},below:function(b){return function(c){return f(a(q)(["Cons",c,["Cons",b,["Nil"]]]),Math.max(~~b[3],~~c[3]),~~b[4]+~~c[4])}},beside:function(b){return function(c){return f(a(x)(["Cons",
55+b,["Cons",c,["Nil"]]]),~~b[3]+~~c[3],Math.max(~~b[4],~~c[4]))}},layers:function(b){return f(a(t)(b),maximum(map(c)(b)),maximum(map(g)(b)))},collage:function(a){return function(b){return function(c){return f(["ECollage",a,b,Value.groupForms(c)],a,b)}}},spacer:m,container:function(a){return function(b){return function(c){return function(g){return f(["EContainer",c,g],a,b)}}}},line:d,segment:function(a){return function(b){return d(["Cons",a,["Cons",b,["Nil"]]])}},polygon:i,rect:function(a){return function(b){return function(c){return i(["Cons",
56+["Tuple2",0-a/2,0-b/2],["Cons",["Tuple2",0-a/2,b/2],["Cons",["Tuple2",a/2,b/2],["Cons",["Tuple2",a/2,0-b/2],["Nil"]]]]])(c)}}},oval:n,circle:function(a){return n(2*a)(2*a)},ngon:function(a){return function(b){return function(c){var f=map(function(c){return["Tuple2",b*Math.cos(2*(Math.PI/a)*c),b*Math.sin(2*(Math.PI/a)*c)]}),g=a-1,d=["Nil"];if(0<=g){do d=["Cons",g,d];while(0<g--)}return i(f(d))(c)}}},solid:function(a){return function(c){return b(0)(1)(["Tuple2",0,0])(l(w)(a)(c))}},dotted:function(a){return function(c){return b(0)(1)(["Tuple2",
57+0,0])(l(C)(a)(c))}},dashed:function(a){return function(c){return b(0)(1)(["Tuple2",0,0])(l(E)(a)(c))}},customLine:function(a){return function(c){return function(f){return b(0)(1)(["Tuple2",0,0])(l(["Custom",u.castListToJSArray(a)])(c)(f))}}},filled:function(a){return function(c){return b(0)(1)(c[2])(h(A)(a)(c))}},outlined:function(a){return function(c){return b(0)(1)(c[2])(h(D)(a)(c))}},customOutline:function(a){return function(c){return function(f){return b(0)(1)(f[2])(h(["CustomOutline",u.castListToJSArray(a)])(c)(f))}}},
58+textured:function(a){return function(c){return b(0)(1)(c[2])(h(["Textured",a])(null)(c))}},sprite:function(a){return function(c){return function(f){return function(g){return b(0)(1)(g)(["FImage",c,f,u.castStringToJSString(a)])}}}},toForm:function(a){return function(c){return b(0)(1)(a)(["FElement",c])}},rotate:function(a){return function(c){a:{switch(c[0]){case "Form":var f=c[2],g=c[3],d=c[4],c=b(a+c[1])(f)(g)(d);break a}throw"Non-exhaustive pattern match in case";}return c}},scale:function(a){return function(c){return b(c[1])(a*
59+c[2])(c[3])(c[4])}},move:function(a){return function(c){return function(f){var g;a:{switch(f[0]){case "Form":g=f[1];var d=f[2],h=f[3],f=f[4];switch(h[0]){case "Tuple2":var e=h[1],h=h[2];g=b(g)(d)(["Tuple2",a+e,c+h])(f);break a}}throw"Non-exhaustive pattern match in case";}return g}}},isWithin:Collage.insideForm}}();
60+Elm.Text=function(){function e(a){return Value.toText(a)}var j=function(a){return function(b){return"<"+a+' style="padding:0;margin:0">'+b+"</"+a+">"}},a=function(a,b){return function(g){return"<span style='"+a+":"+b+"'>"+g+"</span>"}},d=function(b){b=Elm.JavaScript.castStringToJSString(b);return a("font-family",b)},i=j("h1"),b=a("font-style","italic"),j=j("b"),l=a("text-decoration","underline"),h=a("text-decoration","overline"),k=a("text-decoration","line-through");return{fromString:e,toText:e,header:i,
61+height:function(b){return a("font-size",b+"em")},italic:b,bold:j,underline:l,overline:h,strikeThrough:k,monospace:d("monospace"),typeface:d,color:function(b){return a("color",Elm.Color.extract(b))},link:function(a){return function(b){return"<a href='"+e(a)+"'>"+b+"</a>"}}}}();
62+var Render=function(){function e(a){a=document.createElement(a);a.style.padding="0";a.style.margin="0";return a}function j(a){return a}function a(a){a.style.styleFloat="left";a.style.cssFloat="left";return a}function d(a){a.style.position="absolute";return a}function i(a,b,g){for(var d=e("div"),h=g.length;h--;){var i=a(b(g[h]));d.appendChild(i)}return d}function b(a){switch(a[0]){case "Absolute":return a[1]+"px";case "Relative":return 100*a[1]+"%"}}function l(a,c){c.style.position="absolute";c.style.margin=
63+"auto";switch(a[0]){case "Position":"Far"!==a[1][0]&&(c.style.left=0);"Near"!==a[1][0]&&(c.style.right=0);"Far"!==a[2][0]&&(c.style.top=0);"Near"!==a[2][0]&&(c.style.bottom=0);break;case "PositionAt":c.style.top=b(a[2]);c.style.left=b(a[1]);var g="translate("+~~(-c.style.width.slice(0,-2)/2)+"px,"+~~(-c.style.height.slice(0,-2)/2)+"px)";c.style.transform=g;c.style.msTransform=g;c.style.MozTransform=g;c.style.webkitTransform=g;c.style.OTransform=g;break;default:g=a[0].slice(-2),c.style["T"===g[0]?
64+"top":"bottom"]=b(a[2]),c.style["L"===g[1]?"left":"right"]=b(a[1])}}function h(b){var c={};switch(b[2][0]){case "EText":var c=b[2][1],g=b[2][2],r=e("div");r.innerHTML=g;r.style.textAlign=c;c=r;break;case "EImage":c=b[2][1];g=e("img");g.src=c;g.name=c;g.style.display="block";c=g;break;case "EVideo":r=b[2][1];c=e("video");c.controls="controls";g=e("source");g.src=r;r=r.split(".");g.type="video/"+r[r.length-1];c.appendChild(g);c.style.display="block";break;case "EFittedImage":var m=b[3],n=b[4],c=b[2][1],
65+g=e("div");g.style.width=m+"px";g.style.height=n+"px";g.style.position="relative";g.style.overflow="hidden";var k=e("img");k.onload=function(){k.style.position="absolute";k.style.margin="auto";var a=m,b=n;m/n>this.width/this.height?b=Math.round(this.height*m/this.width):a=Math.round(this.width*n/this.height);k.style.width=a+"px";k.style.height=b+"px";k.style.left=(m-a)/2+"px";k.style.top=(n-b)/2+"px"};k.src=c;k.name=c;g.appendChild(k);c=g;break;case "EFlow":a:{c=b[2][2];switch(b[2][1][0]){case "DDown":c=
66+c.slice(0).reverse();case "DUp":c=i(j,h,c);break a;case "DRight":c=c.slice(0).reverse();case "DLeft":c=i(a,h,c);break a;case "DOut":c=c.slice(0).reverse();case "DIn":c=i(d,h,c);break a}c=void 0}break;case "ECollage":c=Collage.collage(b[2][1],b[2][2],b[2][3]);break;case "EEmpty":c=e("div");break;case "EContainer":g=b[2][1];c=h(b[2][2]);l(g,c);g=e("div");g.style.position="relative";g.style.overflow="hidden";g.appendChild(c);c=g;break;case "EHtml":c=b[2][1];"button"!==c.type&&(g=Value.getExcess(c),b[3]-=
67+g[0],b[4]-=g[1]);break;case "EExternalHtml":c=e("div"),c.appendChild(b[2][1])}c.id=b[1];c.style.width=~~b[3]+"px";c.style.height=~~b[4]+"px";1!==b[5]&&(c.style.opacity=b[5]);"Just"===b[6][0]&&(c.style.backgroundColor=Elm.Color.extract(b[6][1]));return"Just"===b[7][0]?(g=e("a"),g.href=b[7][1],g.appendChild(c),g):c}function k(b,c,g){"A"===b.tagName&&(b=b.firstChild);if(c[1]!==g[1]){if(c[2][0]!==g[2][0])return b.parentNode.replaceChild(h(g),b);var e=g[2],i=c[2];switch(e[0]){case "EText":e[1]!==i[1]&&
68+(b.style.textAlign=e[1]);e[2]!==i[2]&&(b.innerHTML=e[2]);break;case "EImage":e[1]!==i[1]&&(b.src=e[1]);break;case "EVideo":case "EFittedImage":if(!Value.eq(e,i)||g[3]!==c[3]||g[4]!==c[4])return b.parentNode.replaceChild(h(g),b);break;case "ECollage":if(e[1]!==i[1]||e[2]!==i[2]||e[3].length!==i[3].length)return b.parentNode.replaceChild(h(g),b);Collage.updateCollage(b,i[3],e[3]);break;case "EFlow":if(e[1]!==i[1])return b.parentNode.replaceChild(h(g),b);var n=e[2],u=b.childNodes;if(n.length!==u.length)return b.parentNode.replaceChild(h(g),
69+b);var i=i[2],x=function(a){return a};switch(e[1][0]){case "DDown":case "DUp":x=j;break;case "DRight":case "DLeft":x=a;break;case "DOut":case "DIn":x=d}for(e=u.length;e--;)k(u[e],i[e],n[e]),x(u[e]);break;case "EContainer":k(b.childNodes[0],i[2],e[2]);l(e[1],b.childNodes[0]);break;case "EHtml":g[1]!==c[1]&&(n=h(g),b.parentNode.replaceChild(n,b),b=n);"button"!==n.type&&(e=Value.getExcess(b),g[3]-=e[0],g[4]-=e[1]);break;case "EExternalHtml":g[1]!==c[1]&&b.parentNode.replaceChild(h(g),b)}g[3]!==c[3]&&
70+(b.style.width=~~g[3]+"px");g[4]!==c[4]&&(b.style.height=~~g[4]+"px");g[5]!==c[5]&&(b.style.opacity=g[5]);2===g[6].length&&(e=Elm.Color.extract(g[6][1]),e!==b.style.backgroundColor&&(b.style.backgroundColor=e));if(2===g[7].length&&(1===c[7].length||g[7][1]!==c[7][1]))b.parentNode.href=g[7][1];g[1]=c[1]}}return{render:h,update:k,addTo:function(a,b){a.appendChild(b)},newElement:e,flowWith:i,goIn:d}}();
71+Elm.Signal=function(){function e(a){this.id=Guid.guid();this.value=a;this.kids=[];this.defaultNumberOfKids=0;this.recv=function(a,b,c){if(b=b===this.id)this.value=c;k(this,a,b);return b};Dispatcher.inputs.push(this)}function j(a,b){this.id=Guid.guid();this.value=null;this.kids=[];this.count=0;this.changed=!1;b.reverse();this.recalc=function(){for(var d=a,f=b.length;f--;)d=d(b[f].value);this.value=d};this.recalc();this.recv=function(a,c){this.count+=1;c&&(this.changed=!0);this.count==b.length&&(this.changed&&
72+this.recalc(),k(this,a,this.changed),this.changed=!1,this.count=0)};for(var d=b.length;d--;)b[d].kids.push(this)}function a(a,b,d,f){this.id=Guid.guid();this.value=d?b(f.value):b;this.kids=[];this.recv=function(b,d){d&&(this.value=a(f.value)(this.value));k(this,b,d)};f.kids.push(this)}function d(a,b,d){this.id=Guid.guid();this.value=a(d.value)?b:d.value;this.kids=[];this.recv=function(b,g){var f=g&&!a(d.value);f&&(this.value=d.value);k(this,b,f)};d.kids.push(this)}function i(a){this.id=Guid.guid();
73+this.value=a.value;this.kids=[];this.recv=function(b,d){var f=d&&!Value.eq(this.value,a.value);f&&(this.value=a.value);k(this,b,f)};a.kids.push(this)}function b(a,b){this.id=Guid.guid();var d=(new window.Date).getTime();this.value=a?Value.Tuple(d,b.value):d;this.kids=[];this.recv=function(d,f){f&&(this.value=a?Value.Tuple(d,b.value):d);k(this,d,f)};b.kids.push(this)}function l(a,b){this.id=Guid.guid();this.value=b.value;this.kids=[];this.count=0;this.changed=!1;this.recv=function(d,f,e){e===a.id&&
74+(this.changed=f);this.count+=1;2==this.count&&(this.changed&&(this.value=b.value),k(this,d,this.changed),this.count=0,this.changed=!1)};a.kids.push(this);b.kids.push(this)}function h(a,b){this.id=Guid.guid();this.value=a.value;this.kids=[];this.next=null;this.count=0;this.changed=!1;this.recv=function(d,f,e){this.count+=1;f&&(this.changed=!0,e==b.id&&null===this.next&&(this.next=b.value),e==a.id&&(this.next=a.value));2==this.count&&(this.changed&&(this.value=this.next,this.next=null),k(this,d,this.changed),
75+this.changed=!1,this.count=0)};a.kids.push(this);b.kids.push(this)}var k=function(a,b,d){for(var f=a.kids,e=f.length;e--;)f[e].recv(b,d,a.id)},f=function(a){return function(b){return function(f){f=new j(function(a){return function(b){return[a,b]}},[a,f]);f=new d(function(a){return a[0]},[!0,b],f);return new j(function(a){return a[1]},[f])}}};return{constant:function(a){return new e(a)},lift:function(a){return function(b){return new j(a,[b])}},lift2:function(a){return function(b){return function(d){return new j(a,
76+[b,d])}}},lift3:function(a){return function(b){return function(d){return function(f){return new j(a,[b,d,f])}}}},lift4:function(a){return function(b){return function(d){return function(f){return function(e){return new j(a,[b,d,f,e])}}}}},lift5:function(a){return function(b){return function(d){return function(f){return function(e){return function(h){return new j(a,[b,d,f,e,h])}}}}}},lift6:function(a){return function(b){return function(d){return function(f){return function(e){return function(h){return function(i){return new j(a,
77+[b,d,f,e,h,i])}}}}}}},lift7:function(a){return function(b){return function(d){return function(f){return function(e){return function(h){return function(i){return function(k){return new j(a,[b,d,f,e,h,i,k])}}}}}}}},lift8:function(a){return function(b){return function(d){return function(f){return function(e){return function(h){return function(i){return function(k){return function(l){return new j(a,[b,d,f,e,h,i,k,l])}}}}}}}}},foldp:function(b){return function(d){return function(f){return new a(b,d,!1,
78+f)}}},foldp_:function(b){return function(d){return function(f){return new a(b,d,!0,f)}}},foldp1:function(b){return function(d){return new a(b,function(a){return a},!0,d)}},delay:function(a){return function(b){var d=new e(b.value),f=!0,b=new l(d,new j(function(a){return function(){return a}},[d,new j(function(b){f||setTimeout(function(){Dispatcher.notify(d.id,b)},a)},[b])])),f=!1;return b}},merge:function(a){return function(b){return new h(a,b)}},merges:function(a){return Elm.List.foldl1(function(a){return function(b){return new h(a,
79+b)}})(a)},average:function(a){return function(b){for(var d=Array(a),f=a;f--;)d[f]=0;var f=0,e=!1,h=0;return new j(function(b){h+=b-d[f];d[f]=b;b=h/Math.max(1,e?a:f);++f==a&&(e=!0,f=0);return b},[b])}},count:function(b){return new a(function(){return function(a){return a+1}},0,!1,b)},countIf:function(b){return function(d){return new a(function(a){return function(d){return b(a)?d+1:d}},0,!1,d)}},keepIf:function(a){return function(b){return function(f){return new d(function(b){return!a(b)},b,f)}}},dropIf:function(a){return function(b){return function(f){return new d(a,
80+b,f)}}},keepWhen:function(a){return f(new j(function(a){return!a},[a]))},dropWhen:f,dropRepeats:function(a){return new i(a)},sampleOn:function(a){return function(b){return new l(a,b)}},timestamp:function(a){return new b(!0,a)},timeOf:function(a){return new b(!1,a)}}}();
81+var Dispatcher=function(){function e(a){if(!a.hasOwnProperty("defaultNumberOfKids"))return!0;var b=a.kids.length;if(0==b)return!1;if(b>a.defaultNumberOfKids)return!0;for(var d=!1;b--;)d=d||e(a.kids[b]);return d}var j=null,a=[],d=null;return{initialize:function(){j=Elm.main();j.hasOwnProperty("recv")||(j=Elm.Signal.constant(j));d=j.value;for(var i=[],b=a.length;b--;)e(a[b])&&i.push(a[b]);a=i;document.getElementById("content").appendChild(Render.render(d));i=document.getElementById("widthChecker").offsetWidth;
82+i!==window.innerWidth&&Dispatcher.notify(Elm.Window.dimensions.id,Value.Tuple(i,window.innerHeight));j=Elm.Signal.lift(function(a){var b=document.getElementById("content");Render.update(b.firstChild,d,a);return d=a})(j)},notify:function(d,b){for(var e=(new window.Date).getTime(),h=!1,j=a.length;j--;)h=a[j].recv(e,d,b)||h;return h},inputs:a}}();
83+Elm.HTTP=function(){function e(a){return function(d){return function(f){return function(c){return{"0":"Request",length:1,verb:b.castStringToJSString(a),url:b.castStringToJSString(d),data:null===f?null:b.castStringToJSString(f),headers:c}}}}}function j(a){return e("GET")(a)(null)(["Nil"])}function a(a,e){return function(f){if(""!==f.url){var c={value:["Waiting"]};a.push(c);var g=null;window.ActiveXObject&&(g=new ActiveXObject("Microsoft.XMLHTTP"));window.XMLHttpRequest&&(g=new XMLHttpRequest);g.onreadystatechange=
84+function(){4===g.readyState&&(c.value=200===g.status?["Success",l(g.responseText)]:["Failure",g.status,l(g.statusText)],setTimeout(function(){d(a,e)},0))};g.open(f.verb,f.url,!0);Elm.List.map(function(a){g.setRequestHeader(b.castStringToJSString(a[1]),b.castStringToJSString(a[2]))})(f.headers);g.send(f.data)}}}function d(a,b){0<a.length&&(Dispatcher.notify(b.id,a[0].value),"Waiting"!==a[0].value[0]&&(a.shift(),setTimeout(function(){d(a,b)},0)))}function i(b){var d=Elm.Signal.constant(["Waiting"]),
85+b=Elm.Signal.lift(a([],d))(b);return Elm.Signal.lift2(function(a){return function(){return a}})(d)(b)}var b=Elm.JavaScript,l=Elm.JavaScript.castJSStringToString;return{get:j,post:function(a){return function(b){return e("POST")(a)(b)(["Nil"])}},request:e,send:i,sendGet:function(a){return i(Elm.Signal.lift(j)(a))}}}();
86+Elm.Input=function(){var e=Elm.JavaScript,j=Elm.JavaScript.castJSStringToString,a=function(a,d){a.placeholder=e.castStringToJSString(d);var h=Elm.Signal.constant(["Nil"]);Value.addListener(a,"keyup",function(){Dispatcher.notify(h.id,j(a.value));a.focus()});a.style.padding="1px";return Value.Tuple(Value.wrap(a),h)},d=function(a){a=document.createElement(a);a.style.padding="0";a.style.margin="0";return a},i=function(a){for(var e=d("select"),h=[];"Cons"===a[0];){var i=d("option"),f=Value.toText(a[1][1]);
87+i.value=f;i.innerHTML=f;e.appendChild(i);h.push(a[1][2]);a=a[2]}var c=Elm.Signal.constant(h[0]);Value.addListener(e,"change",function(){Dispatcher.notify(c.id,h[e.selectedIndex])});return Value.Tuple(Value.wrap(e),c)};return{textArea:function(b){return function(e){var h=d("textarea");h.rows=e;h.cols=b;return a(h,"")}},textField:function(b){var e=d("input");e.type="text";return a(e,b)},password:function(b){var e=d("input");e.type="password";return a(e,b)},checkbox:function(a){var e=d("input");e.type=
88+"checkbox";e.checked=a;var h=Elm.Signal.constant(a);Value.addListener(e,"change",function(){Dispatcher.notify(h.id,e.checked)});return Value.Tuple(Value.wrap(e),h)},dropDown:i,stringDropDown:function(a){return i(Elm.List.map(function(a){return Value.Tuple(a,a)})(a))},button:function(a){var i=d("input");i.type="button";i.value=e.castStringToJSString(a);var h=Elm.Signal.constant(!1);Value.addListener(i,"click",function(){Dispatcher.notify(h.id,!0);Dispatcher.notify(h.id,!1)});return Value.Tuple(Value.wrap(i),
89+h)}}}();
90+Elm.Keyboard={Raw:function(){function e(a,i){return"Nil"===i[0]?i:i[1]===a?i[2]:["Cons",i[1],e(a,i[2])]}var j=Elm.Signal.constant(["Nil"]),a=Elm.Signal.constant(["Nothing"]);Value.addListener(document,"keydown",function(a){var e;a:{for(e=j.value;"Nil"!==e[0];){if(e[1]===a.keyCode){e=!0;break a}e=e[2]}e=!1}e||Dispatcher.notify(j.id,["Cons",a.keyCode,j.value])||this.removeEventListener("keydown",arguments.callee,!1)});Value.addListener(document,"keyup",function(a){var i=e(a.keyCode,j.value);Dispatcher.notify(j.id,
91+i)||this.removeEventListener("keyup",arguments.callee,!1)});Value.addListener(window,"blur",function(a){Dispatcher.notify(j.id,["Nil"])||this.removeEventListener("blur",arguments.callee,!1)});Value.addListener(document,"keypress",function(d){var e=Dispatcher.notify(a.id,["Just",d.charCode||d.keyCode]);Dispatcher.notify(a.id,["Nothing"]);e||this.removeEventListener("keypress",arguments.callee,!1)});return{keysDown:j,charPressed:a}}()};
92+Elm.Mouse=function(){function e(a){var b=0,d=0;a||(a=window.event);if(a.pageX||a.pageY)b=a.pageX,d=a.pageY;else if(a.clientX||a.clientY)b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d=a.clientY+document.body.scrollTop+document.documentElement.scrollTop;return Value.Tuple(b,d)}var j=Elm.Signal.constant(Value.Tuple(0,0));j.defaultNumberOfKids=2;var a=Elm.Signal.lift(function(a){return a[1]})(j);a.defaultNumberOfKids=0;var d=Elm.Signal.lift(function(a){return a[2]})(j);d.defaultNumberOfKids=
93+0;var i=Elm.Signal.constant(!1),b=Elm.Signal.constant(!1),l=Elm.Signal.constant(Value.Tuple());Value.addListener(document,"click",function(a){var d=Dispatcher.notify(b.id,!0),f=Dispatcher.notify(l.id,Value.Tuple());Dispatcher.notify(b.id,!1);!d&&!f&&this.removeEventListener("click",arguments.callee,!1)});Value.addListener(document,"mousedown",function(a){Dispatcher.notify(i.id,!0)||this.removeEventListener("mousedown",arguments.callee,!1)});Value.addListener(document,"mouseup",function(a){Dispatcher.notify(i.id,
94+!1)||this.removeEventListener("mouseup",arguments.callee,!1)});Value.addListener(document,"mousemove",function(a){Dispatcher.notify(j.id,e(a))||this.removeEventListener("mousemove",arguments.callee,!1)});return{position:j,x:a,y:d,isClicked:b,isDown:i,clicks:l,isClickedOn:function(a){var a=Render.render(a),b=Elm.Signal.constant(!1);Value.addListener(a,"click",function(){Dispatcher.notify(b.id,!0);Dispatcher.notify(b.id,!1)});return Value.Tuple(Value.wrap(a),b)}}}();
95+Elm.Random=function(){return{inRange:function(e){return function(j){return Elm.Signal.constant(Math.floor(Math.random()*(j-e+1))+e)}},randomize:function(e){return function(j){return function(a){return Elm.Signal.lift(function(){return Math.floor(Math.random()*(j-e+1))+e})(a)}}}}}();
96+Elm.Time=function(){function e(){return(new window.Date).getTime()}function j(a){return function(d){var i=1E3/a,b=e(),j=b,h=0,k=!0,f=Elm.Signal.constant(h),c=0;return Elm.Signal.lift2(function(a){return function(d){if(a){var m=!k&&a;c=setTimeout(function(){j=e();h=m?0:j-b;b=j;Dispatcher.notify(f.id,h)},i)}else k&&clearTimeout(c);k=a;return d}})(d)(f)}}Elm.Signal.constant(!0);return{fpsWhen:j,fps:function(a){return j(a)(Elm.Signal.constant(!0))},every:function(a){var d=Elm.Signal.constant(e());setInterval(function(){Dispatcher.notify(d.id,
97+e())},a);return d},delay:Elm.Signal.delay,since:function(a){return function(d){var e=Elm.Signal.count(Elm.Signal.delay(a)(d));return Elm.Signal.lift2(function(a){return function(d){return!Value.eq(a,d)}})(Elm.Signal.count(d))(e)}},after:function(a){var a=1E3*a,d=Elm.Signal.constant(!1);setTimeout(function(){Dispatcher.notify(d.id,!0)},a);return d},before:function(a){var a=1E3*a,d=Elm.Signal.constant(!0);setTimeout(function(){Dispatcher.notify(d.id,!1)},a);return d},hour:36E5,minute:6E4,second:1E3,
98+ms:1,inHours:function(a){return a/36E5},inMinutes:function(a){return a/6E4},inSeconds:function(a){return a/1E3},inMss:function(a){return a},toDate:function(a){return new window.Date(a)},read:function(a){a=window.Date.parse(a);return isNaN(a)?["Nothing"]:["Just",a]}}}();
99+Elm.Window=function(){var e=Elm.Signal.constant(Value.Tuple(window.innerWidth,window.innerHeight));e.defaultNumberOfKids=2;var j=Elm.Signal.lift(function(a){return a[1]})(e);j.defaultNumberOfKids=0;var a=Elm.Signal.lift(function(a){return a[2]})(e);a.defaultNumberOfKids=0;Value.addListener(window,"resize",function(a){var i=document.getElementById("widthChecker").offsetWidth;Dispatcher.notify(e.id,Value.Tuple(i,window.innerHeight))||this.removeEventListener("resize",arguments.callee,!1)});return{dimensions:e,
100+width:j,height:a}}();
101+Elm.Date=function(){var e="Sun Mon Tue Wed Thu Fri Sat".split(" "),j="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");return{read:function(a){a=new window.Date(Elm.JavaScript.castStringToJSString(a));return isNaN(a.getTime())?["Nothing"]:["Just",a]},year:function(a){return a.getFullYear()},month:function(a){return[j[a.getMonth()]]},day:function(a){return a.getDate()},hour:function(a){return a.getHours()},minute:function(a){return a.getMinutes()},second:function(a){return a.getSeconds()},dayOfWeek:function(a){return[e[a.getDay()]]},
102+toTime:function(a){return a.getTime()},Mon:["Mon"],Tue:["Tue"],Wed:["Wed"],Thu:["Thu"],Fri:["Fri"],Sat:["Sat"],Sun:["Sun"],Jan:["Jan"],Feb:["Feb"],Mar:["Mar"],Apr:["Apr"],May:["May"],Jun:["Jun"],Jul:["Jul"],Aug:["Aug"],Sep:["Sep"],Oct:["Oct"],Nov:["Nov"],Dec:["Dec"]}}();Value.addListener(document,"elm_log",function(e){console.log(e.value)});Value.addListener(document,"elm_title",function(e){document.title=e.value});
103+Value.addListener(document,"elm_redirect",function(e){0<e.value.length&&(window.location=e.value)});
104+Elm.Prelude=function(){function e(a){return function(d){if(a instanceof Array&&d instanceof Array){var i=a.length;if(i==d.length){for(var b=1;b<i;++b){var j=e(a[b])(d[b]);if("EQ"!==j[0])return j}return["EQ"]}return[1==d.length?"GT":"LT"]}return[a===d?"EQ":a<d?"LT":"GT"]}}var j=function(a){return function(d){var e=a%d,e=0==a?0:0<d?0<=a?e:e+d:-j(-a)(-d);return e==d?0:e}};return{eq:Value.eq,id:function(a){return a},not:function(a){return!a},fst:function(a){return a[1]},snd:function(a){return a[2]},rem:function(a){return function(d){return a%
105+d}},div:function(a){return function(d){return~~(a/d)}},otherwise:!0,compare:e,toFloat:function(a){return a},round:function(a){return Math.round(a)},floor:function(a){return Math.floor(a)},ceiling:function(a){return Math.ceil(a)},truncate:function(a){return~~a},readInt:function(a){var a=Elm.JavaScript.castStringToJSString(a),d=a.length;if(0===d)return["Nothing"];var e=0;if("-"==a[0]){if(1===d)return["Nothing"];e=1}for(;e<d;++e)if(!Elm.Char.isDigit(a[e]))return["Nothing"];return["Just",parseInt(a)]},
106+readFloat:function(a){var a=Elm.JavaScript.castStringToJSString(a),d=a.length;if(0===d)return["Nothing"];var e=0;if("-"==a[0]){if(1===d)return["Nothing"];e=1}for(var b=0;e<d;++e)if(!Elm.Char.isDigit(a[e])){if("."===a[e]&&(b+=1,1>=b))continue;return["Nothing"]}return["Just",parseFloat(a)]},sqrt:Math.sqrt,abs:Math.abs,pi:Math.PI,e:Math.E,sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,atan2:function(a){return function(d){return Math.atan2(a,d)}},mod:j,min:function(a){return function(d){return Math.min(a,
107+d)}},max:function(a){return function(d){return Math.max(a,d)}},flip:function(a){return function(d){return function(e){return a(e)(d)}}},clamp:function(a){return function(d){return function(e){return Math.min(d,Math.max(a,e))}}},curry:function(a){return function(d){return function(e){return a(["Tuple2",d,e])}}},uncurry:function(a){return function(d){if("Tuple2"!==d[0])throw"Function was uncurry'd but was not given a pair.";return a(d[1])(d[2])}},logBase:function(a){return function(d){return Math.log(d)/
108+Math.log(a)}},Just:Elm.Maybe.Just,Nothing:Elm.Maybe.Nothing,maybe:Elm.Maybe.maybe,map:Elm.List.map,zip:Elm.List.zip,zipWith:Elm.List.zipWith,filter:Elm.List.filter,head:Elm.List.head,tail:Elm.List.tail,last:Elm.List.last,length:Elm.List.length,reverse:Elm.List.reverse,foldr:Elm.List.foldr,foldr1:Elm.List.foldr1,foldl:Elm.List.foldl,foldl1:Elm.List.foldl1,and:Elm.List.and,or:Elm.List.or,all:Elm.List.all,any:Elm.List.any,sum:Elm.List.sum,product:Elm.List.product,concat:Elm.List.concat,concatMap:Elm.List.concatMap,
109+maximum:Elm.List.maximum,minimum:Elm.List.minimum,scanl:Elm.List.scanl,scanl1:Elm.List.scanl1,take:Elm.List.take,drop:Elm.List.drop,zip:Elm.List.zip,unzip:Elm.List.unzip,lift:Elm.Signal.lift,lift2:Elm.Signal.lift2,lift3:Elm.Signal.lift3,lift4:Elm.Signal.lift4,lift5:Elm.Signal.lift5,lift6:Elm.Signal.lift6,lift7:Elm.Signal.lift7,lift8:Elm.Signal.lift8,foldp:Elm.Signal.foldp,foldp1:Elm.Signal.foldp1,foldp_:Elm.Signal.foldp_,constant:Elm.Signal.constant,merge:Elm.Signal.merge,count:Elm.Signal.count,countIf:Elm.Signal.countIf,
110+average:Elm.Signal.average,keepIf:Elm.Signal.keepIf,dropIf:Elm.Signal.dropIf,keepWhen:Elm.Signal.keepWhen,dropWhen:Elm.Signal.dropWhen,dropRepeats:Elm.Signal.dropRepeats,sampleOn:Elm.Signal.sampleOn,timestamp:Elm.Signal.timestamp,timeOf:Elm.Signal.timeOf}}();(function(){var e=function(e){for(var a in e)Elm.Prelude[a]=e[a]};e(Elm.Color);e(Elm.Text);e(Elm.Graphics);e(Elm.Time);show=Value.show})();
111+Elm.Dict=function(){function e(a){return function(b){return function(c){return function(d){return function(e){return["RBNode",a,b,c,d,e]}}}}}function j(a){a:{switch(a[0]){case "RBEmpty":throw"(min RBEmpty) is not defined";case "RBNode":switch(a[4][0]){case "RBEmpty":a=["Tuple2",a[2],a[3]];break a}a=j(a[4]);break a}throw"Non-exhaustive pattern match in case";}return a}function a(b){return function(c){var d;a:{switch(c[0]){case "RBEmpty":d=v;break a;case "RBNode":d=function(){switch(p(b)(c[2])[0]){case "EQ":return z(c[3]);
112+case "GT":return a(b)(c[5]);case "LT":return a(b)(c[4])}throw"Non-exhaustive pattern match in case";}();break a}throw"Non-exhaustive pattern match in case";}return d}}function d(a){return function(b){return function(c){var e;a:{switch(c[0]){case "RBEmpty":e=a;break a;case "RBNode":e=function(){switch(p(b)(c[2])[0]){case "EQ":return c[3];case "GT":return d(a)(b)(c[5]);case "LT":return d(a)(b)(c[4])}throw"Non-exhaustive pattern match in case";}();break a}throw"Non-exhaustive pattern match in case";
113+}return e}}}function i(b){return function(c){return E(a(b)(c))}}function b(a){a:{switch(a[0]){case "RBNode":switch(a[5][0]){case "RBNode":a=e(a[1])(a[5][2])(a[5][3])(e(A)(a[2])(a[3])(a[4])(a[5][4]))(a[5][5]);break a}}throw"rotateLeft of a node without enough children";}return a}function l(a){a:{switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":a=e(a[1])(a[4][2])(a[4][3])(a[4][4])(e(A)(a[2])(a[3])(a[4][5])(a[5]));break a}}throw"rotateRight of a node without enough children";}return a}function h(a){a:{switch(a[0]){case "Black":a=
114+A;break a;case "Red":a=D;break a}throw"Non-exhaustive pattern match in case";}return a}function k(a){a:{switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":switch(a[5][0]){case "RBNode":a=e(h(a[1]))(a[2])(a[3])(e(h(a[4][1]))(a[4][2])(a[4][3])(a[4][4])(a[4][5]))(e(h(a[5][1]))(a[5][2])(a[5][3])(a[5][4])(a[5][5]));break a}}}throw"color_flip called on a RBEmpty or RBNode with a RBEmpty child";}return a}function f(a){a:switch(a[0]){case "RBNode":switch(a[5][0]){case "RBNode":switch(a[5][1][0]){case "Red":a=
115+b(a);break a}}}a:switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":switch(a[4][1][0]){case "Red":switch(a[4][4][0]){case "RBNode":switch(a[4][4][1][0]){case "Red":a=l(a);break a}}}}}a:switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":switch(a[4][1][0]){case "Red":switch(a[5][0]){case "RBNode":switch(a[5][1][0]){case "Red":a=k(a);break a}}}}}return a}function c(a){a:switch(a[0]){case "RBNode":switch(a[1][0]){case "Red":a=e(D)(a[2])(a[3])(a[4])(a[5]);break a}}return a}function g(a){return function(b){return function(d){var g=
116+function(c){var d;a:{switch(c[0]){case "RBEmpty":d=e(A)(a)(b)(y)(y);break a;case "RBNode":d=function(){switch(p(a)(c[2])[0]){case "EQ":return e(c[1])(c[2])(b)(c[4])(c[5]);case "GT":return e(c[1])(c[2])(c[3])(c[4])(g(c[5]));case "LT":return e(c[1])(c[2])(c[3])(g(c[4]))(c[5])}throw"Non-exhaustive pattern match in case";}();d=f(d);break a}throw"Non-exhaustive pattern match in case";}return d};return c(g(d))}}}function r(a){a:{switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":switch(a[4][1][0]){case "Red":a=
117+!0;break a}}}a=!1}return a}function m(a){a:{switch(a[0]){case "RBNode":switch(a[4][0]){case "RBNode":switch(a[4][4][0]){case "RBNode":switch(a[4][4][1][0]){case "Red":a=!0;break a}}}}a=!1}return a}function n(a){if(w(r(a))&&w(m(a))){a=k(a);a:switch(a[0]){case "RBNode":b:switch(a[5][0]){case "RBNode":switch(a[5][4][0]){case "RBNode":switch(a[5][4][1][0]){case "Red":a=k(b(e(a[1])(a[2])(a[3])(a[4])(l(a[5]))));break b}}}break a}}return a}function u(a){return function(b){var d=function(b){a:{switch(b[0]){case "RBEmpty":b=
118+y;break a;case "RBNode":if("LT"===p(a)(b[2])[0])b:{b=n(b);switch(b[0]){case "RBEmpty":throw"delLT on RBEmpty";case "RBNode":b=f(e(b[1])(b[2])(b[3])(d(b[4]))(b[5]));break b}break}else{var g=r(b)?l(b):b,h;b:{switch(g[0]){case "RBNode":switch(g[5][0]){case "RBEmpty":h=C(a,g[2]);break b}}h=!1}if(h)b=g[4];else{g=w;b:{switch(b[0]){case "RBNode":switch(b[5][0]){case "RBNode":switch(b[5][1][0]){case "Red":h=!0;break b}}}h=!1}if(g=g(h)){g=w;b:{switch(b[0]){case "RBNode":switch(b[5][0]){case "RBNode":switch(b[5][4][0]){case "RBNode":switch(b[5][4][1][0]){case "Red":h=
119+!0;break b}}}}h=!1}g=g(h)}g&&(b=k(b),b=m(b)?k(l(b)):b);b:{switch(b[0]){case "RBNode":g=C(a,b[2]);break b}g=!1}if(g)b:{switch(b[0]){case "RBEmpty":throw"delEQ called on a RBEmpty";case "RBNode":h=j(b[5]);c:{switch(h[0]){case "Tuple2":g=h[1];break c}break}c:{switch(h[0]){case "Tuple2":h=h[2];break c}break}var g=e(b[1])(g)(h)(b[4]),i=function(a){a:{switch(a[0]){case "RBNode":switch(a[4][0]){case "RBEmpty":a=y;break a}}b:{a=n(a);switch(a[0]){case "RBEmpty":a=y;break b;case "RBNode":a=f(e(a[1])(a[2])(a[3])(i(a[4]))(a[5]));
120+break b}throw"Non-exhaustive pattern match in case";}}return a},b=c(i(b[5])),b=f(g(b));break b}break}else b:{switch(b[0]){case "RBEmpty":throw"delGT called on a RBEmpty";case "RBNode":b=f(e(b[1])(b[2])(b[3])(b[4])(d(b[5])));break b}break}}}break a}throw"Non-exhaustive pattern match in case";}return b};return i(a)(b)?c(d(b)):b}}function x(a){return function(b){a:{switch(b[0]){case "RBEmpty":b=y;break a;case "RBNode":b=e(b[1])(b[2])(a(b[3]))(x(a)(b[4]))(x(a)(b[5]));break a}throw"Non-exhaustive pattern match in case";
121+}return b}}function q(a){return function(b){return function(c){a:{switch(c[0]){case "RBEmpty":c=b;break a;case "RBNode":c=q(a)(a(c[2])(c[3])(q(a)(b)(c[4])))(c[5]);break a}throw"Non-exhaustive pattern match in case";}return c}}}function t(a){return function(b){return function(c){a:{switch(c[0]){case "RBEmpty":c=b;break a;case "RBNode":c=t(a)(a(c[2])(c[3])(t(a)(b)(c[5])))(c[4]);break a}throw"Non-exhaustive pattern match in case";}return c}}}var p=Elm.Prelude.compare,s=Elm.Prelude.uncurry,v=Elm.Prelude.Nothing,
122+z=Elm.Prelude.Just,w=Elm.Prelude.not,C=Elm.Prelude.eq,E=Elm.Maybe.isJust,A=["Red"],D=["Black"],y=["RBEmpty"],B=y;return{$op:{},empty:B,lookup:a,findWithDefault:d,member:i,insert:g,singleton:function(a){return function(b){return g(a)(b)(y)}},remove:u,map:x,foldl:q,foldr:t,union:function(a){return function(b){return q(g)(b)(a)}},intersect:function(a){return function(b){return q(function(a){return function(c){return function(d){return i(a)(b)?g(a)(c)(d):d}}})(B)(a)}},diff:function(a){return function(b){return q(function(a){return function(){return function(b){return u(a)(b)}}})(a)(b)}},
123+keys:function(a){return t(function(a){return function(){return function(b){return["Cons",a,b]}}})(["Nil"])(a)},values:function(a){return t(function(){return function(a){return function(b){return["Cons",a,b]}}})(["Nil"])(a)},toList:function(a){return t(function(a){return function(b){return function(c){return["Cons",["Tuple2",a,b],c]}}})(["Nil"])(a)},fromList:function(a){return Elm.List.foldl(s(g))(B)(a)}}}();
124+Elm.Set=function(){var e=Elm.Dict.empty,j=Elm.Dict.remove,a=Elm.Dict.member,d=Elm.Dict.union,i=Elm.Dict.intersect,b=Elm.Dict.diff,l=Elm.Dict.keys,h=Elm.List.foldl(function(a){return function(b){return Elm.Dict.insert(a)(["Tuple0"])(b)}})(e);return{empty:e,singleton:function(a){return Elm.Dict.singleton(a)(["Tuple0"])},insert:function(a){return Elm.Dict.insert(a)(["Tuple0"])},remove:j,member:a,union:d,intersect:i,diff:b,toList:l,fromList:h,foldl:function(a){return Elm.Dict.foldl(function(b){return function(){return function(c){return a(b)(c)}}})},
125+foldr:function(a){return Elm.Dict.foldr(function(b){return function(){return function(c){return a(b)(c)}}})},map:function(a){return function(b){b=l(b);return h(Elm.List.map(a)(b))}}}}();
126+(function(){try{var e={};for(this.i in Elm)eval("var "+this.i+"=Elm[this.i];");if(Elm.Automaton)throw"Module name collision, 'Automaton' is already defined.";Elm.Automaton=function(){function a(a){return["Automaton",a]}function d(b){return a(function(a){var c=unzip(map(function(b){a:{switch(b[0]){case "Automaton":b=b[1](a);break a}throw"Non-exhaustive pattern match in case";}return b})(b)),e;a:{switch(c[0]){case "Tuple2":e=c[1];break a}throw"Non-exhaustive pattern match in case";}a:{switch(c[0]){case "Tuple2":c=
127+c[2];break a}throw"Non-exhaustive pattern match in case";}return["Tuple2",e,d(c)]})}function i(b){return a(function(a){return["Tuple2",b(a),i(b)]})}function b(c){return function(d){return a(function(a){a=d(a)(c);return["Tuple2",a,b(a)(d)]})}}function j(b){return function(c){return a(function(a){var d=c(a)(b);a:{switch(d[0]){case "Tuple2":a=d[1];break a}throw"Non-exhaustive pattern match in case";}a:{switch(d[0]){case "Tuple2":d=d[2];break a}throw"Non-exhaustive pattern match in case";}return["Tuple2",
128+a,j(d)(c)]})}}function h(a){return function(b){a:{switch(a[0]){case "Tuple2":b:{switch(b[0]){case "Tuple2":b=["Tuple2",a[1]-b[1],a[2]-b[2]];break b}break}break a}throw"Non-exhaustive pattern match in case";}return b}}function k(a){return function(b){var c;a:{switch(a[0]){case "Tuple2":b:{switch(b[0]){case "Tuple2":var d=function(a){return["Tuple2",b[2],["Tuple2",a,b[2]]]};c=function(){switch(b[1][0]){case "DragFrom":var c;a[1]?c=["Tuple2",uncurry(move)(h(a[2])(b[1][1]))(b[2]),["Tuple2",["DragFrom",
129+b[1][1]],b[2]]]:(c=uncurry(move)(h(a[2])(b[1][1]))(b[2]),c=["Tuple2",c,["Tuple2",g,c]]);return c;case "Ignore":return d(a[1]?r:g);case "Listen":return d(not(a[1])?g:isWithin(a[2])(b[2])?["DragFrom",a[2]]:r)}throw"Non-exhaustive pattern match in case";}();break b}break}break a}throw"Non-exhaustive pattern match in case";}return c}}try{if(!(Elm.Prelude instanceof Object))throw"module not found";}catch(f){throw"Module 'Prelude' is missing. Compile with --make flag or load missing module in a separate JavaScript file.";
130+}var c={};for(this.i in Elm.Prelude)c[this.i]||eval("var "+this.i+" = Elm.Prelude[this.i];");var g=["Listen"],r=["Ignore"];e[">>>"]=function(b){return function(c){var d;a:{switch(b[0]){case "Automaton":d=b[1];break a}throw"Non-exhaustive pattern match in case";}var f;a:{switch(c[0]){case "Automaton":f=c[1];break a}throw"Non-exhaustive pattern match in case";}return a(function(a){var a=d(a),b;a:{switch(a[0]){case "Tuple2":b=a[1];break a}throw"Non-exhaustive pattern match in case";}a:{switch(a[0]){case "Tuple2":a=
131+a[2];break a}throw"Non-exhaustive pattern match in case";}var c=f(b);a:{switch(c[0]){case "Tuple2":b=c[1];break a}throw"Non-exhaustive pattern match in case";}a:{switch(c[0]){case "Tuple2":c=c[2];break a}throw"Non-exhaustive pattern match in case";}return["Tuple2",b,e[">>>"](a)(c)]})}};e["<<<"]=function(a){return function(b){return e[">>>"](b)(a)}};e["^>>"]=function(a){return function(b){return e[">>>"](i(a))(b)}};e[">>^"]=function(a){return function(b){return e[">>>"](a)(i(b))}};e["^<<"]=function(a){return function(b){return e[">>>"](b)(i(a))}};
132+e["<<^"]=function(a){return function(b){return e[">>>"](i(b))(a)}};c=b(0)(function(){return function(a){return 1+a}});return{$op:{">>>":e[">>>"],"<<<":e["<<<"],"^>>":e["^>>"],">>^":e[">>^"],"^<<":e["^<<"],"<<^":e["<<^"]},run:function(a){return function(b){a:{switch(a[0]){case "Automaton":b=lift(fst)(foldp_(function(a){return function(b){a:{switch(b[0]){case "Tuple2":switch(b[2][0]){case "Automaton":b=b[2][1](a);break a}}throw"Non-exhaustive pattern match in case";}return b}})(a[1])(b));break a}throw"Non-exhaustive pattern match in case";
133+}return b}},step:function(a){return function(b){a:{switch(a[0]){case "Automaton":b=a[1](b);break a}throw"Non-exhaustive pattern match in case";}return b}},combine:d,pure:i,init:b,init_:j,count:c,draggable:function(a){return j(["Tuple2",g,a])(k)}}}();Elm.main=function(){return Elm.Automaton.main}}catch(j){Elm.main=function(){document.body.innerHTML=Elm.Text.monospace('<br/><h2>Your browser may not be supported. Are you using a modern browser?</h2><br/><span style="color:grey">Runtime Error in Automaton module:<br/>'+
134+j+"</span>");throw j;}}})();