Switch to vanilla JavaScript and document
authorKris Kowal <kris.kowal@cixar.com>
Fri, 31 Aug 2012 20:27:17 +0000 (13:27 -0700)
committerKris Kowal <kris.kowal@cixar.com>
Fri, 31 Aug 2012 20:27:17 +0000 (13:27 -0700)
12 files changed:
README.md
classical.js
general-use.js
jquery-tengwar.js [deleted file]
jquery-tengwar.min.js [deleted file]
notation.js [new file with mode: 0644]
tengwar-annatar.js
vanilla-tengwar.build.sh [new file with mode: 0644]
vanilla-tengwar.html [new file with mode: 0644]
vanilla-tengwar.js [new file with mode: 0644]
vanilla-tengwar.min.html [new file with mode: 0644]
vanilla-tengwar.min.js [new file with mode: 0644]

index be7dc01..c5356f0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,17 +4,206 @@ Elvish from a phonetic encoding of the Latin alphabet, to the General
 Use mode of the Tengwar.  It is written in JavaScript and is suitable
 for use as:
 
--   A plain script in a web page.
--   A jQuery plugin.
--   A CommonJS module as used by Node, with the NPM package name
+-   A plain script in a web page, `vanilla-tengwar.min.js`.
+-   A CommonJS module as used by Node or Mr, with the NPM package name
     ``tengwar``.
--   A RequireJS script as used by Dojo and others.
 
-The script depends on a shimmable subset of ECMAScript 5.  You might
-benefit from using ES5 Shim if you're deploying to older browsers.
-<https://github.com/kriskowal/es5-shim>
+Using the Script
+================
 
-The API includes:
+The script searches the document for elements with the `tengwar` class.
+The body of a `tengwar` class must be rendered with the included Tengar
+Annatar variant webfont, using the included `tengwar-annatar.css`.
+
+If the element has a `data-tengwar` property, that property is expected
+to contain phonetic letters from the latin alphabet and gets transcribed
+into bindings for the Tengwar Anntar font in the General Use mode,
+popular for Sindarin and English.  The script populates the element's
+inner HTML with the font bindings, rendering the desired tengwar text
+visible.
+
+If the element has a `data-mode=classical` property, the latin letters
+are instead transcribed into Tengwar Annatar key bindings through the
+Classical mode, popular for Quenya.
+
+If the element has a `data-encoded` property, the value is expected to
+be a description of the tengwar and tehtar to display like
+`romen:a;ungwe:a;romen:o;numen` for "Aragorn" in the General Use mode.
+
+Of course, a page can bypass the whole automated transcription process
+by statically populating the element with the desired key bindings and
+using neither of these data properties.
+
+The script checks for modern browser features and stops if the necessary
+features are not present.
+
+Using the Modules
+=================
+
+-   `tengwar/general-use` transcribes phonetic latin letters, as Tolkien
+    wrote it, into Tengwar Notation in the General Use mode, suitable
+    for Sindarin and many other languages.
+    -   `transcribe(text, options)` to Tengwar Annatar key bindings
+    -   `encode(text, options)` to Tengwar Notation
+    -   `parse(text, options)` to Tengwar Object Notation
+    -   `makeOptions(options)`
+        -   `font` defaults to the TengwarAnnatar module.
+        -   `doubleNasalsWithTildeBelow`: Many tengwa can be doubled in
+            General Use mode by placing a tilde above the tengwa, and
+            many tengwa can be prefixed with the sound of the
+            corresponding nasal by putting a tilde below the tengwa.
+            Tengwar that represent nasal sounds have the special
+            distinction that either rule might apply in order to double
+            their value.
+            -   `false`: by default, a tilde above doubles a nasal
+            -   `true`: a tilde below doubles a nasal
+        -   `noAchLaut`
+            -   `false`: by default, "ch" is transcribed as ach-laut,
+                the "ch" as in "Bach".  "cc" is transcribed as "ch" as
+                in "chew".
+            -   `true`: "ch" is interpreted as the "ch" as in "chew".
+-   `tengwar/classical` transcribes phonetic latin letters into Tengwar
+    Notation in the Classical mode, most commonly used for Quenya.
+    -   `transcribe(text, options)` to Tengwar Annatar key bindings
+    -   `encode(text, options)` to Tengwar Notation
+    -   `parse(text, options)` to Tengwar Object Notation
+    -   `makeOptions(options)`
+        -   `font` defaults to the TengwarAnnatar module.
+        -   `viyla`: In the earlier forms of the mode, the tengwa
+            "vilya" represented the sound of the letter V.  The tengwa
+            "vala" eventually replaced its role and "vilya" was renamed
+            "wilya", and used for the sound of W, consonantal U.
+            -   `false`: by default "wilya" serves for W and "vala" for
+                V.
+            -   `true`: "vilya" serves for V, and W is interpreted as
+                the vowel U.
+        -   `iuRising`: In the Third Age, IU is a rising diphthong,
+            meaning that the stress is on the second sound.  Whether to
+            represent a rising diphthong in the same fashion as other
+            diphthongs is a matter of conjecture.
+            -   `false`: by default, IU is rendered as the I tehta over
+                "ure", the U tehta.
+            -   `true`: IU is rendered as the tengwa "anna" with a Y
+                tehta below, and a U tehta above.
+        -   `classical`: Before the Third Age (as defined by the
+            Namarië) transcribers dealt with R and H differently.  R can
+            be rendered as either "romen" or "ore", but the rules
+            differ.  In the classical period, R is interpreted as "ore"
+            only when it appears between vowel sounds.  In the Third
+            Age, R is interpreted as "ore" before consonants and at the
+            end of words.  The treatment of H is more complex and I have
+            only given it a rough draft.
+            -   `false`: by default, we transcribe in the pattern of the
+                Namarië poem, where "ore" is used finally and before
+                consonants.
+                -   H is interpreted as "hyarmen".
+                -   HY is interpreted as "hyarmen" with the underposed
+                    "y" tehta.
+                -   HW and WH are interpreted as "hwesta".
+                -   CH is interpreted as "harma".
+                -   HT is interpreted as "harma" followed by "tinco".
+                    Therby, HT implies CHT.
+                -   HL is interpreted as "halla" followed by "lambe".
+                -   HR is interpreted as "halla" followed by "romen".
+            -   `true`: "ore" appears only between vowels.  The
+                treatment of "H" depends on whether "harma" has been
+                introduced yet.
+        -   `harma`: In the Classical period, "hyarmen" implied the
+            following-Y.  Then "hyarmen" served as breath-H medially,
+            and "harma" served as breath-H initially and was renamed
+            "aha" in that role.
+            -   `false`: by default
+                -   H is interpreted as "halla" in all positions
+                -   HY is interpreted as "hyarmen" with underposed "y".
+                -   HT still implies CHT so treated as "harma" as above.
+                -   CH, HL, HR, and HW (and WH) are not affected.
+            -   `true`: the oldest form of the mode
+                -   H initial is interpreted as "harma"
+                -   H medial is interpreted as "hyarmen"
+                -   HY is interpreted as "hyarmen"
+                -   HT still implies CHT so treated as "harma" as above.
+                -   CH, HL, HR, and HW (and WH) are not affected.
+-   `tengwar/tengwar-annatar`: Translates Tengwar Object Notation into
+    key bindings for Johan Winge’s Tengwar Annatar font.  Provides the
+    `makeColumn` primitive which is aware of how a column of tengwar and
+    tehtar can transform to accommodate additional tehtar with this
+    font.
+    -   `transcribe(tengwarObjectNotation)`: to Tengwar Annatar key
+        bindings
+    -   `makeColumn(tengwa, above, below)`
+        -   `canAddAbove()`
+        -   `addAbove(tehta)`
+        -   `canAddBelow()`
+        -   `addBelow(below)`
+        -   `addFollowing(following)`
+        -   `addTildeAbove()`
+        -   `addTildeBelow()`
+        -   `addError(error)`
+-   `notation`
+    -   `encode(tengwarObjectNotation)`: to Tengwar Notation
+    -   `decode(tengwarNotation, makeColumn)`: to Tengwar Object
+        Notation.
+    -   `decodeWord(tengwarNotation makeColumn)`: to Tengwar Object
+        Notation for just one word (no nested arrays).
+
+## Tengwar Notation
+
+Tengwar Notation is useful for succinctly representing the first stage
+of transcription, before translation to key bindings for a particular
+font.  The notation uses the names of the tengwa followed by a list of
+tehtar in a consistent order:
+
+-   **column** =
+    -   **tengwa**
+    -   ":" if there are any following tehtar
+    -   **tehtar** delimited by ","
+        -   **tehta above** if applicable
+        -   **tehta below** if applicable
+        -   **following tehta** if applicable
+        -   "tilde-above" if applicable
+        -   "tilde-below" if applicable
+-   **word** = **column** delimited by ";"
+-   **sentence** = **word** delimited by " "
+-   **stanza** = **sentence** delimited by "\n"
+-   **paragraph** = **stanza** delimited by "\n\n"
+-   **section** = **paragraph** delimited by "\n\n\n+"
+
+The notation is useful for manually describing a transcription, either
+to override the transcriber, or for testing a transcriber.
+
+## Tengwar Object Notation
+
+Tengwar Object Notation represents a word of Tengwar as an array of
+objects.  Each object has properties,
+
+-   `tengwa` the name of one of the tengwar or punctuation mark in my
+    obtuse pidgin of punctuation names: "comma", "full-stop",
+    "exclamation-point", "question-mark", "open-paren", "close-paren",
+    "flourish-left", or "flourish-right".  "vilya" is always represented
+    as "wilya" and "aha" is always "harma", regardless of what name is
+    appropriate for the mode.
+-   `above` may be a tehta including "a", "e", "i", "o", "u", "ó", or
+    "ú".  Note that "á", "é", and "í" are not supported diacritics.
+-   `below` may be "y".
+-   `following` a tehta like "s", "s-inverse", "s-extended", or
+    "s-flourish".
+-   `tilde-above` boolean.
+-   `tilde-below` boolean.
+
+Words are wrapped in an array to make a sentence.  Sentences are wrapped
+to make paragraphs.  Paragraphs are wrapped to make sections.  Somehow
+I’ve neglected stanzas within paragraphs.  This will be remedied in a
+future version, and the nodes will probably be revised to be more
+sophisticated than merely nested arrays.
+
+A font module must have a `makeColumn` function that produces objects
+with these properties and the attendant methods as described for the
+Tengwar Annatar module above.
+
+The Legacy Module
+=================
+
+The `tengwar` module includes:
 
 -   ``transcribe(latin)`` returns a string of characters encoded for the
     custom Tengwar Annatar font included.  Paragraphs and sections are
index ae457fe..72849d5 100644 (file)
@@ -1,5 +1,6 @@
 
 var TengwarAnnatar = require("./tengwar-annatar");
+var Notation = require("./notation");
 var makeParser = require("./parser");
 var normalize = require("./normalize");
 var punctuation = require("./punctuation");
@@ -55,8 +56,7 @@ function transcribe(text, options) {
 exports.encode = encode;
 function encode(text, options) {
     options = makeOptions(options);
-    var font = options.font;
-    return font.encode(parse(text, options));
+    return Notation.encode(parse(text, options));
 }
 
 // TODO convert to parse tree
@@ -280,11 +280,8 @@ function parseTengwa(callback, options, previous) {
                 return callback([makeColumn("vala")]);
             }
         } else if (character === "w") {
-            if (options.wilya) {
-                return callback([
-                    makeColumn("short-carrier").addAbove("u")
-                    .addError("Before the introduction of vala, wilya was called vilya and represented the v sound.  There is no tengwa to represent consonantal w.")
-                ]);
+            if (options.vilya) {
+                return callback([])("u");
             } else {
                 return callback([makeColumn("wilya")]);
             }
@@ -370,24 +367,24 @@ function parseTengwa(callback, options, previous) {
                 } else if (character === "t") {
                     return callback([makeColumn("harma")]);
                 } else if (character === "y") {
-                    if (options.classical && options.harma) { // initial
+                    if (options.classical && options.harma) { // oldest form
                         return callback([makeColumn("hyarmen")]);
                     } else { // post-aha, through to the third-age
                         return callback([makeColumn("hyarmen").addBelow("y")]);
                     }
-                } else if (!previous) { // initial
-                    if (options.classical && options.harma) {
-                        return callback([makeColumn("harma")])(character);
-                    } else { // post-aha
-                        return callback([makeColumn("halla")])(character);
-                    }
-                } else { // medial
-                    if (options.classical && options.harma) { // initial
-                        return callback([makeColumn("harma")])(character);
-                    } else if (options.classical) { // post-aha
+                } else {
+                    if (options.classical) {
+                        if (options.harma) { // before harma became aha initially
+                            return callback([makeColumn("harma")])(character);
+                        } else { // harmen renamed and resounded as aha in initial position
+                            if (previous) { // medial
+                                return callback([makeColumn("hyarmen")])(character);
+                            } else { // initial
+                                return callback([makeColumn("harma")])(character);
+                            }
+                        }
+                    } else { // third age, namarië
                         return callback([makeColumn("hyarmen")])(character);
-                    } else { // namarie, third-age
-                        return callback([makeColumn("harma")])(character);
                     }
                 }
             };
index 96dfddc..80a2282 100644 (file)
@@ -1,5 +1,6 @@
 
 var TengwarAnnatar = require("./tengwar-annatar");
+var Notation = require("./notation");
 var makeParser = require("./parser");
 var normalize = require("./normalize");
 var punctuation = require("./punctuation");
@@ -33,8 +34,7 @@ function transcribe(text, options) {
 exports.encode = encode;
 function encode(text, options) {
     options = makeOptions(options);
-    var font = options.font;
-    return font.encode(parse(text, options));
+    return Notation.encode(parse(text, options));
 }
 
 // TODO convert to parse tree
@@ -55,7 +55,7 @@ function parse(text, options) {
                             contiguous = normalize(contiguous);
                             try {
                                 if (book[contiguous]) {
-                                    word.push.apply(word, font.decodeWord(book[contiguous]));
+                                    word.push.apply(word, Notation.decodeWord(book[contiguous], makeColumn));
                                 } else {
                                     word.push.apply(word, parseWord(contiguous, options));
                                 }
diff --git a/jquery-tengwar.js b/jquery-tengwar.js
deleted file mode 100644 (file)
index 479bf5f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-var GeneralUse = require("./general-use");
-var Classical = require("./classical");
-var TengwarAnnatar = require("./tengwar-annatar");
-
-$(function () {
-    $(".tengwar").each(function () {
-        var that = jQuery(this);
-        var data = that.data();
-        if (data.encoding) {
-            that.html(TengwarAnnatar.transcribe(data.enconding));
-        } else if (data.tengwar) {
-            var mode = data.mode || 'general-use';
-            var Mode = mode === 'general-use' ? GeneralUse : Classical;
-            that.html(Mode.transcribe(data.tengwar));
-        }
-    });
-});
-
diff --git a/jquery-tengwar.min.js b/jquery-tengwar.min.js
deleted file mode 100644 (file)
index a1cb30f..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-(function(){function kb(a){return a.split(";").map(function(a){var a=a.split(":"),d=a.shift(),a=a.length?a.shift().split(","):[],e=lb(d);a.forEach(function(a){"tilde-above"===a?e.addTildeAbove():"tilde-below"===a?e.addBarBelow():"y"===a?e.addBelow("y"):"s"===a||"s-inverse"===a||"s-extended"===a||"s-flourish"===a?"s"===a&&("calma"===d||"quesse"===d)?e.addBelow(a):e.addFollowing(a):e.addAbove(a)});return e})}function mb(a,b){var d;d=z.tehtaPositions;if(!z.tehtar[b])throw Error("No tehta for: "+JSON.stringify(b));
-d=z.tehtar[b].special&&!z.tehtar[b][a]?null:0<=z.barsAndTildes.indexOf(b)?0<=["lambe","alda"].indexOf(a)&&2<=z.tehtar[b].length?2:d[a].wide?0:1:void 0!==d[a]?void 0!==d[a][b]?d[a][b]:void 0!==d[a].others?d[a].others:d[a]:0;return null===d?null:z.tehtar[b][a]||z.tehtar[b][d]||""}function lb(a,b,d){return new D(a,b,d)}function Ka(a){a=a||xc;return{font:a.font||yc,doubleNasalsWithTildeBelow:a.doubleNasalsWithTildeBelow,noAchLaut:a.noAchLaut}}function La(a,b){var b=Ka(b),d=b.font,e=d.makeColumn;return a.split(/\n\n\n+/).map(function(a){return a.split(/\n\n/).map(function(a){return a.split(/\n/).map(function(a){var c=
-[],g=[];a.toLowerCase().replace(/([\w\u00e1\u00e9\u00ed\u00f3\u00fa\u00eb\u00e2\u00ea\u00ee\u00f4\u00fb\u00f1']+)|(.)/g,function(a,f,h){if(f){f=zc(f);try{ob[f]?g.push.apply(g,d.decodeWord(ob[f])):g.push.apply(g,Ac(f,b))}catch(k){g.push(e().addError("Cannot transcribe "+JSON.stringify(g)+" because "+k.message))}}else pb[h]?g.push(e(pb[h])):" "===h?(c.push(g),g=[]):g.push(e().addError("Cannot transcribe "+JSON.stringify(h)))});g.length&&c.push(g);return c})})})}function qb(a,b,d){var e=function(e){return e.length?
-qb(a,b,d.concat(e),e[e.length-1]):a(d)},c=function(a){return ka[a]?f("long-carrier").addAbove(ka[a]):f("short-carrier").addAbove(a)},f=b.font.makeColumn,h=function(a){var d=function(b){return b?a?-1!==Ma.indexOf(a)&&b.canAddAbove()?(b.addAbove(a),Y(function(a){return e([a])},b)):Y(function(b){return e([c(a),b])},b):Y(function(a){return e([a])},b):a?Y(function(a){return e([a])},c(a)):e([])},f=b.font.makeColumn;return function(e){return"n"===e?function(a){return"n"===a?b.doubleNasalsWithTildeBelow?
-d(f("numen").addTildeBelow()):d(f("numen").addTildeAbove()):"t"===a?function(a){return"h"===a?d(f("thule").addTildeAbove()):d(f("tinco").addTildeAbove())(a)}:"d"===a?d(f("ando").addTildeAbove()):"c"===a?d(f("quesse").addTildeAbove()):"g"===a?d(f("ungwe").addTildeAbove()):"j"===a?d(f("anca").addTildeAbove()):"w"===a?d(f("nwalme").addAbove("w")):d(f("numen"))(a)}:"m"===e?function(a){return"m"===a?b.doubleNasalsWithTildeBelow?d(f("malta").addTildeBelow()):d(f("malta").addTildeAbove()):"p"===a?d(f("parma").addTildeAbove()):
-"b"===a?d(f("umbar").addTildeAbove()):"f"===a?d(f("formen").addTildeAbove()):"v"===a?d(f("ampa").addTildeAbove()):d(f("malta"))(a)}:"\u00f1"===e?function(a){return"c"===a?d(f("quesse").addTildeAbove()):"g"===a?d(f("ungwe").addTildeAbove()):d(f("nwalme"))(a)}:"t"===e?function(a){return"t"===a?d(f("tinco").addTildeBelow()):"h"===a?d(f("thule")):d(f("tinco"))(a)}:"p"===e?function(a){return"p"===a?d(f("parma").addTildeBelow()):d(f("parma"))(a)}:"c"===e?function(a){return"c"===a?d(f("calma")):"h"===a?
-b.noAchLaut?d(f("calma")):d(f("hwesta")):d(f("quesse"))(a)}:"d"===e?function(a){return"d"===a?d(f("ando").addTildeBelow()):"h"===a?d(f("anto")):d(f("ando"))(a)}:"b"===e?function(a){return"b"===a?d(f("umbar").addTildeBelow()):d(f("umbar"))(a)}:"g"===e?function(a){return"g"===a?d(f("ungwe").addTildeBelow()):"h"===a?d(f("unque")):d(f("ungwe"))(a)}:"f"===e?function(a){return"f"===a?d(f("formen").addTildeBelow()):d(f("formen"))(a)}:"v"===e?d(f("ampa")):"j"===e?d(f("anca")):"s"===e?function(a){return"s"===
-a?d(f("silme").addTildeBelow()):"h"===a?d(f("harma")):d(f("silme"))(a)}:"z"===e?function(a){return"z"===a?d(f("esse").addTildeBelow()):d(f("esse"))(a)}:"h"===e?function(a){return"w"===a?d(f("hwesta-sindarinwa")):d(f("hyarmen"))(a)}:"r"===e?function(a){return"r"===a?d(f("romen").addTildeBelow()):"h"===a?d(f("arda")):""===a?d(f("ore"))(a):d(f("romen"))(a)}:"l"===e?function(a){return"l"===a?d(f("lambe").addTildeBelow()):"h"===a?d(f("alda")):d(f("lambe"))(a)}:"i"===e?d(f("anna")):"u"===e?d(f("vala")):
-"w"===e?function(a){return"h"===a?d(f("hwesta-sindarinwa")):d(f("vala"))(a)}:"e"===e&&(!a||"a"===a)?d(f("yanta")):"y"===e?d(f("wilya").addBelow("y")):"\u00e1"===e?d(f("wilya").addAbove("a")):ka[e]&&-1==Ma.indexOf(e)?d(f("long-carrier").addAbove(ka[e])):d()(e)}};return function(a){return-1!==Ma.indexOf(a)?h(a):h()(a)}}function Y(a,b){var d=function(b){var d=function(b){return"quesse"===b.tengwa&&b.canAddBelow()?function(d){return"s"===d?a(b.addBelow("s")):a(b)(d)}:-1!==Bc.indexOf(b.tengwa)?function(d){return"s"===
-d?rb(function(d){return function(e){return""===e?(0===d?b.addFollowing("s"):1===d?b.addFollowing("s-inverse"):2===d?b.addFollowing("s-extended"):3===d?b.addFollowing("s-flourish"):b.addFollowing("s-flourish").addError("Following S only has 3 alternate flourishes."),a(b)(e)):a(b)("s")(e)}}):a(b)(d)}:a(b)};return function(a){return"y"===a&&b.canAddBelow()?d(b.addBelow("y")):d(b)(a)}};return b.canAddAbove()?function(a){return"w"===a?d(b.addAbove("w")):d(b)(a)}:d(b)}function rb(a,b){b=b||0;return function(d){return"'"===
-d?rb(a,b+1):a(b)(d)}}function Na(a){a=a||Cc;return{font:a.font||Dc,vilya:a.vilya,harma:a.harma,classical:a.classical,iuRising:a.isRising,longHalla:a.longHalla}}function Oa(a,b){var b=Na(b),d=b.font.makeColumn;return a.split(/\n\n\n+/).map(function(a){return a.split(/\n\n/).map(function(a){return a.split(/\n/).map(function(a){var e=[],c=[];a.toLowerCase().replace(/([\w\u00e1\u00e9\u00ed\u00f3\u00fa\u00eb\u00e2\u00ea\u00ee\u00f4\u00fb\u00f1']+)|(.)/g,function(a,f,g){if(f)try{c.push.apply(c,Ec(Fc(f),
-b))}catch(k){c.push(d().addError("Cannot transcribe "+JSON.stringify(f)+" because "+k.message))}else sb[g]?c.push(d(sb[g])):" "===g?(e.push(c),c=[]):c.push(d().addError("Cannot transcribe "+JSON.stringify(g)))});c.length&&e.push(c);return e})})})}function tb(a,b,d,e){var c=function(e){var c=e.pop();return ub(function(c){c=e.concat(c).filter(Boolean);return c.length?tb(a,b,d.concat(c),c[c.length-1]):a(d)},b,c)},f=b.font.makeColumn;return function(a){return"n"===a?function(a){return"n"===a?c([f("numen").addTildeBelow()]):
-"t"===a?c([f("tinco")]):"d"===a?c([f("ando")]):"g"===a?function(a){return"w"===a?c([f("ungwe")]):c([f("anga")])(a)}:"c"===a?function(a){return"w"===a?c([f("unque")]):c([f("anca")])(a)}:c([f("numen")])(a)}:"m"===a?function(a){return"m"===a?c([f("malta").addTildeBelow()]):"p"===a?c([f("ampa")]):"b"===a?c([f("umbar")]):c([f("malta")])(a)}:"\u00f1"===a?function(a){return"g"===a?function(a){return"w"===a?c([f("ungwe")]):c([f("anga")])(a)}:"c"===a?function(a){return"w"===a?c([f("unque")]):c([f("anca")])}:
-c([f("noldo")])(a)}:"t"===a?function(a){return"t"===a?function(a){return"y"===a?c([f("tinco").addBelow("y").addTildeBelow()]):c([f("tinco").addTildeBelow()])(a)}:"y"===a?c([f("tinco").addBelow("y")]):"h"===a?c([f("thule")]):"s"===a?function(a){return""===a?c([f("tinco").addFollowing("s")])(a):c([f("tinco"),f("silme")])(a)}:c([f("tinco")])(a)}:"p"===a?function(a){return"p"===a?function(a){return"y"===a?c([f("parma").addBelow("y").addTildeBelow()]):c([f("parma").addTildeBelow()])(a)}:"y"===a?c([f("parma").addBelow("y")]):
-"s"===a?function(a){return""===a?c([f("parma").addFollowing("s")])(a):c([f("parma"),f("silme")])(a)}:c([f("parma")])(a)}:"c"===a?function(a){return"c"===a?c([f("calma").addTildeBelow()]):"s"===a?c([f("calma").addBelow("s")]):"h"===a?c([f("harma")]):"w"===a?c([f("quesse")]):c([f("calma")])(a)}:"f"===a?c([f("formen")]):"v"===a?b.vilya?c([f("wilya")]):c([f("vala")]):"w"===a?b.wilya?c([f("short-carrier").addAbove("u").addError("Before the introduction of vala, wilya was called vilya and represented the v sound.  There is no tengwa to represent consonantal w.")]):
-c([f("wilya")]):"r"===a?function(a){return"d"===a?c([f("arda")]):"h"===a?c([f("halla").addError("R should preceed H in the HR diagraph in Classical mode."),f("romen").addError("R should preceed H in the HR diagraph in Classical mode.")]):b.classical?e&&e.above&&""!==a&&-1!==vb.indexOf(a)?c([f("ore")])(a):c([f("romen")])(a):""===a||-1===vb.indexOf(a)?c([f("ore")])(a):c([f("romen")])(a)}:"l"===a?function(a){return"l"===a?function(a){return"y"===a?c([f("lambe").addBelow("y").addTildeBelow()]):c([f("lambe").addTildeBelow()])(a)}:
-"y"===a?c([f("lambe").addBelow("y")]):"h"===a?c([f("halla").addError("L should preceed H in the HL diagraph in Classical mode."),f("lambe").addError("L should preceed H in the HL diagraph in Classical mode.")]):"d"===a?c([f("alda")]):"b"===a?c([f("lambe"),f("umbar")]):c([f("lambe")])(a)}:"s"===a?function(a){return"s"===a?c([f("esse")]):c([f("silme")])(a)}:"h"===a?function(a){return"l"===a?c([f("halla"),f("lambe")]):"r"===a?c([f("halla"),f("romen")]):"w"===a?c([f("hwesta")]):"t"===a?c([f("harma")]):
-"y"===a?b.classical&&b.harma?c([f("hyarmen")]):c([f("hyarmen").addBelow("y")]):e?b.classical&&b.harma?c([f("harma")])(a):b.classical?c([f("hyarmen")])(a):c([f("harma")])(a):b.classical&&b.harma?c([f("harma")])(a):c([f("halla")])(a)}:"d"===a?c([f("ando").addError("D cannot appear except after N, L, or R")]):"b"===a?c([f("umbar").addError("B cannot appear except after M or L")]):"g"===a?c([f("anga").addError("G cannot appear except after N or \u00d1")]):"j"===a?c([f().addError("J cannot be transcribed in Classical Mode")]):
-c([])(a)}}function ub(a,b,d){var e=b.font.makeColumn;return function(c){if("a"===c)return function(b){return"i"===b?a([d,e("yanta","a")]):"u"===b?a([d,e("ure","a")]):d&&d.canAddAbove()?(d.addAbove("a"),a([d])(b)):a([d,e("short-carrier","a")])(b)};if("e"===c)return function(b){return"u"===b?a([d,e("ure","e")]):d&&d.canAddAbove()?(d.addAbove("e"),a([d])(b)):a([d,e("short-carrier","e")])(b)};if("i"===c)return function(c){return"u"===c?b.iuRising?a([d,e("anna","u").addBelow("y")]):a([d,e("ure","i")]):
-d&&d.canAddAbove()?(d.addAbove("i"),a([d])(c)):a([d,e("short-carrier","i")])(c)};if("o"===c)return function(b){return"i"===b?a([d,e("yanta","o")]):d&&d.canAddAbove()?(d.addAbove("o"),a([d])(b)):a([d,e("short-carrier","o")])(b)};if("u"===c)return function(b){return"i"===b?a([d,e("yanta","u")]):d&&d.canAddAbove()?(d.addAbove("u"),a([d])(b)):a([d,e("short-carrier","u")])(b)};if("y"===c){if(d&&d.canAddBelow())return a([d.addBelow("y")]);c=e("anna").addBelow("y");return ub(function(b){return a([d].concat(b))},
-b,c)}return"\u00e1"===c?a([d,e("long-carrier","a")]):"\u00e9"===c?a([d,e("long-carrier","e")]):"\u00ed"===c?a([d,e("long-carrier","i")]):"\u00f3"===c?d&&d.canAddAbove()?(d.addAbove("\u00f3"),a([d])):a([d,e("long-carrier","o")]):"\u00fa"===c?d&&d.canAddAbove()?(d.addAbove("\u00fa"),a([d])):a([d,e("long-carrier","u")]):a([d])(c)}}var q=window,k=void 0,Pa=function(a){return c.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1},wb=function(a){if(!Qa[a]){var b=l.body,d=c("<"+a+">").appendTo(b),
-e=d.css("display");d.remove();if("none"===e||""===e){v||(v=l.createElement("iframe"),v.frameBorder=v.width=v.height=0);b.appendChild(v);if(!E||!v.createElement)E=(v.contentWindow||v.contentDocument).document,E.write(("CSS1Compat"===l.compatMode?"<!doctype html>":"")+"<html><body>"),E.close();d=E.createElement(a);E.body.appendChild(d);e=c.css(d,"display");b.removeChild(v)}Qa[a]=e}return Qa[a]},L=function(a,b){var d={};c.each(xb.concat.apply([],xb.slice(0,b)),function(){d[this]=a});return d},Gc=function(){la=
-k},yb=function(){setTimeout(Gc,0);return la=c.now()},zb=function(){try{return new q.XMLHttpRequest}catch(a){}},Ra=function(a,b,d,e){if(c.isArray(b))c.each(b,function(b,g){d||Hc.test(a)?e(a,g):Ra(a+"["+("object"==typeof g||c.isArray(g)?b:"")+"]",g,d,e)});else if(!d&&null!=b&&"object"==typeof b)for(var g in b)Ra(a+"["+g+"]",b[g],d,e);else e(a,b)},Ab=function(a,b){var d,e,g=c.ajaxSettings.flatOptions||{};for(d in b)b[d]!==k&&((g[d]?a:e||(e={}))[d]=b[d]);e&&c.extend(!0,a,e)},ma=function(a,b,d,e,c,f){c=
-c||b.dataTypes[0];f=f||{};f[c]=!0;for(var c=a[c],h=0,i=c?c.length:0,j=a===Sa,n;h<i&&(j||!n);h++)n=c[h](b,d,e),"string"==typeof n&&(!j||f[n]?n=k:(b.dataTypes.unshift(n),n=ma(a,b,d,e,n,f)));(j||!n)&&!f["*"]&&(n=ma(a,b,d,e,"*",f));return n},Cb=function(a){return function(b,d){"string"!=typeof b&&(d=b,b="*");if(c.isFunction(d))for(var e=b.toLowerCase().split(Bb),g=0,f=e.length,h,i;g<f;g++)h=e[g],(i=/^\+/.test(h))&&(h=h.substr(1)||"*"),h=a[h]=a[h]||[],h[i?"unshift":"push"](d)}},Db=function(a,b,d){var e=
-"width"===b?a.offsetWidth:a.offsetHeight,g="width"===b?Ic:Jc;if(0<e)return"border"!==d&&c.each(g,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);"margin"===d?e+=parseFloat(c.css(a,d+this))||0:e-=parseFloat(c.css(a,"border"+this+"Width"))||0}),e+"px";e=P(a,b,b);if(0>e||null==e)e=a.style[b]||0;e=parseFloat(e)||0;d&&c.each(g,function(){e+=parseFloat(c.css(a,"padding"+this))||0;"padding"!==d&&(e+=parseFloat(c.css(a,"border"+this+"Width"))||0);"margin"===d&&(e+=parseFloat(c.css(a,d+this))||0)});
-return e+"px"},Lc=function(a,b){b.src?c.ajax({url:b.src,async:!1,dataType:"script"}):c.globalEval((b.text||b.textContent||b.innerHTML||"").replace(Kc,"/*$0*/"));b.parentNode&&b.parentNode.removeChild(b)},Fb=function(a){c.nodeName(a,"input")?Eb(a):"getElementsByTagName"in a&&c.grep(a.getElementsByTagName("input"),Eb)},Eb=function(a){if("checkbox"===a.type||"radio"===a.type)a.defaultChecked=a.checked},na=function(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?
-a.querySelectorAll("*"):[]},Gb=function(a,b){var d;if(1===b.nodeType){b.clearAttributes&&b.clearAttributes();b.mergeAttributes&&b.mergeAttributes(a);d=b.nodeName.toLowerCase();if("object"===d)b.outerHTML=a.outerHTML;else if("input"!==d||"checkbox"!==a.type&&"radio"!==a.type)if("option"===d)b.selected=a.defaultSelected;else{if("input"===d||"textarea"===d)b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(c.expando)}},
-Hb=function(a,b){if(1===b.nodeType&&c.hasData(a)){var d=c.expando,e=c.data(a),g=c.data(b,e);if(e=e[d]){var f=e.events,g=g[d]=c.extend({},e);if(f){delete g.handle;g.events={};for(var h in f){d=0;for(e=f[h].length;d<e;d++)c.event.add(b,h+(f[h][d].namespace?".":"")+f[h][d].namespace,f[h][d],f[h][d].data)}}}}},Ib=function(a,b,d){b=b||0;if(c.isFunction(b))return c.grep(a,function(a,c){return!!b.call(a,c,a)===d});if(b.nodeType)return c.grep(a,function(a){return a===b===d});if("string"==typeof b){var e=
-c.grep(a,function(a){return 1===a.nodeType});if(Mc.test(b))return c.filter(b,e,!d);b=c.filter(b,e)}return c.grep(a,function(a){return 0<=c.inArray(a,b)===d})},oa=function(a,b){return(a&&"*"!==a?a+".":"")+b.replace(Nc,"`").replace(Oc,"&")},Pc=function(a){var b,d,e,g,f,h,i,j,n,k,l,m=[];g=[];f=c._data(this,"events");if(!(a.liveFired===this||!f||!f.live||a.target.disabled||a.button&&"click"===a.type)){a.namespace&&(l=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));a.liveFired=
-this;var s=f.live.slice(0);for(i=0;i<s.length;i++)f=s[i],f.origType.replace(Ta,"")===a.type?g.push(f.selector):s.splice(i--,1);g=c(a.target).closest(g,a.currentTarget);j=0;for(n=g.length;j<n;j++){k=g[j];for(i=0;i<s.length;i++)if(f=s[i],k.selector===f.selector&&(!l||l.test(f.namespace))&&!k.elem.disabled){h=k.elem;e=null;if("mouseenter"===f.preType||"mouseleave"===f.preType)a.type=f.preType,(e=c(a.relatedTarget).closest(f.selector)[0])&&c.contains(h,e)&&(e=h);(!e||e!==h)&&m.push({elem:h,handleObj:f,
-level:k.level})}}j=0;for(n=m.length;j<n;j++){g=m[j];if(d&&g.level>d)break;a.currentTarget=g.elem;a.data=g.handleObj.data;a.handleObj=g.handleObj;l=g.handleObj.origHandler.apply(g.elem,arguments);if(!1===l||a.isPropagationStopped())if(d=g.level,!1===l&&(b=!1),a.isImmediatePropagationStopped())break}return b}},Jb=function(a,b,d){var e=c.extend({},d[0]);e.type=a;e.originalEvent={};e.liveFired=k;c.event.handle.call(b,e);e.isDefaultPrevented()&&d[0].preventDefault()},pa=function(){return!0},F=function(){return!1},
-Kb=function(a,b,d){var e=b+"defer",g=b+"queue",f=b+"mark",h=c.data(a,e,k,!0);h&&("queue"===d||!c.data(a,g,k,!0))&&("mark"===d||!c.data(a,f,k,!0))&&setTimeout(function(){!c.data(a,g,k,!0)&&!c.data(a,f,k,!0)&&(c.removeData(a,e,!0),h.resolve())},0)},Ua=function(a){for(var b in a)if("toJSON"!==b)return!1;return!0},Lb=function(a,b,d){if(d===k&&1===a.nodeType)if(d="data-"+b.replace(Qc,"-$1").toLowerCase(),d=a.getAttribute(d),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:c.isNaN(d)?
-Rc.test(d)?c.parseJSON(d):d:parseFloat(d)}catch(e){}c.data(a,b,d)}else d=k;return d},l=q.document,Sc=q.location,c,Mb=function(){if(!m.isReady){try{l.documentElement.doScroll("left")}catch(a){setTimeout(Mb,1);return}m.ready()}},m=function(a,b){return new m.fn.init(a,b,Nb)},Tc=q.jQuery,Uc=q.$,Nb,Vc=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ob=/\S/,Pb=/^\s+/,Qb=/\s+$/,Wc=/\d/,Xc=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Yc=/^[\],:{}\s]*$/,Zc=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,$c=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
-ad=/(?:^|:|,)(?:\s*\[)+/g,bd=/(webkit)[ \/]([\w.]+)/,cd=/(opera)(?:.*version)?[ \/]([\w.]+)/,dd=/(msie) ([\w.]+)/,ed=/(mozilla)(?:.*? rv:([\w.]+))?/,fd=/-([a-z]|[0-9])/ig,gd=/^-ms-/,hd=function(a,b){return(b+"").toUpperCase()},id=q.navigator.userAgent,qa,ra,Q,jd=Object.prototype.toString,Va=Object.prototype.hasOwnProperty,Wa=Array.prototype.push,Z=Array.prototype.slice,Rb=String.prototype.trim,Sb=Array.prototype.indexOf,Tb={};m.fn=m.prototype={constructor:m,init:function(a,b,d){var c,g;if(!a)return this;
-if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!b&&l.body)return this.context=l,this[0]=l.body,this.selector=a,this.length=1,this;if("string"==typeof a){"<"!==a.charAt(0)||">"!==a.charAt(a.length-1)||3>a.length?c=Vc.exec(a):c=[null,a,null];if(c&&(c[1]||!b)){if(c[1])return g=(b=b instanceof m?b[0]:b)?b.ownerDocument||b:l,(d=Xc.exec(a))?m.isPlainObject(b)?(a=[l.createElement(d[1])],m.fn.attr.call(a,b,!0)):a=[g.createElement(d[1])]:(d=m.buildFragment([c[1]],[g]),a=(d.cacheable?
-m.clone(d.fragment):d.fragment).childNodes),m.merge(this,a);if((b=l.getElementById(c[2]))&&b.parentNode){if(b.id!==c[2])return d.find(a);this.length=1;this[0]=b}this.context=l;this.selector=a;return this}return!b||b.jquery?(b||d).find(a):this.constructor(b).find(a)}if(m.isFunction(a))return d.ready(a);a.selector!==k&&(this.selector=a.selector,this.context=a.context);return m.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return Z.call(this,
-0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,d){var c=this.constructor();m.isArray(a)?Wa.apply(c,a):m.merge(c,a);c.prevObject=this;c.context=this.context;"find"===b?c.selector=this.selector+(this.selector?" ":"")+d:b&&(c.selector=this.selector+"."+b+"("+d+")");return c},each:function(a,b){return m.each(this,a,b)},ready:function(a){m.bindReady();ra.done(a);return this},eq:function(a){return-1===a?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},
-last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Z.apply(this,arguments),"slice",Z.call(arguments).join(","))},map:function(a){return this.pushStack(m.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:Wa,sort:[].sort,splice:[].splice};m.fn.init.prototype=m.fn;m.extend=m.fn.extend=function(){var a,b,d,c,g,f,h=arguments[0]||{},i=1,j=arguments.length,n=!1;"boolean"==typeof h&&(n=h,h=arguments[1]||{},i=2);"object"!=
-typeof h&&!m.isFunction(h)&&(h={});for(j===i&&(h=this,--i);i<j;i++)if(null!=(a=arguments[i]))for(b in a)d=h[b],c=a[b],h!==c&&(n&&c&&(m.isPlainObject(c)||(g=m.isArray(c)))?(g?(g=!1,f=d&&m.isArray(d)?d:[]):f=d&&m.isPlainObject(d)?d:{},h[b]=m.extend(n,f,c)):c!==k&&(h[b]=c));return h};m.extend({noConflict:function(a){q.$===m&&(q.$=Uc);a&&q.jQuery===m&&(q.jQuery=Tc);return m},isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(!0===a&&!--m.readyWait||!0!==a&&
-!m.isReady){if(!l.body)return setTimeout(m.ready,1);m.isReady=!0;!0!==a&&0<--m.readyWait||(ra.resolveWith(l,[m]),m.fn.trigger&&m(l).trigger("ready").unbind("ready"))}},bindReady:function(){if(!ra){ra=m._Deferred();if("complete"===l.readyState)return setTimeout(m.ready,1);if(l.addEventListener)l.addEventListener("DOMContentLoaded",Q,!1),q.addEventListener("load",m.ready,!1);else if(l.attachEvent){l.attachEvent("onreadystatechange",Q);q.attachEvent("onload",m.ready);var a=!1;try{a=null==q.frameElement}catch(b){}l.documentElement.doScroll&&
-a&&Mb()}}},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return a&&"object"==typeof a&&"setInterval"in a},isNaN:function(a){return null==a||!Wc.test(a)||isNaN(a)},type:function(a){return null==a?String(a):Tb[jd.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!Va.call(a,"constructor")&&!Va.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}for(var d in a);
-return d===k||Va.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a;},parseJSON:function(a){if("string"!=typeof a||!a)return null;a=m.trim(a);if(q.JSON&&q.JSON.parse)return q.JSON.parse(a);if(Yc.test(a.replace(Zc,"@").replace($c,"]").replace(ad,"")))return(new Function("return "+a))();m.error("Invalid JSON: "+a)},parseXML:function(a){var b,d;try{q.DOMParser?(d=new DOMParser,b=d.parseFromString(a,"text/xml")):(b=new ActiveXObject("Microsoft.XMLDOM"),b.async=
-"false",b.loadXML(a))}catch(c){b=k}(!b||!b.documentElement||b.getElementsByTagName("parsererror").length)&&m.error("Invalid XML: "+a);return b},noop:function(){},globalEval:function(a){a&&Ob.test(a)&&(q.execScript||function(a){q.eval.call(q,a)})(a)},camelCase:function(a){return a.replace(gd,"ms-").replace(fd,hd)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var c,g=0,f=a.length,h=f===k||m.isFunction(a);if(d)if(h)for(c in a){if(!1===b.apply(a[c],
-d))break}else for(;g<f&&!1!==b.apply(a[g++],d););else if(h)for(c in a){if(!1===b.call(a[c],c,a[c]))break}else for(;g<f&&!1!==b.call(a[g],g,a[g++]););return a},trim:Rb?function(a){return null==a?"":Rb.call(a)}:function(a){return null==a?"":(a+"").replace(Pb,"").replace(Qb,"")},makeArray:function(a,b){var d=b||[];if(null!=a){var c=m.type(a);null==a.length||"string"===c||"function"===c||"regexp"===c||m.isWindow(a)?Wa.call(d,a):m.merge(d,a)}return d},inArray:function(a,b){if(!b)return-1;if(Sb)return Sb.call(b,
-a);for(var d=0,c=b.length;d<c;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,c=0;if("number"==typeof b.length)for(var g=b.length;c<g;c++)a[d++]=b[c];else for(;b[c]!==k;)a[d++]=b[c++];a.length=d;return a},grep:function(a,b,d){for(var c=[],g,d=!!d,f=0,h=a.length;f<h;f++)g=!!b(a[f],f),d!==g&&c.push(a[f]);return c},map:function(a,b,d){var c,g,f=[],h=0,i=a.length;if(a instanceof m||i!==k&&"number"==typeof i&&(0<i&&a[0]&&a[i-1]||0===i||m.isArray(a)))for(;h<i;h++)c=b(a[h],h,d),null!=
-c&&(f[f.length]=c);else for(g in a)c=b(a[g],g,d),null!=c&&(f[f.length]=c);return f.concat.apply([],f)},guid:1,proxy:function(a,b){if("string"==typeof b)var d=a[b],b=a,a=d;if(!m.isFunction(a))return k;var c=Z.call(arguments,2),d=function(){return a.apply(b,c.concat(Z.call(arguments)))};d.guid=a.guid=a.guid||d.guid||m.guid++;return d},access:function(a,b,d,c,g,f){var h=a.length;if("object"==typeof b){for(var i in b)m.access(a,i,b[i],c,g,d);return a}if(d!==k){c=!f&&c&&m.isFunction(d);for(i=0;i<h;i++)g(a[i],
-b,c?d.call(a[i],i,g(a[i],b)):d,f);return a}return h?g(a[0],b):k},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();a=bd.exec(a)||cd.exec(a)||dd.exec(a)||0>a.indexOf("compatible")&&ed.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}m.extend(!0,a,this);a.superclass=this;a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(d,c){c&&c instanceof m&&!(c instanceof a)&&(c=a(c));return m.fn.init.call(this,
-d,c,b)};a.fn.init.prototype=a.fn;var b=a(l);return a},browser:{}});m.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){Tb["[object "+b+"]"]=b.toLowerCase()});qa=m.uaMatch(id);qa.browser&&(m.browser[qa.browser]=!0,m.browser.version=qa.version);m.browser.webkit&&(m.browser.safari=!0);Ob.test(" ")&&(Pb=/^[\s\xA0]+/,Qb=/[\s\xA0]+$/);Nb=m(l);l.addEventListener?Q=function(){l.removeEventListener("DOMContentLoaded",Q,!1);m.ready()}:l.attachEvent&&(Q=function(){"complete"===
-l.readyState&&(l.detachEvent("onreadystatechange",Q),m.ready())});c=m;var Xa="done fail isResolved isRejected promise then always pipe".split(" "),Ub=[].slice;c.extend({_Deferred:function(){var a=[],b,d,e,g={done:function(){if(!e){var d=arguments,h,i,j,n,k;b&&(k=b,b=0);h=0;for(i=d.length;h<i;h++)j=d[h],n=c.type(j),"array"===n?g.done.apply(g,j):"function"===n&&a.push(j);k&&g.resolveWith(k[0],k[1])}return this},resolveWith:function(c,g){if(!e&&!b&&!d){g=g||[];d=1;try{for(;a[0];)a.shift().apply(c,g)}finally{b=
-[c,g],d=0}}return this},resolve:function(){g.resolveWith(this,arguments);return this},isResolved:function(){return!!d||!!b},cancel:function(){e=1;a=[];return this}};return g},Deferred:function(a){var b=c._Deferred(),d=c._Deferred(),e;c.extend(b,{then:function(a,d){b.done(a).fail(d);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:d.done,rejectWith:d.resolveWith,reject:d.resolve,isRejected:d.isResolved,pipe:function(a,d){return c.Deferred(function(e){c.each({done:[a,
-"resolve"],fail:[d,"reject"]},function(a,d){var f=d[0],g=d[1],k;c.isFunction(f)?b[a](function(){(k=f.apply(this,arguments))&&c.isFunction(k.promise)?k.promise().then(e.resolve,e.reject):e[g+"With"](this===b?e:this,[k])}):b[a](e[g])})}).promise()},promise:function(a){if(null==a){if(e)return e;e=a={}}for(var d=Xa.length;d--;)a[Xa[d]]=b[Xa[d]];return a}});b.done(d.cancel).fail(b.cancel);delete b.cancel;a&&a.call(b,b);return b},when:function(a){function b(a){return function(b){d[a]=1<arguments.length?
-Ub.call(arguments,0):b;--f||h.resolveWith(h,Ub.call(d,0))}}var d=arguments,e=0,g=d.length,f=g,h=1>=g&&a&&c.isFunction(a.promise)?a:c.Deferred();if(1<g){for(;e<g;e++)d[e]&&c.isFunction(d[e].promise)?d[e].promise().then(b(e),h.reject):--f;f||h.resolveWith(h,d)}else h!==a&&h.resolveWith(h,g?[a]:[]);return h.promise()}});var kd=c,Ya;var p=l.createElement("div"),ld=l.documentElement,Za,R,sa,ta,w,S,u,ua,aa,va,H,wa,ba,xa,T,ca;p.setAttribute("className","t");p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-Za=p.getElementsByTagName("*");R=p.getElementsByTagName("a")[0];if(!Za||!Za.length||!R)Ya={};else{sa=l.createElement("select");ta=sa.appendChild(l.createElement("option"));w=p.getElementsByTagName("input")[0];u={leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(R.getAttribute("style")),hrefNormalized:"/a"===R.getAttribute("href"),opacity:/^0.55$/.test(R.style.opacity),cssFloat:!!R.style.cssFloat,
-checkOn:"on"===w.value,optSelected:ta.selected,getSetAttribute:"t"!==p.className,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};w.checked=!0;u.noCloneChecked=w.cloneNode(!0).checked;sa.disabled=!0;u.optDisabled=!ta.disabled;try{delete p.test}catch($d){u.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){u.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"));
-w=l.createElement("input");w.value="t";w.setAttribute("type","radio");u.radioValue="t"===w.value;w.setAttribute("checked","checked");p.appendChild(w);ua=l.createDocumentFragment();ua.appendChild(p.firstChild);u.checkClone=ua.cloneNode(!0).cloneNode(!0).lastChild.checked;p.innerHTML="";p.style.width=p.style.paddingLeft="1px";aa=l.getElementsByTagName("body")[0];H=l.createElement(aa?"div":"body");wa={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};aa&&c.extend(wa,{position:"absolute",
-left:"-1000px",top:"-1000px"});for(T in wa)H.style[T]=wa[T];H.appendChild(p);va=aa||ld;va.insertBefore(H,va.firstChild);u.appendChecked=w.checked;u.boxModel=2===p.offsetWidth;"zoom"in p.style&&(p.style.display="inline",p.style.zoom=1,u.inlineBlockNeedsLayout=2===p.offsetWidth,p.style.display="",p.innerHTML="<div style='width:4px;'></div>",u.shrinkWrapBlocks=2!==p.offsetWidth);p.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";ba=p.getElementsByTagName("td");
-ca=0===ba[0].offsetHeight;ba[0].style.display="";ba[1].style.display="none";u.reliableHiddenOffsets=ca&&0===ba[0].offsetHeight;p.innerHTML="";l.defaultView&&l.defaultView.getComputedStyle&&(S=l.createElement("div"),S.style.width="0",S.style.marginRight="0",p.appendChild(S),u.reliableMarginRight=0===(parseInt((l.defaultView.getComputedStyle(S,null)||{marginRight:0}).marginRight,10)||0));H.innerHTML="";va.removeChild(H);if(p.attachEvent)for(T in{submit:1,change:1,focusin:1})xa="on"+T,(ca=xa in p)||
-(p.setAttribute(xa,"return;"),ca="function"==typeof p[xa]),u[T+"Bubbles"]=ca;H=ua=sa=ta=aa=S=p=w=null;Ya=u}kd.support=Ya;c.boxModel=c.support.boxModel;var Rc=/^(?:\{.*\}|\[.*\])$/,Qc=/([A-Z])/g;c.extend({cache:{},uuid:0,expando:"jQuery"+(c.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?c.cache[a[c.expando]]:a[c.expando];return!!a&&!Ua(a)},data:function(a,b,d,e){if(c.acceptData(a)){var g,f=
-c.expando,h="string"==typeof b,i=a.nodeType,j=i?c.cache:a,n=i?a[c.expando]:a[c.expando]&&c.expando;if(n&&(!e||!n||!j[n]||j[n][f])||!(h&&d===k)){n||(i?a[c.expando]=n=++c.uuid:n=c.expando);j[n]||(j[n]={},i||(j[n].toJSON=c.noop));if("object"==typeof b||"function"==typeof b)e?j[n][f]=c.extend(j[n][f],b):j[n]=c.extend(j[n],b);a=j[n];e&&(a[f]||(a[f]={}),a=a[f]);d!==k&&(a[c.camelCase(b)]=d);if("events"===b&&!a[b])return a[f]&&a[f].events;h?(g=a[b],null==g&&(g=a[c.camelCase(b)])):g=a;return g}}},removeData:function(a,
-b,d){if(c.acceptData(a)){var e,g=c.expando,f=a.nodeType,h=f?c.cache:a,i=f?a[c.expando]:c.expando;if(h[i]){if(b&&(e=d?h[i][g]:h[i]))if(e[b]||(b=c.camelCase(b)),delete e[b],!Ua(e))return;if(d&&(delete h[i][g],!Ua(h[i])))return;b=h[i][g];c.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null;b?(h[i]={},f||(h[i].toJSON=c.noop),h[i][g]=b):f&&(c.support.deleteExpando?delete a[c.expando]:a.removeAttribute?a.removeAttribute(c.expando):a[c.expando]=null)}}},_data:function(a,b,d){return c.data(a,b,d,
-!0)},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!0!==b&&a.getAttribute("classid")===b}return!0}});c.fn.extend({data:function(a,b){var d=null;if("undefined"==typeof a){if(this.length&&(d=c.data(this[0]),1===this[0].nodeType))for(var e=this[0].attributes,g,f=0,h=e.length;f<h;f++)g=e[f].name,0===g.indexOf("data-")&&(g=c.camelCase(g.substring(5)),Lb(this[0],g,d[g]));return d}if("object"==typeof a)return this.each(function(){c.data(this,a)});var i=a.split(".");
-i[1]=i[1]?"."+i[1]:"";return b===k?(d=this.triggerHandler("getData"+i[1]+"!",[i[0]]),d===k&&this.length&&(d=c.data(this[0],a),d=Lb(this[0],a,d)),d===k&&i[1]?this.data(i[0]):d):this.each(function(){var d=c(this),e=[i[0],b];d.triggerHandler("setData"+i[1]+"!",e);c.data(this,a,b);d.triggerHandler("changeData"+i[1]+"!",e)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",c.data(a,b,(c.data(a,b,k,!0)||0)+1,!0))},_unmark:function(a,
-b,d){!0!==a&&(d=b,b=a,a=!1);if(b){var d=d||"fx",e=d+"mark";(a=a?0:(c.data(b,e,k,!0)||1)-1)?c.data(b,e,a,!0):(c.removeData(b,e,!0),Kb(b,d,"mark"))}},queue:function(a,b,d){if(a){var b=(b||"fx")+"queue",e=c.data(a,b,k,!0);d&&(!e||c.isArray(d)?e=c.data(a,b,c.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){var b=b||"fx",d=c.queue(a,b),e=d.shift();"inprogress"===e&&(e=d.shift());e&&("fx"===b&&d.unshift("inprogress"),e.call(a,function(){c.dequeue(a,b)}));d.length||(c.removeData(a,b+"queue",
-!0),Kb(a,b,"queue"))}});c.fn.extend({queue:function(a,b){"string"!=typeof a&&(b=a,a="fx");return b===k?c.queue(this[0],a):this.each(function(){var d=c.queue(this,a,b);"fx"===a&&"inprogress"!==d[0]&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a){function b(){--f||
-d.resolveWith(e,[e])}"string"!=typeof a&&(a=k);for(var a=a||"fx",d=c.Deferred(),e=this,g=e.length,f=1,h=a+"defer",i=a+"queue",a=a+"mark",j;g--;)if(j=c.data(e[g],h,k,!0)||(c.data(e[g],i,k,!0)||c.data(e[g],a,k,!0))&&c.data(e[g],h,c._Deferred(),!0))f++,j.done(b);b();return d.promise()}});var Vb=/[\n\t\r]/g,$a=/\s+/,md=/\r/g,nd=/^(?:button|input)$/i,od=/^(?:button|input|object|select|textarea)$/i,pd=/^a(?:rea)?$/i,Wb=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
-K,Xb;c.fn.extend({attr:function(a,b){return c.access(this,a,b,!0,c.attr)},removeAttr:function(a){return this.each(function(){c.removeAttr(this,a)})},prop:function(a,b){return c.access(this,a,b,!0,c.prop)},removeProp:function(a){a=c.propFix[a]||a;return this.each(function(){try{this[a]=k,delete this[a]}catch(b){}})},addClass:function(a){var b,d,e,g,f,h,i;if(c.isFunction(a))return this.each(function(b){c(this).addClass(a.call(this,b,this.className))});if(a&&"string"==typeof a){b=a.split($a);d=0;for(e=
-this.length;d<e;d++)if(g=this[d],1===g.nodeType)if(!g.className&&1===b.length)g.className=a;else{f=" "+g.className+" ";h=0;for(i=b.length;h<i;h++)~f.indexOf(" "+b[h]+" ")||(f+=b[h]+" ");g.className=c.trim(f)}}return this},removeClass:function(a){var b,d,e,g,f,h,i;if(c.isFunction(a))return this.each(function(b){c(this).removeClass(a.call(this,b,this.className))});if(a&&"string"==typeof a||a===k){b=(a||"").split($a);d=0;for(e=this.length;d<e;d++)if(g=this[d],1===g.nodeType&&g.className)if(a){f=(" "+
-g.className+" ").replace(Vb," ");h=0;for(i=b.length;h<i;h++)f=f.replace(" "+b[h]+" "," ");g.className=c.trim(f)}else g.className=""}return this},toggleClass:function(a,b){var d=typeof a,e="boolean"==typeof b;return c.isFunction(a)?this.each(function(d){c(this).toggleClass(a.call(this,d,this.className,b),b)}):this.each(function(){if("string"===d)for(var g,f=0,h=c(this),i=b,j=a.split($a);g=j[f++];)i=e?i:!h.hasClass(g),h[i?"addClass":"removeClass"](g);else if("undefined"===d||"boolean"===d)this.className&&
-c._data(this,"__className__",this.className),this.className=this.className||!1===a?"":c._data(this,"__className__")||""})},hasClass:function(a){for(var a=" "+a+" ",b=0,d=this.length;b<d;b++)if(1===this[b].nodeType&&-1<(" "+this[b].className+" ").replace(Vb," ").indexOf(a))return!0;return!1},val:function(a){var b,d,e=this[0];if(!arguments.length){if(e){if((b=c.valHooks[e.nodeName.toLowerCase()]||c.valHooks[e.type])&&"get"in b&&(d=b.get(e,"value"))!==k)return d;d=e.value;return"string"==typeof d?d.replace(md,
-""):null==d?"":d}return k}var g=c.isFunction(a);return this.each(function(d){var e=c(this),i;if(1===this.nodeType&&(g?i=a.call(this,d,e.val()):i=a,null==i?i="":"number"==typeof i?i+="":c.isArray(i)&&(i=c.map(i,function(a){return a==null?"":a+""})),b=c.valHooks[this.nodeName.toLowerCase()]||c.valHooks[this.type],!b||!("set"in b)||b.set(this,i,"value")===k))this.value=i})}});c.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,
-d=a.selectedIndex,e=[],g=a.options,a="select-one"===a.type;if(0>d)return null;for(var f=a?d:0,h=a?d+1:g.length;f<h;f++)if(b=g[f],b.selected&&(c.support.optDisabled?!b.disabled:null===b.getAttribute("disabled"))&&(!b.parentNode.disabled||!c.nodeName(b.parentNode,"optgroup"))){b=c(b).val();if(a)return b;e.push(b)}return a&&!e.length&&g.length?c(g[d]).val():e},set:function(a,b){var d=c.makeArray(b);c(a).find("option").each(function(){this.selected=0<=c.inArray(c(this).val(),d)});d.length||(a.selectedIndex=
--1);return d}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,b,d,e){var g=a.nodeType;if(!a||3===g||8===g||2===g)return k;if(e&&b in c.attrFn)return c(a)[b](d);if(!("getAttribute"in a))return c.prop(a,b,d);var f,h;(e=1!==g||!c.isXMLDoc(a))&&(b=c.attrFix[b]||b,h=c.attrHooks[b],h||(Wb.test(b)?h=Xb:K&&(h=K)));if(d!==k){if(null===d)return c.removeAttr(a,b),k;if(h&&"set"in h&&e&&(f=h.set(a,d,b))!==k)return f;a.setAttribute(b,""+
-d);return d}if(h&&"get"in h&&e&&null!==(f=h.get(a,b)))return f;f=a.getAttribute(b);return null===f?k:f},removeAttr:function(a,b){var d;1===a.nodeType&&(b=c.attrFix[b]||b,c.attr(a,b,""),a.removeAttribute(b),Wb.test(b)&&(d=c.propFix[b]||b)in a&&(a[d]=!1))},attrHooks:{type:{set:function(a,b){if(nd.test(a.nodeName)&&a.parentNode)c.error("type property can't be changed");else if(!c.support.radioValue&&"radio"===b&&c.nodeName(a,"input")){var d=a.value;a.setAttribute("type",b);d&&(a.value=d);return b}}},
-value:{get:function(a,b){return K&&c.nodeName(a,"button")?K.get(a,b):b in a?a.value:null},set:function(a,b,d){if(K&&c.nodeName(a,"button"))return K.set(a,b,d);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,b,d){var e=a.nodeType;if(!a||3===e||8===e||
-2===e)return k;var g,f;(1!==e||!c.isXMLDoc(a))&&(b=c.propFix[b]||b,f=c.propHooks[b]);return d!==k?f&&"set"in f&&(g=f.set(a,d,b))!==k?g:a[b]=d:f&&"get"in f&&null!==(g=f.get(a,b))?g:a[b]},propHooks:{tabIndex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):od.test(a.nodeName)||pd.test(a.nodeName)&&a.href?0:k}}}});c.attrHooks.tabIndex=c.propHooks.tabIndex;Xb={get:function(a,b){var d;return!0===c.prop(a,b)||(d=a.getAttributeNode(b))&&!1!==d.nodeValue?b.toLowerCase():
-k},set:function(a,b,d){var e;!1===b?c.removeAttr(a,d):(e=c.propFix[d]||d,e in a&&(a[e]=!0),a.setAttribute(d,d.toLowerCase()));return d}};c.support.getSetAttribute||(K=c.valHooks.button={get:function(a,b){var d;return(d=a.getAttributeNode(b))&&""!==d.nodeValue?d.nodeValue:k},set:function(a,b,d){var c=a.getAttributeNode(d);c||(c=l.createAttribute(d),a.setAttributeNode(c));return c.nodeValue=b+""}},c.each(["width","height"],function(a,b){c.attrHooks[b]=c.extend(c.attrHooks[b],{set:function(a,c){if(""===
-c)return a.setAttribute(b,"auto"),c}})}));c.support.hrefNormalized||c.each(["href","src","width","height"],function(a,b){c.attrHooks[b]=c.extend(c.attrHooks[b],{get:function(a){a=a.getAttribute(b,2);return null===a?k:a}})});c.support.style||(c.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||k},set:function(a,b){return a.style.cssText=""+b}});c.support.optSelected||(c.propHooks.selected=c.extend(c.propHooks.selected,{get:function(a){a=a.parentNode;a&&(a.selectedIndex,a.parentNode&&
-a.parentNode.selectedIndex);return null}}));c.support.checkOn||c.each(["radio","checkbox"],function(){c.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});c.each(["radio","checkbox"],function(){c.valHooks[this]=c.extend(c.valHooks[this],{set:function(a,b){if(c.isArray(b))return a.checked=0<=c.inArray(c(a).val(),b)}})});var Ta=/\.(.*)$/,ab=/^(?:textarea|input|select)$/i,Nc=/\./g,Oc=/ /g,qd=/[^\w\s.|`]/g,rd=function(a){return a.replace(qd,"\\$&")};c.event={add:function(a,
-b,d,e){if(3!==a.nodeType&&8!==a.nodeType){if(!1===d)d=F;else if(!d)return;var g,f;d.handler&&(g=d,d=g.handler);d.guid||(d.guid=c.guid++);if(f=c._data(a)){var h=f.events,i=f.handle;h||(f.events=h={});i||(f.handle=i=function(a){return"undefined"!=typeof c&&(!a||c.event.triggered!==a.type)?c.event.handle.apply(i.elem,arguments):k});i.elem=a;for(var b=b.split(" "),j,n=0,l;j=b[n++];){f=g?c.extend({},g):{handler:d,data:e};-1<j.indexOf(".")?(l=j.split("."),j=l.shift(),f.namespace=l.slice(0).sort().join(".")):
-(l=[],f.namespace="");f.type=j;f.guid||(f.guid=d.guid);var m=h[j],o=c.event.special[j]||{};if(!m&&(m=h[j]=[],!o.setup||!1===o.setup.call(a,e,l,i)))a.addEventListener?a.addEventListener(j,i,!1):a.attachEvent&&a.attachEvent("on"+j,i);o.add&&(o.add.call(a,f),f.handler.guid||(f.handler.guid=d.guid));m.push(f);c.event.global[j]=!0}a=null}}},global:{},remove:function(a,b,d,e){if(3!==a.nodeType&&8!==a.nodeType){!1===d&&(d=F);var g,f,h=0,i,j,n,l,m,o,s=c.hasData(a)&&c._data(a),r=s&&s.events;if(s&&r)if(b&&
-b.type&&(d=b.handler,b=b.type),!b||"string"==typeof b&&"."===b.charAt(0))for(g in b=b||"",r)c.event.remove(a,g+b);else{for(b=b.split(" ");g=b[h++];)if(l=g,i=0>g.indexOf("."),j=[],i||(j=g.split("."),g=j.shift(),n=RegExp("(^|\\.)"+c.map(j.slice(0).sort(),rd).join("\\.(?:.*\\.)?")+"(\\.|$)")),m=r[g])if(d){l=c.event.special[g]||{};for(f=e||0;f<m.length;f++)if(o=m[f],d.guid===o.guid){if(i||n.test(o.namespace))null==e&&m.splice(f--,1),l.remove&&l.remove.call(a,o);if(null!=e)break}if(0===m.length||null!=
-e&&1===m.length)(!l.teardown||!1===l.teardown.call(a,j))&&c.removeEvent(a,g,s.handle),delete r[g]}else for(f=0;f<m.length;f++)if(o=m[f],i||n.test(o.namespace))c.event.remove(a,l,o.handler,f),m.splice(f--,1);c.isEmptyObject(r)&&((b=s.handle)&&(b.elem=null),delete s.events,delete s.handle,c.isEmptyObject(s)&&c.removeData(a,k,!0))}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(a,b,d,e){var g=a.type||a,f=[],h;0<=g.indexOf("!")&&(g=g.slice(0,-1),h=!0);0<=g.indexOf(".")&&(f=g.split("."),
-g=f.shift(),f.sort());if(d&&!c.event.customEvent[g]||c.event.global[g]){a="object"==typeof a?a[c.expando]?a:new c.Event(g,a):new c.Event(g);a.type=g;a.exclusive=h;a.namespace=f.join(".");a.namespace_re=RegExp("(^|\\.)"+f.join("\\.(?:.*\\.)?")+"(\\.|$)");if(e||!d)a.preventDefault(),a.stopPropagation();if(d){if(!(3===d.nodeType||8===d.nodeType)){a.result=k;a.target=d;b=null!=b?c.makeArray(b):[];b.unshift(a);f=d;e=0>g.indexOf(":")?"on"+g:"";do h=c._data(f,"handle"),a.currentTarget=f,h&&h.apply(f,b),
-e&&c.acceptData(f)&&f[e]&&!1===f[e].apply(f,b)&&(a.result=!1,a.preventDefault()),f=f.parentNode||f.ownerDocument||f===a.target.ownerDocument&&q;while(f&&!a.isPropagationStopped());if(!a.isDefaultPrevented()){var i,f=c.event.special[g]||{};if((!f._default||!1===f._default.call(d.ownerDocument,a))&&("click"!==g||!c.nodeName(d,"a"))&&c.acceptData(d)){try{e&&d[g]&&(i=d[e],i&&(d[e]=null),c.event.triggered=g,d[g]())}catch(j){}i&&(d[e]=i);c.event.triggered=k}}return a.result}}else c.each(c.cache,function(){var d=
-this[c.expando];d&&d.events&&d.events[g]&&c.event.trigger(a,b,d.handle.elem)})}},handle:function(a){var a=c.event.fix(a||q.event),b=((c._data(this,"events")||{})[a.type]||[]).slice(0),d=!a.exclusive&&!a.namespace,e=Array.prototype.slice.call(arguments,0);e[0]=a;a.currentTarget=this;for(var g=0,f=b.length;g<f;g++){var h=b[g];if(d||a.namespace_re.test(h.namespace))if(a.handler=h.handler,a.data=h.data,a.handleObj=h,h=h.handler.apply(this,e),h!==k&&(a.result=h,!1===h&&(a.preventDefault(),a.stopPropagation())),
-a.isImmediatePropagationStopped())break}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[c.expando])return a;for(var b=a,a=c.Event(b),d=this.props.length,e;d;)e=this.props[--d],
-a[e]=b[e];a.target||(a.target=a.srcElement||l);3===a.target.nodeType&&(a.target=a.target.parentNode);!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);null==a.pageX&&null!=a.clientX&&(d=a.target.ownerDocument||l,b=d.documentElement,d=d.body,a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0),a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0));null==a.which&&(null!=a.charCode||
-null!=a.keyCode)&&(a.which=null!=a.charCode?a.charCode:a.keyCode);!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey);!a.which&&a.button!==k&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,oa(a.origType,a.selector),c.extend({},a,{handler:Pc,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,oa(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){c.isWindow(this)&&
-(this.onbeforeunload=d)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}};c.removeEvent=l.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,!1)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a,b){if(!this.preventDefault)return new c.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?pa:F):this.type=
-a;b&&c.extend(this,b);this.timeStamp=c.now();this[c.expando]=!0};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=pa;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=pa;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=pa;this.stopPropagation()},isDefaultPrevented:F,isPropagationStopped:F,
-isImmediatePropagationStopped:F};var Yb=function(a){var b=a.relatedTarget,d=!1,e=a.type;a.type=a.data;b!==this&&(b&&(d=c.contains(this,b)),d||(c.event.handle.apply(this,arguments),a.type=e))},Zb=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Zb:Yb,a)},teardown:function(a){c.event.remove(this,b,a&&a.selector?Zb:Yb)}}});c.support.submitBubbles||
-(c.event.special.submit={setup:function(){if(c.nodeName(this,"form"))return!1;c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=c.nodeName(b,"input")||c.nodeName(b,"button")?b.type:"";("submit"===d||"image"===d)&&c(b).closest("form").length&&Jb("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=c.nodeName(b,"input")||c.nodeName(b,"button")?b.type:"";("text"===d||"password"===d)&&c(b).closest("form").length&&13===a.keyCode&&Jb("submit",
-this,arguments)})},teardown:function(){c.event.remove(this,".specialSubmit")}});if(!c.support.changeBubbles){var da,$b=function(a){var b=c.nodeName(a,"input")?a.type:"",d=a.value;"radio"===b||"checkbox"===b?d=a.checked:"select-multiple"===b?d=-1<a.selectedIndex?c.map(a.options,function(a){return a.selected}).join("-"):"":c.nodeName(a,"select")&&(d=a.selectedIndex);return d},ya=function(a,b){var d=a.target,e,g;if(ab.test(d.nodeName)&&!d.readOnly&&(e=c._data(d,"_change_data"),g=$b(d),("focusout"!==
-a.type||"radio"!==d.type)&&c._data(d,"_change_data",g),!(e===k||g===e)))if(null!=e||g)a.type="change",a.liveFired=k,c.event.trigger(a,b,d)};c.event.special.change={filters:{focusout:ya,beforedeactivate:ya,click:function(a){var b=a.target,d=c.nodeName(b,"input")?b.type:"";("radio"===d||"checkbox"===d||c.nodeName(b,"select"))&&ya.call(this,a)},keydown:function(a){var b=a.target,d=c.nodeName(b,"input")?b.type:"";(13===a.keyCode&&!c.nodeName(b,"textarea")||32===a.keyCode&&("checkbox"===d||"radio"===d)||
-"select-multiple"===d)&&ya.call(this,a)},beforeactivate:function(a){a=a.target;c._data(a,"_change_data",$b(a))}},setup:function(){if("file"===this.type)return!1;for(var a in da)c.event.add(this,a+".specialChange",da[a]);return ab.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ab.test(this.nodeName)}};da=c.event.special.change.filters;da.focus=da.beforeactivate}c.support.focusinBubbles||c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(a){var d=
-c.event.fix(a);d.type=b;d.originalEvent={};c.event.trigger(d,null,d.target);d.isDefaultPrevented()&&a.preventDefault()}var e=0;c.event.special[b]={setup:function(){0===e++&&l.addEventListener(a,d,!0)},teardown:function(){0===--e&&l.removeEventListener(a,d,!0)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(a,e,g){var f;if("object"==typeof a){for(var h in a)this[b](h,e,a[h],g);return this}if(2===arguments.length||!1===e)g=e,e=k;"one"===b?(f=function(a){c(this).unbind(a,f);return g.apply(this,
-arguments)},f.guid=g.guid||c.guid++):f=g;if("unload"===a&&"one"!==b)this.one(a,e,g);else{h=0;for(var i=this.length;h<i;h++)c.event.add(this[h],a,f,e)}return this}});c.fn.extend({unbind:function(a,b){if("object"==typeof a&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,c){return this.live(b,d,c,a)},undelegate:function(a,b,d){return 0===arguments.length?this.unbind("live"):this.die(b,null,d,
-a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return c.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,d=a.guid||c.guid++,e=0,g=function(d){var g=(c.data(this,"lastToggle"+a.guid)||0)%e;c.data(this,"lastToggle"+a.guid,g+1);d.preventDefault();return b[g].apply(this,arguments)||!1};for(g.guid=d;e<b.length;)b[e++].guid=d;return this.click(g)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});
-var bb={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(a,e,g,f){var h=0,i,j,n=f||this.selector,l=f?this:c(this.context);if("object"==typeof a&&!a.preventDefault){for(i in a)l[b](i,e,a[i],n);return this}if("die"===b&&!a&&f&&"."===f.charAt(0))return l.unbind(f),this;if(!1===e||c.isFunction(e))g=e||F,e=k;for(a=(a||"").split(" ");null!=(f=a[h++]);)if(i=Ta.exec(f),j="",i&&(j=i[0],f=f.replace(Ta,"")),"hover"===f)a.push("mouseenter"+
-j,"mouseleave"+j);else if(i=f,bb[f]?(a.push(bb[f]+j),f+=j):f=(bb[f]||f)+j,"live"===b){j=0;for(var m=l.length;j<m;j++)c.event.add(l[j],"live."+oa(f,n),{data:e,selector:n,handler:g,origType:f,origHandler:g,preType:i})}else l.unbind("live."+oa(f,n),g);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(a,
-c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)};c.attrFn&&(c.attrFn[b]=true)});var ac=function(a,b,d,c,g,f){for(var g=0,h=c.length;g<h;g++){var i=c[g];if(i){for(var j=!1,i=i[a];i;){if(i.sizcache===d){j=c[i.sizset];break}if(1===i.nodeType)if(f||(i.sizcache=d,i.sizset=g),"string"!=typeof b){if(i===b){j=!0;break}}else if(0<o.filter(b,[i]).length){j=i;break}i=i[a]}c[g]=j}}},bc=function(a,b,d,c,g,f){for(var g=0,h=c.length;g<h;g++){var i=c[g];if(i){for(var j=!1,i=i[a];i;){if(i.sizcache===
-d){j=c[i.sizset];break}1===i.nodeType&&!f&&(i.sizcache=d,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}c[g]=j}}},cb=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,db=0,cc=Object.prototype.toString,za=!1,dc=!0,U=/\\/g,Aa=/\W/;[0,0].sort(function(){dc=!1;return 0});var o=function(a,b,d,c){var d=d||[],g=b=b||l;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!=typeof a)return d;var f,h,i,j,
-n,k,m=!0,p=o.isXML(b),s=[],q=a;do if(cb.exec(""),f=cb.exec(q))if(q=f[3],s.push(f[1]),f[2]){j=f[3];break}while(f);if(1<s.length&&sd.exec(a))if(2===s.length&&r.relative[s[0]])h=ec(s[0]+s[1],b);else for(h=r.relative[s[0]]?[b]:o(s.shift(),b);s.length;)a=s.shift(),r.relative[a]&&(a+=s.shift()),h=ec(a,h);else if(!c&&1<s.length&&9===b.nodeType&&!p&&r.match.ID.test(s[0])&&!r.match.ID.test(s[s.length-1])&&(n=o.find(s.shift(),b,p),b=n.expr?o.filter(n.expr,n.set)[0]:n.set[0]),b){n=c?{expr:s.pop(),set:A(c)}:
-o.find(s.pop(),1===s.length&&("~"===s[0]||"+"===s[0])&&b.parentNode?b.parentNode:b,p);h=n.expr?o.filter(n.expr,n.set):n.set;for(0<s.length?i=A(h):m=!1;s.length;)f=k=s.pop(),r.relative[k]?f=s.pop():k="",null==f&&(f=b),r.relative[k](i,f,p)}else i=[];i||(i=h);i||o.error(k||a);if("[object Array]"===cc.call(i))if(m)if(b&&1===b.nodeType)for(a=0;null!=i[a];a++)i[a]&&(!0===i[a]||1===i[a].nodeType&&o.contains(b,i[a]))&&d.push(h[a]);else for(a=0;null!=i[a];a++)i[a]&&1===i[a].nodeType&&d.push(h[a]);else d.push.apply(d,
-i);else A(i,d);j&&(o(j,g,d,c),o.uniqueSort(d));return d};o.uniqueSort=function(a){if(Ba&&(za=dc,a.sort(Ba),za))for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1);return a};o.matches=function(a,b){return o(a,null,null,b)};o.matchesSelector=function(a,b){return 0<o(b,null,null,[a]).length};o.find=function(a,b,d){var c;if(!a)return[];for(var g=0,f=r.order.length;g<f;g++){var h,i=r.order[g];if(h=r.leftMatch[i].exec(a)){var j=h[1];h.splice(1,1);if("\\"!==j.substr(j.length-1)&&(h[1]=(h[1]||"").replace(U,
-""),c=r.find[i](h,b,d),null!=c)){a=a.replace(r.match[i],"");break}}}c||(c="undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName("*"):[]);return{set:c,expr:a}};o.filter=function(a,b,d,c){for(var g,f,h=a,i=[],j=b,n=b&&b[0]&&o.isXML(b[0]);a&&b.length;){for(var l in r.filter)if(null!=(g=r.leftMatch[l].exec(a))&&g[2]){var m,p,s=r.filter[l];p=g[1];f=!1;g.splice(1,1);if("\\"!==p.substr(p.length-1)){j===i&&(i=[]);if(r.preFilter[l])if(g=r.preFilter[l](g,j,d,i,c,n)){if(!0===g)continue}else f=m=
-!0;if(g)for(var q=0;null!=(p=j[q]);q++)if(p){m=s(p,g,q,j);var u=c^!!m;d&&null!=m?u?f=!0:j[q]=!1:u&&(i.push(p),f=!0)}if(m!==k){d||(j=i);a=a.replace(r.match[l],"");if(!f)return[];break}}}if(a===h)if(null==f)o.error(a);else break;h=a}return j};o.error=function(a){throw"Syntax error, unrecognized expression: "+a;};var r=o.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
-TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var d=
-"string"==typeof b,c=d&&!Aa.test(b),d=d&&!c;c&&(b=b.toLowerCase());for(var c=0,g=a.length,f;c<g;c++)if(f=a[c]){for(;(f=f.previousSibling)&&1!==f.nodeType;);a[c]=d||f&&f.nodeName.toLowerCase()===b?f||!1:f===b}d&&o.filter(b,a,!0)},">":function(a,b){var d,c="string"==typeof b,g=0,f=a.length;if(c&&!Aa.test(b))for(b=b.toLowerCase();g<f;g++){if(d=a[g])d=d.parentNode,a[g]=d.nodeName.toLowerCase()===b?d:!1}else{for(;g<f;g++)(d=a[g])&&(a[g]=c?d.parentNode:d.parentNode===b);c&&o.filter(b,a,!0)}},"":function(a,
-b,d){var c,g=db++,f=ac;"string"==typeof b&&!Aa.test(b)&&(b=b.toLowerCase(),c=b,f=bc);f("parentNode",b,g,a,c,d)},"~":function(a,b,d){var c,g=db++,f=ac;"string"==typeof b&&!Aa.test(b)&&(b=b.toLowerCase(),c=b,f=bc);f("previousSibling",b,g,a,c,d)}},find:{ID:function(a,b,d){if("undefined"!=typeof b.getElementById&&!d)return(a=b.getElementById(a[1]))&&a.parentNode?[a]:[]},NAME:function(a,b){if("undefined"!=typeof b.getElementsByName){for(var d=[],c=b.getElementsByName(a[1]),g=0,f=c.length;g<f;g++)c[g].getAttribute("name")===
-a[1]&&d.push(c[g]);return 0===d.length?null:d}},TAG:function(a,b){if("undefined"!=typeof b.getElementsByTagName)return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,d,c,g,f){a=" "+a[1].replace(U,"")+" ";if(f)return a;for(var f=0,h;null!=(h=b[f]);f++)h&&(g^(h.className&&0<=(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a))?d||c.push(h):d&&(b[f]=!1));return!1},ID:function(a){return a[1].replace(U,"")},TAG:function(a){return a[1].replace(U,"").toLowerCase()},CHILD:function(a){if("nth"===
-a[1]){a[2]||o.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===a[2]&&"2n"||"odd"===a[2]&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&o.error(a[0]);a[0]=db++;return a},ATTR:function(a,b,d,c,g,f){b=a[1]=a[1].replace(U,"");!f&&r.attrMap[b]&&(a[1]=r.attrMap[b]);a[4]=(a[4]||a[5]||"").replace(U,"");"~="===a[2]&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,d,c,g){if("not"===a[1])if(1<(cb.exec(a[3])||"").length||
-/^\w/.test(a[3]))a[3]=o(a[3],null,null,b);else return a=o.filter(a[3],b,d,1^g),d||c.push.apply(c,a),!1;else if(r.match.POS.test(a[0])||r.match.CHILD.test(a[0]))return!0;return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return!1===a.disabled&&"hidden"!==a.type},disabled:function(a){return!0===a.disabled},checked:function(a){return!0===a.checked},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},parent:function(a){return!!a.firstChild},
-empty:function(a){return!a.firstChild},has:function(a,b,d){return!!o(d[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),d=a.type;return"input"===a.nodeName.toLowerCase()&&"text"===d&&(b===d||null===b)},radio:function(a){return"input"===a.nodeName.toLowerCase()&&"radio"===a.type},checkbox:function(a){return"input"===a.nodeName.toLowerCase()&&"checkbox"===a.type},file:function(a){return"input"===a.nodeName.toLowerCase()&&"file"===a.type},
-password:function(a){return"input"===a.nodeName.toLowerCase()&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"submit"===a.type},image:function(a){return"input"===a.nodeName.toLowerCase()&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},
-focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return 0===b},last:function(a,b,d,c){return b===c.length-1},even:function(a,b){return 0===b%2},odd:function(a,b){return 1===b%2},lt:function(a,b,d){return b<d[3]-0},gt:function(a,b,d){return b>d[3]-0},nth:function(a,b,d){return d[3]-0===b},eq:function(a,b,d){return d[3]-0===b}},filter:{PSEUDO:function(a,b,d,c){var g=b[1],f=r.filters[g];if(f)return f(a,d,b,c);if("contains"===g)return 0<=(a.textContent||a.innerText||
-o.getText([a])||"").indexOf(b[3]);if("not"===g){b=b[3];d=0;for(c=b.length;d<c;d++)if(b[d]===a)return!1;return!0}o.error(g)},CHILD:function(a,b){var d=b[1],c=a;switch(d){case "only":case "first":for(;c=c.previousSibling;)if(1===c.nodeType)return!1;if("first"===d)return!0;c=a;case "last":for(;c=c.nextSibling;)if(1===c.nodeType)return!1;return!0;case "nth":var d=b[2],g=b[3];if(1===d&&0===g)return!0;var f=b[0],h=a.parentNode;if(h&&(h.sizcache!==f||!a.nodeIndex)){for(var i=0,c=h.firstChild;c;c=c.nextSibling)1===
-c.nodeType&&(c.nodeIndex=++i);h.sizcache=f}c=a.nodeIndex-g;return 0===d?0===c:0===c%d&&0<=c/d}},ID:function(a,b){return 1===a.nodeType&&a.getAttribute("id")===b},TAG:function(a,b){return"*"===b&&1===a.nodeType||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return-1<(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)},ATTR:function(a,b){var d=b[1],d=r.attrHandle[d]?r.attrHandle[d](a):null!=a[d]?a[d]:a.getAttribute(d),c=d+"",g=b[2],f=b[4];return null==d?"!="===g:"="===g?c===f:"*="===g?0<=
-c.indexOf(f):"~="===g?0<=(" "+c+" ").indexOf(f):f?"!="===g?c!==f:"^="===g?0===c.indexOf(f):"$="===g?c.substr(c.length-f.length)===f:"|="===g?c===f||c.substr(0,f.length+1)===f+"-":!1:c&&!1!==d},POS:function(a,b,d,c){var g=r.setFilters[b[2]];if(g)return g(a,d,b,c)}}},sd=r.match.POS,td=function(a,b){return"\\"+(b-0+1)},ea;for(ea in r.match)r.match[ea]=RegExp(r.match[ea].source+/(?![^\[]*\])(?![^\(]*\))/.source),r.leftMatch[ea]=RegExp(/(^(?:.|\r|\n)*?)/.source+r.match[ea].source.replace(/\\(\d+)/g,td));
-var A=function(a,b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(l.documentElement.childNodes,0)[0].nodeType}catch(ae){A=function(a,b){var d=0,c=b||[];if("[object Array]"===cc.call(a))Array.prototype.push.apply(c,a);else if("number"==typeof a.length)for(var g=a.length;d<g;d++)c.push(a[d]);else for(;a[d];d++)c.push(a[d]);return c}}var Ba,fa;l.documentElement.compareDocumentPosition?Ba=function(a,b){return a===b?(za=!0,0):!a.compareDocumentPosition||
-!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(Ba=function(a,b){if(a===b)return za=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var d,c,g=[],f=[];d=a.parentNode;c=b.parentNode;var h=d;if(d===c)return fa(a,b);if(!d)return-1;if(!c)return 1;for(;h;)g.unshift(h),h=h.parentNode;for(h=c;h;)f.unshift(h),h=h.parentNode;d=g.length;c=f.length;for(h=0;h<d&&h<c;h++)if(g[h]!==f[h])return fa(g[h],f[h]);return h===d?fa(a,f[h],-1):fa(g[h],
-b,1)},fa=function(a,b,d){if(a===b)return d;for(a=a.nextSibling;a;){if(a===b)return-1;a=a.nextSibling}return 1});o.getText=function(a){for(var b="",d,c=0;a[c];c++)d=a[c],3===d.nodeType||4===d.nodeType?b+=d.nodeValue:8!==d.nodeType&&(b+=o.getText(d.childNodes));return b};var Ca=l.createElement("div"),fc="script"+(new Date).getTime(),Da=l.documentElement;Ca.innerHTML="<a name='"+fc+"'/>";Da.insertBefore(Ca,Da.firstChild);l.getElementById(fc)&&(r.find.ID=function(a,b,d){if("undefined"!=typeof b.getElementById&&
-!d)return(b=b.getElementById(a[1]))?b.id===a[1]||"undefined"!=typeof b.getAttributeNode&&b.getAttributeNode("id").nodeValue===a[1]?[b]:k:[]},r.filter.ID=function(a,b){var d="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&d&&d.nodeValue===b});Da.removeChild(Ca);var Da=Ca=null,I=l.createElement("div");I.appendChild(l.createComment(""));0<I.getElementsByTagName("*").length&&(r.find.TAG=function(a,b){var d=b.getElementsByTagName(a[1]);if("*"===a[1]){for(var c=[],
-g=0;d[g];g++)1===d[g].nodeType&&c.push(d[g]);d=c}return d});I.innerHTML="<a href='#'></a>";I.firstChild&&"undefined"!=typeof I.firstChild.getAttribute&&"#"!==I.firstChild.getAttribute("href")&&(r.attrHandle.href=function(a){return a.getAttribute("href",2)});I=null;if(l.querySelectorAll){var eb=o,Ea=l.createElement("div");Ea.innerHTML="<p class='TEST'></p>";if(!Ea.querySelectorAll||0!==Ea.querySelectorAll(".TEST").length){var o=function(a,b,d,c){b=b||l;if(!c&&!o.isXML(b)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);
-if(g&&(1===b.nodeType||9===b.nodeType)){if(g[1])return A(b.getElementsByTagName(a),d);if(g[2]&&r.find.CLASS&&b.getElementsByClassName)return A(b.getElementsByClassName(g[2]),d)}if(9===b.nodeType){if("body"===a&&b.body)return A([b.body],d);if(g&&g[3]){var f=b.getElementById(g[3]);if(!f||!f.parentNode)return A([],d);if(f.id===g[3])return A([f],d)}try{return A(b.querySelectorAll(a),d)}catch(h){}}else if(1===b.nodeType&&"object"!==b.nodeName.toLowerCase()){var g=b,i=(f=b.getAttribute("id"))||"__sizzle__",
-j=b.parentNode,n=/^\s*[+~]/.test(a);f?i=i.replace(/'/g,"\\$&"):b.setAttribute("id",i);n&&j&&(b=b.parentNode);try{if(!n||j)return A(b.querySelectorAll("[id='"+i+"'] "+a),d)}catch(k){}finally{f||g.removeAttribute("id")}}}return eb(a,b,d,c)},fb;for(fb in eb)o[fb]=eb[fb];Ea=null}}var Fa=l.documentElement,Ga=Fa.matchesSelector||Fa.mozMatchesSelector||Fa.webkitMatchesSelector||Fa.msMatchesSelector;if(Ga){var ud=!Ga.call(l.createElement("div"),"div"),gc=!1;try{Ga.call(l.documentElement,"[test!='']:sizzle")}catch(be){gc=
-!0}o.matchesSelector=function(a,b){b=b.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!o.isXML(a))try{if(gc||!r.match.PSEUDO.test(b)&&!/!=/.test(b)){var d=Ga.call(a,b);if(d||!ud||a.document&&11!==a.document.nodeType)return d}}catch(c){}return 0<o(b,null,null,[a]).length}}var V=l.createElement("div");V.innerHTML="<div class='test e'></div><div class='test'></div>";V.getElementsByClassName&&0!==V.getElementsByClassName("e").length&&(V.lastChild.className="e",1!==V.getElementsByClassName("e").length&&
-(r.order.splice(1,0,"CLASS"),r.find.CLASS=function(a,b,d){if("undefined"!=typeof b.getElementsByClassName&&!d)return b.getElementsByClassName(a[1])},V=null));l.documentElement.contains?o.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):true)}:l.documentElement.compareDocumentPosition?o.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:o.contains=function(){return false};o.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":false};
-var ec=function(a,b){for(var d,c=[],g="",f=b.nodeType?[b]:b;d=r.match.PSEUDO.exec(a);){g=g+d[0];a=a.replace(r.match.PSEUDO,"")}a=r.relative[a]?a+"*":a;d=0;for(var h=f.length;d<h;d++)o(a,f[d],c);return o.filter(g,c)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.text=o.getText;c.isXMLDoc=o.isXML;c.contains=o.contains;var vd=/Until$/,wd=/^(?:parents|prevUntil|prevAll)/,xd=/,/,Mc=/^.[^:#\[\.,]*$/,yd=Array.prototype.slice,hc=c.expr.match.POS,zd={children:!0,contents:!0,
-next:!0,prev:!0};c.fn.extend({find:function(a){var b=this,d,e;if(typeof a!="string")return c(a).filter(function(){d=0;for(e=b.length;d<e;d++)if(c.contains(b[d],this))return true});var g=this.pushStack("","find",a),f,h,i;d=0;for(e=this.length;d<e;d++){f=g.length;c.find(a,this[d],g);if(d>0)for(h=f;h<g.length;h++)for(i=0;i<f;i++)if(g[i]===g[h]){g.splice(h--,1);break}}return g},has:function(a){var b=c(a);return this.filter(function(){for(var a=0,e=b.length;a<e;a++)if(c.contains(this,b[a]))return true})},
-not:function(a){return this.pushStack(Ib(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ib(this,a,true),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?c.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var d=[],e,g,f=this[0];if(c.isArray(a)){var h,i={},j=1;if(f&&a.length){e=0;for(g=a.length;e<g;e++){h=a[e];i[h]||(i[h]=hc.test(h)?c(h,b||this.context):h)}for(;f&&f.ownerDocument&&f!==b;){for(h in i){e=i[h];(e.jquery?e.index(f)>-1:c(f).is(e))&&d.push({selector:h,
-elem:f,level:j})}f=f.parentNode;j++}}return d}h=hc.test(a)||typeof a!="string"?c(a,b||this.context):0;e=0;for(g=this.length;e<g;e++)for(f=this[e];f;){if(h?h.index(f)>-1:c.find.matchesSelector(f,a)){d.push(f);break}f=f.parentNode;if(!f||!f.ownerDocument||f===b||f.nodeType===11)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){return!a?this[0]&&this[0].parentNode?this.prevAll().length:-1:typeof a=="string"?c.inArray(this[0],c(a)):c.inArray(a.jquery?a[0]:a,this)},
-add:function(a,b){var d=typeof a=="string"?c(a,b):c.makeArray(a&&a.nodeType?[a]:a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,
-2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:
-c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var g=c.map(this,b,d),f=yd.call(arguments);vd.test(a)||(e=d);e&&typeof e=="string"&&(g=c.filter(e,g));g=this.length>1&&!zd[a]?c.unique(g):g;(this.length>1||xd.test(e))&&wd.test(a)&&(g=g.reverse());return this.pushStack(g,a,f.join(","))}});c.extend({filter:function(a,b,d){d&&(a=":not("+a+")");return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){for(var e=[],a=a[b];a&&a.nodeType!==9&&(d===
-k||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,c){for(var b=b||1,e=0;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Ad=/ jQuery\d+="(?:\d+|null)"/g,gb=/^\s+/,ic=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,jc=/<([\w:]+)/,Bd=/<tbody/i,Cd=/<|&#?\w+;/,kc=/<(?:script|object|embed|option|style)/i,lc=/checked\s*(?:[^=]|=\s*.checked.)/i,
-Dd=/\/(java|ecma)script/i,Kc=/^\s*<!(?:\[CDATA\[|\-\-)/,x={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};x.optgroup=x.option;x.tbody=x.tfoot=x.colgroup=x.caption=x.thead;x.th=x.td;c.support.htmlSerialize||(x._default=[1,
-"div<div>","</div>"]);c.fn.extend({text:function(a){return c.isFunction(a)?this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))}):typeof a!="object"&&a!==k?this.empty().append((this[0]&&this[0].ownerDocument||l).createTextNode(a)):c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapAll(a.call(this,b))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&
-a.firstChild.nodeType===1;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return c.isFunction(a)?this.each(function(b){c(this).wrapInner(a.call(this,b))}):this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
-true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
-false,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){!b&&e.nodeType===1&&(c.cleanData(e.getElementsByTagName("*")),c.cleanData([e]));e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return c.clone(this,a,b)})},html:function(a){if(a===k)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ad,""):null;if(typeof a=="string"&&!kc.test(a)&&(c.support.leadingWhitespace||!gb.test(a))&&!x[(jc.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ic,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)this[b].nodeType===1&&(c.cleanData(this[b].getElementsByTagName("*")),this[b].innerHTML=a)}catch(e){this.empty().append(a)}}else c.isFunction(a)?
-this.each(function(b){var d=c(this);d.html(a.call(this,b,d.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();d.replaceWith(a.call(this,b,e))});typeof a!="string"&&(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}return this.length?this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a):
-this},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,g,f,h=a[0],i=[];if(!c.support.checkClone&&arguments.length===3&&typeof h=="string"&&lc.test(h))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(h))return this.each(function(f){var e=c(this);a[0]=h.call(this,f,b?e.html():k);e.domManip(a,b,d)});if(this[0]){f=h&&h.parentNode;c.support.parentNode&&f&&f.nodeType===11&&f.childNodes.length===this.length?e={fragment:f}:e=c.buildFragment(a,this,i);
-f=e.fragment;f.childNodes.length===1?g=f=f.firstChild:g=f.firstChild;if(g){b=b&&c.nodeName(g,"tr");g=0;for(var j=this.length,n=j-1;g<j;g++)d.call(b?c.nodeName(this[g],"table")?this[g].getElementsByTagName("tbody")[0]||this[g].appendChild(this[g].ownerDocument.createElement("tbody")):this[g]:this[g],e.cacheable||j>1&&g<n?c.clone(f,true,true):f)}i.length&&c.each(i,Lc)}return this}});c.buildFragment=function(a,b,d){var e,g,f,h;b&&b[0]&&(h=b[0].ownerDocument||b[0]);h.createDocumentFragment||(h=l);a.length===
-1&&typeof a[0]=="string"&&a[0].length<512&&h===l&&a[0].charAt(0)==="<"&&!kc.test(a[0])&&(c.support.checkClone||!lc.test(a[0]))&&(g=true,f=c.fragments[a[0]],f&&f!==1&&(e=f));e||(e=h.createDocumentFragment(),c.clean(a,h,e,d));g&&(c.fragments[a[0]]=f?e:1);return{fragment:e,cacheable:g}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[],d=c(d),g=this.length===1&&this[0].parentNode;
-if(g&&g.nodeType===11&&g.childNodes.length===1&&d.length===1){d[b](this[0]);return this}for(var g=0,f=d.length;g<f;g++){var h=(g>0?this.clone(true):this).get();c(d[g])[b](h);e=e.concat(h)}return this.pushStack(e,a,d.selector)}});c.extend({clone:function(a,b,d){var e=a.cloneNode(true),g,f,h;if((!c.support.noCloneEvent||!c.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!c.isXMLDoc(a)){Gb(a,e);g=na(a);f=na(e);for(h=0;g[h];++h)f[h]&&Gb(g[h],f[h])}if(b){Hb(a,e);if(d){g=na(a);f=na(e);for(h=
-0;g[h];++h)Hb(g[h],f[h])}}return e},clean:function(a,b,d,e){b=b||l;typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||l);for(var g=[],f,h=0,i;(i=a[h])!=null;h++){typeof i=="number"&&(i=i+"");if(i){if(typeof i=="string")if(Cd.test(i)){i=i.replace(ic,"<$1></$2>");f=(jc.exec(i)||["",""])[1].toLowerCase();var j=x[f]||x._default,n=j[0],k=b.createElement("div");for(k.innerHTML=j[1]+i+j[2];n--;)k=k.lastChild;if(!c.support.tbody){n=Bd.test(i);j=f==="table"&&!n?k.firstChild&&
-k.firstChild.childNodes:j[1]==="<table>"&&!n?k.childNodes:[];for(f=j.length-1;f>=0;--f)c.nodeName(j[f],"tbody")&&!j[f].childNodes.length&&j[f].parentNode.removeChild(j[f])}!c.support.leadingWhitespace&&gb.test(i)&&k.insertBefore(b.createTextNode(gb.exec(i)[0]),k.firstChild);i=k.childNodes}else i=b.createTextNode(i);var m;if(!c.support.appendChecked)if(i[0]&&typeof(m=i.length)=="number")for(f=0;f<m;f++)Fb(i[f]);else Fb(i);i.nodeType?g.push(i):g=c.merge(g,i)}}if(d){a=function(a){return!a.type||Dd.test(a.type)};
-for(h=0;g[h];h++)if(e&&c.nodeName(g[h],"script")&&(!g[h].type||g[h].type.toLowerCase()==="text/javascript"))e.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);else{if(g[h].nodeType===1){b=c.grep(g[h].getElementsByTagName("script"),a);g.splice.apply(g,[h+1,0].concat(b))}d.appendChild(g[h])}}return g},cleanData:function(a){for(var b,d,e=c.cache,g=c.expando,f=c.event.special,h=c.support.deleteExpando,i=0,j;(j=a[i])!=null;i++)if(!j.nodeName||!c.noData[j.nodeName.toLowerCase()])if(d=j[c.expando]){if((b=
-e[d]&&e[d][g])&&b.events){for(var k in b.events)f[k]?c.event.remove(j,k):c.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[c.expando]:j.removeAttribute&&j.removeAttribute(c.expando);delete e[d]}}});var hb=/alpha\([^)]*\)/i,Ed=/opacity=([^)]*)/,Fd=/([A-Z]|^ms)/g,mc=/^-?\d+(?:px)?$/i,Gd=/^-?\d/,Hd=/^([\-+])=([\-+.\de]+)/,Id={position:"absolute",visibility:"hidden",display:"block"},Ic=["Left","Right"],Jc=["Top","Bottom"],P,nc,oc;c.fn.css=function(a,b){return arguments.length===2&&
-b===k?this:c.access(this,a,b,true,function(a,b,g){return g!==k?c.style(a,b,g):c.css(a,b)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=P(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,f=c.camelCase(b),h=a.style,i=c.cssHooks[f],
-b=c.cssProps[f]||f;if(d===k)return i&&"get"in i&&(g=i.get(a,false,e))!==k?g:h[b];e=typeof d;e==="string"&&(g=Hd.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(c.css(a,b)),e="number");if(!(d==null||e==="number"&&isNaN(d))){e==="number"&&!c.cssNumber[f]&&(d=d+"px");if(!i||!("set"in i)||(d=i.set(a,d))!==k)try{h[b]=d}catch(j){}}}},css:function(a,b,d){var e,g,b=c.camelCase(b);g=c.cssHooks[b];b=c.cssProps[b]||b;b==="cssFloat"&&(b="float");if(g&&"get"in g&&(e=g.get(a,true,d))!==k)return e;if(P)return P(a,b)},swap:function(a,
-b,c){var e={},g;for(g in b){e[g]=a.style[g];a.style[g]=b[g]}c.call(a);for(g in b)a.style[g]=e[g]}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(a,e,g){var f;if(e){if(a.offsetWidth!==0)return Db(a,b,g);c.swap(a,Id,function(){f=Db(a,b,g)});return f}},set:function(a,b){if(!mc.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}});c.support.opacity||(c.cssHooks.opacity={get:function(a,b){return Ed.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||
-"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style,e=a.currentStyle,g=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=e&&e.filter||d.filter||"";d.zoom=1;if(b>=1&&c.trim(f.replace(hb,""))===""){d.removeAttribute("filter");if(e&&!e.filter)return}d.filter=hb.test(f)?f.replace(hb,g):f+" "+g}});c(function(){c.support.reliableMarginRight||(c.cssHooks.marginRight={get:function(a,b){var d;c.swap(a,{display:"inline-block"},function(){b?d=P(a,"margin-right","marginRight"):d=a.style.marginRight});
-return d}})});l.defaultView&&l.defaultView.getComputedStyle&&(nc=function(a,b){var d,e,b=b.replace(Fd,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return k;if(e=e.getComputedStyle(a,null)){d=e.getPropertyValue(b);d===""&&!c.contains(a.ownerDocument.documentElement,a)&&(d=c.style(a,b))}return d});l.documentElement.currentStyle&&(oc=function(a,b){var c,e=a.currentStyle&&a.currentStyle[b],g=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!mc.test(e)&&Gd.test(e)&&(c=f.left,g&&(a.runtimeStyle.left=
-a.currentStyle.left),f.left=b==="fontSize"?"1em":e||0,e=f.pixelLeft+"px",f.left=c,g&&(a.runtimeStyle.left=g));return e===""?"auto":e});P=nc||oc;c.expr&&c.expr.filters&&(c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"},c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)});var Jd=/%20/g,Hc=/\[\]$/,pc=/\r?\n/g,Kd=/#.*$/,Ld=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Md=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
-Nd=/^(?:GET|HEAD)$/,Od=/^\/\//,qc=/\?/,Pd=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Qd=/^(?:select|textarea)/i,Bb=/\s+/,Rd=/([?&])_=[^&]*/,rc=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,sc=c.fn.load,Sa={},tc={},C,J,uc=["*/"]+["*"];try{C=Sc.href}catch(ce){C=l.createElement("a"),C.href="",C=C.href}J=rc.exec(C.toLowerCase())||[];c.fn.extend({load:function(a,b,d){if(typeof a!="string"&&sc)return sc.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0)var g=a.slice(e,
-a.length),a=a.slice(0,e);e="GET";b&&(c.isFunction(b)?(d=b,b=k):typeof b=="object"&&(b=c.param(b,c.ajaxSettings.traditional),e="POST"));var f=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText;a.isResolved()&&(a.done(function(a){e=a}),f.html(g?c("<div>").append(e.replace(Pd,"")).find(g):e));d&&f.each(d,[e,b,a])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
-c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Qd.test(this.nodeName)||Md.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(a){return{name:b.name,value:a.replace(pc,"\r\n")}}):{name:b.name,value:d.replace(pc,"\r\n")}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(a){return this.bind(b,a)}});c.each(["get","post"],
-function(a,b){c[b]=function(a,e,g,f){c.isFunction(e)&&(f=f||g,g=e,e=k);return c.ajax({type:b,url:a,data:e,success:g,dataType:f})}});c.extend({getScript:function(a,b){return c.get(a,k,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},ajaxSetup:function(a,b){b?Ab(a,c.ajaxSettings):(b=a,a=c.ajaxSettings);Ab(a,b);return a},ajaxSettings:{url:C,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(J[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",
-processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":uc},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":q.String,"text html":!0,"text json":c.parseJSON,"text xml":c.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cb(Sa),ajaxTransport:Cb(tc),ajax:function(a,b){function d(a,b,d,l){if(u!==2){u=2;r&&clearTimeout(r);p=k;o=l||"";t.readyState=
-a>0?4:0;var m,s,q,l=b;if(d){var X=e,w=t,A=X.contents,v=X.dataTypes,nb=X.responseFields,B,y,z,D;for(y in nb)y in d&&(w[nb[y]]=d[y]);for(;v[0]==="*";){v.shift();B===k&&(B=X.mimeType||w.getResponseHeader("content-type"))}if(B)for(y in A)if(A[y]&&A[y].test(B)){v.unshift(y);break}if(v[0]in d)z=v[0];else{for(y in d){if(!v[0]||X.converters[y+" "+v[0]]){z=y;break}D||(D=y)}z=z||D}if(z){z!==v[0]&&v.unshift(z);d=d[z]}else d=void 0}else d=k;if(a>=200&&a<300||a===304){if(e.ifModified){if(B=t.getResponseHeader("Last-Modified"))c.lastModified[n]=
-B;if(B=t.getResponseHeader("Etag"))c.etag[n]=B}if(a===304){l="notmodified";m=true}else try{B=e;B.dataFilter&&(d=B.dataFilter(d,B.dataType));var G=B.dataTypes;y={};var F,H,K=G.length,I,M=G[0],C,J,N,O,E;for(F=1;F<K;F++){if(F===1)for(H in B.converters)typeof H=="string"&&(y[H.toLowerCase()]=B.converters[H]);C=M;M=G[F];if(M==="*")M=C;else if(C!=="*"&&C!==M){J=C+" "+M;N=y[J]||y["* "+M];if(!N){E=k;for(O in y){I=O.split(" ");if(I[0]===C||I[0]==="*")if(E=y[I[1]+" "+M]){O=y[O];O===true?N=E:E===true&&(N=O);
-break}}}!N&&!E&&c.error("No conversion from "+J.replace(" "," to "));N!==true&&(d=N?N(d):E(O(d)))}}s=d;l="success";m=true}catch(L){l="parsererror";q=L}}else{q=l;if(!l||a){l="error";a<0&&(a=0)}}t.status=a;t.statusText=""+(b||l);m?h.resolveWith(g,[s,l,t]):h.rejectWith(g,[t,l,q]);t.statusCode(j);j=k;x&&f.trigger("ajax"+(m?"Success":"Error"),[t,e,m?s:q]);i.resolveWith(g,[t,l]);x&&(f.trigger("ajaxComplete",[t,e]),--c.active||c.event.trigger("ajaxStop"))}}typeof a=="object"&&(b=a,a=k);var b=b||{},e=c.ajaxSetup({},
-b),g=e.context||e,f=g!==e&&(g.nodeType||g instanceof c)?c(g):c.event,h=c.Deferred(),i=c._Deferred(),j=e.statusCode||{},n,l={},m={},o,s,p,r,q,u=0,x,w,t={readyState:0,setRequestHeader:function(a,b){if(!u){var c=a.toLowerCase(),a=m[c]=m[c]||a;l[a]=b}return this},getAllResponseHeaders:function(){return u===2?o:null},getResponseHeader:function(a){var b;if(u===2){if(!s)for(s={};b=Ld.exec(o);)s[b[1].toLowerCase()]=b[2];b=s[a.toLowerCase()]}return b===k?null:b},overrideMimeType:function(a){u||(e.mimeType=
-a);return this},abort:function(a){a=a||"abort";p&&p.abort(a);d(0,a);return this}};h.promise(t);t.success=t.done;t.error=t.fail;t.complete=i.done;t.statusCode=function(a){if(a){var b;if(u<2)for(b in a)j[b]=[j[b],a[b]];else{b=a[t.status];t.then(b,b)}}return this};e.url=((a||e.url)+"").replace(Kd,"").replace(Od,J[1]+"//");e.dataTypes=c.trim(e.dataType||"*").toLowerCase().split(Bb);e.crossDomain==null&&(q=rc.exec(e.url.toLowerCase()),e.crossDomain=!(!q||q[1]==J[1]&&q[2]==J[2]&&(q[3]||(q[1]==="http:"?
-80:443))==(J[3]||(J[1]==="http:"?80:443))));e.data&&e.processData&&typeof e.data!="string"&&(e.data=c.param(e.data,e.traditional));ma(Sa,e,b,t);if(u===2)return false;x=e.global;e.type=e.type.toUpperCase();e.hasContent=!Nd.test(e.type);x&&c.active++===0&&c.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url=e.url+((qc.test(e.url)?"&":"?")+e.data),delete e.data);n=e.url;if(e.cache===false){q=c.now();var A=e.url.replace(Rd,"$1_="+q);e.url=A+(A===e.url?(qc.test(e.url)?"&":"?")+"_="+q:"")}}(e.data&&
-e.hasContent&&e.contentType!==false||b.contentType)&&t.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(n=n||e.url,c.lastModified[n]&&t.setRequestHeader("If-Modified-Since",c.lastModified[n]),c.etag[n]&&t.setRequestHeader("If-None-Match",c.etag[n]));t.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", "+uc+"; q=0.01":""):e.accepts["*"]);for(w in e.headers)t.setRequestHeader(w,e.headers[w]);if(e.beforeSend&&(e.beforeSend.call(g,
-t,e)===false||u===2)){t.abort();return false}for(w in{success:1,error:1,complete:1})t[w](e[w]);if(p=ma(tc,e,b,t)){t.readyState=1;x&&f.trigger("ajaxSend",[t,e]);e.async&&e.timeout>0&&(r=setTimeout(function(){t.abort("timeout")},e.timeout));try{u=1;p.send(l,d)}catch(v){u<2?d(-1,v):c.error(v)}}else d(-1,"No Transport");return t},param:function(a,b){var d=[],e=function(a,b){b=c.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};b===k&&(b=c.ajaxSettings.traditional);if(c.isArray(a)||
-a.jquery&&!c.isPlainObject(a))c.each(a,function(){e(this.name,this.value)});else for(var g in a)Ra(g,a[g],b,e);return d.join("&").replace(Jd,"+")}});c.extend({active:0,lastModified:{},etag:{}});var Sd=c.now(),Ha=/(\=)\?(&|$)|\?\?/i;c.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return c.expando+"_"+Sd++}});c.ajaxPrefilter("json jsonp",function(a,b,d){b=a.contentType==="application/x-www-form-urlencoded"&&typeof a.data=="string";if(a.dataTypes[0]==="jsonp"||a.jsonp!==false&&(Ha.test(a.url)||
-b&&Ha.test(a.data))){var e,g=a.jsonpCallback=c.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,f=q[g],h=a.url,i=a.data,j="$1"+g+"$2";a.jsonp!==false&&(h=h.replace(Ha,j),a.url===h&&(b&&(i=i.replace(Ha,j)),a.data===i&&(h=h+((/\?/.test(h)?"&":"?")+a.jsonp+"="+g))));a.url=h;a.data=i;q[g]=function(a){e=[a]};d.always(function(){q[g]=f;e&&c.isFunction(f)&&q[g](e[0])});a.converters["script json"]=function(){e||c.error(g+" was not called");return e[0]};a.dataTypes[0]="json";return"script"}});
-c.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){c.globalEval(a);return a}}});c.ajaxPrefilter("script",function(a){a.cache===k&&(a.cache=false);a.crossDomain&&(a.type="GET",a.global=false)});c.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=l.head||l.getElementsByTagName("head")[0]||l.documentElement;return{send:function(e,g){b=l.createElement("script");
-b.async="async";a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,e){if(e||!b.readyState||/loaded|complete/.test(b.readyState)){b.onload=b.onreadystatechange=null;c&&b.parentNode&&c.removeChild(b);b=k;e||g(200,"success")}};c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(0,1)}}}});var ib=q.ActiveXObject?function(){for(var a in W)W[a](0,1)}:!1,Td=0,W;c.ajaxSettings.xhr=q.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&zb()))a:{try{a=
-new q.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:zb;var jb=c.ajaxSettings.xhr();c.extend(c.support,{ajax:!!jb,cors:!!jb&&"withCredentials"in jb});c.support.ajax&&c.ajaxTransport(function(a){if(!a.crossDomain||c.support.cors){var b;return{send:function(d,e){var g=a.xhr(),f,h;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(h in a.xhrFields)g[h]=a.xhrFields[h];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType);
-!a.crossDomain&&!d["X-Requested-With"]&&(d["X-Requested-With"]="XMLHttpRequest");try{for(h in d)g.setRequestHeader(h,d[h])}catch(i){}g.send(a.hasContent&&a.data||null);b=function(d,h){var i,l,m,o,p;try{if(b&&(h||g.readyState===4)){b=k;f&&(g.onreadystatechange=c.noop,ib&&delete W[f]);if(h)g.readyState!==4&&g.abort();else{i=g.status;m=g.getAllResponseHeaders();o={};(p=g.responseXML)&&p.documentElement&&(o.xml=p);o.text=g.responseText;try{l=g.statusText}catch(q){l=""}!i&&a.isLocal&&!a.crossDomain?i=
-o.text?200:404:i===1223&&(i=204)}}}catch(r){h||e(-1,r)}o&&e(i,l,o,m)};!a.async||g.readyState===4?b():(f=++Td,ib&&(W||(W={},c(q).unload(ib)),W[f]=b),g.onreadystatechange=b)},abort:function(){b&&b(0,1)}}}});var Qa={},v,E,Ud=/^(?:toggle|show|hide)$/,Vd=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Ia,xb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],la;c.fn.extend({show:function(a,b,d){var e;if(a||a===0)return this.animate(L("show",
-3),a,b,d);b=0;for(d=this.length;b<d;b++){a=this[b];a.style&&(e=a.style.display,!c._data(a,"olddisplay")&&e==="none"&&(e=a.style.display=""),e===""&&c.css(a,"display")==="none"&&c._data(a,"olddisplay",wb(a.nodeName)))}for(b=0;b<d;b++){a=this[b];if(a.style){e=a.style.display;if(e===""||e==="none")a.style.display=c._data(a,"olddisplay")||""}}return this},hide:function(a,b,d){if(a||a===0)return this.animate(L("hide",3),a,b,d);a=0;for(b=this.length;a<b;a++)if(this[a].style){d=c.css(this[a],"display");
-d!=="none"&&!c._data(this[a],"olddisplay")&&c._data(this[a],"olddisplay",d)}for(a=0;a<b;a++)this[a].style&&(this[a].style.display="none");return this},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a=="boolean";c.isFunction(a)&&c.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:c(this).is(":hidden");c(this)[b?"show":"hide"]()}):this.animate(L("toggle",3),a,b,d);return this},fadeTo:function(a,b,c,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},
-a,c,e)},animate:function(a,b,d,e){var g=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(g.complete,[false]);a=c.extend({},a);return this[g.queue===false?"each":"queue"](function(){g.queue===false&&c._mark(this);var b=c.extend({},g),d=this.nodeType===1,e=d&&c(this).is(":hidden"),j,k,l,m,o,p,q,r;b.animatedProperties={};for(l in a){j=c.camelCase(l);l!==j&&(a[j]=a[l],delete a[l]);k=a[j];c.isArray(k)?(b.animatedProperties[j]=k[1],k=a[j]=k[0]):b.animatedProperties[j]=b.specialEasing&&b.specialEasing[j]||
-b.easing||"swing";if(k==="hide"&&e||k==="show"&&!e)return b.complete.call(this);d&&(j==="height"||j==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],c.css(this,"display")==="inline"&&c.css(this,"float")==="none"&&(c.support.inlineBlockNeedsLayout?(m=wb(this.nodeName),m==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(l in a){d=
-new c.fx(this,b,l);k=a[l];Ud.test(k)?d[k==="toggle"?e?"show":"hide":k]():(o=Vd.exec(k),p=d.cur(),o?(q=parseFloat(o[2]),r=o[3]||(c.cssNumber[l]?"":"px"),r!=="px"&&(c.style(this,l,(q||1)+r),p=(q||1)/d.cur()*p,c.style(this,l,p+r)),o[1]&&(q=(o[1]==="-="?-1:1)*q+p),d.custom(p,q,r)):d.custom(p,k,""))}return true})},stop:function(a,b){a&&this.queue([]);this.each(function(){var a=c.timers,e=a.length;for(b||c._unmark(true,this);e--;)a[e].elem===this&&(b&&a[e](true),a.splice(e,1))});b||this.dequeue();return this}});
-c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(a,c,g){return this.animate(b,a,c,g)}});c.extend({speed:function(a,b,d){var e=a&&typeof a=="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration=="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;
-e.old=e.complete;e.complete=function(a){c.isFunction(e.old)&&e.old.call(this);e.queue!==false?c.dequeue(this):a!==false&&c._unmark(this)};return e},easing:{linear:function(a,b,c,e){return c+e*a},swing:function(a,b,c,e){return(-Math.cos(a*Math.PI)/2+0.5)*e+c}},timers:[],fx:function(a,b,c){this.options=b;this.elem=a;this.prop=c;b.orig=b.orig||{}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=
-null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=c.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,d){function e(a){return g.step(a)}var g=this,f=c.fx;this.startTime=la||yb();this.start=a;this.end=b;this.unit=d||this.unit||(c.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;e.elem=this.elem;e()&&c.timers.push(e)&&!Ia&&(Ia=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=
-c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=la||yb(),d=true,e=this.elem,g=this.options,f,h;if(a||b>=g.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();g.animatedProperties[this.prop]=true;for(f in g.animatedProperties)g.animatedProperties[f]!==
-true&&(d=false);if(d){g.overflow!=null&&!c.support.shrinkWrapBlocks&&c.each(["","X","Y"],function(a,b){e.style["overflow"+b]=g.overflow[a]});g.hide&&c(e).hide();if(g.hide||g.show)for(var i in g.animatedProperties)c.style(e,i,g.orig[i]);g.complete.call(e)}return false}g.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/g.duration,this.pos=c.easing[g.animatedProperties[this.prop]](this.state,h,0,1,g.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return true}};
-c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(Ia);Ia=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}});c.expr&&c.expr.filters&&(c.expr.filters.animated=function(a){return c.grep(c.timers,
-function(b){return a===b.elem}).length});var Wd=/^t(?:able|d|h)$/i,vc=/^(?:body|html)$/i;"getBoundingClientRect"in l.documentElement?c.fn.offset=function(a){var b=this[0],d;if(a)return this.each(function(b){c.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var g=b.ownerDocument,f=g.documentElement;if(!d||!c.contains(f,b))return d?{top:d.top,left:d.left}:{top:0,left:0};b=g.body;g=Pa(g);
-return{top:d.top+(g.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(g.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:c.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){c.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,g=b.ownerDocument,f=g.documentElement,h=
-g.body;d=(g=g.defaultView)?g.getComputedStyle(b,null):b.currentStyle;for(var i=b.offsetTop,j=b.offsetLeft;(b=b.parentNode)&&b!==h&&b!==f;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=g?g.getComputedStyle(b,null):b.currentStyle;i=i-b.scrollTop;j=j-b.scrollLeft;b===e&&(i=i+b.offsetTop,j=j+b.offsetLeft,c.offset.doesNotAddBorder&&(!c.offset.doesAddBorderForTableAndCells||!Wd.test(b.nodeName))&&(i=i+(parseFloat(d.borderTopWidth)||0),j=j+(parseFloat(d.borderLeftWidth)||0)),e=b.offsetParent);
-c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(i=i+(parseFloat(d.borderTopWidth)||0),j=j+(parseFloat(d.borderLeftWidth)||0))}if(d.position==="relative"||d.position==="static"){i=i+h.offsetTop;j=j+h.offsetLeft}c.offset.supportsFixedPosition&&d.position==="fixed"&&(i=i+Math.max(f.scrollTop,h.scrollTop),j=j+Math.max(f.scrollLeft,h.scrollLeft));return{top:i,left:j}};c.offset={initialize:function(){var a=l.body,b=l.createElement("div"),d,e,g,f=parseFloat(c.css(a,"marginTop"))||
-0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;g=d.nextSibling.firstChild.firstChild;
-this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=g.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==f;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();
-c.offset.doesNotIncludeMarginInBodyOffset&&(b=b+(parseFloat(c.css(a,"marginTop"))||0),d=d+(parseFloat(c.css(a,"marginLeft"))||0));return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");e==="static"&&(a.style.position="relative");var g=c(a),f=g.offset(),h=c.css(a,"top"),i=c.css(a,"left"),j={},k={},l,m;(e==="absolute"||e==="fixed")&&c.inArray("auto",[h,i])>-1?(k=g.position(),l=k.top,m=k.left):(l=parseFloat(h)||0,m=parseFloat(i)||0);c.isFunction(b)&&(b=b.call(a,d,f));b.top!=null&&
-(j.top=b.top-f.top+l);b.left!=null&&(j.left=b.left-f.left+m);"using"in b?b.using.call(a,j):g.css(j)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=vc.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top=d.top-(parseFloat(c.css(a,"marginTop"))||0);d.left=d.left-(parseFloat(c.css(a,"marginLeft"))||0);e.top=e.top+(parseFloat(c.css(b[0],"borderTopWidth"))||0);e.left=e.left+(parseFloat(c.css(b[0],"borderLeftWidth"))||0);return{top:d.top-
-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||l.body;a&&!vc.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(b){var g,f;if(b===k){g=this[0];if(!g)return null;return(f=Pa(g))?"pageXOffset"in f?f[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:g[d]}return this.each(function(){(f=Pa(this))?
-f.scrollTo(a?c(f).scrollLeft():b,a?b:c(f).scrollTop()):this[d]=b})}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){var a=this[0];return a&&a.style?parseFloat(c.css(a,d,"padding")):null};c.fn["outer"+b]=function(a){var b=this[0];return b&&b.style?parseFloat(c.css(b,d,a?"margin":"border")):null};c.fn[d]=function(a){var g=this[0];if(!g)return a==null?null:this;if(c.isFunction(a))return this.each(function(b){var f=c(this);f[d](a.call(this,b,f[d]()))});if(c.isWindow(g)){var f=
-g.document.documentElement["client"+b],h=g.document.body;return g.document.compatMode==="CSS1Compat"&&f||h&&h["client"+b]||f}if(g.nodeType===9)return Math.max(g.documentElement["client"+b],g.body["scroll"+b],g.documentElement["scroll"+b],g.body["offset"+b],g.documentElement["offset"+b]);if(a===k){g=c.css(g,d);f=parseFloat(g);return c.isNaN(f)?g:f}return this.css(d,typeof a=="string"?a:a+"px")}});q.jQuery=q.$=c;var G={},z={names:[["tinco","parma","calma","quesse"],["ando","umbar","anga","ungwe"],["thule",
-"formen","harma","hwesta"],["anto","ampa","anca","unque"],["numen","malta","noldo","nwalme"],["ore","vala","anna","wilya"],["romen","arda","lambe","alda"],["silme","silme-nuquerna","esse","esse-nuquerna"],["hyarmen","hwesta-sindarinwa","yanta","ure"],["halla","short-carrier","long-carrier","round-carrier"],["tinco-extended","parma-extended","calma-extended","quesse-extended"]],aliases:{vilya:"wilya",aha:"harma"},tengwar:{tinco:"1",parma:"q",calma:"a",quesse:"z",ando:"2",umbar:"w",anga:"s",ungwe:"x",
-thule:"3",formen:"e",harma:"d",hwesta:"c",anto:"4",ampa:"r",anca:"f",unque:"v",numen:"5",malta:"t",noldo:"g",nwalme:"b",ore:"6",vala:"y",anna:"h",wilya:"n",romen:"7",arda:"u",lambe:"j",alda:"m",silme:"8","silme-nuquerna":"i",esse:"k","esse-nuquerna":",",hyarmen:"9","hwesta-sindarinwa":"o",yanta:"l",ure:".",halla:"\u00bd","short-carrier":"`","long-carrier":"~","round-carrier":"]","tinco-extended":"!","parma-extended":"Q","calma-extended":"A","quesse-extended":"Z",comma:"=","full-stop":"-","exclamation-point":"\u00c1",
-"question-mark":"\u00c0","open-paren":"&#140;","close-paren":"&#156;","flourish-left":"&#286;","flourish-right":"&#287;"},tehtar:{a:"#EDC",e:"$RFV",i:"%TGB",o:"^YHN",u:"& U J M &#256; &#257; &#258; &#259;".split(" "),"\u00f3":["&#260;","&#261;","&#262;","&#263;"],"\u00fa":["&#264;","&#265;","&#266;","&#267;"],"\u00ed":["&#212;","&#213;","&#214;","&#215;"],w:"\u00e8\u00e9\u00ea\u00eb",y:"\u00cc\u00cd\u00ce\u00cf\u00b4",s:{special:!0,tinco:"+",ando:"+",numen:"+",lambe:"_",calma:"|",quesse:"|","short-carrier":"}"},
-"s-inverse":{special:!0,tinco:"\u00a1"},"s-extended":{special:!0,tinco:"&#199;"},"s-flourish":{special:!0,tinco:"&#163;",lambe:"&#165;"},"tilde-above":"Pp","tilde-below":[":",";","&#176;"],"tilde-high-above":")0","tilde-far-below":"?/","bar-above":"{[","bar-below":['"',"'","&#184;"],"bar-high-above":"\u00ec\u00ee","bar-far-below":"\u00ed\u00ef"},barsAndTildes:"tilde-above tilde-below tilde-high-above tilde-far-below bar-above bar-below bar-high-above bar-high-below".split(" "),tehtaPositions:{tinco:{o:3,
-w:3,others:2},parma:{o:3,w:3,others:2},calma:{o:3,w:3,u:3,others:2},quesse:{o:3,w:3,others:2},ando:{wide:!0,e:1,o:2,"\u00f3":1,"\u00fa":1,others:0},umbar:{wide:!0,e:1,o:2,"\u00f3":1,"\u00fa":1,others:0},anga:{wide:!0,e:1,"\u00f3":1,"\u00fa":1,others:0},ungwe:{wide:!0,e:1,o:1,"\u00f3":1,"\u00fa":1,others:0},thule:{others:3},formen:3,harma:{e:0,o:3,u:7,"\u00f3":2,"\u00fa":2,w:0,others:1},hwesta:{e:0,o:3,u:7,w:0,others:1},anto:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},ampa:{wide:!0,"\u00f3":1,"\u00fa":1,
-others:0},anca:{wide:!0,u:7,"\u00f3":1,"\u00fa":1,others:0},unque:{wide:!0,u:7,others:0},numen:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},malta:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},noldo:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},nwalme:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},ore:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},vala:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},anna:{e:3,o:3,u:3,"\u00f3":2,"\u00fa":2,others:1},wilya:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},romen:{e:3,o:3,u:3,"\u00f3":2,
-"\u00fa":2,y:null,others:1},arda:{a:1,e:3,i:1,o:3,u:3,"\u00ed":1,"\u00f3":2,"\u00fa":2,y:null,others:0},lambe:{wide:!0,e:1,y:4,"\u00f3":1,"\u00fa":1,others:0},alda:{wide:!0,others:1},silme:{y:3,others:null},"silme-nuquerna":{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,y:null,others:1},esse:{y:null,others:null},"esse-nuquerna":{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},hyarmen:3,"hwesta-sindarinwa":{o:2,u:2,"\u00f3":1,"\u00fa":2,others:0},yanta:{e:3,o:3,u:3,"\u00f3":2,"\u00fa":2,others:1},ure:{e:3,o:3,u:3,
-"\u00f3":3,"\u00fa":3,others:1},halla:{others:null},"short-carrier":3,"long-carrier":{y:null,others:3},"round-carrier":3,"tinco-extended":3,"parma-extended":3,"calma-extended":{o:3,u:7,"\u00f3":2,"\u00fa":2,others:1},"quesse-extended":{o:0,u:7,others:1}},punctuation:{"-":"comma",",":"comma",":":"comma",";":"full-stop",".":"full-stop","!":"exclamation-point","?":"question-mark","(":"open-paren",")":"close-paren",">":"flourish-left","<":"flourish-right"},annotations:{tinco:{tengwa:"t"},parma:{tengwa:"p"},
-calma:{tengwa:"c"},quesse:{tengwa:"c"},ando:{tengwa:"d"},umbar:{tengwa:"b"},anga:{tengwa:"ch"},ungwe:{tengwa:"g"},thule:{tengwa:"th"},formen:{tengwa:"f"},hyarmen:{tengwa:"h"},hwesta:{tengwa:"kh"},unque:{tengwa:"gh"},anto:{tengwa:"dh"},anca:{tengwa:"j"},ampa:{tengwa:"v"},numen:{tengwa:"n"},malta:{tengwa:"m"},nwalme:{tengwa:"\u00f1"},romen:{tengwa:"r"},ore:{tengwa:"-r"},lambe:{tengwa:"l"},silme:{tengwa:"s"},"silme-nuquerna":{tengwa:"s"},esse:{tengwa:"z"},"esse-nuquerna":{tengwa:"z"},harma:{tengwa:"sh"},
-alda:{tengwa:"lh"},arda:{tengwa:"rh"},wilya:{tengwa:"a"},vala:{tengwa:"w"},anna:{tengwa:"i"},vala:{tengwa:"w"},yanta:{tengwa:"e"},"hwesta-sindarinwa":{tengwa:"wh"},s:{following:"s"},"s-inverse":{following:"s<sub>2</sub>"},"s-extended":{following:"s<sub>3</sub>"},"s-flourish":{following:"s<sub>4</sub>"},"long-carrier":{tengwa:"\u00b4"},"short-carrier":{},"tilde-above":{above:"nm\u00f1-"},"tilde-below":{below:"2"},a:{"tehta-above":"a"},e:{"tehta-above":"e"},i:{"tehta-above":"i"},o:{"tehta-above":"o"},
-u:{"tehta-above":"u"},"\u00f3":{"tehta-above":"\u00f3"},"\u00fa":{"tehta-above":"\u00fa"},"\u00ed":{"tehta-above":"y"},y:{"tehta-below":"y"},w:{"tehta-above":"w"},"full-stop":{tengwa:"."},"exclamation-point":{tengwa:"!"},"question-mark":{tengwa:"?"},comma:{tengwa:"-"},"open-paren":{tengwa:"("},"close-paren":{tengwa:")"},"flourish-left":{tengwa:"\u201c"},"flourish-right":{tengwa:"\u201d"}}};G.encode=function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){var b=
-[];a.above&&b.push(a.above);a.below&&b.push(a.below);a.following&&b.push(a.following);a.tildeAbove&&b.push("tilde-above");a.tildeBelow&&b.push("tilde-below");return b.length?a.tengwa+":"+b.join(","):a.tengwa}).join(";")}).join(" ")}).join("\n")}).join("\n\n")}).join("\n\n\n")};G.decode=function(a){return a.split("\n\n\n").map(function(a){return a.split("\n\n").map(function(a){return a.split("\n").map(function(a){return a.split(" ").map(kb)})})})};G.decodeWord=kb;G.transcribe=function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){var b=
-a.tengwa||"anna",c=[];a.above&&c.push(a.above);a.below&&c.push(a.below);a.tildeBelow&&c.push("tilde-below");a.tildeAbove&&c.push("tilde-above");a.following&&c.push(a.following);c=z.tengwar[b]+c.map(function(a){return mb(b,a)}).join("");a.errors&&(c='<abbr class="error" title="'+a.errors.join("\n").replace(/"/g,"&quot;")+'">'+c+"</abbr>");return c}).join("")}).join(" ")}).join("\n")}).join("\n\n")}).join("\n\n\n")};G.tehtaForTengwa=mb;G.makeColumn=lb;var D=function(a,b,c){this.above=b;this.tildeAbove=
-void 0;this.tengwa=a;this.tildeBelow=void 0;this.below=c;this.error=this.following=void 0};D.prototype.canAddAbove=function(){return!this.above||("silme"===this.tengwa||"esse"===this.tengwa)&&!this.below};D.prototype.addAbove=function(a){"silme"===this.tengwa&&(this.tengwa="silme-nuquerna");"esse"===this.tengwa&&(this.tengwa="esse-nuquerna");this.above=a;return this};D.prototype.canAddBelow=function(){return!this.below&&"silme-nuquerna"!==this.tengwa};D.prototype.addBelow=function(a){this.below=a;
-return this};D.prototype.addTildeAbove=function(){this.tildeAbove=true;return this};D.prototype.addTildeBelow=function(){this.tildeBelow=true;return this};D.prototype.addFollowing=function(a){this.following=a;return this};D.prototype.addError=function(a){this.errors=this.errors||[];this.errors.push(a);return this};var ga={module$exports:function(a,b){b=b||function(a){throw Error(a);};return function(c){var e,g=a.apply(null,[function(a){e=a;var c=b;return function(a){""!==a&&c("Unexpected "+JSON.stringify(a));
-return function n(){return n}}}].concat(Array.prototype.slice.call(arguments,1)));for(Array.prototype.forEach.call(c,function(a){g=g(a)});!e;)g=g("");return e}}};ga.module$exports&&(ga=ga.module$exports);var ha={module$exports:function(a){return a.replace(Xd,function(a,c){return wc[c]})}},wc={k:"c",x:"cs",qu:"cw",q:"cw",ph:"f",bh:"v","\u00eb":"e","\u00e2":"\u00e1","\u00ea":"\u00e9","\u00ee":"\u00ed","\u00f4":"\u00f3","\u00fb":"\u00fa"},Xd=RegExp("("+Object.keys(wc).join("|")+")","ig");ha.module$exports&&
-(ha=ha.module$exports);var ia={module$exports:{"-":"comma",",":"comma",":":"comma",";":"full-stop",".":"full-stop","!":"exclamation-point","?":"question-mark","(":"open-paren",")":"close-paren",">":"flourish-left","<":"flourish-right"}};ia.module$exports&&(ia=ia.module$exports);var ja={},yc=G,Yd=ga,zc=ha,pb=ia,xc={};ja.transcribe=function(a,b){b=Ka(b);return b.font.transcribe(La(a,b))};ja.encode=function(a,b){b=Ka(b);return b.font.encode(La(a,b))};ja.parse=La;var ob={iant:"yanta;tinco:a,tilde-above",
-iaur:"yanta;vala:a;ore",baranduiniant:"umbar;romen:a;ando:a,tilde-above;anna:u;yanta;anto:a,tilde-above",ioreth:"yanta;romen:o;thule:e",noldo:"nwalme;lambe:o;ando;short-carrier:o",noldor:"nwalme;lambe:o;ando;ore:o",is:"short-carrier:i,s"},Ac=Yd(function(a,b){return qb(a,b,[])}),Ma="aeiou\u00f3\u00fa",ka={"\u00e1":"a","\u00e9":"e","\u00ed":"i","\u00f3":"o","\u00fa":"u"};ja.parseTengwaAnnotations=Y;var Bc=["tinco","parma","short-carrier","lambe"],Ja={},Dc=G,Zd=ga,Fc=ha,sb=ia,Cc={};Ja.transcribe=function(a,
-b){b=Na(b);return b.font.transcribe(Oa(a,b))};Ja.encode=function(a,b){b=Na(b);return b.font.encode(Oa(a,b))};Ja.parse=Oa;var Ec=Zd(function(a,b){return tb(a,b,[])}),vb="aeiouy\u00e1\u00e9\u00ed\u00f3\u00fa";$(function(){$(".tengwar").each(function(){var a=jQuery(this),b=a.data();b.encoding?a.html(G.transcribe(b.enconding)):b.tengwar&&a.html(("general-use"===(b.mode||"general-use")?ja:Ja).transcribe(b.tengwar))})})})();
diff --git a/notation.js b/notation.js
new file mode 100644 (file)
index 0000000..dea342a
--- /dev/null
@@ -0,0 +1,80 @@
+
+exports.encode = encode;
+function encode(sections) {
+    return sections.map(function (section) {
+        return section.map(function (paragraph) {
+            return paragraph.map(function (line) {
+                return line.map(function (word) {
+                    return word.map(function (column) {
+                        var parts = [];
+                        if (column.above)
+                            parts.push(column.above);
+                        if (column.below)
+                            parts.push(column.below);
+                        if (column.following)
+                            parts.push(column.following);
+                        if (column.tildeAbove)
+                            parts.push("tilde-above");
+                        if (column.tildeBelow)
+                            parts.push("tilde-below");
+                        if (parts.length) {
+                            return column.tengwa + ":" + parts.join(",");
+                        } else {
+                            return column.tengwa;
+                        }
+                    }).join(";");
+                }).join(" ");;
+            }).join("\n");
+        }).join("\n\n");
+    }).join("\n\n\n");
+}
+
+exports.decode = decode;
+function decode(encoding, makeColumn) {
+    return encoding.split("\n\n\n").map(function (section) {
+        return section.split("\n\n").map(function (paragraph) {
+            return paragraph.split("\n").map(function (line) {
+                return line.split(" ").map(function (word) {
+                    return decodeWord(word, makeColumn);
+                });
+            });
+        });
+    });
+}
+
+exports.decodeWord = decodeWord;
+function decodeWord(word, makeColumn) {
+    return word.split(";").map(function (column) {
+        var parts = column.split(":");
+        var tengwa = parts.shift();
+        var tehtar = parts.length ? parts.shift().split(",") : [];
+        var result = makeColumn(tengwa);
+        tehtar.forEach(function (tehta) {
+            if (tehta === "tilde-above") {
+                result.addTildeAbove();
+            } else if (tehta === "tilde-below") {
+                result.addBarBelow();
+            } else if (tehta === "y") {
+                result.addBelow("y");
+            } else if (
+                tehta === "s" ||
+                tehta === "s-inverse" ||
+                tehta === "s-extended" ||
+                tehta === "s-flourish"
+            ) {
+                if (
+                    tehta === "s" &&
+                    (tengwa === "calma" || tengwa === "quesse")
+                ) {
+                    result.addBelow(tehta);
+                } else {
+                    result.addFollowing(tehta);
+                }
+            } else {
+                result.addAbove(tehta);
+            }
+        });
+        return result;
+    });
+}
+
index 3708b35..83cdf39 100644 (file)
@@ -521,83 +521,6 @@ var Font = {
     }
 };
 
-exports.encode = encode;
-function encode(sections) {
-    return sections.map(function (section) {
-        return section.map(function (paragraph) {
-            return paragraph.map(function (line) {
-                return line.map(function (word) {
-                    return word.map(function (column) {
-                        var parts = [];
-                        if (column.above)
-                            parts.push(column.above);
-                        if (column.below)
-                            parts.push(column.below);
-                        if (column.following)
-                            parts.push(column.following);
-                        if (column.tildeAbove)
-                            parts.push("tilde-above");
-                        if (column.tildeBelow)
-                            parts.push("tilde-below");
-                        if (parts.length) {
-                            return column.tengwa + ":" + parts.join(",");
-                        } else {
-                            return column.tengwa;
-                        }
-                    }).join(";");
-                }).join(" ");;
-            }).join("\n");
-        }).join("\n\n");
-    }).join("\n\n\n");
-}
-
-exports.decode = decode;
-function decode(encoding) {
-    return encoding.split("\n\n\n").map(function (section) {
-        return section.split("\n\n").map(function (paragraph) {
-            return paragraph.split("\n").map(function (line) {
-                return line.split(" ").map(decodeWord);
-            });
-        });
-    });
-}
-
-exports.decodeWord = decodeWord;
-function decodeWord(word) {
-    return word.split(";").map(function (column) {
-        var parts = column.split(":");
-        var tengwa = parts.shift();
-        var tehtar = parts.length ? parts.shift().split(",") : [];
-        var result = makeColumn(tengwa);
-        tehtar.forEach(function (tehta) {
-            if (tehta === "tilde-above") {
-                result.addTildeAbove();
-            } else if (tehta === "tilde-below") {
-                result.addBarBelow();
-            } else if (tehta === "y") {
-                result.addBelow("y");
-            } else if (
-                tehta === "s" ||
-                tehta === "s-inverse" ||
-                tehta === "s-extended" ||
-                tehta === "s-flourish"
-            ) {
-                if (
-                    tehta === "s" &&
-                    (tengwa === "calma" || tengwa === "quesse")
-                ) {
-                    result.addBelow(tehta);
-                } else {
-                    result.addFollowing(tehta);
-                }
-            } else {
-                result.addAbove(tehta);
-            }
-        });
-        return result;
-    });
-}
-
 exports.transcribe = transcribe;
 function transcribe(sections) {
     return sections.map(function (section) {
diff --git a/vanilla-tengwar.build.sh b/vanilla-tengwar.build.sh
new file mode 100644 (file)
index 0000000..559a251
--- /dev/null
@@ -0,0 +1,19 @@
+
+(
+    echo '(function () {'
+    closure --process_common_js_modules \
+        --common_js_entry_module vanilla-tengwar.js \
+        --js \
+            vanilla-tengwar.js \
+            general-use.js \
+            classical.js \
+            tengwar-annatar.js \
+            parser.js \
+            normalize.js \
+            punctuation.js
+    echo '})();'
+) | closure > vanilla-tengwar.min.js
+
+wc -c vanilla-tengwar.min.js
+cat vanilla-tengwar.min.js | gzip | wc -c
+
diff --git a/vanilla-tengwar.html b/vanilla-tengwar.html
new file mode 100644 (file)
index 0000000..c059d71
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+    <head>
+        <link rel="stylesheet" type="text/css" href="custom-webfont.css">
+        <script src="node_modules/mr/bootstrap.js" data-module="vanilla-tengwar"></script>
+    </head>
+    <body>
+        <p class="tengwar" data-tengwar="ainaldo" data-mode="classical"></p>
+    </body>
+</html>
diff --git a/vanilla-tengwar.js b/vanilla-tengwar.js
new file mode 100644 (file)
index 0000000..226a82d
--- /dev/null
@@ -0,0 +1,24 @@
+
+var GeneralUse = require("./general-use");
+var Classical = require("./classical");
+var TengwarAnnatar = require("./tengwar-annatar");
+
+var array_ = Array.prototype;
+
+document.addEventListener("DOMContentLoaded", function onload() {
+    if (document.body.dataset && document.querySelectorAll && array_.forEach) {
+        var elements = document.querySelectorAll(".tengwar");
+        array_.forEach.call(elements, function (element) {
+            var data = element.dataset;
+            if (data.encoding) {
+                element.innerText = TengwarAnnatar.transcribe(data.encoding);
+            } else if (data.tengwar) {
+                var mode = data.mode || 'general-use';
+                var Mode = mode === 'general-use' ? GeneralUse : Classical;
+                element.innerText = Mode.transcribe(data.tengwar);
+            }
+        });
+    }
+    document.removeEventListener("DOMContentLoaded", onload);
+});
+
diff --git a/vanilla-tengwar.min.html b/vanilla-tengwar.min.html
new file mode 100644 (file)
index 0000000..73ff03d
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+    <head>
+        <link rel="stylesheet" type="text/css" href="custom-webfont.css">
+        <script src="vanilla-tengwar.min.js"></script>
+    </head>
+    <body>
+        <p class="tengwar" data-tengwar="ainaldo" data-mode="classical"></p>
+    </body>
+</html>
diff --git a/vanilla-tengwar.min.js b/vanilla-tengwar.min.js
new file mode 100644 (file)
index 0000000..a8ac74d
--- /dev/null
@@ -0,0 +1,40 @@
+(function(){function y(a){return a.split(";").map(function(a){var a=a.split(":"),c=a.shift(),a=a.length?a.shift().split(","):[],f=z(c);a.forEach(function(d){"tilde-above"===d?f.addTildeAbove():"tilde-below"===d?f.addBarBelow():"y"===d?f.addBelow("y"):"s"===d||"s-inverse"===d||"s-extended"===d||"s-flourish"===d?"s"===d&&("calma"===c||"quesse"===c)?f.addBelow(d):f.addFollowing(d):f.addAbove(d)});return f})}function A(a,e){var c;c=g.tehtaPositions;if(!g.tehtar[e])throw Error("No tehta for: "+JSON.stringify(e));
+c=g.tehtar[e].special&&!g.tehtar[e][a]?null:0<=g.barsAndTildes.indexOf(e)?0<=["lambe","alda"].indexOf(a)&&2<=g.tehtar[e].length?2:c[a].wide?0:1:void 0!==c[a]?void 0!==c[a][e]?c[a][e]:void 0!==c[a].others?c[a].others:c[a]:0;return null===c?null:g.tehtar[e][a]||g.tehtar[e][c]||""}function z(a,e,c){return new i(a,e,c)}function t(a){a=a||L;return{font:a.font||M,doubleNasalsWithTildeBelow:a.doubleNasalsWithTildeBelow,noAchLaut:a.noAchLaut}}function u(a,e){var e=t(e),c=e.font,f=c.makeColumn;return a.split(/\n\n\n+/).map(function(d){return d.split(/\n\n/).map(function(b){return b.split(/\n/).map(function(b){var d=
+[],h=[];b.toLowerCase().replace(/([\w\u00e1\u00e9\u00ed\u00f3\u00fa\u00eb\u00e2\u00ea\u00ee\u00f4\u00fb\u00f1']+)|(.)/g,function(b,a,q){if(a){a=O(a);try{B[a]?h.push.apply(h,c.decodeWord(B[a])):h.push.apply(h,P(a,e))}catch(p){h.push(f().addError("Cannot transcribe "+JSON.stringify(h)+" because "+p.message))}}else C[q]?h.push(f(C[q])):" "===q?(d.push(h),h=[]):h.push(f().addError("Cannot transcribe "+JSON.stringify(q)))});h.length&&d.push(h);return d})})})}function D(a,e,c){var f=function(b){return b.length?
+D(a,e,c.concat(b),b[b.length-1]):a(c)},d=function(d){return r[d]?b("long-carrier").addAbove(r[d]):b("short-carrier").addAbove(d)},b=e.font.makeColumn,p=function(b){var a=function(a){return a?b?-1!==v.indexOf(b)&&a.canAddAbove()?(a.addAbove(b),k(function(a){return f([a])},a)):k(function(a){return f([d(b),a])},a):k(function(a){return f([a])},a):b?k(function(a){return f([a])},d(b)):f([])},c=e.font.makeColumn;return function(d){return"n"===d?function(b){return"n"===b?e.doubleNasalsWithTildeBelow?a(c("numen").addTildeBelow()):
+a(c("numen").addTildeAbove()):"t"===b?function(b){return"h"===b?a(c("thule").addTildeAbove()):a(c("tinco").addTildeAbove())(b)}:"d"===b?a(c("ando").addTildeAbove()):"c"===b?a(c("quesse").addTildeAbove()):"g"===b?a(c("ungwe").addTildeAbove()):"j"===b?a(c("anca").addTildeAbove()):"w"===b?a(c("nwalme").addAbove("w")):a(c("numen"))(b)}:"m"===d?function(b){return"m"===b?e.doubleNasalsWithTildeBelow?a(c("malta").addTildeBelow()):a(c("malta").addTildeAbove()):"p"===b?a(c("parma").addTildeAbove()):"b"===
+b?a(c("umbar").addTildeAbove()):"f"===b?a(c("formen").addTildeAbove()):"v"===b?a(c("ampa").addTildeAbove()):a(c("malta"))(b)}:"\u00f1"===d?function(b){return"c"===b?a(c("quesse").addTildeAbove()):"g"===b?a(c("ungwe").addTildeAbove()):a(c("nwalme"))(b)}:"t"===d?function(b){return"t"===b?a(c("tinco").addTildeBelow()):"h"===b?a(c("thule")):a(c("tinco"))(b)}:"p"===d?function(b){return"p"===b?a(c("parma").addTildeBelow()):a(c("parma"))(b)}:"c"===d?function(b){return"c"===b?a(c("calma")):"h"===b?e.noAchLaut?
+a(c("calma")):a(c("hwesta")):a(c("quesse"))(b)}:"d"===d?function(b){return"d"===b?a(c("ando").addTildeBelow()):"h"===b?a(c("anto")):a(c("ando"))(b)}:"b"===d?function(b){return"b"===b?a(c("umbar").addTildeBelow()):a(c("umbar"))(b)}:"g"===d?function(b){return"g"===b?a(c("ungwe").addTildeBelow()):"h"===b?a(c("unque")):a(c("ungwe"))(b)}:"f"===d?function(b){return"f"===b?a(c("formen").addTildeBelow()):a(c("formen"))(b)}:"v"===d?a(c("ampa")):"j"===d?a(c("anca")):"s"===d?function(b){return"s"===b?a(c("silme").addTildeBelow()):
+"h"===b?a(c("harma")):a(c("silme"))(b)}:"z"===d?function(b){return"z"===b?a(c("esse").addTildeBelow()):a(c("esse"))(b)}:"h"===d?function(b){return"w"===b?a(c("hwesta-sindarinwa")):a(c("hyarmen"))(b)}:"r"===d?function(b){return"r"===b?a(c("romen").addTildeBelow()):"h"===b?a(c("arda")):""===b?a(c("ore"))(b):a(c("romen"))(b)}:"l"===d?function(b){return"l"===b?a(c("lambe").addTildeBelow()):"h"===b?a(c("alda")):a(c("lambe"))(b)}:"i"===d?a(c("anna")):"u"===d?a(c("vala")):"w"===d?function(b){return"h"===
+b?a(c("hwesta-sindarinwa")):a(c("vala"))(b)}:"e"===d&&(!b||"a"===b)?a(c("yanta")):"y"===d?a(c("wilya").addBelow("y")):"\u00e1"===d?a(c("wilya").addAbove("a")):r[d]&&-1==v.indexOf(d)?a(c("long-carrier").addAbove(r[d])):a()(d)}};return function(b){return-1!==v.indexOf(b)?p(b):p()(b)}}function k(a,e){var c=function(c){var d=function(b){return"quesse"===b.tengwa&&b.canAddBelow()?function(c){return"s"===c?a(b.addBelow("s")):a(b)(c)}:-1!==Q.indexOf(b.tengwa)?function(c){return"s"===c?E(function(c){return function(d){return""===
+d?(0===c?b.addFollowing("s"):1===c?b.addFollowing("s-inverse"):2===c?b.addFollowing("s-extended"):3===c?b.addFollowing("s-flourish"):b.addFollowing("s-flourish").addError("Following S only has 3 alternate flourishes."),a(b)(d)):a(b)("s")(d)}}):a(b)(c)}:a(b)};return function(b){return"y"===b&&c.canAddBelow()?d(c.addBelow("y")):d(c)(b)}};return e.canAddAbove()?function(a){return"w"===a?c(e.addAbove("w")):c(e)(a)}:c(e)}function E(a,e){e=e||0;return function(c){return"'"===c?E(a,e+1):a(e)(c)}}function w(a){a=
+a||R;return{font:a.font||S,vilya:a.vilya,harma:a.harma,classical:a.classical,iuRising:a.isRising,longHalla:a.longHalla}}function x(a,e){var e=w(e),c=e.font.makeColumn;return a.split(/\n\n\n+/).map(function(a){return a.split(/\n\n/).map(function(a){return a.split(/\n/).map(function(b){var a=[],d=[];b.toLowerCase().replace(/([\w\u00e1\u00e9\u00ed\u00f3\u00fa\u00eb\u00e2\u00ea\u00ee\u00f4\u00fb\u00f1']+)|(.)/g,function(b,f,g){if(f)try{d.push.apply(d,T(U(f),e))}catch(i){d.push(c().addError("Cannot transcribe "+
+JSON.stringify(f)+" because "+i.message))}else F[g]?d.push(c(F[g])):" "===g?(a.push(d),d=[]):d.push(c().addError("Cannot transcribe "+JSON.stringify(g)))});d.length&&a.push(d);return a})})})}function G(a,e,c,f){var d=function(b){var d=b.pop();return H(function(d){d=b.concat(d).filter(Boolean);return d.length?G(a,e,c.concat(d),d[d.length-1]):a(c)},e,d)},b=e.font.makeColumn;return function(a){return"n"===a?function(a){return"n"===a?d([b("numen").addTildeBelow()]):"t"===a?d([b("tinco")]):"d"===a?d([b("ando")]):
+"g"===a?function(a){return"w"===a?d([b("ungwe")]):d([b("anga")])(a)}:"c"===a?function(a){return"w"===a?d([b("unque")]):d([b("anca")])(a)}:d([b("numen")])(a)}:"m"===a?function(a){return"m"===a?d([b("malta").addTildeBelow()]):"p"===a?d([b("ampa")]):"b"===a?d([b("umbar")]):d([b("malta")])(a)}:"\u00f1"===a?function(a){return"g"===a?function(a){return"w"===a?d([b("ungwe")]):d([b("anga")])(a)}:"c"===a?function(a){return"w"===a?d([b("unque")]):d([b("anca")])}:d([b("noldo")])(a)}:"t"===a?function(a){return"t"===
+a?function(a){return"y"===a?d([b("tinco").addBelow("y").addTildeBelow()]):d([b("tinco").addTildeBelow()])(a)}:"y"===a?d([b("tinco").addBelow("y")]):"h"===a?d([b("thule")]):"s"===a?function(a){return""===a?d([b("tinco").addFollowing("s")])(a):d([b("tinco"),b("silme")])(a)}:d([b("tinco")])(a)}:"p"===a?function(a){return"p"===a?function(a){return"y"===a?d([b("parma").addBelow("y").addTildeBelow()]):d([b("parma").addTildeBelow()])(a)}:"y"===a?d([b("parma").addBelow("y")]):"s"===a?function(a){return""===
+a?d([b("parma").addFollowing("s")])(a):d([b("parma"),b("silme")])(a)}:d([b("parma")])(a)}:"c"===a?function(a){return"c"===a?d([b("calma").addTildeBelow()]):"s"===a?d([b("calma").addBelow("s")]):"h"===a?d([b("harma")]):"w"===a?d([b("quesse")]):d([b("calma")])(a)}:"f"===a?d([b("formen")]):"v"===a?e.vilya?d([b("wilya")]):d([b("vala")]):"w"===a?e.wilya?d([b("short-carrier").addAbove("u").addError("Before the introduction of vala, wilya was called vilya and represented the v sound.  There is no tengwa to represent consonantal w.")]):
+d([b("wilya")]):"r"===a?function(a){return"d"===a?d([b("arda")]):"h"===a?d([b("halla").addError("R should preceed H in the HR diagraph in Classical mode."),b("romen").addError("R should preceed H in the HR diagraph in Classical mode.")]):e.classical?f&&f.above&&""!==a&&-1!==I.indexOf(a)?d([b("ore")])(a):d([b("romen")])(a):""===a||-1===I.indexOf(a)?d([b("ore")])(a):d([b("romen")])(a)}:"l"===a?function(a){return"l"===a?function(a){return"y"===a?d([b("lambe").addBelow("y").addTildeBelow()]):d([b("lambe").addTildeBelow()])(a)}:
+"y"===a?d([b("lambe").addBelow("y")]):"h"===a?d([b("halla").addError("L should preceed H in the HL diagraph in Classical mode."),b("lambe").addError("L should preceed H in the HL diagraph in Classical mode.")]):"d"===a?d([b("alda")]):"b"===a?d([b("lambe"),b("umbar")]):d([b("lambe")])(a)}:"s"===a?function(a){return"s"===a?d([b("esse")]):d([b("silme")])(a)}:"h"===a?function(a){return"l"===a?d([b("halla"),b("lambe")]):"r"===a?d([b("halla"),b("romen")]):"w"===a?d([b("hwesta")]):"t"===a?d([b("harma")]):
+"y"===a?e.classical&&e.harma?d([b("hyarmen")]):d([b("hyarmen").addBelow("y")]):f?e.classical&&e.harma?d([b("harma")])(a):e.classical?d([b("hyarmen")])(a):d([b("harma")])(a):e.classical&&e.harma?d([b("harma")])(a):d([b("halla")])(a)}:"d"===a?d([b("ando").addError("D cannot appear except after N, L, or R")]):"b"===a?d([b("umbar").addError("B cannot appear except after M or L")]):"g"===a?d([b("anga").addError("G cannot appear except after N or \u00d1")]):"j"===a?d([b().addError("J cannot be transcribed in Classical Mode")]):
+d([])(a)}}function H(a,e,c){var f=e.font.makeColumn;return function(d){if("a"===d)return function(b){return"i"===b?a([c,f("yanta","a")]):"u"===b?a([c,f("ure","a")]):c&&c.canAddAbove()?(c.addAbove("a"),a([c])(b)):a([c,f("short-carrier","a")])(b)};if("e"===d)return function(b){return"u"===b?a([c,f("ure","e")]):c&&c.canAddAbove()?(c.addAbove("e"),a([c])(b)):a([c,f("short-carrier","e")])(b)};if("i"===d)return function(b){return"u"===b?e.iuRising?a([c,f("anna","u").addBelow("y")]):a([c,f("ure","i")]):
+c&&c.canAddAbove()?(c.addAbove("i"),a([c])(b)):a([c,f("short-carrier","i")])(b)};if("o"===d)return function(b){return"i"===b?a([c,f("yanta","o")]):c&&c.canAddAbove()?(c.addAbove("o"),a([c])(b)):a([c,f("short-carrier","o")])(b)};if("u"===d)return function(b){return"i"===b?a([c,f("yanta","u")]):c&&c.canAddAbove()?(c.addAbove("u"),a([c])(b)):a([c,f("short-carrier","u")])(b)};if("y"===d){if(c&&c.canAddBelow())return a([c.addBelow("y")]);d=f("anna").addBelow("y");return H(function(b){return a([c].concat(b))},
+e,d)}return"\u00e1"===d?a([c,f("long-carrier","a")]):"\u00e9"===d?a([c,f("long-carrier","e")]):"\u00ed"===d?a([c,f("long-carrier","i")]):"\u00f3"===d?c&&c.canAddAbove()?(c.addAbove("\u00f3"),a([c])):a([c,f("long-carrier","o")]):"\u00fa"===d?c&&c.canAddAbove()?(c.addAbove("\u00fa"),a([c])):a([c,f("long-carrier","u")]):a([c])(d)}}var j={},g={names:[["tinco","parma","calma","quesse"],["ando","umbar","anga","ungwe"],["thule","formen","harma","hwesta"],["anto","ampa","anca","unque"],["numen","malta","noldo",
+"nwalme"],["ore","vala","anna","wilya"],["romen","arda","lambe","alda"],["silme","silme-nuquerna","esse","esse-nuquerna"],["hyarmen","hwesta-sindarinwa","yanta","ure"],["halla","short-carrier","long-carrier","round-carrier"],["tinco-extended","parma-extended","calma-extended","quesse-extended"]],aliases:{vilya:"wilya",aha:"harma"},tengwar:{tinco:"1",parma:"q",calma:"a",quesse:"z",ando:"2",umbar:"w",anga:"s",ungwe:"x",thule:"3",formen:"e",harma:"d",hwesta:"c",anto:"4",ampa:"r",anca:"f",unque:"v",numen:"5",
+malta:"t",noldo:"g",nwalme:"b",ore:"6",vala:"y",anna:"h",wilya:"n",romen:"7",arda:"u",lambe:"j",alda:"m",silme:"8","silme-nuquerna":"i",esse:"k","esse-nuquerna":",",hyarmen:"9","hwesta-sindarinwa":"o",yanta:"l",ure:".",halla:"\u00bd","short-carrier":"`","long-carrier":"~","round-carrier":"]","tinco-extended":"!","parma-extended":"Q","calma-extended":"A","quesse-extended":"Z",comma:"=","full-stop":"-","exclamation-point":"\u00c1","question-mark":"\u00c0","open-paren":"&#140;","close-paren":"&#156;",
+"flourish-left":"&#286;","flourish-right":"&#287;"},tehtar:{a:"#EDC",e:"$RFV",i:"%TGB",o:"^YHN",u:"& U J M &#256; &#257; &#258; &#259;".split(" "),"\u00f3":["&#260;","&#261;","&#262;","&#263;"],"\u00fa":["&#264;","&#265;","&#266;","&#267;"],"\u00ed":["&#212;","&#213;","&#214;","&#215;"],w:"\u00e8\u00e9\u00ea\u00eb",y:"\u00cc\u00cd\u00ce\u00cf\u00b4",s:{special:!0,tinco:"+",ando:"+",numen:"+",lambe:"_",calma:"|",quesse:"|","short-carrier":"}"},"s-inverse":{special:!0,tinco:"\u00a1"},"s-extended":{special:!0,
+tinco:"&#199;"},"s-flourish":{special:!0,tinco:"&#163;",lambe:"&#165;"},"tilde-above":"Pp","tilde-below":[":",";","&#176;"],"tilde-high-above":")0","tilde-far-below":"?/","bar-above":"{[","bar-below":['"',"'","&#184;"],"bar-high-above":"\u00ec\u00ee","bar-far-below":"\u00ed\u00ef"},barsAndTildes:"tilde-above tilde-below tilde-high-above tilde-far-below bar-above bar-below bar-high-above bar-high-below".split(" "),tehtaPositions:{tinco:{o:3,w:3,others:2},parma:{o:3,w:3,others:2},calma:{o:3,w:3,u:3,
+others:2},quesse:{o:3,w:3,others:2},ando:{wide:!0,e:1,o:2,"\u00f3":1,"\u00fa":1,others:0},umbar:{wide:!0,e:1,o:2,"\u00f3":1,"\u00fa":1,others:0},anga:{wide:!0,e:1,"\u00f3":1,"\u00fa":1,others:0},ungwe:{wide:!0,e:1,o:1,"\u00f3":1,"\u00fa":1,others:0},thule:{others:3},formen:3,harma:{e:0,o:3,u:7,"\u00f3":2,"\u00fa":2,w:0,others:1},hwesta:{e:0,o:3,u:7,w:0,others:1},anto:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},ampa:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},anca:{wide:!0,u:7,"\u00f3":1,"\u00fa":1,others:0},
+unque:{wide:!0,u:7,others:0},numen:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},malta:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},noldo:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},nwalme:{wide:!0,"\u00f3":1,"\u00fa":1,others:0},ore:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},vala:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},anna:{e:3,o:3,u:3,"\u00f3":2,"\u00fa":2,others:1},wilya:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},romen:{e:3,o:3,u:3,"\u00f3":2,"\u00fa":2,y:null,others:1},arda:{a:1,e:3,i:1,o:3,u:3,
+"\u00ed":1,"\u00f3":2,"\u00fa":2,y:null,others:0},lambe:{wide:!0,e:1,y:4,"\u00f3":1,"\u00fa":1,others:0},alda:{wide:!0,others:1},silme:{y:3,others:null},"silme-nuquerna":{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,y:null,others:1},esse:{y:null,others:null},"esse-nuquerna":{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},hyarmen:3,"hwesta-sindarinwa":{o:2,u:2,"\u00f3":1,"\u00fa":2,others:0},yanta:{e:3,o:3,u:3,"\u00f3":2,"\u00fa":2,others:1},ure:{e:3,o:3,u:3,"\u00f3":3,"\u00fa":3,others:1},halla:{others:null},"short-carrier":3,
+"long-carrier":{y:null,others:3},"round-carrier":3,"tinco-extended":3,"parma-extended":3,"calma-extended":{o:3,u:7,"\u00f3":2,"\u00fa":2,others:1},"quesse-extended":{o:0,u:7,others:1}},punctuation:{"-":"comma",",":"comma",":":"comma",";":"full-stop",".":"full-stop","!":"exclamation-point","?":"question-mark","(":"open-paren",")":"close-paren",">":"flourish-left","<":"flourish-right"},annotations:{tinco:{tengwa:"t"},parma:{tengwa:"p"},calma:{tengwa:"c"},quesse:{tengwa:"c"},ando:{tengwa:"d"},umbar:{tengwa:"b"},
+anga:{tengwa:"ch"},ungwe:{tengwa:"g"},thule:{tengwa:"th"},formen:{tengwa:"f"},hyarmen:{tengwa:"h"},hwesta:{tengwa:"kh"},unque:{tengwa:"gh"},anto:{tengwa:"dh"},anca:{tengwa:"j"},ampa:{tengwa:"v"},numen:{tengwa:"n"},malta:{tengwa:"m"},nwalme:{tengwa:"\u00f1"},romen:{tengwa:"r"},ore:{tengwa:"-r"},lambe:{tengwa:"l"},silme:{tengwa:"s"},"silme-nuquerna":{tengwa:"s"},esse:{tengwa:"z"},"esse-nuquerna":{tengwa:"z"},harma:{tengwa:"sh"},alda:{tengwa:"lh"},arda:{tengwa:"rh"},wilya:{tengwa:"a"},vala:{tengwa:"w"},
+anna:{tengwa:"i"},vala:{tengwa:"w"},yanta:{tengwa:"e"},"hwesta-sindarinwa":{tengwa:"wh"},s:{following:"s"},"s-inverse":{following:"s<sub>2</sub>"},"s-extended":{following:"s<sub>3</sub>"},"s-flourish":{following:"s<sub>4</sub>"},"long-carrier":{tengwa:"\u00b4"},"short-carrier":{},"tilde-above":{above:"nm\u00f1-"},"tilde-below":{below:"2"},a:{"tehta-above":"a"},e:{"tehta-above":"e"},i:{"tehta-above":"i"},o:{"tehta-above":"o"},u:{"tehta-above":"u"},"\u00f3":{"tehta-above":"\u00f3"},"\u00fa":{"tehta-above":"\u00fa"},
+"\u00ed":{"tehta-above":"y"},y:{"tehta-below":"y"},w:{"tehta-above":"w"},"full-stop":{tengwa:"."},"exclamation-point":{tengwa:"!"},"question-mark":{tengwa:"?"},comma:{tengwa:"-"},"open-paren":{tengwa:"("},"close-paren":{tengwa:")"},"flourish-left":{tengwa:"\u201c"},"flourish-right":{tengwa:"\u201d"}}};j.encode=function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){var c=[];a.above&&c.push(a.above);a.below&&c.push(a.below);
+a.following&&c.push(a.following);a.tildeAbove&&c.push("tilde-above");a.tildeBelow&&c.push("tilde-below");return c.length?a.tengwa+":"+c.join(","):a.tengwa}).join(";")}).join(" ")}).join("\n")}).join("\n\n")}).join("\n\n\n")};j.decode=function(a){return a.split("\n\n\n").map(function(a){return a.split("\n\n").map(function(a){return a.split("\n").map(function(a){return a.split(" ").map(y)})})})};j.decodeWord=y;j.transcribe=function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){return a.map(function(a){var c=
+a.tengwa||"anna",d=[];a.above&&d.push(a.above);a.below&&d.push(a.below);a.tildeBelow&&d.push("tilde-below");a.tildeAbove&&d.push("tilde-above");a.following&&d.push(a.following);d=g.tengwar[c]+d.map(function(a){return A(c,a)}).join("");a.errors&&(d='<abbr class="error" title="'+a.errors.join("\n").replace(/"/g,"&quot;")+'">'+d+"</abbr>");return d}).join("")}).join(" ")}).join("\n")}).join("\n\n")}).join("\n\n\n")};j.tehtaForTengwa=A;j.makeColumn=z;var i=function(a,e,c){this.above=e;this.tildeAbove=
+void 0;this.tengwa=a;this.tildeBelow=void 0;this.below=c;this.error=this.following=void 0};i.prototype.canAddAbove=function(){return!this.above||("silme"===this.tengwa||"esse"===this.tengwa)&&!this.below};i.prototype.addAbove=function(a){"silme"===this.tengwa&&(this.tengwa="silme-nuquerna");"esse"===this.tengwa&&(this.tengwa="esse-nuquerna");this.above=a;return this};i.prototype.canAddBelow=function(){return!this.below&&"silme-nuquerna"!==this.tengwa};i.prototype.addBelow=function(a){this.below=a;
+return this};i.prototype.addTildeAbove=function(){this.tildeAbove=!0;return this};i.prototype.addTildeBelow=function(){this.tildeBelow=!0;return this};i.prototype.addFollowing=function(a){this.following=a;return this};i.prototype.addError=function(a){this.errors=this.errors||[];this.errors.push(a);return this};var l={module$exports:function(a,e){e=e||function(a){throw Error(a);};return function(c){var f,d=a.apply(null,[function(a){f=a;var d=e;return function(a){""!==a&&d("Unexpected "+JSON.stringify(a));
+return function N(){return N}}}].concat(Array.prototype.slice.call(arguments,1)));for(Array.prototype.forEach.call(c,function(a){d=d(a)});!f;)d=d("");return f}}};l.module$exports&&(l=l.module$exports);var m={module$exports:function(a){return a.replace(V,function(a,c){return J[c]})}},J={k:"c",x:"cs",qu:"cw",q:"cw",ph:"f",bh:"v","\u00eb":"e","\u00e2":"\u00e1","\u00ea":"\u00e9","\u00ee":"\u00ed","\u00f4":"\u00f3","\u00fb":"\u00fa"},V=RegExp("("+Object.keys(J).join("|")+")","ig");m.module$exports&&(m=
+m.module$exports);var n={module$exports:{"-":"comma",",":"comma",":":"comma",";":"full-stop",".":"full-stop","!":"exclamation-point","?":"question-mark","(":"open-paren",")":"close-paren",">":"flourish-left","<":"flourish-right"}};n.module$exports&&(n=n.module$exports);var o={},M=j,O=m,C=n,L={};o.transcribe=function(a,e){e=t(e);return e.font.transcribe(u(a,e))};o.encode=function(a,e){e=t(e);return e.font.encode(u(a,e))};o.parse=u;var B={iant:"yanta;tinco:a,tilde-above",iaur:"yanta;vala:a;ore",baranduiniant:"umbar;romen:a;ando:a,tilde-above;anna:u;yanta;anto:a,tilde-above",
+ioreth:"yanta;romen:o;thule:e",noldo:"nwalme;lambe:o;ando;short-carrier:o",noldor:"nwalme;lambe:o;ando;ore:o",is:"short-carrier:i,s"},P=l(function(a,e){return D(a,e,[])}),v="aeiou\u00f3\u00fa",r={"\u00e1":"a","\u00e9":"e","\u00ed":"i","\u00f3":"o","\u00fa":"u"};o.parseTengwaAnnotations=k;var Q=["tinco","parma","short-carrier","lambe"],s={},S=j,U=m,F=n,R={};s.transcribe=function(a,e){e=w(e);return e.font.transcribe(x(a,e))};s.encode=function(a,e){e=w(e);return e.font.encode(x(a,e))};s.parse=x;var T=
+l(function(a,e){return G(a,e,[])}),I="aeiouy\u00e1\u00e9\u00ed\u00f3\u00fa",K=Array.prototype;document.addEventListener("DOMContentLoaded",function e(){if(document.body.dataset&&document.querySelectorAll&&K.forEach){var c=document.querySelectorAll(".tengwar");K.forEach.call(c,function(c){var d=c.dataset;d.encoding?c.innerText=j.transcribe(d.encoding):d.tengwar&&(c.innerText=("general-use"===(d.mode||"general-use")?o:s).transcribe(d.tengwar))})}document.removeEventListener("DOMContentLoaded",e)})})();