govuk_publishing_components 17.17.0 → 17.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +7 -37
- data/app/assets/javascripts/govuk_publishing_components/components/govspeak.js +2 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +87 -45
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +18 -13
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- data/node_modules/eslint-module-utils/CHANGELOG.md +10 -0
- data/node_modules/eslint-module-utils/package.json +12 -12
- data/node_modules/eslint-module-utils/parse.js +8 -1
- data/node_modules/eslint-module-utils/unambiguous.js +2 -2
- data/node_modules/standard/node_modules/acorn/CHANGELOG.md +8 -0
- data/node_modules/standard/node_modules/acorn/dist/acorn.d.ts +1 -1
- data/node_modules/standard/node_modules/acorn/dist/acorn.js +14 -8
- data/node_modules/standard/node_modules/acorn/dist/acorn.mjs +14 -8
- data/node_modules/standard/node_modules/acorn/package.json +10 -10
- metadata +2 -4
- data/app/assets/javascripts/govuk_publishing_components/vendor/jquery-ui-1.10.2.custom.js +0 -1639
- data/app/assets/javascripts/govuk_publishing_components/vendor/jquery.player.min.js +0 -27
@@ -16,7 +16,7 @@ declare namespace acorn {
|
|
16
16
|
sourceType?: 'script' | 'module'
|
17
17
|
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
18
18
|
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
19
|
-
allowReserved?: boolean
|
19
|
+
allowReserved?: boolean | 'never'
|
20
20
|
allowReturnOutsideFunction?: boolean
|
21
21
|
allowImportExportEverywhere?: boolean
|
22
22
|
allowAwaitOutsideFunction?: boolean
|
@@ -32,9 +32,8 @@
|
|
32
32
|
// are only applied when a character is found to actually have a
|
33
33
|
// code point above 128.
|
34
34
|
// Generated by `bin/generate-identifier-regex.js`.
|
35
|
-
|
36
|
-
var
|
37
|
-
var nonASCIIidentifierChars = "\u200c\u200db7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
35
|
+
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
36
|
+
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
38
37
|
|
39
38
|
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
40
39
|
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
@@ -470,7 +469,7 @@
|
|
470
469
|
this.sourceFile = options.sourceFile;
|
471
470
|
this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
|
472
471
|
var reserved = "";
|
473
|
-
if (
|
472
|
+
if (options.allowReserved !== true) {
|
474
473
|
for (var v = options.ecmaVersion;; v--)
|
475
474
|
{ if (reserved = reservedWords[v]) { break } }
|
476
475
|
if (options.sourceType === "module") { reserved += " await"; }
|
@@ -3123,9 +3122,12 @@
|
|
3123
3122
|
|
3124
3123
|
// #table-binary-unicode-properties
|
3125
3124
|
var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
|
3125
|
+
var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
3126
|
+
var ecma11BinaryProperties = ecma10BinaryProperties;
|
3126
3127
|
var unicodeBinaryProperties = {
|
3127
3128
|
9: ecma9BinaryProperties,
|
3128
|
-
10:
|
3129
|
+
10: ecma10BinaryProperties,
|
3130
|
+
11: ecma11BinaryProperties
|
3129
3131
|
};
|
3130
3132
|
|
3131
3133
|
// #table-unicode-general-category-values
|
@@ -3133,9 +3135,12 @@
|
|
3133
3135
|
|
3134
3136
|
// #table-unicode-script-values
|
3135
3137
|
var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
|
3138
|
+
var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
|
3139
|
+
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
3136
3140
|
var unicodeScriptValues = {
|
3137
3141
|
9: ecma9ScriptValues,
|
3138
|
-
10:
|
3142
|
+
10: ecma10ScriptValues,
|
3143
|
+
11: ecma11ScriptValues
|
3139
3144
|
};
|
3140
3145
|
|
3141
3146
|
var data = {};
|
@@ -3155,13 +3160,14 @@
|
|
3155
3160
|
}
|
3156
3161
|
buildUnicodeData(9);
|
3157
3162
|
buildUnicodeData(10);
|
3163
|
+
buildUnicodeData(11);
|
3158
3164
|
|
3159
3165
|
var pp$8 = Parser.prototype;
|
3160
3166
|
|
3161
3167
|
var RegExpValidationState = function RegExpValidationState(parser) {
|
3162
3168
|
this.parser = parser;
|
3163
3169
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
|
3164
|
-
this.unicodeProperties = data[parser.options.ecmaVersion >=
|
3170
|
+
this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion];
|
3165
3171
|
this.source = "";
|
3166
3172
|
this.flags = "";
|
3167
3173
|
this.start = 0;
|
@@ -4908,7 +4914,7 @@
|
|
4908
4914
|
|
4909
4915
|
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
4910
4916
|
|
4911
|
-
var version = "6.2.
|
4917
|
+
var version = "6.2.1";
|
4912
4918
|
|
4913
4919
|
// The main exported interface (under `self.acorn` when in the
|
4914
4920
|
// browser) is a `parse` function that takes a code string and
|
@@ -26,9 +26,8 @@ var keywordRelationalOperator = /^in(stanceof)?$/;
|
|
26
26
|
// are only applied when a character is found to actually have a
|
27
27
|
// code point above 128.
|
28
28
|
// Generated by `bin/generate-identifier-regex.js`.
|
29
|
-
|
30
|
-
var
|
31
|
-
var nonASCIIidentifierChars = "\u200c\u200db7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
29
|
+
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
30
|
+
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
32
31
|
|
33
32
|
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
34
33
|
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
@@ -464,7 +463,7 @@ var Parser = function Parser(options, input, startPos) {
|
|
464
463
|
this.sourceFile = options.sourceFile;
|
465
464
|
this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
|
466
465
|
var reserved = "";
|
467
|
-
if (
|
466
|
+
if (options.allowReserved !== true) {
|
468
467
|
for (var v = options.ecmaVersion;; v--)
|
469
468
|
{ if (reserved = reservedWords[v]) { break } }
|
470
469
|
if (options.sourceType === "module") { reserved += " await"; }
|
@@ -3117,9 +3116,12 @@ types.name.updateContext = function(prevType) {
|
|
3117
3116
|
|
3118
3117
|
// #table-binary-unicode-properties
|
3119
3118
|
var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
|
3119
|
+
var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
3120
|
+
var ecma11BinaryProperties = ecma10BinaryProperties;
|
3120
3121
|
var unicodeBinaryProperties = {
|
3121
3122
|
9: ecma9BinaryProperties,
|
3122
|
-
10:
|
3123
|
+
10: ecma10BinaryProperties,
|
3124
|
+
11: ecma11BinaryProperties
|
3123
3125
|
};
|
3124
3126
|
|
3125
3127
|
// #table-unicode-general-category-values
|
@@ -3127,9 +3129,12 @@ var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connect
|
|
3127
3129
|
|
3128
3130
|
// #table-unicode-script-values
|
3129
3131
|
var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";
|
3132
|
+
var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";
|
3133
|
+
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
3130
3134
|
var unicodeScriptValues = {
|
3131
3135
|
9: ecma9ScriptValues,
|
3132
|
-
10:
|
3136
|
+
10: ecma10ScriptValues,
|
3137
|
+
11: ecma11ScriptValues
|
3133
3138
|
};
|
3134
3139
|
|
3135
3140
|
var data = {};
|
@@ -3149,13 +3154,14 @@ function buildUnicodeData(ecmaVersion) {
|
|
3149
3154
|
}
|
3150
3155
|
buildUnicodeData(9);
|
3151
3156
|
buildUnicodeData(10);
|
3157
|
+
buildUnicodeData(11);
|
3152
3158
|
|
3153
3159
|
var pp$8 = Parser.prototype;
|
3154
3160
|
|
3155
3161
|
var RegExpValidationState = function RegExpValidationState(parser) {
|
3156
3162
|
this.parser = parser;
|
3157
3163
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
|
3158
|
-
this.unicodeProperties = data[parser.options.ecmaVersion >=
|
3164
|
+
this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion];
|
3159
3165
|
this.source = "";
|
3160
3166
|
this.flags = "";
|
3161
3167
|
this.start = 0;
|
@@ -4902,7 +4908,7 @@ pp$9.readWord = function() {
|
|
4902
4908
|
|
4903
4909
|
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
4904
4910
|
|
4905
|
-
var version = "6.2.
|
4911
|
+
var version = "6.2.1";
|
4906
4912
|
|
4907
4913
|
// The main exported interface (under `self.acorn` when in the
|
4908
4914
|
// browser) is a `parse` function that takes a code string and
|
@@ -15,13 +15,13 @@
|
|
15
15
|
],
|
16
16
|
"_from": "acorn@>=6.0.2 <7.0.0",
|
17
17
|
"_hasShrinkwrap": false,
|
18
|
-
"_id": "acorn@6.2.
|
18
|
+
"_id": "acorn@6.2.1",
|
19
19
|
"_inCache": true,
|
20
20
|
"_location": "/standard/acorn",
|
21
21
|
"_nodeVersion": "10.11.0",
|
22
22
|
"_npmOperationalInternal": {
|
23
23
|
"host": "s3://npm-registry-packages",
|
24
|
-
"tmp": "tmp/acorn_6.2.
|
24
|
+
"tmp": "tmp/acorn_6.2.1_1563633029905_0.4120628992889064"
|
25
25
|
},
|
26
26
|
"_npmUser": {
|
27
27
|
"name": "marijn",
|
@@ -41,8 +41,8 @@
|
|
41
41
|
"_requiredBy": [
|
42
42
|
"/standard/espree"
|
43
43
|
],
|
44
|
-
"_resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.
|
45
|
-
"_shasum": "
|
44
|
+
"_resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz",
|
45
|
+
"_shasum": "3ed8422d6dec09e6121cc7a843ca86a330a86b51",
|
46
46
|
"_shrinkwrap": null,
|
47
47
|
"_spec": "acorn@^6.0.2",
|
48
48
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ/node_modules/standard/node_modules/espree",
|
@@ -57,12 +57,12 @@
|
|
57
57
|
"devDependencies": {},
|
58
58
|
"directories": {},
|
59
59
|
"dist": {
|
60
|
-
"integrity": "sha512-
|
61
|
-
"shasum": "
|
62
|
-
"tarball": "https://registry.npmjs.org/acorn/-/acorn-6.2.
|
60
|
+
"integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==",
|
61
|
+
"shasum": "3ed8422d6dec09e6121cc7a843ca86a330a86b51",
|
62
|
+
"tarball": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz",
|
63
63
|
"fileCount": 11,
|
64
|
-
"unpackedSize":
|
65
|
-
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\
|
64
|
+
"unpackedSize": 1101957,
|
65
|
+
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMyWGCRA9TVsSAnZWagAAft8P/iSF8Za/8StuIYngjdY+\nOL4Uu1fLVU0WIsb2FrVyOp196XxlXM1iI4zZHqzyB/cd1ItZgI9/RJaOKcEZ\nhbwNOq/XnzgSbmOxQ8GKidL0FNY4To0OVg7YKnBIKKSuPn0Q53qXUioW/WXp\n7xVl3TGJ7OAUMnIdSwBmcZ0euDhIM54HpoCRFNdJySttejryQ3kn/BVCQ0V6\nO2AWiaqTAeYfxeW9lh9L3hn8fPVxI3dBaiUTCbda9SOc3Irvw0l4E1+eCyQc\nie/J+By47SPnYB4A27DcwJsNuZRq2Rfps1bVBAChTCKbGcWLvF2ZUWJdzGtK\nS6YuHmDTKTc6YRxfeXMZTjgqPrVL+r1bi6kcDWC6cN3aijMOTZ9d50sH0Id7\nZc1H48uuL4FMNRtgFKIWfHmNywkaf7DO62jBm4Yh4TQNk/95CoNiKapFdVrE\n/zrGgabAYl8nBfPMJ/mSxIJCAbJHRbWrI7gEkMFGcClLpZu3tjU//IA0z6fd\nZurYnuCJv4ZKmsd20BGIJ29OhOpHwKEFBqEYZDfRUpBcZE2JSDtWNMq3eQPD\nBSpeH+2xbgNEi1IxgC2YbaRkKNG54VJT/QTD9X/cmxga60aIagXpSfJo8CF4\n4xZvnK4+42tOhjCL9v03OEvY7FthywV2DdZyXCOWzZY/3fSisAkSYMiMIWPr\nEaoZ\r\n=vhGl\r\n-----END PGP SIGNATURE-----\r\n"
|
66
66
|
},
|
67
67
|
"engines": {
|
68
68
|
"node": ">=0.4.0"
|
@@ -95,5 +95,5 @@
|
|
95
95
|
"scripts": {
|
96
96
|
"prepare": "cd ..; npm run build:main && npm run build:bin"
|
97
97
|
},
|
98
|
-
"version": "6.2.
|
98
|
+
"version": "6.2.1"
|
99
99
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.
|
4
|
+
version: 17.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|
@@ -359,8 +359,6 @@ files:
|
|
359
359
|
- app/assets/javascripts/govuk_publishing_components/lib/select.js
|
360
360
|
- app/assets/javascripts/govuk_publishing_components/lib/toggle-input-class-on-focus.js
|
361
361
|
- app/assets/javascripts/govuk_publishing_components/lib/toggle.js
|
362
|
-
- app/assets/javascripts/govuk_publishing_components/vendor/jquery-ui-1.10.2.custom.js
|
363
|
-
- app/assets/javascripts/govuk_publishing_components/vendor/jquery.player.min.js
|
364
362
|
- app/assets/javascripts/govuk_publishing_components/vendor/magna-charta.min.js
|
365
363
|
- app/assets/javascripts/govuk_publishing_components/vendor/modernizr.js
|
366
364
|
- app/assets/stylesheets/component_guide/application.scss
|
@@ -1,1639 +0,0 @@
|
|
1
|
-
/*! jQuery UI - v1.10.2 - 2013-03-19
|
2
|
-
* http://jqueryui.com
|
3
|
-
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js
|
4
|
-
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
|
5
|
-
|
6
|
-
(function( $, undefined ) {
|
7
|
-
|
8
|
-
var uuid = 0,
|
9
|
-
runiqueId = /^ui-id-\d+$/;
|
10
|
-
|
11
|
-
// $.ui might exist from components with no dependencies, e.g., $.ui.position
|
12
|
-
$.ui = $.ui || {};
|
13
|
-
|
14
|
-
$.extend( $.ui, {
|
15
|
-
version: "1.10.2",
|
16
|
-
|
17
|
-
keyCode: {
|
18
|
-
BACKSPACE: 8,
|
19
|
-
COMMA: 188,
|
20
|
-
DELETE: 46,
|
21
|
-
DOWN: 40,
|
22
|
-
END: 35,
|
23
|
-
ENTER: 13,
|
24
|
-
ESCAPE: 27,
|
25
|
-
HOME: 36,
|
26
|
-
LEFT: 37,
|
27
|
-
NUMPAD_ADD: 107,
|
28
|
-
NUMPAD_DECIMAL: 110,
|
29
|
-
NUMPAD_DIVIDE: 111,
|
30
|
-
NUMPAD_ENTER: 108,
|
31
|
-
NUMPAD_MULTIPLY: 106,
|
32
|
-
NUMPAD_SUBTRACT: 109,
|
33
|
-
PAGE_DOWN: 34,
|
34
|
-
PAGE_UP: 33,
|
35
|
-
PERIOD: 190,
|
36
|
-
RIGHT: 39,
|
37
|
-
SPACE: 32,
|
38
|
-
TAB: 9,
|
39
|
-
UP: 38
|
40
|
-
}
|
41
|
-
});
|
42
|
-
|
43
|
-
// plugins
|
44
|
-
$.fn.extend({
|
45
|
-
focus: (function( orig ) {
|
46
|
-
return function( delay, fn ) {
|
47
|
-
return typeof delay === "number" ?
|
48
|
-
this.each(function() {
|
49
|
-
var elem = this;
|
50
|
-
setTimeout(function() {
|
51
|
-
$( elem ).focus();
|
52
|
-
if ( fn ) {
|
53
|
-
fn.call( elem );
|
54
|
-
}
|
55
|
-
}, delay );
|
56
|
-
}) :
|
57
|
-
orig.apply( this, arguments );
|
58
|
-
};
|
59
|
-
})( $.fn.focus ),
|
60
|
-
|
61
|
-
scrollParent: function() {
|
62
|
-
var scrollParent;
|
63
|
-
if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
|
64
|
-
scrollParent = this.parents().filter(function() {
|
65
|
-
return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
|
66
|
-
}).eq(0);
|
67
|
-
} else {
|
68
|
-
scrollParent = this.parents().filter(function() {
|
69
|
-
return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
|
70
|
-
}).eq(0);
|
71
|
-
}
|
72
|
-
|
73
|
-
return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
|
74
|
-
},
|
75
|
-
|
76
|
-
zIndex: function( zIndex ) {
|
77
|
-
if ( zIndex !== undefined ) {
|
78
|
-
return this.css( "zIndex", zIndex );
|
79
|
-
}
|
80
|
-
|
81
|
-
if ( this.length ) {
|
82
|
-
var elem = $( this[ 0 ] ), position, value;
|
83
|
-
while ( elem.length && elem[ 0 ] !== document ) {
|
84
|
-
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
85
|
-
// This makes behavior of this function consistent across browsers
|
86
|
-
// WebKit always returns auto if the element is positioned
|
87
|
-
position = elem.css( "position" );
|
88
|
-
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
89
|
-
// IE returns 0 when zIndex is not specified
|
90
|
-
// other browsers return a string
|
91
|
-
// we ignore the case of nested elements with an explicit value of 0
|
92
|
-
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
93
|
-
value = parseInt( elem.css( "zIndex" ), 10 );
|
94
|
-
if ( !isNaN( value ) && value !== 0 ) {
|
95
|
-
return value;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
elem = elem.parent();
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
return 0;
|
103
|
-
},
|
104
|
-
|
105
|
-
uniqueId: function() {
|
106
|
-
return this.each(function() {
|
107
|
-
if ( !this.id ) {
|
108
|
-
this.id = "ui-id-" + (++uuid);
|
109
|
-
}
|
110
|
-
});
|
111
|
-
},
|
112
|
-
|
113
|
-
removeUniqueId: function() {
|
114
|
-
return this.each(function() {
|
115
|
-
if ( runiqueId.test( this.id ) ) {
|
116
|
-
$( this ).removeAttr( "id" );
|
117
|
-
}
|
118
|
-
});
|
119
|
-
}
|
120
|
-
});
|
121
|
-
|
122
|
-
// selectors
|
123
|
-
function focusable( element, isTabIndexNotNaN ) {
|
124
|
-
var map, mapName, img,
|
125
|
-
nodeName = element.nodeName.toLowerCase();
|
126
|
-
if ( "area" === nodeName ) {
|
127
|
-
map = element.parentNode;
|
128
|
-
mapName = map.name;
|
129
|
-
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
130
|
-
return false;
|
131
|
-
}
|
132
|
-
img = $( "img[usemap=#" + mapName + "]" )[0];
|
133
|
-
return !!img && visible( img );
|
134
|
-
}
|
135
|
-
return ( /input|select|textarea|button|object/.test( nodeName ) ?
|
136
|
-
!element.disabled :
|
137
|
-
"a" === nodeName ?
|
138
|
-
element.href || isTabIndexNotNaN :
|
139
|
-
isTabIndexNotNaN) &&
|
140
|
-
// the element and all of its ancestors must be visible
|
141
|
-
visible( element );
|
142
|
-
}
|
143
|
-
|
144
|
-
function visible( element ) {
|
145
|
-
return $.expr.filters.visible( element ) &&
|
146
|
-
!$( element ).parents().addBack().filter(function() {
|
147
|
-
return $.css( this, "visibility" ) === "hidden";
|
148
|
-
}).length;
|
149
|
-
}
|
150
|
-
|
151
|
-
$.extend( $.expr[ ":" ], {
|
152
|
-
data: $.expr.createPseudo ?
|
153
|
-
$.expr.createPseudo(function( dataName ) {
|
154
|
-
return function( elem ) {
|
155
|
-
return !!$.data( elem, dataName );
|
156
|
-
};
|
157
|
-
}) :
|
158
|
-
// support: jQuery <1.8
|
159
|
-
function( elem, i, match ) {
|
160
|
-
return !!$.data( elem, match[ 3 ] );
|
161
|
-
},
|
162
|
-
|
163
|
-
focusable: function( element ) {
|
164
|
-
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
|
165
|
-
},
|
166
|
-
|
167
|
-
tabbable: function( element ) {
|
168
|
-
var tabIndex = $.attr( element, "tabindex" ),
|
169
|
-
isTabIndexNaN = isNaN( tabIndex );
|
170
|
-
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
|
171
|
-
}
|
172
|
-
});
|
173
|
-
|
174
|
-
// support: jQuery <1.8
|
175
|
-
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
|
176
|
-
$.each( [ "Width", "Height" ], function( i, name ) {
|
177
|
-
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
178
|
-
type = name.toLowerCase(),
|
179
|
-
orig = {
|
180
|
-
innerWidth: $.fn.innerWidth,
|
181
|
-
innerHeight: $.fn.innerHeight,
|
182
|
-
outerWidth: $.fn.outerWidth,
|
183
|
-
outerHeight: $.fn.outerHeight
|
184
|
-
};
|
185
|
-
|
186
|
-
function reduce( elem, size, border, margin ) {
|
187
|
-
$.each( side, function() {
|
188
|
-
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
|
189
|
-
if ( border ) {
|
190
|
-
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
|
191
|
-
}
|
192
|
-
if ( margin ) {
|
193
|
-
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
|
194
|
-
}
|
195
|
-
});
|
196
|
-
return size;
|
197
|
-
}
|
198
|
-
|
199
|
-
$.fn[ "inner" + name ] = function( size ) {
|
200
|
-
if ( size === undefined ) {
|
201
|
-
return orig[ "inner" + name ].call( this );
|
202
|
-
}
|
203
|
-
|
204
|
-
return this.each(function() {
|
205
|
-
$( this ).css( type, reduce( this, size ) + "px" );
|
206
|
-
});
|
207
|
-
};
|
208
|
-
|
209
|
-
$.fn[ "outer" + name] = function( size, margin ) {
|
210
|
-
if ( typeof size !== "number" ) {
|
211
|
-
return orig[ "outer" + name ].call( this, size );
|
212
|
-
}
|
213
|
-
|
214
|
-
return this.each(function() {
|
215
|
-
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
216
|
-
});
|
217
|
-
};
|
218
|
-
});
|
219
|
-
}
|
220
|
-
|
221
|
-
// support: jQuery <1.8
|
222
|
-
if ( !$.fn.addBack ) {
|
223
|
-
$.fn.addBack = function( selector ) {
|
224
|
-
return this.add( selector == null ?
|
225
|
-
this.prevObject : this.prevObject.filter( selector )
|
226
|
-
);
|
227
|
-
};
|
228
|
-
}
|
229
|
-
|
230
|
-
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
|
231
|
-
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
|
232
|
-
$.fn.removeData = (function( removeData ) {
|
233
|
-
return function( key ) {
|
234
|
-
if ( arguments.length ) {
|
235
|
-
return removeData.call( this, $.camelCase( key ) );
|
236
|
-
} else {
|
237
|
-
return removeData.call( this );
|
238
|
-
}
|
239
|
-
};
|
240
|
-
})( $.fn.removeData );
|
241
|
-
}
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
// deprecated
|
248
|
-
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
|
249
|
-
|
250
|
-
$.support.selectstart = "onselectstart" in document.createElement( "div" );
|
251
|
-
$.fn.extend({
|
252
|
-
disableSelection: function() {
|
253
|
-
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
|
254
|
-
".ui-disableSelection", function( event ) {
|
255
|
-
event.preventDefault();
|
256
|
-
});
|
257
|
-
},
|
258
|
-
|
259
|
-
enableSelection: function() {
|
260
|
-
return this.unbind( ".ui-disableSelection" );
|
261
|
-
}
|
262
|
-
});
|
263
|
-
|
264
|
-
$.extend( $.ui, {
|
265
|
-
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
266
|
-
plugin: {
|
267
|
-
add: function( module, option, set ) {
|
268
|
-
var i,
|
269
|
-
proto = $.ui[ module ].prototype;
|
270
|
-
for ( i in set ) {
|
271
|
-
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
272
|
-
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
273
|
-
}
|
274
|
-
},
|
275
|
-
call: function( instance, name, args ) {
|
276
|
-
var i,
|
277
|
-
set = instance.plugins[ name ];
|
278
|
-
if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
|
279
|
-
return;
|
280
|
-
}
|
281
|
-
|
282
|
-
for ( i = 0; i < set.length; i++ ) {
|
283
|
-
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
284
|
-
set[ i ][ 1 ].apply( instance.element, args );
|
285
|
-
}
|
286
|
-
}
|
287
|
-
}
|
288
|
-
},
|
289
|
-
|
290
|
-
// only used by resizable
|
291
|
-
hasScroll: function( el, a ) {
|
292
|
-
|
293
|
-
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
294
|
-
if ( $( el ).css( "overflow" ) === "hidden") {
|
295
|
-
return false;
|
296
|
-
}
|
297
|
-
|
298
|
-
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
299
|
-
has = false;
|
300
|
-
|
301
|
-
if ( el[ scroll ] > 0 ) {
|
302
|
-
return true;
|
303
|
-
}
|
304
|
-
|
305
|
-
// TODO: determine which cases actually cause this to happen
|
306
|
-
// if the element doesn't have the scroll set, see if it's possible to
|
307
|
-
// set the scroll
|
308
|
-
el[ scroll ] = 1;
|
309
|
-
has = ( el[ scroll ] > 0 );
|
310
|
-
el[ scroll ] = 0;
|
311
|
-
return has;
|
312
|
-
}
|
313
|
-
});
|
314
|
-
|
315
|
-
})( jQuery );
|
316
|
-
(function( $, undefined ) {
|
317
|
-
|
318
|
-
var uuid = 0,
|
319
|
-
slice = Array.prototype.slice,
|
320
|
-
_cleanData = $.cleanData;
|
321
|
-
$.cleanData = function( elems ) {
|
322
|
-
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
323
|
-
try {
|
324
|
-
$( elem ).triggerHandler( "remove" );
|
325
|
-
// http://bugs.jquery.com/ticket/8235
|
326
|
-
} catch( e ) {}
|
327
|
-
}
|
328
|
-
_cleanData( elems );
|
329
|
-
};
|
330
|
-
|
331
|
-
$.widget = function( name, base, prototype ) {
|
332
|
-
var fullName, existingConstructor, constructor, basePrototype,
|
333
|
-
// proxiedPrototype allows the provided prototype to remain unmodified
|
334
|
-
// so that it can be used as a mixin for multiple widgets (#8876)
|
335
|
-
proxiedPrototype = {},
|
336
|
-
namespace = name.split( "." )[ 0 ];
|
337
|
-
|
338
|
-
name = name.split( "." )[ 1 ];
|
339
|
-
fullName = namespace + "-" + name;
|
340
|
-
|
341
|
-
if ( !prototype ) {
|
342
|
-
prototype = base;
|
343
|
-
base = $.Widget;
|
344
|
-
}
|
345
|
-
|
346
|
-
// create selector for plugin
|
347
|
-
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
|
348
|
-
return !!$.data( elem, fullName );
|
349
|
-
};
|
350
|
-
|
351
|
-
$[ namespace ] = $[ namespace ] || {};
|
352
|
-
existingConstructor = $[ namespace ][ name ];
|
353
|
-
constructor = $[ namespace ][ name ] = function( options, element ) {
|
354
|
-
// allow instantiation without "new" keyword
|
355
|
-
if ( !this._createWidget ) {
|
356
|
-
return new constructor( options, element );
|
357
|
-
}
|
358
|
-
|
359
|
-
// allow instantiation without initializing for simple inheritance
|
360
|
-
// must use "new" keyword (the code above always passes args)
|
361
|
-
if ( arguments.length ) {
|
362
|
-
this._createWidget( options, element );
|
363
|
-
}
|
364
|
-
};
|
365
|
-
// extend with the existing constructor to carry over any static properties
|
366
|
-
$.extend( constructor, existingConstructor, {
|
367
|
-
version: prototype.version,
|
368
|
-
// copy the object used to create the prototype in case we need to
|
369
|
-
// redefine the widget later
|
370
|
-
_proto: $.extend( {}, prototype ),
|
371
|
-
// track widgets that inherit from this widget in case this widget is
|
372
|
-
// redefined after a widget inherits from it
|
373
|
-
_childConstructors: []
|
374
|
-
});
|
375
|
-
|
376
|
-
basePrototype = new base();
|
377
|
-
// we need to make the options hash a property directly on the new instance
|
378
|
-
// otherwise we'll modify the options hash on the prototype that we're
|
379
|
-
// inheriting from
|
380
|
-
basePrototype.options = $.widget.extend( {}, basePrototype.options );
|
381
|
-
$.each( prototype, function( prop, value ) {
|
382
|
-
if ( !$.isFunction( value ) ) {
|
383
|
-
proxiedPrototype[ prop ] = value;
|
384
|
-
return;
|
385
|
-
}
|
386
|
-
proxiedPrototype[ prop ] = (function() {
|
387
|
-
var _super = function() {
|
388
|
-
return base.prototype[ prop ].apply( this, arguments );
|
389
|
-
},
|
390
|
-
_superApply = function( args ) {
|
391
|
-
return base.prototype[ prop ].apply( this, args );
|
392
|
-
};
|
393
|
-
return function() {
|
394
|
-
var __super = this._super,
|
395
|
-
__superApply = this._superApply,
|
396
|
-
returnValue;
|
397
|
-
|
398
|
-
this._super = _super;
|
399
|
-
this._superApply = _superApply;
|
400
|
-
|
401
|
-
returnValue = value.apply( this, arguments );
|
402
|
-
|
403
|
-
this._super = __super;
|
404
|
-
this._superApply = __superApply;
|
405
|
-
|
406
|
-
return returnValue;
|
407
|
-
};
|
408
|
-
})();
|
409
|
-
});
|
410
|
-
constructor.prototype = $.widget.extend( basePrototype, {
|
411
|
-
// TODO: remove support for widgetEventPrefix
|
412
|
-
// always use the name + a colon as the prefix, e.g., draggable:start
|
413
|
-
// don't prefix for widgets that aren't DOM-based
|
414
|
-
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
|
415
|
-
}, proxiedPrototype, {
|
416
|
-
constructor: constructor,
|
417
|
-
namespace: namespace,
|
418
|
-
widgetName: name,
|
419
|
-
widgetFullName: fullName
|
420
|
-
});
|
421
|
-
|
422
|
-
// If this widget is being redefined then we need to find all widgets that
|
423
|
-
// are inheriting from it and redefine all of them so that they inherit from
|
424
|
-
// the new version of this widget. We're essentially trying to replace one
|
425
|
-
// level in the prototype chain.
|
426
|
-
if ( existingConstructor ) {
|
427
|
-
$.each( existingConstructor._childConstructors, function( i, child ) {
|
428
|
-
var childPrototype = child.prototype;
|
429
|
-
|
430
|
-
// redefine the child widget using the same prototype that was
|
431
|
-
// originally used, but inherit from the new version of the base
|
432
|
-
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
|
433
|
-
});
|
434
|
-
// remove the list of existing child constructors from the old constructor
|
435
|
-
// so the old child constructors can be garbage collected
|
436
|
-
delete existingConstructor._childConstructors;
|
437
|
-
} else {
|
438
|
-
base._childConstructors.push( constructor );
|
439
|
-
}
|
440
|
-
|
441
|
-
$.widget.bridge( name, constructor );
|
442
|
-
};
|
443
|
-
|
444
|
-
$.widget.extend = function( target ) {
|
445
|
-
var input = slice.call( arguments, 1 ),
|
446
|
-
inputIndex = 0,
|
447
|
-
inputLength = input.length,
|
448
|
-
key,
|
449
|
-
value;
|
450
|
-
for ( ; inputIndex < inputLength; inputIndex++ ) {
|
451
|
-
for ( key in input[ inputIndex ] ) {
|
452
|
-
value = input[ inputIndex ][ key ];
|
453
|
-
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
|
454
|
-
// Clone objects
|
455
|
-
if ( $.isPlainObject( value ) ) {
|
456
|
-
target[ key ] = $.isPlainObject( target[ key ] ) ?
|
457
|
-
$.widget.extend( {}, target[ key ], value ) :
|
458
|
-
// Don't extend strings, arrays, etc. with objects
|
459
|
-
$.widget.extend( {}, value );
|
460
|
-
// Copy everything else by reference
|
461
|
-
} else {
|
462
|
-
target[ key ] = value;
|
463
|
-
}
|
464
|
-
}
|
465
|
-
}
|
466
|
-
}
|
467
|
-
return target;
|
468
|
-
};
|
469
|
-
|
470
|
-
$.widget.bridge = function( name, object ) {
|
471
|
-
var fullName = object.prototype.widgetFullName || name;
|
472
|
-
$.fn[ name ] = function( options ) {
|
473
|
-
var isMethodCall = typeof options === "string",
|
474
|
-
args = slice.call( arguments, 1 ),
|
475
|
-
returnValue = this;
|
476
|
-
|
477
|
-
// allow multiple hashes to be passed on init
|
478
|
-
options = !isMethodCall && args.length ?
|
479
|
-
$.widget.extend.apply( null, [ options ].concat(args) ) :
|
480
|
-
options;
|
481
|
-
|
482
|
-
if ( isMethodCall ) {
|
483
|
-
this.each(function() {
|
484
|
-
var methodValue,
|
485
|
-
instance = $.data( this, fullName );
|
486
|
-
if ( !instance ) {
|
487
|
-
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
488
|
-
"attempted to call method '" + options + "'" );
|
489
|
-
}
|
490
|
-
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
|
491
|
-
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
|
492
|
-
}
|
493
|
-
methodValue = instance[ options ].apply( instance, args );
|
494
|
-
if ( methodValue !== instance && methodValue !== undefined ) {
|
495
|
-
returnValue = methodValue && methodValue.jquery ?
|
496
|
-
returnValue.pushStack( methodValue.get() ) :
|
497
|
-
methodValue;
|
498
|
-
return false;
|
499
|
-
}
|
500
|
-
});
|
501
|
-
} else {
|
502
|
-
this.each(function() {
|
503
|
-
var instance = $.data( this, fullName );
|
504
|
-
if ( instance ) {
|
505
|
-
instance.option( options || {} )._init();
|
506
|
-
} else {
|
507
|
-
$.data( this, fullName, new object( options, this ) );
|
508
|
-
}
|
509
|
-
});
|
510
|
-
}
|
511
|
-
|
512
|
-
return returnValue;
|
513
|
-
};
|
514
|
-
};
|
515
|
-
|
516
|
-
$.Widget = function( /* options, element */ ) {};
|
517
|
-
$.Widget._childConstructors = [];
|
518
|
-
|
519
|
-
$.Widget.prototype = {
|
520
|
-
widgetName: "widget",
|
521
|
-
widgetEventPrefix: "",
|
522
|
-
defaultElement: "<div>",
|
523
|
-
options: {
|
524
|
-
disabled: false,
|
525
|
-
|
526
|
-
// callbacks
|
527
|
-
create: null
|
528
|
-
},
|
529
|
-
_createWidget: function( options, element ) {
|
530
|
-
element = $( element || this.defaultElement || this )[ 0 ];
|
531
|
-
this.element = $( element );
|
532
|
-
this.uuid = uuid++;
|
533
|
-
this.eventNamespace = "." + this.widgetName + this.uuid;
|
534
|
-
this.options = $.widget.extend( {},
|
535
|
-
this.options,
|
536
|
-
this._getCreateOptions(),
|
537
|
-
options );
|
538
|
-
|
539
|
-
this.bindings = $();
|
540
|
-
this.hoverable = $();
|
541
|
-
this.focusable = $();
|
542
|
-
|
543
|
-
if ( element !== this ) {
|
544
|
-
$.data( element, this.widgetFullName, this );
|
545
|
-
this._on( true, this.element, {
|
546
|
-
remove: function( event ) {
|
547
|
-
if ( event.target === element ) {
|
548
|
-
this.destroy();
|
549
|
-
}
|
550
|
-
}
|
551
|
-
});
|
552
|
-
this.document = $( element.style ?
|
553
|
-
// element within the document
|
554
|
-
element.ownerDocument :
|
555
|
-
// element is window or document
|
556
|
-
element.document || element );
|
557
|
-
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
|
558
|
-
}
|
559
|
-
|
560
|
-
this._create();
|
561
|
-
this._trigger( "create", null, this._getCreateEventData() );
|
562
|
-
this._init();
|
563
|
-
},
|
564
|
-
_getCreateOptions: $.noop,
|
565
|
-
_getCreateEventData: $.noop,
|
566
|
-
_create: $.noop,
|
567
|
-
_init: $.noop,
|
568
|
-
|
569
|
-
destroy: function() {
|
570
|
-
this._destroy();
|
571
|
-
// we can probably remove the unbind calls in 2.0
|
572
|
-
// all event bindings should go through this._on()
|
573
|
-
this.element
|
574
|
-
.unbind( this.eventNamespace )
|
575
|
-
// 1.9 BC for #7810
|
576
|
-
// TODO remove dual storage
|
577
|
-
.removeData( this.widgetName )
|
578
|
-
.removeData( this.widgetFullName )
|
579
|
-
// support: jquery <1.6.3
|
580
|
-
// http://bugs.jquery.com/ticket/9413
|
581
|
-
.removeData( $.camelCase( this.widgetFullName ) );
|
582
|
-
this.widget()
|
583
|
-
.unbind( this.eventNamespace )
|
584
|
-
.removeAttr( "aria-disabled" )
|
585
|
-
.removeClass(
|
586
|
-
this.widgetFullName + "-disabled " +
|
587
|
-
"ui-state-disabled" );
|
588
|
-
|
589
|
-
// clean up events and states
|
590
|
-
this.bindings.unbind( this.eventNamespace );
|
591
|
-
this.hoverable.removeClass( "ui-state-hover" );
|
592
|
-
this.focusable.removeClass( "ui-state-focus" );
|
593
|
-
},
|
594
|
-
_destroy: $.noop,
|
595
|
-
|
596
|
-
widget: function() {
|
597
|
-
return this.element;
|
598
|
-
},
|
599
|
-
|
600
|
-
option: function( key, value ) {
|
601
|
-
var options = key,
|
602
|
-
parts,
|
603
|
-
curOption,
|
604
|
-
i;
|
605
|
-
|
606
|
-
if ( arguments.length === 0 ) {
|
607
|
-
// don't return a reference to the internal hash
|
608
|
-
return $.widget.extend( {}, this.options );
|
609
|
-
}
|
610
|
-
|
611
|
-
if ( typeof key === "string" ) {
|
612
|
-
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
613
|
-
options = {};
|
614
|
-
parts = key.split( "." );
|
615
|
-
key = parts.shift();
|
616
|
-
if ( parts.length ) {
|
617
|
-
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
|
618
|
-
for ( i = 0; i < parts.length - 1; i++ ) {
|
619
|
-
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
|
620
|
-
curOption = curOption[ parts[ i ] ];
|
621
|
-
}
|
622
|
-
key = parts.pop();
|
623
|
-
if ( value === undefined ) {
|
624
|
-
return curOption[ key ] === undefined ? null : curOption[ key ];
|
625
|
-
}
|
626
|
-
curOption[ key ] = value;
|
627
|
-
} else {
|
628
|
-
if ( value === undefined ) {
|
629
|
-
return this.options[ key ] === undefined ? null : this.options[ key ];
|
630
|
-
}
|
631
|
-
options[ key ] = value;
|
632
|
-
}
|
633
|
-
}
|
634
|
-
|
635
|
-
this._setOptions( options );
|
636
|
-
|
637
|
-
return this;
|
638
|
-
},
|
639
|
-
_setOptions: function( options ) {
|
640
|
-
var key;
|
641
|
-
|
642
|
-
for ( key in options ) {
|
643
|
-
this._setOption( key, options[ key ] );
|
644
|
-
}
|
645
|
-
|
646
|
-
return this;
|
647
|
-
},
|
648
|
-
_setOption: function( key, value ) {
|
649
|
-
this.options[ key ] = value;
|
650
|
-
|
651
|
-
if ( key === "disabled" ) {
|
652
|
-
this.widget()
|
653
|
-
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
|
654
|
-
.attr( "aria-disabled", value );
|
655
|
-
this.hoverable.removeClass( "ui-state-hover" );
|
656
|
-
this.focusable.removeClass( "ui-state-focus" );
|
657
|
-
}
|
658
|
-
|
659
|
-
return this;
|
660
|
-
},
|
661
|
-
|
662
|
-
enable: function() {
|
663
|
-
return this._setOption( "disabled", false );
|
664
|
-
},
|
665
|
-
disable: function() {
|
666
|
-
return this._setOption( "disabled", true );
|
667
|
-
},
|
668
|
-
|
669
|
-
_on: function( suppressDisabledCheck, element, handlers ) {
|
670
|
-
var delegateElement,
|
671
|
-
instance = this;
|
672
|
-
|
673
|
-
// no suppressDisabledCheck flag, shuffle arguments
|
674
|
-
if ( typeof suppressDisabledCheck !== "boolean" ) {
|
675
|
-
handlers = element;
|
676
|
-
element = suppressDisabledCheck;
|
677
|
-
suppressDisabledCheck = false;
|
678
|
-
}
|
679
|
-
|
680
|
-
// no element argument, shuffle and use this.element
|
681
|
-
if ( !handlers ) {
|
682
|
-
handlers = element;
|
683
|
-
element = this.element;
|
684
|
-
delegateElement = this.widget();
|
685
|
-
} else {
|
686
|
-
// accept selectors, DOM elements
|
687
|
-
element = delegateElement = $( element );
|
688
|
-
this.bindings = this.bindings.add( element );
|
689
|
-
}
|
690
|
-
|
691
|
-
$.each( handlers, function( event, handler ) {
|
692
|
-
function handlerProxy() {
|
693
|
-
// allow widgets to customize the disabled handling
|
694
|
-
// - disabled as an array instead of boolean
|
695
|
-
// - disabled class as method for disabling individual parts
|
696
|
-
if ( !suppressDisabledCheck &&
|
697
|
-
( instance.options.disabled === true ||
|
698
|
-
$( this ).hasClass( "ui-state-disabled" ) ) ) {
|
699
|
-
return;
|
700
|
-
}
|
701
|
-
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
702
|
-
.apply( instance, arguments );
|
703
|
-
}
|
704
|
-
|
705
|
-
// copy the guid so direct unbinding works
|
706
|
-
if ( typeof handler !== "string" ) {
|
707
|
-
handlerProxy.guid = handler.guid =
|
708
|
-
handler.guid || handlerProxy.guid || $.guid++;
|
709
|
-
}
|
710
|
-
|
711
|
-
var match = event.match( /^(\w+)\s*(.*)$/ ),
|
712
|
-
eventName = match[1] + instance.eventNamespace,
|
713
|
-
selector = match[2];
|
714
|
-
if ( selector ) {
|
715
|
-
delegateElement.delegate( selector, eventName, handlerProxy );
|
716
|
-
} else {
|
717
|
-
element.bind( eventName, handlerProxy );
|
718
|
-
}
|
719
|
-
});
|
720
|
-
},
|
721
|
-
|
722
|
-
_off: function( element, eventName ) {
|
723
|
-
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
|
724
|
-
element.unbind( eventName ).undelegate( eventName );
|
725
|
-
},
|
726
|
-
|
727
|
-
_delay: function( handler, delay ) {
|
728
|
-
function handlerProxy() {
|
729
|
-
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
730
|
-
.apply( instance, arguments );
|
731
|
-
}
|
732
|
-
var instance = this;
|
733
|
-
return setTimeout( handlerProxy, delay || 0 );
|
734
|
-
},
|
735
|
-
|
736
|
-
_hoverable: function( element ) {
|
737
|
-
this.hoverable = this.hoverable.add( element );
|
738
|
-
this._on( element, {
|
739
|
-
mouseenter: function( event ) {
|
740
|
-
$( event.currentTarget ).addClass( "ui-state-hover" );
|
741
|
-
},
|
742
|
-
mouseleave: function( event ) {
|
743
|
-
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
744
|
-
}
|
745
|
-
});
|
746
|
-
},
|
747
|
-
|
748
|
-
_focusable: function( element ) {
|
749
|
-
this.focusable = this.focusable.add( element );
|
750
|
-
this._on( element, {
|
751
|
-
focusin: function( event ) {
|
752
|
-
$( event.currentTarget ).addClass( "ui-state-focus" );
|
753
|
-
},
|
754
|
-
focusout: function( event ) {
|
755
|
-
$( event.currentTarget ).removeClass( "ui-state-focus" );
|
756
|
-
}
|
757
|
-
});
|
758
|
-
},
|
759
|
-
|
760
|
-
_trigger: function( type, event, data ) {
|
761
|
-
var prop, orig,
|
762
|
-
callback = this.options[ type ];
|
763
|
-
|
764
|
-
data = data || {};
|
765
|
-
event = $.Event( event );
|
766
|
-
event.type = ( type === this.widgetEventPrefix ?
|
767
|
-
type :
|
768
|
-
this.widgetEventPrefix + type ).toLowerCase();
|
769
|
-
// the original event may come from any element
|
770
|
-
// so we need to reset the target on the new event
|
771
|
-
event.target = this.element[ 0 ];
|
772
|
-
|
773
|
-
// copy original event properties over to the new event
|
774
|
-
orig = event.originalEvent;
|
775
|
-
if ( orig ) {
|
776
|
-
for ( prop in orig ) {
|
777
|
-
if ( !( prop in event ) ) {
|
778
|
-
event[ prop ] = orig[ prop ];
|
779
|
-
}
|
780
|
-
}
|
781
|
-
}
|
782
|
-
|
783
|
-
this.element.trigger( event, data );
|
784
|
-
return !( $.isFunction( callback ) &&
|
785
|
-
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
|
786
|
-
event.isDefaultPrevented() );
|
787
|
-
}
|
788
|
-
};
|
789
|
-
|
790
|
-
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
791
|
-
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
|
792
|
-
if ( typeof options === "string" ) {
|
793
|
-
options = { effect: options };
|
794
|
-
}
|
795
|
-
var hasOptions,
|
796
|
-
effectName = !options ?
|
797
|
-
method :
|
798
|
-
options === true || typeof options === "number" ?
|
799
|
-
defaultEffect :
|
800
|
-
options.effect || defaultEffect;
|
801
|
-
options = options || {};
|
802
|
-
if ( typeof options === "number" ) {
|
803
|
-
options = { duration: options };
|
804
|
-
}
|
805
|
-
hasOptions = !$.isEmptyObject( options );
|
806
|
-
options.complete = callback;
|
807
|
-
if ( options.delay ) {
|
808
|
-
element.delay( options.delay );
|
809
|
-
}
|
810
|
-
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
|
811
|
-
element[ method ]( options );
|
812
|
-
} else if ( effectName !== method && element[ effectName ] ) {
|
813
|
-
element[ effectName ]( options.duration, options.easing, callback );
|
814
|
-
} else {
|
815
|
-
element.queue(function( next ) {
|
816
|
-
$( this )[ method ]();
|
817
|
-
if ( callback ) {
|
818
|
-
callback.call( element[ 0 ] );
|
819
|
-
}
|
820
|
-
next();
|
821
|
-
});
|
822
|
-
}
|
823
|
-
};
|
824
|
-
});
|
825
|
-
|
826
|
-
})( jQuery );
|
827
|
-
(function( $, undefined ) {
|
828
|
-
|
829
|
-
var mouseHandled = false;
|
830
|
-
$( document ).mouseup( function() {
|
831
|
-
mouseHandled = false;
|
832
|
-
});
|
833
|
-
|
834
|
-
$.widget("ui.mouse", {
|
835
|
-
version: "1.10.2",
|
836
|
-
options: {
|
837
|
-
cancel: "input,textarea,button,select,option",
|
838
|
-
distance: 1,
|
839
|
-
delay: 0
|
840
|
-
},
|
841
|
-
_mouseInit: function() {
|
842
|
-
var that = this;
|
843
|
-
|
844
|
-
this.element
|
845
|
-
.bind("mousedown."+this.widgetName, function(event) {
|
846
|
-
return that._mouseDown(event);
|
847
|
-
})
|
848
|
-
.bind("click."+this.widgetName, function(event) {
|
849
|
-
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
|
850
|
-
$.removeData(event.target, that.widgetName + ".preventClickEvent");
|
851
|
-
event.stopImmediatePropagation();
|
852
|
-
return false;
|
853
|
-
}
|
854
|
-
});
|
855
|
-
|
856
|
-
this.started = false;
|
857
|
-
},
|
858
|
-
|
859
|
-
// TODO: make sure destroying one instance of mouse doesn't mess with
|
860
|
-
// other instances of mouse
|
861
|
-
_mouseDestroy: function() {
|
862
|
-
this.element.unbind("."+this.widgetName);
|
863
|
-
if ( this._mouseMoveDelegate ) {
|
864
|
-
$(document)
|
865
|
-
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
866
|
-
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
867
|
-
}
|
868
|
-
},
|
869
|
-
|
870
|
-
_mouseDown: function(event) {
|
871
|
-
// don't let more than one widget handle mouseStart
|
872
|
-
if( mouseHandled ) { return; }
|
873
|
-
|
874
|
-
// we may have missed mouseup (out of window)
|
875
|
-
(this._mouseStarted && this._mouseUp(event));
|
876
|
-
|
877
|
-
this._mouseDownEvent = event;
|
878
|
-
|
879
|
-
var that = this,
|
880
|
-
btnIsLeft = (event.which === 1),
|
881
|
-
// event.target.nodeName works around a bug in IE 8 with
|
882
|
-
// disabled inputs (#7620)
|
883
|
-
elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
|
884
|
-
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
885
|
-
return true;
|
886
|
-
}
|
887
|
-
|
888
|
-
this.mouseDelayMet = !this.options.delay;
|
889
|
-
if (!this.mouseDelayMet) {
|
890
|
-
this._mouseDelayTimer = setTimeout(function() {
|
891
|
-
that.mouseDelayMet = true;
|
892
|
-
}, this.options.delay);
|
893
|
-
}
|
894
|
-
|
895
|
-
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
896
|
-
this._mouseStarted = (this._mouseStart(event) !== false);
|
897
|
-
if (!this._mouseStarted) {
|
898
|
-
event.preventDefault();
|
899
|
-
return true;
|
900
|
-
}
|
901
|
-
}
|
902
|
-
|
903
|
-
// Click event may never have fired (Gecko & Opera)
|
904
|
-
if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
|
905
|
-
$.removeData(event.target, this.widgetName + ".preventClickEvent");
|
906
|
-
}
|
907
|
-
|
908
|
-
// these delegates are required to keep context
|
909
|
-
this._mouseMoveDelegate = function(event) {
|
910
|
-
return that._mouseMove(event);
|
911
|
-
};
|
912
|
-
this._mouseUpDelegate = function(event) {
|
913
|
-
return that._mouseUp(event);
|
914
|
-
};
|
915
|
-
$(document)
|
916
|
-
.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
917
|
-
.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
918
|
-
|
919
|
-
event.preventDefault();
|
920
|
-
|
921
|
-
mouseHandled = true;
|
922
|
-
return true;
|
923
|
-
},
|
924
|
-
|
925
|
-
_mouseMove: function(event) {
|
926
|
-
// IE mouseup check - mouseup happened when mouse was out of window
|
927
|
-
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
|
928
|
-
return this._mouseUp(event);
|
929
|
-
}
|
930
|
-
|
931
|
-
if (this._mouseStarted) {
|
932
|
-
this._mouseDrag(event);
|
933
|
-
return event.preventDefault();
|
934
|
-
}
|
935
|
-
|
936
|
-
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
937
|
-
this._mouseStarted =
|
938
|
-
(this._mouseStart(this._mouseDownEvent, event) !== false);
|
939
|
-
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
|
940
|
-
}
|
941
|
-
|
942
|
-
return !this._mouseStarted;
|
943
|
-
},
|
944
|
-
|
945
|
-
_mouseUp: function(event) {
|
946
|
-
$(document)
|
947
|
-
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
|
948
|
-
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
|
949
|
-
|
950
|
-
if (this._mouseStarted) {
|
951
|
-
this._mouseStarted = false;
|
952
|
-
|
953
|
-
if (event.target === this._mouseDownEvent.target) {
|
954
|
-
$.data(event.target, this.widgetName + ".preventClickEvent", true);
|
955
|
-
}
|
956
|
-
|
957
|
-
this._mouseStop(event);
|
958
|
-
}
|
959
|
-
|
960
|
-
return false;
|
961
|
-
},
|
962
|
-
|
963
|
-
_mouseDistanceMet: function(event) {
|
964
|
-
return (Math.max(
|
965
|
-
Math.abs(this._mouseDownEvent.pageX - event.pageX),
|
966
|
-
Math.abs(this._mouseDownEvent.pageY - event.pageY)
|
967
|
-
) >= this.options.distance
|
968
|
-
);
|
969
|
-
},
|
970
|
-
|
971
|
-
_mouseDelayMet: function(/* event */) {
|
972
|
-
return this.mouseDelayMet;
|
973
|
-
},
|
974
|
-
|
975
|
-
// These are placeholder methods, to be overriden by extending plugin
|
976
|
-
_mouseStart: function(/* event */) {},
|
977
|
-
_mouseDrag: function(/* event */) {},
|
978
|
-
_mouseStop: function(/* event */) {},
|
979
|
-
_mouseCapture: function(/* event */) { return true; }
|
980
|
-
});
|
981
|
-
|
982
|
-
})(jQuery);
|
983
|
-
(function( $, undefined ) {
|
984
|
-
|
985
|
-
// number of pages in a slider
|
986
|
-
// (how many times can you page up/down to go through the whole range)
|
987
|
-
var numPages = 5;
|
988
|
-
|
989
|
-
$.widget( "ui.slider", $.ui.mouse, {
|
990
|
-
version: "1.10.2",
|
991
|
-
widgetEventPrefix: "slide",
|
992
|
-
|
993
|
-
options: {
|
994
|
-
animate: false,
|
995
|
-
distance: 0,
|
996
|
-
max: 100,
|
997
|
-
min: 0,
|
998
|
-
orientation: "horizontal",
|
999
|
-
range: false,
|
1000
|
-
step: 1,
|
1001
|
-
value: 0,
|
1002
|
-
values: null,
|
1003
|
-
|
1004
|
-
// callbacks
|
1005
|
-
change: null,
|
1006
|
-
slide: null,
|
1007
|
-
start: null,
|
1008
|
-
stop: null
|
1009
|
-
},
|
1010
|
-
|
1011
|
-
_create: function() {
|
1012
|
-
this._keySliding = false;
|
1013
|
-
this._mouseSliding = false;
|
1014
|
-
this._animateOff = true;
|
1015
|
-
this._handleIndex = null;
|
1016
|
-
this._detectOrientation();
|
1017
|
-
this._mouseInit();
|
1018
|
-
|
1019
|
-
this.element
|
1020
|
-
.addClass( "ui-slider" +
|
1021
|
-
" ui-slider-" + this.orientation +
|
1022
|
-
" ui-widget" +
|
1023
|
-
" ui-widget-content" +
|
1024
|
-
" ui-corner-all");
|
1025
|
-
|
1026
|
-
this._refresh();
|
1027
|
-
this._setOption( "disabled", this.options.disabled );
|
1028
|
-
|
1029
|
-
this._animateOff = false;
|
1030
|
-
},
|
1031
|
-
|
1032
|
-
_refresh: function() {
|
1033
|
-
this._createRange();
|
1034
|
-
this._createHandles();
|
1035
|
-
this._setupEvents();
|
1036
|
-
this._refreshValue();
|
1037
|
-
},
|
1038
|
-
|
1039
|
-
_createHandles: function() {
|
1040
|
-
var i, handleCount,
|
1041
|
-
options = this.options,
|
1042
|
-
existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
|
1043
|
-
handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
|
1044
|
-
handles = [];
|
1045
|
-
|
1046
|
-
handleCount = ( options.values && options.values.length ) || 1;
|
1047
|
-
|
1048
|
-
if ( existingHandles.length > handleCount ) {
|
1049
|
-
existingHandles.slice( handleCount ).remove();
|
1050
|
-
existingHandles = existingHandles.slice( 0, handleCount );
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
for ( i = existingHandles.length; i < handleCount; i++ ) {
|
1054
|
-
handles.push( handle );
|
1055
|
-
}
|
1056
|
-
|
1057
|
-
this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
|
1058
|
-
|
1059
|
-
this.handle = this.handles.eq( 0 );
|
1060
|
-
|
1061
|
-
this.handles.each(function( i ) {
|
1062
|
-
$( this ).data( "ui-slider-handle-index", i );
|
1063
|
-
});
|
1064
|
-
},
|
1065
|
-
|
1066
|
-
_createRange: function() {
|
1067
|
-
var options = this.options,
|
1068
|
-
classes = "";
|
1069
|
-
|
1070
|
-
if ( options.range ) {
|
1071
|
-
if ( options.range === true ) {
|
1072
|
-
if ( !options.values ) {
|
1073
|
-
options.values = [ this._valueMin(), this._valueMin() ];
|
1074
|
-
} else if ( options.values.length && options.values.length !== 2 ) {
|
1075
|
-
options.values = [ options.values[0], options.values[0] ];
|
1076
|
-
} else if ( $.isArray( options.values ) ) {
|
1077
|
-
options.values = options.values.slice(0);
|
1078
|
-
}
|
1079
|
-
}
|
1080
|
-
|
1081
|
-
if ( !this.range || !this.range.length ) {
|
1082
|
-
this.range = $( "<div></div>" )
|
1083
|
-
.appendTo( this.element );
|
1084
|
-
|
1085
|
-
classes = "ui-slider-range" +
|
1086
|
-
// note: this isn't the most fittingly semantic framework class for this element,
|
1087
|
-
// but worked best visually with a variety of themes
|
1088
|
-
" ui-widget-header ui-corner-all";
|
1089
|
-
} else {
|
1090
|
-
this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
|
1091
|
-
// Handle range switching from true to min/max
|
1092
|
-
.css({
|
1093
|
-
"left": "",
|
1094
|
-
"bottom": ""
|
1095
|
-
});
|
1096
|
-
}
|
1097
|
-
|
1098
|
-
this.range.addClass( classes +
|
1099
|
-
( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
|
1100
|
-
} else {
|
1101
|
-
this.range = $([]);
|
1102
|
-
}
|
1103
|
-
},
|
1104
|
-
|
1105
|
-
_setupEvents: function() {
|
1106
|
-
var elements = this.handles.add( this.range ).filter( "a" );
|
1107
|
-
this._off( elements );
|
1108
|
-
this._on( elements, this._handleEvents );
|
1109
|
-
this._hoverable( elements );
|
1110
|
-
this._focusable( elements );
|
1111
|
-
},
|
1112
|
-
|
1113
|
-
_destroy: function() {
|
1114
|
-
this.handles.remove();
|
1115
|
-
this.range.remove();
|
1116
|
-
|
1117
|
-
this.element
|
1118
|
-
.removeClass( "ui-slider" +
|
1119
|
-
" ui-slider-horizontal" +
|
1120
|
-
" ui-slider-vertical" +
|
1121
|
-
" ui-widget" +
|
1122
|
-
" ui-widget-content" +
|
1123
|
-
" ui-corner-all" );
|
1124
|
-
|
1125
|
-
this._mouseDestroy();
|
1126
|
-
},
|
1127
|
-
|
1128
|
-
_mouseCapture: function( event ) {
|
1129
|
-
var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
|
1130
|
-
that = this,
|
1131
|
-
o = this.options;
|
1132
|
-
|
1133
|
-
if ( o.disabled ) {
|
1134
|
-
return false;
|
1135
|
-
}
|
1136
|
-
|
1137
|
-
this.elementSize = {
|
1138
|
-
width: this.element.outerWidth(),
|
1139
|
-
height: this.element.outerHeight()
|
1140
|
-
};
|
1141
|
-
this.elementOffset = this.element.offset();
|
1142
|
-
|
1143
|
-
position = { x: event.pageX, y: event.pageY };
|
1144
|
-
normValue = this._normValueFromMouse( position );
|
1145
|
-
distance = this._valueMax() - this._valueMin() + 1;
|
1146
|
-
this.handles.each(function( i ) {
|
1147
|
-
var thisDistance = Math.abs( normValue - that.values(i) );
|
1148
|
-
if (( distance > thisDistance ) ||
|
1149
|
-
( distance === thisDistance &&
|
1150
|
-
(i === that._lastChangedValue || that.values(i) === o.min ))) {
|
1151
|
-
distance = thisDistance;
|
1152
|
-
closestHandle = $( this );
|
1153
|
-
index = i;
|
1154
|
-
}
|
1155
|
-
});
|
1156
|
-
|
1157
|
-
allowed = this._start( event, index );
|
1158
|
-
if ( allowed === false ) {
|
1159
|
-
return false;
|
1160
|
-
}
|
1161
|
-
this._mouseSliding = true;
|
1162
|
-
|
1163
|
-
this._handleIndex = index;
|
1164
|
-
|
1165
|
-
closestHandle
|
1166
|
-
.addClass( "ui-state-active" )
|
1167
|
-
.focus();
|
1168
|
-
|
1169
|
-
offset = closestHandle.offset();
|
1170
|
-
mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
|
1171
|
-
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
|
1172
|
-
left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
|
1173
|
-
top: event.pageY - offset.top -
|
1174
|
-
( closestHandle.height() / 2 ) -
|
1175
|
-
( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
|
1176
|
-
( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
|
1177
|
-
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
|
1178
|
-
};
|
1179
|
-
|
1180
|
-
if ( !this.handles.hasClass( "ui-state-hover" ) ) {
|
1181
|
-
this._slide( event, index, normValue );
|
1182
|
-
}
|
1183
|
-
this._animateOff = true;
|
1184
|
-
return true;
|
1185
|
-
},
|
1186
|
-
|
1187
|
-
_mouseStart: function() {
|
1188
|
-
return true;
|
1189
|
-
},
|
1190
|
-
|
1191
|
-
_mouseDrag: function( event ) {
|
1192
|
-
var position = { x: event.pageX, y: event.pageY },
|
1193
|
-
normValue = this._normValueFromMouse( position );
|
1194
|
-
|
1195
|
-
this._slide( event, this._handleIndex, normValue );
|
1196
|
-
|
1197
|
-
return false;
|
1198
|
-
},
|
1199
|
-
|
1200
|
-
_mouseStop: function( event ) {
|
1201
|
-
this.handles.removeClass( "ui-state-active" );
|
1202
|
-
this._mouseSliding = false;
|
1203
|
-
|
1204
|
-
this._stop( event, this._handleIndex );
|
1205
|
-
this._change( event, this._handleIndex );
|
1206
|
-
|
1207
|
-
this._handleIndex = null;
|
1208
|
-
this._clickOffset = null;
|
1209
|
-
this._animateOff = false;
|
1210
|
-
|
1211
|
-
return false;
|
1212
|
-
},
|
1213
|
-
|
1214
|
-
_detectOrientation: function() {
|
1215
|
-
this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
|
1216
|
-
},
|
1217
|
-
|
1218
|
-
_normValueFromMouse: function( position ) {
|
1219
|
-
var pixelTotal,
|
1220
|
-
pixelMouse,
|
1221
|
-
percentMouse,
|
1222
|
-
valueTotal,
|
1223
|
-
valueMouse;
|
1224
|
-
|
1225
|
-
if ( this.orientation === "horizontal" ) {
|
1226
|
-
pixelTotal = this.elementSize.width;
|
1227
|
-
pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
|
1228
|
-
} else {
|
1229
|
-
pixelTotal = this.elementSize.height;
|
1230
|
-
pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
|
1231
|
-
}
|
1232
|
-
|
1233
|
-
percentMouse = ( pixelMouse / pixelTotal );
|
1234
|
-
if ( percentMouse > 1 ) {
|
1235
|
-
percentMouse = 1;
|
1236
|
-
}
|
1237
|
-
if ( percentMouse < 0 ) {
|
1238
|
-
percentMouse = 0;
|
1239
|
-
}
|
1240
|
-
if ( this.orientation === "vertical" ) {
|
1241
|
-
percentMouse = 1 - percentMouse;
|
1242
|
-
}
|
1243
|
-
|
1244
|
-
valueTotal = this._valueMax() - this._valueMin();
|
1245
|
-
valueMouse = this._valueMin() + percentMouse * valueTotal;
|
1246
|
-
|
1247
|
-
return this._trimAlignValue( valueMouse );
|
1248
|
-
},
|
1249
|
-
|
1250
|
-
_start: function( event, index ) {
|
1251
|
-
var uiHash = {
|
1252
|
-
handle: this.handles[ index ],
|
1253
|
-
value: this.value()
|
1254
|
-
};
|
1255
|
-
if ( this.options.values && this.options.values.length ) {
|
1256
|
-
uiHash.value = this.values( index );
|
1257
|
-
uiHash.values = this.values();
|
1258
|
-
}
|
1259
|
-
return this._trigger( "start", event, uiHash );
|
1260
|
-
},
|
1261
|
-
|
1262
|
-
_slide: function( event, index, newVal ) {
|
1263
|
-
var otherVal,
|
1264
|
-
newValues,
|
1265
|
-
allowed;
|
1266
|
-
|
1267
|
-
if ( this.options.values && this.options.values.length ) {
|
1268
|
-
otherVal = this.values( index ? 0 : 1 );
|
1269
|
-
|
1270
|
-
if ( ( this.options.values.length === 2 && this.options.range === true ) &&
|
1271
|
-
( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
|
1272
|
-
) {
|
1273
|
-
newVal = otherVal;
|
1274
|
-
}
|
1275
|
-
|
1276
|
-
if ( newVal !== this.values( index ) ) {
|
1277
|
-
newValues = this.values();
|
1278
|
-
newValues[ index ] = newVal;
|
1279
|
-
// A slide can be canceled by returning false from the slide callback
|
1280
|
-
allowed = this._trigger( "slide", event, {
|
1281
|
-
handle: this.handles[ index ],
|
1282
|
-
value: newVal,
|
1283
|
-
values: newValues
|
1284
|
-
} );
|
1285
|
-
otherVal = this.values( index ? 0 : 1 );
|
1286
|
-
if ( allowed !== false ) {
|
1287
|
-
this.values( index, newVal, true );
|
1288
|
-
}
|
1289
|
-
}
|
1290
|
-
} else {
|
1291
|
-
if ( newVal !== this.value() ) {
|
1292
|
-
// A slide can be canceled by returning false from the slide callback
|
1293
|
-
allowed = this._trigger( "slide", event, {
|
1294
|
-
handle: this.handles[ index ],
|
1295
|
-
value: newVal
|
1296
|
-
} );
|
1297
|
-
if ( allowed !== false ) {
|
1298
|
-
this.value( newVal );
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
}
|
1302
|
-
},
|
1303
|
-
|
1304
|
-
_stop: function( event, index ) {
|
1305
|
-
var uiHash = {
|
1306
|
-
handle: this.handles[ index ],
|
1307
|
-
value: this.value()
|
1308
|
-
};
|
1309
|
-
if ( this.options.values && this.options.values.length ) {
|
1310
|
-
uiHash.value = this.values( index );
|
1311
|
-
uiHash.values = this.values();
|
1312
|
-
}
|
1313
|
-
|
1314
|
-
this._trigger( "stop", event, uiHash );
|
1315
|
-
},
|
1316
|
-
|
1317
|
-
_change: function( event, index ) {
|
1318
|
-
if ( !this._keySliding && !this._mouseSliding ) {
|
1319
|
-
var uiHash = {
|
1320
|
-
handle: this.handles[ index ],
|
1321
|
-
value: this.value()
|
1322
|
-
};
|
1323
|
-
if ( this.options.values && this.options.values.length ) {
|
1324
|
-
uiHash.value = this.values( index );
|
1325
|
-
uiHash.values = this.values();
|
1326
|
-
}
|
1327
|
-
|
1328
|
-
//store the last changed value index for reference when handles overlap
|
1329
|
-
this._lastChangedValue = index;
|
1330
|
-
|
1331
|
-
this._trigger( "change", event, uiHash );
|
1332
|
-
}
|
1333
|
-
},
|
1334
|
-
|
1335
|
-
value: function( newValue ) {
|
1336
|
-
if ( arguments.length ) {
|
1337
|
-
this.options.value = this._trimAlignValue( newValue );
|
1338
|
-
this._refreshValue();
|
1339
|
-
this._change( null, 0 );
|
1340
|
-
return;
|
1341
|
-
}
|
1342
|
-
|
1343
|
-
return this._value();
|
1344
|
-
},
|
1345
|
-
|
1346
|
-
values: function( index, newValue ) {
|
1347
|
-
var vals,
|
1348
|
-
newValues,
|
1349
|
-
i;
|
1350
|
-
|
1351
|
-
if ( arguments.length > 1 ) {
|
1352
|
-
this.options.values[ index ] = this._trimAlignValue( newValue );
|
1353
|
-
this._refreshValue();
|
1354
|
-
this._change( null, index );
|
1355
|
-
return;
|
1356
|
-
}
|
1357
|
-
|
1358
|
-
if ( arguments.length ) {
|
1359
|
-
if ( $.isArray( arguments[ 0 ] ) ) {
|
1360
|
-
vals = this.options.values;
|
1361
|
-
newValues = arguments[ 0 ];
|
1362
|
-
for ( i = 0; i < vals.length; i += 1 ) {
|
1363
|
-
vals[ i ] = this._trimAlignValue( newValues[ i ] );
|
1364
|
-
this._change( null, i );
|
1365
|
-
}
|
1366
|
-
this._refreshValue();
|
1367
|
-
} else {
|
1368
|
-
if ( this.options.values && this.options.values.length ) {
|
1369
|
-
return this._values( index );
|
1370
|
-
} else {
|
1371
|
-
return this.value();
|
1372
|
-
}
|
1373
|
-
}
|
1374
|
-
} else {
|
1375
|
-
return this._values();
|
1376
|
-
}
|
1377
|
-
},
|
1378
|
-
|
1379
|
-
_setOption: function( key, value ) {
|
1380
|
-
var i,
|
1381
|
-
valsLength = 0;
|
1382
|
-
|
1383
|
-
if ( key === "range" && this.options.range === true ) {
|
1384
|
-
if ( value === "min" ) {
|
1385
|
-
this.options.value = this._values( 0 );
|
1386
|
-
this.options.values = null;
|
1387
|
-
} else if ( value === "max" ) {
|
1388
|
-
this.options.value = this._values( this.options.values.length-1 );
|
1389
|
-
this.options.values = null;
|
1390
|
-
}
|
1391
|
-
}
|
1392
|
-
|
1393
|
-
if ( $.isArray( this.options.values ) ) {
|
1394
|
-
valsLength = this.options.values.length;
|
1395
|
-
}
|
1396
|
-
|
1397
|
-
$.Widget.prototype._setOption.apply( this, arguments );
|
1398
|
-
|
1399
|
-
switch ( key ) {
|
1400
|
-
case "orientation":
|
1401
|
-
this._detectOrientation();
|
1402
|
-
this.element
|
1403
|
-
.removeClass( "ui-slider-horizontal ui-slider-vertical" )
|
1404
|
-
.addClass( "ui-slider-" + this.orientation );
|
1405
|
-
this._refreshValue();
|
1406
|
-
break;
|
1407
|
-
case "value":
|
1408
|
-
this._animateOff = true;
|
1409
|
-
this._refreshValue();
|
1410
|
-
this._change( null, 0 );
|
1411
|
-
this._animateOff = false;
|
1412
|
-
break;
|
1413
|
-
case "values":
|
1414
|
-
this._animateOff = true;
|
1415
|
-
this._refreshValue();
|
1416
|
-
for ( i = 0; i < valsLength; i += 1 ) {
|
1417
|
-
this._change( null, i );
|
1418
|
-
}
|
1419
|
-
this._animateOff = false;
|
1420
|
-
break;
|
1421
|
-
case "min":
|
1422
|
-
case "max":
|
1423
|
-
this._animateOff = true;
|
1424
|
-
this._refreshValue();
|
1425
|
-
this._animateOff = false;
|
1426
|
-
break;
|
1427
|
-
case "range":
|
1428
|
-
this._animateOff = true;
|
1429
|
-
this._refresh();
|
1430
|
-
this._animateOff = false;
|
1431
|
-
break;
|
1432
|
-
}
|
1433
|
-
},
|
1434
|
-
|
1435
|
-
//internal value getter
|
1436
|
-
// _value() returns value trimmed by min and max, aligned by step
|
1437
|
-
_value: function() {
|
1438
|
-
var val = this.options.value;
|
1439
|
-
val = this._trimAlignValue( val );
|
1440
|
-
|
1441
|
-
return val;
|
1442
|
-
},
|
1443
|
-
|
1444
|
-
//internal values getter
|
1445
|
-
// _values() returns array of values trimmed by min and max, aligned by step
|
1446
|
-
// _values( index ) returns single value trimmed by min and max, aligned by step
|
1447
|
-
_values: function( index ) {
|
1448
|
-
var val,
|
1449
|
-
vals,
|
1450
|
-
i;
|
1451
|
-
|
1452
|
-
if ( arguments.length ) {
|
1453
|
-
val = this.options.values[ index ];
|
1454
|
-
val = this._trimAlignValue( val );
|
1455
|
-
|
1456
|
-
return val;
|
1457
|
-
} else if ( this.options.values && this.options.values.length ) {
|
1458
|
-
// .slice() creates a copy of the array
|
1459
|
-
// this copy gets trimmed by min and max and then returned
|
1460
|
-
vals = this.options.values.slice();
|
1461
|
-
for ( i = 0; i < vals.length; i+= 1) {
|
1462
|
-
vals[ i ] = this._trimAlignValue( vals[ i ] );
|
1463
|
-
}
|
1464
|
-
|
1465
|
-
return vals;
|
1466
|
-
} else {
|
1467
|
-
return [];
|
1468
|
-
}
|
1469
|
-
},
|
1470
|
-
|
1471
|
-
// returns the step-aligned value that val is closest to, between (inclusive) min and max
|
1472
|
-
_trimAlignValue: function( val ) {
|
1473
|
-
if ( val <= this._valueMin() ) {
|
1474
|
-
return this._valueMin();
|
1475
|
-
}
|
1476
|
-
if ( val >= this._valueMax() ) {
|
1477
|
-
return this._valueMax();
|
1478
|
-
}
|
1479
|
-
var step = ( this.options.step > 0 ) ? this.options.step : 1,
|
1480
|
-
valModStep = (val - this._valueMin()) % step,
|
1481
|
-
alignValue = val - valModStep;
|
1482
|
-
|
1483
|
-
if ( Math.abs(valModStep) * 2 >= step ) {
|
1484
|
-
alignValue += ( valModStep > 0 ) ? step : ( -step );
|
1485
|
-
}
|
1486
|
-
|
1487
|
-
// Since JavaScript has problems with large floats, round
|
1488
|
-
// the final value to 5 digits after the decimal point (see #4124)
|
1489
|
-
return parseFloat( alignValue.toFixed(5) );
|
1490
|
-
},
|
1491
|
-
|
1492
|
-
_valueMin: function() {
|
1493
|
-
return this.options.min;
|
1494
|
-
},
|
1495
|
-
|
1496
|
-
_valueMax: function() {
|
1497
|
-
return this.options.max;
|
1498
|
-
},
|
1499
|
-
|
1500
|
-
_refreshValue: function() {
|
1501
|
-
var lastValPercent, valPercent, value, valueMin, valueMax,
|
1502
|
-
oRange = this.options.range,
|
1503
|
-
o = this.options,
|
1504
|
-
that = this,
|
1505
|
-
animate = ( !this._animateOff ) ? o.animate : false,
|
1506
|
-
_set = {};
|
1507
|
-
|
1508
|
-
if ( this.options.values && this.options.values.length ) {
|
1509
|
-
this.handles.each(function( i ) {
|
1510
|
-
valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
|
1511
|
-
_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
1512
|
-
$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
1513
|
-
if ( that.options.range === true ) {
|
1514
|
-
if ( that.orientation === "horizontal" ) {
|
1515
|
-
if ( i === 0 ) {
|
1516
|
-
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
|
1517
|
-
}
|
1518
|
-
if ( i === 1 ) {
|
1519
|
-
that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
1520
|
-
}
|
1521
|
-
} else {
|
1522
|
-
if ( i === 0 ) {
|
1523
|
-
that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
|
1524
|
-
}
|
1525
|
-
if ( i === 1 ) {
|
1526
|
-
that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
|
1527
|
-
}
|
1528
|
-
}
|
1529
|
-
}
|
1530
|
-
lastValPercent = valPercent;
|
1531
|
-
});
|
1532
|
-
} else {
|
1533
|
-
value = this.value();
|
1534
|
-
valueMin = this._valueMin();
|
1535
|
-
valueMax = this._valueMax();
|
1536
|
-
valPercent = ( valueMax !== valueMin ) ?
|
1537
|
-
( value - valueMin ) / ( valueMax - valueMin ) * 100 :
|
1538
|
-
0;
|
1539
|
-
_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
|
1540
|
-
this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
|
1541
|
-
|
1542
|
-
if ( oRange === "min" && this.orientation === "horizontal" ) {
|
1543
|
-
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
|
1544
|
-
}
|
1545
|
-
if ( oRange === "max" && this.orientation === "horizontal" ) {
|
1546
|
-
this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
|
1547
|
-
}
|
1548
|
-
if ( oRange === "min" && this.orientation === "vertical" ) {
|
1549
|
-
this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
|
1550
|
-
}
|
1551
|
-
if ( oRange === "max" && this.orientation === "vertical" ) {
|
1552
|
-
this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
|
1553
|
-
}
|
1554
|
-
}
|
1555
|
-
},
|
1556
|
-
|
1557
|
-
_handleEvents: {
|
1558
|
-
keydown: function( event ) {
|
1559
|
-
/*jshint maxcomplexity:25*/
|
1560
|
-
var allowed, curVal, newVal, step,
|
1561
|
-
index = $( event.target ).data( "ui-slider-handle-index" );
|
1562
|
-
|
1563
|
-
switch ( event.keyCode ) {
|
1564
|
-
case $.ui.keyCode.HOME:
|
1565
|
-
case $.ui.keyCode.END:
|
1566
|
-
case $.ui.keyCode.PAGE_UP:
|
1567
|
-
case $.ui.keyCode.PAGE_DOWN:
|
1568
|
-
case $.ui.keyCode.UP:
|
1569
|
-
case $.ui.keyCode.RIGHT:
|
1570
|
-
case $.ui.keyCode.DOWN:
|
1571
|
-
case $.ui.keyCode.LEFT:
|
1572
|
-
event.preventDefault();
|
1573
|
-
if ( !this._keySliding ) {
|
1574
|
-
this._keySliding = true;
|
1575
|
-
$( event.target ).addClass( "ui-state-active" );
|
1576
|
-
allowed = this._start( event, index );
|
1577
|
-
if ( allowed === false ) {
|
1578
|
-
return;
|
1579
|
-
}
|
1580
|
-
}
|
1581
|
-
break;
|
1582
|
-
}
|
1583
|
-
|
1584
|
-
step = this.options.step;
|
1585
|
-
if ( this.options.values && this.options.values.length ) {
|
1586
|
-
curVal = newVal = this.values( index );
|
1587
|
-
} else {
|
1588
|
-
curVal = newVal = this.value();
|
1589
|
-
}
|
1590
|
-
|
1591
|
-
switch ( event.keyCode ) {
|
1592
|
-
case $.ui.keyCode.HOME:
|
1593
|
-
newVal = this._valueMin();
|
1594
|
-
break;
|
1595
|
-
case $.ui.keyCode.END:
|
1596
|
-
newVal = this._valueMax();
|
1597
|
-
break;
|
1598
|
-
case $.ui.keyCode.PAGE_UP:
|
1599
|
-
newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
|
1600
|
-
break;
|
1601
|
-
case $.ui.keyCode.PAGE_DOWN:
|
1602
|
-
newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
|
1603
|
-
break;
|
1604
|
-
case $.ui.keyCode.UP:
|
1605
|
-
case $.ui.keyCode.RIGHT:
|
1606
|
-
if ( curVal === this._valueMax() ) {
|
1607
|
-
return;
|
1608
|
-
}
|
1609
|
-
newVal = this._trimAlignValue( curVal + step );
|
1610
|
-
break;
|
1611
|
-
case $.ui.keyCode.DOWN:
|
1612
|
-
case $.ui.keyCode.LEFT:
|
1613
|
-
if ( curVal === this._valueMin() ) {
|
1614
|
-
return;
|
1615
|
-
}
|
1616
|
-
newVal = this._trimAlignValue( curVal - step );
|
1617
|
-
break;
|
1618
|
-
}
|
1619
|
-
|
1620
|
-
this._slide( event, index, newVal );
|
1621
|
-
},
|
1622
|
-
click: function( event ) {
|
1623
|
-
event.preventDefault();
|
1624
|
-
},
|
1625
|
-
keyup: function( event ) {
|
1626
|
-
var index = $( event.target ).data( "ui-slider-handle-index" );
|
1627
|
-
|
1628
|
-
if ( this._keySliding ) {
|
1629
|
-
this._keySliding = false;
|
1630
|
-
this._stop( event, index );
|
1631
|
-
this._change( event, index );
|
1632
|
-
$( event.target ).removeClass( "ui-state-active" );
|
1633
|
-
}
|
1634
|
-
}
|
1635
|
-
}
|
1636
|
-
|
1637
|
-
});
|
1638
|
-
|
1639
|
-
}(jQuery));
|