public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Update stable to scriptaculous 1.5 final

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3300 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
madrobby (author)
Tue Dec 13 10:41:10 -0800 2005
commit  37e0d5de899cfbb3703067daefe2546215aaa4cc
tree    f2425a14496ed48ea933eed72eaec8d99952ea3f
parent  e8c7d7af4809d7179a4797d5f73512c0632a2586
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *1.1.2* (December 13th, 2005)
0
 
0
+* Update to script.aculo.us 1.5.0 final (equals 1.5.0_rc6) [Thomas Fuchs]
0
+
0
 * Update to Prototype 1.4.0 final [Sam Stephenson]
0
 
0
 * Become part of Rails 1.0
...
8
9
10
11
 
12
13
14
...
43
44
45
46
 
47
48
49
...
51
52
53
54
 
55
56
57
...
61
62
63
64
65
66
67
68
69
70
 
71
72
73
74
75
76
77
78
 
 
 
 
79
80
81
82
83
 
 
84
85
86
87
88
 
89
90
91
92
93
94
95
 
96
97
98
...
104
105
106
 
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
109
110
111
 
112
113
114
115
 
116
117
118
119
120
121
 
122
123
124
...
140
141
142
143
 
144
145
146
 
147
148
149
 
 
150
151
152
 
 
153
154
155
 
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
 
 
 
172
173
174
175
176
 
 
177
178
 
179
 
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
 
195
196
197
 
 
 
 
 
198
199
200
201
202
203
204
 
 
 
205
206
207
...
209
210
211
 
 
 
 
 
212
213
214
215
216
217
218
 
 
 
 
219
220
221
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
223
224
225
226
227
228
...
236
237
238
239
 
 
240
241
242
243
 
244
245
246
 
247
248
249
...
252
253
254
255
 
256
257
 
258
259
260
261
262
263
264
 
 
 
265
 
266
267
268
269
270
271
272
273
274
275
276
277
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
280
281
 
282
283
 
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
329
330
331
 
332
333
334
 
335
336
337
...
341
342
343
 
344
345
346
347
 
348
349
350
...
354
355
356
 
357
358
359
...
447
448
449
450
 
451
452
453
...
531
532
533
534
 
535
536
537
...
8
9
10
 
11
12
13
14
...
43
44
45
 
46
47
48
49
...
51
52
53
 
54
55
56
57
...
61
62
63
 
64
65
66
67
68
 
69
70
 
 
 
 
 
 
 
71
72
73
74
75
76
77
 
 
78
79
80
81
 
 
 
82
83
84
85
86
87
88
 
89
90
91
92
...
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
...
191
192
193
 
194
195
196
 
197
198
199
 
200
201
202
203
 
204
205
206
 
 
207
208
209
210
211
212
 
 
 
 
 
 
 
 
 
 
 
213
214
215
216
 
 
 
 
217
218
219
 
220
221
222
223
224
 
 
 
 
 
 
 
 
 
 
 
 
 
225
226
 
 
227
228
229
230
231
232
 
 
 
 
 
 
233
234
235
236
237
238
...
240
241
242
243
244
245
246
247
248
 
 
249
 
 
 
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
 
 
 
290
291
292
...
300
301
302
 
303
304
305
306
 
 
307
308
 
 
309
310
311
312
...
315
316
317
 
318
319
320
321
322
 
 
 
 
 
 
323
324
325
326
327
328
 
 
 
 
 
 
 
 
 
 
 
 
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
 
356
357
 
358
359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
361
362
...
369
370
371
372
373
374
375
376
377
378
379
...
383
384
385
386
387
388
389
390
391
392
393
394
...
398
399
400
401
402
403
404
...
492
493
494
 
495
496
497
498
...
576
577
578
 
579
580
581
582
0
@@ -8,7 +8,7 @@ var Droppables = {
0
   drops: [],
0
 
0
   remove: function(element) {
0
- this.drops = this.drops.reject(function(d) { return d.element==element });
0
+ this.drops = this.drops.reject(function(d) { return d.element==$(element) });
0
   },
0
 
0
   add: function(element) {
0
@@ -43,7 +43,7 @@ var Droppables = {
0
     return drop._containers.detect(function(c) { return parentNode == c });
0
   },
0
 
0
- isAffected: function(pX, pY, element, drop) {
0
+ isAffected: function(point, element, drop) {
0
     return (
0
       (drop.element!=element) &&
0
       ((!drop._containers) ||
0
@@ -51,7 +51,7 @@ var Droppables = {
0
       ((!drop.accept) ||
0
         (Element.classNames(element).detect(
0
           function(v) { return drop.accept.include(v) } ) )) &&
0
- Position.within(drop.element, pX, pY) );
0
+ Position.within(drop.element, point[0], point[1]) );
0
   },
0
 
0
   deactivate: function(drop) {
0
@@ -61,38 +61,32 @@ var Droppables = {
0
   },
0
 
0
   activate: function(drop) {
0
- if(this.last_active) this.deactivate(this.last_active);
0
     if(drop.hoverclass)
0
       Element.addClassName(drop.element, drop.hoverclass);
0
     this.last_active = drop;
0
   },
0
 
0
- show: function(event, element) {
0
+ show: function(point, element) {
0
     if(!this.drops.length) return;
0
- var pX = Event.pointerX(event);
0
- var pY = Event.pointerY(event);
0
- Position.prepare();
0
-
0
- var i = this.drops.length-1; do {
0
- var drop = this.drops[i];
0
- if(this.isAffected(pX, pY, element, drop)) {
0
+
0
+ if(this.last_active) this.deactivate(this.last_active);
0
+ this.drops.each( function(drop) {
0
+ if(Droppables.isAffected(point, element, drop)) {
0
         if(drop.onHover)
0
            drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
0
         if(drop.greedy) {
0
- this.activate(drop);
0
- return;
0
+ Droppables.activate(drop);
0
+ throw $break;
0
         }
0
       }
0
- } while (i--);
0
-
0
- if(this.last_active) this.deactivate(this.last_active);
0
+ });
0
   },
0
 
0
   fire: function(event, element) {
0
     if(!this.last_active) return;
0
     Position.prepare();
0
 
0
- if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active))
0
+ if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
0
       if (this.last_active.onDrop)
0
         this.last_active.onDrop(element, this.last_active.element, event);
0
   },
0
@@ -104,21 +98,78 @@ var Droppables = {
0
 }
0
 
0
 var Draggables = {
0
+ drags: [],
0
   observers: [],
0
+
0
+ register: function(draggable) {
0
+ if(this.drags.length == 0) {
0
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
0
+ this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
0
+ this.eventKeypress = this.keyPress.bindAsEventListener(this);
0
+
0
+ Event.observe(document, "mouseup", this.eventMouseUp);
0
+ Event.observe(document, "mousemove", this.eventMouseMove);
0
+ Event.observe(document, "keypress", this.eventKeypress);
0
+ }
0
+ this.drags.push(draggable);
0
+ },
0
+
0
+ unregister: function(draggable) {
0
+ this.drags = this.drags.reject(function(d) { return d==draggable });
0
+ if(this.drags.length == 0) {
0
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
0
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
0
+ Event.stopObserving(document, "keypress", this.eventKeypress);
0
+ }
0
+ },
0
+
0
+ activate: function(draggable) {
0
+ window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
0
+ this.activeDraggable = draggable;
0
+ },
0
+
0
+ deactivate: function(draggbale) {
0
+ this.activeDraggable = null;
0
+ },
0
+
0
+ updateDrag: function(event) {
0
+ if(!this.activeDraggable) return;
0
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
0
+ // Mozilla-based browsers fire successive mousemove events with
0
+ // the same coordinates, prevent needless redrawing (moz bug?)
0
+ if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
0
+ this._lastPointer = pointer;
0
+ this.activeDraggable.updateDrag(event, pointer);
0
+ },
0
+
0
+ endDrag: function(event) {
0
+ if(!this.activeDraggable) return;
0
+ this._lastPointer = null;
0
+ this.activeDraggable.endDrag(event);
0
+ },
0
+
0
+ keyPress: function(event) {
0
+ if(this.activeDraggable)
0
+ this.activeDraggable.keyPress(event);
0
+ },
0
+
0
   addObserver: function(observer) {
0
     this.observers.push(observer);
0
     this._cacheObserverCallbacks();
0
   },
0
+
0
   removeObserver: function(element) { // element instead of observer fixes mem leaks
0
     this.observers = this.observers.reject( function(o) { return o.element==element });
0
     this._cacheObserverCallbacks();
0
   },
0
+
0
   notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
0
     if(this[eventName+'Count'] > 0)
0
       this.observers.each( function(o) {
0
         if(o[eventName]) o[eventName](eventName, draggable, event);
0
       });
0
   },
0
+
0
   _cacheObserverCallbacks: function() {
0
     ['onStart','onEnd','onDrag'].each( function(eventName) {
0
       Draggables[eventName+'Count'] = Draggables.observers.select(
0
@@ -140,68 +191,48 @@ Draggable.prototype = {
0
       },
0
       reverteffect: function(element, top_offset, left_offset) {
0
         var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
0
- new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur});
0
+ element._revert = new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur});
0
       },
0
       endeffect: function(element) {
0
- new Effect.Opacity(element, {duration:0.2, from:0.7, to:1.0});
0
+ new Effect.Opacity(element, {duration:0.2, from:0.7, to:1.0});
0
       },
0
       zindex: 1000,
0
- revert: false
0
+ revert: false,
0
+ snap: false // false, or xy or [x,y] or function(x,y){ return [x,y] }
0
     }, arguments[1] || {});
0
 
0
- this.element = $(element);
0
+ this.element = $(element);
0
+
0
     if(options.handle && (typeof options.handle == 'string'))
0
- this.handle = Element.childrenWithClassName(this.element, options.handle)[0];
0
-
0
+ this.handle = Element.childrenWithClassName(this.element, options.handle)[0];
0
     if(!this.handle) this.handle = $(options.handle);
0
     if(!this.handle) this.handle = this.element;
0
 
0
     Element.makePositioned(this.element); // fix IE
0
 
0
- this.offsetX = 0;
0
- this.offsetY = 0;
0
- this.originalLeft = this.currentLeft();
0
- this.originalTop = this.currentTop();
0
- this.originalX = this.element.offsetLeft;
0
- this.originalY = this.element.offsetTop;
0
-
0
- this.options = options;
0
-
0
- this.active = false;
0
- this.dragging = false;
0
+ this.delta = this.currentDelta();
0
+ this.options = options;
0
+ this.dragging = false;
0
 
0
- this.eventMouseDown = this.startDrag.bindAsEventListener(this);
0
- this.eventMouseUp = this.endDrag.bindAsEventListener(this);
0
- this.eventMouseMove = this.update.bindAsEventListener(this);
0
- this.eventKeypress = this.keyPress.bindAsEventListener(this);
0
+ this.eventMouseDown = this.initDrag.bindAsEventListener(this);
0
+ Event.observe(this.handle, "mousedown", this.eventMouseDown);
0
     
0
- this.registerEvents();
0
+ Draggables.register(this);
0
   },
0
+
0
   destroy: function() {
0
     Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
0
- this.unregisterEvents();
0
- },
0
- registerEvents: function() {
0
- Event.observe(document, "mouseup", this.eventMouseUp);
0
- Event.observe(document, "mousemove", this.eventMouseMove);
0
- Event.observe(document, "keypress", this.eventKeypress);
0
- Event.observe(this.handle, "mousedown", this.eventMouseDown);
0
- },
0
- unregisterEvents: function() {
0
- //if(!this.active) return;
0
- //Event.stopObserving(document, "mouseup", this.eventMouseUp);
0
- //Event.stopObserving(document, "mousemove", this.eventMouseMove);
0
- //Event.stopObserving(document, "keypress", this.eventKeypress);
0
+ Draggables.unregister(this);
0
   },
0
- currentLeft: function() {
0
- return parseInt(this.element.style.left || '0');
0
+
0
+ currentDelta: function() {
0
+ return([
0
+ parseInt(this.element.style.left || '0'),
0
+ parseInt(this.element.style.top || '0')]);
0
   },
0
- currentTop: function() {
0
- return parseInt(this.element.style.top || '0')
0
- },
0
- startDrag: function(event) {
0
- if(Event.isLeftClick(event)) {
0
-
0
+
0
+ initDrag: function(event) {
0
+ if(Event.isLeftClick(event)) {
0
       // abort on form elements, fixes a Firefox issue
0
       var src = Event.element(event);
0
       if(src.tagName && (
0
@@ -209,20 +240,53 @@ Draggable.prototype = {
0
         src.tagName=='SELECT' ||
0
         src.tagName=='BUTTON' ||
0
         src.tagName=='TEXTAREA')) return;
0
+
0
+ if(this.element._revert) {
0
+ this.element._revert.cancel();
0
+ this.element._revert = null;
0
+ }
0
       
0
- // this.registerEvents();
0
- this.active = true;
0
       var pointer = [Event.pointerX(event), Event.pointerY(event)];
0
- var offsets = Position.cumulativeOffset(this.element);
0
- this.offsetX = (pointer[0] - offsets[0]);
0
- this.offsetY = (pointer[1] - offsets[1]);
0
+ var pos = Position.cumulativeOffset(this.element);
0
+ this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
0
+
0
+ Draggables.activate(this);
0
       Event.stop(event);
0
     }
0
   },
0
+
0
+ startDrag: function(event) {
0
+ this.dragging = true;
0
+
0
+ if(this.options.zindex) {
0
+ this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
0
+ this.element.style.zIndex = this.options.zindex;
0
+ }
0
+
0
+ if(this.options.ghosting) {
0
+ this._clone = this.element.cloneNode(true);
0
+ Position.absolutize(this.element);
0
+ this.element.parentNode.insertBefore(this._clone, this.element);
0
+ }
0
+
0
+ Draggables.notify('onStart', this, event);
0
+ if(this.options.starteffect) this.options.starteffect(this.element);
0
+ },
0
+
0
+ updateDrag: function(event, pointer) {
0
+ if(!this.dragging) this.startDrag(event);
0
+ Position.prepare();
0
+ Droppables.show(pointer, this.element);
0
+ Draggables.notify('onDrag', this, event);
0
+ this.draw(pointer);
0
+ if(this.options.change) this.options.change(this);
0
+
0
+ // fix AppleWebKit rendering
0
+ if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
0
+ Event.stop(event);
0
+ },
0
+
0
   finishDrag: function(event, success) {
0
- // this.unregisterEvents();
0
-
0
- this.active = false;
0
     this.dragging = false;
0
 
0
     if(this.options.ghosting) {
0
@@ -236,14 +300,13 @@ Draggable.prototype = {
0
 
0
     var revert = this.options.revert;
0
     if(revert && typeof revert == 'function') revert = revert(this.element);
0
-
0
+
0
+ var d = this.currentDelta();
0
     if(revert && this.options.reverteffect) {
0
       this.options.reverteffect(this.element,
0
- this.currentTop()-this.originalTop,
0
- this.currentLeft()-this.originalLeft);
0
+ d[1]-this.delta[1], d[0]-this.delta[0]);
0
     } else {
0
- this.originalLeft = this.currentLeft();
0
- this.originalTop = this.currentTop();
0
+ this.delta = d;
0
     }
0
 
0
     if(this.options.zindex)
0
@@ -252,71 +315,48 @@ Draggable.prototype = {
0
     if(this.options.endeffect)
0
       this.options.endeffect(this.element);
0
 
0
-
0
+ Draggables.deactivate(this);
0
     Droppables.reset();
0
   },
0
+
0
   keyPress: function(event) {
0
- if(this.active) {
0
- if(event.keyCode==Event.KEY_ESC) {
0
- this.finishDrag(event, false);
0
- Event.stop(event);
0
- }
0
- }
0
+ if(!event.keyCode==Event.KEY_ESC) return;
0
+ this.finishDrag(event, false);
0
+ Event.stop(event);
0
   },
0
+
0
   endDrag: function(event) {
0
- if(this.active && this.dragging) {
0
- this.finishDrag(event, true);
0
- Event.stop(event);
0
- }
0
- this.active = false;
0
- this.dragging = false;
0
- },
0
- draw: function(event) {
0
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
0
- var offsets = Position.cumulativeOffset(this.element);
0
- offsets[0] -= this.currentLeft();
0
- offsets[1] -= this.currentTop();
0
+ if(!this.dragging) return;
0
+ this.finishDrag(event, true);
0
+ Event.stop(event);
0
+ },
0
+
0
+ draw: function(point) {
0
+ var pos = Position.cumulativeOffset(this.element);
0
+ var d = this.currentDelta();
0
+ pos[0] -= d[0]; pos[1] -= d[1];
0
+
0
+ var p = [0,1].map(function(i){ return (point[i]-pos[i]-this.offset[i]) }.bind(this));
0
+
0
+ if(this.options.snap) {
0
+ if(typeof this.options.snap == 'function') {
0
+ p = this.options.snap(p[0],p[1]);
0
+ } else {
0
+ if(this.options.snap instanceof Array) {
0
+ p = p.map( function(v, i) {
0
+ return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
0
+ } else {
0
+ p = p.map( function(v) {
0
+ return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
0
+ }
0
+ }}
0
+
0
     var style = this.element.style;
0
     if((!this.options.constraint) || (this.options.constraint=='horizontal'))
0
- style.left = (pointer[0] - offsets[0] - this.offsetX) + "px";
0
+ style.left = p[0] + "px";
0
     if((!this.options.constraint) || (this.options.constraint=='vertical'))
0
- style.top = (pointer[1] - offsets[1] - this.offsetY) + "px";
0
+ style.top = p[1] + "px";
0
     if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
0
- },
0
- update: function(event) {
0
- if(this.active) {
0
- if(!this.dragging) {
0
- var style = this.element.style;
0
- this.dragging = true;
0
-
0
- if(Element.getStyle(this.element,'position')=='')
0
- style.position = "relative";
0
-
0
- if(this.options.zindex) {
0
- this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
0
- style.zIndex = this.options.zindex;
0
- }
0
-
0
- if(this.options.ghosting) {
0
- this._clone = this.element.cloneNode(true);
0
- Position.absolutize(this.element);
0
- this.element.parentNode.insertBefore(this._clone, this.element);
0
- }
0
-
0
- Draggables.notify('onStart', this, event);
0
- if(this.options.starteffect) this.options.starteffect(this.element);
0
- }
0
-
0
- Droppables.show(event, this.element);
0
- Draggables.notify('onDrag', this, event);
0
- this.draw(event);
0
- if(this.options.change) this.options.change(this);
0
-
0
- // fix AppleWebKit rendering
0
- if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0);
0
-
0
- Event.stop(event);
0
- }
0
   }
0
 }
0
 
0
@@ -329,9 +369,11 @@ SortableObserver.prototype = {
0
     this.observer = observer;
0
     this.lastValue = Sortable.serialize(this.element);
0
   },
0
+
0
   onStart: function() {
0
     this.lastValue = Sortable.serialize(this.element);
0
   },
0
+
0
   onEnd: function() {
0
     Sortable.unmark();
0
     if(this.lastValue != Sortable.serialize(this.element))
0
@@ -341,10 +383,12 @@ SortableObserver.prototype = {
0
 
0
 var Sortable = {
0
   sortables: new Array(),
0
+
0
   options: function(element){
0
     element = $(element);
0
     return this.sortables.detect(function(s) { return s.element == element });
0
   },
0
+
0
   destroy: function(element){
0
     element = $(element);
0
     this.sortables.findAll(function(s) { return s.element == element }).each(function(s){
0
@@ -354,6 +398,7 @@ var Sortable = {
0
     });
0
     this.sortables = this.sortables.reject(function(s) { return s.element == element });
0
   },
0
+
0
   create: function(element) {
0
     element = $(element);
0
     var options = Object.extend({
0
@@ -447,7 +492,7 @@ var Sortable = {
0
     if(!element.hasChildNodes()) return null;
0
     var elements = [];
0
     $A(element.childNodes).each( function(e) {
0
- if(e.tagName && e.tagName==options.tag.toUpperCase() &&
0
+ if(e.tagName && e.tagName.toUpperCase()==options.tag.toUpperCase() &&
0
         (!options.only || (Element.hasClassName(e, options.only))))
0
           elements.push(e);
0
       if(options.tree) {
0
@@ -531,7 +576,7 @@ var Sortable = {
0
       name: element.id,
0
       format: sortableOptions.format || /^[^_]*_(.*)$/
0
     }, arguments[1] || {});
0
- return $(this.findElements(element, options) || []).collect( function(item) {
0
+ return $(this.findElements(element, options) || []).map( function(item) {
0
       return (encodeURIComponent(options.name) + "[]=" +
0
               encodeURIComponent(item.id.match(options.format) ? item.id.match(options.format)[1] : ''));
0
     }).join("&");
...
11
12
13
14
15
 
 
16
17
18
...
26
27
28
29
30
 
 
31
32
33
...
41
42
43
 
 
 
 
 
44
45
46
 
47
48
49
50
51
52
 
 
53
54
 
55
56
57
58
59
60
61
62
63
 
 
 
 
64
65
 
66
67
68
 
69
70
71
 
 
 
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
87
88
 
89
90
91
92
93
 
 
 
 
 
 
 
94
95
96
97
98
99
 
 
100
101
102
103
104
105
106
 
107
108
109
...
123
124
125
126
127
 
128
129
130
 
131
132
133
...
258
259
260
261
262
263
264
265
266
267
 
 
 
 
 
 
 
 
 
268
269
270
...
273
274
275
 
 
 
276
277
278
...
302
303
304
305
 
306
307
308
...
326
327
328
329
330
 
331
332
333
334
335
336
337
338
339
340
341
342
 
 
 
 
343
344
345
...
359
360
361
362
363
364
365
366
367
 
368
369
370
 
 
371
372
373
374
375
 
376
377
378
379
 
 
380
381
 
382
383
384
385
386
387
388
 
 
389
390
391
...
394
395
396
397
 
398
399
400
401
402
403
404
405
406
 
407
408
409
410
411
 
 
 
412
413
414
415
416
417
 
 
418
419
420
 
 
421
422
 
423
424
425
...
427
428
429
430
431
432
 
433
434
435
436
437
 
438
439
440
 
 
 
441
442
443
444
 
 
445
446
447
448
449
450
451
452
453
 
 
454
455
456
457
458
459
460
 
 
461
462
463
464
 
 
 
465
466
467
...
474
475
476
 
477
478
479
...
496
497
498
499
500
501
502
503
504
 
 
 
 
505
506
507
508
509
510
511
 
512
513
514
515
 
 
 
516
517
518
519
520
521
522
523
 
524
525
526
527
528
529
530
531
532
533
534
 
 
 
 
 
535
536
537
...
543
544
545
546
547
548
549
550
 
 
551
552
553
554
555
556
557
 
558
559
560
...
562
563
564
565
566
567
568
569
570
571
572
573
 
 
 
 
 
 
 
 
 
574
575
576
...
586
587
588
589
590
591
592
593
594
595
596
597
598
 
 
 
 
 
 
 
599
600
601
...
603
604
605
606
607
608
 
 
 
 
609
610
611
612
613
614
615
616
617
618
619
620
621
 
 
 
 
 
622
623
624
625
626
627
628
 
 
 
629
630
631
...
637
638
639
640
641
642
643
644
 
 
 
 
645
646
647
648
649
650
651
 
652
653
654
 
 
655
656
657
 
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
673
674
675
...
677
678
679
680
 
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
702
703
704
 
705
706
707
708
709
710
711
712
713
 
 
 
 
 
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
736
737
738
 
739
740
741
742
743
 
744
745
 
746
747
748
749
750
 
 
751
752
753
754
755
756
 
 
 
 
757
758
759
760
761
762
 
 
 
 
763
764
765
766
767
768
769
770
771
772
 
 
 
 
 
773
774
775
776
 
 
777
778
779
 
 
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
 
 
 
 
 
 
796
797
798
...
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
820
821
 
822
823