From Squeak3.9 on 22 September 2007 at 2:32:29 pm <version>PlotKit-0.9.1-pmm.28.mcz 6 September 2007 10:16:33 pm</version> <class> <name>PKChart</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none id width height renderer layout <imports></imports> <category>PlotKit-Seaside</category> <attributes> <package>PlotKit-Seaside</package> </attributes> </class> <class> <name>PKColorScheme</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none function <imports></imports> <category>PlotKit-Color-Styles</category> <attributes> <package>PlotKit-Color-Styles</package> </attributes> </class> <comment> Seaside.PKColorScheme
These are base styles that were inspired by charts in Office 12. The color schemes are fairly similar to those found in screenshots of charts available online. http://media.liquidx.net/js/plotkit-doc/PlotKit.Base.html
</comment> <class> <name>PKCustomColorScheme</name> <environment>Seaside</environment> <super>Seaside.PKColorScheme</super> <private>false</private> none colors <imports></imports> <category>PlotKit-Color-Styles</category> <attributes> <package>PlotKit-Color-Styles</package> </attributes> </class> <comment> Seaside.PKCustomColorScheme
Allows you to manually specify the colors. Color class >> #wheel: is a good starting point
</comment> <class> <name>PKDataset</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none name data <imports></imports> <category>PlotKit-Model</category> <attributes> <package>PlotKit-Model</package> </attributes> </class> <comment> Seaside.PKDataset
Note that you can only use one dataset for pie charts. Only the y value of the dataset will be used, but the x value must be unique and set as it will correspond to the xTicks that are given. Labels for pie charts will only use xTicks. Instance Variables: name <String> name or label of the data data <SequenceableCollection of: <SequenceableCollection of: Number>> collection of x and y values (a collection with two elements)
</comment> <class> <name>PKDemo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none barChart pieChart <imports></imports> <category>PlotKit-Demo</category> <attributes> <package>PlotKit-Demo</package> </attributes> </class> <class> <name>PKDemoLibrary</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>PlotKit-Demo</category> <attributes> <package>PlotKit-Demo</package> </attributes> </class> <class> <name>PKLabelDemo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none chart <imports></imports> <category>PlotKit-Demo</category> <attributes> <package>PlotKit-Demo</package> </attributes> </class> <class> <name>PKLabelImage</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none properties <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <class> <name>PKLayout</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none options datasets <imports></imports> <category>PlotKit-Layout</category> <attributes> <package>PlotKit-Layout</package> </attributes> </class> <class> <name>PKBarLayout</name> <environment>Seaside</environment> <super>Seaside.PKLayout</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout</category> <attributes> <package>PlotKit-Layout</package> </attributes> </class> <class> <name>PKLineLayout</name> <environment>Seaside</environment> <super>Seaside.PKLayout</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout</category> <attributes> <package>PlotKit-Layout</package> </attributes> </class> <class> <name>PKMochikitColor</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none squeakColor <imports></imports> <category>PlotKit-Model</category> <attributes> <package>PlotKit-Model</package> </attributes> </class> <comment> Seaside.PKMochikitColor
A color that wraps a squeak color. Uses for javascript generation.
</comment> <class> <name>PKNegativeBarDemo</name> <environment>Seaside</environment> <super>Seaside.WAComponent</super> <private>false</private> none chart <imports></imports> <category>PlotKit-Demo</category> <attributes> <package>PlotKit-Demo</package> </attributes> </class> <comment> Seaside.PKNegativeBarDemo
A PKNegativeBarDemo is demonstrating the bugged behavior of negative bar charts.
</comment> <class> <name>PKOfficeColors</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none function <imports></imports> <category>PlotKit-Color-Styles</category> <attributes> <package>PlotKit-Color-Styles</package> </attributes> </class> <comment> Seaside.PKOfficeColors
These are base styles that were inspired by charts in Office 12. The color schemes are fairly similar to those found in screenshots of charts available online. http://media.liquidx.net/js/plotkit-doc/PlotKit.Base.html
</comment> <class> <name>PKOptions</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none properties <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <class> <name>PKLayoutOptions</name> <environment>Seaside</environment> <super>Seaside.PKOptions</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <comment> Seaside.PKLayoutOptions
PlotKit Layout is the core of the plotting engine. It deals exclusively with laying objects out on a virtual canvas that has the dimension of 1.0 x 1.0. http://media.liquidx.net/js/plotkit-doc/PlotKit.Layout.html
</comment> <class> <name>PKBarAndLineOptions</name> <environment>Seaside</environment> <super>Seaside.PKLayoutOptions</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <class> <name>PKBarOptions</name> <environment>Seaside</environment> <super>Seaside.PKBarAndLineOptions</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <class> <name>PKPieLayout</name> <environment>Seaside</environment> <super>Seaside.PKLayout</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout</category> <attributes> <package>PlotKit-Layout</package> </attributes> </class> <class> <name>PKPieOptions</name> <environment>Seaside</environment> <super>Seaside.PKLayoutOptions</super> <private>false</private> none <imports></imports> <category>PlotKit-Layout-Options</category> <attributes> <package>PlotKit-Layout-Options</package> </attributes> </class> <class> <name>PKPredefinedColorScheme</name> <environment>Seaside</environment> <super>Seaside.PKColorScheme</super> <private>false</private> none <imports></imports> <category>PlotKit-Color-Styles</category> <attributes> <package>PlotKit-Color-Styles</package> </attributes> </class> <comment> Seaside.PKPredefinedColorScheme
There are some colour schemes, which are an array of MochiKit.Color.Colors.
</comment> <class> <name>PKPredefinedSingleHueColorScheme</name> <environment>Seaside</environment> <super>Seaside.PKPredefinedColorScheme</super> <private>false</private> none index <imports></imports> <category>PlotKit-Color-Styles</category> <attributes> <package>PlotKit-Color-Styles</package> </attributes> </class> <comment> Seaside.PKPredefinedSingleHueColorScheme
There are some colour schemes, which are an array of MochiKit.Color.Colors. They all have the same hue.
</comment> <class> <name>PKRenderer</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none options <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <class> <name>PKCanvasRenderer</name> <environment>Seaside</environment> <super>Seaside.PKRenderer</super> <private>false</private> none <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <comment> Seaside.PKCanvasRenderer
Basic renderer using an HTML Canvas.
</comment> <class> <name>PKRendererOptions</name> <environment>Seaside</environment> <super>Seaside.PKOptions</super> <private>false</private> none officeColors <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <class> <name>PKSVGRenderer</name> <environment>Seaside</environment> <super>Seaside.PKRenderer</super> <private>false</private> none <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <comment> Seaside.PKSVGRenderer
This renderer is an extension of the basic SVG Renderer to show off what you can do to make graphs pretty without learning any graph layout code. There are no extra methods or options to use. The interface is exactly the same as PlotKit.SVG's SVGRenderer. SweetSVGRenderer adds a fake shadow around bars, lines and circles along with a 2.0 width white outline and a etched light coloured background.
</comment> <class> <name>PKScriptLibrary</name> <environment>Seaside</environment> <super>Seaside.WAFileLibrary</super> <private>false</private> none <imports></imports> <category>PlotKit-Seaside</category> <attributes> <package>PlotKit-Seaside</package> </attributes> </class> <comment> Seaside.PKScriptLibrary
http://www.mochikit.com/ 1.3.1 http://www.liquidx.net/plotkit/ 0.9
</comment> <class> <name>PKSweetCanvasRenderer</name> <environment>Seaside</environment> <super>Seaside.PKRenderer</super> <private>false</private> none <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <comment> Seaside.PKSweetCanvasRenderer
This contains the CanvasRenderer, the default renderer and most well supported one used in PlotKit. It supports Safari 2, Firefox 1.5, Opera 9 and IE 6. Note that for IE6 support, you will need excanvas.js which is included with PlotKit.
</comment> <class> <name>PKSweetSVGRenderer</name> <environment>Seaside</environment> <super>Seaside.PKRenderer</super> <private>false</private> none <imports></imports> <category>PlotKit-Renderer</category> <attributes> <package>PlotKit-Renderer</package> </attributes> </class> <comment> Seaside.PKSweetSVGRenderer
Customised renderer that builds on PTSVGRenderer to provide nicer looking charts.
</comment> <class> <name>PKTableDataset</name> <environment>Seaside</environment> <super>Core.Object</super> <private>false</private> none name tableElement xColumn yColumn <imports></imports> <category>PlotKit-Model</category> <attributes> <package>PlotKit-Model</package> </attributes> </class> <comment> Seaside.PKTableDataset
Handy function to read values off a table. name is the name to give to the dataset just like in addDataset(), tableElement is the table which contains the values. Optionally, the user may specify to extract alternative columns using xcol and ycol.
</comment> <methods> Squeak.Color <category>*PlotKit</category>
asMochikitColor ^Seaside.PKMochikitColor new squeakColor: self; yourself
</methods> <methods> Squeak.Color <category>*PlotKit</category>
mochikitOn: aStream aStream nextPutAll: 'Color.fromRGB('; nextPutAll: self red displayString; nextPutAll: ', '; nextPutAll: self green displayString; nextPutAll: ', '; nextPutAll: self blue displayString; nextPutAll: ', '; nextPutAll: self alpha displayString; nextPutAll: ')'
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
xAxisMin: aMinimumFloat max: aMaximumFloat "Minimum and Maximum values on the X axis. default: nil" self propertyAt: 'xAxis' put: (Array with: aMinimumFloat with: aMaximumFloat)
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
xNumberOfTicks: anInteger "Used when automatically calculating axis ticks. This denotes the number of ticks there should be in the graph. default: 10" self propertyAt: 'xNumberOfTicks' put: anInteger
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
yTickPrecision: anInteger "The number of decimal places we should round to for tick values. default: 3" self propertyAt: 'yTickPrecision' put: anInteger
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
xTickPrecision: anInteger "The number of decimal places we should round to for tick values. default: 1" self propertyAt: 'xTickPrecision' put: anInteger
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
yAxisMin: aMinimumFloat max: aMaximumFloat "Minimum and Maximum values on the Y axis. default: nil" self propertyAt: 'yAxis' put: (Array with: aMinimumFloat with: aMaximumFloat)
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
yOriginIsZero: aBoolean "Should graph have Y axis origin at 0 default: true" self propertyAt: 'yOriginIsZero' put: aBoolean
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
yNumberOfTicks: anInteger "Used when automatically calculating axis ticks. This denotes the number of ticks there should be in the graph. default: 5" self propertyAt: 'yNumberOfTicks' put: anInteger
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
xOriginIsZero: aBoolean "Should graph have X axis origin at 0 default: true" self propertyAt: 'xOriginIsZero' put: aBoolean
</methods> <methods> Seaside.PKBarAndLineOptions <category>accessing-properties</category>
yTicks: aDictionary "Y values at which ticks should be drawn. Automatically calculated if not defined using the parameters `yNumberOfTicks` and `yTickPrecision` the dictionary mapps values (numbers) to labels (strings) default: nil labels don't necessarily need to be strings, any object that has a meaningful JavaScript representation will do, if you want to have an image you can use PKLabelImage but you can use you own class that creates some other html elements" self propertyAt: 'yTicks' put: (self asTicks: aDictionary)
</methods> <methods> Seaside.PKBarLayout <category>initialize-release</category>
initialize super initialize. self options: PKBarOptions new
</methods> <methods> Seaside.PKBarLayout <category>accessing</category>
style ^'bar'
</methods> <methods> Seaside.PKBarOptions <category>accessing-properties</category>
barOrientation: aString "The orientation of the bar chart 'vertical' or 'horizontal'. default: 'vertical'" self propertyAt: 'barOrientation' put: aString
</methods> <methods> Seaside.PKBarOptions <category>accessing-properties</category>
barWidthFillFraction: aFloat "Amount of space the total amount of bars should consume per X value. default: 0.75" self propertyAt: 'barWidthFillFraction' put: aFloat
</methods> <methods> Seaside.PKBarOptions <category>accessing-properties</category>
beHorizontal self barOrientation: 'horizontal'
</methods> <methods> Seaside.PKBarOptions <category>accessing-properties</category>
beVertical self barOrientation: 'vertical'
</methods> <methods> Seaside.PKChart <category>accessing</category>
layout: aLayout layout := aLayout
</methods> <methods> Seaside.PKChart <category>initialize-release</category>
initialize super initialize. self renderer: PKCanvasRenderer new.
</methods> <methods> Seaside.PKChart <category>private</category>
drawFunctionName ^'drawGraph' , self id
</methods> <methods> Seaside.PKChart <category>printing-javascript</category>
printCloseFunctionOn: aStream "}" aStream nextPutAll: '}'
</methods> <methods> Seaside.PKChart <category>accessing</category>
layoutOptions ^self layout options
</methods> <methods> Seaside.PKChart <category>accessing</category>
height ^height
</methods> <methods> Seaside.PKChart <category>accessing</category>
renderer: anObject renderer := anObject
</methods> <methods> Seaside.PKChart <category>private</category>
registerDrawFunction self session addLoadScript: self drawFunctionName , '()'.
</methods> <methods> Seaside.PKChart <category>printing-javascript</category>
printPlotterOn: aStream "var {self canvasName} = MochiKit.DOM.getElement(self id asJavascript); var {self plotterName} = {self renderer asJavacript}({self canvasName}, {self layoutName}, {self rendererOptions asJavascript}); {self plotterName}.render(); " aStream nextPutAll: ' var '; nextPutAll: self canvasName; nextPutAll: ' = MochiKit.DOM.getElement('. self id javascriptOn: aStream . aStream nextPutAll: '); var '; nextPutAll: self plotterName; nextPutAll: ' = ' . self renderer javascriptOn: aStream . aStream nextPut: $(; nextPutAll: self canvasName; nextPutAll: ', '; nextPutAll: self layoutName; nextPutAll: ', '. self rendererOptions javascriptOn: aStream. aStream nextPutAll: '); '; nextPutAll: self plotterName; nextPutAll: '.render(); '
</methods> <methods> Seaside.PKChart <category>printing-javascript</category>
printLayoutOn: aStream "var {self layoutName} = new PlotKit.Layout({self layout style asJavascript}, {self layoutOptions}); {add all datasets} {self layoutName}.evaluate(); " aStream nextPutAll: ' var '; nextPutAll: self layoutName; nextPutAll: ' = new PlotKit.Layout('. self layout style javascriptOn: aStream . aStream nextPutAll: ', '. self layoutOptions javascriptOn: aStream. aStream nextPutAll: '); '. self layout datasets do: [ :each | self printDataset: each on: aStream ]. aStream nextPutAll: ' '; nextPutAll: self layoutName; nextPutAll: '.evaluate(); '
</methods> <methods> Seaside.PKChart <category>printing-javascript</category>
printDataset: aDataset on: aStream " {self layoutName}.{aDataset asJavascript);" aStream nextPutAll: ' '; nextPutAll: self layoutName; nextPut: $.. aDataset javascriptOn: aStream . aStream nextPutAll: '; '
</methods> <methods> Seaside.PKChart <category>private</category>
layoutName ^'layout' , self id
</methods> <methods> Seaside.PKChart <category>accessing</category>
id id isNil ifTrue: [ id := self class name, self hash asString ]. ^id
</methods> <methods> Seaside.PKChart <category>accessing</category>
rendererOptions ^self renderer options
</methods> <methods> Seaside.PKChart <category>rendering</category>
renderContentOn: html self registerDrawFunction. html div: [ html canvas id: self id; width: self width; height: self height ]. html script: self drawFunction
</methods> <methods> Seaside.PKChart <category>accessing</category>
width ^width
</methods> <methods> Seaside.PKChart <category>private</category>
canvasName ^'canvas' , self id
</methods> <methods> Seaside.PKChart <category>accessing</category>
id: aString id := aString
</methods> <methods> Seaside.PKChart <category>private</category>
plotterName ^'plotter' , self id
</methods> <methods> Seaside.PKChart <category>printing-javascript</category>
printDrawFunctionHeadOn: aStream "function {drawFunctionName}() {" aStream nextPutAll: 'function '; nextPutAll: self drawFunctionName; nextPutAll: '() { '
</methods> <methods> Seaside.PKChart <category>accessing</category>
width: anInteger width := anInteger
</methods> <methods> Seaside.PKChart <category>accessing</category>
renderer ^renderer
</methods> <methods> Seaside.PKChart <category>accessing</category>
layout ^layout
</methods> <methods> Seaside.PKChart <category>accessing</category>
height: anInteger height := anInteger
</methods> <methods> Seaside.PKChart <category>private</category>
drawFunction ^String streamContents: [ :stream | self printDrawFunctionHeadOn: stream. self printLayoutOn: stream. self printPlotterOn: stream. self printCloseFunctionOn: stream ]
</methods> <methods> Seaside.PKColorScheme <category>accessing</category>
function: aString function := aString
</methods> <methods> Seaside.PKColorScheme <category>initialize-release</category>
initialize
</methods> <methods> Seaside.PKColorScheme <category>accessing</category>
function ^function
</methods> <methods> Seaside.PKCustomColorScheme <category>adding</category>
addColor: aColor ^self colors add: aColor
</methods> <methods> Seaside.PKCustomColorScheme <category>initialize-release</category>
initialize super initialize. self colors: OrderedCollection new
</methods> <methods> Seaside.PKCustomColorScheme <category>converting</category>
javascriptOn: aStream aStream nextPut: $[. self colors do: [ :each | each mochikitOn: aStream ] separatedBy: [ aStream nextPutAll: ', ' ]. aStream nextPut: $].
</methods> <methods> Seaside.PKCustomColorScheme <category>accessing</category>
colors: aCollectionOfColors colors := aCollectionOfColors
</methods> <methods> Seaside.PKCustomColorScheme <category>accessing</category>
colors ^colors
</methods> <methods> Seaside.PKDataset <category>initialize-release</category>
initialize self data: OrderedCollection new
</methods> <methods> Seaside.PKDataset <category>converting</category>
javascriptOn: aStream aStream nextPutAll: self addMethod. aStream nextPut: $(. self name javascriptOn: aStream. aStream nextPutAll: ', ['. self data do: [ :each | each javascriptOn: aStream ] separatedBy: [ aStream nextPutAll: ', ' ]. aStream nextPutAll: ']'. aStream nextPut: $)
</methods> <methods> Seaside.PKDataset <category>accessing</category>
anyOne ^self data anyOne
</methods> <methods> Seaside.PKDataset <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.PKDataset <category>accessing</category>
data ^data
</methods> <methods> Seaside.PKDataset <category>enumerating</category>
dataDo: aBlock self data do: aBlock
</methods> <methods> Seaside.PKDataset <category>adding</category>
addX: anXNumber y: aYNumber self data add: (Array with: anXNumber with: aYNumber)
</methods> <methods> Seaside.PKDataset <category>adding</category>
addPoint: aPoint self addX: aPoint x y: aPoint y
</methods> <methods> Seaside.PKDataset <category>adding</category>
addAll: aCollection aCollection do: [ :each | self add: each ]
</methods> <methods> Seaside.PKDataset <category>adding</category>
addCollection: aSequencableCollection self addX: aSequencableCollection first y: aSequencableCollection second
</methods> <methods> Seaside.PKDataset <category>accessing</category>
data: aCollection data := aCollection
</methods> <methods> Seaside.PKDataset <category>adding</category>
add: aNumber self addX: self data size y: aNumber
</methods> <methods> Seaside.PKDataset <category>accessing</category>
addMethod ^'addDataset'
</methods> <methods> Seaside.PKDataset <category>accessing</category>
name ^name
</methods> <methods> Seaside.PKDemo <category>updating</category>
updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: 'PlotKit Demo'.
</methods> <methods> Seaside.PKDemo <category>accessing</category>
barChart barChart isNil ifTrue: [ barChart := PKChart newBarChart. self initChart: barChart. barChart rendererOptions drawYAxis: false ]. ^barChart
</methods> <methods> Seaside.PKDemo <category>rendering</category>
renderContentOn: html html render: self barChart. html render: self pieChart
</methods> <methods> Seaside.PKDemo <category>accessing</category>
children ^Array with: self barChart with: self pieChart
</methods> <methods> Seaside.PKDemo <category>private</category>
initChart: aChart aChart width: 300; height: 300. aChart layout addDataset: (PKDataset new name: 'sqrt'; addAll: #(0 1 1.414 1.73 2); yourself). aChart renderer: PKSweetCanvasRenderer new. aChart rendererOptions paddingLeft: 0 right: 0 top: 10 bottom: 30. aChart layoutOptions xTicks: (Dictionary new at: 0 put: 'zero'; at: 1 put: 'one'; at: 2 put: 'two'; at: 3 put: 'three'; at: 4 put: 'four'; yourself)
</methods> <methods> Seaside.PKDemo <category>accessing</category>
pieChart pieChart isNil ifTrue: [ pieChart := PKChart newPieChart. self initChart: pieChart ]. ^pieChart
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
mozillaIco | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(0 0 1 0 1 0 16 16 0 0 0 0 0 0 104 5 0 0 22 0 0 0 40 0 0 0 16 0 0 0 32 0 0 0 1 0 8 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 128 0 0 128 0 0 0 128 128 0 128 0 0 0 128 0 128 0 128 128 0 0 192 192 192 0 192 220 192 0 240 202 166 0 4 4 4 0 8 8 8 0 12 12 12 0 17 17 17 0 22 22 22 0 28 28 28 0 34 34 34 0 41 41 41 0 85 85 85 0 77 77 77 0 66 66 66 0 57 57 57 0 128 124 255 0 80 80 255 0 147 0 214 0 255 236 204 0 198 214 239 0 214 231 231 0 144 169 173 0 0 0 51 0 0 0 102 0 0 0 153 0 0 0 204 0 0 51 0 0 0 51 51 0 0 51 102 0 0 51 153 0 0 51 204 0 0 51 255 0 0 102 0 0 0 102 51 0 0 102 102 0 0 102 153 0 0 102 204 0 0 102 255 0 0 153 0 0 0 153 51 0 0 153 102 0 0 153 153 0 0 153 204 0 0 153 255 0 0 204 0 0 0 204 51 0 0 204 102 0 0 204 153 0 0 204 204 0 0 204 255 0 0 255 102 0 0 255 153 0 0 255 204 0 51 0 0 0 51 0 51 0 51 0 102 0 51 0 153 0 51 0 204 0 51 0 255 0 51 51 0 0 51 51 51 0 51 51 102 0 51 51 153 0 51 51 204 0 51 51 255 0 51 102 0 0 51 102 51 0 51 102 102 0 51 102 153 0 51 102 204 0 51 102 255 0 51 153 0 0 51 153 51 0 51 153 102 0 51 153 153 0 51 153 204 0 51 153 255 0 51 204 0 0 51 204 51 0 51 204 102 0 51 204 153 0 51 204 204 0 51 204 255 0 51 255 51 0 51 255 102 0 51 255 153 0 51 255 204 0 51 255 255 0 102 0 0 0 102 0 51 0 102 0 102 0 102 0 153 0 102 0 204 0 102 0 255 0 102 51 0 0 102 51 51 0 102 51 102 0 102 51 153 0 102 51 204 0 102 51 255 0 102 102 0 0 102 102 51 0 102 102 102 0 102 102 153 0 102 102 204 0 102 153 0 0 102 153 51 0 102 153 102 0 102 153 153 0 102 153 204 0 102 153 255 0 102 204 0 0 102 204 51 0 102 204 153 0 102 204 204 0 102 204 255 0 102 255 0 0 102 255 51 0 102 255 153 0 102 255 204 0 204 0 255 0 255 0 204 0 153 153 0 0 153 51 153 0 153 0 153 0 153 0 204 0 153 0 0 0 153 51 51 0 153 0 102 0 153 51 204 0 153 0 255 0 153 102 0 0 153 102 51 0 153 51 102 0 153 102 153 0 153 102 204 0 153 51 255 0 153 153 51 0 153 153 102 0 153 153 153 0 153 153 204 0 153 153 255 0 153 204 0 0 153 204 51 0 102 204 102 0 153 204 153 0 153 204 204 0 153 204 255 0 153 255 0 0 153 255 51 0 153 204 102 0 153 255 153 0 153 255 204 0 153 255 255 0 204 0 0 0 153 0 51 0 204 0 102 0 204 0 153 0 204 0 204 0 153 51 0 0 204 51 51 0 204 51 102 0 204 51 153 0 204 51 204 0 204 51 255 0 204 102 0 0 204 102 51 0 153 102 102 0 204 102 153 0 204 102 204 0 153 102 255 0 204 153 0 0 204 153 51 0 204 153 102 0 204 153 153 0 204 153 204 0 204 153 255 0 204 204 0 0 204 204 51 0 204 204 102 0 204 204 153 0 204 204 204 0 204 204 255 0 204 255 0 0 204 255 51 0 153 255 102 0 204 255 153 0 204 255 204 0 204 255 255 0 204 0 51 0 255 0 102 0 255 0 153 0 204 51 0 0 255 51 51 0 255 51 102 0 255 51 153 0 255 51 204 0 255 51 255 0 255 102 0 0 255 102 51 0 204 102 102 0 255 102 153 0 255 102 204 0 204 102 255 0 255 153 0 0 255 153 51 0 255 153 102 0 255 153 153 0 255 153 204 0 255 153 255 0 255 204 0 0 255 204 51 0 255 204 102 0 255 204 153 0 255 204 204 0 255 204 255 0 255 255 51 0 204 255 102 0 255 255 153 0 255 255 204 0 102 102 255 0 102 255 102 0 102 255 255 0 255 102 102 0 255 102 255 0 255 255 102 0 33 0 165 0 95 95 95 0 119 119 119 0 134 134 134 0 150 150 150 0 203 203 203 0 178 178 178 0 215 215 215 0 221 221 221 0 227 227 227 0 234 234 234 0 241 241 241 0 248 248 248 0 240 251 255 0 164 160 160 0 128 128 128 0 0 0 255 0 0 255 0 0 0 255 255 0 255 0 0 0 255 0 255 0 255 255 0 0 255 255 255 0 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 7 1 1 12 109 10 10 10 10 10 10 10 0 0 7 67 31 249 32 29 18 0 0 0 0 0 0 0 0 0 235 29 249 249 1 36 16 0 0 0 0 0 0 0 10 236 7 29 1 249 249 32 29 235 0 0 0 0 0 0 255 10 12 31 249 249 249 32 14 29 18 235 63 34 247 0 10 7 12 1 249 32 249 1 1 249 32 1 30 235 33 109 255 16 29 31 249 29 1 249 249 1 29 29 235 68 31 30 10 236 31 249 249 1 249 249 249 29 12 18 249 249 32 68 255 12 29 37 249 31 249 249 249 1 31 32 249 249 31 16 10 236 10 31 249 249 1 30 37 31 249 249 32 30 7 0 0 10 10 30 249 32 37 31 1 64 18 16 31 0 0 0 0 247 10 30 31 30 1 38 1 30 16 12 0 0 0 0 0 0 244 67 29 32 31 32 30 29 29 7 0 0 0 0 0 0 0 0 236 16 29 67 236 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 0 0 240 127 0 0 192 127 0 0 192 127 0 0 0 63 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 128 7 0 0 128 15 0 0 192 15 0 0 240 63 0 0 255 255 0 0) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
konquerorPng | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 0 64 0 0 0 64 8 6 0 0 0 170 105 113 222 0 0 0 4 103 65 77 65 0 0 175 200 55 5 138 233 0 0 0 25 116 69 88 116 83 111 102 116 119 97 114 101 0 65 100 111 98 101 32 73 109 97 103 101 82 101 97 100 121 113 201 101 60 0 0 29 242 73 68 65 84 120 218 98 248 255 255 63 3 46 236 239 31 17 47 39 167 108 139 79 205 80 199 0 1 132 83 162 172 172 177 236 249 243 175 255 183 111 63 241 74 82 82 206 101 184 6 0 64 0 97 21 172 170 106 43 189 126 253 233 255 63 127 254 253 255 251 247 255 255 101 203 118 188 16 20 148 112 2 201 149 148 52 148 250 248 132 69 51 48 48 48 14 135 0 0 8 32 22 6 44 64 86 86 94 235 231 207 223 12 175 94 125 96 144 148 20 100 8 14 118 23 127 251 182 127 126 89 89 243 105 79 207 128 96 7 7 79 6 3 3 51 95 97 97 241 154 183 111 95 222 97 24 194 0 32 128 176 135 10 11 187 80 67 67 255 150 19 39 110 254 127 246 236 237 255 127 255 254 255 191 120 241 222 255 3 7 46 253 127 255 254 235 255 27 55 30 253 95 187 246 240 255 9 19 150 63 116 112 240 75 28 202 169 1 32 128 176 166 128 223 191 127 188 99 100 100 76 248 240 225 243 60 95 95 95 159 199 143 95 49 126 253 250 149 193 218 218 144 129 141 141 137 65 64 128 139 65 84 84 144 225 248 113 102 185 224 224 132 121 170 170 58 222 124 124 162 117 159 62 189 190 54 212 18 0 64 0 225 47 32 24 152 100 231 205 219 120 239 208 161 139 255 127 254 4 22 6 104 0 148 50 78 156 184 250 127 242 228 245 255 75 75 39 63 55 49 113 205 2 106 98 70 55 199 209 209 67 10 152 170 216 6 99 10 0 8 32 22 124 129 83 81 209 16 173 160 32 47 107 96 160 6 142 121 116 192 200 200 192 96 110 174 197 32 37 37 198 112 224 192 89 9 38 166 144 169 50 50 170 158 172 172 188 85 127 254 124 185 234 225 17 224 26 22 22 147 90 94 222 232 4 76 65 81 64 45 59 6 91 2 0 8 32 188 1 240 13 8 128 177 204 2 204 10 12 188 188 28 56 213 201 202 138 0 11 74 71 32 125 141 129 153 153 209 71 70 70 209 84 79 79 254 142 133 133 185 181 168 40 63 48 164 153 25 4 5 248 109 144 3 0 152 197 120 25 88 180 68 25 196 140 132 128 60 49 6 134 127 255 24 254 255 125 195 240 242 204 91 134 127 119 222 2 99 231 19 61 2 0 32 128 240 6 192 164 73 29 179 21 21 53 130 255 252 249 99 39 44 44 192 192 197 197 138 83 45 23 23 27 131 149 149 30 195 143 31 191 24 216 217 89 197 213 212 228 197 69 69 5 224 41 71 207 192 92 159 81 216 221 133 65 214 203 156 65 210 218 130 33 240 188 62 7 159 144 48 59 15 63 43 43 43 3 43 19 48 53 253 252 245 255 247 239 111 239 127 125 251 248 233 13 163 211 238 11 12 183 55 156 98 248 118 111 31 195 187 29 103 129 1 242 155 22 1 0 16 64 140 144 188 142 27 232 234 154 216 87 86 118 237 82 82 146 96 179 176 208 194 169 14 24 127 12 231 207 223 98 96 101 101 102 80 86 150 97 224 230 102 7 139 63 123 241 153 97 250 206 87 12 75 79 252 249 253 153 85 152 217 76 141 135 201 92 137 145 65 79 142 157 65 81 132 129 65 128 147 129 65 136 7 24 128 204 12 12 207 191 0 83 221 47 6 134 7 111 25 24 238 188 248 207 112 230 1 35 195 193 203 239 255 220 187 118 229 56 195 133 5 139 25 158 174 93 253 255 255 135 15 212 12 0 128 0 34 170 160 72 78 46 158 182 100 201 222 255 247 238 61 255 143 13 124 249 242 243 255 177 99 87 254 223 186 245 24 46 246 227 219 143 255 173 75 238 254 151 78 187 249 95 167 242 217 255 190 189 63 254 63 253 242 159 100 240 233 207 255 255 27 175 252 255 31 57 231 255 127 174 136 115 23 24 36 66 169 218 8 3 8 32 162 20 113 113 241 202 117 116 44 124 176 102 205 1 160 103 127 160 56 240 243 231 31 255 143 30 189 252 255 209 163 87 112 177 51 87 94 254 183 42 191 241 95 190 240 233 255 41 7 127 254 255 0 173 64 254 129 2 6 136 191 3 241 55 24 254 135 198 71 194 32 181 127 144 236 58 252 224 255 127 159 201 127 254 51 184 174 89 206 192 32 41 79 141 0 0 8 32 162 21 218 217 121 167 244 244 172 250 127 252 248 85 112 245 7 2 223 191 255 1 123 254 241 227 215 112 71 174 216 245 240 191 84 250 237 255 94 147 222 253 191 241 238 255 255 159 64 177 119 64 95 188 250 9 193 175 127 160 225 239 16 250 213 15 132 26 12 12 82 7 164 191 2 205 122 15 52 171 107 239 255 255 66 137 215 111 48 112 104 219 83 26 0 0 1 196 66 108 86 57 116 104 235 18 13 13 147 72 54 54 22 39 25 25 113 6 17 17 1 134 75 151 110 51 72 75 139 49 200 200 136 128 213 44 220 122 143 161 104 19 51 67 144 189 56 67 125 32 47 3 168 96 123 242 153 64 33 4 196 255 193 4 97 55 124 250 201 192 192 2 44 83 19 108 25 24 164 132 52 212 171 120 183 173 98 228 210 139 249 255 237 210 110 114 139 0 128 0 98 33 161 172 248 33 43 171 94 35 40 40 185 247 240 225 11 156 170 170 50 12 252 252 220 12 242 242 98 96 249 165 59 238 51 148 110 99 97 112 52 231 97 40 246 226 101 248 248 157 129 225 207 95 152 15 33 102 128 2 4 196 100 134 10 51 64 165 254 144 232 232 15 64 179 45 85 25 24 74 34 100 197 90 254 108 94 204 200 171 27 253 255 243 229 189 228 4 0 64 0 177 144 162 248 241 227 155 199 173 173 3 38 74 74 198 148 107 106 202 51 170 170 202 130 197 15 156 122 194 208 180 135 153 65 64 146 133 33 213 158 151 225 211 183 255 12 191 254 254 7 123 142 17 8 153 129 190 101 130 90 6 14 0 96 11 10 212 136 2 97 96 142 102 248 254 247 63 201 14 255 242 131 129 193 70 153 145 193 205 70 76 124 251 239 53 115 24 89 164 124 254 255 121 118 149 84 115 0 2 136 133 84 13 47 94 220 94 97 96 160 94 164 160 32 197 198 4 244 213 243 231 239 25 186 118 253 101 184 251 139 145 33 91 143 131 129 147 133 153 225 205 151 63 96 207 49 51 50 49 176 51 66 162 27 148 24 64 21 57 19 164 242 5 7 12 152 3 84 248 243 247 63 134 159 255 64 202 254 193 84 160 166 62 160 56 35 134 248 63 134 239 191 152 24 28 53 24 24 14 223 150 80 96 13 156 54 17 216 184 10 6 166 212 143 164 248 7 32 128 72 14 128 168 168 216 120 69 69 41 54 80 135 8 4 102 237 121 207 112 234 29 7 3 7 215 119 6 93 9 78 134 215 159 255 0 147 58 35 196 227 76 255 24 126 65 3 0 226 113 38 6 38 112 62 96 4 211 32 169 159 191 255 51 124 248 250 23 24 64 208 84 240 255 31 56 240 96 217 3 196 4 181 146 254 254 255 203 240 15 35 161 252 97 16 98 103 102 144 21 252 202 112 87 205 213 153 199 48 35 3 40 216 73 138 127 0 2 136 164 0 144 150 150 151 93 187 118 103 146 16 168 229 2 4 199 47 60 99 216 118 151 131 225 237 247 239 12 74 2 44 96 143 131 49 208 161 127 128 174 253 243 15 162 143 25 232 1 38 96 202 96 2 197 59 204 87 64 121 102 32 251 245 151 223 12 159 191 255 99 224 2 186 132 143 147 137 225 59 48 64 128 53 43 188 175 193 197 202 200 240 245 215 63 134 31 127 113 180 64 129 237 45 9 30 86 134 163 95 222 49 104 57 151 228 51 50 242 109 6 182 30 136 238 149 2 4 16 73 1 16 31 159 30 37 46 46 194 207 195 3 180 245 223 95 134 117 103 127 51 220 249 194 10 142 53 33 14 22 6 118 96 17 13 106 17 254 130 150 126 44 192 204 207 196 204 204 240 31 24 0 32 207 254 133 70 43 19 52 255 191 5 122 254 229 135 223 12 127 129 122 254 2 61 250 19 88 32 252 253 7 81 36 0 108 26 254 1 150 142 223 129 121 227 203 47 72 153 2 75 25 200 224 231 111 70 96 32 49 49 0 235 100 134 159 194 50 146 98 142 133 73 192 172 80 14 204 10 127 137 241 19 64 0 145 20 0 22 22 54 33 124 124 156 96 246 197 27 175 24 78 189 100 101 248 242 243 39 131 0 47 27 3 55 48 41 130 60 252 13 20 85 160 250 149 141 153 225 31 176 144 0 229 118 96 88 49 252 101 132 120 140 133 133 17 156 236 159 190 249 9 12 128 95 240 170 240 243 119 176 54 136 163 128 250 62 2 83 197 175 223 32 143 67 178 4 35 14 55 253 6 6 250 231 111 64 11 128 129 244 244 221 123 6 13 211 176 144 87 251 155 102 0 165 136 26 169 2 8 32 188 1 0 12 73 54 81 81 105 9 13 13 61 109 21 21 53 135 244 244 12 67 65 65 110 176 220 209 91 223 25 238 126 228 100 96 7 38 128 111 223 255 130 243 247 15 96 108 253 1 198 20 40 127 51 1 249 191 65 5 27 180 192 3 114 193 213 31 40 198 239 191 248 206 240 21 168 22 146 18 24 177 84 185 127 24 254 127 133 120 26 89 30 20 64 232 202 127 177 252 101 120 246 238 55 184 132 253 254 233 27 3 179 134 146 60 183 170 167 35 177 1 0 16 64 44 72 158 101 209 211 51 19 148 147 83 208 249 251 247 159 145 173 173 171 102 119 247 66 35 14 14 110 53 78 78 110 110 30 30 14 96 7 135 147 1 84 242 127 249 248 149 225 242 107 86 96 136 255 98 144 21 99 1 118 126 184 192 174 123 253 229 47 56 31 131 124 251 231 63 164 228 134 148 129 160 252 14 204 203 63 255 50 156 190 245 5 28 179 160 212 130 40 234 240 182 64 80 198 31 254 129 248 255 33 5 40 168 64 249 12 100 221 122 254 19 162 12 24 168 111 129 169 65 90 223 211 17 232 159 165 160 22 53 161 0 0 8 32 150 176 176 184 112 123 123 55 187 5 11 54 24 50 49 177 170 9 10 10 131 250 231 140 255 254 253 97 224 228 100 103 224 229 229 4 122 156 131 225 203 151 111 224 46 47 8 60 121 245 137 225 222 7 96 212 127 253 204 32 196 203 195 32 35 198 206 240 233 227 79 134 135 192 0 209 149 227 2 230 117 72 139 7 90 1 128 219 1 140 144 210 144 225 195 151 127 12 127 65 169 132 153 188 150 27 27 51 164 218 4 165 40 22 96 18 122 246 254 23 195 251 215 127 32 54 1 203 144 23 111 63 49 152 106 59 153 222 90 195 32 69 76 42 0 8 32 150 194 194 170 5 191 127 255 230 224 2 22 167 236 236 44 12 60 60 92 64 79 115 51 112 112 176 2 3 128 131 129 25 234 208 83 167 110 48 240 241 65 170 190 123 47 126 49 112 241 241 51 136 72 253 98 120 4 100 243 2 171 64 97 96 209 240 245 31 51 195 247 127 140 224 18 253 207 63 38 112 106 97 2 199 33 35 56 249 178 1 243 191 52 48 176 46 220 254 2 54 23 212 32 250 79 66 27 8 84 62 10 241 50 131 171 195 47 192 212 6 170 105 78 222 249 6 105 77 253 135 228 145 239 192 38 40 171 130 168 28 3 135 152 44 49 1 0 16 64 44 239 222 189 251 101 106 170 197 33 38 38 128 87 225 175 95 191 129 129 2 233 227 191 248 252 23 88 45 49 50 188 1 229 189 215 63 25 142 60 2 150 96 60 44 12 170 242 156 12 191 129 66 22 106 192 0 4 150 234 127 255 253 7 123 30 214 16 2 37 92 99 13 30 134 111 192 164 122 242 218 103 112 12 130 146 53 40 16 254 49 48 192 249 184 155 227 160 65 147 127 12 50 162 108 192 124 15 108 8 1 11 72 53 25 118 134 203 63 128 186 63 1 109 0 6 48 3 48 11 252 101 225 97 19 81 49 85 4 102 131 131 160 78 40 62 127 1 4 16 203 31 96 169 5 138 105 124 224 47 180 66 1 13 221 128 192 143 63 140 12 151 239 1 61 253 226 39 40 77 66 92 255 254 15 195 237 183 159 25 110 95 251 194 112 76 133 139 33 194 81 136 65 65 130 3 210 209 129 102 1 80 77 0 74 186 118 70 252 64 51 254 51 156 185 250 5 92 16 114 1 203 13 118 160 227 223 126 252 67 176 68 0 5 226 151 31 63 25 174 60 250 193 240 7 232 89 125 29 96 161 12 108 55 24 91 9 1 3 252 31 195 133 19 31 25 126 1 83 34 23 159 176 24 180 89 137 55 0 0 2 8 24 0 192 146 251 15 254 42 19 164 6 148 156 89 128 141 25 6 96 245 250 251 63 51 48 22 255 67 162 4 22 125 176 150 42 80 252 222 233 143 12 235 128 30 74 247 21 102 224 228 96 3 87 107 144 80 128 52 106 65 177 236 102 46 192 96 174 195 11 214 203 201 193 200 240 224 233 15 134 217 155 94 2 3 128 9 107 149 7 235 59 124 255 245 151 225 221 75 96 50 227 101 97 16 0 149 61 95 255 49 120 187 8 49 40 1 203 158 253 167 63 48 72 169 113 129 21 178 115 112 10 66 251 93 120 251 90 0 1 4 74 1 88 171 34 140 214 248 63 68 137 204 12 44 136 88 152 32 173 57 120 115 15 57 234 128 49 122 227 210 39 134 217 64 193 32 7 97 6 25 96 74 96 101 133 180 18 25 161 61 66 80 74 16 226 103 6 135 11 168 60 144 147 230 4 167 134 183 31 127 49 48 179 48 162 116 151 33 169 16 152 191 65 45 196 79 64 207 3 27 93 137 190 34 12 31 129 89 241 59 176 10 190 113 255 59 195 235 15 127 24 174 92 254 194 224 230 44 12 212 196 204 240 150 153 153 137 1 119 243 1 14 0 2 136 5 88 0 18 76 1 160 108 4 26 60 0 5 2 168 68 103 101 252 7 236 217 253 135 20 62 92 208 146 238 235 95 132 117 140 144 158 207 181 99 31 24 238 62 254 193 80 20 43 205 32 7 12 4 78 14 38 112 0 192 90 130 208 114 11 140 121 120 25 25 68 133 216 24 158 2 61 195 192 193 140 154 241 65 205 195 95 80 251 216 153 24 226 194 165 24 148 36 217 24 190 11 253 97 120 244 252 23 195 221 61 95 25 94 9 177 48 72 73 179 51 40 72 113 2 221 201 204 112 239 207 207 95 196 20 172 0 1 196 194 204 204 202 125 250 244 117 240 160 134 160 32 31 176 6 224 97 0 213 249 204 72 110 96 99 99 5 7 210 175 95 191 24 88 185 217 129 61 190 63 192 66 142 21 28 251 236 92 144 166 232 251 143 191 33 133 16 114 106 96 130 132 5 59 48 246 89 128 106 152 152 161 85 35 51 40 16 129 202 161 52 184 205 15 44 134 76 213 185 25 46 92 4 118 230 126 131 90 118 160 246 241 127 164 64 5 50 128 173 76 43 103 17 6 75 29 30 112 159 1 84 3 129 98 63 41 90 134 129 25 168 71 64 152 141 225 31 80 29 40 238 127 127 255 250 158 152 97 22 128 0 98 57 125 250 232 92 17 17 73 175 219 183 5 164 56 56 56 153 89 89 89 128 213 29 7 131 144 16 63 3 104 76 159 143 143 7 28 0 255 128 209 15 154 48 5 141 246 10 113 254 103 16 230 102 98 184 15 202 2 64 44 9 236 8 189 127 248 15 92 207 195 251 112 192 146 94 209 144 143 33 55 74 134 65 88 144 21 104 6 196 15 160 200 229 100 133 148 157 176 182 16 136 2 149 195 114 162 236 12 242 18 236 192 44 0 108 26 127 251 7 76 214 192 64 5 118 173 193 85 8 40 149 138 115 48 184 90 8 130 107 23 80 7 11 212 236 150 0 234 81 6 214 4 226 192 190 195 123 96 42 1 13 196 252 252 252 251 239 187 39 215 31 19 42 0 65 0 32 128 88 250 251 235 242 128 244 4 41 41 69 45 105 105 5 99 101 101 109 125 33 33 73 45 30 30 126 89 46 46 30 22 80 187 128 143 15 232 105 33 62 240 152 63 8 136 0 99 93 92 144 25 156 150 127 2 187 191 178 90 60 12 215 64 233 26 94 30 64 210 181 147 153 32 131 40 208 243 236 64 207 1 195 149 129 23 232 113 80 27 1 148 255 225 237 123 104 32 128 228 121 128 89 4 212 177 2 245 27 133 120 128 24 24 216 111 62 1 243 243 219 223 12 42 26 252 12 246 38 2 12 26 74 64 177 183 192 170 238 215 31 134 135 79 190 49 28 57 250 142 225 234 245 143 12 94 64 185 255 192 62 201 251 47 140 12 18 28 95 63 124 126 114 241 9 49 1 0 16 64 44 192 188 13 242 213 13 16 6 22 134 27 79 159 222 207 7 100 139 241 240 136 168 72 75 43 153 72 74 42 24 8 8 72 233 89 90 26 203 235 232 168 0 125 45 196 32 204 199 198 160 35 241 151 97 43 39 208 213 95 129 125 114 30 102 6 14 96 30 252 241 242 39 180 209 0 44 235 101 56 25 204 117 249 25 64 77 7 80 151 21 168 5 88 213 33 60 206 196 132 90 200 129 184 90 64 207 9 241 49 51 124 0 214 233 44 208 236 36 4 140 89 51 109 94 134 119 192 20 161 161 196 5 108 76 129 26 84 76 224 66 88 93 142 147 225 200 198 159 12 159 248 89 24 158 60 249 206 176 113 251 67 6 231 32 53 96 5 113 13 228 159 23 196 244 8 1 2 136 5 109 220 15 164 225 61 20 223 4 6 200 246 155 55 79 1 235 42 6 129 223 191 35 210 157 157 45 43 65 234 196 68 120 25 84 4 62 50 72 200 243 50 188 56 251 146 225 29 176 254 118 0 86 105 59 238 126 101 144 49 23 98 112 52 19 96 144 149 230 98 144 149 130 120 130 159 13 90 174 49 34 170 51 6 180 34 26 148 104 148 164 25 24 220 173 69 25 150 108 120 6 44 100 153 192 98 236 192 66 239 39 176 164 247 179 18 102 208 83 5 246 62 191 131 202 11 96 202 251 197 12 105 69 2 3 194 73 143 151 225 246 179 31 12 160 222 151 177 46 55 195 190 73 203 14 3 101 30 18 83 8 2 4 16 19 129 129 80 208 0 248 71 32 126 120 242 228 193 37 79 158 60 251 254 229 203 15 6 126 33 1 6 25 174 175 12 14 70 124 224 50 224 252 157 207 12 6 10 156 12 42 192 186 61 11 152 231 131 220 133 129 201 159 19 236 81 110 160 231 65 9 5 84 0 130 138 8 102 104 45 192 12 173 254 96 152 9 218 158 242 176 230 5 167 130 111 223 127 51 124 2 118 151 13 212 121 25 34 60 197 25 124 29 184 24 24 129 197 1 176 149 206 112 253 238 55 112 175 19 148 227 68 128 173 79 21 73 14 134 11 192 78 22 175 10 31 131 20 247 127 6 158 95 255 141 100 164 117 163 152 153 185 101 129 145 136 215 143 0 1 196 68 108 59 252 205 155 231 55 110 221 186 125 226 197 139 247 96 190 156 48 7 131 141 202 111 6 46 13 65 134 87 192 182 253 91 96 45 208 157 163 196 160 8 172 138 254 254 131 196 50 40 185 130 242 60 51 164 184 128 96 104 64 48 65 3 3 25 131 98 84 82 4 216 82 52 17 4 166 6 78 134 112 79 9 134 252 68 49 96 138 98 3 123 22 216 47 3 23 158 7 142 191 5 119 185 173 244 248 25 234 226 229 128 181 1 48 246 31 127 99 240 116 144 100 16 248 249 130 161 179 190 208 173 161 161 115 97 84 84 233 73 96 26 210 192 231 47 128 0 34 101 88 252 159 179 179 255 74 107 107 43 71 69 69 73 6 117 85 89 134 91 47 111 50 36 249 171 48 76 105 126 195 112 249 209 55 134 22 109 102 134 199 192 90 236 193 39 72 208 178 2 29 203 6 245 44 172 192 99 66 170 213 96 85 38 114 199 24 132 211 35 133 129 101 161 48 184 236 0 229 201 31 191 33 85 38 176 83 202 176 233 16 176 9 12 172 2 149 101 24 24 100 129 5 165 160 62 15 195 27 96 202 240 78 81 102 176 215 231 98 144 251 243 146 193 208 80 149 225 53 176 89 254 230 205 179 55 160 166 41 48 21 128 166 210 176 86 137 0 1 196 196 64 2 56 114 100 247 154 43 87 174 223 122 240 224 5 3 51 176 106 84 16 100 99 176 82 248 198 160 229 42 203 112 226 200 27 134 235 192 114 87 137 31 136 129 57 227 239 31 104 76 51 51 192 27 63 204 140 8 54 19 212 114 88 106 128 245 28 65 24 216 17 101 0 246 196 193 237 30 80 227 139 5 154 106 64 108 37 5 14 96 0 201 50 168 0 237 225 1 141 74 3 59 131 166 230 60 12 41 81 98 12 156 159 158 49 232 40 9 49 220 127 248 146 225 236 217 27 192 30 236 222 245 160 194 16 159 159 0 2 136 164 0 248 249 243 219 219 245 235 151 79 126 252 248 21 176 81 244 143 1 180 112 130 235 253 61 134 236 8 73 112 81 223 60 27 82 238 200 0 29 7 114 32 23 51 194 18 70 152 167 25 81 203 1 38 104 131 157 137 1 33 142 92 51 48 194 6 21 160 115 8 26 192 152 247 212 97 100 224 128 54 242 223 254 130 180 151 222 61 250 201 160 201 255 19 60 134 113 233 210 93 134 99 199 142 92 127 247 238 222 102 208 50 135 255 120 166 192 1 2 136 164 0 0 207 243 235 233 200 189 126 253 158 225 242 229 59 96 71 153 104 203 49 8 126 188 193 80 91 174 203 176 239 212 123 134 3 183 254 51 128 250 140 188 64 147 165 128 12 1 80 107 15 41 11 192 60 203 130 132 153 209 248 176 148 0 11 12 16 155 13 200 16 6 42 20 99 130 168 1 21 152 111 128 181 238 111 80 7 9 152 237 120 223 222 101 208 83 147 96 184 126 227 49 48 230 175 50 104 106 42 131 180 130 230 93 127 226 243 15 64 0 145 20 0 110 110 62 86 129 129 225 185 156 192 166 220 205 155 15 128 117 239 91 6 105 89 49 6 85 1 70 6 85 182 39 12 179 186 12 24 184 132 25 25 222 48 32 28 14 26 64 7 245 75 5 65 205 93 36 15 195 179 0 26 70 22 3 5 36 176 205 197 32 4 196 226 80 253 48 0 108 11 49 124 6 134 194 215 175 192 40 190 117 147 193 94 71 12 88 29 127 103 216 179 231 20 56 59 217 219 219 105 4 6 198 37 48 18 232 233 1 4 16 209 1 32 36 36 202 149 149 85 58 241 219 183 111 28 74 192 10 91 65 65 138 225 196 137 75 12 159 63 127 103 48 49 211 98 144 248 243 154 129 227 253 83 112 139 14 216 112 99 120 247 31 49 138 3 114 1 168 49 33 4 196 194 160 192 128 242 65 195 171 156 104 24 36 6 106 137 9 64 213 10 67 197 192 227 9 208 66 242 45 144 248 12 10 0 96 97 251 242 220 45 6 123 85 110 6 86 78 78 134 221 187 79 49 188 127 255 145 193 210 82 15 216 75 252 206 224 236 236 151 198 203 43 108 141 207 95 0 1 68 116 0 228 229 149 87 10 10 10 153 128 98 95 78 78 156 193 202 74 135 129 139 139 147 97 223 190 179 64 203 126 51 184 186 154 48 136 126 127 202 112 255 248 93 134 47 64 135 1 123 167 12 111 254 67 242 41 172 116 103 130 198 42 7 52 0 64 30 229 199 130 121 161 129 193 140 54 52 10 106 178 190 2 245 136 65 102 191 98 96 120 122 242 26 131 173 34 43 131 184 132 48 195 129 3 103 24 206 159 191 201 16 21 229 1 46 155 88 128 77 69 96 223 134 47 34 34 181 10 188 30 9 7 0 8 32 162 2 192 197 197 199 216 217 217 171 228 207 159 159 12 138 138 210 224 222 34 8 184 187 91 48 252 254 253 135 97 255 254 51 224 64 112 119 55 99 208 228 254 194 112 247 192 121 134 55 192 178 23 216 77 0 199 214 87 88 175 18 138 89 113 36 121 228 14 60 35 146 24 200 227 160 117 49 160 0 253 10 76 93 143 110 253 100 120 123 230 2 131 187 46 176 197 41 35 193 112 224 224 121 96 68 156 97 8 8 112 96 0 77 216 130 198 52 229 229 37 193 221 120 77 77 99 79 13 13 147 40 92 126 3 8 32 130 107 132 132 133 197 56 102 207 94 185 135 155 155 199 90 73 73 10 104 129 52 218 74 178 95 12 155 54 29 102 0 245 34 29 157 76 24 132 4 185 25 110 221 120 200 112 244 252 35 6 14 121 117 6 69 109 49 6 240 168 28 208 225 27 54 62 103 240 0 54 105 77 181 217 192 30 227 34 16 240 32 143 131 102 58 65 75 12 190 254 3 53 198 128 158 191 242 132 129 239 199 75 6 123 83 101 134 255 192 126 245 158 189 167 129 37 254 37 6 15 15 75 6 91 91 125 96 135 237 55 116 20 235 15 195 197 139 183 25 174 93 123 200 112 239 222 221 187 83 166 84 186 1 253 122 15 221 14 128 0 34 24 0 117 117 157 149 246 246 238 109 160 25 33 83 83 117 28 3 166 255 24 182 110 61 2 44 144 190 131 243 159 178 178 36 195 183 175 63 128 61 181 75 12 79 191 0 123 180 108 178 12 187 78 255 102 216 178 237 57 120 128 145 19 88 129 11 243 177 48 232 168 240 48 88 0 91 115 160 250 253 46 176 103 39 37 202 1 236 253 253 98 144 151 225 102 80 83 225 101 16 20 225 100 80 84 2 38 251 183 192 228 126 247 21 195 239 151 143 25 116 229 249 24 212 213 229 24 158 61 127 7 44 240 78 50 220 190 253 152 193 223 223 129 193 200 72 13 152 10 127 193 7 111 64 45 197 143 31 191 1 3 231 34 195 221 187 207 129 41 100 227 164 195 135 55 22 162 15 146 2 4 16 222 0 112 115 243 53 174 170 106 59 244 239 223 47 46 144 199 64 249 31 119 27 225 47 195 150 45 135 129 93 215 143 12 186 186 202 12 192 158 35 120 109 225 43 160 67 175 222 184 207 240 12 216 97 122 243 147 151 225 252 61 102 134 27 247 255 50 220 126 252 147 225 221 51 96 13 245 237 55 98 242 224 15 116 226 16 88 119 106 1 27 60 198 58 108 12 206 198 172 12 28 255 62 50 40 75 240 51 168 171 72 1 155 196 140 12 151 175 220 1 39 249 143 31 191 48 196 197 121 49 104 104 40 0 3 255 27 3 108 201 207 223 191 176 161 59 38 134 167 79 95 49 236 218 117 138 225 209 163 103 95 231 207 111 11 248 246 237 253 30 100 119 3 4 16 11 158 105 49 246 69 139 54 78 248 245 235 39 151 129 129 10 94 207 127 254 252 131 225 254 253 103 224 193 83 80 104 63 3 182 64 31 61 122 3 204 127 242 12 160 102 179 163 163 49 195 215 207 223 24 158 60 126 193 96 36 245 145 225 157 225 31 134 15 95 65 163 92 28 12 159 190 115 49 124 5 102 35 38 70 200 144 49 7 211 47 96 247 154 145 65 128 231 15 131 20 176 139 45 41 193 203 32 34 34 203 240 11 216 211 187 117 247 25 195 133 11 119 24 174 94 189 203 32 37 37 2 14 232 215 175 63 48 240 241 189 6 143 102 129 146 253 63 232 28 58 40 32 64 163 88 18 18 34 12 250 250 42 160 136 225 118 116 12 171 5 250 235 18 80 238 21 204 237 0 1 132 175 47 192 250 255 63 147 12 7 7 7 3 190 57 131 231 192 24 190 124 249 46 176 245 117 7 24 8 47 129 1 112 245 202 169 83 59 230 168 169 105 73 185 187 7 198 104 106 106 74 201 201 137 50 72 75 139 50 200 42 200 48 168 105 42 49 252 252 241 147 225 247 207 223 224 217 38 208 48 219 215 111 63 192 235 11 185 184 56 128 29 40 86 6 86 118 118 6 118 14 86 112 214 120 243 246 19 195 185 11 119 25 110 221 122 2 180 231 198 239 227 199 15 28 120 242 228 234 250 248 248 36 55 53 53 133 128 55 111 62 1 171 190 207 192 84 32 15 94 178 11 170 44 255 253 251 139 28 145 12 90 90 74 12 199 143 95 1 6 148 152 57 27 27 175 54 168 50 129 201 3 4 16 222 44 160 160 160 238 80 87 215 187 66 71 71 85 220 204 76 29 109 69 249 127 134 235 215 239 51 156 57 115 131 225 206 157 103 192 24 127 248 238 196 137 237 139 239 222 61 187 20 40 125 27 84 62 2 19 161 186 142 142 89 128 133 133 139 175 154 154 134 145 136 136 0 51 104 197 169 132 132 16 120 158 17 84 141 130 86 146 130 122 172 160 152 3 77 190 124 255 254 19 24 48 95 129 5 222 71 112 224 190 120 241 22 232 249 155 207 46 94 60 121 232 242 229 99 155 255 255 255 126 10 218 190 103 50 49 177 13 141 142 78 175 229 231 23 149 255 251 247 23 184 6 80 81 145 1 230 127 38 96 54 128 140 118 51 3 187 162 7 14 156 101 216 177 227 20 176 80 60 176 226 194 133 93 37 160 120 131 149 5 0 1 68 176 16 148 150 86 114 45 43 107 91 108 96 160 37 110 111 175 7 237 26 127 6 55 55 65 109 238 231 207 223 0 235 223 195 59 15 31 222 60 3 152 168 79 128 106 44 208 130 42 164 24 0 229 112 113 65 65 41 163 178 178 230 110 46 46 62 173 31 192 20 192 8 109 27 131 234 107 22 22 22 112 242 253 245 235 15 56 16 126 255 254 203 0 82 243 244 233 147 71 219 182 45 153 248 225 195 19 144 185 247 161 149 194 79 228 145 30 78 78 94 173 144 144 196 90 51 51 199 136 63 127 126 1 219 40 18 192 118 128 42 48 128 33 117 204 254 253 167 129 13 164 147 12 145 145 158 64 119 94 122 210 208 80 146 241 237 219 219 173 48 253 0 1 68 176 59 252 244 233 189 221 146 146 114 177 121 121 205 139 191 125 251 41 46 33 33 0 140 245 155 192 24 127 9 140 249 235 215 247 236 89 61 251 205 155 71 91 64 161 10 237 120 252 67 235 70 255 135 198 216 182 188 188 10 79 95 223 112 45 38 166 127 224 252 251 229 203 119 176 103 255 254 133 76 156 129 230 27 64 177 119 229 202 93 96 83 251 9 195 161 67 91 142 0 61 191 4 52 66 133 107 173 240 247 239 159 175 1 195 56 233 204 153 99 123 60 61 35 202 63 125 250 169 10 138 20 107 107 61 96 118 124 10 172 41 206 48 4 7 59 3 27 106 198 160 181 204 50 95 191 254 153 195 193 33 20 247 227 199 59 240 210 58 128 0 34 106 60 224 249 243 71 187 197 196 100 99 51 50 106 22 243 240 8 137 63 123 246 232 227 161 67 91 87 156 63 191 127 17 80 250 58 104 209 22 49 139 153 111 220 184 126 193 211 243 47 3 40 0 216 216 216 128 169 139 143 1 20 153 176 210 27 148 92 95 189 122 7 174 203 63 3 11 205 87 175 158 130 204 254 76 200 108 208 154 77 32 53 151 145 145 245 144 155 91 88 181 182 182 101 60 40 130 94 188 120 5 108 74 252 120 192 198 198 161 6 26 200 145 144 16 100 40 43 75 144 0 70 228 10 22 22 62 191 63 127 62 29 5 8 32 162 7 68 94 189 122 188 91 64 64 44 90 93 221 48 248 194 133 163 7 126 253 250 122 4 26 51 223 137 53 227 221 187 55 23 191 2 163 0 88 224 177 124 255 254 3 24 8 44 192 216 255 7 45 185 33 43 55 191 2 219 15 239 223 127 2 170 125 251 227 254 253 235 23 161 93 0 34 7 109 126 223 6 166 134 180 171 87 207 236 179 176 240 206 62 115 102 223 254 135 15 47 174 254 253 251 123 83 100 100 164 151 141 141 46 176 54 248 12 196 111 126 253 253 251 155 27 168 150 25 32 128 72 90 34 243 225 195 171 189 64 77 7 64 115 29 232 121 145 24 112 246 236 177 219 47 94 60 127 46 33 33 41 11 202 239 144 85 230 48 207 67 82 1 40 91 128 58 88 111 223 190 0 230 249 63 15 73 93 71 9 29 229 94 4 116 231 110 104 23 226 205 138 21 147 226 127 253 250 187 224 195 135 96 239 189 123 247 61 93 180 168 29 88 16 254 61 7 146 7 8 32 146 151 201 65 61 253 141 129 60 240 25 216 96 185 12 44 233 101 65 41 0 214 205 129 149 195 160 118 196 231 207 95 193 129 112 255 254 141 43 208 161 237 127 228 88 4 212 247 28 121 72 19 148 50 46 92 56 153 127 239 222 229 211 64 207 31 128 166 222 127 0 1 196 196 64 71 0 178 240 210 165 179 151 129 177 1 174 238 32 11 150 25 144 90 112 255 192 45 201 79 159 190 2 203 157 7 151 25 16 253 40 106 216 253 236 238 221 211 229 192 132 187 21 234 121 112 234 5 8 32 186 6 0 8 220 189 123 227 50 168 133 6 42 228 64 201 31 18 251 255 224 139 48 64 123 21 223 191 127 247 251 233 211 219 23 160 139 75 169 29 9 223 145 179 46 64 0 209 61 0 94 191 126 121 254 211 167 207 191 62 129 86 116 1 219 234 108 108 204 224 118 0 168 64 4 5 192 187 119 160 150 221 219 71 192 100 250 132 129 244 117 212 36 3 128 0 98 161 119 0 220 187 119 245 209 167 79 239 159 189 124 41 160 112 251 246 19 104 155 253 63 120 238 0 52 216 250 238 221 23 96 219 227 206 53 228 214 26 45 1 64 0 209 61 0 64 249 250 254 253 219 235 129 101 64 248 153 51 103 255 129 26 65 160 50 1 214 18 4 53 136 30 61 186 121 8 58 12 64 115 0 16 64 4 155 194 52 177 148 145 17 52 86 42 7 173 78 177 57 224 13 120 244 11 82 165 209 20 0 4 24 0 232 3 247 28 164 139 74 153 0 0 0 0 73 69 78 68 174 66 96 130) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
firefoxPng | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 0 16 0 0 0 16 8 6 0 0 0 31 243 255 97 0 0 0 9 112 72 89 115 0 0 11 18 0 0 11 18 1 210 221 126 252 0 0 0 4 103 65 77 65 0 0 177 142 124 251 81 147 0 0 0 32 99 72 82 77 0 0 122 37 0 0 128 131 0 0 249 255 0 0 128 233 0 0 117 48 0 0 234 96 0 0 58 152 0 0 23 111 146 95 197 70 0 0 4 36 73 68 65 84 120 218 98 252 255 255 63 131 158 164 190 246 239 127 140 31 174 191 188 240 148 1 8 56 141 106 132 152 254 254 12 250 199 204 110 10 226 75 10 126 120 173 203 127 250 131 28 239 39 215 91 183 153 47 31 57 201 80 247 245 239 149 111 32 57 128 0 98 1 17 101 41 70 139 84 212 181 164 28 236 210 180 174 125 231 155 16 108 200 25 103 171 38 192 112 253 151 44 195 123 110 105 134 87 175 63 50 188 186 201 195 176 48 116 255 127 126 30 102 183 37 59 185 34 101 120 116 99 158 124 185 188 31 32 128 24 65 46 56 58 165 224 141 129 165 161 48 211 139 237 12 140 76 172 12 63 68 131 24 102 30 254 192 192 161 110 192 192 40 44 193 240 231 31 3 195 215 159 127 24 196 79 214 49 164 154 93 103 248 203 192 194 176 247 44 243 167 232 250 119 246 0 1 0 65 0 190 255 2 32 18 52 17 0 249 234 2 6 245 211 0 0 3 252 0 250 3 38 0 255 223 182 0 244 205 158 0 195 187 190 0 216 235 245 0 227 242 249 0 241 250 254 0 207 44 125 0 144 206 58 0 3 0 252 0 71 54 250 14 46 33 2 101 2 136 57 206 89 171 53 206 139 223 233 247 183 23 12 127 94 61 102 248 251 238 53 195 95 102 89 6 115 53 121 134 37 167 95 50 156 231 209 98 120 254 229 15 195 215 95 127 25 126 2 157 114 234 155 28 131 31 219 46 6 110 78 96 88 253 103 146 5 8 0 65 0 190 255 4 17 3 243 37 255 238 225 0 253 1 4 0 253 242 245 0 2 252 254 0 14 8 231 0 148 206 2 0 196 22 82 0 252 239 248 0 5 3 250 0 230 5 1 0 19 10 5 0 247 245 254 0 223 234 2 0 22 19 255 0 64 44 4 21 2 0 65 0 190 255 4 237 245 253 3 253 236 239 0 254 5 0 0 252 248 255 0 232 222 246 0 126 184 238 0 199 12 51 0 253 40 16 0 0 252 252 0 251 254 2 0 239 252 1 0 249 251 253 0 252 219 213 0 236 36 253 0 0 44 4 0 176 209 6 3 2 136 233 235 131 15 194 127 94 3 13 248 246 141 225 219 87 102 6 102 86 22 6 125 222 183 12 28 60 124 12 235 158 167 50 84 221 168 100 224 191 126 152 225 239 191 191 12 159 191 255 102 224 125 125 141 193 83 237 63 208 253 28 12 220 226 127 25 0 2 0 65 0 190 255 2 224 234 4 226 243 224 243 0 0 242 242 0 12 12 7 0 17 35 28 0 108 53 5 0 194 33 166 0 59 17 233 0 112 29 210 0 50 242 206 0 0 252 253 0 1 247 245 0 38 255 224 0 2 34 12 0 0 11 7 0 245 233 3 0 2 0 65 0 190 255 2 217 247 1 162 212 213 252 0 253 235 246 0 4 254 234 0 12 255 236 0 1 253 247 0 184 204 244 0 91 191 44 0 29 213 109 0 192 48 104 0 2 247 245 0 72 206 145 0 152 65 231 0 0 25 45 0 254 249 0 0 142 179 241 179 2 0 65 0 190 255 3 244 254 236 221 238 248 23 109 60 255 243 9 6 18 253 0 5 15 13 0 1 246 228 0 20 18 12 0 193 241 19 0 237 4 20 0 21 228 207 0 105 238 168 0 154 74 240 0 21 80 47 0 0 239 253 0 130 135 213 0 179 200 245 85 2 8 156 144 184 5 204 242 235 127 92 158 224 174 245 131 129 215 66 144 65 80 142 29 232 228 255 12 108 95 184 25 254 254 250 207 240 15 24 144 76 236 76 12 204 58 127 25 216 229 20 24 206 110 252 200 224 178 132 235 200 151 183 39 29 1 2 8 108 0 35 35 35 183 160 144 197 222 226 143 151 204 93 121 190 49 112 170 48 49 240 168 114 51 240 138 115 51 48 178 49 0 211 29 27 3 35 235 127 6 14 185 127 12 187 206 112 51 36 109 225 127 248 250 197 105 115 160 222 151 0 1 4 51 128 17 152 37 68 216 196 29 103 27 124 125 230 31 246 237 33 131 230 191 31 12 64 75 25 216 197 24 25 216 85 88 24 94 176 243 50 204 127 42 194 176 253 131 196 197 31 47 14 133 2 213 63 0 234 253 13 16 64 96 3 64 0 104 6 80 57 131 32 19 151 148 41 11 159 122 45 208 19 250 92 255 254 114 51 50 252 103 248 198 196 250 235 7 35 203 211 127 127 63 206 250 243 234 228 50 160 186 23 64 125 191 64 250 0 2 8 110 0 12 0 13 226 0 185 6 136 69 129 152 151 137 75 130 239 223 183 23 175 129 236 55 64 252 10 136 191 2 245 252 131 169 7 8 48 0 131 160 150 211 227 182 219 124 0 0 0 0 73 69 78 68 174 66 96 130) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
safariGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 20 0 20 0 247 1 0 170 168 167 168 168 168 134 134 135 135 135 137 121 122 122 58 60 60 183 183 184 169 169 170 174 174 175 160 160 161 140 140 141 255 255 255 102 102 104 194 194 194 128 129 129 161 161 163 176 176 177 156 156 156 177 177 178 69 197 255 69 196 255 171 177 185 116 161 206 94 99 101 128 139 160 99 100 100 168 167 167 55 57 58 98 134 204 136 137 136 104 215 255 125 155 188 126 126 127 111 111 112 163 163 164 248 239 236 118 136 168 222 217 213 180 182 182 99 99 100 70 194 251 143 143 144 141 206 244 205 204 204 129 130 130 165 165 165 160 174 215 174 195 208 174 215 255 226 226 226 115 153 199 148 148 149 167 167 168 176 174 170 51 124 179 138 137 136 105 195 237 106 155 207 204 222 243 126 126 125 69 119 193 164 164 164 159 156 154 97 101 102 154 153 153 154 154 154 119 120 120 73 161 232 47 49 50 184 184 185 154 159 168 182 233 255 217 212 209 75 79 80 214 205 199 61 144 202 203 112 124 208 222 247 198 206 238 174 171 170 65 110 184 31 146 218 128 195 252 170 171 176 169 196 218 158 184 233 126 125 122 176 183 188 199 199 202 43 46 47 37 170 249 198 198 198 169 188 222 27 138 222 166 216 249 78 127 197 189 189 190 229 229 229 157 208 242 122 155 203 148 147 147 139 219 252 12 105 200 168 168 169 136 141 178 91 139 195 62 168 231 138 145 159 136 137 138 138 138 138 228 235 255 129 129 130 156 164 183 111 158 204 82 84 84 180 180 182 124 124 124 144 144 145 94 146 197 140 140 140 161 190 232 175 175 174 146 143 139 158 157 155 159 157 155 160 160 163 170 170 170 106 106 105 235 234 233 86 190 238 166 164 161 139 139 140 46 100 185 55 109 163 66 180 245 68 190 255 79 180 247 188 205 216 179 179 180 206 179 180 62 102 149 160 225 255 143 184 235 84 194 239 223 222 222 65 67 67 145 65 84 159 182 220 110 164 232 48 133 206 153 209 236 50 146 218 212 104 98 131 131 133 81 198 249 80 202 255 89 193 243 140 212 251 251 248 248 219 225 232 105 192 242 60 63 65 82 179 253 87 189 252 238 232 228 68 206 255 177 193 212 148 184 235 226 224 223 155 186 227 195 248 255 122 122 125 53 185 255 86 127 188 82 154 217 89 150 218 94 157 216 202 200 202 179 195 226 79 213 255 73 135 194 197 195 196 129 135 145 160 187 214 57 168 222 20 128 209 89 156 232 169 189 224 182 218 251 180 210 246 200 199 198 186 187 188 225 138 109 231 227 226 215 249 255 222 251 255 193 60 23 118 154 204 128 187 222 147 147 148 150 172 210 100 139 194 159 115 134 140 222 254 199 210 235 26 109 199 71 213 255 163 175 199 137 223 255 143 143 140 193 203 235 57 161 231 60 121 184 144 143 144 27 85 173 143 144 153 56 139 225 206 202 199 96 97 97 173 173 173 77 177 255 238 254 255 131 131 131 156 167 188 167 177 203 218 212 207 86 90 91 207 207 206 212 94 67 207 220 244 62 200 255 182 182 183 127 128 129 133 165 207 90 96 98 157 157 158 92 145 194 136 147 174 141 141 140 149 192 244 114 189 233 57 58 58 58 59 60 164 164 165 101 131 178 161 160 160 144 143 141 95 220 255 139 159 205 136 136 137 137 137 137 87 190 243 171 171 171 71 119 194 166 166 167 185 185 186 33 249 4 1 0 0 1 0 44 0 0 0 0 20 0 20 0 0 8 255 0 3 8 28 56 231 78 166 3 3 19 42 76 40 97 192 160 58 8 32 44 156 24 32 193 182 48 91 26 96 105 144 192 0 197 0 8 76 196 88 1 160 222 131 60 190 198 241 67 184 240 0 24 64 64 108 193 121 6 238 219 154 106 1 130 244 80 168 72 2 164 1 237 100 149 115 35 173 137 19 100 215 162 57 160 145 48 66 44 50 36 38 113 193 183 11 153 139 119 139 208 24 177 66 199 99 0 8 17 0 96 24 147 78 70 50 29 197 116 49 81 70 233 3 159 63 243 4 246 81 32 136 94 26 118 113 44 240 146 130 73 18 54 14 57 174 220 208 39 80 65 135 41 173 120 208 162 134 199 26 57 98 98 28 85 57 101 106 143 0 129 222 236 85 128 210 143 80 42 88 204 128 49 242 82 169 153 153 91 62 86 9 76 161 225 215 151 94 174 94 193 80 82 168 19 60 92 106 186 80 209 195 64 224 186 22 96 236 92 202 53 164 150 13 97 160 2 61 50 52 237 211 159 19 2 253 176 168 241 34 10 162 68 75 180 52 26 165 201 195 33 21 37 226 93 107 14 96 128 0 129 112 198 112 236 155 64 65 20 183 123 179 56 45 216 81 0 193 192 7 114 28 140 176 132 194 156 51 86 155 148 82 198 2 0 100 241 134 66 108 20 32 4 41 221 28 177 12 52 170 12 227 201 12 68 48 224 85 66 109 200 19 137 59 217 160 18 12 18 79 252 176 65 8 231 80 36 66 6 5 132 146 132 58 23 136 163 205 49 31 13 116 134 2 232 128 144 79 2 69 44 20 16 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
msieGif | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(71 73 70 56 57 97 55 0 55 0 213 0 0 113 205 239 21 119 203 37 139 224 34 155 225 132 219 243 87 138 183 20 108 185 213 226 237 37 133 222 112 174 207 252 252 252 34 132 174 37 164 229 86 169 201 34 145 223 146 231 249 74 212 241 25 136 210 83 186 239 173 198 220 37 113 179 53 173 214 197 218 230 184 210 226 83 151 201 104 149 193 60 197 239 6 95 180 228 236 242 133 183 217 57 187 222 63 171 237 234 240 244 67 120 175 196 204 211 154 197 222 103 194 227 154 180 210 135 176 218 10 77 153 166 189 213 155 186 209 221 230 237 173 173 173 66 158 193 122 162 197 40 130 193 43 175 235 101 101 100 244 247 248 51 186 239 40 89 149 247 249 249 47 156 233 25 95 163 57 153 221 239 245 247 41 155 197 137 191 216 57 143 189 142 175 203 3 61 138 255 255 254 255 255 255 33 249 4 0 0 0 0 0 44 0 0 0 0 55 0 55 0 0 6 255 192 159 112 72 44 26 143 72 162 47 201 108 58 159 66 16 71 197 89 66 175 78 235 143 115 233 96 92 11 3 5 51 137 97 207 69 223 210 167 74 44 22 174 198 200 98 25 237 54 25 53 26 107 245 93 48 11 57 58 22 56 69 52 35 6 23 123 66 122 76 107 23 13 6 130 32 67 106 107 66 45 5 10 123 141 62 10 49 32 7 116 116 42 49 7 128 11 29 102 63 90 70 22 20 52 124 68 42 35 9 13 13 44 185 57 187 188 17 57 0 133 140 73 7 33 193 80 75 52 22 58 185 13 36 206 207 26 30 30 21 12 47 47 21 21 58 7 107 173 67 42 33 171 89 66 7 9 44 205 4 232 232 0 16 236 16 26 50 240 214 3 17 1 13 42 73 22 154 89 75 49 203 13 0 4 30 60 32 0 96 93 59 119 239 172 89 99 48 192 65 0 23 45 98 117 155 208 226 201 18 14 229 72 8 20 8 128 132 7 18 7 53 36 84 200 160 228 128 121 120 14 24 41 33 66 28 136 91 1 5 18 32 129 107 142 6 118 34 227 189 40 201 243 164 131 255 8 98 238 13 161 145 129 146 163 31 42 96 110 4 128 107 16 0 105 34 223 201 88 216 243 100 195 159 1 40 168 228 39 98 83 19 28 74 7 146 216 209 64 20 54 15 81 167 238 228 201 208 167 131 183 88 67 112 96 117 37 5 139 152 76 119 36 0 113 33 71 5 180 82 215 86 117 11 247 173 0 3 45 20 116 75 114 97 7 0 142 13 118 160 248 209 55 7 96 25 12 34 104 214 236 192 234 213 194 112 35 108 152 236 149 137 130 12 13 2 146 96 81 192 194 143 17 129 0 103 198 48 226 194 133 9 58 118 68 0 205 91 192 225 16 138 23 23 17 225 120 230 142 2 115 47 196 22 201 96 199 136 88 68 64 36 224 92 88 128 97 7 2 16 24 152 64 55 73 140 2 169 199 182 48 163 220 178 200 23 46 92 179 178 52 100 68 0 222 216 125 251 54 0 46 201 18 11 11 156 45 104 81 232 192 242 119 17 140 208 157 48 66 208 128 193 110 213 201 231 27 2 54 184 38 220 18 41 232 181 67 68 63 128 176 195 2 21 228 196 128 11 148 60 248 255 195 4 1 88 23 159 130 11 26 80 194 128 149 168 145 1 11 199 197 224 73 6 24 230 244 194 0 24 56 1 2 2 187 89 71 98 118 2 4 144 199 17 75 124 179 64 1 42 253 192 67 32 129 189 224 64 2 42 28 224 228 147 80 58 233 2 2 35 202 135 128 149 33 116 152 198 15 22 204 64 129 122 175 88 166 19 67 14 184 64 193 153 98 80 32 70 154 1 4 112 229 142 8 188 41 192 151 40 210 149 194 9 147 85 72 1 134 106 245 132 85 155 128 6 218 166 156 11 102 23 167 0 55 220 176 29 144 63 180 16 194 122 45 44 192 64 159 38 17 6 23 137 132 22 26 231 166 53 220 64 193 100 221 168 33 130 80 22 72 82 141 96 86 193 151 32 166 155 110 42 64 13 31 184 112 98 43 106 120 229 195 119 146 162 106 169 170 85 46 216 170 171 55 196 202 67 157 140 44 193 195 6 57 176 149 234 91 244 8 234 236 179 206 34 74 193 176 194 177 66 67 8 1 12 80 41 97 17 220 208 193 183 38 132 43 238 184 228 150 219 65 10 35 240 96 255 65 35 70 248 112 108 4 219 130 22 64 141 139 32 81 237 22 54 44 224 217 103 161 185 224 98 168 149 92 193 174 17 41 108 16 193 178 188 69 160 85 19 32 100 224 240 195 16 103 144 192 196 60 128 48 240 16 56 132 96 0 194 188 33 16 128 128 30 150 112 194 6 36 151 188 129 1 15 237 192 98 98 139 45 33 242 193 252 246 246 208 92 125 84 130 131 154 110 186 250 234 7 18 20 212 128 34 15 22 176 1 175 215 101 23 192 14 66 21 113 218 6 58 119 6 107 207 4 37 96 140 17 28 80 240 94 103 189 85 169 157 11 40 28 16 3 13 52 240 37 116 206 214 213 96 54 207 0 61 208 129 34 73 148 96 48 179 34 22 173 96 156 1 24 96 3 5 33 132 96 3 201 110 250 230 128 217 79 167 13 64 7 138 33 161 64 8 6 71 224 2 6 6 228 184 163 149 30 215 109 0 202 100 191 122 54 218 1 17 144 192 86 72 168 96 67 0 244 180 160 130 213 58 62 110 232 175 58 3 254 1 230 2 173 221 196 4 27 128 190 65 75 23 124 158 255 233 233 168 31 106 249 217 18 144 144 182 218 35 20 222 118 236 17 216 96 148 5 54 24 64 232 149 185 203 249 55 172 60 67 221 186 14 79 180 96 176 1 121 232 97 1 226 100 55 255 230 243 208 75 63 80 2 19 208 48 106 19 25 196 190 1 119 75 108 242 77 242 57 163 46 159 234 209 3 132 142 14 29 184 70 3 12 43 160 31 187 1 73 211 131 15 80 48 131 19 160 172 85 243 187 28 207 124 71 16 18 36 64 7 193 240 193 249 152 128 129 216 81 192 40 1 171 16 10 66 48 50 229 197 233 6 10 148 128 8 157 33 1 242 221 227 98 76 72 95 155 48 152 34 33 40 96 2 14 115 129 24 250 150 168 68 221 34 1 29 152 192 92 214 131 5 19 252 111 43 247 82 128 9 102 144 129 9 148 128 7 45 104 129 9 82 48 1 11 128 0 58 245 178 192 255 10 32 140 110 168 32 3 51 8 193 5 74 83 39 246 44 226 90 234 107 193 54 134 162 2 24 206 96 6 137 97 84 189 142 80 53 245 217 32 4 14 43 192 12 122 208 131 19 240 49 192 12 40 92 99 187 150 112 0 161 145 236 4 116 236 1 17 39 96 20 47 234 209 62 122 80 0 10 50 80 128 70 182 0 5 59 36 214 33 155 192 69 90 221 107 146 69 8 2 0 59) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKDemoLibrary <category>uploaded</category>
operaIco | xxxCache | xxxCache := #(nil) beMutable. (xxxCache at: 1) isNil ifTrue: [ xxxCache at: 1 put: #(0 0 1 0 2 0 16 16 0 0 1 0 8 0 104 5 0 0 38 0 0 0 32 32 0 0 1 0 8 0 168 8 0 0 142 5 0 0 40 0 0 0 16 0 0 0 32 0 0 0 1 0 8 0 0 0 0 0 64 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 123 123 123 0 41 39 99 0 31 29 147 0 148 150 240 0 117 118 222 0 71 79 195 0 41 40 183 0 26 24 175 0 25 23 178 0 33 31 137 0 29 27 157 0 79 79 205 0 154 157 238 0 190 193 248 0 130 131 231 0 68 67 199 0 41 39 174 0 59 58 206 0 90 90 229 0 122 123 246 0 63 62 216 0 60 59 213 0 51 50 204 0 35 34 154 0 38 37 191 0 55 57 130 0 60 64 139 0 27 25 179 0 96 111 215 0 172 178 241 0 95 107 217 0 74 76 221 0 48 47 190 0 97 101 215 0 153 161 236 0 155 156 252 0 98 98 233 0 113 118 241 0 103 110 237 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 1 1 1 2 11 9 9 9 23 254 254 254 254 254 1 1 1 1 2 11 23 254 254 2 6 32 254 254 254 1 1 1 1 2 11 23 254 254 254 1 27 31 37 254 1 1 1 1 254 10 9 22 254 254 1 1 26 30 36 254 1 1 1 254 2 9 9 21 254 1 1 1 2 29 35 39 1 1 254 254 2 8 9 21 1 1 1 254 2 6 34 38 254 1 1 1 2 7 16 21 1 254 254 254 2 9 33 37 254 254 254 254 2 6 15 20 254 254 254 254 2 9 9 22 254 254 254 254 2 5 14 20 254 254 254 254 2 9 9 22 254 254 254 254 2 4 13 20 254 254 254 254 2 9 9 22 254 254 254 254 254 3 12 19 254 254 254 254 2 9 22 254 254 254 254 254 254 2 11 18 254 254 254 254 2 28 21 254 254 254 254 254 254 254 2 17 22 254 254 2 11 22 254 254 254 254 254 254 254 254 254 2 24 25 9 9 22 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 255 255 0 0 240 7 0 0 192 99 0 0 128 225 0 0 8 193 0 0 16 128 0 0 48 16 0 0 128 112 0 0 240 240 0 0 240 240 0 0 240 240 0 0 248 241 0 0 248 241 0 0 252 99 0 0 254 7 0 0 255 255 0 0 40 0 0 0 32 0 0 0 64 0 0 0 1 0 8 0 0 0 0 0 128 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 123 123 123 0 45 49 125 0 44 54 174 0 34 35 166 0 29 28 163 0 23 24 153 0 20 20 142 0 18 17 133 0 13 13 124 0 16 16 100 0 23 21 83 0 34 28 68 0 85 74 74 0 35 35 116 0 113 118 194 0 182 185 239 0 134 153 255 0 77 102 249 0 56 62 237 0 46 43 216 0 36 34 202 0 27 27 187 0 25 23 187 0 24 22 180 0 21 20 172 0 14 14 145 0 11 11 110 0 25 22 67 0 30 27 102 0 38 46 182 0 79 103 247 0 156 171 255 0 213 214 255 0 161 173 250 0 82 110 254 0 46 43 212 0 37 36 198 0 29 29 179 0 15 15 153 0 13 13 85 0 98 86 84 0 29 27 113 0 37 35 188 0 53 56 226 0 63 82 244 0 96 123 252 0 180 188 254 0 198 202 254 0 105 130 254 0 60 74 244 0 21 19 179 0 34 27 59 0 33 31 194 0 41 40 204 0 51 59 225 0 69 94 246 0 130 149 253 0 204 207 253 0 143 160 254 0 64 84 246 0 37 35 102 0 24 23 172 0 38 37 209 0 46 49 222 0 17 14 174 0 13 11 171 0 15 14 74 0 90 79 77 0 22 20 164 0 43 43 198 0 81 83 216 0 120 131 233 0 164 166 235 0 155 161 235 0 149 151 240 0 144 145 236 0 140 143 234 0 140 142 230 0 131 134 229 0 102 104 216 0 62 62 196 0 37 35 183 0 19 18 146 0 111 102 102 0 51 51 188 0 107 109 214 0 207 208 240 0 217 218 242 0 210 212 241 0 202 202 231 0 186 185 212 0 174 170 187 0 171 165 182 0 179 175 189 0 196 195 220 0 199 200 242 0 176 178 240 0 18 14 76 0 104 94 94 0 63 68 181 0 12 11 116 0 94 84 85 0 25 26 126 0 66 66 203 0 83 74 82 0 30 30 199 0 20 19 157 0 20 18 59 0 34 30 82 0 62 62 201 0 11 10 59 0 113 107 122 0 76 68 89 0 64 74 230 0 87 80 95 0 82 100 239 0 26 23 105 0 28 27 145 0 102 100 202 0 51 50 198 0 17 14 176 0 13 12 104 0 28 27 87 0 30 29 92 0 30 27 140 0 44 43 126 0 50 50 120 0 27 34 145 0 38 42 184 0 49 47 221 0 130 136 232 0 54 71 210 0 99 114 217 0 157 159 223 0 112 133 247 0 69 93 253 0 71 74 200 0 41 39 206 0 91 119 254 0 147 161 253 0 85 112 255 0 98 115 241 0 137 139 189 0 67 66 194 0 173 178 217 0 50 55 224 0 57 66 235 0 139 156 255 0 78 77 194 0 46 48 225 0 59 72 240 0 128 148 245 0 194 196 233 0 216 215 233 0 187 187 231 0 125 124 211 0 80 78 195 0 43 41 183 0 42 40 190 0 65 63 209 0 93 93 220 0 175 179 233 0 211 212 237 0 207 209 236 0 162 162 224 0 190 190 235 0 184 183 230 0 203 205 237 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 0 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 84 99 102 105 109 109 113 115 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 1 1 1 68 52 98 101 26 107 69 69 107 118 126 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 1 1 1 41 52 67 83 51 22 104 71 110 82 22 37 36 137 143 254 254 254 254 254 254 254 254 254 254 254 254 1 1 1 1 41 52 27 51 23 51 86 73 254 254 112 29 38 130 19 142 145 254 254 254 254 254 254 254 254 254 1 1 1 1 1 1 12 27 23 38 65 81 73 254 254 254 254 102 117 20 50 141 34 95 254 254 254 254 254 254 254 1 1 1 1 1 1 13 40 51 38 51 25 79 73 254 254 254 1 1 12 129 136 49 47 89 154 254 254 254 254 254 1 1 1 1 1 1 1 28 39 22 24 25 82 97 254 254 254 1 1 1 13 128 35 140 33 48 153 164 254 254 254 1 1 1 1 1 1 1 13 27 23 24 24 65 81 96 254 254 1 1 1 1 102 42 135 48 48 148 152 163 254 254 1 1 1 1 1 1 1 1 12 26 23 24 24 66 80 95 254 1 1 1 1 1 1 14 74 33 140 46 18 162 168 254 1 1 1 1 1 1 1 254 11 25 38 24 24 66 79 91 1 1 1 1 1 1 1 127 134 32 139 136 151 79 163 254 1 1 1 1 1 1 254 254 10 24 24 24 51 65 78 94 1 1 1 1 1 1 1 126 133 139 45 147 150 161 163 254 1 1 1 1 1 1 254 254 9 23 24 24 51 25 77 92 1 1 1 1 1 1 254 125 132 50 55 146 63 160 168 254 254 1 1 1 1 1 1 254 8 22 38 38 24 51 77 93 1 1 1 1 254 254 254 83 129 130 36 138 37 120 166 254 254 254 254 1 1 1 1 1 7 22 22 22 22 22 76 92 1 1 254 254 254 254 254 124 5 138 37 37 22 159 167 254 254 254 254 254 254 254 1 1 6 21 37 37 37 37 75 91 254 254 254 254 254 254 254 7 83 53 22 22 24 82 167 254 254 254 254 254 254 254 254 254 5 20 36 36 20 64 75 90 254 254 254 254 254 254 254 123 83 22 38 38 51 82 155 254 254 254 254 254 254 254 254 254 4 19 19 50 60 35 74 89 254 254 254 254 254 254 254 8 83 22 38 38 51 158 153 254 254 254 254 254 254 254 254 254 3 18 35 49 59 47 16 89 254 254 254 254 254 254 254 123 83 38 24 24 25 85 166 254 254 254 254 254 254 254 254 254 2 17 34 48 58 34 73 89 254 254 254 254 254 254 254 11 83 38 24 24 65 157 165 254 254 254 254 254 254 254 254 254 254 16 33 47 57 18 72 88 254 254 254 254 254 254 254 11 107 38 24 24 51 156 254 254 254 254 254 254 254 254 254 254 254 15 32 46 56 55 71 87 254 254 254 254 254 254 254 40 69 38 24 51 82 155 254 254 254 254 254 254 254 254 254 254 254 14 31 45 55 63 70 73 254 254 254 254 254 254 254 122 24 38 24 66 149 119 254 254 254 254 254 254 254 254 254 254 254 254 30 44 54 53 22 86 254 254 254 254 254 254 254 9 38 24 51 24 134 254 254 254 254 254 254 254 254 254 254 254 254 254 29 43 53 22 51 85 254 254 254 254 254 254 67 107 22 24 66 119 119 254 254 254 254 254 254 254 254 254 254 254 254 254 254 42 38 38 24 24 100 254 254 254 254 28 27 24 24 66 144 119 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 42 62 38 24 62 103 108 108 111 27 25 121 66 110 119 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 61 69 24 24 25 107 83 69 24 22 120 131 119 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 61 25 37 106 36 63 114 116 119 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 254 255 255 255 255 255 255 255 255 255 254 1 255 255 224 0 127 255 128 0 31 254 0 24 15 248 0 60 7 240 0 56 3 224 0 112 1 192 0 96 1 128 0 64 0 128 128 0 0 129 128 0 0 129 128 1 0 192 128 7 0 240 0 31 0 254 0 127 0 255 128 127 0 255 128 127 0 255 128 127 0 255 128 127 0 255 192 127 1 255 192 127 1 255 192 127 1 255 224 127 3 255 224 126 3 255 240 60 7 255 248 0 15 255 252 0 31 255 255 0 127 255 255 255 255 255 255 255 255) asByteArray ]. ^ xxxCache at: 1
</methods> <methods> Seaside.PKLabelDemo <category>accessing</category>
resources ^ WAUrl new addToPath: WADispatcher default basePath , '/files/PKDemoLibrary/'; yourself
</methods> <methods> Seaside.PKLabelDemo <category>accessing</category>
data ^OrderedCollection new add: (Array with: 0 with: 0); add: (Array with: 1 with: 2); add: (Array with: 2 with: 3); add: (Array with: 3 with: 7); add: (Array with: 4 with: 8); add: (Array with: 5 with: 6); yourself
</methods> <methods> Seaside.PKLabelDemo <category>accessing</category>
labels ^ Dictionary new at: 0 put: (PKLabelImage new url: (PKDemoLibrary / #konquerorPng); title: 'Konqueror'; width: 16; height: 16; yourself); at: 1 put: (PKLabelImage new url: (PKDemoLibrary / #operaIco); title: 'Opera'; width: 16; height: 16; yourself); at: 2 put: (PKLabelImage new url: (PKDemoLibrary / #msieGif); title: 'Internet Explorer'; width: 16; height: 16; yourself); at: 3 put: (PKLabelImage new url: (PKDemoLibrary / #safariGif); title: 'Safari'; width: 16; height: 16; yourself); at: 4 put: (PKLabelImage new url: (PKDemoLibrary urlOf: #firefoxPng); title: 'Firefox'; width: 16; height: 16; yourself); at: 5 put: (PKLabelImage new url: (PKDemoLibrary / #mozillaIco); title: 'Mozilla'; width: 16; height: 16; yourself); yourself
</methods> <methods> Seaside.PKLabelDemo <category>private</category>
buildChart | pieChart dataset | pieChart := PKChart newBarChart. pieChart width: 400; height: 400. dataset := PKDataset new name: 'browser_stats'; yourself. self data do: [ :each | dataset addCollection: each ]. pieChart layoutOptions xTicks: self labels. pieChart layout addDataset: dataset. pieChart renderer: PKSweetCanvasRenderer new. ^pieChart
</methods> <methods> Seaside.PKLabelDemo <category>accessing</category>
chart chart isNil ifTrue: [ chart := self buildChart ]. ^chart
</methods> <methods> Seaside.PKLabelDemo <category>accessing</category>
children ^Array with: self chart
</methods> <methods> Seaside.PKLabelImage <category>initialize-release</category>
initialize properties := Dictionary new
</methods> <methods> Seaside.PKLabelImage <category>accessing</category>
height: anInteger properties at: 'height' put: anInteger
</methods> <methods> Seaside.PKLabelImage <category>accessing</category>
url: aString properties at: 'src' put: aString
</methods> <methods> Seaside.PKLabelImage <category>converting</category>
javascriptOn: aStream aStream nextPutAll: 'IMG('. properties javascriptOn: aStream. aStream nextPutAll: ')'.
</methods> <methods> Seaside.PKLabelImage <category>accessing</category>
width: anInteger properties at: 'width' put: anInteger
</methods> <methods> Seaside.PKLabelImage <category>accessing</category>
title: aString "will show up as a tooltip" properties at: 'title' put: aString. properties at: 'alt' put: aString
</methods> <methods> Seaside.PKLayout <category>accessing</category>
datasets: aCollection datasets := aCollection
</methods> <methods> Seaside.PKLayout <category>accessing</category>
datasets ^datasets
</methods> <methods> Seaside.PKLayout <category>accessing</category>
style self subclassResponsibility
</methods> <methods> Seaside.PKLayout <category>initialize-release</category>
initialize self datasets: OrderedCollection new
</methods> <methods> Seaside.PKLayout <category>accessing</category>
options ^options
</methods> <methods> Seaside.PKLayout <category>accessing</category>
options: anObject options := anObject
</methods> <methods> Seaside.PKLayout <category>adding</category>
addDataset: aDataset ^self datasets add: aDataset
</methods> <methods> Seaside.PKLayoutOptions <category>accessing-properties</category>
xTicks: aDictionary "X values at which ticks should be drawn. Automatically calculated if not defined using the parameters `xNumberOfTicks:` and `xTickPrecision:` the dictionary mapps values (numbers) to labels (strings) default: nil labels don't necessarily need to be strings, any object that has a meaningful JavaScript representation will do, if you want to have an image you can use PKLabelImage but you can use you own class that creates some other html elements" self propertyAt: 'xTicks' put: (self asTicks: aDictionary)
</methods> <methods> Seaside.PKLayoutOptions <category>private</category>
asTicks: aDictionary ^Array streamContents: [ :stream | aDictionary keysAndValuesDo: [ :key :value | stream nextPut: (Dictionary new at: 'v' put: key; at: 'label' put: value; yourself) ] ]
</methods> <methods> Seaside.PKLineLayout <category>initialize-release</category>
initialize super initialize. self options: PKBarAndLineOptions new
</methods> <methods> Seaside.PKLineLayout <category>accessing</category>
style ^'line'
</methods> <methods> Seaside.PKMochikitColor <category>accessing</category>
squeakColor ^squeakColor
</methods> <methods> Seaside.PKMochikitColor <category>converting</category>
javascriptOn: aStream self squeakColor mochikitOn: aStream
</methods> <methods> Seaside.PKMochikitColor <category>accessing</category>
squeakColor: aColor squeakColor := aColor
</methods> <methods> Seaside.PKNegativeBarDemo <category>accessing</category>
children ^Array with: self chart
</methods> <methods> Seaside.PKNegativeBarDemo <category>accessing</category>
chart chart isNil ifTrue: [ chart := PKChart newBarChart. chart width: 300; height: 300. chart layout addDataset: (PKDataset new name: 'base'; addAll: #(10 -10 20 -5 15); yourself). chart renderer: PKCanvasRenderer new. chart rendererOptions paddingLeft: 0 right: 0 top: 10 bottom: 30; shouldFill: false; shouldStroke: true; strokeWidth: 1.0; strokeColor: Color red. "chart layoutOptions yOriginIsZero: false" chart layoutOptions yAxisMin: -15 max: 25 ]. ^chart
</methods> <methods> Seaside.PKOfficeColors <category>accessing</category>
function: aString function := aString
</methods> <methods> Seaside.PKOfficeColors <category>accessing</category>
function ^function
</methods> <methods> Seaside.PKOfficeColors <category>converting</category>
javascriptOn: aStream aStream nextPutAll: self function
</methods> <methods> Seaside.PKOptions <category>private</category>
propertyAt: aString ^properties at: aString
</methods> <methods> Seaside.PKOptions <category>converting</category>
initialize properties := Dictionary new
</methods> <methods> Seaside.PKOptions <category>private</category>
propertyAt: aString put: anObject ^properties at: aString put: anObject
</methods> <methods> Seaside.PKOptions <category>converting</category>
javascriptOn: aStream | convertedProperties | convertedProperties := Dictionary new. properties keysAndValuesDo: [ :key :value | convertedProperties at: key put: (value isColor ifTrue: [ value asMochikitColor ] ifFalse: [ (((value isCollection and: [ value isString not ]) and: [ value notEmpty ]) and: [ value anyOne isColor ]) ifTrue: [ value collect: [ :each | each asMochikitColor ] ] ifFalse: [ value ] ]) ]. convertedProperties javascriptOn: aStream
</methods> <methods> Seaside.PKPieLayout <category>initialize-release</category>
initialize super initialize. self options: PKPieOptions new
</methods> <methods> Seaside.PKPieLayout <category>accessing</category>
style ^'pie'
</methods> <methods> Seaside.PKPieOptions <category>accessing-properties</category>
pieRadius: aFloat "Radius of the circle to be drawn. default: 0.4 the virtual canvas has the dimension of 1.0 x 1.0" self propertyAt: 'pieRadius' put: aFloat
</methods> <methods> Seaside.PKPredefinedColorScheme <category>converting</category>
javascriptOn: aStream aStream nextPutAll: 'PlotKit.Base.'; nextPutAll: self function
</methods> <methods> Seaside.PKPredefinedSingleHueColorScheme <category>accessing</category>
index: aZeroBasedInteger index := aZeroBasedInteger
</methods> <methods> Seaside.PKPredefinedSingleHueColorScheme <category>initialize-release</category>
initialize super initialize. self index: 0.
</methods> <methods> Seaside.PKPredefinedSingleHueColorScheme <category>converting</category>
javascriptOn: aStream aStream nextPutAll: 'PlotKit.Base.palette(PlotKit.Base.'; nextPutAll: self function; nextPut: $[; nextPutAll: self index displayString; nextPutAll: '])'
</methods> <methods> Seaside.PKPredefinedSingleHueColorScheme <category>accessing</category>
index ^index
</methods> <methods> Seaside.PKRenderer <category>initialize-release</category>
initialize options := PKRendererOptions new
</methods> <methods> Seaside.PKRenderer <category>converting</category>
javascriptOn: aStream aStream nextPutAll: 'new PlotKit.'; nextPutAll: (self class name allButFirst: 2)
</methods> <methods> Seaside.PKRenderer <category>accessing</category>
options ^options
</methods> <methods> Seaside.PKRendererOptions <category>initialize-release</category>
initialize super initialize. self officeColors: Dictionary new
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
drawXAxis: aBoolean "draw X Axis default: true" self propertyAt: 'drawXAxis' put: aBoolean
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
strokeWidth: aFloat "Width of stroke used (if shouldStroke is set) default: 0.1" self propertyAt: 'strokeWidth' put: aFloat
</methods> <methods> Seaside.PKRendererOptions <category>converting</category>
javascriptOn: aStream aStream nextPutAll: 'MochiKit.Base.update('. self officeColors javascriptOn: aStream. aStream nextPutAll: ', '. super javascriptOn: aStream. aStream nextPutAll: ')'
</methods> <methods> Seaside.PKRendererOptions <category>accessing</category>
officeColors: anObject officeColors := anObject
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
strokeColor: aColor "Color used stroking. If set to null, the renderer will attempt to use strokeColorTransform default: nil" self propertyAt: 'strokeColor' put: aColor
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
backgroundColor: aColor "color to use for background default: Color white" self propertyAt: 'backgroundColor' put: aColor
</methods> <methods> Seaside.PKRendererOptions <category>accessing</category>
officeColors ^officeColors
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
drawBackground: aBoolean "Whether the background should be drawn default: true" self propertyAt: 'drawBackground' put: aBoolean
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
enableEvents: aBoolean "Enable events (if supported) default: true" self propertyAt: 'enableEvents' put: aBoolean
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisLabelColor: aColor "color of text label on axis. default: Color black" self propertyAt: 'axisLabelColor' put: aColor
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisTickSize: aFloat "length or height of a tick on the y and x axis respectively, in pixels default: 3.0" self propertyAt: 'axisTickSize' put: aFloat
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
shouldStroke: aBoolean "Should stroke the borders of shapes in chart default: true" self propertyAt: 'shouldStroke' put: aBoolean
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
strokeColorTransform: aString "Name of the method to call to transform Color into stroke color. default: 'asStrokeColor'" self propertyAt: 'strokeColorTransform' put: aString
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
shouldFill: aBoolean "Should fill in area under chart default: true" self propertyAt: 'shouldFill' put: aBoolean
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisLabelFontSize: anInteger "Font size of labels in pixels default: 9" self propertyAt: 'axisLabelFontSize' put: anInteger
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisLineColor: aColor "Color of axes line. default: Color black" self propertyAt: 'axisLineColor' put: aColor
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
paddingLeft: aLeftInteger right: aRightInteger top: aTopInteger bottom: aBottomInteger " Padding of the graph drawn (excluding labels) default: {left: 30, right:20, top: 10, bottom: 10}" self propertyAt: 'padding' put: (Dictionary new at: 'left' put: aLeftInteger; at: 'right' put: aRightInteger; at: 'top' put: aTopInteger; at: 'bottom' put: aBottomInteger; yourself)
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
colorScheme: aColorSchemeOrAnArrayOfColors "Color scheme used default: output of PlotKit.Base.colorScheme()" self propertyAt: 'colorScheme' put: aColorSchemeOrAnArrayOfColors
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisLabelWidth: anInteger "Width of labels on ticks, in pixels default: 50" self propertyAt: 'axisLabelWidth' put: anInteger
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
axisLineWidth: aFloat "axis line width default: 0.5" self propertyAt: 'axisLineWidth' put: aFloat
</methods> <methods> Seaside.PKRendererOptions <category>accessing-properties</category>
drawYAxis: aBoolean "draw Y Axis default: true" self propertyAt: 'drawYAxis' put: aBoolean
</methods> <methods> Seaside.PKScriptLibrary <category>accessing</category>
plotKitJs ^'/*** PlotKit.PlotKit 0.9.1 : PACKED VERSION THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please diff against the source tree, not this file. For more information, <http://www.liquidx.net/plotkit/>. Copyright (c) 2006. Alastair Tse. ***/ try{ if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"||typeof (MochiKit.Format)=="undefined"){ throw ""; } } catch(e){ throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}"; } MochiKit.Base.update(MochiKit.Color.Color.prototype,{asFillColor:function(){ return this.lighterColorWithLevel(0.3); },asStrokeColor:function(){ return this.darkerColorWithLevel(0.1); },asPointColor:function(){ return this.lighterColorWithLevel(0.1); }}); if(typeof (PlotKit)=="undefined"){ PlotKit={}; } PlotKit.NAME="PlotKit"; PlotKit.VERSION="0.8"; PlotKit.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.toString=function(){ return this.__repr__(); }; if(typeof (PlotKit.Base)=="undefined"){ PlotKit.Base={}; } PlotKit.Base.NAME="PlotKit.Base"; PlotKit.Base.VERSION=PlotKit.VERSION; PlotKit.Base.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.Base.toString=function(){ return this.__repr__(); }; PlotKit.Base.usingPrototype=function(){ try{ return (typeof (Object.extend)=="function"); } catch(e){ return false; } }; MochiKit.Base.update(PlotKit.Base,{roundInterval:function(_1,_2,_3){ var _4=MochiKit.Format.roundToFixed; var _5=_1/_2; return parseFloat(_4(_5,_3)); },collapse:function(_6){ var m=MochiKit.Base; var _8=new Array(); for(var i=0;i<_6.length;i++){ _8=m.concat(_8,_6[i]); } if(PlotKit.Base.usingPrototype()){ delete _8.extend; delete _8.from; delete _8.inspect; } return _8; },uniq:function(_10){ var m=MochiKit.Base; if(!m.isArrayLike(_10)||(_10.length<1)){ return new Array(); } var _11=new Array(); var _12=_10[0]; _11.push(_10[0]); for(var i=1;i<_10.length;i++){ if(m.compare(_10[i],_12)!=0){ _12=_10[i]; _11.push(_10[i]); } } return _11; },colorScheme:function(){ var mb=MochiKit.Base; var mc=MochiKit.Color; var _15=["red","orange","yellow","green","cyan","blue","purple","magenta"]; var _16=function(_17){ return mc.Color[_17+"Color"](); }; return mb.map(_16,_15); },baseDarkPrimaryColors:function(){ var _18=MochiKit.Color.Color.fromHexString; return [_18("#ad3f40"),_18("#ddac2c"),_18("#dfdd0c"),_18("#5276c4"),_18("#739c5a")]; },basePrimaryColors:function(){ var _19=MochiKit.Color.Color.fromHexString; return [_19("#d24c4d"),_19("#f2b32f"),_19("#ece90e"),_19("#5d83da"),_19("#78a15d")]; },baseBlueColors:function(){ var _20=MochiKit.Color.Color.fromHexString; return [_20("#4b6b94"),_20("#5d81b4"),_20("#acbad2")]; },palette:function(_21,_22,_23,_24){ var _25=MochiKit.Base.isUndefinedOrNull; var _26=new Array(); if(_25(_24)){ _24=0.1; } if(_25(_23)){ _23=0.4; } if(_25(_22)){ _22=-0.2; } var _27=_22; while(_27<=_23){ _26.push(_27); _27+=_24; } var _28=function(_29,_30){ return _29.lighterColorWithLevel(_30); }; return MochiKit.Base.map(partial(_28,_21),_26); },excanvasSupported:function(){ if(/MSIE/.test(navigator.userAgent)&&!window.opera){ return true; } return false; },findPosX:function(obj){ var _32=0; if(obj.offsetParent){ while(obj.offsetParent){ _32+=obj.offsetLeft; obj=obj.offsetParent; } }else{ if(obj.x){ _32+=obj.x; } } return _32; },findPosY:function(obj){ var _33=0; if(obj.offsetParent){ while(obj.offsetParent){ _33+=obj.offsetTop; obj=obj.offsetParent; } }else{ if(obj.y){ _33+=obj.y; } } return _33; },isFuncLike:function(obj){ return (typeof (obj)=="function"); }}); PlotKit.Base.map=function(fn,lst){ if(PlotKit.Base.usingPrototype()){ var _36=[]; for(var x in lst){ if(typeof (lst[x])=="function"){ continue; } _36.push(fn(lst[x])); } return _36; }else{ return MochiKit.Base.map(fn,lst); } }; PlotKit.Base.items=function(lst){ if(PlotKit.Base.usingPrototype()){ var _38=[]; for(var x in lst){ if(typeof (lst[x])=="function"){ continue; } _38.push([x,lst[x]]); } return _38; }else{ return MochiKit.Base.items(lst); } }; PlotKit.Base.keys=function(lst){ if(PlotKit.Base.usingPrototype()){ var _39=[]; for(var x in lst){ if(typeof (lst[x])=="function"){ continue; } _39.push(x); } return _39; }else{ return MochiKit.Base.keys(lst); } }; PlotKit.Base.baseColors=function(){ var _40=MochiKit.Color.Color.fromHexString; return [_40("#476fb2"),_40("#be2c2b"),_40("#85b730"),_40("#734a99"),_40("#26a1c5"),_40("#fb8707"),_40("#000000")]; }; PlotKit.Base.officeBaseStyle={"axisLineWidth":2,"axisLabelColor":Color.grayColor(),"axisLineColor":Color.whiteColor(),"padding":{top:5,bottom:10,left:30,right:30}}; MochiKit.Base.update(PlotKit.Base,{officeBlue:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"backgroundColor":PlotKit.Base.baseColors()[0].lighterColorWithLevel(0.45)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officeRed:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),"backgroundColor":PlotKit.Base.baseColors()[1].lighterColorWithLevel(0.5)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officeGreen:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[2]),"backgroundColor":PlotKit.Base.baseColors()[2].lighterColorWithLevel(0.5)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officePurple:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[3]),"backgroundColor":PlotKit.Base.baseColors()[3].lighterColorWithLevel(0.5)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officeCyan:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[4]),"backgroundColor":PlotKit.Base.baseColors()[4].lighterColorWithLevel(0.5)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officeOrange:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[5]),"backgroundColor":PlotKit.Base.baseColors()[5].lighterColorWithLevel(0.4)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; },officeBlack:function(){ var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[6],0,0.6),"backgroundColor":PlotKit.Base.baseColors()[6].lighterColorWithLevel(0.9)}; MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); return r; }}); PlotKit.Base.EXPORT=["baseColors","collapse","colorScheme","findPosX","findPosY","officeBaseStyle","officeBlue","officeRed","officeGreen","officePurple","officeCyan","officeOrange","officeBlack","roundInterval","uniq","isFuncLike","excanvasSupported"]; PlotKit.Base.EXPORT_OK=[]; PlotKit.Base.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.Base.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.Base); try{ if(typeof (PlotKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Base"; } if(typeof (PlotKit.Layout)=="undefined"){ PlotKit.Layout={}; } PlotKit.Layout.NAME="PlotKit.Layout"; PlotKit.Layout.VERSION=PlotKit.VERSION; PlotKit.Layout.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.Layout.toString=function(){ return this.__repr__(); }; PlotKit.Layout.valid_styles=["bar","line","pie","point"]; PlotKit.Layout=function(_42,_43){ this.options={"barWidthFillFraction":0.75,"barOrientation":"vertical","xOriginIsZero":true,"yOriginIsZero":true,"xAxis":null,"yAxis":null,"xTicks":null,"yTicks":null,"xNumberOfTicks":10,"yNumberOfTicks":5,"xTickPrecision":1,"yTickPrecision":1,"pieRadius":0.4}; this.style=_42; MochiKit.Base.update(this.options,_43?_43:{}); if(!MochiKit.Base.isUndefinedOrNull(this.options.xAxis)){ this.minxval=this.options.xAxis[0]; this.maxxval=this.options.xAxis[1]; this.xscale=this.maxxval-this.minxval; }else{ this.minxval=0; this.maxxval=null; this.xscale=null; } if(!MochiKit.Base.isUndefinedOrNull(this.options.yAxis)){ this.minyval=this.options.yAxis[0]; this.maxyval=this.options.yAxis[1]; this.yscale=this.maxyval-this.minyval; }else{ this.minyval=0; this.maxyval=null; this.yscale=null; } this.bars=new Array(); this.points=new Array(); this.slices=new Array(); this.xticks=new Array(); this.yticks=new Array(); this.datasets=new Array(); this.minxdelta=0; this.xrange=1; this.yrange=1; this.hitTestCache={x2maxy:null}; }; PlotKit.Layout.prototype.addDataset=function(_44,_45){ this.datasets[_44]=_45; }; PlotKit.Layout.prototype.removeDataset=function(_46,_47){ delete this.datasets[_46]; }; PlotKit.Layout.prototype.addDatasetFromTable=function(_48,_49,_50,_51,_52){ var _53=MochiKit.Base.isUndefinedOrNull; var _54=MochiKit.DOM.scrapeText; var _55=MochiKit.Format.strip; if(_53(_50)){ _50=0; } if(_53(_51)){ _51=1; } if(_53(_52)){ _52=-1; } var _56=_49.tBodies[0].rows; var _57=new Array(); var _58=new Array(); if(!_53(_56)){ for(var i=0;i<_56.length;i++){ _57.push([parseFloat(_55(_54(_56[i].cells[_50]))),parseFloat(_55(_54(_56[i].cells[_51])))]); if(_52>=0){ _58.push({v:parseFloat(_55(_54(_56[i].cells[_50]))),label:_55(_54(_56[i].cells[_52]))}); } } this.addDataset(_48,_57); if(_52>=0){ this.options.xTicks=_58; } return true; } return false; }; PlotKit.Layout.prototype.evaluate=function(){ this._evaluateLimits(); this._evaluateScales(); if(this.style=="bar"){ if(this.options.barOrientation=="horizontal"){ this._evaluateHorizBarCharts(); }else{ this._evaluateBarCharts(); } this._evaluateBarTicks(); }else{ if(this.style=="line"){ this._evaluateLineCharts(); this._evaluateLineTicks(); }else{ if(this.style=="pie"){ this._evaluatePieCharts(); this._evaluatePieTicks(); } } } }; PlotKit.Layout.prototype.hitTest=function(x,y){ var f=MochiKit.Format.twoDigitFloat; if((this.style=="bar")&&this.bars&&(this.bars.length>0)){ for(var i=0;i<this.bars.length;i++){ var bar=this.bars[i]; if((x>=bar.x)&&(x<=bar.x+bar.w)&&(y>=bar.y)&&(y-bar.y<=bar.h)){ return bar; } } }else{ if(this.style=="line"){ if(this.hitTestCache.x2maxy==null){ this._regenerateHitTestCache(); } var _62=x/this.xscale; var _63=this.hitTestCache.xvalues; var _64=null; var _65=null; for(var i=1;i<_63.length;i++){ if(_63[i]>_62){ _64=_63[i-1]; _65=_63[i]; break; } } if((_64!=null)){ var _66=this.hitTestCache.x2maxy[_64]; var _67=this.hitTestCache.x2maxy[_65]; var _68=(1-y)/this.yscale; var _69=(_67-_66)/(_65-_64); var _70=_66+_69*(_62-_64); if(_70>=_68){ var obj={xval:_62,yval:_68,xafter:_65,yafter:_67,xbefore:_64,ybefore:_66,yprojected:_70}; return obj; } } }else{ if(this.style=="pie"){ var _71=Math.sqrt((y-0.5)*(y-0.5)+(x-0.5)*(x-0.5)); if(_71>this.options.pieRadius){ return null; } var _72=Math.atan2(y-0.5,x-0.5)-Math.PI/2; for(var i=0;i<this.slices.length;i++){ var _73=this.slices[i]; if(_73.startAngle<_72&&_73.endAngle>=_72){ return _73; } } } } } return null; }; PlotKit.Layout.prototype.rectForX=function(x){ return null; }; PlotKit.Layout.prototype.angleRangeForX=function(x){ return null; }; PlotKit.Layout.prototype._evaluateLimits=function(){ var map=PlotKit.Base.map; var _75=PlotKit.Base.items; var _76=MochiKit.Base.itemgetter; var _77=PlotKit.Base.collapse; var _78=MochiKit.Base.listMin; var _79=MochiKit.Base.listMax; var _80=MochiKit.Base.isUndefinedOrNull; var all=_77(map(_76(1),_75(this.datasets))); if(_80(this.options.xAxis)){ if(this.options.xOriginIsZero){ this.minxval=0; }else{ this.minxval=_78(map(parseFloat,map(_76(0),all))); } this.maxxval=_79(map(parseFloat,map(_76(0),all))); }else{ this.minxval=this.options.xAxis[0]; this.maxxval=this.options.xAxis[1]; this.xscale=this.maxval-this.minxval; } if(_80(this.options.yAxis)){ if(this.options.yOriginIsZero){ this.minyval=0; }else{ this.minyval=_78(map(parseFloat,map(_76(1),all))); } this.maxyval=_79(map(parseFloat,map(_76(1),all))); }else{ this.minyval=this.options.yAxis[0]; this.maxyval=this.options.yAxis[1]; this.yscale=this.maxyval-this.minyval; } }; PlotKit.Layout.prototype._evaluateScales=function(){ var _82=MochiKit.Base.isUndefinedOrNull; this.xrange=this.maxxval-this.minxval; if(this.xrange==0){ this.xscale=1; }else{ this.xscale=1/this.xrange; } this.yrange=this.maxyval-this.minyval; if(this.yrange==0){ this.yscale=1; }else{ this.yscale=1/this.yrange; } }; PlotKit.Layout.prototype._uniqueXValues=function(){ var _83=PlotKit.Base.collapse; var map=PlotKit.Base.map; var _84=PlotKit.Base.uniq; var _85=MochiKit.Base.itemgetter; var _86=PlotKit.Base.items; var _87=map(parseFloat,map(_85(0),_83(map(_85(1),_86(this.datasets))))); _87.sort(MochiKit.Base.compare); return _84(_87); }; PlotKit.Layout.prototype._evaluateBarCharts=function(){ var _88=PlotKit.Base.items; var _89=_88(this.datasets).length; var _90=10000000; var _91=this._uniqueXValues(); for(var i=1;i<_91.length;i++){ _90=Math.min(Math.abs(_91[i]-_91[i-1]),_90); } var _92=0; var _93=0; var _94=0; if(_91.length==1){ _90=1; this.xscale=1; this.minxval=_91[0]; _92=1*this.options.barWidthFillFraction; _93=_92/_89; _94=(1-this.options.barWidthFillFraction)/2; }else{ if(this.xrange==1){ this.xscale=0.5; }else{ if(this.xrange==2){ this.xscale=1/3; }else{ this.xscale=(1-_90/this.xrange)/this.xrange; } } _92=_90*this.xscale*this.options.barWidthFillFraction; _93=_92/_89; _94=_90*this.xscale*(1-this.options.barWidthFillFraction)/2; } this.minxdelta=_90; this.bars=new Array(); var i=0; for(var _95 in this.datasets){ var _96=this.datasets[_95]; if(PlotKit.Base.isFuncLike(_96)){ continue; } for(var j=0;j<_96.length;j++){ var _98=_96[j]; var _99={x:((parseFloat(_98[0])-this.minxval)*this.xscale)+(i*_93)+_94,y:1-((parseFloat(_98[1])-this.minyval)*this.yscale),w:_93,h:((parseFloat(_98[1])-this.minyval)*this.yscale),xval:parseFloat(_98[0]),yval:parseFloat(_98[1]),name:_95}; if((_99.x>=0)&&(_99.x<=1)&&(_99.y>=0)&&(_99.y<=1)){ this.bars.push(_99); } } i++; } }; PlotKit.Layout.prototype._evaluateHorizBarCharts=function(){ var _100=PlotKit.Base.items; var _101=_100(this.datasets).length; var _102=10000000; var _103=this._uniqueXValues(); for(var i=1;i<_103.length;i++){ _102=Math.min(Math.abs(_103[i]-_103[i-1]),_102); } var _104=0; var _105=0; var _106=0; if(_103.length==1){ _102=1; this.xscale=1; this.minxval=_103[0]; _104=1*this.options.barWidthFillFraction; _105=_104/_101; _106=(1-this.options.barWidthFillFraction)/2; }else{ this.xscale=(1-_102/this.xrange)/this.xrange; _104=_102*this.xscale*this.options.barWidthFillFraction; _105=_104/_101; _106=_102*this.xscale*(1-this.options.barWidthFillFraction)/2; } this.minxdelta=_102; this.bars=new Array(); var i=0; for(var _107 in this.datasets){ var _108=this.datasets[_107]; if(PlotKit.Base.isFuncLike(_108)){ continue; } for(var j=0;j<_108.length;j++){ var item=_108[j]; var rect={y:((parseFloat(item[0])-this.minxval)*this.xscale)+(i*_105)+_106,x:0,h:_105,w:((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_107}; if(rect.y<=0){ rect.y=0; } if(rect.y>=1){ rect.y=1; } if((rect.x>=0)&&(rect.x<=1)){ this.bars.push(rect); } } i++; } }; PlotKit.Layout.prototype._evaluateLineCharts=function(){ var _111=PlotKit.Base.items; var _112=_111(this.datasets).length; this.points=new Array(); var i=0; for(var _113 in this.datasets){ var _114=this.datasets[_113]; if(PlotKit.Base.isFuncLike(_114)){ continue; } _114.sort(function(a,b){ return compare(parseFloat(a[0]),parseFloat(b[0])); }); for(var j=0;j<_114.length;j++){ var item=_114[j]; var _117={x:((parseFloat(item[0])-this.minxval)*this.xscale),y:1-((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_113}; if(_117.y<=0){ _117.y=0; } if(_117.y>=1){ _117.y=1; } if((_117.x>=0)&&(_117.x<=1)){ this.points.push(_117); } } i++; } }; PlotKit.Layout.prototype._evaluatePieCharts=function(){ var _118=PlotKit.Base.items; var sum=MochiKit.Iter.sum; var _120=MochiKit.Base.itemgetter; var _121=_118(this.datasets).length; var _122=_118(this.datasets)[0][1]; var _123=sum(map(_120(1),_122)); this.slices=new Array(); var _124=0; for(var i=0;i<_122.length;i++){ var _125=_122[i][1]/_123; var _126=_124*Math.PI*2; var _127=(_124+_125)*Math.PI*2; var _128={fraction:_125,xval:_122[i][0],yval:_122[i][1],startAngle:_126,endAngle:_127}; if(_122[i][1]!=0){ this.slices.push(_128); } _124+=_125; } }; PlotKit.Layout.prototype._evaluateLineTicksForXAxis=function(){ var _129=MochiKit.Base.isUndefinedOrNull; if(this.options.xTicks){ this.xticks=new Array(); var _130=function(tick){ var _132=tick.label; if(_129(_132)){ _132=tick.v.toString(); } var pos=this.xscale*(tick.v-this.minxval); if((pos>=0)&&(pos<=1)){ this.xticks.push([pos,_132]); } }; MochiKit.Iter.forEach(this.options.xTicks,bind(_130,this)); }else{ if(this.options.xNumberOfTicks){ var _134=this._uniqueXValues(); var _135=this.xrange/this.options.xNumberOfTicks; var _136=0; this.xticks=new Array(); for(var i=0;i<=_134.length;i++){ if((_134[i]-this.minxval)>=(_136*_135)){ var pos=this.xscale*(_134[i]-this.minxval); if((pos>1)||(pos<0)){ continue; } this.xticks.push([pos,_134[i]]); _136++; } if(_136>this.options.xNumberOfTicks){ break; } } } } }; PlotKit.Layout.prototype._evaluateLineTicksForYAxis=function(){ var _137=MochiKit.Base.isUndefinedOrNull; if(this.options.yTicks){ this.yticks=new Array(); var _138=function(tick){ var _139=tick.label; if(_137(_139)){ _139=tick.v.toString(); } var pos=1-(this.yscale*(tick.v-this.minyval)); if((pos>=0)&&(pos<=1)){ this.yticks.push([pos,_139]); } }; MochiKit.Iter.forEach(this.options.yTicks,bind(_138,this)); }else{ if(this.options.yNumberOfTicks){ this.yticks=new Array(); var _140=PlotKit.Base.roundInterval; var prec=this.options.yTickPrecision; var _142=_140(this.yrange,this.options.yNumberOfTicks,prec); for(var i=0;i<=this.options.yNumberOfTicks;i++){ var yval=this.minyval+(i*_142); var pos=1-((yval-this.minyval)*this.yscale); if((pos>1)||(pos<0)){ continue; } this.yticks.push([pos,MochiKit.Format.roundToFixed(yval,prec)]); } } } }; PlotKit.Layout.prototype._evaluateLineTicks=function(){ this._evaluateLineTicksForXAxis(); this._evaluateLineTicksForYAxis(); }; PlotKit.Layout.prototype._evaluateBarTicks=function(){ this._evaluateLineTicks(); var _144=function(tick){ return [tick[0]+(this.minxdelta*this.xscale)/2,tick[1]]; }; this.xticks=MochiKit.Base.map(bind(_144,this),this.xticks); if(this.options.barOrientation=="horizontal"){ var _145=this.xticks; this.xticks=this.yticks; this.yticks=_145; var _146=function(tick){ return [1-tick[0],tick[1]]; }; this.xticks=MochiKit.Base.map(_146,this.xticks); } }; PlotKit.Layout.prototype._evaluatePieTicks=function(){ var _147=MochiKit.Base.isUndefinedOrNull; var _148=MochiKit.Format.numberFormatter("#%"); this.xticks=new Array(); if(this.options.xTicks){ var _149=new Array(); for(var i=0;i<this.slices.length;i++){ _149[this.slices[i].xval]=this.slices[i]; } for(var i=0;i<this.options.xTicks.length;i++){ var tick=this.options.xTicks[i]; var _150=_149[tick.v]; var _151=tick.label; if(_150){ if(_147(_151)){ _151=tick.v.toString(); } _151+=" ("+_148(_150.fraction)+")"; this.xticks.push([tick.v,_151]); } } }else{ for(var i=0;i<this.slices.length;i++){ var _150=this.slices[i]; var _151=_150.xval+" ("+_148(_150.fraction)+")"; this.xticks.push([_150.xval,_151]); } } }; PlotKit.Layout.prototype._regenerateHitTestCache=function(){ this.hitTestCache.xvalues=this._uniqueXValues(); this.hitTestCache.xlookup=new Array(); this.hitTestCache.x2maxy=new Array(); var _152=MochiKit.Base.listMax; var _153=MochiKit.Base.itemgetter; var map=MochiKit.Base.map; var _154=keys(this.datasets); for(var i=0;i<_154.length;i++){ var _155=this.datasets[_154[i]]; for(var j=0;j<_155.length;j++){ var xval=_155[j][0]; var yval=_155[j][1]; if(this.hitTestCache.xlookup[xval]){ this.hitTestCache.xlookup[xval].push([yval,_154[i]]); }else{ this.hitTestCache.xlookup[xval]=[[yval,_154[i]]]; } } } for(var x in this.hitTestCache.xlookup){ var _157=this.hitTestCache.xlookup[x]; this.hitTestCache.x2maxy[x]=_152(map(_153(0),_157)); } }; PlotKit.LayoutModule={}; PlotKit.LayoutModule.Layout=PlotKit.Layout; PlotKit.LayoutModule.EXPORT=["Layout"]; PlotKit.LayoutModule.EXPORT_OK=[]; PlotKit.LayoutModule.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.LayoutModule.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.LayoutModule); try{ if((typeof (PlotKit.Base)=="undefined")||(typeof (PlotKit.Layout)=="undefined")){ throw ""; } } catch(e){ throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Base,Layout}"; } if(typeof (PlotKit.CanvasRenderer)=="undefined"){ PlotKit.CanvasRenderer={}; } PlotKit.CanvasRenderer.NAME="PlotKit.CanvasRenderer"; PlotKit.CanvasRenderer.VERSION=PlotKit.VERSION; PlotKit.CanvasRenderer.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.CanvasRenderer.toString=function(){ return this.__repr__(); }; PlotKit.CanvasRenderer=function(_158,_159,_160){ if(arguments.length>0){ this.__init__(_158,_159,_160); } }; PlotKit.CanvasRenderer.prototype.__init__=function(_161,_162,_163){ var _164=MochiKit.Base.isUndefinedOrNull; var _165=MochiKit.Color.Color; this.options={"drawBackground":true,"backgroundColor":_165.whiteColor(),"padding":{left:30,right:30,top:5,bottom:10},"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"strokeColor":_165.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":_165.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":_165.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"pieRadius":0.4,"enableEvents":true}; MochiKit.Base.update(this.options,_163?_163:{}); this.layout=_162; this.element=MochiKit.DOM.getElement(_161); this.container=this.element.parentNode; this.isIE=PlotKit.Base.excanvasSupported(); if(this.isIE&&!_164(G_vmlCanvasManager)){ this.IEDelay=0.5; this.maxTries=5; this.renderDelay=null; this.clearDelay=null; this.element=G_vmlCanvasManager.initElement(this.element); } this.height=this.element.height; this.width=this.element.width; if(_164(this.element)){ throw "CanvasRenderer() - passed canvas is not found"; } if(!this.isIE&&!(PlotKit.CanvasRenderer.isSupported(this.element))){ throw "CanvasRenderer() - Canvas is not supported."; } if(_164(this.container)||(this.container.nodeName.toLowerCase()!="div")){ throw "CanvasRenderer() - <canvas> needs to be enclosed in <div>"; } this.xlabels=new Array(); this.ylabels=new Array(); this.isFirstRender=true; this.area={x:this.options.padding.left,y:this.options.padding.top,w:this.width-this.options.padding.left-this.options.padding.right,h:this.height-this.options.padding.top-this.options.padding.bottom}; MochiKit.DOM.updateNodeAttributes(this.container,{"style":{"position":"relative","width":this.width+"px"}}); }; PlotKit.CanvasRenderer.prototype.render=function(){ if(this.isIE){ try{ if(this.renderDelay){ this.renderDelay.cancel(); this.renderDelay=null; } var _166=this.element.getContext("2d"); } catch(e){ this.isFirstRender=false; if(this.maxTries-->0){ this.renderDelay=MochiKit.Async.wait(this.IEDelay); this.renderDelay.addCallback(bind(this.render,this)); } return; } } if(this.options.drawBackground){ this._renderBackground(); } if(this.layout.style=="bar"){ this._renderBarChart(); this._renderBarAxis(); }else{ if(this.layout.style=="pie"){ this._renderPieChart(); this._renderPieAxis(); }else{ if(this.layout.style=="line"){ this._renderLineChart(); this._renderLineAxis(); } } } }; PlotKit.CanvasRenderer.prototype._renderBarChartWrap=function(data,_168){ var _169=this.element.getContext("2d"); var _170=this.options.colorScheme.length; var _171=this.options.colorScheme; var _172=MochiKit.Base.keys(this.layout.datasets); var _173=_172.length; for(var i=0;i<_173;i++){ var _174=_172[i]; var _175=_171[i%_170]; _169.save(); _169.fillStyle=_175.toRGBString(); if(this.options.strokeColor){ _169.strokeStyle=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _169.strokeStyle=_175[this.options.strokeColorTransform]().toRGBString(); } } _169.lineWidth=this.options.strokeWidth; var _176=function(obj){ if(obj.name==_174){ _168(_169,obj); } }; MochiKit.Iter.forEach(data,bind(_176,this)); _169.restore(); } }; PlotKit.CanvasRenderer.prototype._renderBarChart=function(){ var bind=MochiKit.Base.bind; var _178=function(_179,bar){ var x=this.area.w*bar.x+this.area.x; var y=this.area.h*bar.y+this.area.y; var w=this.area.w*bar.w; var h=this.area.h*bar.h; if((w<1)||(h<1)){ return; } if(this.options.shouldFill){ _179.fillRect(x,y,w,h); } if(this.options.shouldStroke){ _179.strokeRect(x,y,w,h); } }; this._renderBarChartWrap(this.layout.bars,bind(_178,this)); }; PlotKit.CanvasRenderer.prototype._renderLineChart=function(){ var _182=this.element.getContext("2d"); var _183=this.options.colorScheme.length; var _184=this.options.colorScheme; var _185=MochiKit.Base.keys(this.layout.datasets); var _186=_185.length; var bind=MochiKit.Base.bind; var _187=MochiKit.Base.partial; for(var i=0;i<_186;i++){ var _188=_185[i]; var _189=_184[i%_183]; var _190=this.options.strokeColorTransform; _182.save(); _182.fillStyle=_189.toRGBString(); if(this.options.strokeColor){ _182.strokeStyle=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _182.strokeStyle=_189[_190]().toRGBString(); } } _182.lineWidth=this.options.strokeWidth; var _191=function(ctx){ ctx.beginPath(); ctx.moveTo(this.area.x,this.area.y+this.area.h); var _193=function(ctx_,_195){ if(_195.name==_188){ ctx_.lineTo(this.area.w*_195.x+this.area.x,this.area.h*_195.y+this.area.y); } }; MochiKit.Iter.forEach(this.layout.points,_187(_193,ctx),this); ctx.lineTo(this.area.w+this.area.x,this.area.h+this.area.y); ctx.lineTo(this.area.x,this.area.y+this.area.h); ctx.closePath(); }; if(this.options.shouldFill){ bind(_191,this)(_182); _182.fill(); } if(this.options.shouldStroke){ bind(_191,this)(_182); _182.stroke(); } _182.restore(); } }; PlotKit.CanvasRenderer.prototype._renderPieChart=function(){ var _196=this.element.getContext("2d"); var _197=this.options.colorScheme.length; var _198=this.layout.slices; var _199=this.area.x+this.area.w*0.5; var _200=this.area.y+this.area.h*0.5; var _201=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); if(this.isIE){ _199=parseInt(_199); _200=parseInt(_200); _201=parseInt(_201); } for(var i=0;i<_198.length;i++){ var _202=this.options.colorScheme[i%_197]; _196.save(); _196.fillStyle=_202.toRGBString(); var _203=function(){ _196.beginPath(); _196.moveTo(_199,_200); _196.arc(_199,_200,_201,_198[i].startAngle-Math.PI/2,_198[i].endAngle-Math.PI/2,false); _196.lineTo(_199,_200); _196.closePath(); }; if(Math.abs(_198[i].startAngle-_198[i].endAngle)>0.001){ if(this.options.shouldFill){ _203(); _196.fill(); } if(this.options.shouldStroke){ _203(); _196.lineWidth=this.options.strokeWidth; if(this.options.strokeColor){ _196.strokeStyle=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _196.strokeStyle=_202[this.options.strokeColorTransform]().toRGBString(); } } _196.stroke(); } } _196.restore(); } }; PlotKit.CanvasRenderer.prototype._renderBarAxis=function(){ this._renderAxis(); }; PlotKit.CanvasRenderer.prototype._renderLineAxis=function(){ this._renderAxis(); }; PlotKit.CanvasRenderer.prototype._renderAxis=function(){ if(!this.options.drawXAxis&&!this.options.drawYAxis){ return; } var _204=this.element.getContext("2d"); var _205={"style":{"position":"absolute","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}}; _204.save(); _204.strokeStyle=this.options.axisLineColor.toRGBString(); _204.lineWidth=this.options.axisLineWidth; if(this.options.drawYAxis){ if(this.layout.yticks){ var _206=function(tick){ if(typeof (tick)=="function"){ return; } var x=this.area.x; var y=this.area.y+tick[0]*this.area.h; _204.beginPath(); _204.moveTo(x,y); _204.lineTo(x-this.options.axisTickSize,y); _204.closePath(); _204.stroke(); var _207=DIV(_205,tick[1]); _207.style.top=(y-this.options.axisLabelFontSize)+"px"; _207.style.left=(x-this.options.padding.left-this.options.axisTickSize)+"px"; _207.style.textAlign="right"; _207.style.width=(this.options.padding.left-this.options.axisTickSize*2)+"px"; MochiKit.DOM.appendChildNodes(this.container,_207); this.ylabels.push(_207); }; MochiKit.Iter.forEach(this.layout.yticks,bind(_206,this)); } _204.beginPath(); _204.moveTo(this.area.x,this.area.y); _204.lineTo(this.area.x,this.area.y+this.area.h); _204.closePath(); _204.stroke(); } if(this.options.drawXAxis){ if(this.layout.xticks){ var _206=function(tick){ if(typeof (dataset)=="function"){ return; } var x=this.area.x+tick[0]*this.area.w; var y=this.area.y+this.area.h; _204.beginPath(); _204.moveTo(x,y); _204.lineTo(x,y+this.options.axisTickSize); _204.closePath(); _204.stroke(); var _208=DIV(_205,tick[1]); _208.style.top=(y+this.options.axisTickSize)+"px"; _208.style.left=(x-this.options.axisLabelWidth/2)+"px"; _208.style.textAlign="center"; _208.style.width=this.options.axisLabelWidth+"px"; MochiKit.DOM.appendChildNodes(this.container,_208); this.xlabels.push(_208); }; MochiKit.Iter.forEach(this.layout.xticks,bind(_206,this)); } _204.beginPath(); _204.moveTo(this.area.x,this.area.y+this.area.h); _204.lineTo(this.area.x+this.area.w,this.area.y+this.area.h); _204.closePath(); _204.stroke(); } _204.restore(); }; PlotKit.CanvasRenderer.prototype._renderPieAxis=function(){ if(!this.options.drawXAxis){ return; } if(this.layout.xticks){ var _209=new Array(); for(var i=0;i<this.layout.slices.length;i++){ _209[this.layout.slices[i].xval]=this.layout.slices[i]; } var _210=this.area.x+this.area.w*0.5; var _211=this.area.y+this.area.h*0.5; var _212=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); var _213=this.options.axisLabelWidth; for(var i=0;i<this.layout.xticks.length;i++){ var _214=_209[this.layout.xticks[i][0]]; if(MochiKit.Base.isUndefinedOrNull(_214)){ continue; } var _215=(_214.startAngle+_214.endAngle)/2; var _216=_215; if(_216>Math.PI*2){ _216=_216-Math.PI*2; }else{ if(_216<0){ _216=_216+Math.PI*2; } } var _217=_210+Math.sin(_216)*(_212+10); var _218=_211-Math.cos(_216)*(_212+10); var _219={"position":"absolute","zIndex":11,"width":_213+"px","fontSize":this.options.axisLabelFontSize+"px","overflow":"hidden","color":this.options.axisLabelColor.toHexString()}; if(_216<=Math.PI*0.5){ _219["textAlign"]="left"; _219["verticalAlign"]="top"; _219["left"]=_217+"px"; _219["top"]=(_218-this.options.axisLabelFontSize)+"px"; }else{ if((_216>Math.PI*0.5)&&(_216<=Math.PI)){ _219["textAlign"]="left"; _219["verticalAlign"]="bottom"; _219["left"]=_217+"px"; _219["top"]=_218+"px"; }else{ if((_216>Math.PI)&&(_216<=Math.PI*1.5)){ _219["textAlign"]="right"; _219["verticalAlign"]="bottom"; _219["left"]=(_217-_213)+"px"; _219["top"]=_218+"px"; }else{ _219["textAlign"]="right"; _219["verticalAlign"]="bottom"; _219["left"]=(_217-_213)+"px"; _219["top"]=(_218-this.options.axisLabelFontSize)+"px"; } } } var _220=DIV({"style":_219},this.layout.xticks[i][1]); this.xlabels.push(_220); MochiKit.DOM.appendChildNodes(this.container,_220); } } }; PlotKit.CanvasRenderer.prototype._renderBackground=function(){ var _221=this.element.getContext("2d"); _221.save(); _221.fillStyle=this.options.backgroundColor.toRGBString(); _221.fillRect(0,0,this.width,this.height); _221.restore(); }; PlotKit.CanvasRenderer.prototype.clear=function(){ if(this.isIE){ try{ if(this.clearDelay){ this.clearDelay.cancel(); this.clearDelay=null; } var _222=this.element.getContext("2d"); } catch(e){ this.isFirstRender=false; this.clearDelay=MochiKit.Async.wait(this.IEDelay); this.clearDelay.addCallback(bind(this.clear,this)); return; } } var _222=this.element.getContext("2d"); _222.clearRect(0,0,this.width,this.height); MochiKit.Iter.forEach(this.xlabels,MochiKit.DOM.removeElement); MochiKit.Iter.forEach(this.ylabels,MochiKit.DOM.removeElement); this.xlabels=new Array(); this.ylabels=new Array(); }; PlotKit.CanvasRenderer.prototype._initialiseEvents=function(){ var _223=MochiKit.Signal.connect; var bind=MochiKit.Base.bind; _223(this.element,"onclick",bind(this.onclick,this)); }; PlotKit.CanvasRenderer.prototype._resolveObject=function(e){ var x=(e.mouse().page.x-PlotKit.Base.findPosX(this.element)-this.area.x)/this.area.w; var y=(e.mouse().page.y-PlotKit.Base.findPosY(this.element)-this.area.y)/this.area.h; var _225=this.layout.hitTest(x,y); if(_225){ return _225; } return null; }; PlotKit.CanvasRenderer.prototype._createEventObject=function(_226,e){ if(_226==null){ return null; } e.chart=_226; return e; }; PlotKit.CanvasRenderer.prototype.onclick=function(e){ var _227=this._resolveObject(e); var _228=this._createEventObject(_227,e); if(_228!=null){ MochiKit.Signal.signal(this,"onclick",_228); } }; PlotKit.CanvasRenderer.prototype.onmouseover=function(e){ var _229=this._resolveObject(e); var _230=this._createEventObject(_229,e); if(_230!=null){ signal(this,"onmouseover",_230); } }; PlotKit.CanvasRenderer.prototype.onmouseout=function(e){ var _231=this._resolveObject(e); var _232=this._createEventObject(_231,e); if(_232==null){ signal(this,"onmouseout",e); }else{ signal(this,"onmouseout",_232); } }; PlotKit.CanvasRenderer.prototype.onmousemove=function(e){ var _233=this._resolveObject(e); var _234=this._createEventObject(_233,e); if((_233==null)&&(this.event_isinside==null)){ return; } if((_233!=null)&&(this.event_isinside==null)){ signal(this,"onmouseover",_234); } if((_233==null)&&(this.event_isinside!=null)){ signal(this,"onmouseout",_234); } if((_233!=null)&&(this.event_isinside!=null)){ signal(this,"onmousemove",_234); } this.event_isinside=_233; }; PlotKit.CanvasRenderer.isSupported=function(_235){ var _236=null; try{ if(MochiKit.Base.isUndefinedOrNull(_235)){ _236=MochiKit.DOM.CANVAS({}); }else{ _236=MochiKit.DOM.getElement(_235); } var _237=_236.getContext("2d"); } catch(e){ var ie=navigator.appVersion.match(/MSIE (\d\.\d)/); var _239=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1); if((!ie)||(ie[1]<6)||(_239)){ return false; } return true; } return true; }; PlotKit.Canvas={}; PlotKit.Canvas.CanvasRenderer=PlotKit.CanvasRenderer; PlotKit.Canvas.EXPORT=["CanvasRenderer"]; PlotKit.Canvas.EXPORT_OK=["CanvasRenderer"]; PlotKit.Canvas.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.Canvas.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.Canvas); try{ if(typeof (PlotKit.Layout)=="undefined"){ throw ""; } } catch(e){ throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Layout"; } PlotKit.SVGRenderer=function(_240,_241,_242){ if(arguments.length>0){ this.__init__(_240,_241,_242); } }; PlotKit.SVGRenderer.NAME="PlotKit.SVGRenderer"; PlotKit.SVGRenderer.VERSION=PlotKit.VERSION; PlotKit.SVGRenderer.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.SVGRenderer.toString=function(){ return this.__repr__(); }; PlotKit.SVGRenderer.SVGNS="http://www.w3.org/2000/svg"; PlotKit.SVGRenderer.prototype.__init__=function(_243,_244,_245){ var _246=MochiKit.Base.isUndefinedOrNull; this.options={"drawBackground":true,"backgroundColor":Color.whiteColor(),"padding":{left:30,right:30,top:5,bottom:10},"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),"strokeColor":Color.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":Color.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":Color.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"axisLabelUseDiv":true,"pieRadius":0.4,"enableEvents":true}; MochiKit.Base.update(this.options,_245?_245:{}); this.layout=_244; this.element=MochiKit.DOM.getElement(_243); this.container=this.element.parentNode; this.height=parseInt(this.element.getAttribute("height")); this.width=parseInt(this.element.getAttribute("width")); this.document=document; this.root=this.element; try{ this.document=this.element.getSVGDocument(); this.root=_246(this.document.documentElement)?this.element:this.document.documentElement; } catch(e){ } this.element.style.zIndex=1; if(_246(this.element)){ throw "SVGRenderer() - passed SVG object is not found"; } if(_246(this.container)||this.container.nodeName.toLowerCase()!="div"){ throw "SVGRenderer() - No DIV''s around the SVG."; } this.xlabels=new Array(); this.ylabels=new Array(); this.defs=this.createSVGElement("defs"); this.area={x:this.options.padding.left,y:this.options.padding.top,w:this.width-this.options.padding.left-this.options.padding.right,h:this.height-this.options.padding.top-this.options.padding.bottom}; MochiKit.DOM.updateNodeAttributes(this.container,{"style":{"position":"relative","width":this.width+"px"}}); }; PlotKit.SVGRenderer.prototype.render=function(){ if(this.options.drawBackground){ this._renderBackground(); } if(this.layout.style=="bar"){ this._renderBarChart(); this._renderBarAxis(); }else{ if(this.layout.style=="pie"){ this._renderPieChart(); this._renderPieAxis(); }else{ if(this.layout.style=="line"){ this._renderLineChart(); this._renderLineAxis(); } } } }; PlotKit.SVGRenderer.prototype._renderBarOrLine=function(data,_247,_248,_249){ var _250=this.options.colorScheme.length; var _251=this.options.colorScheme; var _252=MochiKit.Base.keys(this.layout.datasets); var _253=_252.length; for(var i=0;i<_253;i++){ var _254=_252[i]; var _255=new Array(); var _256=_251[i%_250]; if(this.options.shouldFill){ _255["fill"]=_256.toRGBString(); }else{ _255["fill"]="none"; } if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ if(this.options.strokeColor){ _255["stroke"]=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _255["stroke"]=_256[this.options.strokeColorTransform]().toRGBString(); } } _255["strokeWidth"]=this.options.strokeWidth; } if(_248){ _248(_255); } var _257=function(obj){ if(obj.name==_254){ _247(_255,obj); } }; MochiKit.Iter.forEach(data,bind(_257,this)); if(_249){ _249(_255); } } }; PlotKit.SVGRenderer.prototype._renderBarChart=function(){ var bind=MochiKit.Base.bind; var _258=function(_259,bar){ var x=this.area.w*bar.x+this.area.x; var y=this.area.h*bar.y+this.area.y; var w=this.area.w*bar.w; var h=this.area.h*bar.h; this._drawRect(x,y,w,h,_259); }; this._renderBarOrLine(this.layout.bars,bind(_258,this)); }; PlotKit.SVGRenderer.prototype._renderLineChart=function(){ var bind=MochiKit.Base.bind; var _260=function(_261,_262){ this._tempPointsBuffer+=(this.area.w*_262.x+this.area.x)+","+(this.area.h*_262.y+this.area.y)+" "; }; var _263=function(_264){ this._tempPointsBuffer=""; this._tempPointsBuffer+=(this.area.x)+","+(this.area.y+this.area.h)+" "; }; var _265=function(_266){ this._tempPointsBuffer+=(this.area.w+this.area.x)+","+(this.area.h+this.area.y); _266["points"]=this._tempPointsBuffer; var elem=this.createSVGElement("polygon",_266); this.root.appendChild(elem); }; this._renderBarOrLine(this.layout.points,bind(_260,this),bind(_263,this),bind(_265,this)); }; PlotKit.SVGRenderer.prototype._renderPieChart=function(){ var _268=this.options.colorScheme.length; var _269=this.layout.slices; var _270=this.area.x+this.area.w*0.5; var _271=this.area.y+this.area.h*0.5; var _272=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); if(_269.length==1&&(Math.abs(_269[0].startAngle)-Math.abs(_269[0].endAngle)<0.1)){ var _273={"cx":_270,"cy":_271,"r":_272}; var _274=this.options.colorScheme[0]; if(this.options.shouldFill){ _273["fill"]=_274.toRGBString(); }else{ _273["fill"]="none"; } if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ if(this.options.strokeColor){ _273["stroke"]=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _273["stroke"]=_274[this.options.strokeColorTransform]().toRGBString(); } } _273["style"]="stroke-width: "+this.options.strokeWidth; } this.root.appendChild(this.createSVGElement("circle",_273)); return; } for(var i=0;i<_269.length;i++){ var _273=new Array(); var _274=this.options.colorScheme[i%_268]; if(this.options.shouldFill){ _273["fill"]=_274.toRGBString(); }else{ _273["fill"]="none"; } if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ if(this.options.strokeColor){ _273["stroke"]=this.options.strokeColor.toRGBString(); }else{ if(this.options.strokeColorTransform){ _273["stroke"]=_274[this.options.strokeColorTransform]().toRGBString(); } } _273["style"]="stroke-width:"+this.options.strokeWidth; } var _275=0; if(Math.abs(_269[i].endAngle-_269[i].startAngle)>Math.PI){ _275=1; } var x1=Math.cos(_269[i].startAngle-Math.PI/2)*_272; var y1=Math.sin(_269[i].startAngle-Math.PI/2)*_272; var x2=Math.cos(_269[i].endAngle-Math.PI/2)*_272; var y2=Math.sin(_269[i].endAngle-Math.PI/2)*_272; var rx=x2-x1; var ry=y2-y1; var _282="M"+_270+","+_271+" "; _282+="l"+x1+","+y1+" "; _282+="a"+_272+","+_272+" 0 "+_275+",1 "+rx+","+ry+" z"; _273["d"]=_282; var elem=this.createSVGElement("path",_273); this.root.appendChild(elem); } }; PlotKit.SVGRenderer.prototype._renderBarAxis=function(){ this._renderAxis(); }; PlotKit.SVGRenderer.prototype._renderLineAxis=function(){ this._renderAxis(); }; PlotKit.SVGRenderer.prototype._renderAxis=function(){ if(!this.options.drawXAxis&&!this.options.drawYAxis){ return; } var _283={"style":{"position":"absolute","textAlign":"center","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}}; var _284={"stroke":this.options.axisLineColor.toRGBString(),"strokeWidth":this.options.axisLineWidth}; if(this.options.drawYAxis){ if(this.layout.yticks){ var _285=function(tick){ var x=this.area.x; var y=this.area.y+tick[0]*this.area.h; this._drawLine(x,y,x-3,y,_284); if(this.options.axisLabelUseDiv){ var _286=DIV(_283,tick[1]); _286.style.top=(y-this.options.axisLabelFontSize)+"px"; _286.style.left=(x-this.options.padding.left+this.options.axisTickSize)+"px"; _286.style.textAlign="left"; _286.style.width=(this.options.padding.left-3)+"px"; MochiKit.DOM.appendChildNodes(this.container,_286); this.ylabels.push(_286); }else{ var _287={y:y+3,x:(x-this.options.padding.left+3),width:(this.options.padding.left-this.options.axisTickSize)+"px",height:(this.options.axisLabelFontSize+3)+"px",fontFamily:"Arial",fontSize:this.options.axisLabelFontSize+"px",fill:this.options.axisLabelColor.toRGBString()}; var _286=this.createSVGElement("text",_287); _286.appendChild(this.document.createTextNode(tick[1])); this.root.appendChild(_286); } }; MochiKit.Iter.forEach(this.layout.yticks,bind(_285,this)); } this._drawLine(this.area.x,this.area.y,this.area.x,this.area.y+this.area.h,_284); } if(this.options.drawXAxis){ if(this.layout.xticks){ var _285=function(tick){ var x=this.area.x+tick[0]*this.area.w; var y=this.area.y+this.area.h; this._drawLine(x,y,x,y+this.options.axisTickSize,_284); if(this.options.axisLabelUseDiv){ var _288=DIV(_283,tick[1]); _288.style.top=(y+this.options.axisTickSize)+"px"; _288.style.left=(x-this.options.axisLabelWidth/2)+"px"; _288.style.textAlign="center"; _288.style.width=this.options.axisLabelWidth+"px"; MochiKit.DOM.appendChildNodes(this.container,_288); this.xlabels.push(_288); }else{ var _289={y:(y+this.options.axisTickSize+this.options.axisLabelFontSize),x:x-3,width:this.options.axisLabelWidth+"px",height:(this.options.axisLabelFontSize+3)+"px",fontFamily:"Arial",fontSize:this.options.axisLabelFontSize+"px",fill:this.options.axisLabelColor.toRGBString(),textAnchor:"middle"}; var _288=this.createSVGElement("text",_289); _288.appendChild(this.document.createTextNode(tick[1])); this.root.appendChild(_288); } }; MochiKit.Iter.forEach(this.layout.xticks,bind(_285,this)); } this._drawLine(this.area.x,this.area.y+this.area.h,this.area.x+this.area.w,this.area.y+this.area.h,_284); } }; PlotKit.SVGRenderer.prototype._renderPieAxis=function(){ if(this.layout.xticks){ var _290=new Array(); for(var i=0;i<this.layout.slices.length;i++){ _290[this.layout.slices[i].xval]=this.layout.slices[i]; } var _291=this.area.x+this.area.w*0.5; var _292=this.area.y+this.area.h*0.5; var _293=Math.min(this.area.w*this.options.pieRadius+10,this.area.h*this.options.pieRadius+10); var _294=this.options.axisLabelWidth; for(var i=0;i<this.layout.xticks.length;i++){ var _295=_290[this.layout.xticks[i][0]]; if(MochiKit.Base.isUndefinedOrNull(_295)){ continue; } var _296=(_295.startAngle+_295.endAngle)/2; var _297=_296; if(_297>Math.PI*2){ _297=_297-Math.PI*2; }else{ if(_297<0){ _297=_297+Math.PI*2; } } var _298=_291+Math.sin(_297)*(_293+10); var _299=_292-Math.cos(_297)*(_293+10); var _300={"position":"absolute","zIndex":11,"width":_294+"px","fontSize":this.options.axisLabelFontSize+"px","overflow":"hidden","color":this.options.axisLabelColor.toHexString()}; var _301={"width":_294+"px","fontSize":this.options.axisLabelFontSize+"px","height":(this.options.axisLabelFontSize+3)+"px","fill":this.options.axisLabelColor.toRGBString()}; if(_297<=Math.PI*0.5){ MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"top","left":_298+"px","top":(_299-this.options.axisLabelFontSize)+"px"}); MochiKit.Base.update(_301,{"x":_298,"y":(_299-this.options.axisLabelFontSize),"textAnchor":"left"}); }else{ if((_297>Math.PI*0.5)&&(_297<=Math.PI)){ MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); MochiKit.Base.update(_301,{"textAnchor":"left","x":_298,"y":_299}); }else{ if((_297>Math.PI)&&(_297<=Math.PI*1.5)){ MochiKit.Base.update(_300,{"textAlign":"right","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); MochiKit.Base.update(_301,{"textAnchor":"right","x":_298-_294,"y":_299}); }else{ MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); MochiKit.Base.update(_301,{"textAnchor":"left","x":_298-_294,"y":_299-this.options.axisLabelFontSize}); } } } if(this.options.axisLabelUseDiv){ var _302=DIV({"style":_300},this.layout.xticks[i][1]); this.xlabels.push(_302); MochiKit.DOM.appendChildNodes(this.container,_302); }else{ var _302=this.createSVGElement("text",_301); _302.appendChild(this.document.createTextNode(this.layout.xticks[i][1])); this.root.appendChild(_302); } } } }; PlotKit.SVGRenderer.prototype._renderBackground=function(){ var opts={"stroke":"none","fill":this.options.backgroundColor.toRGBString()}; this._drawRect(0,0,this.width,this.height,opts); }; PlotKit.SVGRenderer.prototype._drawRect=function(x,y,w,h,_304){ var _305={x:x+"px",y:y+"px",width:w+"px",height:h+"px"}; if(_304){ MochiKit.Base.update(_305,_304); } var elem=this.createSVGElement("rect",_305); this.root.appendChild(elem); }; PlotKit.SVGRenderer.prototype._drawLine=function(x1,y1,x2,y2,_306){ var _307={x1:x1+"px",y1:y1+"px",x2:x2+"px",y2:y2+"px"}; if(_306){ MochiKit.Base.update(_307,_306); } var elem=this.createSVGElement("line",_307); this.root.appendChild(elem); }; PlotKit.SVGRenderer.prototype.clear=function(){ while(this.element.firstChild){ this.element.removeChild(this.element.firstChild); } if(this.options.axisLabelUseDiv){ for(var i=0;i<this.xlabels.length;i++){ MochiKit.DOM.removeElement(this.xlabels[i]); } for(var i=0;i<this.ylabels.length;i++){ MochiKit.DOM.removeElement(this.ylabels[i]); } } this.xlabels=new Array(); this.ylabels=new Array(); }; PlotKit.SVGRenderer.prototype.createSVGElement=function(name,_309){ var _310=MochiKit.Base.isUndefinedOrNull; var elem; var doc=_310(this.document)?document:this.document; try{ elem=doc.createElementNS(PlotKit.SVGRenderer.SVGNS,name); } catch(e){ elem=doc.createElement(name); elem.setAttribute("xmlns",PlotKit.SVGRenderer.SVGNS); } if(_309){ MochiKit.DOM.updateNodeAttributes(elem,_309); } return elem; }; PlotKit.SVGRenderer.SVG=function(_312){ var ie=navigator.appVersion.match(/MSIE (\d\.\d)/); var _313=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1); if(ie&&(ie[1]>=6)&&(!_313)){ var _314=_312["width"]?_312["width"]:"100"; var _315=_312["height"]?_312["height"]:"100"; var eid=_312["id"]?_312["id"]:"notunique"; var html="<svg:svg width=\""+_314+"\" height=\""+_315+"\" "; html+="id=\""+eid+"\" version=\"1.1\" baseProfile=\"full\" />"; var _318=document.createElement(html); var _319=_318.getSVGDocument().createElementNS(PlotKit.SVGRenderer.SVGNS,"svg"); _319.setAttribute("width",_314); _319.setAttribute("height",_315); _318.getSVGDocument().appendChild(_319); return _318; }else{ return PlotKit.SVGRenderer.prototype.createSVGElement("svg",_312); } }; PlotKit.SVGRenderer.isSupported=function(){ var _320=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1); var _321=navigator.appVersion.match(/MSIE (\d\.\d)/); var _322=navigator.userAgent.match(/AppleWebKit\/(\d+)/); var _323=navigator.userAgent.match(/Opera\/(\d*\.\d*)/); var _324=navigator.userAgent.match(/rv:(\d*\.\d*).*Gecko/); var _325="http://www.w3.org/TR/SVG11/feature#SVG"; if(_321&&(_321[1]>=6)&&!_320){ return document.implementation.hasFeature(_325,"1.1"); } if(_323&&(_323[1]>8.9)){ return true; } if(_324&&(_324>1.7)){ return true; } return false; }; PlotKit.SVG={}; PlotKit.SVG.SVGRenderer=PlotKit.SVGRenderer; PlotKit.SVG.EXPORT=["SVGRenderer"]; PlotKit.SVG.EXPORT_OK=["SVGRenderer"]; PlotKit.SVG.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.SVG.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.SVG); try{ if(typeof (PlotKit.CanvasRenderer)=="undefined"){ throw ""; } } catch(e){ throw "SweetCanvas depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, Canvas}"; } if(typeof (PlotKit.SweetCanvasRenderer)=="undefined"){ PlotKit.SweetCanvasRenderer={}; } PlotKit.SweetCanvasRenderer=function(_326,_327,_328){ if(arguments.length>0){ this.__init__(_326,_327,_328); } }; PlotKit.SweetCanvasRenderer.NAME="PlotKit.SweetCanvasRenderer"; PlotKit.SweetCanvasRenderer.VERSION=PlotKit.VERSION; PlotKit.SweetCanvasRenderer.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.SweetCanvasRenderer.toString=function(){ return this.__repr__(); }; PlotKit.SweetCanvasRenderer.prototype=new PlotKit.CanvasRenderer(); PlotKit.SweetCanvasRenderer.prototype.constructor=PlotKit.SweetCanvasRenderer; PlotKit.SweetCanvasRenderer.__super__=PlotKit.CanvasRenderer.prototype; PlotKit.SweetCanvasRenderer.prototype.__init__=function(el,_330,opts){ var _331=PlotKit.Base.officeBlue(); MochiKit.Base.update(_331,opts); PlotKit.SweetCanvasRenderer.__super__.__init__.call(this,el,_330,_331); }; PlotKit.SweetCanvasRenderer.prototype._renderBarChart=function(){ var bind=MochiKit.Base.bind; var _332=Color.blackColor().colorWithAlpha(0.1).toRGBString(); var _333=function(_334,x,y,w,h){ _334.fillStyle=_332; _334.fillRect(x-2,y-2,w+4,h+2); _334.fillStyle=_332; _334.fillRect(x-1,y-1,w+2,h+1); }; var _335=this.options.colorScheme.length; var _336=this.options.colorScheme; var _337=PlotKit.Base.keys(this.layout.datasets); var _338=_337.length; var _339=function(name){ for(var i=0;i<_338;i++){ if(name==_337[i]){ return _336[i%_335]; } } return _336[0]; }; var _340=function(_341,bar){ var x=this.area.w*bar.x+this.area.x; var y=this.area.h*bar.y+this.area.y; var w=this.area.w*bar.w; var h=this.area.h*bar.h; if((w<1)||(h<1)){ return; } _341.save(); _341.shadowBlur=5; _341.shadowColor=Color.fromHexString("#888888").toRGBString(); if(this.isIE){ _341.save(); _341.fillStyle="#cccccc"; _341.fillRect(x-2,y-2,w+4,h+2); _341.restore(); }else{ _333(_341,x,y,w,h); } if(this.options.shouldFill){ _341.fillStyle=_339(bar.name).toRGBString(); _341.fillRect(x,y,w,h); } _341.shadowBlur=0; _341.strokeStyle=Color.whiteColor().toRGBString(); _341.lineWidth=2; if(this.options.shouldStroke){ _341.strokeRect(x,y,w,h); } _341.restore(); }; this._renderBarChartWrap(this.layout.bars,bind(_340,this)); }; PlotKit.SweetCanvasRenderer.prototype._renderLineChart=function(){ var _342=this.element.getContext("2d"); var _343=this.options.colorScheme.length; var _344=this.options.colorScheme; var _345=PlotKit.Base.keys(this.layout.datasets); var _346=_345.length; var bind=MochiKit.Base.bind; for(var i=0;i<_346;i++){ var _347=_345[i]; var _348=_344[i%_343]; var _349=this.options.strokeColorTransform; _342.save(); var _350=function(ctx){ ctx.beginPath(); ctx.moveTo(this.area.x,this.area.y+this.area.h); var _351=function(ctx_,_352){ if(_352.name==_347){ ctx_.lineTo(this.area.w*_352.x+this.area.x,this.area.h*_352.y+this.area.y); } }; MochiKit.Iter.forEach(this.layout.points,partial(_351,ctx),this); ctx.lineTo(this.area.w+this.area.x,this.area.h+this.area.y); ctx.lineTo(this.area.x,this.area.y+this.area.h); ctx.closePath(); }; if(this.options.shouldFill){ _342.save(); if(this.isIE){ _342.fillStyle="#cccccc"; }else{ _342.fillStyle=Color.blackColor().colorWithAlpha(0.2).toRGBString(); } _342.translate(-1,-2); bind(_350,this)(_342); if(this.options.shouldFill){ _342.fill(); } _342.restore(); } _342.shadowBlur=5; _342.shadowColor=Color.fromHexString("#888888").toRGBString(); _342.fillStyle=_348.toRGBString(); _342.lineWidth=2; _342.strokeStyle=Color.whiteColor().toRGBString(); if(this.options.shouldFill){ bind(_350,this)(_342); _342.fill(); } if(this.options.shouldStroke){ bind(_350,this)(_342); _342.stroke(); } _342.restore(); } }; PlotKit.SweetCanvasRenderer.prototype._renderPieChart=function(){ var _353=this.element.getContext("2d"); var _354=this.options.colorScheme.length; var _355=this.layout.slices; var _356=this.area.x+this.area.w*0.5; var _357=this.area.y+this.area.h*0.5; var _358=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); if(this.isIE){ _356=parseInt(_356); _357=parseInt(_357); _358=parseInt(_358); } if(!this.isIE){ _353.save(); var _359=Color.blackColor().colorWithAlpha(0.2); _353.fillStyle=_359.toRGBString(); _353.shadowBlur=5; _353.shadowColor=Color.fromHexString("#888888").toRGBString(); _353.translate(1,1); _353.beginPath(); _353.moveTo(_356,_357); _353.arc(_356,_357,_358+2,0,Math.PI*2,false); _353.closePath(); _353.fill(); _353.restore(); } _353.save(); _353.strokeStyle=Color.whiteColor().toRGBString(); _353.lineWidth=2; for(var i=0;i<_355.length;i++){ var _360=this.options.colorScheme[i%_354]; _353.fillStyle=_360.toRGBString(); var _361=function(){ _353.beginPath(); _353.moveTo(_356,_357); _353.arc(_356,_357,_358,_355[i].startAngle-Math.PI/2,_355[i].endAngle-Math.PI/2,false); _353.lineTo(_356,_357); _353.closePath(); }; if(Math.abs(_355[i].startAngle-_355[i].endAngle)>0.0001){ if(this.options.shouldFill){ _361(); _353.fill(); } if(this.options.shouldStroke){ _361(); _353.stroke(); } } } _353.restore(); }; PlotKit.SweetCanvasRenderer.prototype._renderBackground=function(){ var _362=this.element.getContext("2d"); if(this.layout.style=="bar"||this.layout.style=="line"){ _362.save(); _362.fillStyle=this.options.backgroundColor.toRGBString(); _362.fillRect(this.area.x,this.area.y,this.area.w,this.area.h); _362.strokeStyle=this.options.axisLineColor.toRGBString(); _362.lineWidth=1; var _363=this.layout.yticks; var _364=false; if(this.layout.style=="bar"&&this.layout.options.barOrientation=="horizontal"){ _363=this.layout.xticks; _364=true; } for(var i=0;i<_363.length;i++){ var x1=0; var y1=0; var x2=0; var y2=0; if(_364){ x1=_363[i][0]*this.area.w+this.area.x; y1=this.area.y; x2=x1; y2=y1+this.area.h; }else{ x1=this.area.x; y1=_363[i][0]*this.area.h+this.area.y; x2=x1+this.area.w; y2=y1; } _362.beginPath(); _362.moveTo(x1,y1); _362.lineTo(x2,y2); _362.closePath(); _362.stroke(); } _362.restore(); }else{ PlotKit.SweetCanvasRenderer.__super__._renderBackground.call(this); } }; PlotKit.SweetCanvas={}; PlotKit.SweetCanvas.SweetCanvasRenderer=PlotKit.SweetCanvasRenderer; PlotKit.SweetCanvas.EXPORT=["SweetCanvasRenderer"]; PlotKit.SweetCanvas.EXPORT_OK=["SweetCanvasRenderer"]; PlotKit.SweetCanvas.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.SweetCanvas.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.SweetCanvas); try{ if(typeof (PlotKit.SVGRenderer)=="undefined"){ throw ""; } } catch(e){ throw "SweetSVG depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, SVG}"; } if(typeof (PlotKit.SweetSVGRenderer)=="undefined"){ PlotKit.SweetSVGRenderer={}; } PlotKit.SweetSVGRenderer=function(_365,_366,_367){ if(arguments.length>0){ this.__init__(_365,_366,_367); } }; PlotKit.SweetSVGRenderer.NAME="PlotKit.SweetSVGRenderer"; PlotKit.SweetSVGRenderer.VERSION=PlotKit.VERSION; PlotKit.SweetSVGRenderer.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.SweetSVGRenderer.toString=function(){ return this.__repr__(); }; PlotKit.SweetSVGRenderer.prototype=new PlotKit.SVGRenderer(); PlotKit.SweetSVGRenderer.prototype.constructor=PlotKit.SweetSVGRenderer; PlotKit.SweetSVGRenderer.__super__=PlotKit.SVGRenderer.prototype; PlotKit.SweetSVGRenderer.prototype.__init__=function(_368,_369,_370){ var _371=PlotKit.Base.officeBlue(); MochiKit.Base.update(_371,_370); PlotKit.SweetSVGRenderer.__super__.__init__.call(this,_368,_369,_371); }; PlotKit.SweetSVGRenderer.prototype._addDropShadowFilter=function(){ var _372=this.createSVGElement("filter",{x:0,y:0,"id":"dropShadow"}); var _373=this.createSVGElement("feOffset",{"in":"SourceGraphic","dx":0,"dy":0,"result":"topCopy"}); var blur=this.createSVGElement("feGaussianBlur",{"in":"SourceAlpha","StdDeviation":2,"result":"shadow"}); var _375=this.createSVGElement("feOffset",{"in":"shadow","dx":-1,"dy":-2,"result":"movedShadow"}); var _376=this.createSVGElement("feMerge"); var _377=this.createSVGElement("feMergeNode",{"in":"topCopy"}); var _378=this.createSVGElement("feMergeNode",{"in":"movedShadow"}); _376.appendChild(_377); _376.appendChild(_378); _372.appendChild(_373); _372.appendChild(blur); _372.appendChild(_375); _372.appendChild(_376); this.defs.appendChild(_372); }; PlotKit.SweetSVGRenderer.prototype._renderBarChart=function(){ var bind=MochiKit.Base.bind; var _379=Color.blackColor().toRGBString(); var _380="fill:"+_379+";fill-opacity:0.15"; var _381="stroke-width: 2.0; stroke:"+Color.whiteColor().toRGBString(); var _382=function(_383,bar){ var x=this.area.w*bar.x+this.area.x; var y=this.area.h*bar.y+this.area.y; var w=this.area.w*bar.w; var h=this.area.h*bar.h; if((w<1)||(h<1)){ return; } _383["style"]=_381; this._drawRect(x-2,y-1,w+4,h+2,{"style":_380}); this._drawRect(x,y,w,h,_383); }; this._renderBarOrLine(this.layout.bars,bind(_382,this)); }; PlotKit.SweetSVGRenderer.prototype._renderLineChart=function(){ var bind=MochiKit.Base.bind; var _384=Color.blackColor().toRGBString(); var _385="fill:"+_384+";fill-opacity:0.15"; var _386="stroke-width: 2.0; stroke:"+Color.whiteColor().toRGBString(); var _387=function(_388,_389){ this._tempPointsBuffer+=(this.area.w*_389.x+this.area.x)+","+(this.area.h*_389.y+this.area.y)+" "; }; var _390=function(_391){ this._tempPointsBuffer=""; this._tempPointsBuffer+=(this.area.x)+","+(this.area.y+this.area.h)+" "; }; var _392=function(_393){ this._tempPointsBuffer+=(this.area.w+this.area.x)+","+(this.area.h+this.area.y); _393["points"]=this._tempPointsBuffer; _393["stroke"]="none"; _393["transform"]="translate(-2, -1)"; _393["style"]=_385; var _394=this.createSVGElement("polygon",_393); this.root.appendChild(_394); _393["transform"]=""; _393["style"]=_386; var elem=this.createSVGElement("polygon",_393); this.root.appendChild(elem); }; this._renderBarOrLine(this.layout.points,bind(_387,this),bind(_390,this),bind(_392,this)); }; PlotKit.SweetSVGRenderer.prototype._renderPieChart=function(){ var _395=this.area.x+this.area.w*0.5; var _396=this.area.y+this.area.h*0.5; var _397=Color.blackColor().toRGBString(); var _398=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); var _399="fill:"+_397+";fill-opacity:0.15"; var _400=this.createSVGElement("circle",{"style":_399,"cx":_395+1,"cy":_396+1,"r":_398+1}); this.root.appendChild(_400); PlotKit.SweetSVGRenderer.__super__._renderPieChart.call(this); }; PlotKit.SweetSVGRenderer.prototype._renderBackground=function(){ var _401={"fill":this.options.backgroundColor.toRGBString(),"stroke":"none"}; if(this.layout.style=="bar"||this.layout.style=="line"){ this._drawRect(this.area.x,this.area.y,this.area.w,this.area.h,_401); var _402=this.layout.yticks; var _403=false; if(this.layout.style=="bar"&&this.layout.options.barOrientation=="horizontal"){ _402=this.layout.xticks; _403=true; } for(var i=0;i<_402.length;i++){ var x=0; var y=0; var w=0; var h=0; if(_403){ x=_402[i][0]*this.area.w+this.area.x; y=this.area.y; w=1; h=this.area.w; }else{ x=this.area.x; y=_402[i][0]*this.area.h+this.area.y; w=this.area.w; h=1; } this._drawRect(x,y,w,h,{"fill":this.options.axisLineColor.toRGBString()}); } }else{ PlotKit.SweetSVGRenderer.__super__._renderBackground.call(this); } }; PlotKit.SweetSVG={}; PlotKit.SweetSVG.SweetSVGRenderer=PlotKit.SweetSVGRenderer; PlotKit.SweetSVG.EXPORT=["SweetSVGRenderer"]; PlotKit.SweetSVG.EXPORT_OK=["SweetSVGRenderer"]; PlotKit.SweetSVG.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.SweetSVG.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.SweetSVG); try{ if(typeof (PlotKit.CanvasRenderer)=="undefined"){ throw ""; } } catch(e){ throw "PlotKit.EasyPlot depends on all of PlotKit''s components"; } if(typeof (PlotKit.EasyPlot)=="undefined"){ PlotKit.EasyPlot={}; } PlotKit.EasyPlot.NAME="PlotKit.EasyPlot"; PlotKit.EasyPlot.VERSION=PlotKit.VERSION; PlotKit.EasyPlot.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; PlotKit.EasyPlot.toString=function(){ return this.__repr__(); }; PlotKit.EasyPlot=function(_404,_405,_406,_407){ this.layout=new Layout(_404,_405); this.divElem=_406; this.width=parseInt(_406.getAttribute("width")); this.height=parseInt(_406.getAttribute("height")); this.deferredCount=0; if(this.width<1){ this.width=this.divElem.width?this.divElem.width:300; } if(this.height<1){ this.height=this.divElem.height?this.divElem.height:300; } if(isArrayLike(_407)){ for(var i=0;i<_407.length;i++){ if(typeof (_407[i])=="string"){ this.deferredCount++; var d=MochiKit.Async.doSimpleXMLHttpRequest(_407[i]); d.addCallback(MochiKit.Base.bind(PlotKit.EasyPlot.onDataLoaded,this)); }else{ if(isArrayLike(_407[i])){ this.layout.addDataset("data-"+i,_407[i]); } } } }else{ if(!isUndefinedOrNull(_407)){ throw "Passed datasources are not Array like"; } } if(CanvasRenderer.isSupported()){ this.element=CANVAS({"id":this.divElem.getAttribute("id")+"-canvas","width":this.width,"height":this.height},""); this.divElem.appendChild(this.element); this.renderer=new SweetCanvasRenderer(this.element,this.layout,_405); }else{ if(SVGRenderer.isSupported()){ this.element=SVGRenderer.SVG({"id":this.divElem.getAttribute("id")+"-svg","width":this.width,"height":this.height,"version":"1.1","baseProfile":"full"},""); this.divElem.appendChild(this.element); this.renderer=new SweetSVGRenderer(this.element,this.layout,_405); } } if((this.deferredCount==0)&&(PlotKit.Base.keys(this.layout.datasets).length>0)){ this.layout.evaluate(); this.renderer.clear(); this.renderer.render(); } }; PlotKit.EasyPlot.onDataLoaded=function(_409){ var _410=new Array(); var _411=_409.responseText.split("\n"); for(var i=0;i<_411.length;i++){ var _412=MochiKit.Format.strip(_411[i]); if((_412.length>1)&&(_412.charAt(0)!="#")){ _410.push(_412.split(",")); } } this.layout.addDataset("data-ajax-"+this.deferredCount,_410); this.deferredCount--; if((this.deferredCount==0)&&(PlotKit.Base.keys(this.layout.datasets).length>0)){ this.layout.evaluate(); this.renderer.clear(); this.renderer.render(); } }; PlotKit.EasyPlot.prototype.reload=function(){ this.layout.evaluate(); this.renderer.clear(); this.renderer.render(); }; PlotKit.EasyPlotModule={}; PlotKit.EasyPlotModule.EasyPlot=PlotKit.EasyPlot; PlotKit.EasyPlotModule.EXPORT=["EasyPlot"]; PlotKit.EasyPlotModule.EXPORT_OK=[]; PlotKit.EasyPlotModule.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; PlotKit.EasyPlotModule.__new__(); MochiKit.Base._exportSymbols(this,PlotKit.EasyPlotModule); '
</methods> <methods> Seaside.PKScriptLibrary <category>accessing</category>
selectorsToInclude ^#( mochiKitJs excanvasJs plotKitJs )
</methods> <methods> Seaside.PKScriptLibrary <category>accessing</category>
excanvasJs ^'// Copyright 2006 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // TODO: Patterns // TODO: Radial gradient // TODO: Clipping paths // TODO: Coordsize (still need to support stretching) // TODO: Painting mode // TODO: Optimize // TODO: canvas width/height sets content size in moz, border size in ie // only add this code if we do not already have a canvas implementation if (!window.CanvasRenderingContext2D) { (function () { // alias some functions to make (compiled) code shorter var m = Math; var mr = m.round; var ms = m.sin; var mc = m.cos; var G_vmlCanvasManager_ = { init: function (opt_doc) { var doc = opt_doc || document; if (/MSIE/.test(navigator.userAgent) && !window.opera) { var self = this; doc.attachEvent("onreadystatechange", function () { self.init_(doc); }); } }, init_: function (doc, e) { if (doc.readyState == "complete") { // create xmlns if (!doc.namespaces["g_vml_"]) { doc.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml"); } // setup default css var ss = doc.createStyleSheet(); ss.cssText = "canvas{display:inline-block;overflow:hidden;" + "text-align:left;}" + "g_vml_\\:*{behavior:url(#default#VML)}"; // find all canvas elements var els = doc.getElementsByTagName("canvas"); for (var i = 0; i < els.length; i++) { if (!els[i].getContext) { this.initElement(els[i]); } } } }, fixElement_: function (el) { // in IE before version 5.5 we would need to add HTML: to the tag name // but we do not care about IE before version 6 var outerHTML = el.outerHTML; var newEl = document.createElement(outerHTML); // if the tag is still open IE has created the children as siblings and // it has also created a tag with the name "/FOO" if (outerHTML.slice(-2) != "/>") { var tagName = "/" + el.tagName; var ns; // remove content while ((ns = el.nextSibling) && ns.tagName != tagName) { ns.removeNode(); } // remove the incorrect closing tag if (ns) { ns.removeNode(); } } el.parentNode.replaceChild(newEl, el); return newEl; }, /** * Public initializes a canvas element so that it can be used as canvas * element from now on. This is called automatically before the page is * loaded but if you are creating elements using createElement you need to * make sure this is called on the element. * @param {HTMLElement} el The canvas element to initialize. * @return {HTMLElement} the element that was created. */ initElement: function (el) { el = this.fixElement_(el); el.getContext = function () { if (this.context_) { return this.context_; } return this.context_ = new CanvasRenderingContext2D_(this); }; // do not use inline function because that will leak memory // el.attachEvent(''onpropertychange'', onPropertyChange) el.attachEvent(''onresize'', onResize); var attrs = el.attributes; if (attrs.width && attrs.width.specified) { // TODO: use runtimeStyle and coordsize // el.getContext().setWidth_(attrs.width.nodeValue); el.style.width = attrs.width.nodeValue + "px"; } if (attrs.height && attrs.height.specified) { // TODO: use runtimeStyle and coordsize // el.getContext().setHeight_(attrs.height.nodeValue); el.style.height = attrs.height.nodeValue + "px"; } //el.getContext().setCoordsize_() return el; } }; function onPropertyChange(e) { // we need to watch changes to width and height switch (e.propertyName) { case ''width'': case ''height'': // TODO: coordsize and size break; } } function onResize(e) { var el = e.srcElement; if (el.firstChild) { el.firstChild.style.width = el.clientWidth + ''px''; el.firstChild.style.height = el.clientHeight + ''px''; } } G_vmlCanvasManager_.init(); // precompute "00" to "FF" var dec2hex = []; for (var i = 0; i < 16; i++) { for (var j = 0; j < 16; j++) { dec2hex[i * 16 + j] = i.toString(16) + j.toString(16); } } function createMatrixIdentity() { return [ [1, 0, 0], [0, 1, 0], [0, 0, 1] ]; } function matrixMultiply(m1, m2) { var result = createMatrixIdentity(); for (var x = 0; x < 3; x++) { for (var y = 0; y < 3; y++) { var sum = 0; for (var z = 0; z < 3; z++) { sum += m1[x][z] * m2[z][y]; } result[x][y] = sum; } } return result; } function copyState(o1, o2) { o2.fillStyle = o1.fillStyle; o2.lineCap = o1.lineCap; o2.lineJoin = o1.lineJoin; o2.lineWidth = o1.lineWidth; o2.miterLimit = o1.miterLimit; o2.shadowBlur = o1.shadowBlur; o2.shadowColor = o1.shadowColor; o2.shadowOffsetX = o1.shadowOffsetX; o2.shadowOffsetY = o1.shadowOffsetY; o2.strokeStyle = o1.strokeStyle; } function processStyle(styleString) { var str, alpha = 1; styleString = String(styleString); if (styleString.substring(0, 3) == "rgb") { var start = styleString.indexOf("(", 3); var end = styleString.indexOf(")", start + 1); var guts = styleString.substring(start + 1, end).split(","); str = "#"; for (var i = 0; i < 3; i++) { str += dec2hex[parseInt(guts[i])]; } if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) { alpha = guts[3]; } } else { str = styleString; } return [str, alpha]; } function processLineCap(lineCap) { switch (lineCap) { case "butt": return "flat"; case "round": return "round"; case "square": default: return "square"; } } /** * This class implements CanvasRenderingContext2D interface as described by * the WHATWG. * @param {HTMLElement} surfaceElement The element that the 2D context should * be associated with */ function CanvasRenderingContext2D_(surfaceElement) { this.m_ = createMatrixIdentity(); this.mStack_ = []; this.aStack_ = []; this.currentPath_ = []; // Canvas context properties this.strokeStyle = "#000"; this.fillStyle = "#ccc"; this.lineWidth = 1; this.lineJoin = "miter"; this.lineCap = "butt"; this.miterLimit = 10; this.globalAlpha = 1; var el = document.createElement(''div''); el.style.width = surfaceElement.clientWidth + ''px''; el.style.height = surfaceElement.clientHeight + ''px''; el.style.overflow = ''hidden''; el.style.position = ''absolute''; surfaceElement.appendChild(el); this.element_ = el; this.arcScaleX_ = 1; this.arcScaleY_ = 1; }; var contextPrototype = CanvasRenderingContext2D_.prototype; contextPrototype.clearRect = function() { this.element_.innerHTML = ""; this.currentPath_ = []; }; contextPrototype.beginPath = function() { // TODO: Branch current matrix so that save/restore has no effect // as per safari docs. this.currentPath_ = []; }; contextPrototype.moveTo = function(aX, aY) { this.currentPath_.push({type: "moveTo", x: aX, y: aY}); }; contextPrototype.lineTo = function(aX, aY) { this.currentPath_.push({type: "lineTo", x: aX, y: aY}); }; contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) { this.currentPath_.push({type: "bezierCurveTo", cp1x: aCP1x, cp1y: aCP1y, cp2x: aCP2x, cp2y: aCP2y, x: aX, y: aY}); }; contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { // VML''s qb produces different output to Firefox''s // FF''s behaviour seems to have changed in 1.5.0.1, check this this.bezierCurveTo(aCPx, aCPy, aCPx, aCPy, aX, aY); }; contextPrototype.arc = function(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { aRadius *= 10; var arcType = aClockwise ? "at" : "wa"; var xStart = aX + (mc(aStartAngle) * aRadius) - 5; var yStart = aY + (ms(aStartAngle) * aRadius) - 5; var xEnd = aX + (mc(aEndAngle) * aRadius) - 5; var yEnd = aY + (ms(aEndAngle) * aRadius) - 5; this.currentPath_.push({type: arcType, x: aX, y: aY, radius: aRadius, xStart: xStart, yStart: yStart, xEnd: xEnd, yEnd: yEnd}); }; contextPrototype.rect = function(aX, aY, aWidth, aHeight) { this.moveTo(aX, aY); this.lineTo(aX + aWidth, aY); this.lineTo(aX + aWidth, aY + aHeight); this.lineTo(aX, aY + aHeight); this.closePath(); }; contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { // Will destroy any existing path (same as FF behaviour) this.beginPath(); this.moveTo(aX, aY); this.lineTo(aX + aWidth, aY); this.lineTo(aX + aWidth, aY + aHeight); this.lineTo(aX, aY + aHeight); this.closePath(); this.stroke(); }; contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { // Will destroy any existing path (same as FF behaviour) this.beginPath(); this.moveTo(aX, aY); this.lineTo(aX + aWidth, aY); this.lineTo(aX + aWidth, aY + aHeight); this.lineTo(aX, aY + aHeight); this.closePath(); this.fill(); }; contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { var gradient = new CanvasGradient_("gradient"); return gradient; }; contextPrototype.createRadialGradient = function(aX0, aY0, aR0, aX1, aY1, aR1) { var gradient = new CanvasGradient_("gradientradial"); gradient.radius1_ = aR0; gradient.radius2_ = aR1; gradient.focus_.x = aX0; gradient.focus_.y = aY0; return gradient; }; contextPrototype.drawImage = function (image, var_args) { var dx, dy, dw, dh, sx, sy, sw, sh; var w = image.width; var h = image.height; if (arguments.length == 3) { dx = arguments[1]; dy = arguments[2]; sx = sy = 0; sw = dw = w; sh = dh = h; } else if (arguments.length == 5) { dx = arguments[1]; dy = arguments[2]; dw = arguments[3]; dh = arguments[4]; sx = sy = 0; sw = w; sh = h; } else if (arguments.length == 9) { sx = arguments[1]; sy = arguments[2]; sw = arguments[3]; sh = arguments[4]; dx = arguments[5]; dy = arguments[6]; dw = arguments[7]; dh = arguments[8]; } else { throw "Invalid number of arguments"; } var d = this.getCoords_(dx, dy); var w2 = (sw / 2); var h2 = (sh / 2); var vmlStr = []; // For some reason that I''ve now forgotten, using divs didn''t work vmlStr.push('' <g_vml_:group'', '' coordsize="1000,1000"'', '' coordorigin="0, 0"'' , '' style="width:100px;height:100px;position:absolute;''); // If filters are necessary (rotation exists), create them // filters are bog-slow, so only create them if abbsolutely necessary // The following check doesn''t account for skews (which don''t exist // in the canvas spec (yet) anyway. if (this.m_[0][0] != 1 || this.m_[0][1]) { var filter = []; // Note the 12/21 reversal filter.push("M11=''", this.m_[0][0], "'',", "M12=''", this.m_[1][0], "'',", "M21=''", this.m_[0][1], "'',", "M22=''", this.m_[1][1], "'',", "Dx=''", d.x, "'',", "Dy=''", d.y, "''"); // Bounding box calculation (need to minimize displayed area so that // filters don''t waste time on unused pixels. var max = d; var c2 = this.getCoords_(dx+dw, dy); var c3 = this.getCoords_(dx, dy+dh); var c4 = this.getCoords_(dx+dw, dy+dh); max.x = Math.max(max.x, c2.x, c3.x, c4.x); max.y = Math.max(max.y, c2.y, c3.y, c4.y); vmlStr.push(" padding:0 ", mr(max.x), "px ", mr(max.y), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", filter.join(""), ", sizingmethod=''clip'');") } else { vmlStr.push(" top:", d.y, "px;left:", d.x, "px;") } vmlStr.push('' ">'' , ''<g_vml_:image src="'', image.src, ''"'', '' style="width:'', dw, '';'', '' height:'', dh, '';"'', '' cropleft="'', sx / w, ''"'', '' croptop="'', sy / h, ''"'', '' cropright="'', (w - sx - sw) / w, ''"'', '' cropbottom="'', (h - sy - sh) / h, ''"'', '' />'', ''</g_vml_:group>''); this.element_.insertAdjacentHTML("BeforeEnd", vmlStr.join("")); }; contextPrototype.stroke = function(aFill) { var lineStr = []; var lineOpen = false; var a = processStyle(aFill ? this.fillStyle : this.strokeStyle); var color = a[0]; var opacity = a[1] * this.globalAlpha; lineStr.push(''<g_vml_:shape'', '' fillcolor="'', color, ''"'', '' filled="'', Boolean(aFill), ''"'', '' style="position:absolute;width:10;height:10;"'', '' coordorigin="0 0" coordsize="100 100"'', '' stroked="'', !aFill, ''"'', '' strokeweight="'', this.lineWidth, ''"'', '' strokecolor="'', color, ''"'', '' path="''); var newSeq = false; var min = {x: null, y: null}; var max = {x: null, y: null}; for (var i = 0; i < this.currentPath_.length; i++) { var p = this.currentPath_[i]; if (p.type == "moveTo") { lineStr.push(" m "); var c = this.getCoords_(p.x, p.y); lineStr.push(mr(c.x), ",", mr(c.y)); } else if (p.type == "lineTo") { lineStr.push(" l "); var c = this.getCoords_(p.x, p.y); lineStr.push(mr(c.x), ",", mr(c.y)); } else if (p.type == "close") { lineStr.push(" x "); } else if (p.type == "bezierCurveTo") { lineStr.push(" c "); var c = this.getCoords_(p.x, p.y); var c1 = this.getCoords_(p.cp1x, p.cp1y); var c2 = this.getCoords_(p.cp2x, p.cp2y); lineStr.push(mr(c1.x), ",", mr(c1.y), ",", mr(c2.x), ",", mr(c2.y), ",", mr(c.x), ",", mr(c.y)); } else if (p.type == "at" || p.type == "wa") { lineStr.push(" ", p.type, " "); var c = this.getCoords_(p.x, p.y); var cStart = this.getCoords_(p.xStart, p.yStart); var cEnd = this.getCoords_(p.xEnd, p.yEnd); lineStr.push(mr(c.x - this.arcScaleX_ * p.radius), ",", mr(c.y - this.arcScaleY_ * p.radius), " ", mr(c.x + this.arcScaleX_ * p.radius), ",", mr(c.y + this.arcScaleY_ * p.radius), " ", mr(cStart.x), ",", mr(cStart.y), " ", mr(cEnd.x), ",", mr(cEnd.y)); } // TODO: Following is broken for curves due to // move to proper paths. // Figure out dimensions so we can do gradient fills // properly if(c) { if (min.x == null || c.x < min.x) { min.x = c.x; } if (max.x == null || c.x > max.x) { max.x = c.x; } if (min.y == null || c.y < min.y) { min.y = c.y; } if (max.y == null || c.y > max.y) { max.y = c.y; } } } lineStr.push('' ">''); if (typeof this.fillStyle == "object") { var focus = {x: "50%", y: "50%"}; var width = (max.x - min.x); var height = (max.y - min.y); var dimension = (width > height) ? width : height; focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%"; focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%"; var colors = []; // inside radius (%) if (this.fillStyle.type_ == "gradientradial") { var inside = (this.fillStyle.radius1_ / dimension * 100); // percentage that outside radius exceeds inside radius var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside; } else { var inside = 0; var expansion = 100; } var insidecolor = {offset: null, color: null}; var outsidecolor = {offset: null, color: null}; // We need to sort ''colors'' by percentage, from 0 > 100 otherwise ie // won''t interpret it correctly this.fillStyle.colors_.sort(function (cs1, cs2) { return cs1.offset - cs2.offset; }); for (var i = 0; i < this.fillStyle.colors_.length; i++) { var fs = this.fillStyle.colors_[i]; colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ","); if (fs.offset > insidecolor.offset || insidecolor.offset == null) { insidecolor.offset = fs.offset; insidecolor.color = fs.color; } if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) { outsidecolor.offset = fs.offset; outsidecolor.color = fs.color; } } colors.pop(); lineStr.push(''<g_vml_:fill'', '' color="'', outsidecolor.color, ''"'', '' color2="'', insidecolor.color, ''"'', '' type="'', this.fillStyle.type_, ''"'', '' focusposition="'', focus.x, '', '', focus.y, ''"'', '' colors="'', colors.join(""), ''"'', '' opacity="'', opacity, ''" />''); } else if (aFill) { lineStr.push(''<g_vml_:fill color="'', color, ''" opacity="'', opacity, ''" />''); } else { lineStr.push( ''<g_vml_:stroke'', '' opacity="'', opacity,''"'', '' joinstyle="'', this.lineJoin, ''"'', '' miterlimit="'', this.miterLimit, ''"'', '' endcap="'', processLineCap(this.lineCap) ,''"'', '' weight="'', this.lineWidth, ''px"'', '' color="'', color,''" />'' ); } lineStr.push("</g_vml_:shape>"); this.element_.insertAdjacentHTML("beforeEnd", lineStr.join("")); this.currentPath_ = []; }; contextPrototype.fill = function() { this.stroke(true); } contextPrototype.closePath = function() { this.currentPath_.push({type: "close"}); }; /** * @private */ contextPrototype.getCoords_ = function(aX, aY) { return { x: 10 * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - 5, y: 10 * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - 5 } }; contextPrototype.save = function() { var o = {}; copyState(this, o); this.aStack_.push(o); this.mStack_.push(this.m_); this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); }; contextPrototype.restore = function() { copyState(this.aStack_.pop(), this); this.m_ = this.mStack_.pop(); }; contextPrototype.translate = function(aX, aY) { var m1 = [ [1, 0, 0], [0, 1, 0], [aX, aY, 1] ]; this.m_ = matrixMultiply(m1, this.m_); }; contextPrototype.rotate = function(aRot) { var c = mc(aRot); var s = ms(aRot); var m1 = [ [c, s, 0], [-s, c, 0], [0, 0, 1] ]; this.m_ = matrixMultiply(m1, this.m_); }; contextPrototype.scale = function(aX, aY) { this.arcScaleX_ *= aX; this.arcScaleY_ *= aY; var m1 = [ [aX, 0, 0], [0, aY, 0], [0, 0, 1] ]; this.m_ = matrixMultiply(m1, this.m_); }; /******** STUBS ********/ contextPrototype.clip = function() { // TODO: Implement }; contextPrototype.arcTo = function() { // TODO: Implement }; contextPrototype.createPattern = function() { return new CanvasPattern_; }; // Gradient / Pattern Stubs function CanvasGradient_(aType) { this.type_ = aType; this.radius1_ = 0; this.radius2_ = 0; this.colors_ = []; this.focus_ = {x: 0, y: 0}; } CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { aColor = processStyle(aColor); this.colors_.push({offset: 1-aOffset, color: aColor}); }; function CanvasPattern_() {} // set up externs G_vmlCanvasManager = G_vmlCanvasManager_; CanvasRenderingContext2D = CanvasRenderingContext2D_; CanvasGradient = CanvasGradient_; CanvasPattern = CanvasPattern_; })(); } // if '
</methods> <methods> Seaside.PKScriptLibrary <category>accessing</category>
mochiKitJs ^'/*** MochiKit.MochiKit 1.3.1 : PACKED VERSION THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please diff against the source tree, not this file. See <http://mochikit.com/> for documentation, downloads, license, etc. (c) 2005 Bob Ippolito. All rights Reserved. ***/ if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Base"); } if(typeof (MochiKit)=="undefined"){ MochiKit={}; } if(typeof (MochiKit.Base)=="undefined"){ MochiKit.Base={}; } MochiKit.Base.VERSION="1.3.1"; MochiKit.Base.NAME="MochiKit.Base"; MochiKit.Base.update=function(_1,_2){ if(_1===null){ _1={}; } for(var i=1;i<arguments.length;i++){ var o=arguments[i]; if(typeof (o)!="undefined"&&o!==null){ for(var k in o){ _1[k]=o[k]; } } } return _1; }; MochiKit.Base.update(MochiKit.Base,{__repr__:function(){ return "["+this.NAME+" "+this.VERSION+"]"; },toString:function(){ return this.__repr__(); },counter:function(n){ if(arguments.length===0){ n=1; } return function(){ return n++; }; },clone:function(_7){ var me=arguments.callee; if(arguments.length==1){ me.prototype=_7; return new me(); } },flattenArguments:function(_9){ var res=[]; var m=MochiKit.Base; var _12=m.extend(null,arguments); while(_12.length){ var o=_12.shift(); if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){ for(var i=o.length-1;i>=0;i--){ _12.unshift(o[i]); } }else{ res.push(o); } } return res; },extend:function(_13,obj,_15){ if(!_15){ _15=0; } if(obj){ var l=obj.length; if(typeof (l)!="number"){ if(typeof (MochiKit.Iter)!="undefined"){ obj=MochiKit.Iter.list(obj); l=obj.length; }else{ throw new TypeError("Argument not an array-like and MochiKit.Iter not present"); } } if(!_13){ _13=[]; } for(var i=_15;i<l;i++){ _13.push(obj[i]); } } return _13; },updatetree:function(_17,obj){ if(_17===null){ _17={}; } for(var i=1;i<arguments.length;i++){ var o=arguments[i]; if(typeof (o)!="undefined"&&o!==null){ for(var k in o){ var v=o[k]; if(typeof (_17[k])=="object"&&typeof (v)=="object"){ arguments.callee(_17[k],v); }else{ _17[k]=v; } } } } return _17; },setdefault:function(_19,obj){ if(_19===null){ _19={}; } for(var i=1;i<arguments.length;i++){ var o=arguments[i]; for(var k in o){ if(!(k in _19)){ _19[k]=o[k]; } } } return _19; },keys:function(obj){ var _20=[]; for(var _21 in obj){ _20.push(_21); } return _20; },items:function(obj){ var _22=[]; var e; for(var _24 in obj){ var v; try{ v=obj[_24]; } catch(e){ continue; } _22.push([_24,v]); } return _22; },_newNamedError:function(_25,_26,_27){ _27.prototype=new MochiKit.Base.NamedError(_25.NAME+"."+_26); _25[_26]=_27; },operator:{truth:function(a){ return !!a; },lognot:function(a){ return !a; },identity:function(a){ return a; },not:function(a){ return ~a; },neg:function(a){ return -a; },add:function(a,b){ return a+b; },sub:function(a,b){ return a-b; },div:function(a,b){ return a/b; },mod:function(a,b){ return a%b; },mul:function(a,b){ return a*b; },and:function(a,b){ return a&b; },or:function(a,b){ return a|b; },xor:function(a,b){ return a^b; },lshift:function(a,b){ return a<<b; },rshift:function(a,b){ return a>>b; },zrshift:function(a,b){ return a>>>b; },eq:function(a,b){ return a==b; },ne:function(a,b){ return a!=b; },gt:function(a,b){ return a>b; },ge:function(a,b){ return a>=b; },lt:function(a,b){ return a<b; },le:function(a,b){ return a<=b; },ceq:function(a,b){ return MochiKit.Base.compare(a,b)===0; },cne:function(a,b){ return MochiKit.Base.compare(a,b)!==0; },cgt:function(a,b){ return MochiKit.Base.compare(a,b)==1; },cge:function(a,b){ return MochiKit.Base.compare(a,b)!=-1; },clt:function(a,b){ return MochiKit.Base.compare(a,b)==-1; },cle:function(a,b){ return MochiKit.Base.compare(a,b)!=1; },logand:function(a,b){ return a&&b; },logor:function(a,b){ return a||b; },contains:function(a,b){ return b in a; }},forwardCall:function(_30){ return function(){ return this[_30].apply(this,arguments); }; },itemgetter:function(_31){ return function(arg){ return arg[_31]; }; },typeMatcher:function(){ var _33={}; for(var i=0;i<arguments.length;i++){ var typ=arguments[i]; _33[typ]=typ; } return function(){ for(var i=0;i<arguments.length;i++){ if(!(typeof (arguments[i]) in _33)){ return false; } } return true; }; },isNull:function(){ for(var i=0;i<arguments.length;i++){ if(arguments[i]!==null){ return false; } } return true; },isUndefinedOrNull:function(){ for(var i=0;i<arguments.length;i++){ var o=arguments[i]; if(!(typeof (o)=="undefined"||o===null)){ return false; } } return true; },isEmpty:function(obj){ return !MochiKit.Base.isNotEmpty.apply(this,arguments); },isNotEmpty:function(obj){ for(var i=0;i<arguments.length;i++){ var o=arguments[i]; if(!(o&&o.length)){ return false; } } return true; },isArrayLike:function(){ for(var i=0;i<arguments.length;i++){ var o=arguments[i]; var typ=typeof (o); if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"){ return false; } } return true; },isDateLike:function(){ for(var i=0;i<arguments.length;i++){ var o=arguments[i]; if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){ return false; } } return true; },xmap:function(fn){ if(fn===null){ return MochiKit.Base.extend(null,arguments,1); } var _36=[]; for(var i=1;i<arguments.length;i++){ _36.push(fn(arguments[i])); } return _36; },map:function(fn,lst){ var m=MochiKit.Base; var itr=MochiKit.Iter; var _39=m.isArrayLike; if(arguments.length<=2){ if(!_39(lst)){ if(itr){ lst=itr.list(lst); if(fn===null){ return lst; } }else{ throw new TypeError("Argument not an array-like and MochiKit.Iter not present"); } } if(fn===null){ return m.extend(null,lst); } var _40=[]; for(var i=0;i<lst.length;i++){ _40.push(fn(lst[i])); } return _40; }else{ if(fn===null){ fn=Array; } var _41=null; for(i=1;i<arguments.length;i++){ if(!_39(arguments[i])){ if(itr){ return itr.list(itr.imap.apply(null,arguments)); }else{ throw new TypeError("Argument not an array-like and MochiKit.Iter not present"); } } var l=arguments[i].length; if(_41===null||_41>l){ _41=l; } } _40=[]; for(i=0;i<_41;i++){ var _42=[]; for(var j=1;j<arguments.length;j++){ _42.push(arguments[j][i]); } _40.push(fn.apply(this,_42)); } return _40; } },xfilter:function(fn){ var _44=[]; if(fn===null){ fn=MochiKit.Base.operator.truth; } for(var i=1;i<arguments.length;i++){ var o=arguments[i]; if(fn(o)){ _44.push(o); } } return _44; },filter:function(fn,lst,_45){ var _46=[]; var m=MochiKit.Base; if(!m.isArrayLike(lst)){ if(MochiKit.Iter){ lst=MochiKit.Iter.list(lst); }else{ throw new TypeError("Argument not an array-like and MochiKit.Iter not present"); } } if(fn===null){ fn=m.operator.truth; } if(typeof (Array.prototype.filter)=="function"){ return Array.prototype.filter.call(lst,fn,_45); }else{ if(typeof (_45)=="undefined"||_45===null){ for(var i=0;i<lst.length;i++){ var o=lst[i]; if(fn(o)){ _46.push(o); } } }else{ for(i=0;i<lst.length;i++){ o=lst[i]; if(fn.call(_45,o)){ _46.push(o); } } } } return _46; },_wrapDumbFunction:function(_47){ return function(){ switch(arguments.length){ case 0: return _47(); case 1: return _47(arguments[0]); case 2: return _47(arguments[0],arguments[1]); case 3: return _47(arguments[0],arguments[1],arguments[2]); } var _48=[]; for(var i=0;i<arguments.length;i++){ _48.push("arguments["+i+"]"); } return eval("(func("+_48.join(",")+"))"); }; },method:function(_49,_50){ var m=MochiKit.Base; return m.bind.apply(this,m.extend([_50,_49],arguments,2)); },bind:function(_51,_52){ if(typeof (_51)=="string"){ _51=_52[_51]; } var _53=_51.im_func; var _54=_51.im_preargs; var _55=_51.im_self; var m=MochiKit.Base; if(typeof (_51)=="function"&&typeof (_51.apply)=="undefined"){ _51=m._wrapDumbFunction(_51); } if(typeof (_53)!="function"){ _53=_51; } if(typeof (_52)!="undefined"){ _55=_52; } if(typeof (_54)=="undefined"){ _54=[]; }else{ _54=_54.slice(); } m.extend(_54,arguments,2); var _56=function(){ var _57=arguments; var me=arguments.callee; if(me.im_preargs.length>0){ _57=m.concat(me.im_preargs,_57); } var _52=me.im_self; if(!_52){ _52=this; } return me.im_func.apply(_52,_57); }; _56.im_self=_55; _56.im_func=_53; _56.im_preargs=_54; return _56; },bindMethods:function(_58){ var _59=MochiKit.Base.bind; for(var k in _58){ var _60=_58[k]; if(typeof (_60)=="function"){ _58[k]=_59(_60,_58); } } },registerComparator:function(_61,_62,_63,_64){ MochiKit.Base.comparatorRegistry.register(_61,_62,_63,_64); },_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){ if(a==b){ return 0; } var _65=(typeof (a)=="undefined"||a===null); var _66=(typeof (b)=="undefined"||b===null); if(_65&&_66){ return 0; }else{ if(_65){ return -1; }else{ if(_66){ return 1; } } } var m=MochiKit.Base; var _67=m._primitives; if(!(typeof (a) in _67&&typeof (b) in _67)){ try{ return m.comparatorRegistry.match(a,b); } catch(e){ if(e!=m.NotFound){ throw e; } } } if(a<b){ return -1; }else{ if(a>b){ return 1; } } var _68=m.repr; throw new TypeError(_68(a)+" and "+_68(b)+" can not be compared"); },compareDateLike:function(a,b){ return MochiKit.Base.compare(a.getTime(),b.getTime()); },compareArrayLike:function(a,b){ var _69=MochiKit.Base.compare; var _70=a.length; var _71=0; if(_70>b.length){ _71=1; _70=b.length; }else{ if(_70<b.length){ _71=-1; } } for(var i=0;i<_70;i++){ var cmp=_69(a[i],b[i]); if(cmp){ return cmp; } } return _71; },registerRepr:function(_73,_74,_75,_76){ MochiKit.Base.reprRegistry.register(_73,_74,_75,_76); },repr:function(o){ if(typeof (o)=="undefined"){ return "undefined"; }else{ if(o===null){ return "null"; } } try{ if(typeof (o.__repr__)=="function"){ return o.__repr__(); }else{ if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){ return o.repr(); } } return MochiKit.Base.reprRegistry.match(o); } catch(e){ if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){ return o.NAME; } } try{ var _77=(o+""); } catch(e){ return "["+typeof (o)+"]"; } if(typeof (o)=="function"){ o=_77.replace(/^\s+/,""); var idx=o.indexOf("{"); if(idx!=-1){ o=o.substr(0,idx)+"{...}"; } } return _77; },reprArrayLike:function(o){ var m=MochiKit.Base; return "["+m.map(m.repr,o).join(", ")+"]"; },reprString:function(o){ return ("\""+o.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"); },reprNumber:function(o){ return o+""; },registerJSON:function(_79,_80,_81,_82){ MochiKit.Base.jsonRegistry.register(_79,_80,_81,_82); },evalJSON:function(){ return eval("("+arguments[0]+")"); },serializeJSON:function(o){ var _83=typeof (o); if(_83=="undefined"){ return "undefined"; }else{ if(_83=="number"||_83=="boolean"){ return o+""; }else{ if(o===null){ return "null"; } } } var m=MochiKit.Base; var _84=m.reprString; if(_83=="string"){ return _84(o); } var me=arguments.callee; var _85; if(typeof (o.__json__)=="function"){ _85=o.__json__(); if(o!==_85){ return me(_85); } } if(typeof (o.json)=="function"){ _85=o.json(); if(o!==_85){ return me(_85); } } if(_83!="function"&&typeof (o.length)=="number"){ var res=[]; for(var i=0;i<o.length;i++){ var val=me(o[i]); if(typeof (val)!="string"){ val="undefined"; } res.push(val); } return "["+res.join(", ")+"]"; } try{ _85=m.jsonRegistry.match(o); return me(_85); } catch(e){ if(e!=m.NotFound){ throw e; } } if(_83=="function"){ return null; } res=[]; for(var k in o){ var _87; if(typeof (k)=="number"){ _87="\""+k+"\""; }else{ if(typeof (k)=="string"){ _87=_84(k); }else{ continue; } } val=me(o[k]); if(typeof (val)!="string"){ continue; } res.push(_87+":"+val); } return "{"+res.join(", ")+"}"; },objEqual:function(a,b){ return (MochiKit.Base.compare(a,b)===0); },arrayEqual:function(_88,arr){ if(_88.length!=arr.length){ return false; } return (MochiKit.Base.compare(_88,arr)===0); },concat:function(){ var _90=[]; var _91=MochiKit.Base.extend; for(var i=0;i<arguments.length;i++){ _91(_90,arguments[i]); } return _90; },keyComparator:function(key){ var m=MochiKit.Base; var _93=m.compare; if(arguments.length==1){ return function(a,b){ return _93(a[key],b[key]); }; } var _94=m.extend(null,arguments); return function(a,b){ var _95=0; for(var i=0;(_95===0)&&(i<_94.length);i++){ var key=_94[i]; _95=_93(a[key],b[key]); } return _95; }; },reverseKeyComparator:function(key){ var _96=MochiKit.Base.keyComparator.apply(this,arguments); return function(a,b){ return _96(b,a); }; },partial:function(_97){ var m=MochiKit.Base; return m.bind.apply(this,m.extend([_97,undefined],arguments,1)); },listMinMax:function(_98,lst){ if(lst.length===0){ return null; } var cur=lst[0]; var _100=MochiKit.Base.compare; for(var i=1;i<lst.length;i++){ var o=lst[i]; if(_100(o,cur)==_98){ cur=o; } } return cur; },objMax:function(){ return MochiKit.Base.listMinMax(1,arguments); },objMin:function(){ return MochiKit.Base.listMinMax(-1,arguments); },findIdentical:function(lst,_101,_102,end){ if(typeof (end)=="undefined"||end===null){ end=lst.length; } for(var i=(_102||0);i<end;i++){ if(lst[i]===_101){ return i; } } return -1; },findValue:function(lst,_104,_105,end){ if(typeof (end)=="undefined"||end===null){ end=lst.length; } var cmp=MochiKit.Base.compare; for(var i=(_105||0);i<end;i++){ if(cmp(lst[i],_104)===0){ return i; } } return -1; },nodeWalk:function(node,_107){ var _108=[node]; var _109=MochiKit.Base.extend; while(_108.length){ var res=_107(_108.shift()); if(res){ _109(_108,res); } } },nameFunctions:function(_110){ var base=_110.NAME; if(typeof (base)=="undefined"){ base=""; }else{ base=base+"."; } for(var name in _110){ var o=_110[name]; if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){ try{ o.NAME=base+name; } catch(e){ } } } },queryString:function(_113,_114){ if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_113)=="string"||(typeof (_113.nodeType)!="undefined"&&_113.nodeType>0))){ var kv=MochiKit.DOM.formContents(_113); _113=kv[0]; _114=kv[1]; }else{ if(arguments.length==1){ var o=_113; _113=[]; _114=[]; for(var k in o){ var v=o[k]; if(typeof (v)!="function"){ _113.push(k); _114.push(v); } } } } var rval=[]; var len=Math.min(_113.length,_114.length); var _118=MochiKit.Base.urlEncode; for(var i=0;i<len;i++){ v=_114[i]; if(typeof (v)!="undefined"&&v!==null){ rval.push(_118(_113[i])+"="+_118(v)); } } return rval.join("&"); },parseQueryString:function(_119,_120){ var _121=_119.replace(/\+/g,"%20").split("&"); var o={}; var _122; if(typeof (decodeURIComponent)!="undefined"){ _122=decodeURIComponent; }else{ _122=unescape; } if(_120){ for(var i=0;i<_121.length;i++){ var pair=_121[i].split("="); var name=_122(pair[0]); var arr=o[name]; if(!(arr instanceof Array)){ arr=[]; o[name]=arr; } arr.push(_122(pair[1])); } }else{ for(i=0;i<_121.length;i++){ pair=_121[i].split("="); o[_122(pair[0])]=_122(pair[1]); } } return o; }}); MochiKit.Base.AdapterRegistry=function(){ this.pairs=[]; }; MochiKit.Base.AdapterRegistry.prototype={register:function(name,_124,wrap,_126){ if(_126){ this.pairs.unshift([name,_124,wrap]); }else{ this.pairs.push([name,_124,wrap]); } },match:function(){ for(var i=0;i<this.pairs.length;i++){ var pair=this.pairs[i]; if(pair[1].apply(this,arguments)){ return pair[2].apply(this,arguments); } } throw MochiKit.Base.NotFound; },unregister:function(name){ for(var i=0;i<this.pairs.length;i++){ var pair=this.pairs[i]; if(pair[0]==name){ this.pairs.splice(i,1); return true; } } return false; }}; MochiKit.Base.EXPORT=["counter","clone","extend","update","updatetree","setdefault","keys","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","bind","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method"]; MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"]; MochiKit.Base._exportSymbols=function(_127,_128){ if(typeof (MochiKit.__export__)=="undefined"){ MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")); } if(!MochiKit.__export__){ return; } var all=_128.EXPORT_TAGS[":all"]; for(var i=0;i<all.length;i++){ _127[all[i]]=_128[all[i]]; } }; MochiKit.Base.__new__=function(){ var m=this; m.forward=m.forwardCall; m.find=m.findValue; if(typeof (encodeURIComponent)!="undefined"){ m.urlEncode=function(_130){ return encodeURIComponent(_130).replace(/\''/g,"%27"); }; }else{ m.urlEncode=function(_131){ return escape(_131).replace(/\+/g,"%2B").replace(/\"/g,"%22").rval.replace(/\''/g,"%27"); }; } m.NamedError=function(name){ this.message=name; this.name=name; }; m.NamedError.prototype=new Error(); m.update(m.NamedError.prototype,{repr:function(){ if(this.message&&this.message!=this.name){ return this.name+"("+m.repr(this.message)+")"; }else{ return this.name+"()"; } },toString:m.forwardCall("repr")}); m.NotFound=new m.NamedError("MochiKit.Base.NotFound"); m.listMax=m.partial(m.listMinMax,1); m.listMin=m.partial(m.listMinMax,-1); m.isCallable=m.typeMatcher("function"); m.isUndefined=m.typeMatcher("undefined"); m.merge=m.partial(m.update,null); m.zip=m.partial(m.map,null); m.comparatorRegistry=new m.AdapterRegistry(); m.registerComparator("dateLike",m.isDateLike,m.compareDateLike); m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike); m.reprRegistry=new m.AdapterRegistry(); m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike); m.registerRepr("string",m.typeMatcher("string"),m.reprString); m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber); m.jsonRegistry=new m.AdapterRegistry(); var all=m.concat(m.EXPORT,m.EXPORT_OK); m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all}; m.nameFunctions(this); }; MochiKit.Base.__new__(); if(!MochiKit.__compat__){ compare=MochiKit.Base.compare; } MochiKit.Base._exportSymbols(this,MochiKit.Base); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Iter"); dojo.require("MochiKit.Base"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); } try{ if(typeof (MochiKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Iter depends on MochiKit.Base!"; } if(typeof (MochiKit.Iter)=="undefined"){ MochiKit.Iter={}; } MochiKit.Iter.NAME="MochiKit.Iter"; MochiKit.Iter.VERSION="1.3.1"; MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){ return "["+this.NAME+" "+this.VERSION+"]"; },toString:function(){ return this.__repr__(); },registerIteratorFactory:function(name,_132,_133,_134){ MochiKit.Iter.iteratorRegistry.register(name,_132,_133,_134); },iter:function(_135,_136){ var self=MochiKit.Iter; if(arguments.length==2){ return self.takewhile(function(a){ return a!=_136; },_135); } if(typeof (_135.next)=="function"){ return _135; }else{ if(typeof (_135.iter)=="function"){ return _135.iter(); } } try{ return self.iteratorRegistry.match(_135); } catch(e){ var m=MochiKit.Base; if(e==m.NotFound){ e=new TypeError(typeof (_135)+": "+m.repr(_135)+" is not iterable"); } throw e; } },count:function(n){ if(!n){ n=0; } var m=MochiKit.Base; return {repr:function(){ return "count("+n+")"; },toString:m.forwardCall("repr"),next:m.counter(n)}; },cycle:function(p){ var self=MochiKit.Iter; var m=MochiKit.Base; var lst=[]; var _139=self.iter(p); return {repr:function(){ return "cycle(...)"; },toString:m.forwardCall("repr"),next:function(){ try{ var rval=_139.next(); lst.push(rval); return rval; } catch(e){ if(e!=self.StopIteration){ throw e; } if(lst.length===0){ this.next=function(){ throw self.StopIteration; }; }else{ var i=-1; this.next=function(){ i=(i+1)%lst.length; return lst[i]; }; } return this.next(); } }}; },repeat:function(elem,n){ var m=MochiKit.Base; if(typeof (n)=="undefined"){ return {repr:function(){ return "repeat("+m.repr(elem)+")"; },toString:m.forwardCall("repr"),next:function(){ return elem; }}; } return {repr:function(){ return "repeat("+m.repr(elem)+", "+n+")"; },toString:m.forwardCall("repr"),next:function(){ if(n<=0){ throw MochiKit.Iter.StopIteration; } n-=1; return elem; }}; },next:function(_141){ return _141.next(); },izip:function(p,q){ var m=MochiKit.Base; var next=MochiKit.Iter.next; var _144=m.map(iter,arguments); return {repr:function(){ return "izip(...)"; },toString:m.forwardCall("repr"),next:function(){ return m.map(next,_144); }}; },ifilter:function(pred,seq){ var m=MochiKit.Base; seq=MochiKit.Iter.iter(seq); if(pred===null){ pred=m.operator.truth; } return {repr:function(){ return "ifilter(...)"; },toString:m.forwardCall("repr"),next:function(){ while(true){ var rval=seq.next(); if(pred(rval)){ return rval; } } return undefined; }}; },ifilterfalse:function(pred,seq){ var m=MochiKit.Base; seq=MochiKit.Iter.iter(seq); if(pred===null){ pred=m.operator.truth; } return {repr:function(){ return "ifilterfalse(...)"; },toString:m.forwardCall("repr"),next:function(){ while(true){ var rval=seq.next(); if(!pred(rval)){ return rval; } } return undefined; }}; },islice:function(seq){ var self=MochiKit.Iter; var m=MochiKit.Base; seq=self.iter(seq); var _147=0; var stop=0; var step=1; var i=-1; if(arguments.length==2){ stop=arguments[1]; }else{ if(arguments.length==3){ _147=arguments[1]; stop=arguments[2]; }else{ _147=arguments[1]; stop=arguments[2]; step=arguments[3]; } } return {repr:function(){ return "islice("+["...",_147,stop,step].join(", ")+")"; },toString:m.forwardCall("repr"),next:function(){ var rval; while(i<_147){ rval=seq.next(); i++; } if(_147>=stop){ throw self.StopIteration; } _147+=step; return rval; }}; },imap:function(fun,p,q){ var m=MochiKit.Base; var self=MochiKit.Iter; var _151=m.map(self.iter,m.extend(null,arguments,1)); var map=m.map; var next=self.next; return {repr:function(){ return "imap(...)"; },toString:m.forwardCall("repr"),next:function(){ return fun.apply(this,map(next,_151)); }}; },applymap:function(fun,seq,self){ seq=MochiKit.Iter.iter(seq); var m=MochiKit.Base; return {repr:function(){ return "applymap(...)"; },toString:m.forwardCall("repr"),next:function(){ return fun.apply(self,seq.next()); }}; },chain:function(p,q){ var self=MochiKit.Iter; var m=MochiKit.Base; if(arguments.length==1){ return self.iter(arguments[0]); } var _153=m.map(self.iter,arguments); return {repr:function(){ return "chain(...)"; },toString:m.forwardCall("repr"),next:function(){ while(_153.length>1){ try{ return _153[0].next(); } catch(e){ if(e!=self.StopIteration){ throw e; } _153.shift(); } } if(_153.length==1){ var arg=_153.shift(); this.next=m.bind("next",arg); return this.next(); } throw self.StopIteration; }}; },takewhile:function(pred,seq){ var self=MochiKit.Iter; seq=self.iter(seq); return {repr:function(){ return "takewhile(...)"; },toString:MochiKit.Base.forwardCall("repr"),next:function(){ var rval=seq.next(); if(!pred(rval)){ this.next=function(){ throw self.StopIteration; }; this.next(); } return rval; }}; },dropwhile:function(pred,seq){ seq=MochiKit.Iter.iter(seq); var m=MochiKit.Base; var bind=m.bind; return {"repr":function(){ return "dropwhile(...)"; },"toString":m.forwardCall("repr"),"next":function(){ while(true){ var rval=seq.next(); if(!pred(rval)){ break; } } this.next=bind("next",seq); return rval; }}; },_tee:function(_155,sync,_157){ sync.pos[_155]=-1; var m=MochiKit.Base; var _158=m.listMin; return {repr:function(){ return "tee("+_155+", ...)"; },toString:m.forwardCall("repr"),next:function(){ var rval; var i=sync.pos[_155]; if(i==sync.max){ rval=_157.next(); sync.deque.push(rval); sync.max+=1; sync.pos[_155]+=1; }else{ rval=sync.deque[i-sync.min]; sync.pos[_155]+=1; if(i==sync.min&&_158(sync.pos)!=sync.min){ sync.min+=1; sync.deque.shift(); } } return rval; }}; },tee:function(_159,n){ var rval=[]; var sync={"pos":[],"deque":[],"max":-1,"min":-1}; if(arguments.length==1){ n=2; } var self=MochiKit.Iter; _159=self.iter(_159); var _tee=self._tee; for(var i=0;i<n;i++){ rval.push(_tee(i,sync,_159)); } return rval; },list:function(_161){ var m=MochiKit.Base; if(typeof (_161.slice)=="function"){ return _161.slice(); }else{ if(m.isArrayLike(_161)){ return m.concat(_161); } } var self=MochiKit.Iter; _161=self.iter(_161); var rval=[]; try{ while(true){ rval.push(_161.next()); } } catch(e){ if(e!=self.StopIteration){ throw e; } return rval; } return undefined; },reduce:function(fn,_162,_163){ var i=0; var x=_163; var self=MochiKit.Iter; _162=self.iter(_162); if(arguments.length<3){ try{ x=_162.next(); } catch(e){ if(e==self.StopIteration){ e=new TypeError("reduce() of empty sequence with no initial value"); } throw e; } i++; } try{ while(true){ x=fn(x,_162.next()); } } catch(e){ if(e!=self.StopIteration){ throw e; } } return x; },range:function(){ var _165=0; var stop=0; var step=1; if(arguments.length==1){ stop=arguments[0]; }else{ if(arguments.length==2){ _165=arguments[0]; stop=arguments[1]; }else{ if(arguments.length==3){ _165=arguments[0]; stop=arguments[1]; step=arguments[2]; }else{ throw new TypeError("range() takes 1, 2, or 3 arguments!"); } } } if(step===0){ throw new TypeError("range() step must not be 0"); } return {next:function(){ if((step>0&&_165>=stop)||(step<0&&_165<=stop)){ throw MochiKit.Iter.StopIteration; } var rval=_165; _165+=step; return rval; },repr:function(){ return "range("+[_165,stop,step].join(", ")+")"; },toString:MochiKit.Base.forwardCall("repr")}; },sum:function(_166,_167){ var x=_167||0; var self=MochiKit.Iter; _166=self.iter(_166); try{ while(true){ x+=_166.next(); } } catch(e){ if(e!=self.StopIteration){ throw e; } } return x; },exhaust:function(_168){ var self=MochiKit.Iter; _168=self.iter(_168); try{ while(true){ _168.next(); } } catch(e){ if(e!=self.StopIteration){ throw e; } } },forEach:function(_169,func,self){ var m=MochiKit.Base; if(arguments.length>2){ func=m.bind(func,self); } if(m.isArrayLike(_169)){ try{ for(var i=0;i<_169.length;i++){ func(_169[i]); } } catch(e){ if(e!=MochiKit.Iter.StopIteration){ throw e; } } }else{ self=MochiKit.Iter; self.exhaust(self.imap(func,_169)); } },every:function(_171,func){ var self=MochiKit.Iter; try{ self.ifilterfalse(func,_171).next(); return false; } catch(e){ if(e!=self.StopIteration){ throw e; } return true; } },sorted:function(_172,cmp){ var rval=MochiKit.Iter.list(_172); if(arguments.length==1){ cmp=MochiKit.Base.compare; } rval.sort(cmp); return rval; },reversed:function(_173){ var rval=MochiKit.Iter.list(_173); rval.reverse(); return rval; },some:function(_174,func){ var self=MochiKit.Iter; try{ self.ifilter(func,_174).next(); return true; } catch(e){ if(e!=self.StopIteration){ throw e; } return false; } },iextend:function(lst,_175){ if(MochiKit.Base.isArrayLike(_175)){ for(var i=0;i<_175.length;i++){ lst.push(_175[i]); } }else{ var self=MochiKit.Iter; _175=self.iter(_175); try{ while(true){ lst.push(_175.next()); } } catch(e){ if(e!=self.StopIteration){ throw e; } } } return lst; },groupby:function(_176,_177){ var m=MochiKit.Base; var self=MochiKit.Iter; if(arguments.length<2){ _177=m.operator.identity; } _176=self.iter(_176); var pk=undefined; var k=undefined; var v; function fetch(){ v=_176.next(); k=_177(v); } function eat(){ var ret=v; v=undefined; return ret; } var _180=true; return {repr:function(){ return "groupby(...)"; },next:function(){ while(k==pk){ fetch(); if(_180){ _180=false; break; } } pk=k; return [k,{next:function(){ if(v==undefined){ fetch(); } if(k!=pk){ throw self.StopIteration; } return eat(); }}]; }}; },groupby_as_array:function(_181,_182){ var m=MochiKit.Base; var self=MochiKit.Iter; if(arguments.length<2){ _182=m.operator.identity; } _181=self.iter(_181); var _183=[]; var _184=true; var _185; while(true){ try{ var _186=_181.next(); var key=_182(_186); } catch(e){ if(e==self.StopIteration){ break; } throw e; } if(_184||key!=_185){ var _187=[]; _183.push([key,_187]); } _187.push(_186); _184=false; _185=key; } return _183; },arrayLikeIter:function(_188){ var i=0; return {repr:function(){ return "arrayLikeIter(...)"; },toString:MochiKit.Base.forwardCall("repr"),next:function(){ if(i>=_188.length){ throw MochiKit.Iter.StopIteration; } return _188[i++]; }}; },hasIterateNext:function(_189){ return (_189&&typeof (_189.iterateNext)=="function"); },iterateNextIter:function(_190){ return {repr:function(){ return "iterateNextIter(...)"; },toString:MochiKit.Base.forwardCall("repr"),next:function(){ var rval=_190.iterateNext(); if(rval===null||rval===undefined){ throw MochiKit.Iter.StopIteration; } return rval; }}; }}); MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",]; MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"]; MochiKit.Iter.__new__=function(){ var m=MochiKit.Base; this.StopIteration=new m.NamedError("StopIteration"); this.iteratorRegistry=new m.AdapterRegistry(); this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter); this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; m.nameFunctions(this); }; MochiKit.Iter.__new__(); if(!MochiKit.__compat__){ reduce=MochiKit.Iter.reduce; } MochiKit.Base._exportSymbols(this,MochiKit.Iter); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Logging"); dojo.require("MochiKit.Base"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); } try{ if(typeof (MochiKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Logging depends on MochiKit.Base!"; } if(typeof (MochiKit.Logging)=="undefined"){ MochiKit.Logging={}; } MochiKit.Logging.NAME="MochiKit.Logging"; MochiKit.Logging.VERSION="1.3.1"; MochiKit.Logging.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.Logging.toString=function(){ return this.__repr__(); }; MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"]; MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"]; MochiKit.Logging.LogMessage=function(num,_192,info){ this.num=num; this.level=_192; this.info=info; this.timestamp=new Date(); }; MochiKit.Logging.LogMessage.prototype={repr:function(){ var m=MochiKit.Base; return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")"; },toString:MochiKit.Base.forwardCall("repr")}; MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_194){ var self=MochiKit.Logging; if(typeof (_194)=="string"){ _194=self.LogLevel[_194]; } return function(msg){ var _196=msg.level; if(typeof (_196)=="string"){ _196=self.LogLevel[_196]; } return _196>=_194; }; },isLogMessage:function(){ var _197=MochiKit.Logging.LogMessage; for(var i=0;i<arguments.length;i++){ if(!(arguments[i] instanceof _197)){ return false; } } return true; },compareLogMessage:function(a,b){ return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]); },alertListener:function(msg){ alert("num: "+msg.num+"\nlevel: "+msg.level+"\ninfo: "+msg.info.join(" ")); }}); MochiKit.Logging.Logger=function(_198){ this.counter=0; if(typeof (_198)=="undefined"||_198===null){ _198=-1; } this.maxSize=_198; this._messages=[]; this.listeners={}; this.useNativeConsole=false; }; MochiKit.Logging.Logger.prototype={clear:function(){ this._messages.splice(0,this._messages.length); },logToConsole:function(msg){ if(typeof (window)!="undefined"&&window.console&&window.console.log){ window.console.log(msg); }else{ if(typeof (opera)!="undefined"&&opera.postError){ opera.postError(msg); }else{ if(typeof (printfire)=="function"){ printfire(msg); } } } },dispatchListeners:function(msg){ for(var k in this.listeners){ var pair=this.listeners[k]; if(pair.ident!=k||(pair[0]&&!pair[0](msg))){ continue; } pair[1](msg); } },addListener:function(_199,_200,_201){ if(typeof (_200)=="string"){ _200=MochiKit.Logging.logLevelAtLeast(_200); } var _202=[_200,_201]; _202.ident=_199; this.listeners[_199]=_202; },removeListener:function(_203){ delete this.listeners[_203]; },baseLog:function(_204,_205){ var msg=new MochiKit.Logging.LogMessage(this.counter,_204,MochiKit.Base.extend(null,arguments,1)); this._messages.push(msg); this.dispatchListeners(msg); if(this.useNativeConsole){ this.logToConsole(msg.level+": "+msg.info.join(" ")); } this.counter+=1; while(this.maxSize>=0&&this._messages.length>this.maxSize){ this._messages.shift(); } },getMessages:function(_206){ var _207=0; if(!(typeof (_206)=="undefined"||_206===null)){ _207=Math.max(0,this._messages.length-_206); } return this._messages.slice(_207); },getMessageText:function(_208){ if(typeof (_208)=="undefined"||_208===null){ _208=30; } var _209=this.getMessages(_208); if(_209.length){ var lst=map(function(m){ return "\n ["+m.num+"] "+m.level+": "+m.info.join(" "); },_209); lst.unshift("LAST "+_209.length+" MESSAGES:"); return lst.join(""); } return ""; },debuggingBookmarklet:function(_210){ if(typeof (MochiKit.LoggingPane)=="undefined"){ alert(this.getMessageText()); }else{ MochiKit.LoggingPane.createLoggingPane(_210||false); } }}; MochiKit.Logging.__new__=function(){ this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10}; var m=MochiKit.Base; m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage); var _211=m.partial; var _212=this.Logger; var _213=_212.prototype.baseLog; m.update(this.Logger.prototype,{debug:_211(_213,"DEBUG"),log:_211(_213,"INFO"),error:_211(_213,"ERROR"),fatal:_211(_213,"FATAL"),warning:_211(_213,"WARNING")}); var self=this; var _214=function(name){ return function(){ self.logger[name].apply(self.logger,arguments); }; }; this.log=_214("log"); this.logError=_214("error"); this.logDebug=_214("debug"); this.logFatal=_214("fatal"); this.logWarning=_214("warning"); this.logger=new _212(); this.logger.useNativeConsole=true; this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; m.nameFunctions(this); }; if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){ printfire=function(){ printfire.args=arguments; var ev=document.createEvent("Events"); ev.initEvent("printfire",false,true); dispatchEvent(ev); }; } MochiKit.Logging.__new__(); MochiKit.Base._exportSymbols(this,MochiKit.Logging); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.DateTime"); } if(typeof (MochiKit)=="undefined"){ MochiKit={}; } if(typeof (MochiKit.DateTime)=="undefined"){ MochiKit.DateTime={}; } MochiKit.DateTime.NAME="MochiKit.DateTime"; MochiKit.DateTime.VERSION="1.3.1"; MochiKit.DateTime.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.DateTime.toString=function(){ return this.__repr__(); }; MochiKit.DateTime.isoDate=function(str){ str=str+""; if(typeof (str)!="string"||str.length===0){ return null; } var iso=str.split("-"); if(iso.length===0){ return null; } return new Date(iso[0],iso[1]-1,iso[2]); }; MochiKit.DateTime._isoRegexp=/(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/; MochiKit.DateTime.isoTimestamp=function(str){ str=str+""; if(typeof (str)!="string"||str.length===0){ return null; } var res=str.match(MochiKit.DateTime._isoRegexp); if(typeof (res)=="undefined"||res===null){ return null; } var year,month,day,hour,min,sec,msec; year=parseInt(res[1],10); if(typeof (res[2])=="undefined"||res[2]===""){ return new Date(year); } month=parseInt(res[2],10)-1; day=parseInt(res[3],10); if(typeof (res[4])=="undefined"||res[4]===""){ return new Date(year,month,day); } hour=parseInt(res[4],10); min=parseInt(res[5],10); sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0; if(typeof (res[7])!="undefined"&&res[7]!==""){ msec=Math.round(1000*parseFloat("0."+res[7])); }else{ msec=0; } if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){ return new Date(year,month,day,hour,min,sec,msec); } var ofs; if(typeof (res[9])!="undefined"&&res[9]!==""){ ofs=parseInt(res[10],10)*3600000; if(typeof (res[11])!="undefined"&&res[11]!==""){ ofs+=parseInt(res[11],10)*60000; } if(res[9]=="-"){ ofs=-ofs; } }else{ ofs=0; } return new Date(Date.UTC(year,month,day,hour,min,sec,msec)-ofs); }; MochiKit.DateTime.toISOTime=function(date,_221){ if(typeof (date)=="undefined"||date===null){ return null; } var hh=date.getHours(); var mm=date.getMinutes(); var ss=date.getSeconds(); var lst=[((_221&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)]; return lst.join(":"); }; MochiKit.DateTime.toISOTimestamp=function(date,_225){ if(typeof (date)=="undefined"||date===null){ return null; } var sep=_225?"T":" "; var foot=_225?"Z":""; if(_225){ date=new Date(date.getTime()+(date.getTimezoneOffset()*60000)); } return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_225)+foot; }; MochiKit.DateTime.toISODate=function(date){ if(typeof (date)=="undefined"||date===null){ return null; } var _228=MochiKit.DateTime._padTwo; return [date.getFullYear(),_228(date.getMonth()+1),_228(date.getDate())].join("-"); }; MochiKit.DateTime.americanDate=function(d){ d=d+""; if(typeof (d)!="string"||d.length===0){ return null; } var a=d.split("/"); return new Date(a[2],a[0]-1,a[1]); }; MochiKit.DateTime._padTwo=function(n){ return (n>9)?n:"0"+n; }; MochiKit.DateTime.toPaddedAmericanDate=function(d){ if(typeof (d)=="undefined"||d===null){ return null; } var _230=MochiKit.DateTime._padTwo; return [_230(d.getMonth()+1),_230(d.getDate()),d.getFullYear()].join("/"); }; MochiKit.DateTime.toAmericanDate=function(d){ if(typeof (d)=="undefined"||d===null){ return null; } return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/"); }; MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"]; MochiKit.DateTime.EXPORT_OK=[]; MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT}; MochiKit.DateTime.__new__=function(){ var base=this.NAME+"."; for(var k in this){ var o=this[k]; if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){ try{ o.NAME=base+k; } catch(e){ } } } }; MochiKit.DateTime.__new__(); if(typeof (MochiKit.Base)!="undefined"){ MochiKit.Base._exportSymbols(this,MochiKit.DateTime); }else{ (function(_231,_232){ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){ var all=_232.EXPORT_TAGS[":all"]; for(var i=0;i<all.length;i++){ _231[all[i]]=_232[all[i]]; } } })(this,MochiKit.DateTime); } if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Format"); } if(typeof (MochiKit)=="undefined"){ MochiKit={}; } if(typeof (MochiKit.Format)=="undefined"){ MochiKit.Format={}; } MochiKit.Format.NAME="MochiKit.Format"; MochiKit.Format.VERSION="1.3.1"; MochiKit.Format.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.Format.toString=function(){ return this.__repr__(); }; MochiKit.Format._numberFormatter=function(_233,_234,_235,_236,_237,_238,_239,_240,_241){ return function(num){ num=parseFloat(num); if(typeof (num)=="undefined"||num===null||isNaN(num)){ return _233; } var _242=_234; var _243=_235; if(num<0){ num=-num; }else{ _242=_242.replace(/-/,""); } var me=arguments.callee; var fmt=MochiKit.Format.formatLocale(_236); if(_237){ num=num*100; _243=fmt.percent+_243; } num=MochiKit.Format.roundToFixed(num,_238); var _245=num.split(/\./); var _246=_245[0]; var frac=(_245.length==1)?"":_245[1]; var res=""; while(_246.length<_239){ _246="0"+_246; } if(_240){ while(_246.length>_240){ var i=_246.length-_240; res=fmt.separator+_246.substring(i,_246.length)+res; _246=_246.substring(0,i); } } res=_246+res; if(_238>0){ while(frac.length<_241){ frac=frac+"0"; } res=res+fmt.decimal+frac; } return _242+res+_243; }; }; MochiKit.Format.numberFormatter=function(_248,_249,_250){ if(typeof (_249)=="undefined"){ _249=""; } var _251=_248.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); if(!_251){ throw TypeError("Invalid pattern"); } var _252=_248.substr(0,_251.index); var _253=_248.substr(_251.index+_251[0].length); if(_252.search(/-/)==-1){ _252=_252+"-"; } var _254=_251[1]; var frac=(typeof (_251[2])=="string"&&_251[2]!="")?_251[2]:""; var _255=(typeof (_251[3])=="string"&&_251[3]!=""); var tmp=_254.split(/,/); var _257; if(typeof (_250)=="undefined"){ _250="default"; } if(tmp.length==1){ _257=null; }else{ _257=tmp[1].length; } var _258=_254.length-_254.replace(/0/g,"").length; var _259=frac.length-frac.replace(/0/g,"").length; var _260=frac.length; var rval=MochiKit.Format._numberFormatter(_249,_252,_253,_250,_255,_260,_258,_257,_259); var m=MochiKit.Base; if(m){ var fn=arguments.callee; var args=m.concat(arguments); rval.repr=function(){ return [self.NAME,"(",map(m.repr,args).join(", "),")"].join(""); }; } return rval; }; MochiKit.Format.formatLocale=function(_262){ if(typeof (_262)=="undefined"||_262===null){ _262="default"; } if(typeof (_262)=="string"){ var rval=MochiKit.Format.LOCALE[_262]; if(typeof (rval)=="string"){ rval=arguments.callee(rval); MochiKit.Format.LOCALE[_262]=rval; } return rval; }else{ return _262; } }; MochiKit.Format.twoDigitAverage=function(_263,_264){ if(_264){ var res=_263/_264; if(!isNaN(res)){ return MochiKit.Format.twoDigitFloat(_263/_264); } } return "0"; }; MochiKit.Format.twoDigitFloat=function(_265){ var sign=(_265<0?"-":""); var s=Math.floor(Math.abs(_265)*100).toString(); if(s=="0"){ return s; } if(s.length<3){ while(s.charAt(s.length-1)=="0"){ s=s.substring(0,s.length-1); } return sign+"0."+s; } var head=sign+s.substring(0,s.length-2); var tail=s.substring(s.length-2,s.length); if(tail=="00"){ return head; }else{ if(tail.charAt(1)=="0"){ return head+"."+tail.charAt(0); }else{ return head+"."+tail; } } }; MochiKit.Format.lstrip=function(str,_270){ str=str+""; if(typeof (str)!="string"){ return null; } if(!_270){ return str.replace(/^\s+/,""); }else{ return str.replace(new RegExp("^["+_270+"]+"),""); } }; MochiKit.Format.rstrip=function(str,_271){ str=str+""; if(typeof (str)!="string"){ return null; } if(!_271){ return str.replace(/\s+$/,""); }else{ return str.replace(new RegExp("["+_271+"]+$"),""); } }; MochiKit.Format.strip=function(str,_272){ var self=MochiKit.Format; return self.rstrip(self.lstrip(str,_272),_272); }; MochiKit.Format.truncToFixed=function(_273,_274){ _273=Math.floor(_273*Math.pow(10,_274)); var res=(_273*Math.pow(10,-_274)).toFixed(_274); if(res.charAt(0)=="."){ res="0"+res; } return res; }; MochiKit.Format.roundToFixed=function(_275,_276){ return MochiKit.Format.truncToFixed(_275+0.5*Math.pow(10,-_276),_276); }; MochiKit.Format.percentFormat=function(_277){ return MochiKit.Format.twoDigitFloat(100*_277)+"%"; }; MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"]; MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"}; MochiKit.Format.EXPORT_OK=[]; MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT}; MochiKit.Format.__new__=function(){ var base=this.NAME+"."; var k,v,o; for(k in this.LOCALE){ o=this.LOCALE[k]; if(typeof (o)=="object"){ o.repr=function(){ return this.NAME; }; o.NAME=base+"LOCALE."+k; } } for(k in this){ o=this[k]; if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){ try{ o.NAME=base+k; } catch(e){ } } } }; MochiKit.Format.__new__(); if(typeof (MochiKit.Base)!="undefined"){ MochiKit.Base._exportSymbols(this,MochiKit.Format); }else{ (function(_278,_279){ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){ var all=_279.EXPORT_TAGS[":all"]; for(var i=0;i<all.length;i++){ _278[all[i]]=_279[all[i]]; } } })(this,MochiKit.Format); } if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Async"); dojo.require("MochiKit.Base"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); } try{ if(typeof (MochiKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Async depends on MochiKit.Base!"; } if(typeof (MochiKit.Async)=="undefined"){ MochiKit.Async={}; } MochiKit.Async.NAME="MochiKit.Async"; MochiKit.Async.VERSION="1.3.1"; MochiKit.Async.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.Async.toString=function(){ return this.__repr__(); }; MochiKit.Async.Deferred=function(_280){ this.chain=[]; this.id=this._nextId(); this.fired=-1; this.paused=0; this.results=[null,null]; this.canceller=_280; this.silentlyCancelled=false; this.chained=false; }; MochiKit.Async.Deferred.prototype={repr:function(){ var _281; if(this.fired==-1){ _281="unfired"; }else{ if(this.fired===0){ _281="success"; }else{ _281="error"; } } return "Deferred("+this.id+", "+_281+")"; },toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){ var self=MochiKit.Async; if(this.fired==-1){ if(this.canceller){ this.canceller(this); }else{ this.silentlyCancelled=true; } if(this.fired==-1){ this.errback(new self.CancelledError(this)); } }else{ if((this.fired===0)&&(this.results[0] instanceof self.Deferred)){ this.results[0].cancel(); } } },_pause:function(){ this.paused++; },_unpause:function(){ this.paused--; if((this.paused===0)&&(this.fired>=0)){ this._fire(); } },_continue:function(res){ this._resback(res); this._unpause(); },_resback:function(res){ this.fired=((res instanceof Error)?1:0); this.results[this.fired]=res; this._fire(); },_check:function(){ if(this.fired!=-1){ if(!this.silentlyCancelled){ throw new MochiKit.Async.AlreadyCalledError(this); } this.silentlyCancelled=false; return; } },callback:function(res){ this._check(); if(res instanceof MochiKit.Async.Deferred){ throw new Error("Deferred instances can only be chained if they are the result of a callback"); } this._resback(res); },errback:function(res){ this._check(); var self=MochiKit.Async; if(res instanceof self.Deferred){ throw new Error("Deferred instances can only be chained if they are the result of a callback"); } if(!(res instanceof Error)){ res=new self.GenericError(res); } this._resback(res); },addBoth:function(fn){ if(arguments.length>1){ fn=MochiKit.Base.partial.apply(null,arguments); } return this.addCallbacks(fn,fn); },addCallback:function(fn){ if(arguments.length>1){ fn=MochiKit.Base.partial.apply(null,arguments); } return this.addCallbacks(fn,null); },addErrback:function(fn){ if(arguments.length>1){ fn=MochiKit.Base.partial.apply(null,arguments); } return this.addCallbacks(null,fn); },addCallbacks:function(cb,eb){ if(this.chained){ throw new Error("Chained Deferreds can not be re-used"); } this.chain.push([cb,eb]); if(this.fired>=0){ this._fire(); } return this; },_fire:function(){ var _284=this.chain; var _285=this.fired; var res=this.results[_285]; var self=this; var cb=null; while(_284.length>0&&this.paused===0){ var pair=_284.shift(); var f=pair[_285]; if(f===null){ continue; } try{ res=f(res); _285=((res instanceof Error)?1:0); if(res instanceof MochiKit.Async.Deferred){ cb=function(res){ self._continue(res); }; this._pause(); } } catch(err){ _285=1; if(!(err instanceof Error)){ err=new MochiKit.Async.GenericError(err); } res=err; } } this.fired=_285; this.results[_285]=res; if(cb&&this.paused){ res.addBoth(cb); res.chained=true; } }}; MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){ return eval("("+arguments[0].responseText+")"); },succeed:function(_287){ var d=new MochiKit.Async.Deferred(); d.callback.apply(d,arguments); return d; },fail:function(_288){ var d=new MochiKit.Async.Deferred(); d.errback.apply(d,arguments); return d; },getXMLHttpRequest:function(){ var self=arguments.callee; if(!self.XMLHttpRequest){ var _289=[function(){ return new XMLHttpRequest(); },function(){ return new ActiveXObject("Msxml2.XMLHTTP"); },function(){ return new ActiveXObject("Microsoft.XMLHTTP"); },function(){ return new ActiveXObject("Msxml2.XMLHTTP.4.0"); },function(){ throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest"); }]; for(var i=0;i<_289.length;i++){ var func=_289[i]; try{ self.XMLHttpRequest=func; return func(); } catch(e){ } } } return self.XMLHttpRequest(); },_nothing:function(){ },_xhr_onreadystatechange:function(d){ if(this.readyState==4){ try{ this.onreadystatechange=null; } catch(e){ try{ this.onreadystatechange=MochiKit.Async._nothing; } catch(e){ } } var _290=null; try{ _290=this.status; if(!_290&&MochiKit.Base.isNotEmpty(this.responseText)){ _290=304; } } catch(e){ } if(_290==200||_290==304){ d.callback(this); }else{ var err=new MochiKit.Async.XMLHttpRequestError(this,"Request failed"); if(err.number){ d.errback(err); }else{ d.errback(err); } } } },_xhr_canceller:function(req){ try{ req.onreadystatechange=null; } catch(e){ try{ req.onreadystatechange=MochiKit.Async._nothing; } catch(e){ } } req.abort(); },sendXMLHttpRequest:function(req,_293){ if(typeof (_293)=="undefined"||_293===null){ _293=""; } var m=MochiKit.Base; var self=MochiKit.Async; var d=new self.Deferred(m.partial(self._xhr_canceller,req)); try{ req.onreadystatechange=m.bind(self._xhr_onreadystatechange,req,d); req.send(_293); } catch(e){ try{ req.onreadystatechange=null; } catch(ignore){ } d.errback(e); } return d; },doSimpleXMLHttpRequest:function(url){ var self=MochiKit.Async; var req=self.getXMLHttpRequest(); if(arguments.length>1){ var m=MochiKit.Base; var qs=m.queryString.apply(null,m.extend(null,arguments,1)); if(qs){ url+="?"+qs; } } req.open("GET",url,true); return self.sendXMLHttpRequest(req); },loadJSONDoc:function(url){ var self=MochiKit.Async; var d=self.doSimpleXMLHttpRequest.apply(self,arguments); d=d.addCallback(self.evalJSONRequest); return d; },wait:function(_296,_297){ var d=new MochiKit.Async.Deferred(); var m=MochiKit.Base; if(typeof (_297)!="undefined"){ d.addCallback(function(){ return _297; }); } var _298=setTimeout(m.bind("callback",d),Math.floor(_296*1000)); d.canceller=function(){ try{ clearTimeout(_298); } catch(e){ } }; return d; },callLater:function(_299,func){ var m=MochiKit.Base; var _300=m.partial.apply(m,m.extend(null,arguments,1)); return MochiKit.Async.wait(_299).addCallback(function(res){ return _300(); }); }}); MochiKit.Async.DeferredLock=function(){ this.waiting=[]; this.locked=false; this.id=this._nextId(); }; MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){ d=new MochiKit.Async.Deferred(); if(this.locked){ this.waiting.push(d); }else{ this.locked=true; d.callback(this); } return d; },release:function(){ if(!this.locked){ throw TypeError("Tried to release an unlocked DeferredLock"); } this.locked=false; if(this.waiting.length>0){ this.locked=true; this.waiting.shift().callback(this); } },_nextId:MochiKit.Base.counter(),repr:function(){ var _301; if(this.locked){ _301="locked, "+this.waiting.length+" waiting"; }else{ _301="unlocked"; } return "DeferredLock("+this.id+", "+_301+")"; },toString:MochiKit.Base.forwardCall("repr")}; MochiKit.Async.DeferredList=function(list,_303,_304,_305,_306){ this.list=list; this.resultList=new Array(this.list.length); this.chain=[]; this.id=this._nextId(); this.fired=-1; this.paused=0; this.results=[null,null]; this.canceller=_306; this.silentlyCancelled=false; if(this.list.length===0&&!_303){ this.callback(this.resultList); } this.finishedCount=0; this.fireOnOneCallback=_303; this.fireOnOneErrback=_304; this.consumeErrors=_305; var _307=0; MochiKit.Base.map(MochiKit.Base.bind(function(d){ d.addCallback(MochiKit.Base.bind(this._cbDeferred,this),_307,true); d.addErrback(MochiKit.Base.bind(this._cbDeferred,this),_307,false); _307+=1; },this),this.list); }; MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,MochiKit.Async.Deferred.prototype); MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,{_cbDeferred:function(_308,_309,_310){ this.resultList[_308]=[_309,_310]; this.finishedCount+=1; if(this.fired!==0){ if(_309&&this.fireOnOneCallback){ this.callback([_308,_310]); }else{ if(!_309&&this.fireOnOneErrback){ this.errback(_310); }else{ if(this.finishedCount==this.list.length){ this.callback(this.resultList); } } } } if(!_309&&this.consumeErrors){ _310=null; } return _310; }}); MochiKit.Async.gatherResults=function(_311){ var d=new MochiKit.Async.DeferredList(_311,false,true,false); d.addCallback(function(_312){ var ret=[]; for(var i=0;i<_312.length;i++){ ret.push(_312[i][1]); } return ret; }); return d; }; MochiKit.Async.maybeDeferred=function(func){ var self=MochiKit.Async; var _313; try{ var r=func.apply(null,MochiKit.Base.extend([],arguments,1)); if(r instanceof self.Deferred){ _313=r; }else{ if(r instanceof Error){ _313=self.fail(r); }else{ _313=self.succeed(r); } } } catch(e){ _313=self.fail(e); } return _313; }; MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"]; MochiKit.Async.EXPORT_OK=["evalJSONRequest"]; MochiKit.Async.__new__=function(){ var m=MochiKit.Base; var ne=m.partial(m._newNamedError,this); ne("AlreadyCalledError",function(_316){ this.deferred=_316; }); ne("CancelledError",function(_317){ this.deferred=_317; }); ne("BrowserComplianceError",function(msg){ this.message=msg; }); ne("GenericError",function(msg){ this.message=msg; }); ne("XMLHttpRequestError",function(req,msg){ this.req=req; this.message=msg; try{ this.number=req.status; } catch(e){ } }); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; m.nameFunctions(this); }; MochiKit.Async.__new__(); MochiKit.Base._exportSymbols(this,MochiKit.Async); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.DOM"); dojo.require("MochiKit.Iter"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Iter",[]); } try{ if(typeof (MochiKit.Iter)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.DOM depends on MochiKit.Iter!"; } if(typeof (MochiKit.DOM)=="undefined"){ MochiKit.DOM={}; } MochiKit.DOM.NAME="MochiKit.DOM"; MochiKit.DOM.VERSION="1.3.1"; MochiKit.DOM.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.DOM.toString=function(){ return this.__repr__(); }; MochiKit.DOM.EXPORT=["formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","computedStyle","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText","elementDimensions","elementPosition","setElementDimensions","setElementPosition","getViewportDimensions","setOpacity"]; MochiKit.DOM.EXPORT_OK=["domConverters"]; MochiKit.DOM.Dimensions=function(w,h){ this.w=w; this.h=h; }; MochiKit.DOM.Dimensions.prototype.repr=function(){ var repr=MochiKit.Base.repr; return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}"; }; MochiKit.DOM.Coordinates=function(x,y){ this.x=x; this.y=y; }; MochiKit.DOM.Coordinates.prototype.repr=function(){ var repr=MochiKit.Base.repr; return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}"; }; MochiKit.DOM.Coordinates.prototype.toString=function(){ return this.repr(); }; MochiKit.Base.update(MochiKit.DOM,{setOpacity:function(elem,o){ elem=MochiKit.DOM.getElement(elem); MochiKit.DOM.updateNodeAttributes(elem,{"style":{"opacity":o,"-moz-opacity":o,"-khtml-opacity":o,"filter":" alpha(opacity="+(o*100)+")"}}); },getViewportDimensions:function(){ var d=new MochiKit.DOM.Dimensions(); var w=MochiKit.DOM._window; var b=MochiKit.DOM._document.body; if(w.innerWidth){ d.w=w.innerWidth; d.h=w.innerHeight; }else{ if(b.parentElement.clientWidth){ d.w=b.parentElement.clientWidth; d.h=b.parentElement.clientHeight; }else{ if(b&&b.clientWidth){ d.w=b.clientWidth; d.h=b.clientHeight; } } } return d; },elementDimensions:function(elem){ var self=MochiKit.DOM; if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){ return new self.Dimensions(elem.w||0,elem.h||0); } elem=self.getElement(elem); if(!elem){ return undefined; } if(self.computedStyle(elem,"display")!="none"){ return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0); } var s=elem.style; var _322=s.visibility; var _323=s.position; s.visibility="hidden"; s.position="absolute"; s.display=""; var _324=elem.offsetWidth; var _325=elem.offsetHeight; s.display="none"; s.position=_323; s.visibility=_322; return new self.Dimensions(_324,_325); },elementPosition:function(elem,_326){ var self=MochiKit.DOM; elem=self.getElement(elem); if(!elem){ return undefined; } var c=new self.Coordinates(0,0); if(elem.x&&elem.y){ c.x+=elem.x||0; c.y+=elem.y||0; return c; }else{ if(elem.parentNode===null||self.computedStyle(elem,"display")=="none"){ return undefined; } } var box=null; var _329=null; var d=MochiKit.DOM._document; var de=d.documentElement; var b=d.body; if(elem.getBoundingClientRect){ box=elem.getBoundingClientRect(); c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft); c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop); }else{ if(d.getBoxObjectFor){ box=d.getBoxObjectFor(elem); c.x+=box.x; c.y+=box.y; }else{ if(elem.offsetParent){ c.x+=elem.offsetLeft; c.y+=elem.offsetTop; _329=elem.offsetParent; if(_329!=elem){ while(_329){ c.x+=_329.offsetLeft; c.y+=_329.offsetTop; _329=_329.offsetParent; } } var ua=navigator.userAgent.toLowerCase(); if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("safari")!=-1&&self.computedStyle(elem,"position")=="absolute")){ c.x-=b.offsetLeft; c.y-=b.offsetTop; } } } } if(typeof (_326)!="undefined"){ _326=arguments.callee(_326); if(_326){ c.x-=(_326.x||0); c.y-=(_326.y||0); } } if(elem.parentNode){ _329=elem.parentNode; }else{ _329=null; } while(_329&&_329.tagName!="BODY"&&_329.tagName!="HTML"){ c.x-=_329.scrollLeft; c.y-=_329.scrollTop; if(_329.parentNode){ _329=_329.parentNode; }else{ _329=null; } } return c; },setElementDimensions:function(elem,_332,_333){ elem=MochiKit.DOM.getElement(elem); if(typeof (_333)=="undefined"){ _333="px"; } MochiKit.DOM.updateNodeAttributes(elem,{"style":{"width":_332.w+_333,"height":_332.h+_333}}); },setElementPosition:function(elem,_334,_335){ elem=MochiKit.DOM.getElement(elem); if(typeof (_335)=="undefined"){ _335="px"; } MochiKit.DOM.updateNodeAttributes(elem,{"style":{"left":_334.x+_335,"top":_334.y+_335}}); },currentWindow:function(){ return MochiKit.DOM._window; },currentDocument:function(){ return MochiKit.DOM._document; },withWindow:function(win,func){ var self=MochiKit.DOM; var _337=self._document; var _338=self._win; var rval; try{ self._window=win; self._document=win.document; rval=func(); } catch(e){ self._window=_338; self._document=_337; throw e; } self._window=_338; self._document=_337; return rval; },formContents:function(elem){ var _339=[]; var _340=[]; var m=MochiKit.Base; var self=MochiKit.DOM; if(typeof (elem)=="undefined"||elem===null){ elem=self._document; }else{ elem=self.getElement(elem); } m.nodeWalk(elem,function(elem){ var name=elem.name; if(m.isNotEmpty(name)){ var _341=elem.nodeName; if(_341=="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){ return null; } if(_341=="SELECT"){ if(elem.selectedIndex>=0){ var opt=elem.options[elem.selectedIndex]; _339.push(name); _340.push((opt.value)?opt.value:opt.text); return null; } _339.push(name); _340.push(""); return null; } if(_341=="FORM"||_341=="P"||_341=="SPAN"||_341=="DIV"){ return elem.childNodes; } _339.push(name); _340.push(elem.value||""); return null; } return elem.childNodes; }); return [_339,_340]; },withDocument:function(doc,func){ var self=MochiKit.DOM; var _344=self._document; var rval; try{ self._document=doc; rval=func(); } catch(e){ self._document=_344; throw e; } self._document=_344; return rval; },registerDOMConverter:function(name,_345,wrap,_346){ MochiKit.DOM.domConverters.register(name,_345,wrap,_346); },coerceToDOM:function(node,ctx){ var im=MochiKit.Iter; var self=MochiKit.DOM; var iter=im.iter; var _350=im.repeat; var imap=im.imap; var _352=self.domConverters; var _353=self.coerceToDOM; var _354=MochiKit.Base.NotFound; while(true){ if(typeof (node)=="undefined"||node===null){ return null; } if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){ return node; } if(typeof (node)=="number"||typeof (node)=="boolean"){ node=node.toString(); } if(typeof (node)=="string"){ return self._document.createTextNode(node); } if(typeof (node.toDOM)=="function"){ node=node.toDOM(ctx); continue; } if(typeof (node)=="function"){ node=node(ctx); continue; } var _355=null; try{ _355=iter(node); } catch(e){ } if(_355){ return imap(_353,_355,_350(ctx)); } try{ node=_352.match(node,ctx); continue; } catch(e){ if(e!=_354){ throw e; } } return self._document.createTextNode(node.toString()); } return undefined; },setNodeAttribute:function(node,attr,_357){ var o={}; o[attr]=_357; try{ return MochiKit.DOM.updateNodeAttributes(node,o); } catch(e){ } return null; },getNodeAttribute:function(node,attr){ var self=MochiKit.DOM; var _358=self.attributeArray.renames[attr]; node=self.getElement(node); try{ if(_358){ return node[_358]; } return node.getAttribute(attr); } catch(e){ } return null; },updateNodeAttributes:function(node,_359){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } if(_359){ var _360=MochiKit.Base.updatetree; if(self.attributeArray.compliant){ for(var k in _359){ var v=_359[k]; if(typeof (v)=="object"&&typeof (elem[k])=="object"){ _360(elem[k],v); }else{ if(k.substring(0,2)=="on"){ if(typeof (v)=="string"){ v=new Function(v); } elem[k]=v; }else{ elem.setAttribute(k,v); } } } }else{ var _361=self.attributeArray.renames; for(k in _359){ v=_359[k]; var _362=_361[k]; if(k=="style"&&typeof (v)=="string"){ elem.style.cssText=v; }else{ if(typeof (_362)=="string"){ elem[_362]=v; }else{ if(typeof (elem[k])=="object"&&typeof (v)=="object"){ _360(elem[k],v); }else{ if(k.substring(0,2)=="on"){ if(typeof (v)=="string"){ v=new Function(v); } elem[k]=v; }else{ elem.setAttribute(k,v); } } } } } } } return elem; },appendChildNodes:function(node){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } var _363=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; var _364=MochiKit.Base.concat; while(_363.length){ var n=_363.shift(); if(typeof (n)=="undefined"||n===null){ }else{ if(typeof (n.nodeType)=="number"){ elem.appendChild(n); }else{ _363=_364(n,_363); } } } return elem; },replaceChildNodes:function(node){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); arguments[0]=elem; } var _365; while((_365=elem.firstChild)){ elem.removeChild(_365); } if(arguments.length<2){ return elem; }else{ return self.appendChildNodes.apply(this,arguments); } },createDOM:function(name,_366){ var elem; var self=MochiKit.DOM; var m=MochiKit.Base; if(typeof (_366)=="string"||typeof (_366)=="number"){ var args=m.extend([name,null],arguments,1); return arguments.callee.apply(this,args); } if(typeof (name)=="string"){ if(_366&&"name" in _366&&!self.attributeArray.compliant){ name=("<"+name+" name=\""+self.escapeHTML(_366.name)+"\">"); } elem=self._document.createElement(name); }else{ elem=name; } if(_366){ self.updateNodeAttributes(elem,_366); } if(arguments.length<=2){ return elem; }else{ var args=m.extend([elem],arguments,2); return self.appendChildNodes.apply(this,args); } },createDOMFunc:function(){ var m=MochiKit.Base; return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments)); },swapDOM:function(dest,src){ var self=MochiKit.DOM; dest=self.getElement(dest); var _369=dest.parentNode; if(src){ src=self.getElement(src); _369.replaceChild(src,dest); }else{ _369.removeChild(dest); } return src; },getElement:function(id){ var self=MochiKit.DOM; if(arguments.length==1){ return ((typeof (id)=="string")?self._document.getElementById(id):id); }else{ return MochiKit.Base.map(self.getElement,arguments); } },computedStyle:function(_371,_372,_373){ if(arguments.length==2){ _373=_372; } var self=MochiKit.DOM; var el=self.getElement(_371); var _375=self._document; if(!el||el==_375){ return undefined; } if(el.currentStyle){ return el.currentStyle[_372]; } if(typeof (_375.defaultView)=="undefined"){ return undefined; } if(_375.defaultView===null){ return undefined; } var _376=_375.defaultView.getComputedStyle(el,null); if(typeof (_376)=="undefined"||_376===null){ return undefined; } return _376.getPropertyValue(_373); },getElementsByTagAndClassName:function(_377,_378,_379){ var self=MochiKit.DOM; if(typeof (_377)=="undefined"||_377===null){ _377="*"; } if(typeof (_379)=="undefined"||_379===null){ _379=self._document; } _379=self.getElement(_379); var _380=(_379.getElementsByTagName(_377)||self._document.all); if(typeof (_378)=="undefined"||_378===null){ return MochiKit.Base.extend(null,_380); } var _381=[]; for(var i=0;i<_380.length;i++){ var _382=_380[i]; var _383=_382.className.split(" "); for(var j=0;j<_383.length;j++){ if(_383[j]==_378){ _381.push(_382); break; } } } return _381; },_newCallStack:function(path,once){ var rval=function(){ var _386=arguments.callee.callStack; for(var i=0;i<_386.length;i++){ if(_386[i].apply(this,arguments)===false){ break; } } if(once){ try{ this[path]=null; } catch(e){ } } }; rval.callStack=[]; return rval; },addToCallStack:function(_387,path,func,once){ var self=MochiKit.DOM; var _388=_387[path]; var _389=_388; if(!(typeof (_388)=="function"&&typeof (_388.callStack)=="object"&&_388.callStack!==null)){ _389=self._newCallStack(path,once); if(typeof (_388)=="function"){ _389.callStack.push(_388); } _387[path]=_389; } _389.callStack.push(func); },addLoadEvent:function(func){ var self=MochiKit.DOM; self.addToCallStack(self._window,"onload",func,true); },focusOnLoad:function(_390){ var self=MochiKit.DOM; self.addLoadEvent(function(){ _390=self.getElement(_390); if(_390){ _390.focus(); } }); },setElementClass:function(_391,_392){ var self=MochiKit.DOM; var obj=self.getElement(_391); if(self.attributeArray.compliant){ obj.setAttribute("class",_392); }else{ obj.setAttribute("className",_392); } },toggleElementClass:function(_393){ var self=MochiKit.DOM; for(var i=1;i<arguments.length;i++){ var obj=self.getElement(arguments[i]); if(!self.addElementClass(obj,_393)){ self.removeElementClass(obj,_393); } } },addElementClass:function(_394,_395){ var self=MochiKit.DOM; var obj=self.getElement(_394); var cls=obj.className; if(cls.length===0){ self.setElementClass(obj,_395); return true; } if(cls==_395){ return false; } var _397=obj.className.split(" "); for(var i=0;i<_397.length;i++){ if(_397[i]==_395){ return false; } } self.setElementClass(obj,cls+" "+_395); return true; },removeElementClass:function(_398,_399){ var self=MochiKit.DOM; var obj=self.getElement(_398); var cls=obj.className; if(cls.length===0){ return false; } if(cls==_399){ self.setElementClass(obj,""); return true; } var _400=obj.className.split(" "); for(var i=0;i<_400.length;i++){ if(_400[i]==_399){ _400.splice(i,1); self.setElementClass(obj,_400.join(" ")); return true; } } return false; },swapElementClass:function(_401,_402,_403){ var obj=MochiKit.DOM.getElement(_401); var res=MochiKit.DOM.removeElementClass(obj,_402); if(res){ MochiKit.DOM.addElementClass(obj,_403); } return res; },hasElementClass:function(_404,_405){ var obj=MochiKit.DOM.getElement(_404); var _406=obj.className.split(" "); for(var i=1;i<arguments.length;i++){ var good=false; for(var j=0;j<_406.length;j++){ if(_406[j]==arguments[i]){ good=true; break; } } if(!good){ return false; } } return true; },escapeHTML:function(s){ return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"); },toHTML:function(dom){ return MochiKit.DOM.emitHTML(dom).join(""); },emitHTML:function(dom,lst){ if(typeof (lst)=="undefined"||lst===null){ lst=[]; } var _409=[dom]; var self=MochiKit.DOM; var _410=self.escapeHTML; var _411=self.attributeArray; while(_409.length){ dom=_409.pop(); if(typeof (dom)=="string"){ lst.push(dom); }else{ if(dom.nodeType==1){ lst.push("<"+dom.nodeName.toLowerCase()); var _412=[]; var _413=_411(dom); for(var i=0;i<_413.length;i++){ var a=_413[i]; _412.push([" ",a.name,"=\"",_410(a.value),"\""]); } _412.sort(); for(i=0;i<_412.length;i++){ var _414=_412[i]; for(var j=0;j<_414.length;j++){ lst.push(_414[j]); } } if(dom.hasChildNodes()){ lst.push(">"); _409.push("</"+dom.nodeName.toLowerCase()+">"); var _415=dom.childNodes; for(i=_415.length-1;i>=0;i--){ _409.push(_415[i]); } }else{ lst.push("/>"); } }else{ if(dom.nodeType==3){ lst.push(_410(dom.nodeValue)); } } } } return lst; },setDisplayForElement:function(_416,_417){ var m=MochiKit.Base; var _418=m.extend(null,arguments,1); MochiKit.Iter.forEach(m.filter(null,m.map(MochiKit.DOM.getElement,_418)),function(_417){ _417.style.display=_416; }); },scrapeText:function(node,_419){ var rval=[]; (function(node){ var cn=node.childNodes; if(cn){ for(var i=0;i<cn.length;i++){ arguments.callee.call(this,cn[i]); } } var _421=node.nodeValue; if(typeof (_421)=="string"){ rval.push(_421); } })(MochiKit.DOM.getElement(node)); if(_419){ return rval; }else{ return rval.join(""); } },__new__:function(win){ var m=MochiKit.Base; this._document=document; this._window=win; this.domConverters=new m.AdapterRegistry(); var _422=this._document.createElement("span"); var _423; if(_422&&_422.attributes&&_422.attributes.length>0){ var _424=m.filter; _423=function(node){ return _424(_423.ignoreAttrFilter,node.attributes); }; _423.ignoreAttr={}; MochiKit.Iter.forEach(_422.attributes,function(a){ _423.ignoreAttr[a.name]=a.value; }); _423.ignoreAttrFilter=function(a){ return (_423.ignoreAttr[a.name]!=a.value); }; _423.compliant=false; _423.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor"}; }else{ _423=function(node){ return node.attributes; }; _423.compliant=true; _423.renames={}; } this.attributeArray=_423; var _425=this.createDOMFunc; this.UL=_425("ul"); this.OL=_425("ol"); this.LI=_425("li"); this.TD=_425("td"); this.TR=_425("tr"); this.TBODY=_425("tbody"); this.THEAD=_425("thead"); this.TFOOT=_425("tfoot"); this.TABLE=_425("table"); this.TH=_425("th"); this.INPUT=_425("input"); this.SPAN=_425("span"); this.A=_425("a"); this.DIV=_425("div"); this.IMG=_425("img"); this.BUTTON=_425("button"); this.TT=_425("tt"); this.PRE=_425("pre"); this.H1=_425("h1"); this.H2=_425("h2"); this.H3=_425("h3"); this.BR=_425("br"); this.HR=_425("hr"); this.LABEL=_425("label"); this.TEXTAREA=_425("textarea"); this.FORM=_425("form"); this.P=_425("p"); this.SELECT=_425("select"); this.OPTION=_425("option"); this.OPTGROUP=_425("optgroup"); this.LEGEND=_425("legend"); this.FIELDSET=_425("fieldset"); this.STRONG=_425("strong"); this.CANVAS=_425("canvas"); this.hideElement=m.partial(this.setDisplayForElement,"none"); this.showElement=m.partial(this.setDisplayForElement,"block"); this.removeElement=this.swapDOM; this.$=this.getElement; this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; m.nameFunctions(this); }}); MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window)); if(!MochiKit.__compat__){ withWindow=MochiKit.DOM.withWindow; withDocument=MochiKit.DOM.withDocument; } MochiKit.Base._exportSymbols(this,MochiKit.DOM); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.LoggingPane"); dojo.require("MochiKit.Logging"); dojo.require("MochiKit.Base"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Logging",[]); JSAN.use("MochiKit.Base",[]); } try{ if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.Logging)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.LoggingPane depends on MochiKit.Base and MochiKit.Logging!"; } if(typeof (MochiKit.LoggingPane)=="undefined"){ MochiKit.LoggingPane={}; } MochiKit.LoggingPane.NAME="MochiKit.LoggingPane"; MochiKit.LoggingPane.VERSION="1.3.1"; MochiKit.LoggingPane.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.LoggingPane.toString=function(){ return this.__repr__(); }; MochiKit.LoggingPane.createLoggingPane=function(_426){ var m=MochiKit.LoggingPane; _426=!(!_426); if(m._loggingPane&&m._loggingPane.inline!=_426){ m._loggingPane.closePane(); m._loggingPane=null; } if(!m._loggingPane||m._loggingPane.closed){ m._loggingPane=new m.LoggingPane(_426,MochiKit.Logging.logger); } return m._loggingPane; }; MochiKit.LoggingPane.LoggingPane=function(_427,_428){ if(typeof (_428)=="undefined"||_428===null){ _428=MochiKit.Logging.logger; } this.logger=_428; var _429=MochiKit.Base.update; var _430=MochiKit.Base.updatetree; var bind=MochiKit.Base.bind; var _431=MochiKit.Base.clone; var win=window; var uid="_MochiKit_LoggingPane"; if(typeof (MochiKit.DOM)!="undefined"){ win=MochiKit.DOM.currentWindow(); } if(!_427){ var url=win.location.href.split("?")[0].replace(/[:\/.><&]/g,"_"); var name=uid+"_"+url; var nwin=win.open("",name,"dependent,resizable,height=200"); if(!nwin){ alert("Not able to open debugging window due to pop-up blocking."); return undefined; } nwin.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" "+"\"http://www.w3.org/TR/html4/loose.dtd\">"+"<html><head><title>[MochiKit.LoggingPane]</title></head>"+"<body></body></html>"); nwin.document.close(); nwin.document.title+=" "+win.document.title; win=nwin; } var doc=win.document; this.doc=doc; var _434=doc.getElementById(uid); var _435=!!_434; if(_434&&typeof (_434.loggingPane)!="undefined"){ _434.loggingPane.logger=this.logger; _434.loggingPane.buildAndApplyFilter(); return _434.loggingPane; } if(_435){ var _436; while((_436=_434.firstChild)){ _434.removeChild(_436); } }else{ _434=doc.createElement("div"); _434.id=uid; } _434.loggingPane=this; var _437=doc.createElement("input"); var _438=doc.createElement("input"); var _439=doc.createElement("button"); var _440=doc.createElement("button"); var _441=doc.createElement("button"); var _442=doc.createElement("button"); var _443=doc.createElement("div"); var _444=doc.createElement("div"); var _445=uid+"_Listener"; this.colorTable=_431(this.colorTable); var _446=[]; var _447=null; var _448=function(msg){ var _449=msg.level; if(typeof (_449)=="number"){ _449=MochiKit.Logging.LogLevel[_449]; } return _449; }; var _450=function(msg){ return msg.info.join(" "); }; var _451=bind(function(msg){ var _452=_448(msg); var text=_450(msg); var c=this.colorTable[_452]; var p=doc.createElement("span"); p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_452; p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c; p.appendChild(doc.createTextNode(_452+": "+text)); _444.appendChild(p); _444.appendChild(doc.createElement("br")); if(_443.offsetHeight>_443.scrollHeight){ _443.scrollTop=0; }else{ _443.scrollTop=_443.scrollHeight; } },this); var _454=function(msg){ _446[_446.length]=msg; _451(msg); }; var _455=function(){ var _456,infore; try{ _456=new RegExp(_437.value); infore=new RegExp(_438.value); } catch(e){ logDebug("Error in filter regex: "+e.message); return null; } return function(msg){ return (_456.test(_448(msg))&&infore.test(_450(msg))); }; }; var _457=function(){ while(_444.firstChild){ _444.removeChild(_444.firstChild); } }; var _458=function(){ _446=[]; _457(); }; var _459=bind(function(){ if(this.closed){ return; } this.closed=true; if(MochiKit.LoggingPane._loggingPane==this){ MochiKit.LoggingPane._loggingPane=null; } this.logger.removeListener(_445); _434.loggingPane=null; if(_427){ _434.parentNode.removeChild(_434); }else{ this.win.close(); } },this); var _460=function(){ _457(); for(var i=0;i<_446.length;i++){ var msg=_446[i]; if(_447===null||_447(msg)){ _451(msg); } } }; this.buildAndApplyFilter=function(){ _447=_455(); _460(); this.logger.removeListener(_445); this.logger.addListener(_445,_447,_454); }; var _461=bind(function(){ _446=this.logger.getMessages(); _460(); },this); var _462=bind(function(_463){ _463=_463||window.event; key=_463.which||_463.keyCode; if(key==13){ this.buildAndApplyFilter(); } },this); var _464="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont; if(_427){ _464+="; height: 10em; border-top: 2px solid black"; }else{ _464+="; height: 100%;"; } _434.style.cssText=_464; if(!_435){ doc.body.appendChild(_434); } _464={"cssText":"width: 33%; display: inline; font: "+this.logFont}; _430(_437,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_462,"style":_464}); _434.appendChild(_437); _430(_438,{"value":".*","onkeypress":_462,"style":_464}); _434.appendChild(_438); _464="width: 8%; display:inline; font: "+this.logFont; _439.appendChild(doc.createTextNode("Filter")); _439.onclick=bind("buildAndApplyFilter",this); _439.style.cssText=_464; _434.appendChild(_439); _440.appendChild(doc.createTextNode("Load")); _440.onclick=_461; _440.style.cssText=_464; _434.appendChild(_440); _441.appendChild(doc.createTextNode("Clear")); _441.onclick=_458; _441.style.cssText=_464; _434.appendChild(_441); _442.appendChild(doc.createTextNode("Close")); _442.onclick=_459; _442.style.cssText=_464; _434.appendChild(_442); _443.style.cssText="overflow: auto; width: 100%"; _444.style.cssText="width: 100%; height: "+(_427?"8em":"100%"); _443.appendChild(_444); _434.appendChild(_443); this.buildAndApplyFilter(); _461(); if(_427){ this.win=undefined; }else{ this.win=win; } this.inline=_427; this.closePane=_459; this.closed=false; return this; }; MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}}; MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"]; MochiKit.LoggingPane.EXPORT=["createLoggingPane"]; MochiKit.LoggingPane.__new__=function(){ this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)}; MochiKit.Base.nameFunctions(this); MochiKit.LoggingPane._loggingPane=null; }; MochiKit.LoggingPane.__new__(); MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Color"); dojo.require("MochiKit.Base"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); } try{ if(typeof (MochiKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Color depends on MochiKit.Base"; } if(typeof (MochiKit.Color)=="undefined"){ MochiKit.Color={}; } MochiKit.Color.NAME="MochiKit.Color"; MochiKit.Color.VERSION="1.3.1"; MochiKit.Color.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.Color.toString=function(){ return this.__repr__(); }; MochiKit.Color.Color=function(red,_466,blue,_468){ if(typeof (_468)=="undefined"||_468===null){ _468=1; } this.rgb={r:red,g:_466,b:blue,a:_468}; }; MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_469){ var rgb=this.rgb; var m=MochiKit.Color; return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_469); },colorWithHue:function(hue){ var hsl=this.asHSL(); hsl.h=hue; var m=MochiKit.Color; return m.Color.fromHSL(hsl); },colorWithSaturation:function(_473){ var hsl=this.asHSL(); hsl.s=_473; var m=MochiKit.Color; return m.Color.fromHSL(hsl); },colorWithLightness:function(_474){ var hsl=this.asHSL(); hsl.l=_474; var m=MochiKit.Color; return m.Color.fromHSL(hsl); },darkerColorWithLevel:function(_475){ var hsl=this.asHSL(); hsl.l=Math.max(hsl.l-_475,0); var m=MochiKit.Color; return m.Color.fromHSL(hsl); },lighterColorWithLevel:function(_476){ var hsl=this.asHSL(); hsl.l=Math.min(hsl.l+_476,1); var m=MochiKit.Color; return m.Color.fromHSL(hsl); },blendedColor:function(_477,_478){ if(typeof (_478)=="undefined"||_478===null){ _478=0.5; } var sf=1-_478; var s=this.rgb; var d=_477.rgb; var df=_478; return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df)); },compareRGB:function(_481){ var a=this.asRGB(); var b=_481.asRGB(); return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]); },isLight:function(){ return this.asHSL().b>0.5; },isDark:function(){ return (!this.isLight()); },toHSLString:function(){ var c=this.asHSL(); var ccc=MochiKit.Color.clampColorComponent; var rval=this._hslString; if(!rval){ var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%"); var a=c.a; if(a>=1){ a=1; rval="hsl("+mid+")"; }else{ if(a<=0){ a=0; } rval="hsla("+mid+","+a+")"; } this._hslString=rval; } return rval; },toRGBString:function(){ var c=this.rgb; var ccc=MochiKit.Color.clampColorComponent; var rval=this._rgbString; if(!rval){ var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0)); if(c.a!=1){ rval="rgba("+mid+","+c.a+")"; }else{ rval="rgb("+mid+")"; } this._rgbString=rval; } return rval; },asRGB:function(){ return MochiKit.Base.clone(this.rgb); },toHexString:function(){ var m=MochiKit.Color; var c=this.rgb; var ccc=MochiKit.Color.clampColorComponent; var rval=this._hexString; if(!rval){ rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255))); this._hexString=rval; } return rval; },asHSV:function(){ var hsv=this.hsv; var c=this.rgb; if(typeof (hsv)=="undefined"||hsv===null){ hsv=MochiKit.Color.rgbToHSV(this.rgb); this.hsv=hsv; } return MochiKit.Base.clone(hsv); },asHSL:function(){ var hsl=this.hsl; var c=this.rgb; if(typeof (hsl)=="undefined"||hsl===null){ hsl=MochiKit.Color.rgbToHSL(this.rgb); this.hsl=hsl; } return MochiKit.Base.clone(hsl); },toString:function(){ return this.toRGBString(); },repr:function(){ var c=this.rgb; var col=[c.r,c.g,c.b,c.a]; return this.__class__.NAME+"("+col.join(", ")+")"; }}; MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_486,blue,_487){ var _488=MochiKit.Color.Color; if(arguments.length==1){ var rgb=red; red=rgb.r; _486=rgb.g; blue=rgb.b; if(typeof (rgb.a)=="undefined"){ _487=undefined; }else{ _487=rgb.a; } } return new _488(red,_486,blue,_487); },fromHSL:function(hue,_489,_490,_491){ var m=MochiKit.Color; return m.Color.fromRGB(m.hslToRGB.apply(m,arguments)); },fromHSV:function(hue,_492,_493,_494){ var m=MochiKit.Color; return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments)); },fromName:function(name){ var _495=MochiKit.Color.Color; if(name.charAt(0)=="\""){ name=name.substr(1,name.length-2); } var _496=_495._namedColors[name.toLowerCase()]; if(typeof (_496)=="string"){ return _495.fromHexString(_496); }else{ if(name=="transparent"){ return _495.transparentColor(); } } return null; },fromString:function(_497){ var self=MochiKit.Color.Color; var _498=_497.substr(0,3); if(_498=="rgb"){ return self.fromRGBString(_497); }else{ if(_498=="hsl"){ return self.fromHSLString(_497); }else{ if(_497.charAt(0)=="#"){ return self.fromHexString(_497); } } } return self.fromName(_497); },fromHexString:function(_499){ if(_499.charAt(0)=="#"){ _499=_499.substring(1); } var _500=[]; var i,hex; if(_499.length==3){ for(i=0;i<3;i++){ hex=_499.substr(i,1); _500.push(parseInt(hex+hex,16)/255); } }else{ for(i=0;i<6;i+=2){ hex=_499.substr(i,2); _500.push(parseInt(hex,16)/255); } } var _501=MochiKit.Color.Color; return _501.fromRGB.apply(_501,_500); },_fromColorString:function(pre,_503,_504,_505){ if(_505.indexOf(pre)===0){ _505=_505.substring(_505.indexOf("(",3)+1,_505.length-1); } var _506=_505.split(/\s*,\s*/); var _507=[]; for(var i=0;i<_506.length;i++){ var c=_506[i]; var val; var _508=c.substring(c.length-3); if(c.charAt(c.length-1)=="%"){ val=0.01*parseFloat(c.substring(0,c.length-1)); }else{ if(_508=="deg"){ val=parseFloat(c)/360; }else{ if(_508=="rad"){ val=parseFloat(c)/(Math.PI*2); }else{ val=_504[i]*parseFloat(c); } } } _507.push(val); } return this[_503].apply(this,_507); },fromComputedStyle:function(elem,_509,_510){ var d=MochiKit.DOM; var cls=MochiKit.Color.Color; for(elem=d.getElement(elem);elem;elem=elem.parentNode){ var _511=d.computedStyle.apply(d,arguments); if(!_511){ continue; } var _512=cls.fromString(_511); if(!_512){ break; } if(_512.asRGB().a>0){ return _512; } } return null; },fromBackground:function(elem){ var cls=MochiKit.Color.Color; return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor(); },fromText:function(elem){ var cls=MochiKit.Color.Color; return cls.fromComputedStyle(elem,"color","color")||cls.blackColor(); },namedColors:function(){ return MochiKit.Base.clone(MochiKit.Color.Color._namedColors); }}); MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_513){ v*=_513; if(v<0){ return 0; }else{ if(v>_513){ return _513; }else{ return v; } } },_hslValue:function(n1,n2,hue){ if(hue>6){ hue-=6; }else{ if(hue<0){ hue+=6; } } var val; if(hue<1){ val=n1+(n2-n1)*hue; }else{ if(hue<3){ val=n2; }else{ if(hue<4){ val=n1+(n2-n1)*(4-hue); }else{ val=n1; } } } return val; },hsvToRGB:function(hue,_516,_517,_518){ if(arguments.length==1){ var hsv=hue; hue=hsv.h; _516=hsv.s; _517=hsv.v; _518=hsv.a; } var red; var _519; var blue; if(_516===0){ red=0; _519=0; blue=0; }else{ var i=Math.floor(hue*6); var f=(hue*6)-i; var p=_517*(1-_516); var q=_517*(1-(_516*f)); var t=_517*(1-(_516*(1-f))); switch(i){ case 1: red=q; _519=_517; blue=p; break; case 2: red=p; _519=_517; blue=t; break; case 3: red=p; _519=q; blue=_517; break; case 4: red=t; _519=p; blue=_517; break; case 5: red=_517; _519=p; blue=q; break; case 6: case 0: red=_517; _519=t; blue=p; break; } } return {r:red,g:_519,b:blue,a:_518}; },hslToRGB:function(hue,_521,_522,_523){ if(arguments.length==1){ var hsl=hue; hue=hsl.h; _521=hsl.s; _522=hsl.l; _523=hsl.a; } var red; var _524; var blue; if(_521===0){ red=_522; _524=_522; blue=_522; }else{ var m2; if(_522<=0.5){ m2=_522*(1+_521); }else{ m2=_522+_521-(_522*_521); } var m1=(2*_522)-m2; var f=MochiKit.Color._hslValue; var h6=hue*6; red=f(m1,m2,h6+2); _524=f(m1,m2,h6); blue=f(m1,m2,h6-2); } return {r:red,g:_524,b:blue,a:_523}; },rgbToHSV:function(red,_528,blue,_529){ if(arguments.length==1){ var rgb=red; red=rgb.r; _528=rgb.g; blue=rgb.b; _529=rgb.a; } var max=Math.max(Math.max(red,_528),blue); var min=Math.min(Math.min(red,_528),blue); var hue; var _532; var _533=max; if(min==max){ hue=0; _532=0; }else{ var _534=(max-min); _532=_534/max; if(red==max){ hue=(_528-blue)/_534; }else{ if(_528==max){ hue=2+((blue-red)/_534); }else{ hue=4+((red-_528)/_534); } } hue/=6; if(hue<0){ hue+=1; } if(hue>1){ hue-=1; } } return {h:hue,s:_532,v:_533,a:_529}; },rgbToHSL:function(red,_535,blue,_536){ if(arguments.length==1){ var rgb=red; red=rgb.r; _535=rgb.g; blue=rgb.b; _536=rgb.a; } var max=Math.max(red,Math.max(_535,blue)); var min=Math.min(red,Math.min(_535,blue)); var hue; var _537; var _538=(max+min)/2; var _539=max-min; if(_539===0){ hue=0; _537=0; }else{ if(_538<=0.5){ _537=_539/(max+min); }else{ _537=_539/(2-max-min); } if(red==max){ hue=(_535-blue)/_539; }else{ if(_535==max){ hue=2+((blue-red)/_539); }else{ hue=4+((red-_535)/_539); } } hue/=6; if(hue<0){ hue+=1; } if(hue>1){ hue-=1; } } return {h:hue,s:_537,l:_538,a:_536}; },toColorPart:function(num){ num=Math.round(num); var _540=num.toString(16); if(num<16){ return "0"+_540; } return _540; },__new__:function(){ var m=MochiKit.Base; this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]); this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]); var _541=1/3; var _542={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_541,_541,_541],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_541,2*_541,2*_541],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; var _543=function(name,r,g,b,a){ var rval=this.fromRGB(r,g,b,a); this[name]=function(){ return rval; }; return rval; }; for(var k in _542){ var name=k+"Color"; var _545=m.concat([_543,this.Color,name],_542[k]); this.Color[name]=m.bind.apply(null,_545); } var _546=function(){ for(var i=0;i<arguments.length;i++){ if(!(arguments[i] instanceof Color)){ return false; } } return true; }; var _547=function(a,b){ return a.compareRGB(b); }; m.nameFunctions(this); m.registerComparator(this.Color.NAME,_546,_547); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }}); MochiKit.Color.EXPORT=["Color"]; MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"]; MochiKit.Color.__new__(); MochiKit.Base._exportSymbols(this,MochiKit.Color); MochiKit.Color.Color._namedColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}; if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Signal"); dojo.require("MochiKit.Base"); dojo.require("MochiKit.DOM"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); JSAN.use("MochiKit.DOM",[]); } try{ if(typeof (MochiKit.Base)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Signal depends on MochiKit.Base!"; } try{ if(typeof (MochiKit.DOM)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Signal depends on MochiKit.DOM!"; } if(typeof (MochiKit.Signal)=="undefined"){ MochiKit.Signal={}; } MochiKit.Signal.NAME="MochiKit.Signal"; MochiKit.Signal.VERSION="1.3.1"; MochiKit.Signal._observers=[]; MochiKit.Signal.Event=function(src,e){ this._event=e||window.event; this._src=src; }; MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){ var repr=MochiKit.Base.repr; var str="{event(): "+repr(this.event())+", src(): "+repr(this.src())+", type(): "+repr(this.type())+", target(): "+repr(this.target())+", modifier(): "+"{alt: "+repr(this.modifier().alt)+", ctrl: "+repr(this.modifier().ctrl)+", meta: "+repr(this.modifier().meta)+", shift: "+repr(this.modifier().shift)+", any: "+repr(this.modifier().any)+"}"; if(this.type()&&this.type().indexOf("key")===0){ str+=", key(): {code: "+repr(this.key().code)+", string: "+repr(this.key().string)+"}"; } if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){ str+=", mouse(): {page: "+repr(this.mouse().page)+", client: "+repr(this.mouse().client); if(this.type()!="mousemove"){ str+=", button: {left: "+repr(this.mouse().button.left)+", middle: "+repr(this.mouse().button.middle)+", right: "+repr(this.mouse().button.right)+"}}"; }else{ str+="}"; } } if(this.type()=="mouseover"||this.type()=="mouseout"){ str+=", relatedTarget(): "+repr(this.relatedTarget()); } str+="}"; return str; },toString:function(){ return this.__repr__(); },src:function(){ return this._src; },event:function(){ return this._event; },type:function(){ return this._event.type||undefined; },target:function(){ return this._event.target||this._event.srcElement; },relatedTarget:function(){ if(this.type()=="mouseover"){ return (this._event.relatedTarget||this._event.fromElement); }else{ if(this.type()=="mouseout"){ return (this._event.relatedTarget||this._event.toElement); } } return undefined; },modifier:function(){ var m={}; m.alt=this._event.altKey; m.ctrl=this._event.ctrlKey; m.meta=this._event.metaKey||false; m.shift=this._event.shiftKey; m.any=m.alt||m.ctrl||m.shift||m.meta; return m; },key:function(){ var k={}; if(this.type()&&this.type().indexOf("key")===0){ if(this.type()=="keydown"||this.type()=="keyup"){ k.code=this._event.keyCode; k.string=(MochiKit.Signal._specialKeys[k.code]||"KEY_UNKNOWN"); return k; }else{ if(this.type()=="keypress"){ k.code=0; k.string=""; if(typeof (this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){ k.code=this._event.charCode; k.string=String.fromCharCode(k.code); }else{ if(this._event.keyCode&&typeof (this._event.charCode)=="undefined"){ k.code=this._event.keyCode; k.string=String.fromCharCode(k.code); } } return k; } } } return undefined; },mouse:function(){ var m={}; var e=this._event; if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){ m.client=new MochiKit.DOM.Coordinates(0,0); if(e.clientX||e.clientY){ m.client.x=(!e.clientX||e.clientX<0)?0:e.clientX; m.client.y=(!e.clientY||e.clientY<0)?0:e.clientY; } m.page=new MochiKit.DOM.Coordinates(0,0); if(e.pageX||e.pageY){ m.page.x=(!e.pageX||e.pageX<0)?0:e.pageX; m.page.y=(!e.pageY||e.pageY<0)?0:e.pageY; }else{ var de=MochiKit.DOM._document.documentElement; var b=MochiKit.DOM._document.body; m.page.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft); m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop); } if(this.type()!="mousemove"){ m.button={}; m.button.left=false; m.button.right=false; m.button.middle=false; if(e.which){ m.button.left=(e.which==1); m.button.middle=(e.which==2); m.button.right=(e.which==3); }else{ m.button.left=!!(e.button&1); m.button.right=!!(e.button&2); m.button.middle=!!(e.button&4); } } return m; } return undefined; },stop:function(){ this.stopPropagation(); this.preventDefault(); },stopPropagation:function(){ if(this._event.stopPropagation){ this._event.stopPropagation(); }else{ this._event.cancelBubble=true; } },preventDefault:function(){ if(this._event.preventDefault){ this._event.preventDefault(); }else{ this._event.returnValue=false; } }}); MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"}; for(i=63236;i<=63242;i++){ MochiKit.Signal._specialMacKeys[i]="KEY_F"+(i-63236+1); } MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"}; for(var i=48;i<=57;i++){ MochiKit.Signal._specialKeys[i]="KEY_"+(i-48); } for(i=65;i<=90;i++){ MochiKit.Signal._specialKeys[i]="KEY_"+String.fromCharCode(i); } for(i=96;i<=105;i++){ MochiKit.Signal._specialKeys[i]="KEY_NUM_PAD_"+(i-96); } for(i=112;i<=123;i++){ MochiKit.Signal._specialKeys[i]="KEY_F"+(i-112+1); } MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){ return "["+this.NAME+" "+this.VERSION+"]"; },toString:function(){ return this.__repr__(); },_unloadCache:function(){ var self=MochiKit.Signal; var _548=self._observers; for(var i=0;i<_548.length;i++){ self._disconnect(_548[i]); } delete self._observers; try{ window.onload=undefined; } catch(e){ } try{ window.onunload=undefined; } catch(e){ } },_listener:function(src,func,obj,_549){ var E=MochiKit.Signal.Event; if(!_549){ return MochiKit.Base.bind(func,obj); } obj=obj||src; if(typeof (func)=="string"){ return function(_551){ obj[func].apply(obj,[new E(src,_551)]); }; }else{ return function(_552){ func.apply(obj,[new E(src,_552)]); }; } },connect:function(src,sig,_554,_555){ src=MochiKit.DOM.getElement(src); var self=MochiKit.Signal; if(typeof (sig)!="string"){ throw new Error("''sig'' must be a string"); } var obj=null; var func=null; if(typeof (_555)!="undefined"){ obj=_554; func=_555; if(typeof (_555)=="string"){ if(typeof (_554[_555])!="function"){ throw new Error("''funcOrStr'' must be a function on ''objOrFunc''"); } }else{ if(typeof (_555)!="function"){ throw new Error("''funcOrStr'' must be a function or string"); } } }else{ if(typeof (_554)!="function"){ throw new Error("''objOrFunc'' must be a function if ''funcOrStr'' is not given"); }else{ func=_554; } } if(typeof (obj)=="undefined"||obj===null){ obj=src; } var _556=!!(src.addEventListener||src.attachEvent); var _557=self._listener(src,func,obj,_556); if(src.addEventListener){ src.addEventListener(sig.substr(2),_557,false); }else{ if(src.attachEvent){ src.attachEvent(sig,_557); } } var _558=[src,sig,_557,_556,_554,_555]; self._observers.push(_558); return _558; },_disconnect:function(_559){ if(!_559[3]){ return; } var src=_559[0]; var sig=_559[1]; var _560=_559[2]; if(src.removeEventListener){ src.removeEventListener(sig.substr(2),_560,false); }else{ if(src.detachEvent){ src.detachEvent(sig,_560); }else{ throw new Error("''src'' must be a DOM element"); } } },disconnect:function(_561){ var self=MochiKit.Signal; var _562=self._observers; var m=MochiKit.Base; if(arguments.length>1){ var src=MochiKit.DOM.getElement(arguments[0]); var sig=arguments[1]; var obj=arguments[2]; var func=arguments[3]; for(var i=_562.length-1;i>=0;i--){ var o=_562[i]; if(o[0]===src&&o[1]===sig&&o[4]===obj&&o[5]===func){ self._disconnect(o); _562.splice(i,1); return true; } } }else{ var idx=m.findIdentical(_562,_561); if(idx>=0){ self._disconnect(_561); _562.splice(idx,1); return true; } } return false; },disconnectAll:function(src,sig){ src=MochiKit.DOM.getElement(src); var m=MochiKit.Base; var _563=m.flattenArguments(m.extend(null,arguments,1)); var self=MochiKit.Signal; var _564=self._disconnect; var _565=self._observers; if(_563.length===0){ for(var i=_565.length-1;i>=0;i--){ var _566=_565[i]; if(_566[0]===src){ _564(_566); _565.splice(i,1); } } }else{ var sigs={}; for(var i=0;i<_563.length;i++){ sigs[_563[i]]=true; } for(var i=_565.length-1;i>=0;i--){ var _566=_565[i]; if(_566[0]===src&&_566[1] in sigs){ _564(_566); _565.splice(i,1); } } } },signal:function(src,sig){ var _568=MochiKit.Signal._observers; src=MochiKit.DOM.getElement(src); var args=MochiKit.Base.extend(null,arguments,2); var _569=[]; for(var i=0;i<_568.length;i++){ var _570=_568[i]; if(_570[0]===src&&_570[1]===sig){ try{ _570[2].apply(src,args); } catch(e){ _569.push(e); } } } if(_569.length==1){ throw _569[0]; }else{ if(_569.length>1){ var e=new Error("Multiple errors thrown in handling ''sig'', see errors property"); e.errors=_569; throw e; } } }}); MochiKit.Signal.EXPORT_OK=[]; MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"]; MochiKit.Signal.__new__=function(win){ var m=MochiKit.Base; this._document=document; this._window=win; try{ this.connect(window,"onunload",this._unloadCache); } catch(e){ } this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; m.nameFunctions(this); }; MochiKit.Signal.__new__(this); if(!MochiKit.__compat__){ connect=MochiKit.Signal.connect; disconnect=MochiKit.Signal.disconnect; disconnectAll=MochiKit.Signal.disconnectAll; signal=MochiKit.Signal.signal; } MochiKit.Base._exportSymbols(this,MochiKit.Signal); if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Visual"); dojo.require("MochiKit.Base"); dojo.require("MochiKit.DOM"); dojo.require("MochiKit.Color"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); JSAN.use("MochiKit.DOM",[]); JSAN.use("MochiKit.Color",[]); } try{ if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){ throw ""; } } catch(e){ throw "MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM and MochiKit.Color!"; } if(typeof (MochiKit.Visual)=="undefined"){ MochiKit.Visual={}; } MochiKit.Visual.NAME="MochiKit.Visual"; MochiKit.Visual.VERSION="1.3.1"; MochiKit.Visual.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.Visual.toString=function(){ return this.__repr__(); }; MochiKit.Visual._RoundCorners=function(e,_571){ e=MochiKit.DOM.getElement(e); this._setOptions(_571); if(this.options.__unstable__wrapElement){ e=this._doWrap(e); } var _572=this.options.color; var C=MochiKit.Color.Color; if(this.options.color=="fromElement"){ _572=C.fromBackground(e); }else{ if(!(_572 instanceof C)){ _572=C.fromString(_572); } } this.isTransparent=(_572.asRGB().a<=0); var _574=this.options.bgColor; if(this.options.bgColor=="fromParent"){ _574=C.fromBackground(e.offsetParent); }else{ if(!(_574 instanceof C)){ _574=C.fromString(_574); } } this._roundCornersImpl(e,_572,_574); }; MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){ var _575=e.parentNode; var doc=MochiKit.DOM.currentDocument(); if(typeof (doc.defaultView)=="undefined"||doc.defaultView===null){ return e; } var _576=doc.defaultView.getComputedStyle(e,null); if(typeof (_576)=="undefined"||_576===null){ return e; } var _577=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_576.getPropertyValue("padding-top"),marginRight:_576.getPropertyValue("padding-right"),marginBottom:_576.getPropertyValue("padding-bottom"),marginLeft:_576.getPropertyValue("padding-left"),padding:"0px"}}); _577.innerHTML=e.innerHTML; e.innerHTML=""; e.appendChild(_577); return e; },_roundCornersImpl:function(e,_578,_579){ if(this.options.border){ this._renderBorder(e,_579); } if(this._isTopRounded()){ this._roundTopCorners(e,_578,_579); } if(this._isBottomRounded()){ this._roundBottomCorners(e,_578,_579); } },_renderBorder:function(el,_580){ var _581="1px solid "+this._borderColor(_580); var _582="border-left: "+_581; var _583="border-right: "+_581; var _584="style=''"+_582+";"+_583+"''"; el.innerHTML="<div "+_584+">"+el.innerHTML+"</div>"; },_roundTopCorners:function(el,_585,_586){ var _587=this._createCorner(_586); for(var i=0;i<this.options.numSlices;i++){ _587.appendChild(this._createCornerSlice(_585,_586,i,"top")); } el.style.paddingTop=0; el.insertBefore(_587,el.firstChild); },_roundBottomCorners:function(el,_588,_589){ var _590=this._createCorner(_589); for(var i=(this.options.numSlices-1);i>=0;i--){ _590.appendChild(this._createCornerSlice(_588,_589,i,"bottom")); } el.style.paddingBottom=0; el.appendChild(_590); },_createCorner:function(_591){ var dom=MochiKit.DOM; return dom.DIV({style:{backgroundColor:_591.toString()}}); },_createCornerSlice:function(_592,_593,n,_594){ var _595=MochiKit.DOM.SPAN(); var _596=_595.style; _596.backgroundColor=_592.toString(); _596.display="block"; _596.height="1px"; _596.overflow="hidden"; _596.fontSize="1px"; var _597=this._borderColor(_592,_593); if(this.options.border&&n===0){ _596.borderTopStyle="solid"; _596.borderTopWidth="1px"; _596.borderLeftWidth="0px"; _596.borderRightWidth="0px"; _596.borderBottomWidth="0px"; _596.height="0px"; _596.borderColor=_597.toString(); }else{ if(_597){ _596.borderColor=_597.toString(); _596.borderStyle="solid"; _596.borderWidth="0px 1px"; } } if(!this.options.compact&&(n==(this.options.numSlices-1))){ _596.height="2px"; } this._setMargin(_595,n,_594); this._setBorder(_595,n,_594); return _595; },_setOptions:function(_598){ this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false}; MochiKit.Base.update(this.options,_598); this.options.numSlices=(this.options.compact?2:4); },_whichSideTop:function(){ var _599=this.options.corners; if(this._hasString(_599,"all","top")){ return ""; } var _600=(_599.indexOf("tl")!=-1); var _601=(_599.indexOf("tr")!=-1); if(_600&&_601){ return ""; } if(_600){ return "left"; } if(_601){ return "right"; } return ""; },_whichSideBottom:function(){ var _602=this.options.corners; if(this._hasString(_602,"all","bottom")){ return ""; } var _603=(_602.indexOf("bl")!=-1); var _604=(_602.indexOf("br")!=-1); if(_603&&_604){ return ""; } if(_603){ return "left"; } if(_604){ return "right"; } return ""; },_borderColor:function(_605,_606){ if(_605=="transparent"){ return _606; }else{ if(this.options.border){ return this.options.border; }else{ if(this.options.blend){ return _606.blendedColor(_605); } } } return ""; },_setMargin:function(el,n,_607){ var _608=this._marginSize(n)+"px"; var _609=(_607=="top"?this._whichSideTop():this._whichSideBottom()); var _610=el.style; if(_609=="left"){ _610.marginLeft=_608; _610.marginRight="0px"; }else{ if(_609=="right"){ _610.marginRight=_608; _610.marginLeft="0px"; }else{ _610.marginLeft=_608; _610.marginRight=_608; } } },_setBorder:function(el,n,_611){ var _612=this._borderSize(n)+"px"; var _613=(_611=="top"?this._whichSideTop():this._whichSideBottom()); var _614=el.style; if(_613=="left"){ _614.borderLeftWidth=_612; _614.borderRightWidth="0px"; }else{ if(_613=="right"){ _614.borderRightWidth=_612; _614.borderLeftWidth="0px"; }else{ _614.borderLeftWidth=_612; _614.borderRightWidth=_612; } } },_marginSize:function(n){ if(this.isTransparent){ return 0; } var o=this.options; if(o.compact&&o.blend){ var _615=[1,0]; return _615[n]; }else{ if(o.compact){ var _616=[2,1]; return _616[n]; }else{ if(o.blend){ var _617=[3,2,1,0]; return _617[n]; }else{ var _618=[5,3,2,1]; return _618[n]; } } } },_borderSize:function(n){ var o=this.options; var _619; if(o.compact&&(o.blend||this.isTransparent)){ return 1; }else{ if(o.compact){ _619=[1,0]; }else{ if(o.blend){ _619=[2,1,1,1]; }else{ if(o.border){ _619=[0,2,0,0]; }else{ if(this.isTransparent){ _619=[5,3,2,1]; }else{ return 0; } } } } } return _619[n]; },_hasString:function(str){ for(var i=1;i<arguments.length;i++){ if(str.indexOf(arguments[i])!=-1){ return true; } } return false; },_isTopRounded:function(){ return this._hasString(this.options.corners,"all","top","tl","tr"); },_isBottomRounded:function(){ return this._hasString(this.options.corners,"all","bottom","bl","br"); },_hasSingleTextChild:function(el){ return (el.childNodes.length==1&&el.childNodes[0].nodeType==3); }}; MochiKit.Visual.roundElement=function(e,_620){ new MochiKit.Visual._RoundCorners(e,_620); }; MochiKit.Visual.roundClass=function(_621,_622,_623){ var _624=MochiKit.DOM.getElementsByTagAndClassName(_621,_622); for(var i=0;i<_624.length;i++){ MochiKit.Visual.roundElement(_624[i],_623); } }; MochiKit.Visual.Color=MochiKit.Color.Color; MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle; MochiKit.Visual.__new__=function(){ var m=MochiKit.Base; m.nameFunctions(this); this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; }; MochiKit.Visual.EXPORT=["roundElement","roundClass"]; MochiKit.Visual.EXPORT_OK=[]; MochiKit.Visual.__new__(); MochiKit.Base._exportSymbols(this,MochiKit.Visual); if(typeof (MochiKit)=="undefined"){ MochiKit={}; } if(typeof (MochiKit.MochiKit)=="undefined"){ MochiKit.MochiKit={}; } MochiKit.MochiKit.NAME="MochiKit.MochiKit"; MochiKit.MochiKit.VERSION="1.3.1"; MochiKit.MochiKit.__repr__=function(){ return "["+this.NAME+" "+this.VERSION+"]"; }; MochiKit.MochiKit.toString=function(){ return this.__repr__(); }; MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","LoggingPane","Color","Signal","Visual"]; if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){ if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.MochiKit"); dojo.require("MochiKit.*"); } if(typeof (JSAN)!="undefined"){ JSAN.use("MochiKit.Base",[]); JSAN.use("MochiKit.Iter",[]); JSAN.use("MochiKit.Logging",[]); JSAN.use("MochiKit.DateTime",[]); JSAN.use("MochiKit.Format",[]); JSAN.use("MochiKit.Async",[]); JSAN.use("MochiKit.DOM",[]); JSAN.use("MochiKit.LoggingPane",[]); JSAN.use("MochiKit.Color",[]); JSAN.use("MochiKit.Signal",[]); JSAN.use("MochiKit.Visual",[]); } (function(){ var _625=MochiKit.Base.extend; var self=MochiKit.MochiKit; var _626=self.SUBMODULES; var _627=[]; var _628=[]; var _629={}; var i,k,m,all; for(i=0;i<_626.length;i++){ m=MochiKit[_626[i]]; _625(_627,m.EXPORT); _625(_628,m.EXPORT_OK); for(k in m.EXPORT_TAGS){ _629[k]=_625(_629[k],m.EXPORT_TAGS[k]); } all=m.EXPORT_TAGS[":all"]; if(!all){ all=_625(null,m.EXPORT,m.EXPORT_OK); } var j; for(j=0;j<all.length;j++){ k=all[j]; self[k]=m[k]; } } self.EXPORT=_627; self.EXPORT_OK=_628; self.EXPORT_TAGS=_629; }()); }else{ if(typeof (MochiKit.__compat__)=="undefined"){ MochiKit.__compat__=true; } (function(){ var _630=document.getElementsByTagName("script"); var _631="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var base=null; var _632=null; var _633={}; var i; for(i=0;i<_630.length;i++){ var src=_630[i].getAttribute("src"); if(!src){ continue; } _633[src]=true; if(src.match(/MochiKit.js$/)){ base=src.substring(0,src.lastIndexOf("MochiKit.js")); _632=_630[i]; } } if(base===null){ return; } var _634=MochiKit.MochiKit.SUBMODULES; for(var i=0;i<_634.length;i++){ if(MochiKit[_634[i]]){ continue; } var uri=base+_634[i]+".js"; if(uri in _633){ continue; } if(document.documentElement&&document.documentElement.namespaceURI==_631){ var s=document.createElementNS(_631,"script"); s.setAttribute("id","MochiKit_"+base+_634[i]); s.setAttribute("src",uri); s.setAttribute("type","application/x-javascript"); _632.parentNode.appendChild(s); }else{ document.write("<script src=\""+uri+"\" type=\"text/javascript\"></script>"); } } })(); } '
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
yColumn ^yColumn
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
yColumn: anInteger yColumn := anInteger
</methods> <methods> Seaside.PKTableDataset <category>converting</category>
javascriptOn: aStream aStream nextPutAll: self addMethod. aStream nextPut: $(. self name javascriptOn: aStream. aStream nextPutAll: ', '. self tableElement javascriptOn: aStream. self print: self xColumn named: 'xcol' on: aStream. self print: self yColumn named: 'ycol' on: aStream. aStream nextPut: $)
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
name: aString name := aString
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
xColumn ^xColumn
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
tableElement: aString tableElement := aString
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
tableElement ^tableElement
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
name ^name
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
xColumn: anInteger xColumn := anInteger
</methods> <methods> Seaside.PKTableDataset <category>accessing</category>
addMethod ^'addDatasetFromTable'
</methods> <methods> Seaside.PKTableDataset <category>private</category>
print: aNumber named: aString on: aStream aNumber isNil ifFalse: [ aStream nextPutAll: ', '; nextPutAll: aString; nextPutAll: ' = '. aNumber javascriptOn: aStream ]
</methods> <methods> Seaside.PKChart class <category>instance creation</category>
newLineChart ^self new layout: PKLineLayout new; yourself
</methods> <methods> Seaside.PKChart class <category>instance creation</category>
newBarChart ^self new layout: PKBarLayout new; yourself
</methods> <methods> Seaside.PKChart class <category>instance creation</category>
newPieChart ^self new layout: PKPieLayout new; yourself
</methods> <methods> Seaside.PKColorScheme class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.PKCustomColorScheme class <category>instance creation</category>
wheel: thisMany "Return a color scheme of thisMany colors evenly spaced around the color wheel." ^ self wheel: thisMany saturation: 0.9 brightness: 0.7
</methods> <methods> Seaside.PKCustomColorScheme class <category>instance creation</category>
wheel: thisMany saturation: s brightness: v "Return a color scheme of thisMany colors evenly spaced around the color wheel, all of the given saturation and brightness." ^self colors: (Color wheel: thisMany saturation: s brightness: v)
</methods> <methods> Seaside.PKCustomColorScheme class <category>instance creation</category>
colors: aCollection ^self new colors: aCollection; yourself
</methods> <methods> Seaside.PKDataset class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.PKDataset class <category>instance creation</category>
name: aString data: aCollection ^self new name: aString; data: aCollection; yourself
</methods> <methods> Seaside.PKDemo class <category>testing</category>
description ^'PlotKit is a Chart and Graph Plotting Library for Javascript. It has support for HTML Canvas and also SVG via Adobe SVG Viewer and native browser support. It is based on PlotKit 0.9.1 by Alastair Tse and supports IE emulation via excanvas'
</methods> <methods> Seaside.PKDemo class <category>class initialization</category>
initialize (self registerAsApplication: 'examples/plotkit') libraries add: PKScriptLibrary
</methods> <methods> Seaside.PKDemo class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.PKDemoLibrary class <category>class initialization</category>
initialize self register
</methods> <methods> Seaside.PKLabelDemo class <category>registration</category>
description ^'Another plotKit chart'
</methods> <methods> Seaside.PKLabelDemo class <category>registration</category>
registerAsApplication: aString ^(super registerAsApplication: aString) addLibrary: PKScriptLibrary; yourself
</methods> <methods> Seaside.PKLabelDemo class <category>registration</category>
initialize self registerAsApplication: 'examples/plotkitlabel'
</methods> <methods> Seaside.PKLabelDemo class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.PKLabelImage class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.PKLayout class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.PKNegativeBarDemo class <category>testing</category>
description ^'PlotKit is a Chart and Graph Plotting Library for Javascript. It has support for HTML Canvas and also SVG via Adobe SVG Viewer and native browser support. It is based on PlotKit 0.9.1 by Alastair Tse and supports IE emulation via excanvas'
</methods> <methods> Seaside.PKNegativeBarDemo class <category>class initialization</category>
initialize (self registerAsApplication: 'examples/plotkitnegative') libraries add: PKScriptLibrary
</methods> <methods> Seaside.PKNegativeBarDemo class <category>testing</category>
canBeRoot ^true
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
cyanStyle ^'officeCyan()'
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
orange ^self new function: self orangeStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
blue ^self new function: self blueStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
baseStyle ^'officeBaseStyle'
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
red ^self new function: self redStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
redStyle ^'officeRed()'
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
base ^self new function: self baseStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
purple ^self new function: self purpleStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
greenStyle ^'officeGreen()'
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
purpleStyle ^'officePurple()'
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
orangeStyle ^'officeOrange()'
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
black ^self new function: self blackStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
cyan ^self new function: self cyanStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
blueStyle ^'officeBlue()'
</methods> <methods> Seaside.PKOfficeColors class <category>instance creation</category>
green ^self new function: self greenStyle; yourself
</methods> <methods> Seaside.PKOfficeColors class <category>accessing-constants</category>
blackStyle ^'officeBlack()'
</methods> <methods> Seaside.PKOptions class <category>instance creation</category>
new ^self basicNew initialize
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>accessing-constants</category>
lightPrimaryColors "A set of five bright primary colours." ^'basePrimaryColors()'
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>instance creation</category>
blue ^self new function: self blueColors; yourself
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>instance creation</category>
default ^self new function: self default; yourself
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>instance creation</category>
light ^self new function: self lightPrimaryColors; yourself
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>accessing-constants</category>
blueColors "Three colour set that have a nice professional blue hue." ^'baseBlueColors()'
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>instance creation</category>
base ^self new function: self baseColors; yourself
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>accessing-constants</category>
baseColors ^'baseColors()'
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>accessing-constants</category>
defaultColors "A default colour scheme that consists of red, orange, yellow, green, cyan, blue, purple and magenta." ^'colorScheme()'
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>instance creation</category>
dark ^self new function: self darkPrimaryColors; yourself
</methods> <methods> Seaside.PKPredefinedColorScheme class <category>accessing-constants</category>
darkPrimaryColors "A set of five dark colours." ^'baseDarkPrimaryColors()'
</methods> <methods> Seaside.PKRenderer class <category>instance creation</category>
new ^self basicNew initialize
</methods> <initialize> Seaside.PKDemo </initialize> <initialize> Seaside.PKDemoLibrary </initialize> <initialize> Seaside.PKLabelDemo </initialize> <initialize> Seaside.PKNegativeBarDemo </initialize>