summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-08-24 20:00:41 +0200
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-08-24 20:01:13 +0200
commit702ffe024f7f735e5690c5d6acff3f5d3139a55b (patch)
tree177e43e1ff4d0e3c18e617f170b390cdc8de1d27
parent3d5e823bfc7865d8fc9904981695179757a1c52b (diff)
Using QtWebKit to launch S5 slide shows.
-rw-r--r--s5runner/example/chili/cplusplus.js45
-rw-r--r--s5runner/example/chili/csharp.js41
-rw-r--r--s5runner/example/chili/css.js85
-rw-r--r--s5runner/example/chili/delphi.js41
-rw-r--r--s5runner/example/chili/html.js80
-rw-r--r--s5runner/example/chili/java.js41
-rw-r--r--s5runner/example/chili/jquery.chili-2.2.js704
-rw-r--r--s5runner/example/chili/jquery.min.js19
-rw-r--r--s5runner/example/chili/js.js75
-rw-r--r--s5runner/example/chili/lotusscript.js54
-rw-r--r--s5runner/example/chili/mysql.js63
-rw-r--r--s5runner/example/chili/php-f.js142
-rw-r--r--s5runner/example/chili/php.js138
-rw-r--r--s5runner/example/chili/recipes.js364
-rw-r--r--s5runner/example/digiflip_x11.pngbin0 -> 27627 bytes
-rw-r--r--s5runner/example/slides.html143
-rw-r--r--s5runner/example/ui/default/framing.css23
-rw-r--r--s5runner/example/ui/default/opera.css7
-rw-r--r--s5runner/example/ui/default/outline.css15
-rw-r--r--s5runner/example/ui/default/pretty.css86
-rw-r--r--s5runner/example/ui/default/print.css1
-rw-r--r--s5runner/example/ui/default/s5-core.css9
-rw-r--r--s5runner/example/ui/default/slides.css3
-rw-r--r--s5runner/example/ui/default/slides.js553
-rw-r--r--s5runner/s5runner.cpp208
-rw-r--r--s5runner/s5runner.pro2
26 files changed, 2942 insertions, 0 deletions
diff --git a/s5runner/example/chili/cplusplus.js b/s5runner/example/chili/cplusplus.js
new file mode 100644
index 0000000..a1725eb
--- /dev/null
+++ b/s5runner/example/chili/cplusplus.js
@@ -0,0 +1,45 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "cpp"
+ , _case: true
+ , _main: {
+ mlcom : {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: "color: #4040c2;"
+ }
+ , com : {
+ _match: /\/\/.*/
+ , _style: "color: green;"
+ }
+ , preproc : {
+ _match: /(?=^|\n)\s*#\w+/
+ , _style: "color: red;"
+ }
+ , string : {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: "color: teal;"
+ }
+ , number : {
+ _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , datatype: {
+ _match: /\b(?:wint_t|wctype_t|wctrans_t|wchar_t|va_list|uintptr_t|tm|time_t|terminate_function|size_t|signed|sig_atomic_t|short|ptrdiff_t|mbstate_t|long|ldiv_t|lconv|jmp_buf|intptr_t|int|fpos_t|float|double|div_t|clock_t|char|bool|_wfinddatai64_t|_wfinddata_t|_utimbuf|_timeb|_stati64|_stat|_purecall_handler|_onexit_t|_off_t|_finddatai64_t|_finddata_t|_exception|_diskfree_t|_dev_t|_complex|__wfinddata64_t|__wchar_t|__timeb64|__time64_t|__stat64|__int8|__int64|__int32|__int16|__finddata64_t|_PNH|_HFILE|_HEAPINFO|_FPIEEE_RECORD|_EXCEPTION_POINTERS|WPARAM|WORD|WCHAR|VOID|USN|USHORT|ULONG_PTR|ULONGLONG|ULONG64|ULONG32|ULONG|UINT_PTR|UINT64|UINT32|UINT|UHALF_PTR|UCHAR|TCHAR|TBYTE|SSIZE_T|SIZE_T|SHORT|SERVICE_STATUS_HANDLE|SC_LOCK|SC_HANDLE|PWSTR|PWORD|PWCHAR|PVOID|PUSHORT|PULONG_PTR|PULONGLONG|PULONG64|PULONG32|PULONG|PUINT_PTR|PUINT64|PUINT32|PUINT|PUHALF_PTR|PUCHAR|PTSTR|PTCHAR|PTBYTE|PSTR|PSSIZE_T|PSIZE_T|PSHORT|POINTER_64|POINTER_32|PLONG_PTR|PLONGLONG|PLONG64|PLONG32|PLONG|PLCID|PINT_PTR|PINT64|PINT32|PINT|PHKEY|PHANDLE|PHALF_PTR|PFLOAT|PDWORD_PTR|PDWORDLONG|PDWORD64|PDWORD32|PCWSTR|PCTSTR|PCSTR|PCHAR|PBYTE|PBOOLEAN|PBOOL|LRESULT|LPWSTR|LPWORD|LPVOID|LPTSTR|LPSTR|LPLONG|LPINT|LPHANDLE|LPDWORD|LPCWSTR|LPCVOID|LPCTSTR|LPCSTR|LPCOLORREF|LPBYTE|LPBOOL|LPARAM|LONG_PTR|LONGLONG|LONG64|LONG32|LONG|LGRPID|LCTYPE|LCID|LANGID|INT_PTR|INT64|INT32|INT|HWND|HWINSTA|HSZ|HRSRC|HRGN|HRESULT|HPEN|HPALETTE|HMONITOR|HMODULE|HMETAFILE|HMENU|HLOCAL|HKL|HKEY|HINSTANCE|HICON|HHOOK|HGLOBAL|HGDIOBJ|HFONT|HFILE|HENHMETAFILE|HDWP|HDROP|HDESK|HDDEDATA|HDC|HCURSOR|HCONVLIST|HCONV|HCOLORSPACE|HBRUSH|HBITMAP|HANDLE|HALF_PTR|HACCEL|FLOAT|FILE|DWORD_PTR|DWORDLONG|DWORD64|DWORD32|DWORD|COLORREF|CHAR|BYTE|BOOLEAN|BOOL|ATOM)\b/
+ , _style: "color: blue;"
+ }
+ , keyword : {
+ _match: /\b(?:while|whcar_t|volatile|void|virtual|uuid|using|union|typename|typeid|typedef|try|true|throw|thread|this|template|switch|struct|static_cast|static|sizeof|selectany|return|reinterpret_cast|register|public|protected|private|nothrow|noreturn|noinline|new|namespace|naked|mutable|inline|if|goto|friend|for|false|extern|explicit|enum|else|dynamic_cast|do|dllimport|dllexport|deprecated|delete|default|continue|const_cast|const|class|catch|case|break|__try|__finally|__exception|__declspec)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/csharp.js b/s5runner/example/chili/csharp.js
new file mode 100644
index 0000000..96205ce
--- /dev/null
+++ b/s5runner/example/chili/csharp.js
@@ -0,0 +1,41 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "cs"
+ , _case: true
+ , _main: {
+ mlcom : {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: "color: #4040c2;"
+ }
+ , com : {
+ _match: /\/\/.*/
+ , _style: "color: green;"
+ }
+ , string : {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: "color: teal;"
+ }
+ , preproc: {
+ _match: /^\s*#.*/
+ , _style: "color: red;"
+ }
+ , number : {
+ _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:while|volatile|void|virtual|using|ushort|unsafe|unchecked|ulong|uint|typeof|try|true|throw|this|switch|struct|string|static|stackalloc|sizeof|short|sealed|sbyte|return|ref|readonly|public|protected|private|params|override|out|operator|object|null|new|namespace|long|lock|is|internal|interface|int|in|implicit|if|goto|foreach|for|float|fixed|finally|false|extern|explicit|event|enum|else|double|do|delegate|default|decimal|continue|const|class|checked|char|catch|case|byte|break|bool|base|as|abstract)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/css.js b/s5runner/example/chili/css.js
new file mode 100644
index 0000000..9020715
--- /dev/null
+++ b/s5runner/example/chili/css.js
@@ -0,0 +1,85 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: 'css'
+ , _case: true
+ , _main: {
+ comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: "color: olive;"
+ }
+ , directive: {
+ _match: /@\w+/
+ , _style: "color: fuchsia;"
+ }
+ , url: {
+ _match: /\b(url\s*\()([^)]+)(\))/
+ , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
+ , _style: "color: fuchsia;"
+ }
+ , block: {
+ _match: /\{([\w\W]*?)\}/
+ , _replace: function( all, pairs ) {
+ return '{' + this.x( pairs, '/definition' ) + '}';
+ }
+ }
+ , 'class': {
+ _match: /\.\w+/
+ , _style: "color: #CC0066; font-weight: bold;"
+ }
+ , id: {
+ _match: /#\w+/
+ , _style: "color: IndianRed; font-weight: bold;"
+ }
+ , pseudo: {
+ _match: /:\w+/
+ , _style: "color: #CC9900;"
+ }
+ , element: {
+ _match: /\w+/
+ , _style: "color: Purple; font-weight: bold;"
+ }
+ }
+ , definition: {
+ comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ }
+ , property: {
+ _match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
+ , _style: "color: #330066;"
+ }
+ , special: {
+ _match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
+ , _style: "color: #330066; text-decoration: underline;"
+ }
+ , url: {
+ _match: /\b(url\s*\()([^)]+)(\))/
+ , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
+ }
+ , value: {
+ _match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
+ , _style: "color: #3366FF;"
+ }
+ , string: {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: "color: teal;"
+ }
+ , number: {
+ _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
+ , _style: "color: red;"
+ }
+ , color : {
+ _match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
+ , _style: "color: green;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/delphi.js b/s5runner/example/chili/delphi.js
new file mode 100644
index 0000000..d3382a7
--- /dev/null
+++ b/s5runner/example/chili/delphi.js
@@ -0,0 +1,41 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "pas"
+ , _case: true
+ , _main: {
+ mlcom: {
+ _match: /(?:\(\*[\w\W]*?\*\))|(?:{(?!\$)[\w\W]*?})/
+ , _style: "color: #4040c2;"
+ }
+ , com: {
+ _match: /\/\/.*/
+ , _style: "color: green;"
+ }
+ , string: {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')/
+ , _style: "color: teal;"
+ }
+ , number: {
+ _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:\$[a-zA-Z0-9]+\b)/
+ , _style: "color: red;"
+ }
+ , direct: {
+ _match: /\{\$[a-zA-Z]+ .+\}/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:abs|addr|and|ansichar|ansistring|array|as|asm|begin|boolean|byte|cardinal|case|char|class|comp|const|constructor|currency|destructor|div|do|double|downto|else|end|except|exports|extended|false|file|finalization|finally|for|function|goto|if|implementation|in|inherited|initialization|int64|integer|interface|is|label|library|longint|longword|mod|nil|not|object|of|on|or|packed|pansichar|pansistring|pchar|pcurrency|pdatetime|pextended|pint64|pointer|private|procedure|program|property|protected|pshortstring|pstring|public|published|pvariant|pwidechar|pwidestring|raise|real|real48|record|repeat|set|shl|shortint|shortstring|shr|single|smallint|string|then|threadvar|to|true|try|type|unit|until|uses|val|var|varirnt|while|widechar|widestring|with|word|write|writeln|xor)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/html.js b/s5runner/example/chili/html.js
new file mode 100644
index 0000000..f02954b
--- /dev/null
+++ b/s5runner/example/chili/html.js
@@ -0,0 +1,80 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: 'html'
+ , _case: false
+ , _main: {
+ doctype: {
+ _match: /<!DOCTYPE\b[\w\W]*?>/
+ , _style: "color: #CC6600;"
+ }
+ , ie_style: {
+ _match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
+ , _replace: function( all, open, content, close ) {
+ return "<span class='ie_style'>" + this.x( open ) + "</span>"
+ + this.x( content, '//style' )
+ + "<span class='ie_style'>" + this.x( close ) + "</span>";
+ }
+ , _style: "color: DarkSlateGray; font-weight: bold;"
+ }
+ , comment: {
+ _match: /<!--[\w\W]*?-->/
+ , _style: "color: #4040c2;"
+ }
+ , script: {
+ _match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
+ , _replace: function( all, open, content, close ) {
+ return this.x( open, '//tag_start' )
+ + this.x( content, 'js' )
+ + this.x( close, '//tag_end' );
+ }
+ }
+ , style: {
+ _match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
+ , _replace: function( all, open, content, close ) {
+ return this.x( open, '//tag_start' )
+ + this.x( content, 'css' )
+ + this.x( close, '//tag_end' );
+ }
+ }
+ // matches a starting tag of an element (with attrs)
+ // like "<div ... >" or "<img ... />"
+ , tag_start: {
+ _match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
+ , _replace: function( all, open, content, close ) {
+ return "<span class='tag_start'>" + this.x( open ) + "</span>"
+ + this.x( content, '/tag_attrs' )
+ + "<span class='tag_start'>" + this.x( close ) + "</span>";
+ }
+ , _style: "color: navy; font-weight: bold;"
+ }
+ // matches an ending tag
+ // like "</div>"
+ , tag_end: {
+ _match: /<\/\w+\s*>|\/>/
+ , _style: "color: navy;"
+ }
+ , entity: {
+ _match: /&\w+?;/
+ , _style: "color: blue;"
+ }
+ }
+ , tag_attrs: {
+ // matches a name/value pair
+ attr: {
+ // before in $1, name in $2, between in $3, value in $4
+ _match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
+ , _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
+ , _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
+ }
+ }
+}
diff --git a/s5runner/example/chili/java.js b/s5runner/example/chili/java.js
new file mode 100644
index 0000000..f583f47
--- /dev/null
+++ b/s5runner/example/chili/java.js
@@ -0,0 +1,41 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "java"
+ , _case: true
+ , _main: {
+ mlcom : {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: "color: #4040c2;"
+ }
+ , com : {
+ _match: /\/\/.*/
+ , _style: "color: green;"
+ }
+ , string : {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: "color: teal;"
+ }
+ , number : {
+ _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b)|(?:0x[a-f0-9]+)\b/
+ , _style: "color: red;"
+ }
+ , meta : {
+ _match: /(?!\@interface\b)\@[\$\w]+\b/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:while|volatile|void|try|true|transient|throws|throw|this|synchronized|switch|super|strictfp|static|short|return|public|protected|private|package|null|new|native|long|interface|int|instanceof|import|implements|if|goto|for|float|finally|final|false|extends|enum|else|double|do|default|continue|const|class|char|catch|case|byte|break|boolean|assert|abstract)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/jquery.chili-2.2.js b/s5runner/example/chili/jquery.chili-2.2.js
new file mode 100644
index 0000000..0a971bf
--- /dev/null
+++ b/s5runner/example/chili/jquery.chili-2.2.js
@@ -0,0 +1,704 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+
+( function($) {
+
+ChiliBook = { //implied global
+
+ version: "2.2" // 2008-07-06
+
+// options --------------------------------------------------------------------
+
+ , automatic: true
+ , automaticSelector: "code"
+
+ , lineNumbers: !true
+
+ , codeLanguage: function( el ) {
+ var recipeName = $( el ).attr( "class" );
+ return recipeName ? recipeName : '';
+ }
+
+ , recipeLoading: true
+ , recipeFolder: "" // used like: recipeFolder + recipeName + '.js'
+
+ // IE and FF convert &#160; to "&nbsp;", Safari and Opera do not
+ , replaceSpace: "&#160;"
+ , replaceTab: "&#160;&#160;&#160;&#160;"
+ , replaceNewLine: "&#160;<br/>"
+
+ , selectionStyle: [ "position:absolute; z-index:3000; overflow:scroll;"
+ , "width:16em;"
+ , "height:9em;"
+ , "border:1px solid gray;"
+ , "padding:15px;"
+ , "background-color:yellow;"
+ ].join( ' ' )
+
+// ------------------------------------------------------------- end of options
+
+ , defaultReplacement: '<span class="$0">$$</span>' // TODO: make this an option again
+ , recipes: {} //repository
+ , queue: {} //registry
+
+ , unique: function() {
+ return (new Date()).valueOf();
+ }
+};
+
+
+
+$.fn.chili = function( options ) {
+ var book = $.extend( {}, ChiliBook, options || {} );
+
+ function cook( ingredients, recipe, blockName ) {
+
+ function prepareBlock( recipe, blockName ) {
+ var steps = [];
+ for( var stepName in recipe[ blockName ] ) {
+ steps.push( prepareStep( recipe, blockName, stepName ) );
+ }
+ return steps;
+ } // prepareBlock
+
+ function prepareStep( recipe, blockName, stepName ) {
+ var step = recipe[ blockName ][ stepName ];
+ var exp = ( typeof step._match == "string" ) ? step._match : step._match.source;
+ return {
+ recipe: recipe
+ , blockName: blockName
+ , stepName: stepName
+ , exp: "(" + exp + ")"
+ , length: 1 // add 1 to account for the newly added parentheses
+ + (exp // count number of submatches in here
+ .replace( /\\./g, "%" ) // disable any escaped character
+ .replace( /\[.*?\]/g, "%" ) // disable any character class
+ .match( /\((?!\?)/g ) // match any open parenthesis, not followed by a ?
+ || [] // make sure it is an empty array if there are no matches
+ ).length // get the number of matches
+ , replacement: step._replace ? step._replace : book.defaultReplacement
+ };
+ } // prepareStep
+
+ function knowHow( steps ) {
+ var prevLength = 1;
+ var exps = [];
+ for (var i = 0; i < steps.length; i++) {
+ var exp = steps[ i ].exp;
+ // adjust backreferences
+ exp = exp.replace( /\\\\|\\(\d+)/g, function( m, aNum ) {
+ return !aNum ? m : "\\" + ( prevLength + 1 + parseInt( aNum, 10 ) );
+ } );
+ exps.push( exp );
+ prevLength += steps[ i ].length;
+ }
+ var prolog = '((?:\\s|\\S)*?)';
+ var epilog = '((?:\\s|\\S)+)';
+ var source = '(?:' + exps.join( "|" ) + ')';
+ source = prolog + source + '|' + epilog;
+ return new RegExp( source, recipe._case ? "g" : "gi" );
+ } // knowHow
+
+ function escapeHTML( str ) {
+ return str.replace( /&/g, "&amp;" ).replace( /</g, "&lt;" );
+ } // escapeHTML
+
+ function replaceSpaces( str ) {
+ return str.replace( / +/g, function( spaces ) {
+ return spaces.replace( / /g, replaceSpace );
+ } );
+ } // replaceSpaces
+
+ function filter( str ) {
+ str = escapeHTML( str );
+ if( replaceSpace ) {
+ str = replaceSpaces( str );
+ }
+ return str;
+ } // filter
+
+ function applyRecipe( subject, recipe ) {
+ return cook( subject, recipe );
+ } // applyRecipe
+
+ function applyBlock( subject, recipe, blockName ) {
+ return cook( subject, recipe, blockName );
+ } // applyBlock
+
+ function applyStep( subject, recipe, blockName, stepName ) {
+ var replaceSpace = book.replaceSpace;
+
+ var step = prepareStep( recipe, blockName, stepName );
+ var steps = [step];
+
+ var perfect = subject.replace( knowHow( steps ), function() {
+ return chef.apply( { steps: steps }, arguments );
+ } );
+ return perfect;
+ } // applyStep
+
+ function applyModule( subject, module, context ) {
+ if( ! module ) {
+ return filter( subject );
+ }
+
+ var sub = module.split( '/' );
+ var recipeName = '';
+ var blockName = '';
+ var stepName = '';
+ switch( sub.length ) {
+ case 1:
+ recipeName = sub[0];
+ break;
+ case 2:
+ recipeName = sub[0]; blockName = sub[1];
+ break;
+ case 3:
+ recipeName = sub[0]; blockName = sub[1]; stepName = sub[2];
+ break;
+ default:
+ return filter( subject );
+ }
+
+ function getRecipe( recipeName ) {
+ var path = getPath( recipeName );
+ var recipe = book.recipes[ path ];
+ if( ! recipe ) {
+ throw {msg:"recipe not available"};
+ }
+ return recipe;
+ }
+
+ try {
+ var recipe;
+ if ( '' == stepName ) {
+ if ( '' == blockName ) {
+ if ( '' == recipeName ) {
+ //nothing to do
+ }
+ else { // ( '' != recipeName )
+ recipe = getRecipe( recipeName );
+ return applyRecipe( subject, recipe );
+ }
+ }
+ else { // ( '' != blockName )
+ if( '' == recipeName ) {
+ recipe = context.recipe;
+ }
+ else {
+ recipe = getRecipe( recipeName );
+ }
+ if( ! (blockName in recipe) ) {
+ return filter( subject );
+ }
+ return applyBlock( subject, recipe, blockName );
+ }
+ }
+ else { // ( '' != stepName )
+ if( '' == recipeName ) {
+ recipe = context.recipe;
+ }
+ else {
+ recipe = getRecipe( recipeName );
+ }
+ if( '' == blockName ) {
+ blockName = context.blockName;
+ }
+ if( ! (blockName in recipe) ) {
+ return filter( subject );
+ }
+ if( ! (stepName in recipe[blockName]) ) {
+ return filter( subject );
+ }
+ return applyStep( subject, recipe, blockName, stepName );
+ }
+ }
+ catch( e ) {
+ if (e.msg && e.msg == "recipe not available") {
+ var cue = 'chili_' + book.unique();
+ if( book.recipeLoading ) {
+ var path = getPath( recipeName );
+ if( ! book.queue[ path ] ) {
+ /* this is a new recipe to download */
+ try {
+ book.queue[ path ] = [ {cue: cue, subject: subject, module: module, context: context} ];
+ $.getJSON( path, function( recipeLoaded ) {
+ book.recipes[ path ] = recipeLoaded;
+ var q = book.queue[ path ];
+ for( var i = 0, iTop = q.length; i < iTop; i++ ) {
+ var replacement = applyModule( q[ i ].subject, q[ i ].module, q[ i ].context );
+ if( book.replaceTab ) {
+ replacement = replacement.replace( /\t/g, book.replaceTab );
+ }
+ if( book.replaceNewLine ) {
+ replacement = replacement.replace( /\n/g, book.replaceNewLine );
+ }
+ $( '#' + q[ i ].cue ).replaceWith( replacement );
+ }
+ } );
+ }
+ catch( recipeNotAvailable ) {
+ alert( "the recipe for '" + recipeName + "' was not found in '" + path + "'" );
+ }
+ }
+ else {
+ /* not a new recipe, so just enqueue this element */
+ book.queue[ path ].push( {cue: cue, subject: subject, module: module, context: context} );
+ }
+ return '<span id="' + cue + '">' + filter( subject ) + '</span>';
+ }
+ return filter( subject );
+ }
+ else {
+ return filter( subject );
+ }
+ }
+ } // applyModule
+
+ function addPrefix( prefix, replacement ) {
+ var aux = replacement.replace( /(<span\s+class\s*=\s*(["']))((?:(?!__)\w)+\2\s*>)/ig, "$1" + prefix + "__$3" );
+ return aux;
+ } // addPrefix
+
+ function chef() {
+ if (! arguments[ 0 ]) {
+ return '';
+ }
+ var steps = this.steps;
+ var i = 0; // iterate steps
+ var j = 2; // iterate chef's arguments
+ var prolog = arguments[ 1 ];
+ var epilog = arguments[ arguments.length - 3 ];
+ if (! epilog) {
+ var step;
+ while( step = steps[ i++ ] ) {
+ var aux = arguments; // this unmasks chef's arguments inside the next function
+ if( aux[ j ] ) {
+ var replacement = '';
+ if( $.isFunction( step.replacement ) ) {
+ var matches = []; //Array.slice.call( aux, j, step.length );
+ for (var k = 0, kTop = step.length; k < kTop; k++) {
+ matches.push( aux[ j + k ] );
+ }
+ matches.push( aux[ aux.length - 2 ] );
+ matches.push( aux[ aux.length - 1 ] );
+ replacement = step.replacement
+ .apply( {
+ x: function() {
+ var subject = arguments[0];
+ var module = arguments[1];
+ var context = {
+ recipe: step.recipe
+ , blockName: step.blockName
+ };
+ return applyModule( subject, module, context );
+ }
+ }, matches );
+ }
+ else { //we expect step.replacement to be a string
+ replacement = step.replacement
+ .replace( /(\\\$)|(?:\$\$)|(?:\$(\d+))/g, function( m, escaped, K ) {
+ if( escaped ) { /* \$ */
+ return "$";
+ }
+ else if( !K ) { /* $$ */
+ return filter( aux[ j ] );
+ }
+ else if( K == "0" ) { /* $0 */
+ return step.stepName;
+ }
+ else { /* $K */
+ return filter( aux[ j + parseInt( K, 10 ) ] );
+ }
+ } );
+ }
+ replacement = addPrefix( step.recipe._name, replacement );
+ return filter( prolog ) + replacement;
+ }
+ else {
+ j+= step.length;
+ }
+ }
+ }
+ else {
+ return filter( epilog );
+ }
+ } // chef
+
+ if( ! blockName ) {
+ blockName = '_main';
+ checkSpices( recipe );
+ }
+ if( ! (blockName in recipe) ) {
+ return filter( ingredients );
+ }
+ var replaceSpace = book.replaceSpace;
+ var steps = prepareBlock( recipe, blockName );
+ var kh = knowHow( steps );
+ var perfect = ingredients.replace( kh, function() {
+ return chef.apply( { steps: steps }, arguments );
+ } );
+ return perfect;
+
+ } // cook
+
+ function loadStylesheetInline( sourceCode ) {
+ if( document.createElement ) {
+ var e = document.createElement( "style" );
+ e.type = "text/css";
+ if( e.styleSheet ) { // IE
+ e.styleSheet.cssText = sourceCode;
+ }
+ else {
+ var t = document.createTextNode( sourceCode );
+ e.appendChild( t );
+ }
+ document.getElementsByTagName( "head" )[0].appendChild( e );
+ }
+ } // loadStylesheetInline
+
+ function checkSpices( recipe ) {
+ var name = recipe._name;
+ if( ! book.queue[ name ] ) {
+
+ var content = ['/* Chili -- ' + name + ' */'];
+ for (var blockName in recipe) {
+ if( blockName.search( /^_(?!main\b)/ ) < 0 ) {
+ for (var stepName in recipe[ blockName ]) {
+ var step = recipe[ blockName ][ stepName ];
+ if( '_style' in step ) {
+ if( step[ '_style' ].constructor == String ) {
+ content.push( '.' + name + '__' + stepName + ' { ' + step[ '_style' ] + ' }' );
+ }
+ else {
+ for (var className in step[ '_style' ]) {
+ content.push( '.' + name + '__' + className + ' { ' + step[ '_style' ][ className ] + ' }' );
+ }
+ }
+ }
+ }
+ }
+ }
+ content = content.join('\n');
+
+ loadStylesheetInline( content );
+
+ book.queue[ name ] = true;
+ }
+ } // checkSpices
+
+ function askDish( el ) {
+ var recipeName = book.codeLanguage( el );
+ if( '' != recipeName ) {
+ var path = getPath( recipeName );
+ if( book.recipeLoading ) {
+ /* dynamic setups come here */
+ if( ! book.queue[ path ] ) {
+ /* this is a new recipe to download */
+ try {
+ book.queue[ path ] = [ el ];
+ $.getJSON( path, function( recipeLoaded ) {
+ book.recipes[ path ] = recipeLoaded;
+ var q = book.queue[ path ];
+ for( var i = 0, iTop = q.length; i < iTop; i++ ) {
+ makeDish( q[ i ], path );
+ }
+ } );
+ }
+ catch( recipeNotAvailable ) {
+ alert( "the recipe for '" + recipeName + "' was not found in '" + path + "'" );
+ }
+ }
+ else {
+ /* not a new recipe, so just enqueue this element */
+ book.queue[ path ].push( el );
+ }
+ /* a recipe could have been already downloaded */
+ makeDish( el, path );
+ }
+ else {
+ /* static setups come here */
+ makeDish( el, path );
+ }
+ }
+ } // askDish
+
+ function makeDish( el, recipePath ) {
+ var recipe = book.recipes[ recipePath ];
+ if( ! recipe ) {
+ return;
+ }
+ var $el = $( el );
+ var ingredients = $el.text();
+ if( ! ingredients ) {
+ return;
+ }
+
+ //fix for msie: \r (13) is used instead of \n (10)
+ //fix for opera: \r\n is used instead of \n
+ ingredients = ingredients.replace(/\r\n?/g, "\n");
+
+ //reverse fix for safari: msie, mozilla and opera render the initial \n
+ if( $el.parent().is('pre') ) {
+ if( ! $.browser.safari ) {
+ ingredients = ingredients.replace(/^\n/g, "");
+ }
+ }
+
+ var dish = cook( ingredients, recipe ); // all happens here
+
+ if( book.replaceTab ) {
+ dish = dish.replace( /\t/g, book.replaceTab );
+ }
+ if( book.replaceNewLine ) {
+ dish = dish.replace( /\n/g, book.replaceNewLine );
+ }
+
+ el.innerHTML = dish; //much faster than $el.html( dish );
+ //tried also the function replaceHtml from http://blog.stevenlevithan.com/archives/faster-than-innerhtml
+ //but it was not faster nor without sideffects (it was not possible to count spans into el)
+
+ //opera and safari select PRE text correctly
+ if( $.browser.msie || $.browser.mozilla ) {
+ enableSelectionHelper( el );
+ }
+
+ var $that = $el.parent();
+ var classes = $that.attr( 'class' );
+ var ln = /ln-(\d+)-([\w][\w\-]*)|ln-(\d+)|ln-/.exec( classes );
+ if( ln ) {
+ addLineNumbers( el );
+ var start = 0;
+ if( ln[1] ) {
+ start = parseInt( ln[1], 10 );
+ var $pieces = $( '.ln-' + ln[1] + '-' + ln[2] );
+ var pos = $pieces.index( $that[0] );
+ $pieces.slice( 0, pos ).each( function() {
+ start += $( this ).find( 'li' ).length;
+ } );
+ }
+ else if( ln[3] ) {
+ start = parseInt( ln[3], 10 );
+ }
+ else {
+ start = 1;
+ }
+ $el.find( 'ol' )[0].start = start;
+ $('body').width( $('body').width() - 1 ).width( $('body').width() + 1 );
+ }
+ else if( book.lineNumbers ) {
+ addLineNumbers( el );
+ }
+
+ } // makeDish
+
+ function enableSelectionHelper( el ) {
+ var element = null;
+ $( el )
+ .parents()
+ .filter( "pre" )
+ .bind( "mousedown", function() {
+ element = this;
+ if( $.browser.msie ) {
+ document.selection.empty();
+ }
+ else {
+ window.getSelection().removeAllRanges();
+ }
+ } )
+ .bind( "mouseup", function( event ) {
+ if( element && (element == this) ) {
+ element = null;
+ var selected = '';
+ if( $.browser.msie ) {
+ selected = document.selection.createRange().htmlText;
+ if( '' == selected ) {
+ return;
+ }
+ selected = preserveNewLines( selected );
+ var container_tag = '<textarea style="STYLE">';
+ }
+ else {
+ selected = window.getSelection().toString(); //opera doesn't select new lines
+ if( '' == selected ) {
+ return;
+ }
+ selected = selected
+ .replace( /\r/g, '' )
+ .replace( /^# ?/g, '' )
+ .replace( /\n# ?/g, '\n' )
+ ;
+ var container_tag = '<pre style="STYLE">';
+ }
+ var $container = $( container_tag.replace( /\bSTYLE\b/, ChiliBook.selectionStyle ) )
+ .appendTo( 'body' )
+ .text( selected )
+ .attr( 'id', 'chili_selection' )
+ .click( function() { $(this).remove(); } )
+ ;
+ var top = event.pageY - Math.round( $container.height() / 2 ) + "px";
+ var left = event.pageX - Math.round( $container.width() / 2 ) + "px";
+ $container.css( { top: top, left: left } );
+ if( $.browser.msie ) {
+// window.clipboardData.setData( 'Text', selected ); //I couldn't find anything similar for Mozilla
+ $container[0].focus();
+ $container[0].select();
+ }
+ else {
+ var s = window.getSelection();
+ s.removeAllRanges();
+ var r = document.createRange();
+ r.selectNodeContents( $container[0] );
+ s.addRange( r );
+ }
+ }
+ } )
+ ;
+ } // enableSelectionHelper
+
+ function getPath( recipeName ) {
+ return book.recipeFolder + recipeName + ".js";
+ } // getPath
+
+ function getSelectedText() {
+ var text = '';
+ if( $.browser.msie ) {
+ text = document.selection.createRange().htmlText;
+ }
+ else {
+ text = window.getSelection().toString();
+ }
+ return text;
+ } // getSelectedText
+
+ function preserveNewLines( html ) {
+ do {
+ var newline_flag = ChiliBook.unique();
+ }
+ while( html.indexOf( newline_flag ) > -1 );
+ var text = '';
+ if (/<br/i.test(html) || /<li/i.test(html)) {
+ if (/<br/i.test(html)) {
+ html = html.replace( /\<br[^>]*?\>/ig, newline_flag );
+ }
+ else if (/<li/i.test(html)) {
+ html = html.replace( /<ol[^>]*?>|<\/ol>|<li[^>]*?>/ig, '' ).replace( /<\/li>/ig, newline_flag );
+ }
+ var el = $( '<pre>' ).appendTo( 'body' ).hide()[0];
+ el.innerHTML = html;
+ text = $( el ).text().replace( new RegExp( newline_flag, "g" ), '\r\n' );
+ $( el ).remove();
+ }
+ return text;
+ } // preserveNewLines
+
+ function addLineNumbers( el ) {
+
+ function makeListItem1( not_last_line, not_last, last, open ) {
+ var close = open ? '</span>' : '';
+ var aux = '';
+ if( not_last_line ) {
+ aux = '<li>' + open + not_last + close + '</li>';
+ }
+ else if( last ) {
+ aux = '<li>' + open + last + close + '</li>';
+ }
+ return aux;
+ } // makeListItem1
+
+ function makeListItem2( not_last_line, not_last, last, prev_li ) {
+ var aux = '';
+ if( prev_li ) {
+ aux = prev_li;
+ }
+ else {
+ aux = makeListItem1( not_last_line, not_last, last, '' )
+ }
+ return aux;
+ } // makeListItem2
+
+ var html = $( el ).html();
+ var br = /<br>/.test(html) ? '<br>' : '<BR>';
+ var empty_line = '<li>' + book.replaceSpace + '</li>';
+ var list_items = html
+ //extract newlines at the beginning of a span
+ .replace( /(<span [^>]+>)((?:(?:&nbsp;|\xA0)<br>)+)(.*?)(<\/span>)/ig, '$2$1$3$4' ) // I don't know why <span .*?> does not work here
+ //transform newlines inside of a span
+ .replace( /(.*?)(<span .*?>)(.*?)(?:<\/span>(?:&nbsp;|\xA0)<br>|<\/span>)/ig, // but here it does
+ function( all, before, open, content ) {
+ if (/<br>/i.test(content)) {
+ var pieces = before.split( br );
+ var lastPiece = pieces.pop();
+ before = pieces.join( br );
+ var aux = (before ? before + br : '') //+ replace1( lastPiece + content, open );
+ + (lastPiece + content).replace( /((.*?)(?:&nbsp;|\xA0)<br>)|(.*)/ig,
+ function( tmp, not_last_line, not_last, last ) {
+ var aux2 = makeListItem1( not_last_line, not_last, last, open );
+ return aux2;
+ }
+ );
+ return aux;
+ }
+ else {
+ return all;
+ }
+ }
+ )
+ //transform newlines outside of a span
+ .replace( /(<li>.*?<\/li>)|((.*?)(?:&nbsp;|\xA0)<br>)|(.+)/ig,
+ function( tmp, prev_li, not_last_line, not_last, last ) {
+ var aux2 = makeListItem2( not_last_line, not_last, last, prev_li );
+ return aux2;
+ }
+ )
+ //fix empty lines for Opera
+ .replace( /<li><\/li>/ig, empty_line )
+ ;
+
+ el.innerHTML = '<ol>' + list_items + '</ol>';
+ } // addLineNumbers
+
+ function revealChars( tmp ) {
+ return $
+ .map( tmp.split(''),
+ function(n, i) {
+ return ' ' + n + ' ' + n.charCodeAt( 0 ) + ' ';
+ } )
+ .join(' ');
+ } // revealChars
+
+//-----------------------------------------------------------------------------
+// the coloring starts here
+ this
+ .each( function() {
+ var $this = $( this );
+ $this.trigger( 'chili.before_coloring' );
+ askDish( this );
+ $this.trigger( 'chili.after_coloring' );
+ } );
+
+ return this;
+//-----------------------------------------------------------------------------
+};
+
+
+
+//main
+$( function() {
+
+ if( ChiliBook.automatic ) {
+ $( ChiliBook.automaticSelector ).chili();
+ }
+
+} );
+
+} ) ( jQuery );
diff --git a/s5runner/example/chili/jquery.min.js b/s5runner/example/chili/jquery.min.js
new file mode 100644
index 0000000..b1ae21d
--- /dev/null
+++ b/s5runner/example/chili/jquery.min.js
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file
diff --git a/s5runner/example/chili/js.js b/s5runner/example/chili/js.js
new file mode 100644
index 0000000..31baf65
--- /dev/null
+++ b/s5runner/example/chili/js.js
@@ -0,0 +1,75 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: 'js'
+ , _case: true
+ , _main: {
+ ml_comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: 'color: gray;'
+ }
+ , sl_comment: {
+ _match: /\/\/.*/
+ , _style: 'color: green;'
+ }
+ , string: {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: 'color: teal;'
+ }
+ , num: {
+ _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
+ , _style: 'color: red;'
+ }
+ , reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
+ _match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
+ , _replace: function( all ) {
+ return this.x( all, '//num' );
+ }
+ }
+ , reg_exp: {
+ _match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
+ , _style: 'color: maroon;'
+ }
+ , brace: {
+ _match: /[\{\}]/
+ , _style: 'color: red; font-weight: bold;'
+ }
+ , statement: {
+ _match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
+ , _style: 'color: navy; font-weight: bold;'
+ }
+ , error: {
+ _match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
+ , _style: 'color: Coral;'
+ }
+ , object: {
+ _match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
+ , _style: 'color: DeepPink;'
+ }
+ , property: {
+ _match: /\b(undefined|arguments|NaN|Infinity)\b/
+ , _style: 'color: Purple; font-weight: bold;'
+ }
+ , 'function': {
+ _match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
+ , _style: 'color: olive;'
+ }
+ , operator: {
+ _match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
+ , _style: 'color: RoyalBlue; font-weight: bold;'
+ }
+ , liveconnect: {
+ _match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
+ , _style: 'text-decoration: overline;'
+ }
+ }
+}
diff --git a/s5runner/example/chili/lotusscript.js b/s5runner/example/chili/lotusscript.js
new file mode 100644
index 0000000..61c05b8
--- /dev/null
+++ b/s5runner/example/chili/lotusscript.js
@@ -0,0 +1,54 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "ls"
+ , _case: false
+ , _main: {
+ mlcom: {
+ _match: /((?:^|\n)%REM\b.*)([\w\W]*?)(\n%END\s*REM\b.*)/
+ , _replace: '<span class="directive">$1</span><span class="mlcom">$2</span><span class="directive">$3</span>'
+ , _style: "color: #4040c2;"
+ }
+ , com: {
+ _match: /(?:\'.*)|(?:\bREM\b.*)/
+ , _style: "color: green;"
+ }
+ , mlstr: {
+ _match: /(?:\{[^}]*\})|(?:\|[^|]*\|)/
+ , _style: "color: red;"
+ }
+ , str: {
+ _match: /(?:\"[^\"].*?\")|\"\"/
+ , _style: "color: teal;"
+ }
+ , keyd: {
+ _match: /\b(?:Ustring|Uchr|Ucase|Trim|Time|Strtoken|Strrightback|Strright|Strleftback|Strleft|String|Str|Space|Rtrim|Rightc|Rightbp|Rightb|Right|Oct|Midc|Midbp|Midb|Mid|Ltrim|Leftc|Leftbp|Leftb|Left|Lcase|Inputbp|Inputbox|Inputb|Input|Implode|Hex|Format|Error|Environ|Dir|Date|Curdrive|Curdir|Command|Chr|Bin)[$](?:\s)/
+ , _style: "color: fuchsia;"
+ }
+ , keyw: {
+ _match: /\b(?:Yield|Year|Xor|Write|With|Width|While|Wend|Weekday|Vartype|Variant|Val|Ustring|Uselsx|Use|Until|Unlock|Unicode|Uni|Uchr|Ucase|Ubound|Typename|Type|True|Trim|Today|To|Timevalue|Timeserial|Timer|Timenumber|Time|Then|Text|Tan|Tab|Sub|Strtoken|Strrightback|Strright|Strleftback|Strleft|String|Strconv|Strcompare|Strcomp|Str|Stop|Step|Static|Sqr|Split|Spc|Space|Sleep|Single|Sin|Shell|Shared|Sgn|Setfileattr|Setattr|Set|Sendkeys|Select|Seek|Second|Rtrim|Rset|Round|Rnd|Rmdir|Rightc|Rightbp|Rightb|Right|Return|Resume|Reset|Replace|Remove|Redim|Read|Randomize|Random|Put|Published|Public|Property|Private|Print|Preserve|Pitch|Pi|Output|Or|Option|Open|On|Oct|Null|Now|Nothing|Not|Nopitch|Nocase|Next|New|Name|Msgbox|Month|Mod|Mkdir|Minute|Midc|Midbp|Midb|Mid|Messagebox|Me|Ltrim|Lsserver|Lsi_info|Lset|Loop|Long|Log|Lof|Lock|Loc|Lmbcs|Listtag|List|Line|Like|Lib|Let|Lenc|Lenbp|Lenb|Len|Leftc|Leftbp|Leftb|Left|Lcase|Lbound|Kill|Join|Isunknown|Isscalar|Isobject|Isnumeric|Isnull|Islist|Isempty|Iselement|Isdate|Isarray|Isa|Is|Integer|Int|Instrc|Instrbp|Instrb|Instr|Inputbp|Inputbox|Inputb|Input|In|Implode|Imp|Imestatus|Imesetmode|If|Hour|Hex|Goto|Gosub|Getthreadinfo|Getfileattr|Getattr|Get|Function|Fulltrim|From|Freefile|Fraction|Format|Forall|For|Fix|Filelen|Filedatetime|Filecopy|Fileattr|False|Explicit|Exp|Exit|Execute|Event|Evaluate|Error|Err|Erl|Erase|Eqv|Eof|Environ|End|Elseif|Else|Double|Doevents|Do|Dir|Dim|Destroylock|Delete|Defvar|Defstr|Defsng|Deflng|Defint|Defdbl|Defcur|Defbyte|Defbool|Declare|Day|Datevalue|Dateserial|Datenumber|Date|Datatype|Cvdate|Cvar|Currency|Curdrive|Curdir|Cstr|Csng|Createlock|Cos|Const|Compare|Command|Codeunlock|Codelockcheck|Codelock|Close|Clng|Class|Cint|Chr|Chdrive|Chdir|Cdbl|Cdat|Ccur|Cbyte|Cbool|Case|Call|Byval|Byte|Boolean|Bind|Binary|Bin|Beep|Base|Atn2|Atn|Asin|Asc|As|Arrayunique|Arrayreplace|Arraygetindex|Arrayappend|Append|Appactivate|Any|And|Alias|Activateapp|Acos|Access|Abs)\b/
+ , _style: "color: maroon; font-weight: bold;"
+ }
+ , directive: {
+ _match: /((?:^|\n)(?:%if|%end|%elseif|%else)\b)|(?:(?:^|\n)%include\b.*)/
+ , _style: "color: #5f5f5f;"
+ }
+ , notes: {
+ _match: /\b(?:NotesXSLTransformer|NotesXMLProcessor|NotesViewNavigator|NotesViewEntryCollection|NotesViewEntry|NotesViewColumn|NotesView|NotesTimer|NotesStream|NotesSession|NotesSAXParser|NotesSAXException|NotesSAXAttributeList|NotesRichTextTable|NotesRichTextTab|NotesRichTextStyle|NotesRichTextSection|NotesRichTextRange|NotesRichTextParagraphStyle|NotesRichTextNavigator|NotesRichTextItem|NotesRichTextDocLink|NotesReplicationEntry|NotesReplication|NotesRegistration|NotesOutlineEntry|NotesOutline|NotesNoteCollection|NotesNewsLetter|NotesName|NotesMIMEHeader|NotesMIMEEntity|NotesLog|NotesItem|NotesInternational|NotesForm|NotesEmbeddedObject|NotesDocumentCollection|NotesDocument|NotesDbDirectory|NotesDateTime|NotesDateRange|NotesDatabase|NotesDXLImporter|NotesDXLExporter|NotesDOMXMLDeclNode|NotesDOMTextNode|NotesDOMProcessingInstructionNode|NotesDOMParser|NotesDOMNotationNode|NotesDOMNodeList|NotesDOMNode|NotesDOMNamedNodeMap|NotesDOMEntityReferenceNode|NotesDOMEntityNode|NotesDOMElementNode|NotesDOMDocumentTypeNode|NotesDOMDocumentNode|NotesDOMDocumentFragmentNode|NotesDOMCommentNode|NotesDOMCharacterDataNode|NotesDOMCDATASectionNode|NotesDOMAttributeNode|NotesColorObject|NotesAgent|NotesAdministrationProcess|NotesACLEntry|NotesACL)\b/
+ , _style: "color: navy;"
+ }
+ , notesui: {
+ _match: /\b(?:NotesUIWorkspace|NotesUIView|NotesUIScheduler|NotesUIDocument|NotesUIDatabase|Navigator|Field|Button)\b/
+ , _style: "color: purple;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/mysql.js b/s5runner/example/chili/mysql.js
new file mode 100644
index 0000000..d735ecc
--- /dev/null
+++ b/s5runner/example/chili/mysql.js
@@ -0,0 +1,63 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+{
+ _name: "sql"
+ , _case: false
+ , _main: {
+ mlcom: {
+ _match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
+ , _style: "color: gray;"
+ }
+ , com: {
+ _match: /(?:--\s+.*)|(?:[^\\]\#.*)/
+ , _style: "color: green;"
+ }
+ , string: {
+ _match: /([\"\'])(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/
+ , _style: "color: purple;"
+ }
+ , quid: {
+ _match: /(`)(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/
+ , _style: "color: fuchsia;"
+ }
+ , value: {
+ _match: /\b(?:NULL|TRUE|FALSE)\b/
+ , _style: "color: gray; font-weight: bold;"
+ }
+ , number: {
+ _match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , hexnum: {
+ _match: /\b0[xX][\dA-Fa-f]+\b|\b[xX]([\'\"])[\dA-Fa-f]+\1/
+ , _style: "color: red; font-weight: bold;"
+ }
+ , variable: {
+ _match: /@([$.\w]+|([`\"\'])(?:(?:[^\2\\\r\n]*?(?:\2\2|\\.))*[^\2\\\r\n]*?)\2)/
+ , _replace: '<span class="keyword">@</span><span class="variable">$1</span>'
+ , _style: "color: #4040c2;"
+ }
+ , keyword: {
+ _match: /\b(?:A(?:CTION|DD|FTER|G(?:AINST|GREGATE)|L(?:GORITHM|L|TER)|N(?:ALYZE|D|Y)|S(?:C(?:II|)|ENSITIVE|)|UTO_INCREMENT|VG(?:_ROW_LENGTH|))|B(?:ACKUP|DB|E(?:FORE|GIN|RKELEYDB|TWEEN)|I(?:GINT|N(?:ARY|LOG)|T)|LOB|O(?:OL(?:EAN|)|TH)|TREE|Y(?:TE|))|C(?:A(?:CHE|LL|S(?:CADE(?:D|)|E))|H(?:A(?:IN|NGE(?:D|)|R(?:ACTER|SET|))|ECK(?:SUM|))|IPHER|L(?:IENT|OSE)|O(?:DE|L(?:LAT(?:E|ION)|UMN(?:S|))|M(?:M(?:ENT|IT(?:TED|))|P(?:ACT|RESSED))|N(?:CURRENT|DITION|NECTION|S(?:ISTENT|TRAINT)|T(?:AINS|INUE)|VERT))|R(?:EATE|OSS)|U(?:BE|R(?:RENT_(?:DATE|TIME(?:STAMP|)|USER)|SOR)))|D(?:A(?:T(?:A(?:BASE(?:S|)|)|E(?:TIME|))|Y(?:_(?:HOUR|MI(?:CROSECOND|NUTE)|SECOND)|))|E(?:ALLOCATE|C(?:IMAL|LARE|)|F(?:AULT|INER)|L(?:AY(?:ED|_KEY_WRITE)|ETE)|S(?:C(?:RIBE|)|_KEY_FILE)|TERMINISTIC)|I(?:RECTORY|S(?:ABLE|CARD|TINCT(?:ROW|))|V)|O(?:UBLE|)|ROP|U(?:AL|MPFILE|PLICATE)|YNAMIC)|E(?:ACH|LSE(?:IF|)|N(?:ABLE|CLOSED|D|GINE(?:S|)|UM)|RRORS|SCAPE(?:D|)|VENTS|X(?:ECUTE|I(?:STS|T)|P(?:ANSION|LAIN)|TENDED))|F(?:A(?:LSE|ST)|ETCH|I(?:ELDS|LE|RST|XED)|L(?:OAT(?:4|8|)|USH)|O(?:R(?:CE|EIGN|)|UND)|R(?:AC_SECOND|OM)|U(?:LL(?:TEXT|)|NCTION))|G(?:E(?:OMETRY(?:COLLECTION|)|T_FORMAT)|LOBAL|R(?:ANT(?:S|)|OUP))|H(?:A(?:NDLER|SH|VING)|ELP|IGH_PRIORITY|O(?:STS|UR(?:_(?:MI(?:CROSECOND|NUTE)|SECOND)|)))|I(?:DENTIFIED|F|GNORE|MPORT|N(?:DEX(?:ES|)|FILE|N(?:ER|O(?:BASE|DB))|OUT|SE(?:NSITIVE|RT(?:_METHOD|))|T(?:1|2|3|4|8|E(?:GER|RVAL)|O|)|VOKER|)|O_THREAD|S(?:OLATION|SUER|)|TERATE)|JOIN|K(?:EY(?:S|)|ILL)|L(?:A(?:NGUAGE|ST)|E(?:A(?:DING|VE(?:S|))|FT|VEL)|I(?:KE|MIT|NES(?:TRING|))|O(?:AD|C(?:AL(?:TIME(?:STAMP|)|)|K(?:S|))|GS|NG(?:BLOB|TEXT|)|OP|W_PRIORITY))|M(?:A(?:STER(?:_(?:CONNECT_RETRY|HOST|LOG_(?:FILE|POS)|P(?:ASSWORD|ORT)|S(?:ERVER_ID|SL(?:_(?:C(?:A(?:PATH|)|ERT|IPHER)|KEY)|))|USER)|)|TCH|X_(?:CONNECTIONS_PER_HOUR|QUERIES_PER_HOUR|ROWS|U(?:PDATES_PER_HOUR|SER_CONNECTIONS)))|E(?:DIUM(?:BLOB|INT|TEXT|)|RGE)|I(?:CROSECOND|DDLEINT|GRATE|N(?:UTE(?:_(?:MICROSECOND|SECOND)|)|_ROWS))|O(?:D(?:E|IF(?:IES|Y)|)|NTH)|U(?:LTI(?:LINESTRING|PO(?:INT|LYGON))|TEX))|N(?:A(?:ME(?:S|)|T(?:IONAL|URAL))|CHAR|DB(?:CLUSTER|)|E(?:W|XT)|O(?:NE|T|_WRITE_TO_BINLOG|)|U(?:LL|MERIC)|VARCHAR)|O(?:FFSET|LD_PASSWORD|N(?:E(?:_SHOT|)|)|P(?:EN|TI(?:MIZE|ON(?:ALLY|)))|R(?:DER|)|UT(?:ER|FILE|))|P(?:A(?:CK_KEYS|RTIAL|SSWORD)|HASE|O(?:INT|LYGON)|R(?:E(?:CISION|PARE|V)|I(?:MARY|VILEGES)|OCE(?:DURE|SS(?:LIST|)))|URGE)|QU(?:ARTER|ERY|ICK)|R(?:AID(?:0|_(?:CHUNKS(?:IZE|)|TYPE))|E(?:A(?:D(?:S|)|L)|COVER|DUNDANT|FERENCES|GEXP|L(?:AY_(?:LOG_(?:FILE|POS)|THREAD)|EASE|OAD)|NAME|P(?:AIR|EAT(?:ABLE|)|L(?:ACE|ICATION))|QUIRE|S(?:ET|T(?:ORE|RICT)|UME)|TURN(?:S|)|VOKE)|IGHT|LIKE|O(?:LL(?:BACK|UP)|UTINE|W(?:S|_FORMAT|))|TREE)|S(?:AVEPOINT|CHEMA(?:S|)|E(?:C(?:OND(?:_MICROSECOND|)|URITY)|LECT|NSITIVE|PARATOR|RIAL(?:IZABLE|)|SSION|T)|H(?:ARE|OW|UTDOWN)|I(?:GNED|MPLE)|LAVE|MALLINT|NAPSHOT|O(?:ME|NAME|UNDS)|P(?:ATIAL|ECIFIC)|QL(?:EXCEPTION|STATE|WARNING|_(?:B(?:IG_RESULT|UFFER_RESULT)|CA(?:CHE|LC_FOUND_ROWS)|NO_CACHE|SMALL_RESULT|T(?:HREAD|SI_(?:DAY|FRAC_SECOND|HOUR|M(?:INUTE|ONTH)|QUARTER|SECOND|WEEK|YEAR)))|)|SL|T(?:A(?:RT(?:ING|)|TUS)|O(?:P|RAGE)|R(?:AIGHT_JOIN|I(?:NG|PED)))|U(?:BJECT|PER|SPEND))|T(?:ABLE(?:S(?:PACE|)|)|E(?:MP(?:ORARY|TABLE)|RMINATED|XT)|HEN|I(?:ME(?:STAMP(?:ADD|DIFF|)|)|NY(?:BLOB|INT|TEXT))|O|R(?:A(?:ILING|NSACTION)|IGGER(?:S|)|U(?:E|NCATE))|YPE(?:S|))|U(?:N(?:COMMITTED|D(?:EFINED|O)|I(?:CODE|ON|QUE)|KNOWN|LOCK|SIGNED|TIL)|P(?:DATE|GRADE)|S(?:AGE|E(?:R(?:_RESOURCES|)|_FRM|)|ING)|TC_(?:DATE|TIME(?:STAMP|)))|V(?:A(?:LUE(?:S|)|R(?:BINARY|CHAR(?:ACTER|)|IABLES|YING))|IEW)|W(?:ARNINGS|EEK|H(?:E(?:N|RE)|ILE)|ITH|ORK|RITE)|X(?:509|A|OR)|YEAR(?:_MONTH|)|ZEROFILL)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ , 'function': {
+ _match: /\b(?:A(?:BS|COS|DD(?:DATE|TIME)|ES_(?:DECRYPT|ENCRYPT)|REA|S(?:BINARY|IN|TEXT|WK(?:B|T))|TAN(?:2|))|B(?:ENCHMARK|I(?:N|T_(?:AND|COUNT|LENGTH|OR|XOR)))|C(?:AST|E(?:IL(?:ING|)|NTROID)|HAR(?:ACTER_LENGTH|_LENGTH)|O(?:ALESCE|ERCIBILITY|MPRESS|N(?:CAT(?:_WS|)|NECTION_ID|V(?:ERT_TZ|))|S|T|UNT)|R(?:C32|OSSES)|UR(?:DATE|TIME))|D(?:A(?:TE(?:DIFF|_(?:ADD|FORMAT|SUB))|Y(?:NAME|OF(?:MONTH|WEEK|YEAR)))|E(?:CODE|GREES|S_(?:DECRYPT|ENCRYPT))|I(?:MENSION|SJOINT))|E(?:LT|N(?:C(?:ODE|RYPT)|DPOINT|VELOPE)|QUALS|X(?:P(?:ORT_SET|)|T(?:ERIORRING|RACT)))|F(?:I(?:ELD|ND_IN_SET)|LOOR|O(?:RMAT|UND_ROWS)|ROM_(?:DAYS|UNIXTIME))|G(?:E(?:OM(?:COLLFROM(?:TEXT|WKB)|ETRY(?:COLLECTIONFROM(?:TEXT|WKB)|FROM(?:TEXT|WKB)|N|TYPE)|FROM(?:TEXT|WKB))|T_LOCK)|LENGTH|R(?:EATEST|OUP_(?:CONCAT|UNIQUE_USERS)))|HEX|I(?:FNULL|N(?:ET_(?:ATON|NTOA)|STR|TER(?:IORRINGN|SECTS))|S(?:CLOSED|EMPTY|NULL|SIMPLE|_(?:FREE_LOCK|USED_LOCK)))|L(?:AST_(?:DAY|INSERT_ID)|CASE|E(?:AST|NGTH)|INE(?:FROM(?:TEXT|WKB)|STRINGFROM(?:TEXT|WKB))|N|O(?:AD_FILE|CATE|G(?:10|2|)|WER)|PAD|TRIM)|M(?:A(?:KE(?:DATE|TIME|_SET)|STER_POS_WAIT|X)|BR(?:CONTAINS|DISJOINT|EQUAL|INTERSECTS|OVERLAPS|TOUCHES|WITHIN)|D5|I(?:D|N)|LINEFROM(?:TEXT|WKB)|ONTHNAME|PO(?:INTFROM(?:TEXT|WKB)|LYFROM(?:TEXT|WKB))|ULTI(?:LINESTRINGFROM(?:TEXT|WKB)|PO(?:INTFROM(?:TEXT|WKB)|LYGONFROM(?:TEXT|WKB))))|N(?:AME_CONST|OW|U(?:LLIF|M(?:GEOMETRIES|INTERIORRINGS|POINTS)))|O(?:CT(?:ET_LENGTH|)|RD|VERLAPS)|P(?:ERIOD_(?:ADD|DIFF)|I|O(?:INT(?:FROM(?:TEXT|WKB)|N)|LY(?:FROM(?:TEXT|WKB)|GONFROM(?:TEXT|WKB))|SITION|W(?:ER|)))|QUOTE|R(?:A(?:DIANS|ND)|E(?:LEASE_LOCK|VERSE)|O(?:UND|W_COUNT)|PAD|TRIM)|S(?:E(?:C_TO_TIME|SSION_USER)|HA(?:1|)|I(?:GN|N)|LEEP|OUNDEX|PACE|QRT|RID|T(?:ARTPOINT|D(?:DEV(?:_(?:POP|SAMP)|)|)|R(?:CMP|_TO_DATE))|U(?:B(?:DATE|STR(?:ING(?:_INDEX|)|)|TIME)|M)|YS(?:DATE|TEM_USER))|T(?:AN|IME(?:DIFF|_(?:FORMAT|TO_SEC))|O(?:UCHES|_DAYS)|RIM)|U(?:CASE|N(?:COMPRESS(?:ED_LENGTH|)|HEX|I(?:QUE_USERS|X_TIMESTAMP))|PPER|UID)|V(?:AR(?:IANCE|_(?:POP|SAMP))|ERSION)|W(?:EEK(?:DAY|OFYEAR)|ITHIN)|X|Y(?:EARWEEK|))(?=\()/
+ , _style: "color: #e17100;"
+ }
+ , id: {
+ _match: /[$\w]+/
+ , _style: "color: maroon;"
+ }
+ }
+}
+
diff --git a/s5runner/example/chili/php-f.js b/s5runner/example/chili/php-f.js
new file mode 100644
index 0000000..2b06011
--- /dev/null
+++ b/s5runner/example/chili/php-f.js
@@ -0,0 +1,142 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+/* ----------------------------------------------------------------------------
+ * this recipe uses a little trick for highlighting php code
+ * 1: replace each php snippet with a placeholder
+ * 2: highlight html without php and php snippets apart
+ * 3: replace each placeholder with its highlighted php snippet
+ *
+ * the trick is not perfect only if the html without php is broken
+ * however, in such a case many highlighters get fooled but Chili does not
+ *
+ * ---
+ * this recipe has been adapted for working with Safari
+ * in fact, Safari cannot match more than 101236 characters with a lazy star
+ * --------------------------------------------------------------------------*/
+{
+ _name: "php"
+ , _case: true
+ , _main: {
+ all: {
+ _match: /[\w\W]*/
+ , _replace: function( all ) {
+ var placeholder = String.fromCharCode(0);
+ var blocks = [];
+ var that = this;
+ var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_1' ) );
+ return placeholder;
+ } );
+ var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_2' ) );
+ return placeholder;
+ } );
+ if( blocks.length ) {
+ var html = this.x( no_php_2, 'html' );
+ var count = 0;
+ return html.replace( new RegExp( placeholder, "g" ), function() {
+ return blocks[ count++ ];
+ } );
+ }
+ else {
+ return this.x( all, '/php' );
+ }
+ }
+ }
+ }
+ , block: {
+ php_1: { // --- <? +++ ?> ---
+ _match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
+ , _replace: function( all, open, content ) {
+ return "<span class='start'>" + this.x( open ) + "</span>"
+ + this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ , php_2: { // +++ ?> --- <? +++
+ _match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
+ , _replace: function( all, content, open2, content2 ) {
+ if( open2 ) {
+ return "<span class='start'>" + this.x( open2 ) + "</span>"
+ + this.x( content2, '/php' );
+ }
+ else {
+ return this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ }
+ , php: {
+ mlcom: {
+ _match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
+ , _style: "color: gray;"
+ }
+ , com: {
+ _match: /(?:\/\/.*)|(?:[^\\]\#.*)/
+ , _style: "color: green;"
+ }
+ , string1: {
+ _match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
+ , _style: "color: purple;"
+ }
+ , string2: {
+ _match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
+ , _style: "color: fuchsia;"
+ }
+ , value: {
+ _match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
+ , _style: "color: gray; font-weight: bold;"
+ }
+ , number: {
+ _match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , const1: {
+ _match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
+ , _style: "color: red;"
+ }
+ , const2: {
+ _match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
+ , _style: "color: red;"
+ }
+ , global: {
+ _match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ , variable: {
+ _match: /\$(\w+)/
+ , _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
+ , _style: "color: #4040c2;"
+ }
+ , heredoc: {
+ _match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
+ , _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
+ }
+ , 'function': {
+ _match: "\\b(?:a(?:bs|cos(?:h|)|dd(?:cslashes|slashes)|ggregat(?:e(?:_(?:info|methods(?:_by_(?:list|regexp)|)|properties(?:_by_(?:list|regexp)|))|)|ion_info)|p(?:ache_(?:child_terminate|get(?:_(?:modules|version)|env)|lookup_uri|note|re(?:quest_headers|s(?:et_timeout|ponse_headers))|setenv)|d_(?:breakpoint|c(?:allstack|lunk|ontinue|roak)|dump_(?:function_table|persistent_resources|regular_resources)|echo|get_active_symbols|set_(?:pprof_trace|s(?:ession(?:_trace|)|ocket_session_trace))))|r(?:ray_(?:c(?:h(?:ange_key_case|unk)|o(?:mbine|unt_values))|diff(?:_(?:assoc|key|u(?:assoc|key))|)|f(?:il(?:l|ter)|lip)|intersect(?:_(?:assoc|key|u(?:assoc|key))|)|key(?:_exists|s)|m(?:ap|erge(?:_recursive|)|ultisort)|p(?:ad|op|ush)|r(?:and|e(?:duce|verse))|s(?:earch|hift|lice|plice|um)|u(?:diff(?:_(?:assoc|uassoc)|)|intersect(?:_(?:assoc|uassoc)|)|n(?:ique|shift))|values|walk(?:_recursive|))|sort)|s(?:cii2ebcdic|in(?:h|)|ort|pell_(?:check(?:_raw|)|new|suggest)|sert(?:_options|))|tan(?:2|h|))|b(?:ase(?:64_(?:decode|encode)|_convert|name)|c(?:add|comp|div|m(?:od|ul)|ompile(?:_write_file|r_(?:load(?:_exe|)|parse_class|read|write_(?:c(?:lass|onstant)|exe_footer|f(?:ooter|unction(?:s_from_file|))|header)))|pow(?:mod|)|s(?:cale|qrt|ub))|in(?:2hex|d(?:_textdomain_codeset|ec|textdomain))|z(?:c(?:lose|ompress)|decompress|err(?:no|or|str)|flush|open|read|write))|c(?:al(?:_(?:days_in_month|from_jd|info|to_jd)|l_user_(?:func(?:_array|)|method(?:_array|)))|cvs_(?:a(?:dd|uth)|co(?:mmand|unt)|d(?:elete|one)|init|lookup|new|re(?:port|turn|verse)|s(?:ale|tatus)|textvalue|void)|eil|h(?:dir|eckd(?:ate|nsrr)|grp|mod|o(?:p|wn)|r(?:oot|)|unk_split)|l(?:ass(?:_(?:exists|implements|parents)|kit_(?:import|method_(?:add|copy|re(?:define|move|name))))|earstatcache|ose(?:dir|log))|o(?:m(?:_(?:addref|create_guid|event_sink|get(?:_active_object|)|i(?:nvoke|senum)|load(?:_typelib|)|message_pump|pr(?:int_typeinfo|op(?:get|put|set))|release|set)|pact|)|n(?:nection_(?:aborted|status|timeout)|stant|vert_(?:cyr_string|uu(?:decode|encode)))|py|s(?:h|)|unt(?:_chars|))|pdf_(?:a(?:dd_(?:annotation|outline)|rc)|begin_text|c(?:ircle|l(?:ip|ose(?:path(?:_(?:fill_stroke|stroke)|)|))|ontinue_text|urveto)|end_text|fi(?:ll(?:_stroke|)|nalize(?:_page|))|global_set_document_limits|import_jpeg|lineto|moveto|newpath|o(?:pen|utput_buffer)|p(?:age_init|lace_inline_image)|r(?:e(?:ct|store)|lineto|moveto|otate(?:_text|))|s(?:ave(?:_to_file|)|cale|et(?:_(?:action_url|c(?:har_spacing|reator|urrent_page)|font(?:_(?:directories|map_file)|)|horiz_scaling|keywords|leading|page_animation|subject|t(?:ext_(?:matrix|pos|r(?:endering|ise))|itle)|viewer_preferences|word_spacing)|dash|flat|gray(?:_(?:fill|stroke)|)|line(?:cap|join|width)|miterlimit|rgbcolor(?:_(?:fill|stroke)|))|how(?:_xy|)|tr(?:ingwidth|oke))|t(?:ext|ranslate))|r(?:ack_(?:c(?:heck|losedict)|getlastmessage|opendict)|c32|eate_function|ypt)|type_(?:al(?:num|pha)|cntrl|digit|graph|lower|p(?:rint|unct)|space|upper|xdigit)|ur(?:l_(?:c(?:lose|opy_handle)|e(?:rr(?:no|or)|xec)|getinfo|init|multi_(?:add_handle|close|exec|getcontent|in(?:fo_read|it)|remove_handle|select)|setopt|version)|rent)|y(?:bercash_(?:base64_(?:decode|encode)|decr|encr)|rus_(?:authenticate|bind|c(?:lose|onnect)|query|unbind)))|d(?:ate(?:_sun(?:rise|set)|)|b(?:a(?:_(?:close|delete|exists|f(?:etch|irstkey)|handlers|insert|key_split|list|nextkey|op(?:en|timize)|popen|replace|sync)|se_(?:add_record|c(?:lose|reate)|delete_record|get_(?:header_info|record(?:_with_names|))|num(?:fields|records)|open|pack|replace_record))|list|m(?:close|delete|exists|f(?:etch|irstkey)|insert|nextkey|open|replace)|plus_(?:a(?:dd|ql)|c(?:hdir|lose|urr)|err(?:code|no)|f(?:i(?:nd|rst)|lush|ree(?:alllocks|lock|rlocks))|get(?:lock|unique)|info|l(?:ast|ockrel)|next|open|prev|r(?:c(?:hperm|r(?:eate|t(?:exact|like)))|es(?:olve|torepos)|keys|open|query|rename|secindex|unlink|zap)|s(?:avepos|etindex(?:bynumber|)|ql)|t(?:cl|remove)|u(?:n(?:do(?:prepare|)|lockrel|select)|pdate)|x(?:lockrel|unlockrel))|x_(?:c(?:lose|o(?:mpare|nnect))|e(?:rror|scape_string)|fetch_row|query|sort))|c(?:gettext|ngettext)|e(?:aggregate|bug(?:_(?:backtrace|print_backtrace|zval_dump)|ger_o(?:ff|n))|c(?:bin|hex|oct)|fine(?:_syslog_variables|d|)|g2rad|lete)|gettext|i(?:o_(?:close|fcntl|open|read|s(?:eek|tat)|t(?:csetattr|runcate)|write)|r(?:name|)|sk(?:_(?:free_space|total_space)|freespace))|l|n(?:gettext|s_(?:check_record|get_(?:mx|record)))|o(?:m(?:_import_simplexml|xml_(?:new_doc|open_(?:file|mem)|version|x(?:mltree|slt_stylesheet(?:_(?:doc|file)|))))|tnet(?:_load|)|ubleval))|e(?:a(?:ch|ster_da(?:te|ys))|bcdic2ascii|nd|r(?:eg(?:_replace|i(?:_replace|)|)|ror_(?:log|reporting))|scapeshell(?:arg|cmd)|x(?:ec|if_(?:imagetype|read_data|t(?:agname|humbnail))|p(?:lode|m1|)|t(?:ension_loaded|ract))|zmlm_hash)|f(?:am_(?:c(?:ancel_monitor|lose)|monitor_(?:collection|directory|file)|next_event|open|pending|resume_monitor|suspend_monitor)|bsql_(?:a(?:ffected_rows|utocommit)|blob_size|c(?:hange_user|lo(?:b_size|se)|o(?:mmit|nnect)|reate_(?:blob|clob|db))|d(?:ata(?:_seek|base(?:_password|))|b_(?:query|status)|rop_db)|err(?:no|or)|f(?:etch_(?:a(?:rray|ssoc)|field|lengths|object|row)|ield_(?:flags|len|name|seek|t(?:able|ype))|ree_result)|get_autostart_info|hostname|insert_id|list_(?:dbs|fields|tables)|n(?:ext_result|um_(?:fields|rows))|p(?:assword|connect)|query|r(?:e(?:ad_(?:blob|clob)|sult)|ollback)|s(?:e(?:lect_db|t_(?:lob_mode|password|transaction))|t(?:art_db|op_db))|tablename|username|warnings)|close|df_(?:add_(?:doc_javascript|template)|c(?:lose|reate)|e(?:num_values|rr(?:no|or))|get_(?:a(?:p|ttachment)|encoding|f(?:ile|lags)|opt|status|v(?:alue|ersion))|header|next_field_name|open(?:_string|)|remove_item|s(?:ave(?:_string|)|et_(?:ap|encoding|f(?:ile|lags)|javascript_action|o(?:n_import_javascript|pt)|s(?:tatus|ubmit_form_action)|target_frame|v(?:alue|ersion))))|eof|flush|get(?:c(?:sv|)|s(?:s|))|ile(?:_(?:exists|get_contents|put_contents)|atime|ctime|group|inode|mtime|owner|p(?:erms|ro(?:_(?:field(?:count|name|type|width)|r(?:etrieve|owcount))|))|size|type|)|l(?:o(?:atval|ck|or)|ush)|mod|nmatch|open|p(?:assthru|rintf|ut(?:csv|s))|r(?:e(?:ad|nchtojd)|ibidi_log2vis)|s(?:canf|eek|ockopen|tat)|t(?:ell|ok|p_(?:alloc|c(?:dup|h(?:dir|mod)|lose|onnect)|delete|exec|f(?:get|put)|get(?:_option|)|login|m(?:dtm|kdir)|n(?:b_(?:continue|f(?:get|put)|get|put)|list)|p(?:asv|ut|wd)|quit|r(?:aw(?:list|)|ename|mdir)|s(?:et_option|i(?:te|ze)|sl_connect|ystype))|runcate)|unc(?:_(?:get_arg(?:s|)|num_args)|tion_exists)|write)|g(?:d_info|et(?:_(?:browser|c(?:fg_var|lass(?:_(?:methods|vars)|)|urrent_user)|de(?:clared_(?:classes|interfaces)|fined_(?:constants|functions|vars))|extension_funcs|h(?:eaders|tml_translation_table)|include(?:_path|d_files)|loaded_extensions|m(?:agic_quotes_(?:gpc|runtime)|eta_tags)|object_vars|parent_class|re(?:quired_files|source_type))|allheaders|cwd|date|env|hostby(?:addr|name(?:l|))|imagesize|lastmod|m(?:xrr|y(?:gid|inode|pid|uid))|opt|protobyn(?:ame|umber)|r(?:andmax|usage)|servby(?:name|port)|t(?:ext|imeofday|ype))|lob|m(?:date|mktime|p_(?:a(?:bs|dd|nd)|c(?:lrbit|mp|om)|div(?:_(?:q(?:r|)|r)|exact|)|fact|gcd(?:ext|)|hamdist|in(?:it|tval|vert)|jacobi|legendre|m(?:od|ul)|neg|or|p(?:erfect_square|o(?:pcount|w(?:m|))|rob_prime)|random|s(?:can(?:0|1)|etbit|ign|qrt(?:rem|)|trval|ub)|xor)|strftime)|regoriantojd|z(?:c(?:lose|ompress)|deflate|e(?:ncode|of)|file|get(?:c|s(?:s|))|inflate|open|p(?:assthru|uts)|re(?:ad|wind)|seek|tell|uncompress|write))|h(?:e(?:ader(?:s_(?:list|sent)|)|brev(?:c|)|xdec)|ighlight_(?:file|string)|t(?:ml(?:_entity_decode|entities|specialchars)|tp_build_query)|w(?:_(?:a(?:pi_(?:attribute|content|object)|rray2objrec)|c(?:h(?:angeobject|ildren(?:obj|))|lose|onnect(?:ion_info|)|p)|d(?:eleteobject|oc(?:byanchor(?:obj|)|ument_(?:attributes|bodytag|content|s(?:etcontent|ize)))|ummy)|e(?:dittext|rror(?:msg|))|free_document|get(?:an(?:chors(?:obj|)|dlock)|child(?:coll(?:obj|)|doccoll(?:obj|))|object(?:byquery(?:coll(?:obj|)|obj|)|)|parents(?:obj|)|re(?:llink|mote(?:children|))|srcbydestobj|text|username)|i(?:dentify|n(?:collections|fo|s(?:coll|doc|ert(?:anchors|document|object))))|m(?:apid|odifyobject|v)|new_document|o(?:bjrec2array|utput_document)|p(?:connect|ipedocument)|root|s(?:etlinkroot|tat)|unlock|who)|api_hgcsp)|ypot)|i(?:base_(?:a(?:dd_user|ffected_rows)|b(?:ackup|lob_(?:add|c(?:ancel|lose|reate)|echo|get|i(?:mport|nfo)|open))|c(?:lose|o(?:mmit(?:_ret|)|nnect))|d(?:b_info|elete_user|rop_db)|e(?:rr(?:code|msg)|xecute)|f(?:etch_(?:assoc|object|row)|ield_info|ree_(?:event_handler|query|result))|gen_id|m(?:aintain_db|odify_user)|n(?:ame_result|um_(?:fields|params))|p(?:aram_info|connect|repare)|query|r(?:estore|ollback(?:_ret|))|se(?:rv(?:er_info|ice_(?:attach|detach))|t_event_handler)|t(?:imefmt|rans)|wait_event)|conv(?:_(?:get_encoding|mime_(?:decode(?:_headers|)|encode)|s(?:et_encoding|tr(?:len|pos|rpos)|ubstr))|)|d(?:3_(?:get_(?:frame_(?:long_name|short_name)|genre_(?:id|list|name)|tag|version)|remove_tag|set_tag)|ate)|fx(?:_(?:affected_rows|b(?:lobinfile_mode|yteasvarchar)|c(?:lose|o(?:nnect|py_blob)|reate_(?:blob|char))|do|error(?:msg|)|f(?:etch_row|ield(?:properties|types)|ree_(?:blob|char|result))|get(?:_(?:blob|char)|sqlca)|htmltbl_result|nu(?:llformat|m_(?:fields|rows))|p(?:connect|repare)|query|textasvarchar|update_(?:blob|char))|us_(?:c(?:lose_slob|reate_slob)|free_slob|open_slob|read_slob|seek_slob|tell_slob|write_slob))|gnore_user_abort|m(?:a(?:ge(?:2wbmp|_type_to_(?:extension|mime_type)|a(?:lphablending|ntialias|rc)|c(?:har(?:up|)|o(?:lor(?:a(?:llocate(?:alpha|)|t)|closest(?:alpha|hwb|)|deallocate|exact(?:alpha|)|match|resolve(?:alpha|)|s(?:et|forindex|total)|transparent)|py(?:merge(?:gray|)|res(?:ampled|ized)|))|reate(?:from(?:g(?:d(?:2(?:part|)|)|if)|jpeg|png|string|wbmp|x(?:bm|pm))|truecolor|))|d(?:ashedline|estroy)|ellipse|f(?:il(?:l(?:ed(?:arc|ellipse|polygon|rectangle)|toborder|)|ter)|ont(?:height|width)|t(?:bbox|text))|g(?:ammacorrect|d(?:2|)|if)|i(?:nterlace|struecolor)|jpeg|l(?:ayereffect|ine|oadfont)|p(?:alettecopy|ng|olygon|s(?:bbox|copyfont|e(?:ncodefont|xtendfont)|freefont|loadfont|slantfont|text))|r(?:ectangle|otate)|s(?:avealpha|et(?:brush|pixel|style|t(?:hickness|ile))|tring(?:up|)|x|y)|t(?:ruecolortopalette|tf(?:bbox|text)|ypes)|wbmp|xbm)|p_(?:8bit|a(?:lerts|ppend)|b(?:ase64|inary|ody(?:struct|))|c(?:heck|l(?:earflag_full|ose)|reatemailbox)|delete(?:mailbox|)|e(?:rrors|xpunge)|fetch(?:_overview|body|header|structure)|get(?:_quota(?:root|)|acl|mailboxes|subscribed)|header(?:info|s|)|l(?:ast_error|ist(?:mailbox|s(?:can|ubscribed)|)|sub)|m(?:ail(?:_(?:co(?:mpose|py)|move)|boxmsginfo|)|ime_header_decode|sgno)|num_(?:msg|recent)|open|ping|qprint|r(?:e(?:namemailbox|open)|fc822_(?:parse_(?:adrlist|headers)|write_address))|s(?:canmailbox|e(?:arch|t(?:_quota|acl|flag_full))|ort|tatus|ubscribe)|t(?:hread|imeout)|u(?:id|n(?:delete|subscribe)|tf(?:7_(?:decode|encode)|8))))|p(?:lode|ort_request_variables))|n(?:_array|et_(?:ntop|pton)|gres_(?:autocommit|c(?:lose|o(?:mmit|nnect))|f(?:etch_(?:array|object|row)|ield_(?:length|n(?:ame|ullable)|precision|scale|type))|num_(?:fields|rows)|pconnect|query|rollback)|i_(?:alter|get(?:_all|)|restore|set)|t(?:erface_exists|val))|p(?:2long|tc(?:embed|parse))|rcg_(?:channel_mode|disconnect|eval_ecmascript_params|fetch_error_msg|get_username|html_encode|i(?:gnore_(?:add|del)|nvite|s_conn_alive)|join|kick|l(?:ist|ookup_format_messages|users)|msg|n(?:ames|ick(?:name_(?:escape|unescape)|)|otice)|oper|p(?:art|connect)|register_format_messages|set_(?:current|file|on_die)|topic|who(?:is|))|s_(?:a(?:rray|)|bool|callable|d(?:ir|ouble)|executable|f(?:i(?:le|nite)|loat)|in(?:finite|t(?:eger|))|l(?:ink|ong)|n(?:an|u(?:ll|meric))|object|re(?:a(?:dable|l)|source)|s(?:calar|oap_fault|tring|ubclass_of)|uploaded_file|writ(?:able|eable))|terator(?:-to-array|_count))|j(?:ava_last_exception_(?:clear|get)|d(?:dayofweek|monthname|to(?:french|gregorian|j(?:ewish|ulian)|unix))|ewishtojd|oin|peg2wbmp|uliantojd)|k(?:ey|rsort|sort)|l(?:cg_value|dap_(?:8859_to_t61|add|bind|c(?:lose|o(?:mpare|nnect|unt_entries))|d(?:elete|n2ufn)|e(?:rr(?:2str|no|or)|xplode_dn)|f(?:irst_(?:attribute|entry|reference)|ree_result)|get_(?:attributes|dn|entries|option|values(?:_len|))|list|mod(?:_(?:add|del|replace)|ify)|next_(?:attribute|entry|reference)|parse_re(?:ference|sult)|re(?:ad|name)|s(?:asl_bind|e(?:arch|t_(?:option|rebind_proc))|ort|tart_tls)|t61_to_8859|unbind)|evenshtein|ink(?:info|)|o(?:cal(?:econv|time)|g(?:1(?:0|p)|)|ng2ip)|stat|trim|zf_(?:compress|decompress|optimized_for))|m(?:a(?:i(?:l(?:parse_(?:determine_best_xfer_encoding|msg_(?:create|extract_part(?:_file|)|free|get_(?:part(?:_data|)|structure)|parse(?:_file|))|rfc822_parse_addresses|stream_encode|uudecode_all)|)|n)|x)|b_(?:convert_(?:case|encoding|kana|variables)|de(?:code_(?:mimeheader|numericentity)|tect_(?:encoding|order))|e(?:ncode_(?:mimeheader|numericentity)|reg(?:_(?:match|replace|search(?:_(?:get(?:pos|regs)|init|pos|regs|setpos)|))|i(?:_replace|)|))|get_info|http_(?:input|output)|internal_encoding|l(?:anguage|ist_encodings)|output_handler|p(?:arse_str|referred_mime_name)|regex_(?:encoding|set_options)|s(?:end_mail|plit|tr(?:cut|imwidth|len|pos|rpos|to(?:lower|upper)|width)|ubst(?:itute_character|r(?:_count|))))|c(?:al_(?:append_event|c(?:lose|reate_calendar)|d(?:a(?:te_(?:compare|valid)|y(?:_of_(?:week|year)|s_in_month))|elete_(?:calendar|event))|e(?:vent_(?:add_attribute|init|set_(?:alarm|c(?:ategory|lass)|description|end|recur_(?:daily|monthly_(?:mday|wday)|none|weekly|yearly)|start|title))|xpunge)|fetch_(?:current_stream_event|event)|is_leap_year|list_(?:alarms|events)|next_recurrence|open|popen|re(?:name_calendar|open)|s(?:nooze|tore_event)|time_valid|week_of_year)|rypt_(?:c(?:bc|fb|reate_iv)|decrypt|e(?:cb|nc(?:_(?:get_(?:algorithms_name|block_size|iv_size|key_size|modes_name|supported_key_sizes)|is_block_(?:algorithm(?:_mode|)|mode)|self_test)|rypt))|ge(?:neric(?:_(?:deinit|end|init)|)|t_(?:block_size|cipher_name|iv_size|key_size))|list_(?:algorithms|modes)|module_(?:close|get_(?:algo_(?:block_size|key_size)|supported_key_sizes)|is_block_(?:algorithm(?:_mode|)|mode)|open|self_test)|ofb)|ve_(?:adduser(?:arg|)|bt|c(?:h(?:eckstatus|kpwd|ngpwd)|o(?:mpleteauthorizations|nnect(?:ionerror|)))|d(?:e(?:l(?:ete(?:response|trans|usersetup)|user)|stroy(?:conn|engine))|isableuser)|e(?:dituser|nableuser)|force|g(?:et(?:c(?:ell(?:bynum|)|ommadelimited)|header|user(?:arg|param))|ft|l|ut)|i(?:nit(?:conn|engine|usersetup)|scommadelimited)|list(?:stats|users)|m(?:axconntimeout|onitor)|num(?:columns|rows)|override|p(?:arsecommadelimited|ing|reauth(?:completion|))|qc|re(?:sponseparam|turn(?:code|status|))|s(?:ale|et(?:blocking|dropfile|ip|ssl(?:_files|)|t(?:imeout|le)))|t(?:ext_(?:avs|c(?:ode|v))|rans(?:action(?:a(?:uth|vs)|batch|cv|i(?:d|tem)|ssent|text)|inqueue|new|param|send))|u(?:b|wait)|v(?:erify(?:connection|sslcert)|oid)))|d(?:5(?:_file|)|ecrypt_generic)|e(?:m(?:cache_debug|ory_get_usage)|t(?:aphone|hod_exists))|hash(?:_(?:count|get_(?:block_size|hash_name)|keygen_s2k)|)|i(?:crotime|me_content_type|n(?:g_(?:set(?:cubicthreshold|scale)|useswfversion)|))|k(?:dir|time)|o(?:ney_format|ve_uploaded_file)|s(?:ession_(?:c(?:o(?:nnect|unt)|reate)|d(?:estroy|isconnect)|find|get(?:_(?:array|data)|)|inc|l(?:ist(?:var|)|ock)|plugin|randstr|set(?:_(?:array|data)|)|timeout|un(?:iq|lock))|g_(?:get_queue|re(?:ceive|move_queue)|s(?:e(?:nd|t_queue)|tat_queue))|ql(?:_(?:affected_rows|c(?:lose|onnect|reate(?:_db|db))|d(?:ata_seek|b(?:_query|name)|rop_db)|error|f(?:etch_(?:array|field|object|row)|ield(?:_(?:flags|len|name|seek|t(?:able|ype))|flags|len|name|t(?:able|ype))|ree_result)|list_(?:dbs|fields|tables)|num(?:_(?:fields|rows)|fields|rows)|pconnect|query|re(?:gcase|sult)|select_db|tablename)|)|sql_(?:bind|c(?:lose|onnect)|data_seek|execute|f(?:etch_(?:a(?:rray|ssoc)|batch|field|object|row)|ield_(?:length|name|seek|type)|ree_(?:result|statement))|g(?:et_last_message|uid_string)|init|min_(?:error_severity|message_severity)|n(?:ext_result|um_(?:fields|rows))|pconnect|query|r(?:esult|ows_affected)|select_db))|t_(?:getrandmax|rand|srand)|uscat_(?:close|g(?:et|ive)|setup(?:_net|))|ysql(?:_(?:affected_rows|c(?:hange_user|l(?:ient_encoding|ose)|onnect|reate_db)|d(?:ata_seek|b_(?:name|query)|rop_db)|e(?:rr(?:no|or)|scape_string)|f(?:etch_(?:a(?:rray|ssoc)|field|lengths|object|row)|ield_(?:flags|len|name|seek|t(?:able|ype))|ree_result)|get_(?:client_info|host_info|proto_info|server_info)|in(?:fo|sert_id)|list_(?:dbs|fields|processes|tables)|num_(?:fields|rows)|p(?:connect|ing)|query|re(?:al_escape_string|sult)|s(?:elect_db|tat)|t(?:ablename|hread_id)|unbuffered_query)|i(?:_(?:a(?:ffected_rows|utocommit)|bind_(?:param|result)|c(?:ha(?:nge_user|racter_set_name)|l(?:ient_encoding|ose)|o(?:mmit|nnect(?:_err(?:no|or)|)))|d(?:ata_seek|ebug|isable_r(?:eads_from_master|pl_parse)|ump_debug_info)|e(?:mbedded_connect|nable_r(?:eads_from_master|pl_parse)|rr(?:no|or)|scape_string|xecute)|f(?:etch(?:_(?:a(?:rray|ssoc)|field(?:_direct|s|)|lengths|object|row)|)|ield_(?:count|seek|tell)|ree_result)|get_(?:client_(?:info|version)|host_info|metadata|proto_info|server_(?:info|version))|in(?:fo|it|sert_id)|kill|m(?:aster_query|ore_results|ulti_query)|n(?:ext_result|um_(?:fields|rows))|options|p(?:aram_count|ing|repare)|query|r(?:e(?:al_(?:connect|escape_string|query)|port)|ollback|pl_(?:p(?:arse_enabled|robe)|query_type))|s(?:e(?:lect_db|nd_(?:long_data|query)|rver_(?:end|init)|t_opt)|qlstate|sl_set|t(?:at|mt_(?:affected_rows|bind_(?:param|result)|close|data_seek|e(?:rr(?:no|or)|xecute)|f(?:etch|ree_result)|init|num_rows|p(?:aram_count|repare)|res(?:et|ult_metadata)|s(?:end_long_data|qlstate|tore_result))|ore_result))|thread_(?:id|safe)|use_result|warning_count)|)))|n(?:at(?:casesort|sort)|curses_(?:a(?:dd(?:ch(?:nstr|str|)|nstr|str)|ssume_default_colors|ttr(?:o(?:ff|n)|set))|b(?:audrate|eep|kgd(?:set|)|o(?:rder|ttom_panel))|c(?:an_change_color|break|l(?:ear|rto(?:bot|eol))|olor_(?:content|set)|urs_set)|d(?:e(?:f(?:_(?:prog_mode|shell_mode)|ine_key)|l(?:_panel|ay_output|ch|eteln|win))|oupdate)|e(?:cho(?:char|)|nd|rase(?:char|))|f(?:ilter|l(?:ash|ushinp))|get(?:ch|m(?:axyx|ouse)|yx)|h(?:a(?:lfdelay|s_(?:colors|i(?:c|l)|key))|ide_panel|line)|i(?:n(?:ch|it(?:_(?:color|pair)|)|s(?:ch|delln|ertln|str|tr))|sendwin)|k(?:ey(?:ok|pad)|illchar)|longname|m(?:eta|o(?:use(?:_trafo|interval|mask)|ve(?:_panel|))|v(?:add(?:ch(?:nstr|str|)|nstr|str)|cur|delch|getch|hline|inch|vline|waddstr))|n(?:apms|ew(?:_panel|pad|win)|l|o(?:cbreak|echo|nl|qiflush|raw))|p(?:a(?:ir_content|nel_(?:above|below|window))|noutrefresh|refresh|utp)|qiflush|r(?:aw|e(?:fresh|place_panel|set(?:_(?:prog_mode|shell_mode)|ty)))|s(?:avetty|cr(?:_(?:dump|init|restore|set)|l)|how_panel|lk_(?:attr(?:o(?:ff|n)|set|)|c(?:lear|olor)|init|noutrefresh|re(?:fresh|store)|set|touch)|ta(?:nd(?:end|out)|rt_color))|t(?:erm(?:attrs|name)|imeout|op_panel|ypeahead)|u(?:nget(?:ch|mouse)|pdate_panels|se_(?:default_colors|e(?:nv|xtended_names)))|v(?:idattr|line)|w(?:a(?:dd(?:ch|str)|ttr(?:o(?:ff|n)|set))|border|c(?:lear|olor_set)|erase|getch|hline|mo(?:use_trafo|ve)|noutrefresh|refresh|stand(?:end|out)|vline))|ext|gettext|l(?:2br|_langinfo)|otes_(?:body|c(?:opy_db|reate_(?:db|note))|drop_db|find_note|header_info|list_msgs|mark_(?:read|unread)|nav_create|search|unread|version)|sapi_(?:re(?:quest_headers|sponse_headers)|virtual)|umber_format)|o(?:b_(?:clean|end_(?:clean|flush)|flush|g(?:et_(?:c(?:lean|ontents)|flush|le(?:ngth|vel)|status)|zhandler)|i(?:conv_handler|mplicit_flush)|list_handlers|start|tidyhandler)|c(?:i(?:_(?:bind_by_name|c(?:ancel|lose|o(?:mmit|nnect))|define_by_name|e(?:rror|xecute)|f(?:etch(?:_(?:a(?:ll|rray|ssoc)|object|row)|)|ield_(?:is_null|name|precision|s(?:cale|ize)|type(?:_raw|))|ree_statement)|internal_debug|lob_(?:copy|is_equal)|n(?:ew_(?:c(?:o(?:llection|nnect)|ursor)|descriptor)|um_(?:fields|rows))|p(?:a(?:rse|ssword_change)|connect)|r(?:esult|ollback)|s(?:e(?:rver_version|t_prefetch)|tatement_type))|bindbyname|c(?:ancel|loselob|o(?:l(?:l(?:a(?:ppend|ssign(?:elem|))|getelem|max|size|trim)|umn(?:isnull|name|precision|s(?:cale|ize)|type(?:raw|)))|mmit))|definebyname|e(?:rror|xecute)|f(?:etch(?:into|statement|)|ree(?:c(?:ollection|ursor)|desc|statement))|internaldebug|lo(?:adlob|go(?:ff|n))|n(?:ew(?:c(?:ollection|ursor)|descriptor)|logon|umcols)|p(?:arse|logon)|r(?:esult|o(?:llback|wcount))|s(?:avelob(?:file|)|e(?:rverversion|tprefetch)|tatementtype)|write(?:lobtofile|temporarylob))|tdec)|dbc_(?:autocommit|binmode|c(?:lose(?:_all|)|o(?:lumn(?:privileges|s)|mmit|nnect)|ursor)|d(?:ata_source|o)|e(?:rror(?:msg|)|xec(?:ute|))|f(?:etch_(?:array|into|object|row)|ield_(?:len|n(?:ame|um)|precision|scale|type)|oreignkeys|ree_result)|gettypeinfo|longreadlen|n(?:ext_result|um_(?:fields|rows))|p(?:connect|r(?:epare|imarykeys|ocedure(?:columns|s)))|r(?:esult(?:_all|)|ollback)|s(?:etoption|pecialcolumns|tatistics)|table(?:privileges|s))|pen(?:al_(?:buffer_(?:create|d(?:ata|estroy)|get|loadwav)|context_(?:c(?:reate|urrent)|destroy|process|suspend)|device_(?:close|open)|listener_(?:get|set)|s(?:ource_(?:create|destroy|get|p(?:ause|lay)|rewind|s(?:et|top))|tream))|dir|log|ssl_(?:csr_(?:export(?:_to_file|)|new|sign)|error_string|free_key|get_p(?:rivatekey|ublickey)|open|p(?:k(?:cs7_(?:decrypt|encrypt|sign|verify)|ey_(?:export(?:_to_file|)|get_p(?:rivate|ublic)|new))|rivate_(?:decrypt|encrypt)|ublic_(?:decrypt|encrypt))|s(?:eal|ign)|verify|x509_(?:check(?:_private_key|purpose)|export(?:_to_file|)|free|parse|read)))|r(?:a_(?:bind|c(?:lose|o(?:lumn(?:name|size|type)|mmit(?:o(?:ff|n)|)))|do|e(?:rror(?:code|)|xec)|fetch(?:_into|)|getcolumn|logo(?:ff|n)|num(?:cols|rows)|open|p(?:arse|logon)|rollback)|d)|utput_(?:add_rewrite_var|reset_rewrite_vars)|v(?:er(?:load|ride_function)|rimos_(?:c(?:lose|o(?:mmit|nnect)|ursor)|exec(?:ute|)|f(?:etch_(?:into|row)|ield_(?:len|n(?:ame|um)|type)|ree_result)|longreadlen|num_(?:fields|rows)|prepare|r(?:esult(?:_all|)|ollback))))|p(?:a(?:ck|rse(?:_(?:ini_file|str|url)|kit_(?:compile_(?:file|string)|func_arginfo))|ssthru|thinfo)|c(?:lose|ntl_(?:alarm|exec|fork|getpriority|s(?:etpriority|ignal)|w(?:ait(?:pid|)|exitstatus|if(?:exited|s(?:ignaled|topped))|stopsig|termsig)))|df_(?:a(?:dd_(?:annotation|bookmark|l(?:aunchlink|ocallink)|note|outline|pdflink|thumbnail|weblink)|rc(?:n|)|ttach_file)|begin_(?:pa(?:ge|ttern)|template)|c(?:ircle|l(?:ip|ose(?:_(?:image|pdi(?:_page|))|path(?:_(?:fill_stroke|stroke)|)|))|on(?:cat|tinue_text)|urveto)|delete|end(?:_(?:pa(?:ge|ttern)|template)|path)|fi(?:ll(?:_stroke|)|ndfont)|get_(?:buffer|font(?:name|size|)|image_(?:height|width)|m(?:ajorversion|inorversion)|p(?:arameter|di_(?:parameter|value))|value)|initgraphics|lineto|m(?:akespotcolor|oveto)|new|open(?:_(?:ccitt|file|gif|image(?:_file|)|jpeg|memory_image|p(?:di(?:_page|)|ng)|tiff)|)|place_(?:image|pdi_page)|r(?:e(?:ct|store)|otate)|s(?:ave|cale|et(?:_(?:border_(?:color|dash|style)|char_spacing|duration|font|horiz_scaling|info(?:_(?:author|creator|keywords|subject|title)|)|leading|parameter|text_(?:matrix|pos|r(?:endering|ise))|value|word_spacing)|color|dash|f(?:lat|ont)|gray(?:_(?:fill|stroke)|)|line(?:cap|join|width)|m(?:atrix|iterlimit)|polydash|rgbcolor(?:_(?:fill|stroke)|))|how(?:_(?:boxed|xy)|)|kew|tr(?:ingwidth|oke))|translate)|f(?:pro_(?:cleanup|init|process(?:_raw|)|version)|sockopen)|g_(?:affected_rows|c(?:ancel_query|l(?:ient_encoding|ose)|o(?:n(?:nect(?:ion_(?:busy|reset|status)|)|vert)|py_(?:from|to)))|d(?:bname|elete)|e(?:nd_copy|scape_(?:bytea|string))|f(?:etch_(?:a(?:ll|rray|ssoc)|object|r(?:esult|ow))|ield_(?:is_null|n(?:ame|um)|prtlen|size|type)|ree_result)|get_(?:notify|pid|result)|host|insert|l(?:ast_(?:error|notice|oid)|o_(?:c(?:lose|reate)|export|import|open|read(?:_all|)|seek|tell|unlink|write))|meta_data|num_(?:fields|rows)|options|p(?:arameter_status|connect|ing|ort|ut_line)|query|result_(?:error|s(?:eek|tatus))|se(?:lect|nd_query|t_client_encoding)|t(?:race|ty)|u(?:n(?:escape_bytea|trace)|pdate)|version)|hp(?:_(?:check_syntax|ini_scanned_files|logo_guid|register_url_stream_wrapper|s(?:api_name|tr(?:eam_(?:c(?:a(?:n_cast|st)|lose(?:dir|)|opy_to_(?:mem|stream))|eof|f(?:ilter_(?:register_factory|unregister_factory)|lush|open_(?:from_file|t(?:emporary_file|mpfile)))|get(?:c|s)|is(?:_persistent|)|make_seekable|open(?:_wrapper(?:_(?:as_file|ex)|)|dir)|passthru|re(?:ad(?:dir|)|winddir)|s(?:eek|ock_open_(?:from_socket|host|unix)|tat(?:_path|))|tell|write)|ip_whitespace))|un(?:ame|register_url_stream_wrapper))|credits|info|version)|i|ng2wbmp|o(?:pen|s(?:ix_(?:ctermid|get(?:_last_error|cwd|e(?:gid|uid)|g(?:id|r(?:gid|nam|oups))|login|p(?:g(?:id|rp)|id|pid|w(?:nam|uid))|rlimit|sid|uid)|isatty|kill|mkfifo|s(?:et(?:e(?:gid|uid)|gid|pgid|sid|uid)|trerror)|t(?:imes|tyname)|uname)|)|w)|r(?:e(?:g_(?:grep|match(?:_all|)|quote|replace(?:_callback|)|split)|v)|int(?:_r|er_(?:abort|c(?:lose|reate_(?:brush|dc|font|pen))|d(?:elete_(?:brush|dc|font|pen)|raw_(?:bmp|chord|elipse|line|pie|r(?:ectangle|oundrect)|text))|end_(?:doc|page)|get_option|l(?:ist|ogical_fontheight)|open|s(?:e(?:lect_(?:brush|font|pen)|t_option)|tart_(?:doc|page))|write)|f)|oc_(?:close|get_status|nice|open|terminate))|spell_(?:add_to_(?:personal|session)|c(?:heck|lear_session|onfig_(?:create|d(?:ata_dir|ict_dir)|ignore|mode|personal|r(?:epl|untogether)|save_repl))|new(?:_(?:config|personal)|)|s(?:ave_wordlist|tore_replacement|uggest))|utenv)|q(?:dom_(?:error|tree)|uote(?:d_printable_decode|meta))|r(?:a(?:d2deg|n(?:d|ge)|r_(?:close|entry_get|list|open)|wurl(?:decode|encode))|e(?:a(?:d(?:_exif_data|dir|file|gzfile|lin(?:e(?:_(?:add_history|c(?:allback_(?:handler_(?:install|remove)|read_char)|lear_history|ompletion_function)|info|list_history|on_new_line|re(?:ad_history|display)|write_history)|)|k))|lpath)|code(?:_(?:file|string)|)|gister_(?:shutdown_function|tick_function)|name(?:_function|)|s(?:et|tore_(?:e(?:rror_handler|xception_handler)|include_path))|wind(?:dir|))|mdir|ound|sort|trim)|s(?:candir|e(?:m_(?:acquire|get|re(?:lease|move))|rialize|s(?:am_(?:affected_rows|co(?:mmit|nnect)|di(?:agnostic|sconnect)|e(?:rrormsg|xecimm)|f(?:etch_(?:array|r(?:esult|ow))|ield_(?:array|name)|ree_result)|num_fields|query|rollback|se(?:ek_row|ttransaction))|sion_(?:c(?:ache_(?:expire|limiter)|ommit)|de(?:code|stroy)|encode|get_cookie_params|i(?:d|s_registered)|module_name|name|reg(?:enerate_id|ister)|s(?:ave_path|et_(?:cookie_params|save_handler)|tart)|un(?:register|set)|write_close))|t(?:_(?:e(?:rror_handler|xception_handler)|file_buffer|include_path|magic_quotes_runtime|time_limit)|cookie|locale|rawcookie|type))|h(?:a1(?:_file|)|ell_exec|m(?:_(?:attach|detach|get_var|put_var|remove(?:_var|))|op_(?:close|delete|open|read|size|write))|ow_source|uffle)|i(?:m(?:ilar_text|plexml_(?:import_dom|load_(?:file|string)))|n(?:h|)|zeof)|leep|nmp(?:_(?:get_(?:quick_print|valueretrieval)|read_mib|set_(?:enum_print|oid_numeric_print|quick_print|valueretrieval))|get(?:next|)|realwalk|set|walk(?:oid|))|o(?:cket_(?:accept|bind|c(?:l(?:ear_error|ose)|onnect|reate(?:_(?:listen|pair)|))|get(?:_(?:option|status)|peername|sockname)|l(?:ast_error|isten)|re(?:ad|cv(?:from|))|s(?:e(?:lect|nd(?:to|)|t_(?:block(?:ing|)|nonblock|option|timeout))|hutdown|trerror)|write)|rt|undex)|p(?:l(?:_classes|it(?:i|))|rintf)|q(?:l(?:_regcase|ite_(?:array_query|busy_timeout|c(?:hanges|lose|olumn|reate_(?:aggregate|function)|urrent)|e(?:rror_string|scape_string|xec)|f(?:actory|etch_(?:a(?:ll|rray)|column_types|object|s(?:ingle|tring))|ield_name)|has_(?:more|prev)|l(?:ast_(?:error|insert_rowid)|ib(?:encoding|version))|n(?:ext|um_(?:fields|rows))|open|p(?:open|rev)|query|rewind|s(?:eek|ingle_query)|u(?:df_(?:decode_binary|encode_binary)|nbuffered_query)))|rt)|rand|s(?:canf|h2_(?:auth_(?:none|p(?:assword|ubkey_file))|connect|exec|f(?:etch_stream|ingerprint)|methods_negotiated|s(?:cp_(?:recv|send)|ftp(?:_(?:lstat|mkdir|r(?:e(?:a(?:dlink|lpath)|name)|mdir)|s(?:tat|ymlink)|unlink)|)|hell)|tunnel))|t(?:at|r(?:_(?:ireplace|pad|r(?:ep(?:eat|lace)|ot13)|s(?:huffle|plit)|word_count)|c(?:asecmp|hr|mp|oll|spn)|eam_(?:co(?:ntext_(?:create|get_(?:default|options)|set_(?:option|params))|py_to_stream)|filter_(?:append|prepend|re(?:gister|move))|get_(?:contents|filters|line|meta_data|transports|wrappers)|register_wrapper|s(?:e(?:lect|t_(?:blocking|timeout|write_buffer))|ocket_(?:accept|client|enable_crypto|get_name|pair|recvfrom|se(?:ndto|rver)))|wrapper_(?:re(?:gister|store)|unregister))|ftime|i(?:p(?:_tags|cslashes|os|slashes)|str)|len|n(?:atc(?:asecmp|mp)|c(?:asecmp|mp))|p(?:brk|os|time)|r(?:chr|ev|ipos|pos)|s(?:pn|tr)|t(?:o(?:k|lower|time|upper)|r)|val))|ubstr(?:_(?:co(?:mpare|unt)|replace)|)|wf(?:_(?:a(?:ction(?:g(?:eturl|oto(?:frame|label))|nextframe|p(?:lay|revframe)|s(?:ettarget|top)|togglequality|waitforframe)|dd(?:buttonrecord|color))|closefile|define(?:bitmap|font|line|poly|rect|text)|end(?:button|doaction|s(?:hape|ymbol))|font(?:s(?:ize|lant)|tracking)|get(?:bitmapinfo|f(?:ontinfo|rame))|l(?:abelframe|ookat)|m(?:odifyobject|ulcolor)|nextid|o(?:ncondition|penfile|rtho(?:2|))|p(?:erspective|laceobject|o(?:larview|pmatrix|sround)|ushmatrix)|r(?:emoveobject|otate)|s(?:cale|etf(?:ont|rame)|h(?:ape(?:arc|curveto(?:3|)|fill(?:bitmap(?:clip|tile)|off|solid)|line(?:solid|to)|moveto)|owframe)|tart(?:button|doaction|s(?:hape|ymbol)))|t(?:extwidth|ranslate)|viewport)|action|b(?:itmap|utton(?:_keypress|))|displayitem|f(?:ill|ont)|gradient|mo(?:rph|vie)|s(?:hape|prite)|text(?:field|))|y(?:base_(?:affected_rows|c(?:lose|onnect)|d(?:ata_seek|eadlock_retry_count)|f(?:etch_(?:a(?:rray|ssoc)|field|object|row)|ield_seek|ree_result)|get_last_message|min_(?:client_severity|error_severity|message_severity|server_severity)|num_(?:fields|rows)|pconnect|query|result|se(?:lect_db|t_message_handler)|unbuffered_query)|mlink|s(?:log|tem)))|t(?:an(?:h|)|cpwrap_check|e(?:mpnam|xtdomain)|i(?:dy_(?:access_count|c(?:lean_repair|onfig_count)|diagnose|error_count|get(?:_(?:body|config|error_buffer|h(?:ead|tml(?:_ver|))|output|r(?:elease|oot)|status)|opt)|is_x(?:html|ml)|load_config|parse_(?:file|string)|re(?:pair_(?:file|string)|set_config)|s(?:ave_config|et(?:_encoding|opt))|warning_count)|me(?:_nanosleep|))|mpfile|o(?:ken_(?:get_all|name)|uch)|ri(?:gger_error|m))|u(?:asort|c(?:first|words)|dm_(?:a(?:dd_search_limit|lloc_agent(?:_array|)|pi_version)|c(?:at_(?:list|path)|heck_(?:charset|stored)|l(?:ear_search_limits|ose_stored)|rc32)|err(?:no|or)|f(?:ind|ree_(?:agent|ispell_data|res))|get_(?:doc_count|res_(?:field|param))|hash32|load_ispell_data|open_stored|set_agent_param)|ksort|mask|n(?:i(?:qid|xtojd)|link|pack|register_tick_function|serialize)|rl(?:decode|encode)|s(?:er_error|leep|ort)|tf8_(?:decode|encode))|v(?:ar(?:_(?:dump|export)|iant(?:_(?:a(?:bs|dd|nd)|c(?:a(?:st|t)|mp)|d(?:ate_(?:from_timestamp|to_timestamp)|iv)|eqv|fix|get_type|i(?:div|mp|nt)|m(?:od|ul)|n(?:eg|ot)|or|pow|round|s(?:et(?:_type|)|ub)|xor)|))|ersion_compare|fprintf|irtual|p(?:opmail_(?:a(?:dd_(?:alias_domain(?:_ex|)|domain(?:_ex|)|user)|lias_(?:add|del(?:_domain|)|get(?:_all|))|uth_user)|del_(?:domain(?:_ex|)|user)|error|passwd|set_user_quota)|rintf)|sprintf)|w(?:32api_(?:deftype|in(?:it_dtype|voke_function)|register_function|set_call_method)|ddx_(?:add_vars|deserialize|packet_(?:end|start)|serialize_va(?:lue|rs))|ordwrap)|x(?:attr_(?:get|list|remove|s(?:et|upported))|diff_(?:file_(?:diff(?:_binary|)|merge3|patch(?:_binary|))|string_(?:diff(?:_binary|)|merge3|patch(?:_binary|)))|ml(?:_(?:error_string|get_(?:current_(?:byte_index|column_number|line_number)|error_code)|parse(?:_into_struct|r_(?:create(?:_ns|)|free|get_option|set_option)|)|set_(?:character_data_handler|default_handler|e(?:lement_handler|nd_namespace_decl_handler|xternal_entity_ref_handler)|notation_decl_handler|object|processing_instruction_handler|start_namespace_decl_handler|unparsed_entity_decl_handler))|rpc_(?:decode(?:_request|)|encode(?:_request|)|get_type|is_fault|parse_method_descriptions|se(?:rver_(?:add_introspection_data|c(?:all_method|reate)|destroy|register_(?:introspection_callback|method))|t_type)))|p(?:ath_(?:eval(?:_expression|)|new_context)|tr_(?:eval|new_context))|sl(?:_xsltprocessor_(?:get_parameter|has_exslt_support|import_stylesheet|re(?:gister_php_functions|move_parameter)|set_parameter|transform_to_(?:doc|uri|xml))|t_(?:backend_(?:info|name|version)|create|err(?:no|or)|free|getopt|process|set(?:_(?:base|e(?:ncoding|rror_handler)|log|object|s(?:ax_handler(?:s|)|cheme_handler(?:s|)))|opt))))|y(?:az_(?:addinfo|c(?:cl_(?:conf|parse)|lose|onnect)|database|e(?:lement|rr(?:no|or)|s_result)|get_option|hits|itemorder|present|r(?:ange|ecord)|s(?:c(?:an(?:_result|)|hema)|e(?:arch|t_option)|ort|yntax)|wait)|p_(?:all|cat|err(?:_string|no)|first|get_default_domain|ma(?:ster|tch)|next|order))|z(?:end_(?:logo_guid|version)|ip_(?:close|entry_(?:c(?:lose|ompress(?:edsize|ionmethod))|filesize|name|open|read)|open|read)|lib_get_coding_type))\\b"
+ , _style: "color: #e17100;"
+ }
+ }
+}
diff --git a/s5runner/example/chili/php.js b/s5runner/example/chili/php.js
new file mode 100644
index 0000000..b257e9c
--- /dev/null
+++ b/s5runner/example/chili/php.js
@@ -0,0 +1,138 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+/* ----------------------------------------------------------------------------
+ * this recipe uses a little trick for highlighting php code
+ * 1: replace each php snippet with a placeholder
+ * 2: highlight html without php and php snippets apart
+ * 3: replace each placeholder with its highlighted php snippet
+ *
+ * the trick is not perfect only if the html without php is broken
+ * however, in such a case many highlighters get fooled but Chili does not
+ *
+ * ---
+ * this recipe has been adapted for working with Safari
+ * in fact, Safari cannot match more than 101236 characters with a lazy star
+ * --------------------------------------------------------------------------*/
+{
+ _name: "php"
+ , _case: true
+ , _main: {
+ all: {
+ _match: /[\w\W]*/
+ , _replace: function( all ) {
+ var placeholder = String.fromCharCode(0);
+ var blocks = [];
+ var that = this;
+ var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_1' ) );
+ return placeholder;
+ } );
+ var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_2' ) );
+ return placeholder;
+ } );
+ if( blocks.length ) {
+ var html = this.x( no_php_2, 'html' );
+ var count = 0;
+ return html.replace( new RegExp( placeholder, "g" ), function() {
+ return blocks[ count++ ];
+ } );
+ }
+ else {
+ return this.x( all, '/php' );
+ }
+ }
+ }
+ }
+ , block: {
+ php_1: { // --- <? +++ ?> ---
+ _match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
+ , _replace: function( all, open, content ) {
+ return "<span class='start'>" + this.x( open ) + "</span>"
+ + this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ , php_2: { // +++ ?> --- <? +++
+ _match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
+ , _replace: function( all, content, open2, content2 ) {
+ if( open2 ) {
+ return "<span class='start'>" + this.x( open2 ) + "</span>"
+ + this.x( content2, '/php' );
+ }
+ else {
+ return this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ }
+ , php: {
+ mlcom: {
+ _match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
+ , _style: "color: gray;"
+ }
+ , com: {
+ _match: /(?:\/\/.*)|(?:[^\\]\#.*)/
+ , _style: "color: green;"
+ }
+ , string1: {
+ _match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
+ , _style: "color: purple;"
+ }
+ , string2: {
+ _match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
+ , _style: "color: fuchsia;"
+ }
+ , value: {
+ _match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
+ , _style: "color: gray; font-weight: bold;"
+ }
+ , number: {
+ _match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , const1: {
+ _match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
+ , _style: "color: red;"
+ }
+ , const2: {
+ _match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
+ , _style: "color: red;"
+ }
+ , global: {
+ _match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ , variable: {
+ _match: /\$(\w+)/
+ , _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
+ , _style: "color: #4040c2;"
+ }
+ , heredoc: {
+ _match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
+ , _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
+ }
+ }
+} \ No newline at end of file
diff --git a/s5runner/example/chili/recipes.js b/s5runner/example/chili/recipes.js
new file mode 100644
index 0000000..ce6296c
--- /dev/null
+++ b/s5runner/example/chili/recipes.js
@@ -0,0 +1,364 @@
+/*
+===============================================================================
+Chili is the jQuery code highlighter plugin
+...............................................................................
+LICENSE: http://www.opensource.org/licenses/mit-license.php
+WEBSITE: http://noteslog.com/chili/
+
+ Copyright 2008 / Andrea Ercolino
+===============================================================================
+*/
+
+ChiliBook.recipeLoading = false;
+
+
+
+ChiliBook.recipes[ "php.js" ] =
+/* ----------------------------------------------------------------------------
+ * this recipe uses a little trick for highlighting php code
+ * 1: replace each php snippet with a placeholder
+ * 2: highlight html without php and php snippets apart
+ * 3: replace each placeholder with its highlighted php snippet
+ *
+ * the trick is not perfect only if the html without php is broken
+ * however, in such a case many highlighters get fooled but Chili does not
+ *
+ * ---
+ * this recipe has been adapted for working with Safari
+ * in fact, Safari cannot match more than 101236 characters with a lazy star
+ * --------------------------------------------------------------------------*/
+{
+ _name: "php"
+ , _case: true
+ , _main: {
+ all: {
+ _match: /[\w\W]*/
+ , _replace: function( all ) {
+ var placeholder = String.fromCharCode(0);
+ var blocks = [];
+ var that = this;
+ var no_php_1 = all.replace( /<\?[^?]*\?+(?:[^>][^?]*\?+)*>/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_1' ) );
+ return placeholder;
+ } );
+ var no_php_2 = no_php_1.replace( /^[^?]*\?+(?:[^>][^?]*\?+)*>|<\?[\w\W]*$/g, function( block ) {
+ blocks.push( that.x( block, '/block/php_2' ) );
+ return placeholder;
+ } );
+ if( blocks.length ) {
+ var html = this.x( no_php_2, 'html' );
+ var count = 0;
+ return html.replace( new RegExp( placeholder, "g" ), function() {
+ return blocks[ count++ ];
+ } );
+ }
+ else {
+ return this.x( all, '/php' );
+ }
+ }
+ }
+ }
+ , block: {
+ php_1: { // --- <? +++ ?> ---
+ _match: /(<\?(?:php\b)?)([^?]*\?+(?:[^>][^?]*\?+)*>)/
+ , _replace: function( all, open, content ) {
+ return "<span class='start'>" + this.x( open ) + "</span>"
+ + this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ , php_2: { // +++ ?> --- <? +++
+ _match: /([^?]*\?+(?:[^>][^?]*\?+)*>)|(<\?(?:php\b)?)([\w\W]*)/
+ , _replace: function( all, content, open2, content2 ) {
+ if( open2 ) {
+ return "<span class='start'>" + this.x( open2 ) + "</span>"
+ + this.x( content2, '/php' );
+ }
+ else {
+ return this.x( content.replace( /\?>$/, '' ), '/php' )
+ + "<span class='end'>" + this.x( '?>' ) + "</span>";
+ }
+ }
+ , _style: {
+ start: "color: red; font-weight: bold"
+ , end: "color: red;"
+ }
+ }
+ }
+ , php: {
+ mlcom: {
+ _match: /\/\*[^*]*\*+([^\/][^*]*\*+)*\//
+ , _style: "color: gray;"
+ }
+ , com: {
+ _match: /(?:\/\/.*)|(?:[^\\]\#.*)/
+ , _style: "color: green;"
+ }
+ , string1: {
+ _match: /\'[^\'\\]*(?:\\.[^\'\\]*)*\'/
+ , _style: "color: purple;"
+ }
+ , string2: {
+ _match: /\"[^\"\\]*(?:\\.[^\"\\]*)*\"/
+ , _style: "color: fuchsia;"
+ }
+ , value: {
+ _match: /\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/
+ , _style: "color: gray; font-weight: bold;"
+ }
+ , number: {
+ _match: /\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/
+ , _style: "color: red;"
+ }
+ , const1: {
+ _match: /\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/
+ , _style: "color: red;"
+ }
+ , const2: {
+ _match: /\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/
+ , _style: "color: red;"
+ }
+ , global: {
+ _match: /(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/
+ , _style: "color: red;"
+ }
+ , keyword: {
+ _match: /\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/
+ , _style: "color: navy; font-weight: bold;"
+ }
+ , variable: {
+ _match: /\$(\w+)/
+ , _replace: '<span class="keyword">$</span><span class="variable">$1</span>'
+ , _style: "color: #4040c2;"
+ }
+ , heredoc: {
+ _match: /(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/
+ , _replace: '<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'
+ }
+ }
+}
+
+
+
+ChiliBook.recipes[ "html.js" ] =
+{
+ _name: 'html'
+ , _case: false
+ , _main: {
+ doctype: {
+ _match: /<!DOCTYPE\b[\w\W]*?>/
+ , _style: "color: #CC6600;"
+ }
+ , ie_style: {
+ _match: /(<!--\[[^\]]*\]>)([\w\W]*?)(<!\[[^\]]*\]-->)/
+ , _replace: function( all, open, content, close ) {
+ return "<span class='ie_style'>" + this.x( open ) + "</span>"
+ + this.x( content, '//style' )
+ + "<span class='ie_style'>" + this.x( close ) + "</span>";
+ }
+ , _style: "color: DarkSlateGray; font-weight: bold;"
+ }
+ , comment: {
+ _match: /<!--[\w\W]*?-->/
+ , _style: "color: #4040c2;"
+ }
+ , script: {
+ _match: /(<script\s+[^>]*>)([\w\W]*?)(<\/script\s*>)/
+ , _replace: function( all, open, content, close ) {
+ return this.x( open, '//tag_start' )
+ + this.x( content, 'js' )
+ + this.x( close, '//tag_end' );
+ }
+ }
+ , style: {
+ _match: /(<style\s+[^>]*>)([\w\W]*?)(<\/style\s*>)/
+ , _replace: function( all, open, content, close ) {
+ return this.x( open, '//tag_start' )
+ + this.x( content, 'css' )
+ + this.x( close, '//tag_end' );
+ }
+ }
+ // matches a starting tag of an element (with attrs)
+ // like "<div ... >" or "<img ... />"
+ , tag_start: {
+ _match: /(<\w+)((?:[?%]>|[\w\W])*?)(\/>|>)/
+ , _replace: function( all, open, content, close ) {
+ return "<span class='tag_start'>" + this.x( open ) + "</span>"
+ + this.x( content, '/tag_attrs' )
+ + "<span class='tag_start'>" + this.x( close ) + "</span>";
+ }
+ , _style: "color: navy; font-weight: bold;"
+ }
+ // matches an ending tag
+ // like "</div>"
+ , tag_end: {
+ _match: /<\/\w+\s*>|\/>/
+ , _style: "color: navy;"
+ }
+ , entity: {
+ _match: /&\w+?;/
+ , _style: "color: blue;"
+ }
+ }
+ , tag_attrs: {
+ // matches a name/value pair
+ attr: {
+ // before in $1, name in $2, between in $3, value in $4
+ _match: /(\W*?)([\w-]+)(\s*=\s*)((?:\'[^\']*(?:\\.[^\']*)*\')|(?:\"[^\"]*(?:\\.[^\"]*)*\"))/
+ , _replace: "$1<span class='attr_name'>$2</span>$3<span class='attr_value'>$4</span>"
+ , _style: { attr_name: "color: green;", attr_value: "color: maroon;" }
+ }
+ }
+};
+
+
+
+ChiliBook.recipes[ "js.js" ] =
+{
+ _name: 'js'
+ , _case: true
+ , _main: {
+ ml_comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: 'color: gray;'
+ }
+ , sl_comment: {
+ _match: /\/\/.*/
+ , _style: 'color: green;'
+ }
+ , string: {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: 'color: teal;'
+ }
+ , num: {
+ _match: /\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/
+ , _style: 'color: red;'
+ }
+ , reg_not: { //this prevents "a / b / c" to be interpreted as a reg_exp
+ _match: /(?:\w+\s*)\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*(?:\s*\w+)/
+ , _replace: function( all ) {
+ return this.x( all, '//num' );
+ }
+ }
+ , reg_exp: {
+ _match: /\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/
+ , _style: 'color: maroon;'
+ }
+ , brace: {
+ _match: /[\{\}]/
+ , _style: 'color: red; font-weight: bold;'
+ }
+ , statement: {
+ _match: /\b(with|while|var|try|throw|switch|return|if|for|finally|else|do|default|continue|const|catch|case|break)\b/
+ , _style: 'color: navy; font-weight: bold;'
+ }
+ , error: {
+ _match: /\b(URIError|TypeError|SyntaxError|ReferenceError|RangeError|EvalError|Error)\b/
+ , _style: 'color: Coral;'
+ }
+ , object: {
+ _match: /\b(String|RegExp|Object|Number|Math|Function|Date|Boolean|Array)\b/
+ , _style: 'color: DeepPink;'
+ }
+ , property: {
+ _match: /\b(undefined|arguments|NaN|Infinity)\b/
+ , _style: 'color: Purple; font-weight: bold;'
+ }
+ , 'function': {
+ _match: /\b(parseInt|parseFloat|isNaN|isFinite|eval|encodeURIComponent|encodeURI|decodeURIComponent|decodeURI)\b/
+ , _style: 'color: olive;'
+ }
+ , operator: {
+ _match: /\b(void|typeof|this|new|instanceof|in|function|delete)\b/
+ , _style: 'color: RoyalBlue; font-weight: bold;'
+ }
+ , liveconnect: {
+ _match: /\b(sun|netscape|java|Packages|JavaPackage|JavaObject|JavaClass|JavaArray|JSObject|JSException)\b/
+ , _style: 'text-decoration: overline;'
+ }
+ }
+};
+
+
+
+ChiliBook.recipes[ "css.js" ] =
+{
+ _name: 'css'
+ , _case: true
+ , _main: {
+ comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ , _style: "color: olive;"
+ }
+ , directive: {
+ _match: /@\w+/
+ , _style: "color: fuchsia;"
+ }
+ , url: {
+ _match: /\b(url\s*\()([^)]+)(\))/
+ , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
+ , _style: "color: fuchsia;"
+ }
+ , block: {
+ _match: /\{([\w\W]*?)\}/
+ , _replace: function( all, pairs ) {
+ return '{' + this.x( pairs, '/definition' ) + '}';
+ }
+ }
+ , 'class': {
+ _match: /\.\w+/
+ , _style: "color: #CC0066; font-weight: bold;"
+ }
+ , id: {
+ _match: /#\w+/
+ , _style: "color: IndianRed; font-weight: bold;"
+ }
+ , pseudo: {
+ _match: /:\w+/
+ , _style: "color: #CC9900;"
+ }
+ , element: {
+ _match: /\w+/
+ , _style: "color: Purple; font-weight: bold;"
+ }
+ }
+ , definition: {
+ comment: {
+ _match: /\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//
+ }
+ , property: {
+ _match: /\b(?:zoom|z-index|writing-mode|word-wrap|word-spacing|word-break|width|widows|white-space|volume|voice-family|visibility|vertical-align|unicode-bidi|top|text-underline-position|text-transform|text-shadow|text-overflow|text-kashida-space|text-justify|text-indent|text-decoration|text-autospace|text-align-last|text-align|table-layout|stress|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|size|scrollbar-track-color|scrollbar-shadow-color|scrollbar-highlight-color|scrollbar-face-color|scrollbar-dark-shadow-color|scrollbar-base-color|scrollbar-arrow-color|scrollbar-3d-light-color|ruby-position|ruby-overhang|ruby-align|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-Y|overflow-X|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|line-break|letter-spacing|left|layout-grid-type|layout-grid-mode|layout-grid-line|layout-grid-char-spacing|layout-grid-char|layout-grid|layout-flow|layer-background-image|layer-background-color|include-source|ime-mode|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|filter|empty-cells|elevation|display|direction|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|caption-side|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|behavior|background-repeat|background-position-y|background-position-x|background-position|background-image|background-color|background-attachment|background|azimuth|accelerator)\s*:/
+ , _style: "color: #330066;"
+ }
+ , special: {
+ _match: /\b(?:-use-link-source|-set-link-source|-replace|-moz-user-select|-moz-user-modify|-moz-user-input|-moz-user-focus|-moz-outline-width|-moz-outline-style|-moz-outline-color|-moz-outline|-moz-opacity|-moz-border-top-colors|-moz-border-right-colors|-moz-border-radius-topright|-moz-border-radius-topleft|-moz-border-radius-bottomright|-moz-border-radius-bottomleft|-moz-border-radius|-moz-border-left-colors|-moz-border-bottom-colors|-moz-binding)\s*:/
+ , _style: "color: #330066; text-decoration: underline;"
+ }
+ , url: {
+ _match: /\b(url\s*\()([^)]+)(\))/
+ , _replace: "<span class='url'>$1</span>$2<span class='url'>$3</span>"
+ }
+ , value: {
+ _match: /\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/
+ , _style: "color: #3366FF;"
+ }
+ , string: {
+ _match: /(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/
+ , _style: "color: teal;"
+ }
+ , number: {
+ _match: /(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/
+ , _style: "color: red;"
+ }
+ , color : {
+ _match: /(?:\#[a-fA-F0-9]{3,6})|\b(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua|YellowGreen|Yellow|WhiteSmoke|White|Wheat|Violet|Turquoise|Tomato|Thistle|Teal|Tan|SteelBlue|SpringGreen|Snow|SlateGrey|SlateGray|SlateBlue|SkyBlue|Silver|Sienna|SeaShell|SeaGreen|SandyBrown|Salmon|SaddleBrown|RoyalBlue|RosyBrown|Red|Purple|PowderBlue|Plum|Pink|Peru|PeachPuff|PapayaWhip|PaleVioletRed|PaleTurquoise|PaleGreen|PaleGoldenRod|Orchid|OrangeRed|Orange|OliveDrab|Olive|OldLace|Navy|NavajoWhite|Moccasin|MistyRose|MintCream|MidnightBlue|MediumVioletRed|MediumTurquoise|MediumSpringGreen|MediumSlateBlue|MediumSeaGreen|MediumPurple|MediumOrchid|MediumBlue|MediumAquaMarine|Maroon|Magenta|Linen|LimeGreen|Lime|LightYellow|LightSteelBlue|LightSlateGrey|LightSlateGray|LightSkyBlue|LightSeaGreen|LightSalmon|LightPink|LightGrey|LightGreen|LightGray|LightGoldenRodYellow|LightCyan|LightCoral|LightBlue|LemonChiffon|LawnGreen|LavenderBlush|Lavender|Khaki|Ivory|Indigo|IndianRed|HotPink|HoneyDew|Grey|GreenYellow|Green|Gray|GoldenRod|Gold|GhostWhite|Gainsboro|Fuchsia|ForestGreen|FloralWhite|FireBrick|DodgerBlue|DimGrey|DimGray|DeepSkyBlue|DeepPink|Darkorange|DarkViolet|DarkTurquoise|DarkSlateGrey|DarkSlateGray|DarkSlateBlue|DarkSeaGreen|DarkSalmon|DarkRed|DarkOrchid|DarkOliveGreen|DarkMagenta|DarkKhaki|DarkGrey|DarkGreen|DarkGray|DarkGoldenRod|DarkCyan|DarkBlue|Cyan|Crimson|Cornsilk|CornflowerBlue|Coral|Chocolate|Chartreuse|CadetBlue|BurlyWood|Brown|BlueViolet|Blue|BlanchedAlmond|Black|Bisque|Beige|Azure|Aquamarine|Aqua|AntiqueWhite|AliceBlue)\b/
+ , _style: "color: green;"
+ }
+ }
+};
+
+
diff --git a/s5runner/example/digiflip_x11.png b/s5runner/example/digiflip_x11.png
new file mode 100644
index 0000000..ba1f8d3
--- /dev/null
+++ b/s5runner/example/digiflip_x11.png
Binary files differ
diff --git a/s5runner/example/slides.html b/s5runner/example/slides.html
new file mode 100644
index 0000000..fcd8b71
--- /dev/null
+++ b/s5runner/example/slides.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Presentation with S5</title>
+<meta name="defaultView" content="slideshow" />
+<meta name="controlVis" content="hidden" />
+<link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
+<link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
+<link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
+<link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
+
+<script src="ui/default/slides.js" type="text/javascript"></script>
+
+<script type="text/javascript" src="chili/jquery.min.js"></script>
+<script type="text/javaScript" src="chili/jquery.chili-2.2.js"></script>
+<script type="text/javascript">ChiliBook.recipeFolder = "chili/";</script>
+
+</head>
+<body>
+
+<div class="layout">
+<div id="controls"><!-- DO NOT EDIT --></div>
+<div id="currentSlide"><!-- DO NOT EDIT --></div>
+<div id="darkblue"></div><div id="lightblue"></div>
+<div id="header"></div>
+<div id="footer">
+
+<h1>Qt Labs Graphics Dojo</h1>
+<h2>Presentation with S5</h2>
+</div>
+
+</div>
+
+
+<div class="presentation">
+
+ <div class="slide">
+ <h1>Presentation with S5</h1>
+ <h3>Ariya Hidayat</h3>
+ <h4>Qt Labs, Graphics Dojo</h4>
+ <p style="margin-top: 40px">
+ </div>
+
+ <div class="slide">
+ <h1>What is S5?</h1>
+ <ul class="incremental">
+ <li>S5: A Simple Standards-Based Slide Show System</li>
+ <li>Created by Eric Meyer</li>
+ <li>Works in modern web browsers</li>
+ </ul>
+ </div>
+
+ <div class="slide">
+ <h1>s5runner</h1>
+ <ul class="incremental">
+ <li>using QtWebKit to run the slides</li>
+ <li>adding a few more extra features</li>
+ </ul>
+ </div>
+
+ <div class="slide">
+ <h1>Slide Navigation</h1>
+ <p>Press left arrow to go back.</p>
+ <p>Press right arrow to go forward.</p>
+ </div>
+
+ <div class="slide">
+ <h1>Countdown Timer</h1>
+ <p class="incremental">Look at the bottom right corner!</p>
+ </div>
+
+ <div class="slide">
+ <h1>Bullet List with Effects</h1>
+ <ul class="incremental">
+ <li>A subtitle</li>
+ <ul>
+ <li>moving from one</li>
+ <li>to another</li>
+ <li>and so on</li>
+ </ul>
+ <li>Another subtitle</li>
+ <ul>
+ <li>eins</li>
+ <li>zwei</li>
+ <li>drei</li>
+ </ul>
+ </ul>
+ </div>
+
+ <div class="slide">
+ <h1>Inline Image</h1>
+ <img src="digiflip_x11.png">
+ <p class="incremental">Afterall, this is just HTML.</p>
+ </div>
+
+ <div class="slide">
+ <h1>In-place Editing</h1>
+ <p class="incremental">F3 to start editing, Esc to resume.</p>
+ <p class="incremental">The quick brown fox jumps over the lazy dog.</p>
+ </div>
+
+ <div class="slide">
+ <h1>Blank the Screen</h1>
+ <p class="incremental">Press B for black</p>
+ <p class="incremental">Press W for white</p>
+ </div>
+
+ <div class="slide">
+ <h1>Full-screen Mode</h1>
+ <p class="incremental">Press F to toggle full-screen mode.</p>
+ </div>
+
+ <div class="slide">
+ <h1>Night-mode</h1>
+ <p class="incremental">Press N to toggle night-mode.</p>
+ </div>
+
+ <div class="slide">
+ <h1>Source Code</h1>
+ <p>Using Chili for syntax highlighting.</p>
+ <pre style="border: 1px solid gray"><code class="cplusplus">
+ #include &lt;iostream&gt;
+
+ int main(int argc, char **argv)
+ {
+ std::cout &lt;&lt; &quot;Hello, S5&quot;;
+ return 0;
+ }
+ </code></pre>
+ </div>
+
+
+ <div class="slide">
+ <h1 class="appear"> </h1>
+ <p style="padding-top: 100px;"><b>That's all, folks!</b></p>
+ </div>
+
+
+</div>
+
+</body>
+</html>
diff --git a/s5runner/example/ui/default/framing.css b/s5runner/example/ui/default/framing.css
new file mode 100644
index 0000000..14d8509
--- /dev/null
+++ b/s5runner/example/ui/default/framing.css
@@ -0,0 +1,23 @@
+/* The following styles size, place, and layer the slide components.
+ Edit these if you want to change the overall slide layout.
+ The commented lines can be uncommented (and modified, if necessary)
+ to help you with the rearrangement process. */
+
+/* target = 1024x768 */
+
+div#header, div#footer, .slide {width: 100%; top: 0; left: 0;}
+div#header {top: 0; height: 3em; z-index: 1;}
+div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
+.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
+div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
+div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
+ margin: 0;}
+#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
+html>body #currentSlide {position: fixed;}
+
+/*
+div#header {background: #FCC;}
+div#footer {background: #CCF;}
+div#controls {background: #BBD;}
+div#currentSlide {background: #FFC;}
+*/
diff --git a/s5runner/example/ui/default/opera.css b/s5runner/example/ui/default/opera.css
new file mode 100644
index 0000000..9e9d2a3
--- /dev/null
+++ b/s5runner/example/ui/default/opera.css
@@ -0,0 +1,7 @@
+/* DO NOT CHANGE THESE unless you really want to break Opera Show */
+.slide {
+ visibility: visible !important;
+ position: static !important;
+ page-break-before: always;
+}
+#slide0 {page-break-before: avoid;}
diff --git a/s5runner/example/ui/default/outline.css b/s5runner/example/ui/default/outline.css
new file mode 100644
index 0000000..62db519
--- /dev/null
+++ b/s5runner/example/ui/default/outline.css
@@ -0,0 +1,15 @@
+/* don't change this unless you want the layout stuff to show up in the outline view! */
+
+.layout div, #footer *, #controlForm * {display: none;}
+#footer, #controls, #controlForm, #navLinks, #toggle {
+ display: block; visibility: visible; margin: 0; padding: 0;}
+#toggle {float: right; padding: 0.5em;}
+html>body #toggle {position: fixed; top: 0; right: 0;}
+
+/* making the outline look pretty-ish */
+
+#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;}
+#slide0 h1 {padding-top: 1.5em;}
+.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em;
+ border-top: 1px solid #888; border-bottom: 1px solid #AAA;}
+#toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;}
diff --git a/s5runner/example/ui/default/pretty.css b/s5runner/example/ui/default/pretty.css
new file mode 100644
index 0000000..2d31f72
--- /dev/null
+++ b/s5runner/example/ui/default/pretty.css
@@ -0,0 +1,86 @@
+/* Following are the presentation styles -- edit away! */
+
+body {background: #FFF color: #000; font-size: 2em;}
+:link, :visited {text-decoration: none; color: #00C;}
+#controls :active {color: #88A !important;}
+#controls :focus {outline: 1px dotted #227;}
+h1, h2, h3, h4 {font-size: 100%; margin: 0; padding: 0; font-weight: inherit; background: transparent; }
+ul, pre {margin: 0; line-height: 1em;}
+html, body {margin: 0; padding: 0;}
+
+blockquote, q {font-style: italic;}
+blockquote {padding: 0 2em 0.5em; margin: 0 1.5em 0.5em; text-align: center; font-size: 1em;}
+blockquote p {margin: 0;}
+blockquote i {font-style: normal;}
+blockquote b {display: block; margin-top: 0.5em; font-weight: normal; font-size: smaller; font-style: normal;}
+blockquote b i {font-style: italic;}
+
+kbd {font-weight: bold; font-size: 1em;}
+sup {font-size: smaller; line-height: 1px;}
+
+.slide code {padding: 2px 0.25em; font-weight: bold; color: #533;}
+.slide code.bad, code del {color: red;}
+.slide code.old {color: silver;}
+.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 90%;}
+.slide pre code {display: block;}
+.slide ul {margin-top: 10px; margin-left: 5%; margin-right: 7%; list-style: disc;}
+.slide li {margin-top: 0.75em; margin-right: 0;}
+.slide ul ul {line-height: 1;}
+.slide ul ul li {margin: .2em; font-size: 85%; list-style: square;}
+.slide img.leader {display: block; margin: 0 auto;}
+
+div#header, div#footer {background-color: transparent; color: #FFF; font-family: Helvetica, Arial;}
+div#header {border: 0px; background: transparent 0px 2px no-repeat; line-height: 1px;}
+#darkblue { height: 50px; border: 0px; background-color: #006225;}
+#lightblue { height: 1px; border: 0px; background-color: #80c342;}
+div#footer {font-size: 0.5em; font-weight: bold; padding: 1em 0; height: 60px; background-color: #80c342; bottom repeat-x; border: 0;}
+#footer h1, #footer h2 {display: block; padding: 0 1em;}
+#footer h2 {font-style: italic;}
+
+div.long {font-size: 0.75em;}
+.slide h1 {position: absolute; top: 0em; left: 87px; z-index: 1;
+ margin: 0; padding: 0.3em 0 0 50px; white-space: nowrap;
+ font: bold 120%/1em Helvetica, sans-serif; text-transform: capitalize;
+ color: #FFF; background-color: transparent;}
+.slide h3 {font-size: 130%;}
+h1 abbr {font-variant: small-caps;}
+
+div#controls {position: absolute; left: 50%; bottom: 0;
+ width: 50%;
+ text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;}
+html>body div#controls {position: fixed; padding: 0 0 1em 0;
+ top: auto;}
+div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
+ margin: 0; padding: 0;}
+#controls #navLinks a {padding: 0; margin: 0 0.5em;
+ background: #005; border: none; color: #779;
+ cursor: pointer;}
+#controls #navList {height: 1em;}
+#controls #navList #jumplist {position: absolute; bottom: 0; right: 0; background: #418ADE; color: #227;}
+
+#currentSlide {position: absolute;bottom: 40px; text-align: center; font-size: 0.5em; color: #DFE7F3;}
+
+#slide0 {padding-top: 3.5em; font-size: 90%;}
+#slide0 h1 {position: static; margin: 1em 0 0; padding: 0;
+ font: bold 2em Helvetica, sans-serif; white-space: normal;
+ color: #000; background: transparent;}
+#slide0 h2 {font: bold italic 1em Helvetica, sans-serif; margin: 0.25em;}
+#slide0 h3 {margin-top: 1.5em; font-size: 1.5em; }
+#slide0 h4 {margin-top: 0; font-size: 1em; }
+
+ul.urls {list-style: none; display: inline; margin: 0;}
+.urls li {display: inline; margin: 0;}
+.note {display: none;}
+.external {border-bottom: 1px dotted gray;}
+html>body .external {border-bottom: none;}
+.external:after {content: " \274F"; font-size: smaller; color: #77B;}
+
+.incremental, .incremental *, .incremental *:after {color: #DDE; visibility: visible;}
+img.incremental {visibility: hidden;}
+.slide .current {color: #B02;}
+
+
+/* diagnostics
+
+li:after {content: " [" attr(class) "]"; color: #F88;}
+ */
diff --git a/s5runner/example/ui/default/print.css b/s5runner/example/ui/default/print.css
new file mode 100644
index 0000000..e7a71d1
--- /dev/null
+++ b/s5runner/example/ui/default/print.css
@@ -0,0 +1 @@
+/* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */ .slide, ul {page-break-inside: avoid; visibility: visible !important;} h1 {page-break-after: avoid;} body {font-size: 12pt; background: white;} * {color: black;} #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} #slide0 h3 {margin: 0; padding: 0;} #slide0 h4 {margin: 0 0 0.5em; padding: 0;} #slide0 {margin-bottom: 3em;} h1 {border-top: 2pt solid gray; border-bottom: 1px dotted silver;} .extra {background: transparent !important;} div.extra, pre.extra, .example {font-size: 10pt; color: #333;} ul.extra a {font-weight: bold;} p.example {display: none;} #header {display: none;} #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; font-style: italic;} #footer h2, #controls {display: none;} /* The following rule keeps the layout stuff out of print. Remove at your own risk! */ .layout, .layout * {display: none !important;} \ No newline at end of file
diff --git a/s5runner/example/ui/default/s5-core.css b/s5runner/example/ui/default/s5-core.css
new file mode 100644
index 0000000..86444e0
--- /dev/null
+++ b/s5runner/example/ui/default/s5-core.css
@@ -0,0 +1,9 @@
+/* Do not edit or override these styles! The system will likely break if you do. */
+
+div#header, div#footer, div#controls, .slide {position: absolute;}
+html>body div#header, html>body div#footer,
+ html>body div#controls, html>body .slide {position: fixed;}
+.handout {display: none;}
+.layout {display: block;}
+.slide, .hideme, .incremental {visibility: hidden;}
+#slide0 {visibility: visible;}
diff --git a/s5runner/example/ui/default/slides.css b/s5runner/example/ui/default/slides.css
new file mode 100644
index 0000000..0786d7d
--- /dev/null
+++ b/s5runner/example/ui/default/slides.css
@@ -0,0 +1,3 @@
+@import url(s5-core.css); /* required to make the slide show run at all */
+@import url(framing.css); /* sets basic placement and size of slide components */
+@import url(pretty.css); /* stuff that makes the slides look better than blah */ \ No newline at end of file
diff --git a/s5runner/example/ui/default/slides.js b/s5runner/example/ui/default/slides.js
new file mode 100644
index 0000000..8dc3f2e
--- /dev/null
+++ b/s5runner/example/ui/default/slides.js
@@ -0,0 +1,553 @@
+// S5 v1.1 slides.js -- released into the Public Domain
+//
+// Please see http://www.meyerweb.com/eric/tools/s5/credits.html for information
+// about all the wonderful and talented contributors to this code!
+
+var undef;
+var slideCSS = '';
+var snum = 0;
+var smax = 1;
+var incpos = 0;
+var number = undef;
+var s5mode = true;
+var defaultView = 'slideshow';
+var controlVis = 'visible';
+
+var isIE = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0;
+var isOp = navigator.userAgent.indexOf('Opera') > -1 ? 1 : 0;
+var isGe = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('Safari') < 1 ? 1 : 0;
+
+function hasClass(object, className) {
+ if (!object.className) return false;
+ return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1);
+}
+
+function hasValue(object, value) {
+ if (!object) return false;
+ return (object.search('(^|\\s)' + value + '(\\s|$)') != -1);
+}
+
+function removeClass(object,className) {
+ if (!object) return;
+ object.className = object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'), RegExp.$1+RegExp.$2);
+}
+
+function addClass(object,className) {
+ if (!object || hasClass(object, className)) return;
+ if (object.className) {
+ object.className += ' '+className;
+ } else {
+ object.className = className;
+ }
+}
+
+function GetElementsWithClassName(elementName,className) {
+ var allElements = document.getElementsByTagName(elementName);
+ var elemColl = new Array();
+ for (var i = 0; i< allElements.length; i++) {
+ if (hasClass(allElements[i], className)) {
+ elemColl[elemColl.length] = allElements[i];
+ }
+ }
+ return elemColl;
+}
+
+function isParentOrSelf(element, id) {
+ if (element == null || element.nodeName=='BODY') return false;
+ else if (element.id == id) return true;
+ else return isParentOrSelf(element.parentNode, id);
+}
+
+function nodeValue(node) {
+ var result = "";
+ if (node.nodeType == 1) {
+ var children = node.childNodes;
+ for (var i = 0; i < children.length; ++i) {
+ result += nodeValue(children[i]);
+ }
+ }
+ else if (node.nodeType == 3) {
+ result = node.nodeValue;
+ }
+ return(result);
+}
+
+function slideLabel() {
+ var slideColl = GetElementsWithClassName('*','slide');
+ var list = document.getElementById('jumplist');
+ smax = slideColl.length;
+ for (var n = 0; n < smax; n++) {
+ var obj = slideColl[n];
+
+ var did = 'slide' + n.toString();
+ obj.setAttribute('id',did);
+ if (isOp) continue;
+
+ var otext = '';
+ var menu = obj.firstChild;
+ if (!menu) continue; // to cope with empty slides
+ while (menu && menu.nodeType == 3) {
+ menu = menu.nextSibling;
+ }
+ if (!menu) continue; // to cope with slides with only text nodes
+
+ var menunodes = menu.childNodes;
+ for (var o = 0; o < menunodes.length; o++) {
+ otext += nodeValue(menunodes[o]);
+ }
+ list.options[list.length] = new Option(n + ' : ' + otext, n);
+ }
+}
+
+function currentSlide() {
+ var cs;
+ if (document.getElementById) {
+ cs = document.getElementById('currentSlide');
+ } else {
+ cs = document.currentSlide;
+ }
+ cs.innerHTML = '<span id="csHere">' + snum + '<\/span> ' +
+ '<span id="csSep">\/<\/span> ' +
+ '<span id="csTotal">' + (smax-1) + '<\/span>';
+ if (snum == 0) {
+ cs.style.visibility = 'hidden';
+ } else {
+ cs.style.visibility = 'visible';
+ }
+}
+
+function go(step) {
+ if (document.getElementById('slideProj').disabled || step == 0) return;
+ var jl = document.getElementById('jumplist');
+ var cid = 'slide' + snum;
+ var ce = document.getElementById(cid);
+ if (incrementals[snum].length > 0) {
+ for (var i = 0; i < incrementals[snum].length; i++) {
+ removeClass(incrementals[snum][i], 'current');
+ removeClass(incrementals[snum][i], 'incremental');
+ }
+ }
+ if (step != 'j') {
+ snum += step;
+ lmax = smax - 1;
+ if (snum > lmax) snum = lmax;
+ if (snum < 0) snum = 0;
+ } else
+ snum = parseInt(jl.value);
+ var nid = 'slide' + snum;
+ var ne = document.getElementById(nid);
+ if (!ne) {
+ ne = document.getElementById('slide0');
+ snum = 0;
+ }
+ if (step < 0) {incpos = incrementals[snum].length} else {incpos = 0;}
+ if (incrementals[snum].length > 0 && incpos == 0) {
+ for (var i = 0; i < incrementals[snum].length; i++) {
+ if (hasClass(incrementals[snum][i], 'current'))
+ incpos = i + 1;
+ else
+ addClass(incrementals[snum][i], 'incremental');
+ }
+ }
+ if (incrementals[snum].length > 0 && incpos > 0)
+ addClass(incrementals[snum][incpos - 1], 'current');
+ ce.style.visibility = 'hidden';
+ ne.style.visibility = 'visible';
+ jl.selectedIndex = snum;
+ currentSlide();
+ number = 0;
+}
+
+function goTo(target) {
+ if (target >= smax || target == snum) return;
+ go(target - snum);
+}
+
+function subgo(step) {
+ if (step > 0) {
+ removeClass(incrementals[snum][incpos - 1],'current');
+ removeClass(incrementals[snum][incpos], 'incremental');
+ addClass(incrementals[snum][incpos],'current');
+ incpos++;
+ } else {
+ incpos--;
+ removeClass(incrementals[snum][incpos],'current');
+ addClass(incrementals[snum][incpos], 'incremental');
+ addClass(incrementals[snum][incpos - 1],'current');
+ }
+}
+
+function toggle() {
+ var slideColl = GetElementsWithClassName('*','slide');
+ var slides = document.getElementById('slideProj');
+ var outline = document.getElementById('outlineStyle');
+ if (!slides.disabled) {
+ slides.disabled = true;
+ outline.disabled = false;
+ s5mode = false;
+ fontSize('1em');
+ for (var n = 0; n < smax; n++) {
+ var slide = slideColl[n];
+ slide.style.visibility = 'visible';
+ }
+ } else {
+ slides.disabled = false;
+ outline.disabled = true;
+ s5mode = true;
+ fontScale();
+ for (var n = 0; n < smax; n++) {
+ var slide = slideColl[n];
+ slide.style.visibility = 'hidden';
+ }
+ slideColl[snum].style.visibility = 'visible';
+ }
+}
+
+function showHide(action) {
+ var obj = GetElementsWithClassName('*','hideme')[0];
+ switch (action) {
+ case 's': obj.style.visibility = 'visible'; break;
+ case 'h': obj.style.visibility = 'hidden'; break;
+ case 'k':
+ if (obj.style.visibility != 'visible') {
+ obj.style.visibility = 'visible';
+ } else {
+ obj.style.visibility = 'hidden';
+ }
+ break;
+ }
+}
+
+// 'keys' code adapted from MozPoint (http://mozpoint.mozdev.org/)
+function keys(key) {
+ if (!key) {
+ key = event;
+ key.which = key.keyCode;
+ }
+ if (key.which == 84) {
+ toggle();
+ return;
+ }
+ if (s5mode) {
+ switch (key.which) {
+ case 10: // return
+ case 13: // enter
+ if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return;
+ if (key.target && isParentOrSelf(key.target, 'controls')) return;
+ if(number != undef) {
+ goTo(number);
+ break;
+ }
+ case 32: // spacebar
+ case 34: // page down
+ case 39: // rightkey
+ case 40: // downkey
+ if(number != undef) {
+ go(number);
+ } else if (!incrementals[snum] || incpos >= incrementals[snum].length) {
+ go(1);
+ } else {
+ subgo(1);
+ }
+ break;
+ case 33: // page up
+ case 37: // leftkey
+ case 38: // upkey
+ if(number != undef) {
+ go(-1 * number);
+ } else if (!incrementals[snum] || incpos <= 0) {
+ go(-1);
+ } else {
+ subgo(-1);
+ }
+ break;
+ case 36: // home
+ goTo(0);
+ break;
+ case 35: // end
+ goTo(smax-1);
+ break;
+ case 67: // c
+ showHide('k');
+ break;
+ }
+ if (key.which < 48 || key.which > 57) {
+ number = undef;
+ } else {
+ if (window.event && isParentOrSelf(window.event.srcElement, 'controls')) return;
+ if (key.target && isParentOrSelf(key.target, 'controls')) return;
+ number = (((number != undef) ? number : 0) * 10) + (key.which - 48);
+ }
+ }
+ return false;
+}
+
+function clicker(e) {
+ number = undef;
+ var target;
+ if (window.event) {
+ target = window.event.srcElement;
+ e = window.event;
+ } else target = e.target;
+ if (target.getAttribute('href') != null || hasValue(target.rel, 'external') || isParentOrSelf(target, 'controls') || isParentOrSelf(target,'embed') || isParentOrSelf(target,'object')) return true;
+ if (!e.which || e.which == 1) {
+ if (!incrementals[snum] || incpos >= incrementals[snum].length) {
+ go(1);
+ } else {
+ subgo(1);
+ }
+ }
+}
+
+function findSlide(hash) {
+ var target = null;
+ var slides = GetElementsWithClassName('*','slide');
+ for (var i = 0; i < slides.length; i++) {
+ var targetSlide = slides[i];
+ if ( (targetSlide.name && targetSlide.name == hash)
+ || (targetSlide.id && targetSlide.id == hash) ) {
+ target = targetSlide;
+ break;
+ }
+ }
+ while(target != null && target.nodeName != 'BODY') {
+ if (hasClass(target, 'slide')) {
+ return parseInt(target.id.slice(5));
+ }
+ target = target.parentNode;
+ }
+ return null;
+}
+
+function slideJump() {
+ if (window.location.hash == null) return;
+ var sregex = /^#slide(\d+)$/;
+ var matches = sregex.exec(window.location.hash);
+ var dest = null;
+ if (matches != null) {
+ dest = parseInt(matches[1]);
+ } else {
+ dest = findSlide(window.location.hash.slice(1));
+ }
+ if (dest != null)
+ go(dest - snum);
+}
+
+function fixLinks() {
+ var thisUri = window.location.href;
+ thisUri = thisUri.slice(0, thisUri.length - window.location.hash.length);
+ var aelements = document.getElementsByTagName('A');
+ for (var i = 0; i < aelements.length; i++) {
+ var a = aelements[i].href;
+ var slideID = a.match('\#slide[0-9]{1,2}');
+ if ((slideID) && (slideID[0].slice(0,1) == '#')) {
+ var dest = findSlide(slideID[0].slice(1));
+ if (dest != null) {
+ if (aelements[i].addEventListener) {
+ aelements[i].addEventListener("click", new Function("e",
+ "if (document.getElementById('slideProj').disabled) return;" +
+ "go("+dest+" - snum); " +
+ "if (e.preventDefault) e.preventDefault();"), true);
+ } else if (aelements[i].attachEvent) {
+ aelements[i].attachEvent("onclick", new Function("",
+ "if (document.getElementById('slideProj').disabled) return;" +
+ "go("+dest+" - snum); " +
+ "event.returnValue = false;"));
+ }
+ }
+ }
+ }
+}
+
+function externalLinks() {
+ if (!document.getElementsByTagName) return;
+ var anchors = document.getElementsByTagName('a');
+ for (var i=0; i<anchors.length; i++) {
+ var anchor = anchors[i];
+ if (anchor.getAttribute('href') && hasValue(anchor.rel, 'external')) {
+ anchor.target = '_blank';
+ addClass(anchor,'external');
+ }
+ }
+}
+
+function createControls() {
+ var controlsDiv = document.getElementById("controls");
+ if (!controlsDiv) return;
+ var hider = ' onmouseover="showHide(\'s\');" onmouseout="showHide(\'h\');"';
+ var hideDiv, hideList = '';
+ if (controlVis == 'hidden') {
+ hideDiv = hider;
+ } else {
+ hideList = hider;
+ }
+ controlsDiv.innerHTML = '<form action="#" id="controlForm"' + hideDiv + '>' +
+ '<div id="navLinks">' +
+ '<a accesskey="t" id="toggle" href="javascript:toggle();">&#216;<\/a>' +
+ '<a accesskey="z" id="prev" href="javascript:go(-1);">&laquo;<\/a>' +
+ '<a accesskey="x" id="next" href="javascript:go(1);">&raquo;<\/a>' +
+ '<div id="navList"' + hideList + '><select id="jumplist" onchange="go(\'j\');"><\/select><\/div>' +
+ '<\/div><\/form>';
+ if (controlVis == 'hidden') {
+ var hidden = document.getElementById('navLinks');
+ } else {
+ var hidden = document.getElementById('jumplist');
+ }
+ addClass(hidden,'hideme');
+}
+
+function fontScale() { // causes layout problems in FireFox that get fixed if browser's Reload is used; same may be true of other Gecko-based browsers
+ if (!s5mode) return false;
+ var vScale = 22; // both yield 32 (after rounding) at 1024x768
+ var hScale = 32; // perhaps should auto-calculate based on theme's declared value?
+ if (window.innerHeight) {
+ var vSize = window.innerHeight;
+ var hSize = window.innerWidth;
+ } else if (document.documentElement.clientHeight) {
+ var vSize = document.documentElement.clientHeight;
+ var hSize = document.documentElement.clientWidth;
+ } else if (document.body.clientHeight) {
+ var vSize = document.body.clientHeight;
+ var hSize = document.body.clientWidth;
+ } else {
+ var vSize = 700; // assuming 1024x768, minus chrome and such
+ var hSize = 1024; // these do not account for kiosk mode or Opera Show
+ }
+ var newSize = Math.min(Math.round(vSize/vScale),Math.round(hSize/hScale));
+ fontSize(newSize + 'px');
+ if (isGe) { // hack to counter incremental reflow bugs
+ var obj = document.getElementsByTagName('body')[0];
+ obj.style.display = 'none';
+ obj.style.display = 'block';
+ }
+}
+
+function fontSize(value) {
+ if (!(s5ss = document.getElementById('s5ss'))) {
+ if (!isIE) {
+ document.getElementsByTagName('head')[0].appendChild(s5ss = document.createElement('style'));
+ s5ss.setAttribute('media','screen, projection');
+ s5ss.setAttribute('id','s5ss');
+ } else {
+ document.createStyleSheet();
+ document.s5ss = document.styleSheets[document.styleSheets.length - 1];
+ }
+ }
+ if (!isIE) {
+ while (s5ss.lastChild) s5ss.removeChild(s5ss.lastChild);
+ s5ss.appendChild(document.createTextNode('body {font-size: ' + value + ' !important;}'));
+ } else {
+ document.s5ss.addRule('body','font-size: ' + value + ' !important;');
+ }
+}
+
+function notOperaFix() {
+ slideCSS = document.getElementById('slideProj').href;
+ var slides = document.getElementById('slideProj');
+ var outline = document.getElementById('outlineStyle');
+ slides.setAttribute('media','screen');
+ outline.disabled = true;
+ if (isGe) {
+ slides.setAttribute('href','null'); // Gecko fix
+ slides.setAttribute('href',slideCSS); // Gecko fix
+ }
+ if (isIE && document.styleSheets && document.styleSheets[0]) {
+ document.styleSheets[0].addRule('img', 'behavior: url(ui/default/iepngfix.htc)');
+ document.styleSheets[0].addRule('div', 'behavior: url(ui/default/iepngfix.htc)');
+ document.styleSheets[0].addRule('.slide', 'behavior: url(ui/default/iepngfix.htc)');
+ }
+}
+
+function getIncrementals(obj) {
+ var incrementals = new Array();
+ if (!obj)
+ return incrementals;
+ var children = obj.childNodes;
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (hasClass(child, 'incremental')) {
+ if (child.nodeName == 'OL' || child.nodeName == 'UL') {
+ removeClass(child, 'incremental');
+ for (var j = 0; j < child.childNodes.length; j++) {
+ if (child.childNodes[j].nodeType == 1) {
+ addClass(child.childNodes[j], 'incremental');
+ }
+ }
+ } else {
+ incrementals[incrementals.length] = child;
+ removeClass(child,'incremental');
+ }
+ }
+ if (hasClass(child, 'show-first')) {
+ if (child.nodeName == 'OL' || child.nodeName == 'UL') {
+ removeClass(child, 'show-first');
+ if (child.childNodes[isGe].nodeType == 1) {
+ removeClass(child.childNodes[isGe], 'incremental');
+ }
+ } else {
+ incrementals[incrementals.length] = child;
+ }
+ }
+ incrementals = incrementals.concat(getIncrementals(child));
+ }
+ return incrementals;
+}
+
+function createIncrementals() {
+ var incrementals = new Array();
+ for (var i = 0; i < smax; i++) {
+ incrementals[i] = getIncrementals(document.getElementById('slide'+i));
+ }
+ return incrementals;
+}
+
+function defaultCheck() {
+ var allMetas = document.getElementsByTagName('meta');
+ for (var i = 0; i< allMetas.length; i++) {
+ if (allMetas[i].name == 'defaultView') {
+ defaultView = allMetas[i].content;
+ }
+ if (allMetas[i].name == 'controlVis') {
+ controlVis = allMetas[i].content;
+ }
+ }
+}
+
+// Key trap fix, new function body for trap()
+function trap(e) {
+ if (!e) {
+ e = event;
+ e.which = e.keyCode;
+ }
+ try {
+ modifierKey = e.ctrlKey || e.altKey || e.metaKey;
+ }
+ catch(e) {
+ modifierKey = false;
+ }
+ return modifierKey || e.which == 0;
+}
+
+function startup() {
+ defaultCheck();
+ if (!isOp)
+ createControls();
+ slideLabel();
+ fixLinks();
+ externalLinks();
+ fontScale();
+ if (!isOp) {
+ notOperaFix();
+ incrementals = createIncrementals();
+ slideJump();
+ if (defaultView == 'outline') {
+ toggle();
+ }
+ //document.onkeyup = keys;
+ //document.onkeypress = trap;
+ //document.onclick = clicker;
+ }
+}
+
+window.onload = startup;
+window.onresize = function(){setTimeout('fontScale()', 50);}
diff --git a/s5runner/s5runner.cpp b/s5runner/s5runner.cpp
new file mode 100644
index 0000000..bbcb69c
--- /dev/null
+++ b/s5runner/s5runner.cpp
@@ -0,0 +1,208 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the Graphics Dojo project on Qt Labs.
+**
+** This file may be used under the terms of the GNU General Public
+** License version 2.0 or 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of
+** this file. Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtGui>
+#include <QtWebKit>
+
+#if QT_VERSION <= 0x040500
+#error You must use Qt >= 4.5
+#endif
+
+class S5Runner : public QWebView
+{
+ Q_OBJECT
+
+public:
+
+ S5Runner(QWidget *parent = 0)
+ : QWebView(parent)
+ , overlay(Qt::transparent)
+ , invert(false) {
+
+ connect(this, SIGNAL(titleChanged(const QString&)), SLOT(setWindowTitle(const QString&)));
+
+ timer.start(60*1000);
+ connect(&timer, SIGNAL(timeout()), SLOT(tick()));
+ minutes = 30;
+ }
+
+private slots:
+ void tick() {
+ minutes--;
+ update();
+ }
+
+private:
+
+ QColor overlay;
+ bool invert;
+ QTimer timer;
+ int minutes;
+
+ void paintEvent(QPaintEvent *event) {
+ if (overlay.alpha() != 0) {
+ QPainter p(this);
+ p.fillRect(event->rect(), overlay);
+ p.end();
+ } else {
+ QWebView::paintEvent(event);
+ QPainter p(this);
+ if (page()->isContentEditable()) {
+ QTextOption opts(Qt::AlignCenter);
+ p.save();
+ p.setOpacity(0.5);
+ p.setPen(Qt::white);
+ p.drawText(QRect(0, 0, width(), 25), "Edit Mode", opts);
+ p.restore();
+ }
+ if (invert) {
+ p.setCompositionMode(QPainter::CompositionMode_Difference);
+ p.fillRect(event->rect(), Qt::white);
+ }
+
+ if (true) {
+ QTextOption opts(Qt::AlignCenter);
+ QRect corner(width() - 100, height() - 50, 50, 50);
+ QFont f = font();
+ f.setPixelSize(30);
+ p.setFont(f);
+ p.setOpacity(0.6);
+ p.drawText(corner, QString::number(minutes), opts);
+ }
+
+ p.end();
+ }
+ }
+
+ void keyPressEvent(QKeyEvent *event) {
+
+ // Esc resets everything
+ if (event->key() == Qt::Key_Escape) {
+ page()->setContentEditable(false);
+ overlay = Qt::transparent;
+ showNormal();
+ update();
+ event->accept();
+ return;
+ }
+
+ // F5 reloads the web content
+ if (event->key() == Qt::Key_F5) {
+ reload();
+ event->accept();
+ return;
+ }
+
+ // F3 allows editing
+ if (event->key() == Qt::Key_F3) {
+ page()->setContentEditable(!page()->isContentEditable());
+ update();
+ event->accept();
+ return;
+ }
+
+ // F toggles full-screen
+ if (!page()->isContentEditable() && event->key() == Qt::Key_F) {
+ if (isFullScreen())
+ showNormal();
+ else
+ showFullScreen();
+ event->accept();
+ return;
+ }
+
+ // B sets the screen to black
+ if (!page()->isContentEditable() && event->key() == Qt::Key_B) {
+ overlay = (overlay == Qt::black) ? Qt::transparent : Qt::black;
+ update();
+ event->accept();
+ return;
+ }
+
+ // W sets the screen to white
+ if (!page()->isContentEditable() && event->key() == Qt::Key_W) {
+ overlay = (overlay == Qt::white) ? Qt::transparent : Qt::white;
+ update();
+ event->accept();
+ return;
+ }
+
+ // N toggles night-mode
+ if (!page()->isContentEditable() && event->key() == Qt::Key_N) {
+ invert = !invert;
+ update();
+ event->accept();
+ return;
+ }
+
+ // Navigation keys
+ if (!page()->isContentEditable()) {
+ int sendkey = -1;
+ switch (event->key()) {
+ case Qt::Key_Left:
+ sendkey = 37;
+ break;
+ case Qt::Key_Right:
+ sendkey = 39;
+ break;
+ default:
+ break;
+ }
+ if (sendkey > 0) {
+ QWebFrame *f = page()->mainFrame();
+ QString trigger = QString("var k = { which: %1 }; keys(k)").arg(sendkey);
+ f->evaluateJavaScript(trigger);
+ event->accept();
+ return;
+ }
+ } else {
+ QWebView::keyPressEvent(event);
+ }
+ }
+
+};
+
+#include "s5runner.moc"
+
+int main(int argc, char **argv)
+{
+#ifdef Q_WS_X11
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ QApplication app(argc, argv);
+
+ QString fname;
+ if (argc == 2)
+ fname = QString::fromLocal8Bit(argv[1]);
+ else
+ fname = QFileDialog::getOpenFileName(0, "Open Presentation");
+
+ S5Runner w;
+ w.resize(800, 600);
+ w.load(QUrl::fromLocalFile(fname));
+ w.show();
+
+ return app.exec();
+}
diff --git a/s5runner/s5runner.pro b/s5runner/s5runner.pro
new file mode 100644
index 0000000..8328944
--- /dev/null
+++ b/s5runner/s5runner.pro
@@ -0,0 +1,2 @@
+SOURCES = s5runner.cpp
+QT += network webkit